@revturbine/sdk 0.2.71 → 0.2.72
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/headless.d.ts +72 -1
- package/dist/headless.js +2 -2
- package/dist/headless.js.map +1 -1
- package/dist/index.d.ts +72 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/web-sdk/customer-side.d.ts +35 -0
- package/dist/types/web-sdk/customer-side.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/headless.d.ts
CHANGED
|
@@ -2150,6 +2150,9 @@ declare const ClientContextSchema: z.ZodObject<{
|
|
|
2150
2150
|
}>>>;
|
|
2151
2151
|
provider_subscription_id: z.ZodOptional<z.ZodString>;
|
|
2152
2152
|
}, z.core.$strip>>;
|
|
2153
|
+
plan: z.ZodOptional<z.ZodObject<{
|
|
2154
|
+
handle: z.ZodOptional<z.ZodString>;
|
|
2155
|
+
}, z.core.$strip>>;
|
|
2153
2156
|
capabilities: z.ZodOptional<z.ZodObject<{
|
|
2154
2157
|
can_upgrade: z.ZodOptional<z.ZodBoolean>;
|
|
2155
2158
|
can_manage_billing: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2993,6 +2996,7 @@ declare const SdkMetaEventTypeSchema: z.ZodEnum<{
|
|
|
2993
2996
|
sdk_init: "sdk_init";
|
|
2994
2997
|
sdk_error: "sdk_error";
|
|
2995
2998
|
sdk_validation_warning: "sdk_validation_warning";
|
|
2999
|
+
resolution_failure: "resolution_failure";
|
|
2996
3000
|
}>;
|
|
2997
3001
|
declare const SdkConfigShapeSchema: z.ZodObject<{
|
|
2998
3002
|
plans: z.ZodNumber;
|
|
@@ -3009,6 +3013,7 @@ declare const SdkMetaEventSchema: z.ZodObject<{
|
|
|
3009
3013
|
sdk_init: "sdk_init";
|
|
3010
3014
|
sdk_error: "sdk_error";
|
|
3011
3015
|
sdk_validation_warning: "sdk_validation_warning";
|
|
3016
|
+
resolution_failure: "resolution_failure";
|
|
3012
3017
|
}>;
|
|
3013
3018
|
occurred_at: z.ZodString;
|
|
3014
3019
|
request_id: z.ZodOptional<z.ZodString>;
|
|
@@ -3028,6 +3033,12 @@ declare const SdkMetaEventSchema: z.ZodObject<{
|
|
|
3028
3033
|
surface_templates: z.ZodNumber;
|
|
3029
3034
|
}, z.core.$strip>>;
|
|
3030
3035
|
message: z.ZodOptional<z.ZodString>;
|
|
3036
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
3037
|
+
placement_handle: z.ZodOptional<z.ZodString>;
|
|
3038
|
+
slot_handle: z.ZodOptional<z.ZodString>;
|
|
3039
|
+
surface: z.ZodOptional<z.ZodString>;
|
|
3040
|
+
plan_handle: z.ZodOptional<z.ZodString>;
|
|
3041
|
+
entitlement_handle: z.ZodOptional<z.ZodString>;
|
|
3031
3042
|
}, z.core.$strip>;
|
|
3032
3043
|
declare const SdkMetaIngestBatchSchema: z.ZodObject<{
|
|
3033
3044
|
events: z.ZodArray<z.ZodObject<{
|
|
@@ -3035,6 +3046,7 @@ declare const SdkMetaIngestBatchSchema: z.ZodObject<{
|
|
|
3035
3046
|
sdk_init: "sdk_init";
|
|
3036
3047
|
sdk_error: "sdk_error";
|
|
3037
3048
|
sdk_validation_warning: "sdk_validation_warning";
|
|
3049
|
+
resolution_failure: "resolution_failure";
|
|
3038
3050
|
}>;
|
|
3039
3051
|
occurred_at: z.ZodString;
|
|
3040
3052
|
request_id: z.ZodOptional<z.ZodString>;
|
|
@@ -3054,6 +3066,12 @@ declare const SdkMetaIngestBatchSchema: z.ZodObject<{
|
|
|
3054
3066
|
surface_templates: z.ZodNumber;
|
|
3055
3067
|
}, z.core.$strip>>;
|
|
3056
3068
|
message: z.ZodOptional<z.ZodString>;
|
|
3069
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
3070
|
+
placement_handle: z.ZodOptional<z.ZodString>;
|
|
3071
|
+
slot_handle: z.ZodOptional<z.ZodString>;
|
|
3072
|
+
surface: z.ZodOptional<z.ZodString>;
|
|
3073
|
+
plan_handle: z.ZodOptional<z.ZodString>;
|
|
3074
|
+
entitlement_handle: z.ZodOptional<z.ZodString>;
|
|
3057
3075
|
}, z.core.$strip>>;
|
|
3058
3076
|
}, z.core.$strip>;
|
|
3059
3077
|
declare const eventPaths: ZodOpenApiPathsObject;
|
|
@@ -12758,6 +12776,33 @@ declare class RevTurbineCustomerSdk {
|
|
|
12758
12776
|
private warnPiiRedactedOnce;
|
|
12759
12777
|
/** True when keyless anonymous telemetry should fire (REQ-4 conditions). */
|
|
12760
12778
|
private anonymousTelemetryActive;
|
|
12779
|
+
/**
|
|
12780
|
+
* Session-scoped dedup for `resolution_failure` diagnostics (plan 144 Q-4
|
|
12781
|
+
* disposition): one emit per `(reason, primary handle)` pair, capped per
|
|
12782
|
+
* session so a render loop can never flood the channel.
|
|
12783
|
+
*/
|
|
12784
|
+
private readonly emittedResolutionDiagnostics;
|
|
12785
|
+
private static readonly RESOLUTION_DIAGNOSTIC_SESSION_CAP;
|
|
12786
|
+
/**
|
|
12787
|
+
* Gate for `resolution_failure` diagnostics (plan 144 TASK-21). Honors BOTH
|
|
12788
|
+
* opt-outs (124 Q-6, decided 2026-08-12): either `anonymousTelemetry: false`
|
|
12789
|
+
* or `analytics: false` silences diagnostics — the most conservative
|
|
12790
|
+
* reading, so no privacy-minded install is surprised by a new emission.
|
|
12791
|
+
* Unlike {@link anonymousTelemetryActive} there is NO keyless requirement:
|
|
12792
|
+
* keyed production installs emit diagnostics too (124 Q-7). `previewMode`
|
|
12793
|
+
* (docs/playground renders) still suppresses, and the channel is
|
|
12794
|
+
* browser-only for now (server-side diagnostics are a named follow-up).
|
|
12795
|
+
*/
|
|
12796
|
+
private diagnosticTelemetryActive;
|
|
12797
|
+
/**
|
|
12798
|
+
* Emit one `resolution_failure` diagnostic (plan 144 TASK-21 — the plan-124
|
|
12799
|
+
* "silent failure" channel): a placement that resolved to the fallback, or
|
|
12800
|
+
* an entitlement denied for infrastructure reasons, becomes observable on
|
|
12801
|
+
* the keyless meta channel. Field values are author-defined handles and
|
|
12802
|
+
* closed reason codes only (TASK-20 allow-list); deduped per
|
|
12803
|
+
* `(reason, primary handle)` for the session and capped.
|
|
12804
|
+
*/
|
|
12805
|
+
private emitResolutionFailure;
|
|
12761
12806
|
/** Fire the one anonymous `sdk_init` adoption beacon at startup. */
|
|
12762
12807
|
private emitSdkInitTelemetry;
|
|
12763
12808
|
/**
|
|
@@ -12771,6 +12816,14 @@ declare class RevTurbineCustomerSdk {
|
|
|
12771
12816
|
* non-throwing. Stamps SDK/schema versions + a one-way hashed config id.
|
|
12772
12817
|
*/
|
|
12773
12818
|
private emitAnonMeta;
|
|
12819
|
+
/**
|
|
12820
|
+
* Ungated build + POST of one allowlisted meta event — the shared tail of
|
|
12821
|
+
* {@link emitAnonMeta} (keyless adoption beacons, which stay gated on
|
|
12822
|
+
* keyless installs) and the `resolution_failure` diagnostics (plan 144
|
|
12823
|
+
* TASK-21), which are deliberately NOT keyless-only — keyed production
|
|
12824
|
+
* installs emit them too (plan 124 Q-7). Callers gate; this never throws.
|
|
12825
|
+
*/
|
|
12826
|
+
private postAnonMeta;
|
|
12774
12827
|
/** One-time info notice that keyless telemetry is active + how to disable it (REQ-8b). */
|
|
12775
12828
|
private showAnonTelemetryNoticeOnce;
|
|
12776
12829
|
private sendEvents;
|
|
@@ -15081,9 +15134,15 @@ interface components {
|
|
|
15081
15134
|
bundle_version?: components["schemas"]["Anon_e17de468dbc9_4"];
|
|
15082
15135
|
config_shape?: components["schemas"]["Anon_a070b8adf29f"];
|
|
15083
15136
|
message?: components["schemas"]["Anon_7e1c99abdd77_2"];
|
|
15137
|
+
reason?: components["schemas"]["Anon_e17de468dbc9_5"];
|
|
15138
|
+
placement_handle?: components["schemas"]["Anon_e17de468dbc9_6"];
|
|
15139
|
+
slot_handle?: components["schemas"]["Anon_e17de468dbc9_7"];
|
|
15140
|
+
surface?: components["schemas"]["Anon_e17de468dbc9_8"];
|
|
15141
|
+
plan_handle?: components["schemas"]["Anon_e17de468dbc9_9"];
|
|
15142
|
+
entitlement_handle?: components["schemas"]["Anon_e17de468dbc9_10"];
|
|
15084
15143
|
};
|
|
15085
15144
|
/** @enum {string} */
|
|
15086
|
-
SdkMetaEventType: "sdk_init" | "sdk_error" | "sdk_validation_warning";
|
|
15145
|
+
SdkMetaEventType: "sdk_init" | "sdk_error" | "sdk_validation_warning" | "resolution_failure";
|
|
15087
15146
|
SdkConfigShape: {
|
|
15088
15147
|
plans: components["schemas"]["Anon_274ba4ca49d5"];
|
|
15089
15148
|
entitlements: components["schemas"]["Anon_274ba4ca49d5_1"];
|
|
@@ -15914,6 +15973,18 @@ interface components {
|
|
|
15914
15973
|
Anon_274ba4ca49d5_7: number;
|
|
15915
15974
|
Anon_7e1c99abdd77_2: components["schemas"]["Anon_373775e26848_4"];
|
|
15916
15975
|
Anon_373775e26848_4: string;
|
|
15976
|
+
Anon_e17de468dbc9_5: components["schemas"]["Anon_520c691f88f7_5"];
|
|
15977
|
+
Anon_520c691f88f7_5: string;
|
|
15978
|
+
Anon_e17de468dbc9_6: components["schemas"]["Anon_520c691f88f7_6"];
|
|
15979
|
+
Anon_520c691f88f7_6: string;
|
|
15980
|
+
Anon_e17de468dbc9_7: components["schemas"]["Anon_520c691f88f7_7"];
|
|
15981
|
+
Anon_520c691f88f7_7: string;
|
|
15982
|
+
Anon_e17de468dbc9_8: components["schemas"]["Anon_520c691f88f7_8"];
|
|
15983
|
+
Anon_520c691f88f7_8: string;
|
|
15984
|
+
Anon_e17de468dbc9_9: components["schemas"]["Anon_520c691f88f7_9"];
|
|
15985
|
+
Anon_520c691f88f7_9: string;
|
|
15986
|
+
Anon_e17de468dbc9_10: components["schemas"]["Anon_520c691f88f7_10"];
|
|
15987
|
+
Anon_520c691f88f7_10: string;
|
|
15917
15988
|
Anon_761f976a1da1_2: string;
|
|
15918
15989
|
Anon_57796118d046_19: string;
|
|
15919
15990
|
Anon_4e04ec5cc4e6_4: components["schemas"]["Anon_9ac136edb99a_9"];
|