{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dbt-se/json-schema/dbt-se-hubspot-deals-response-schema.json",
  "title": "HubspotDealsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dbt-se-prospect-api-openapi.yml#/components/schemas/HubspotDealsResponse",
  "type": "object",
  "properties": {
    "deals": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "organizationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "displayName": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "amount": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "format": {
                "type": "object",
                "properties": {
                  "notation": {
                    "type": "string",
                    "enum": [
                      "scientific",
                      "engineering",
                      "compact"
                    ]
                  },
                  "roundingPriority": {
                    "type": "string",
                    "enum": [
                      "morePrecision",
                      "lessPrecision"
                    ]
                  }
                }
              },
              "numericAmount": {
                "type": "number"
              },
              "type": {
                "type": "string",
                "enum": [
                  "currency"
                ]
              }
            },
            "required": [
              "amount",
              "currency",
              "numericAmount",
              "type"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "stage": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "leads",
                  "sql-application-received",
                  "awaiting-customer-info",
                  "indicative-offer-sent",
                  "deepdive-analysis",
                  "credit-committee",
                  "communicate-decision",
                  "won-paid-out",
                  "flow-funding",
                  "on-hold",
                  "maintain",
                  "closed-lost",
                  "closed-abandoned",
                  "unknown",
                  null
                ]
              }
            },
            "required": [
              "id",
              "label"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "dealOwner": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "profilePictureUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              }
            },
            "required": [
              "id",
              "email",
              "displayName"
            ]
          },
          "ownedByStaffMember": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "profilePictureUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              }
            },
            "required": [
              "id",
              "email",
              "displayName"
            ]
          }
        },
        "required": [
          "id",
          "organizationId",
          "displayName",
          "name",
          "amount",
          "createdAt",
          "stage",
          "url",
          "dealOwner",
          "ownedByStaffMember"
        ]
      }
    }
  },
  "required": [
    "deals"
  ]
}