BaseDocument

db · /index·type

Baseline shape for every document in this package: the flat { id, createdAt, updatedAt } triple. Previously this intersected the Mongoose Document interface; the Convex re-home returns plain rows with no document methods, so the base type is now exactly the managed fields — Service.create still strips them from its input via Omit<DocType, keyof BaseDocument>.

Definition

@nordcom/commerce-db

DocumentExtras & BaseTimestamps

Example

import type { BaseDocument } from '@nordcom/commerce-db';
function label(doc: BaseDocument): string {
    return `${doc.id} (updated ${doc.updatedAt.toISOString()})`;
}

FeatureFlagService ReviewService ShopService FeatureFlagOption FeatureFlagRef ResolvedCartLineTokens ResolvedProductCardTokens ResolvedShopTheme

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

On this page