ShopCollaborator
Canonical join row relating a shop to one collaborating user. De-embedded from the prior shape
that nested the full UserBase document inside the array: a collaborator now references its user
by id string (user) — the same id-ref pattern ReviewBase['shop'] adopted in the shop==tenant
collapse — paired with the permissions granted on this shop. The shop side of the relation is the
parent document, so a row carries only the user-side id plus its permissions and never embeds a
user document (so it can leak no user fields). This is the canonical join shape the Convex
shopCollaborators table stores keyed by { shop, user }.
Properties
Example
import type { ShopCollaborator } from '@nordcom/commerce-db';
function collaboratorIds(collaborators: ShopCollaborator[]): string[] {
return collaborators.map((c) => c.user);
}Related
FeatureFlagService ReviewService ShopService FeatureFlagOption FeatureFlagRef ResolvedCartLineTokens ResolvedProductCardTokens ResolvedShopTheme
ShopBase
Raw document shape for a multitenant shop record. Extends BaseDocument with all tenantspecific configuration fields including domain routing, commerce provider
ShopService
Read service for the shops tenant roots. Extends the generic Service base with shopspecific queries (domain lookup, collaborator listing) on the deployed db/sho