DataSyncNamespace
DataSync PAM v3 namespaces and helpers.
ENTITIES, RELATIONSHIPS and MEMBERSHIPS appear literally as keys under the token's res/pat blocks, as siblings of chan/grp/uuid. USERS_PROJECTION and CHANNELS_PROJECTION do not: see their docs.
Properties
Namespace of DataSyncGrant.channel / DataSyncGrant.channelPattern. Like USERS_PROJECTION it is not a permission bucket: the permission bits go into the plain channels bucket (shared with pub/sub and App Context v2), and this string appears only as the prefix of the pn-projections composite key (datasync:channels:<id>).
The projection a resource uses when its DataSyncGrantType.projection is left unset. Pass this explicitly to a grant's projection when you want the entry written out rather than left implicit.
The meta key the DataSync backend reads per-resource projection assignments from.
Namespace of DataSyncGrant.user / DataSyncGrant.userPattern. It is not a permission bucket: the permission bits of those grants go into the plain users bucket, and this string appears only as the prefix of the pn-projections composite key (datasync:users:<id>) (server team, 2026-08-07). Note this contradicts the ADR examples, which key every projection under datasync:entities:<id>.
Functions
Resolves the ref-channel a DataSync resource publishes its realtime events on. null, "default" and DEFAULT_PROJECTION resolve to the bare id; any other projection resolves to __{projection}__{id}.
Builds the PAM channel regex matching the ref-channels of every DataSync resource whose id matches pattern, as seen through projection (resolved like refChannel).