{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/feedback1-ai/json-schema/feedback1-ai-public-form-response-schema.json",
  "title": "PublicFormResponse",
  "description": "Public form response (for rendering form)",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/feedback1-ai-public-forms-api-openapi.yml#/components/schemas/PublicFormResponse",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "form_type": {
      "$ref": "#/$defs/FormTypeEnum"
    },
    "settings": {
      "$ref": "#/$defs/FormSettings"
    },
    "blocks": {
      "items": {
        "$ref": "#/$defs/PublicFormBlockResponse"
      },
      "type": "array",
      "title": "Blocks"
    },
    "product_name": {
      "type": "string",
      "title": "Product Name"
    },
    "product_logo_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Product Logo Url"
    }
  },
  "type": "object",
  "required": [
    "id",
    "name",
    "form_type",
    "settings",
    "blocks",
    "product_name"
  ],
  "$defs": {
    "BlockTypeEnum": {
      "type": "string",
      "enum": [
        "short_text",
        "long_text",
        "single_choice",
        "multiple_choice",
        "rating",
        "nps",
        "email",
        "date",
        "file_upload",
        "heading",
        "paragraph",
        "divider",
        "image"
      ],
      "title": "BlockTypeEnum",
      "description": "Block type enum - all available form block types"
    },
    "FormSettings": {
      "properties": {
        "theme": {
          "type": "string",
          "enum": [
            "light",
            "dark",
            "system"
          ],
          "title": "Theme",
          "default": "light"
        },
        "primary_color": {
          "type": "string",
          "title": "Primary Color",
          "default": "#3B82F6"
        },
        "show_logo": {
          "type": "boolean",
          "title": "Show Logo",
          "default": true
        },
        "logo_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Logo Url"
        },
        "thank_you_message": {
          "type": "string",
          "title": "Thank You Message",
          "default": "Thank you for your response!"
        },
        "thank_you_description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Thank You Description"
        },
        "redirect_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Redirect Url"
        },
        "redirect_delay_seconds": {
          "type": "integer",
          "title": "Redirect Delay Seconds",
          "default": 3
        },
        "show_progress_bar": {
          "type": "boolean",
          "title": "Show Progress Bar",
          "default": true
        },
        "allow_save_draft": {
          "type": "boolean",
          "title": "Allow Save Draft",
          "default": false
        },
        "require_all_fields": {
          "type": "boolean",
          "title": "Require All Fields",
          "default": false
        },
        "send_email_notification": {
          "type": "boolean",
          "title": "Send Email Notification",
          "default": false
        },
        "notification_emails": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Notification Emails",
          "default": []
        },
        "create_feedback_on_submit": {
          "type": "boolean",
          "title": "Create Feedback On Submit",
          "default": true
        },
        "contact_email_block_id": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Contact Email Block Id"
        }
      },
      "type": "object",
      "title": "FormSettings",
      "description": "Form-level settings"
    },
    "FormTypeEnum": {
      "type": "string",
      "enum": [
        "form",
        "survey"
      ],
      "title": "FormTypeEnum",
      "description": "Form type enum"
    },
    "PublicFormBlockResponse": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "block_type": {
          "$ref": "#/$defs/BlockTypeEnum"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Title"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description"
        },
        "placeholder": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Placeholder"
        },
        "is_required": {
          "type": "boolean",
          "title": "Is Required"
        },
        "settings": {
          "additionalProperties": true,
          "type": "object",
          "title": "Settings",
          "default": {}
        },
        "order": {
          "type": "integer",
          "title": "Order"
        },
        "page": {
          "type": "integer",
          "title": "Page"
        }
      },
      "type": "object",
      "required": [
        "id",
        "block_type",
        "is_required",
        "order",
        "page"
      ],
      "title": "PublicFormBlockResponse",
      "description": "Public block response (for rendering form)"
    }
  }
}