@aglyn/plugins-commerce 1.7.0 → 1.9.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/plugins-commerce",
3
- "version": "1.7.0",
3
+ "version": "1.9.0",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -25,18 +25,18 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/aglyn": "1.7.0",
29
- "@aglyn/shared-data-mdi": "1.7.0",
30
- "@aglyn/shared-ui-jsx": "1.7.0",
31
- "@aglyn/shared-ui-next": "1.7.0",
32
- "@aglyn/shared-ui-snackstack": "1.7.0",
33
- "@aglyn/shared-util-email": "1.7.0",
34
- "@aglyn/shared-util-http": "1.7.0",
35
- "@aglyn/shared-util-timestamp": "1.7.0",
36
- "@aglyn/shared-util-tools": "1.7.0",
37
- "@aglyn/tenant-data-admin": "1.7.0",
38
- "@aglyn/tenant-feature-instance": "1.7.0",
39
- "@aglyn/tenant-runtime": "1.7.0",
28
+ "@aglyn/aglyn": "1.9.0",
29
+ "@aglyn/shared-data-mdi": "1.9.0",
30
+ "@aglyn/shared-ui-jsx": "1.9.0",
31
+ "@aglyn/shared-ui-next": "1.9.0",
32
+ "@aglyn/shared-ui-snackstack": "1.9.0",
33
+ "@aglyn/shared-util-email": "1.9.0",
34
+ "@aglyn/shared-util-http": "1.9.0",
35
+ "@aglyn/shared-util-timestamp": "1.9.0",
36
+ "@aglyn/shared-util-tools": "1.9.0",
37
+ "@aglyn/tenant-data-admin": "1.9.0",
38
+ "@aglyn/tenant-feature-instance": "1.9.0",
39
+ "@aglyn/tenant-runtime": "1.9.0",
40
40
  "@stripe/react-stripe-js": "^6.12.0",
41
41
  "@stripe/stripe-js": "^9.17.0",
42
42
  "@swc/helpers": "0.5.23",
@@ -31,5 +31,12 @@ declare module '@aglyn/aglyn/plugin-manager/plugin-entitlement-keys' {
31
31
  commerceAnalytics?: boolean;
32
32
  }
33
33
  }
34
- /** Commerce's plan gates, for the manifest generator. */
34
+ /**
35
+ * Commerce's plan gates, for the manifest generator.
36
+ *
37
+ * Recurring billing, paid memberships and gift cards start at Pro since
38
+ * pricing v4 (2026-11-03, AGL-4126): every Business feature moved into Pro at
39
+ * no charge, and the 3% digital fee is their usage price. `FROM_BUSINESS`
40
+ * stays the shape a retired plan reads.
41
+ */
35
42
  export declare function commercePlanEntitlements(): PluginPlanEntitlementsDeclaration;
@@ -29,18 +29,25 @@ import { _ as _extends } from "@swc/helpers/_/_extends";
29
29
  /** Pro and up. */ const FROM_PRO = _extends({}, FROM_BUSINESS, {
30
30
  pro: true
31
31
  });
