f4abbb2de1
* factory and statergie * chore: use correct method of DI * feat: add onchagne * add logic to HWM stat * add webhook resolver methods to each statergy * move seat tracking + webhooks over to own statergy * Move to factory base approach * move logic to correct class * rename create -> createByTeamId * fix: remove debug `true ||` overrides from IS_STRIPE_ENABLED and IS_TEAM_BILLING_ENABLED Remove accidentally committed debug overrides that short-circuited IS_STRIPE_ENABLED and IS_TEAM_BILLING_ENABLED to always be true, bypassing Stripe credential checks. This would break self-hosted instances without Stripe configured. Identified by cubic (https://cubic.dev) Co-Authored-By: unknown <> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
28 lines
975 B
TypeScript
28 lines
975 B
TypeScript
import { bindModuleToClassOnToken, createModule, type ModuleLoader } from "@calcom/features/di/di";
|
|
import { moduleLoader as featuresRepositoryModuleLoader } from "@calcom/features/di/modules/FeaturesRepository";
|
|
import { BillingPeriodService } from "@calcom/features/ee/billing/service/billingPeriod/BillingPeriodService";
|
|
import { DI_TOKENS } from "../tokens";
|
|
import { billingPeriodRepositoryModuleLoader } from "./BillingPeriodRepository";
|
|
|
|
const thisModule = createModule();
|
|
const token = DI_TOKENS.BILLING_PERIOD_SERVICE;
|
|
const moduleToken = DI_TOKENS.BILLING_PERIOD_SERVICE_MODULE;
|
|
|
|
const loadModule = bindModuleToClassOnToken({
|
|
module: thisModule,
|
|
moduleToken,
|
|
token,
|
|
classs: BillingPeriodService,
|
|
depsMap: {
|
|
repository: billingPeriodRepositoryModuleLoader,
|
|
featuresRepository: featuresRepositoryModuleLoader,
|
|
},
|
|
});
|
|
|
|
export const billingPeriodServiceModuleLoader: ModuleLoader = {
|
|
token,
|
|
loadModule,
|
|
};
|
|
|
|
export type { BillingPeriodService };
|