{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "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": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "origin": {
      "type": "string",
      "format": "uri"
    },
    "draft": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
        },
        "revision": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "objective": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2000
        },
        "editorial": {
          "type": "object",
          "properties": {
            "commerce": {
              "type": "object",
              "properties": {
                "shopOrigin": {
                  "type": "string",
                  "format": "uri",
                  "pattern": "^https:.*"
                },
                "targetId": {
                  "type": "string",
                  "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                },
                "matches": {
                  "maxItems": 200,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "handle": {
                        "type": "string",
                        "maxLength": 200,
                        "pattern": "^[a-z0-9-]+$"
                      },
                      "topics": {
                        "minItems": 1,
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 100
                        }
                      }
                    },
                    "required": [
                      "handle",
                      "topics"
                    ],
                    "additionalProperties": false
                  }
                },
                "subscriptions": {
                  "maxItems": 10,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "maxLength": 200,
                    "pattern": "^[a-z0-9-]+$"
                  }
                }
              },
              "required": [
                "shopOrigin",
                "targetId",
                "matches",
                "subscriptions"
              ],
              "additionalProperties": false
            },
            "kind": {
              "type": "string",
              "const": "wordpress-rss"
            },
            "ranking": {
              "type": "string",
              "const": "reader-v1"
            },
            "catalog": {
              "type": "string",
              "const": "wordpress"
            },
            "archive": {
              "maxItems": 300,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 101
                  },
                  "path": {
                    "type": "string",
                    "maxLength": 500,
                    "pattern": "^\\/[a-zA-Z0-9%/_-]+\\/$"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "image": {
                    "type": "string",
                    "format": "uri",
                    "pattern": "^https:.*"
                  },
                  "publishedAt": {
                    "type": "number"
                  },
                  "tags": {
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 100
                    }
                  },
                  "author": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "topics": {
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 100
                    }
                  },
                  "format": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "summary": {
                    "type": "string",
                    "maxLength": 600
                  },
                  "evergreen": {
                    "type": "boolean"
                  },
                  "pinned": {
                    "type": "boolean"
                  },
                  "recommendable": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "path",
                  "title",
                  "publishedAt",
                  "tags",
                  "pinned"
                ],
                "additionalProperties": false
              }
            },
            "readerJourneys": {
              "maxItems": 6,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "paths": {
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\/[a-zA-Z0-9%/_-]+\\/$"
                    }
                  },
                  "subscriber": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "label",
                  "description",
                  "paths"
                ],
                "additionalProperties": false
              }
            },
            "magazine": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri",
                  "pattern": "^https:.*"
                },
                "subscriberUrl": {
                  "type": "string",
                  "format": "uri",
                  "pattern": "^https:.*"
                },
                "subscriberLabel": {
                  "type": "string",
                  "maxLength": 100
                },
                "visitorLabel": {
                  "type": "string",
                  "maxLength": 100
                }
              },
              "required": [
                "url",
                "subscriberLabel",
                "visitorLabel"
              ],
              "additionalProperties": false
            },
            "topicFeeds": {
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string",
                    "maxLength": 200,
                    "pattern": "^\\/[a-zA-Z0-9/_-]+$"
                  },
                  "tag": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                  }
                },
                "required": [
                  "path",
                  "tag"
                ],
                "additionalProperties": false
              }
            },
            "path": {
              "type": "string",
              "maxLength": 200,
              "pattern": "^\\/[a-zA-Z0-9/_-]+$"
            },
            "articleSelector": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "readingSelector": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "readingIgnoreSelector": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "targetIds": {
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
              }
            },
            "refreshMinutes": {
              "type": "integer",
              "minimum": 5,
              "maximum": 60
            },
            "maxAgeHours": {
              "type": "integer",
              "minimum": 1,
              "maximum": 24
            },
            "topics": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "tag": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                  },
                  "terms": {
                    "minItems": 1,
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 100
                    }
                  }
                },
                "required": [
                  "tag",
                  "terms"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "kind",
            "path",
            "articleSelector",
            "targetIds",
            "refreshMinutes",
            "maxAgeHours",
            "topics"
          ],
          "additionalProperties": false
        },
        "identityDemo": {
          "type": "object",
          "properties": {
            "segments": {
              "minItems": 1,
              "maxItems": 12,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  }
                },
                "required": [
                  "id",
                  "label",
                  "description"
                ],
                "additionalProperties": false
              }
            },
            "scenarios": {
              "minItems": 1,
              "maxItems": 12,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "known_person",
                      "known_company",
                      "unlisted_company",
                      "anonymous"
                    ]
                  },
                  "segment": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                  },
                  "company": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 120
                      },
                      "industry": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 1000
                      }
                    },
                    "required": [
                      "name",
                      "industry",
                      "description"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "label",
                  "description",
                  "kind"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "segments",
            "scenarios"
          ],
          "additionalProperties": false
        },
        "simulations": {
          "maxItems": 8,
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "kind": {
                    "type": "string",
                    "const": "browse"
                  },
                  "resourceIds": {
                    "minItems": 1,
                    "maxItems": 9,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "description",
                  "kind",
                  "resourceIds"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "kind": {
                    "type": "string",
                    "const": "read"
                  },
                  "resourceIds": {
                    "minItems": 1,
                    "maxItems": 9,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "description",
                  "kind",
                  "resourceIds"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "kind": {
                    "type": "string",
                    "const": "attention"
                  },
                  "sectionId": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                  }
                },
                "required": [
                  "id",
                  "label",
                  "description",
                  "kind",
                  "sectionId"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "kind": {
                    "type": "string",
                    "const": "purchase"
                  },
                  "resourceIds": {
                    "minItems": 1,
                    "maxItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "description",
                  "kind",
                  "resourceIds"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "profileTtlMs": {
          "type": "integer",
          "minimum": 60000,
          "maximum": 31536000000
        },
        "eventTtlMs": {
          "type": "integer",
          "minimum": 60000,
          "maximum": 31536000000
        },
        "halfLifeMs": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "maxEvents": {
          "type": "integer",
          "minimum": 1,
          "maximum": 500
        },
        "demoControls": {
          "type": "object",
          "properties": {
            "guidePath": {
              "type": "string",
              "maxLength": 500,
              "pattern": "^\\/.*"
            }
          },
          "required": [
            "guidePath"
          ],
          "additionalProperties": false
        },
        "sections": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
              },
              "selector": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              },
              "tag": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
              },
              "minVisibleMs": {
                "type": "integer",
                "minimum": 1000,
                "maximum": 9007199254740991
              },
              "path": {
                "type": "string",
                "maxLength": 1000,
                "pattern": "^\\/.*"
              }
            },
            "required": [
              "id",
              "selector",
              "tag",
              "minVisibleMs"
            ],
            "additionalProperties": false
          }
        },
        "products": {
          "maxItems": 500,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
              },
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "purchasable": {
                "type": "boolean"
              },
              "tags": {
                "maxItems": 30,
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100
                }
              },
              "facts": {
                "maxItems": 30,
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 1000
                }
              }
            },
            "required": [
              "id",
              "name",
              "tags",
              "facts"
            ],
            "additionalProperties": false
          }
        },
        "pages": {
          "minItems": 1,
          "maxItems": 500,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
              },
              "path": {
                "type": "string",
                "maxLength": 1000,
                "pattern": "^\\/.*"
              },
              "productId": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
              },
              "kind": {
                "type": "string",
                "const": "article"
              },
              "targets": {
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                }
              }
            },
            "required": [
              "id",
              "path",
              "targets"
            ],
            "additionalProperties": false
          }
        },
        "targets": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "editorial": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "recommendations"
                      },
                      "count": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 6
                      },
                      "priority": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10
                      },
                      "magazine": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "kind",
                      "count"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "order"
                      },
                      "linkSelector": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "pinnedSelector": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      }
                    },
                    "required": [
                      "kind",
                      "linkSelector",
                      "pinnedSelector"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "selector": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "description": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              },
              "mode": {
                "type": "string",
                "enum": [
                  "text",
                  "component",
                  "order",
                  "control"
                ]
              },
              "placement": {
                "type": "string",
                "enum": [
                  "replace",
                  "after"
                ]
              },
              "order": {
                "type": "object",
                "properties": {
                  "items": {
                    "minItems": 2,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                        },
                        "selector": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        }
                      },
                      "required": [
                        "id",
                        "selector"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "items"
                ],
                "additionalProperties": false
              },
              "control": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "select"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "buttons"
                      },
                      "optionSelector": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "valueAttribute": {
                        "type": "string",
                        "pattern": "^(data-[a-z][a-z0-9-]*|value)$"
                      }
                    },
                    "required": [
                      "kind",
                      "optionSelector",
                      "valueAttribute"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "defaultVariant": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
              },
              "variants": {
                "minItems": 1,
                "maxItems": 40,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "demoIdentityEntry": {
                      "type": "boolean"
                    },
                    "demoIdentitySegments": {
                      "maxItems": 12,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                      }
                    },
                    "contentTag": {
                      "type": "string",
                      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                    },
                    "editorialPolicy": {
                      "type": "string",
                      "enum": [
                        "personalized",
                        "contextual",
                        "discovery"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000
                    },
                    "hypothesis": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "audiences": {
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 100
                      }
                    },
                    "when": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "value": {
                      "type": "string",
                      "maxLength": 24000
                    },
                    "componentId": {
                      "type": "string",
                      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                    },
                    "requiresFacts": {
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 100
                      }
                    },
                    "requiresAttention": {
                      "type": "object",
                      "properties": {
                        "tag": {
                          "type": "string",
                          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                        },
                        "durationMs": {
                          "type": "integer",
                          "minimum": 1000,
                          "maximum": 3600000
                        }
                      },
                      "required": [
                        "tag",
                        "durationMs"
                      ],
                      "additionalProperties": false
                    },
                    "requiresPurchasedProduct": {
                      "type": "string",
                      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                    },
                    "requiresDaysSincePurchase": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 365
                    },
                    "requiresInterest": {
                      "type": "object",
                      "properties": {
                        "tag": {
                          "type": "string",
                          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                        },
                        "distinctProducts": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 50
                        }
                      },
                      "required": [
                        "tag",
                        "distinctProducts"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "description",
                    "hypothesis",
                    "audiences",
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "selector",
              "description",
              "mode",
              "defaultVariant",
              "variants"
            ],
            "additionalProperties": false
          }
        },
        "actions": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "selector": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              },
              "kind": {
                "type": "string",
                "enum": [
                  "product_save",
                  "details_open",
                  "purchase"
                ]
              }
            },
            "required": [
              "selector",
              "kind"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "id",
        "revision",
        "objective",
        "profileTtlMs",
        "halfLifeMs",
        "maxEvents",
        "products",
        "pages",
        "targets",
        "actions"
      ],
      "additionalProperties": false
    },
    "components": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "element",
              "variant"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "button",
              "navigation",
              "input",
              "select",
              "link",
              "heading"
            ]
          },
          "source": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "selector": {
                "type": "string",
                "maxLength": 2000
              },
              "capturedAt": {
                "type": "string"
              }
            },
            "required": [
              "url",
              "selector",
              "capturedAt"
            ],
            "additionalProperties": false
          },
          "id": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "html": {
            "type": "string",
            "maxLength": 24000
          },
          "previewStyle": {
            "type": "string",
            "maxLength": 1000
          },
          "previewContext": {
            "type": "object",
            "properties": {
              "css": {
                "type": "string",
                "maxLength": 60000
              },
              "tag": {
                "type": "string",
                "maxLength": 20
              },
              "className": {
                "type": "string",
                "maxLength": 2000
              },
              "id": {
                "type": "string",
                "maxLength": 500
              },
              "style": {
                "type": "string",
                "maxLength": 2000
              },
              "htmlAttributes": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "maxLength": 100
                },
                "additionalProperties": {
                  "type": "string",
                  "maxLength": 1000
                }
              },
              "bodyAttributes": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "maxLength": 100
                },
                "additionalProperties": {
                  "type": "string",
                  "maxLength": 1000
                }
              }
            },
            "required": [
              "css",
              "tag"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "html"
        ],
        "additionalProperties": false
      }
    },
    "designSystem": {
      "type": "object",
      "properties": {
        "capturedAt": {
          "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))$"
        },
        "sources": {
          "maxItems": 30,
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          }
        },
        "colors": {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string",
                "maxLength": 100
              },
              "source": {
                "type": "string",
                "maxLength": 2000
              }
            },
            "required": [
              "value",
              "source"
            ],
            "additionalProperties": false
          }
        },
        "typography": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "family": {
                "type": "string",
                "maxLength": 200
              },
              "source": {
                "type": "string",
                "maxLength": 2000
              }
            },
            "required": [
              "family",
              "source"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "capturedAt",
        "sources",
        "colors",
        "typography"
      ],
      "additionalProperties": false
    },
    "research": {
      "type": "object",
      "properties": {
        "model": {
          "type": "string",
          "maxLength": 100
        },
        "createdAt": {
          "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))$"
        },
        "summary": {
          "type": "string",
          "maxLength": 20000
        },
        "brand": {
          "type": "string",
          "maxLength": 20000
        },
        "sources": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "title": {
                "type": "string",
                "maxLength": 500
              }
            },
            "required": [
              "url",
              "title"
            ],
            "additionalProperties": false
          }
        },
        "audiences": {
          "maxItems": 30,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
              },
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "need": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              },
              "signals": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              },
              "evidence": {
                "maxItems": 30,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                }
              },
              "trigger": {
                "type": "object",
                "properties": {
                  "pages": {
                    "type": "object",
                    "properties": {
                      "paths": {
                        "minItems": 1,
                        "maxItems": 30,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 500,
                          "pattern": "^\\/.*"
                        }
                      },
                      "min": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 30
                      }
                    },
                    "required": [
                      "paths",
                      "min"
                    ],
                    "additionalProperties": false
                  },
                  "section": {
                    "type": "object",
                    "properties": {
                      "path": {
                        "type": "string",
                        "maxLength": 500,
                        "pattern": "^\\/.*"
                      },
                      "selector": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "seconds": {
                        "type": "integer",
                        "minimum": 3,
                        "maximum": 600
                      }
                    },
                    "required": [
                      "path",
                      "selector",
                      "seconds"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "name",
              "need",
              "signals",
              "evidence"
            ],
            "additionalProperties": false
          }
        },
        "opportunities": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "selector": {
                "type": "string",
                "maxLength": 500
              },
              "why": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              },
              "preservation": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              },
              "audienceIds": {
                "maxItems": 30,
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
                }
              },
              "placement": {
                "type": "string",
                "enum": [
                  "after",
                  "replace"
                ]
              }
            },
            "required": [
              "id",
              "url",
              "selector",
              "why",
              "preservation",
              "audienceIds"
            ],
            "additionalProperties": false
          }
        },
        "checks": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          }
        },
        "warnings": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          }
        }
      },
      "required": [
        "model",
        "createdAt",
        "summary",
        "brand",
        "sources",
        "audiences",
        "opportunities",
        "checks",
        "warnings"
      ],
      "additionalProperties": false
    },
    "documents": {
      "maxItems": 30,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "kind": {
            "type": "string",
            "enum": [
              "memory",
              "company",
              "brand",
              "personas",
              "note"
            ]
          },
          "content": {
            "type": "string",
            "maxLength": 20000
          }
        },
        "required": [
          "id",
          "title",
          "kind",
          "content"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "id",
    "name",
    "origin",
    "draft",
    "components"
  ],
  "additionalProperties": false
}