32
- /** Commerce's plan gates, for the manifest generator. */ export function commercePlanEntitlements() {
32
+ /**
33
+ * Commerce's plan gates, for the manifest generator.
34
+ *
35
+ * Recurring billing, paid memberships and gift cards start at Pro since
36
+ * pricing v4 (2026-11-03, AGL-4126): every Business feature moved into Pro at
37
+ * no charge, and the 3% digital fee is their usage price. `FROM_BUSINESS`
38
+ * stays the shape a retired plan reads.
39
+ */ export function commercePlanEntitlements() {
33
40
  return {
34
41
  features: [
35
42
  {
36
43
  key: 'storefrontSubscriptions',
37
44
  label: 'Storefront subscriptions',
38
- byPlan: FROM_BUSINESS
45
+ byPlan: FROM_PRO
39
46
  },
40
47
  {
41
48
  key: 'giftCards',
42
49
  label: 'Gift cards',
43
- byPlan: FROM_BUSINESS
50
+ byPlan: FROM_PRO
44
51
  },
45
52
  {
46
53
  key: 'commerceAnalytics',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../libs/plugins/commerce/src/lib/plan-entitlements.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Types only: the manifest generator loads this module on its own to compile\n// the plan figures, so nothing here may reach a core module at runtime.\nimport type { OrgPlan } from '@aglyn/aglyn/foundation/definitions/org-billing.types'\nimport type { PluginPlanEntitlementsDeclaration } from '@aglyn/aglyn/plugin-manager/plugin-plan-entitlements'\n\n/**\n * COMMERCE'S PLAN GATES (AGL-3080): the storefront features that start above\n * the entry tiers. Compiled into core's `PLAN_ENTITLEMENTS` by the manifest\n * generator (`register.planEntitlements`), so the plan comparison and every\n * gate read the answers they always have.\n */\ndeclare module '@aglyn/aglyn/plugin-manager/plugin-entitlement-keys' {\n interface PluginEntitlementFeatures {\n /** Recurring storefront subscription products (AGL-303). */\n storefrontSubscriptions?: boolean\n /** Gift cards & store credit (AGL-322). */\n giftCards?: boolean\n /** Commerce analytics dashboard (AGL-327). */\n commerceAnalytics?: boolean\n }\n}\n\n/** Business and up. */\nconst FROM_BUSINESS: Readonly<Record<OrgPlan, boolean>> = {\n free: false,\n starter: false,\n pro: false,\n business: true,\n scale: true,\n advanced: true,\n agency: true,\n enterprise: true,\n}\n\n/** Pro and up. */\nconst FROM_PRO: Readonly<Record<OrgPlan, boolean>> = {\n ...FROM_BUSINESS,\n pro: true,\n}\n\n/** Commerce's plan gates, for the manifest generator. */\nexport function commercePlanEntitlements(): PluginPlanEntitlementsDeclaration {\n return {\n features: [\n {\n key: 'storefrontSubscriptions',\n label: 'Storefront subscriptions',\n byPlan: FROM_BUSINESS,\n },\n { key: 'giftCards', label: 'Gift cards', byPlan: FROM_BUSINESS },\n {\n key: 'commerceAnalytics',\n label: 'Commerce analytics',\n byPlan: FROM_PRO,\n },\n ],\n }\n}\n"],"names":["FROM_BUSINESS","free","starter","pro","business","scale","advanced","agency","enterprise","FROM_PRO","commercePlanEntitlements","features","key","label","byPlan"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,6EAA6E;AAC7E,wEAAwE;;AAqBxE,qBAAqB,GACrB,MAAMA,gBAAoD;IACxDC,MAAM;IACNC,SAAS;IACTC,KAAK;IACLC,UAAU;IACVC,OAAO;IACPC,UAAU;IACVC,QAAQ;IACRC,YAAY;AACd;AAEA,gBAAgB,GAChB,MAAMC,WAA+C,aAChDT;IACHG,KAAK;;AAGP,uDAAuD,GACvD,OAAO,SAASO;IACd,OAAO;QACLC,UAAU;YACR;gBACEC,KAAK;gBACLC,OAAO;gBACPC,QAAQd;YACV;YACA;gBAAEY,KAAK;gBAAaC,OAAO;gBAAcC,QAAQd;YAAc;YAC/D;gBACEY,KAAK;gBACLC,OAAO;gBACPC,QAAQL;YACV;SACD;IACH;AACF"}
1
+ {"version":3,"sources":["../../../../../../libs/plugins/commerce/src/lib/plan-entitlements.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Types only: the manifest generator loads this module on its own to compile\n// the plan figures, so nothing here may reach a core module at runtime.\nimport type { OrgPlan } from '@aglyn/aglyn/foundation/definitions/org-billing.types'\nimport type { PluginPlanEntitlementsDeclaration } from '@aglyn/aglyn/plugin-manager/plugin-plan-entitlements'\n\n/**\n * COMMERCE'S PLAN GATES (AGL-3080): the storefront features that start above\n * the entry tiers. Compiled into core's `PLAN_ENTITLEMENTS` by the manifest\n * generator (`register.planEntitlements`), so the plan comparison and every\n * gate read the answers they always have.\n */\ndeclare module '@aglyn/aglyn/plugin-manager/plugin-entitlement-keys' {\n interface PluginEntitlementFeatures {\n /** Recurring storefront subscription products (AGL-303). */\n storefrontSubscriptions?: boolean\n /** Gift cards & store credit (AGL-322). */\n giftCards?: boolean\n /** Commerce analytics dashboard (AGL-327). */\n commerceAnalytics?: boolean\n }\n}\n\n/** Business and up. */\nconst FROM_BUSINESS: Readonly<Record<OrgPlan, boolean>> = {\n free: false,\n starter: false,\n pro: false,\n business: true,\n scale: true,\n advanced: true,\n agency: true,\n enterprise: true,\n}\n\n/** Pro and up. */\nconst FROM_PRO: Readonly<Record<OrgPlan, boolean>> = {\n ...FROM_BUSINESS,\n pro: true,\n}\n\n/**\n * Commerce's plan gates, for the manifest generator.\n *\n * Recurring billing, paid memberships and gift cards start at Pro since\n * pricing v4 (2026-11-03, AGL-4126): every Business feature moved into Pro at\n * no charge, and the 3% digital fee is their usage price. `FROM_BUSINESS`\n * stays the shape a retired plan reads.\n */\nexport function commercePlanEntitlements(): PluginPlanEntitlementsDeclaration {\n return {\n features: [\n {\n key: 'storefrontSubscriptions',\n label: 'Storefront subscriptions',\n byPlan: FROM_PRO,\n },\n { key: 'giftCards', label: 'Gift cards', byPlan: FROM_PRO },\n {\n key: 'commerceAnalytics',\n label: 'Commerce analytics',\n byPlan: FROM_PRO,\n },\n ],\n }\n}\n"],"names":["FROM_BUSINESS","free","starter","pro","business","scale","advanced","agency","enterprise","FROM_PRO","commercePlanEntitlements","features","key","label","byPlan"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,6EAA6E;AAC7E,wEAAwE;;AAqBxE,qBAAqB,GACrB,MAAMA,gBAAoD;IACxDC,MAAM;IACNC,SAAS;IACTC,KAAK;IACLC,UAAU;IACVC,OAAO;IACPC,UAAU;IACVC,QAAQ;IACRC,YAAY;AACd;AAEA,gBAAgB,GAChB,MAAMC,WAA+C,aAChDT;IACHG,KAAK;;AAGP;;;;;;;CAOC,GACD,OAAO,SAASO;IACd,OAAO;QACLC,UAAU;YACR;gBACEC,KAAK;gBACLC,OAAO;gBACPC,QAAQL;YACV;YACA;gBAAEG,KAAK;gBAAaC,OAAO;gBAAcC,QAAQL;YAAS;YAC1D;gBACEG,KAAK;gBACLC,OAAO;gBACPC,QAAQL;YACV;SACD;IACH;AACF"}