@revturbine/sdk 0.2.76 → 0.2.78
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 +31 -2
- package/dist/headless.js +1 -1
- package/dist/headless.js.map +1 -1
- package/dist/index.d.ts +31 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/web-sdk/browser-runtime.d.ts +1 -1
- package/dist/types/web-sdk/controllers.d.ts +31 -2
- package/dist/types/web-sdk/controllers.d.ts.map +1 -1
- package/dist/types/web-sdk/headless.d.ts +2 -2
- package/dist/types/web-sdk/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/headless.d.ts
CHANGED
|
@@ -13492,7 +13492,7 @@ type RevTurbineThemeInput = {
|
|
|
13492
13492
|
*
|
|
13493
13493
|
* @example
|
|
13494
13494
|
* ```ts
|
|
13495
|
-
* import { initRevTurbine, PlacementController, EntitlementGate } from '@
|
|
13495
|
+
* import { initRevTurbine, PlacementController, EntitlementGate } from '@revturbine/sdk/headless';
|
|
13496
13496
|
*
|
|
13497
13497
|
* const session = await initRevTurbine({
|
|
13498
13498
|
* tenantId: 'tenant_abc',
|
|
@@ -13882,6 +13882,14 @@ declare class SdkSession {
|
|
|
13882
13882
|
getUserContext(): ReturnType<RevTurbineCustomerSdk['getUserContext']>;
|
|
13883
13883
|
/** Update usage balances (e.g. after a meter event). */
|
|
13884
13884
|
updateUsage(balances: UsageBalances): void;
|
|
13885
|
+
/**
|
|
13886
|
+
* Patch the session-scoped user context — the whole-context-minus-`id`
|
|
13887
|
+
* upsert (`update({ plan: {...} })`, `update({ usage: {...} })`, …).
|
|
13888
|
+
* Alias of the SDK's `update()`, promoted onto the session facade so the
|
|
13889
|
+
* documented `session.update()` verb is real (plan 179 Q-1/Q-3 ruling).
|
|
13890
|
+
* Unrecognized keys dev-warn and drop, exactly as on the SDK.
|
|
13891
|
+
*/
|
|
13892
|
+
update(patch: RevTurbineUpdateInput): void;
|
|
13885
13893
|
/** Fetch full user context from the server (server runtime mode). */
|
|
13886
13894
|
fetchUserContext(userId: string): Promise<UserTargetingContext>;
|
|
13887
13895
|
/** Get the current trial status. */
|
|
@@ -13927,8 +13935,29 @@ declare class SdkSession {
|
|
|
13927
13935
|
* prefer {@link entitlement} which returns a full controller.
|
|
13928
13936
|
*/
|
|
13929
13937
|
checkEntitlement(handle: string, context?: RevTurbineEntitlementContext): Promise<EntitlementResult>;
|
|
13938
|
+
/**
|
|
13939
|
+
* The entitlement check as a `can` question — alias of
|
|
13940
|
+
* {@link checkEntitlement}, promoted onto the session facade so
|
|
13941
|
+
* `session.can('batch_export')` works without the `session.sdk` escape
|
|
13942
|
+
* hatch (plan 179 Q-1/Q-3 ruling). Read `.allowed` for the verdict; an
|
|
13943
|
+
* at-cap blocked limit resolves `limited` + `allowed: false`.
|
|
13944
|
+
*/
|
|
13945
|
+
can(handle: string, context?: RevTurbineEntitlementContext): Promise<EntitlementResult>;
|
|
13930
13946
|
/** Track a custom event. */
|
|
13931
13947
|
trackEvent(name: string, data?: Record<string, JsonObject[string]>): Promise<void>;
|
|
13948
|
+
/**
|
|
13949
|
+
* Track an event — the advertised alias of {@link trackEvent}, first-class
|
|
13950
|
+
* on the session facade so headless code carries the full telemetry surface
|
|
13951
|
+
* (plan 179 ruling, Kent 2026-08-13). Powers analytics, frequency caps,
|
|
13952
|
+
* attribution, and experiments.
|
|
13953
|
+
*/
|
|
13954
|
+
track(name: string, data?: Record<string, JsonObject[string]>): Promise<void>;
|
|
13955
|
+
/**
|
|
13956
|
+
* Flush buffered events immediately. Headless processes are often
|
|
13957
|
+
* short-lived (scripts, jobs, edge handlers) — call this before exit so
|
|
13958
|
+
* buffered `track()` events aren't lost with the process.
|
|
13959
|
+
*/
|
|
13960
|
+
flushEvents(): Promise<void>;
|
|
13932
13961
|
}
|
|
13933
13962
|
/**
|
|
13934
13963
|
* Create a fully-initialized SDK session.
|
|
@@ -20665,7 +20694,7 @@ declare class ApiError extends Error {
|
|
|
20665
20694
|
*
|
|
20666
20695
|
* @example
|
|
20667
20696
|
* ```ts
|
|
20668
|
-
* import { BrowserRuntime } from '@
|
|
20697
|
+
* import { BrowserRuntime } from '@revturbine/sdk';
|
|
20669
20698
|
* import { createStaticProviders } from '@revt-eng/core';
|
|
20670
20699
|
*
|
|
20671
20700
|
* const runtime = new BrowserRuntime({
|