ReferenceEvents Catalog
Appel sortant — connecté
Auto-généré par
scripts/gen-events-catalog.tsdepuis le schéma Zod canonique danspackages/shared/src/events/widget-data-events.ts. Ne pas éditer ce fichier à la main — modifier la source puis relancerbun run gen:events.
Topic
outbound_call:connected- Famille : OutboundCall
- Bloc d'origine : BLOC-09
- Discriminant :
kind: "outbound_call:connected"
Description
Optionnel — publié si Twilio retourne un webhook connected. V1 skip car l'appel synchrone retourne sur initiated.
Schéma JSON
{
"$ref": "#/definitions/outbound-call-connected",
"definitions": {
"outbound-call-connected": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "outbound_call:connected"
},
"call_id": {
"type": "string",
"format": "uuid"
},
"connected_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"kind",
"call_id",
"connected_at"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}Import TypeScript
import {
OutboundCallConnectedEventSchema,
type OutboundCallConnectedEvent,
} from "@kohami/shared";Parsing côté tablette
import { OutboundCallConnectedEventSchema } from "@kohami/shared";
room.on(RoomEvent.DataReceived, (payload, _participant, _kind, topic) => {
if (topic !== "outbound_call:connected") return;
const raw = new TextDecoder().decode(payload);
const event = OutboundCallConnectedEventSchema.parse(JSON.parse(raw));
// ... handle event
});