Packages narrative
packages / db
db
Functions
| Name | Description |
|---|---|
cartLineCustomProperty | Maps a |
convexIdentityMutation | Calls a deployed Convex mutation by path on an identity-authenticated client — the bearer-token companion to |
convexIdentityQuery | Calls a deployed Convex query by path on an identity-authenticated client — the read-side companion of |
convexServerMutation | Calls a deployed Convex |
convexServerQuery | Calls a deployed Convex |
createConvexIdentityClient | Constructs a FRESH Convex client for identity-authenticated calls — the CONVEXCORE-16 seam the admin app's editor bridge drives. Deliberately NOT the cached module client used by the server-secret transports: an identity client carries a per-request operator bearer token via |
deriveCatalog | Buckets |
isQuotedProductCardKey | Reports whether a product-card knob's value is logical content the serializer wraps in CSS quotes on emit ( |
isSectionFlagKey | Reports whether a feature flag key is namespaced as a section toggle. |
kebabCase | Converts a camelCase token key to kebab-case for use in a CSS custom-property name. |
productCardCustomProperty | Maps a |
resolveTheme | Resolves a shop's authored theme overrides against the platform defaults into a fully-populated token map. This is the single default-resolution entry point: the storefront serializer (P3-2) calls it and never reaches for a literal default itself. A shop with no |
sectionFlagKey | Builds the namespaced storage key for a section toggle from a bare section id. |
serializeThemeToCssVars | Serializes a shop's resolved theme into the ordered list of CSS custom-property declarations the storefront emits, so SSR and the admin live-preview compute the same output byte-for-byte. The function is pure and isomorphic (no |
Classes
| Name | Description |
|---|---|
FeatureFlagService | FeatureFlag service backed by the deployed |
ReviewService | Review service backed by the deployed |
ShopService | Read service for the |
Interfaces
| Name | Description |
|---|---|
FeatureFlagOption | One selectable option in a feature flag's |
FeatureFlagRef | Embedded reference in a shop's |
ResolvedCartLineTokens | Tenant-tunable cart-line knobs. Mirrors the product-card token pattern (a flat map serialized diff-from-default onto |
ResolvedProductCardTokens | Flat per-knob token map for the product card. Keys are the camelCase mirror of the |
ResolvedShopTheme | Fully-populated, platform-defaulted theme token map for a single shop. Every field carries a concrete platform default (sourced from |
ShopBase | Raw document shape for a multi-tenant shop record. Extends |
ShopCollaborator | Canonical join row relating a shop to one collaborating user. De-embedded from the prior shape that nested the full |
TargetingRule | One rule in a feature flag's targeting configuration. |
Types
| Name | Description |
|---|---|
AccentToken | A single brand accent swatch. Shared between the required |
BaseDocument | Baseline shape for every document in this package: the flat |
BaseTimestamps | Managed timestamp fields every document carries. The Convex rows persist these as epoch-ms numbers (preserving the source Mongo |
CommerceProvider | Discriminated union of all supported commerce provider configurations. Narrow by |
CommerceProviders | Literal union of valid commerce provider type strings, constrained to the same set as the runtime |
DocumentExtras | String |
DomainVerification | Public connection state of one routable domain, as surfaced by the admin connect screen. Legacy rows (no stored |
DomainVerificationInput | Write payload for |
FeatureFlagBase | Resolved document shape for a feature flag record. Combines |
FeatureFlagKind | Discriminator for a feature flag's intent. |
FindOptions | Controls how |
FontFamilyKey | Union of valid |
Identifiable | Marks an entity as having a URL-safe |
IdentityBase | Document shape for an OAuth provider link attached to a user. Stores the provider name, the provider-scoped identity ID, optional token fields, and the token expiry date. Lives as an element of the embedded |
JsonValue | JSON-serializable value accepted as a feature flag |
LimitFilters | Union of pagination shapes accepted by service query methods. Callers may pass either a plain |
Nullable | Adds |
OnlineShop | Client-safe shop shape returned by all |
Optional | Converts every key of |
PayloadType | Fallback widget kind for a theme token's generic form control — the four kinds the editor's auto-render offers when no richer |
ReviewBase | Document shape for a shop review. |
ShopifyCommerceProvider | Auth and connection configuration for the Shopify commerce integration. Identifies the storefront via |
ShopThemeTokens | Authored, all-optional theme overrides stored on the shop record ( |
StripeCommerceProvider | Auth configuration shape for the Stripe commerce integration. Currently a placeholder — the |
ThemeBranding | Resolved primary/secondary brand accents fed to |
ThemeCssVar | One emitted CSS declaration as a |
ThemeGroup | Top-level catalog grouping, mirroring the structure of |
ThemeResolutionInput | Minimal shop shape accepted by |
ThemeTokenMeta | Metadata describing exactly one |
ThemeTokenPath | A persisted dotted theme path ( |
UserBase | Document shape for a platform user. Carries an embedded list of OAuth identities and satisfies the NextAuth adapter contract — specifically the optional |
ValueKind | The kind of value a theme token holds, driving which admin control renders for it. |
Variables
| Name | Description |
|---|---|
CommerceProviders | — |
FeatureFlag | — |
FONT_FAMILIES | Allowlist of selectable font families, keyed by a stable slug with a human-readable label. This is the single source of truth shared by the CMS |
Review | — |
SECTION_FLAG_PREFIX | Key namespace that marks a feature flag as a data-driven page-section toggle. Section flags gate whether a generic, per-shop section renders without a code deploy; the prefix lets the admin UI and key validation recognize them without a separate lookup. Lives in this Mongoose-free leaf module (not |
Shop | — |
THEME_DEFAULTS | The single source of truth for platform theme defaults. Mirrors the literal values emitted by |
THEME_TOKEN_CATALOG | The complete, declaration-ordered token catalog. Every entry mirrors exactly one |
User | — |