@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/index.d.ts
CHANGED
|
@@ -7105,6 +7105,7 @@ declare const TreatmentInteractionInputSchema: z.ZodObject<{
|
|
|
7105
7105
|
message_block_id: z.ZodOptional<z.ZodString>;
|
|
7106
7106
|
experiment_id: z.ZodOptional<z.ZodString>;
|
|
7107
7107
|
variant_key: z.ZodOptional<z.ZodString>;
|
|
7108
|
+
rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7108
7109
|
test: z.ZodOptional<z.ZodBoolean>;
|
|
7109
7110
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7110
7111
|
}, z.core.$strip>;
|
|
@@ -7146,6 +7147,7 @@ declare const TreatmentInteractionBatchSchema: z.ZodArray<z.ZodObject<{
|
|
|
7146
7147
|
message_block_id: z.ZodOptional<z.ZodString>;
|
|
7147
7148
|
experiment_id: z.ZodOptional<z.ZodString>;
|
|
7148
7149
|
variant_key: z.ZodOptional<z.ZodString>;
|
|
7150
|
+
rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7149
7151
|
test: z.ZodOptional<z.ZodBoolean>;
|
|
7150
7152
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7151
7153
|
}, z.core.$strip>>;
|
|
@@ -7175,6 +7177,7 @@ declare const TreatmentInteractionRequestSchema: z.ZodUnion<readonly [z.ZodObjec
|
|
|
7175
7177
|
message_block_id: z.ZodOptional<z.ZodString>;
|
|
7176
7178
|
experiment_id: z.ZodOptional<z.ZodString>;
|
|
7177
7179
|
variant_key: z.ZodOptional<z.ZodString>;
|
|
7180
|
+
rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7178
7181
|
test: z.ZodOptional<z.ZodBoolean>;
|
|
7179
7182
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7180
7183
|
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
@@ -7198,6 +7201,7 @@ declare const TreatmentInteractionRequestSchema: z.ZodUnion<readonly [z.ZodObjec
|
|
|
7198
7201
|
message_block_id: z.ZodOptional<z.ZodString>;
|
|
7199
7202
|
experiment_id: z.ZodOptional<z.ZodString>;
|
|
7200
7203
|
variant_key: z.ZodOptional<z.ZodString>;
|
|
7204
|
+
rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7201
7205
|
test: z.ZodOptional<z.ZodBoolean>;
|
|
7202
7206
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7203
7207
|
}, z.core.$strip>>]>;
|
|
@@ -20669,6 +20673,16 @@ interface RevTurbineEndpointOverrides {
|
|
|
20669
20673
|
*/
|
|
20670
20674
|
legacyInteractions?: string;
|
|
20671
20675
|
placementTypes: string;
|
|
20676
|
+
/**
|
|
20677
|
+
* Optional sink for registered surface slots.
|
|
20678
|
+
*
|
|
20679
|
+
* RevTurbine hosts **no default route** for this verb (BL-0197). Slot
|
|
20680
|
+
* registration is client-local and discovery is ingestion-driven — the
|
|
20681
|
+
* pipeline derives discovered slots from the `slot_*` telemetry the SDK
|
|
20682
|
+
* already emits through `/api/track`. Set this only when you run your own
|
|
20683
|
+
* slot-inventory service; unset, `registerSurfaceSlot()` performs no
|
|
20684
|
+
* network write.
|
|
20685
|
+
*/
|
|
20672
20686
|
surfaceSlots: string;
|
|
20673
20687
|
}
|
|
20674
20688
|
/** Client-side clickstream batching policy (plan 95 TASK-6). */
|
|
@@ -22122,6 +22136,30 @@ declare class RevTurbineCustomerSdk {
|
|
|
22122
22136
|
* @public
|
|
22123
22137
|
*/
|
|
22124
22138
|
registerPlacement(config: RevTurbinePlacementConfig): Promise<string>;
|
|
22139
|
+
/**
|
|
22140
|
+
* Mirror a registered surface slot to an explicitly configured backend.
|
|
22141
|
+
*
|
|
22142
|
+
* **Requires an explicit `surfaceSlots` endpoint override** (BL-0197).
|
|
22143
|
+
* There is no default route for this verb and there never was a correct
|
|
22144
|
+
* one: the previous default pointed at `/api/placements`, RevTurbine's
|
|
22145
|
+
* *authored-config* CRUD. That route validates against `PlacementSchema`
|
|
22146
|
+
* (which requires `handle` and `category`), so the legacy surface-slot body
|
|
22147
|
+
* this method sends could only ever be rejected — in production every
|
|
22148
|
+
* non-`local_only` registration failed with
|
|
22149
|
+
* `surface_slot_create_failed:422` and the React runtime turned that into a
|
|
22150
|
+
* `slot_error`.
|
|
22151
|
+
*
|
|
22152
|
+
* It was also wrong in principle. On a same-origin integration the signed-in
|
|
22153
|
+
* user's session cookie authenticates the request, so a body the route *did*
|
|
22154
|
+
* accept would have let merely loading a gated page create a draft placement
|
|
22155
|
+
* in the tenant's Playbook. Only the 422 prevented that.
|
|
22156
|
+
*
|
|
22157
|
+
* Surface-slot **discovery is ingestion-driven**: the SDK emits its
|
|
22158
|
+
* `slot_*` / `placement_*` telemetry through `/api/track` and the pipeline
|
|
22159
|
+
* derives discovered slots from it. Registration itself is client-local.
|
|
22160
|
+
*
|
|
22161
|
+
* @internal
|
|
22162
|
+
*/
|
|
22125
22163
|
private upsertSurfaceSlot;
|
|
22126
22164
|
/**
|
|
22127
22165
|
* Build the internal placement record for a surface-slot config.
|
|
@@ -22144,6 +22182,18 @@ declare class RevTurbineCustomerSdk {
|
|
|
22144
22182
|
* @internal
|
|
22145
22183
|
*/
|
|
22146
22184
|
private commitSurfaceSlotRecord;
|
|
22185
|
+
/**
|
|
22186
|
+
* Register a surface slot with the local runtime and return its placement id.
|
|
22187
|
+
*
|
|
22188
|
+
* **Client-local by default** (BL-0197): this performs no network write. The
|
|
22189
|
+
* slot is recorded in the in-process registry, and the pipeline discovers it
|
|
22190
|
+
* from the `slot_*` / `placement_*` telemetry the SDK emits through
|
|
22191
|
+
* `/api/track`. A write happens only when `custom_endpoints.surfaceSlots`
|
|
22192
|
+
* points at a slot-inventory service you run; there is no fallback to
|
|
22193
|
+
* `/api/placements`.
|
|
22194
|
+
*
|
|
22195
|
+
* @public
|
|
22196
|
+
*/
|
|
22147
22197
|
registerSurfaceSlot(config: RevTurbineSurfaceSlotConfig): Promise<string>;
|
|
22148
22198
|
/**
|
|
22149
22199
|
* Persist authored placement types to a configured backend.
|
|
@@ -24623,6 +24673,7 @@ interface components {
|
|
|
24623
24673
|
message_block_id?: components["schemas"]["Anon_4e04ec5cc4e6_10"];
|
|
24624
24674
|
experiment_id?: components["schemas"]["Anon_4e04ec5cc4e6_11"];
|
|
24625
24675
|
variant_key?: components["schemas"]["Anon_4e04ec5cc4e6_12"];
|
|
24676
|
+
rule_handle?: components["schemas"]["Anon_94b7b4f4c44a"];
|
|
24626
24677
|
test?: components["schemas"]["Anon_fb9ddeea992e_3"];
|
|
24627
24678
|
metadata?: components["schemas"]["Anon_a249e58b3222"];
|
|
24628
24679
|
};
|
|
@@ -25053,6 +25104,8 @@ interface components {
|
|
|
25053
25104
|
Anon_9ac136edb99a_17: string;
|
|
25054
25105
|
Anon_4e04ec5cc4e6_12: components["schemas"]["Anon_9ac136edb99a_18"];
|
|
25055
25106
|
Anon_9ac136edb99a_18: string;
|
|
25107
|
+
Anon_94b7b4f4c44a: components["schemas"]["Anon_904af497346b"];
|
|
25108
|
+
Anon_904af497346b: string | null;
|
|
25056
25109
|
Anon_fb9ddeea992e_3: components["schemas"]["Anon_7cb541e84f22_31"];
|
|
25057
25110
|
Anon_7cb541e84f22_31: boolean;
|
|
25058
25111
|
Anon_a249e58b3222: components["schemas"]["Anon_c65c1fbd5acf_8"];
|