import { ModuleRef } from "@nestjs/core"; import { AppLoggingService } from "../../../core/logging/services/logging.service"; import { CompanyRepository } from "../../company/repositories/company.repository"; import { CompanyService } from "../../company/services/company.service"; /** * TrialService * * Orchestrates 14-day trial subscription creation for new user signups. * Creates Stripe customer, subscription with trial period, and allocates tokens. * * Key Features: * - Database-driven trial price selection (isTrial: true) * - Creates Stripe customer and subscription * - Allocates tokens from trial price configuration * - Graceful error handling (doesn't block registration) * * @example * ```typescript * await trialService.startTrial({ * companyId: 'company_123', * userId: 'user_456', * }); * ``` */ export declare class TrialService { private readonly moduleRef; private readonly companyRepository; private readonly companyService; private readonly logger; constructor(moduleRef: ModuleRef, companyRepository: CompanyRepository, companyService: CompanyService, logger: AppLoggingService); /** * Lazily get Stripe services via ModuleRef to avoid circular dependencies. * Stripe modules form a complex circular chain that can't be resolved with forwardRef alone. */ private get stripeCustomerAdminService(); private get stripeSubscriptionAdminService(); private get stripePriceRepository(); private get stripeCustomerRepository(); /** * Start a 14-day trial for a new company * * Creates Stripe customer and subscription with trial period. * Allocates tokens from the trial price configuration. * * @param params - Trial parameters * @param params.companyId - Company identifier * @param params.userId - User identifier (for customer creation) * @returns Promise that resolves when trial is started * * @example * ```typescript * await trialService.startTrial({ * companyId: 'company_123', * userId: 'user_456', * }); * ``` */ startTrial(params: { companyId: string; userId: string; }): Promise; } //# sourceMappingURL=trial.service.d.ts.map