@revturbine/sdk 0.2.79 → 0.2.81

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.
@@ -12058,6 +12058,20 @@ interface RevTurbineInitOptions {
12058
12058
  * when no explicit {@link branding} and no legacy config-embedded theme apply.
12059
12059
  */
12060
12060
  apiBranding?: BrandingConfig;
12061
+ /**
12062
+ * Fetch the tenant's theme overrides from the control plane's
12063
+ * `GET /api/sdk/theme` and apply them OVER the launched Playbook's theme
12064
+ * (plan 184).
12065
+ *
12066
+ * Opt-in and `false` by default, deliberately: the SDK otherwise issues no
12067
+ * theme request at all, so an integration with no branding configured never
12068
+ * pays a round-trip — and never logs a failed one. Enable it when branding is
12069
+ * managed from the RevTurbine dashboard and should change without a redeploy.
12070
+ *
12071
+ * Independent of {@link apiBranding}, which is the same rung supplied by the
12072
+ * host instead of fetched by the SDK.
12073
+ */
12074
+ fetchThemeOverride?: boolean;
12061
12075
  }
12062
12076
  /** Base init options shared by all runtime mode helper builders. */
12063
12077
  type RevTurbineInitBaseOptions = Omit<RevTurbineInitOptions, 'runtimeMode' | 'endpointOverrides' | 'localRuntime'>;
@@ -12833,6 +12847,8 @@ declare class RevTurbineCustomerSdk {
12833
12847
  * session so a render loop can never flood the channel.
12834
12848
  */
12835
12849
  private readonly emittedResolutionDiagnostics;
12850
+ /** Session dedup for {@link reportSdkError}, keyed by `reason`. */
12851
+ private readonly emittedSdkErrors;
12836
12852
  private static readonly RESOLUTION_DIAGNOSTIC_SESSION_CAP;
12837
12853
  /**
12838
12854
  * Gate for `resolution_failure` diagnostics (plan 144 TASK-21). Honors BOTH
@@ -12854,6 +12870,25 @@ declare class RevTurbineCustomerSdk {
12854
12870
  * `(reason, primary handle)` for the session and capped.
12855
12871
  */
12856
12872
  private emitResolutionFailure;
12873
+ /**
12874
+ * Report that the SDK itself failed (plan 182 TASK-5).
12875
+ *
12876
+ * `sdk_error` was declared in the meta taxonomy with no emitter. This is the
12877
+ * "the SDK malfunctioned" signal — distinct from `resolution_failure`, which
12878
+ * means a *decision* produced nothing. It rides the same anonymous
12879
+ * `events_sdk_meta` lane: no tenant, no user, no placement identity.
12880
+ *
12881
+ * Deduped on `reason` for the session and capped, mirroring
12882
+ * {@link emitResolutionFailure} — an SDK failing inside a render loop must
12883
+ * not become a telemetry flood. Best-effort and never throwing: this is
12884
+ * called from `catch` blocks, so it must not manufacture a second failure.
12885
+ *
12886
+ * @param reason Stable, categorical cause (e.g. `provider_init_failed`) —
12887
+ * what dashboards group by.
12888
+ * @param message Human-readable detail for triage, sent on the same footing
12889
+ * as `sdk_validation_warning`'s message, which already ships on this lane.
12890
+ */
12891
+ reportSdkError(reason: string, message?: string): void;
12857
12892
  /** Fire the one anonymous `sdk_init` adoption beacon at startup. */
12858
12893
  private emitSdkInitTelemetry;
12859
12894
  /**
@@ -21120,6 +21155,12 @@ interface ThemeLoaderOptions {
21120
21155
  apiKey: string;
21121
21156
  /** Optional storage provider. Falls back to localStorage in browser, in-memory on server. */
21122
21157
  storage?: RevTurbineStorage;
21158
+ /**
21159
+ * The launched Playbook's theme, used as the BASE that fetched overrides
21160
+ * merge over (plan 184). Supplying it means a partial override from the
21161
+ * control plane refines the Playbook's theme instead of replacing it.
21162
+ */
21163
+ base?: RevTurbineThemeInput;
21123
21164
  }
21124
21165
  /**
21125
21166
  * Load the tenant's theme: