@revturbine/sdk 0.11.3 → 0.11.4

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 CHANGED
@@ -47,6 +47,39 @@ also require a changelog entry.
47
47
 
48
48
  ---
49
49
 
50
+ ## 0.11.4
51
+
52
+ ### The treatment-interaction wire record now carries `rule_handle` (BL-0200)
53
+
54
+ **What changed.** `flushInteractionQueue`'s projection onto
55
+ `POST /api/events/interactions` now includes `rule_handle`, taken from the same
56
+ `ruleHandle` on `RevTurbineTreatmentInteractionInput` that 0.11.3 began stamping
57
+ on the `placement_interaction` clickstream event.
58
+
59
+ 0.11.3 deliberately kept it off this record, and #530 asserted the omission with
60
+ a "never reaches the treatment-interaction wire record" test. The reasoning was
61
+ that the clickstream carries payload fields inside a JSON column — readable the
62
+ moment a producer sends them — while this record is column-shaped
63
+ (`placement_presentations`) and a new key needed a datasource migration.
64
+
65
+ The migration has since landed (revturbine-web ledger 015 added
66
+ `placement_exposure_attribution.rule_handle`), and the field is now declared on
67
+ `TreatmentInteractionInputSchema` (`revturbine-scaffold#394`, published as
68
+ `@revt-eng/*` v0.1.342). Sending it lets the app record the rule an exposure was
69
+ **decided by**, on the base exposure row, instead of waiting for the attribution
70
+ worker to reconstruct one from the clickstream when a conversion lands — which
71
+ is what makes presentation-grain analytics cuts per rule honest rather than
72
+ computed over the converted subset.
73
+
74
+ **Nothing to change in your integration.** `ruleHandle` was already public and
75
+ already populated by every `PlacementController` path; this only widens where the
76
+ value is sent. Spread, not set: the key is **absent** when no decision was in
77
+ scope. The contract accepts an explicit `null` for "a rule was selected and none
78
+ matched", but the SDK cannot distinguish that from "no decision in scope" —
79
+ `PlacementOutput.rule_id` is simply missing in both — so it asserts neither.
80
+
81
+ **No `@public` surface moved**, hence a patch release.
82
+
50
83
  ## 0.11.3
51
84
 
52
85
  ### `placement_interaction` now carries `rule_handle` (BL-0182)
@@ -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>>]>;
@@ -24431,6 +24435,7 @@ interface components {
24431
24435
  message_block_id?: components["schemas"]["Anon_4e04ec5cc4e6_10"];
24432
24436
  experiment_id?: components["schemas"]["Anon_4e04ec5cc4e6_11"];
24433
24437
  variant_key?: components["schemas"]["Anon_4e04ec5cc4e6_12"];
24438
+ rule_handle?: components["schemas"]["Anon_94b7b4f4c44a"];
24434
24439
  test?: components["schemas"]["Anon_fb9ddeea992e_3"];
24435
24440
  metadata?: components["schemas"]["Anon_a249e58b3222"];
24436
24441
  };
@@ -24861,6 +24866,8 @@ interface components {
24861
24866
  Anon_9ac136edb99a_17: string;
24862
24867
  Anon_4e04ec5cc4e6_12: components["schemas"]["Anon_9ac136edb99a_18"];
24863
24868
  Anon_9ac136edb99a_18: string;
24869
+ Anon_94b7b4f4c44a: components["schemas"]["Anon_904af497346b"];
24870
+ Anon_904af497346b: string | null;
24864
24871
  Anon_fb9ddeea992e_3: components["schemas"]["Anon_7cb541e84f22_31"];
24865
24872
  Anon_7cb541e84f22_31: boolean;
24866
24873
  Anon_a249e58b3222: components["schemas"]["Anon_c65c1fbd5acf_8"];