sinfactura-types 1.10.375 → 1.10.376

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.
@@ -85,7 +85,7 @@ declare global {
85
85
  * quietly missing a feature), but it means the caller must be updated in the
86
86
  * same change. Adding a key is never only additive downstream.
87
87
  */
88
- type FeatureKey = 'maxOrdersMonth' | 'maxInvoicesMonth' | 'maxProducts' | 'maxUsers' | 'maxCustomers' | 'maxStores' | 'priceListsMax' | 'afipInvoicing' | 'suppliers' | 'domesticPayments' | 'stripePayments' | 'cashManagement' | 'multiStore' | 'importExport' | 'advancedReports' | 'customBranding' | 'prioritySupport' | 'whatsappCommerce' | 'aiFeatures' | 'mobileApp' | 'customDomain' | 'advancedPricing' | 'marketplaceChannels' | 'storefront' | 'loyalty' | 'marketing' | 'mandatory2fa';
88
+ type FeatureKey = 'maxOrdersMonth' | 'maxInvoicesMonth' | 'maxProducts' | 'maxUsers' | 'maxCustomers' | 'maxStores' | 'maxWarehouses' | 'priceListsMax' | 'afipInvoicing' | 'suppliers' | 'domesticPayments' | 'stripePayments' | 'cashManagement' | 'multiStore' | 'importExport' | 'advancedReports' | 'customBranding' | 'prioritySupport' | 'whatsappCommerce' | 'aiFeatures' | 'mobileApp' | 'customDomain' | 'advancedPricing' | 'marketplaceChannels' | 'storefront' | 'loyalty' | 'marketing' | 'mandatory2fa';
89
89
  /** Resolved entitlements for a specific tenant (matrix + overrides applied). */
90
90
  type ResolvedEntitlements = Record<FeatureKey, Entitlement>;
91
91
  /**
@@ -115,8 +115,15 @@ declare global {
115
115
  type: EntitlementType;
116
116
  enabled?: boolean;
117
117
  limit?: number;
118
- source: 'plan' | 'override';
118
+ source: EntitlementSource;
119
119
  }
120
+ /**
121
+ * Which scope set an entitlement: the tier's plan grant, or a per-store
122
+ * `OVERRIDE#` row. It reaches the wire as `source` on every
123
+ * `PLAN_LIMIT_EXCEEDED` / feature refusal, where `'override'` means no plan
124
+ * change lifts the block, so an upgrade prompt would be dishonest.
125
+ */
126
+ type EntitlementSource = 'plan' | 'override';
120
127
  /**
121
128
  * What a tenant actually gets once plan defaults and overrides are merged —
122
129
  * the resolver's entire return value, not just its feature map. The tier and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.10.375",
3
+ "version": "1.10.376",
4
4
  "description": "Shared wire and entity contracts for the SINFACTURA platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",