@i4e/invest4edu-access-core 0.26.1 → 0.28.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": "@i4e/invest4edu-access-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Shared access-control primitives for NeoFindesk: tenant keystone, role capabilities, reportee tree, feature flags, and the unified access engine (registry schema, snapshot resolver, visibleWhen).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -63,6 +63,14 @@ export function canTransition(from, to) {
|
|
|
63
63
|
export const SUBSCRIPTION_EVENT_TYPES = Object.freeze([
|
|
64
64
|
"created", "trial_started", "activated", "renewed",
|
|
65
65
|
"plan_changed", "cycle_changed", "period_extended",
|
|
66
|
+
/**
|
|
67
|
+
* A term cut short by hand. Its own type rather than a negative `period_extended`, because the
|
|
68
|
+
* two raise opposite money questions — one leaves us owing product, the other owing money — and
|
|
69
|
+
* a stream where they look alike cannot be read for either.
|
|
70
|
+
*/
|
|
71
|
+
"period_shortened",
|
|
72
|
+
/** Somebody looked at a raised billing question and closed it. */
|
|
73
|
+
"billing_review_cleared",
|
|
66
74
|
"override_set", "override_removed",
|
|
67
75
|
"status_changed", "cancelled", "blocked", "expired",
|
|
68
76
|
"payment_captured", "payment_failed",
|
|
@@ -70,6 +78,15 @@ export const SUBSCRIPTION_EVENT_TYPES = Object.freeze([
|
|
|
70
78
|
// Consumption that happened outside the software — a webinar attended, a VPD session held.
|
|
71
79
|
// There is no request behind it, so this event is the only record of who said it happened.
|
|
72
80
|
"usage_recorded",
|
|
81
|
+
/**
|
|
82
|
+
* Credits handed out by an admin, rather than bought or rolled over.
|
|
83
|
+
*
|
|
84
|
+
* It used to be recorded as `override_set`, which made the history unreadable at exactly the
|
|
85
|
+
* moment it mattered: a one-off top-up and a permanent change to somebody's per-period allowance
|
|
86
|
+
* are different promises, and "who gave this partner 500 credits" cannot be answered by a stream
|
|
87
|
+
* where both look identical.
|
|
88
|
+
*/
|
|
89
|
+
"credits_granted",
|
|
73
90
|
/**
|
|
74
91
|
* A term closed with credits unspent and the plan's policy carried them forward. Worth its own
|
|
75
92
|
* type because a customer WILL ask why their balance is bigger than their allowance, and the
|