{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cookiy-ai/json-schema/cookiy-ai-v1-study-activity-response-dto-schema.json",
  "title": "V1StudyActivityResponseDto",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cookiy-ai-openapi.yml#/components/schemas/V1StudyActivityResponseDto",
  "type": "object",
  "properties": {
    "study_id": {
      "type": "string",
      "x-nestjs_zod-uses-3-point-1-syntax": true
    },
    "project_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "x-nestjs_zod-uses-3-point-1-syntax": true,
      "x-nestjs_zod-empty-type": true
    },
    "created_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "x-nestjs_zod-uses-3-point-1-syntax": true,
      "x-nestjs_zod-empty-type": true
    },
    "updated_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "x-nestjs_zod-uses-3-point-1-syntax": true,
      "x-nestjs_zod-empty-type": true
    },
    "current_stage": {
      "type": "string",
      "enum": [
        "study_created",
        "recruitment_in_progress",
        "interviews_completed",
        "report_generation_in_progress",
        "report_ready",
        "report_failed"
      ],
      "x-nestjs_zod-uses-3-point-1-syntax": true
    },
    "target_sample_size": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "x-nestjs_zod-uses-3-point-1-syntax": true
    },
    "sources": {
      "type": "object",
      "properties": {
        "guide": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "guide_ready"
            }
          },
          "required": [
            "status"
          ]
        },
        "recruit": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "not_configured",
                "draft",
                "launching",
                "active",
                "paused",
                "completed",
                "cancelled"
              ]
            },
            "completed_participants": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "target_participants": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ],
              "description": "Participants this study is recruiting toward, summed over every recruitment round, less refunded_participants."
            },
            "refunded_participants": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991,
              "description": "Participants paid for and refunded to the wallet: by the auto-refund once a recruitment under target stopped getting new participants, or by hand. History, not something still owed — target_participants already leaves them out. 0 when nothing was refunded."
            }
          },
          "required": [
            "completed_participants",
            "target_participants",
            "refunded_participants"
          ]
        },
        "report": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "report_not_requested",
                "report_generation_in_progress",
                "report_ready",
                "report_failed"
              ]
            }
          },
          "required": [
            "status"
          ]
        },
        "interviews": {
          "type": "object",
          "properties": {
            "total": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "complete": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "not_qualify": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "in_process": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "pause": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "total",
            "complete",
            "not_qualify",
            "in_process",
            "pause"
          ]
        },
        "synthetic_interviews": {
          "type": "object",
          "properties": {
            "target_nums": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "completed_nums": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "target_nums",
            "completed_nums"
          ]
        }
      },
      "x-nestjs_zod-uses-3-point-1-syntax": true,
      "x-nestjs_zod-self-required": true
    }
  },
  "required": [
    "study_id",
    "project_name",
    "created_at",
    "updated_at",
    "current_stage",
    "sources"
  ]
}