{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/setluca-com/json-schema/setluca-com-review-list-response-schema.json",
  "title": "ReviewListResponse",
  "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/ReviewListResponse",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "origin": {
            "type": "string",
            "enum": [
              "ai_dm_reply",
              "manual_reply",
              "booking_notice",
              "other"
            ]
          },
          "sourceMessageId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "sourceTurnId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "sourceCommentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "restartsLeft": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 3
          },
          "channelAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "draftBody": {
            "type": "string",
            "x-luca-sensitive": "blank"
          },
          "draftParts": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "default": null,
            "x-luca-sensitive": "empty"
          },
          "draftContent": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "parts": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "text"
                          ]
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1
                        },
                        "textGroupId": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "text"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "media"
                          ]
                        },
                        "uploadId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "mediaKind": {
                          "type": "string",
                          "enum": [
                            "image",
                            "video",
                            "audio",
                            "voice",
                            "document"
                          ]
                        },
                        "fileName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "caption": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        },
                        "altText": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "uploadId",
                        "mediaKind"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "interactive"
                          ]
                        },
                        "interactionKind": {
                          "type": "string",
                          "enum": [
                            "buttons",
                            "list",
                            "quick_replies",
                            "inline_buttons"
                          ]
                        },
                        "prompt": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "description": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "action": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "booking.select_slot"
                                        ]
                                      },
                                      "bookingTypeId": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "slotId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "startsAt": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "endsAt": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "timezone": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      "inviteeEmail": {
                                        "type": "string",
                                        "format": "email"
                                      },
                                      "inviteeName": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "bookingTypeId",
                                      "slotId",
                                      "startsAt",
                                      "endsAt",
                                      "timezone",
                                      "inviteeEmail"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "booking.reschedule"
                                        ]
                                      },
                                      "bookingId": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "bookingTypeId": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "slotId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "startsAt": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "endsAt": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "timezone": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "bookingId",
                                      "bookingTypeId",
                                      "slotId",
                                      "startsAt",
                                      "endsAt",
                                      "timezone"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "booking.cancel"
                                        ]
                                      },
                                      "bookingId": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "reason": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "bookingId"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "title"
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 20
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "interactionKind",
                        "prompt",
                        "options"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "template"
                          ]
                        },
                        "templateId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "language": {
                          "type": "string",
                          "minLength": 1
                        },
                        "versionHash": {
                          "type": "string",
                          "pattern": "^sha256:[a-f0-9]{64}$"
                        },
                        "parameters": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "key": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "component": {
                                    "type": "string",
                                    "enum": [
                                      "header",
                                      "body",
                                      "button"
                                    ]
                                  },
                                  "index": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "parameterName": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "buttonIndex": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "value": {
                                    "type": "string",
                                    "maxLength": 4096
                                  }
                                },
                                "required": [
                                  "key",
                                  "component",
                                  "index",
                                  "kind",
                                  "value"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "key": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "component": {
                                    "type": "string",
                                    "enum": [
                                      "header"
                                    ]
                                  },
                                  "index": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "parameterName": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "buttonIndex": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "image",
                                      "video",
                                      "document"
                                    ]
                                  },
                                  "uploadId": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "fileName": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  }
                                },
                                "required": [
                                  "key",
                                  "component",
                                  "index",
                                  "kind",
                                  "uploadId"
                                ]
                              }
                            ]
                          },
                          "maxItems": 100
                        },
                        "renderedPreview": {
                          "type": "string",
                          "maxLength": 16000
                        },
                        "providerMetadata": {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "templateId",
                        "name",
                        "language",
                        "versionHash",
                        "parameters",
                        "renderedPreview"
                      ]
                    }
                  ]
                },
                "minItems": 1,
                "maxItems": 12
              }
            },
            "default": null,
            "required": [
              "version",
              "parts"
            ],
            "x-luca-sensitive": "null"
          },
          "qualification": {
            "x-luca-sensitive": "null"
          },
          "confidence": {
            "type": "number"
          },
          "voiceMatchScore": {
            "type": "number"
          },
          "criticIssues": {
            "x-luca-sensitive": "null"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected",
              "sent",
              "superseded",
              "stale"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "urgent",
              "normal"
            ],
            "default": "normal"
          },
          "signals": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "default": null,
            "x-luca-sensitive": "null"
          },
          "holdKind": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "safety_review",
              "unchecked",
              "safety_block",
              "media_review",
              null
            ],
            "default": null
          },
          "category": {
            "type": "string"
          },
          "isHotLead": {
            "type": "boolean"
          },
          "isDemo": {
            "type": "boolean",
            "default": false
          },
          "whatsappFreeformOpen": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "conversationChanged": {
            "type": "boolean",
            "default": false
          },
          "createdAt": {
            "type": "string"
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "default": null
          },
          "sentBy": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "luca",
              "approved",
              "you",
              "elsewhere",
              null
            ],
            "default": null
          },
          "sentBody": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "x-luca-sensitive": "null"
          },
          "leadId": {
            "type": "string",
            "format": "uuid"
          },
          "leadDisplayName": {
            "type": [
              "string",
              "null"
            ],
            "x-luca-sensitive": "null"
          },
          "leadProfilePhotoUrl": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "x-luca-sensitive": "null"
          },
          "lastInboundMessages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "body": {
                  "type": "string"
                },
                "receivedAt": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "body",
                "receivedAt"
              ]
            },
            "default": [],
            "x-luca-sensitive": "empty"
          },
          "leadPaused": {
            "type": "boolean",
            "default": false
          },
          "leadPausedUntil": {
            "type": [
              "string",
              "null"
            ],
            "default": null
          },
          "leadChannel": {
            "type": "string",
            "enum": [
              "telegram",
              "instagram",
              "messenger",
              "whatsapp"
            ]
          },
          "safetyReasons": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "mediaContext": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "x-luca-sensitive": "null"
          },
          "safetyFindings": {
            "type": "array",
            "items": {},
            "default": [],
            "x-luca-sensitive": "empty"
          },
          "media": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "mediaType": {
                  "type": "string",
                  "enum": [
                    "audio",
                    "image",
                    "file"
                  ]
                },
                "url": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "completed",
                    "failed",
                    "skipped",
                    "blocked",
                    "cancelled"
                  ]
                },
                "safetyStatus": {
                  "type": "string",
                  "enum": [
                    "safe",
                    "needs_review",
                    "blocked"
                  ]
                },
                "transcript": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "processingReason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "retry": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "eligible": {
                      "type": "boolean"
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "attemptsUsed": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 3
                    },
                    "attemptsRemaining": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 3
                    },
                    "unavailableReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "retry_active",
                        "retry_exhausted",
                        "original_missing",
                        "cancelled",
                        "not_retryable",
                        null
                      ]
                    }
                  },
                  "required": [
                    "eligible",
                    "active",
                    "attemptsUsed",
                    "attemptsRemaining",
                    "unavailableReason"
                  ]
                }
              },
              "required": [
                "id",
                "mediaType",
                "url",
                "status",
                "safetyStatus"
              ]
            },
            "default": [],
            "x-luca-sensitive": "empty"
          },
          "objectionVariants": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "maxLength": 60
                },
                "body": {
                  "type": "string",
                  "maxLength": 1500
                },
                "rationale": {
                  "type": "string",
                  "maxLength": 400
                }
              },
              "required": [
                "label",
                "body",
                "rationale"
              ]
            },
            "default": null,
            "x-luca-sensitive": "null"
          }
        },
        "required": [
          "id",
          "conversationId",
          "restartsLeft",
          "channelAccountId",
          "draftBody",
          "qualification",
          "confidence",
          "voiceMatchScore",
          "criticIssues",
          "status",
          "category",
          "isHotLead",
          "whatsappFreeformOpen",
          "createdAt",
          "leadId",
          "leadDisplayName",
          "leadChannel"
        ]
      }
    },
    "nextCursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "asOf": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "items",
    "nextCursor"
  ]
}