@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/index.d.ts
CHANGED
|
@@ -13585,7 +13585,7 @@ type RevTurbineThemeInput = {
|
|
|
13585
13585
|
*
|
|
13586
13586
|
* @example
|
|
13587
13587
|
* ```ts
|
|
13588
|
-
* import { initRevTurbine, PlacementController, EntitlementGate } from '@
|
|
13588
|
+
* import { initRevTurbine, PlacementController, EntitlementGate } from '@revturbine/sdk/headless';
|
|
13589
13589
|
*
|
|
13590
13590
|
* const session = await initRevTurbine({
|
|
13591
13591
|
* tenantId: 'tenant_abc',
|
|
@@ -13975,6 +13975,14 @@ declare class SdkSession {
|
|
|
13975
13975
|
getUserContext(): ReturnType<RevTurbineCustomerSdk['getUserContext']>;
|
|
13976
13976
|
/** Update usage balances (e.g. after a meter event). */
|
|
13977
13977
|
updateUsage(balances: UsageBalances): void;
|
|
13978
|
+
/**
|
|
13979
|
+
* Patch the session-scoped user context — the whole-context-minus-`id`
|
|
13980
|
+
* upsert (`update({ plan: {...} })`, `update({ usage: {...} })`, …).
|
|
13981
|
+
* Alias of the SDK's `update()`, promoted onto the session facade so the
|
|
13982
|
+
* documented `session.update()` verb is real (plan 179 Q-1/Q-3 ruling).
|
|
13983
|
+
* Unrecognized keys dev-warn and drop, exactly as on the SDK.
|
|
13984
|
+
*/
|
|
13985
|
+
update(patch: RevTurbineUpdateInput): void;
|
|
13978
13986
|
/** Fetch full user context from the server (server runtime mode). */
|
|
13979
13987
|
fetchUserContext(userId: string): Promise<UserTargetingContext>;
|
|
13980
13988
|
/** Get the current trial status. */
|
|
@@ -14020,8 +14028,29 @@ declare class SdkSession {
|
|
|
14020
14028
|
* prefer {@link entitlement} which returns a full controller.
|
|
14021
14029
|
*/
|
|
14022
14030
|
checkEntitlement(handle: string, context?: RevTurbineEntitlementContext): Promise<EntitlementResult>;
|
|
14031
|
+
/**
|
|
14032
|
+
* The entitlement check as a `can` question — alias of
|
|
14033
|
+
* {@link checkEntitlement}, promoted onto the session facade so
|
|
14034
|
+
* `session.can('batch_export')` works without the `session.sdk` escape
|
|
14035
|
+
* hatch (plan 179 Q-1/Q-3 ruling). Read `.allowed` for the verdict; an
|
|
14036
|
+
* at-cap blocked limit resolves `limited` + `allowed: false`.
|
|
14037
|
+
*/
|
|
14038
|
+
can(handle: string, context?: RevTurbineEntitlementContext): Promise<EntitlementResult>;
|
|
14023
14039
|
/** Track a custom event. */
|
|
14024
14040
|
trackEvent(name: string, data?: Record<string, JsonObject[string]>): Promise<void>;
|
|
14041
|
+
/**
|
|
14042
|
+
* Track an event — the advertised alias of {@link trackEvent}, first-class
|
|
14043
|
+
* on the session facade so headless code carries the full telemetry surface
|
|
14044
|
+
* (plan 179 ruling, Kent 2026-08-13). Powers analytics, frequency caps,
|
|
14045
|
+
* attribution, and experiments.
|
|
14046
|
+
*/
|
|
14047
|
+
track(name: string, data?: Record<string, JsonObject[string]>): Promise<void>;
|
|
14048
|
+
/**
|
|
14049
|
+
* Flush buffered events immediately. Headless processes are often
|
|
14050
|
+
* short-lived (scripts, jobs, edge handlers) — call this before exit so
|
|
14051
|
+
* buffered `track()` events aren't lost with the process.
|
|
14052
|
+
*/
|
|
14053
|
+
flushEvents(): Promise<void>;
|
|
14025
14054
|
}
|
|
14026
14055
|
/**
|
|
14027
14056
|
* Create a fully-initialized SDK session.
|
|
@@ -20758,7 +20787,7 @@ declare class ApiError extends Error {
|
|
|
20758
20787
|
*
|
|
20759
20788
|
* @example
|
|
20760
20789
|
* ```ts
|
|
20761
|
-
* import { BrowserRuntime } from '@
|
|
20790
|
+
* import { BrowserRuntime } from '@revturbine/sdk';
|
|
20762
20791
|
* import { createStaticProviders } from '@revt-eng/core';
|
|
20763
20792
|
*
|
|
20764
20793
|
* const runtime = new BrowserRuntime({
|