Commerce Schemas

Storefront SDK is a strongly-typed project, this helps us extending the core engine in a safely manner.

Since our stack uses different Schema Definition Language (SDL), we centralized a base schema that can be transformed into different SDLs. For instance, our base schema is Mongoose SDL and our "transpiler" generates TypeScript, GraphQL, Mongoose Models and Protocol Buffer definitions.

These generated schemas are used through our core APIs, front-end and custom add ons.

Storefront SDK schemas

In order to better understand Storefront schemas, let's get a brief review on the existing ones:

Storefront

enum StorefrontStatus {
  CREATING = 'CREATING',
  RUNNING = 'RUNNING',
  PUBLISH = 'PUBLISH',
  DRAFT = 'DRAFT',
}

interface Storefront {
  name: String;
  region: String;
  status: StorefrontStatus;
  config: Record<String, any>[];
  category: String;
  categoryPositions: String;
  currency: String;
  currencyPrefix: String;
  localization: String;
  collections: String[];
  appID: String;
  jobID: String;
  endpoints: Endpoints[];
  enableOrderNote: Boolean;
  enableCustomCart: Boolean;
)

Did this page help you?