@revturbine/sdk 0.11.6 → 0.11.7

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,42 @@ also require a changelog entry.
47
47
 
48
48
  ---
49
49
 
50
+ ## 0.11.7
51
+
52
+ ### A rebuilt gate/slot re-runs its check, so a page inside `<Gate>` no longer renders blank (BL-0251)
53
+
54
+ **What changed.** `RevTurbineProvider` re-initializes and publishes a **new**
55
+ `sdk` instance whenever its `options` prop changes identity, with `isReady`
56
+ staying `true`. Hosts do this routinely: options derived from an async session
57
+ change once, shortly after first paint.
58
+
59
+ `useEntitlement` rebuilt its `EntitlementGate` on that change, but the effect
60
+ that *runs* the check keyed on `[autoCheck, isReady, handle, contextKey]` — none
61
+ of which move when only `sdk` does. The replacement gate was therefore never
62
+ checked, and an unchecked gate reports `result: null` with `isLoading: false`,
63
+ which `<Gate>` reads as *unresolved* and renders as `null`. A page whose whole
64
+ body sits inside a `<Gate>` rendered **nothing**, permanently, until the gate was
65
+ remounted — which is why navigating away and back "fixed" it and a hard refresh
66
+ hit it every time (the session settles after the gate mounts).
67
+
68
+ `usePlacement` had the same defect: `loadDecision` was memoized on
69
+ `[isReady, resolvedUserId]`, so a controller rebuilt for a new `sdk` **or** a
70
+ changed slot config was never loaded and the slot stayed empty for the life of
71
+ the mount.
72
+
73
+ Both auto-run dependency lists are now supersets of the lists that rebuild the
74
+ object they act on (`sdk` added to both; `placementKey` added to
75
+ `loadDecision`). No retry, no polling — the trigger simply covers every reason
76
+ the underlying object was replaced.
77
+
78
+ **Landed in.** `0.11.7`.
79
+
80
+ **Fail-closed in.** n/a — this was a fail-**blank**, not a tolerated old shape.
81
+ Nothing a host passes changes.
82
+
83
+ **Proving test.** `web-sdk/placements/AccessGateSurfaceSlot.sdk-rebuild.test.tsx`
84
+ and `web-sdk/react/usePlacement.sdk-rebuild.test.tsx`.
85
+
50
86
  ## 0.11.6
51
87
 
52
88
  ### `sdk.convert()` reloads the UserContext, so a mounted slot re-decides (BL-0004)
@@ -3579,6 +3579,138 @@ declare const AnalyticsCatalogConceptSchema: z.ZodObject<{
3579
3579
  }>>;
3580
3580
  }, z.core.$strip>>;
3581
3581
  livemode_qualified: z.ZodOptional<z.ZodBoolean>;
