@accounter/server
Version:
Accounter GraphQL server
42 lines (41 loc) • 1.27 kB
TypeScript
import type { UseCaseSpec } from '../../fixtures/fixture-spec.js';
/**
* Central registry of all demo use-cases organized by category.
*
* Each category contains an array of use-case specifications that will be
* seeded into the staging environment. Use-cases are processed in the order
* they appear in each category array.
*
* @example
* ```typescript
* // Adding a new use-case:
* import { monthlyExpense } from './expenses/monthly-expense.js';
*
* export const USE_CASE_REGISTRY: Record<string, UseCaseSpec[]> = {
* expenses: [monthlyExpense],
* income: [],
* equity: [],
* };
* ```
*/
export declare const USE_CASE_REGISTRY: Record<string, UseCaseSpec[]>;
/**
* Get all registered use-cases across all categories.
*
* This function flattens the registry into a single array, maintaining
* the order: expenses first, then income, then equity (based on object
* key insertion order).
*
* @returns Array of all use-case specifications
*
* @example
* ```typescript
* const allUseCases = getAllUseCases();
* console.log(`Total use-cases: ${allUseCases.length}`);
*
* allUseCases.forEach(useCase => {
* console.log(`${useCase.category}: ${useCase.name}`);
* });
* ```
*/
export declare function getAllUseCases(): UseCaseSpec[];