@revturbine/sdk 0.2.91 → 0.3.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/dist/headless.d.ts +36 -0
- package/dist/headless.js +2 -2
- package/dist/headless.js.map +1 -1
- package/dist/index.d.ts +36 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/web-sdk/customer-side.d.ts +36 -0
- package/dist/types/web-sdk/customer-side.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/headless.d.ts
CHANGED
|
@@ -15632,6 +15632,16 @@ declare class RevTurbineCustomerSdk {
|
|
|
15632
15632
|
private resolveAnonymousId;
|
|
15633
15633
|
private installBridge;
|
|
15634
15634
|
private installRouteTracking;
|
|
15635
|
+
/**
|
|
15636
|
+
* Merge a caller-supplied patch into the current user context.
|
|
15637
|
+
*
|
|
15638
|
+
* The single choke point every context entry point flows through
|
|
15639
|
+
* (identify / setUserContext / update / rehydrate), so it is also where the
|
|
15640
|
+
* removed `plan.id` key is rejected — see {@link rejectLegacyPlanId}.
|
|
15641
|
+
*
|
|
15642
|
+
* @param next The caller's patch.
|
|
15643
|
+
* @param verb Which entry point supplied it, for the rejection diagnostic.
|
|
15644
|
+
*/
|
|
15635
15645
|
private mergeUserContext;
|
|
15636
15646
|
private mergePageContext;
|
|
15637
15647
|
private collectPageContextIssues;
|
|
@@ -15891,6 +15901,32 @@ declare class RevTurbineCustomerSdk {
|
|
|
15891
15901
|
* nobody is reading. Never throws — a monetization SDK must not take down
|
|
15892
15902
|
* the host app over a bad key.
|
|
15893
15903
|
*/
|
|
15904
|
+
/**
|
|
15905
|
+
* Detect and reject the removed `plan.id` identity key (plan 191 Q-1).
|
|
15906
|
+
*
|
|
15907
|
+
* Plan identity is the `unique_handle`; `plan.id` was removed from the user
|
|
15908
|
+
* context. TypeScript rejects it at compile time via {@link Exact}, but a
|
|
15909
|
+
* plain-JS caller — or a stale build — passes it happily, and the failure is
|
|
15910
|
+
* SILENT and consequential: {@link resolveContextPlanRaw} finds no handle, so
|
|
15911
|
+
* the user reads as having no plan and every plan-targeted entitlement rule
|
|
15912
|
+
* quietly stops matching (fail-closed, with no signal).
|
|
15913
|
+
*
|
|
15914
|
+
* So the legacy shape is rejected rather than tolerated: the offending `id`
|
|
15915
|
+
* is stripped from the plan object, the caller gets a prod-visible console
|
|
15916
|
+
* error (once per session, mirroring
|
|
15917
|
+
* {@link reportUnrecognizedContextKeys}), and an `sdk_validation_warning`
|
|
15918
|
+
* rides the anonymous meta lane so the control plane can see integrations
|
|
15919
|
+
* still sending it.
|
|
15920
|
+
*
|
|
15921
|
+
* A plan object carrying BOTH `handle` and `id` keeps the handle — the `id`
|
|
15922
|
+
* is simply dropped, since the handle is the identity.
|
|
15923
|
+
*
|
|
15924
|
+
* @param verb Which entry point received it, for the message and dedupe key.
|
|
15925
|
+
* @param plan The caller-supplied plan object, unvalidated.
|
|
15926
|
+
* @returns The plan object with any legacy `id` removed, or the input
|
|
15927
|
+
* unchanged when it carries none.
|
|
15928
|
+
*/
|
|
15929
|
+
private rejectLegacyPlanId;
|
|
15894
15930
|
private reportUnrecognizedContextKeys;
|
|
15895
15931
|
private normalizePlacementOutput;
|
|
15896
15932
|
private validateTrialStatusShape;
|