3582
+ record_contract: z.ZodOptional<z.ZodObject<{
3583
+ record_id: z.ZodArray<z.ZodString>;
3584
+ source_namespace: z.ZodString;
3585
+ occurred_time_field: z.ZodString;
3586
+ received_time_field: z.ZodOptional<z.ZodString>;
3587
+ dedup: z.ZodEnum<{
3588
+ unknown: "unknown";
3589
+ deduplicated_on_record_id: "deduplicated_on_record_id";
3590
+ summed_on_sorting_key: "summed_on_sorting_key";
3591
+ append_only: "append_only";
3592
+ upsert_on_primary_key: "upsert_on_primary_key";
3593
+ recomputed_at_query: "recomputed_at_query";
3594
+ }>;
3595
+ revision: z.ZodEnum<{
3596
+ unknown: "unknown";
3597
+ immutable: "immutable";
3598
+ re_emit_higher_version: "re_emit_higher_version";
3599
+ in_place_update: "in_place_update";
3600
+ recomputed_from_source: "recomputed_from_source";
3601
+ }>;
3602
+ late_arrival: z.ZodEnum<{
3603
+ unknown: "unknown";
3604
+ accepted: "accepted";
3605
+ accepted_within_retention: "accepted_within_retention";
3606
+ rejected: "rejected";
3607
+ }>;
3608
+ correlation_keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
3609
+ livemode_field: z.ZodOptional<z.ZodString>;
3610
+ policy_version_fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
3611
+ note: z.ZodOptional<z.ZodString>;
3612
+ }, z.core.$strip>>;
3613
+ keys: z.ZodOptional<z.ZodArray<z.ZodObject<{
3614
+ key: z.ZodString;
3615
+ path: z.ZodString;
3616
+ resolution: z.ZodEnum<{
3617
+ source: "source";
3618
+ enriched: "enriched";
3619
+ absent: "absent";
3620
+ }>;
3621
+ note: z.ZodOptional<z.ZodString>;
3622
+ }, z.core.$strip>>>;
3623
+ measures: z.ZodOptional<z.ZodArray<z.ZodObject<{
3624
+ name: z.ZodString;
3625
+ source: z.ZodString;
3626
+ unit: z.ZodEnum<{
3627
+ count: "count";
3628
+ ratio: "ratio";
3629
+ seconds: "seconds";
3630
+ currency_minor: "currency_minor";
3631
+ timestamp: "timestamp";
3632
+ usage_unit: "usage_unit";
3633
+ polymorphic: "polymorphic";
3634
+ }>;
3635
+ temporal: z.ZodEnum<{
3636
+ stock: "stock";
3637
+ flow: "flow";
3638
+ gauge: "gauge";
3639
+ }>;
3640
+ sign: z.ZodEnum<{
3641
+ signed: "signed";
3642
+ positive_magnitude: "positive_magnitude";
3643
+ unsigned: "unsigned";
3644
+ }>;
3645
+ aggregation_semantics: z.ZodEnum<{
3646
+ additive: "additive";
3647
+ semi_additive: "semi_additive";
3648
+ non_additive: "non_additive";
3649
+ }>;
3650
+ note: z.ZodOptional<z.ZodString>;
3651
+ }, z.core.$strip>>>;
3652
+ event_attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
3653
+ name: z.ZodString;
3654
+ path: z.ZodString;
3655
+ note: z.ZodOptional<z.ZodString>;
3656
+ }, z.core.$strip>>>;
3657
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
3658
+ kind: z.ZodEnum<{
3659
+ unavailable: "unavailable";
3660
+ ingested_event: "ingested_event";
3661
+ datasource: "datasource";
3662
+ control_plane_table: "control_plane_table";
3663
+ build: "build";
3664
+ }>;
3665
+ ref: z.ZodString;
3666
+ blocker: z.ZodOptional<z.ZodString>;
3667
+ note: z.ZodOptional<z.ZodString>;
3668
+ }, z.core.$strip>>>;
3669
+ build: z.ZodOptional<z.ZodObject<{
3670
+ kind: z.ZodEnum<{
3671
+ pipe: "pipe";
3672
+ unavailable: "unavailable";
3673
+ materialized_view: "materialized_view";
3674
+ worker: "worker";
3675
+ query_time: "query_time";
3676
+ }>;
3677
+ ref: z.ZodString;
3678
+ inputs: z.ZodArray<z.ZodString>;
3679
+ blocker: z.ZodOptional<z.ZodString>;
3680
+ }, z.core.$strip>>;
3681
+ maturity: z.ZodOptional<z.ZodObject<{
3682
+ status: z.ZodEnum<{
3683
+ unavailable: "unavailable";
3684
+ declared: "declared";
3685
+ }>;
3686
+ horizon_field: z.ZodOptional<z.ZodString>;
3687
+ observed_through_field: z.ZodOptional<z.ZodString>;
3688
+ blocker: z.ZodOptional<z.ZodString>;
3689
+ }, z.core.$strip>>;
3690
+ oracle_family: z.ZodOptional<z.ZodObject<{
3691
+ family: z.ZodEnum<{
3692
+ none: "none";
3693
+ funnel: "funnel";
3694
+ revenue: "revenue";
3695
+ gate: "gate";
3696
+ presentation: "presentation";
3697
+ attribution: "attribution";
3698
+ event_count: "event_count";
3699
+ cohort: "cohort";
3700
+ read_through: "read_through";
3701
+ }>;
3702
+ blocker: z.ZodOptional<z.ZodString>;
3703
+ }, z.core.$strip>>;
3704
+ policy_dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
3705
+ kind: z.ZodEnum<{
3706
+ attribution: "attribution";
3707
+ mrr: "mrr";
3708
+ lifecycle: "lifecycle";
3709
+ engagement: "engagement";
3710
+ }>;
3711
+ stamped: z.ZodBoolean;
3712
+ blocker: z.ZodOptional<z.ZodString>;
3713
+ }, z.core.$strip>>>;
3582
3714
  deprecation: z.ZodOptional<z.ZodObject<{
3583
3715
  deprecated: z.ZodBoolean;
3584
3716
  replaced_by: z.ZodOptional<z.ZodString>;
@@ -5768,6 +5900,138 @@ declare const AnalyticsCatalogSchema: z.ZodObject<{
5768
5900
  }>>;
5769
5901
  }, z.core.$strip>>;
