{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/altoviz-com/json-schema/altoviz-com-webhook-schema.json",
  "title": "Webhook",
  "description": "Wehbook",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/altoviz-com-webhooks-api-openapi.yml#/components/schemas/Webhook",
  "required": [
    "name",
    "types",
    "url"
  ],
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Webhook ID",
      "format": "int32"
    },
    "name": {
      "minLength": 1,
      "type": "string",
      "description": "Name"
    },
    "secretKey": {
      "type": [
        "string",
        "null"
      ],
      "description": "Secret key"
    },
    "types": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/WebhookType"
      },
      "description": ""
    },
    "url": {
      "minLength": 1,
      "type": "string",
      "description": "Webhook Uri"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "WebhookType": {
      "enum": [
        "CustomerCreated",
        "InvoiceCreated",
        "CustomerDeleted",
        "CustomerUpdated",
        "ProductCreated",
        "ProductUpdated",
        "ProductDeleted",
        "InvoiceUpdated",
        "ContactUpdated",
        "ContactCreated",
        "QuoteUpdated",
        "QuoteCreated",
        "ContactDeleted",
        "QuoteDeleted",
        "InvoiceDeleted"
      ],
      "type": "string"
    }
  }
}