@appcorp/fusion-storybook 0.4.69 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types/enums.d.ts CHANGED
@@ -311,12 +311,15 @@ export declare enum ACCESS_LEVEL {
311
311
  READ_WRITE = "READ_WRITE"
312
312
  }
313
313
  /**
314
- * Plan types for subscription tiers
314
+ * Canonical plan codes — single plan vocabulary across legacy Plan rows and
315
+ * regional pricing (values match Prisma `PricingPlanCode`)
315
316
  */
316
- export declare enum PLAN_TYPE {
317
- BASIC = "BASIC",
317
+ export declare enum PRICING_PLAN_CODE {
318
+ STARTER = "STARTER",
319
+ STANDARD = "STANDARD",
318
320
  PRO = "PRO",
319
- ENTERPRISE = "ENTERPRISE"
321
+ ENTERPRISE = "ENTERPRISE",
322
+ ENTERPRISE_PLUS = "ENTERPRISE_PLUS"
320
323
  }
321
324
  /**
322
325
  * Billing interval used for charging (monthly or yearly)
package/types/enums.js CHANGED
@@ -329,14 +329,17 @@ export var ACCESS_LEVEL;
329
329
  ACCESS_LEVEL["READ_WRITE"] = "READ_WRITE";
330
330
  })(ACCESS_LEVEL || (ACCESS_LEVEL = {}));
331
331
  /**
332
- * Plan types for subscription tiers
332
+ * Canonical plan codes — single plan vocabulary across legacy Plan rows and
333
+ * regional pricing (values match Prisma `PricingPlanCode`)
333
334
  */
334
- export var PLAN_TYPE;
335
- (function (PLAN_TYPE) {
336
- PLAN_TYPE["BASIC"] = "BASIC";
337
- PLAN_TYPE["PRO"] = "PRO";
338
- PLAN_TYPE["ENTERPRISE"] = "ENTERPRISE";
339
- })(PLAN_TYPE || (PLAN_TYPE = {}));
335
+ export var PRICING_PLAN_CODE;
336
+ (function (PRICING_PLAN_CODE) {
337
+ PRICING_PLAN_CODE["STARTER"] = "STARTER";
338
+ PRICING_PLAN_CODE["STANDARD"] = "STANDARD";
339
+ PRICING_PLAN_CODE["PRO"] = "PRO";
340
+ PRICING_PLAN_CODE["ENTERPRISE"] = "ENTERPRISE";
341
+ PRICING_PLAN_CODE["ENTERPRISE_PLUS"] = "ENTERPRISE_PLUS";
342
+ })(PRICING_PLAN_CODE || (PRICING_PLAN_CODE = {}));
340
343
  /**
341
344
  * Billing interval used for charging (monthly or yearly)
342
345
  */
@@ -4,7 +4,7 @@
4
4
  * This file contains TypeScript interfaces for user, workspace, role,
5
5
  * permission, plan, school, and campus domain models.
6
6
  */
7
- import { USER_ROLE, ACCESS_LEVEL, CURRENCY, BILLING_INTERVAL, PLAN_TYPE } from "./enums";
7
+ import { USER_ROLE, ACCESS_LEVEL, CURRENCY, BILLING_INTERVAL, PRICING_PLAN_CODE } from "./enums";
8
8
  import type { AdmissionBE } from "./admission";
9
9
  import type { AttendanceBE, ClassBE, CourseBE, EnrollmentBE, FamilyBE, GradeBE, ScheduleBE, SectionBE, SubjectBE, TeacherBE } from "./academics";
10
10
  import type { ExpenseBE, FeeStructureBE, DiscountCodeBE, StudentFeeBE } from "./finance";
@@ -27,7 +27,7 @@ export interface PlanBE {
27
27
  priceMonthly: number;
28
28
  priceYearly: number;
29
29
  storageLimitMB: number;
30
- type: PLAN_TYPE;
30
+ type: PRICING_PLAN_CODE;
31
31
  updatedAt: string;
32
32
  workspaces?: WorkspaceBE[];
33
33
  }
@@ -37,7 +37,8 @@ export interface PlanBE {
37
37
  */
38
38
  export interface WorkspaceBE {
39
39
  agreedCurrency: CURRENCY;
40
- agreedPrice: number;
40
+ /** Prisma `Decimal` — serialised as a string by JSON. */
41
+ agreedPrice: number | string;
41
42
  billingDate: number;
42
43
  billingInterval: BILLING_INTERVAL;
43
44
  classesCount: number;
@@ -167,10 +167,11 @@ export function resolveRbacPermissions({ userRole, moduleName, }) {
167
167
  }
168
168
  // dashboard footer
169
169
  if (moduleName === "Workspace") {
170
+ // Workspace settings expose billing and encrypted secrets — admins only.
170
171
  return ({
171
172
  [USER_ROLE.SUPER_ADMIN]: true,
172
173
  [USER_ROLE.SCHOOL_ADMIN]: true,
173
- [USER_ROLE.STAFF]: true,
174
+ [USER_ROLE.STAFF]: false,
174
175
  [USER_ROLE.TEACHER]: false,
175
176
  [USER_ROLE.STUDENT]: false,
176
177
  [USER_ROLE.PARENT]: false,