@burdenoff/microfe-billing 2026.803.1 → 2026.815.1
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/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +97 -97
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +108 -108
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
- package/dist/billing/shared/utils/planFeatureQuantity.js +21 -1
- package/dist/billing/shared/utils/planFeatureQuantity.js.map +1 -1
- package/dist/generated/global-operations.js +2 -0
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planFeatureQuantity.js","names":[],"sources":["../../../../src/billing/shared/utils/planFeatureQuantity.ts"],"sourcesContent":["/**\n * Source of truth for \"how big is this quota on this plan\":\n * 1. Per-plan override stored on the SubscriptionFeature row's\n * `context.quantity` (autoseed + post-OSS-release createPlan path).\n * 2. Fall back to the catalog default `quota.limits.value` for plans that\n * pre-date per-plan overrides (only the autoseeded Free plan today).\n */\ntype FeatureLike = {\n context?: unknown;\n quota?: { limits?: unknown } | null;\n};\n\nexport function getPlanFeatureQuantity(feature: FeatureLike): number {\n const ctx = feature.context as { quantity?: number } | null | undefined;\n if (ctx && typeof ctx.quantity === 'number') return ctx.quantity;\n\n const limits = feature.quota?.limits as { value?: number } | null | undefined;\n return typeof limits?.value === 'number' ? limits.value : 0;\n}\n\n/**\n * The unit a quota's quantity is denominated in (e.g. \"bytes\", \"days\",\n * \"workflows\"), as seeded on the SubscriptionFeature row's `context.unit`.\n * Used to render byte-denominated quotas (storage, uploads) as MB/GB instead\n * of a raw byte count — see formatQuotaValue
|
|
1
|
+
{"version":3,"file":"planFeatureQuantity.js","names":[],"sources":["../../../../src/billing/shared/utils/planFeatureQuantity.ts"],"sourcesContent":["/**\n * Source of truth for \"how big is this quota on this plan\":\n * 1. Per-plan override stored on the SubscriptionFeature row's\n * `context.quantity` (autoseed + post-OSS-release createPlan path).\n * 2. Fall back to the catalog default `quota.limits.value` for plans that\n * pre-date per-plan overrides (only the autoseeded Free plan today).\n */\ntype FeatureLike = {\n context?: unknown;\n quota?: { name?: string | null; limits?: unknown; context?: unknown } | null;\n};\n\nexport function getPlanFeatureQuantity(feature: FeatureLike): number {\n const ctx = feature.context as { quantity?: number } | null | undefined;\n if (ctx && typeof ctx.quantity === 'number') return ctx.quantity;\n\n const limits = feature.quota?.limits as { value?: number } | null | undefined;\n return typeof limits?.value === 'number' ? limits.value : 0;\n}\n\n/**\n * The unit a quota's quantity is denominated in (e.g. \"bytes\", \"days\",\n * \"workflows\"), as seeded on the SubscriptionFeature row's `context.unit`.\n * Used to render byte-denominated quotas (storage, uploads) as MB/GB instead\n * of a raw byte count — see formatQuotaValue in format.ts.\n */\nexport function getPlanFeatureUnit(feature: FeatureLike): string | undefined {\n const ctx = feature.context as { unit?: string } | null | undefined;\n return typeof ctx?.unit === 'string' ? ctx.unit : undefined;\n}\n\n// Trailing name segments that describe the unit/cadence, not the quota\n// itself (e.g. \"fluidgrids.storage.bytes\" → the \"bytes\" segment). Stripped\n// by humanizeQuotaName so the fallback label doesn't end in a redundant\n// technical word.\nconst NAME_SUFFIX_STOPWORDS = new Set([\n 'count',\n 'bytes',\n 'days',\n 'seconds',\n 'hours',\n 'monthly',\n 'daily',\n 'concurrent',\n]);\n\n/**\n * Best-effort human label for a quota that has no seeded `displayName`\n * (older rows only — every quota seeded since BOFF-3058 carries one). Turns\n * \"fluidgrids.scheduled_triggers.count\" into \"Scheduled Triggers\": drops the\n * leading product/boundary segment and a trailing unit/cadence stopword,\n * then title-cases the rest.\n */\nexport function humanizeQuotaName(name: string): string {\n const segments = name.split('.').filter(Boolean);\n const withoutBoundary = segments.length > 1 ? segments.slice(1) : segments;\n const last = withoutBoundary[withoutBoundary.length - 1];\n const meaningful =\n withoutBoundary.length > 1 && last && NAME_SUFFIX_STOPWORDS.has(last)\n ? withoutBoundary.slice(0, -1)\n : withoutBoundary;\n\n const words = meaningful.join(' ').replace(/_/g, ' ').trim().split(/\\s+/).filter(Boolean);\n if (words.length === 0) return name;\n return words.map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(' ');\n}\n\n/**\n * The name to show a user for a quota: prefers the curated `displayName`\n * seeded on Quota.context (e.g. \"Storage\", \"Team Members\"); falls back to a\n * humanized version of the raw dotted identifier for any quota seeded before\n * displayName was added to the catalog.\n */\nexport function getQuotaDisplayName(feature: FeatureLike): string {\n const quotaContext = feature.quota?.context as { displayName?: string } | null | undefined;\n if (quotaContext && typeof quotaContext.displayName === 'string' && quotaContext.displayName) {\n return quotaContext.displayName;\n }\n\n const rawName = feature.quota?.name;\n return rawName ? humanizeQuotaName(rawName) : 'Unknown Quota';\n}\n"],"mappings":";AAYA,SAAgB,EAAuB,GAA8B;CACnE,IAAM,IAAM,EAAQ;AACpB,KAAI,KAAO,OAAO,EAAI,YAAa,SAAU,QAAO,EAAI;CAExD,IAAM,IAAS,EAAQ,OAAO;AAC9B,QAAO,OAAO,GAAQ,SAAU,WAAW,EAAO,QAAQ;;AAS5D,SAAgB,EAAmB,GAA0C;CAC3E,IAAM,IAAM,EAAQ;AACpB,QAAO,OAAO,GAAK,QAAS,WAAW,EAAI,OAAO,KAAA;;AAOpD,IAAM,IAAwB,IAAI,IAAI;CACpC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AASF,SAAgB,EAAkB,GAAsB;CACtD,IAAM,IAAW,EAAK,MAAM,IAAI,CAAC,OAAO,QAAQ,EAC1C,IAAkB,EAAS,SAAS,IAAI,EAAS,MAAM,EAAE,GAAG,GAC5D,IAAO,EAAgB,EAAgB,SAAS,IAMhD,KAJJ,EAAgB,SAAS,KAAK,KAAQ,EAAsB,IAAI,EAAK,GACjE,EAAgB,MAAM,GAAG,GAAG,GAC5B,GAEmB,KAAK,IAAI,CAAC,QAAQ,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,MAAM,CAAC,OAAO,QAAQ;AAEzF,QADI,EAAM,WAAW,IAAU,IACxB,EAAM,KAAK,MAAM,EAAE,OAAO,EAAE,CAAC,aAAa,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,IAAI;;AAS3E,SAAgB,EAAoB,GAA8B;CAChE,IAAM,IAAe,EAAQ,OAAO;AACpC,KAAI,KAAgB,OAAO,EAAa,eAAgB,YAAY,EAAa,YAC/E,QAAO,EAAa;CAGtB,IAAM,IAAU,EAAQ,OAAO;AAC/B,QAAO,IAAU,EAAkB,EAAQ,GAAG"}
|
|
@@ -405,6 +405,7 @@ var y = t`
|
|
|
405
405
|
limits
|
|
406
406
|
reusable
|
|
407
407
|
quotaType
|
|
408
|
+
context
|
|
408
409
|
}
|
|
409
410
|
}
|
|
410
411
|
itemEntitlements {
|
|
@@ -3099,6 +3100,7 @@ t`
|
|
|
3099
3100
|
quotaName: $quotaName
|
|
3100
3101
|
productId: $productId
|
|
3101
3102
|
) {
|
|
3103
|
+
assigned
|
|
3102
3104
|
limitLeft
|
|
3103
3105
|
noLimit
|
|
3104
3106
|
}
|