- Add /trading and /admin named Socket.IO namespaces; root namespace kept for backward compat; admin namespace rejects non-admins at connect time - Wire auditRepository.ts: persist TradeAuditEvent to Cosmos audit-events container (best-effort); expose GET /api/admin/audit for admin queries - Add tradingTelemetry singleton (Node.js Map-based storage adapter); init and fatal-error tracking wired in index.ts main() - Add TAB_MARKETPLACE_ENABLED / TAB_MEMBERSHIP_ENABLED config flags; expose tabs.* shape in GET /api/feature-flags response - Fix SupabaseService URL validation (regex check before createClient) - Wire check:api-contract and check:audit-repository into npm run test - Switch @bytelyst/* deps to file:../vendor/* references Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
841 B
TypeScript
32 lines
841 B
TypeScript
export const BACKTEST_FLAG_KEYS = {
|
|
ENABLE_BACKTEST: 'ENABLE_BACKTEST',
|
|
BACKTEST_CUSTOMER_ENABLED: 'BACKTEST_CUSTOMER_ENABLED',
|
|
} as const;
|
|
|
|
export const TAB_FLAG_KEYS = {
|
|
MARKETPLACE: 'TAB_MARKETPLACE_ENABLED',
|
|
MEMBERSHIP: 'TAB_MEMBERSHIP_ENABLED',
|
|
} as const;
|
|
|
|
export interface BacktestFeatureFlags {
|
|
enableBacktest: boolean;
|
|
customerEnabled: boolean;
|
|
maxCsvBytes?: number;
|
|
maxRows?: number;
|
|
}
|
|
|
|
/**
|
|
* Controls which optional web/mobile tabs are visible for non-admin users.
|
|
* Admin accounts always see all tabs regardless of these flags.
|
|
* All fields default to true (opt-out model via env: TAB_MARKETPLACE_ENABLED=false).
|
|
*/
|
|
export interface TabFeatureFlags {
|
|
marketplace: boolean;
|
|
membership: boolean;
|
|
}
|
|
|
|
export interface TradingFeatureFlagsResponse {
|
|
backtest: BacktestFeatureFlags;
|
|
tabs: TabFeatureFlags;
|
|
}
|