Part of the API reference for the Consent Ledger LiveKit reference integration.
The main types the consent client accepts and returns, and the errors the integration throws. Types are exported from the same entry point as the function that uses them.
Types
ConsentDecision
What you pass to submitDecision:
Field | Type | Rule |
|
| One per meeting, never reused. Use the LiveKit room name. |
|
| The participant's opaque ID. Use the LiveKit identity. |
|
| What the recording is for, such as |
|
| The version of the notice the participant was shown |
|
| A positive integer, greater than the participant's current revision |
|
| What they chose |
ConsentSubmission
What the client returns: { submissionId, decision, source, confirmation }, where confirmation.status is:
Status | Meaning | Permits recording? |
| Consent Ledger stored it and the record matched ( | Yes, for an acceptance |
| Sent, not confirmed yet ( | No |
| Consent Ledger rejected it, or stored something different | No |
| The outcome could not be determined; needs an operator | No |
ConsentPermission
What checkPermission() returns: { permitted: true } or { permitted: false, blocked: [{ participantId, reason }] }, where reason is missing, declined, withdrawn, unconfirmed, or unavailable (the store could not be read).
Errors
Error | Thrown by | Means | Suggested response |
| Consent client, and | Bad input or options, or a revision not greater than the current one | HTTP 400 or 409; ask the caller to reload |
| Consent client | The store failed; the original error is its | HTTP 503; nothing was confirmed |
| PostgreSQL stores | A query failed or a row was invalid. Has | Log the code; check grants and connectivity |
| Drizzle stores | The same, plus | Log the code; check grants, connectivity, or SQLite locking |
|
| Bad Consent Ledger settings, or Consent Ledger could not be read. Has a | Inside the adapter this becomes a receipt status, not an exception |
| Other setup functions | A missing or invalid option | Fix the configuration |
For help fixing common problems, see LiveKit errors and troubleshooting.
