@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/index.d.ts CHANGED
@@ -15725,6 +15725,16 @@ declare class RevTurbineCustomerSdk {
15725
15725
  private resolveAnonymousId;
15726
15726
  private installBridge;
15727
15727
  private installRouteTracking;
15728
+ /**
15729
+ * Merge a caller-supplied patch into the current user context.
15730
+ *
15731
+ * The single choke point every context entry point flows through
15732
+ * (identify / setUserContext / update / rehydrate), so it is also where the
15733
+ * removed `plan.id` key is rejected — see {@link rejectLegacyPlanId}.
15734
+ *
15735
+ * @param next The caller's patch.
15736
+ * @param verb Which entry point supplied it, for the rejection diagnostic.
15737
+ */
15728
15738
  private mergeUserContext;
15729
15739
  private mergePageContext;
15730
15740
  private collectPageContextIssues;
@@ -15984,6 +15994,32 @@ declare class RevTurbineCustomerSdk {
15984
15994
  * nobody is reading. Never throws — a monetization SDK must not take down
15985
15995
  * the host app over a bad key.
15986
15996
  */
15997
+ /**
15998
+ * Detect and reject the removed `plan.id` identity key (plan 191 Q-1).
15999
+ *
16000
+ * Plan identity is the `unique_handle`; `plan.id` was removed from the user
16001
+ * context. TypeScript rejects it at compile time via {@link Exact}, but a
16002
+ * plain-JS caller — or a stale build — passes it happily, and the failure is
16003
+ * SILENT and consequential: {@link resolveContextPlanRaw} finds no handle, so
16004
+ * the user reads as having no plan and every plan-targeted entitlement rule
16005
+ * quietly stops matching (fail-closed, with no signal).
16006
+ *
16007
+ * So the legacy shape is rejected rather than tolerated: the offending `id`
16008
+ * is stripped from the plan object, the caller gets a prod-visible console
16009
+ * error (once per session, mirroring
16010
+ * {@link reportUnrecognizedContextKeys}), and an `sdk_validation_warning`
16011
+ * rides the anonymous meta lane so the control plane can see integrations
16012
+ * still sending it.
16013
+ *
16014
+ * A plan object carrying BOTH `handle` and `id` keeps the handle — the `id`
16015
+ * is simply dropped, since the handle is the identity.
16016
+ *
16017
+ * @param verb Which entry point received it, for the message and dedupe key.
16018
+ * @param plan The caller-supplied plan object, unvalidated.
16019
+ * @returns The plan object with any legacy `id` removed, or the input
16020
+ * unchanged when it carries none.
16021
+ */
16022
+ private rejectLegacyPlanId;
15987
16023
  private reportUnrecognizedContextKeys;
15988
16024
  private normalizePlacementOutput;
15989
16025
  private validateTrialStatusShape;