Texecom Event Schemas

JSON Schema Documentation

Site Access Revoked Payload

Emitted when an account's direct site access is revoked — identity.account_site_grant.revoked_at is set and deleted_at left null, so the row stays visible to the SOFTC-7097 audit view. SOFTC-7101 owns this contract; it has two emitters in identity-service — revokeAccountSiteAccess (apps/auth/src/domains/authorization/site-access.ts, the Texecom support undo) and the site-handover accept transaction (SOFTC-7262, apps/auth/src/domains/handover/accept.ts), which emits one per active installer-level grant it clears from the site being handed over. Aggregate is the account losing access.

$idhttps://schemas.texecom-prod.com/v2/events/payload/service/identity/site_access/revoked/v1.0.0.json
$schemahttp://json-schema.org/draft-07/schema

Properties

NameType
accountIdString
siteIdString
revokedAt[string, null]
revokedByString
reason[string, null]

accountId

Description UUID of the account whose access was revoked (identity.account_site_grant.account_id).
TypeString
Required Yes
Format uuid

siteId

Description UUID of the site (identity.account_site_grant.site_id).
TypeString
Required Yes
Format uuid

revokedAt

Description ISO 8601 timestamp the grant was revoked (identity.account_site_grant.revoked_at), read back from the UPDATE. Null only if the column came back empty.
Type[string, null]
Required Yes
Format date-time

revokedBy

Description UUID of the account that performed the revoke. The Texecom support account on the support-undo path; on a handover accept it is the accepting account, whose acceptance displaced these grants.
TypeString
Required Yes
Format uuid

reason

Description Free-text reason recorded on the grant (identity.account_site_grant.reason). Null when the caller supplied none; the handover accept path always sets 'site handed over'.
Type[string, null]
Required Yes

Schema

{
    "$id": "https://schemas.texecom-prod.com/v2/events/payload/service/identity/site_access/revoked/v1.0.0.json",
    "$schema": "http://json-schema.org/draft-07/schema",
    "title": "Site Access Revoked Payload",
    "description": "Emitted when an account's direct site access is revoked — identity.account_site_grant.revoked_at is set and deleted_at left null, so the row stays visible to the SOFTC-7097 audit view. SOFTC-7101 owns this contract; it has two emitters in identity-service — revokeAccountSiteAccess (apps/auth/src/domains/authorization/site-access.ts, the Texecom support undo) and the site-handover accept transaction (SOFTC-7262, apps/auth/src/domains/handover/accept.ts), which emits one per active installer-level grant it clears from the site being handed over. Aggregate is the account losing access.",
    "type": "object",
    "properties": {
        "accountId": {
            "description": "UUID of the account whose access was revoked (identity.account_site_grant.account_id).",
            "type": "string",
            "format": "uuid"
        },
        "siteId": {
            "description": "UUID of the site (identity.account_site_grant.site_id).",
            "type": "string",
            "format": "uuid"
        },
        "revokedAt": {
            "description": "ISO 8601 timestamp the grant was revoked (identity.account_site_grant.revoked_at), read back from the UPDATE. Null only if the column came back empty.",
            "type": [
                "string",
                "null"
            ],
            "format": "date-time"
        },
        "revokedBy": {
            "description": "UUID of the account that performed the revoke. The Texecom support account on the support-undo path; on a handover accept it is the accepting account, whose acceptance displaced these grants.",
            "type": "string",
            "format": "uuid"
        },
        "reason": {
            "description": "Free-text reason recorded on the grant (identity.account_site_grant.reason). Null when the caller supplied none; the handover accept path always sets 'site handed over'.",
            "type": [
                "string",
                "null"
            ]
        }
    },
    "required": [
        "accountId",
        "siteId",
        "revokedAt",
        "revokedBy",
        "reason"
    ],
    "additionalProperties": false
}