import { AddonManagementService } from './application/services/AddonManagementService.js'; import { MeteringService } from './application/services/MeteringService.js'; import { CreditManagementService } from './application/services/CreditManagementService.js'; import { SubscrioConfig } from './config/types.js'; import { ConfigSyncReport } from './application/dtos/ConfigSyncDto.js'; import { ProductManagementService } from './application/services/ProductManagementService.js'; import { FeatureManagementService } from './application/services/FeatureManagementService.js'; import { PlanManagementService } from './application/services/PlanManagementService.js'; import { CustomerManagementService } from './application/services/CustomerManagementService.js'; import { SubscriptionManagementService } from './application/services/SubscriptionManagementService.js'; import { BillingCycleManagementService } from './application/services/BillingCycleManagementService.js'; import { FeatureCheckerService } from './application/services/FeatureCheckerService.js'; import { StripeIntegrationService } from './application/services/StripeIntegrationService.js'; import { ConfigSyncService } from './application/services/ConfigSyncService.js'; import { HookDispatcher } from './application/hooks/HookDispatcher.js'; /** * Main Subscrio class - entry point for the library */ export declare class Subscrio { private readonly db; private readonly installer; private readonly _initialConfig?; private readonly adminPassphrase?; private readonly productRepo; private readonly featureRepo; private readonly planRepo; private readonly customerRepo; private readonly subscriptionRepo; private readonly billingCycleRepo; readonly addons: AddonManagementService; readonly metering: MeteringService; readonly credits: CreditManagementService; readonly products: ProductManagementService; readonly features: FeatureManagementService; readonly plans: PlanManagementService; readonly customers: CustomerManagementService; readonly subscriptions: SubscriptionManagementService; readonly billingCycles: BillingCycleManagementService; readonly featureChecker: FeatureCheckerService; readonly stripe: StripeIntegrationService; readonly configSync: ConfigSyncService; /** Before-mutation hooks for customers, subscriptions, and inbound Stripe events */ readonly hooks: HookDispatcher; constructor(config: SubscrioConfig); /** * Run initial config sync if initialConfig was provided to the constructor. * Call this after construction (e.g. after installSchema/verifySchema) to apply the config. * @returns The sync report, or null if no initialConfig was set */ runInitialConfigSync(): Promise; /** * Install database schema */ installSchema(adminPassphrase?: string): Promise; /** * Verify schema installation * Returns the schema version if installed, null otherwise */ verifySchema(): Promise; /** * Run pending database migrations * * Migrations are tracked via schema_version in system_config. * This method runs only pending migrations and updates the version. * * @returns Number of migrations applied */ migrate(): Promise; /** * Drop all database tables (WARNING: Destructive!). * When an admin passphrase hash exists, the passphrase must match. */ dropSchema(adminPassphrase?: string): Promise; /** * Close database connections */ close(): Promise; } //# sourceMappingURL=Subscrio.d.ts.map