5770
5902
  livemode_qualified: z.ZodOptional<z.ZodBoolean>;
5903
+ record_contract: z.ZodOptional<z.ZodObject<{
5904
+ record_id: z.ZodArray<z.ZodString>;
5905
+ source_namespace: z.ZodString;
5906
+ occurred_time_field: z.ZodString;
5907
+ received_time_field: z.ZodOptional<z.ZodString>;
5908
+ dedup: z.ZodEnum<{
5909
+ unknown: "unknown";
5910
+ deduplicated_on_record_id: "deduplicated_on_record_id";
5911
+ summed_on_sorting_key: "summed_on_sorting_key";
5912
+ append_only: "append_only";
5913
+ upsert_on_primary_key: "upsert_on_primary_key";
5914
+ recomputed_at_query: "recomputed_at_query";
5915
+ }>;
5916
+ revision: z.ZodEnum<{
5917
+ unknown: "unknown";
5918
+ immutable: "immutable";
5919
+ re_emit_higher_version: "re_emit_higher_version";
5920
+ in_place_update: "in_place_update";
5921
+ recomputed_from_source: "recomputed_from_source";
5922
+ }>;
5923
+ late_arrival: z.ZodEnum<{
5924
+ unknown: "unknown";
5925
+ accepted: "accepted";
5926
+ accepted_within_retention: "accepted_within_retention";
5927
+ rejected: "rejected";
5928
+ }>;
5929
+ correlation_keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
5930
+ livemode_field: z.ZodOptional<z.ZodString>;
5931
+ policy_version_fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
5932
+ note: z.ZodOptional<z.ZodString>;
5933
+ }, z.core.$strip>>;
5934
+ keys: z.ZodOptional<z.ZodArray<z.ZodObject<{
5935
+ key: z.ZodString;
5936
+ path: z.ZodString;
5937
+ resolution: z.ZodEnum<{
5938
+ source: "source";
5939
+ enriched: "enriched";
5940
+ absent: "absent";
5941
+ }>;
5942
+ note: z.ZodOptional<z.ZodString>;
5943
+ }, z.core.$strip>>>;
5944
+ measures: z.ZodOptional<z.ZodArray<z.ZodObject<{
5945
+ name: z.ZodString;
5946
+ source: z.ZodString;
5947
+ unit: z.ZodEnum<{
5948
+ count: "count";
5949
+ ratio: "ratio";
5950
+ seconds: "seconds";
5951
+ currency_minor: "currency_minor";
5952
+ timestamp: "timestamp";
5953
+ usage_unit: "usage_unit";
5954
+ polymorphic: "polymorphic";
5955
+ }>;
5956
+ temporal: z.ZodEnum<{
5957
+ stock: "stock";
5958
+ flow: "flow";
5959
+ gauge: "gauge";
5960
+ }>;
5961
+ sign: z.ZodEnum<{
5962
+ signed: "signed";
5963
+ positive_magnitude: "positive_magnitude";
5964
+ unsigned: "unsigned";
5965
+ }>;
5966
+ aggregation_semantics: z.ZodEnum<{
5967
+ additive: "additive";
5968
+ semi_additive: "semi_additive";
5969
+ non_additive: "non_additive";
5970
+ }>;
5971
+ note: z.ZodOptional<z.ZodString>;
5972
+ }, z.core.$strip>>>;
5973
+ event_attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
5974
+ name: z.ZodString;
5975
+ path: z.ZodString;
5976
+ note: z.ZodOptional<z.ZodString>;
5977
+ }, z.core.$strip>>>;
5978
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
5979
+ kind: z.ZodEnum<{
5980
+ unavailable: "unavailable";
5981
+ ingested_event: "ingested_event";
5982
+ datasource: "datasource";
5983
+ control_plane_table: "control_plane_table";
5984
+ build: "build";
5985
+ }>;
5986
+ ref: z.ZodString;
5987
+ blocker: z.ZodOptional<z.ZodString>;
5988
+ note: z.ZodOptional<z.ZodString>;
5989
+ }, z.core.$strip>>>;
5990
+ build: z.ZodOptional<z.ZodObject<{
5991
+ kind: z.ZodEnum<{
5992
+ pipe: "pipe";
5993
+ unavailable: "unavailable";
5994
+ materialized_view: "materialized_view";
5995
+ worker: "worker";
5996
+ query_time: "query_time";
5997
+ }>;
5998
+ ref: z.ZodString;
5999
+ inputs: z.ZodArray<z.ZodString>;
6000
+ blocker: z.ZodOptional<z.ZodString>;
6001
+ }, z.core.$strip>>;
6002
+ maturity: z.ZodOptional<z.ZodObject<{
6003
+ status: z.ZodEnum<{
6004
+ unavailable: "unavailable";
6005
+ declared: "declared";
6006
+ }>;
6007
+ horizon_field: z.ZodOptional<z.ZodString>;
6008
+ observed_through_field: z.ZodOptional<z.ZodString>;
6009
+ blocker: z.ZodOptional<z.ZodString>;
6010
+ }, z.core.$strip>>;
6011
+ oracle_family: z.ZodOptional<z.ZodObject<{
6012
+ family: z.ZodEnum<{
6013
+ none: "none";
6014
+ funnel: "funnel";
6015
+ revenue: "revenue";
6016
+ gate: "gate";
6017
+ presentation: "presentation";
6018
+ attribution: "attribution";
6019
+ event_count: "event_count";
6020
+ cohort: "cohort";
6021
+ read_through: "read_through";
6022
+ }>;
6023
+ blocker: z.ZodOptional<z.ZodString>;
6024
+ }, z.core.$strip>>;
6025
+ policy_dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
6026
+ kind: z.ZodEnum<{
6027
+ attribution: "attribution";
6028
+ mrr: "mrr";
6029
+ lifecycle: "lifecycle";
6030
+ engagement: "engagement";
6031
+ }>;
6032
+ stamped: z.ZodBoolean;
6033
+ blocker: z.ZodOptional<z.ZodString>;
6034
+ }, z.core.$strip>>>;
5771
6035
  deprecation: z.ZodOptional<z.ZodObject<{
5772
6036
  deprecated: z.ZodBoolean;
5773
6037
  replaced_by: z.ZodOptional<z.ZodString>;
@@ -7957,9 +8221,9 @@ declare const WebhookProcessingStatusSchema: z.ZodEnum<{
7957
8221
  */
7958
8222
  declare const WebhookDispatchStatusSchema: z.ZodEnum<{
7959
8223
  unknown: "unknown";
8224
+ accepted: "accepted";
7960
8225
  failed: "failed";
7961
8226
  pending: "pending";
7962
- accepted: "accepted";
7963
8227
  terminal: "terminal";
7964
8228
  not_required: "not_required";
7965
8229
  dispatching: "dispatching";
@@ -8015,9 +8279,9 @@ declare const WebhookDeliverySchema: z.ZodObject<{
8015
8279
  }>>;
8016
8280
  dispatch_status: z.ZodDefault<z.ZodEnum<{
8017
8281
  unknown: "unknown";
8282
+ accepted: "accepted";
8018
8283
  failed: "failed";
8019
8284
  pending: "pending";
8020
- accepted: "accepted";
8021
8285
  terminal: "terminal";
8022
8286
  not_required: "not_required";
8023
8287
  dispatching: "dispatching";
@@ -9170,6 +9434,9 @@ declare const TrialInstanceSchema: z.ZodObject<{
9170
9434
  usage_limit_value: z.ZodOptional<z.ZodNumber>;
9171
9435
  converted_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9172
9436
  cancelled_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9437
+ trial_episode_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9438
+ stripe_subscription_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9439
+ actual_end_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9173
9440
  metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9174
9441
  }, z.core.$strip>;
9175
9442
  declare const trialPaths: ZodOpenApiPathsObject;
@@ -15736,12 +16003,12 @@ declare const ServerEvaluationPayloadSchema: z.ZodObject<{
15736
16003
 
15737
16004
  declare const PlaybookVersionStatusSchema: z.ZodEnum<{
15738
16005
  draft: "draft";
16006
+ rejected: "rejected";
15739
16007
  archived: "archived";
15740
16008
  awaiting_approval: "awaiting_approval";
15741
16009
  approved: "approved";
15742
16010
  deploying: "deploying";
15743
16011
  deployed: "deployed";
15744
- rejected: "rejected";
15745
16012
  }>;
15746
16013
  declare const PlaybookVersionSchema: z.ZodObject<{
15747
16014
  id: z.ZodString;
@@ -15753,12 +16020,12 @@ declare const PlaybookVersionSchema: z.ZodObject<{
15753
16020
  description: z.ZodOptional<z.ZodString>;
15754
16021
  status: z.ZodDefault<z.ZodEnum<{
15755
16022
  draft: "draft";
16023
+ rejected: "rejected";
15756
16024
  archived: "archived";
15757
16025
  awaiting_approval: "awaiting_approval";
15758
16026
  approved: "approved";
15759
16027
  deploying: "deploying";
15760
16028
  deployed: "deployed";
15761
- rejected: "rejected";
15762
16029
  }>>;
15763
16030
  labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
15764
16031
  created_by: z.ZodString;
@@ -16269,9 +16536,9 @@ declare const AuthMemberSchema: z.ZodObject<{
16269
16536
  declare const InvitationStatusSchema: z.ZodEnum<{
16270
16537
  canceled: "canceled";
16271
16538
  expired: "expired";
16272
- pending: "pending";
16273
16539
  accepted: "accepted";
16274
16540
  rejected: "rejected";
16541
+ pending: "pending";
16275
16542
  }>;
16276
16543
  declare const AuthInvitationSchema: z.ZodObject<{
16277
16544
  id: z.ZodString;
@@ -16286,9 +16553,9 @@ declare const AuthInvitationSchema: z.ZodObject<{
16286
16553
  status: z.ZodDefault<z.ZodEnum<{
16287
16554
  canceled: "canceled";
16288
16555
  expired: "expired";
16289
- pending: "pending";
16290
16556
  accepted: "accepted";
16291
16557
  rejected: "rejected";
16558
+ pending: "pending";
16292
16559
  }>>;
16293
16560
  expires_at: z.ZodString;
16294
16561
  created_at: z.ZodString;