OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

marketplace.store.create

Create a new seller store.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @example.marketplace
  • Tags: marketplace, store, create
  • File: packages/examples/marketplace/src/store/store.operations.ts
  • field.key.label
    marketplace.store.create
    field.version.label
    1.0.0
    field.type.label
    operation (command)
    field.title.label
    marketplace.store.create
    field.description.label

    Create a new seller store.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @example.marketplace
  • Tags: marketplace, store, create
  • File: packages/examples/marketplace/src/store/store.operations.ts
  • field.tags.label
    marketplace,store,create
    field.owners.label
    @example.marketplace
    field.stability.label
    stable

    Create a new seller store.

    Goal

    Allow users to become sellers on the marketplace.

    Context

    Seller onboarding.

    Emitted Events

    `marketplace.store.created` (v1.0.0)

    Source Definition

    import { defineCommand } from '@lssm-tech/lib.contracts-spec/operations';
    import { CreateStoreInputModel, StoreModel } from './store.schema';
    
    export const CreateStoreContract = defineCommand({
    	meta: {
    		key: 'marketplace.store.create',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['@example.marketplace'],
    		tags: ['marketplace', 'store', 'create'],
    		description: 'Create a new seller store.',
    		goal: 'Allow users to become sellers on the marketplace.',
    		context: 'Seller onboarding.',
    	},
    	io: { input: CreateStoreInputModel, output: StoreModel },
    	policy: { auth: 'user' },
    	sideEffects: {
    		emits: [
    			{
    				key: 'marketplace.store.created',
    				version: '1.0.0',
    				when: 'Store is created',
    				payload: StoreModel,
    			},
    		],
    		audit: ['marketplace.store.created'],
    	},
    	acceptance: {
    		scenarios: [
    			{
    				key: 'create-store-happy-path',
    				given: ['User is authenticated'],
    				when: ['User creates a new store'],
    				then: ['Store is created', 'StoreCreated event is emitted'],
    			},
    		],
    		examples: [
    			{
    				key: 'create-fashion-store',
    				input: { name: 'Fashion Boutique', category: 'clothing' },
    				output: { id: 'store-123', status: 'active' },
    			},
    		],
    	},
    });