{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/setluca-com/json-schema/setluca-com-campaign-detail-schema.json",
  "title": "CampaignDetail",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/setluca-com-openapi-openapi.json#/components/schemas/CampaignDetail",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "published",
        "paused",
        "archived"
      ]
    },
    "latestVersionNumber": {
      "type": [
        "integer",
        "null"
      ]
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    },
    "pausedForAccountHealth": {
      "type": "boolean"
    },
    "draft": {
      "type": "object",
      "properties": {
        "graph": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number",
              "enum": [
                1
              ]
            },
            "startNodeId": {
              "type": "string",
              "minLength": 1
            },
            "nodes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "trigger",
                      "condition",
                      "action",
                      "message",
                      "booking",
                      "wait_duration",
                      "wait_until_time",
                      "wait_for_event",
                      "wait_for_reply",
                      "wait_for_condition",
                      "branch",
                      "control",
                      "stop",
                      "handoff",
                      "split",
                      "exit_on"
                    ]
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "config": {
                    "type": "object",
                    "additionalProperties": {},
                    "default": {}
                  }
                },
                "required": [
                  "id",
                  "type"
                ]
              },
              "minItems": 1,
              "maxItems": 100
            },
            "edges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "source": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "target": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "condition": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "id",
                  "source",
                  "target"
                ]
              },
              "maxItems": 200,
              "default": []
            },
            "knowledge": {
              "type": "object",
              "properties": {
                "offerDescription": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "priceAndPaymentFacts": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "programStructure": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "bookingRules": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "faqsAndObjections": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "disallowedClaims": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "resourceLinks": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  "maxItems": 50
                },
                "exampleGoodReplies": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "sourceNotes": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                }
              }
            },
            "qualification": {
              "type": "object",
              "properties": {
                "requiredFields": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "disqualifiers": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "minimumScore": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "requireExplicitConsentBeforeBooking": {
                  "type": "boolean"
                },
                "bookingCtaLogic": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "outcomes": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "qualified",
                      "nurture",
                      "disqualified",
                      "needs_human"
                    ]
                  },
                  "maxItems": 50
                }
              }
            },
            "analyticsGoal": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000
            }
          },
          "required": [
            "version",
            "startNodeId",
            "nodes"
          ]
        },
        "updatedAt": {
          "type": "string"
        }
      },
      "required": [
        "graph",
        "updatedAt"
      ]
    },
    "publishedVersion": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "versionNumber": {
          "type": "integer"
        },
        "graph": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number",
              "enum": [
                1
              ]
            },
            "startNodeId": {
              "type": "string",
              "minLength": 1
            },
            "nodes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "trigger",
                      "condition",
                      "action",
                      "message",
                      "booking",
                      "wait_duration",
                      "wait_until_time",
                      "wait_for_event",
                      "wait_for_reply",
                      "wait_for_condition",
                      "branch",
                      "control",
                      "stop",
                      "handoff",
                      "split",
                      "exit_on"
                    ]
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "config": {
                    "type": "object",
                    "additionalProperties": {},
                    "default": {}
                  }
                },
                "required": [
                  "id",
                  "type"
                ]
              },
              "minItems": 1,
              "maxItems": 100
            },
            "edges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "source": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "target": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "condition": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "id",
                  "source",
                  "target"
                ]
              },
              "maxItems": 200,
              "default": []
            },
            "knowledge": {
              "type": "object",
              "properties": {
                "offerDescription": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "priceAndPaymentFacts": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "programStructure": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "bookingRules": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "faqsAndObjections": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "disallowedClaims": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "resourceLinks": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  "maxItems": 50
                },
                "exampleGoodReplies": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "sourceNotes": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                }
              }
            },
            "qualification": {
              "type": "object",
              "properties": {
                "requiredFields": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "disqualifiers": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "maxItems": 50
                },
                "minimumScore": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "requireExplicitConsentBeforeBooking": {
                  "type": "boolean"
                },
                "bookingCtaLogic": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "outcomes": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "qualified",
                      "nurture",
                      "disqualified",
                      "needs_human"
                    ]
                  },
                  "maxItems": 50
                }
              }
            },
            "analyticsGoal": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000
            }
          },
          "required": [
            "version",
            "startNodeId",
            "nodes"
          ]
        },
        "publishedAt": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "versionNumber",
        "graph",
        "publishedAt"
      ]
    }
  },
  "required": [
    "id",
    "name",
    "description",
    "status",
    "latestVersionNumber",
    "createdAt",
    "updatedAt",
    "pausedForAccountHealth",
    "draft",
    "publishedVersion"
  ]
}