mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
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>
41 lines
949 B
TypeScript
41 lines
949 B
TypeScript
import type { SeatChangeType } from "../seatBillingStrategy/ISeatBillingStrategy";
|
|
import { TeamBillingPublishResponseStatus } from "./ITeamBillingService";
|
|
import type {
|
|
ITeamBillingService,
|
|
TeamBillingInput,
|
|
TeamBillingPublishResponse,
|
|
} from "./ITeamBillingService";
|
|
|
|
export class StubTeamBillingService implements ITeamBillingService {
|
|
constructor(private team: TeamBillingInput) {}
|
|
|
|
async cancel(): Promise<void> {
|
|
// Stub implementation - no-op
|
|
}
|
|
|
|
async publish(): Promise<TeamBillingPublishResponse> {
|
|
return {
|
|
redirectUrl: null,
|
|
status: TeamBillingPublishResponseStatus.SUCCESS,
|
|
};
|
|
}
|
|
|
|
async downgrade(): Promise<void> {
|
|
// Stub implementation - no-op
|
|
}
|
|
|
|
async updateQuantity(_changeType: SeatChangeType): Promise<void> {
|
|
// Stub implementation - no-op
|
|
}
|
|
|
|
async getSubscriptionStatus() {
|
|
return null;
|
|
}
|
|
|
|
async endTrial() {
|
|
return true;
|
|
}
|
|
|
|
async saveTeamBilling() {}
|
|
}
|