UserBase
●db · /index·type
Document shape for a platform user. Carries an embedded list of OAuth identities and satisfies
the NextAuth adapter contract — specifically the optional avatar and nullable emailVerified
fields that the adapter reads after User.create and User.find. email is unique; the
constraint is enforced inside the Convex db/users:create mutation (the migrated form of the old
Mongo unique index).
Definition
type UserBase = BaseDocument & { avatar: string; email: string; emailVerified: Date | null; groups: string[]; identities: IdentityBase[]; name: string };BaseDocument & { avatar: string; email: string; emailVerified: Date | null; groups: string[]; identities: IdentityBase[]; name: string }
Example
import type { UserBase } from '@nordcom/commerce-db';
function displayName(user: UserBase): string {
return user.name;
}Related
FeatureFlagService ReviewService ShopService FeatureFlagOption FeatureFlagRef ResolvedCartLineTokens ResolvedProductCardTokens ResolvedShopTheme