{
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "HealthResponse": {
        "properties": {
          "service": {
            "title": "Service",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "version": {
            "default": "v1",
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "status",
          "service"
        ],
        "title": "HealthResponse",
        "type": "object"
      },
      "SalesAutomationTaskOut": {
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "retry_count": {
            "default": 0,
            "title": "Retry Count",
            "type": "integer"
          },
          "run_at": {
            "title": "Run At",
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "running",
              "completed",
              "failed",
              "canceled"
            ],
            "title": "Status",
            "type": "string"
          },
          "task_id": {
            "title": "Task Id",
            "type": "string"
          },
          "task_type": {
            "title": "Task Type",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "task_id",
          "deal_id",
          "task_type",
          "run_at",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "SalesAutomationTaskOut",
        "type": "object"
      },
      "SalesCallCompleteIn": {
        "properties": {
          "recording_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recording Url"
          },
          "result_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Code"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          }
        },
        "title": "SalesCallCompleteIn",
        "type": "object"
      },
      "SalesCallOut": {
        "properties": {
          "call_id": {
            "title": "Call Id",
            "type": "string"
          },
          "call_status": {
            "title": "Call Status",
            "type": "string"
          },
          "communication_id": {
            "title": "Communication Id",
            "type": "string"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "direction": {
            "enum": [
              "inbound",
              "outbound"
            ],
            "title": "Direction",
            "type": "string"
          },
          "duration_sec": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Sec"
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "external_call_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Call Id"
          },
          "phone_number": {
            "title": "Phone Number",
            "type": "string"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          },
          "recording_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recording Url"
          },
          "started_at": {
            "title": "Started At",
            "type": "string"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "transcript_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript Id"
          },
          "transcript_status": {
            "enum": [
              "pending",
              "ready"
            ],
            "title": "Transcript Status",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "call_id",
          "deal_id",
          "communication_id",
          "phone_number",
          "direction",
          "provider",
          "transcript_status",
          "call_status",
          "started_at",
          "created_at",
          "updated_at"
        ],
        "title": "SalesCallOut",
        "type": "object"
      },
      "SalesCallWebhookIn": {
        "properties": {
          "deal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Id"
          },
          "external_call_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Call Id"
          },
          "lead_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead Id"
          },
          "phone_number": {
            "title": "Phone Number",
            "type": "string"
          },
          "provider": {
            "default": "asterisk",
            "title": "Provider",
            "type": "string"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          }
        },
        "required": [
          "phone_number"
        ],
        "title": "SalesCallWebhookIn",
        "type": "object"
      },
      "SalesChannelSwitchOut": {
        "properties": {
          "communication_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Communication Id"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "from_channel": {
            "title": "From Channel",
            "type": "string"
          },
          "reason_for_channel_switch": {
            "title": "Reason For Channel Switch",
            "type": "string"
          },
          "switch_id": {
            "title": "Switch Id",
            "type": "string"
          },
          "switched_at": {
            "title": "Switched At",
            "type": "string"
          },
          "to_channel": {
            "title": "To Channel",
            "type": "string"
          }
        },
        "required": [
          "switch_id",
          "deal_id",
          "from_channel",
          "to_channel",
          "reason_for_channel_switch",
          "switched_at"
        ],
        "title": "SalesChannelSwitchOut",
        "type": "object"
      },
      "SalesCommunicationBindExternalIn": {
        "properties": {
          "channel_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Provider"
          },
          "external_call_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Call Id"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "telegram_chat_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Telegram Chat Id"
          },
          "telegram_thread_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Telegram Thread Id"
          },
          "voice_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Session Id"
          }
        },
        "title": "SalesCommunicationBindExternalIn",
        "type": "object"
      },
      "SalesCommunicationOut": {
        "properties": {
          "agent_type": {
            "enum": [
              "text_ai",
              "voice_ai",
              "human"
            ],
            "title": "Agent Type",
            "type": "string"
          },
          "channel_type": {
            "enum": [
              "text",
              "voice"
            ],
            "title": "Channel Type",
            "type": "string"
          },
          "communication_id": {
            "title": "Communication Id",
            "type": "string"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "direction": {
            "enum": [
              "inbound",
              "outbound"
            ],
            "title": "Direction",
            "type": "string"
          },
          "duration_sec": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Sec"
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "lead_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead Id"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "next_action_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Action At"
          },
          "next_action_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Action Type"
          },
          "result_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Code"
          },
          "sentiment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sentiment"
          },
          "started_at": {
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "tenant_id": {
            "title": "Tenant Id",
            "type": "string"
          },
          "transcript_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript Id"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "communication_id",
          "tenant_id",
          "deal_id",
          "channel_type",
          "direction",
          "agent_type",
          "started_at",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "SalesCommunicationOut",
        "type": "object"
      },
      "SalesCommunicationStartIn": {
        "properties": {
          "agent_type": {
            "anyOf": [
              {
                "enum": [
                  "text_ai",
                  "voice_ai",
                  "human"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Type"
          },
          "channel_type": {
            "enum": [
              "text",
              "voice"
            ],
            "title": "Channel Type",
            "type": "string"
          },
          "direction": {
            "default": "outbound",
            "enum": [
              "inbound",
              "outbound"
            ],
            "title": "Direction",
            "type": "string"
          },
          "next_action_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Action At"
          },
          "next_action_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Action Type"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          }
        },
        "required": [
          "channel_type"
        ],
        "title": "SalesCommunicationStartIn",
        "type": "object"
      },
      "SalesCommunicationSummaryIn": {
        "properties": {
          "next_action_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Action At"
          },
          "next_action_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Action Type"
          },
          "result_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Code"
          },
          "sentiment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sentiment"
          },
          "summary": {
            "minLength": 2,
            "title": "Summary",
            "type": "string"
          }
        },
        "required": [
          "summary"
        ],
        "title": "SalesCommunicationSummaryIn",
        "type": "object"
      },
      "SalesCommunicationSwitchChannelIn": {
        "properties": {
          "reason_for_channel_switch": {
            "minLength": 3,
            "title": "Reason For Channel Switch",
            "type": "string"
          },
          "to_channel": {
            "enum": [
              "telegram",
              "whatsapp",
              "webchat",
              "email",
              "voice"
            ],
            "title": "To Channel",
            "type": "string"
          }
        },
        "required": [
          "to_channel",
          "reason_for_channel_switch"
        ],
        "title": "SalesCommunicationSwitchChannelIn",
        "type": "object"
      },
      "SalesConditionOut": {
        "properties": {
          "agreed_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agreed Price"
          },
          "condition_id": {
            "title": "Condition Id",
            "type": "string"
          },
          "confirmed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confirmed At"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "custom_terms": {
            "additionalProperties": true,
            "title": "Custom Terms",
            "type": "object"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "delivery_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivery Mode"
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Date"
          },
          "execution_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Execution Date"
          },
          "payment_terms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms"
          },
          "product_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Name"
          },
          "quantity": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quantity"
          },
          "service_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Name"
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Date"
          },
          "unit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "condition_id",
          "deal_id",
          "currency",
          "created_at",
          "updated_at"
        ],
        "title": "SalesConditionOut",
        "type": "object"
      },
      "SalesConditionUpsertIn": {
        "properties": {
          "agreed_price": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agreed Price"
          },
          "currency": {
            "default": "KZT",
            "title": "Currency",
            "type": "string"
          },
          "custom_terms": {
            "additionalProperties": true,
            "title": "Custom Terms",
            "type": "object"
          },
          "delivery_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivery Mode"
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Date"
          },
          "execution_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Execution Date"
          },
          "payment_terms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms"
          },
          "product_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Name"
          },
          "quantity": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quantity"
          },
          "service_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Name"
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Date"
          },
          "unit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit"
          }
        },
        "title": "SalesConditionUpsertIn",
        "type": "object"
      },
      "SalesCounterpartyOut": {
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "bank_details": {
            "additionalProperties": true,
            "title": "Bank Details",
            "type": "object"
          },
          "bin_iin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bin Iin"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "completeness_status": {
            "title": "Completeness Status",
            "type": "string"
          },
          "counterparty_id": {
            "title": "Counterparty Id",
            "type": "string"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "email_for_docs": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email For Docs"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "phone_for_docs": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone For Docs"
          },
          "signer_basis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Basis"
          },
          "signer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Name"
          },
          "signer_role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Role"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "counterparty_id",
          "deal_id",
          "completeness_status",
          "created_at",
          "updated_at"
        ],
        "title": "SalesCounterpartyOut",
        "type": "object"
      },
      "SalesCounterpartyUpsertIn": {
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "bank_details": {
            "additionalProperties": true,
            "title": "Bank Details",
            "type": "object"
          },
          "bin_iin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bin Iin"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "email_for_docs": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email For Docs"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "phone_for_docs": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone For Docs"
          },
          "signer_basis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Basis"
          },
          "signer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Name"
          },
          "signer_role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Role"
          }
        },
        "title": "SalesCounterpartyUpsertIn",
        "type": "object"
      },
      "SalesDashboardStageOut": {
        "properties": {
          "amount": {
            "default": 0.0,
            "title": "Amount",
            "type": "number"
          },
          "count": {
            "default": 0,
            "title": "Count",
            "type": "integer"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "stage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SalesStageRefOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "stage_id": {
            "title": "Stage Id",
            "type": "string"
          }
        },
        "required": [
          "stage_id",
          "label"
        ],
        "title": "SalesDashboardStageOut",
        "type": "object"
      },
      "SalesDashboardSummaryOut": {
        "properties": {
          "channel_switches": {
            "default": 0,
            "title": "Channel Switches",
            "type": "integer"
          },
          "deals_active": {
            "default": 0,
            "title": "Deals Active",
            "type": "integer"
          },
          "deals_lost": {
            "default": 0,
            "title": "Deals Lost",
            "type": "integer"
          },
          "deals_won": {
            "default": 0,
            "title": "Deals Won",
            "type": "integer"
          },
          "hottest_deals": {
            "items": {
              "$ref": "#/components/schemas/SalesDealOut"
            },
            "title": "Hottest Deals",
            "type": "array"
          },
          "human_escalations": {
            "default": 0,
            "title": "Human Escalations",
            "type": "integer"
          },
          "leads_total": {
            "default": 0,
            "title": "Leads Total",
            "type": "integer"
          },
          "overdue_invoices": {
            "default": 0,
            "title": "Overdue Invoices",
            "type": "integer"
          },
          "payment_expected": {
            "default": 0.0,
            "title": "Payment Expected",
            "type": "number"
          },
          "payment_received": {
            "default": 0.0,
            "title": "Payment Received",
            "type": "number"
          },
          "stage_counts": {
            "items": {
              "$ref": "#/components/schemas/SalesDashboardStageOut"
            },
            "title": "Stage Counts",
            "type": "array"
          },
          "text_sessions": {
            "default": 0,
            "title": "Text Sessions",
            "type": "integer"
          },
          "voice_sessions": {
            "default": 0,
            "title": "Voice Sessions",
            "type": "integer"
          }
        },
        "title": "SalesDashboardSummaryOut",
        "type": "object"
      },
      "SalesDealCloseIn": {
        "properties": {
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "status": {
            "enum": [
              "won",
              "lost",
              "postponed"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "SalesDealCloseIn",
        "type": "object"
      },
      "SalesDealCreate": {
        "properties": {
          "currency": {
            "default": "KZT",
            "title": "Currency",
            "type": "string"
          },
          "current_channel": {
            "default": "telegram",
            "enum": [
              "telegram",
              "whatsapp",
              "webchat",
              "email",
              "voice"
            ],
            "title": "Current Channel",
            "type": "string"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "document_required": {
            "default": true,
            "title": "Document Required",
            "type": "boolean"
          },
          "estimated_amount": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Amount"
          },
          "final_amount": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Final Amount"
          },
          "lead_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead Id"
          },
          "need_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Need Summary"
          },
          "payment_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Model"
          },
          "payment_required": {
            "default": true,
            "title": "Payment Required",
            "type": "boolean"
          },
          "preferred_channel": {
            "default": "telegram",
            "enum": [
              "telegram",
              "whatsapp",
              "webchat",
              "email",
              "voice"
            ],
            "title": "Preferred Channel",
            "type": "string"
          },
          "priority": {
            "default": 3,
            "maximum": 5.0,
            "minimum": 1.0,
            "title": "Priority",
            "type": "integer"
          },
          "product_context": {
            "additionalProperties": true,
            "title": "Product Context",
            "type": "object"
          },
          "scenario_type": {
            "default": "quick_sale",
            "enum": [
              "quick_sale",
              "consultative_sale",
              "quotation_based_sale",
              "booking_based_sale",
              "subscription_sale",
              "custom_human_escalation"
            ],
            "title": "Scenario Type",
            "type": "string"
          },
          "stage_code": {
            "anyOf": [
              {
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage Code"
          },
          "stage_id": {
            "anyOf": [
              {
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage Id"
          },
          "title": {
            "minLength": 3,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "SalesDealCreate",
        "type": "object"
      },
      "SalesDealNextActionIn": {
        "properties": {
          "next_action_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Action At"
          },
          "next_action_type": {
            "minLength": 2,
            "title": "Next Action Type",
            "type": "string"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          }
        },
        "required": [
          "next_action_type"
        ],
        "title": "SalesDealNextActionIn",
        "type": "object"
      },
      "SalesDealOut": {
        "properties": {
          "assigned_ai_orchestrator_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned Ai Orchestrator Id"
          },
          "assigned_human_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned Human User Id"
          },
          "close_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Close Reason"
          },
          "closed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closed At"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "current_channel": {
            "title": "Current Channel",
            "type": "string"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "document_required": {
            "default": true,
            "title": "Document Required",
            "type": "boolean"
          },
          "estimated_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Amount"
          },
          "final_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Final Amount"
          },
          "last_contact_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Contact At"
          },
          "lead_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead Id"
          },
          "lost_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lost Reason"
          },
          "need_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Need Summary"
          },
          "next_action_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Action At"
          },
          "next_action_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Action Type"
          },
          "payment_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Model"
          },
          "payment_required": {
            "default": true,
            "title": "Payment Required",
            "type": "boolean"
          },
          "pipeline": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SalesPipelineOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "pipeline_id": {
            "title": "Pipeline Id",
            "type": "string"
          },
          "preferred_channel": {
            "title": "Preferred Channel",
            "type": "string"
          },
          "priority": {
            "title": "Priority",
            "type": "integer"
          },
          "product_context": {
            "additionalProperties": true,
            "title": "Product Context",
            "type": "object"
          },
          "scenario_type": {
            "enum": [
              "quick_sale",
              "consultative_sale",
              "quotation_based_sale",
              "booking_based_sale",
              "subscription_sale",
              "custom_human_escalation"
            ],
            "title": "Scenario Type",
            "type": "string"
          },
          "stage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SalesStageRefOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "stage_id": {
            "title": "Stage Id",
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "won",
              "lost",
              "postponed",
              "closed"
            ],
            "title": "Status",
            "type": "string"
          },
          "tenant_id": {
            "title": "Tenant Id",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "won_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Won Reason"
          }
        },
        "required": [
          "deal_id",
          "tenant_id",
          "pipeline_id",
          "stage_id",
          "scenario_type",
          "priority",
          "title",
          "currency",
          "preferred_channel",
          "current_channel",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "SalesDealOut",
        "type": "object"
      },
      "SalesDealScenarioIn": {
        "properties": {
          "scenario_type": {
            "enum": [
              "quick_sale",
              "consultative_sale",
              "quotation_based_sale",
              "booking_based_sale",
              "subscription_sale",
              "custom_human_escalation"
            ],
            "title": "Scenario Type",
            "type": "string"
          }
        },
        "required": [
          "scenario_type"
        ],
        "title": "SalesDealScenarioIn",
        "type": "object"
      },
      "SalesDealStageChangeIn": {
        "properties": {
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "stage_code": {
            "anyOf": [
              {
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage Code"
          },
          "stage_id": {
            "anyOf": [
              {
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage Id"
          }
        },
        "title": "SalesDealStageChangeIn",
        "type": "object"
      },
      "SalesDealUpdate": {
        "properties": {
          "assigned_human_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned Human User Id"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "current_channel": {
            "anyOf": [
              {
                "enum": [
                  "voice",
                  "telegram",
                  "whatsapp",
                  "email",
                  "webchat"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Channel"
          },
          "document_required": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Required"
          },
          "estimated_amount": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Amount"
          },
          "final_amount": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Final Amount"
          },
          "need_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Need Summary"
          },
          "next_action_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Action At"
          },
          "next_action_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Action Type"
          },
          "payment_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Model"
          },
          "payment_required": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Required"
          },
          "preferred_channel": {
            "anyOf": [
              {
                "enum": [
                  "voice",
                  "telegram",
                  "whatsapp",
                  "email",
                  "webchat"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred Channel"
          },
          "product_context": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Context"
          },
          "title": {
            "anyOf": [
              {
                "minLength": 3,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "title": "SalesDealUpdate",
        "type": "object"
      },
      "SalesDocumentCreate": {
        "properties": {
          "document_type": {
            "enum": [
              "contract",
              "offer_acceptance",
              "appendix",
              "specification",
              "invoice_basis_doc",
              "order_confirmation",
              "booking_confirmation",
              "appointment_confirmation",
              "additional_agreement"
            ],
            "title": "Document Type",
            "type": "string"
          },
          "file_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Url"
          },
          "rendered_payload": {
            "additionalProperties": true,
            "title": "Rendered Payload",
            "type": "object"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "version": {
            "default": 1,
            "minimum": 1.0,
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "document_type"
        ],
        "title": "SalesDocumentCreate",
        "type": "object"
      },
      "SalesDocumentOut": {
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "document_id": {
            "title": "Document Id",
            "type": "string"
          },
          "document_type": {
            "enum": [
              "contract",
              "offer_acceptance",
              "appendix",
              "specification",
              "invoice_basis_doc",
              "order_confirmation",
              "booking_confirmation",
              "appointment_confirmation",
              "additional_agreement"
            ],
            "title": "Document Type",
            "type": "string"
          },
          "external_sign_provider_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Sign Provider Id"
          },
          "file_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Url"
          },
          "rendered_payload": {
            "additionalProperties": true,
            "title": "Rendered Payload",
            "type": "object"
          },
          "signed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signed At"
          },
          "status": {
            "enum": [
              "draft",
              "sent",
              "under_review",
              "confirmed",
              "signed"
            ],
            "title": "Status",
            "type": "string"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "document_id",
          "deal_id",
          "document_type",
          "version",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "SalesDocumentOut",
        "type": "object"
      },
      "SalesEscalationCreateIn": {
        "properties": {
          "assigned_to_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To User Id"
          },
          "escalation_type": {
            "minLength": 2,
            "title": "Escalation Type",
            "type": "string"
          },
          "reason": {
            "minLength": 3,
            "title": "Reason",
            "type": "string"
          },
          "severity": {
            "default": "medium",
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ],
            "title": "Severity",
            "type": "string"
          }
        },
        "required": [
          "escalation_type",
          "reason"
        ],
        "title": "SalesEscalationCreateIn",
        "type": "object"
      },
      "SalesEscalationOut": {
        "properties": {
          "assigned_to_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To User Id"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "escalation_id": {
            "title": "Escalation Id",
            "type": "string"
          },
          "escalation_type": {
            "title": "Escalation Type",
            "type": "string"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "severity": {
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ],
            "title": "Severity",
            "type": "string"
          },
          "status": {
            "enum": [
              "open",
              "in_progress",
              "resolved"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "escalation_id",
          "deal_id",
          "escalation_type",
          "reason",
          "severity",
          "status",
          "created_at"
        ],
        "title": "SalesEscalationOut",
        "type": "object"
      },
      "SalesInvoiceCreate": {
        "properties": {
          "amount": {
            "minimum": 0.0,
            "title": "Amount",
            "type": "number"
          },
          "basis_document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Basis Document Id"
          },
          "currency": {
            "default": "KZT",
            "title": "Currency",
            "type": "string"
          },
          "due_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due Date"
          },
          "line_items": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Line Items",
            "type": "array"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "payment_link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Link"
          }
        },
        "required": [
          "amount"
        ],
        "title": "SalesInvoiceCreate",
        "type": "object"
      },
      "SalesInvoiceOut": {
        "properties": {
          "amount": {
            "title": "Amount",
            "type": "number"
          },
          "basis_document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Basis Document Id"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "due_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due Date"
          },
          "invoice_id": {
            "title": "Invoice Id",
            "type": "string"
          },
          "invoice_number": {
            "title": "Invoice Number",
            "type": "string"
          },
          "issued_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issued At"
          },
          "line_items": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Line Items",
            "type": "array"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid At"
          },
          "payment_link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Link"
          },
          "status": {
            "enum": [
              "draft",
              "issued",
              "sent",
              "partially_paid",
              "paid",
              "overdue",
              "canceled"
            ],
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "invoice_id",
          "deal_id",
          "invoice_number",
          "amount",
          "currency",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "SalesInvoiceOut",
        "type": "object"
      },
      "SalesLeadCreate": {
        "properties": {
          "assigned_agent_type": {
            "default": "text_ai",
            "enum": [
              "text_ai",
              "voice_ai",
              "human"
            ],
            "title": "Assigned Agent Type",
            "type": "string"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "currency": {
            "default": "KZT",
            "title": "Currency",
            "type": "string"
          },
          "customer_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Type"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "estimated_amount": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Amount"
          },
          "full_name": {
            "minLength": 2,
            "title": "Full Name",
            "type": "string"
          },
          "initial_need_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Initial Need Summary"
          },
          "lead_score": {
            "default": 50.0,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Lead Score",
            "type": "number"
          },
          "lead_temperature": {
            "default": "warm",
            "enum": [
              "warm",
              "hot"
            ],
            "title": "Lead Temperature",
            "type": "string"
          },
          "messenger_handles": {
            "additionalProperties": true,
            "title": "Messenger Handles",
            "type": "object"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "preferred_channel": {
            "default": "telegram",
            "enum": [
              "telegram",
              "whatsapp",
              "webchat",
              "email",
              "voice"
            ],
            "title": "Preferred Channel",
            "type": "string"
          },
          "priority": {
            "default": 3,
            "maximum": 5.0,
            "minimum": 1.0,
            "title": "Priority",
            "type": "integer"
          },
          "segment_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Segment Type"
          },
          "source_campaign_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Campaign Id"
          },
          "source_channel": {
            "default": "webchat",
            "title": "Source Channel",
            "type": "string"
          },
          "source_type": {
            "default": "crm",
            "title": "Source Type",
            "type": "string"
          },
          "status": {
            "default": "new_qualified_lead",
            "enum": [
              "new_qualified_lead",
              "warm_lead",
              "hot_lead",
              "enrichment_required",
              "converted",
              "lost"
            ],
            "title": "Status",
            "type": "string"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "full_name"
        ],
        "title": "SalesLeadCreate",
        "type": "object"
      },
      "SalesLeadEnrichIn": {
        "properties": {
          "customer_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Type"
          },
          "need_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Need Summary"
          },
          "preferred_channel": {
            "anyOf": [
              {
                "enum": [
                  "voice",
                  "telegram",
                  "whatsapp",
                  "email",
                  "webchat"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred Channel"
          },
          "product_context": {
            "additionalProperties": true,
            "title": "Product Context",
            "type": "object"
          },
          "required_fields": {
            "additionalProperties": true,
            "title": "Required Fields",
            "type": "object"
          },
          "scenario_type": {
            "anyOf": [
              {
                "enum": [
                  "quick_sale",
                  "consultative_sale",
                  "quotation_based_sale",
                  "booking_based_sale",
                  "subscription_sale",
                  "custom_human_escalation"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scenario Type"
          }
        },
        "title": "SalesLeadEnrichIn",
        "type": "object"
      },
      "SalesLeadOut": {
        "properties": {
          "assigned_agent_type": {
            "enum": [
              "text_ai",
              "voice_ai",
              "human"
            ],
            "title": "Assigned Agent Type",
            "type": "string"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "crm_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crm Customer Id"
          },
          "customer_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Type"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "full_name": {
            "title": "Full Name",
            "type": "string"
          },
          "initial_need_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Initial Need Summary"
          },
          "lead_id": {
            "title": "Lead Id",
            "type": "string"
          },
          "lead_score": {
            "title": "Lead Score",
            "type": "number"
          },
          "lead_temperature": {
            "enum": [
              "warm",
              "hot"
            ],
            "title": "Lead Temperature",
            "type": "string"
          },
          "messenger_handles": {
            "additionalProperties": true,
            "title": "Messenger Handles",
            "type": "object"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "preferred_channel": {
            "enum": [
              "telegram",
              "whatsapp",
              "webchat",
              "email",
              "voice"
            ],
            "title": "Preferred Channel",
            "type": "string"
          },
          "segment_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Segment Type"
          },
          "source_campaign_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Campaign Id"
          },
          "source_channel": {
            "title": "Source Channel",
            "type": "string"
          },
          "source_type": {
            "title": "Source Type",
            "type": "string"
          },
          "status": {
            "enum": [
              "new_qualified_lead",
              "warm_lead",
              "hot_lead",
              "enrichment_required",
              "converted",
              "lost"
            ],
            "title": "Status",
            "type": "string"
          },
          "tenant_id": {
            "title": "Tenant Id",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "lead_id",
          "tenant_id",
          "source_type",
          "source_channel",
          "full_name",
          "lead_temperature",
          "lead_score",
          "preferred_channel",
          "assigned_agent_type",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "SalesLeadOut",
        "type": "object"
      },
      "SalesLeadUpdate": {
        "properties": {
          "assigned_agent_type": {
            "anyOf": [
              {
                "enum": [
                  "text_ai",
                  "voice_ai",
                  "human"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned Agent Type"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "customer_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Type"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "full_name": {
            "anyOf": [
              {
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "initial_need_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Initial Need Summary"
          },
          "lead_score": {
            "anyOf": [
              {
                "maximum": 100.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead Score"
          },
          "lead_temperature": {
            "anyOf": [
              {
                "enum": [
                  "warm",
                  "hot"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead Temperature"
          },
          "messenger_handles": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Messenger Handles"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "preferred_channel": {
            "anyOf": [
              {
                "enum": [
                  "voice",
                  "telegram",
                  "whatsapp",
                  "email",
                  "webchat"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred Channel"
          },
          "segment_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Segment Type"
          },
          "status": {
            "anyOf": [
              {
                "enum": [
                  "new_qualified_lead",
                  "warm_lead",
                  "hot_lead",
                  "enrichment_required",
                  "converted",
                  "lost"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "title": "SalesLeadUpdate",
        "type": "object"
      },
      "SalesMessageOut": {
        "properties": {
          "attachments": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Attachments",
            "type": "array"
          },
          "body": {
            "title": "Body",
            "type": "string"
          },
          "channel_provider": {
            "title": "Channel Provider",
            "type": "string"
          },
          "communication_id": {
            "title": "Communication Id",
            "type": "string"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "delivery_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivery Status"
          },
          "external_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Message Id"
          },
          "message_id": {
            "title": "Message Id",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "read_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Read Status"
          },
          "sender_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Id"
          },
          "sender_type": {
            "title": "Sender Type",
            "type": "string"
          },
          "sent_at": {
            "title": "Sent At",
            "type": "string"
          }
        },
        "required": [
          "message_id",
          "deal_id",
          "communication_id",
          "sender_type",
          "channel_provider",
          "body",
          "sent_at",
          "created_at"
        ],
        "title": "SalesMessageOut",
        "type": "object"
      },
      "SalesMessageSendIn": {
        "properties": {
          "attachments": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Attachments",
            "type": "array"
          },
          "body": {
            "minLength": 1,
            "title": "Body",
            "type": "string"
          },
          "channel_provider": {
            "default": "telegram",
            "title": "Channel Provider",
            "type": "string"
          },
          "communication_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Communication Id"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "sender_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Id"
          },
          "sender_type": {
            "default": "text_ai",
            "enum": [
              "text_ai",
              "human"
            ],
            "title": "Sender Type",
            "type": "string"
          }
        },
        "required": [
          "deal_id",
          "body"
        ],
        "title": "SalesMessageSendIn",
        "type": "object"
      },
      "SalesMessageWebhookIn": {
        "properties": {
          "attachments": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Attachments",
            "type": "array"
          },
          "body": {
            "minLength": 1,
            "title": "Body",
            "type": "string"
          },
          "channel_provider": {
            "default": "telegram",
            "title": "Channel Provider",
            "type": "string"
          },
          "deal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Id"
          },
          "external_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Message Id"
          },
          "lead_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead Id"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "sender_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Id"
          }
        },
        "required": [
          "body"
        ],
        "title": "SalesMessageWebhookIn",
        "type": "object"
      },
      "SalesOfferCreate": {
        "properties": {
          "currency": {
            "default": "KZT",
            "title": "Currency",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "line_items": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Line Items",
            "type": "array"
          },
          "offer_type": {
            "default": "offer",
            "enum": [
              "offer",
              "quotation",
              "estimate",
              "order",
              "booking",
              "appointment",
              "subscription_plan"
            ],
            "title": "Offer Type",
            "type": "string"
          },
          "pricing": {
            "additionalProperties": true,
            "title": "Pricing",
            "type": "object"
          },
          "rendered_document_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rendered Document Url"
          },
          "title": {
            "minLength": 3,
            "title": "Title",
            "type": "string"
          },
          "total_amount": {
            "minimum": 0.0,
            "title": "Total Amount",
            "type": "number"
          },
          "validity_until": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Validity Until"
          }
        },
        "required": [
          "title",
          "total_amount"
        ],
        "title": "SalesOfferCreate",
        "type": "object"
      },
      "SalesOfferOut": {
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "created_by_type": {
            "title": "Created By Type",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "line_items": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Line Items",
            "type": "array"
          },
          "offer_id": {
            "title": "Offer Id",
            "type": "string"
          },
          "offer_type": {
            "enum": [
              "offer",
              "quotation",
              "estimate",
              "order",
              "booking",
              "appointment",
              "subscription_plan"
            ],
            "title": "Offer Type",
            "type": "string"
          },
          "pricing": {
            "additionalProperties": true,
            "title": "Pricing",
            "type": "object"
          },
          "rendered_document_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rendered Document Url"
          },
          "status": {
            "enum": [
              "draft",
              "sent",
              "viewed",
              "accepted",
              "rejected"
            ],
            "title": "Status",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "total_amount": {
            "title": "Total Amount",
            "type": "number"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "validity_until": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Validity Until"
          }
        },
        "required": [
          "offer_id",
          "deal_id",
          "offer_type",
          "title",
          "total_amount",
          "currency",
          "status",
          "created_by_type",
          "created_at",
          "updated_at"
        ],
        "title": "SalesOfferOut",
        "type": "object"
      },
      "SalesPaymentOut": {
        "properties": {
          "amount": {
            "title": "Amount",
            "type": "number"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "external_payment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Payment Id"
          },
          "failure_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Reason"
          },
          "invoice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Id"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid At"
          },
          "payment_id": {
            "title": "Payment Id",
            "type": "string"
          },
          "payment_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Method"
          },
          "payment_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Provider"
          },
          "status": {
            "enum": [
              "pending",
              "success",
              "failed",
              "canceled",
              "partial"
            ],
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "payment_id",
          "deal_id",
          "amount",
          "currency",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "SalesPaymentOut",
        "type": "object"
      },
      "SalesPaymentReconcileIn": {
        "properties": {
          "failure_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Reason"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "status": {
            "enum": [
              "pending",
              "success",
              "failed",
              "canceled",
              "partial"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "SalesPaymentReconcileIn",
        "type": "object"
      },
      "SalesPaymentWebhookIn": {
        "properties": {
          "amount": {
            "minimum": 0.0,
            "title": "Amount",
            "type": "number"
          },
          "currency": {
            "default": "KZT",
            "title": "Currency",
            "type": "string"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "external_payment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Payment Id"
          },
          "failure_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Reason"
          },
          "invoice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Id"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid At"
          },
          "payment_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Method"
          },
          "payment_provider": {
            "default": "manual",
            "title": "Payment Provider",
            "type": "string"
          },
          "status": {
            "default": "success",
            "enum": [
              "pending",
              "success",
              "failed",
              "canceled",
              "partial"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "deal_id",
          "amount"
        ],
        "title": "SalesPaymentWebhookIn",
        "type": "object"
      },
      "SalesPipelineCreate": {
        "properties": {
          "code": {
            "default": "default_sales",
            "minLength": 2,
            "title": "Code",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "is_default": {
            "default": false,
            "title": "Is Default",
            "type": "boolean"
          },
          "name": {
            "minLength": 2,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "SalesPipelineCreate",
        "type": "object"
      },
      "SalesPipelineOut": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "is_default": {
            "title": "Is Default",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pipeline_id": {
            "title": "Pipeline Id",
            "type": "string"
          },
          "tenant_id": {
            "title": "Tenant Id",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "pipeline_id",
          "tenant_id",
          "code",
          "name",
          "is_default",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "title": "SalesPipelineOut",
        "type": "object"
      },
      "SalesPipelineStageCreate": {
        "properties": {
          "category": {
            "enum": [
              "entry",
              "communication",
              "commercial",
              "paperwork",
              "finance",
              "closing"
            ],
            "title": "Category",
            "type": "string"
          },
          "code": {
            "minLength": 2,
            "title": "Code",
            "type": "string"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "is_system": {
            "default": false,
            "title": "Is System",
            "type": "boolean"
          },
          "is_terminal": {
            "default": false,
            "title": "Is Terminal",
            "type": "boolean"
          },
          "name": {
            "minLength": 2,
            "title": "Name",
            "type": "string"
          },
          "sort_order": {
            "default": 0,
            "title": "Sort Order",
            "type": "integer"
          }
        },
        "required": [
          "code",
          "name",
          "category"
        ],
        "title": "SalesPipelineStageCreate",
        "type": "object"
      },
      "SalesPipelineStageOut": {
        "properties": {
          "category": {
            "enum": [
              "entry",
              "communication",
              "commercial",
              "paperwork",
              "finance",
              "closing"
            ],
            "title": "Category",
            "type": "string"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "is_system": {
            "title": "Is System",
            "type": "boolean"
          },
          "is_terminal": {
            "title": "Is Terminal",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pipeline_id": {
            "title": "Pipeline Id",
            "type": "string"
          },
          "sort_order": {
            "title": "Sort Order",
            "type": "integer"
          },
          "stage_id": {
            "title": "Stage Id",
            "type": "string"
          },
          "tenant_id": {
            "title": "Tenant Id",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "stage_id",
          "tenant_id",
          "pipeline_id",
          "code",
          "name",
          "category",
          "sort_order",
          "is_terminal",
          "is_system",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "title": "SalesPipelineStageOut",
        "type": "object"
      },
      "SalesPipelineStageUpdate": {
        "properties": {
          "category": {
            "anyOf": [
              {
                "enum": [
                  "entry",
                  "communication",
                  "commercial",
                  "paperwork",
                  "finance",
                  "closing"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "name": {
            "anyOf": [
              {
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "sort_order": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sort Order"
          }
        },
        "title": "SalesPipelineStageUpdate",
        "type": "object"
      },
      "SalesPipelineUpdate": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "is_default": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Default"
          },
          "name": {
            "anyOf": [
              {
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "SalesPipelineUpdate",
        "type": "object"
      },
      "SalesStageHistoryOut": {
        "properties": {
          "changed_at": {
            "title": "Changed At",
            "type": "string"
          },
          "changed_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Changed By Id"
          },
          "changed_by_type": {
            "title": "Changed By Type",
            "type": "string"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          },
          "from_stage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SalesStageRefOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "from_stage_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Stage Id"
          },
          "history_id": {
            "title": "History Id",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "to_stage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SalesStageRefOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "to_stage_id": {
            "title": "To Stage Id",
            "type": "string"
          }
        },
        "required": [
          "history_id",
          "deal_id",
          "to_stage_id",
          "changed_by_type",
          "changed_at"
        ],
        "title": "SalesStageHistoryOut",
        "type": "object"
      },
      "SalesStageRefOut": {
        "properties": {
          "category": {
            "enum": [
              "entry",
              "communication",
              "commercial",
              "paperwork",
              "finance",
              "closing"
            ],
            "title": "Category",
            "type": "string"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "sort_order": {
            "title": "Sort Order",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "code",
          "name",
          "category",
          "sort_order"
        ],
        "title": "SalesStageRefOut",
        "type": "object"
      },
      "SalesTelegramSyncIn": {
        "properties": {
          "ai_handoff_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Handoff Reason"
          },
          "ai_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai State"
          },
          "author_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Id"
          },
          "author_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Type"
          },
          "chat_id": {
            "minLength": 1,
            "title": "Chat Id",
            "type": "string"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "direction": {
            "default": "inbound",
            "title": "Direction",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "external_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Message Id"
          },
          "happened_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Happened At"
          },
          "interaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interaction Id"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message Id"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "phone_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "queue_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queue Id"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "thread_id": {
            "minLength": 1,
            "title": "Thread Id",
            "type": "string"
          }
        },
        "required": [
          "thread_id",
          "chat_id"
        ],
        "title": "SalesTelegramSyncIn",
        "type": "object"
      },
      "SalesTimelineEventOut": {
        "properties": {
          "body": {
            "title": "Body",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "meta": {
            "additionalProperties": true,
            "title": "Meta",
            "type": "object"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "ts": {
            "title": "Ts",
            "type": "string"
          }
        },
        "required": [
          "ts",
          "kind",
          "title",
          "body"
        ],
        "title": "SalesTimelineEventOut",
        "type": "object"
      },
      "SalesTranscriptIn": {
        "properties": {
          "diarization": {
            "additionalProperties": true,
            "title": "Diarization",
            "type": "object"
          },
          "extracted_entities": {
            "additionalProperties": true,
            "title": "Extracted Entities",
            "type": "object"
          },
          "language": {
            "default": "ru",
            "title": "Language",
            "type": "string"
          },
          "transcript_text": {
            "minLength": 1,
            "title": "Transcript Text",
            "type": "string"
          }
        },
        "required": [
          "transcript_text"
        ],
        "title": "SalesTranscriptIn",
        "type": "object"
      },
      "SalesTranscriptOut": {
        "properties": {
          "call_id": {
            "title": "Call Id",
            "type": "string"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "diarization": {
            "additionalProperties": true,
            "title": "Diarization",
            "type": "object"
          },
          "extracted_entities": {
            "additionalProperties": true,
            "title": "Extracted Entities",
            "type": "object"
          },
          "language": {
            "title": "Language",
            "type": "string"
          },
          "transcript_id": {
            "title": "Transcript Id",
            "type": "string"
          },
          "transcript_text": {
            "title": "Transcript Text",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "transcript_id",
          "call_id",
          "language",
          "transcript_text",
          "created_at",
          "updated_at"
        ],
        "title": "SalesTranscriptOut",
        "type": "object"
      },
      "SalesVoiceSyncIn": {
        "properties": {
          "ai_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Session Id"
          },
          "ai_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai State"
          },
          "call_id": {
            "minLength": 1,
            "title": "Call Id",
            "type": "string"
          },
          "call_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Status"
          },
          "caller_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caller Name"
          },
          "caller_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caller Number"
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "handoff_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Handoff Reason"
          },
          "interaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interaction Id"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "queue_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queue Code"
          },
          "queue_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queue Id"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "telephony_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Telephony Status"
          },
          "transcript_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript Text"
          },
          "voice_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Session Id"
          }
        },
        "required": [
          "call_id"
        ],
        "title": "SalesVoiceSyncIn",
        "type": "object"
      },
      "SalesWorkspaceOut": {
        "properties": {
          "calls": {
            "items": {
              "$ref": "#/components/schemas/SalesCallOut"
            },
            "title": "Calls",
            "type": "array"
          },
          "channel_switches": {
            "items": {
              "$ref": "#/components/schemas/SalesChannelSwitchOut"
            },
            "title": "Channel Switches",
            "type": "array"
          },
          "communications": {
            "items": {
              "$ref": "#/components/schemas/SalesCommunicationOut"
            },
            "title": "Communications",
            "type": "array"
          },
          "conditions": {
            "items": {
              "$ref": "#/components/schemas/SalesConditionOut"
            },
            "title": "Conditions",
            "type": "array"
          },
          "counterparty": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SalesCounterpartyOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "deal": {
            "$ref": "#/components/schemas/SalesDealOut"
          },
          "documents": {
            "items": {
              "$ref": "#/components/schemas/SalesDocumentOut"
            },
            "title": "Documents",
            "type": "array"
          },
          "escalations": {
            "items": {
              "$ref": "#/components/schemas/SalesEscalationOut"
            },
            "title": "Escalations",
            "type": "array"
          },
          "invoices": {
            "items": {
              "$ref": "#/components/schemas/SalesInvoiceOut"
            },
            "title": "Invoices",
            "type": "array"
          },
          "lead": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SalesLeadOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/SalesMessageOut"
            },
            "title": "Messages",
            "type": "array"
          },
          "offers": {
            "items": {
              "$ref": "#/components/schemas/SalesOfferOut"
            },
            "title": "Offers",
            "type": "array"
          },
          "payments": {
            "items": {
              "$ref": "#/components/schemas/SalesPaymentOut"
            },
            "title": "Payments",
            "type": "array"
          },
          "pipeline": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SalesPipelineOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "stage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SalesStageRefOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "stage_history": {
            "items": {
              "$ref": "#/components/schemas/SalesStageHistoryOut"
            },
            "title": "Stage History",
            "type": "array"
          },
          "tasks": {
            "items": {
              "$ref": "#/components/schemas/SalesAutomationTaskOut"
            },
            "title": "Tasks",
            "type": "array"
          },
          "timeline": {
            "items": {
              "$ref": "#/components/schemas/SalesTimelineEventOut"
            },
            "title": "Timeline",
            "type": "array"
          }
        },
        "required": [
          "deal"
        ],
        "title": "SalesWorkspaceOut",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      }
    }
  },
  "info": {
    "title": "sales-service",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/calls/inbound-webhook": {
      "post": {
        "operationId": "inbound_call_api_v1_calls_inbound_webhook_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesCallWebhookIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesCallOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Inbound Call"
      }
    },
    "/api/v1/calls/outbound": {
      "post": {
        "operationId": "outbound_call_api_v1_calls_outbound_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesCallWebhookIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesCallOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Outbound Call"
      }
    },
    "/api/v1/calls/{call_id}/complete": {
      "post": {
        "operationId": "complete_call_api_v1_calls__call_id__complete_post",
        "parameters": [
          {
            "in": "path",
            "name": "call_id",
            "required": true,
            "schema": {
              "title": "Call Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesCallCompleteIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesCallOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Complete Call"
      }
    },
    "/api/v1/calls/{call_id}/transcript": {
      "post": {
        "operationId": "attach_transcript_api_v1_calls__call_id__transcript_post",
        "parameters": [
          {
            "in": "path",
            "name": "call_id",
            "required": true,
            "schema": {
              "title": "Call Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesTranscriptIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesTranscriptOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Attach Transcript"
      }
    },
    "/api/v1/communications/{communication_id}/bind-external": {
      "post": {
        "operationId": "bind_external_communication_api_v1_communications__communication_id__bind_external_post",
        "parameters": [
          {
            "in": "path",
            "name": "communication_id",
            "required": true,
            "schema": {
              "title": "Communication Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesCommunicationBindExternalIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesCommunicationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Bind External Communication"
      }
    },
    "/api/v1/communications/{communication_id}/summary": {
      "post": {
        "operationId": "summarize_communication_api_v1_communications__communication_id__summary_post",
        "parameters": [
          {
            "in": "path",
            "name": "communication_id",
            "required": true,
            "schema": {
              "title": "Communication Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesCommunicationSummaryIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesCommunicationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Summarize Communication"
      }
    },
    "/api/v1/communications/{communication_id}/switch-channel": {
      "post": {
        "operationId": "switch_channel_api_v1_communications__communication_id__switch_channel_post",
        "parameters": [
          {
            "in": "path",
            "name": "communication_id",
            "required": true,
            "schema": {
              "title": "Communication Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesCommunicationSwitchChannelIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesChannelSwitchOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Switch Channel"
      }
    },
    "/api/v1/dashboard": {
      "get": {
        "operationId": "sales_dashboard_api_v1_dashboard_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDashboardSummaryOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Sales Dashboard"
      }
    },
    "/api/v1/deals": {
      "get": {
        "operationId": "list_deals_api_v1_deals_get",
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query"
            }
          },
          {
            "in": "query",
            "name": "stage_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Stage Id"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 300,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SalesDealOut"
                  },
                  "title": "Response List Deals Api V1 Deals Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Deals"
      },
      "post": {
        "operationId": "create_deal_api_v1_deals_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesDealCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDealOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Deal"
      }
    },
    "/api/v1/deals/{deal_id}": {
      "get": {
        "operationId": "get_deal_api_v1_deals__deal_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDealOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Deal"
      },
      "patch": {
        "operationId": "update_deal_api_v1_deals__deal_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesDealUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDealOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Deal"
      }
    },
    "/api/v1/deals/{deal_id}/calls": {
      "get": {
        "operationId": "list_calls_api_v1_deals__deal_id__calls_get",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SalesCallOut"
                  },
                  "title": "Response List Calls Api V1 Deals  Deal Id  Calls Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Calls"
      }
    },
    "/api/v1/deals/{deal_id}/change-stage": {
      "post": {
        "operationId": "change_stage_api_v1_deals__deal_id__change_stage_post",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesDealStageChangeIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDealOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Change Stage"
      }
    },
    "/api/v1/deals/{deal_id}/close": {
      "post": {
        "operationId": "close_deal_api_v1_deals__deal_id__close_post",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesDealCloseIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDealOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Close Deal"
      }
    },
    "/api/v1/deals/{deal_id}/communications": {
      "get": {
        "operationId": "list_communications_api_v1_deals__deal_id__communications_get",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SalesCommunicationOut"
                  },
                  "title": "Response List Communications Api V1 Deals  Deal Id  Communications Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Communications"
      }
    },
    "/api/v1/deals/{deal_id}/communications/text": {
      "post": {
        "operationId": "start_text_communication_api_v1_deals__deal_id__communications_text_post",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesCommunicationStartIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesCommunicationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Start Text Communication"
      }
    },
    "/api/v1/deals/{deal_id}/communications/voice": {
      "post": {
        "operationId": "start_voice_communication_api_v1_deals__deal_id__communications_voice_post",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesCommunicationStartIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesCommunicationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Start Voice Communication"
      }
    },
    "/api/v1/deals/{deal_id}/conditions": {
      "post": {
        "operationId": "upsert_conditions_api_v1_deals__deal_id__conditions_post",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesConditionUpsertIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesConditionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Upsert Conditions"
      }
    },
    "/api/v1/deals/{deal_id}/counterparty": {
      "get": {
        "operationId": "get_counterparty_api_v1_deals__deal_id__counterparty_get",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesCounterpartyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Counterparty"
      },
      "patch": {
        "operationId": "patch_counterparty_api_v1_deals__deal_id__counterparty_patch",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesCounterpartyUpsertIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesCounterpartyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Patch Counterparty"
      },
      "post": {
        "operationId": "create_counterparty_api_v1_deals__deal_id__counterparty_post",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesCounterpartyUpsertIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesCounterpartyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Counterparty"
      }
    },
    "/api/v1/deals/{deal_id}/documents": {
      "post": {
        "operationId": "create_document_api_v1_deals__deal_id__documents_post",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesDocumentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Document"
      }
    },
    "/api/v1/deals/{deal_id}/escalate": {
      "post": {
        "operationId": "escalate_deal_api_v1_deals__deal_id__escalate_post",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesEscalationCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesEscalationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Escalate Deal"
      }
    },
    "/api/v1/deals/{deal_id}/invoices": {
      "post": {
        "operationId": "create_invoice_api_v1_deals__deal_id__invoices_post",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesInvoiceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesInvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Invoice"
      }
    },
    "/api/v1/deals/{deal_id}/messages": {
      "get": {
        "operationId": "list_messages_api_v1_deals__deal_id__messages_get",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SalesMessageOut"
                  },
                  "title": "Response List Messages Api V1 Deals  Deal Id  Messages Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Messages"
      }
    },
    "/api/v1/deals/{deal_id}/offers": {
      "post": {
        "operationId": "create_offer_api_v1_deals__deal_id__offers_post",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesOfferCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesOfferOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Offer"
      }
    },
    "/api/v1/deals/{deal_id}/payments": {
      "get": {
        "operationId": "list_payments_api_v1_deals__deal_id__payments_get",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SalesPaymentOut"
                  },
                  "title": "Response List Payments Api V1 Deals  Deal Id  Payments Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Payments"
      }
    },
    "/api/v1/deals/{deal_id}/schedule-next-action": {
      "post": {
        "operationId": "schedule_next_action_api_v1_deals__deal_id__schedule_next_action_post",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesDealNextActionIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDealOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Schedule Next Action"
      }
    },
    "/api/v1/deals/{deal_id}/select-scenario": {
      "post": {
        "operationId": "select_scenario_api_v1_deals__deal_id__select_scenario_post",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesDealScenarioIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDealOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Select Scenario"
      }
    },
    "/api/v1/deals/{deal_id}/workspace": {
      "get": {
        "operationId": "get_workspace_api_v1_deals__deal_id__workspace_get",
        "parameters": [
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesWorkspaceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Workspace"
      }
    },
    "/api/v1/documents/{document_id}": {
      "get": {
        "operationId": "get_document_api_v1_documents__document_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "title": "Document Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Document"
      }
    },
    "/api/v1/documents/{document_id}/confirm": {
      "post": {
        "operationId": "confirm_document_api_v1_documents__document_id__confirm_post",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "title": "Document Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Confirm Document"
      }
    },
    "/api/v1/documents/{document_id}/send": {
      "post": {
        "operationId": "send_document_api_v1_documents__document_id__send_post",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "title": "Document Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Send Document"
      }
    },
    "/api/v1/documents/{document_id}/sign-status-webhook": {
      "post": {
        "operationId": "sign_document_api_v1_documents__document_id__sign_status_webhook_post",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "title": "Document Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Provider-Account-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Provider-Account-Id"
            }
          },
          {
            "in": "header",
            "name": "X-Provider-Name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Provider-Name"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Sign Document"
      }
    },
    "/api/v1/invoices/{invoice_id}": {
      "get": {
        "operationId": "get_invoice_api_v1_invoices__invoice_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "title": "Invoice Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesInvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Invoice"
      }
    },
    "/api/v1/invoices/{invoice_id}/mark-overdue": {
      "post": {
        "operationId": "mark_invoice_overdue_api_v1_invoices__invoice_id__mark_overdue_post",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "title": "Invoice Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesInvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Mark Invoice Overdue"
      }
    },
    "/api/v1/invoices/{invoice_id}/send": {
      "post": {
        "operationId": "send_invoice_api_v1_invoices__invoice_id__send_post",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "title": "Invoice Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesInvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Send Invoice"
      }
    },
    "/api/v1/leads": {
      "get": {
        "operationId": "list_leads_api_v1_leads_get",
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SalesLeadOut"
                  },
                  "title": "Response List Leads Api V1 Leads Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Leads"
      },
      "post": {
        "operationId": "create_lead_api_v1_leads_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesLeadCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesLeadOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Lead"
      }
    },
    "/api/v1/leads/{lead_id}": {
      "get": {
        "operationId": "get_lead_api_v1_leads__lead_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "lead_id",
            "required": true,
            "schema": {
              "title": "Lead Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesLeadOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Lead"
      },
      "patch": {
        "operationId": "update_lead_api_v1_leads__lead_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "lead_id",
            "required": true,
            "schema": {
              "title": "Lead Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesLeadUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesLeadOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Lead"
      }
    },
    "/api/v1/leads/{lead_id}/convert-to-deal": {
      "post": {
        "operationId": "convert_lead_to_deal_api_v1_leads__lead_id__convert_to_deal_post",
        "parameters": [
          {
            "in": "path",
            "name": "lead_id",
            "required": true,
            "schema": {
              "title": "Lead Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDealOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Convert Lead To Deal"
      }
    },
    "/api/v1/leads/{lead_id}/enrich": {
      "post": {
        "operationId": "enrich_lead_api_v1_leads__lead_id__enrich_post",
        "parameters": [
          {
            "in": "path",
            "name": "lead_id",
            "required": true,
            "schema": {
              "title": "Lead Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesLeadEnrichIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesWorkspaceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Enrich Lead"
      }
    },
    "/api/v1/messages/inbound-webhook": {
      "post": {
        "operationId": "inbound_message_api_v1_messages_inbound_webhook_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesMessageWebhookIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesMessageOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Inbound Message"
      }
    },
    "/api/v1/messages/outbound": {
      "post": {
        "operationId": "outbound_message_api_v1_messages_outbound_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesMessageSendIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesMessageOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Outbound Message"
      }
    },
    "/api/v1/offers/{offer_id}": {
      "get": {
        "operationId": "get_offer_api_v1_offers__offer_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "offer_id",
            "required": true,
            "schema": {
              "title": "Offer Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesOfferOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Offer"
      }
    },
    "/api/v1/offers/{offer_id}/accept": {
      "post": {
        "operationId": "accept_offer_api_v1_offers__offer_id__accept_post",
        "parameters": [
          {
            "in": "path",
            "name": "offer_id",
            "required": true,
            "schema": {
              "title": "Offer Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesOfferOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Accept Offer"
      }
    },
    "/api/v1/offers/{offer_id}/reject": {
      "post": {
        "operationId": "reject_offer_api_v1_offers__offer_id__reject_post",
        "parameters": [
          {
            "in": "path",
            "name": "offer_id",
            "required": true,
            "schema": {
              "title": "Offer Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesOfferOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reject Offer"
      }
    },
    "/api/v1/offers/{offer_id}/send": {
      "post": {
        "operationId": "send_offer_api_v1_offers__offer_id__send_post",
        "parameters": [
          {
            "in": "path",
            "name": "offer_id",
            "required": true,
            "schema": {
              "title": "Offer Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesOfferOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Send Offer"
      }
    },
    "/api/v1/payments/webhook": {
      "post": {
        "operationId": "payment_webhook_api_v1_payments_webhook_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesPaymentWebhookIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesPaymentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Payment Webhook"
      }
    },
    "/api/v1/payments/{payment_id}/reconcile": {
      "post": {
        "operationId": "reconcile_payment_api_v1_payments__payment_id__reconcile_post",
        "parameters": [
          {
            "in": "path",
            "name": "payment_id",
            "required": true,
            "schema": {
              "title": "Payment Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesPaymentReconcileIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesPaymentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reconcile Payment"
      }
    },
    "/api/v1/pipeline-stages/{stage_id}": {
      "patch": {
        "operationId": "update_pipeline_stage_api_v1_pipeline_stages__stage_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "stage_id",
            "required": true,
            "schema": {
              "title": "Stage Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesPipelineStageUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesPipelineStageOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Pipeline Stage"
      }
    },
    "/api/v1/pipelines": {
      "get": {
        "operationId": "list_pipelines_api_v1_pipelines_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SalesPipelineOut"
                  },
                  "title": "Response List Pipelines Api V1 Pipelines Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Pipelines"
      },
      "post": {
        "operationId": "create_pipeline_api_v1_pipelines_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesPipelineCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesPipelineOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Pipeline"
      }
    },
    "/api/v1/pipelines/{pipeline_id}": {
      "get": {
        "operationId": "get_pipeline_api_v1_pipelines__pipeline_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesPipelineOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Pipeline"
      },
      "patch": {
        "operationId": "update_pipeline_api_v1_pipelines__pipeline_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesPipelineUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesPipelineOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Pipeline"
      }
    },
    "/api/v1/pipelines/{pipeline_id}/set-default": {
      "post": {
        "operationId": "set_default_pipeline_api_v1_pipelines__pipeline_id__set_default_post",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesPipelineOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set Default Pipeline"
      }
    },
    "/api/v1/pipelines/{pipeline_id}/stages": {
      "get": {
        "operationId": "list_pipeline_stages_api_v1_pipelines__pipeline_id__stages_get",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SalesPipelineStageOut"
                  },
                  "title": "Response List Pipeline Stages Api V1 Pipelines  Pipeline Id  Stages Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Pipeline Stages"
      },
      "post": {
        "operationId": "create_pipeline_stage_api_v1_pipelines__pipeline_id__stages_post",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesPipelineStageCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesPipelineStageOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Pipeline Stage"
      }
    },
    "/health": {
      "get": {
        "operationId": "health_health_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Health"
      }
    },
    "/internal/sales-sync/telegram": {
      "post": {
        "operationId": "sync_telegram_thread_internal_sales_sync_telegram_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesTelegramSyncIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesWorkspaceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Sync Telegram Thread"
      }
    },
    "/internal/sales-sync/voice": {
      "post": {
        "operationId": "sync_voice_session_internal_sales_sync_voice_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-User",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-User"
            }
          },
          {
            "in": "header",
            "name": "X-Role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Role"
            }
          },
          {
            "in": "header",
            "name": "X-Tenant-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesVoiceSyncIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesWorkspaceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Sync Voice Session"
      }
    }
  }
}
