OnlineShop

db · /index·type

Client-safe shop shape returned by all ShopService read methods; safe to pass to Client Components or server actions. Historically this stripped the hydrated Mongoose document methods off ShopBase; the Convex-backed seam returns plain rows, so the only remaining difference is that collaborators becomes optional. Credential fields (authentication.token, customers.clientSecret) live in the split-out Convex shopCredentials table and are only attached when sensitiveData: true is passed to ShopService.findByDomain.

Definition

@nordcom/commerce-db
type OnlineShop = Omit<ShopBase, 'collaborators'> & { collaborators: ShopBase['collaborators'] };

Omit<ShopBase, 'collaborators'> & { collaborators: ShopBase['collaborators'] }

Example

import type { OnlineShop } from '@nordcom/commerce-db';
function shopDomain(shop: OnlineShop): string {
    return shop.domain;
}

FeatureFlagService ReviewService ShopService FeatureFlagOption FeatureFlagRef ResolvedCartLineTokens ResolvedProductCardTokens ResolvedShopTheme

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

On this page