@revturbine/sdk 0.11.3 → 0.11.5
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 +1605 -1514
- package/dist/headless.d.ts +53 -0
- package/dist/headless.js +1 -1
- package/dist/headless.js.map +1 -1
- package/dist/index.d.ts +53 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/web-sdk/customer-side.d.ts +46 -0
- package/dist/types/web-sdk/customer-side.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/headless.d.ts
CHANGED
|
@@ -7103,6 +7103,7 @@ declare const TreatmentInteractionInputSchema: z.ZodObject<{
|
|
|
7103
7103
|
message_block_id: z.ZodOptional<z.ZodString>;
|
|
7104
7104
|
experiment_id: z.ZodOptional<z.ZodString>;
|
|
7105
7105
|
variant_key: z.ZodOptional<z.ZodString>;
|
|
7106
|
+
rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7106
7107
|
test: z.ZodOptional<z.ZodBoolean>;
|
|
7107
7108
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7108
7109
|
}, z.core.$strip>;
|
|
@@ -7144,6 +7145,7 @@ declare const TreatmentInteractionBatchSchema: z.ZodArray<z.ZodObject<{
|
|
|
7144
7145
|
message_block_id: z.ZodOptional<z.ZodString>;
|
|
7145
7146
|
experiment_id: z.ZodOptional<z.ZodString>;
|
|
7146
7147
|
variant_key: z.ZodOptional<z.ZodString>;
|
|
7148
|
+
rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7147
7149
|
test: z.ZodOptional<z.ZodBoolean>;
|
|
7148
7150
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7149
7151
|
}, z.core.$strip>>;
|
|
@@ -7173,6 +7175,7 @@ declare const TreatmentInteractionRequestSchema: z.ZodUnion<readonly [z.ZodObjec
|
|
|
7173
7175
|
message_block_id: z.ZodOptional<z.ZodString>;
|
|
7174
7176
|
experiment_id: z.ZodOptional<z.ZodString>;
|
|
7175
7177
|
variant_key: z.ZodOptional<z.ZodString>;
|
|
7178
|
+
rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7176
7179
|
test: z.ZodOptional<z.ZodBoolean>;
|
|
7177
7180
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7178
7181
|
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
@@ -7196,6 +7199,7 @@ declare const TreatmentInteractionRequestSchema: z.ZodUnion<readonly [z.ZodObjec
|
|
|
7196
7199
|
message_block_id: z.ZodOptional<z.ZodString>;
|
|
7197
7200
|
experiment_id: z.ZodOptional<z.ZodString>;
|
|
7198
7201
|
variant_key: z.ZodOptional<z.ZodString>;
|
|
7202
|
+
rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7199
7203
|
test: z.ZodOptional<z.ZodBoolean>;
|
|
7200
7204
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7201
7205
|
}, z.core.$strip>>]>;
|
|
@@ -20477,6 +20481,16 @@ interface RevTurbineEndpointOverrides {
|
|
|
20477
20481
|
*/
|
|
20478
20482
|
legacyInteractions?: string;
|
|
20479
20483
|
placementTypes: string;
|
|
20484
|
+
/**
|
|
20485
|
+
* Optional sink for registered surface slots.
|
|
20486
|
+
*
|
|
20487
|
+
* RevTurbine hosts **no default route** for this verb (BL-0197). Slot
|
|
20488
|
+
* registration is client-local and discovery is ingestion-driven — the
|
|
20489
|
+
* pipeline derives discovered slots from the `slot_*` telemetry the SDK
|
|
20490
|
+
* already emits through `/api/track`. Set this only when you run your own
|
|
20491
|
+
* slot-inventory service; unset, `registerSurfaceSlot()` performs no
|
|
20492
|
+
* network write.
|
|
20493
|
+
*/
|
|
20480
20494
|
surfaceSlots: string;
|
|
20481
20495
|
}
|
|
20482
20496
|
/** Client-side clickstream batching policy (plan 95 TASK-6). */
|
|
@@ -21930,6 +21944,30 @@ declare class RevTurbineCustomerSdk {
|
|
|
21930
21944
|
* @public
|
|
21931
21945
|
*/
|
|
21932
21946
|
registerPlacement(config: RevTurbinePlacementConfig): Promise<string>;
|
|
21947
|
+
/**
|
|
21948
|
+
* Mirror a registered surface slot to an explicitly configured backend.
|
|
21949
|
+
*
|
|
21950
|
+
* **Requires an explicit `surfaceSlots` endpoint override** (BL-0197).
|
|
21951
|
+
* There is no default route for this verb and there never was a correct
|
|
21952
|
+
* one: the previous default pointed at `/api/placements`, RevTurbine's
|
|
21953
|
+
* *authored-config* CRUD. That route validates against `PlacementSchema`
|
|
21954
|
+
* (which requires `handle` and `category`), so the legacy surface-slot body
|
|
21955
|
+
* this method sends could only ever be rejected — in production every
|
|
21956
|
+
* non-`local_only` registration failed with
|
|
21957
|
+
* `surface_slot_create_failed:422` and the React runtime turned that into a
|
|
21958
|
+
* `slot_error`.
|
|
21959
|
+
*
|
|
21960
|
+
* It was also wrong in principle. On a same-origin integration the signed-in
|
|
21961
|
+
* user's session cookie authenticates the request, so a body the route *did*
|
|
21962
|
+
* accept would have let merely loading a gated page create a draft placement
|
|
21963
|
+
* in the tenant's Playbook. Only the 422 prevented that.
|
|
21964
|
+
*
|
|
21965
|
+
* Surface-slot **discovery is ingestion-driven**: the SDK emits its
|
|
21966
|
+
* `slot_*` / `placement_*` telemetry through `/api/track` and the pipeline
|
|
21967
|
+
* derives discovered slots from it. Registration itself is client-local.
|
|
21968
|
+
*
|
|
21969
|
+
* @internal
|
|
21970
|
+
*/
|
|
21933
21971
|
private upsertSurfaceSlot;
|
|
21934
21972
|
/**
|
|
21935
21973
|
* Build the internal placement record for a surface-slot config.
|
|
@@ -21952,6 +21990,18 @@ declare class RevTurbineCustomerSdk {
|
|
|
21952
21990
|
* @internal
|
|
21953
21991
|
*/
|
|
21954
21992
|
private commitSurfaceSlotRecord;
|
|
21993
|
+
/**
|
|
21994
|
+
* Register a surface slot with the local runtime and return its placement id.
|
|
21995
|
+
*
|
|
21996
|
+
* **Client-local by default** (BL-0197): this performs no network write. The
|
|
21997
|
+
* slot is recorded in the in-process registry, and the pipeline discovers it
|
|
21998
|
+
* from the `slot_*` / `placement_*` telemetry the SDK emits through
|
|
21999
|
+
* `/api/track`. A write happens only when `custom_endpoints.surfaceSlots`
|
|
22000
|
+
* points at a slot-inventory service you run; there is no fallback to
|
|
22001
|
+
* `/api/placements`.
|
|
22002
|
+
*
|
|
22003
|
+
* @public
|
|
22004
|
+
*/
|
|
21955
22005
|
registerSurfaceSlot(config: RevTurbineSurfaceSlotConfig): Promise<string>;
|
|
21956
22006
|
/**
|
|
21957
22007
|
* Persist authored placement types to a configured backend.
|
|
@@ -24431,6 +24481,7 @@ interface components {
|
|
|
24431
24481
|
message_block_id?: components["schemas"]["Anon_4e04ec5cc4e6_10"];
|
|
24432
24482
|
experiment_id?: components["schemas"]["Anon_4e04ec5cc4e6_11"];
|
|
24433
24483
|
variant_key?: components["schemas"]["Anon_4e04ec5cc4e6_12"];
|
|
24484
|
+
rule_handle?: components["schemas"]["Anon_94b7b4f4c44a"];
|
|
24434
24485
|
test?: components["schemas"]["Anon_fb9ddeea992e_3"];
|
|
24435
24486
|
metadata?: components["schemas"]["Anon_a249e58b3222"];
|
|
24436
24487
|
};
|
|
@@ -24861,6 +24912,8 @@ interface components {
|
|
|
24861
24912
|
Anon_9ac136edb99a_17: string;
|
|
24862
24913
|
Anon_4e04ec5cc4e6_12: components["schemas"]["Anon_9ac136edb99a_18"];
|
|
24863
24914
|
Anon_9ac136edb99a_18: string;
|
|
24915
|
+
Anon_94b7b4f4c44a: components["schemas"]["Anon_904af497346b"];
|
|
24916
|
+
Anon_904af497346b: string | null;
|
|
24864
24917
|
Anon_fb9ddeea992e_3: components["schemas"]["Anon_7cb541e84f22_31"];
|
|
24865
24918
|
Anon_7cb541e84f22_31: boolean;
|
|
24866
24919
|
Anon_a249e58b3222: components["schemas"]["Anon_c65c1fbd5acf_8"];
|