@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.
package/dist/index.d.ts CHANGED
@@ -12151,6 +12151,20 @@ interface RevTurbineInitOptions {
12151
12151
  * when no explicit {@link branding} and no legacy config-embedded theme apply.
12152
12152
  */
12153
12153
  apiBranding?: BrandingConfig;
12154
+ /**
12155
+ * Fetch the tenant's theme overrides from the control plane's
12156
+ * `GET /api/sdk/theme` and apply them OVER the launched Playbook's theme
12157
+ * (plan 184).
12158
+ *
12159
+ * Opt-in and `false` by default, deliberately: the SDK otherwise issues no
12160
+ * theme request at all, so an integration with no branding configured never
12161
+ * pays a round-trip — and never logs a failed one. Enable it when branding is
12162
+ * managed from the RevTurbine dashboard and should change without a redeploy.
12163
+ *
12164
+ * Independent of {@link apiBranding}, which is the same rung supplied by the
12165
+ * host instead of fetched by the SDK.
12166
+ */
12167
+ fetchThemeOverride?: boolean;
12154
12168
  }
12155
12169
  /** Base init options shared by all runtime mode helper builders. */
12156
12170
  type RevTurbineInitBaseOptions = Omit<RevTurbineInitOptions, 'runtimeMode' | 'endpointOverrides' | 'localRuntime'>;
@@ -12926,6 +12940,8 @@ declare class RevTurbineCustomerSdk {
12926
12940
  * session so a render loop can never flood the channel.
12927
12941
  */
12928
12942
  private readonly emittedResolutionDiagnostics;
12943
+ /** Session dedup for {@link reportSdkError}, keyed by `reason`. */
12944
+ private readonly emittedSdkErrors;
12929
12945
  private static readonly RESOLUTION_DIAGNOSTIC_SESSION_CAP;
12930
12946
  /**
12931
12947
  * Gate for `resolution_failure` diagnostics (plan 144 TASK-21). Honors BOTH
@@ -12947,6 +12963,25 @@ declare class RevTurbineCustomerSdk {
12947
12963
  * `(reason, primary handle)` for the session and capped.
12948
12964
  */
12949
12965
  private emitResolutionFailure;
12966
+ /**
12967
+ * Report that the SDK itself failed (plan 182 TASK-5).
12968
+ *
12969
+ * `sdk_error` was declared in the meta taxonomy with no emitter. This is the
12970
+ * "the SDK malfunctioned" signal — distinct from `resolution_failure`, which
12971
+ * means a *decision* produced nothing. It rides the same anonymous
12972
+ * `events_sdk_meta` lane: no tenant, no user, no placement identity.
12973
+ *
12974
+ * Deduped on `reason` for the session and capped, mirroring
12975
+ * {@link emitResolutionFailure} — an SDK failing inside a render loop must
12976
+ * not become a telemetry flood. Best-effort and never throwing: this is
12977
+ * called from `catch` blocks, so it must not manufacture a second failure.
12978
+ *
12979
+ * @param reason Stable, categorical cause (e.g. `provider_init_failed`) —
12980
+ * what dashboards group by.
12981
+ * @param message Human-readable detail for triage, sent on the same footing
12982
+ * as `sdk_validation_warning`'s message, which already ships on this lane.
12983
+ */
12984
+ reportSdkError(reason: string, message?: string): void;
12950
12985
  /** Fire the one anonymous `sdk_init` adoption beacon at startup. */
12951
12986
  private emitSdkInitTelemetry;
12952
12987
  /**
@@ -21213,6 +21248,12 @@ interface ThemeLoaderOptions {
21213
21248
  apiKey: string;
21214
21249
  /** Optional storage provider. Falls back to localStorage in browser, in-memory on server. */
21215
21250
  storage?: RevTurbineStorage;
21251
+ /**
21252
+ * The launched Playbook's theme, used as the BASE that fetched overrides
21253
+ * merge over (plan 184). Supplying it means a partial override from the
21254
+ * control plane refines the Playbook's theme instead of replacing it.
21255
+ */
21256
+ base?: RevTurbineThemeInput;
21216
21257
  }
21217
21258
  /**
21218
21259
  * Load the tenant's theme: