ShopBase

db · /index·interface

Raw document shape for a multi-tenant shop record. Extends BaseDocument with all tenant-specific configuration fields including domain routing, commerce provider credentials, design tokens, and feature flags. id is the PUBLIC shop id (the migrated Mongo ObjectId preserved as the Convex row's legacyId); the Convex _id is never surfaced. Use OnlineShop for client-facing work since it masks credential fields.

Properties

collaborators
commerceProvider
createdAt
Date
design
{ accents: AccentToken[]; header: { logo: { alt: string; height: number; src: string; width: number } } }
domain
string

Example

import type { ShopBase } from '@nordcom/commerce-db';
function getDefaultLocale(shop: ShopBase): string {
    return shop.i18n?.defaultLocale ?? 'en-US';
}

FeatureFlagService ReviewService ShopService FeatureFlagOption FeatureFlagRef ResolvedCartLineTokens ResolvedProductCardTokens ResolvedShopTheme

Sourceshop.ts:140Edit the JSDoc directly
Metadata@nordcom/commerce-db@0.1.0Open in GitHub ↗

On this page