{
  "common": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "note": {
        "type": "string",
        "maxLength": 5000
      },
      "tags": {
        "maxItems": 50,
        "type": "array",
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 60
        }
      },
      "pinned": {
        "type": "boolean"
      }
    },
    "additionalProperties": {
      "$ref": "#/$defs/__schema0"
    },
    "$defs": {
      "__schema0": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          },
          {
            "type": "null"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/$defs/__schema0"
            }
          },
          {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/$defs/__schema0"
            }
          }
        ]
      }
    }
  },
  "by_kind": {
    "send": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "note": {
          "type": "string",
          "maxLength": 2000
        },
        "tags": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          }
        },
        "pinned": {
          "type": "boolean"
        },
        "archived": {
          "type": "boolean"
        },
        "feedback": {
          "type": "object",
          "properties": {
            "rating": {
              "type": "string",
              "enum": ["up", "down"]
            },
            "reasons": {
              "maxItems": 6,
              "type": "array",
              "items": {
                "type": "string",
                "enum": ["wrong_kind", "missing_items", "wrong_details", "wrong_place", "duplicates", "other"]
              }
            },
            "note": {
              "type": "string",
              "maxLength": 2000
            },
            "at": {
              "type": "string",
              "allOf": [
                {
                  "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{3}(?:Z))$"
                },
                {
                  "pattern": "^.{23}Z$"
                }
              ]
            }
          },
          "required": ["rating", "reasons", "note", "at"],
          "additionalProperties": false
        },
        "feedback_resolution_seen_at": {
          "type": "string",
          "allOf": [
            {
              "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{3}(?:Z))$"
            },
            {
              "pattern": "^.{23}Z$"
            }
          ]
        },
        "connector_input": {
          "readOnly": true,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "note": {
                  "type": "string"
                }
              },
              "required": ["url"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "minLength": 1
                },
                "note": {
                  "type": "string"
                }
              },
              "required": ["text"],
              "additionalProperties": false
            }
          ]
        },
        "connector_retry_of": {
          "readOnly": true,
          "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": {
        "$ref": "#/$defs/__schema0"
      },
      "$defs": {
        "__schema0": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/$defs/__schema0"
              }
            }
          ]
        }
      }
    },
    "place": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "note": {
          "type": "string",
          "maxLength": 5000
        },
        "tags": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          }
        },
        "pinned": {
          "type": "boolean"
        },
        "experience": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number",
              "const": 1
            },
            "opened_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)))$"
            },
            "visits": {
              "type": "object",
              "properties": {
                "current": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "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])))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updated_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)))$"
                        }
                      },
                      "required": ["value", "updated_at"],
                      "additionalProperties": false
                    },
                    "rating": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 8
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updated_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)))$"
                        }
                      },
                      "required": ["value", "updated_at"],
                      "additionalProperties": false
                    },
                    "note": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "maxLength": 5000
                        },
                        "updated_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)))$"
                        }
                      },
                      "required": ["value", "updated_at"],
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            }
          },
          "required": ["version"],
          "additionalProperties": false
        },
        "found_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)))$"
        },
        "status": {
          "type": "string",
          "enum": ["saved", "done"]
        }
      },
      "additionalProperties": {
        "$ref": "#/$defs/__schema0"
      },
      "$defs": {
        "__schema0": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/$defs/__schema0"
              }
            }
          ]
        }
      }
    },
    "product": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "note": {
          "type": "string",
          "maxLength": 5000
        },
        "tags": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          }
        },
        "pinned": {
          "type": "boolean"
        },
        "private_product_url": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 4096,
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        },
        "rating": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 5
            },
            {
              "type": "null"
            }
          ]
        },
        "price_alert": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "target": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "string",
                          "pattern": "^\\d+(?:\\.\\d{1,4})?$"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "AED",
                            "AFN",
                            "ALL",
                            "AMD",
                            "ANG",
                            "AOA",
                            "ARS",
                            "AUD",
                            "AWG",
                            "AZN",
                            "BAM",
                            "BBD",
                            "BDT",
                            "BGN",
                            "BHD",
                            "BIF",
                            "BMD",
                            "BND",
                            "BOB",
                            "BRL",
                            "BSD",
                            "BTN",
                            "BWP",
                            "BYN",
                            "BZD",
                            "CAD",
                            "CDF",
                            "CHF",
                            "CLP",
                            "CNY",
                            "COP",
                            "CRC",
                            "CUC",
                            "CUP",
                            "CVE",
                            "CZK",
                            "DJF",
                            "DKK",
                            "DOP",
                            "DZD",
                            "EGP",
                            "ERN",
                            "ETB",
                            "EUR",
                            "FJD",
                            "FKP",
                            "GBP",
                            "GEL",
                            "GHS",
                            "GIP",
                            "GMD",
                            "GNF",
                            "GTQ",
                            "GYD",
                            "HKD",
                            "HNL",
                            "HRK",
                            "HTG",
                            "HUF",
                            "IDR",
                            "ILS",
                            "INR",
                            "IQD",
                            "IRR",
                            "ISK",
                            "JMD",
                            "JOD",
                            "JPY",
                            "KES",
                            "KGS",
                            "KHR",
                            "KMF",
                            "KPW",
                            "KRW",
                            "KWD",
                            "KYD",
                            "KZT",
                            "LAK",
                            "LBP",
                            "LKR",
                            "LRD",
                            "LSL",
                            "LYD",
                            "MAD",
                            "MDL",
                            "MGA",
                            "MKD",
                            "MMK",
                            "MNT",
                            "MOP",
                            "MRU",
                            "MUR",
                            "MVR",
                            "MWK",
                            "MXN",
                            "MYR",
                            "MZN",
                            "NAD",
                            "NGN",
                            "NIO",
                            "NOK",
                            "NPR",
                            "NZD",
                            "OMR",
                            "PAB",
                            "PEN",
                            "PGK",
                            "PHP",
                            "PKR",
                            "PLN",
                            "PYG",
                            "QAR",
                            "RON",
                            "RSD",
                            "RUB",
                            "RWF",
                            "SAR",
                            "SBD",
                            "SCR",
                            "SDG",
                            "SEK",
                            "SGD",
                            "SHP",
                            "SLE",
                            "SLL",
                            "SOS",
                            "SRD",
                            "SSP",
                            "STN",
                            "SVC",
                            "SYP",
                            "SZL",
                            "THB",
                            "TJS",
                            "TMT",
                            "TND",
                            "TOP",
                            "TRY",
                            "TTD",
                            "TWD",
                            "TZS",
                            "UAH",
                            "UGX",
                            "USD",
                            "UYU",
                            "UZS",
                            "VES",
                            "VND",
                            "VUV",
                            "WST",
                            "XAF",
                            "XCD",
                            "XCG",
                            "XDR",
                            "XOF",
                            "XPF",
                            "XSU",
                            "YER",
                            "ZAR",
                            "ZMW",
                            "ZWG",
                            "ZWL"
                          ],
                          "closed_value": true
                        }
                      },
                      "required": ["amount", "currency"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "enabled": {
                  "type": "boolean"
                },
                "region": {
                  "type": "string",
                  "pattern": "^[A-Z]{2}$"
                },
                "variant_key": {
                  "type": "string",
                  "maxLength": 256
                },
                "basis": {
                  "type": "string",
                  "const": "item_price"
                }
              },
              "required": ["target", "enabled"],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": {
        "$ref": "#/$defs/__schema0"
      },
      "$defs": {
        "__schema0": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/$defs/__schema0"
              }
            }
          ]
        }
      }
    },
    "recipe": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "note": {
          "type": "string",
          "maxLength": 5000
        },
        "tags": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          }
        },
        "pinned": {
          "type": "boolean"
        },
        "scale": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "cooked": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "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)))$"
              },
              "scale": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "notes": {
                "type": "string",
                "maxLength": 5000
              }
            },
            "required": ["at"],
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": {
        "$ref": "#/$defs/__schema0"
      },
      "$defs": {
        "__schema0": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/$defs/__schema0"
              }
            }
          ]
        }
      }
    },
    "media": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "note": {
          "type": "string",
          "maxLength": 5000
        },
        "tags": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          }
        },
        "pinned": {
          "type": "boolean"
        },
        "episodes": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "maxLength": 256,
            "pattern": "^(?:s(?:0|[1-9]\\d*)e(?:0|[1-9]\\d*)|(?:openlibrary|wikidata|tvmaze|itunes|musicbrainz|rss|tmdb|spotify):[\\s\\S]+)$"
          },
          "additionalProperties": {
            "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)))$"
          }
        },
        "consumption": {
          "type": "string",
          "enum": ["want", "in_progress", "completed", "paused", "abandoned"]
        },
        "completed_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)))$"
        },
        "rating": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.5,
              "maximum": 5,
              "multipleOf": 0.5
            },
            {
              "type": "null"
            }
          ]
        },
        "review": {
          "type": "string",
          "maxLength": 5000
        },
        "status": {
          "type": "string",
          "enum": ["saved", "done", "archived"]
        }
      },
      "additionalProperties": {
        "$ref": "#/$defs/__schema0"
      },
      "$defs": {
        "__schema0": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/$defs/__schema0"
              }
            }
          ]
        }
      }
    },
    "guide": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "note": {
          "type": "string",
          "maxLength": 5000
        },
        "tags": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          }
        },
        "pinned": {
          "type": "boolean"
        },
        "completed_stop_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
          }
        }
      },
      "additionalProperties": {
        "$ref": "#/$defs/__schema0"
      },
      "$defs": {
        "__schema0": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/$defs/__schema0"
              }
            }
          ]
        }
      }
    }
  }
}
