addedInput schema / properties / structured_query
Added value: +{
+ "additionalProperties": false,
+ "description": "Policy-authorized structured filters and ordering. Use instead of raw query/orderby; supports bounded equality, set, range, text, null, AND/OR group, and order_by cases.",
+ "properties": {
+ "filter": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "eq",
+ "neq"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "equality",
+ "type": "string"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "in",
+ "not_in"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "set",
+ "type": "string"
+ },
+ "values": {
+ "items": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ },
+ "maxItems": 20,
+ "minItems": 1,
+ "type": "array"
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "values"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "gt",
+ "gte",
+ "lt",
+ "lte"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "range",
+ "type": "string"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "lower": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ },
+ "operator": {
+ "const": "between",
+ "type": "string"
+ },
+ "type": {
+ "const": "range",
+ "type": "string"
+ },
+ "upper": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "lower",
+ "upper"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "contains",
+ "not_contains",
+ "starts_with",
+ "ends_with"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "text",
+ "type": "string"
+ },
+ "value": {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "is_null",
+ "is_not_null"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "null",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "conditions": {
+ "items": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "eq",
+ "neq"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "equality",
+ "type": "string"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "in",
+ "not_in"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "set",
+ "type": "string"
+ },
+ "values": {
+ "items": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ },
+ "maxItems": 20,
+ "minItems": 1,
+ "type": "array"
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "values"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "gt",
+ "gte",
+ "lt",
+ "lte"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "range",
+ "type": "string"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "lower": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ },
+ "operator": {
+ "const": "between",
+ "type": "string"
+ },
+ "type": {
+ "const": "range",
+ "type": "string"
+ },
+ "upper": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "lower",
+ "upper"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "contains",
+ "not_contains",
+ "starts_with",
+ "ends_with"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "text",
+ "type": "string"
+ },
+ "value": {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "is_null",
+ "is_not_null"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "null",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "conditions": {
+ "items": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "eq",
+ "neq"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "equality",
+ "type": "string"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "in",
+ "not_in"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "set",
+ "type": "string"
+ },
+ "values": {
+ "items": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ },
+ "maxItems": 20,
+ "minItems": 1,
+ "type": "array"
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "values"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "gt",
+ "gte",
+ "lt",
+ "lte"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "range",
+ "type": "string"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "lower": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ },
+ "operator": {
+ "const": "between",
+ "type": "string"
+ },
+ "type": {
+ "const": "range",
+ "type": "string"
+ },
+ "upper": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "lower",
+ "upper"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "contains",
+ "not_contains",
+ "starts_with",
+ "ends_with"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "text",
+ "type": "string"
+ },
+ "value": {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "is_null",
+ "is_not_null"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "null",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "conditions": {
+ "items": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "eq",
+ "neq"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "equality",
+ "type": "string"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "in",
+ "not_in"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "set",
+ "type": "string"
+ },
+ "values": {
+ "items": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ },
+ "maxItems": 20,
+ "minItems": 1,
+ "type": "array"
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "values"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "gt",
+ "gte",
+ "lt",
+ "lte"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "range",
+ "type": "string"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "lower": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ },
+ "operator": {
+ "const": "between",
+ "type": "string"
+ },
+ "type": {
+ "const": "range",
+ "type": "string"
+ },
+ "upper": {
+ "anyOf": [
+ {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "lower",
+ "upper"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "contains",
+ "not_contains",
+ "starts_with",
+ "ends_with"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "text",
+ "type": "string"
+ },
+ "value": {
+ "maxLength": 512,
+ "minLength": 1,
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ },
+ "operator": {
+ "enum": [
+ "is_null",
+ "is_not_null"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "null",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "operator"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "maxItems": 32,
+ "minItems": 1,
+ "type": "array"
+ },
+ "operator": {
+ "enum": [
+ "and",
+ "or"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "group",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "operator",
+ "conditions"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "maxItems": 32,
+ "minItems": 1,
+ "type": "array"
+ },
+ "operator": {
+ "enum": [
+ "and",
+ "or"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "group",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "operator",
+ "conditions"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "maxItems": 32,
+ "minItems": 1,
+ "type": "array"
+ },
+ "operator": {
+ "enum": [
+ "and",
+ "or"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "const": "group",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "operator",
+ "conditions"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "order_by": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "direction": {
+ "default": "asc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ },
+ "field": {
+ "pattern": "^[a-z][a-z0-9_]{0,79}$",
+ "type": "string"
+ }
+ },
+ "required": [
+ "field"
+ ],
+ "type": "object"
+ },
+ "maxItems": 4,
+ "minItems": 1,
+ "type": "array"
+ }
+ },
+ "type": "object"
+}