{
  "$id": "https://oneform.si/developers/form-schema.json",
  "title": "OneForm form definition",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "welcome": {
      "type": "object",
      "properties": {
        "enabled": {
          "default": true,
          "type": "boolean"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "layout": {
          "type": "string",
          "enum": [
            "classic",
            "card",
            "image-top",
            "banner",
            "background",
            "background-dark",
            "split-left",
            "split-right",
            "side-third",
            "avatar"
          ]
        },
        "image": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string"
            },
            "alt": {
              "type": "string"
            }
          },
          "required": [
            "url"
          ]
        },
        "overlay": {
          "type": "number",
          "minimum": 0,
          "maximum": 0.9
        },
        "showLogo": {
          "type": "boolean"
        },
        "links": {
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "website",
                  "linkedin",
                  "x",
                  "facebook",
                  "instagram",
                  "youtube",
                  "tiktok",
                  "email",
                  "phone",
                  "booking"
                ]
              },
              "url": {
                "type": "string",
                "maxLength": 2000
              },
              "label": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "url"
            ]
          }
        },
        "buttonText": {
          "default": "Start",
          "type": "string"
        },
        "imageUrl": {
          "type": "string"
        },
        "badge": {
          "type": "string"
        },
        "headline": {
          "type": "string"
        }
      },
      "required": [
        "title"
      ]
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "required": {
            "default": false,
            "type": "boolean"
          },
          "placeholder": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "first_name",
              "last_name",
              "full_name",
              "email",
              "phone",
              "company"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "short_text",
              "long_text",
              "multiple_choice",
              "yes_no",
              "email",
              "phone",
              "number",
              "date",
              "contact_group",
              "line_items",
              "statement"
            ]
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "label": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "label"
              ]
            }
          },
          "allowOther": {
            "type": "boolean"
          },
          "multiple": {
            "type": "boolean"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "required": {
                  "default": false,
                  "type": "boolean"
                },
                "placeholder": {
                  "type": "string"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "first_name",
                    "last_name",
                    "full_name",
                    "email",
                    "phone",
                    "company"
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "short_text",
                    "email",
                    "phone",
                    "number"
                  ]
                }
              },
              "required": [
                "id",
                "title",
                "type"
              ]
            }
          },
          "media": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "image",
                  "video"
                ]
              },
              "url": {
                "type": "string"
              },
              "alt": {
                "type": "string"
              },
              "layout": {
                "type": "string",
                "enum": [
                  "stack",
                  "split-left",
                  "split-right"
                ]
              }
            },
            "required": [
              "kind",
              "url"
            ]
          },
          "buttonText": {
            "type": "string"
          },
          "visibleIf": {
            "type": "object",
            "properties": {
              "match": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "conditions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "left": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "field"
                            },
                            "fieldId": {
                              "type": "string"
                            },
                            "subId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "fieldId"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "var"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "name"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "hidden"
                            },
                            "key": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "key"
                          ]
                        }
                      ]
                    },
                    "op": {
                      "type": "string",
                      "enum": [
                        "is",
                        "is_not",
                        "contains",
                        "not_contains",
                        "any_of",
                        "none_of",
                        "all_of",
                        "eq",
                        "neq",
                        "gt",
                        "gte",
                        "lt",
                        "lte",
                        "before",
                        "after",
                        "answered",
                        "not_answered"
                      ]
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "left",
                    "op"
                  ]
                }
              }
            },
            "required": [
              "match",
              "conditions"
            ]
          },
          "jumps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "when": {
                  "type": "object",
                  "properties": {
                    "match": {
                      "type": "string",
                      "enum": [
                        "all",
                        "any"
                      ]
                    },
                    "conditions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "left": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "field"
                                  },
                                  "fieldId": {
                                    "type": "string"
                                  },
                                  "subId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "fieldId"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "var"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "name"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "hidden"
                                  },
                                  "key": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "key"
                                ]
                              }
                            ]
                          },
                          "op": {
                            "type": "string",
                            "enum": [
                              "is",
                              "is_not",
                              "contains",
                              "not_contains",
                              "any_of",
                              "none_of",
                              "all_of",
                              "eq",
                              "neq",
                              "gt",
                              "gte",
                              "lt",
                              "lte",
                              "before",
                              "after",
                              "answered",
                              "not_answered"
                            ]
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "left",
                          "op"
                        ]
                      }
                    }
                  },
                  "required": [
                    "match",
                    "conditions"
                  ]
                },
                "goto": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "field"
                        },
                        "fieldId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "fieldId"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "ending"
                        },
                        "endingId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "endingId"
                      ]
                    }
                  ]
                }
              },
              "required": [
                "id",
                "when",
                "goto"
              ]
            }
          },
          "otherwise": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "field"
                  },
                  "fieldId": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "fieldId"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "ending"
                  },
                  "endingId": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "endingId"
                ]
              }
            ]
          },
          "calc": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "var": {
                  "type": "string"
                },
                "op": {
                  "type": "string",
                  "enum": [
                    "add",
                    "subtract",
                    "multiply",
                    "set",
                    "add_answer"
                  ]
                },
                "amount": {
                  "type": "number"
                },
                "when": {
                  "type": "object",
                  "properties": {
                    "match": {
                      "type": "string",
                      "enum": [
                        "all",
                        "any"
                      ]
                    },
                    "conditions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "left": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "field"
                                  },
                                  "fieldId": {
                                    "type": "string"
                                  },
                                  "subId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "fieldId"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "var"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "name"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "hidden"
                                  },
                                  "key": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "key"
                                ]
                              }
                            ]
                          },
                          "op": {
                            "type": "string",
                            "enum": [
                              "is",
                              "is_not",
                              "contains",
                              "not_contains",
                              "any_of",
                              "none_of",
                              "all_of",
                              "eq",
                              "neq",
                              "gt",
                              "gte",
                              "lt",
                              "lte",
                              "before",
                              "after",
                              "answered",
                              "not_answered"
                            ]
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "left",
                          "op"
                        ]
                      }
                    }
                  },
                  "required": [
                    "match",
                    "conditions"
                  ]
                }
              },
              "required": [
                "id",
                "var",
                "op",
                "amount"
              ]
            }
          },
          "leadPoints": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "number"
            }
          },
          "lineItems": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string"
              },
              "showDate": {
                "type": "boolean"
              },
              "showCategory": {
                "type": "boolean"
              },
              "showQuantity": {
                "type": "boolean"
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "taxRate": {
                "type": "number"
              },
              "maxRows": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            }
          },
          "pin": {
            "type": "string",
            "enum": [
              "first",
              "last"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "type"
        ]
      }
    },
    "thankYou": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "layout": {
          "type": "string",
          "enum": [
            "classic",
            "card",
            "image-top",
            "banner",
            "background",
            "background-dark",
            "split-left",
            "split-right",
            "side-third",
            "avatar"
          ]
        },
        "image": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string"
            },
            "alt": {
              "type": "string"
            }
          },
          "required": [
            "url"
          ]
        },
        "overlay": {
          "type": "number",
          "minimum": 0,
          "maximum": 0.9
        },
        "showLogo": {
          "type": "boolean"
        },
        "links": {
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "website",
                  "linkedin",
                  "x",
                  "facebook",
                  "instagram",
                  "youtube",
                  "tiktok",
                  "email",
                  "phone",
                  "booking"
                ]
              },
              "url": {
                "type": "string",
                "maxLength": 2000
              },
              "label": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "url"
            ]
          }
        },
        "cta": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "url": {
              "type": "string",
              "maxLength": 2000
            }
          },
          "required": [
            "text",
            "url"
          ]
        },
        "redirect": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string"
            },
            "delaySec": {
              "type": "number",
              "minimum": 0,
              "maximum": 30
            },
            "params": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "url"
          ]
        },
        "when": {
          "type": "object",
          "properties": {
            "match": {
              "type": "string",
              "enum": [
                "all",
                "any"
              ]
            },
            "conditions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "left": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "field"
                          },
                          "fieldId": {
                            "type": "string"
                          },
                          "subId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "fieldId"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "var"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "hidden"
                          },
                          "key": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "key"
                        ]
                      }
                    ]
                  },
                  "op": {
                    "type": "string",
                    "enum": [
                      "is",
                      "is_not",
                      "contains",
                      "not_contains",
                      "any_of",
                      "none_of",
                      "all_of",
                      "eq",
                      "neq",
                      "gt",
                      "gte",
                      "lt",
                      "lte",
                      "before",
                      "after",
                      "answered",
                      "not_answered"
                    ]
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "left",
                  "op"
                ]
              }
            }
          },
          "required": [
            "match",
            "conditions"
          ]
        },
        "hideOffer": {
          "type": "boolean"
        },
        "scheduler": {
          "type": "object",
          "properties": {
            "provider": {
              "type": "string",
              "enum": [
                "calendly",
                "calcom",
                "tidycal",
                "acuity",
                "savvycal",
                "youcanbookme",
                "hubspot",
                "zoho",
                "msbookings",
                "google",
                "other",
                "oneform"
              ]
            },
            "url": {
              "type": "string",
              "maxLength": 500
            },
            "display": {
              "type": "string",
              "enum": [
                "inline",
                "button"
              ]
            },
            "height": {
              "type": "integer",
              "minimum": 400,
              "maximum": 1600
            },
            "prefill": {
              "type": "boolean"
            },
            "label": {
              "type": "string",
              "maxLength": 60
            }
          },
          "required": [
            "provider"
          ]
        }
      },
      "required": [
        "title"
      ]
    },
    "endings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "layout": {
            "type": "string",
            "enum": [
              "classic",
              "card",
              "image-top",
              "banner",
              "background",
              "background-dark",
              "split-left",
              "split-right",
              "side-third",
              "avatar"
            ]
          },
          "image": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "alt": {
                "type": "string"
              }
            },
            "required": [
              "url"
            ]
          },
          "overlay": {
            "type": "number",
            "minimum": 0,
            "maximum": 0.9
          },
          "showLogo": {
            "type": "boolean"
          },
          "links": {
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "website",
                    "linkedin",
                    "x",
                    "facebook",
                    "instagram",
                    "youtube",
                    "tiktok",
                    "email",
                    "phone",
                    "booking"
                  ]
                },
                "url": {
                  "type": "string",
                  "maxLength": 2000
                },
                "label": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "url"
              ]
            }
          },
          "cta": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "maxLength": 2000
              }
            },
            "required": [
              "text",
              "url"
            ]
          },
          "redirect": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "delaySec": {
                "type": "number",
                "minimum": 0,
                "maximum": 30
              },
              "params": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "url"
            ]
          },
          "when": {
            "type": "object",
            "properties": {
              "match": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "conditions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "left": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "field"
                            },
                            "fieldId": {
                              "type": "string"
                            },
                            "subId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "fieldId"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "var"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "name"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "hidden"
                            },
                            "key": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "key"
                          ]
                        }
                      ]
                    },
                    "op": {
                      "type": "string",
                      "enum": [
                        "is",
                        "is_not",
                        "contains",
                        "not_contains",
                        "any_of",
                        "none_of",
                        "all_of",
                        "eq",
                        "neq",
                        "gt",
                        "gte",
                        "lt",
                        "lte",
                        "before",
                        "after",
                        "answered",
                        "not_answered"
                      ]
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "left",
                    "op"
                  ]
                }
              }
            },
            "required": [
              "match",
              "conditions"
            ]
          },
          "hideOffer": {
            "type": "boolean"
          },
          "scheduler": {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "enum": [
                  "calendly",
                  "calcom",
                  "tidycal",
                  "acuity",
                  "savvycal",
                  "youcanbookme",
                  "hubspot",
                  "zoho",
                  "msbookings",
                  "google",
                  "other",
                  "oneform"
                ]
              },
              "url": {
                "type": "string",
                "maxLength": 500
              },
              "display": {
                "type": "string",
                "enum": [
                  "inline",
                  "button"
                ]
              },
              "height": {
                "type": "integer",
                "minimum": 400,
                "maximum": 1600
              },
              "prefill": {
                "type": "boolean"
              },
              "label": {
                "type": "string",
                "maxLength": 60
              }
            },
            "required": [
              "provider"
            ]
          }
        },
        "required": [
          "id",
          "title"
        ]
      }
    },
    "variables": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "initial": {
            "type": "number"
          }
        },
        "required": [
          "name"
        ]
      }
    },
    "hiddenFields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "key"
        ]
      }
    },
    "settings": {
      "type": "object",
      "properties": {
        "showQuestionNumbers": {
          "type": "boolean"
        },
        "languages": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "default": {
              "type": "string",
              "enum": [
                "en",
                "fr",
                "es"
              ]
            },
            "available": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "en",
                  "fr",
                  "es"
                ]
              }
            },
            "autoDetect": {
              "type": "boolean"
            }
          },
          "required": [
            "enabled"
          ]
        },
        "voice": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "maxSeconds": {
              "type": "number"
            },
            "mode": {
              "type": "string",
              "enum": [
                "offer",
                "native"
              ]
            },
            "voice": {
              "type": "string"
            },
            "fillMany": {
              "type": "boolean"
            },
            "goal": {
              "type": "string"
            },
            "colors": {
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "enabled"
          ]
        },
        "personalization": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          },
          "required": [
            "enabled"
          ]
        },
        "consultation": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "title": {
              "type": "string",
              "maxLength": 120
            },
            "description": {
              "type": "string",
              "maxLength": 600
            },
            "durationMin": {
              "type": "integer",
              "minimum": 5,
              "maximum": 480
            },
            "price": {
              "type": "object",
              "properties": {
                "amount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000
                },
                "currency": {
                  "type": "string",
                  "minLength": 3,
                  "maxLength": 3
                }
              },
              "required": [
                "amount",
                "currency"
              ]
            },
            "location": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "zoom",
                    "meet",
                    "teams",
                    "phone",
                    "in_person",
                    "custom"
                  ]
                },
                "phoneMode": {
                  "type": "string",
                  "enum": [
                    "firm_calls",
                    "invitee_calls"
                  ]
                },
                "phone": {
                  "type": "string",
                  "maxLength": 40
                },
                "address": {
                  "type": "string",
                  "maxLength": 300
                },
                "url": {
                  "type": "string",
                  "maxLength": 500
                }
              },
              "required": [
                "kind"
              ]
            },
            "bufferBeforeMin": {
              "type": "integer",
              "minimum": 0,
              "maximum": 240
            },
            "bufferAfterMin": {
              "type": "integer",
              "minimum": 0,
              "maximum": 240
            },
            "minNoticeMin": {
              "type": "integer",
              "minimum": 0,
              "maximum": 43200
            },
            "maxDaysAhead": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365
            },
            "maxPerDay": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "hours": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "enum": [
                  "0",
                  "1",
                  "2",
                  "3",
                  "4",
                  "5",
                  "6"
                ]
              },
              "additionalProperties": {
                "maxItems": 6,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "string"
                    },
                    "end": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "start",
                    "end"
                  ]
                }
              }
            },
            "reminders": {
              "type": "boolean"
            },
            "changeHours": {
              "type": "integer",
              "minimum": 0,
              "maximum": 720
            },
            "refundHours": {
              "type": "integer",
              "minimum": 0,
              "maximum": 720
            },
            "confirmation": {
              "type": "string",
              "maxLength": 600
            }
          },
          "required": [
            "enabled"
          ]
        },
        "kind": {
          "type": "string",
          "enum": [
            "booking"
          ]
        },
        "dynamic": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "maxQuestions": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "minQuestions": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "goal": {
              "type": "string"
            }
          },
          "required": [
            "enabled"
          ]
        }
      }
    },
    "translations": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "src": {
              "type": "string"
            },
            "manual": {
              "type": "boolean"
            }
          },
          "required": [
            "text",
            "src"
          ]
        }
      }
    },
    "report": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "title": {
          "default": "Your personalized report",
          "type": "string"
        },
        "prompt": {
          "default": "",
          "type": "string"
        },
        "idea": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "report",
            "document"
          ]
        },
        "docType": {
          "type": "string",
          "enum": [
            "report",
            "onboarding",
            "engagement_letter",
            "proposal",
            "invoice",
            "bill",
            "checklist",
            "hr_record",
            "tax_organizer",
            "document_request",
            "memo",
            "scope",
            "task_list"
          ]
        },
        "audience": {
          "type": "string",
          "enum": [
            "respondent",
            "internal"
          ]
        },
        "useAi": {
          "type": "boolean"
        },
        "pdfStyle": {
          "type": "string",
          "enum": [
            "classic",
            "modern",
            "executive",
            "minimal"
          ]
        },
        "delivery": {
          "type": "string",
          "enum": [
            "ai",
            "file"
          ]
        },
        "file": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "name",
            "bytes"
          ]
        },
        "fileSummary": {
          "type": "string",
          "maxLength": 600
        },
        "autoSend": {
          "type": "boolean"
        },
        "autoSendAck": {
          "type": "string"
        },
        "nextStep": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "none",
                "booking",
                "form"
              ]
            },
            "formId": {
              "type": "string"
            },
            "label": {
              "type": "string",
              "maxLength": 60
            }
          },
          "required": [
            "kind"
          ]
        },
        "pricing": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "amount": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "currency": {
              "type": "string",
              "minLength": 3,
              "maxLength": 3
            },
            "headline": {
              "type": "string",
              "maxLength": 120
            },
            "bullets": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 120
              }
            },
            "buttonLabel": {
              "type": "string",
              "maxLength": 60
            }
          },
          "required": [
            "enabled",
            "amount",
            "currency"
          ]
        }
      },
      "required": [
        "enabled"
      ]
    }
  },
  "required": [
    "fields",
    "thankYou"
  ]
}
