@revturbine/sdk 0.11.13 → 0.11.16

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/dist/index.d.ts CHANGED
@@ -1897,6 +1897,8 @@ declare const SurfaceSlotStatusSchema: z.ZodEnum<{
1897
1897
  }>;
1898
1898
  /** Upper bound on a slot route — a path, never a URL with a query string. */
1899
1899
  declare const SURFACE_SLOT_ROUTE_MAX_LENGTH = 512;
1900
+ /** Upper bound on a discovered slot name — a display label, not prose. */
1901
+ declare const SURFACE_SLOT_NAME_MAX_LENGTH = 200;
1900
1902
  declare const SurfaceSlotSchema: z.ZodObject<{
1901
1903
  id: z.ZodString;
1902
1904
  created_at: z.ZodString;
@@ -1937,6 +1939,7 @@ declare const SurfaceSlotSchema: z.ZodObject<{
1937
1939
  first_seen: z.ZodString;
1938
1940
  last_seen: z.ZodString;
1939
1941
  route: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1942
+ slot_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1940
1943
  status: z.ZodDefault<z.ZodEnum<{
1941
1944
  live: "live";
1942
1945
  idle: "idle";
@@ -2076,6 +2079,177 @@ declare const UserBuiltinDimensionsSchema: z.ZodObject<{
2076
2079
  tablet: "tablet";
2077
2080
  }>>;
2078
2081
  }, z.core.$strip>;
2082
+ /**
2083
+ * The built-in dimensions the tenant's backend may set through the server-key
2084
+ * upsert (BL-0382, D-46): every delivered catalogue key except `seat_type`,
2085
+ * which keeps its own validated write (`seat_type_handle`, D-36) so one value
2086
+ * never has two write paths. Registration State is SDK-local and absent here
2087
+ * as it is from {@link UserBuiltinDimensionsSchema}.
2088
+ */
2089
+ declare const CUSTOMER_SETTABLE_BUILTIN_DIMENSION_KEYS: readonly ["activity_level", "subscription_state", "trial_type", "buyer_role", "email_type", "billing_health", "region", "device_type"];
2090
+ /** One key of {@link CUSTOMER_SETTABLE_BUILTIN_DIMENSION_KEYS}. */
2091
+ declare const CustomerSettableBuiltinDimensionKeySchema: z.ZodEnum<{
2092
+ trial_type: "trial_type";
2093
+ activity_level: "activity_level";
2094
+ subscription_state: "subscription_state";
2095
+ buyer_role: "buyer_role";
2096
+ email_type: "email_type";
2097
+ billing_health: "billing_health";
2098
+ region: "region";
2099
+ device_type: "device_type";
2100
+ }>;
2101
+ type CustomerSettableBuiltinDimensionKey = z.infer<typeof CustomerSettableBuiltinDimensionKeySchema>;
2102
+ /**
2103
+ * The customer-set built-in dimension values of one user, keyed by dimension
2104
+ * (BL-0382; D-46, D-47) — persisted as the `user_contexts.customer_builtin_dimensions`
2105
+ * jsonb column. Written ONLY by the server-key upsert
2106
+ * (`upsertServerUserContext`); the generic CRUD write drops it for every
2107
+ * writer that is not a dashboard session, exactly like `seat_type_handle`.
2108
+ *
2109
+ * It is an INPUT to delivery, not the delivered value: the control plane
2110
+ * resolves `builtin_dimensions` per key as
2111
+ * - `override: true` → the customer value wins over enrichment;
2112
+ * - `override: false` → last writer wins between this value (`set_at`) and
2113
+ * the RevTurbine enrichment source's own timestamp; enrichment with no
2114
+ * datable source change never supersedes it.
2115
+ * An absent key means the customer never set (or cleared) that dimension.
2116
+ */
2117
+ declare const CustomerBuiltinDimensionsSchema: z.ZodObject<{
2118
+ activity_level: z.ZodOptional<z.ZodObject<{
2119
+ value: z.ZodEnum<{
2120
+ new: "new";
2121
+ high: "high";
2122
+ medium: "medium";
2123
+ low: "low";
2124
+ inactive: "inactive";
2125
+ }>;
2126
+ set_at: z.ZodString;
2127
+ override: z.ZodBoolean;
2128
+ }, z.core.$strict>>;
2129
+ subscription_state: z.ZodOptional<z.ZodObject<{
2130
+ value: z.ZodEnum<{
2131
+ trial: "trial";
2132
+ none: "none";
2133
+ paid: "paid";
2134
+ cancelled: "cancelled";
2135
+ }>;
2136
+ set_at: z.ZodString;
2137
+ override: z.ZodBoolean;
2138
+ }, z.core.$strict>>;
2139
+ trial_type: z.ZodOptional<z.ZodObject<{
2140
+ value: z.ZodEnum<{
2141
+ none: "none";
2142
+ free_trial: "free_trial";
2143
+ reverse_trial: "reverse_trial";
2144
+ }>;
2145
+ set_at: z.ZodString;
2146
+ override: z.ZodBoolean;
2147
+ }, z.core.$strict>>;
2148
+ buyer_role: z.ZodOptional<z.ZodObject<{
2149
+ value: z.ZodEnum<{
2150
+ buyer: "buyer";
2151
+ non_buyer: "non_buyer";
2152
+ }>;
2153
+ set_at: z.ZodString;
2154
+ override: z.ZodBoolean;
2155
+ }, z.core.$strict>>;
2156
+ email_type: z.ZodOptional<z.ZodObject<{
2157
+ value: z.ZodEnum<{
2158
+ unknown: "unknown";
2159
+ business: "business";
2160
+ personal: "personal";
2161
+ }>;
2162
+ set_at: z.ZodString;
2163
+ override: z.ZodBoolean;
2164
+ }, z.core.$strict>>;
2165
+ billing_health: z.ZodOptional<z.ZodObject<{
2166
+ value: z.ZodEnum<{
2167
+ payment_failed: "payment_failed";
2168
+ payment_method_missing: "payment_method_missing";
2169
+ cancelled: "cancelled";
2170
+ no_billing: "no_billing";
2171
+ good_standing: "good_standing";
2172
+ trial_payment_method_attached: "trial_payment_method_attached";
2173
+ payment_overdue: "payment_overdue";
2174
+ }>;
2175
+ set_at: z.ZodString;
2176
+ override: z.ZodBoolean;
2177
+ }, z.core.$strict>>;
2178
+ region: z.ZodOptional<z.ZodObject<{
2179
+ value: z.ZodEnum<{
2180
+ us_canada: "us_canada";
2181
+ europe: "europe";
2182
+ rest_of_world: "rest_of_world";
2183
+ }>;
2184
+ set_at: z.ZodString;
2185
+ override: z.ZodBoolean;
2186
+ }, z.core.$strict>>;
2187
+ device_type: z.ZodOptional<z.ZodObject<{
2188
+ value: z.ZodEnum<{
2189
+ unknown: "unknown";
2190
+ desktop: "desktop";
2191
+ mobile: "mobile";
2192
+ tablet: "tablet";
2193
+ }>;
2194
+ set_at: z.ZodString;
2195
+ override: z.ZodBoolean;
2196
+ }, z.core.$strict>>;
2197
+ }, z.core.$strict>;
2198
+ /**
2199
+ * The `builtin_dimensions` of a server-key upsert body (BL-0382): a partial map
2200
+ * of settable key → a value from that dimension's closed vocabulary, or `null`
2201
+ * to CLEAR the customer value (and its pin) for that key. Strict: `seat_type`
2202
+ * and unknown keys are rejected.
2203
+ */
2204
+ declare const ServerBuiltinDimensionsWriteSchema: z.ZodObject<{
2205
+ activity_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2206
+ new: "new";
2207
+ high: "high";
2208
+ medium: "medium";
2209
+ low: "low";
2210
+ inactive: "inactive";
2211
+ }>>>;
2212
+ subscription_state: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2213
+ trial: "trial";
2214
+ none: "none";
2215
+ paid: "paid";
2216
+ cancelled: "cancelled";
2217
+ }>>>;
2218
+ trial_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2219
+ none: "none";
2220
+ free_trial: "free_trial";
2221
+ reverse_trial: "reverse_trial";
2222
+ }>>>;
2223
+ buyer_role: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2224
+ buyer: "buyer";
2225
+ non_buyer: "non_buyer";
2226
+ }>>>;
2227
+ email_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2228
+ unknown: "unknown";
2229
+ business: "business";
2230
+ personal: "personal";
2231
+ }>>>;
2232
+ billing_health: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2233
+ payment_failed: "payment_failed";
2234
+ payment_method_missing: "payment_method_missing";
2235
+ cancelled: "cancelled";
2236
+ no_billing: "no_billing";
2237
+ good_standing: "good_standing";
2238
+ trial_payment_method_attached: "trial_payment_method_attached";
2239
+ payment_overdue: "payment_overdue";
2240
+ }>>>;
2241
+ region: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2242
+ us_canada: "us_canada";
2243
+ europe: "europe";
2244
+ rest_of_world: "rest_of_world";
2245
+ }>>>;
2246
+ device_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2247
+ unknown: "unknown";
2248
+ desktop: "desktop";
2249
+ mobile: "mobile";
2250
+ tablet: "tablet";
2251
+ }>>>;
2252
+ }, z.core.$strict>;
2079
2253
  /**
2080
2254
  * Usage and entitlements for a specific product instance.
2081
2255
  *
@@ -2175,6 +2349,7 @@ declare const UserContextSchema: z.ZodObject<{
2175
2349
  email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2176
2350
  email_type: z.ZodOptional<z.ZodString>;
2177
2351
  plan_handle: z.ZodOptional<z.ZodString>;
2352
+ seat_type_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2178
2353
  plan: z.ZodOptional<z.ZodObject<{
2179
2354
  handle: z.ZodString;
2180
2355
  name: z.ZodString;
@@ -2378,6 +2553,87 @@ declare const UserContextSchema: z.ZodObject<{
2378
2553
  tablet: "tablet";
2379
2554
  }>>;
2380
2555
  }, z.core.$strip>>;
2556
+ customer_builtin_dimensions: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2557
+ activity_level: z.ZodOptional<z.ZodObject<{
2558
+ value: z.ZodEnum<{
2559
+ new: "new";
2560
+ high: "high";
2561
+ medium: "medium";
2562
+ low: "low";
2563
+ inactive: "inactive";
2564
+ }>;
2565
+ set_at: z.ZodString;
2566
+ override: z.ZodBoolean;
2567
+ }, z.core.$strict>>;
2568
+ subscription_state: z.ZodOptional<z.ZodObject<{
2569
+ value: z.ZodEnum<{
2570
+ trial: "trial";
2571
+ none: "none";
2572
+ paid: "paid";
2573
+ cancelled: "cancelled";
2574
+ }>;
2575
+ set_at: z.ZodString;
2576
+ override: z.ZodBoolean;
2577
+ }, z.core.$strict>>;
2578
+ trial_type: z.ZodOptional<z.ZodObject<{
2579
+ value: z.ZodEnum<{
2580
+ none: "none";
2581
+ free_trial: "free_trial";
2582
+ reverse_trial: "reverse_trial";
2583
+ }>;
2584
+ set_at: z.ZodString;
2585
+ override: z.ZodBoolean;
2586
+ }, z.core.$strict>>;
2587
+ buyer_role: z.ZodOptional<z.ZodObject<{
2588
+ value: z.ZodEnum<{
2589
+ buyer: "buyer";
2590
+ non_buyer: "non_buyer";
2591
+ }>;
2592
+ set_at: z.ZodString;
2593
+ override: z.ZodBoolean;
2594
+ }, z.core.$strict>>;
2595
+ email_type: z.ZodOptional<z.ZodObject<{
2596
+ value: z.ZodEnum<{
2597
+ unknown: "unknown";
2598
+ business: "business";
2599
+ personal: "personal";
2600
+ }>;
2601
+ set_at: z.ZodString;
2602
+ override: z.ZodBoolean;
2603
+ }, z.core.$strict>>;
2604
+ billing_health: z.ZodOptional<z.ZodObject<{
2605
+ value: z.ZodEnum<{
2606
+ payment_failed: "payment_failed";
2607
+ payment_method_missing: "payment_method_missing";
2608
+ cancelled: "cancelled";
2609
+ no_billing: "no_billing";
2610
+ good_standing: "good_standing";
2611
+ trial_payment_method_attached: "trial_payment_method_attached";
2612
+ payment_overdue: "payment_overdue";
2613
+ }>;
2614
+ set_at: z.ZodString;
2615
+ override: z.ZodBoolean;
2616
+ }, z.core.$strict>>;
2617
+ region: z.ZodOptional<z.ZodObject<{
2618
+ value: z.ZodEnum<{
2619
+ us_canada: "us_canada";
2620
+ europe: "europe";
2621
+ rest_of_world: "rest_of_world";
2622
+ }>;
2623
+ set_at: z.ZodString;
2624
+ override: z.ZodBoolean;
2625
+ }, z.core.$strict>>;
2626
+ device_type: z.ZodOptional<z.ZodObject<{
2627
+ value: z.ZodEnum<{
2628
+ unknown: "unknown";
2629
+ desktop: "desktop";
2630
+ mobile: "mobile";
2631
+ tablet: "tablet";
2632
+ }>;
2633
+ set_at: z.ZodString;
2634
+ override: z.ZodBoolean;
2635
+ }, z.core.$strict>>;
2636
+ }, z.core.$strict>>>;
2381
2637
  derived_config_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2382
2638
  context_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2383
2639
  derived_computed_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -2385,6 +2641,255 @@ declare const UserContextSchema: z.ZodObject<{
2385
2641
  activity_score_computed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2386
2642
  experiments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2387
2643
  }, z.core.$strip>;
2644
+ /**
2645
+ * Request body of `upsertServerUserContext` (`POST /api/sdk/user-contexts`):
2646
+ * the tenant backend's server-side write for one user — its seat assignment
2647
+ * and/or its built-in segment dimension values. The ONE server-key
2648
+ * user-context write (BL-0382 widened it rather than adding a sibling op).
2649
+ *
2650
+ * Deliberately NARROW and STRICT (plan 279 Q-2 (e)). The generic
2651
+ * `createUserContext` write accepts the whole writable {@link UserContextSchema}
2652
+ * — entitlement cache, `activity_score`, derived stamps — and stays
2653
+ * `exposure: 'internal'`; this is the only external user-context write, and it
2654
+ * carries exactly `user_id`, `seat_type_handle`, `builtin_dimensions` and
2655
+ * `override`. Every other key is rejected, so a tenant can never write
2656
+ * `entitlements`, `activity_score`, `custom` or a tenant id through a server key.
2657
+ *
2658
+ * - `seat_type_handle` (D-36): a handle assigns, `null` clears, OMITTED leaves
2659
+ * the assignment unchanged. The shape check here is the handle pattern only;
2660
+ * the control plane validates membership in the token tenant's CURRENT seat
2661
+ * types and answers 422 for an unknown handle (D-36 (c)).
2662
+ * - `builtin_dimensions` (D-46): a partial map of settable built-in dimension
2663
+ * (every delivered catalogue key except `seat_type`, which is
2664
+ * `seat_type_handle`) → a value from its closed vocabulary; `null` clears the
2665
+ * customer value and its pin for that key. Keys not named are untouched.
2666
+ * The control plane re-checks every value against the catalogue (422).
2667
+ * - `override` (D-47; default `false`) applies to the keys this call writes in
2668
+ * `builtin_dimensions`:
2669
+ * - `false` — an UPDATE. The value is delivered until a newer RevTurbine
2670
+ * enrichment change (Stripe subscription / trial / billing, the activity
2671
+ * job, request signals) supersedes it: last writer wins, enrichment
2672
+ * included. Writing a pinned key without the flag UNPINS it.
2673
+ * - `true` — an OVERRIDE. The customer pins the value: enrichment never
2674
+ * replaces it until the customer writes that key again without the flag,
2675
+ * or clears it with `null`.
2676
+ * `override` without `builtin_dimensions` is rejected.
2677
+ *
2678
+ * At least one of `seat_type_handle` / a non-empty `builtin_dimensions` must be
2679
+ * present: an empty write is neither an assignment nor an update. There is no
2680
+ * `tenant_id`: the tenant comes from the server token (D-27).
2681
+ */
2682
+ declare const ServerUserContextUpsertSchema: z.ZodObject<{
2683
+ user_id: z.ZodString;
2684
+ seat_type_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2685
+ builtin_dimensions: z.ZodOptional<z.ZodObject<{
2686
+ activity_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2687
+ new: "new";
2688
+ high: "high";
2689
+ medium: "medium";
2690
+ low: "low";
2691
+ inactive: "inactive";
2692
+ }>>>;
2693
+ subscription_state: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2694
+ trial: "trial";
2695
+ none: "none";
2696
+ paid: "paid";
2697
+ cancelled: "cancelled";
2698
+ }>>>;
2699
+ trial_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2700
+ none: "none";
2701
+ free_trial: "free_trial";
2702
+ reverse_trial: "reverse_trial";
2703
+ }>>>;
2704
+ buyer_role: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2705
+ buyer: "buyer";
2706
+ non_buyer: "non_buyer";
2707
+ }>>>;
2708
+ email_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2709
+ unknown: "unknown";
2710
+ business: "business";
2711
+ personal: "personal";
2712
+ }>>>;
2713
+ billing_health: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2714
+ payment_failed: "payment_failed";
2715
+ payment_method_missing: "payment_method_missing";
2716
+ cancelled: "cancelled";
2717
+ no_billing: "no_billing";
2718
+ good_standing: "good_standing";
2719
+ trial_payment_method_attached: "trial_payment_method_attached";
2720
+ payment_overdue: "payment_overdue";
2721
+ }>>>;
2722
+ region: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2723
+ us_canada: "us_canada";
2724
+ europe: "europe";
2725
+ rest_of_world: "rest_of_world";
2726
+ }>>>;
2727
+ device_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2728
+ unknown: "unknown";
2729
+ desktop: "desktop";
2730
+ mobile: "mobile";
2731
+ tablet: "tablet";
2732
+ }>>>;
2733
+ }, z.core.$strict>>;
2734
+ override: z.ZodOptional<z.ZodBoolean>;
2735
+ }, z.core.$strict>;
2736
+ /**
2737
+ * Response of `upsertServerUserContext`: the user's server-written state as
2738
+ * stored after the upsert. `tenant_id` is the tenant the server token resolved
2739
+ * to (never a request value).
2740
+ *
2741
+ * - `seat_type_handle` — always present, `null` when the user has no assignment.
2742
+ * - `builtin_dimensions` — every customer-set dimension value currently stored
2743
+ * (`{}` when none). These are the customer's INPUTS, not the delivered
2744
+ * values: delivery applies the D-47 precedence against enrichment.
2745
+ * - `overrides` — the keys of `builtin_dimensions` currently pinned
2746
+ * (`override: true`), sorted; `[]` when none.
2747
+ *
2748
+ * The generic context (entitlement cache, activity score, derived stamps) is
2749
+ * not echoed back.
2750
+ */
2751
+ declare const ServerUserContextAssignmentSchema: z.ZodObject<{
2752
+ updated_at: z.ZodString;
2753
+ tenant_id: z.ZodString;
2754
+ user_id: z.ZodString;
2755
+ seat_type_handle: z.ZodNullable<z.ZodString>;
2756
+ builtin_dimensions: z.ZodObject<{
2757
+ activity_level: z.ZodOptional<z.ZodEnum<{
2758
+ new: "new";
2759
+ high: "high";
2760
+ medium: "medium";
2761
+ low: "low";
2762
+ inactive: "inactive";
2763
+ }>>;
2764
+ subscription_state: z.ZodOptional<z.ZodEnum<{
2765
+ trial: "trial";
2766
+ none: "none";
2767
+ paid: "paid";
2768
+ cancelled: "cancelled";
2769
+ }>>;
2770
+ trial_type: z.ZodOptional<z.ZodEnum<{
2771
+ none: "none";
2772
+ free_trial: "free_trial";
2773
+ reverse_trial: "reverse_trial";
2774
+ }>>;
2775
+ buyer_role: z.ZodOptional<z.ZodEnum<{
2776
+ buyer: "buyer";
2777
+ non_buyer: "non_buyer";
2778
+ }>>;
2779
+ email_type: z.ZodOptional<z.ZodEnum<{
2780
+ unknown: "unknown";
2781
+ business: "business";
2782
+ personal: "personal";
2783
+ }>>;
2784
+ billing_health: z.ZodOptional<z.ZodEnum<{
2785
+ payment_failed: "payment_failed";
2786
+ payment_method_missing: "payment_method_missing";
2787
+ cancelled: "cancelled";
2788
+ no_billing: "no_billing";
2789
+ good_standing: "good_standing";
2790
+ trial_payment_method_attached: "trial_payment_method_attached";
2791
+ payment_overdue: "payment_overdue";
2792
+ }>>;
2793
+ region: z.ZodOptional<z.ZodEnum<{
2794
+ us_canada: "us_canada";
2795
+ europe: "europe";
2796
+ rest_of_world: "rest_of_world";
2797
+ }>>;
2798
+ device_type: z.ZodOptional<z.ZodEnum<{
2799
+ unknown: "unknown";
2800
+ desktop: "desktop";
2801
+ mobile: "mobile";
2802
+ tablet: "tablet";
2803
+ }>>;
2804
+ }, z.core.$strip>;
2805
+ overrides: z.ZodArray<z.ZodEnum<{
2806
+ trial_type: "trial_type";
2807
+ activity_level: "activity_level";
2808
+ subscription_state: "subscription_state";
2809
+ buyer_role: "buyer_role";
2810
+ email_type: "email_type";
2811
+ billing_health: "billing_health";
2812
+ region: "region";
2813
+ device_type: "device_type";
2814
+ }>>;
2815
+ }, z.core.$strip>;
2816
+ /**
2817
+ * Response of `getServerUserBuiltinDimensions`
2818
+ * (`GET /api/sdk/user-contexts/{userId}/builtin-dimensions`): the control
2819
+ * plane's server-resolved built-in segment dimensions for one user of the
2820
+ * token tenant (BL-0366 — the server-port counterpart of the client-context
2821
+ * lane).
2822
+ *
2823
+ * `builtin_dimensions` is the SERVER view, {@link UserBuiltinDimensionsSchema}
2824
+ * — the same keys and closed vocabularies the SDK's `buildTargetingState`
2825
+ * stamps onto `rt_*` traits. It is not the client-safe projection: the caller
2826
+ * is the tenant's own backend holding a server key. Every leaf is coarse
2827
+ * enum data today (no email, IP, country code, provider id), so the two
2828
+ * shapes carry the same values; the server view is simply not re-filtered.
2829
+ * An absent leaf means "not evaluated" (PD-4). The read carries no request
2830
+ * signals, so `region` and `device_type` — derived from the browser request
2831
+ * in the client lane — are always absent here.
2832
+ *
2833
+ * The SDK applies this object as an OVERLAY that wins over any app-set
2834
+ * `builtin_dimensions` leaf (PD-3). `tenant_id` is the tenant the server
2835
+ * token resolved to (D-27), never a request value; `resolved_at` is when the
2836
+ * control plane assembled the values (nothing is persisted or cached).
2837
+ */
2838
+ declare const ServerUserBuiltinDimensionsSchema: z.ZodObject<{
2839
+ tenant_id: z.ZodString;
2840
+ user_id: z.ZodString;
2841
+ builtin_dimensions: z.ZodObject<{
2842
+ activity_level: z.ZodOptional<z.ZodEnum<{
2843
+ new: "new";
2844
+ high: "high";
2845
+ medium: "medium";
2846
+ low: "low";
2847
+ inactive: "inactive";
2848
+ }>>;
2849
+ subscription_state: z.ZodOptional<z.ZodEnum<{
2850
+ trial: "trial";
2851
+ none: "none";
2852
+ paid: "paid";
2853
+ cancelled: "cancelled";
2854
+ }>>;
2855
+ trial_type: z.ZodOptional<z.ZodEnum<{
2856
+ none: "none";
2857
+ free_trial: "free_trial";
2858
+ reverse_trial: "reverse_trial";
2859
+ }>>;
2860
+ seat_type: z.ZodOptional<z.ZodString>;
2861
+ buyer_role: z.ZodOptional<z.ZodEnum<{
2862
+ buyer: "buyer";
2863
+ non_buyer: "non_buyer";
2864
+ }>>;
2865
+ email_type: z.ZodOptional<z.ZodEnum<{
2866
+ unknown: "unknown";
2867
+ business: "business";
2868
+ personal: "personal";
2869
+ }>>;
2870
+ billing_health: z.ZodOptional<z.ZodEnum<{
2871
+ payment_failed: "payment_failed";
2872
+ payment_method_missing: "payment_method_missing";
2873
+ cancelled: "cancelled";
2874
+ no_billing: "no_billing";
2875
+ good_standing: "good_standing";
2876
+ trial_payment_method_attached: "trial_payment_method_attached";
2877
+ payment_overdue: "payment_overdue";
2878
+ }>>;
2879
+ region: z.ZodOptional<z.ZodEnum<{
2880
+ us_canada: "us_canada";
2881
+ europe: "europe";
2882
+ rest_of_world: "rest_of_world";
2883
+ }>>;
2884
+ device_type: z.ZodOptional<z.ZodEnum<{
2885
+ unknown: "unknown";
2886
+ desktop: "desktop";
2887
+ mobile: "mobile";
2888
+ tablet: "tablet";
2889
+ }>>;
2890
+ }, z.core.$strip>;
2891
+ resolved_at: z.ZodString;
2892
+ }, z.core.$strip>;
2388
2893
  declare const ClientContextSchema: z.ZodObject<{
2389
2894
  subject: z.ZodString;
2390
2895
  context_version: z.ZodOptional<z.ZodString>;
@@ -2448,6 +2953,15 @@ declare const ClientContextSchema: z.ZodObject<{
2448
2953
  business: "business";
2449
2954
  personal: "personal";
2450
2955
  }>>;
2956
+ billing_health: z.ZodOptional<z.ZodEnum<{
2957
+ payment_failed: "payment_failed";
2958
+ payment_method_missing: "payment_method_missing";
2959
+ cancelled: "cancelled";
2960
+ no_billing: "no_billing";
2961
+ good_standing: "good_standing";
2962
+ trial_payment_method_attached: "trial_payment_method_attached";
2963
+ payment_overdue: "payment_overdue";
2964
+ }>>;
2451
2965
  region: z.ZodOptional<z.ZodEnum<{
2452
2966
  us_canada: "us_canada";
2453
2967
  europe: "europe";
@@ -11512,12 +12026,45 @@ declare function resolveSubscriptionEvidence(input: EvidenceResolution): Subscri
11512
12026
  * (`StripeSubscriptionStatusSchema`) and the same scope object
11513
12027
  * (`StripeBillingScopeSchema`, extended with provider + simulation).
11514
12028
  *
12029
+ * ## TASK-28 extensions (BL-0292) — additive on the same families
12030
+ *
12031
+ * Plan 252 TASK-28 extends these profiles in place; every addition is a new
12032
+ * `kind` or an OPTIONAL field, so every 0.1.364 fact still validates:
12033
+ *
12034
+ * - **Exact recurrence.** Interval and interval count stay on each item's
12035
+ * price (mixed item intervals are real); the subscription-level
12036
+ * {@link BillingRecurrenceSchema} carries the billing-cycle anchor,
12037
+ * proration behavior, billing mode and collection method. Exact
12038
+ * per-unit / package (`transform_quantity`) / graduated / volume terms ride
12039
+ * on {@link BillingPriceTermsSchema}; a null `unit_amount_minor` without
12040
+ * terms is a `missing_price_terms` coverage gap, never a `unit * quantity`
12041
+ * guess. The normalization arithmetic is TASK-29.
12042
+ * - **Economic owner.** {@link BillingEconomicOwnerSchema} names the provider
12043
+ * account whose books own a money movement (platform vs connected account,
12044
+ * Connect charge type). The payer is `customer_ref`; the RevTurbine account
12045
+ * is the envelope's `context.groupId`. Three different things.
12046
+ * - **InvoicePayment allocations.** `invoice.payment_allocation` is one edge
12047
+ * of the paginated many-to-many invoice↔payment relation, with requested vs
12048
+ * allocated (`amount_paid_minor`) amounts. Its occurrence is the
12049
+ * InvoicePayment object itself.
12050
+ * - **Receivable transitions.** `invoice.status_transition` is a repeatable
12051
+ * `from_status → to_status` revision (finalize, settle, void, write off,
12052
+ * recover) with due / paid / remaining amounts and the settlement basis
12053
+ * (payments, zero total, customer balance, credit note, rollover, out of
12054
+ * band). {@link INVOICE_RECEIVABLE_TRANSITIONS} is the allowed table.
12055
+ * - **Balance / loss references.** Balance adjustments name their source and
12056
+ * credit note; grant applications link their funding occurrence; dispute
12057
+ * reinstatements link the withdrawal they reverse; loss movements carry the
12058
+ * processor-settlement amount separately from the payment currency.
12059
+ *
12060
+ * The derived accounting contracts — immutable accounting revisions,
12061
+ * provider→RT mapping revisions, output generations and coverage /
12062
+ * generation checkpoints — are in `billing-accounting.ts`.
12063
+ *
11515
12064
  * ## What this file does NOT own (later plan 252 tasks)
11516
12065
  *
11517
- * InvoicePayment allocations, economic-owner/Connect ownership, exact tier /
11518
- * package price terms, receivable transitions (void / uncollectible /
11519
- * recovery) and coverage checkpoints are TASK-28/29; the numeric oracles are
11520
- * TASK-45/46/48/57. Nothing here computes MRR.
12066
+ * Ordered discounts and the recurring normalization are TASK-29; the numeric
12067
+ * oracles are TASK-45/46/48/57. Nothing here computes MRR.
11521
12068
  *
11522
12069
  * Classification (plan 157 exposure, BL-0131 D-19 identities): every amount
11523
12070
  * and provider object id is `financial` + server-only; times, kinds and
@@ -11550,6 +12097,7 @@ declare const BillingSourceScopeSchema: z.ZodObject<{
11550
12097
  }>;
11551
12098
  simulation_id: z.ZodOptional<z.ZodString>;
11552
12099
  }, z.core.$strict>;
12100
+ type BillingSourceScope$1 = z.infer<typeof BillingSourceScopeSchema>;
11553
12101
  /** Occurrence of a SINGULAR kind: the subject object is itself the occurrence. */
11554
12102
  declare const BillingOccurrenceSchema: z.ZodObject<{
11555
12103
  identity_version: z.ZodLiteral<2>;
@@ -11571,7 +12119,56 @@ declare const BillingRepeatableOccurrenceSchema: z.ZodObject<{
11571
12119
  delivery_id: z.ZodOptional<z.ZodString>;
11572
12120
  legacy_billing_ref: z.ZodOptional<z.ZodString>;
11573
12121
  }, z.core.$strict>;
11574
- /** Recurring price terms of one item. Tier/package terms are TASK-29; `unit_amount_minor` is null for them. */
12122
+ /** Upper bound on price tiers (Stripe allows far fewer; this is a safety bound). */
12123
+ declare const MAX_BILLING_PRICE_TIERS = 100;
12124
+ /** One price tier. `up_to: null` is the open-ended last tier (Stripe `inf`). */
12125
+ declare const BillingPriceTierSchema: z.ZodObject<{
12126
+ up_to: z.ZodNullable<z.ZodNumber>;
12127
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
12128
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
12129
+ }, z.core.$strict>;
12130
+ /**
12131
+ * The exact price terms behind a recurring price (plan 252 A-2: tier,
12132
+ * volume and package transforms need the actual terms — `unit_price *
12133
+ * quantity` is not a universal implementation).
12134
+ *
12135
+ * - `per_unit` — `unit_amount_decimal` per unit, optionally after a
12136
+ * `transform_quantity` (package pricing: divide by N, round up/down).
12137
+ * - `tiered` — `graduated` (each tier prices its own units) or `volume` (the
12138
+ * tier the total falls in prices every unit), tiers ascending, the last one
12139
+ * open-ended.
12140
+ *
12141
+ * Shape only: the charge arithmetic (graduated 116 vs volume 96 vs pack 60)
12142
+ * is TASK-29's normalization.
12143
+ */
12144
+ declare const BillingPriceTermsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
12145
+ billing_scheme: z.ZodLiteral<"per_unit">;
12146
+ unit_amount_decimal: z.ZodString;
12147
+ transform_quantity: z.ZodNullable<z.ZodObject<{
12148
+ divide_by: z.ZodNumber;
12149
+ round: z.ZodEnum<{
12150
+ up: "up";
12151
+ down: "down";
12152
+ }>;
12153
+ }, z.core.$strict>>;
12154
+ }, z.core.$strict>, z.ZodObject<{
12155
+ billing_scheme: z.ZodLiteral<"tiered">;
12156
+ tiers_mode: z.ZodEnum<{
12157
+ graduated: "graduated";
12158
+ volume: "volume";
12159
+ }>;
12160
+ tiers: z.ZodArray<z.ZodObject<{
12161
+ up_to: z.ZodNullable<z.ZodNumber>;
12162
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
12163
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
12164
+ }, z.core.$strict>>;
12165
+ }, z.core.$strict>], "billing_scheme">;
12166
+ /**
12167
+ * Recurring price of one item: interval and interval count are exact per
12168
+ * item (items on one subscription may bill on different intervals).
12169
+ * `unit_amount_minor` is null for tiered/package prices, whose exact
12170
+ * `terms` ride alongside; a null amount WITHOUT terms is a coverage gap.
12171
+ */
11575
12172
  declare const BillingRecurringPriceSchema: z.ZodObject<{
11576
12173
  price_id: z.ZodString;
11577
12174
  product_id: z.ZodOptional<z.ZodString>;
@@ -11587,6 +12184,77 @@ declare const BillingRecurringPriceSchema: z.ZodObject<{
11587
12184
  licensed: "licensed";
11588
12185
  }>;
11589
12186
  unit_amount_minor: z.ZodNullable<z.ZodString>;
12187
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
12188
+ billing_scheme: z.ZodLiteral<"per_unit">;
12189
+ unit_amount_decimal: z.ZodString;
12190
+ transform_quantity: z.ZodNullable<z.ZodObject<{
12191
+ divide_by: z.ZodNumber;
12192
+ round: z.ZodEnum<{
12193
+ up: "up";
12194
+ down: "down";
12195
+ }>;
12196
+ }, z.core.$strict>>;
12197
+ }, z.core.$strict>, z.ZodObject<{
12198
+ billing_scheme: z.ZodLiteral<"tiered">;
12199
+ tiers_mode: z.ZodEnum<{
12200
+ graduated: "graduated";
12201
+ volume: "volume";
12202
+ }>;
12203
+ tiers: z.ZodArray<z.ZodObject<{
12204
+ up_to: z.ZodNullable<z.ZodNumber>;
12205
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
12206
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
12207
+ }, z.core.$strict>>;
12208
+ }, z.core.$strict>], "billing_scheme">>;
12209
+ }, z.core.$strict>;
12210
+ /**
12211
+ * Exact subscription-level recurrence (TASK-28). The billing interval itself
12212
+ * is per item price; this carries what the whole subscription shares.
12213
+ */
12214
+ declare const BillingRecurrenceSchema: z.ZodObject<{
12215
+ billing_cycle_anchor_at: z.ZodISODateTime;
12216
+ proration_behavior: z.ZodEnum<{
12217
+ none: "none";
12218
+ create_prorations: "create_prorations";
12219
+ always_invoice: "always_invoice";
12220
+ }>;
12221
+ billing_mode: z.ZodOptional<z.ZodEnum<{
12222
+ classic: "classic";
12223
+ flexible: "flexible";
12224
+ }>>;
12225
+ collection_method: z.ZodEnum<{
12226
+ charge_automatically: "charge_automatically";
12227
+ send_invoice: "send_invoice";
12228
+ }>;
12229
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
12230
+ }, z.core.$strict>;
12231
+ /**
12232
+ * Who owns a money movement economically (plan 252 A-12; Stripe Connect
12233
+ * charge ownership). A provider account that can SEE a movement is not
12234
+ * necessarily its owner: a destination charge appears on the platform and,
12235
+ * as a transfer/payment, on the connected account — one sale, counted only in
12236
+ * the owner's scope ({@link billingEconomicOwnership}).
12237
+ */
12238
+ declare const BillingEconomicOwnerSchema: z.ZodObject<{
12239
+ owner_account_id: z.ZodString;
12240
+ charge_type: z.ZodEnum<{
12241
+ platform: "platform";
12242
+ direct: "direct";
12243
+ destination: "destination";
12244
+ separate_charges_and_transfers: "separate_charges_and_transfers";
12245
+ }>;
12246
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12247
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12248
+ }, z.core.$strict>;
12249
+ /**
12250
+ * An amount in the processor's SETTLEMENT currency, kept apart from the
12251
+ * payment currency (A-12: a USD withdrawal is never subtracted from a EUR
12252
+ * invoice without an authoritative compatible basis).
12253
+ */
12254
+ declare const BillingSettlementAmountSchema: z.ZodObject<{
12255
+ amount_minor: z.ZodString;
12256
+ currency: z.ZodString;
12257
+ currency_exponent: z.ZodNumber;
11590
12258
  }, z.core.$strict>;
11591
12259
  /**
11592
12260
  * One subscription item AS OF this revision — a revision of plan 248's
@@ -11609,6 +12277,28 @@ declare const BillingSubscriptionItemSnapshotSchema: z.ZodObject<{
11609
12277
  licensed: "licensed";
11610
12278
  }>;
11611
12279
  unit_amount_minor: z.ZodNullable<z.ZodString>;
12280
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
12281
+ billing_scheme: z.ZodLiteral<"per_unit">;
12282
+ unit_amount_decimal: z.ZodString;
12283
+ transform_quantity: z.ZodNullable<z.ZodObject<{
12284
+ divide_by: z.ZodNumber;
12285
+ round: z.ZodEnum<{
12286
+ up: "up";
12287
+ down: "down";
12288
+ }>;
12289
+ }, z.core.$strict>>;
12290
+ }, z.core.$strict>, z.ZodObject<{
12291
+ billing_scheme: z.ZodLiteral<"tiered">;
12292
+ tiers_mode: z.ZodEnum<{
12293
+ graduated: "graduated";
12294
+ volume: "volume";
12295
+ }>;
12296
+ tiers: z.ZodArray<z.ZodObject<{
12297
+ up_to: z.ZodNullable<z.ZodNumber>;
12298
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
12299
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
12300
+ }, z.core.$strict>>;
12301
+ }, z.core.$strict>], "billing_scheme">>;
11612
12302
  }, z.core.$strict>;
11613
12303
  quantity: z.ZodNumber;
11614
12304
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -11631,6 +12321,28 @@ declare const BillingSubscriptionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodOb
11631
12321
  licensed: "licensed";
11632
12322
  }>;
11633
12323
  unit_amount_minor: z.ZodNullable<z.ZodString>;
12324
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
12325
+ billing_scheme: z.ZodLiteral<"per_unit">;
12326
+ unit_amount_decimal: z.ZodString;
12327
+ transform_quantity: z.ZodNullable<z.ZodObject<{
12328
+ divide_by: z.ZodNumber;
12329
+ round: z.ZodEnum<{
12330
+ up: "up";
12331
+ down: "down";
12332
+ }>;
12333
+ }, z.core.$strict>>;
12334
+ }, z.core.$strict>, z.ZodObject<{
12335
+ billing_scheme: z.ZodLiteral<"tiered">;
12336
+ tiers_mode: z.ZodEnum<{
12337
+ graduated: "graduated";
12338
+ volume: "volume";
12339
+ }>;
12340
+ tiers: z.ZodArray<z.ZodObject<{
12341
+ up_to: z.ZodNullable<z.ZodNumber>;
12342
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
12343
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
12344
+ }, z.core.$strict>>;
12345
+ }, z.core.$strict>], "billing_scheme">>;
11634
12346
  }, z.core.$strict>;
11635
12347
  quantity: z.ZodNumber;
11636
12348
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -11639,6 +12351,23 @@ declare const BillingSubscriptionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodOb
11639
12351
  complete: "complete";
11640
12352
  partial: "partial";
11641
12353
  }>;
12354
+ recurrence: z.ZodOptional<z.ZodObject<{
12355
+ billing_cycle_anchor_at: z.ZodISODateTime;
12356
+ proration_behavior: z.ZodEnum<{
12357
+ none: "none";
12358
+ create_prorations: "create_prorations";
12359
+ always_invoice: "always_invoice";
12360
+ }>;
12361
+ billing_mode: z.ZodOptional<z.ZodEnum<{
12362
+ classic: "classic";
12363
+ flexible: "flexible";
12364
+ }>>;
12365
+ collection_method: z.ZodEnum<{
12366
+ charge_automatically: "charge_automatically";
12367
+ send_invoice: "send_invoice";
12368
+ }>;
12369
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
12370
+ }, z.core.$strict>>;
11642
12371
  currency: z.ZodString;
11643
12372
  currency_exponent: z.ZodNumber;
11644
12373
  subscription_id: z.ZodString;
@@ -11696,6 +12425,28 @@ declare const BillingSubscriptionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodOb
11696
12425
  licensed: "licensed";
11697
12426
  }>;
11698
12427
  unit_amount_minor: z.ZodNullable<z.ZodString>;
12428
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
12429
+ billing_scheme: z.ZodLiteral<"per_unit">;
12430
+ unit_amount_decimal: z.ZodString;
12431
+ transform_quantity: z.ZodNullable<z.ZodObject<{
12432
+ divide_by: z.ZodNumber;
12433
+ round: z.ZodEnum<{
12434
+ up: "up";
12435
+ down: "down";
12436
+ }>;
12437
+ }, z.core.$strict>>;
12438
+ }, z.core.$strict>, z.ZodObject<{
12439
+ billing_scheme: z.ZodLiteral<"tiered">;
12440
+ tiers_mode: z.ZodEnum<{
12441
+ graduated: "graduated";
12442
+ volume: "volume";
12443
+ }>;
12444
+ tiers: z.ZodArray<z.ZodObject<{
12445
+ up_to: z.ZodNullable<z.ZodNumber>;
12446
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
12447
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
12448
+ }, z.core.$strict>>;
12449
+ }, z.core.$strict>], "billing_scheme">>;
11699
12450
  }, z.core.$strict>;
11700
12451
  quantity: z.ZodNumber;
11701
12452
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -11704,6 +12455,23 @@ declare const BillingSubscriptionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodOb
11704
12455
  complete: "complete";
11705
12456
  partial: "partial";
11706
12457
  }>;
12458
+ recurrence: z.ZodOptional<z.ZodObject<{
12459
+ billing_cycle_anchor_at: z.ZodISODateTime;
12460
+ proration_behavior: z.ZodEnum<{
12461
+ none: "none";
12462
+ create_prorations: "create_prorations";
12463
+ always_invoice: "always_invoice";
12464
+ }>;
12465
+ billing_mode: z.ZodOptional<z.ZodEnum<{
12466
+ classic: "classic";
12467
+ flexible: "flexible";
12468
+ }>>;
12469
+ collection_method: z.ZodEnum<{
12470
+ charge_automatically: "charge_automatically";
12471
+ send_invoice: "send_invoice";
12472
+ }>;
12473
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
12474
+ }, z.core.$strict>>;
11707
12475
  currency: z.ZodString;
11708
12476
  currency_exponent: z.ZodNumber;
11709
12477
  subscription_id: z.ZodString;
@@ -11763,6 +12531,28 @@ declare const BillingSubscriptionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodOb
11763
12531
  licensed: "licensed";
11764
12532
  }>;
11765
12533
  unit_amount_minor: z.ZodNullable<z.ZodString>;
12534
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
12535
+ billing_scheme: z.ZodLiteral<"per_unit">;
12536
+ unit_amount_decimal: z.ZodString;
12537
+ transform_quantity: z.ZodNullable<z.ZodObject<{
12538
+ divide_by: z.ZodNumber;
12539
+ round: z.ZodEnum<{
12540
+ up: "up";
12541
+ down: "down";
12542
+ }>;
12543
+ }, z.core.$strict>>;
12544
+ }, z.core.$strict>, z.ZodObject<{
12545
+ billing_scheme: z.ZodLiteral<"tiered">;
12546
+ tiers_mode: z.ZodEnum<{
12547
+ graduated: "graduated";
12548
+ volume: "volume";
12549
+ }>;
12550
+ tiers: z.ZodArray<z.ZodObject<{
12551
+ up_to: z.ZodNullable<z.ZodNumber>;
12552
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
12553
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
12554
+ }, z.core.$strict>>;
12555
+ }, z.core.$strict>], "billing_scheme">>;
11766
12556
  }, z.core.$strict>;
11767
12557
  quantity: z.ZodNumber;
11768
12558
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -11771,6 +12561,23 @@ declare const BillingSubscriptionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodOb
11771
12561
  complete: "complete";
11772
12562
  partial: "partial";
11773
12563
  }>;
12564
+ recurrence: z.ZodOptional<z.ZodObject<{
12565
+ billing_cycle_anchor_at: z.ZodISODateTime;
12566
+ proration_behavior: z.ZodEnum<{
12567
+ none: "none";
12568
+ create_prorations: "create_prorations";
12569
+ always_invoice: "always_invoice";
12570
+ }>;
12571
+ billing_mode: z.ZodOptional<z.ZodEnum<{
12572
+ classic: "classic";
12573
+ flexible: "flexible";
12574
+ }>>;
12575
+ collection_method: z.ZodEnum<{
12576
+ charge_automatically: "charge_automatically";
12577
+ send_invoice: "send_invoice";
12578
+ }>;
12579
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
12580
+ }, z.core.$strict>>;
11774
12581
  currency: z.ZodString;
11775
12582
  currency_exponent: z.ZodNumber;
11776
12583
  subscription_id: z.ZodString;
@@ -11935,6 +12742,28 @@ declare const BillingSubscriptionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodOb
11935
12742
  licensed: "licensed";
11936
12743
  }>;
11937
12744
  unit_amount_minor: z.ZodNullable<z.ZodString>;
12745
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
12746
+ billing_scheme: z.ZodLiteral<"per_unit">;
12747
+ unit_amount_decimal: z.ZodString;
12748
+ transform_quantity: z.ZodNullable<z.ZodObject<{
12749
+ divide_by: z.ZodNumber;
12750
+ round: z.ZodEnum<{
12751
+ up: "up";
12752
+ down: "down";
12753
+ }>;
12754
+ }, z.core.$strict>>;
12755
+ }, z.core.$strict>, z.ZodObject<{
12756
+ billing_scheme: z.ZodLiteral<"tiered">;
12757
+ tiers_mode: z.ZodEnum<{
12758
+ graduated: "graduated";
12759
+ volume: "volume";
12760
+ }>;
12761
+ tiers: z.ZodArray<z.ZodObject<{
12762
+ up_to: z.ZodNullable<z.ZodNumber>;
12763
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
12764
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
12765
+ }, z.core.$strict>>;
12766
+ }, z.core.$strict>], "billing_scheme">>;
11938
12767
  }, z.core.$strict>;
11939
12768
  quantity: z.ZodNumber;
11940
12769
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -11943,6 +12772,23 @@ declare const BillingSubscriptionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodOb
11943
12772
  complete: "complete";
11944
12773
  partial: "partial";
11945
12774
  }>;
12775
+ recurrence: z.ZodOptional<z.ZodObject<{
12776
+ billing_cycle_anchor_at: z.ZodISODateTime;
12777
+ proration_behavior: z.ZodEnum<{
12778
+ none: "none";
12779
+ create_prorations: "create_prorations";
12780
+ always_invoice: "always_invoice";
12781
+ }>;
12782
+ billing_mode: z.ZodOptional<z.ZodEnum<{
12783
+ classic: "classic";
12784
+ flexible: "flexible";
12785
+ }>>;
12786
+ collection_method: z.ZodEnum<{
12787
+ charge_automatically: "charge_automatically";
12788
+ send_invoice: "send_invoice";
12789
+ }>;
12790
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
12791
+ }, z.core.$strict>>;
11946
12792
  currency: z.ZodString;
11947
12793
  currency_exponent: z.ZodNumber;
11948
12794
  subscription_id: z.ZodString;
@@ -12002,6 +12848,28 @@ declare const BillingSubscriptionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodOb
12002
12848
  licensed: "licensed";
12003
12849
  }>;
12004
12850
  unit_amount_minor: z.ZodNullable<z.ZodString>;
12851
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
12852
+ billing_scheme: z.ZodLiteral<"per_unit">;
12853
+ unit_amount_decimal: z.ZodString;
12854
+ transform_quantity: z.ZodNullable<z.ZodObject<{
12855
+ divide_by: z.ZodNumber;
12856
+ round: z.ZodEnum<{
12857
+ up: "up";
12858
+ down: "down";
12859
+ }>;
12860
+ }, z.core.$strict>>;
12861
+ }, z.core.$strict>, z.ZodObject<{
12862
+ billing_scheme: z.ZodLiteral<"tiered">;
12863
+ tiers_mode: z.ZodEnum<{
12864
+ graduated: "graduated";
12865
+ volume: "volume";
12866
+ }>;
12867
+ tiers: z.ZodArray<z.ZodObject<{
12868
+ up_to: z.ZodNullable<z.ZodNumber>;
12869
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
12870
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
12871
+ }, z.core.$strict>>;
12872
+ }, z.core.$strict>], "billing_scheme">>;
12005
12873
  }, z.core.$strict>;
12006
12874
  quantity: z.ZodNumber;
12007
12875
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -12010,6 +12878,23 @@ declare const BillingSubscriptionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodOb
12010
12878
  complete: "complete";
12011
12879
  partial: "partial";
12012
12880
  }>;
12881
+ recurrence: z.ZodOptional<z.ZodObject<{
12882
+ billing_cycle_anchor_at: z.ZodISODateTime;
12883
+ proration_behavior: z.ZodEnum<{
12884
+ none: "none";
12885
+ create_prorations: "create_prorations";
12886
+ always_invoice: "always_invoice";
12887
+ }>;
12888
+ billing_mode: z.ZodOptional<z.ZodEnum<{
12889
+ classic: "classic";
12890
+ flexible: "flexible";
12891
+ }>>;
12892
+ collection_method: z.ZodEnum<{
12893
+ charge_automatically: "charge_automatically";
12894
+ send_invoice: "send_invoice";
12895
+ }>;
12896
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
12897
+ }, z.core.$strict>>;
12013
12898
  currency: z.ZodString;
12014
12899
  currency_exponent: z.ZodNumber;
12015
12900
  subscription_id: z.ZodString;
@@ -12135,6 +13020,28 @@ declare const BillingSubscriptionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodOb
12135
13020
  licensed: "licensed";
12136
13021
  }>;
12137
13022
  unit_amount_minor: z.ZodNullable<z.ZodString>;
13023
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
13024
+ billing_scheme: z.ZodLiteral<"per_unit">;
13025
+ unit_amount_decimal: z.ZodString;
13026
+ transform_quantity: z.ZodNullable<z.ZodObject<{
13027
+ divide_by: z.ZodNumber;
13028
+ round: z.ZodEnum<{
13029
+ up: "up";
13030
+ down: "down";
13031
+ }>;
13032
+ }, z.core.$strict>>;
13033
+ }, z.core.$strict>, z.ZodObject<{
13034
+ billing_scheme: z.ZodLiteral<"tiered">;
13035
+ tiers_mode: z.ZodEnum<{
13036
+ graduated: "graduated";
13037
+ volume: "volume";
13038
+ }>;
13039
+ tiers: z.ZodArray<z.ZodObject<{
13040
+ up_to: z.ZodNullable<z.ZodNumber>;
13041
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
13042
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
13043
+ }, z.core.$strict>>;
13044
+ }, z.core.$strict>], "billing_scheme">>;
12138
13045
  }, z.core.$strict>;
12139
13046
  quantity: z.ZodNumber;
12140
13047
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -12143,6 +13050,23 @@ declare const BillingSubscriptionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodOb
12143
13050
  complete: "complete";
12144
13051
  partial: "partial";
12145
13052
  }>;
13053
+ recurrence: z.ZodOptional<z.ZodObject<{
13054
+ billing_cycle_anchor_at: z.ZodISODateTime;
13055
+ proration_behavior: z.ZodEnum<{
13056
+ none: "none";
13057
+ create_prorations: "create_prorations";
13058
+ always_invoice: "always_invoice";
13059
+ }>;
13060
+ billing_mode: z.ZodOptional<z.ZodEnum<{
13061
+ classic: "classic";
13062
+ flexible: "flexible";
13063
+ }>>;
13064
+ collection_method: z.ZodEnum<{
13065
+ charge_automatically: "charge_automatically";
13066
+ send_invoice: "send_invoice";
13067
+ }>;
13068
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
13069
+ }, z.core.$strict>>;
12146
13070
  currency: z.ZodString;
12147
13071
  currency_exponent: z.ZodNumber;
12148
13072
  subscription_id: z.ZodString;
@@ -12201,6 +13125,28 @@ declare const BillingScheduleProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject
12201
13125
  licensed: "licensed";
12202
13126
  }>;
12203
13127
  unit_amount_minor: z.ZodNullable<z.ZodString>;
13128
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
13129
+ billing_scheme: z.ZodLiteral<"per_unit">;
13130
+ unit_amount_decimal: z.ZodString;
13131
+ transform_quantity: z.ZodNullable<z.ZodObject<{
13132
+ divide_by: z.ZodNumber;
13133
+ round: z.ZodEnum<{
13134
+ up: "up";
13135
+ down: "down";
13136
+ }>;
13137
+ }, z.core.$strict>>;
13138
+ }, z.core.$strict>, z.ZodObject<{
13139
+ billing_scheme: z.ZodLiteral<"tiered">;
13140
+ tiers_mode: z.ZodEnum<{
13141
+ graduated: "graduated";
13142
+ volume: "volume";
13143
+ }>;
13144
+ tiers: z.ZodArray<z.ZodObject<{
13145
+ up_to: z.ZodNullable<z.ZodNumber>;
13146
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
13147
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
13148
+ }, z.core.$strict>>;
13149
+ }, z.core.$strict>], "billing_scheme">>;
12204
13150
  }, z.core.$strict>;
12205
13151
  quantity: z.ZodNumber;
12206
13152
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -12210,6 +13156,23 @@ declare const BillingScheduleProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject
12210
13156
  complete: "complete";
12211
13157
  partial: "partial";
12212
13158
  }>;
13159
+ recurrence: z.ZodOptional<z.ZodObject<{
13160
+ billing_cycle_anchor_at: z.ZodISODateTime;
13161
+ proration_behavior: z.ZodEnum<{
13162
+ none: "none";
13163
+ create_prorations: "create_prorations";
13164
+ always_invoice: "always_invoice";
13165
+ }>;
13166
+ billing_mode: z.ZodOptional<z.ZodEnum<{
13167
+ classic: "classic";
13168
+ flexible: "flexible";
13169
+ }>>;
13170
+ collection_method: z.ZodEnum<{
13171
+ charge_automatically: "charge_automatically";
13172
+ send_invoice: "send_invoice";
13173
+ }>;
13174
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
13175
+ }, z.core.$strict>>;
12213
13176
  currency: z.ZodString;
12214
13177
  currency_exponent: z.ZodNumber;
12215
13178
  schedule_id: z.ZodString;
@@ -12327,6 +13290,48 @@ declare const BillingScheduleProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject
12327
13290
  }, z.core.$strict>;
12328
13291
  customer_ref: z.ZodString;
12329
13292
  }, z.core.$strict>], "kind">;
13293
+ /** Provider invoice status (Stripe). */
13294
+ declare const InvoiceStatusSchema: z.ZodEnum<{
13295
+ void: "void";
13296
+ paid: "paid";
13297
+ draft: "draft";
13298
+ open: "open";
13299
+ uncollectible: "uncollectible";
13300
+ }>;
13301
+ type InvoiceStatus$1 = z.infer<typeof InvoiceStatusSchema>;
13302
+ /**
13303
+ * How an invoice reached `paid` (plan 252 A-11). Only `payments` (and the
13304
+ * payment part of `mixed`) can involve fresh cash, and even then the cash is
13305
+ * the InvoicePayment allocations, never this status.
13306
+ */
13307
+ declare const InvoiceSettlementBasisSchema: z.ZodEnum<{
13308
+ mixed: "mixed";
13309
+ payments: "payments";
13310
+ zero_total: "zero_total";
13311
+ customer_balance: "customer_balance";
13312
+ credit_note: "credit_note";
13313
+ rollover: "rollover";
13314
+ out_of_band: "out_of_band";
13315
+ }>;
13316
+ /** Status of one InvoicePayment edge (Stripe). Named, so generated port enums do not renumber. */
13317
+ declare const InvoicePaymentStatusSchema: z.ZodEnum<{
13318
+ canceled: "canceled";
13319
+ paid: "paid";
13320
+ open: "open";
13321
+ }>;
13322
+ /**
13323
+ * What funded one InvoicePayment. An `out_of_band` edge names no provider
13324
+ * payment: it is external settlement with unknown cash coverage.
13325
+ */
13326
+ declare const BillingInvoicePaymentSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
13327
+ type: z.ZodLiteral<"payment_intent">;
13328
+ payment_id: z.ZodString;
13329
+ }, z.core.$strict>, z.ZodObject<{
13330
+ type: z.ZodLiteral<"charge">;
13331
+ payment_id: z.ZodString;
13332
+ }, z.core.$strict>, z.ZodObject<{
13333
+ type: z.ZodLiteral<"out_of_band">;
13334
+ }, z.core.$strict>], "type">;
12330
13335
  declare const BillingInvoiceProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
12331
13336
  total_minor: z.ZodString;
12332
13337
  amount_due_minor: z.ZodString;
@@ -12336,6 +13341,11 @@ declare const BillingInvoiceProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
12336
13341
  complete: "complete";
12337
13342
  partial: "partial";
12338
13343
  }>;
13344
+ payment_count: z.ZodOptional<z.ZodNumber>;
13345
+ payments_coverage: z.ZodOptional<z.ZodEnum<{
13346
+ complete: "complete";
13347
+ partial: "partial";
13348
+ }>>;
12339
13349
  currency: z.ZodString;
12340
13350
  currency_exponent: z.ZodNumber;
12341
13351
  invoice_id: z.ZodString;
@@ -12389,6 +13399,28 @@ declare const BillingInvoiceProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
12389
13399
  licensed: "licensed";
12390
13400
  }>;
12391
13401
  unit_amount_minor: z.ZodNullable<z.ZodString>;
13402
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
13403
+ billing_scheme: z.ZodLiteral<"per_unit">;
13404
+ unit_amount_decimal: z.ZodString;
13405
+ transform_quantity: z.ZodNullable<z.ZodObject<{
13406
+ divide_by: z.ZodNumber;
13407
+ round: z.ZodEnum<{
13408
+ up: "up";
13409
+ down: "down";
13410
+ }>;
13411
+ }, z.core.$strict>>;
13412
+ }, z.core.$strict>, z.ZodObject<{
13413
+ billing_scheme: z.ZodLiteral<"tiered">;
13414
+ tiers_mode: z.ZodEnum<{
13415
+ graduated: "graduated";
13416
+ volume: "volume";
13417
+ }>;
13418
+ tiers: z.ZodArray<z.ZodObject<{
13419
+ up_to: z.ZodNullable<z.ZodNumber>;
13420
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
13421
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
13422
+ }, z.core.$strict>>;
13423
+ }, z.core.$strict>], "billing_scheme">>;
12392
13424
  }, z.core.$strict>;
12393
13425
  quantity: z.ZodNumber;
12394
13426
  service_period_start_at: z.ZodISODateTime;
@@ -12495,17 +13527,159 @@ declare const BillingInvoiceProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
12495
13527
  legacy_billing_ref: z.ZodOptional<z.ZodString>;
12496
13528
  }, z.core.$strict>;
12497
13529
  customer_ref: z.ZodString;
13530
+ }, z.core.$strict>, z.ZodObject<{
13531
+ economic_owner: z.ZodOptional<z.ZodObject<{
13532
+ owner_account_id: z.ZodString;
13533
+ charge_type: z.ZodEnum<{
13534
+ platform: "platform";
13535
+ direct: "direct";
13536
+ destination: "destination";
13537
+ separate_charges_and_transfers: "separate_charges_and_transfers";
13538
+ }>;
13539
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13540
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13541
+ }, z.core.$strict>>;
13542
+ amount_requested_minor: z.ZodString;
13543
+ amount_paid_minor: z.ZodNullable<z.ZodString>;
13544
+ paid_at: z.ZodNullable<z.ZodISODateTime>;
13545
+ currency: z.ZodString;
13546
+ currency_exponent: z.ZodNumber;
13547
+ invoice_payment_id: z.ZodString;
13548
+ invoice_id: z.ZodString;
13549
+ payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
13550
+ type: z.ZodLiteral<"payment_intent">;
13551
+ payment_id: z.ZodString;
13552
+ }, z.core.$strict>, z.ZodObject<{
13553
+ type: z.ZodLiteral<"charge">;
13554
+ payment_id: z.ZodString;
13555
+ }, z.core.$strict>, z.ZodObject<{
13556
+ type: z.ZodLiteral<"out_of_band">;
13557
+ }, z.core.$strict>], "type">;
13558
+ status: z.ZodEnum<{
13559
+ canceled: "canceled";
13560
+ paid: "paid";
13561
+ open: "open";
13562
+ }>;
13563
+ is_default: z.ZodOptional<z.ZodBoolean>;
13564
+ effective_at: z.ZodISODateTime;
13565
+ source_recorded_at: z.ZodISODateTime;
13566
+ observed_at: z.ZodISODateTime;
13567
+ profile: z.ZodLiteral<"invoice">;
13568
+ kind: z.ZodLiteral<"payment_allocation">;
13569
+ profile_version: z.ZodLiteral<1>;
13570
+ source: z.ZodObject<{
13571
+ tenant_id: z.ZodString;
13572
+ account_id: z.ZodString;
13573
+ livemode: z.ZodBoolean;
13574
+ provider: z.ZodEnum<{
13575
+ stripe: "stripe";
13576
+ }>;
13577
+ simulation_id: z.ZodOptional<z.ZodString>;
13578
+ }, z.core.$strict>;
13579
+ occurrence: z.ZodObject<{
13580
+ identity_version: z.ZodLiteral<2>;
13581
+ occurrence_key: z.ZodString;
13582
+ source_revision: z.ZodString;
13583
+ source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
13584
+ supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13585
+ delivery_id: z.ZodOptional<z.ZodString>;
13586
+ legacy_billing_ref: z.ZodOptional<z.ZodString>;
13587
+ }, z.core.$strict>;
13588
+ customer_ref: z.ZodString;
13589
+ }, z.core.$strict>, z.ZodObject<{
13590
+ amount_due_minor: z.ZodString;
13591
+ amount_paid_minor: z.ZodString;
13592
+ amount_remaining_minor: z.ZodString;
13593
+ due_at: z.ZodNullable<z.ZodISODateTime>;
13594
+ paid_out_of_band: z.ZodBoolean;
13595
+ settlement_basis: z.ZodNullable<z.ZodEnum<{
13596
+ mixed: "mixed";
13597
+ payments: "payments";
13598
+ zero_total: "zero_total";
13599
+ customer_balance: "customer_balance";
13600
+ credit_note: "credit_note";
13601
+ rollover: "rollover";
13602
+ out_of_band: "out_of_band";
13603
+ }>>;
13604
+ currency: z.ZodString;
13605
+ currency_exponent: z.ZodNumber;
13606
+ invoice_id: z.ZodString;
13607
+ subscription_id: z.ZodNullable<z.ZodString>;
13608
+ from_status: z.ZodEnum<{
13609
+ void: "void";
13610
+ paid: "paid";
13611
+ draft: "draft";
13612
+ open: "open";
13613
+ uncollectible: "uncollectible";
13614
+ }>;
13615
+ to_status: z.ZodEnum<{
13616
+ void: "void";
13617
+ paid: "paid";
13618
+ draft: "draft";
13619
+ open: "open";
13620
+ uncollectible: "uncollectible";
13621
+ }>;
13622
+ effective_at: z.ZodISODateTime;
13623
+ source_recorded_at: z.ZodISODateTime;
13624
+ observed_at: z.ZodISODateTime;
13625
+ profile: z.ZodLiteral<"invoice">;
13626
+ kind: z.ZodLiteral<"status_transition">;
13627
+ profile_version: z.ZodLiteral<1>;
13628
+ source: z.ZodObject<{
13629
+ tenant_id: z.ZodString;
13630
+ account_id: z.ZodString;
13631
+ livemode: z.ZodBoolean;
13632
+ provider: z.ZodEnum<{
13633
+ stripe: "stripe";
13634
+ }>;
13635
+ simulation_id: z.ZodOptional<z.ZodString>;
13636
+ }, z.core.$strict>;
13637
+ occurrence: z.ZodObject<{
13638
+ identity_version: z.ZodLiteral<2>;
13639
+ occurrence_key: z.ZodString;
13640
+ source_revision: z.ZodString;
13641
+ source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
13642
+ supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13643
+ delivery_id: z.ZodOptional<z.ZodString>;
13644
+ legacy_billing_ref: z.ZodOptional<z.ZodString>;
13645
+ }, z.core.$strict>;
13646
+ customer_ref: z.ZodString;
12498
13647
  }, z.core.$strict>], "kind">;
13648
+ /** Receivable-relevant classification of each allowed invoice transition. */
13649
+ type InvoiceReceivableTransition = 'finalized' | 'settled' | 'voided' | 'written_off' | 'recovered' | 'write_off_voided';
13650
+ /**
13651
+ * The allowed `from → to` invoice transitions and what each means for the
13652
+ * receivable (revenue-accounting §7). `paid` and `void` are terminal: a
13653
+ * refund does not reopen an invoice.
13654
+ */
13655
+ declare const INVOICE_RECEIVABLE_TRANSITIONS: Readonly<Record<string, InvoiceReceivableTransition>>;
13656
+ /** Classify a transition, or null when the table does not allow it. */
13657
+ declare function classifyInvoiceTransition(from: InvoiceStatus$1, to: InvoiceStatus$1): InvoiceReceivableTransition | null;
12499
13658
  declare const BillingTransactionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
12500
13659
  amount_captured_minor: z.ZodString;
12501
13660
  amount_requested_minor: z.ZodOptional<z.ZodString>;
13661
+ allocations_coverage: z.ZodOptional<z.ZodEnum<{
13662
+ complete: "complete";
13663
+ partial: "partial";
13664
+ }>>;
13665
+ economic_owner: z.ZodOptional<z.ZodObject<{
13666
+ owner_account_id: z.ZodString;
13667
+ charge_type: z.ZodEnum<{
13668
+ platform: "platform";
13669
+ direct: "direct";
13670
+ destination: "destination";
13671
+ separate_charges_and_transfers: "separate_charges_and_transfers";
13672
+ }>;
13673
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13674
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13675
+ }, z.core.$strict>>;
12502
13676
  currency: z.ZodString;
12503
13677
  currency_exponent: z.ZodNumber;
12504
13678
  payment_id: z.ZodString;
12505
13679
  observed_object_type: z.ZodEnum<{
12506
- invoice: "invoice";
12507
13680
  payment_intent: "payment_intent";
12508
13681
  charge: "charge";
13682
+ invoice: "invoice";
12509
13683
  invoice_payment: "invoice_payment";
12510
13684
  checkout_session: "checkout_session";
12511
13685
  }>;
@@ -12538,13 +13712,24 @@ declare const BillingTransactionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObj
12538
13712
  }, z.core.$strict>, z.ZodObject<{
12539
13713
  amount_requested_minor: z.ZodString;
12540
13714
  failure_code: z.ZodString;
13715
+ economic_owner: z.ZodOptional<z.ZodObject<{
13716
+ owner_account_id: z.ZodString;
13717
+ charge_type: z.ZodEnum<{
13718
+ platform: "platform";
13719
+ direct: "direct";
13720
+ destination: "destination";
13721
+ separate_charges_and_transfers: "separate_charges_and_transfers";
13722
+ }>;
13723
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13724
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13725
+ }, z.core.$strict>>;
12541
13726
  currency: z.ZodString;
12542
13727
  currency_exponent: z.ZodNumber;
12543
13728
  payment_id: z.ZodString;
12544
13729
  observed_object_type: z.ZodEnum<{
12545
- invoice: "invoice";
12546
13730
  payment_intent: "payment_intent";
12547
13731
  charge: "charge";
13732
+ invoice: "invoice";
12548
13733
  invoice_payment: "invoice_payment";
12549
13734
  checkout_session: "checkout_session";
12550
13735
  }>;
@@ -12576,13 +13761,24 @@ declare const BillingTransactionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObj
12576
13761
  customer_ref: z.ZodString;
12577
13762
  }, z.core.$strict>, z.ZodObject<{
12578
13763
  amount_requested_minor: z.ZodString;
13764
+ economic_owner: z.ZodOptional<z.ZodObject<{
13765
+ owner_account_id: z.ZodString;
13766
+ charge_type: z.ZodEnum<{
13767
+ platform: "platform";
13768
+ direct: "direct";
13769
+ destination: "destination";
13770
+ separate_charges_and_transfers: "separate_charges_and_transfers";
13771
+ }>;
13772
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13773
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13774
+ }, z.core.$strict>>;
12579
13775
  currency: z.ZodString;
12580
13776
  currency_exponent: z.ZodNumber;
12581
13777
  payment_id: z.ZodString;
12582
13778
  observed_object_type: z.ZodEnum<{
12583
- invoice: "invoice";
12584
13779
  payment_intent: "payment_intent";
12585
13780
  charge: "charge";
13781
+ invoice: "invoice";
12586
13782
  invoice_payment: "invoice_payment";
12587
13783
  checkout_session: "checkout_session";
12588
13784
  }>;
@@ -12614,13 +13810,24 @@ declare const BillingTransactionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObj
12614
13810
  customer_ref: z.ZodString;
12615
13811
  }, z.core.$strict>, z.ZodObject<{
12616
13812
  amount_requested_minor: z.ZodString;
13813
+ economic_owner: z.ZodOptional<z.ZodObject<{
13814
+ owner_account_id: z.ZodString;
13815
+ charge_type: z.ZodEnum<{
13816
+ platform: "platform";
13817
+ direct: "direct";
13818
+ destination: "destination";
13819
+ separate_charges_and_transfers: "separate_charges_and_transfers";
13820
+ }>;
13821
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13822
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13823
+ }, z.core.$strict>>;
12617
13824
  currency: z.ZodString;
12618
13825
  currency_exponent: z.ZodNumber;
12619
13826
  payment_id: z.ZodString;
12620
13827
  observed_object_type: z.ZodEnum<{
12621
- invoice: "invoice";
12622
13828
  payment_intent: "payment_intent";
12623
13829
  charge: "charge";
13830
+ invoice: "invoice";
12624
13831
  invoice_payment: "invoice_payment";
12625
13832
  checkout_session: "checkout_session";
12626
13833
  }>;
@@ -12659,6 +13866,17 @@ declare const BillingAllocationSchema: z.ZodObject<{
12659
13866
  amount_minor: z.ZodString;
12660
13867
  }, z.core.$strict>;
12661
13868
  declare const BillingRefundProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
13869
+ economic_owner: z.ZodOptional<z.ZodObject<{
13870
+ owner_account_id: z.ZodString;
13871
+ charge_type: z.ZodEnum<{
13872
+ platform: "platform";
13873
+ direct: "direct";
13874
+ destination: "destination";
13875
+ separate_charges_and_transfers: "separate_charges_and_transfers";
13876
+ }>;
13877
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13878
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13879
+ }, z.core.$strict>>;
12662
13880
  amount_minor: z.ZodString;
12663
13881
  reason: z.ZodNullable<z.ZodEnum<{
12664
13882
  duplicate: "duplicate";
@@ -12897,6 +14115,17 @@ declare const BillingBalanceProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
12897
14115
  invoice_credit_balance: "invoice_credit_balance";
12898
14116
  }>;
12899
14117
  invoice_id: z.ZodNullable<z.ZodString>;
14118
+ adjustment_source: z.ZodOptional<z.ZodEnum<{
14119
+ credit_note: "credit_note";
14120
+ rollover: "rollover";
14121
+ other: "other";
14122
+ invoice_applied: "invoice_applied";
14123
+ invoice_unapplied: "invoice_unapplied";
14124
+ overpayment: "overpayment";
14125
+ manual_adjustment: "manual_adjustment";
14126
+ migration: "migration";
14127
+ }>>;
14128
+ credit_note_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12900
14129
  currency: z.ZodString;
12901
14130
  currency_exponent: z.ZodNumber;
12902
14131
  balance_transaction_id: z.ZodString;
@@ -12963,6 +14192,7 @@ declare const BillingBalanceProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
12963
14192
  }, z.core.$strict>, z.ZodObject<{
12964
14193
  invoice_id: z.ZodString;
12965
14194
  amount_minor: z.ZodString;
14195
+ funding_occurrence_key: z.ZodOptional<z.ZodString>;
12966
14196
  currency: z.ZodString;
12967
14197
  currency_exponent: z.ZodNumber;
12968
14198
  grant_id: z.ZodString;
@@ -12996,73 +14226,106 @@ declare const BillingBalanceProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
12996
14226
  }, z.core.$strict>;
12997
14227
  customer_ref: z.ZodString;
12998
14228
  }, z.core.$strict>, z.ZodObject<{
12999
- amount_minor: z.ZodString;
13000
- currency: z.ZodString;
13001
- currency_exponent: z.ZodNumber;
13002
- grant_id: z.ZodString;
13003
- category: z.ZodEnum<{
13004
- paid: "paid";
13005
- promotional: "promotional";
13006
- }>;
13007
- effective_at: z.ZodISODateTime;
13008
- source_recorded_at: z.ZodISODateTime;
13009
- observed_at: z.ZodISODateTime;
13010
- profile: z.ZodLiteral<"balance">;
13011
- kind: z.ZodLiteral<"credit_grant_expired">;
13012
- profile_version: z.ZodLiteral<1>;
13013
- source: z.ZodObject<{
13014
- tenant_id: z.ZodString;
13015
- account_id: z.ZodString;
13016
- livemode: z.ZodBoolean;
13017
- provider: z.ZodEnum<{
13018
- stripe: "stripe";
13019
- }>;
13020
- simulation_id: z.ZodOptional<z.ZodString>;
13021
- }, z.core.$strict>;
13022
- occurrence: z.ZodObject<{
13023
- identity_version: z.ZodLiteral<2>;
13024
- occurrence_key: z.ZodString;
13025
- source_revision: z.ZodString;
13026
- source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
13027
- supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13028
- delivery_id: z.ZodOptional<z.ZodString>;
13029
- legacy_billing_ref: z.ZodOptional<z.ZodString>;
13030
- }, z.core.$strict>;
13031
- customer_ref: z.ZodString;
13032
- }, z.core.$strict>], "kind">;
13033
- declare const BillingLossProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
13034
- amount_minor: z.ZodString;
13035
- currency: z.ZodString;
13036
- currency_exponent: z.ZodNumber;
13037
- dispute_id: z.ZodString;
13038
- payment_id: z.ZodString;
13039
- balance_transaction_id: z.ZodString;
13040
- effective_at: z.ZodISODateTime;
13041
- source_recorded_at: z.ZodISODateTime;
13042
- observed_at: z.ZodISODateTime;
13043
- profile: z.ZodLiteral<"loss">;
13044
- kind: z.ZodLiteral<"dispute_funds_withdrawn">;
13045
- profile_version: z.ZodLiteral<1>;
13046
- source: z.ZodObject<{
13047
- tenant_id: z.ZodString;
13048
- account_id: z.ZodString;
13049
- livemode: z.ZodBoolean;
13050
- provider: z.ZodEnum<{
13051
- stripe: "stripe";
14229
+ amount_minor: z.ZodString;
14230
+ currency: z.ZodString;
14231
+ currency_exponent: z.ZodNumber;
14232
+ grant_id: z.ZodString;
14233
+ category: z.ZodEnum<{
14234
+ paid: "paid";
14235
+ promotional: "promotional";
14236
+ }>;
14237
+ effective_at: z.ZodISODateTime;
14238
+ source_recorded_at: z.ZodISODateTime;
14239
+ observed_at: z.ZodISODateTime;
14240
+ profile: z.ZodLiteral<"balance">;
14241
+ kind: z.ZodLiteral<"credit_grant_expired">;
14242
+ profile_version: z.ZodLiteral<1>;
14243
+ source: z.ZodObject<{
14244
+ tenant_id: z.ZodString;
14245
+ account_id: z.ZodString;
14246
+ livemode: z.ZodBoolean;
14247
+ provider: z.ZodEnum<{
14248
+ stripe: "stripe";
14249
+ }>;
14250
+ simulation_id: z.ZodOptional<z.ZodString>;
14251
+ }, z.core.$strict>;
14252
+ occurrence: z.ZodObject<{
14253
+ identity_version: z.ZodLiteral<2>;
14254
+ occurrence_key: z.ZodString;
14255
+ source_revision: z.ZodString;
14256
+ source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
14257
+ supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14258
+ delivery_id: z.ZodOptional<z.ZodString>;
14259
+ legacy_billing_ref: z.ZodOptional<z.ZodString>;
14260
+ }, z.core.$strict>;
14261
+ customer_ref: z.ZodString;
14262
+ }, z.core.$strict>], "kind">;
14263
+ declare const BillingLossProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
14264
+ settlement_amount: z.ZodOptional<z.ZodObject<{
14265
+ amount_minor: z.ZodString;
14266
+ currency: z.ZodString;
14267
+ currency_exponent: z.ZodNumber;
14268
+ }, z.core.$strict>>;
14269
+ economic_owner: z.ZodOptional<z.ZodObject<{
14270
+ owner_account_id: z.ZodString;
14271
+ charge_type: z.ZodEnum<{
14272
+ platform: "platform";
14273
+ direct: "direct";
14274
+ destination: "destination";
14275
+ separate_charges_and_transfers: "separate_charges_and_transfers";
14276
+ }>;
14277
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14278
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14279
+ }, z.core.$strict>>;
14280
+ amount_minor: z.ZodString;
14281
+ currency: z.ZodString;
14282
+ currency_exponent: z.ZodNumber;
14283
+ dispute_id: z.ZodString;
14284
+ payment_id: z.ZodString;
14285
+ balance_transaction_id: z.ZodString;
14286
+ effective_at: z.ZodISODateTime;
14287
+ source_recorded_at: z.ZodISODateTime;
14288
+ observed_at: z.ZodISODateTime;
14289
+ profile: z.ZodLiteral<"loss">;
14290
+ kind: z.ZodLiteral<"dispute_funds_withdrawn">;
14291
+ profile_version: z.ZodLiteral<1>;
14292
+ source: z.ZodObject<{
14293
+ tenant_id: z.ZodString;
14294
+ account_id: z.ZodString;
14295
+ livemode: z.ZodBoolean;
14296
+ provider: z.ZodEnum<{
14297
+ stripe: "stripe";
14298
+ }>;
14299
+ simulation_id: z.ZodOptional<z.ZodString>;
14300
+ }, z.core.$strict>;
14301
+ occurrence: z.ZodObject<{
14302
+ identity_version: z.ZodLiteral<2>;
14303
+ occurrence_key: z.ZodString;
14304
+ source_revision: z.ZodString;
14305
+ source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
14306
+ supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14307
+ delivery_id: z.ZodOptional<z.ZodString>;
14308
+ legacy_billing_ref: z.ZodOptional<z.ZodString>;
14309
+ }, z.core.$strict>;
14310
+ customer_ref: z.ZodString;
14311
+ }, z.core.$strict>, z.ZodObject<{
14312
+ reverses_occurrence_key: z.ZodOptional<z.ZodString>;
14313
+ settlement_amount: z.ZodOptional<z.ZodObject<{
14314
+ amount_minor: z.ZodString;
14315
+ currency: z.ZodString;
14316
+ currency_exponent: z.ZodNumber;
14317
+ }, z.core.$strict>>;
14318
+ economic_owner: z.ZodOptional<z.ZodObject<{
14319
+ owner_account_id: z.ZodString;
14320
+ charge_type: z.ZodEnum<{
14321
+ platform: "platform";
14322
+ direct: "direct";
14323
+ destination: "destination";
14324
+ separate_charges_and_transfers: "separate_charges_and_transfers";
13052
14325
  }>;
13053
- simulation_id: z.ZodOptional<z.ZodString>;
13054
- }, z.core.$strict>;
13055
- occurrence: z.ZodObject<{
13056
- identity_version: z.ZodLiteral<2>;
13057
- occurrence_key: z.ZodString;
13058
- source_revision: z.ZodString;
13059
- source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
13060
- supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13061
- delivery_id: z.ZodOptional<z.ZodString>;
13062
- legacy_billing_ref: z.ZodOptional<z.ZodString>;
13063
- }, z.core.$strict>;
13064
- customer_ref: z.ZodString;
13065
- }, z.core.$strict>, z.ZodObject<{
14326
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14327
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14328
+ }, z.core.$strict>>;
13066
14329
  amount_minor: z.ZodString;
13067
14330
  currency: z.ZodString;
13068
14331
  currency_exponent: z.ZodNumber;
@@ -13132,6 +14395,22 @@ declare const BillingLossProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
13132
14395
  }, z.core.$strict>;
13133
14396
  customer_ref: z.ZodString;
13134
14397
  }, z.core.$strict>, z.ZodObject<{
14398
+ settlement_amount: z.ZodOptional<z.ZodObject<{
14399
+ amount_minor: z.ZodString;
14400
+ currency: z.ZodString;
14401
+ currency_exponent: z.ZodNumber;
14402
+ }, z.core.$strict>>;
14403
+ economic_owner: z.ZodOptional<z.ZodObject<{
14404
+ owner_account_id: z.ZodString;
14405
+ charge_type: z.ZodEnum<{
14406
+ platform: "platform";
14407
+ direct: "direct";
14408
+ destination: "destination";
14409
+ separate_charges_and_transfers: "separate_charges_and_transfers";
14410
+ }>;
14411
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14412
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14413
+ }, z.core.$strict>>;
13135
14414
  amount_minor: z.ZodString;
13136
14415
  currency: z.ZodString;
13137
14416
  currency_exponent: z.ZodNumber;
@@ -13217,16 +14496,33 @@ declare function deriveBillingRevisionKey(profile: {
13217
14496
  /** The refund/credit allocation key: the occurrence plus the allocation id. */
13218
14497
  declare function deriveBillingAllocationKey(occurrenceKey: string, allocationId: string): string;
13219
14498
  /**
13220
- * The four unique keys plan 252's Schema impact requires, as field paths.
13221
- * Storage (TASK-30) declares these as scoped unique indexes; the derived
13222
- * output generation is TASK-28/30's to populate and is declared here so its
13223
- * shape is fixed before any writer exists.
14499
+ * The unique keys plan 252's Schema impact requires, as field paths.
14500
+ * Storage (TASK-30) declares these as scoped unique indexes.
14501
+ *
14502
+ * The first four are TASK-3's. TASK-28 adds the credit-note line allocation,
14503
+ * the InvoicePayment edge, and the keys of the derived accounting contracts in
14504
+ * `billing-accounting.ts`. SOURCE keys (occurrence, revision, allocation,
14505
+ * mapping revision) identify what a provider said; OUTPUT keys (output
14506
+ * generation, generation) identify what RevTurbine derived from it under one
14507
+ * policy — a rebuild mints a new generation, never a new source revision.
13224
14508
  */
13225
14509
  declare const BILLING_UNIQUE_KEYS: {
13226
14510
  readonly logical_occurrence: readonly ["source.tenant_id", "occurrence.occurrence_key"];
13227
14511
  readonly source_revision: readonly ["source.tenant_id", "occurrence.occurrence_key", "occurrence.source_revision"];
13228
14512
  readonly allocation: readonly ["source.tenant_id", "occurrence.occurrence_key", "allocations[].allocation_id"];
13229
14513
  readonly output_generation: readonly ["tenant_id", "policy_version", "generation_id", "output_key"];
14514
+ /** TASK-28: one credit-note line allocation (the credit side of refund/credit allocation). */
14515
+ readonly credit_allocation: readonly ["source.tenant_id", "occurrence.occurrence_key", "lines[].credit_line_id"];
14516
+ /** TASK-28: one InvoicePayment edge — its occurrence is the InvoicePayment object. */
14517
+ readonly invoice_payment_allocation: readonly ["source.tenant_id", "occurrence.occurrence_key"];
14518
+ /** TASK-28: one immutable accounting revision row. */
14519
+ readonly accounting_revision: readonly ["source.tenant_id", "revision_key"];
14520
+ /** TASK-28: one provider-customer → RT-account mapping revision. */
14521
+ readonly mapping_revision: readonly ["source.tenant_id", "source.provider", "source.account_id", "source.livemode", "source.simulation_id", "customer_ref", "mapping_revision"];
14522
+ /** TASK-28: one derived output generation (its checkpoint rides on it). */
14523
+ readonly generation: readonly ["tenant_id", "generation_id"];
14524
+ /** TASK-28: one coverage checkpoint per scope, RT account and fact family. */
14525
+ readonly coverage_checkpoint: readonly ["source.tenant_id", "source.provider", "source.account_id", "source.livemode", "source.simulation_id", "rt_account_id", "family"];
13230
14526
  };
13231
14527
  /** Plan 248 `stripe_sub_item` unique scope — the join from an item snapshot to observed item state. */
13232
14528
  declare const BILLING_ITEM_JOIN_KEYS: readonly ["tenant_id", "account_id", "livemode", "item_id"];
@@ -13252,6 +14548,28 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13252
14548
  licensed: "licensed";
13253
14549
  }>;
13254
14550
  unit_amount_minor: z.ZodNullable<z.ZodString>;
14551
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
14552
+ billing_scheme: z.ZodLiteral<"per_unit">;
14553
+ unit_amount_decimal: z.ZodString;
14554
+ transform_quantity: z.ZodNullable<z.ZodObject<{
14555
+ divide_by: z.ZodNumber;
14556
+ round: z.ZodEnum<{
14557
+ up: "up";
14558
+ down: "down";
14559
+ }>;
14560
+ }, z.core.$strict>>;
14561
+ }, z.core.$strict>, z.ZodObject<{
14562
+ billing_scheme: z.ZodLiteral<"tiered">;
14563
+ tiers_mode: z.ZodEnum<{
14564
+ graduated: "graduated";
14565
+ volume: "volume";
14566
+ }>;
14567
+ tiers: z.ZodArray<z.ZodObject<{
14568
+ up_to: z.ZodNullable<z.ZodNumber>;
14569
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
14570
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
14571
+ }, z.core.$strict>>;
14572
+ }, z.core.$strict>], "billing_scheme">>;
13255
14573
  }, z.core.$strict>;
13256
14574
  quantity: z.ZodNumber;
13257
14575
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -13260,6 +14578,23 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13260
14578
  complete: "complete";
13261
14579
  partial: "partial";
13262
14580
  }>;
14581
+ recurrence: z.ZodOptional<z.ZodObject<{
14582
+ billing_cycle_anchor_at: z.ZodISODateTime;
14583
+ proration_behavior: z.ZodEnum<{
14584
+ none: "none";
14585
+ create_prorations: "create_prorations";
14586
+ always_invoice: "always_invoice";
14587
+ }>;
14588
+ billing_mode: z.ZodOptional<z.ZodEnum<{
14589
+ classic: "classic";
14590
+ flexible: "flexible";
14591
+ }>>;
14592
+ collection_method: z.ZodEnum<{
14593
+ charge_automatically: "charge_automatically";
14594
+ send_invoice: "send_invoice";
14595
+ }>;
14596
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
14597
+ }, z.core.$strict>>;
13263
14598
  currency: z.ZodString;
13264
14599
  currency_exponent: z.ZodNumber;
13265
14600
  subscription_id: z.ZodString;
@@ -13317,6 +14652,28 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13317
14652
  licensed: "licensed";
13318
14653
  }>;
13319
14654
  unit_amount_minor: z.ZodNullable<z.ZodString>;
14655
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
14656
+ billing_scheme: z.ZodLiteral<"per_unit">;
14657
+ unit_amount_decimal: z.ZodString;
14658
+ transform_quantity: z.ZodNullable<z.ZodObject<{
14659
+ divide_by: z.ZodNumber;
14660
+ round: z.ZodEnum<{
14661
+ up: "up";
14662
+ down: "down";
14663
+ }>;
14664
+ }, z.core.$strict>>;
14665
+ }, z.core.$strict>, z.ZodObject<{
14666
+ billing_scheme: z.ZodLiteral<"tiered">;
14667
+ tiers_mode: z.ZodEnum<{
14668
+ graduated: "graduated";
14669
+ volume: "volume";
14670
+ }>;
14671
+ tiers: z.ZodArray<z.ZodObject<{
14672
+ up_to: z.ZodNullable<z.ZodNumber>;
14673
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
14674
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
14675
+ }, z.core.$strict>>;
14676
+ }, z.core.$strict>], "billing_scheme">>;
13320
14677
  }, z.core.$strict>;
13321
14678
  quantity: z.ZodNumber;
13322
14679
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -13325,6 +14682,23 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13325
14682
  complete: "complete";
13326
14683
  partial: "partial";
13327
14684
  }>;
14685
+ recurrence: z.ZodOptional<z.ZodObject<{
14686
+ billing_cycle_anchor_at: z.ZodISODateTime;
14687
+ proration_behavior: z.ZodEnum<{
14688
+ none: "none";
14689
+ create_prorations: "create_prorations";
14690
+ always_invoice: "always_invoice";
14691
+ }>;
14692
+ billing_mode: z.ZodOptional<z.ZodEnum<{
14693
+ classic: "classic";
14694
+ flexible: "flexible";
14695
+ }>>;
14696
+ collection_method: z.ZodEnum<{
14697
+ charge_automatically: "charge_automatically";
14698
+ send_invoice: "send_invoice";
14699
+ }>;
14700
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
14701
+ }, z.core.$strict>>;
13328
14702
  currency: z.ZodString;
13329
14703
  currency_exponent: z.ZodNumber;
13330
14704
  subscription_id: z.ZodString;
@@ -13384,6 +14758,28 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13384
14758
  licensed: "licensed";
13385
14759
  }>;
13386
14760
  unit_amount_minor: z.ZodNullable<z.ZodString>;
14761
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
14762
+ billing_scheme: z.ZodLiteral<"per_unit">;
14763
+ unit_amount_decimal: z.ZodString;
14764
+ transform_quantity: z.ZodNullable<z.ZodObject<{
14765
+ divide_by: z.ZodNumber;
14766
+ round: z.ZodEnum<{
14767
+ up: "up";
14768
+ down: "down";
14769
+ }>;
14770
+ }, z.core.$strict>>;
14771
+ }, z.core.$strict>, z.ZodObject<{
14772
+ billing_scheme: z.ZodLiteral<"tiered">;
14773
+ tiers_mode: z.ZodEnum<{
14774
+ graduated: "graduated";
14775
+ volume: "volume";
14776
+ }>;
14777
+ tiers: z.ZodArray<z.ZodObject<{
14778
+ up_to: z.ZodNullable<z.ZodNumber>;
14779
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
14780
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
14781
+ }, z.core.$strict>>;
14782
+ }, z.core.$strict>], "billing_scheme">>;
13387
14783
  }, z.core.$strict>;
13388
14784
  quantity: z.ZodNumber;
13389
14785
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -13392,6 +14788,23 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13392
14788
  complete: "complete";
13393
14789
  partial: "partial";
13394
14790
  }>;
14791
+ recurrence: z.ZodOptional<z.ZodObject<{
14792
+ billing_cycle_anchor_at: z.ZodISODateTime;
14793
+ proration_behavior: z.ZodEnum<{
14794
+ none: "none";
14795
+ create_prorations: "create_prorations";
14796
+ always_invoice: "always_invoice";
14797
+ }>;
14798
+ billing_mode: z.ZodOptional<z.ZodEnum<{
14799
+ classic: "classic";
14800
+ flexible: "flexible";
14801
+ }>>;
14802
+ collection_method: z.ZodEnum<{
14803
+ charge_automatically: "charge_automatically";
14804
+ send_invoice: "send_invoice";
14805
+ }>;
14806
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
14807
+ }, z.core.$strict>>;
13395
14808
  currency: z.ZodString;
13396
14809
  currency_exponent: z.ZodNumber;
13397
14810
  subscription_id: z.ZodString;
@@ -13556,6 +14969,28 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13556
14969
  licensed: "licensed";
13557
14970
  }>;
13558
14971
  unit_amount_minor: z.ZodNullable<z.ZodString>;
14972
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
14973
+ billing_scheme: z.ZodLiteral<"per_unit">;
14974
+ unit_amount_decimal: z.ZodString;
14975
+ transform_quantity: z.ZodNullable<z.ZodObject<{
14976
+ divide_by: z.ZodNumber;
14977
+ round: z.ZodEnum<{
14978
+ up: "up";
14979
+ down: "down";
14980
+ }>;
14981
+ }, z.core.$strict>>;
14982
+ }, z.core.$strict>, z.ZodObject<{
14983
+ billing_scheme: z.ZodLiteral<"tiered">;
14984
+ tiers_mode: z.ZodEnum<{
14985
+ graduated: "graduated";
14986
+ volume: "volume";
14987
+ }>;
14988
+ tiers: z.ZodArray<z.ZodObject<{
14989
+ up_to: z.ZodNullable<z.ZodNumber>;
14990
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
14991
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
14992
+ }, z.core.$strict>>;
14993
+ }, z.core.$strict>], "billing_scheme">>;
13559
14994
  }, z.core.$strict>;
13560
14995
  quantity: z.ZodNumber;
13561
14996
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -13564,6 +14999,23 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13564
14999
  complete: "complete";
13565
15000
  partial: "partial";
13566
15001
  }>;
15002
+ recurrence: z.ZodOptional<z.ZodObject<{
15003
+ billing_cycle_anchor_at: z.ZodISODateTime;
15004
+ proration_behavior: z.ZodEnum<{
15005
+ none: "none";
15006
+ create_prorations: "create_prorations";
15007
+ always_invoice: "always_invoice";
15008
+ }>;
15009
+ billing_mode: z.ZodOptional<z.ZodEnum<{
15010
+ classic: "classic";
15011
+ flexible: "flexible";
15012
+ }>>;
15013
+ collection_method: z.ZodEnum<{
15014
+ charge_automatically: "charge_automatically";
15015
+ send_invoice: "send_invoice";
15016
+ }>;
15017
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
15018
+ }, z.core.$strict>>;
13567
15019
  currency: z.ZodString;
13568
15020
  currency_exponent: z.ZodNumber;
13569
15021
  subscription_id: z.ZodString;
@@ -13623,6 +15075,28 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13623
15075
  licensed: "licensed";
13624
15076
  }>;
13625
15077
  unit_amount_minor: z.ZodNullable<z.ZodString>;
15078
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
15079
+ billing_scheme: z.ZodLiteral<"per_unit">;
15080
+ unit_amount_decimal: z.ZodString;
15081
+ transform_quantity: z.ZodNullable<z.ZodObject<{
15082
+ divide_by: z.ZodNumber;
15083
+ round: z.ZodEnum<{
15084
+ up: "up";
15085
+ down: "down";
15086
+ }>;
15087
+ }, z.core.$strict>>;
15088
+ }, z.core.$strict>, z.ZodObject<{
15089
+ billing_scheme: z.ZodLiteral<"tiered">;
15090
+ tiers_mode: z.ZodEnum<{
15091
+ graduated: "graduated";
15092
+ volume: "volume";
15093
+ }>;
15094
+ tiers: z.ZodArray<z.ZodObject<{
15095
+ up_to: z.ZodNullable<z.ZodNumber>;
15096
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
15097
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
15098
+ }, z.core.$strict>>;
15099
+ }, z.core.$strict>], "billing_scheme">>;
13626
15100
  }, z.core.$strict>;
13627
15101
  quantity: z.ZodNumber;
13628
15102
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -13631,6 +15105,23 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13631
15105
  complete: "complete";
13632
15106
  partial: "partial";
13633
15107
  }>;
15108
+ recurrence: z.ZodOptional<z.ZodObject<{
15109
+ billing_cycle_anchor_at: z.ZodISODateTime;
15110
+ proration_behavior: z.ZodEnum<{
15111
+ none: "none";
15112
+ create_prorations: "create_prorations";
15113
+ always_invoice: "always_invoice";
15114
+ }>;
15115
+ billing_mode: z.ZodOptional<z.ZodEnum<{
15116
+ classic: "classic";
15117
+ flexible: "flexible";
15118
+ }>>;
15119
+ collection_method: z.ZodEnum<{
15120
+ charge_automatically: "charge_automatically";
15121
+ send_invoice: "send_invoice";
15122
+ }>;
15123
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
15124
+ }, z.core.$strict>>;
13634
15125
  currency: z.ZodString;
13635
15126
  currency_exponent: z.ZodNumber;
13636
15127
  subscription_id: z.ZodString;
@@ -13756,6 +15247,28 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13756
15247
  licensed: "licensed";
13757
15248
  }>;
13758
15249
  unit_amount_minor: z.ZodNullable<z.ZodString>;
15250
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
15251
+ billing_scheme: z.ZodLiteral<"per_unit">;
15252
+ unit_amount_decimal: z.ZodString;
15253
+ transform_quantity: z.ZodNullable<z.ZodObject<{
15254
+ divide_by: z.ZodNumber;
15255
+ round: z.ZodEnum<{
15256
+ up: "up";
15257
+ down: "down";
15258
+ }>;
15259
+ }, z.core.$strict>>;
15260
+ }, z.core.$strict>, z.ZodObject<{
15261
+ billing_scheme: z.ZodLiteral<"tiered">;
15262
+ tiers_mode: z.ZodEnum<{
15263
+ graduated: "graduated";
15264
+ volume: "volume";
15265
+ }>;
15266
+ tiers: z.ZodArray<z.ZodObject<{
15267
+ up_to: z.ZodNullable<z.ZodNumber>;
15268
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
15269
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
15270
+ }, z.core.$strict>>;
15271
+ }, z.core.$strict>], "billing_scheme">>;
13759
15272
  }, z.core.$strict>;
13760
15273
  quantity: z.ZodNumber;
13761
15274
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -13764,6 +15277,23 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13764
15277
  complete: "complete";
13765
15278
  partial: "partial";
13766
15279
  }>;
15280
+ recurrence: z.ZodOptional<z.ZodObject<{
15281
+ billing_cycle_anchor_at: z.ZodISODateTime;
15282
+ proration_behavior: z.ZodEnum<{
15283
+ none: "none";
15284
+ create_prorations: "create_prorations";
15285
+ always_invoice: "always_invoice";
15286
+ }>;
15287
+ billing_mode: z.ZodOptional<z.ZodEnum<{
15288
+ classic: "classic";
15289
+ flexible: "flexible";
15290
+ }>>;
15291
+ collection_method: z.ZodEnum<{
15292
+ charge_automatically: "charge_automatically";
15293
+ send_invoice: "send_invoice";
15294
+ }>;
15295
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
15296
+ }, z.core.$strict>>;
13767
15297
  currency: z.ZodString;
13768
15298
  currency_exponent: z.ZodNumber;
13769
15299
  subscription_id: z.ZodString;
@@ -13821,6 +15351,28 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13821
15351
  licensed: "licensed";
13822
15352
  }>;
13823
15353
  unit_amount_minor: z.ZodNullable<z.ZodString>;
15354
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
15355
+ billing_scheme: z.ZodLiteral<"per_unit">;
15356
+ unit_amount_decimal: z.ZodString;
15357
+ transform_quantity: z.ZodNullable<z.ZodObject<{
15358
+ divide_by: z.ZodNumber;
15359
+ round: z.ZodEnum<{
15360
+ up: "up";
15361
+ down: "down";
15362
+ }>;
15363
+ }, z.core.$strict>>;
15364
+ }, z.core.$strict>, z.ZodObject<{
15365
+ billing_scheme: z.ZodLiteral<"tiered">;
15366
+ tiers_mode: z.ZodEnum<{
15367
+ graduated: "graduated";
15368
+ volume: "volume";
15369
+ }>;
15370
+ tiers: z.ZodArray<z.ZodObject<{
15371
+ up_to: z.ZodNullable<z.ZodNumber>;
15372
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
15373
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
15374
+ }, z.core.$strict>>;
15375
+ }, z.core.$strict>], "billing_scheme">>;
13824
15376
  }, z.core.$strict>;
13825
15377
  quantity: z.ZodNumber;
13826
15378
  trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -13830,6 +15382,23 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13830
15382
  complete: "complete";
13831
15383
  partial: "partial";
13832
15384
  }>;
15385
+ recurrence: z.ZodOptional<z.ZodObject<{
15386
+ billing_cycle_anchor_at: z.ZodISODateTime;
15387
+ proration_behavior: z.ZodEnum<{
15388
+ none: "none";
15389
+ create_prorations: "create_prorations";
15390
+ always_invoice: "always_invoice";
15391
+ }>;
15392
+ billing_mode: z.ZodOptional<z.ZodEnum<{
15393
+ classic: "classic";
15394
+ flexible: "flexible";
15395
+ }>>;
15396
+ collection_method: z.ZodEnum<{
15397
+ charge_automatically: "charge_automatically";
15398
+ send_invoice: "send_invoice";
15399
+ }>;
15400
+ days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
15401
+ }, z.core.$strict>>;
13833
15402
  currency: z.ZodString;
13834
15403
  currency_exponent: z.ZodNumber;
13835
15404
  schedule_id: z.ZodString;
@@ -13955,6 +15524,11 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
13955
15524
  complete: "complete";
13956
15525
  partial: "partial";
13957
15526
  }>;
15527
+ payment_count: z.ZodOptional<z.ZodNumber>;
15528
+ payments_coverage: z.ZodOptional<z.ZodEnum<{
15529
+ complete: "complete";
15530
+ partial: "partial";
15531
+ }>>;
13958
15532
  currency: z.ZodString;
13959
15533
  currency_exponent: z.ZodNumber;
13960
15534
  invoice_id: z.ZodString;
@@ -14008,6 +15582,28 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
14008
15582
  licensed: "licensed";
14009
15583
  }>;
14010
15584
  unit_amount_minor: z.ZodNullable<z.ZodString>;
15585
+ terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
15586
+ billing_scheme: z.ZodLiteral<"per_unit">;
15587
+ unit_amount_decimal: z.ZodString;
15588
+ transform_quantity: z.ZodNullable<z.ZodObject<{
15589
+ divide_by: z.ZodNumber;
15590
+ round: z.ZodEnum<{
15591
+ up: "up";
15592
+ down: "down";
15593
+ }>;
15594
+ }, z.core.$strict>>;
15595
+ }, z.core.$strict>, z.ZodObject<{
15596
+ billing_scheme: z.ZodLiteral<"tiered">;
15597
+ tiers_mode: z.ZodEnum<{
15598
+ graduated: "graduated";
15599
+ volume: "volume";
15600
+ }>;
15601
+ tiers: z.ZodArray<z.ZodObject<{
15602
+ up_to: z.ZodNullable<z.ZodNumber>;
15603
+ unit_amount_decimal: z.ZodNullable<z.ZodString>;
15604
+ flat_amount_minor: z.ZodNullable<z.ZodString>;
15605
+ }, z.core.$strict>>;
15606
+ }, z.core.$strict>], "billing_scheme">>;
14011
15607
  }, z.core.$strict>;
14012
15608
  quantity: z.ZodNumber;
14013
15609
  service_period_start_at: z.ZodISODateTime;
@@ -14114,16 +15710,148 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
14114
15710
  legacy_billing_ref: z.ZodOptional<z.ZodString>;
14115
15711
  }, z.core.$strict>;
14116
15712
  customer_ref: z.ZodString;
15713
+ }, z.core.$strict>, z.ZodObject<{
15714
+ economic_owner: z.ZodOptional<z.ZodObject<{
15715
+ owner_account_id: z.ZodString;
15716
+ charge_type: z.ZodEnum<{
15717
+ platform: "platform";
15718
+ direct: "direct";
15719
+ destination: "destination";
15720
+ separate_charges_and_transfers: "separate_charges_and_transfers";
15721
+ }>;
15722
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15723
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15724
+ }, z.core.$strict>>;
15725
+ amount_requested_minor: z.ZodString;
15726
+ amount_paid_minor: z.ZodNullable<z.ZodString>;
15727
+ paid_at: z.ZodNullable<z.ZodISODateTime>;
15728
+ currency: z.ZodString;
15729
+ currency_exponent: z.ZodNumber;
15730
+ invoice_payment_id: z.ZodString;
15731
+ invoice_id: z.ZodString;
15732
+ payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
15733
+ type: z.ZodLiteral<"payment_intent">;
15734
+ payment_id: z.ZodString;
15735
+ }, z.core.$strict>, z.ZodObject<{
15736
+ type: z.ZodLiteral<"charge">;
15737
+ payment_id: z.ZodString;
15738
+ }, z.core.$strict>, z.ZodObject<{
15739
+ type: z.ZodLiteral<"out_of_band">;
15740
+ }, z.core.$strict>], "type">;
15741
+ status: z.ZodEnum<{
15742
+ canceled: "canceled";
15743
+ paid: "paid";
15744
+ open: "open";
15745
+ }>;
15746
+ is_default: z.ZodOptional<z.ZodBoolean>;
15747
+ effective_at: z.ZodISODateTime;
15748
+ source_recorded_at: z.ZodISODateTime;
15749
+ observed_at: z.ZodISODateTime;
15750
+ profile: z.ZodLiteral<"invoice">;
15751
+ kind: z.ZodLiteral<"payment_allocation">;
15752
+ profile_version: z.ZodLiteral<1>;
15753
+ source: z.ZodObject<{
15754
+ tenant_id: z.ZodString;
15755
+ account_id: z.ZodString;
15756
+ livemode: z.ZodBoolean;
15757
+ provider: z.ZodEnum<{
15758
+ stripe: "stripe";
15759
+ }>;
15760
+ simulation_id: z.ZodOptional<z.ZodString>;
15761
+ }, z.core.$strict>;
15762
+ occurrence: z.ZodObject<{
15763
+ identity_version: z.ZodLiteral<2>;
15764
+ occurrence_key: z.ZodString;
15765
+ source_revision: z.ZodString;
15766
+ source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
15767
+ supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15768
+ delivery_id: z.ZodOptional<z.ZodString>;
15769
+ legacy_billing_ref: z.ZodOptional<z.ZodString>;
15770
+ }, z.core.$strict>;
15771
+ customer_ref: z.ZodString;
15772
+ }, z.core.$strict>, z.ZodObject<{
15773
+ amount_due_minor: z.ZodString;
15774
+ amount_paid_minor: z.ZodString;
15775
+ amount_remaining_minor: z.ZodString;
15776
+ due_at: z.ZodNullable<z.ZodISODateTime>;
15777
+ paid_out_of_band: z.ZodBoolean;
15778
+ settlement_basis: z.ZodNullable<z.ZodEnum<{
15779
+ mixed: "mixed";
15780
+ payments: "payments";
15781
+ zero_total: "zero_total";
15782
+ customer_balance: "customer_balance";
15783
+ credit_note: "credit_note";
15784
+ rollover: "rollover";
15785
+ out_of_band: "out_of_band";
15786
+ }>>;
15787
+ currency: z.ZodString;
15788
+ currency_exponent: z.ZodNumber;
15789
+ invoice_id: z.ZodString;
15790
+ subscription_id: z.ZodNullable<z.ZodString>;
15791
+ from_status: z.ZodEnum<{
15792
+ void: "void";
15793
+ paid: "paid";
15794
+ draft: "draft";
15795
+ open: "open";
15796
+ uncollectible: "uncollectible";
15797
+ }>;
15798
+ to_status: z.ZodEnum<{
15799
+ void: "void";
15800
+ paid: "paid";
15801
+ draft: "draft";
15802
+ open: "open";
15803
+ uncollectible: "uncollectible";
15804
+ }>;
15805
+ effective_at: z.ZodISODateTime;
15806
+ source_recorded_at: z.ZodISODateTime;
15807
+ observed_at: z.ZodISODateTime;
15808
+ profile: z.ZodLiteral<"invoice">;
15809
+ kind: z.ZodLiteral<"status_transition">;
15810
+ profile_version: z.ZodLiteral<1>;
15811
+ source: z.ZodObject<{
15812
+ tenant_id: z.ZodString;
15813
+ account_id: z.ZodString;
15814
+ livemode: z.ZodBoolean;
15815
+ provider: z.ZodEnum<{
15816
+ stripe: "stripe";
15817
+ }>;
15818
+ simulation_id: z.ZodOptional<z.ZodString>;
15819
+ }, z.core.$strict>;
15820
+ occurrence: z.ZodObject<{
15821
+ identity_version: z.ZodLiteral<2>;
15822
+ occurrence_key: z.ZodString;
15823
+ source_revision: z.ZodString;
15824
+ source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
15825
+ supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15826
+ delivery_id: z.ZodOptional<z.ZodString>;
15827
+ legacy_billing_ref: z.ZodOptional<z.ZodString>;
15828
+ }, z.core.$strict>;
15829
+ customer_ref: z.ZodString;
14117
15830
  }, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
14118
15831
  amount_captured_minor: z.ZodString;
14119
15832
  amount_requested_minor: z.ZodOptional<z.ZodString>;
15833
+ allocations_coverage: z.ZodOptional<z.ZodEnum<{
15834
+ complete: "complete";
15835
+ partial: "partial";
15836
+ }>>;
15837
+ economic_owner: z.ZodOptional<z.ZodObject<{
15838
+ owner_account_id: z.ZodString;
15839
+ charge_type: z.ZodEnum<{
15840
+ platform: "platform";
15841
+ direct: "direct";
15842
+ destination: "destination";
15843
+ separate_charges_and_transfers: "separate_charges_and_transfers";
15844
+ }>;
15845
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15846
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15847
+ }, z.core.$strict>>;
14120
15848
  currency: z.ZodString;
14121
15849
  currency_exponent: z.ZodNumber;
14122
15850
  payment_id: z.ZodString;
14123
15851
  observed_object_type: z.ZodEnum<{
14124
- invoice: "invoice";
14125
15852
  payment_intent: "payment_intent";
14126
15853
  charge: "charge";
15854
+ invoice: "invoice";
14127
15855
  invoice_payment: "invoice_payment";
14128
15856
  checkout_session: "checkout_session";
14129
15857
  }>;
@@ -14156,13 +15884,24 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
14156
15884
  }, z.core.$strict>, z.ZodObject<{
14157
15885
  amount_requested_minor: z.ZodString;
14158
15886
  failure_code: z.ZodString;
15887
+ economic_owner: z.ZodOptional<z.ZodObject<{
15888
+ owner_account_id: z.ZodString;
15889
+ charge_type: z.ZodEnum<{
15890
+ platform: "platform";
15891
+ direct: "direct";
15892
+ destination: "destination";
15893
+ separate_charges_and_transfers: "separate_charges_and_transfers";
15894
+ }>;
15895
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15896
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15897
+ }, z.core.$strict>>;
14159
15898
  currency: z.ZodString;
14160
15899
  currency_exponent: z.ZodNumber;
14161
15900
  payment_id: z.ZodString;
14162
15901
  observed_object_type: z.ZodEnum<{
14163
- invoice: "invoice";
14164
15902
  payment_intent: "payment_intent";
14165
15903
  charge: "charge";
15904
+ invoice: "invoice";
14166
15905
  invoice_payment: "invoice_payment";
14167
15906
  checkout_session: "checkout_session";
14168
15907
  }>;
@@ -14194,13 +15933,24 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
14194
15933
  customer_ref: z.ZodString;
14195
15934
  }, z.core.$strict>, z.ZodObject<{
14196
15935
  amount_requested_minor: z.ZodString;
15936
+ economic_owner: z.ZodOptional<z.ZodObject<{
15937
+ owner_account_id: z.ZodString;
15938
+ charge_type: z.ZodEnum<{
15939
+ platform: "platform";
15940
+ direct: "direct";
15941
+ destination: "destination";
15942
+ separate_charges_and_transfers: "separate_charges_and_transfers";
15943
+ }>;
15944
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15945
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15946
+ }, z.core.$strict>>;
14197
15947
  currency: z.ZodString;
14198
15948
  currency_exponent: z.ZodNumber;
14199
15949
  payment_id: z.ZodString;
14200
15950
  observed_object_type: z.ZodEnum<{
14201
- invoice: "invoice";
14202
15951
  payment_intent: "payment_intent";
14203
15952
  charge: "charge";
15953
+ invoice: "invoice";
14204
15954
  invoice_payment: "invoice_payment";
14205
15955
  checkout_session: "checkout_session";
14206
15956
  }>;
@@ -14232,13 +15982,24 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
14232
15982
  customer_ref: z.ZodString;
14233
15983
  }, z.core.$strict>, z.ZodObject<{
14234
15984
  amount_requested_minor: z.ZodString;
15985
+ economic_owner: z.ZodOptional<z.ZodObject<{
15986
+ owner_account_id: z.ZodString;
15987
+ charge_type: z.ZodEnum<{
15988
+ platform: "platform";
15989
+ direct: "direct";
15990
+ destination: "destination";
15991
+ separate_charges_and_transfers: "separate_charges_and_transfers";
15992
+ }>;
15993
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15994
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15995
+ }, z.core.$strict>>;
14235
15996
  currency: z.ZodString;
14236
15997
  currency_exponent: z.ZodNumber;
14237
15998
  payment_id: z.ZodString;
14238
15999
  observed_object_type: z.ZodEnum<{
14239
- invoice: "invoice";
14240
16000
  payment_intent: "payment_intent";
14241
16001
  charge: "charge";
16002
+ invoice: "invoice";
14242
16003
  invoice_payment: "invoice_payment";
14243
16004
  checkout_session: "checkout_session";
14244
16005
  }>;
@@ -14269,6 +16030,17 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
14269
16030
  }, z.core.$strict>;
14270
16031
  customer_ref: z.ZodString;
14271
16032
  }, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
16033
+ economic_owner: z.ZodOptional<z.ZodObject<{
16034
+ owner_account_id: z.ZodString;
16035
+ charge_type: z.ZodEnum<{
16036
+ platform: "platform";
16037
+ direct: "direct";
16038
+ destination: "destination";
16039
+ separate_charges_and_transfers: "separate_charges_and_transfers";
16040
+ }>;
16041
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16042
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16043
+ }, z.core.$strict>>;
14272
16044
  amount_minor: z.ZodString;
14273
16045
  reason: z.ZodNullable<z.ZodEnum<{
14274
16046
  duplicate: "duplicate";
@@ -14489,6 +16261,17 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
14489
16261
  invoice_credit_balance: "invoice_credit_balance";
14490
16262
  }>;
14491
16263
  invoice_id: z.ZodNullable<z.ZodString>;
16264
+ adjustment_source: z.ZodOptional<z.ZodEnum<{
16265
+ credit_note: "credit_note";
16266
+ rollover: "rollover";
16267
+ other: "other";
16268
+ invoice_applied: "invoice_applied";
16269
+ invoice_unapplied: "invoice_unapplied";
16270
+ overpayment: "overpayment";
16271
+ manual_adjustment: "manual_adjustment";
16272
+ migration: "migration";
16273
+ }>>;
16274
+ credit_note_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14492
16275
  currency: z.ZodString;
14493
16276
  currency_exponent: z.ZodNumber;
14494
16277
  balance_transaction_id: z.ZodString;
@@ -14555,6 +16338,7 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
14555
16338
  }, z.core.$strict>, z.ZodObject<{
14556
16339
  invoice_id: z.ZodString;
14557
16340
  amount_minor: z.ZodString;
16341
+ funding_occurrence_key: z.ZodOptional<z.ZodString>;
14558
16342
  currency: z.ZodString;
14559
16343
  currency_exponent: z.ZodNumber;
14560
16344
  grant_id: z.ZodString;
@@ -14622,6 +16406,22 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
14622
16406
  }, z.core.$strict>;
14623
16407
  customer_ref: z.ZodString;
14624
16408
  }, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
16409
+ settlement_amount: z.ZodOptional<z.ZodObject<{
16410
+ amount_minor: z.ZodString;
16411
+ currency: z.ZodString;
16412
+ currency_exponent: z.ZodNumber;
16413
+ }, z.core.$strict>>;
16414
+ economic_owner: z.ZodOptional<z.ZodObject<{
16415
+ owner_account_id: z.ZodString;
16416
+ charge_type: z.ZodEnum<{
16417
+ platform: "platform";
16418
+ direct: "direct";
16419
+ destination: "destination";
16420
+ separate_charges_and_transfers: "separate_charges_and_transfers";
16421
+ }>;
16422
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16423
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16424
+ }, z.core.$strict>>;
14625
16425
  amount_minor: z.ZodString;
14626
16426
  currency: z.ZodString;
14627
16427
  currency_exponent: z.ZodNumber;
@@ -14654,6 +16454,23 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
14654
16454
  }, z.core.$strict>;
14655
16455
  customer_ref: z.ZodString;
14656
16456
  }, z.core.$strict>, z.ZodObject<{
16457
+ reverses_occurrence_key: z.ZodOptional<z.ZodString>;
16458
+ settlement_amount: z.ZodOptional<z.ZodObject<{
16459
+ amount_minor: z.ZodString;
16460
+ currency: z.ZodString;
16461
+ currency_exponent: z.ZodNumber;
16462
+ }, z.core.$strict>>;
16463
+ economic_owner: z.ZodOptional<z.ZodObject<{
16464
+ owner_account_id: z.ZodString;
16465
+ charge_type: z.ZodEnum<{
16466
+ platform: "platform";
16467
+ direct: "direct";
16468
+ destination: "destination";
16469
+ separate_charges_and_transfers: "separate_charges_and_transfers";
16470
+ }>;
16471
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16472
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16473
+ }, z.core.$strict>>;
14657
16474
  amount_minor: z.ZodString;
14658
16475
  currency: z.ZodString;
14659
16476
  currency_exponent: z.ZodNumber;
@@ -14723,6 +16540,22 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
14723
16540
  }, z.core.$strict>;
14724
16541
  customer_ref: z.ZodString;
14725
16542
  }, z.core.$strict>, z.ZodObject<{
16543
+ settlement_amount: z.ZodOptional<z.ZodObject<{
16544
+ amount_minor: z.ZodString;
16545
+ currency: z.ZodString;
16546
+ currency_exponent: z.ZodNumber;
16547
+ }, z.core.$strict>>;
16548
+ economic_owner: z.ZodOptional<z.ZodObject<{
16549
+ owner_account_id: z.ZodString;
16550
+ charge_type: z.ZodEnum<{
16551
+ platform: "platform";
16552
+ direct: "direct";
16553
+ destination: "destination";
16554
+ separate_charges_and_transfers: "separate_charges_and_transfers";
16555
+ }>;
16556
+ on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16557
+ transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16558
+ }, z.core.$strict>>;
14726
16559
  amount_minor: z.ZodString;
14727
16560
  currency: z.ZodString;
14728
16561
  currency_exponent: z.ZodNumber;
@@ -14757,11 +16590,23 @@ declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedU
14757
16590
  type BillingProfile$1 = z.infer<typeof BillingProfileSchema>;
14758
16591
  interface BillingCoverageGap {
14759
16592
  occurrence_key: string;
14760
- field: 'items' | 'lines' | 'phases';
14761
- reason: 'partial_hydration';
16593
+ /** TASK-28 adds `payments` (InvoicePayment pages), `allocations` (a payment's edges) and `price_terms`. */
16594
+ field: 'items' | 'lines' | 'phases' | 'payments' | 'allocations' | 'price_terms';
16595
+ reason: 'partial_hydration' | 'missing_price_terms';
14762
16596
  }
14763
- /** Lists a profile declares partially hydrated. A gap is reported, never read as a smaller complete set. */
16597
+ /**
16598
+ * Lists a profile declares partially hydrated, and prices whose exact terms
16599
+ * are missing. A gap is reported, never read as a smaller complete set or
16600
+ * as a `unit * quantity` guess.
16601
+ */
14764
16602
  declare function billingProfileCoverageGaps(profile: BillingProfile$1): BillingCoverageGap[];
16603
+ /**
16604
+ * Whether a money movement counts as a sale IN THE SCOPE THAT OBSERVED IT.
16605
+ * `owner` — the observing provider account owns it; `non_owner` — another
16606
+ * account does (a Connect transfer/destination view: never a second sale);
16607
+ * `unknown` — no ownership evidence, an explicit coverage gap.
16608
+ */
16609
+ declare function billingEconomicOwnership(profile: BillingProfile$1): 'owner' | 'non_owner' | 'unknown';
14765
16610
  /**
14766
16611
  * Reduce a stream of profile revisions to one entry per logical occurrence,
14767
16612
  * keeping the latest SOURCE revision — by `source_order` when both carry it,
@@ -14774,6 +16619,734 @@ declare function collapseBillingRevisions(profiles: readonly BillingProfile$1[])
14774
16619
  ambiguous: string[];
14775
16620
  };
14776
16621
 
16622
+ /**
16623
+ * Derived billing-accounting contracts (plan 252 TASK-28, BL-0292).
16624
+ *
16625
+ * `billing-profiles.ts` says what a PROVIDER reported. This file types what
16626
+ * RevTurbine keeps and derives from it, per plan 252's Schema impact:
16627
+ * "tenant/source/account/mode-scoped immutable accounting revisions and
16628
+ * policy/generation checkpoints", versioned provider→RT mappings, and the
16629
+ * projection/coverage/checkpoint contracts rebuilds publish.
16630
+ *
16631
+ * | Contract | What it is | Unique key (`BILLING_UNIQUE_KEYS`) |
16632
+ * |---|---|---|
16633
+ * | {@link BillingAccountingRevisionSchema} | One immutable source revision of one fact | `accounting_revision` |
16634
+ * | {@link BillingAccountMappingRevisionSchema} | Provider customer → RT account, effective-dated and versioned | `mapping_revision` |
16635
+ * | {@link BillingOutputRowKeySchema} | The identity of one derived output row | `output_generation` |
16636
+ * | {@link BillingGenerationSchema} | One policy-pinned derived generation, its checkpoint and reconciliation | `generation` |
16637
+ * | {@link BillingCoverageCheckpointSchema} | How completely one fact family is known for one scope | `coverage_checkpoint` |
16638
+ *
16639
+ * SOURCE keys vs OUTPUT keys: a source revision is what a provider said and
16640
+ * never changes; an output key names a derived row by WHAT it measures
16641
+ * (kind, scope, RT account, currency, instant, subject) and deliberately NOT
16642
+ * by generation — so rebuilding the same inputs twice yields identical output
16643
+ * keys (AC-20), and the generation id alone separates a shadow rebuild from
16644
+ * the active one.
16645
+ *
16646
+ * Composition with plan 248: these are HISTORY contracts. Current provider
16647
+ * item state stays in plan 248's `stripe_sub_item` / `stripe_sub_evidence`;
16648
+ * nothing here mirrors it.
16649
+ *
16650
+ * All contracts are transient (internal, server-only) until TASK-30 declares
16651
+ * their storage; no field is `pii`.
16652
+ */
16653
+
16654
+ /** Version stamped on every derived accounting contract in this file. */
16655
+ declare const BILLING_ACCOUNTING_CONTRACT_VERSION = 1;
16656
+ /** Prefix of every derived output key, so it can never be mistaken for a source occurrence key (`bo2`). */
16657
+ declare const BILLING_OUTPUT_KEY_PREFIX = "bout1";
16658
+ /** Bound on gap / failure lists in one checkpoint. */
16659
+ declare const MAX_BILLING_CHECKPOINT_LIST = 250;
16660
+ /** The scope key of a source scope: tenant, provider, account, mode, simulation. */
16661
+ declare function billingSourceScopeKey(source: BillingSourceScope$1): string;
16662
+ /**
16663
+ * One immutable source revision of one billing fact, as accounting storage
16664
+ * keeps it. Rows are never updated: a later provider state is a NEW revision
16665
+ * (`supersedes_revision`), a retraction is its own `retract` occurrence. The
16666
+ * full profile rides beside this row (TASK-30); `fact_digest` pins its bytes,
16667
+ * so a replay of the same `revision_key` with different content is a
16668
+ * conflict, not a silent overwrite ({@link compareAccountingRevision}).
16669
+ */
16670
+ declare const BillingAccountingRevisionSchema: z.ZodObject<{
16671
+ revision_version: z.ZodLiteral<1>;
16672
+ source: z.ZodObject<{
16673
+ tenant_id: z.ZodString;
16674
+ account_id: z.ZodString;
16675
+ livemode: z.ZodBoolean;
16676
+ provider: z.ZodEnum<{
16677
+ stripe: "stripe";
16678
+ }>;
16679
+ simulation_id: z.ZodOptional<z.ZodString>;
16680
+ }, z.core.$strict>;
16681
+ profile: z.ZodEnum<{
16682
+ transaction: "transaction";
16683
+ subscription: "subscription";
16684
+ schedule: "schedule";
16685
+ invoice: "invoice";
16686
+ refund: "refund";
16687
+ credit: "credit";
16688
+ balance: "balance";
16689
+ loss: "loss";
16690
+ }>;
16691
+ kind: z.ZodString;
16692
+ occurrence_key: z.ZodString;
16693
+ source_revision: z.ZodString;
16694
+ revision_key: z.ZodString;
16695
+ source_order: z.ZodNullable<z.ZodNumber>;
16696
+ supersedes_revision: z.ZodNullable<z.ZodString>;
16697
+ effective_at: z.ZodISODateTime;
16698
+ source_recorded_at: z.ZodISODateTime;
16699
+ observed_at: z.ZodISODateTime;
16700
+ economic_ownership: z.ZodEnum<{
16701
+ unknown: "unknown";
16702
+ owner: "owner";
16703
+ non_owner: "non_owner";
16704
+ }>;
16705
+ legacy_billing_ref: z.ZodNullable<z.ZodString>;
16706
+ fact_digest: z.ZodString;
16707
+ }, z.core.$strict>;
16708
+ type BillingAccountingRevision$1 = z.infer<typeof BillingAccountingRevisionSchema>;
16709
+ /** Build the immutable revision row of a validated profile. The caller supplies the fact digest. */
16710
+ declare function billingAccountingRevisionOf(profile: BillingProfile$1, factDigest: string): BillingAccountingRevision$1;
16711
+ /**
16712
+ * An incoming revision against a stored one with the same `revision_key`:
16713
+ * `replay` (same bytes — a no-op) or `conflict` (same revision, different
16714
+ * content — never overwritten; it needs repair). `observed_at` is excluded:
16715
+ * observing the same revision again is not a different revision.
16716
+ */
16717
+ declare function compareAccountingRevision(stored: BillingAccountingRevision$1, incoming: BillingAccountingRevision$1): 'replay' | 'conflict' | 'different_revision';
16718
+ /**
16719
+ * One effective-dated revision of the provider-customer → RT-account mapping
16720
+ * (plan 252 A-9). History is never reinterpreted through today's mapping: an
16721
+ * ordinary revision that changes a mapping takes effect no earlier than it
16722
+ * was observed, and only an `approved_correction` — carrying the correction
16723
+ * generation that restates history — may reach back in time.
16724
+ */
16725
+ declare const BillingAccountMappingRevisionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
16726
+ basis: z.ZodLiteral<"explicit_binding">;
16727
+ mapping_version: z.ZodLiteral<1>;
16728
+ source: z.ZodObject<{
16729
+ tenant_id: z.ZodString;
16730
+ account_id: z.ZodString;
16731
+ livemode: z.ZodBoolean;
16732
+ provider: z.ZodEnum<{
16733
+ stripe: "stripe";
16734
+ }>;
16735
+ simulation_id: z.ZodOptional<z.ZodString>;
16736
+ }, z.core.$strict>;
16737
+ customer_ref: z.ZodString;
16738
+ rt_account_id: z.ZodNullable<z.ZodString>;
16739
+ mapping_revision: z.ZodNumber;
16740
+ effective_from: z.ZodISODateTime;
16741
+ effective_to: z.ZodNullable<z.ZodISODateTime>;
16742
+ observed_at: z.ZodISODateTime;
16743
+ supersedes_mapping_revision: z.ZodNullable<z.ZodNumber>;
16744
+ }, z.core.$strict>, z.ZodObject<{
16745
+ basis: z.ZodLiteral<"integration_sync">;
16746
+ mapping_version: z.ZodLiteral<1>;
16747
+ source: z.ZodObject<{
16748
+ tenant_id: z.ZodString;
16749
+ account_id: z.ZodString;
16750
+ livemode: z.ZodBoolean;
16751
+ provider: z.ZodEnum<{
16752
+ stripe: "stripe";
16753
+ }>;
16754
+ simulation_id: z.ZodOptional<z.ZodString>;
16755
+ }, z.core.$strict>;
16756
+ customer_ref: z.ZodString;
16757
+ rt_account_id: z.ZodNullable<z.ZodString>;
16758
+ mapping_revision: z.ZodNumber;
16759
+ effective_from: z.ZodISODateTime;
16760
+ effective_to: z.ZodNullable<z.ZodISODateTime>;
16761
+ observed_at: z.ZodISODateTime;
16762
+ supersedes_mapping_revision: z.ZodNullable<z.ZodNumber>;
16763
+ }, z.core.$strict>, z.ZodObject<{
16764
+ basis: z.ZodLiteral<"approved_correction">;
16765
+ correction_generation_id: z.ZodString;
16766
+ restatement_reason: z.ZodEnum<{
16767
+ split: "split";
16768
+ merge: "merge";
16769
+ provider_migration: "provider_migration";
16770
+ reassignment: "reassignment";
16771
+ error_correction: "error_correction";
16772
+ }>;
16773
+ mapping_version: z.ZodLiteral<1>;
16774
+ source: z.ZodObject<{
16775
+ tenant_id: z.ZodString;
16776
+ account_id: z.ZodString;
16777
+ livemode: z.ZodBoolean;
16778
+ provider: z.ZodEnum<{
16779
+ stripe: "stripe";
16780
+ }>;
16781
+ simulation_id: z.ZodOptional<z.ZodString>;
16782
+ }, z.core.$strict>;
16783
+ customer_ref: z.ZodString;
16784
+ rt_account_id: z.ZodNullable<z.ZodString>;
16785
+ mapping_revision: z.ZodNumber;
16786
+ effective_from: z.ZodISODateTime;
16787
+ effective_to: z.ZodNullable<z.ZodISODateTime>;
16788
+ observed_at: z.ZodISODateTime;
16789
+ supersedes_mapping_revision: z.ZodNullable<z.ZodNumber>;
16790
+ }, z.core.$strict>], "basis">;
16791
+ type BillingAccountMappingRevision$1 = z.infer<typeof BillingAccountMappingRevisionSchema>;
16792
+ type BillingAccountMappingResolution = {
16793
+ state: 'mapped';
16794
+ rt_account_id: string;
16795
+ mapping_revision: number;
16796
+ } | {
16797
+ state: 'unmapped';
16798
+ reason: 'no_mapping' | 'explicitly_unmapped';
16799
+ } | {
16800
+ state: 'ambiguous';
16801
+ mapping_revisions: number[];
16802
+ };
16803
+ /**
16804
+ * The RT account a provider customer mapped to AT `effective_at`, AS KNOWN BY
16805
+ * `observed_cutoff` — never the latest mapping reinterpreting history. The
16806
+ * highest revision known by the cutoff whose interval contains the instant
16807
+ * wins; two such rows with the same revision number are ambiguous.
16808
+ */
16809
+ declare function resolveBillingAccountMapping(revisions: readonly BillingAccountMappingRevision$1[], query: {
16810
+ source: BillingSourceScope$1;
16811
+ customer_ref: string;
16812
+ effective_at: string;
16813
+ observed_cutoff: string;
16814
+ }): BillingAccountMappingResolution;
16815
+ /**
16816
+ * Derived output kinds. Snapshot kinds keep ACTUAL, RECEIVABLE and
16817
+ * horizon-specific COMMITTED stock distinct (plan 252 Schema impact); the
16818
+ * flow kinds name the occurrence/allocation they derive from.
16819
+ */
16820
+ declare const BILLING_OUTPUT_KINDS: readonly ["stock_snapshot", "committed_snapshot", "receivable_snapshot", "movement", "collection", "allocation"];
16821
+ type BillingOutputKind = (typeof BILLING_OUTPUT_KINDS)[number];
16822
+ interface BillingOutputKeyInput {
16823
+ output_kind: BillingOutputKind;
16824
+ source: BillingSourceScope$1;
16825
+ /** RT account grain; null only for rows of an unmapped customer. */
16826
+ rt_account_id: string | null;
16827
+ currency: string;
16828
+ /** The instant the row measures (snapshot instant / movement effective time / projection base `b`). */
16829
+ effective_at: string;
16830
+ /** Committed snapshots only: the horizon `h >= b`. */
16831
+ horizon_at?: string;
16832
+ /** Flow kinds only: the source occurrence / allocation / atomic change group it derives from. */
16833
+ subject?: string;
16834
+ }
16835
+ /**
16836
+ * The identity of one derived output row. Depends only on WHAT the row
16837
+ * measures — never on generation, policy or delivery — so two rebuilds of the
16838
+ * same retained facts produce the same keys (AC-20). Instants are normalized
16839
+ * to UTC milliseconds, so `+00:00` and `Z` spellings agree.
16840
+ */
16841
+ declare function deriveBillingOutputKey(input: BillingOutputKeyInput): string;
16842
+ /**
16843
+ * The unique identity of one derived output row inside a generation —
16844
+ * `BILLING_UNIQUE_KEYS.output_generation`. The same `output_key` recurs in
16845
+ * every generation that measures the same thing.
16846
+ */
16847
+ declare const BillingOutputRowKeySchema: z.ZodObject<{
16848
+ tenant_id: z.ZodString;
16849
+ policy_version: z.ZodString;
16850
+ generation_id: z.ZodString;
16851
+ output_kind: z.ZodEnum<{
16852
+ allocation: "allocation";
16853
+ collection: "collection";
16854
+ stock_snapshot: "stock_snapshot";
16855
+ committed_snapshot: "committed_snapshot";
16856
+ receivable_snapshot: "receivable_snapshot";
16857
+ movement: "movement";
16858
+ }>;
16859
+ output_key: z.ZodString;
16860
+ }, z.core.$strict>;
16861
+ /**
16862
+ * Resumable progress of one generation build (AC-20: a crash resumes from
16863
+ * the checkpoint). Revisions are consumed in `(observed_at, revision_key)`
16864
+ * order up to the generation's input watermark.
16865
+ */
16866
+ declare const BillingGenerationCheckpointSchema: z.ZodObject<{
16867
+ cursor_revision_key: z.ZodNullable<z.ZodString>;
16868
+ processed_through: z.ZodNullable<z.ZodISODateTime>;
16869
+ processed_revisions: z.ZodNumber;
16870
+ completed: z.ZodBoolean;
16871
+ }, z.core.$strict>;
16872
+ /**
16873
+ * The comparison that gates activation (AC-20): stock equations,
16874
+ * invoice/payment/refund conservation and shadow-vs-active totals. `failed`
16875
+ * blocks activation; unresolved residuals are reported, not forced to zero.
16876
+ */
16877
+ declare const BillingReconciliationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
16878
+ state: z.ZodLiteral<"pending">;
16879
+ }, z.core.$strict>, z.ZodObject<{
16880
+ state: z.ZodLiteral<"passed">;
16881
+ checked_at: z.ZodISODateTime;
16882
+ compared_with_generation_id: z.ZodNullable<z.ZodString>;
16883
+ unresolved_residuals: z.ZodNumber;
16884
+ }, z.core.$strict>, z.ZodObject<{
16885
+ state: z.ZodLiteral<"failed">;
16886
+ checked_at: z.ZodISODateTime;
16887
+ compared_with_generation_id: z.ZodNullable<z.ZodString>;
16888
+ failure_codes: z.ZodArray<z.ZodEnum<{
16889
+ stock_equation: "stock_equation";
16890
+ collection_conservation: "collection_conservation";
16891
+ allocation_conservation: "allocation_conservation";
16892
+ receivable_conservation: "receivable_conservation";
16893
+ source_totals: "source_totals";
16894
+ shadow_divergence: "shadow_divergence";
16895
+ }>>;
16896
+ }, z.core.$strict>], "state">;
16897
+ /** A checkpoint whose build finished — the only one an active or superseded generation may carry. */
16898
+ declare const BillingCompletedGenerationCheckpointSchema: z.ZodObject<{
16899
+ cursor_revision_key: z.ZodNullable<z.ZodString>;
16900
+ processed_through: z.ZodNullable<z.ZodISODateTime>;
16901
+ processed_revisions: z.ZodNumber;
16902
+ completed: z.ZodLiteral<true>;
16903
+ }, z.core.$strict>;
16904
+ /**
16905
+ * One policy-pinned derived generation (plan 252 A-7). Built as `building`,
16906
+ * compared as `shadow`, published atomically as `active`, retired as
16907
+ * `superseded`. Activation requires a COMPLETED checkpoint and a PASSED
16908
+ * reconciliation — structurally, not by convention: the `active` and
16909
+ * `superseded` members admit no other.
16910
+ */
16911
+ declare const BillingGenerationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
16912
+ status: z.ZodLiteral<"building">;
16913
+ reconciliation: z.ZodDiscriminatedUnion<[z.ZodObject<{
16914
+ state: z.ZodLiteral<"pending">;
16915
+ }, z.core.$strict>, z.ZodObject<{
16916
+ state: z.ZodLiteral<"passed">;
16917
+ checked_at: z.ZodISODateTime;
16918
+ compared_with_generation_id: z.ZodNullable<z.ZodString>;
16919
+ unresolved_residuals: z.ZodNumber;
16920
+ }, z.core.$strict>, z.ZodObject<{
16921
+ state: z.ZodLiteral<"failed">;
16922
+ checked_at: z.ZodISODateTime;
16923
+ compared_with_generation_id: z.ZodNullable<z.ZodString>;
16924
+ failure_codes: z.ZodArray<z.ZodEnum<{
16925
+ stock_equation: "stock_equation";
16926
+ collection_conservation: "collection_conservation";
16927
+ allocation_conservation: "allocation_conservation";
16928
+ receivable_conservation: "receivable_conservation";
16929
+ source_totals: "source_totals";
16930
+ shadow_divergence: "shadow_divergence";
16931
+ }>>;
16932
+ }, z.core.$strict>], "state">;
16933
+ generation_version: z.ZodLiteral<1>;
16934
+ tenant_id: z.ZodString;
16935
+ generation_id: z.ZodString;
16936
+ source: z.ZodObject<{
16937
+ tenant_id: z.ZodString;
16938
+ account_id: z.ZodString;
16939
+ livemode: z.ZodBoolean;
16940
+ provider: z.ZodEnum<{
16941
+ stripe: "stripe";
16942
+ }>;
16943
+ simulation_id: z.ZodOptional<z.ZodString>;
16944
+ }, z.core.$strict>;
16945
+ policy_version: z.ZodString;
16946
+ policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
16947
+ input_watermark: z.ZodISODateTime;
16948
+ created_at: z.ZodISODateTime;
16949
+ checkpoint: z.ZodObject<{
16950
+ cursor_revision_key: z.ZodNullable<z.ZodString>;
16951
+ processed_through: z.ZodNullable<z.ZodISODateTime>;
16952
+ processed_revisions: z.ZodNumber;
16953
+ completed: z.ZodBoolean;
16954
+ }, z.core.$strict>;
16955
+ }, z.core.$strict>, z.ZodObject<{
16956
+ status: z.ZodLiteral<"shadow">;
16957
+ reconciliation: z.ZodDiscriminatedUnion<[z.ZodObject<{
16958
+ state: z.ZodLiteral<"pending">;
16959
+ }, z.core.$strict>, z.ZodObject<{
16960
+ state: z.ZodLiteral<"passed">;
16961
+ checked_at: z.ZodISODateTime;
16962
+ compared_with_generation_id: z.ZodNullable<z.ZodString>;
16963
+ unresolved_residuals: z.ZodNumber;
16964
+ }, z.core.$strict>, z.ZodObject<{
16965
+ state: z.ZodLiteral<"failed">;
16966
+ checked_at: z.ZodISODateTime;
16967
+ compared_with_generation_id: z.ZodNullable<z.ZodString>;
16968
+ failure_codes: z.ZodArray<z.ZodEnum<{
16969
+ stock_equation: "stock_equation";
16970
+ collection_conservation: "collection_conservation";
16971
+ allocation_conservation: "allocation_conservation";
16972
+ receivable_conservation: "receivable_conservation";
16973
+ source_totals: "source_totals";
16974
+ shadow_divergence: "shadow_divergence";
16975
+ }>>;
16976
+ }, z.core.$strict>], "state">;
16977
+ generation_version: z.ZodLiteral<1>;
16978
+ tenant_id: z.ZodString;
16979
+ generation_id: z.ZodString;
16980
+ source: z.ZodObject<{
16981
+ tenant_id: z.ZodString;
16982
+ account_id: z.ZodString;
16983
+ livemode: z.ZodBoolean;
16984
+ provider: z.ZodEnum<{
16985
+ stripe: "stripe";
16986
+ }>;
16987
+ simulation_id: z.ZodOptional<z.ZodString>;
16988
+ }, z.core.$strict>;
16989
+ policy_version: z.ZodString;
16990
+ policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
16991
+ input_watermark: z.ZodISODateTime;
16992
+ created_at: z.ZodISODateTime;
16993
+ checkpoint: z.ZodObject<{
16994
+ cursor_revision_key: z.ZodNullable<z.ZodString>;
16995
+ processed_through: z.ZodNullable<z.ZodISODateTime>;
16996
+ processed_revisions: z.ZodNumber;
16997
+ completed: z.ZodBoolean;
16998
+ }, z.core.$strict>;
16999
+ }, z.core.$strict>, z.ZodObject<{
17000
+ status: z.ZodLiteral<"active">;
17001
+ checkpoint: z.ZodObject<{
17002
+ cursor_revision_key: z.ZodNullable<z.ZodString>;
17003
+ processed_through: z.ZodNullable<z.ZodISODateTime>;
17004
+ processed_revisions: z.ZodNumber;
17005
+ completed: z.ZodLiteral<true>;
17006
+ }, z.core.$strict>;
17007
+ reconciliation: z.ZodObject<{
17008
+ state: z.ZodLiteral<"passed">;
17009
+ checked_at: z.ZodISODateTime;
17010
+ compared_with_generation_id: z.ZodNullable<z.ZodString>;
17011
+ unresolved_residuals: z.ZodNumber;
17012
+ }, z.core.$strict>;
17013
+ activated_at: z.ZodISODateTime;
17014
+ generation_version: z.ZodLiteral<1>;
17015
+ tenant_id: z.ZodString;
17016
+ generation_id: z.ZodString;
17017
+ source: z.ZodObject<{
17018
+ tenant_id: z.ZodString;
17019
+ account_id: z.ZodString;
17020
+ livemode: z.ZodBoolean;
17021
+ provider: z.ZodEnum<{
17022
+ stripe: "stripe";
17023
+ }>;
17024
+ simulation_id: z.ZodOptional<z.ZodString>;
17025
+ }, z.core.$strict>;
17026
+ policy_version: z.ZodString;
17027
+ policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
17028
+ input_watermark: z.ZodISODateTime;
17029
+ created_at: z.ZodISODateTime;
17030
+ }, z.core.$strict>, z.ZodObject<{
17031
+ status: z.ZodLiteral<"superseded">;
17032
+ checkpoint: z.ZodObject<{
17033
+ cursor_revision_key: z.ZodNullable<z.ZodString>;
17034
+ processed_through: z.ZodNullable<z.ZodISODateTime>;
17035
+ processed_revisions: z.ZodNumber;
17036
+ completed: z.ZodLiteral<true>;
17037
+ }, z.core.$strict>;
17038
+ reconciliation: z.ZodObject<{
17039
+ state: z.ZodLiteral<"passed">;
17040
+ checked_at: z.ZodISODateTime;
17041
+ compared_with_generation_id: z.ZodNullable<z.ZodString>;
17042
+ unresolved_residuals: z.ZodNumber;
17043
+ }, z.core.$strict>;
17044
+ activated_at: z.ZodISODateTime;
17045
+ superseded_at: z.ZodISODateTime;
17046
+ superseded_by_generation_id: z.ZodString;
17047
+ generation_version: z.ZodLiteral<1>;
17048
+ tenant_id: z.ZodString;
17049
+ generation_id: z.ZodString;
17050
+ source: z.ZodObject<{
17051
+ tenant_id: z.ZodString;
17052
+ account_id: z.ZodString;
17053
+ livemode: z.ZodBoolean;
17054
+ provider: z.ZodEnum<{
17055
+ stripe: "stripe";
17056
+ }>;
17057
+ simulation_id: z.ZodOptional<z.ZodString>;
17058
+ }, z.core.$strict>;
17059
+ policy_version: z.ZodString;
17060
+ policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
17061
+ input_watermark: z.ZodISODateTime;
17062
+ created_at: z.ZodISODateTime;
17063
+ }, z.core.$strict>, z.ZodObject<{
17064
+ status: z.ZodLiteral<"failed">;
17065
+ reconciliation: z.ZodDiscriminatedUnion<[z.ZodObject<{
17066
+ state: z.ZodLiteral<"pending">;
17067
+ }, z.core.$strict>, z.ZodObject<{
17068
+ state: z.ZodLiteral<"passed">;
17069
+ checked_at: z.ZodISODateTime;
17070
+ compared_with_generation_id: z.ZodNullable<z.ZodString>;
17071
+ unresolved_residuals: z.ZodNumber;
17072
+ }, z.core.$strict>, z.ZodObject<{
17073
+ state: z.ZodLiteral<"failed">;
17074
+ checked_at: z.ZodISODateTime;
17075
+ compared_with_generation_id: z.ZodNullable<z.ZodString>;
17076
+ failure_codes: z.ZodArray<z.ZodEnum<{
17077
+ stock_equation: "stock_equation";
17078
+ collection_conservation: "collection_conservation";
17079
+ allocation_conservation: "allocation_conservation";
17080
+ receivable_conservation: "receivable_conservation";
17081
+ source_totals: "source_totals";
17082
+ shadow_divergence: "shadow_divergence";
17083
+ }>>;
17084
+ }, z.core.$strict>], "state">;
17085
+ failure_code: z.ZodString;
17086
+ generation_version: z.ZodLiteral<1>;
17087
+ tenant_id: z.ZodString;
17088
+ generation_id: z.ZodString;
17089
+ source: z.ZodObject<{
17090
+ tenant_id: z.ZodString;
17091
+ account_id: z.ZodString;
17092
+ livemode: z.ZodBoolean;
17093
+ provider: z.ZodEnum<{
17094
+ stripe: "stripe";
17095
+ }>;
17096
+ simulation_id: z.ZodOptional<z.ZodString>;
17097
+ }, z.core.$strict>;
17098
+ policy_version: z.ZodString;
17099
+ policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
17100
+ input_watermark: z.ZodISODateTime;
17101
+ created_at: z.ZodISODateTime;
17102
+ checkpoint: z.ZodObject<{
17103
+ cursor_revision_key: z.ZodNullable<z.ZodString>;
17104
+ processed_through: z.ZodNullable<z.ZodISODateTime>;
17105
+ processed_revisions: z.ZodNumber;
17106
+ completed: z.ZodBoolean;
17107
+ }, z.core.$strict>;
17108
+ }, z.core.$strict>], "status">;
17109
+ type BillingGeneration$1 = z.infer<typeof BillingGenerationSchema>;
17110
+ /**
17111
+ * Whether a generation may be published as active: only a completed build
17112
+ * whose reconciliation passed. Every refusal names why (AC-20: a failed
17113
+ * reconciliation blocks activation).
17114
+ */
17115
+ declare function canActivateBillingGeneration(generation: BillingGeneration$1): {
17116
+ ok: true;
17117
+ } | {
17118
+ ok: false;
17119
+ reason: 'not_shadow' | 'checkpoint_incomplete' | 'reconciliation_pending' | 'reconciliation_failed';
17120
+ };
17121
+ /** Fact families whose completeness is tracked independently (revenue-accounting §9). */
17122
+ declare const BILLING_COVERAGE_FAMILIES: readonly ["subscription_stock", "movement_history", "schedule_phases", "invoices", "invoice_payments", "payments", "adjustments", "balances", "losses", "receivables", "account_mappings", "cohort_membership"];
17123
+ /**
17124
+ * A declared opening balance where retained history begins after the first
17125
+ * commitment. It seeds a roll-forward; it is NEVER a movement, so it can
17126
+ * never be classified as new business or reactivation (revenue-accounting §4).
17127
+ */
17128
+ declare const BillingOpeningSeedSchema: z.ZodObject<{
17129
+ as_of: z.ZodISODateTime;
17130
+ basis: z.ZodEnum<{
17131
+ imported_opening_balance: "imported_opening_balance";
17132
+ verified_snapshot: "verified_snapshot";
17133
+ }>;
17134
+ }, z.core.$strict>;
17135
+ /** Why a span of coverage is missing. Named, so generated port enums do not renumber. */
17136
+ declare const BillingCoverageGapReasonSchema: z.ZodEnum<{
17137
+ provider_error: "provider_error";
17138
+ partial_hydration: "partial_hydration";
17139
+ missing_price_terms: "missing_price_terms";
17140
+ missing_history: "missing_history";
17141
+ ambiguous_revision: "ambiguous_revision";
17142
+ unmapped_customer: "unmapped_customer";
17143
+ missing_linkage: "missing_linkage";
17144
+ missing_ownership: "missing_ownership";
17145
+ retention_window: "retention_window";
17146
+ }>;
17147
+ /** Why a family's coverage is unavailable altogether. Named, so generated port enums do not renumber. */
17148
+ declare const BillingCoverageUnavailableReasonSchema: z.ZodEnum<{
17149
+ uninitialized: "uninitialized";
17150
+ provider_error: "provider_error";
17151
+ not_connected: "not_connected";
17152
+ hydration_in_progress: "hydration_in_progress";
17153
+ history_unavailable: "history_unavailable";
17154
+ }>;
17155
+ /** One known hole in coverage. `to: null` = still open. */
17156
+ declare const BillingCoverageGapRangeSchema: z.ZodObject<{
17157
+ from: z.ZodISODateTime;
17158
+ to: z.ZodNullable<z.ZodISODateTime>;
17159
+ reason: z.ZodEnum<{
17160
+ provider_error: "provider_error";
17161
+ partial_hydration: "partial_hydration";
17162
+ missing_price_terms: "missing_price_terms";
17163
+ missing_history: "missing_history";
17164
+ ambiguous_revision: "ambiguous_revision";
17165
+ unmapped_customer: "unmapped_customer";
17166
+ missing_linkage: "missing_linkage";
17167
+ missing_ownership: "missing_ownership";
17168
+ retention_window: "retention_window";
17169
+ }>;
17170
+ }, z.core.$strict>;
17171
+ /**
17172
+ * How completely one fact family is known for one scope. Mirrors plan 248's
17173
+ * evidence discipline: `unavailable` carries no coverage window at all, so an
17174
+ * unknown family can never be read as a verified empty one; `partial` must
17175
+ * name at least one gap; only `complete` is gap-free.
17176
+ */
17177
+ declare const BillingCoverageCheckpointSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
17178
+ state: z.ZodLiteral<"complete">;
17179
+ earliest_complete_at: z.ZodISODateTime;
17180
+ covered_through: z.ZodISODateTime;
17181
+ opening_seed: z.ZodNullable<z.ZodObject<{
17182
+ as_of: z.ZodISODateTime;
17183
+ basis: z.ZodEnum<{
17184
+ imported_opening_balance: "imported_opening_balance";
17185
+ verified_snapshot: "verified_snapshot";
17186
+ }>;
17187
+ }, z.core.$strict>>;
17188
+ checkpoint_version: z.ZodLiteral<1>;
17189
+ source: z.ZodObject<{
17190
+ tenant_id: z.ZodString;
17191
+ account_id: z.ZodString;
17192
+ livemode: z.ZodBoolean;
17193
+ provider: z.ZodEnum<{
17194
+ stripe: "stripe";
17195
+ }>;
17196
+ simulation_id: z.ZodOptional<z.ZodString>;
17197
+ }, z.core.$strict>;
17198
+ rt_account_id: z.ZodNullable<z.ZodString>;
17199
+ family: z.ZodEnum<{
17200
+ payments: "payments";
17201
+ subscription_stock: "subscription_stock";
17202
+ movement_history: "movement_history";
17203
+ schedule_phases: "schedule_phases";
17204
+ invoices: "invoices";
17205
+ invoice_payments: "invoice_payments";
17206
+ adjustments: "adjustments";
17207
+ balances: "balances";
17208
+ losses: "losses";
17209
+ receivables: "receivables";
17210
+ account_mappings: "account_mappings";
17211
+ cohort_membership: "cohort_membership";
17212
+ }>;
17213
+ recorded_at: z.ZodISODateTime;
17214
+ }, z.core.$strict>, z.ZodObject<{
17215
+ state: z.ZodLiteral<"partial">;
17216
+ earliest_complete_at: z.ZodNullable<z.ZodISODateTime>;
17217
+ covered_through: z.ZodISODateTime;
17218
+ opening_seed: z.ZodNullable<z.ZodObject<{
17219
+ as_of: z.ZodISODateTime;
17220
+ basis: z.ZodEnum<{
17221
+ imported_opening_balance: "imported_opening_balance";
17222
+ verified_snapshot: "verified_snapshot";
17223
+ }>;
17224
+ }, z.core.$strict>>;
17225
+ gaps: z.ZodArray<z.ZodObject<{
17226
+ from: z.ZodISODateTime;
17227
+ to: z.ZodNullable<z.ZodISODateTime>;
17228
+ reason: z.ZodEnum<{
17229
+ provider_error: "provider_error";
17230
+ partial_hydration: "partial_hydration";
17231
+ missing_price_terms: "missing_price_terms";
17232
+ missing_history: "missing_history";
17233
+ ambiguous_revision: "ambiguous_revision";
17234
+ unmapped_customer: "unmapped_customer";
17235
+ missing_linkage: "missing_linkage";
17236
+ missing_ownership: "missing_ownership";
17237
+ retention_window: "retention_window";
17238
+ }>;
17239
+ }, z.core.$strict>>;
17240
+ checkpoint_version: z.ZodLiteral<1>;
17241
+ source: z.ZodObject<{
17242
+ tenant_id: z.ZodString;
17243
+ account_id: z.ZodString;
17244
+ livemode: z.ZodBoolean;
17245
+ provider: z.ZodEnum<{
17246
+ stripe: "stripe";
17247
+ }>;
17248
+ simulation_id: z.ZodOptional<z.ZodString>;
17249
+ }, z.core.$strict>;
17250
+ rt_account_id: z.ZodNullable<z.ZodString>;
17251
+ family: z.ZodEnum<{
17252
+ payments: "payments";
17253
+ subscription_stock: "subscription_stock";
17254
+ movement_history: "movement_history";
17255
+ schedule_phases: "schedule_phases";
17256
+ invoices: "invoices";
17257
+ invoice_payments: "invoice_payments";
17258
+ adjustments: "adjustments";
17259
+ balances: "balances";
17260
+ losses: "losses";
17261
+ receivables: "receivables";
17262
+ account_mappings: "account_mappings";
17263
+ cohort_membership: "cohort_membership";
17264
+ }>;
17265
+ recorded_at: z.ZodISODateTime;
17266
+ }, z.core.$strict>, z.ZodObject<{
17267
+ state: z.ZodLiteral<"unavailable">;
17268
+ reason: z.ZodEnum<{
17269
+ uninitialized: "uninitialized";
17270
+ provider_error: "provider_error";
17271
+ not_connected: "not_connected";
17272
+ hydration_in_progress: "hydration_in_progress";
17273
+ history_unavailable: "history_unavailable";
17274
+ }>;
17275
+ last_observed_at: z.ZodNullable<z.ZodISODateTime>;
17276
+ checkpoint_version: z.ZodLiteral<1>;
17277
+ source: z.ZodObject<{
17278
+ tenant_id: z.ZodString;
17279
+ account_id: z.ZodString;
17280
+ livemode: z.ZodBoolean;
17281
+ provider: z.ZodEnum<{
17282
+ stripe: "stripe";
17283
+ }>;
17284
+ simulation_id: z.ZodOptional<z.ZodString>;
17285
+ }, z.core.$strict>;
17286
+ rt_account_id: z.ZodNullable<z.ZodString>;
17287
+ family: z.ZodEnum<{
17288
+ payments: "payments";
17289
+ subscription_stock: "subscription_stock";
17290
+ movement_history: "movement_history";
17291
+ schedule_phases: "schedule_phases";
17292
+ invoices: "invoices";
17293
+ invoice_payments: "invoice_payments";
17294
+ adjustments: "adjustments";
17295
+ balances: "balances";
17296
+ losses: "losses";
17297
+ receivables: "receivables";
17298
+ account_mappings: "account_mappings";
17299
+ cohort_membership: "cohort_membership";
17300
+ }>;
17301
+ recorded_at: z.ZodISODateTime;
17302
+ }, z.core.$strict>], "state">;
17303
+ interface InvoicePaymentAllocationSummary {
17304
+ payments: {
17305
+ scope: string;
17306
+ payment_id: string;
17307
+ currency: string;
17308
+ /** Captured cash; null when no capture of this payment was observed. */
17309
+ captured_minor: string | null;
17310
+ allocated_minor: string;
17311
+ /** Captured minus allocated; null unless capture AND complete allocation coverage are known. */
17312
+ unapplied_minor: string | null;
17313
+ allocations_coverage: 'complete' | 'partial' | 'unknown';
17314
+ }[];
17315
+ invoices: {
17316
+ scope: string;
17317
+ invoice_id: string;
17318
+ currency: string;
17319
+ /** Allocated from provider payments (cash-bearing edges). */
17320
+ allocated_from_payments_minor: string;
17321
+ /** Marked settled out of band: no evidenced cash. */
17322
+ out_of_band_minor: string;
17323
+ payments_coverage: 'complete' | 'partial' | 'unknown';
17324
+ }[];
17325
+ /** Captured cash per currency, counted once per payment, in the owner's scope (or unknown ownership). */
17326
+ collections_minor: Record<string, string>;
17327
+ /** Payments whose allocations exceed their captured amount. */
17328
+ over_allocated: {
17329
+ scope: string;
17330
+ payment_id: string;
17331
+ }[];
17332
+ /** Occurrences with tied revisions and no order evidence (need repair). */
17333
+ ambiguous: string[];
17334
+ /** Captures excluded because another account owns them (Connect views). */
17335
+ non_owner_payment_ids: string[];
17336
+ }
17337
+ /**
17338
+ * The conservation shape of InvoicePayment allocations (plan 252 A-11 /
17339
+ * AC-25): each payment is ONE collection however many invoices it funds; an
17340
+ * invoice's allocated amount is the sum of its paid edges, never a payment's
17341
+ * full amount; out-of-band edges carry no cash; applying funded balance or
17342
+ * credit is not an edge and so never a collection; partial page coverage
17343
+ * leaves unapplied cash unknown rather than inferred.
17344
+ *
17345
+ * A structural check over validated facts — the allocation / netting ORACLE
17346
+ * (refunds, credits, conversions) is TASK-46.
17347
+ */
17348
+ declare function summarizeInvoicePaymentAllocations(profiles: readonly BillingProfile$1[]): InvoicePaymentAllocationSummary;
17349
+
14777
17350
  /**
14778
17351
  * Segment B2B SaaS semantic events (plan 252 TASK-3, BL-0304; "B2B semantic map").
14779
17352
  *
@@ -15107,8 +17680,8 @@ declare const WebhookProcessingStatusSchema: z.ZodEnum<{
15107
17680
  unknown: "unknown";
15108
17681
  failed: "failed";
15109
17682
  pending: "pending";
15110
- processing: "processing";
15111
17683
  completed: "completed";
17684
+ processing: "processing";
15112
17685
  terminal: "terminal";
15113
17686
  not_required: "not_required";
15114
17687
  }>;
@@ -15146,10 +17719,10 @@ declare const WebhookDispatchStatusSchema: z.ZodEnum<{
15146
17719
  accepted: "accepted";
15147
17720
  failed: "failed";
15148
17721
  pending: "pending";
17722
+ ambiguous: "ambiguous";
15149
17723
  terminal: "terminal";
15150
17724
  not_required: "not_required";
15151
17725
  dispatching: "dispatching";
15152
- ambiguous: "ambiguous";
15153
17726
  }>;
15154
17727
  /** No CRUD operation exposes this record; webhookEventLog remains the display projection. */
15155
17728
  declare const WebhookDeliverySchema: z.ZodObject<{
@@ -15194,8 +17767,8 @@ declare const WebhookDeliverySchema: z.ZodObject<{
15194
17767
  unknown: "unknown";
15195
17768
  failed: "failed";
15196
17769
  pending: "pending";
15197
- processing: "processing";
15198
17770
  completed: "completed";
17771
+ processing: "processing";
15199
17772
  terminal: "terminal";
15200
17773
  not_required: "not_required";
15201
17774
  }>>;
@@ -15204,17 +17777,17 @@ declare const WebhookDeliverySchema: z.ZodObject<{
15204
17777
  accepted: "accepted";
15205
17778
  failed: "failed";
15206
17779
  pending: "pending";
17780
+ ambiguous: "ambiguous";
15207
17781
  terminal: "terminal";
15208
17782
  not_required: "not_required";
15209
17783
  dispatching: "dispatching";
15210
- ambiguous: "ambiguous";
15211
17784
  }>>;
15212
17785
  downstream_status: z.ZodDefault<z.ZodEnum<{
15213
17786
  unknown: "unknown";
15214
17787
  failed: "failed";
15215
17788
  pending: "pending";
15216
- processing: "processing";
15217
17789
  completed: "completed";
17790
+ processing: "processing";
15218
17791
  terminal: "terminal";
15219
17792
  not_required: "not_required";
15220
17793
  }>>;
@@ -18384,6 +20957,7 @@ declare const SeatTypeSchema: z.ZodObject<{
18384
20957
  handle: z.ZodString;
18385
20958
  description: z.ZodOptional<z.ZodString>;
18386
20959
  is_default: z.ZodDefault<z.ZodBoolean>;
20960
+ is_buyer: z.ZodDefault<z.ZodBoolean>;
18387
20961
  entitlement_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
18388
20962
  metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
18389
20963
  }, z.core.$strip>;
@@ -18825,6 +21399,7 @@ declare const RevTurbineConfigSeatTypesItemSchema: z.ZodObject<{
18825
21399
  name: z.ZodString;
18826
21400
  description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
18827
21401
  is_default: z.ZodDefault<z.ZodBoolean>;
21402
+ is_buyer: z.ZodDefault<z.ZodBoolean>;
18828
21403
  entitlement_handles: z.ZodDefault<z.ZodArray<z.ZodString>>;
18829
21404
  }, z.core.$strip>;
18830
21405
  /** Global usage-enforcement defaults projection (strategy). */
@@ -20065,6 +22640,7 @@ declare const PlaybookBodySchema: z.ZodObject<{
20065
22640
  name: z.ZodString;
20066
22641
  description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
20067
22642
  is_default: z.ZodDefault<z.ZodBoolean>;
22643
+ is_buyer: z.ZodDefault<z.ZodBoolean>;
20068
22644
  entitlement_handles: z.ZodDefault<z.ZodArray<z.ZodString>>;
20069
22645
  }, z.core.$strip>>>;
20070
22646
  enforcement_defaults: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -20724,6 +23300,7 @@ declare const PlaybookObjectSchema: z.ZodObject<{
20724
23300
  name: z.ZodString;
20725
23301
  description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
20726
23302
  is_default: z.ZodDefault<z.ZodBoolean>;
23303
+ is_buyer: z.ZodDefault<z.ZodBoolean>;
20727
23304
  entitlement_handles: z.ZodDefault<z.ZodArray<z.ZodString>>;
20728
23305
  }, z.core.$strip>>>;
20729
23306
  enforcement_defaults: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -21369,6 +23946,7 @@ declare const PlaybookSchema: z.ZodPreprocess<z.ZodObject<{
21369
23946
  name: z.ZodString;
21370
23947
  description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
21371
23948
  is_default: z.ZodDefault<z.ZodBoolean>;
23949
+ is_buyer: z.ZodDefault<z.ZodBoolean>;
21372
23950
  entitlement_handles: z.ZodDefault<z.ZodArray<z.ZodString>>;
21373
23951
  }, z.core.$strip>>>;
21374
23952
  enforcement_defaults: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -22032,6 +24610,7 @@ declare const PlaybookStrictSchema: z.ZodPreprocess<z.ZodObject<{
22032
24610
  name: z.ZodString;
22033
24611
  description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
22034
24612
  is_default: z.ZodDefault<z.ZodBoolean>;
24613
+ is_buyer: z.ZodDefault<z.ZodBoolean>;
22035
24614
  entitlement_handles: z.ZodDefault<z.ZodArray<z.ZodString>>;
22036
24615
  }, z.core.$strip>>>;
22037
24616
  enforcement_defaults: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -22674,6 +25253,7 @@ declare const RevTurbineConfigSchema: z.ZodPreprocess<z.ZodObject<{
22674
25253
  name: z.ZodString;
22675
25254
  description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
22676
25255
  is_default: z.ZodDefault<z.ZodBoolean>;
25256
+ is_buyer: z.ZodDefault<z.ZodBoolean>;
22677
25257
  entitlement_handles: z.ZodDefault<z.ZodArray<z.ZodString>>;
22678
25258
  }, z.core.$strip>>>;
22679
25259
  enforcement_defaults: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -24152,21 +26732,39 @@ type AuthTwoFactor = z.infer<typeof AuthTwoFactorSchema>;
24152
26732
  type AuthUser = z.infer<typeof AuthUserSchema>;
24153
26733
  type AuthVerification = z.infer<typeof AuthVerificationSchema>;
24154
26734
  type B2BSegmentEventName = z.infer<typeof B2BSegmentEventNameSchema>;
26735
+ type BillingAccountingRevision = z.infer<typeof BillingAccountingRevisionSchema>;
26736
+ type BillingAccountMappingRevision = z.infer<typeof BillingAccountMappingRevisionSchema>;
24155
26737
  type BillingAllocation = z.infer<typeof BillingAllocationSchema>;
24156
26738
  type BillingBalanceProfile = z.infer<typeof BillingBalanceProfileSchema>;
24157
26739
  type BillingCadence = z.infer<typeof BillingCadenceSchema>;
26740
+ type BillingCompletedGenerationCheckpoint = z.infer<typeof BillingCompletedGenerationCheckpointSchema>;
26741
+ type BillingCoverageCheckpoint = z.infer<typeof BillingCoverageCheckpointSchema>;
26742
+ type BillingCoverageGapRange = z.infer<typeof BillingCoverageGapRangeSchema>;
26743
+ type BillingCoverageGapReason = z.infer<typeof BillingCoverageGapReasonSchema>;
26744
+ type BillingCoverageUnavailableReason = z.infer<typeof BillingCoverageUnavailableReasonSchema>;
24158
26745
  type BillingCreditNoteLine = z.infer<typeof BillingCreditNoteLineSchema>;
24159
26746
  type BillingCreditProfile = z.infer<typeof BillingCreditProfileSchema>;
24160
26747
  type BillingCreditSettlement = z.infer<typeof BillingCreditSettlementSchema>;
26748
+ type BillingEconomicOwner = z.infer<typeof BillingEconomicOwnerSchema>;
26749
+ type BillingGenerationCheckpoint = z.infer<typeof BillingGenerationCheckpointSchema>;
26750
+ type BillingGeneration = z.infer<typeof BillingGenerationSchema>;
24161
26751
  type BillingHealthStatus = z.infer<typeof BillingHealthStatusSchema>;
26752
+ type BillingInvoicePaymentSource = z.infer<typeof BillingInvoicePaymentSourceSchema>;
24162
26753
  type BillingInvoiceProfile = z.infer<typeof BillingInvoiceProfileSchema>;
24163
26754
  type BillingLossProfile = z.infer<typeof BillingLossProfileSchema>;
24164
26755
  type BillingOccurrence = z.infer<typeof BillingOccurrenceSchema>;
26756
+ type BillingOpeningSeed = z.infer<typeof BillingOpeningSeedSchema>;
26757
+ type BillingOutputRowKey = z.infer<typeof BillingOutputRowKeySchema>;
26758
+ type BillingPriceTerms = z.infer<typeof BillingPriceTermsSchema>;
26759
+ type BillingPriceTier = z.infer<typeof BillingPriceTierSchema>;
24165
26760
  type BillingProfile = z.infer<typeof BillingProfileSchema>;
26761
+ type BillingReconciliation = z.infer<typeof BillingReconciliationSchema>;
26762
+ type BillingRecurrence = z.infer<typeof BillingRecurrenceSchema>;
24166
26763
  type BillingRecurringPrice = z.infer<typeof BillingRecurringPriceSchema>;
24167
26764
  type BillingRefundProfile = z.infer<typeof BillingRefundProfileSchema>;
24168
26765
  type BillingRepeatableOccurrence = z.infer<typeof BillingRepeatableOccurrenceSchema>;
24169
26766
  type BillingScheduleProfile = z.infer<typeof BillingScheduleProfileSchema>;
26767
+ type BillingSettlementAmount = z.infer<typeof BillingSettlementAmountSchema>;
24170
26768
  type BillingSourceScope = z.infer<typeof BillingSourceScopeSchema>;
24171
26769
  type BillingSubscriptionItemSnapshot = z.infer<typeof BillingSubscriptionItemSnapshotSchema>;
24172
26770
  type BillingSubscriptionProfile = z.infer<typeof BillingSubscriptionProfileSchema>;
@@ -24197,6 +26795,7 @@ type CtaObject = z.infer<typeof CtaObjectSchema>;
24197
26795
  type CtaPath = z.infer<typeof CtaPathSchema>;
24198
26796
  type CtaPathType = z.infer<typeof CtaPathTypeSchema>;
24199
26797
  type Currency = z.infer<typeof CurrencySchema>;
26798
+ type CustomerBuiltinDimensions = z.infer<typeof CustomerBuiltinDimensionsSchema>;
24200
26799
  type CustomerOverrideDuration = z.infer<typeof CustomerOverrideDurationSchema>;
24201
26800
  type CustomerOverride = z.infer<typeof CustomerOverrideSchema>;
24202
26801
  type CustomerOverrideStatus = z.infer<typeof CustomerOverrideStatusSchema>;
@@ -24277,6 +26876,9 @@ type GrowthSignalSeries = z.infer<typeof GrowthSignalSeriesSchema>;
24277
26876
  type Identity = z.infer<typeof IdentitySchema>;
24278
26877
  type IngestedEvent = z.infer<typeof IngestedEventSchema>;
24279
26878
  type InvitationStatus = z.infer<typeof InvitationStatusSchema>;
26879
+ type InvoicePaymentStatus = z.infer<typeof InvoicePaymentStatusSchema>;
26880
+ type InvoiceSettlementBasis = z.infer<typeof InvoiceSettlementBasisSchema>;
26881
+ type InvoiceStatus = z.infer<typeof InvoiceStatusSchema>;
24280
26882
  type KpiAggregate = z.infer<typeof KpiAggregateSchema>;
24281
26883
  type LocalizedText = z.infer<typeof LocalizedTextSchema>;
24282
26884
  type McpConfig = z.infer<typeof McpConfigSchema>;
@@ -24415,12 +27017,16 @@ type SegmentScreenInput = z.infer<typeof SegmentScreenInputSchema>;
24415
27017
  type SegmentTrackInput = z.infer<typeof SegmentTrackInputSchema>;
24416
27018
  type SegmentValue = z.infer<typeof SegmentValueSchema>;
24417
27019
  type SemanticEvent = z.infer<typeof SemanticEventSchema>;
27020
+ type ServerBuiltinDimensionsWrite = z.infer<typeof ServerBuiltinDimensionsWriteSchema>;
24418
27021
  type ServerEvaluationPayloadDecisionsItem = z.infer<typeof ServerEvaluationPayloadDecisionsItemSchema>;
24419
27022
  type ServerEvaluationPayloadEntitlementsValue = z.infer<typeof ServerEvaluationPayloadEntitlementsValueSchema>;
24420
27023
  type ServerEvaluationPayload = z.infer<typeof ServerEvaluationPayloadSchema>;
24421
27024
  type ServerEvaluationPayloadTrialStatus = z.infer<typeof ServerEvaluationPayloadTrialStatusSchema>;
24422
27025
  type ServerEvaluationPayloadUserContext = z.infer<typeof ServerEvaluationPayloadUserContextSchema>;
24423
27026
  type ServerEvaluationPayloadUser = z.infer<typeof ServerEvaluationPayloadUserSchema>;
27027
+ type ServerUserBuiltinDimensions = z.infer<typeof ServerUserBuiltinDimensionsSchema>;
27028
+ type ServerUserContextAssignment = z.infer<typeof ServerUserContextAssignmentSchema>;
27029
+ type ServerUserContextUpsert = z.infer<typeof ServerUserContextUpsertSchema>;
24424
27030
  type Severity = z.infer<typeof SeveritySchema>;
24425
27031
  type StripeBillingScope = z.infer<typeof StripeBillingScopeSchema>;
24426
27032
  type StripeIntegrationConfig = z.infer<typeof StripeIntegrationConfigSchema>;
@@ -24537,8 +27143,13 @@ type UnvalidatedConfigArtifact = {
24537
27143
  * @public
24538
27144
  */
24539
27145
  interface ConfigTargetDefaults {
24540
- /** Tenant the SDK was initialized with. Wins over the artifact's `tenant_id`. */
24541
- tenantId: string;
27146
+ /**
27147
+ * Tenant the SDK was initialized with. Wins over the artifact's `tenant_id`.
27148
+ * Optional since `0.11.14` (BL-0335): a key-only browser init passes none, and
27149
+ * the artifact's own `tenant_id` — stamped by the control plane for the
27150
+ * public key's tenant — is used.
27151
+ */
27152
+ tenantId?: string;
24542
27153
  /** Environment the SDK was initialized with. Wins over the artifact's `environment_id`. */
24543
27154
  environmentId: string;
24544
27155
  }
@@ -26490,6 +29101,35 @@ interface StaticAdapterOptions extends AdapterBaseOptions {
26490
29101
  * holding no tier.
26491
29102
  */
26492
29103
  tiers?: Record<string, string>;
29104
+ /**
29105
+ * Tenant-authored segment handles the app already resolved for this user
29106
+ * (BL-0369). Reported as members verbatim, ahead of any evaluated
29107
+ * membership. Omit when the app resolves none.
29108
+ */
29109
+ segmentIds?: string[];
29110
+ /**
29111
+ * The user context segment membership is evaluated from (BL-0369). Every
29112
+ * configured segment's predicates run against
29113
+ * `buildTargetingState(userContext).segmentTraits` — which is where the
29114
+ * reserved `rt_<dimension>` traits the generated built-in segments match on
29115
+ * come from (`builtin_dimensions`, plan 279 PD-3) — with
29116
+ * `userContext.experiments` as the enrollment map. Omit it and no segment is
29117
+ * evaluated: membership is `segmentIds` alone (fail closed).
29118
+ */
29119
+ userContext?: UserContextSnapshot;
29120
+ /**
29121
+ * The control plane's server-resolved built-in dimensions for this user
29122
+ * (BL-0366) — e.g. the `builtin_dimensions` of
29123
+ * `GET /api/sdk/user-contexts/{userId}/builtin-dimensions`, fetched with
29124
+ * the server key. Applied as a per-key OVERLAY on
29125
+ * `userContext.builtin_dimensions` before membership is evaluated: a leaf
29126
+ * present here wins over the app-set value (plan 279 PD-3), and an app-set
29127
+ * leaf the server did not deliver survives — the same overlay
29128
+ * `mergeUserContext` applies to a client-context delivery in the browser.
29129
+ * Ignored without a `userContext` (nothing is evaluated then; fail closed).
29130
+ * See {@link applyServerBuiltinDimensions}.
29131
+ */
29132
+ serverBuiltinDimensions?: UserContextSnapshot['builtin_dimensions'];
26493
29133
  }
26494
29134
  /**
26495
29135
  * Create domain providers from a static RevTurbineConfig snapshot.
@@ -27749,6 +30389,22 @@ declare function formatCurrencyMinorUnits(amount: number, currencyCode: string,
27749
30389
  type SdkMetadata = Record<string, JsonValue>;
27750
30390
  /** User-provided traits or custom context (inherently untyped from customer code). */
27751
30391
  type SdkTraits = Record<string, JsonValue>;
30392
+ /**
30393
+ * Top-level keys {@link RevTurbineCustomerSdk.identify} recognizes on a
30394
+ * canonical user-context input. Anything else is dropped and reported
30395
+ * (plan 168 REQ-3, plan 191 REQ-3). `satisfies` guards each entry against
30396
+ * typos; `update-keys-exhaustiveness.test-d.ts` derives the reverse
30397
+ * direction, so an {@link IdentifyContextInput} field identify() does not
30398
+ * merge has to be acknowledged there (BL-0352).
30399
+ */
30400
+ declare const RECOGNIZED_IDENTIFY_KEYS: readonly ["account_id", "email", "plan", "plan_handle", "usage", "entitlements", "custom", "personalization"];
30401
+ /**
30402
+ * The top-level {@link IdentifyContextInput} keys
30403
+ * {@link RevTurbineCustomerSdk.identify} merges into the held context (the
30404
+ * entries of its recognized-key list). Exported for type-level
30405
+ * exhaustiveness checks; it has no runtime value.
30406
+ */
30407
+ type RecognizedIdentifyKey = (typeof RECOGNIZED_IDENTIFY_KEYS)[number];
27752
30408
  /** Properties attached to analytics events. */
27753
30409
  type SdkEventProperties = Record<string, JsonValue>;
27754
30410
  interface RevTurbineSdkProvider {
@@ -27877,13 +30533,55 @@ type RevTurbinePlaybookLoadState = 'ready' | 'loading' | 'unavailable';
27877
30533
  * ```
27878
30534
  */
27879
30535
  type UserContextInput = Omit<UserContext, 'id' | 'tenant_id' | 'user_id' | 'created_at' | 'updated_at'>;
30536
+ /**
30537
+ * User-context fields only the server may write, so the browser input types
30538
+ * ({@link IdentifyContextInput}, {@link RevTurbineUserContext} and, through it,
30539
+ * {@link RevTurbineUpdateInput}) omit them, and every browser entry point
30540
+ * (`identify()`, `update()`, `setUserContext()`, the `user` init option)
30541
+ * drops them at runtime for plain-JS callers (BL-0351, BL-0352, BL-0381).
30542
+ *
30543
+ * Trust is by party (D-46): the browser client never asserts these values;
30544
+ * the customer's server may (a server-key user-context write, or a server
30545
+ * SDK's overlay inputs), and RevTurbine's server may enrich them.
30546
+ *
30547
+ * - `seat_type_handle` — the user's seat-type assignment (plan 279, D-36).
30548
+ * It has exactly two writers: the tenant's backend, through a server-key
30549
+ * user-context upsert, and RevTurbine's own server-side enrichment in
30550
+ * hosted mode. It is never accepted from `identify()`, `update()` or any
30551
+ * credential the browser holds; the control plane resolves the delivered
30552
+ * `seat_type` / `buyer_role` built-in dimensions from it.
30553
+ * - `activity_score` / `activity_score_computed_at` — computed by the
30554
+ * control plane's hourly activity-score refresh from the event stream and
30555
+ * persisted on `user_contexts` (plan 180; targeting-studio-ui.md §4.1,
30556
+ * Activity State). The browser receives the derived level through the
30557
+ * `activity_level` built-in dimension, never the score, and never writes
30558
+ * either field (D-36's principle).
30559
+ * - `builtin_dimensions` — the resolved built-in segment dimensions that
30560
+ * stamp the reserved `rt_<dimension>` traits (plan 279 PD-3, as amended by
30561
+ * D-46; BL-0381). The only browser source is the authenticated
30562
+ * `GET /api/sdk/client-context` delivery, which the SDK merges into its
30563
+ * held context itself; an app-supplied value would let the browser claim
30564
+ * any built-in segment (e.g. `rt.subscription_state.paid`).
30565
+ * - `customer_builtin_dimensions` — the customer-set built-in dimension
30566
+ * values and their per-key `override` pins (D-47; BL-0382). Written only by
30567
+ * the customer's server through the server-key `POST /api/sdk/user-contexts`
30568
+ * upsert (server-node `setBuiltinDimensions`); the control plane folds them
30569
+ * into `builtin_dimensions` before delivery.
30570
+ */
30571
+ declare const SERVER_ASSIGNED_USER_CONTEXT_KEYS: readonly ["seat_type_handle", "activity_score", "activity_score_computed_at", "builtin_dimensions", "customer_builtin_dimensions"];
30572
+ type ServerAssignedUserContextKey = (typeof SERVER_ASSIGNED_USER_CONTEXT_KEYS)[number];
27880
30573
  /**
27881
30574
  * Input accepted by {@link RevTurbineCustomerSdk.identify} for the canonical
27882
30575
  * user-context shape (plan 191). `plan_handle` is THE plan matching
27883
30576
  * identity — the plan's `unique_handle`; the `plan` object is display
27884
30577
  * metadata (name/price/period) and never participates in matching.
30578
+ *
30579
+ * Server-assigned fields (`seat_type_handle`, `activity_score`,
30580
+ * `activity_score_computed_at`, `builtin_dimensions`) are not accepted here
30581
+ * (plan 279, D-36, D-46; BL-0352, BL-0381); the tenant's backend or
30582
+ * RevTurbine's enrichment writes them.
27885
30583
  */
27886
- type IdentifyContextInput = Partial<UserContextInput> & {
30584
+ type IdentifyContextInput = Partial<Omit<UserContextInput, ServerAssignedUserContextKey>> & {
27887
30585
  /** THE plan matching identity — the plan's `unique_handle` (e.g. `'pro'`). */
27888
30586
  plan_handle?: string;
27889
30587
  };
@@ -28012,7 +30710,11 @@ type RevTurbineGateResult<T> = {
28012
30710
  * `{ plan }`) never clobbers other context. Patchable fields include `plan`,
28013
30711
  * `email`, `account_id`, `entitlements`, `custom`, `personalization`, `trial`,
28014
30712
  * the billing-recovery signals (`payment_failed` / `payment_at_risk`), `tiers`,
28015
- * and `usage`.
30713
+ * app-known experiment assignments (`experiments`, plan 183), and `usage`.
30714
+ * Server-assigned fields (`seat_type_handle`, `activity_score`,
30715
+ * `activity_score_computed_at`, `builtin_dimensions`) are not patchable
30716
+ * (D-36, D-46; BL-0352, BL-0381): built-in dimension values reach the browser
30717
+ * only from the authenticated client-context delivery.
28016
30718
  *
28017
30719
  * `usage` keeps its friendly `Record<string, number>` shape (absolute balances),
28018
30720
  * distinct from the richer per-entry `usage` on {@link RevTurbineUserContext}.
@@ -28024,12 +30726,21 @@ type RevTurbineUpdateInput = Omit<RevTurbineUserContext, 'id' | 'usage'> & {
28024
30726
  /**
28025
30727
  * Runtime mirror of {@link RevTurbineUpdateInput}'s keys — the fields
28026
30728
  * `update()` patches. `satisfies` guards each entry against typos/renames;
28027
- * the aliases test asserts exhaustiveness against the type, so a
28028
- * schema-added context field fails the build until acknowledged here.
28029
- * JS callers' keys outside this set are dropped with a dev warning rather
28030
- * than merged into the context.
30729
+ * `update-keys-exhaustiveness.test-d.ts` (compiled by
30730
+ * `pnpm check:types:exact`) derives the reverse direction, so a
30731
+ * schema-added context field fails the build until it is acknowledged here
30732
+ * or omitted from the browser input types (BL-0352). JS callers' keys
30733
+ * outside this set are dropped with a warning rather than merged into the
30734
+ * context.
30735
+ */
30736
+ declare const RECOGNIZED_UPDATE_KEYS: readonly ["usage", "account_id", "email", "email_type", "plan_handle", "plan", "trial", "payment_failed", "payment_at_risk", "tiers", "entitlements", "instances", "custom", "personalization", "experiments", "derived_config_version", "context_hash", "derived_computed_at"];
30737
+ /**
30738
+ * The top-level {@link RevTurbineUpdateInput} keys
30739
+ * {@link RevTurbineCustomerSdk.update} patches (the entries of
30740
+ * {@link RECOGNIZED_UPDATE_KEYS}). Exported for type-level exhaustiveness
30741
+ * checks; it has no runtime value.
28031
30742
  */
28032
- declare const RECOGNIZED_UPDATE_KEYS: readonly ["usage", "account_id", "email", "email_type", "plan_handle", "plan", "trial", "payment_failed", "payment_at_risk", "tiers", "entitlements", "instances", "custom", "personalization", "derived_config_version", "context_hash", "derived_computed_at"];
30743
+ type RecognizedUpdateKey = (typeof RECOGNIZED_UPDATE_KEYS)[number];
28033
30744
  /** Usage snapshot entry for a usage unit. */
28034
30745
  interface RevTurbineUsageSnapshotEntry {
28035
30746
  /** Current consumed amount for the usage unit. */
@@ -28082,8 +30793,27 @@ type ServerEvaluationHydrationPayload = ServerEvaluationPayload;
28082
30793
  * `custom` is widened to `Record<string, unknown>` at the SDK boundary
28083
30794
  * for customer convenience; values are narrowed to `TraitValue` when
28084
30795
  * persisted via the API.
28085
- */
28086
- interface RevTurbineUserContext extends Omit<UserContextInput, 'custom' | 'entitlements' | 'usage' | 'personalization' | 'derived_computed_at' | 'context_hash'> {
30796
+ *
30797
+ * `seat_type_handle` is omitted on purpose (plan 279, D-36). A user's seat
30798
+ * type is assigned only server-side: by the tenant's backend through a
30799
+ * server-key user-context upsert, or by RevTurbine's enrichment in hosted
30800
+ * mode. The browser never writes it, so neither `identify()`, `update()`,
30801
+ * `setUserContext()` nor the `user` init option accepts it. The browser
30802
+ * receives the resolved `seat_type` / `buyer_role` as built-in dimensions
30803
+ * delivered by `GET /api/sdk/client-context` instead. The server-computed
30804
+ * `activity_score` / `activity_score_computed_at` are omitted on the same
30805
+ * principle (BL-0352); the browser receives the derived `activity_level`
30806
+ * dimension.
30807
+ *
30808
+ * `builtin_dimensions` is omitted too (D-46, BL-0381): the browser never
30809
+ * asserts a built-in dimension value. The SDK holds the values
30810
+ * `fetchClientContext` delivers and stamps the reserved `rt_<dimension>`
30811
+ * segment traits from them; read them back through
30812
+ * {@link RevTurbineCustomerSdk.getUserContext getUserContext()}. A plain-JS
30813
+ * caller that passes any of these keys has them dropped and reported at
30814
+ * runtime.
30815
+ */
30816
+ interface RevTurbineUserContext extends Omit<UserContextInput, 'custom' | 'entitlements' | 'usage' | 'personalization' | 'derived_computed_at' | 'context_hash' | ServerAssignedUserContextKey> {
28087
30817
  /** Authenticated user identifier. When undefined, the SDK uses an anonymous ID. */
28088
30818
  id?: string;
28089
30819
  /**
@@ -28112,25 +30842,6 @@ interface RevTurbineUserContext extends Omit<UserContextInput, 'custom' | 'entit
28112
30842
  * `string | number` when serialized.
28113
30843
  */
28114
30844
  personalization?: SdkTraits;
28115
- /**
28116
- * Server-evaluated built-in segment dimensions (plan 279 PD-3), one leaf
28117
- * per resolved dimension keyed by its dimension key (e.g.
28118
- * `subscription_state`, `region`) — see the built-in segment resolution
28119
- * contract in `targeting-studio-ui.md` §4.1 for the full vocabulary.
28120
- *
28121
- * `fetchClientContext` delivers this from `GET /api/sdk/client-context`
28122
- * and merges it the way it merges `plan_handle`: **server values overlay
28123
- * app-set values**, per leaf. A dimension the server did not evaluate on a
28124
- * given fetch leaves whatever the app (or a prior fetch) had set for that
28125
- * leaf untouched; a dimension is simply absent when neither side has ever
28126
- * set it (unknown is trait absence — plan 255).
28127
- *
28128
- * Feeds the reserved `rt_<dimension>` segment traits that built-in
28129
- * Playbook segments match on — never read or write those trait keys
28130
- * directly. Set this yourself only to seed `local_only` mode or a
28131
- * server-side port, which has no client-context fetch of its own.
28132
- */
28133
- builtin_dimensions?: UserContextInput['builtin_dimensions'];
28134
30845
  }
28135
30846
  /** Page-level context automatically inferred or manually set. */
28136
30847
  interface RevTurbinePageContext {
@@ -28325,8 +31036,26 @@ interface RevTurbineTelemetryOptions {
28325
31036
  consent?: TelemetryConsent;
28326
31037
  }
28327
31038
  interface RevTurbineInitOptions {
28328
- /** Your RevTurbine tenant identifier. */
28329
- tenantId: string;
31039
+ /**
31040
+ * Your RevTurbine tenant identifier — **optional whenever a
31041
+ * {@link publicKey} is supplied** (BL-0335, `0.11.14`).
31042
+ *
31043
+ * The public key is bound to exactly one tenant, so the control plane
31044
+ * resolves the tenant from the key alone and the SDK reads it back from the
31045
+ * launched Playbook it fetches (the signed manifest's and the Playbook's
31046
+ * `tenant_id`). Passing a tenant id as well is still accepted, but the key
31047
+ * is the sole arbiter of the tenant (D-49): when the key-authenticated
31048
+ * delivery names a different tenant, the SDK warns once per init
31049
+ * (`tenantId <x> does not match the key's tenant <y>; using <y>`) and adopts
31050
+ * the key's tenant. The control plane likewise ignores a mismatching tenant
31051
+ * id (with a server-side warning); it never refuses the request.
31052
+ *
31053
+ * Still required when there is no public key to identify the tenant — a
31054
+ * `local_only` init without `localRuntime.playbook` (with one, the SDK
31055
+ * defaults it to `'local'`), or a server-key (`apiKey`) headless init. The
31056
+ * SDK throws a descriptive error at init when neither is present.
31057
+ */
31058
+ tenantId?: string;
28330
31059
  /**
28331
31060
  // @revturbine-graph configuration:revturbine-sdk-internal:web-sdk/customer-side.ts#RevTurbineInitOptions
28332
31061
  * Your **public key** — the browser credential.
@@ -28762,6 +31491,17 @@ interface RevTurbineLocalRuntimeOptions {
28762
31491
  * './revturbine.playbook.json'` passes `tsc --strict` directly, no cast
28763
31492
  * needed; the SDK validates the shape at init and fails fast on a malformed
28764
31493
  * artifact.
31494
+ *
31495
+ * Built-in segments (`rt.<dimension>.<value>`) need no definitions in the
31496
+ * file: the SDK adds them at load from RevTurbine's catalogue, with Seat Type
31497
+ * values taken from the Playbook's own `seat_types`. An authored segment
31498
+ * under the reserved `rt.` prefix is ignored.
31499
+ *
31500
+ * The definitions exist, but the values do not come from the app: the
31501
+ * browser never sets built-in dimensions (D-46, BL-0381). They reach the
31502
+ * SDK only from `GET /api/sdk/client-context` (a `clientSession` minter
31503
+ * backed by your server), so without that delivery every built-in segment
31504
+ * fails closed — a chip or rule naming one matches nobody.
28765
31505
  */
28766
31506
  playbook?: ConfigArtifact | UnvalidatedConfigArtifact;
28767
31507
  /**
@@ -29223,7 +31963,21 @@ declare const EMITTABLE_PLATFORM_EVENT_NAMES: readonly string[];
29223
31963
  * ```
29224
31964
  */
29225
31965
  declare class RevTurbineCustomerSdk {
29226
- private readonly tenantId;
31966
+ /**
31967
+ * The tenant the integration passed at init, if any. Optional since BL-0335:
31968
+ * with a public key the tenant is read from the launched Playbook instead —
31969
+ * see the `tenantId` getter.
31970
+ */
31971
+ private readonly configuredTenantId?;
31972
+ /**
31973
+ * Stable namespace for everything the SDK keys LOCALLY — storage keys,
31974
+ * cache/cap keys, generated placement ids. It is the configured tenant id
31975
+ * when one was passed (so existing integrations keep every persisted key
31976
+ * byte-for-byte), else a hash of the public key. It never changes during a
31977
+ * session, unlike `tenantId`, which a key-only integration learns only once
31978
+ * the Playbook loads.
31979
+ */
31980
+ private readonly tenantNamespace;
29227
31981
  /** The browser credential — `publicKey`, the only name it arrives under. */
29228
31982
  private readonly publicKey;
29229
31983
  /**
@@ -29381,6 +32135,21 @@ declare class RevTurbineCustomerSdk {
29381
32135
  readonly impressionHistory: ImpressionHistory;
29382
32136
  constructor(options: RevTurbineInitOptions);
29383
32137
  private isLocalOnlyMode;
32138
+ /**
32139
+ * The tenant this SDK operates in: the key's tenant once a key-authenticated
32140
+ * delivery named one that differs from the configured `tenantId` (D-49),
32141
+ * else the configured `tenantId`, else the one the Playbook delivery named
32142
+ * (BL-0335). `undefined` only between init and the first Playbook load of a
32143
+ * key-only integration.
32144
+ */
32145
+ private get tenantId();
32146
+ /**
32147
+ * The tenant header for the SDK's direct control-plane calls: sent only when
32148
+ * the integration CONFIGURED a tenant id — and then the key's tenant once it
32149
+ * was adopted (D-49). The control plane ignores a mismatching value with a
32150
+ * warning. A key-only integration sends none — the key names the tenant.
32151
+ */
32152
+ private tenantHeader;
29384
32153
  private resolveConfigProvider;
29385
32154
  private refreshPlaybookSnapshot;
29386
32155
  /**
@@ -30054,9 +32823,19 @@ declare class RevTurbineCustomerSdk {
30054
32823
  * upsert; an omitted field never clobbers a previously-set value. See the
30055
32824
  * advertised {@link update} alias for the full recognized-field contract.
30056
32825
  *
32826
+ * Server-assigned fields (`seat_type_handle`, `activity_score`,
32827
+ * `activity_score_computed_at`) are dropped and reported, never merged:
32828
+ * they are written only by the tenant's backend or RevTurbine's
32829
+ * enrichment (D-36, BL-0352). The parameter type does not yet reject other
32830
+ * undeclared keys the way {@link identify} and {@link update} do; that
32831
+ * `Exact<>` narrowing is deferred to `0.12.0` because it can break callers
32832
+ * that pass a wider object today.
32833
+ *
30057
32834
  * @public
30058
32835
  */
30059
32836
  setUserContext(userContext: RevTurbineUserContext): void;
32837
+ /** {@link setUserContext}'s merge, on a patch already cleared of server-assigned keys. */
32838
+ private mergeAcceptedUserContext;
30060
32839
  /**
30061
32840
  * Subscribe to user-context changes — `identify()`, `setUserContext()`,
30062
32841
  * `update()`, `updateUsage()`, and `resetIdentity()` (plan 194 REQ-3).
@@ -30410,6 +33189,15 @@ declare class RevTurbineCustomerSdk {
30410
33189
  */
30411
33190
  private rejectLegacyPlanId;
30412
33191
  private reportUnrecognizedContextKeys;
33192
+ /**
33193
+ * Report server-assigned keys a browser entry point dropped (D-36,
33194
+ * BL-0351, BL-0352). Same once-per-session dedupe and anonymous
33195
+ * `sdk_validation_warning` lane as {@link reportUnrecognizedContextKeys},
33196
+ * with guidance that names the actual writer instead of pointing the caller
33197
+ * at `custom` — moving a server-assigned value under `custom` would not make
33198
+ * it any less browser-supplied.
33199
+ */
33200
+ private reportServerAssignedContextKeys;
30413
33201
  private normalizePlacementOutput;
30414
33202
  private validateTrialStatusShape;
30415
33203
  /**
@@ -32731,6 +35519,46 @@ interface paths {
32731
35519
  patch?: never;
32732
35520
  trace?: never;
32733
35521
  };
35522
+ "/api/sdk/user-contexts": {
35523
+ parameters: {
35524
+ query?: never;
35525
+ header?: never;
35526
+ path?: never;
35527
+ cookie?: never;
35528
+ };
35529
+ get?: never;
35530
+ put?: never;
35531
+ /**
35532
+ * Set a user's seat type and built-in dimension values — server key only
35533
+ * @description Upserts the server-written state of one user by (token tenant, user_id): the seat assignment and/or built-in segment dimension values (D-46). Accepts ONLY a Bearer API token whose token_type is `server`; a session, `client`, `mcp` or `public` credential is refused with 401/403. The tenant comes from the token, never from the request. The body is strict: `user_id`, `seat_type_handle`, `builtin_dimensions`, `override`. `seat_type_handle` must be one of the tenant's current seat types (422 otherwise); `null` clears it; omitted leaves it unchanged. Each `builtin_dimensions` value must be in its dimension's vocabulary (422 otherwise); `null` clears it. `override: true` pins the written dimensions so RevTurbine enrichment does not replace them; without it the write is an update that a newer enrichment change supersedes (last writer wins), and a pinned dimension written without it is unpinned (D-47).
35534
+ */
35535
+ post: operations["upsertServerUserContext"];
35536
+ delete?: never;
35537
+ options?: never;
35538
+ head?: never;
35539
+ patch?: never;
35540
+ trace?: never;
35541
+ };
35542
+ "/api/sdk/user-contexts/{userId}/builtin-dimensions": {
35543
+ parameters: {
35544
+ query?: never;
35545
+ header?: never;
35546
+ path?: never;
35547
+ cookie?: never;
35548
+ };
35549
+ /**
35550
+ * Read a user's server-resolved built-in segment dimensions — server key only
35551
+ * @description Returns the control plane's built-in segment dimensions (subscription state, trial type, activity level, seat type, buyer role, billing health, …) for one user of the token tenant, so a server SDK can overlay them onto the app-supplied context (the server value wins, PD-3). Accepts ONLY a Bearer API token whose token_type is `server`; a session, `client`, `mcp` or `public` credential is refused with 401/403. The tenant comes from the token, never from the request. An unknown user resolves to each dimension's default, not 404. Request-derived dimensions (`region`, `device_type`) are never present.
35552
+ */
35553
+ get: operations["getServerUserBuiltinDimensions"];
35554
+ put?: never;
35555
+ post?: never;
35556
+ delete?: never;
35557
+ options?: never;
35558
+ head?: never;
35559
+ patch?: never;
35560
+ trace?: never;
35561
+ };
32734
35562
  }
32735
35563
  interface components {
32736
35564
  schemas: {
@@ -32930,6 +35758,12 @@ interface components {
32930
35758
  /** @enum {string} */
32931
35759
  TreatmentInteractionType: "impression" | "dismiss" | "remind_me_later" | "cta_clicked" | "cta_completed" | "suppress";
32932
35760
  TreatmentInteractionBatch: components["schemas"]["TreatmentInteractionInput"][];
35761
+ ServerUserContextUpsert: {
35762
+ user_id: components["schemas"]["Anon_761f976a1da1_1"];
35763
+ seat_type_handle?: components["schemas"]["Anon_abb9584a79fc_1"];
35764
+ builtin_dimensions?: components["schemas"]["Anon_7720c3584d94"];
35765
+ override?: components["schemas"]["Anon_fb9ddeea992e_6"];
35766
+ };
32933
35767
  /** @default 1 */
32934
35768
  Anon_9370e83b9cfe: number;
32935
35769
  /** @default 25 */
@@ -33289,8 +36123,8 @@ interface components {
33289
36123
  Anon_f090cb615c84_21: string | null;
33290
36124
  Anon_4fc4bfa2adad_10: components["schemas"]["Anon_f090cb615c84_22"];
33291
36125
  Anon_f090cb615c84_22: string | null;
33292
- Anon_fb9ddeea992e_2: components["schemas"]["Anon_7cb541e84f22_30"];
33293
- Anon_7cb541e84f22_30: boolean;
36126
+ Anon_fb9ddeea992e_2: components["schemas"]["Anon_7cb541e84f22_31"];
36127
+ Anon_7cb541e84f22_31: boolean;
33294
36128
  Anon_96967a4faf8d: components["schemas"]["SdkMetaEvent"][];
33295
36129
  Anon_53b83ce9a609: components["schemas"]["SdkMetaEventType"];
33296
36130
  /** Format: date-time */
@@ -33356,12 +36190,52 @@ interface components {
33356
36190
  Anon_9ac136edb99a_18: string;
33357
36191
  Anon_94b7b4f4c44a: components["schemas"]["Anon_904af497346b"];
33358
36192
  Anon_904af497346b: string | null;
33359
- Anon_fb9ddeea992e_3: components["schemas"]["Anon_7cb541e84f22_31"];
33360
- Anon_7cb541e84f22_31: boolean;
36193
+ Anon_fb9ddeea992e_3: components["schemas"]["Anon_7cb541e84f22_32"];
36194
+ Anon_7cb541e84f22_32: boolean;
33361
36195
  Anon_a249e58b3222: components["schemas"]["Anon_c65c1fbd5acf_8"];
33362
36196
  Anon_c65c1fbd5acf_8: {
33363
36197
  [key: string]: unknown;
33364
36198
  };
36199
+ Anon_761f976a1da1_1: string;
36200
+ /** @enum {string} */
36201
+ Anon_d1623b956533: "new" | "high" | "medium" | "low" | "inactive";
36202
+ /** @enum {string} */
36203
+ Anon_a68601fc8ae6: "none" | "trial" | "paid" | "cancelled";
36204
+ /** @enum {string} */
36205
+ Anon_2277a9ff20f2: "none" | "free_trial" | "reverse_trial";
36206
+ /** @enum {string} */
36207
+ Anon_36144f6ff1f7: "buyer" | "non_buyer";
36208
+ /** @enum {string} */
36209
+ Anon_2e475c2b8517: "business" | "personal" | "unknown";
36210
+ /** @enum {string} */
36211
+ Anon_ea3031eacbdb: "no_billing" | "good_standing" | "trial_payment_method_attached" | "payment_method_missing" | "payment_failed" | "payment_overdue" | "cancelled";
36212
+ /** @enum {string} */
36213
+ Anon_4304284c431c: "us_canada" | "europe" | "rest_of_world";
36214
+ /** @enum {string} */
36215
+ Anon_eca965e9cb3d: "desktop" | "mobile" | "tablet" | "unknown";
36216
+ Anon_abb9584a79fc_1: components["schemas"]["Anon_97d5d0070850_1"];
36217
+ Anon_97d5d0070850_1: string | null;
36218
+ Anon_7720c3584d94: components["schemas"]["Anon_4b790ef08790"];
36219
+ Anon_4b790ef08790: {
36220
+ activity_level?: components["schemas"]["Anon_8f515c161b83"];
36221
+ subscription_state?: components["schemas"]["Anon_ed91fb5f5619"];
36222
+ trial_type?: components["schemas"]["Anon_888d7176e40e"];
36223
+ buyer_role?: components["schemas"]["Anon_6bead9fc16d2"];
36224
+ email_type?: components["schemas"]["Anon_e92ea640abba"];
36225
+ billing_health?: components["schemas"]["Anon_59a9cbd75a66"];
36226
+ region?: components["schemas"]["Anon_10d900d3a9e4"];
36227
+ device_type?: components["schemas"]["Anon_01efac8cdc3b"];
36228
+ };
36229
+ Anon_8f515c161b83: components["schemas"]["Anon_d1623b956533"] | null;
36230
+ Anon_ed91fb5f5619: components["schemas"]["Anon_a68601fc8ae6"] | null;
36231
+ Anon_888d7176e40e: components["schemas"]["Anon_2277a9ff20f2"] | null;
36232
+ Anon_6bead9fc16d2: components["schemas"]["Anon_36144f6ff1f7"] | null;
36233
+ Anon_e92ea640abba: components["schemas"]["Anon_2e475c2b8517"] | null;
36234
+ Anon_59a9cbd75a66: components["schemas"]["Anon_ea3031eacbdb"] | null;
36235
+ Anon_10d900d3a9e4: components["schemas"]["Anon_4304284c431c"] | null;
36236
+ Anon_01efac8cdc3b: components["schemas"]["Anon_eca965e9cb3d"] | null;
36237
+ Anon_fb9ddeea992e_6: components["schemas"]["Anon_7cb541e84f22_35"];
36238
+ Anon_7cb541e84f22_35: boolean;
33365
36239
  Plan: {
33366
36240
  id: components["schemas"]["Anon_fb248bf5a9f7_9"];
33367
36241
  created_at: components["schemas"]["Anon_be3e2585472d_2"];
@@ -33461,7 +36335,7 @@ interface components {
33461
36335
  currency: components["schemas"]["Anon_1788a9a8a0b9_2"];
33462
36336
  pricing_model: components["schemas"]["Anon_1b09b93e2f83_5"];
33463
36337
  nickname: components["schemas"]["Anon_f7fb9744a6e4_14"];
33464
- is_mock: components["schemas"]["Anon_062d958a93c4_4"];
36338
+ is_mock: components["schemas"]["Anon_062d958a93c4_5"];
33465
36339
  last_updated_from_stripe: components["schemas"]["Anon_711dc9708535_7"];
33466
36340
  };
33467
36341
  Entitlement: {
@@ -33519,13 +36393,13 @@ interface components {
33519
36393
  rate_value?: components["schemas"]["Anon_9c7f41b09bde_4"];
33520
36394
  initial_grant?: components["schemas"]["Anon_9c7f41b09bde_5"];
33521
36395
  allowance_value?: components["schemas"]["Anon_811366723713_3"];
33522
- rollover_enabled?: components["schemas"]["Anon_fb9ddeea992e_6"];
36396
+ rollover_enabled?: components["schemas"]["Anon_fb9ddeea992e_7"];
33523
36397
  max_balance: components["schemas"]["Anon_d84a41962ed1_1"];
33524
36398
  seat_type_id?: components["schemas"]["Anon_96f9066c2fdc_38"];
33525
36399
  included_count?: components["schemas"]["Anon_5d154a3d9b9e_1"];
33526
36400
  at_limit_behavior?: components["schemas"]["Anon_28e076aa98f9_1"];
33527
36401
  stripe_metered_price_id?: components["schemas"]["Anon_96f9066c2fdc_39"];
33528
- enabled?: components["schemas"]["Anon_fb9ddeea992e_7"];
36402
+ enabled?: components["schemas"]["Anon_fb9ddeea992e_8"];
33529
36403
  allocation?: components["schemas"]["Anon_a7c491664ac5_4"];
33530
36404
  max_seats?: components["schemas"]["Anon_0dc47bdde23b_1"];
33531
36405
  amount_cents?: components["schemas"]["Anon_18968514c96d_1"];
@@ -33562,13 +36436,13 @@ interface components {
33562
36436
  rate_value?: components["schemas"]["Anon_9c7f41b09bde_4"];
33563
36437
  initial_grant?: components["schemas"]["Anon_9c7f41b09bde_5"];
33564
36438
  allowance_value?: components["schemas"]["Anon_811366723713_3"];
33565
- rollover_enabled?: components["schemas"]["Anon_fb9ddeea992e_6"];
36439
+ rollover_enabled?: components["schemas"]["Anon_fb9ddeea992e_7"];
33566
36440
  max_balance: components["schemas"]["Anon_d84a41962ed1_1"];
33567
36441
  seat_type_id?: components["schemas"]["Anon_96f9066c2fdc_38"];
33568
36442
  included_count?: components["schemas"]["Anon_5d154a3d9b9e_1"];
33569
36443
  at_limit_behavior?: components["schemas"]["Anon_28e076aa98f9_1"];
33570
36444
  stripe_metered_price_id?: components["schemas"]["Anon_96f9066c2fdc_39"];
33571
- enabled?: components["schemas"]["Anon_fb9ddeea992e_7"];
36445
+ enabled?: components["schemas"]["Anon_fb9ddeea992e_8"];
33572
36446
  allocation?: components["schemas"]["Anon_a7c491664ac5_4"];
33573
36447
  max_seats?: components["schemas"]["Anon_0dc47bdde23b_1"];
33574
36448
  amount_cents?: components["schemas"]["Anon_18968514c96d_1"];
@@ -33598,7 +36472,7 @@ interface components {
33598
36472
  rule_id: components["schemas"]["Anon_57796118d046_36"];
33599
36473
  experiment_id: components["schemas"]["Anon_57796118d046_37"];
33600
36474
  variant_name: components["schemas"]["Anon_872e58432369_1"];
33601
- is_control: components["schemas"]["Anon_062d958a93c4_5"];
36475
+ is_control: components["schemas"]["Anon_062d958a93c4_6"];
33602
36476
  override_fields: components["schemas"]["Anon_5142f8473790_6"];
33603
36477
  };
33604
36478
  Placement: {
@@ -33722,6 +36596,7 @@ interface components {
33722
36596
  first_seen: components["schemas"]["Anon_be3e2585472d_4"];
33723
36597
  last_seen: components["schemas"]["Anon_be3e2585472d_5"];
33724
36598
  route?: components["schemas"]["Anon_babb60294324"];
36599
+ slot_name?: components["schemas"]["Anon_34e621e2f47f"];
33725
36600
  status: components["schemas"]["Anon_4c42c2590496"];
33726
36601
  placement_count: components["schemas"]["Anon_b32f11b2ff5e_2"];
33727
36602
  };
@@ -33730,6 +36605,20 @@ interface components {
33730
36605
  null: {
33731
36606
  accepted: components["schemas"]["Anon_274ba4ca49d5_28"];
33732
36607
  };
36608
+ ServerUserContextAssignment: {
36609
+ tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
36610
+ user_id: components["schemas"]["Anon_761f976a1da1_7"];
36611
+ updated_at: components["schemas"]["Anon_be3e2585472d_3"];
36612
+ seat_type_handle: components["schemas"]["Anon_c5d45818321f"];
36613
+ builtin_dimensions: components["schemas"]["Anon_fc091757ffd3"];
36614
+ overrides: components["schemas"]["Anon_df4ebd6a2dc0"];
36615
+ };
36616
+ ServerUserBuiltinDimensions: {
36617
+ tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
36618
+ user_id: components["schemas"]["Anon_761f976a1da1_7"];
36619
+ builtin_dimensions: components["schemas"]["Anon_ad3c35aa933d"];
36620
+ resolved_at: components["schemas"]["Anon_3c179513a5d9_21"];
36621
+ };
33733
36622
  Anon_fb248bf5a9f7_9: string;
33734
36623
  /** Format: date-time */
33735
36624
  Anon_be3e2585472d_2: string;
@@ -33749,11 +36638,11 @@ interface components {
33749
36638
  Anon_f7fb9744a6e4_11: components["schemas"]["Anon_f090cb615c84_25"];
33750
36639
  Anon_f090cb615c84_25: string | null;
33751
36640
  /** @default true */
33752
- Anon_d295959bf4db_2: components["schemas"]["Anon_7cb541e84f22_37"];
33753
- Anon_7cb541e84f22_37: boolean;
36641
+ Anon_d295959bf4db_2: components["schemas"]["Anon_7cb541e84f22_39"];
36642
+ Anon_7cb541e84f22_39: boolean;
33754
36643
  /** @default false */
33755
- Anon_4dc549443053_1: components["schemas"]["Anon_7cb541e84f22_38"];
33756
- Anon_7cb541e84f22_38: boolean;
36644
+ Anon_4dc549443053_1: components["schemas"]["Anon_7cb541e84f22_40"];
36645
+ Anon_7cb541e84f22_40: boolean;
33757
36646
  /** @default null */
33758
36647
  Anon_e4ee8e45dcea_1: components["schemas"]["Anon_b0c21ae8f968_14"];
33759
36648
  Anon_b0c21ae8f968_14: string | null;
@@ -33837,8 +36726,8 @@ interface components {
33837
36726
  Anon_f7fb9744a6e4_14: components["schemas"]["Anon_f090cb615c84_28"];
33838
36727
  Anon_f090cb615c84_28: string | null;
33839
36728
  /** @default false */
33840
- Anon_062d958a93c4_4: components["schemas"]["Anon_7cb541e84f22_39"];
33841
- Anon_7cb541e84f22_39: boolean;
36729
+ Anon_062d958a93c4_5: components["schemas"]["Anon_7cb541e84f22_41"];
36730
+ Anon_7cb541e84f22_41: boolean;
33842
36731
  Anon_711dc9708535_7: components["schemas"]["Anon_11c9ad639448_1"];
33843
36732
  Anon_b0c21ae8f968_15: string | null;
33844
36733
  /** @default null */
@@ -33897,8 +36786,8 @@ interface components {
33897
36786
  Anon_cddf8275afa1_9: number;
33898
36787
  Anon_811366723713_3: components["schemas"]["Anon_4c1d2cc17cf8_3"];
33899
36788
  Anon_4c1d2cc17cf8_3: number | "unlimited";
33900
- Anon_fb9ddeea992e_6: components["schemas"]["Anon_7cb541e84f22_40"];
33901
- Anon_7cb541e84f22_40: boolean;
36789
+ Anon_fb9ddeea992e_7: components["schemas"]["Anon_7cb541e84f22_42"];
36790
+ Anon_7cb541e84f22_42: boolean;
33902
36791
  /** @default null */
33903
36792
  Anon_d84a41962ed1_1: components["schemas"]["Anon_853b74b4f5a9_2"];
33904
36793
  Anon_853b74b4f5a9_2: (number | "unlimited") | null;
@@ -33911,8 +36800,8 @@ interface components {
33911
36800
  Anon_408f15090b22_1: "hard_cap" | "auto_upgrade_at_renewal";
33912
36801
  Anon_96f9066c2fdc_39: components["schemas"]["Anon_00404e686415_43"];
33913
36802
  Anon_00404e686415_43: string;
33914
- Anon_fb9ddeea992e_7: components["schemas"]["Anon_7cb541e84f22_41"];
33915
- Anon_7cb541e84f22_41: boolean;
36803
+ Anon_fb9ddeea992e_8: components["schemas"]["Anon_7cb541e84f22_43"];
36804
+ Anon_7cb541e84f22_43: boolean;
33916
36805
  Anon_a7c491664ac5_4: components["schemas"]["UsageAllocation"];
33917
36806
  Anon_0dc47bdde23b_1: components["schemas"]["Anon_853b74b4f5a9_3"];
33918
36807
  Anon_853b74b4f5a9_3: (number | "unlimited") | null;
@@ -33931,8 +36820,8 @@ interface components {
33931
36820
  Anon_57796118d046_37: string;
33932
36821
  Anon_872e58432369_1: string;
33933
36822
  /** @default false */
33934
- Anon_062d958a93c4_5: components["schemas"]["Anon_7cb541e84f22_42"];
33935
- Anon_7cb541e84f22_42: boolean;
36823
+ Anon_062d958a93c4_6: components["schemas"]["Anon_7cb541e84f22_44"];
36824
+ Anon_7cb541e84f22_44: boolean;
33936
36825
  /** @default {} */
33937
36826
  Anon_5142f8473790_6: components["schemas"]["Anon_c65c1fbd5acf_12"];
33938
36827
  Anon_c65c1fbd5acf_12: {
@@ -34047,6 +36936,8 @@ interface components {
34047
36936
  Anon_be3e2585472d_5: string;
34048
36937
  Anon_babb60294324: components["schemas"]["Anon_2df8ddc2275c"];
34049
36938
  Anon_2df8ddc2275c: string | null;
36939
+ Anon_34e621e2f47f: components["schemas"]["Anon_8c923fd28c9a_1"];
36940
+ Anon_8c923fd28c9a_1: string | null;
34050
36941
  /** @default idle */
34051
36942
  Anon_4c42c2590496: components["schemas"]["SurfaceSlotStatus"];
34052
36943
  /** @default 0 */
@@ -34103,6 +36994,70 @@ interface components {
34103
36994
  };
34104
36995
  Anon_f27cb44c32f6_19: components["schemas"]["Anon_f2d1b3e449b4_1"];
34105
36996
  Anon_274ba4ca49d5_28: number;
36997
+ Anon_761f976a1da1_7: string;
36998
+ Anon_a328336b75d6: {
36999
+ activity_level?: components["schemas"]["Anon_3b35bf76a160"];
37000
+ subscription_state?: components["schemas"]["Anon_dd3586a1ddbf"];
37001
+ trial_type?: components["schemas"]["Anon_a76d44f71d99"];
37002
+ seat_type?: components["schemas"]["Anon_4d82b9ae113d"];
37003
+ buyer_role?: components["schemas"]["Anon_e49ebf4157ee"];
37004
+ email_type?: components["schemas"]["Anon_04c0f0c7b77f"];
37005
+ billing_health?: components["schemas"]["Anon_0da5f739d027"];
37006
+ region?: components["schemas"]["Anon_56e83e25debd"];
37007
+ device_type?: components["schemas"]["Anon_decf640c9996"];
37008
+ };
37009
+ Anon_3b35bf76a160: components["schemas"]["Anon_d1623b956533_1"];
37010
+ /** @enum {string} */
37011
+ Anon_d1623b956533_1: "new" | "high" | "medium" | "low" | "inactive";
37012
+ Anon_dd3586a1ddbf: components["schemas"]["Anon_a68601fc8ae6_1"];
37013
+ /** @enum {string} */
37014
+ Anon_a68601fc8ae6_1: "none" | "trial" | "paid" | "cancelled";
37015
+ Anon_a76d44f71d99: components["schemas"]["Anon_2277a9ff20f2_1"];
37016
+ /** @enum {string} */
37017
+ Anon_2277a9ff20f2_1: "none" | "free_trial" | "reverse_trial";
37018
+ Anon_4d82b9ae113d: components["schemas"]["Anon_d85e54d83006_1"];
37019
+ Anon_d85e54d83006_1: string;
37020
+ Anon_e49ebf4157ee: components["schemas"]["Anon_36144f6ff1f7_1"];
37021
+ /** @enum {string} */
37022
+ Anon_36144f6ff1f7_1: "buyer" | "non_buyer";
37023
+ Anon_04c0f0c7b77f: components["schemas"]["Anon_2e475c2b8517_1"];
37024
+ /** @enum {string} */
37025
+ Anon_2e475c2b8517_1: "business" | "personal" | "unknown";
37026
+ Anon_0da5f739d027: components["schemas"]["Anon_ea3031eacbdb_1"];
37027
+ /** @enum {string} */
37028
+ Anon_ea3031eacbdb_1: "no_billing" | "good_standing" | "trial_payment_method_attached" | "payment_method_missing" | "payment_failed" | "payment_overdue" | "cancelled";
37029
+ Anon_56e83e25debd: components["schemas"]["Anon_4304284c431c_1"];
37030
+ /** @enum {string} */
37031
+ Anon_4304284c431c_1: "us_canada" | "europe" | "rest_of_world";
37032
+ Anon_decf640c9996: components["schemas"]["Anon_eca965e9cb3d_1"];
37033
+ /** @enum {string} */
37034
+ Anon_eca965e9cb3d_1: "desktop" | "mobile" | "tablet" | "unknown";
37035
+ Anon_c5d45818321f: components["schemas"]["Anon_0083ff3642e4"] | null;
37036
+ Anon_0083ff3642e4: string;
37037
+ Anon_fc091757ffd3: {
37038
+ activity_level?: components["schemas"]["Anon_3b35bf76a160_1"];
37039
+ subscription_state?: components["schemas"]["Anon_dd3586a1ddbf_1"];
37040
+ trial_type?: components["schemas"]["Anon_a76d44f71d99_1"];
37041
+ buyer_role?: components["schemas"]["Anon_e49ebf4157ee_1"];
37042
+ email_type?: components["schemas"]["Anon_04c0f0c7b77f_1"];
37043
+ billing_health?: components["schemas"]["Anon_0da5f739d027_1"];
37044
+ region?: components["schemas"]["Anon_56e83e25debd_1"];
37045
+ device_type?: components["schemas"]["Anon_decf640c9996_1"];
37046
+ };
37047
+ Anon_3b35bf76a160_1: components["schemas"]["Anon_d1623b956533_1"];
37048
+ Anon_dd3586a1ddbf_1: components["schemas"]["Anon_a68601fc8ae6_1"];
37049
+ Anon_a76d44f71d99_1: components["schemas"]["Anon_2277a9ff20f2_1"];
37050
+ Anon_e49ebf4157ee_1: components["schemas"]["Anon_36144f6ff1f7_1"];
37051
+ Anon_04c0f0c7b77f_1: components["schemas"]["Anon_2e475c2b8517_1"];
37052
+ Anon_0da5f739d027_1: components["schemas"]["Anon_ea3031eacbdb_1"];
37053
+ Anon_56e83e25debd_1: components["schemas"]["Anon_4304284c431c_1"];
37054
+ Anon_decf640c9996_1: components["schemas"]["Anon_eca965e9cb3d_1"];
37055
+ Anon_df4ebd6a2dc0: components["schemas"]["Anon_0375edee48c3"][];
37056
+ /** @enum {string} */
37057
+ Anon_0375edee48c3: "activity_level" | "subscription_state" | "trial_type" | "buyer_role" | "email_type" | "billing_health" | "region" | "device_type";
37058
+ Anon_ad3c35aa933d: components["schemas"]["Anon_a328336b75d6"];
37059
+ /** Format: date-time */
37060
+ Anon_3c179513a5d9_21: string;
34106
37061
  /** @default usd */
34107
37062
  CurrencyOutput: components["schemas"]["Anon_063c0cce3710_1"];
34108
37063
  EntitlementRuleTargetOutput: {
@@ -36008,6 +38963,133 @@ interface operations {
36008
38963
  };
36009
38964
  };
36010
38965
  };
38966
+ upsertServerUserContext: {
38967
+ parameters: {
38968
+ query?: never;
38969
+ header?: never;
38970
+ path?: never;
38971
+ cookie?: never;
38972
+ };
38973
+ requestBody: {
38974
+ content: {
38975
+ "application/json": components["schemas"]["ServerUserContextUpsert"];
38976
+ };
38977
+ };
38978
+ responses: {
38979
+ /** @description The resulting server-written state */
38980
+ 200: {
38981
+ headers: {
38982
+ [name: string]: unknown;
38983
+ };
38984
+ content: {
38985
+ "application/json": components["schemas"]["ServerUserContextAssignment"];
38986
+ };
38987
+ };
38988
+ /** @description Malformed body, an empty write, or a key outside user_id / seat_type_handle / builtin_dimensions / override */
38989
+ 400: {
38990
+ headers: {
38991
+ [name: string]: unknown;
38992
+ };
38993
+ content: {
38994
+ "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
38995
+ };
38996
+ };
38997
+ /** @description Missing or invalid credential */
38998
+ 401: {
38999
+ headers: {
39000
+ [name: string]: unknown;
39001
+ };
39002
+ content: {
39003
+ "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
39004
+ };
39005
+ };
39006
+ /** @description Credential is not a server API token */
39007
+ 403: {
39008
+ headers: {
39009
+ [name: string]: unknown;
39010
+ };
39011
+ content: {
39012
+ "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
39013
+ };
39014
+ };
39015
+ /** @description seat_type_handle is not one of the tenant's current seat types, or a builtin_dimensions value is outside its vocabulary */
39016
+ 422: {
39017
+ headers: {
39018
+ [name: string]: unknown;
39019
+ };
39020
+ content: {
39021
+ "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
39022
+ };
39023
+ };
39024
+ /** @description Error response */
39025
+ default: {
39026
+ headers: {
39027
+ [name: string]: unknown;
39028
+ };
39029
+ content: {
39030
+ "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
39031
+ };
39032
+ };
39033
+ };
39034
+ };
39035
+ getServerUserBuiltinDimensions: {
39036
+ parameters: {
39037
+ query?: never;
39038
+ header?: never;
39039
+ path: {
39040
+ userId: string;
39041
+ };
39042
+ cookie?: never;
39043
+ };
39044
+ requestBody?: never;
39045
+ responses: {
39046
+ /** @description The user's server-resolved built-in dimensions */
39047
+ 200: {
39048
+ headers: {
39049
+ [name: string]: unknown;
39050
+ };
39051
+ content: {
39052
+ "application/json": components["schemas"]["ServerUserBuiltinDimensions"];
39053
+ };
39054
+ };
39055
+ /** @description Malformed user id */
39056
+ 400: {
39057
+ headers: {
39058
+ [name: string]: unknown;
39059
+ };
39060
+ content: {
39061
+ "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
39062
+ };
39063
+ };
39064
+ /** @description Missing or invalid credential */
39065
+ 401: {
39066
+ headers: {
39067
+ [name: string]: unknown;
39068
+ };
39069
+ content: {
39070
+ "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
39071
+ };
39072
+ };
39073
+ /** @description Credential is not a server API token */
39074
+ 403: {
39075
+ headers: {
39076
+ [name: string]: unknown;
39077
+ };
39078
+ content: {
39079
+ "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
39080
+ };
39081
+ };
39082
+ /** @description Error response */
39083
+ default: {
39084
+ headers: {
39085
+ [name: string]: unknown;
39086
+ };
39087
+ content: {
39088
+ "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
39089
+ };
39090
+ };
39091
+ };
39092
+ };
36011
39093
  }
36012
39094
 
36013
39095
  /**
@@ -36730,8 +39812,18 @@ declare function mergeTheme(input?: RevTurbineThemeInput | null, base?: Readonly
36730
39812
  /** Clear persisted theme (useful on identity reset). */
36731
39813
  declare function clearPersistedTheme(tenantId: string, storage?: RevTurbineStorage): void;
36732
39814
  interface ThemeLoaderOptions {
36733
- /** RevTurbine tenant identifier. */
36734
- tenantId: string;
39815
+ /**
39816
+ * RevTurbine tenant identifier — optional (BL-0335). Sent as `x-tenant-id`
39817
+ * only when present; the key alone identifies the tenant, and the control
39818
+ * plane ignores (with a warning) a value that differs from it (D-49).
39819
+ */
39820
+ tenantId?: string;
39821
+ /**
39822
+ * Namespace for the locally persisted theme. Defaults to `tenantId`, then
39823
+ * `'local'` — so an integration that passed a tenant id keeps its existing
39824
+ * cache key.
39825
+ */
39826
+ storageScope?: string;
36735
39827
  /** Base URL of the RevTurbine API Edge. */
36736
39828
  endpoint: string;
36737
39829
  /** API key for authentication. */
@@ -36851,6 +39943,31 @@ interface ClientSessionResult {
36851
39943
  /** ISO-8601 timestamp at which the token expires. */
36852
39944
  expires_at: string;
36853
39945
  }
39946
+ /**
39947
+ * Options for {@link RevTurbineServer.assignSeatType}: built-in dimension
39948
+ * values to write in the SAME server-key upsert as the seat (BL-0382). See
39949
+ * {@link SetBuiltinDimensionsOptions} for `override`.
39950
+ */
39951
+ interface AssignSeatTypeOptions {
39952
+ /** Built-in dimension values to set (or clear with `null`) with the seat. */
39953
+ builtinDimensions?: ServerBuiltinDimensionsWrite;
39954
+ /** Pin the `builtinDimensions` written in this call (D-47). Default `false`. */
39955
+ override?: boolean;
39956
+ }
39957
+ /** Options for {@link RevTurbineServer.setBuiltinDimensions}. */
39958
+ interface SetBuiltinDimensionsOptions {
39959
+ /**
39960
+ * `false` (default) — an UPDATE: the value is delivered until a newer
39961
+ * RevTurbine enrichment change (Stripe subscription / trial / billing, the
39962
+ * activity job, request signals) supersedes it — last writer wins,
39963
+ * enrichment included. Writing a pinned dimension without the flag UNPINS it.
39964
+ *
39965
+ * `true` — an OVERRIDE: the values written in this call are pinned, and
39966
+ * RevTurbine enrichment never replaces them until you write that dimension
39967
+ * again without the flag, or clear it with `null` (ruling D-47).
39968
+ */
39969
+ override?: boolean;
39970
+ }
36854
39971
  /** Options for initializing the RevTurbine server-side SDK. */
36855
39972
  interface RevTurbineServerOptions {
36856
39973
  /** Your RevTurbine tenant identifier. */
@@ -36876,8 +39993,9 @@ interface RevTurbineServerOptions {
36876
39993
  * RevTurbine Server-Side SDK Client.
36877
39994
  *
36878
39995
  * Holds the customer's **server key** and mints short-lived, browser-safe
36879
- * `rt_client_` session keys for one end user at a time. Evaluation does not
36880
- * happen here (plan 192) — it runs in the customer SDKs.
39996
+ * `rt_client_` session keys for one end user at a time, and writes server-only
39997
+ * user state such as a user's seat-type assignment. Evaluation does not happen
39998
+ * here (plan 192) — it runs in the customer SDKs.
36881
39999
  *
36882
40000
  * Designed for:
36883
40001
  * - Next.js RSC / route handlers / `getServerSideProps`
@@ -36899,12 +40017,20 @@ interface RevTurbineServerOptions {
36899
40017
  * ```
36900
40018
  */
36901
40019
 
40020
+ /**
40021
+ * The RevTurbine server-side client. Holds the server key; mints client
40022
+ * sessions ({@link RevTurbineServer.createClientSession}), writes
40023
+ * server-only user state ({@link RevTurbineServer.assignSeatType}) and reads
40024
+ * the user's server-resolved built-in dimensions
40025
+ * ({@link RevTurbineServer.getBuiltinDimensions}).
40026
+ */
36902
40027
  declare class RevTurbineServer {
36903
40028
  private readonly tenantId;
36904
40029
  private readonly apiKey;
36905
40030
  private readonly endpoint;
36906
40031
  private readonly defaultTtlSeconds;
36907
40032
  private readonly fetchFn;
40033
+ private readonly api;
36908
40034
  constructor(options: RevTurbineServerOptions);
36909
40035
  /**
36910
40036
  * Client-session minting namespace (plan 157). Ergonomic form of
@@ -36939,6 +40065,125 @@ declare class RevTurbineServer {
36939
40065
  * The error carries only the HTTP status + request id — never the key.
36940
40066
  */
36941
40067
  createClientSession(input: CreateClientSessionInput): Promise<ClientSessionResult>;
40068
+ /**
40069
+ * Assign a user's seat type, or clear it with `null` (plan 279 TASK-16a).
40070
+ *
40071
+ * Calls `POST /api/sdk/user-contexts` (`upsertServerUserContext`) with exactly
40072
+ * `{ user_id, seat_type_handle }`, authenticated by the server key this client
40073
+ * holds. The tenant is taken from that key — it is never a parameter, and no
40074
+ * tenant header is sent.
40075
+ *
40076
+ * **Server-written only (D-36).** A user's seat-type assignment is written
40077
+ * only by the tenant's backend through this server-key call (or by RevTurbine
40078
+ * enrichment). It is never set from the browser: the client SDK's
40079
+ * `identify()` / `update()` do not accept `seat_type_handle`, and the endpoint
40080
+ * refuses every credential except a server key.
40081
+ *
40082
+ * Pass `options.builtinDimensions` (and `options.override`) to set built-in
40083
+ * dimension values in the same write — see {@link setBuiltinDimensions} for
40084
+ * their semantics (BL-0382).
40085
+ *
40086
+ * @param userId - The tenant's own identifier for the user (non-empty).
40087
+ * @param seatTypeHandle - One of the tenant's current seat-type handles, or
40088
+ * `null` to clear the user's assignment.
40089
+ * @param options - Optional built-in dimension values to write with the seat.
40090
+ * @returns The resulting state, including the stored `seat_type_handle`, the
40091
+ * customer-set `builtin_dimensions`, the pinned `overrides` and `updated_at`.
40092
+ * @throws {RevTurbineSeatAssignmentError} if the control plane refuses the
40093
+ * write — `reason` is `unknown_seat_type` for a 422 on the handle,
40094
+ * `unknown_dimension_value` for a 422 on a dimension value, and `forbidden`
40095
+ * for a 403 (the key is not a server key). The error never carries the key.
40096
+ *
40097
+ * @example
40098
+ * ```ts
40099
+ * await server.assignSeatType('user_123', 'admin');
40100
+ * await server.assignSeatType('user_123', null); // clear the assignment
40101
+ * ```
40102
+ */
40103
+ assignSeatType(userId: string, seatTypeHandle: string | null, options?: AssignSeatTypeOptions): Promise<ServerUserContextAssignment>;
40104
+ /**
40105
+ * Set a user's built-in segment dimension values from your backend (BL-0382,
40106
+ * rulings D-46 / D-47).
40107
+ *
40108
+ * Calls `POST /api/sdk/user-contexts` (`upsertServerUserContext`) with
40109
+ * `{ user_id, builtin_dimensions, override }`, authenticated by the server key
40110
+ * this client holds. The tenant is taken from that key — never a parameter.
40111
+ * The write is an UPSERT per dimension: dimensions you do not name are left
40112
+ * alone, and `null` clears a dimension (its value and its pin). The seat
40113
+ * assignment is untouched (use {@link assignSeatType}).
40114
+ *
40115
+ * Settable dimensions: `subscription_state`, `trial_type`, `billing_health`,
40116
+ * `activity_level`, `buyer_role`, `email_type`, `region`, `device_type` —
40117
+ * each takes a value from its closed vocabulary (the types enforce it).
40118
+ * `seat_type` is not settable here; it is `assignSeatType`.
40119
+ *
40120
+ * The control plane applies the value before delivery, so both the browser
40121
+ * SDK's client context and {@link getBuiltinDimensions} return it:
40122
+ * - `override: false` (default): delivered until a newer RevTurbine
40123
+ * enrichment change supersedes it (last writer wins, enrichment included);
40124
+ * writing a pinned dimension without the flag unpins it.
40125
+ * - `override: true`: pinned — enrichment never replaces it until you write
40126
+ * the dimension again without the flag, or clear it.
40127
+ *
40128
+ * @param userId - The tenant's own identifier for the user (non-empty) — the
40129
+ * same key `assignSeatType` and `createClientSession` use.
40130
+ * @param dimensions - Dimension → value (or `null` to clear). Must name at
40131
+ * least one dimension.
40132
+ * @param options - `{ override }` — see above.
40133
+ * @returns The resulting state: `seat_type_handle`, every customer-set
40134
+ * `builtin_dimensions` value now stored, the pinned `overrides`, and
40135
+ * `updated_at`.
40136
+ * @throws {RevTurbineDimensionWriteError} if the control plane refuses the
40137
+ * write — `reason` is `unknown_dimension_value` for a 422 and `forbidden`
40138
+ * for a 403 (the key is not a server key). The error never carries the key.
40139
+ *
40140
+ * @example
40141
+ * ```ts
40142
+ * // Your billing system knows better than RevTurbine's Stripe view: pin it.
40143
+ * await server.setBuiltinDimensions('user_123', { subscription_state: 'paid' }, { override: true });
40144
+ * // Hand the dimension back to RevTurbine enrichment.
40145
+ * await server.setBuiltinDimensions('user_123', { subscription_state: null });
40146
+ * ```
40147
+ */
40148
+ setBuiltinDimensions(userId: string, dimensions: ServerBuiltinDimensionsWrite, options?: SetBuiltinDimensionsOptions): Promise<ServerUserContextAssignment>;
40149
+ /**
40150
+ * Read the control plane's server-resolved built-in segment dimensions for
40151
+ * one user (BL-0366).
40152
+ *
40153
+ * Calls `GET /api/sdk/user-contexts/{userId}/builtin-dimensions`
40154
+ * (`getServerUserBuiltinDimensions`), authenticated by the server key this
40155
+ * client holds. The tenant is taken from that key — it is never a parameter,
40156
+ * and no tenant header is sent. The result's `builtin_dimensions` carries the
40157
+ * values the browser SDK would receive through the client context
40158
+ * (Subscription State, Trial Type, Activity State, Seat Type, Buyer Role,
40159
+ * Billing Health, Email Type); `region` / `device_type` are request-derived
40160
+ * and never present. An unknown user resolves to each dimension's default.
40161
+ *
40162
+ * Feed it to local evaluation as the server overlay: pass
40163
+ * `result.builtin_dimensions` as `createStaticProviders({ …, userContext,
40164
+ * serverBuiltinDimensions })`, which overlays it per key on
40165
+ * `userContext.builtin_dimensions` — the server value wins (plan 279 PD-3).
40166
+ * The Python and Rust server SDKs accept the same object through
40167
+ * `server_builtin_dimensions`.
40168
+ *
40169
+ * @param userId - The tenant's own identifier for the user (non-empty) — the
40170
+ * same key `assignSeatType` and `createClientSession` use.
40171
+ * @returns `{ tenant_id, user_id, builtin_dimensions, resolved_at }`.
40172
+ * @throws {RevTurbineBuiltinDimensionsError} if the control plane refuses the
40173
+ * read — `reason` is `forbidden` for a 403 (the key is not a server key).
40174
+ * The error never carries the key.
40175
+ *
40176
+ * @example
40177
+ * ```ts
40178
+ * const { builtin_dimensions } = await server.getBuiltinDimensions('user_123');
40179
+ * const providers = createStaticProviders({
40180
+ * config: playbook,
40181
+ * userContext: { id: 'user_123' },
40182
+ * serverBuiltinDimensions: builtin_dimensions,
40183
+ * });
40184
+ * ```
40185
+ */
40186
+ getBuiltinDimensions(userId: string): Promise<ServerUserBuiltinDimensions>;
36942
40187
  private apiCall;
36943
40188
  private apiGet;
36944
40189
  }
@@ -38798,5 +42043,5 @@ declare function useRevTurbineTheme(): RevTurbineTheme;
38798
42043
  */
38799
42044
  declare function useResolvedColorScheme(preference: RevTurbineColorScheme): 'light' | 'dark';
38800
42045
 
38801
- export { ACCOUNT_CREATION_PENDING_REASONS, ACCOUNT_CREATION_SOURCES, ANALYTICS_ANNOTATION_KINDS, ANALYTICS_DATE_RANGE_FILTER_VALUE_TYPE, ANALYTICS_VALIDATION_CODES, ANALYTICS_VIEW_SCHEMA_VERSION, AccessGateSurfaceSlot, AccountPrimaryContactBindingSchema, ActivityLevelSchema, AddOnSchema, AddOnVariationSchema, AgentConnectorSlot as AgentConnectorComponent, AgentConnectorSlot, AlertSchema, AnalysisProvenanceSchema, AnalyticsAgentCatalogEntryKindSchema, AnalyticsAgentCatalogEntrySchema, AnalyticsAnalyticalUnitSchema, AnalyticsAnnotationKindSchema, AnalyticsAnnotationMarkerSchema, AnalyticsAnnotationRequestSchema, AnalyticsAnnotationResponseSchema, AnalyticsAnnotationSchema, AnalyticsAnnotationSourceSchema, AnalyticsBlockErrorSchema, AnalyticsBlockResultSchema, AnalyticsCardinalityClassSchema, AnalyticsCatalogAnnotationKindSchema, AnalyticsCatalogConceptSchema, AnalyticsCatalogDeprecationSchema, AnalyticsCatalogDimensionSchema, AnalyticsCatalogMetricSchema, AnalyticsCatalogMetricValidatedSchema, AnalyticsCatalogProvenanceKindSchema, AnalyticsCatalogProvenanceSchema, AnalyticsCatalogSchema, AnalyticsCatalogSearchResultSchema, AnalyticsCatalogSourceSchema, AnalyticsClassificationSchema, AnalyticsCompareDeltaSchema, AnalyticsCompareExperimentSchema, AnalyticsCompareModeSchema, AnalyticsCompareSegmentSchema, AnalyticsCompileResolutionSchema, AnalyticsCoverageSchema, AnalyticsCustomizationCapabilitySchema, AnalyticsCustomizationPolicySchema, AnalyticsDimensionCapabilitySchema, AnalyticsDimensionTypeSchema, AnalyticsFieldTypeSchema, AnalyticsFilterControlSchema, AnalyticsFilterOperatorSchema, AnalyticsFilterStateSchema, AnalyticsFilterValueSchema, AnalyticsFormatSpecSchema, AnalyticsHistoricalModeSchema, AnalyticsMetricAggregationSemanticsSchema, AnalyticsMetricDirectionSchema, AnalyticsMetricStatisticalTypeSchema, AnalyticsPeriodCompareModeSchema, AnalyticsQueryFamilySchema, AnalyticsQueryOverridesSchema, AnalyticsQueryRequestSchema, AnalyticsQueryResponseSchema, AnalyticsRenderCartesianSchema, AnalyticsRenderFunnelSchema, AnalyticsRenderMetricSchema, AnalyticsRenderRecommendationsSchema, AnalyticsRenderSpecSchema, AnalyticsRenderTableSchema, AnalyticsRenderTimelineSchema, AnalyticsResultFieldSchema, AnalyticsResultMetaSchema, AnalyticsResultSchema, AnalyticsSafeChartOptionsSchema, AnalyticsSavedViewSchema, AnalyticsSemanticFilterSchema, AnalyticsSemanticIdSchema, AnalyticsSourceScopeSchema, AnalyticsSuggestedPatchOpSchema, AnalyticsTemplateSummarySchema, AnalyticsTimeGrainSchema, AnalyticsValidationIssueSchema, AnalyticsValidationResultSchema, AnalyticsViewAccessRoleSchema, AnalyticsViewAccessSchema, AnalyticsViewBlockDraftSchema, AnalyticsViewBlockSchema, AnalyticsViewDraftSchema, AnalyticsViewFilterDraftSchema, AnalyticsViewFilterSchema, AnalyticsViewHandoffDraftSchema, AnalyticsViewHandoffSchema, AnalyticsViewLayoutSchema, AnalyticsViewQuerySchema, AnalyticsViewRevisionSchema, AnalyticsViewSchema, AnalyticsViewVisibilitySchema, AnalyticsWarningSchema, AnchorFields, AuditActorTypeSchema, AuditEventSchema, AuthAccountSchema, AuthApiKeySchema, AuthInvitationSchema, AuthMemberSchema, AuthOrganizationSchema, AuthPasskeySchema, AuthSessionSchema, AuthSsoProviderSchema, AuthTwoFactorSchema, AuthUserSchema, AuthVerificationSchema, B2BSegmentEventNameSchema, B2B_INPUT_SYNONYMS, B2B_NON_AUTHORITATIVE_OBSERVATIONS, B2B_PENDING_PRODUCERS, B2B_PII_PROPERTIES, B2B_RT_REQUIRED_PROPERTIES, B2B_SEGMENT_EVENT_NAMES, B2B_SEMANTIC_MAP_VERSION, B2B_SOURCE_MAPPINGS, B2B_TRIAL_OUTCOMES, BILLING_ITEM_JOIN_KEYS, BILLING_OCCURRENCE_IDENTITY, BILLING_OCCURRENCE_IDENTITY_VERSION, BILLING_OCCURRENCE_KEY_PREFIX, BILLING_OCCURRENCE_RULES, BILLING_PROFILE_KINDS, BILLING_PROFILE_NAMES, BILLING_PROFILE_VERSION, BILLING_UNIQUE_KEYS, BUILT_IN_TEMPLATE_COMPONENT_TYPES, BannerSlot as BannerComponent, BannerFrame, BannerSlot, BannerSurface, BillingAllocationSchema, BillingBalanceProfileSchema, BillingCadenceSchema, BillingCreditNoteLineSchema, BillingCreditProfileSchema, BillingCreditSettlementSchema, BillingHealthStatusSchema, BillingInvoiceProfileSchema, BillingLossProfileSchema, BillingOccurrenceSchema, BillingProfileSchema, BillingRecurringPriceSchema, BillingRefundProfileSchema, BillingRepeatableOccurrenceSchema, BillingScheduleProfileSchema, BillingSourceScopeSchema, BillingSubscriptionItemSnapshotSchema, BillingSubscriptionProfileSchema, BillingTransactionProfileSchema, BrandingConfigSchema, BrowserRuntime, BrowserStorage, ButtonSlot as ButtonComponent, ButtonSlot, ButtonSurface, CONTROL_PLANE_EVENT_NAMES, CONTROL_PLANE_EVENT_SOURCE, CONTROL_PLANE_SOURCE_KEY, CanonicalAliasEventSchema, CanonicalAnalyticsEventSchema, CanonicalGroupEventSchema, CanonicalIdentifyEventSchema, CanonicalPageEventSchema, CanonicalScreenEventSchema, CanonicalSegmentContextSchema, CanonicalTrackEventSchema, CapEnforcer, CapPeriodSchema$1 as CapPeriodSchema, ChangeLogActionSchema, ChangeLogEntrySchema, CliSlot as CliComponent, CliSlot, ClientContextSchema, ClientSafe, CohortMonthSchema, CompactCircularGauge, ComponentTypeSchema, ContentPayloadSegmentEntrySchema, ContentPlacementPayloadSchema, ContentPromotionSchema, ContentUiPathSchema, ContextVisibility, ControlPlaneEventSourceSchema, ControlPlaneEventTypeSchema, ControlPlaneSemanticEventSchema, CreditBalanceSlot as CreditBalanceComponent, CreditBalanceSlot, CtaActionTypeSchema, CtaObjectSchema, CtaPathSchema, CtaPathTypeSchema, CtaResolverRegistry, CurrencySchema, CustomerOverrideDurationSchema, CustomerOverrideSchema, CustomerOverrideStatusSchema, CustomerOverrideTypeSchema, CustomerSchema, DARK_THEME, DEFAULT_ANALYTICS_RETENTION_DAYS, DEFAULT_BRANDING, DEFAULT_HOSTED_ENDPOINT, DEFAULT_SDK_MODE, DEFAULT_TEMPLATE_COMPONENT_TYPES, DEFAULT_THEME, DEPRECATED_EVENT_NAMES, DOGFOOD_CLIENT_EVENT_NAMES, DataClassification, DecisionEngine, DecisionOnly, DefaultTemplateIdsSchema, DeleteProtectionDecisionSchema, DescriptionField, DetectorRequirementsSchema, DimensionCategorySchema, DimensionSourceTypeSchema, DiscountTypeSchema, DomainProviderRegistry, DriftReportSchema, EMITTABLE_PLATFORM_EVENT_NAMES, ENTITLEMENT_STATUS_VALUES, EVENT_ENVELOPE_SCHEMA_VERSION, EVENT_PAYLOAD_CONTRACTS, EVENT_PAYLOAD_EVENT_NAMES, EVENT_PREFIX_FAMILIES, EmailPreviewSlot as EmailPreviewComponent, EmailPreviewSlot, EnforcementActionSchema, EnforcementModeSchema, EngagementArea, EntitlementCheckResultSchema, EntitlementGate, EntitlementGrantSchema, EntitlementGrantSetSchema, EntitlementGrantSourceSchema, EntitlementGrantStatusSchema, EntitlementRulePeriodUnitSchema, EntitlementRuleSchema, EntitlementRuleTargetKindSchema, EntitlementRuleTargetSchema, EntitlementRuleValidatedSchema, EntitlementRuleVariantSchema, EntitlementSchema, EntitlementStatusSchema, EntitlementTypeSchema, EnvironmentPromotionRequestSchema, EnvironmentSchema, EnvironmentStatusSchema, EventEnvelopeSchema, EventIngestBatchSchema, EventPrefixFamilySchema, EventSearchParamsSchema, EventSourceSchema, EventStabilitySchema, EventSurfaceSchema, EventTaxonomyEntrySchema, EventTaxonomySchema, EvidenceCoverageStateSchema, EvidenceReasonColumnSchema, EvidenceRequirementSchema, ExperimentAnalysisConfigSchema, ExperimentAnalysisConfigVersionError, ExperimentAnalysisDefinitionSchema, ExperimentAnalysisResultRecordSchema, ExperimentAnalysisResultSchema, ExperimentAssignmentFactSchema, ExperimentAssignmentSourceSchema, ExperimentDecisionFindingCodeSchema, ExperimentDecisionPolicySchema, ExperimentDecisionPolicyVersionError, ExperimentDecisionRecordSchema, ExperimentDecisionTypeSchema, ExperimentEvidenceSchema, ExperimentEvidenceSnapshotSchema, ExperimentHealthSchema, ExperimentMetricEvidencePlanSchema, ExperimentMetricResultSchema, ExperimentSchema, ExperimentStatusSchema, ExperimentTypeSchema, ExperimentVariantSchema, ExperimentVariantTargetSchema, RevTurbineConfigPlacementItemSchema as ExportedConfigPlacementItemSchema, RevTurbineConfigSchema as ExportedConfigSchema, RevTurbineConfigSegmentsItemPredicatesItemSchema as ExportedConfigSegmentsItemPredicatesItemSchema, RevTurbineConfigSegmentsItemSchema as ExportedConfigSegmentsItemSchema, RevTurbineConfigUiPathActionTypeSchema as ExportedConfigUiPathActionTypeSchema, FALLBACK_ACCOUNT_ID_PREFIX, FAMILY_RENDER_COMPATIBILITY, FIRST_SEGMENT_EVENT_ENVELOPE_SCHEMA_VERSION, FIXED_BANNER_TEMPLATE_IDS, FIXED_SURFACE_TEMPLATE_IDS, FIXTURE_ANALYTICS_CATALOG, FeatureFlagSchema, FeatureFlagValueSchema, FeatureGateTriggerPayloadSchema, FieldDefinitionSchema, FixedSurfaceSlot, FlagValueTypeSchema, FreeTrialRuleSchema, FreeTrialSettingsSchema, FullPageSlot as FullPageComponent, FullPageSlot, FunnelStepSchema, GATED_SURFACE_TEMPLATE_IDS, GENERAL_BANNER_TEMPLATE_IDS, GENERAL_MODAL_TEMPLATE_IDS, GENERAL_TOAST_TEMPLATE_IDS, AccessGateSurfaceSlot as Gate, GrowthSignalBundleSchema, GrowthSignalPointSchema, GrowthSignalSeriesSchema, HANDLE_PATTERN, HandleField, INGEST_WRITE_SCOPE, INIT_STATUS_OK, IdField, IdentityKind, IdentitySchema, InMemoryStorage, InPageSlot as InPageComponent, InPageSlot, InPageSurface, IngestedEventSchema, InitFailureDiagnostic, InlineCardPlacement, InlineEmbedSlot as InlineEmbedComponent, InlineEmbedSlot, InteractionTracker, InvitationStatusSchema, KpiAggregateSchema, LEGACY_BILLING_OCCURRENCE_IDENTITY_VERSION, LEGACY_TRACK_EVENT_ENVELOPE_SCHEMA_VERSION, LocalizedTextSchema, MAX_BILLING_PROFILE_LIST, MAX_EVENT_JSON_DEPTH, MAX_EVENT_TAGS, MAX_EVENT_TAG_LENGTH, MAX_SEGMENT_MESSAGES_PER_BATCH, MAX_TREATMENT_INTERACTIONS_PER_BATCH, MESSAGE_SURFACE_TEMPLATE_IDS, MIN_READABLE_EVENT_ENVELOPE_SCHEMA_VERSION, McpConfigSchema, McpTokenScopeSchema, MessageBlockContentSchema, MessageBlockRecordSchema, MessageBlockSchema, MessageSchema, MessageSurfaceSlot, MetadataField, MeteringConfigSchema, ModalSlot as ModalComponent, ModalFrame, ModalSlot, ModalSurface, NON_RETRYABLE_EVIDENCE_REASONS, NameField, NullableDatetimeField, ObjectiveField, ObjectiveSchema, ObservationMaturitySchema, OnboardingChecklistSchema, OnboardingStateSchema, OpportunityCandidateSchema, OpportunityEvidenceSchema, OpportunityInterpretationSchema, OptimizationSuggestionSchema, OrgMemberRoleSchema, PERSISTED_SCHEMA_FACET_EXEMPTIONS, PLATFORM_EMITTED_EVENT_NAMES, PLATFORM_EVENT_TAXONOMY, PLAYBOOK_FORMAT_VERSION, PRIMARY_CONTACT_UNRESOLVED_CODE, PROTECTED_SUBSCRIPTION_SAMPLE_LIMIT, PaginatedResponseSchema, PaginationParamsSchema, PaymentTriggerPayloadSchema, PermissionActionSchema, PermissionResourceSchema, PermissionSchema, PersonalizationTokenSchema, Placement, PlacementCapRuleSchema, PlacementCategorySchema, PlacementController, PlacementDecisionInspector, PlacementDecisionOutputSchema, PlacementPayloadSchema, PlacementPerformanceRowSchema, PlacementRenderer, PlacementSchema, PlacementSettingsCapRuleGroupItemSchema, PlacementSettingsCapRuleSchema, PlacementSettingsCapStateSchema, PlacementSettingsSchema, PlacementTestModeSchema, PlacementTestUserIdentifierTypeSchema, PlacementTestUserSchema, PlacementTypeRegistry, PlacementWarningCodeSchema, PlacementWarningSchema, PlanSchema, PlanVariationSchema, PlanVisibilitySchema, PlaybookBodySchema, PlaybookHeaderSchema, PlaybookObjectSchema, RevTurbineConfigPlacementItemSchema as PlaybookPlacementItemSchema, PlaybookSchema, RevTurbineConfigSegmentsItemPredicatesItemSchema as PlaybookSegmentsItemPredicatesItemSchema, RevTurbineConfigSegmentsItemSchema as PlaybookSegmentsItemSchema, PlaybookStrictSchema, RevTurbineConfigUiPathActionTypeSchema as PlaybookUiPathActionTypeSchema, PlaybookVersionDeployResultSchema, PlaybookVersionDiffSchema, PlaybookVersionEntrySummarySchema, PlaybookVersionSchema, PlaybookVersionStatusSchema, PresentationOutcomeSchema, PriceSourceSchema, PricingModelSchema, PrimaryContactDesignationSchema, PrimaryContactResolutionSchema, PrimaryContactUnresolvedReasonSchema, PromotionSchema, PromotionStatusSchema, ProviderAvailabilitySchema, ProviderBindingRefSchema, ProviderCapabilitySchema, ProviderConnectionSchema, ProviderProvenanceSchema, PushPreviewSlot as PushPreviewComponent, PushPreviewSlot, QuotaMeterSlot as QuotaMeterComponent, QuotaMeterFrame, QuotaMeterSlot, RECOGNIZED_UPDATE_KEYS, ROLE_PERMISSIONS, ROLE_RANK, SurfaceSlotComponent as RTSlot, ApiError as RevTurbineApiError, RevTurbineConfigAddonVariationsItemSchema, RevTurbineConfigAddonsItemSchema, RevTurbineConfigEnforcementDefaultsItemSchema, RevTurbineConfigEntitlementRulesItemSchema, RevTurbineConfigEntitlementsItemSchema, RevTurbineConfigMeterBindingsItemSchema, RevTurbineConfigObjectivesItemSchema, RevTurbineConfigPeriodCapSchema, RevTurbineConfigPersonalizationTokensItemSchema, RevTurbineConfigPlacementCategorySchema, RevTurbineConfigPlacementItemSchema, RevTurbineConfigPlacementPayloadItemSchema, RevTurbineConfigPlacementSettingsItemSchema, RevTurbineConfigPlacementSlotsItemSchema, RevTurbineConfigPlacementTriggerSchema, RevTurbineConfigPlanVariationsItemSchema, RevTurbineConfigPlansItemSchema, RevTurbineConfigSchema, RevTurbineConfigSeatTypesItemSchema, RevTurbineConfigSegmentDimensionsItemSchema, RevTurbineConfigSegmentsItemPredicatesItemSchema, RevTurbineConfigSegmentsItemSchema, RevTurbineConfigSlotConfigsItemSchema, RevTurbineConfigStudioCtaConfigSchema, RevTurbineConfigStudioPayloadCapsSchema, RevTurbineConfigStudioPayloadSchema, RevTurbineConfigStudioPayloadSurfaceSchema, RevTurbineConfigStudioPayloadTargetSchema, RevTurbineConfigSurfaceTemplatesItemFieldsItemSchema, RevTurbineConfigSurfaceTemplatesItemSchema, RevTurbineConfigUiPathActionTypeSchema, RevTurbineCustomerSdk, RevTurbineProvider, RevTurbineRoute, RevTurbineServer, RevTurbineThemeProvider, RevenueMetricSchema, ReverseTrialRuleSchema, ReverseTrialSettingsSchema, ReverseTrialStartPolicySchema, RevturbineB2BTrackEventSchema, RevturbineCanonicalEventContextSchema, RevturbineEventContextSchema, RevturbineIdentitySourceSchema, RevturbineProducerAliasEventSchema, RevturbineProducerEventContextSchema, RevturbineProducerEventSchema, RevturbineProducerGroupEventSchema, RevturbineProducerIdentifyEventSchema, RevturbineProducerPageEventSchema, RevturbineProducerScreenEventSchema, RevturbineProducerSegmentContextSchema, RevturbineProducerTrackEventSchema, RoleSchema, RuleVisibilitySchema, RuntimeMode, RuntimePromotionSnapshotSchema, SDK_AUTOMATIC_NON_EMITTED_NAMES, SDK_CLIENT_EVENT_NAMES, SDK_META_EVENT_NAMES, SDK_SERVER_EVENT_NAMES, SEGMENT_EVENT_METHODS, SEGMENT_MAX_BATCH_BYTES, SEGMENT_MAX_MESSAGE_BYTES, SEGMENT_MAX_MESSAGE_ID_LENGTH, SEMANTIC_ID_PATTERN, SERVER_TRAITS_DOMAIN, SLOT_ROUTE_ID_PLACEHOLDER, SLOT_ROUTE_MAX_LENGTH, STRIPE_SUBSCRIPTION_STATUS_VALUES, SUBSCRIPTION_BLOCKER_ENTITY, SUBSCRIPTION_EVIDENCE_UNAVAILABLE_CODE, SUBSCRIPTION_EVIDENCE_UNAVAILABLE_REASONS, SUBSCRIPTION_REFERENCE_EXISTS_CODE, SUBSCRIPTION_STATUS_PROTECTION, SURFACE_SLOT_ROUTE_MAX_LENGTH, SURFACE_SLOT_STATUS_VALUES, SchemaContext, SchemaExposure, SchemaPersistence, SchemaSource, SdkConfigShapeSchema, SdkMetaEventSchema, SdkMetaEventTypeSchema, SdkMetaIngestBatchSchema, SdkSession, SeatTypeSchema, SegmentAliasInputSchema, SegmentB2BTrackEventSchema, SegmentDimensionSchema, SegmentEventContextSchema, SegmentEventInputSchema, SegmentGroupInputSchema, SegmentIdentifyInputSchema, SegmentIngestBatchSchema, SegmentLibraryContextSchema, SegmentPageContextSchema, SegmentPageInputSchema, SegmentSchema, SegmentScreenInputSchema, SegmentTrackInputSchema, SegmentValueSchema, SemanticEventSchema, ServerEvaluationPayloadDecisionsItemSchema, ServerEvaluationPayloadEntitlementsValueSchema, ServerEvaluationPayloadSchema, ServerEvaluationPayloadTrialStatusSchema, ServerEvaluationPayloadUserContextSchema, ServerEvaluationPayloadUserSchema, ServerOnly, ServerUserContextProvider, SeveritySchema, SurfaceSlotComponent as Slot, SmsPreviewSlot as SmsPreviewComponent, SmsPreviewSlot, StripeBillingScopeSchema, StripeIntegrationConfigSchema, StripePriceBillingPeriodSchema, StripePriceMockBillingPeriodSchema, StripePriceMockSchema, StripePriceSchema, StripePriceScopeSchema, StripeSubscriptionEvidenceSchema, StripeSubscriptionItemSchema, StripeSubscriptionStatusSchema, StudioSurfaceTypeSchema, SubscriptionEvidenceKnownSchema, SubscriptionEvidenceResultSchema, SubscriptionEvidenceUnavailableReasonSchema, SubscriptionEvidenceUnavailableSchema, SubscriptionProtectionSchema, SuggestionSeveritySchema, SupersessionReasonSchema, SupersessionRecordSchema, SurfaceSlotComponent, SurfaceSlotSchema, SurfaceSlotStatusSchema, SurfaceTemplateSchema, SurfaceTypeCapRuleSchema, SurfaceTypeSchema, TERMINAL_SUBSCRIPTION_STATUSES, TRIAL_PENDING_UNKNOWN_REASONS, TRIAL_REVISION_KINDS, TelemetryScope, TelemetryScopeContext, TemplateFieldTypeSchema, TenantConfigSchema, TenantIdField, TenantSchema, TenantStatusSchema, ThemeSchema, TimestampFields, ToastSlot as ToastComponent, ToastSlot, ToastSurface, TooltipSlot as TooltipComponent, TooltipSlot, Track, TrackEventSchema, TrackIngestBatchSchema, TrackOnView, TreatmentInteractionBatchSchema, TreatmentInteractionInputSchema, TreatmentInteractionRequestSchema, TreatmentInteractionTypeSchema, TrendFeaturesSchema, TrialEligibilityScopeSchema, TrialInstanceSchema, TrialLimitPolicySchema, TrialStatusSchema, TrialTriggerPayloadSchema, TriggerEventTypeSchema, USER_GRAIN_NON_CREATION_SOURCES, UiPreferenceSchema, UnsupportedExperimentAssignmentUnitError, UsageAllocationSchema$1 as UsageAllocationSchema, UsageEnforcementSettingsSchema, UsagePeriodScopeSchema, UsageTriggerPayloadSchema, UserBuiltinDimensionsSchema, UserContextSchema, UserInstanceContextSchema, UserPlanContextSchema, UserProfile, UserRoleSchema, UserTrialStatusSchema, UserUsageEntrySchema, VIEW_ELEMENT_ID_PATTERN, VariantStatisticalSummarySchema, VersionFields, WEBHOOK_DERIVED_EVENT_NAMES, WarGameCapabilityRequirementsSchema, WarGameCategorySchema, WarGameGradeSchema, WarGameOracleSchema, WarGameQualificationLevelSchema, WarGameScenarioSchema, WebhookDeliverySchema, WebhookDispatchStatusSchema, WebhookEventLogSchema, WebhookEventSourceSchema, WebhookEventStatusSchema, WebhookProcessingStatusSchema, WebhookReplayEnvelopeSchema, adaptExperimentVersionToBucketer, analyticsPaths, analyticsViewPaths, applyPrimaryContactEnrichment, applyValueMaps, assertExperimentAnalysisConfigUpdateAllowed, assertExperimentDecisionPolicyUpdateAllowed, baseThemeForScheme, billingProfileCoverageGaps, boundBillingProfileKinds, bridgeUiPathResolversIntoRegistry, bucketSubject, buildAgentCatalogProjection, buildB2BMappingReport, buildControlPlaneEvent, canonicalB2BEventName, categorizeActionError, changelogPaths, classifyAccountCreation, classifySubscriptionStatus, classifyTaxonomyEvent, classifyTrackIngestBody, classifyTrialRevision, clearPersistedTheme, collapseBillingRevisions, collectAssignmentFactDeclarations, collectPersistedSchemas, collectVersionedConfigEntities, compileAnalyticsDraft, composeEffectiveExperimentContext, configPaths, contentPaths, createAnalyticsProvider, createBasicExperimentProvider, createChainedPlacementRequest, createCompositeExperimentProvider, createCustomEndpointRuntimeConfig, createEntitlementPlacementRequest, createFixtureAnalyticsCatalog, createHydrationProviders, createInMemoryAnalyticsCatalog, createLocalRuntimeConfig, createNativeExperimentAssignmentProvider, createPostHogAnalyticsProvider, createPostHogIntegration, createRevTurbineApiClient, createSemanticEvent, createServerRuntimeConfig, createSlotPlacementRequest, createStaticPlacementContentLookupProvider, createStaticPlacementResolver, createStaticProviders, createStrictLocalRuntimeConfig, createTreatmentInteraction, currentBrowserRoute, customerPaths, decideDeleteProtection, defaultRenderForQuery, defineUiPathResolvers, deriveB2BEvent, deriveBillingAllocationKey, deriveBillingOccurrenceKey, deriveBillingRevisionKey, deriveLocalTrialStatusFromInstance, derivePlacementPersonalizationTokens, deriveReverseTrialGrants, dispatchCtaClick, entitlementPaths, entitlementResultDenies, environmentPaths, evaluateSegments, evaluateTrialStatus, eventPaths, experimentPaths, fallbackAccountId, filterExternalSchemas, filterPersistedSchemas, findActiveTrialInstance, findLatestStartedTrialInstance, formatCurrencyMinorUnits, getDefaultCtaResolverRegistry, getDefaultRegistry, getFieldClassification, getFieldVisibility, getObjectFieldClassifications, getObjectFieldVisibilities, getSchemaClassification, getSchemaDeprecation, getSchemaExposure, getSchemaFacets, getSchemaIdentity, getSchemaPersistence, initRevTurbine, initStatusForError, isAnalyticsDateRangeFilterValue, isBrowser, isEvidencedAccountCreation, isExperimentAssignmentFactDeclaration, isFallbackAccountId, isIdentifierLikeSegment, isLegacyDateRangeArray, isRetryableEvidenceReason, isServer, isVersionedConfigEntity, jsonPlainViolation, liftTrackEventToSegmentInput, loadTheme, makeAnchor, mergeTheme, mintedIdentity, namedIdentity, namespacePlatformCollision, normalizeConfigArtifactOrThrow, normalizeLegacyConfig, normalizeSlotRoute, parsePlaybook, parsePromotion, parseUiPath, placementPaths, planPaths, playbookVersionPaths, projectClientSafe, promotionPaths, registerBuiltinSlotTypes, registerBuiltinSnoozeResolver, registerCtaResolver, registerServerActionResolvers, remediationFor, requireSchemaFacets, resetDefaultCtaResolverRegistry, resetDefaultRegistry, resetPlaybookAliasWarning, resolveBranding, resolveBrowserPublicKey, resolveComponentType, resolveContent, resolveLocalPlaybook, resolvePayloadForUser, resolvePayloadForUserWithProvider, resolvePersistentStorage, resolvePlaybookResolver, resolvePrimaryContact, resolveProviderPlaybook, resolveSessionStorage, resolveSubscriptionEvidence, resolveTokens, routePatternFromParams, schemaDeprecation, schemaFacets, scopesSubsetOfRole, searchAgentCatalog, segmentPaths, settingsPaths, summarizeProtectedSubscriptions, tenantPaths, toCreateSchema, toWritableSchema, trialPaths, uiPreferencePaths, unavailableEvidence, unregisterCtaResolver, useAddons, useCan, useEntitlement, useGatedAction, usePlacement, usePlacementPersonalization, usePlans, useResolvedColorScheme, useRevTurbine, useRevTurbineTheme, useRevTurbineThemeProviderPresent, useSlotRoute, useSurfaceSlot, useTelemetryProps, useTelemetryScope, useTrack, useTrackedAction, useUsageSnapshot, userContextPaths, validateAnalyticsQuery, validateAnalyticsView, validateB2BTrack, validateBillingProfileForEvent, validateEventPayload, validatePlacementThresholdWarnings };
38802
- export type { AccessGateCheck, AccessGateSurfaceSlotProps, AccountCreationClassification, AccountCreationEvidence, AccountCreationEvidenceKind, AccountCreationFacts, AccountCreationPendingReason, AccountCreationSource, AccountPrimaryContactBinding, ActionErrorCategory, ActivityLevel, AdapterBaseOptions, AddOn, AddOnVariation, AgentConnectorSlotProps as AgentConnectorComponentProps, AgentConnectorSlotProps, Alert, AnalysisProvenance, AnalyticsAgentCatalogEntry, AnalyticsAgentCatalogEntryKind, AnalyticsAnalyticalUnit, AnalyticsAnnotation, AnalyticsAnnotationKind, AnalyticsAnnotationMarker, AnalyticsAnnotationRequest, AnalyticsAnnotationResponse, AnalyticsAnnotationSource, AnalyticsBlockError, AnalyticsBlockResult, AnalyticsCardinalityClass, AnalyticsCatalog, AnalyticsCatalogAnnotationKind, AnalyticsCatalogConcept, AnalyticsCatalogData, AnalyticsCatalogDeprecation, AnalyticsCatalogDimension, AnalyticsCatalogMetric, AnalyticsCatalogMetricValidated, AnalyticsCatalogProvenance, AnalyticsCatalogProvenanceKind, AnalyticsCatalogSearchResult, AnalyticsCatalogSource, AnalyticsCatalogView, AnalyticsClassification, AnalyticsCompareDelta, AnalyticsCompareExperiment, AnalyticsCompareMode, AnalyticsCompareSegment, AnalyticsCompileOutput, AnalyticsCompileResolution, AnalyticsCoverage, AnalyticsCustomizationCapability, AnalyticsCustomizationPolicy, AnalyticsDateRangeFilterValue, AnalyticsDimensionCapability, AnalyticsDimensionType, AnalyticsEventHandler, AnalyticsEventProperties, AnalyticsEventTransformer, AnalyticsFieldType, AnalyticsFilterControl, AnalyticsFilterOperator, AnalyticsFilterState, AnalyticsFilterValue, AnalyticsFormatSpec, AnalyticsHistoricalMode, AnalyticsMetricAggregationSemantics, AnalyticsMetricDirection, AnalyticsMetricStatisticalType, AnalyticsPeriodCompareMode, AnalyticsProviderOptions, AnalyticsQueryFamily, AnalyticsQueryOverrides, AnalyticsQueryRequest, AnalyticsQueryResponse, AnalyticsRenderCartesian, AnalyticsRenderFunnel, AnalyticsRenderMetric, AnalyticsRenderRecommendations, AnalyticsRenderSpec, AnalyticsRenderTable, AnalyticsRenderTimeline, AnalyticsResult, AnalyticsResultField, AnalyticsResultMeta, AnalyticsSafeChartOptions, AnalyticsSavedView, AnalyticsSemanticFilter, AnalyticsSemanticId, AnalyticsSourceScope, AnalyticsSuggestedPatchOp, AnalyticsTemplateSummary, AnalyticsTimeGrain, AnalyticsValidationCode, AnalyticsValidationIssue, AnalyticsValidationResult, AnalyticsView, AnalyticsViewAccess, AnalyticsViewAccessRole, AnalyticsViewBlock, AnalyticsViewBlockDraft, AnalyticsViewDraft, AnalyticsViewFilter, AnalyticsViewFilterDraft, AnalyticsViewHandoff, AnalyticsViewHandoffDraft, AnalyticsViewLayout, AnalyticsViewQuery, AnalyticsViewRevision, AnalyticsViewVisibility, AnalyticsWarning, AnyDomainProvider, AssignmentFactUnit, AuditActorType, AuditEvent, AuthAccount, AuthApiKey, AuthInvitation, AuthMember, AuthOrganization, AuthPasskey, AuthSession, AuthSsoProvider, AuthTwoFactor, AuthUser, AuthVerification, B2BCanonicalClass, B2BDerivation, B2BMappingReport, B2BSegmentEventName, B2BSourceMapping, B2BValidation, BannerSlotProps as BannerComponentProps, BannerFrameProps, BannerSlotProps, BannerSurfaceProps, BasicBucketerExperiment, BasicBucketerOptions, BillingAllocation, BillingBalanceProfile, BillingCadence, BillingCoverageGap, BillingCreditNoteLine, BillingCreditProfile, BillingCreditSettlement, BillingHealthStatus, BillingInvoiceProfile, BillingLossProfile, BillingOccurrence, BillingProfile, BillingProfileBinding, BillingProfileName, BillingRecurringPrice, BillingRefundProfile, BillingRepeatableOccurrence, BillingScheduleProfile, BillingSourceScope, BillingSubscriptionItemSnapshot, BillingSubscriptionProfile, BillingTransactionProfile, BrandingConfig, BrandingResolutionInput, BrandingSource, BrowserRuntimeOptions, ButtonSlotProps as ButtonComponentProps, ButtonSlotProps, ButtonSurfaceProps, CanonicalAliasEvent, CanonicalAnalyticsEvent, CanonicalExperimentAllocation, CanonicalGroupEvent, CanonicalIdentifyEvent, CanonicalPageEvent, CanonicalScreenEvent, CanonicalSegmentContext, CanonicalTrackEvent, CapEnforcementResult, CapPeriod, ChangeListener, ChangeLogAction, ChangeLogEntry, CliSlotProps as CliComponentProps, CliSlotProps, ClientContext, CohortMonth, CompactCircularGaugeProps, CompileAnalyticsDraftOptions, ComponentType, CompositeExperimentProviderOptions, ConfigArtifact, ConfigTargetDefaults, ContentPayloadSegmentEntry, ContentPlacementPayload, ContentPromotion, ContentProvider, ContentProviderState, ContentUiPath, ControlPlaneEmitInput, ControlPlaneEventSource, ControlPlaneEventType, ControlPlaneSemanticEvent, CreditBalanceSlotProps as CreditBalanceComponentProps, CreditBalanceSlotProps, CtaActionType, CtaHandler, CtaHandlerMap, CtaHandlerProvider, CtaHandlerProviderState, CtaObject, CtaPath, CtaPathType, CtaResolver, CtaResolverContext, Currency, Customer, CustomerOverride, CustomerOverrideDuration, CustomerOverrideStatus, CustomerOverrideType, DataClassificationValue, DecisionEngineOptions, DefaultTemplateIds, DeleteProtectionDecision, DeriveTrialStatusInput, DetectorRequirements, DimensionCategory, DimensionSourceType, DiscountType, DomainProvider, DomainProviderName, DomainProviderResolutionInput, DriftReport, EffectiveUserContextResolution, EligibleAddon, EligiblePlan, EligiblePrice, EmittablePlatformEventName, EnforcementAction, EnforcementMode, EngagementAreaProps, Entitlement, EntitlementCheckResult$1 as EntitlementCheckResult, EntitlementGateOptions, EntitlementGateState, EntitlementGrant$1 as EntitlementGrant, EntitlementGrantSet$1 as EntitlementGrantSet, EntitlementGrantSource, EntitlementGrantStatus, EntitlementProvider, EntitlementProviderState, EntitlementResult, EntitlementRule, EntitlementRulePeriodUnit, EntitlementRuleSnapshot, EntitlementRuleTarget, EntitlementRuleTargetKind$1 as EntitlementRuleTargetKind, EntitlementRuleValidated, EntitlementRuleVariant, EntitlementStatus, EntitlementType, EntitlementUsageEntry, Environment, EnvironmentPromotionRequest, EnvironmentStatus, EvaluateTrialStatusInput, EvaluateTrialStatusResult, EvaluationContext, EventConsumer, EventConsumerProvider, EventConsumerProviderState, EventEnvelope, EventEnvelopeReader, EventIngestBatch, EventPayloadContract, EventPayloadContractMap, EventPayloadInput, EventPrefixFamily, EventSearchParams, EventSource, EventStability, EventSurface, EventTaxonomy, EventTaxonomyEntry, EvidenceCoverageState, EvidenceReasonColumn, EvidenceRequirement, Exact, ExactInitOptions, Experiment, ExperimentAnalysisConfig, ExperimentAnalysisDefinition, ExperimentAnalysisResult, ExperimentAnalysisResultRecord, ExperimentAssignmentFact, ExperimentAssignmentFactDeclaration, ExperimentAssignmentFactMetadataCarrier, ExperimentAssignmentProvider, ExperimentAssignmentSource, ExperimentDecisionFindingCode, ExperimentDecisionPolicy, ExperimentDecisionRecord, ExperimentDecisionType, ExperimentEvidence, ExperimentEvidenceSnapshot, ExperimentHealth, ExperimentMetricEvidencePlan, ExperimentMetricResult, ExperimentProvider, ExperimentProviderState, ExperimentStatus, ExperimentType, ExperimentVariant, ExperimentVariantNonAssignmentReason, ExperimentVariantSelection, ExperimentVariantTarget, Playbook as ExportedConfig, ExportedConfigPlacementItem, ExportedConfigProvider, ExportedConfigSegmentsItem, ExportedConfigSegmentsItemPredicatesItem, ExportedConfigUiPathActionType, FeatureFlag, FeatureFlagValue, FeatureGateTriggerPayload, FieldDefinition, FixedSurfaceSlotProps, FlagValueType, FreeTrialRule, FreeTrialSettings, FullPageSlotProps as FullPageComponentProps, FullPageSlotProps, FunnelStep, AccessGateSurfaceSlotProps as GateProps, GatedAction, GrowthSignalBundle, GrowthSignalPoint, GrowthSignalSeries, IdentifyContextInput, Identity, IdentityDeclaration, InPageSlotProps as InPageComponentProps, InPageSlotProps, InPageSurfaceProps, IngestWriteScope, IngestedEvent, InitFailureDiagnosticProps, InlineCardPlacementProps, InlineEmbedSlotProps as InlineEmbedComponentProps, InlineEmbedSlotProps, InteractionState, InvitationStatus, JsonObject, JsonValue, KpiAggregate, LegacyConfigTargetDefaults, LocalPlacementDataset, LocalPlacementEntry, LocalPlacementPayload, LocalPlacementSurface, LocalizedText, McpConfig, McpTokenScope, Message, MessageBlock, MessageBlockContent, MessageBlockRecord, MessageBlockSnapshot, MessageSurfaceSlotProps, MessageSurfaceSlotRef, MessageTriggerType, MeteringConfig, ModalSlotProps as ModalComponentProps, ModalFrameProps, ModalLayout, ModalSlotProps, ModalSurfaceProps, NativeExperimentAssignmentOptions, NativeExperimentAssignmentUnit, Objective, ObservationMaturity, OnboardingChecklist, OnboardingState, OpportunityCandidate, OpportunityEvidence, OpportunityInterpretation, OptimizationSuggestion, OrgMemberRole, PaginationParams, PaymentTriggerPayload, Permission, PermissionAction, PermissionResource, PersonalizationContext, PersonalizationToken, PlacementCapPolicy, PlacementCapRule, PlacementCategory, PlacementContentFields, PlacementContentLookupProvider, PlacementControllerOptions, PlacementControllerState, PlacementCustomCode, PlacementDecisionInspectorProps, PlacementDecisionOutput, PlacementEmittedThresholdLookup, PlacementOutput, PlacementPayload, PlacementPayloadSnapshot, PlacementPerformanceRow, PlacementPreviewConfig, PlacementPromotion, PlacementProps, PlacementRendererProps, PlacementSettings, PlacementSettingsCapRule, PlacementSettingsCapRuleGroupItem, PlacementSettingsCapState, PlacementSlotProps, PlacementSlotType, PlacementTestMode, PlacementTestUser, PlacementTestUserIdentifierType, PlacementUiPath, PlacementUiPathActionType, PlacementWarning, PlacementWarningCode, Plan, PlanProvider, PlanProviderState, PlanRuleSnapshot, PlanVariation, PlanVisibility, PlatformEventName, Playbook, PlaybookBody, PlaybookHeader, PlaybookObject, PlaybookPlacementItem, PlaybookProvider, PlaybookSegmentsItem, PlaybookSegmentsItemPredicatesItem, PlaybookStrict, PlaybookUiPathActionType, PlaybookVersion, PlaybookVersionDeployResult, PlaybookVersionDiff, PlaybookVersionEntrySummary, PlaybookVersionStatus, PostHogAnalyticsProviderOptions, PostHogIntegrationOptions, PostHogLike, PresentationCapState, PresentationOutcome, PriceSource, PricingModel, PrimaryContactDesignation, PrimaryContactEnrichmentResult, PrimaryContactResolution, PrimaryContactScope, PrimaryContactUnresolvedReason, Promotion, PromotionStatus, ProviderAvailability, ProviderBindingRef, ProviderCapability, ProviderConnection, ProviderProvenance, QuotaMeterSlotProps as QuotaMeterComponentProps, QuotaMeterFrameProps, QuotaMeterSlotProps, SurfaceSlotComponentProps as RTSlotProps, RegisterPlacementSlotTypeOptions, ResolvedBranding, ResolvedContent, ResolvedDomainType, ResolvedPayload, ResolvedProviderContext, RevTurbineApiClient, RevTurbineApiClientConfig, paths as RevTurbineApiPaths, RevTurbineAuthoredSlotRef, RevTurbineBootstrapDecisionInput, RevTurbineChainedPlacementRequestOptions, RevTurbineClientSessionProvider, RevTurbineColorScheme, RevTurbineComponentType, Playbook as RevTurbineConfig, RevTurbineConfigAddonVariationsItem, RevTurbineConfigAddonsItem, RevTurbineConfigEnforcementDefaultsItem, RevTurbineConfigEntitlementRulesItem, RevTurbineConfigEntitlementsItem, RevTurbineConfigMeterBindingsItem, RevTurbineConfigObjectivesItem, RevTurbineConfigPeriodCap, RevTurbineConfigPersonalizationTokensItem, RevTurbineConfigPlacementCategory, RevTurbineConfigPlacementItem, RevTurbineConfigPlacementPayloadItem, RevTurbineConfigPlacementSettingsItem, RevTurbineConfigPlacementSlotsItem, RevTurbineConfigPlacementTrigger, RevTurbineConfigPlanVariationsItem, RevTurbineConfigPlansItem, RevTurbineConfigProvider, RevTurbineConfigProviderInput, RevTurbineConfigSeatTypesItem, RevTurbineConfigSegmentDimensionsItem, RevTurbineConfigSegmentsItem, RevTurbineConfigSegmentsItemPredicatesItem, RevTurbineConfigSlotConfigsItem, RevTurbineConfigStudioCtaConfig, RevTurbineConfigStudioPayload, RevTurbineConfigStudioPayloadCaps, RevTurbineConfigStudioPayloadSurface, RevTurbineConfigStudioPayloadTarget, RevTurbineConfigSurfaceTemplatesItem, RevTurbineConfigSurfaceTemplatesItemFieldsItem, RevTurbineConfigUiPathActionType, RevTurbineContextMode, RevTurbineContextPolicy, RevTurbineDecisionContent, RevTurbineEndpointOverrides, RevTurbineEntitlementContext, RevTurbineEntitlementPlacementRequestOptions, RevTurbineEntitlementRuleEvaluation, RevTurbineEventBatchingOptions, RevTurbineEventEnvelope, RevTurbineEventOptions, RevTurbineGateResult, RevTurbineImpressionMetadata, RevTurbineInitBaseOptions, RevTurbineInitInputOptions, RevTurbineInitOptions, RevTurbineInitOptionsStrict, RevTurbineInitPhase, RevTurbineInitStatus, RevTurbineInitWithProviderOptions, RevTurbineLocalOnlyMinimalInitOptions, RevTurbineLocalRuntimeData, RevTurbineLocalRuntimeOptions, RevTurbineLocalRuntimeResolvers, RevTurbineMeterUsageOverride, RevTurbinePageContext, RevTurbinePersonalizationTokens, RevTurbinePlacementBehaviorFlags, RevTurbinePlacementConfig, RevTurbinePlacementContent, RevTurbinePlacementDecision, RevTurbinePlacementDecisionExplanation, RevTurbinePlacementDecisionInput, RevTurbinePlacementDecisionOverrides, RevTurbinePlacementPayloadEvaluation, RevTurbinePlacementRecord, RevTurbinePlacementRequestConfig, RevTurbinePlacementRuleEvaluation, RevTurbinePlacementTypeEntity, RevTurbinePlaybookLoadState, RevTurbinePolicySnapshot, RevTurbineProviderFactory, RevTurbineProviderFailureSlotBehavior, RevTurbineProviderProps, RevTurbineRegisteredSlot, RevTurbineRequiredUiPathResolvers, RevTurbineRouteProps, RevTurbineRuntimeMode, RevTurbineSdkMode, RevTurbineSdkProvider, RevTurbineSegmentEvaluation, RevTurbineSegmentPredicateEvaluation, RevTurbineSemanticEvent, RevTurbineServerOptions, RevTurbineSlotInventoryDiagnosis, RevTurbineSlotPlacementRequestOptions, RevTurbineStorage, RevTurbineSurfaceSlotConfig, RevTurbineSurfaceType, RevTurbineTargeting, RevTurbineTelemetryOptions, RevTurbineTheme, RevTurbineThemeColors, RevTurbineThemeInput, RevTurbineThemeShadows, RevTurbineThemeShape, RevTurbineThemeTypography, RevTurbineTreatmentInteractionInput, RevTurbineTreatmentInteractionOptions, RevTurbineTreatmentInteractionType, RevTurbineTrialContext, RevTurbineTriggerEvent, RevTurbineTriggerPayload, RevTurbineUiPathActionTypes, RevTurbineUiPathResolver, RevTurbineUiPathResolverMap, RevTurbineUiPathResolverValidationIssue, RevTurbineUiPathResolverValidationOptions, RevTurbineUiPathResolverValidationReport, RevTurbineUpdateInput, RevTurbineUsageSnapshot, RevTurbineUsageSnapshotEntry, RevTurbineUserContext, RevenueMetric, ReverseTrialRule, ReverseTrialSettings, ReverseTrialStartPolicy, RevturbineB2BTrackEvent, RevturbineCanonicalEventContext, RevturbineEventContext, RevturbineIdentitySource, RevturbineProducerAliasEvent, RevturbineProducerEvent, RevturbineProducerEventContext, RevturbineProducerGroupEvent, RevturbineProducerIdentifyEvent, RevturbineProducerPageEvent, RevturbineProducerScreenEvent, RevturbineProducerSegmentContext, RevturbineProducerTrackEvent, Role, RuleProvider, RuleProviderState, RuleVisibility, RuntimePromotionSnapshot, SchemaDeprecation, SchemaFacetOptions, SchemaFacets, SdkConfigShape, SdkEventProperties, SdkMetaEvent, SdkMetaEventType, SdkMetaIngestBatch, SdkMetadata, SdkSessionOptions, SdkTraits, SeatType, Segment, SegmentAliasInput, SegmentB2BTrackEvent, SegmentDimension, SegmentEventContext, SegmentEventInput, SegmentEventMethod, SegmentGroupInput, SegmentIdentifyInput, SegmentIngestBatch, SegmentLibraryContext, SegmentPageContext, SegmentPageInput, SegmentProvider, SegmentProviderState, SegmentScreenInput, SegmentTrackInput, SegmentValue, SemanticEvent, ServerActionContext, ServerActionHandler, ServerActionMap, ServerActionResult, ServerEntitlementResult, ServerEvaluationHydrationPayload, ServerEvaluationPayload, ServerEvaluationPayloadDecisionsItem, ServerEvaluationPayloadEntitlementsValue, ServerEvaluationPayloadTrialStatus, ServerEvaluationPayloadUser, ServerEvaluationPayloadUserContext, ServerEvaluationRequest, ServerPlacementDecision, ServerPlacementRequest, ServerUserContext, ServerUserContextSnapshot, Severity, SurfaceSlotComponentProps as SlotProps, SlotRouteParams, StaticPlacementResolverOptions, StripeBillingScope, StripeIntegrationConfig, StripePrice, StripePriceBillingPeriod, StripePriceMock, StripePriceMockBillingPeriod, StripePriceScope, StripeSubscriptionEvidence, StripeSubscriptionItem, StripeSubscriptionStatus, StudioSurfaceType, SubscriptionEvidenceKnown, SubscriptionEvidenceResult, SubscriptionEvidenceUnavailable, SubscriptionEvidenceUnavailableReason, SubscriptionProtection, SuggestionSeverity, SupersessionReason, SupersessionRecord, SuppressionResult, SurfaceSlot, SurfaceSlotCategory, SurfaceSlotComponentProps, SurfaceSlotStatus, SurfaceTemplate, SurfaceType, SurfaceTypeCapRule, TelemetryConsent, TelemetryScopeProps, TelemetryScopeValue, TemplateFieldType, Tenant, TenantConfig, TenantStatus, Theme, ThemeLoaderOptions, ThemeProvider, ThemeProviderState, ToastSlotProps as ToastComponentProps, ToastSlotProps, ToastSurfaceProps, TooltipSlotProps as TooltipComponentProps, TooltipSlotProps, TrackEvent, TrackEventLiftResult, TrackFn, TrackIngestBatch, TrackIngestBodyClassification, TrackOnViewProps, TrackOptions, TrackProps, TrackPurpose, TrackedAction, Trait, TraitsNamespace, TraitsProvider, TraitsProviderState, TreatmentInteractionBatch, TreatmentInteractionInput, TreatmentInteractionRequest, TreatmentInteractionType, TrendFeatures, TrialCommitment$1 as TrialCommitment, TrialEligibilityScope, TrialEpisodeFacts$1 as TrialEpisodeFacts, TrialEvidence$1 as TrialEvidence, TrialEvidenceKind$1 as TrialEvidenceKind, TrialInstance, TrialLimitPolicy, TrialPendingUnknownReason, TrialRevisionClassification, TrialRevisionKind, TrialRevisionPending, TrialRevisionResolved, TrialStatus, TrialStatusProvider, TrialStatusTraits, TrialTriggerPayload, TriggerEventType, UiPreference, UnvalidatedConfigArtifact, UsageAllocation, UsageBalances, UsageEnforcementSettings, UsagePeriodScope, UsageTraits, UsageTraitsProvider, UsageTriggerPayload, UseAddonsResult, UseCanResult, UseEntitlementOptions, UseEntitlementResult, UsePlacementOptions, UsePlacementPersonalizationOptions, UsePlacementResult, UsePlansResult, UseSurfaceSlotOptions, UseSurfaceSlotResult, UseUsageSnapshotResult, UserBuiltinDimensions, UserContext, UserContextInput, UserInstanceContext, UserPlanContext, UserProfileProps, UserRole, UserTargetingContext, UserTrialStatus, UserUsageEntry, ValidateAnalyticsViewOptions, VariantStatisticalSummary, WarGameCapabilityRequirements, WarGameCategory, WarGameGrade, WarGameOracle, WarGameQualificationLevel, WarGameScenario, WebhookDelivery, WebhookDispatchStatus, WebhookEventLog, WebhookEventSource, WebhookEventStatus, WebhookProcessingStatus, WebhookReplayEnvelope };
42046
+ export { ACCOUNT_CREATION_PENDING_REASONS, ACCOUNT_CREATION_SOURCES, ANALYTICS_ANNOTATION_KINDS, ANALYTICS_DATE_RANGE_FILTER_VALUE_TYPE, ANALYTICS_VALIDATION_CODES, ANALYTICS_VIEW_SCHEMA_VERSION, AccessGateSurfaceSlot, AccountPrimaryContactBindingSchema, ActivityLevelSchema, AddOnSchema, AddOnVariationSchema, AgentConnectorSlot as AgentConnectorComponent, AgentConnectorSlot, AlertSchema, AnalysisProvenanceSchema, AnalyticsAgentCatalogEntryKindSchema, AnalyticsAgentCatalogEntrySchema, AnalyticsAnalyticalUnitSchema, AnalyticsAnnotationKindSchema, AnalyticsAnnotationMarkerSchema, AnalyticsAnnotationRequestSchema, AnalyticsAnnotationResponseSchema, AnalyticsAnnotationSchema, AnalyticsAnnotationSourceSchema, AnalyticsBlockErrorSchema, AnalyticsBlockResultSchema, AnalyticsCardinalityClassSchema, AnalyticsCatalogAnnotationKindSchema, AnalyticsCatalogConceptSchema, AnalyticsCatalogDeprecationSchema, AnalyticsCatalogDimensionSchema, AnalyticsCatalogMetricSchema, AnalyticsCatalogMetricValidatedSchema, AnalyticsCatalogProvenanceKindSchema, AnalyticsCatalogProvenanceSchema, AnalyticsCatalogSchema, AnalyticsCatalogSearchResultSchema, AnalyticsCatalogSourceSchema, AnalyticsClassificationSchema, AnalyticsCompareDeltaSchema, AnalyticsCompareExperimentSchema, AnalyticsCompareModeSchema, AnalyticsCompareSegmentSchema, AnalyticsCompileResolutionSchema, AnalyticsCoverageSchema, AnalyticsCustomizationCapabilitySchema, AnalyticsCustomizationPolicySchema, AnalyticsDimensionCapabilitySchema, AnalyticsDimensionTypeSchema, AnalyticsFieldTypeSchema, AnalyticsFilterControlSchema, AnalyticsFilterOperatorSchema, AnalyticsFilterStateSchema, AnalyticsFilterValueSchema, AnalyticsFormatSpecSchema, AnalyticsHistoricalModeSchema, AnalyticsMetricAggregationSemanticsSchema, AnalyticsMetricDirectionSchema, AnalyticsMetricStatisticalTypeSchema, AnalyticsPeriodCompareModeSchema, AnalyticsQueryFamilySchema, AnalyticsQueryOverridesSchema, AnalyticsQueryRequestSchema, AnalyticsQueryResponseSchema, AnalyticsRenderCartesianSchema, AnalyticsRenderFunnelSchema, AnalyticsRenderMetricSchema, AnalyticsRenderRecommendationsSchema, AnalyticsRenderSpecSchema, AnalyticsRenderTableSchema, AnalyticsRenderTimelineSchema, AnalyticsResultFieldSchema, AnalyticsResultMetaSchema, AnalyticsResultSchema, AnalyticsSafeChartOptionsSchema, AnalyticsSavedViewSchema, AnalyticsSemanticFilterSchema, AnalyticsSemanticIdSchema, AnalyticsSourceScopeSchema, AnalyticsSuggestedPatchOpSchema, AnalyticsTemplateSummarySchema, AnalyticsTimeGrainSchema, AnalyticsValidationIssueSchema, AnalyticsValidationResultSchema, AnalyticsViewAccessRoleSchema, AnalyticsViewAccessSchema, AnalyticsViewBlockDraftSchema, AnalyticsViewBlockSchema, AnalyticsViewDraftSchema, AnalyticsViewFilterDraftSchema, AnalyticsViewFilterSchema, AnalyticsViewHandoffDraftSchema, AnalyticsViewHandoffSchema, AnalyticsViewLayoutSchema, AnalyticsViewQuerySchema, AnalyticsViewRevisionSchema, AnalyticsViewSchema, AnalyticsViewVisibilitySchema, AnalyticsWarningSchema, AnchorFields, AuditActorTypeSchema, AuditEventSchema, AuthAccountSchema, AuthApiKeySchema, AuthInvitationSchema, AuthMemberSchema, AuthOrganizationSchema, AuthPasskeySchema, AuthSessionSchema, AuthSsoProviderSchema, AuthTwoFactorSchema, AuthUserSchema, AuthVerificationSchema, B2BSegmentEventNameSchema, B2B_INPUT_SYNONYMS, B2B_NON_AUTHORITATIVE_OBSERVATIONS, B2B_PENDING_PRODUCERS, B2B_PII_PROPERTIES, B2B_RT_REQUIRED_PROPERTIES, B2B_SEGMENT_EVENT_NAMES, B2B_SEMANTIC_MAP_VERSION, B2B_SOURCE_MAPPINGS, B2B_TRIAL_OUTCOMES, BILLING_ACCOUNTING_CONTRACT_VERSION, BILLING_COVERAGE_FAMILIES, BILLING_ITEM_JOIN_KEYS, BILLING_OCCURRENCE_IDENTITY, BILLING_OCCURRENCE_IDENTITY_VERSION, BILLING_OCCURRENCE_KEY_PREFIX, BILLING_OCCURRENCE_RULES, BILLING_OUTPUT_KEY_PREFIX, BILLING_OUTPUT_KINDS, BILLING_PROFILE_KINDS, BILLING_PROFILE_NAMES, BILLING_PROFILE_VERSION, BILLING_UNIQUE_KEYS, BUILT_IN_TEMPLATE_COMPONENT_TYPES, BannerSlot as BannerComponent, BannerFrame, BannerSlot, BannerSurface, BillingAccountMappingRevisionSchema, BillingAccountingRevisionSchema, BillingAllocationSchema, BillingBalanceProfileSchema, BillingCadenceSchema, BillingCompletedGenerationCheckpointSchema, BillingCoverageCheckpointSchema, BillingCoverageGapRangeSchema, BillingCoverageGapReasonSchema, BillingCoverageUnavailableReasonSchema, BillingCreditNoteLineSchema, BillingCreditProfileSchema, BillingCreditSettlementSchema, BillingEconomicOwnerSchema, BillingGenerationCheckpointSchema, BillingGenerationSchema, BillingHealthStatusSchema, BillingInvoicePaymentSourceSchema, BillingInvoiceProfileSchema, BillingLossProfileSchema, BillingOccurrenceSchema, BillingOpeningSeedSchema, BillingOutputRowKeySchema, BillingPriceTermsSchema, BillingPriceTierSchema, BillingProfileSchema, BillingReconciliationSchema, BillingRecurrenceSchema, BillingRecurringPriceSchema, BillingRefundProfileSchema, BillingRepeatableOccurrenceSchema, BillingScheduleProfileSchema, BillingSettlementAmountSchema, BillingSourceScopeSchema, BillingSubscriptionItemSnapshotSchema, BillingSubscriptionProfileSchema, BillingTransactionProfileSchema, BrandingConfigSchema, BrowserRuntime, BrowserStorage, ButtonSlot as ButtonComponent, ButtonSlot, ButtonSurface, CONTROL_PLANE_EVENT_NAMES, CONTROL_PLANE_EVENT_SOURCE, CONTROL_PLANE_SOURCE_KEY, CUSTOMER_SETTABLE_BUILTIN_DIMENSION_KEYS, CanonicalAliasEventSchema, CanonicalAnalyticsEventSchema, CanonicalGroupEventSchema, CanonicalIdentifyEventSchema, CanonicalPageEventSchema, CanonicalScreenEventSchema, CanonicalSegmentContextSchema, CanonicalTrackEventSchema, CapEnforcer, CapPeriodSchema$1 as CapPeriodSchema, ChangeLogActionSchema, ChangeLogEntrySchema, CliSlot as CliComponent, CliSlot, ClientContextSchema, ClientSafe, CohortMonthSchema, CompactCircularGauge, ComponentTypeSchema, ContentPayloadSegmentEntrySchema, ContentPlacementPayloadSchema, ContentPromotionSchema, ContentUiPathSchema, ContextVisibility, ControlPlaneEventSourceSchema, ControlPlaneEventTypeSchema, ControlPlaneSemanticEventSchema, CreditBalanceSlot as CreditBalanceComponent, CreditBalanceSlot, CtaActionTypeSchema, CtaObjectSchema, CtaPathSchema, CtaPathTypeSchema, CtaResolverRegistry, CurrencySchema, CustomerBuiltinDimensionsSchema, CustomerOverrideDurationSchema, CustomerOverrideSchema, CustomerOverrideStatusSchema, CustomerOverrideTypeSchema, CustomerSchema, DARK_THEME, DEFAULT_ANALYTICS_RETENTION_DAYS, DEFAULT_BRANDING, DEFAULT_HOSTED_ENDPOINT, DEFAULT_SDK_MODE, DEFAULT_TEMPLATE_COMPONENT_TYPES, DEFAULT_THEME, DEPRECATED_EVENT_NAMES, DOGFOOD_CLIENT_EVENT_NAMES, DataClassification, DecisionEngine, DecisionOnly, DefaultTemplateIdsSchema, DeleteProtectionDecisionSchema, DescriptionField, DetectorRequirementsSchema, DimensionCategorySchema, DimensionSourceTypeSchema, DiscountTypeSchema, DomainProviderRegistry, DriftReportSchema, EMITTABLE_PLATFORM_EVENT_NAMES, ENTITLEMENT_STATUS_VALUES, EVENT_ENVELOPE_SCHEMA_VERSION, EVENT_PAYLOAD_CONTRACTS, EVENT_PAYLOAD_EVENT_NAMES, EVENT_PREFIX_FAMILIES, EmailPreviewSlot as EmailPreviewComponent, EmailPreviewSlot, EnforcementActionSchema, EnforcementModeSchema, EngagementArea, EntitlementCheckResultSchema, EntitlementGate, EntitlementGrantSchema, EntitlementGrantSetSchema, EntitlementGrantSourceSchema, EntitlementGrantStatusSchema, EntitlementRulePeriodUnitSchema, EntitlementRuleSchema, EntitlementRuleTargetKindSchema, EntitlementRuleTargetSchema, EntitlementRuleValidatedSchema, EntitlementRuleVariantSchema, EntitlementSchema, EntitlementStatusSchema, EntitlementTypeSchema, EnvironmentPromotionRequestSchema, EnvironmentSchema, EnvironmentStatusSchema, EventEnvelopeSchema, EventIngestBatchSchema, EventPrefixFamilySchema, EventSearchParamsSchema, EventSourceSchema, EventStabilitySchema, EventSurfaceSchema, EventTaxonomyEntrySchema, EventTaxonomySchema, EvidenceCoverageStateSchema, EvidenceReasonColumnSchema, EvidenceRequirementSchema, ExperimentAnalysisConfigSchema, ExperimentAnalysisConfigVersionError, ExperimentAnalysisDefinitionSchema, ExperimentAnalysisResultRecordSchema, ExperimentAnalysisResultSchema, ExperimentAssignmentFactSchema, ExperimentAssignmentSourceSchema, ExperimentDecisionFindingCodeSchema, ExperimentDecisionPolicySchema, ExperimentDecisionPolicyVersionError, ExperimentDecisionRecordSchema, ExperimentDecisionTypeSchema, ExperimentEvidenceSchema, ExperimentEvidenceSnapshotSchema, ExperimentHealthSchema, ExperimentMetricEvidencePlanSchema, ExperimentMetricResultSchema, ExperimentSchema, ExperimentStatusSchema, ExperimentTypeSchema, ExperimentVariantSchema, ExperimentVariantTargetSchema, RevTurbineConfigPlacementItemSchema as ExportedConfigPlacementItemSchema, RevTurbineConfigSchema as ExportedConfigSchema, RevTurbineConfigSegmentsItemPredicatesItemSchema as ExportedConfigSegmentsItemPredicatesItemSchema, RevTurbineConfigSegmentsItemSchema as ExportedConfigSegmentsItemSchema, RevTurbineConfigUiPathActionTypeSchema as ExportedConfigUiPathActionTypeSchema, FALLBACK_ACCOUNT_ID_PREFIX, FAMILY_RENDER_COMPATIBILITY, FIRST_SEGMENT_EVENT_ENVELOPE_SCHEMA_VERSION, FIXED_BANNER_TEMPLATE_IDS, FIXED_SURFACE_TEMPLATE_IDS, FIXTURE_ANALYTICS_CATALOG, FeatureFlagSchema, FeatureFlagValueSchema, FeatureGateTriggerPayloadSchema, FieldDefinitionSchema, FixedSurfaceSlot, FlagValueTypeSchema, FreeTrialRuleSchema, FreeTrialSettingsSchema, FullPageSlot as FullPageComponent, FullPageSlot, FunnelStepSchema, GATED_SURFACE_TEMPLATE_IDS, GENERAL_BANNER_TEMPLATE_IDS, GENERAL_MODAL_TEMPLATE_IDS, GENERAL_TOAST_TEMPLATE_IDS, AccessGateSurfaceSlot as Gate, GrowthSignalBundleSchema, GrowthSignalPointSchema, GrowthSignalSeriesSchema, HANDLE_PATTERN, HandleField, INGEST_WRITE_SCOPE, INIT_STATUS_OK, INVOICE_RECEIVABLE_TRANSITIONS, IdField, IdentityKind, IdentitySchema, InMemoryStorage, InPageSlot as InPageComponent, InPageSlot, InPageSurface, IngestedEventSchema, InitFailureDiagnostic, InlineCardPlacement, InlineEmbedSlot as InlineEmbedComponent, InlineEmbedSlot, InteractionTracker, InvitationStatusSchema, InvoicePaymentStatusSchema, InvoiceSettlementBasisSchema, InvoiceStatusSchema, KpiAggregateSchema, LEGACY_BILLING_OCCURRENCE_IDENTITY_VERSION, LEGACY_TRACK_EVENT_ENVELOPE_SCHEMA_VERSION, LocalizedTextSchema, MAX_BILLING_CHECKPOINT_LIST, MAX_BILLING_PRICE_TIERS, MAX_BILLING_PROFILE_LIST, MAX_EVENT_JSON_DEPTH, MAX_EVENT_TAGS, MAX_EVENT_TAG_LENGTH, MAX_SEGMENT_MESSAGES_PER_BATCH, MAX_TREATMENT_INTERACTIONS_PER_BATCH, MESSAGE_SURFACE_TEMPLATE_IDS, MIN_READABLE_EVENT_ENVELOPE_SCHEMA_VERSION, McpConfigSchema, McpTokenScopeSchema, MessageBlockContentSchema, MessageBlockRecordSchema, MessageBlockSchema, MessageSchema, MessageSurfaceSlot, MetadataField, MeteringConfigSchema, ModalSlot as ModalComponent, ModalFrame, ModalSlot, ModalSurface, NON_RETRYABLE_EVIDENCE_REASONS, NameField, NullableDatetimeField, ObjectiveField, ObjectiveSchema, ObservationMaturitySchema, OnboardingChecklistSchema, OnboardingStateSchema, OpportunityCandidateSchema, OpportunityEvidenceSchema, OpportunityInterpretationSchema, OptimizationSuggestionSchema, OrgMemberRoleSchema, PERSISTED_SCHEMA_FACET_EXEMPTIONS, PLATFORM_EMITTED_EVENT_NAMES, PLATFORM_EVENT_TAXONOMY, PLAYBOOK_FORMAT_VERSION, PRIMARY_CONTACT_UNRESOLVED_CODE, PROTECTED_SUBSCRIPTION_SAMPLE_LIMIT, PaginatedResponseSchema, PaginationParamsSchema, PaymentTriggerPayloadSchema, PermissionActionSchema, PermissionResourceSchema, PermissionSchema, PersonalizationTokenSchema, Placement, PlacementCapRuleSchema, PlacementCategorySchema, PlacementController, PlacementDecisionInspector, PlacementDecisionOutputSchema, PlacementPayloadSchema, PlacementPerformanceRowSchema, PlacementRenderer, PlacementSchema, PlacementSettingsCapRuleGroupItemSchema, PlacementSettingsCapRuleSchema, PlacementSettingsCapStateSchema, PlacementSettingsSchema, PlacementTestModeSchema, PlacementTestUserIdentifierTypeSchema, PlacementTestUserSchema, PlacementTypeRegistry, PlacementWarningCodeSchema, PlacementWarningSchema, PlanSchema, PlanVariationSchema, PlanVisibilitySchema, PlaybookBodySchema, PlaybookHeaderSchema, PlaybookObjectSchema, RevTurbineConfigPlacementItemSchema as PlaybookPlacementItemSchema, PlaybookSchema, RevTurbineConfigSegmentsItemPredicatesItemSchema as PlaybookSegmentsItemPredicatesItemSchema, RevTurbineConfigSegmentsItemSchema as PlaybookSegmentsItemSchema, PlaybookStrictSchema, RevTurbineConfigUiPathActionTypeSchema as PlaybookUiPathActionTypeSchema, PlaybookVersionDeployResultSchema, PlaybookVersionDiffSchema, PlaybookVersionEntrySummarySchema, PlaybookVersionSchema, PlaybookVersionStatusSchema, PresentationOutcomeSchema, PriceSourceSchema, PricingModelSchema, PrimaryContactDesignationSchema, PrimaryContactResolutionSchema, PrimaryContactUnresolvedReasonSchema, PromotionSchema, PromotionStatusSchema, ProviderAvailabilitySchema, ProviderBindingRefSchema, ProviderCapabilitySchema, ProviderConnectionSchema, ProviderProvenanceSchema, PushPreviewSlot as PushPreviewComponent, PushPreviewSlot, QuotaMeterSlot as QuotaMeterComponent, QuotaMeterFrame, QuotaMeterSlot, RECOGNIZED_UPDATE_KEYS, ROLE_PERMISSIONS, ROLE_RANK, SurfaceSlotComponent as RTSlot, ApiError as RevTurbineApiError, RevTurbineConfigAddonVariationsItemSchema, RevTurbineConfigAddonsItemSchema, RevTurbineConfigEnforcementDefaultsItemSchema, RevTurbineConfigEntitlementRulesItemSchema, RevTurbineConfigEntitlementsItemSchema, RevTurbineConfigMeterBindingsItemSchema, RevTurbineConfigObjectivesItemSchema, RevTurbineConfigPeriodCapSchema, RevTurbineConfigPersonalizationTokensItemSchema, RevTurbineConfigPlacementCategorySchema, RevTurbineConfigPlacementItemSchema, RevTurbineConfigPlacementPayloadItemSchema, RevTurbineConfigPlacementSettingsItemSchema, RevTurbineConfigPlacementSlotsItemSchema, RevTurbineConfigPlacementTriggerSchema, RevTurbineConfigPlanVariationsItemSchema, RevTurbineConfigPlansItemSchema, RevTurbineConfigSchema, RevTurbineConfigSeatTypesItemSchema, RevTurbineConfigSegmentDimensionsItemSchema, RevTurbineConfigSegmentsItemPredicatesItemSchema, RevTurbineConfigSegmentsItemSchema, RevTurbineConfigSlotConfigsItemSchema, RevTurbineConfigStudioCtaConfigSchema, RevTurbineConfigStudioPayloadCapsSchema, RevTurbineConfigStudioPayloadSchema, RevTurbineConfigStudioPayloadSurfaceSchema, RevTurbineConfigStudioPayloadTargetSchema, RevTurbineConfigSurfaceTemplatesItemFieldsItemSchema, RevTurbineConfigSurfaceTemplatesItemSchema, RevTurbineConfigUiPathActionTypeSchema, RevTurbineCustomerSdk, RevTurbineProvider, RevTurbineRoute, RevTurbineServer, RevTurbineThemeProvider, RevenueMetricSchema, ReverseTrialRuleSchema, ReverseTrialSettingsSchema, ReverseTrialStartPolicySchema, RevturbineB2BTrackEventSchema, RevturbineCanonicalEventContextSchema, RevturbineEventContextSchema, RevturbineIdentitySourceSchema, RevturbineProducerAliasEventSchema, RevturbineProducerEventContextSchema, RevturbineProducerEventSchema, RevturbineProducerGroupEventSchema, RevturbineProducerIdentifyEventSchema, RevturbineProducerPageEventSchema, RevturbineProducerScreenEventSchema, RevturbineProducerSegmentContextSchema, RevturbineProducerTrackEventSchema, RoleSchema, RuleVisibilitySchema, RuntimeMode, RuntimePromotionSnapshotSchema, SDK_AUTOMATIC_NON_EMITTED_NAMES, SDK_CLIENT_EVENT_NAMES, SDK_META_EVENT_NAMES, SDK_SERVER_EVENT_NAMES, SEGMENT_EVENT_METHODS, SEGMENT_MAX_BATCH_BYTES, SEGMENT_MAX_MESSAGE_BYTES, SEGMENT_MAX_MESSAGE_ID_LENGTH, SEMANTIC_ID_PATTERN, SERVER_TRAITS_DOMAIN, SLOT_ROUTE_ID_PLACEHOLDER, SLOT_ROUTE_MAX_LENGTH, STRIPE_SUBSCRIPTION_STATUS_VALUES, SUBSCRIPTION_BLOCKER_ENTITY, SUBSCRIPTION_EVIDENCE_UNAVAILABLE_CODE, SUBSCRIPTION_EVIDENCE_UNAVAILABLE_REASONS, SUBSCRIPTION_REFERENCE_EXISTS_CODE, SUBSCRIPTION_STATUS_PROTECTION, SURFACE_SLOT_NAME_MAX_LENGTH, SURFACE_SLOT_ROUTE_MAX_LENGTH, SURFACE_SLOT_STATUS_VALUES, SchemaContext, SchemaExposure, SchemaPersistence, SchemaSource, SdkConfigShapeSchema, SdkMetaEventSchema, SdkMetaEventTypeSchema, SdkMetaIngestBatchSchema, SdkSession, SeatTypeSchema, SegmentAliasInputSchema, SegmentB2BTrackEventSchema, SegmentDimensionSchema, SegmentEventContextSchema, SegmentEventInputSchema, SegmentGroupInputSchema, SegmentIdentifyInputSchema, SegmentIngestBatchSchema, SegmentLibraryContextSchema, SegmentPageContextSchema, SegmentPageInputSchema, SegmentSchema, SegmentScreenInputSchema, SegmentTrackInputSchema, SegmentValueSchema, SemanticEventSchema, ServerBuiltinDimensionsWriteSchema, ServerEvaluationPayloadDecisionsItemSchema, ServerEvaluationPayloadEntitlementsValueSchema, ServerEvaluationPayloadSchema, ServerEvaluationPayloadTrialStatusSchema, ServerEvaluationPayloadUserContextSchema, ServerEvaluationPayloadUserSchema, ServerOnly, ServerUserBuiltinDimensionsSchema, ServerUserContextAssignmentSchema, ServerUserContextProvider, ServerUserContextUpsertSchema, SeveritySchema, SurfaceSlotComponent as Slot, SmsPreviewSlot as SmsPreviewComponent, SmsPreviewSlot, StripeBillingScopeSchema, StripeIntegrationConfigSchema, StripePriceBillingPeriodSchema, StripePriceMockBillingPeriodSchema, StripePriceMockSchema, StripePriceSchema, StripePriceScopeSchema, StripeSubscriptionEvidenceSchema, StripeSubscriptionItemSchema, StripeSubscriptionStatusSchema, StudioSurfaceTypeSchema, SubscriptionEvidenceKnownSchema, SubscriptionEvidenceResultSchema, SubscriptionEvidenceUnavailableReasonSchema, SubscriptionEvidenceUnavailableSchema, SubscriptionProtectionSchema, SuggestionSeveritySchema, SupersessionReasonSchema, SupersessionRecordSchema, SurfaceSlotComponent, SurfaceSlotSchema, SurfaceSlotStatusSchema, SurfaceTemplateSchema, SurfaceTypeCapRuleSchema, SurfaceTypeSchema, TERMINAL_SUBSCRIPTION_STATUSES, TRIAL_PENDING_UNKNOWN_REASONS, TRIAL_REVISION_KINDS, TelemetryScope, TelemetryScopeContext, TemplateFieldTypeSchema, TenantConfigSchema, TenantIdField, TenantSchema, TenantStatusSchema, ThemeSchema, TimestampFields, ToastSlot as ToastComponent, ToastSlot, ToastSurface, TooltipSlot as TooltipComponent, TooltipSlot, Track, TrackEventSchema, TrackIngestBatchSchema, TrackOnView, TreatmentInteractionBatchSchema, TreatmentInteractionInputSchema, TreatmentInteractionRequestSchema, TreatmentInteractionTypeSchema, TrendFeaturesSchema, TrialEligibilityScopeSchema, TrialInstanceSchema, TrialLimitPolicySchema, TrialStatusSchema, TrialTriggerPayloadSchema, TriggerEventTypeSchema, USER_GRAIN_NON_CREATION_SOURCES, UiPreferenceSchema, UnsupportedExperimentAssignmentUnitError, UsageAllocationSchema$1 as UsageAllocationSchema, UsageEnforcementSettingsSchema, UsagePeriodScopeSchema, UsageTriggerPayloadSchema, UserBuiltinDimensionsSchema, UserContextSchema, UserInstanceContextSchema, UserPlanContextSchema, UserProfile, UserRoleSchema, UserTrialStatusSchema, UserUsageEntrySchema, VIEW_ELEMENT_ID_PATTERN, VariantStatisticalSummarySchema, VersionFields, WEBHOOK_DERIVED_EVENT_NAMES, WarGameCapabilityRequirementsSchema, WarGameCategorySchema, WarGameGradeSchema, WarGameOracleSchema, WarGameQualificationLevelSchema, WarGameScenarioSchema, WebhookDeliverySchema, WebhookDispatchStatusSchema, WebhookEventLogSchema, WebhookEventSourceSchema, WebhookEventStatusSchema, WebhookProcessingStatusSchema, WebhookReplayEnvelopeSchema, adaptExperimentVersionToBucketer, analyticsPaths, analyticsViewPaths, applyPrimaryContactEnrichment, applyValueMaps, assertExperimentAnalysisConfigUpdateAllowed, assertExperimentDecisionPolicyUpdateAllowed, baseThemeForScheme, billingAccountingRevisionOf, billingEconomicOwnership, billingProfileCoverageGaps, billingSourceScopeKey, boundBillingProfileKinds, bridgeUiPathResolversIntoRegistry, bucketSubject, buildAgentCatalogProjection, buildB2BMappingReport, buildControlPlaneEvent, canActivateBillingGeneration, canonicalB2BEventName, categorizeActionError, changelogPaths, classifyAccountCreation, classifyInvoiceTransition, classifySubscriptionStatus, classifyTaxonomyEvent, classifyTrackIngestBody, classifyTrialRevision, clearPersistedTheme, collapseBillingRevisions, collectAssignmentFactDeclarations, collectPersistedSchemas, collectVersionedConfigEntities, compareAccountingRevision, compileAnalyticsDraft, composeEffectiveExperimentContext, configPaths, contentPaths, createAnalyticsProvider, createBasicExperimentProvider, createChainedPlacementRequest, createCompositeExperimentProvider, createCustomEndpointRuntimeConfig, createEntitlementPlacementRequest, createFixtureAnalyticsCatalog, createHydrationProviders, createInMemoryAnalyticsCatalog, createLocalRuntimeConfig, createNativeExperimentAssignmentProvider, createPostHogAnalyticsProvider, createPostHogIntegration, createRevTurbineApiClient, createSemanticEvent, createServerRuntimeConfig, createSlotPlacementRequest, createStaticPlacementContentLookupProvider, createStaticPlacementResolver, createStaticProviders, createStrictLocalRuntimeConfig, createTreatmentInteraction, currentBrowserRoute, customerPaths, decideDeleteProtection, defaultRenderForQuery, defineUiPathResolvers, deriveB2BEvent, deriveBillingAllocationKey, deriveBillingOccurrenceKey, deriveBillingOutputKey, deriveBillingRevisionKey, deriveLocalTrialStatusFromInstance, derivePlacementPersonalizationTokens, deriveReverseTrialGrants, dispatchCtaClick, entitlementPaths, entitlementResultDenies, environmentPaths, evaluateSegments, evaluateTrialStatus, eventPaths, experimentPaths, fallbackAccountId, filterExternalSchemas, filterPersistedSchemas, findActiveTrialInstance, findLatestStartedTrialInstance, formatCurrencyMinorUnits, getDefaultCtaResolverRegistry, getDefaultRegistry, getFieldClassification, getFieldVisibility, getObjectFieldClassifications, getObjectFieldVisibilities, getSchemaClassification, getSchemaDeprecation, getSchemaExposure, getSchemaFacets, getSchemaIdentity, getSchemaPersistence, initRevTurbine, initStatusForError, isAnalyticsDateRangeFilterValue, isBrowser, isEvidencedAccountCreation, isExperimentAssignmentFactDeclaration, isFallbackAccountId, isIdentifierLikeSegment, isLegacyDateRangeArray, isRetryableEvidenceReason, isServer, isVersionedConfigEntity, jsonPlainViolation, liftTrackEventToSegmentInput, loadTheme, makeAnchor, mergeTheme, mintedIdentity, namedIdentity, namespacePlatformCollision, normalizeConfigArtifactOrThrow, normalizeLegacyConfig, normalizeSlotRoute, parsePlaybook, parsePromotion, parseUiPath, placementPaths, planPaths, playbookVersionPaths, projectClientSafe, promotionPaths, registerBuiltinSlotTypes, registerBuiltinSnoozeResolver, registerCtaResolver, registerServerActionResolvers, remediationFor, requireSchemaFacets, resetDefaultCtaResolverRegistry, resetDefaultRegistry, resetPlaybookAliasWarning, resolveBillingAccountMapping, resolveBranding, resolveBrowserPublicKey, resolveComponentType, resolveContent, resolveLocalPlaybook, resolvePayloadForUser, resolvePayloadForUserWithProvider, resolvePersistentStorage, resolvePlaybookResolver, resolvePrimaryContact, resolveProviderPlaybook, resolveSessionStorage, resolveSubscriptionEvidence, resolveTokens, routePatternFromParams, schemaDeprecation, schemaFacets, scopesSubsetOfRole, searchAgentCatalog, segmentPaths, settingsPaths, summarizeInvoicePaymentAllocations, summarizeProtectedSubscriptions, tenantPaths, toCreateSchema, toWritableSchema, trialPaths, uiPreferencePaths, unavailableEvidence, unregisterCtaResolver, useAddons, useCan, useEntitlement, useGatedAction, usePlacement, usePlacementPersonalization, usePlans, useResolvedColorScheme, useRevTurbine, useRevTurbineTheme, useRevTurbineThemeProviderPresent, useSlotRoute, useSurfaceSlot, useTelemetryProps, useTelemetryScope, useTrack, useTrackedAction, useUsageSnapshot, userContextPaths, validateAnalyticsQuery, validateAnalyticsView, validateB2BTrack, validateBillingProfileForEvent, validateEventPayload, validatePlacementThresholdWarnings };
42047
+ export type { AccessGateCheck, AccessGateSurfaceSlotProps, AccountCreationClassification, AccountCreationEvidence, AccountCreationEvidenceKind, AccountCreationFacts, AccountCreationPendingReason, AccountCreationSource, AccountPrimaryContactBinding, ActionErrorCategory, ActivityLevel, AdapterBaseOptions, AddOn, AddOnVariation, AgentConnectorSlotProps as AgentConnectorComponentProps, AgentConnectorSlotProps, Alert, AnalysisProvenance, AnalyticsAgentCatalogEntry, AnalyticsAgentCatalogEntryKind, AnalyticsAnalyticalUnit, AnalyticsAnnotation, AnalyticsAnnotationKind, AnalyticsAnnotationMarker, AnalyticsAnnotationRequest, AnalyticsAnnotationResponse, AnalyticsAnnotationSource, AnalyticsBlockError, AnalyticsBlockResult, AnalyticsCardinalityClass, AnalyticsCatalog, AnalyticsCatalogAnnotationKind, AnalyticsCatalogConcept, AnalyticsCatalogData, AnalyticsCatalogDeprecation, AnalyticsCatalogDimension, AnalyticsCatalogMetric, AnalyticsCatalogMetricValidated, AnalyticsCatalogProvenance, AnalyticsCatalogProvenanceKind, AnalyticsCatalogSearchResult, AnalyticsCatalogSource, AnalyticsCatalogView, AnalyticsClassification, AnalyticsCompareDelta, AnalyticsCompareExperiment, AnalyticsCompareMode, AnalyticsCompareSegment, AnalyticsCompileOutput, AnalyticsCompileResolution, AnalyticsCoverage, AnalyticsCustomizationCapability, AnalyticsCustomizationPolicy, AnalyticsDateRangeFilterValue, AnalyticsDimensionCapability, AnalyticsDimensionType, AnalyticsEventHandler, AnalyticsEventProperties, AnalyticsEventTransformer, AnalyticsFieldType, AnalyticsFilterControl, AnalyticsFilterOperator, AnalyticsFilterState, AnalyticsFilterValue, AnalyticsFormatSpec, AnalyticsHistoricalMode, AnalyticsMetricAggregationSemantics, AnalyticsMetricDirection, AnalyticsMetricStatisticalType, AnalyticsPeriodCompareMode, AnalyticsProviderOptions, AnalyticsQueryFamily, AnalyticsQueryOverrides, AnalyticsQueryRequest, AnalyticsQueryResponse, AnalyticsRenderCartesian, AnalyticsRenderFunnel, AnalyticsRenderMetric, AnalyticsRenderRecommendations, AnalyticsRenderSpec, AnalyticsRenderTable, AnalyticsRenderTimeline, AnalyticsResult, AnalyticsResultField, AnalyticsResultMeta, AnalyticsSafeChartOptions, AnalyticsSavedView, AnalyticsSemanticFilter, AnalyticsSemanticId, AnalyticsSourceScope, AnalyticsSuggestedPatchOp, AnalyticsTemplateSummary, AnalyticsTimeGrain, AnalyticsValidationCode, AnalyticsValidationIssue, AnalyticsValidationResult, AnalyticsView, AnalyticsViewAccess, AnalyticsViewAccessRole, AnalyticsViewBlock, AnalyticsViewBlockDraft, AnalyticsViewDraft, AnalyticsViewFilter, AnalyticsViewFilterDraft, AnalyticsViewHandoff, AnalyticsViewHandoffDraft, AnalyticsViewLayout, AnalyticsViewQuery, AnalyticsViewRevision, AnalyticsViewVisibility, AnalyticsWarning, AnyDomainProvider, AssignmentFactUnit, AuditActorType, AuditEvent, AuthAccount, AuthApiKey, AuthInvitation, AuthMember, AuthOrganization, AuthPasskey, AuthSession, AuthSsoProvider, AuthTwoFactor, AuthUser, AuthVerification, B2BCanonicalClass, B2BDerivation, B2BMappingReport, B2BSegmentEventName, B2BSourceMapping, B2BValidation, BannerSlotProps as BannerComponentProps, BannerFrameProps, BannerSlotProps, BannerSurfaceProps, BasicBucketerExperiment, BasicBucketerOptions, BillingAccountMappingResolution, BillingAccountMappingRevision, BillingAccountingRevision, BillingAllocation, BillingBalanceProfile, BillingCadence, BillingCompletedGenerationCheckpoint, BillingCoverageCheckpoint, BillingCoverageGap, BillingCoverageGapRange, BillingCoverageGapReason, BillingCoverageUnavailableReason, BillingCreditNoteLine, BillingCreditProfile, BillingCreditSettlement, BillingEconomicOwner, BillingGeneration, BillingGenerationCheckpoint, BillingHealthStatus, BillingInvoicePaymentSource, BillingInvoiceProfile, BillingLossProfile, BillingOccurrence, BillingOpeningSeed, BillingOutputKeyInput, BillingOutputKind, BillingOutputRowKey, BillingPriceTerms, BillingPriceTier, BillingProfile, BillingProfileBinding, BillingProfileName, BillingReconciliation, BillingRecurrence, BillingRecurringPrice, BillingRefundProfile, BillingRepeatableOccurrence, BillingScheduleProfile, BillingSettlementAmount, BillingSourceScope, BillingSubscriptionItemSnapshot, BillingSubscriptionProfile, BillingTransactionProfile, BrandingConfig, BrandingResolutionInput, BrandingSource, BrowserRuntimeOptions, ButtonSlotProps as ButtonComponentProps, ButtonSlotProps, ButtonSurfaceProps, CanonicalAliasEvent, CanonicalAnalyticsEvent, CanonicalExperimentAllocation, CanonicalGroupEvent, CanonicalIdentifyEvent, CanonicalPageEvent, CanonicalScreenEvent, CanonicalSegmentContext, CanonicalTrackEvent, CapEnforcementResult, CapPeriod, ChangeListener, ChangeLogAction, ChangeLogEntry, CliSlotProps as CliComponentProps, CliSlotProps, ClientContext, CohortMonth, CompactCircularGaugeProps, CompileAnalyticsDraftOptions, ComponentType, CompositeExperimentProviderOptions, ConfigArtifact, ConfigTargetDefaults, ContentPayloadSegmentEntry, ContentPlacementPayload, ContentPromotion, ContentProvider, ContentProviderState, ContentUiPath, ControlPlaneEmitInput, ControlPlaneEventSource, ControlPlaneEventType, ControlPlaneSemanticEvent, CreditBalanceSlotProps as CreditBalanceComponentProps, CreditBalanceSlotProps, CtaActionType, CtaHandler, CtaHandlerMap, CtaHandlerProvider, CtaHandlerProviderState, CtaObject, CtaPath, CtaPathType, CtaResolver, CtaResolverContext, Currency, Customer, CustomerBuiltinDimensions, CustomerOverride, CustomerOverrideDuration, CustomerOverrideStatus, CustomerOverrideType, CustomerSettableBuiltinDimensionKey, DataClassificationValue, DecisionEngineOptions, DefaultTemplateIds, DeleteProtectionDecision, DeriveTrialStatusInput, DetectorRequirements, DimensionCategory, DimensionSourceType, DiscountType, DomainProvider, DomainProviderName, DomainProviderResolutionInput, DriftReport, EffectiveUserContextResolution, EligibleAddon, EligiblePlan, EligiblePrice, EmittablePlatformEventName, EnforcementAction, EnforcementMode, EngagementAreaProps, Entitlement, EntitlementCheckResult$1 as EntitlementCheckResult, EntitlementGateOptions, EntitlementGateState, EntitlementGrant$1 as EntitlementGrant, EntitlementGrantSet$1 as EntitlementGrantSet, EntitlementGrantSource, EntitlementGrantStatus, EntitlementProvider, EntitlementProviderState, EntitlementResult, EntitlementRule, EntitlementRulePeriodUnit, EntitlementRuleSnapshot, EntitlementRuleTarget, EntitlementRuleTargetKind$1 as EntitlementRuleTargetKind, EntitlementRuleValidated, EntitlementRuleVariant, EntitlementStatus, EntitlementType, EntitlementUsageEntry, Environment, EnvironmentPromotionRequest, EnvironmentStatus, EvaluateTrialStatusInput, EvaluateTrialStatusResult, EvaluationContext, EventConsumer, EventConsumerProvider, EventConsumerProviderState, EventEnvelope, EventEnvelopeReader, EventIngestBatch, EventPayloadContract, EventPayloadContractMap, EventPayloadInput, EventPrefixFamily, EventSearchParams, EventSource, EventStability, EventSurface, EventTaxonomy, EventTaxonomyEntry, EvidenceCoverageState, EvidenceReasonColumn, EvidenceRequirement, Exact, ExactInitOptions, Experiment, ExperimentAnalysisConfig, ExperimentAnalysisDefinition, ExperimentAnalysisResult, ExperimentAnalysisResultRecord, ExperimentAssignmentFact, ExperimentAssignmentFactDeclaration, ExperimentAssignmentFactMetadataCarrier, ExperimentAssignmentProvider, ExperimentAssignmentSource, ExperimentDecisionFindingCode, ExperimentDecisionPolicy, ExperimentDecisionRecord, ExperimentDecisionType, ExperimentEvidence, ExperimentEvidenceSnapshot, ExperimentHealth, ExperimentMetricEvidencePlan, ExperimentMetricResult, ExperimentProvider, ExperimentProviderState, ExperimentStatus, ExperimentType, ExperimentVariant, ExperimentVariantNonAssignmentReason, ExperimentVariantSelection, ExperimentVariantTarget, Playbook as ExportedConfig, ExportedConfigPlacementItem, ExportedConfigProvider, ExportedConfigSegmentsItem, ExportedConfigSegmentsItemPredicatesItem, ExportedConfigUiPathActionType, FeatureFlag, FeatureFlagValue, FeatureGateTriggerPayload, FieldDefinition, FixedSurfaceSlotProps, FlagValueType, FreeTrialRule, FreeTrialSettings, FullPageSlotProps as FullPageComponentProps, FullPageSlotProps, FunnelStep, AccessGateSurfaceSlotProps as GateProps, GatedAction, GrowthSignalBundle, GrowthSignalPoint, GrowthSignalSeries, IdentifyContextInput, Identity, IdentityDeclaration, InPageSlotProps as InPageComponentProps, InPageSlotProps, InPageSurfaceProps, IngestWriteScope, IngestedEvent, InitFailureDiagnosticProps, InlineCardPlacementProps, InlineEmbedSlotProps as InlineEmbedComponentProps, InlineEmbedSlotProps, InteractionState, InvitationStatus, InvoicePaymentAllocationSummary, InvoicePaymentStatus, InvoiceReceivableTransition, InvoiceSettlementBasis, InvoiceStatus, JsonObject, JsonValue, KpiAggregate, LegacyConfigTargetDefaults, LocalPlacementDataset, LocalPlacementEntry, LocalPlacementPayload, LocalPlacementSurface, LocalizedText, McpConfig, McpTokenScope, Message, MessageBlock, MessageBlockContent, MessageBlockRecord, MessageBlockSnapshot, MessageSurfaceSlotProps, MessageSurfaceSlotRef, MessageTriggerType, MeteringConfig, ModalSlotProps as ModalComponentProps, ModalFrameProps, ModalLayout, ModalSlotProps, ModalSurfaceProps, NativeExperimentAssignmentOptions, NativeExperimentAssignmentUnit, Objective, ObservationMaturity, OnboardingChecklist, OnboardingState, OpportunityCandidate, OpportunityEvidence, OpportunityInterpretation, OptimizationSuggestion, OrgMemberRole, PaginationParams, PaymentTriggerPayload, Permission, PermissionAction, PermissionResource, PersonalizationContext, PersonalizationToken, PlacementCapPolicy, PlacementCapRule, PlacementCategory, PlacementContentFields, PlacementContentLookupProvider, PlacementControllerOptions, PlacementControllerState, PlacementCustomCode, PlacementDecisionInspectorProps, PlacementDecisionOutput, PlacementEmittedThresholdLookup, PlacementOutput, PlacementPayload, PlacementPayloadSnapshot, PlacementPerformanceRow, PlacementPreviewConfig, PlacementPromotion, PlacementProps, PlacementRendererProps, PlacementSettings, PlacementSettingsCapRule, PlacementSettingsCapRuleGroupItem, PlacementSettingsCapState, PlacementSlotProps, PlacementSlotType, PlacementTestMode, PlacementTestUser, PlacementTestUserIdentifierType, PlacementUiPath, PlacementUiPathActionType, PlacementWarning, PlacementWarningCode, Plan, PlanProvider, PlanProviderState, PlanRuleSnapshot, PlanVariation, PlanVisibility, PlatformEventName, Playbook, PlaybookBody, PlaybookHeader, PlaybookObject, PlaybookPlacementItem, PlaybookProvider, PlaybookSegmentsItem, PlaybookSegmentsItemPredicatesItem, PlaybookStrict, PlaybookUiPathActionType, PlaybookVersion, PlaybookVersionDeployResult, PlaybookVersionDiff, PlaybookVersionEntrySummary, PlaybookVersionStatus, PostHogAnalyticsProviderOptions, PostHogIntegrationOptions, PostHogLike, PresentationCapState, PresentationOutcome, PriceSource, PricingModel, PrimaryContactDesignation, PrimaryContactEnrichmentResult, PrimaryContactResolution, PrimaryContactScope, PrimaryContactUnresolvedReason, Promotion, PromotionStatus, ProviderAvailability, ProviderBindingRef, ProviderCapability, ProviderConnection, ProviderProvenance, QuotaMeterSlotProps as QuotaMeterComponentProps, QuotaMeterFrameProps, QuotaMeterSlotProps, SurfaceSlotComponentProps as RTSlotProps, RecognizedIdentifyKey, RecognizedUpdateKey, RegisterPlacementSlotTypeOptions, ResolvedBranding, ResolvedContent, ResolvedDomainType, ResolvedPayload, ResolvedProviderContext, RevTurbineApiClient, RevTurbineApiClientConfig, paths as RevTurbineApiPaths, RevTurbineAuthoredSlotRef, RevTurbineBootstrapDecisionInput, RevTurbineChainedPlacementRequestOptions, RevTurbineClientSessionProvider, RevTurbineColorScheme, RevTurbineComponentType, Playbook as RevTurbineConfig, RevTurbineConfigAddonVariationsItem, RevTurbineConfigAddonsItem, RevTurbineConfigEnforcementDefaultsItem, RevTurbineConfigEntitlementRulesItem, RevTurbineConfigEntitlementsItem, RevTurbineConfigMeterBindingsItem, RevTurbineConfigObjectivesItem, RevTurbineConfigPeriodCap, RevTurbineConfigPersonalizationTokensItem, RevTurbineConfigPlacementCategory, RevTurbineConfigPlacementItem, RevTurbineConfigPlacementPayloadItem, RevTurbineConfigPlacementSettingsItem, RevTurbineConfigPlacementSlotsItem, RevTurbineConfigPlacementTrigger, RevTurbineConfigPlanVariationsItem, RevTurbineConfigPlansItem, RevTurbineConfigProvider, RevTurbineConfigProviderInput, RevTurbineConfigSeatTypesItem, RevTurbineConfigSegmentDimensionsItem, RevTurbineConfigSegmentsItem, RevTurbineConfigSegmentsItemPredicatesItem, RevTurbineConfigSlotConfigsItem, RevTurbineConfigStudioCtaConfig, RevTurbineConfigStudioPayload, RevTurbineConfigStudioPayloadCaps, RevTurbineConfigStudioPayloadSurface, RevTurbineConfigStudioPayloadTarget, RevTurbineConfigSurfaceTemplatesItem, RevTurbineConfigSurfaceTemplatesItemFieldsItem, RevTurbineConfigUiPathActionType, RevTurbineContextMode, RevTurbineContextPolicy, RevTurbineDecisionContent, RevTurbineEndpointOverrides, RevTurbineEntitlementContext, RevTurbineEntitlementPlacementRequestOptions, RevTurbineEntitlementRuleEvaluation, RevTurbineEventBatchingOptions, RevTurbineEventEnvelope, RevTurbineEventOptions, RevTurbineGateResult, RevTurbineImpressionMetadata, RevTurbineInitBaseOptions, RevTurbineInitInputOptions, RevTurbineInitOptions, RevTurbineInitOptionsStrict, RevTurbineInitPhase, RevTurbineInitStatus, RevTurbineInitWithProviderOptions, RevTurbineLocalOnlyMinimalInitOptions, RevTurbineLocalRuntimeData, RevTurbineLocalRuntimeOptions, RevTurbineLocalRuntimeResolvers, RevTurbineMeterUsageOverride, RevTurbinePageContext, RevTurbinePersonalizationTokens, RevTurbinePlacementBehaviorFlags, RevTurbinePlacementConfig, RevTurbinePlacementContent, RevTurbinePlacementDecision, RevTurbinePlacementDecisionExplanation, RevTurbinePlacementDecisionInput, RevTurbinePlacementDecisionOverrides, RevTurbinePlacementPayloadEvaluation, RevTurbinePlacementRecord, RevTurbinePlacementRequestConfig, RevTurbinePlacementRuleEvaluation, RevTurbinePlacementTypeEntity, RevTurbinePlaybookLoadState, RevTurbinePolicySnapshot, RevTurbineProviderFactory, RevTurbineProviderFailureSlotBehavior, RevTurbineProviderProps, RevTurbineRegisteredSlot, RevTurbineRequiredUiPathResolvers, RevTurbineRouteProps, RevTurbineRuntimeMode, RevTurbineSdkMode, RevTurbineSdkProvider, RevTurbineSegmentEvaluation, RevTurbineSegmentPredicateEvaluation, RevTurbineSemanticEvent, RevTurbineServerOptions, RevTurbineSlotInventoryDiagnosis, RevTurbineSlotPlacementRequestOptions, RevTurbineStorage, RevTurbineSurfaceSlotConfig, RevTurbineSurfaceType, RevTurbineTargeting, RevTurbineTelemetryOptions, RevTurbineTheme, RevTurbineThemeColors, RevTurbineThemeInput, RevTurbineThemeShadows, RevTurbineThemeShape, RevTurbineThemeTypography, RevTurbineTreatmentInteractionInput, RevTurbineTreatmentInteractionOptions, RevTurbineTreatmentInteractionType, RevTurbineTrialContext, RevTurbineTriggerEvent, RevTurbineTriggerPayload, RevTurbineUiPathActionTypes, RevTurbineUiPathResolver, RevTurbineUiPathResolverMap, RevTurbineUiPathResolverValidationIssue, RevTurbineUiPathResolverValidationOptions, RevTurbineUiPathResolverValidationReport, RevTurbineUpdateInput, RevTurbineUsageSnapshot, RevTurbineUsageSnapshotEntry, RevTurbineUserContext, RevenueMetric, ReverseTrialRule, ReverseTrialSettings, ReverseTrialStartPolicy, RevturbineB2BTrackEvent, RevturbineCanonicalEventContext, RevturbineEventContext, RevturbineIdentitySource, RevturbineProducerAliasEvent, RevturbineProducerEvent, RevturbineProducerEventContext, RevturbineProducerGroupEvent, RevturbineProducerIdentifyEvent, RevturbineProducerPageEvent, RevturbineProducerScreenEvent, RevturbineProducerSegmentContext, RevturbineProducerTrackEvent, Role, RuleProvider, RuleProviderState, RuleVisibility, RuntimePromotionSnapshot, SchemaDeprecation, SchemaFacetOptions, SchemaFacets, SdkConfigShape, SdkEventProperties, SdkMetaEvent, SdkMetaEventType, SdkMetaIngestBatch, SdkMetadata, SdkSessionOptions, SdkTraits, SeatType, Segment, SegmentAliasInput, SegmentB2BTrackEvent, SegmentDimension, SegmentEventContext, SegmentEventInput, SegmentEventMethod, SegmentGroupInput, SegmentIdentifyInput, SegmentIngestBatch, SegmentLibraryContext, SegmentPageContext, SegmentPageInput, SegmentProvider, SegmentProviderState, SegmentScreenInput, SegmentTrackInput, SegmentValue, SemanticEvent, ServerActionContext, ServerActionHandler, ServerActionMap, ServerActionResult, ServerBuiltinDimensionsWrite, ServerEntitlementResult, ServerEvaluationHydrationPayload, ServerEvaluationPayload, ServerEvaluationPayloadDecisionsItem, ServerEvaluationPayloadEntitlementsValue, ServerEvaluationPayloadTrialStatus, ServerEvaluationPayloadUser, ServerEvaluationPayloadUserContext, ServerEvaluationRequest, ServerPlacementDecision, ServerPlacementRequest, ServerUserBuiltinDimensions, ServerUserContext, ServerUserContextAssignment, ServerUserContextSnapshot, ServerUserContextUpsert, Severity, SurfaceSlotComponentProps as SlotProps, SlotRouteParams, StaticPlacementResolverOptions, StripeBillingScope, StripeIntegrationConfig, StripePrice, StripePriceBillingPeriod, StripePriceMock, StripePriceMockBillingPeriod, StripePriceScope, StripeSubscriptionEvidence, StripeSubscriptionItem, StripeSubscriptionStatus, StudioSurfaceType, SubscriptionEvidenceKnown, SubscriptionEvidenceResult, SubscriptionEvidenceUnavailable, SubscriptionEvidenceUnavailableReason, SubscriptionProtection, SuggestionSeverity, SupersessionReason, SupersessionRecord, SuppressionResult, SurfaceSlot, SurfaceSlotCategory, SurfaceSlotComponentProps, SurfaceSlotStatus, SurfaceTemplate, SurfaceType, SurfaceTypeCapRule, TelemetryConsent, TelemetryScopeProps, TelemetryScopeValue, TemplateFieldType, Tenant, TenantConfig, TenantStatus, Theme, ThemeLoaderOptions, ThemeProvider, ThemeProviderState, ToastSlotProps as ToastComponentProps, ToastSlotProps, ToastSurfaceProps, TooltipSlotProps as TooltipComponentProps, TooltipSlotProps, TrackEvent, TrackEventLiftResult, TrackFn, TrackIngestBatch, TrackIngestBodyClassification, TrackOnViewProps, TrackOptions, TrackProps, TrackPurpose, TrackedAction, Trait, TraitsNamespace, TraitsProvider, TraitsProviderState, TreatmentInteractionBatch, TreatmentInteractionInput, TreatmentInteractionRequest, TreatmentInteractionType, TrendFeatures, TrialCommitment$1 as TrialCommitment, TrialEligibilityScope, TrialEpisodeFacts$1 as TrialEpisodeFacts, TrialEvidence$1 as TrialEvidence, TrialEvidenceKind$1 as TrialEvidenceKind, TrialInstance, TrialLimitPolicy, TrialPendingUnknownReason, TrialRevisionClassification, TrialRevisionKind, TrialRevisionPending, TrialRevisionResolved, TrialStatus, TrialStatusProvider, TrialStatusTraits, TrialTriggerPayload, TriggerEventType, UiPreference, UnvalidatedConfigArtifact, UsageAllocation, UsageBalances, UsageEnforcementSettings, UsagePeriodScope, UsageTraits, UsageTraitsProvider, UsageTriggerPayload, UseAddonsResult, UseCanResult, UseEntitlementOptions, UseEntitlementResult, UsePlacementOptions, UsePlacementPersonalizationOptions, UsePlacementResult, UsePlansResult, UseSurfaceSlotOptions, UseSurfaceSlotResult, UseUsageSnapshotResult, UserBuiltinDimensions, UserContext, UserContextInput, UserInstanceContext, UserPlanContext, UserProfileProps, UserRole, UserTargetingContext, UserTrialStatus, UserUsageEntry, ValidateAnalyticsViewOptions, VariantStatisticalSummary, WarGameCapabilityRequirements, WarGameCategory, WarGameGrade, WarGameOracle, WarGameQualificationLevel, WarGameScenario, WebhookDelivery, WebhookDispatchStatus, WebhookEventLog, WebhookEventSource, WebhookEventStatus, WebhookProcessingStatus, WebhookReplayEnvelope };