{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cookiy-ai/json-schema/cookiy-ai-v1-discussion-guide-response-dto-schema.json",
  "title": "V1DiscussionGuideResponseDto",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cookiy-ai-openapi.yml#/components/schemas/V1DiscussionGuideResponseDto",
  "type": "object",
  "properties": {
    "revision": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "x-nestjs_zod-uses-3-point-1-syntax": true,
      "x-nestjs_zod-parent-has-refs": true,
      "x-nestjs_zod-$defs": {
        "__schema0": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "group"
            },
            "logic": {
              "type": "string",
              "enum": [
                "all",
                "any"
              ]
            },
            "children": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "condition"
                      },
                      "questionId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "operator": {
                        "type": "string",
                        "enum": [
                          "equals",
                          "not_equals",
                          "contains_any",
                          "contains_all",
                          "equals_exactly"
                        ]
                      },
                      "optionIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "required": [
                      "kind",
                      "questionId",
                      "operator",
                      "optionIds"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$ref": "#/$defs/__schema0"
                  }
                ]
              }
            }
          },
          "required": [
            "kind",
            "logic",
            "children"
          ],
          "additionalProperties": false
        }
      }
    },
    "study_detail_webpage_url": {
      "type": "string",
      "format": "uri",
      "x-nestjs_zod-uses-3-point-1-syntax": true,
      "x-nestjs_zod-parent-has-refs": true,
      "x-nestjs_zod-$defs": {
        "__schema0": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "group"
            },
            "logic": {
              "type": "string",
              "enum": [
                "all",
                "any"
              ]
            },
            "children": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "condition"
                      },
                      "questionId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "operator": {
                        "type": "string",
                        "enum": [
                          "equals",
                          "not_equals",
                          "contains_any",
                          "contains_all",
                          "equals_exactly"
                        ]
                      },
                      "optionIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "required": [
                      "kind",
                      "questionId",
                      "operator",
                      "optionIds"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$ref": "#/$defs/__schema0"
                  }
                ]
              }
            }
          },
          "required": [
            "kind",
            "logic",
            "children"
          ],
          "additionalProperties": false
        }
      }
    },
    "discussion_guide": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "schema_version": {
              "type": "number",
              "const": 3
            },
            "meta": {
              "type": "object",
              "properties": {
                "project_name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000
                },
                "interview_duration": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 2147483647
                },
                "sample_size": {
                  "type": "integer",
                  "minimum": 2,
                  "maximum": 2147483647
                },
                "mode_of_interview": {
                  "type": "string",
                  "enum": [
                    "video",
                    "audio",
                    "audio_optional_video"
                  ]
                },
                "external_knowledge": {
                  "type": "string"
                },
                "moderator_instruction": {
                  "type": "string"
                }
              },
              "required": [
                "project_name",
                "interview_duration",
                "sample_size",
                "mode_of_interview"
              ],
              "additionalProperties": false
            },
            "core_research_objectives": {
              "minItems": 1,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            },
            "participant_screening_criteria": {
              "minItems": 1,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            },
            "interview_flow": {
              "type": "object",
              "properties": {
                "sections": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                      },
                      "description": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "additional_video_mode": {
                        "default": "none",
                        "type": "string",
                        "enum": [
                          "none",
                          "screenshare",
                          "frontcamera"
                        ],
                        "description": "Section-level recording mode. \"none\" disables extra capture; \"screenshare\" asks participants to share their screen; \"frontcamera\" is the legacy wire value for Rear Camera On and asks participants to use the rear/environment camera. The modes are mutually exclusive. Defaults to \"none\"."
                      },
                      "questions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "question": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2000
                            },
                            "followup_intensity": {
                              "type": "string",
                              "enum": [
                                "light",
                                "standard",
                                "deep"
                              ]
                            },
                            "followup_examples": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "followup_guidelines": {
                              "type": "string"
                            },
                            "allow_keyboard_input": {
                              "default": false,
                              "type": "boolean",
                              "description": "Whether participants may type responses in addition to speaking. false allows voice only; true keeps voice available and also allows keyboard input. Defaults to false."
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                            },
                            "media": {
                              "maxItems": 9,
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "picture"
                                      },
                                      "url": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "filename": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "video"
                                      },
                                      "url": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "filename": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "pdf"
                                      },
                                      "url": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "filename": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "website"
                                      },
                                      "url": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "question",
                            "followup_intensity",
                            "followup_examples",
                            "id"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "id",
                      "description",
                      "questions"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "sections"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "schema_version",
            "meta",
            "core_research_objectives",
            "participant_screening_criteria",
            "interview_flow"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "schema_version": {
              "type": "number",
              "const": 3
            },
            "meta": {
              "type": "object",
              "properties": {
                "project_name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000
                },
                "interview_duration": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 2147483647
                },
                "sample_size": {
                  "type": "integer",
                  "minimum": 2,
                  "maximum": 2147483647
                },
                "mode_of_interview": {
                  "type": "string",
                  "enum": [
                    "video",
                    "audio",
                    "audio_optional_video"
                  ]
                },
                "external_knowledge": {
                  "type": "string"
                },
                "moderator_instruction": {
                  "type": "string"
                }
              },
              "required": [
                "project_name",
                "interview_duration",
                "sample_size",
                "mode_of_interview"
              ],
              "additionalProperties": false
            },
            "core_research_objectives": {
              "minItems": 1,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            },
            "participant_screening": {
              "type": "object",
              "properties": {
                "questions": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                          },
                          "question": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "type": {
                            "type": "string",
                            "const": "single_answer"
                          },
                          "options": {
                            "minItems": 2,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "screen_in_role": {
                                  "type": "string",
                                  "enum": [
                                    "SCREEN_IN",
                                    "SCREEN_OUT",
                                    "IGNORE"
                                  ]
                                },
                                "id": {
                                  "type": "string",
                                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                }
                              },
                              "required": [
                                "label",
                                "screen_in_role",
                                "id"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "use_for_quota": {
                            "type": "boolean"
                          },
                          "sub_questions": {
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                    },
                                    "question": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2000
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "single_answer"
                                    },
                                    "options": {
                                      "minItems": 2,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "label": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "screen_in_role": {
                                            "type": "string",
                                            "enum": [
                                              "SCREEN_IN",
                                              "SCREEN_OUT",
                                              "IGNORE"
                                            ]
                                          },
                                          "id": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "required": [
                                          "label",
                                          "screen_in_role",
                                          "id"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "use_for_quota": {
                                      "type": "boolean"
                                    },
                                    "trigger": {
                                      "type": "object",
                                      "properties": {
                                        "option_ids": {
                                          "minItems": 1,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "mode": {
                                          "type": "string",
                                          "enum": [
                                            "any",
                                            "all"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "option_ids",
                                        "mode"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "question",
                                    "type",
                                    "options",
                                    "use_for_quota",
                                    "trigger"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                    },
                                    "question": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2000
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "multiple_answer"
                                    },
                                    "options": {
                                      "minItems": 2,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "label": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "screen_in_role": {
                                            "type": "string",
                                            "enum": [
                                              "SCREEN_IN",
                                              "SCREEN_OUT",
                                              "IGNORE"
                                            ]
                                          },
                                          "id": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "required": [
                                          "label",
                                          "screen_in_role",
                                          "id"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "use_for_quota": {
                                      "type": "boolean"
                                    },
                                    "minimum_qualifying_selections": {
                                      "type": "integer",
                                      "exclusiveMinimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "trigger": {
                                      "type": "object",
                                      "properties": {
                                        "option_ids": {
                                          "minItems": 1,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "mode": {
                                          "type": "string",
                                          "enum": [
                                            "any",
                                            "all"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "option_ids",
                                        "mode"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "question",
                                    "type",
                                    "options",
                                    "use_for_quota",
                                    "minimum_qualifying_selections",
                                    "trigger"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                    },
                                    "question": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2000
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "free_response"
                                    },
                                    "response_type": {
                                      "type": "string",
                                      "enum": [
                                        "text",
                                        "email",
                                        "number",
                                        "date",
                                        "phone"
                                      ]
                                    },
                                    "trigger": {
                                      "type": "object",
                                      "properties": {
                                        "option_ids": {
                                          "minItems": 1,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "mode": {
                                          "type": "string",
                                          "enum": [
                                            "any",
                                            "all"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "option_ids",
                                        "mode"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "question",
                                    "type",
                                    "response_type",
                                    "trigger"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                    },
                                    "question": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2000
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "matrix"
                                    },
                                    "columns": {
                                      "minItems": 2,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "label": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "id": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "required": [
                                          "label",
                                          "id"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "trigger": {
                                      "type": "object",
                                      "properties": {
                                        "option_ids": {
                                          "minItems": 1,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "mode": {
                                          "type": "string",
                                          "enum": [
                                            "any",
                                            "all"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "option_ids",
                                        "mode"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "question",
                                    "type",
                                    "columns",
                                    "trigger"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "question",
                          "type",
                          "options",
                          "use_for_quota",
                          "sub_questions"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                          },
                          "question": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "type": {
                            "type": "string",
                            "const": "multiple_answer"
                          },
                          "options": {
                            "minItems": 2,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "screen_in_role": {
                                  "type": "string",
                                  "enum": [
                                    "SCREEN_IN",
                                    "SCREEN_OUT",
                                    "IGNORE"
                                  ]
                                },
                                "id": {
                                  "type": "string",
                                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                }
                              },
                              "required": [
                                "label",
                                "screen_in_role",
                                "id"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "use_for_quota": {
                            "type": "boolean"
                          },
                          "minimum_qualifying_selections": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "sub_questions": {
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                    },
                                    "question": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2000
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "single_answer"
                                    },
                                    "options": {
                                      "minItems": 2,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "label": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "screen_in_role": {
                                            "type": "string",
                                            "enum": [
                                              "SCREEN_IN",
                                              "SCREEN_OUT",
                                              "IGNORE"
                                            ]
                                          },
                                          "id": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "required": [
                                          "label",
                                          "screen_in_role",
                                          "id"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "use_for_quota": {
                                      "type": "boolean"
                                    },
                                    "trigger": {
                                      "type": "object",
                                      "properties": {
                                        "option_ids": {
                                          "minItems": 1,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "mode": {
                                          "type": "string",
                                          "enum": [
                                            "any",
                                            "all"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "option_ids",
                                        "mode"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "question",
                                    "type",
                                    "options",
                                    "use_for_quota",
                                    "trigger"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                    },
                                    "question": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2000
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "multiple_answer"
                                    },
                                    "options": {
                                      "minItems": 2,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "label": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "screen_in_role": {
                                            "type": "string",
                                            "enum": [
                                              "SCREEN_IN",
                                              "SCREEN_OUT",
                                              "IGNORE"
                                            ]
                                          },
                                          "id": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "required": [
                                          "label",
                                          "screen_in_role",
                                          "id"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "use_for_quota": {
                                      "type": "boolean"
                                    },
                                    "minimum_qualifying_selections": {
                                      "type": "integer",
                                      "exclusiveMinimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "trigger": {
                                      "type": "object",
                                      "properties": {
                                        "option_ids": {
                                          "minItems": 1,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "mode": {
                                          "type": "string",
                                          "enum": [
                                            "any",
                                            "all"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "option_ids",
                                        "mode"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "question",
                                    "type",
                                    "options",
                                    "use_for_quota",
                                    "minimum_qualifying_selections",
                                    "trigger"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                    },
                                    "question": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2000
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "free_response"
                                    },
                                    "response_type": {
                                      "type": "string",
                                      "enum": [
                                        "text",
                                        "email",
                                        "number",
                                        "date",
                                        "phone"
                                      ]
                                    },
                                    "trigger": {
                                      "type": "object",
                                      "properties": {
                                        "option_ids": {
                                          "minItems": 1,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "mode": {
                                          "type": "string",
                                          "enum": [
                                            "any",
                                            "all"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "option_ids",
                                        "mode"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "question",
                                    "type",
                                    "response_type",
                                    "trigger"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                    },
                                    "question": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2000
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "matrix"
                                    },
                                    "columns": {
                                      "minItems": 2,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "label": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "id": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "required": [
                                          "label",
                                          "id"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "trigger": {
                                      "type": "object",
                                      "properties": {
                                        "option_ids": {
                                          "minItems": 1,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "mode": {
                                          "type": "string",
                                          "enum": [
                                            "any",
                                            "all"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "option_ids",
                                        "mode"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "question",
                                    "type",
                                    "columns",
                                    "trigger"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "question",
                          "type",
                          "options",
                          "use_for_quota",
                          "minimum_qualifying_selections",
                          "sub_questions"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                          },
                          "question": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "type": {
                            "type": "string",
                            "const": "free_response"
                          },
                          "response_type": {
                            "type": "string",
                            "enum": [
                              "text",
                              "email",
                              "number",
                              "date",
                              "phone"
                            ]
                          },
                          "sub_questions": {
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                    },
                                    "question": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2000
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "single_answer"
                                    },
                                    "options": {
                                      "minItems": 2,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "label": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "screen_in_role": {
                                            "type": "string",
                                            "enum": [
                                              "SCREEN_IN",
                                              "SCREEN_OUT",
                                              "IGNORE"
                                            ]
                                          },
                                          "id": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "required": [
                                          "label",
                                          "screen_in_role",
                                          "id"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "use_for_quota": {
                                      "type": "boolean"
                                    },
                                    "trigger": {
                                      "type": "object",
                                      "properties": {
                                        "option_ids": {
                                          "minItems": 1,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "mode": {
                                          "type": "string",
                                          "enum": [
                                            "any",
                                            "all"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "option_ids",
                                        "mode"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "question",
                                    "type",
                                    "options",
                                    "use_for_quota",
                                    "trigger"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                    },
                                    "question": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2000
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "multiple_answer"
                                    },
                                    "options": {
                                      "minItems": 2,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "label": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "screen_in_role": {
                                            "type": "string",
                                            "enum": [
                                              "SCREEN_IN",
                                              "SCREEN_OUT",
                                              "IGNORE"
                                            ]
                                          },
                                          "id": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "required": [
                                          "label",
                                          "screen_in_role",
                                          "id"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "use_for_quota": {
                                      "type": "boolean"
                                    },
                                    "minimum_qualifying_selections": {
                                      "type": "integer",
                                      "exclusiveMinimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "trigger": {
                                      "type": "object",
                                      "properties": {
                                        "option_ids": {
                                          "minItems": 1,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "mode": {
                                          "type": "string",
                                          "enum": [
                                            "any",
                                            "all"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "option_ids",
                                        "mode"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "question",
                                    "type",
                                    "options",
                                    "use_for_quota",
                                    "minimum_qualifying_selections",
                                    "trigger"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                    },
                                    "question": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2000
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "free_response"
                                    },
                                    "response_type": {
                                      "type": "string",
                                      "enum": [
                                        "text",
                                        "email",
                                        "number",
                                        "date",
                                        "phone"
                                      ]
                                    },
                                    "trigger": {
                                      "type": "object",
                                      "properties": {
                                        "option_ids": {
                                          "minItems": 1,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "mode": {
                                          "type": "string",
                                          "enum": [
                                            "any",
                                            "all"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "option_ids",
                                        "mode"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "question",
                                    "type",
                                    "response_type",
                                    "trigger"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                    },
                                    "question": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2000
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "matrix"
                                    },
                                    "columns": {
                                      "minItems": 2,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "label": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "id": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "required": [
                                          "label",
                                          "id"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "trigger": {
                                      "type": "object",
                                      "properties": {
                                        "option_ids": {
                                          "minItems": 1,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                          }
                                        },
                                        "mode": {
                                          "type": "string",
                                          "enum": [
                                            "any",
                                            "all"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "option_ids",
                                        "mode"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "question",
                                    "type",
                                    "columns",
                                    "trigger"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "question",
                          "type",
                          "response_type",
                          "sub_questions"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  }
                }
              },
              "required": [
                "questions"
              ],
              "additionalProperties": false
            },
            "interview_flow": {
              "type": "object",
              "properties": {
                "sections": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                      },
                      "description": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "additional_video_mode": {
                        "default": "none",
                        "type": "string",
                        "enum": [
                          "none",
                          "screenshare",
                          "frontcamera"
                        ],
                        "description": "Section-level recording mode. \"none\" disables extra capture; \"screenshare\" asks participants to share their screen; \"frontcamera\" is the legacy wire value for Rear Camera On and asks participants to use the rear/environment camera. The modes are mutually exclusive. Defaults to \"none\"."
                      },
                      "questions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "question": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2000
                            },
                            "followup_intensity": {
                              "type": "string",
                              "enum": [
                                "light",
                                "standard",
                                "deep"
                              ]
                            },
                            "followup_examples": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "followup_guidelines": {
                              "type": "string"
                            },
                            "allow_keyboard_input": {
                              "default": false,
                              "type": "boolean",
                              "description": "Whether participants may type responses in addition to speaking. false allows voice only; true keeps voice available and also allows keyboard input. Defaults to false."
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                            },
                            "media": {
                              "maxItems": 9,
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "picture"
                                      },
                                      "url": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "filename": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "video"
                                      },
                                      "url": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "filename": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "pdf"
                                      },
                                      "url": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "filename": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "website"
                                      },
                                      "url": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "question",
                            "followup_intensity",
                            "followup_examples",
                            "id"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "visibility_rule": {
                        "anyOf": [
                          {
                            "$ref": "#/$defs/__schema0"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "description",
                      "questions",
                      "visibility_rule"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "sections"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "schema_version",
            "meta",
            "core_research_objectives",
            "participant_screening",
            "interview_flow"
          ],
          "additionalProperties": false
        }
      ],
      "x-nestjs_zod-uses-3-point-1-syntax": true,
      "x-nestjs_zod-parent-has-refs": true,
      "x-nestjs_zod-empty-type": true,
      "x-nestjs_zod-$defs": {
        "__schema0": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "group"
            },
            "logic": {
              "type": "string",
              "enum": [
                "all",
                "any"
              ]
            },
            "children": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "condition"
                      },
                      "questionId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "operator": {
                        "type": "string",
                        "enum": [
                          "equals",
                          "not_equals",
                          "contains_any",
                          "contains_all",
                          "equals_exactly"
                        ]
                      },
                      "optionIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "required": [
                      "kind",
                      "questionId",
                      "operator",
                      "optionIds"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$ref": "#/$defs/__schema0"
                  }
                ]
              }
            }
          },
          "required": [
            "kind",
            "logic",
            "children"
          ],
          "additionalProperties": false
        }
      }
    }
  },
  "required": [
    "revision",
    "study_detail_webpage_url",
    "discussion_guide"
  ]
}