{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aura-historia-com/json-schema/aura-historia-com-user-search-filter-collection-data-schema.json",
  "title": "UserSearchFilterCollectionData",
  "description": "Paginated collection of user search filters with flattened pagination",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aura-historia-com-search-filters-api-openapi.yml#/components/schemas/UserSearchFilterCollectionData",
  "type": "object",
  "required": [
    "items",
    "from",
    "size"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/UserSearchFilterData"
      },
      "description": "Array of search filters in the current page"
    },
    "from": {
      "type": "integer",
      "minimum": 0,
      "description": "Number of product-listings skipped (offset)"
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Number of search filters returned in the current page."
    },
    "total": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "description": "Total number of product-listings matching the query"
    }
  },
  "$defs": {
    "CurrencyData": {
      "type": "string",
      "enum": [
        "EUR",
        "GBP",
        "USD",
        "AUD",
        "CAD",
        "NZD",
        "CNY",
        "BRL",
        "PLN",
        "TRY",
        "JPY",
        "CZK",
        "RUB",
        "AED",
        "SAR",
        "HKD",
        "SGD",
        "CHF",
        "ZAR",
        "SEK",
        "DKK",
        "NOK",
        "KRW",
        "INR",
        "TWD",
        "HUF",
        "RON",
        "MXN",
        "THB",
        "ARS"
      ],
      "description": "Supported currencies (ISO 4217 codes):\n- EUR: Euro\n- GBP: British Pound\n- USD: US Dollar\n- AUD: Australian Dollar\n- CAD: Canadian Dollar\n- NZD: New Zealand Dollar\n- CNY: Chinese Yuan\n- BRL: Brazilian Real\n- PLN: Polish Złoty\n- TRY: Turkish Lira\n- JPY: Japanese Yen\n- CZK: Czech Koruna\n- RUB: Russian Ruble\n- AED: UAE Dirham\n- SAR: Saudi Riyal\n- HKD: Hong Kong Dollar\n- SGD: Singapore Dollar\n- CHF: Swiss Franc\n- ZAR: South African Rand\n- SEK: Swedish Krona\n- DKK: Danish Krone\n- NOK: Norwegian Krone\n- KRW: South Korean Won\n- INR: Indian Rupee\n- TWD: New Taiwan Dollar\n- HUF: Hungarian Forint\n- RON: Romanian Leu\n- MXN: Mexican Peso\n- THB: Thai Baht\n- ARS: Argentine Peso (2 minor-unit decimal places)\n",
      "default": "EUR"
    },
    "GeographicOriginData": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "latitude",
        "longitude"
      ],
      "description": "Explicit finite numeric WGS 84 coordinates in degrees; no text, address or preference resolution.",
      "properties": {
        "latitude": {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        },
        "longitude": {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        }
      }
    },
    "GeographicRadiusData": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "amount",
        "unit"
      ],
      "description": "Finite positive radius in the supplied unit, equivalent to at most 20000 kilometres. The supplied amount and unit are preserved in private saved-filter snapshots.",
      "properties": {
        "amount": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "unit": {
          "type": "string",
          "enum": [
            "KILOMETERS",
            "MILES",
            "METERS",
            "YARDS",
            "FEET",
            "INCHES",
            "CENTIMETERS",
            "MILLIMETERS",
            "NAUTICAL_MILES"
          ]
        }
      }
    },
    "GeographicSearchData": {
      "type": "object",
      "additionalProperties": false,
      "description": "At least one country, subdivision, radius or distance order is required. Sets are OR; distinct geographic predicates are AND. Subdivisions must belong to a supplied country when countries is nonempty. Absence excludes a result. Radius and ordering require an explicit numeric origin; an origin or approximate mode without proximity is invalid. Strict proximity admits PREMISES only; approximate also admits STREET, LOCALITY and REPRESENTATIVE. Distance ordering is incompatible with the existing sort. Saved filters retain a private immutable snapshot until replaced.",
      "properties": {
        "countries": {
          "type": "array",
          "maxItems": 100,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          }
        },
        "subdivisions": {
          "type": "array",
          "maxItems": 100,
          "uniqueItems": true,
          "items": {
            "type": "string"
          }
        },
        "origin": {
          "$ref": "#/$defs/GeographicOriginData"
        },
        "radius": {
          "$ref": "#/$defs/GeographicRadiusData"
        },
        "mode": {
          "type": "string",
          "enum": [
            "STRICT",
            "APPROXIMATE"
          ],
          "default": "STRICT"
        },
        "distanceOrder": {
          "type": "string",
          "enum": [
            "ASC",
            "DESC"
          ]
        }
      }
    },
    "LanguageData": {
      "type": "string",
      "enum": [
        "de",
        "en",
        "fr",
        "es",
        "it",
        "zh",
        "pt",
        "pl",
        "tr",
        "nl",
        "cs",
        "ja",
        "ru",
        "ar"
      ],
      "description": "Supported language codes (ISO 639-1 canonical values):\n- de: German (includes de-DE, de-AT, de-CH, de-LU, de-LI)\n- en: English (includes en-US, en-GB, en-AU, en-CA, en-NZ, and backend-specific accepted alias en_IE)\n- fr: French (includes fr-FR, fr-CA, fr-BE, fr-CH, fr-LU)\n- es: Spanish (includes es-ES, es-MX, es-AR, es-CO, es-CL, es-PE, es-VE)\n- it: Italian (includes it-IT, it-CH)\n- zh: Chinese (Simplified) (includes zh-CN, zh-Hans)\n- pt: Portuguese (includes pt-PT, pt-BR)\n- pl: Polish (includes pl-PL)\n- tr: Turkish (includes tr-TR)\n- nl: Dutch (includes nl-NL, nl-BE)\n- cs: Czech (includes cs-CZ)\n- ja: Japanese (includes ja-JP)\n- ru: Russian (includes ru-RU)\n- ar: Arabic (includes ar-SA, ar-EG, ar-AE)\n\n`de`, `en`, `fr`, `es`, and `it` are fully supported localization/translation-target languages.\n`zh`, `pt`, `pl`, `tr`, `nl`, `cs`, `ja`, `ru`, and `ar` are ingestion-only languages:\nthey can appear in stored/native content and are accepted anywhere `LanguageData` is used,\nbut backend-generated translations and fallback localized strings are not produced in these languages.\n",
      "default": "en"
    },
    "ListingAvailabilityData": {
      "type": "string",
      "enum": [
        "AVAILABLE",
        "IN_STOCK",
        "LIMITED_AVAILABILITY",
        "BACK_ORDER",
        "MADE_TO_ORDER",
        "PRE_ORDER",
        "PRE_SALE",
        "UNAVAILABLE",
        "RESERVED",
        "OUT_OF_STOCK",
        "SOLD_OUT"
      ],
      "description": "Current reliable source assertion of listing purchase availability. Omitted or `null` means Aura has no reliable current assertion."
    },
    "ListingOrderabilityData": {
      "type": "string",
      "enum": [
        "ORDERABLE_NOW",
        "ORDERABLE_CONDITIONALLY",
        "NOT_ORDERABLE"
      ],
      "description": "Broad classification derived from a concrete availability assertion; it is not independently stored."
    },
    "ProductListingSearchData": {
      "type": "object",
      "description": "ProductListing search criteria used by saved search filters.",
      "properties": {
        "shipping": {
          "anyOf": [
            {
              "$ref": "#/$defs/ShippingSearchData"
            },
            {
              "type": [
                "object",
                "null"
              ],
              "enum": [
                null
              ]
            }
          ],
          "description": "Complete shipping predicate. Omit to leave unchanged in PATCH; null clears it. Saved country values pin their reference release and interpretation independently of browsing preferences."
        },
        "language": {
          "$ref": "#/$defs/LanguageData"
        },
        "currency": {
          "$ref": "#/$defs/CurrencyData"
        },
        "productQuery": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "enhancedSearchDescription": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 1,
          "maxLength": 1000
        },
        "excludeProductListingId": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true,
          "description": "ProductListing IDs to exclude."
        },
        "listingSourceId": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true,
          "description": "ListingSource IDs to include."
        },
        "excludeListingSourceId": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "uniqueItems": true,
          "description": "ListingSource IDs to exclude."
        },
        "auctionId": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "uniqueItems": true,
          "maxItems": 100,
          "description": "Exact resolved Auction membership IDs. Omit to preserve; `null` clears."
        },
        "price": {
          "allOf": [
            {
              "$ref": "#/$defs/RangeQueryUInt64"
            }
          ]
        },
        "availability": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/ListingAvailabilityData"
          },
          "uniqueItems": true
        },
        "orderability": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/ListingOrderabilityData"
          },
          "uniqueItems": true
        },
        "includeUnspecifiedAvailability": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "created": {
          "allOf": [
            {
              "$ref": "#/$defs/RangeQueryDateTime"
            }
          ]
        },
        "updated": {
          "allOf": [
            {
              "$ref": "#/$defs/RangeQueryDateTime"
            }
          ]
        },
        "lotBiddingOpens": {
          "allOf": [
            {
              "$ref": "#/$defs/RangeQueryDateTime"
            }
          ]
        },
        "lotScheduledCloses": {
          "allOf": [
            {
              "$ref": "#/$defs/RangeQueryDateTime"
            }
          ]
        },
        "geography": {
          "$ref": "#/$defs/GeographicSearchData"
        }
      }
    },
    "RangeQueryDateTime": {
      "type": "object",
      "description": "Range query for date and time values",
      "properties": {
        "min": {
          "type": "string",
          "format": "date-time",
          "description": "Minimum date and time (inclusive, RFC3339 format)"
        },
        "max": {
          "type": "string",
          "format": "date-time",
          "description": "Maximum date and time (inclusive, RFC3339 format)"
        }
      }
    },
    "RangeQueryUInt64": {
      "type": "object",
      "description": "Range query for numeric values in minor currency units for the selected indexed currency; no request-time conversion occurs",
      "properties": {
        "min": {
          "type": "integer",
          "minimum": 0,
          "description": "Minimum value (inclusive)"
        },
        "max": {
          "type": "integer",
          "minimum": 0,
          "description": "Maximum value (inclusive)"
        }
      }
    },
    "ResourceStateData": {
      "type": "string",
      "description": "Activation state of a stored user-owned resource such as a saved search filter.\n`ACTIVE` resources are eligible for their normal runtime behavior.\n`INACTIVE_BY_USER` resources were explicitly deactivated by the user.\n`INACTIVE_BY_RESTRICTED_PLAN` resources remain stored but are inactive because the user's current tier no longer allows them to stay active.\n",
      "enum": [
        "ACTIVE",
        "INACTIVE_BY_USER",
        "INACTIVE_BY_RESTRICTED_PLAN"
      ]
    },
    "ShippingSearchData": {
      "type": "object",
      "additionalProperties": false,
      "description": "AND predicates over the supported definite whole-country projection. Country, service, currency and per-item amount must belong to one offer. Fixed and explicitly denominated free PER_ITEM rates support an inclusive maximum; free is zero. FROM, estimated, external, requested, absent and differently based prices cannot satisfy a maximum. Postal/variant/cart uncertainty cannot become a definite country match. Missing offers do not mean unavailable or collection-only. No query changes the browsing preference; returned shipping still uses current PostgreSQL authority. Omitted destination selects no country. NONE alone disables shipping filtering (clears it in PATCH); otherwise a country or collectionOffered=true is required. Service and maximum require a country. Shipping observation age imposes no expiry.",
      "properties": {
        "destination": {
          "oneOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "kind",
                "country"
              ],
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "COUNTRY"
                  ]
                },
                "country": {
                  "type": "string",
                  "pattern": "^[A-Z]{2}$",
                  "description": "Current ISO 3166-1 alpha-2 country in the pinned release."
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "kind"
              ],
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "NONE"
                  ]
                }
              }
            }
          ]
        },
        "referenceRelease": {
          "type": "string",
          "enum": [
            "iso-codes-4.20.1"
          ],
          "default": "iso-codes-4.20.1"
        },
        "interpretation": {
          "type": "string",
          "enum": [
            "WHOLE_COUNTRY_PER_ITEM_V1",
            "WHOLE_COUNTRY_PER_ITEM_FX_V1"
          ],
          "default": "WHOLE_COUNTRY_PER_ITEM_V1",
          "description": "Default compares advertised source currency. FX_V1 requires maximumPerItem and compares HalfUp converted amounts in its target currency using the persisted browsing snapshot, pinned across continuation."
        },
        "service": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "description": "Exact advertised service code; requires a destination country."
        },
        "maximumPerItem": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "amount",
            "currency"
          ],
          "description": "Inclusive per-item charge in minor units. Currency is the advertised source currency by default, or the explicit target under FX_V1, independently of browsing display currency. Only fixed/known-currency free per-item offers match. No purchase quantity or complete landed cost is implied.",
          "properties": {
            "amount": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 9223372036854775807,
              "description": "Inclusive maximum in minor units."
            },
            "currency": {
              "$ref": "#/$defs/CurrencyData"
            }
          }
        },
        "collectionOffered": {
          "type": "boolean",
          "default": false,
          "description": "True requires independently definite offered collection. False adds no collection constraint."
        }
      }
    },
    "UserSearchFilterData": {
      "type": "object",
      "description": "Complete user search filter with metadata",
      "required": [
        "userId",
        "userSearchFilterId",
        "name",
        "notifications",
        "state",
        "search",
        "created",
        "updated"
      ],
      "properties": {
        "userId": {
          "type": "string",
          "description": "Unique identifier of the user who owns this search filter"
        },
        "userSearchFilterId": {
          "type": "string",
          "description": "Unique identifier for this search filter"
        },
        "name": {
          "type": "string",
          "description": "User-defined name for the search filter"
        },
        "notifications": {
          "type": "boolean",
          "description": "Whether notifications are enabled for this search filter.\nWhen `true`, the user will be notified when a new product matches this filter.\nWhen `false`, no notifications are sent for this filter.\nDefaults to `true` for newly created filters.\n"
        },
        "state": {
          "$ref": "#/$defs/ResourceStateData"
        },
        "search": {
          "$ref": "#/$defs/ProductListingSearchData"
        },
        "created": {
          "type": "string",
          "format": "date-time",
          "description": "When the search filter was created (RFC3339 format)"
        },
        "updated": {
          "type": "string",
          "format": "date-time",
          "description": "When the search filter was last updated (RFC3339 format)"
        }
      }
    }
  }
}