diff --git a/packages/sdks/nextjs/index.tsx b/packages/sdks/nextjs/index.tsx index fbe4b028..123ac958 100644 --- a/packages/sdks/nextjs/index.tsx +++ b/packages/sdks/nextjs/index.tsx @@ -121,6 +121,11 @@ export function useOpenPanel() { decrement, clear, setGlobalProperties, + revenue, + flushRevenue, + clearRevenue, + pendingRevenue, + fetchDeviceId, }; } @@ -153,6 +158,22 @@ function decrement(payload: DecrementPayload) { window.op('decrement', payload); } +function fetchDeviceId() { + return window.op.fetchDeviceId(); +} +function clearRevenue() { + window.op.clearRevenue(); +} +function pendingRevenue(amount: number, properties?: Record) { + window.op.pendingRevenue(amount, properties); +} +function revenue(amount: number, properties?: Record) { + return window.op.revenue(amount, properties); +} +function flushRevenue() { + return window.op.flushRevenue(); +} + function clear() { window.op?.('clear'); } diff --git a/packages/sdks/nextjs/package.json b/packages/sdks/nextjs/package.json index 71647840..9bace357 100644 --- a/packages/sdks/nextjs/package.json +++ b/packages/sdks/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@openpanel/nextjs", - "version": "1.0.17-local", + "version": "1.0.18-local", "module": "index.ts", "scripts": { "build": "rm -rf dist && tsup",