Function: encodeAuditEvent()
encodeAuditEvent(
event):string
Defined in: src/audit/encode.ts:80
Serialize an AuditEvent to its JSON wire string.
Translates the camelCase interface field names into the gateway's
snake_case keys (eventId → event_id, callStack → call_stack,
etc.), recursively encoding the call-stack tree via
encodeCallStackNode. Optional fields whose value is
undefined, an empty string, or an empty array are omitted so a
legacy decoder that has never seen those fields reads the payload
unchanged.
Parameters
event
Returns
string