{
"$defs": {
"Action": {
"description": "An audited action, `<entity>.<verb>` in `lower_snake`. New actions are added over time.",
"oneOf": [
{
"const": "session.create",
"description": "A session was created.",
"type": "string"
},
{
"const": "session.renew",
"description": "A session was renewed.",
"type": "string"
},
{
"const": "session.revoke",
"description": "A session was revoked.",
"type": "string"
},
{
"const": "pass.reject",
"description": "A pass with a valid signature was rejected.",
"type": "string"
},
{
"const": "login.fail",
"description": "A standalone login failed.",
"type": "string"
},
{
"const": "member.provision",
"description": "A principal was provisioned.",
"type": "string"
},
{
"const": "member.update",
"description": "A principal's profile was updated.",
"type": "string"
},
{
"const": "member.deprovision",
"description": "A principal was deprovisioned.",
"type": "string"
},
{
"const": "member.erase",
"description": "A principal's account was erased: deprovisioned, scrubbed and its external id\nmapping cut (`details {erasure_id, mode, sessions_revoked, upgraded?, cascade_of?}`).",
"type": "string"
},
{
"const": "member.erase_complete",
"description": "An erasure has nothing left pending (`details {erasure_id, erased, kept}`: counts and\nkinds only).",
"type": "string"
},
{
"const": "member.erase_preview",
"description": "A dry run of an erase (`details {member_id, mode, erased, kept}`: counts only).",
"type": "string"
},
{
"const": "member.erase_replayed",
"description": "A restored database brought an erased member back; it was erased again at start.",
"type": "string"
},
{
"const": "principal.relink",
"description": "A local member got a K2 identity, keeping its member id; details `{from, to}`.",
"type": "string"
},
{
"const": "identity.switch",
"description": "The install's identity mode switched from standalone to K2; details `{from, to}`.",
"type": "string"
},
{
"const": "owner.set",
"description": "The install owner was set.",
"type": "string"
},
{
"const": "agent.pin",
"description": "An assistant was pinned.",
"type": "string"
},
{
"const": "agent.unpin",
"description": "An assistant was unpinned.",
"type": "string"
},
{
"const": "api.call",
"description": "An act-as call with no domain action of its own.",
"type": "string"
},
{
"const": "space.create",
"description": "A space was created.",
"type": "string"
},
{
"const": "space.update",
"description": "A space was updated.",
"type": "string"
},
{
"const": "space.unbind",
"description": "A space was unbound from its App and became a read-only orphan; details\n`{app_id}`.",
"type": "string"
},
{
"const": "space.release",
"description": "An orphaned space was released from its old App; details `{orphaned_from}`.",
"type": "string"
},
{
"const": "space.governance",
"description": "A space's governance switched; details `{app_id, from, to,\nmanaged_role_ids}` (`via: unbind` when unbinding the Space's App set it back to `sew`).",
"type": "string"
},
{
"const": "category.create",
"description": "A category was created.",
"type": "string"
},
{
"const": "category.update",
"description": "A category was updated.",
"type": "string"
},
{
"const": "category.delete",
"description": "A category was deleted.",
"type": "string"
},
{
"const": "channel.create",
"description": "A channel was created.",
"type": "string"
},
{
"const": "channel.update",
"description": "A channel was updated.",
"type": "string"
},
{
"const": "channel.archive",
"description": "A channel was archived.",
"type": "string"
},
{
"const": "channel.unarchive",
"description": "A channel was unarchived.",
"type": "string"
},
{
"const": "channel.sync",
"description": "A channel's overwrites were re-synced with its category.",
"type": "string"
},
{
"const": "role.create",
"description": "A role was created.",
"type": "string"
},
{
"const": "role.update",
"description": "A role was updated.",
"type": "string"
},
{
"const": "role.delete",
"description": "A role was deleted.",
"type": "string"
},
{
"const": "role.assign",
"description": "A role was assigned.",
"type": "string"
},
{
"const": "role.unassign",
"description": "A role was unassigned.",
"type": "string"
},
{
"const": "overwrite.set",
"description": "An overwrite was set.",
"type": "string"
},
{
"const": "overwrite.delete",
"description": "An overwrite was deleted.",
"type": "string"
},
{
"const": "policy.set",
"description": "Org policies were changed.",
"type": "string"
},
{
"const": "member.timeout",
"description": "A member was timed out.",
"type": "string"
},
{
"const": "member.untimeout",
"description": "A timeout was lifted.",
"type": "string"
},
{
"const": "space_member.remove",
"description": "A member was removed from a space.",
"type": "string"
},
{
"const": "space_member.ban",
"description": "A member was banned from a space (the reason is never in details).",
"type": "string"
},
{
"const": "space_member.unban",
"description": "A space ban was lifted (by a moderator, or by the system on promotion or takeover).",
"type": "string"
},
{
"const": "channel.slow_mode_set",
"description": "Slow mode was set on a channel.",
"type": "string"
},
{
"const": "message.moderator_delete",
"description": "A moderator deleted a message.",
"type": "string"
},
{
"const": "message.ban_wipe",
"description": "One batch of a ban's recent-message wipe (one row per batch of up to\n1,000 ids in one channel, instead of one `message.moderator_delete` per message).",
"type": "string"
},
{
"const": "thread.delete",
"description": "A moderator deleted a whole thread.",
"type": "string"
},
{
"const": "reaction.moderator_remove",
"description": "A moderator removed another member's reaction.",
"type": "string"
},
{
"const": "retention.set",
"description": "A retention policy was set.",
"type": "string"
},
{
"const": "retention.preview",
"description": "A retention preview was requested.",
"type": "string"
},
{
"const": "retention.cancel",
"description": "A pending retention policy was cancelled or replaced.",
"type": "string"
},
{
"const": "retention.activate",
"description": "A pending retention policy took effect.",
"type": "string"
},
{
"const": "retention.run_requested",
"description": "A retention run was requested by hand.",
"type": "string"
},
{
"const": "retention.run",
"description": "A retention run finished.",
"type": "string"
},
{
"const": "legal_hold.create",
"description": "A legal hold was created.",
"type": "string"
},
{
"const": "legal_hold.update",
"description": "A legal hold was updated.",
"type": "string"
},
{
"const": "legal_hold.release",
"description": "A legal hold was released.",
"type": "string"
},
{
"const": "export.start",
"description": "An export was started.",
"type": "string"
},
{
"const": "ediscovery.export",
"description": "An eDiscovery export was run.",
"type": "string"
},
{
"const": "backup.start",
"description": "A backup was started.",
"type": "string"
},
{
"const": "import.start",
"description": "Retired (an import that fails leaves no install to audit into); never written.",
"type": "string"
},
{
"const": "key.rotate_master",
"description": "The master key was rotated.",
"type": "string"
},
{
"const": "key.shred",
"description": "A month key was shredded.",
"type": "string"
},
{
"const": "audit.read",
"description": "The audit log was read.",
"type": "string"
},
{
"const": "compliance.read",
"description": "A compliance read happened.",
"type": "string"
},
{
"const": "job.dead",
"description": "A job exhausted its attempts or failed permanently.",
"type": "string"
},
{
"const": "job.retry",
"description": "An admin requeued a dead job.",
"type": "string"
},
{
"const": "job.cancel",
"description": "An admin cancelled a pending job.",
"type": "string"
},
{
"const": "audit.verify_failed",
"description": "The audit hash chain failed verification.",
"type": "string"
},
{
"const": "password.set",
"description": "A standalone password was set through a one-time setup link.",
"type": "string"
},
{
"const": "mgmt.auth_fail",
"description": "Failed service-token checks on the mgmt socket, coalesced per peer uid per 10 s.",
"type": "string"
},
{
"const": "agent.deliveries_read",
"description": "A non-empty agent deliveries read.",
"type": "string"
},
{
"const": "password.setup_link",
"description": "A one-time password setup link was issued; never the token or URL.",
"type": "string"
},
{
"const": "member.install_role_set",
"description": "A member's install role was set (over the client API or the local role route; both use\nthe same implementation).",
"type": "string"
},
{
"const": "install.backup",
"description": "A backup bundle was made.",
"type": "string"
},
{
"const": "install.restore",
"description": "A backup bundle was restored.",
"type": "string"
},
{
"const": "install.drill",
"description": "A restore drill ran.",
"type": "string"
},
{
"const": "install.upgrade",
"description": "The binary was upgraded or rolled back.",
"type": "string"
},
{
"const": "media.install",
"description": "The media engine was installed or reconfigured.",
"type": "string"
},
{
"const": "media.enable",
"description": "Voice was enabled.",
"type": "string"
},
{
"const": "media.disable",
"description": "Voice was disabled.",
"type": "string"
},
{
"const": "media.uninstall",
"description": "The media engine was uninstalled.",
"type": "string"
},
{
"const": "media.keys_rotate",
"description": "Media keys were rotated; kids only, never key bytes.",
"type": "string"
},
{
"const": "media.turn_cert",
"description": "The TURN certificate was replaced.",
"type": "string"
},
{
"const": "media.upgrade",
"description": "The media engine was upgraded or rolled back.",
"type": "string"
},
{
"const": "recording.install",
"description": "The recorder and transcriber were installed.",
"type": "string"
},
{
"const": "recording.upgrade",
"description": "The recorder or transcriber was upgraded.",
"type": "string"
},
{
"const": "recording.set_model",
"description": "The transcriber's model was changed.",
"type": "string"
},
{
"const": "keys.master_exported",
"description": "The master key was exported for a box move.",
"type": "string"
},
{
"const": "keys.keyring_exported",
"description": "The keyring was exported for a box move.",
"type": "string"
},
{
"const": "keys.keyring_imported",
"description": "A keyring export was imported.",
"type": "string"
},
{
"const": "key.rollover",
"description": "A month key was rolled over early.",
"type": "string"
},
{
"const": "key.rewrap",
"description": "Keyring entries were re-wrapped under a new master key.",
"type": "string"
},
{
"const": "key.restore_from_mirror",
"description": "The local keyring was rebuilt from its mirror.",
"type": "string"
},
{
"const": "key.mirror_stale",
"description": "The keyring mirror went stale.",
"type": "string"
},
{
"const": "key.resurrected_refused",
"description": "A key file for a shredded kid was found and refused.",
"type": "string"
},
{
"const": "space.transfer",
"description": "Space ownership moved.",
"type": "string"
},
{
"const": "space_member.add",
"description": "Members were added to a space.",
"type": "string"
},
{
"const": "space_member.sync",
"description": "K2's member-channels sync changed a person's private channels or level in an\nApp-governed Space; details `{app_id, external_id, added, removed, level,\nprevious_level, owner_added, queued_job, k2_actor}` (channel ids).",
"type": "string"
},
{
"const": "channel_member.add",
"description": "A member was added to a channel.",
"type": "string"
},
{
"const": "channel_member.remove",
"description": "A member was removed from a channel.",
"type": "string"
},
{
"const": "channel.admin_join",
"description": "A space admin joined a private channel through the policy join.",
"type": "string"
},
{
"const": "role.reorder",
"description": "A space's roles were reordered.",
"type": "string"
},
{
"const": "user_group.create",
"description": "A user group was created.",
"type": "string"
},
{
"const": "user_group.update",
"description": "A user group was changed.",
"type": "string"
},
{
"const": "user_group.delete",
"description": "A user group was deleted.",
"type": "string"
},
{
"const": "user_group.members_add",
"description": "Members were added to a user group.",
"type": "string"
},
{
"const": "user_group.members_remove",
"description": "Members were removed from a user group.",
"type": "string"
},
{
"const": "profile_field.create",
"description": "A custom profile field was created.",
"type": "string"
},
{
"const": "profile_field.update",
"description": "A custom profile field was changed.",
"type": "string"
},
{
"const": "profile_field.delete",
"description": "A custom profile field was deleted.",
"type": "string"
},
{
"const": "profile_field.reorder",
"description": "Custom profile fields were reordered.",
"type": "string"
},
{
"const": "member.profile_reset",
"description": "An admin reset another member's avatar or status.",
"type": "string"
},
{
"const": "member.avatar_push",
"description": "K2 pushed an avatar through mgmt.",
"type": "string"
},
{
"const": "attachment.moderator_remove",
"description": "A moderator removed another member's attachments.",
"type": "string"
},
{
"const": "emoji.create",
"description": "A custom emoji was created.",
"type": "string"
},
{
"const": "emoji.update",
"description": "A custom emoji was renamed or its aliases changed.",
"type": "string"
},
{
"const": "emoji.delete",
"description": "A custom emoji was deleted.",
"type": "string"
},
{
"const": "space.icon_set",
"description": "A space icon was set.",
"type": "string"
},
{
"const": "space.icon_clear",
"description": "A space icon was cleared.",
"type": "string"
},
{
"const": "message.previews_suppress",
"description": "A moderator turned off another member's link previews.",
"type": "string"
},
{
"const": "message.on_behalf_approval",
"description": "The person an assistant posted for approved or declined the post.",
"type": "string"
},
{
"const": "secret.set",
"description": "An install secret was set; details carry the name and fingerprint only.",
"type": "string"
},
{
"const": "secret.clear",
"description": "An install secret was cleared.",
"type": "string"
},
{
"const": "bookmark.create",
"description": "A channel bookmark was created.",
"type": "string"
},
{
"const": "bookmark.update",
"description": "A channel bookmark was edited.",
"type": "string"
},
{
"const": "bookmark.delete",
"description": "A channel bookmark was deleted.",
"type": "string"
},
{
"const": "bookmark.reorder",
"description": "A channel's bookmarks were reordered.",
"type": "string"
},
{
"const": "poll.moderator_close",
"description": "A moderator closed another member's poll.",
"type": "string"
},
{
"const": "scheduled_message.send",
"description": "An agent's scheduled message was sent.",
"type": "string"
},
{
"const": "search.rebuild_requested",
"description": "An admin asked for a search index rebuild over mgmt.",
"type": "string"
},
{
"const": "search.rebuild",
"description": "A search index rebuild finished and swapped in (system actor).",
"type": "string"
},
{
"const": "search.compact",
"description": "Retention compacted the search index.",
"type": "string"
},
{
"const": "guest.convert",
"description": "A member became a guest or a guest became a member.",
"type": "string"
},
{
"const": "guest.space_remove",
"description": "A guest left a space because its last channel there was gone.",
"type": "string"
},
{
"const": "guest.suspend_all",
"description": "`guests.enabled` turned off: every guest session revoked.",
"type": "string"
},
{
"const": "guest.restore_all",
"description": "`guests.enabled` turned back on.",
"type": "string"
},
{
"const": "mail.test",
"description": "A test mail was sent over mgmt; details `{ok, smtp_code}`, never the address.",
"type": "string"
},
{
"const": "notify.digest_unsubscribe",
"description": "A digest unsubscribe link turned a member's digest off (system actor).",
"type": "string"
},
{
"const": "member.compliance_set",
"description": "The compliance flag was granted or revoked.",
"type": "string"
},
{
"const": "ediscovery.complete",
"description": "An eDiscovery archive was written.",
"type": "string"
},
{
"const": "ediscovery.fail",
"description": "An eDiscovery export failed.",
"type": "string"
},
{
"const": "ediscovery.cancel",
"description": "An eDiscovery export was cancelled.",
"type": "string"
},
{
"const": "ediscovery.download",
"description": "An eDiscovery archive was downloaded, or a range of it.",
"type": "string"
},
{
"const": "ediscovery.delete",
"description": "An eDiscovery archive was deleted by a caller.",
"type": "string"
},
{
"const": "ediscovery.expire",
"description": "An eDiscovery archive expired.",
"type": "string"
},
{
"const": "export.complete",
"description": "A full export archive was written.",
"type": "string"
},
{
"const": "export.fail",
"description": "A full export failed.",
"type": "string"
},
{
"const": "export.cancel",
"description": "A full export was cancelled.",
"type": "string"
},
{
"const": "export.download",
"description": "A full export archive was downloaded.",
"type": "string"
},
{
"const": "export.delete",
"description": "A full export archive was deleted by a caller.",
"type": "string"
},
{
"const": "export.expire",
"description": "A full export archive expired.",
"type": "string"
},
{
"const": "import.complete",
"description": "An import finished (the first row of a moved install's new tail).",
"type": "string"
},
{
"const": "import.identity_map",
"description": "An import into a standalone install mapped K2 identities (`details {people,\ndeactivated, spaces_reowned, governance_reset}`).",
"type": "string"
},
{
"const": "audit.verify_requested",
"description": "A client asked for an audit chain check.",
"type": "string"
},
{
"const": "voice.join",
"description": "A member joined voice (`details {channel_id, via}`).",
"type": "string"
},
{
"const": "voice.leave",
"description": "A member left voice (`details {channel_id, reason, duration_ms}`).",
"type": "string"
},
{
"const": "voice.server_mute",
"description": "A moderator server-muted or unmuted a member.",
"type": "string"
},
{
"const": "voice.server_deafen",
"description": "A moderator server-deafened or undeafened a member.",
"type": "string"
},
{
"const": "voice.move",
"description": "A moderator moved a member to another voice channel.",
"type": "string"
},
{
"const": "voice.disconnect",
"description": "A moderator disconnected a member from voice.",
"type": "string"
},
{
"const": "voice.config",
"description": "Voice was installed, reconfigured, enabled or disabled from the CLI.",
"type": "string"
},
{
"const": "voice.keys_rotate",
"description": "The media token key was rotated from the CLI.",
"type": "string"
},
{
"const": "voice.media_path",
"description": "K2 reported the media path down or up (`details {state,\nmedia_path_reason, ended_calls}`).",
"type": "string"
},
{
"const": "call.e2ee_keys_created",
"description": "The call DS and CA keys were generated (`details {ds_kid, ca_kid}`).",
"type": "string"
},
{
"const": "call.e2ee_member_removed",
"description": "A forced removal from a call's key group completed.",
"type": "string"
},
{
"const": "call.e2ee_group_reset",
"description": "A call's key group was reset.",
"type": "string"
},
{
"const": "call.e2ee_rebuilt",
"description": "A call's key group was rebuilt after a restart.",
"type": "string"
},
{
"const": "call.e2ee_recorder_certified",
"description": "A recorder certificate was issued.",
"type": "string"
},
{
"const": "call.e2ee_roster_report",
"description": "A client reported a roster mismatch.",
"type": "string"
},
{
"const": "call.e2ee_sender_stuck",
"description": "A device was removed and refused for a stuck key slot.",
"type": "string"
},
{
"const": "call.e2ee_engine_anomaly",
"description": "A client's bridge reported a misbehaving engine.",
"type": "string"
},
{
"const": "device.enroll",
"description": "A device key was enrolled (`details {device_id, serial, platform}`).",
"type": "string"
},
{
"const": "device.renew",
"description": "A device certificate was renewed.",
"type": "string"
},
{
"const": "device.revoke",
"description": "A device was revoked (`details {device_id, serials, reason}`).",
"type": "string"
},
{
"const": "call.start",
"description": "A DM call started (actor = the starter; `details {call_id,\nchannel_id, rung_count}`).",
"type": "string"
},
{
"const": "call.end",
"description": "A DM call ended (actor `system`; `details {call_id, channel_id,\nduration_ms, joined_count, end_reason}`).",
"type": "string"
},
{
"const": "recording.start",
"description": "A recording started (`details {recording_id, channel_id,\ncall_record_id?, auto, audio_keep_days, mixed}`).",
"type": "string"
},
{
"const": "recording.stop",
"description": "A recording stopped (`details {recording_id, duration_ms, stop_reason,\nrecorded_members}`).",
"type": "string"
},
{
"const": "recording.consent",
"description": "A consent answer (`details {recording_id, consent, via, surface, notice_version}`).",
"type": "string"
},
{
"const": "recording.audio_retention",
"description": "Audio keep days changed (`details {recording_id, old_days, new_days}`).",
"type": "string"
},
{
"const": "recording.audio_purge",
"description": "Audio purged (`details {recording_id, segments, bytes, held_segments}`).",
"type": "string"
},
{
"const": "recording.recorder_rejoin",
"description": "The recorder rejoined (`details {recording_id, run, reason}`).",
"type": "string"
},
{
"const": "recording.engine_anomaly",
"description": "The recorder refused engine misbehaviour (`details {recording_id, kind}`).",
"type": "string"
},
{
"const": "recording.binding_anomaly",
"description": "The recorder refused a binding table (`details {recording_id, kind}`).",
"type": "string"
},
{
"const": "recording.consent_violation",
"description": "A segment of an ungranted identity was discarded (`details {recording_id, run,\nseq}`; never the identity).",
"type": "string"
},
{
"const": "transcript.final",
"description": "A transcript became final (`details {recording_id, turns, gaps_ms,\nfailed_segments, model, backend}`).",
"type": "string"
},
{
"const": "recording.download",
"description": "A compliance download grant (`details {recording_id, channel_id, download_id, what,\nparts, segments, reason_given}`).",
"type": "string"
},
{
"const": "recording.settings",
"description": "A room's or an App's recording settings changed over mgmt (`details {app_id?,\nspace_id?, channel_id?, fields}`: the names of the fields set, never values that\nidentify a person).",
"type": "string"
},
{
"const": "recording.transcript_read",
"description": "An App's server read a transcript over mgmt (`details {recording_id, app_id,\nturns}`; the actor is the App's service and K2's `Sew-Actor`).",
"type": "string"
},
{
"const": "meeting.create",
"description": "A meeting was made (`details {meeting_id, channel_id, kind,\nstarts_at, ends_at, member_attendees, email_attendees}`: counts and ids only, never a\ntitle, name or email).",
"type": "string"
},
{
"const": "meeting.update",
"description": "A meeting changed (`details {meeting_id, fields, ics_sequence}`).",
"type": "string"
},
{
"const": "meeting.cancel",
"description": "A scheduled meeting was cancelled (`details {meeting_id, ics_sequence}`).",
"type": "string"
},
{
"const": "meeting.end",
"description": "A meeting ended (actor `system` for the end job, the host for End for all;\n`details {meeting_id, end_reason, duration_ms}`).",
"type": "string"
},
{
"const": "meeting.lock",
"description": "A host locked or unlocked a meeting (`details {meeting_id, locked}`).",
"type": "string"
},
{
"const": "meeting.remove",
"description": "A host removed someone from a meeting (`details {meeting_id, member_id,\nkind, in_call, sessions_revoked, devices_revoked}`): ids and counts only, never a\nname, an email or an IP.",
"type": "string"
},
{
"const": "meeting_link.create",
"description": "A meeting link was made (at create and in a rotate). No secret.",
"type": "string"
},
{
"const": "meeting_link.read",
"description": "A host read a meeting's link. No secret.",
"type": "string"
},
{
"const": "meeting_link.rotate",
"description": "A host rotated a meeting's link. No secret.",
"type": "string"
},
{
"const": "meeting_link.revoke",
"description": "A host revoked a meeting's link, or the meeting closed. No secret.",
"type": "string"
},
{
"const": "meeting.redeem",
"description": "A meeting link was redeemed with its valid secret: ids and the outcome,\nnever a name, a nonce, a secret or an IP.",
"type": "string"
},
{
"const": "lobby.knock",
"description": "Someone knocked on a meeting's lobby (a redeem's new entry, or a\nsigned-in member with the link): ids only, never a name, a nonce, a secret or an IP.",
"type": "string"
},
{
"const": "lobby.admit",
"description": "A host let a lobby entry in (`details {meeting_id, entry_id, member_id,\nall}`).",
"type": "string"
},
{
"const": "lobby.deny",
"description": "A host turned a lobby entry away (`details {meeting_id, entry_id,\nmember_id, blocked}`).",
"type": "string"
},
{
"const": "app.quotas_set",
"description": "An App's quotas changed over mgmt (`details {app_id, before, after}`, each the\nset quotas).",
"type": "string"
},
{
"const": "app.settings_set",
"description": "K2 set an App's settings (`details {app_id, fields, hidden_from_home,\ndisplay_name, origin}`, the values after the write).",
"type": "string"
},
{
"const": "home_client.set",
"description": "K2 set or cleared the install's home client (`details {app_id, previous}`).",
"type": "string"
},
{
"const": "space.visibility",
"description": "A Space was made private or public again (`details {private}`).",
"type": "string"
},
{
"const": "space.app_link",
"description": "Sew 0.8.0: K2 linked a participant App to a Space (`details {app_id,\ngoverning_app_id, k2_actor}`).",
"type": "string"
},
{
"const": "space.app_unlink",
"description": "Sew 0.8.0: K2 removed a participant App's link (`details {app_id,\ngoverning_app_id, k2_actor}`).",
"type": "string"
},
{
"const": "notify.prefs_set",
"description": "K2 set a person's notification level or mute in one channel or DM over mgmt\n(`details {channel_id, level, muted, muted_until}`, the values after the write; the\ntarget is the person).",
"type": "string"
},
{
"const": "voice.invite",
"description": "A person in a voice room invited a member in (`details {channel_id, invite_id,\ninvitee_id, silent, reason}`; one row per invite made, none for a refusal).",
"type": "string"
},
{
"const": "voice.invite_stop",
"description": "A voice invite was declined by the invitee or cancelled by the inviter\n(`details {channel_id, invite_id, invitee_id, invited_by, state}`; the actor did it).",
"type": "string"
}
]
},
"Actor": {
"description": "Who performed an audited action.",
"properties": {
"ip": {
"description": "The client IP.",
"type": [
"string",
"null"
]
},
"kind": {
"$ref": "#/$defs/ActorKind",
"description": "What kind of principal acted."
},
"member_id": {
"description": "The acting member, when a member acted.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": [
"string",
"null"
]
},
"on_behalf_of": {
"description": "For an assistant, the member id of its person.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": [
"string",
"null"
]
},
"peer_uid": {
"description": "The mgmt caller's `SO_PEERCRED` uid.",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"via": {
"anyOf": [
{
"$ref": "#/$defs/ActorVia"
},
{
"type": "null"
}
],
"description": "Set on act-as calls."
}
},
"required": [
"kind"
],
"type": "object"
},
"ActorKind": {
"description": "What kind of principal acted.",
"oneOf": [
{
"const": "person",
"description": "A person member.",
"type": "string"
},
{
"const": "agent",
"description": "An agent member.",
"type": "string"
},
{
"const": "service",
"description": "The mgmt service (K2's daemon or the `sew` CLI).",
"type": "string"
},
{
"const": "system",
"description": "Sew itself (jobs).",
"type": "string"
}
]
},
"ActorVia": {
"description": "How an act-as call reached Sew: through K2, for an agent, in a K2 session.",
"properties": {
"agent": {
"description": "The K2 workspace uuid of the agent.",
"type": "string"
},
"k2_session": {
"description": "The K2 session id.",
"type": "string"
},
"system": {
"description": "The delegating system; `\"k2\"` in v1.",
"type": "string"
}
},
"required": [
"system",
"agent",
"k2_session"
],
"type": "object"
},
"AuditEvent": {
"description": "One row of the append-only audit log.",
"properties": {
"action": {
"$ref": "#/$defs/Action",
"description": "What was done."
},
"actor": {
"$ref": "#/$defs/Actor",
"description": "Who acted."
},
"at": {
"description": "When it happened.",
"format": "date-time",
"type": "string"
},
"channel_id": {
"description": "The channel involved.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": [
"string",
"null"
]
},
"details": {
"additionalProperties": true,
"default": {},
"description": "Ids, names, old and new values, permission bits. Never content.",
"type": "object"
},
"id": {
"description": "The event id.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": "string"
},
"result": {
"$ref": "#/$defs/AuditResult",
"description": "How it ended."
},
"space_id": {
"description": "The space involved.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": [
"string",
"null"
]
},
"target": {
"anyOf": [
{
"$ref": "#/$defs/AuditTarget"
},
{
"type": "null"
}
],
"description": "What it touched; absent when there is no target (for example a failed login)."
}
},
"required": [
"id",
"at",
"actor",
"action",
"result"
],
"type": "object"
},
"AuditResult": {
"description": "How an audited action ended.",
"oneOf": [
{
"const": "ok",
"description": "It succeeded.",
"type": "string"
},
{
"const": "denied",
"description": "A permission or policy check refused it.",
"type": "string"
},
{
"const": "error",
"description": "It failed.",
"type": "string"
}
]
},
"AuditTarget": {
"description": "What an audited action touched.",
"properties": {
"id": {
"description": "The entity id.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": "string"
},
"kind": {
"description": "The entity kind, `lower_snake` (for example `channel`).",
"type": "string"
}
},
"required": [
"kind",
"id"
],
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "One chained audit row.",
"properties": {
"chain_seq": {
"description": "Its chain position.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"event": {
"$ref": "#/$defs/AuditEvent",
"description": "The stored event."
},
"hash": {
"description": "Its hash, 64 hex.",
"type": "string"
},
"prev_hash": {
"description": "The previous row's hash, 64 hex.",
"type": "string"
}
},
"required": [
"chain_seq",
"hash",
"prev_hash",
"event"
],
"title": "AuditEntry",
"type": "object"
}