Texecom Event Schemas

JSON Schema Documentation

Site Access Granted Payload

Emitted when an account is granted direct access to a site (identity.account_site_grant). SOFTC-7101 owns this contract; it has two emitters in identity-service — grantAccountSiteAccess / grantTexecomSiteAccess (apps/auth/src/domains/authorization/site-access.ts) and the site-handover accept transaction (SOFTC-7262, apps/auth/src/domains/handover/accept.ts), which grants MASTER_END_USER to the incoming owner. Aggregate is the grantee account.

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

Properties

NameType
accountIdString
siteIdString
accessLevelString
expiresAt[string, null]
grantedByString

accountId

Description UUID of the account granted access (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

accessLevel

Description Access level granted (identity.account_site_access_level.access_level).
TypeString
Required Yes
Enum
  • MASTER_END_USER
  • STANDARD_END_USER
  • INSTALLER_ADMIN
  • INSTALLER_ENGINEER

expiresAt

Description ISO 8601 timestamp the grant lapses, or null for a permanent grant (identity.account_site_grant.expires_at). Always null for a MASTER_END_USER grant from a handover accept; a Texecom support grant carries a real expiry.
Type[string, null]
Required Yes
Format date-time

grantedBy

Description UUID of the account that performed the grant. The installer on the installer-grant path; on a handover accept it is the accepting account itself, since the invitee is acting on their own invite.
TypeString
Required Yes
Format uuid

Schema

{
    "$id": "https://schemas.texecom-prod.com/v2/events/payload/service/identity/site_access/granted/v1.0.0.json",
    "$schema": "http://json-schema.org/draft-07/schema",
    "title": "Site Access Granted Payload",
    "description": "Emitted when an account is granted direct access to a site (identity.account_site_grant). SOFTC-7101 owns this contract; it has two emitters in identity-service — grantAccountSiteAccess / grantTexecomSiteAccess (apps/auth/src/domains/authorization/site-access.ts) and the site-handover accept transaction (SOFTC-7262, apps/auth/src/domains/handover/accept.ts), which grants MASTER_END_USER to the incoming owner. Aggregate is the grantee account.",
    "type": "object",
    "properties": {
        "accountId": {
            "description": "UUID of the account granted access (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"
        },
        "accessLevel": {
            "description": "Access level granted (identity.account_site_access_level.access_level).",
            "type": "string",
            "enum": [
                "MASTER_END_USER",
                "STANDARD_END_USER",
                "INSTALLER_ADMIN",
                "INSTALLER_ENGINEER"
            ]
        },
        "expiresAt": {
            "description": "ISO 8601 timestamp the grant lapses, or null for a permanent grant (identity.account_site_grant.expires_at). Always null for a MASTER_END_USER grant from a handover accept; a Texecom support grant carries a real expiry.",
            "type": [
                "string",
                "null"
            ],
            "format": "date-time"
        },
        "grantedBy": {
            "description": "UUID of the account that performed the grant. The installer on the installer-grant path; on a handover accept it is the accepting account itself, since the invitee is acting on their own invite.",
            "type": "string",
            "format": "uuid"
        }
    },
    "required": [
        "accountId",
        "siteId",
        "accessLevel",
        "expiresAt",
        "grantedBy"
    ],
    "additionalProperties": false
}