@revturbine/sdk 0.11.20 → 0.11.21
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 +30 -0
- package/dist/headless.d.ts +5 -7
- package/dist/headless.js +2 -2
- package/dist/headless.js.map +1 -1
- package/dist/index.d.ts +5 -7
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/web-sdk/customer-side.d.ts +5 -7
- package/dist/types/web-sdk/customer-side.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -47,6 +47,36 @@ also require a changelog entry.
|
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
50
|
+
## 0.11.21
|
|
51
|
+
|
|
52
|
+
### `getPlacement` is a pure function of (user context, Playbook) (D-39, BL-0379)
|
|
53
|
+
|
|
54
|
+
**What changed.** Behaviour change in the browser SDK; no signature changes.
|
|
55
|
+
|
|
56
|
+
- **One decision path.** `getPlacement(config)` resolves the Playbook's
|
|
57
|
+
authored slot through the same decision path as `getPlacementDecision` and
|
|
58
|
+
the server SDKs' `get_placement` / `LocalRuntime.getPlacement`. 0.11.20 first
|
|
59
|
+
consulted a lane of previously decided or seeded outputs and ranked them with
|
|
60
|
+
a separate selection layer (category bucket, urgency, score), so it could
|
|
61
|
+
return a different placement than the decision path for the same user.
|
|
62
|
+
- **Always current.** Each call reflects the current user context; the only
|
|
63
|
+
caching is the decision path's own memo keyed by the request and context.
|
|
64
|
+
- **`getPlacementContent`** in local-only mode now decides through the same
|
|
65
|
+
path instead of reading seeded outputs.
|
|
66
|
+
- **Deprecated, ignored:** `localRuntime.initialData.placementsByLookupKey`
|
|
67
|
+
(warns once when supplied). Author placements in `localRuntime.playbook`, or
|
|
68
|
+
implement the `getPlacement` resolver for a custom source. The field, and
|
|
69
|
+
core's `resolveLocalPlacementFromCandidates` selection helper, are removed in
|
|
70
|
+
0.12.0 (BL-0167).
|
|
71
|
+
- **Live design partner:** an integration that seeded placement outputs, or
|
|
72
|
+
relied on the old cached ranking, now sees the Playbook's decision.
|
|
73
|
+
|
|
74
|
+
**Landed in** 0.11.21. **Fail-closed in** 0.11.21.
|
|
75
|
+
|
|
76
|
+
**Proving tests.** `web-sdk/pure-getplacement.test.ts` (browser `getPlacement`
|
|
77
|
+
equals the server runtime for the same inputs; reflects a changed user
|
|
78
|
+
context; ignores seeded outputs); `web-sdk/customer-side-fixed-only.test.ts`.
|
|
79
|
+
|
|
50
80
|
## 0.11.20
|
|
51
81
|
|
|
52
82
|
### One entitlement answer for browser and server, with Entitlement Mirroring; Access Gates only fire while denied (D-60, D-61)
|
package/dist/headless.d.ts
CHANGED
|
@@ -31522,6 +31522,11 @@ interface RevTurbineEventBatchingOptions {
|
|
|
31522
31522
|
}
|
|
31523
31523
|
interface RevTurbineLocalRuntimeData {
|
|
31524
31524
|
placementDecisionsByPlacementId?: Record<string, RevTurbinePlacementDecision>;
|
|
31525
|
+
/**
|
|
31526
|
+
* @deprecated Ignored since 0.11.21 (D-39 / BL-0379): `getPlacement` is a
|
|
31527
|
+
* pure function of the user context and `localRuntime.playbook`, so
|
|
31528
|
+
* pre-decided outputs are never consulted. Removed in 0.12.0.
|
|
31529
|
+
*/
|
|
31525
31530
|
placementsByLookupKey?: Record<string, PlacementOutput | null>;
|
|
31526
31531
|
entitlementByHandle?: Record<string, EntitlementResult>;
|
|
31527
31532
|
userContextByUserId?: Record<string, UserTargetingContext>;
|
|
@@ -32299,7 +32304,6 @@ declare class RevTurbineCustomerSdk {
|
|
|
32299
32304
|
private pendingConversionPlan?;
|
|
32300
32305
|
private usageBalances;
|
|
32301
32306
|
private localDecisionsByPlacementId;
|
|
32302
|
-
private localPlacementsByLookupKey;
|
|
32303
32307
|
private localEntitlementsByHandle;
|
|
32304
32308
|
private localUserContextsByUserId;
|
|
32305
32309
|
/**
|
|
@@ -32600,12 +32604,6 @@ declare class RevTurbineCustomerSdk {
|
|
|
32600
32604
|
*/
|
|
32601
32605
|
private hasEndpointOverride;
|
|
32602
32606
|
private endpointFor;
|
|
32603
|
-
private localPlacementLookupKey;
|
|
32604
|
-
private localLookupMatchesConfig;
|
|
32605
|
-
private localOutputMatchesConfig;
|
|
32606
|
-
private applyCategoryConflictSuppression;
|
|
32607
|
-
private resolveLocalPlacementFromCandidates;
|
|
32608
|
-
private localPlacementForConfig;
|
|
32609
32607
|
/**
|
|
32610
32608
|
* The `placement_slots[]` entry the loaded Playbook authors for a request.
|
|
32611
32609
|
*
|