{
  "asyncapi": "3.0.0",
  "channels": {
    "usage-feed": {
      "address": "/usage/events",
      "description": "GET pages of events with an operator or read credential. Use next as the after cursor.",
      "messages": {
        "usage-batch-reconciled": {
          "contentType": "application/cloudevents+json",
          "name": "de.telco.usage.batch-reconciled",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.usage.batch-reconciled.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.usage.batch-reconciled.json"
                  },
                  "source": {
                    "const": "urn:telco:usaged"
                  },
                  "type": {
                    "const": "de.telco.usage.batch-reconciled"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "A voice batch has its final redacted receipt.",
          "title": "de.telco.usage.batch-reconciled"
        }
      },
      "title": "Completed voice batches"
    },
    "webhook": {
      "address": null,
      "description": "The URL given when the webhook was created (POST /webhooks) or configured (TELCO_SUBSCRIBERS).",
      "messages": {
        "bill-credited": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.bill.credited",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.bill.credited.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.bill.credited.json"
                  },
                  "source": {
                    "const": "urn:telco:billd"
                  },
                  "type": {
                    "const": "de.telco.bill.credited"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "A Stornorechnung cancelled a bill: id, number, the cited number.",
          "title": "de.telco.bill.credited"
        },
        "bill-held": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.bill.held",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.bill.held.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.bill.held.json"
                  },
                  "source": {
                    "const": "urn:telco:billd"
                  },
                  "type": {
                    "const": "de.telco.bill.held"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "A bill could not be sealed: the refusal code, the failed e-invoice rules, and the one field that fixes it.",
          "title": "de.telco.bill.held"
        },
        "bill-sealed": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.bill.sealed",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.bill.sealed.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.bill.sealed.json"
                  },
                  "source": {
                    "const": "urn:telco:billd"
                  },
                  "type": {
                    "const": "de.telco.bill.sealed"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "A bill was sealed: id, number, kind, billing account.",
          "title": "de.telco.bill.sealed"
        },
        "billing-account-changed": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.billing-account.changed",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.billing-account.changed.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.billing-account.changed.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.billing-account.changed"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "How the account pays or where its invoices go changed: id, the field, from when.",
          "title": "de.telco.billing-account.changed"
        },
        "billing-account-created": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.billing-account.created",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.billing-account.created.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.billing-account.created.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.billing-account.created"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "A billing account was created.",
          "title": "de.telco.billing-account.created"
        },
        "contract-approved": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.contract.approved",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.approved.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.approved.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.contract.approved"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "The consumer approved the contract summary (TKG § 54 Abs. 3).",
          "title": "de.telco.contract.approved"
        },
        "contract-created": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.contract.created",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.created.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.created.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.contract.created"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "A contract was created.",
          "title": "de.telco.contract.created"
        },
        "contract-ended": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.contract.ended",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.ended.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.ended.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.contract.ended"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "The contract ended.",
          "title": "de.telco.contract.ended"
        },
        "contract-renewal-notice-due": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.contract.renewal-notice-due",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.renewal-notice-due.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.renewal-notice-due.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.contract.renewal-notice-due"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "The renewal notice is due (TKG § 56 Abs. 3). Emitted once.",
          "title": "de.telco.contract.renewal-notice-due"
        },
        "contract-renewed": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.contract.renewed",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.renewed.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.renewed.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.contract.renewed"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "The initial term ended without a termination; the contract runs on indefinitely.",
          "title": "de.telco.contract.renewed"
        },
        "contract-term-extended": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.contract.term-extended",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.term-extended.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.term-extended.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.contract.term-extended"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "An add-on extended the term with explicit consent (TKG § 66 Abs. 3).",
          "title": "de.telco.contract.term-extended"
        },
        "contract-termination-received": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.contract.termination-received",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.termination-received.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.termination-received.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.contract.termination-received"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "A termination arrived; the data carries the effective date and the rule that decided it.",
          "title": "de.telco.contract.termination-received"
        },
        "contract-voided": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.contract.voided",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.voided.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.contract.voided.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.contract.voided"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "An unapproved contract was voided; nothing is billed.",
          "title": "de.telco.contract.voided"
        },
        "customer-created": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.customer.created",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.customer.created.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.customer.created.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.customer.created"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "A customer was created.",
          "title": "de.telco.customer.created"
        },
        "customer-moved": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.customer.moved",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.customer.moved.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.customer.moved.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.customer.moved"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "The customer moved: id, from when. Bills sealed before keep the old address.",
          "title": "de.telco.customer.moved"
        },
        "subscription-activated": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.subscription.activated",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.activated.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.activated.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.subscription.activated"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "The service works from this day; billing starts.",
          "title": "de.telco.subscription.activated"
        },
        "subscription-appointment-credit-approved": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.subscription.appointment-credit-approved",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.appointment-credit-approved.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.appointment-credit-approved.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.subscription.appointment-credit-approved"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "An operator approved compensation for a missed appointment: subscription and case id.",
          "title": "de.telco.subscription.appointment-credit-approved"
        },
        "subscription-created": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.subscription.created",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.created.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.created.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.subscription.created"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "A subscription was ordered.",
          "title": "de.telco.subscription.created"
        },
        "subscription-ended": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.subscription.ended",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.ended.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.ended.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.subscription.ended"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "The subscription ended.",
          "title": "de.telco.subscription.ended"
        },
        "subscription-identifier-assigned": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.subscription.identifier-assigned",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.identifier-assigned.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.identifier-assigned.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.subscription.identifier-assigned"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "A line id, number or key was assigned from a date.",
          "title": "de.telco.subscription.identifier-assigned"
        },
        "subscription-outage-credit-approved": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.subscription.outage-credit-approved",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.outage-credit-approved.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.outage-credit-approved.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.subscription.outage-credit-approved"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "Compensation approved for a complete outage: subscription and case id.",
          "title": "de.telco.subscription.outage-credit-approved"
        },
        "subscription-plan-changed": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.subscription.plan-changed",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.plan-changed.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.plan-changed.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.subscription.plan-changed"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "The plan changes from a date.",
          "title": "de.telco.subscription.plan-changed"
        },
        "subscription-restricted": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.subscription.restricted",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.restricted.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.restricted.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.subscription.restricted"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "The service was restricted.",
          "title": "de.telco.subscription.restricted"
        },
        "subscription-restriction-lifted": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.subscription.restriction-lifted",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.restriction-lifted.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.restriction-lifted.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.subscription.restriction-lifted"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "A restriction was lifted.",
          "title": "de.telco.subscription.restriction-lifted"
        },
        "subscription-termination-scheduled": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.subscription.termination-scheduled",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.termination-scheduled.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.termination-scheduled.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.subscription.termination-scheduled"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "The contract was terminated; the subscription ends on the effective date.",
          "title": "de.telco.subscription.termination-scheduled"
        },
        "subscription-voided": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.subscription.voided",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.voided.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.subscription.voided.json"
                  },
                  "source": {
                    "const": "urn:telco:contractd"
                  },
                  "type": {
                    "const": "de.telco.subscription.voided"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "The subscription was voided with its contract.",
          "title": "de.telco.subscription.voided"
        },
        "test-ping": {
          "contentType": "application/cloudevents+json",
          "headers": {
            "$ref": "#/components/schemas/webhook-headers"
          },
          "name": "de.telco.test.ping",
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/envelope"
              },
              {
                "properties": {
                  "data": {
                    "$ref": "https://hupe1980.github.io/telco/schemas/events/de.telco.test.ping.json"
                  },
                  "dataschema": {
                    "const": "https://hupe1980.github.io/telco/schemas/events/de.telco.test.ping.json"
                  },
                  "source": {
                    "pattern": "^urn:telco:[a-z]+$",
                    "type": "string"
                  },
                  "type": {
                    "const": "de.telco.test.ping"
                  }
                },
                "type": "object"
              }
            ]
          },
          "summary": "A test delivery to one webhook, sent on request; never on the feed.",
          "title": "de.telco.test.ping"
        }
      },
      "title": "A subscriber's webhook"
    }
  },
  "components": {
    "schemas": {
      "envelope": {
        "properties": {
          "businessdate": {
            "description": "The business day (the clock's today).",
            "format": "date",
            "type": "string"
          },
          "data": {
            "type": "object"
          },
          "datacontenttype": {
            "const": "application/json"
          },
          "dataschema": {
            "format": "uri",
            "type": "string"
          },
          "id": {
            "description": "What a subscriber de-duplicates on.",
            "format": "uuid",
            "type": "string"
          },
          "orderref": {
            "description": "The seller's order reference, on every event of a contract that came through POST /signups.",
            "type": "string"
          },
          "sequence": {
            "description": "The position in the feed.",
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "specversion": {
            "const": "1.0"
          },
          "subject": {
            "description": "The aggregate: contract/{id}, bill/{id}, …",
            "type": "string"
          },
          "time": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "specversion",
          "id",
          "source",
          "type",
          "subject",
          "time",
          "datacontenttype",
          "sequence",
          "businessdate",
          "data"
        ],
        "type": "object"
      },
      "webhook-headers": {
        "properties": {
          "webhook-id": {
            "description": "The event id.",
            "type": "string"
          },
          "webhook-signature": {
            "description": "v1,<base64 HMAC-SHA256 over id.timestamp.body>; several, space-separated, during a rotation.",
            "type": "string"
          },
          "webhook-timestamp": {
            "description": "Unix seconds.",
            "type": "string"
          }
        },
        "required": [
          "webhook-id",
          "webhook-timestamp",
          "webhook-signature"
        ],
        "type": "object"
      }
    }
  },
  "defaultContentType": "application/cloudevents+json",
  "info": {
    "description": "CloudEvents from contractd and billd reach signed webhooks and their event feeds. usaged publishes batch completion on its authenticated usage feed.",
    "externalDocs": {
      "url": "https://hupe1980.github.io/telco/docs/webhooks/"
    },
    "license": {
      "name": "MIT OR Apache-2.0"
    },
    "title": "telco events",
    "version": "0.1.0"
  },
  "operations": {
    "deliver": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/webhook"
      },
      "messages": [
        {
          "$ref": "#/channels/webhook/messages/test-ping"
        },
        {
          "$ref": "#/channels/webhook/messages/bill-credited"
        },
        {
          "$ref": "#/channels/webhook/messages/bill-held"
        },
        {
          "$ref": "#/channels/webhook/messages/bill-sealed"
        },
        {
          "$ref": "#/channels/webhook/messages/billing-account-changed"
        },
        {
          "$ref": "#/channels/webhook/messages/billing-account-created"
        },
        {
          "$ref": "#/channels/webhook/messages/contract-approved"
        },
        {
          "$ref": "#/channels/webhook/messages/contract-created"
        },
        {
          "$ref": "#/channels/webhook/messages/contract-ended"
        },
        {
          "$ref": "#/channels/webhook/messages/contract-renewal-notice-due"
        },
        {
          "$ref": "#/channels/webhook/messages/contract-renewed"
        },
        {
          "$ref": "#/channels/webhook/messages/contract-term-extended"
        },
        {
          "$ref": "#/channels/webhook/messages/contract-termination-received"
        },
        {
          "$ref": "#/channels/webhook/messages/contract-voided"
        },
        {
          "$ref": "#/channels/webhook/messages/customer-created"
        },
        {
          "$ref": "#/channels/webhook/messages/customer-moved"
        },
        {
          "$ref": "#/channels/webhook/messages/subscription-activated"
        },
        {
          "$ref": "#/channels/webhook/messages/subscription-appointment-credit-approved"
        },
        {
          "$ref": "#/channels/webhook/messages/subscription-created"
        },
        {
          "$ref": "#/channels/webhook/messages/subscription-ended"
        },
        {
          "$ref": "#/channels/webhook/messages/subscription-identifier-assigned"
        },
        {
          "$ref": "#/channels/webhook/messages/subscription-outage-credit-approved"
        },
        {
          "$ref": "#/channels/webhook/messages/subscription-plan-changed"
        },
        {
          "$ref": "#/channels/webhook/messages/subscription-restricted"
        },
        {
          "$ref": "#/channels/webhook/messages/subscription-restriction-lifted"
        },
        {
          "$ref": "#/channels/webhook/messages/subscription-termination-scheduled"
        },
        {
          "$ref": "#/channels/webhook/messages/subscription-voided"
        }
      ],
      "summary": "Deliver each event, in order, until the subscriber answers 2xx."
    },
    "publish-usage-receipt": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/usage-feed"
      },
      "messages": [
        {
          "$ref": "#/channels/usage-feed/messages/usage-batch-reconciled"
        }
      ],
      "summary": "Publish a completed voice batch to the cursor feed."
    }
  }
}
