fe
This commit is contained in:
1 parent
6bca0ed00b
commit
7b207f2ccb
15 files changed
+204
-15
No files matched your search
@@ -23,5 +23,6 @@ export { default as JobGenerator } from "@/services/infrastructure/JobGenerator.
|
||||
|
||||
export { default as ServiceRegistry } from "@/services/system/ServiceRegistry.js";
|
||||
export { default as SettingsService } from "@/services/system/SettingsService.js";
|
||||
export { default as BillingService } from "@/services/system/BillingService.js";
|
||||
|
||||
export * from "@/services/infrastructure/NotificationServices/index.js";
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Plans, type Entitlements, type PlanKey } from "@/types/entitlements.js";
|
||||
|
||||
export interface IBillingService {
|
||||
listPlans(): Promise<Entitlements[]>;
|
||||
}
|
||||
|
||||
const SERVICE_NAME = "BillingService";
|
||||
|
||||
class BillingService implements IBillingService {
|
||||
public SERVICE_NAME: string;
|
||||
constructor() {
|
||||
this.SERVICE_NAME = SERVICE_NAME;
|
||||
}
|
||||
async listPlans(): Promise<Entitlements[]> {
|
||||
const order: PlanKey[] = ["free", "pro", "business", "enterprise"];
|
||||
return order.map((key) => Plans[key]);
|
||||
}
|
||||
}
|
||||
|
||||
export default BillingService;
|
||||
Reference in new issue
Block a user