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.

saas.billing.subscription.get

Get organization subscription status.

  • Type: operation (query)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @example.saas-boilerplate
  • Tags: saas, billing, subscription
  • File: packages/examples/saas-boilerplate/src/billing/billing.operations.ts
  • field.key.label
    saas.billing.subscription.get
    field.version.label
    1.0.0
    field.type.label
    operation (query)
    field.title.label
    saas.billing.subscription.get
    field.description.label

    Get organization subscription status.

  • Type: operation (query)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @example.saas-boilerplate
  • Tags: saas, billing, subscription
  • File: packages/examples/saas-boilerplate/src/billing/billing.operations.ts
  • field.tags.label
    saas,billing,subscription
    field.owners.label
    @example.saas-boilerplate
    field.stability.label
    stable

    Get organization subscription status.

    Goal

    Show current plan and billing status.

    Context

    Billing page, plan upgrade prompts.

    Source Definition

    import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
    import {
    	CheckFeatureAccessInputModel,
    	CheckFeatureAccessOutputModel,
    	GetUsageSummaryInputModel,
    	GetUsageSummaryOutputModel,
    	RecordUsageInputModel,
    	RecordUsageOutputModel,
    	SubscriptionModel,
    	UsageRecordedPayloadModel,
    } from './billing.schema';
    
    export const GetSubscriptionContract = defineQuery({
    	meta: {
    		key: 'saas.billing.subscription.get',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['@example.saas-boilerplate'],
    		tags: ['saas', 'billing', 'subscription'],
    		description: 'Get organization subscription status.',
    		goal: 'Show current plan and billing status.',
    		context: 'Billing page, plan upgrade prompts.',
    	},
    	io: {
    		input: null,
    		output: SubscriptionModel,
    	},
    	policy: {
    		auth: 'user',
    	},
    	acceptance: {
    		scenarios: [
    			{
    				key: 'get-subscription-happy-path',
    				given: ['Organization has active subscription'],
    				when: ['User requests subscription status'],
    				then: ['Subscription details are returned'],
    			},
    		],
    		examples: [
    			{
    				key: 'get-basic',
    				input: null,
    				output: {
    					plan: 'pro',
    					status: 'active',
    					currentPeriodEnd: '2025-02-01T00:00:00Z',
    				},
    			},
    		],
    	},
    });