@revturbine/sdk 0.10.2 → 0.10.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/CHANGELOG.md CHANGED
@@ -47,6 +47,36 @@ also require a changelog entry.
47
47
 
48
48
  ---
49
49
 
50
+ ## 0.10.3
51
+
52
+ ### The Rust port gains the decision surfaces Python already shipped (BL-0145)
53
+
54
+ **What changed.** `RevTurbineCustomerSdk` on the Rust port (`revturbine`,
55
+ crates.io) now exposes the same decision surfaces the Python port exposes.
56
+ Nothing on the TypeScript or Python side changes; this is a Rust-only,
57
+ purely additive release.
58
+
59
+ | Added | Shape |
60
+ |---|---|
61
+ | `RevTurbineCustomerSdk::can(handle, context)` | The advertised alias of `check_entitlement`, matching the scaffold SDK function surface (canonical `checkEntitlement`, alias `can`). |
62
+ | `RevTurbineCustomerSdk::get_eligible_plans()` | `Vec<EligiblePlan>` — public, segment-eligible plan variations. |
63
+ | `RevTurbineCustomerSdk::get_eligible_addons()` | `Vec<EligibleAddon>` — the add-on twin. |
64
+ | `RevTurbineCustomerSdk::evaluate_trial_status(instances, now_iso, base_plan_handle, usage_balances)` | `TrialEvaluation`, reading `free_trial_rules` / `reverse_trial_rules` from the constructed Playbook. |
65
+ | `revturbine::format_currency_minor_units(amount, currency, locale)` | Free function, because Python exposes it as a module function. |
66
+ | `revturbine::plans` | New module carrying the catalog eligibility port and the formatter. |
67
+ | `UserContext::segment_ids` | Pre-resolved segment ids the catalog methods match against. |
68
+
69
+ `UserContext` gains a field but derives `Default`, so existing construction
70
+ with `..Default::default()` keeps compiling.
71
+
72
+ **Why it was invisible.** The cross-language parity gate was green on the
73
+ catalog and currency scenarios only because the Rust parity runner
74
+ *reimplemented* `eligible_catalog` and `format_currency_minor_units` inline
75
+ rather than calling the crate — so the comparison never touched shipped code,
76
+ and the crate could lack the capability entirely without a single fixture
77
+ going red. The runner now calls `revturbine::plans`, and the inline copies are
78
+ deleted; all 102 comparisons stay byte-identical.
79
+
50
80
  ## 0.10.2
51
81
 
52
82
  ### Local mode resolves placements by slot id (BL-0119)