@layers/client 0.1.1-alpha.1 → 1.0.1

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/README.md CHANGED
@@ -1,36 +1,224 @@
1
1
  # @layers/client
2
2
 
3
- JavaScript client SDK for Layers Analytics. Suitable for web or Node environments.
3
+ Web browser SDK for Layers Analytics. Thin wrapper over the Rust/WASM core (`@layers/core-wasm`) that adds browser-specific features: localStorage persistence, network detection, page lifecycle flush via `sendBeacon`, and React integration.
4
4
 
5
5
  ## Install
6
6
 
7
- ```
7
+ ```bash
8
8
  npm install @layers/client
9
9
  # or
10
10
  pnpm add @layers/client
11
11
  ```
12
12
 
13
- ## Quick start
13
+ ## Quick Start
14
14
 
15
15
  ```ts
16
16
  import { LayersClient } from '@layers/client';
17
17
 
18
- const client = new LayersClient({
18
+ const layers = new LayersClient({
19
19
  apiKey: 'your-api-key',
20
20
  appId: 'your-app-id',
21
- environment: 'production',
22
- enableDebug: true
21
+ environment: 'production'
22
+ });
23
+
24
+ await layers.init();
25
+
26
+ // Track events
27
+ await layers.track('button_click', { button: 'signup' });
28
+
29
+ // Track screen views
30
+ await layers.screen('home_page');
31
+
32
+ // Identify a user
33
+ layers.setAppUserId('user-123');
34
+
35
+ // Shut down gracefully
36
+ await layers.shutdownAsync();
37
+ ```
38
+
39
+ ## Configuration
40
+
41
+ All fields for `LayersConfig`:
42
+
43
+ | Field | Type | Default | Description |
44
+ | ----------------- | -------------------------------------------- | ----------------------- | ------------------------------------------ |
45
+ | `apiKey` | `string` | _required_ | API key from the Layers dashboard |
46
+ | `appId` | `string` | _required_ | Application identifier |
47
+ | `environment` | `'development' \| 'staging' \| 'production'` | _required_ | Deployment environment |
48
+ | `appUserId` | `string` | `undefined` | Pre-set user ID at init time |
49
+ | `enableDebug` | `boolean` | `false` | Verbose console logging for all SDK calls |
50
+ | `baseUrl` | `string` | `https://in.layers.com` | Override the ingest endpoint |
51
+ | `flushIntervalMs` | `number` | `30000` | Periodic flush interval (ms) |
52
+ | `flushThreshold` | `number` | `10` | Queue depth that triggers auto-flush |
53
+ | `maxQueueSize` | `number` | `1000` | Max events in queue before dropping oldest |
54
+
55
+ ## React Integration
56
+
57
+ The SDK includes first-class React bindings via `@layers/client/react`.
58
+
59
+ ### Provider
60
+
61
+ Wrap your app in `<LayersProvider>` to initialize the SDK and make it available to hooks:
62
+
63
+ ```tsx
64
+ import { LayersProvider } from '@layers/client/react';
65
+
66
+ function App() {
67
+ return (
68
+ <LayersProvider
69
+ config={{
70
+ apiKey: 'your-api-key',
71
+ appId: 'your-app-id',
72
+ environment: 'production'
73
+ }}
74
+ >
75
+ <MyApp />
76
+ </LayersProvider>
77
+ );
78
+ }
79
+ ```
80
+
81
+ The provider creates a `LayersClient` on mount, calls `init()`, and shuts it down on unmount.
82
+
83
+ ### Hooks
84
+
85
+ All hooks must be used inside a `<LayersProvider>`.
86
+
87
+ #### `useTrack()`
88
+
89
+ Returns a stable, memoized function for tracking events:
90
+
91
+ ```tsx
92
+ import { useTrack } from '@layers/client/react';
93
+
94
+ function SignupButton() {
95
+ const track = useTrack();
96
+
97
+ return <button onClick={() => track('signup_click', { source: 'hero' })}>Sign up</button>;
98
+ }
99
+ ```
100
+
101
+ #### `useScreen()`
102
+
103
+ Returns a stable, memoized function for tracking screen views:
104
+
105
+ ```tsx
106
+ import { useScreen } from '@layers/client/react';
107
+ import { useEffect } from 'react';
108
+
109
+ function Dashboard() {
110
+ const screen = useScreen();
111
+ useEffect(() => {
112
+ screen('dashboard');
113
+ }, [screen]);
114
+
115
+ return <div>...</div>;
116
+ }
117
+ ```
118
+
119
+ #### `useIdentify()`
120
+
121
+ Returns a function to set (or clear) the app user ID:
122
+
123
+ ```tsx
124
+ import { useIdentify } from '@layers/client/react';
125
+
126
+ function LoginForm() {
127
+ const identify = useIdentify();
128
+
129
+ const onLogin = (userId: string) => {
130
+ identify(userId);
131
+ };
132
+
133
+ const onLogout = () => {
134
+ identify(undefined);
135
+ };
136
+ }
137
+ ```
138
+
139
+ #### `useConsent()`
140
+
141
+ Returns functions to get and set consent state:
142
+
143
+ ```tsx
144
+ import { useConsent } from '@layers/client/react';
145
+
146
+ function ConsentBanner() {
147
+ const { setConsent, getConsentState } = useConsent();
148
+
149
+ return (
150
+ <button onClick={() => setConsent({ analytics: true, advertising: false })}>
151
+ Accept Analytics Only
152
+ </button>
153
+ );
154
+ }
155
+ ```
156
+
157
+ #### `useLayers()`
158
+
159
+ Returns the raw `LayersClient` instance for advanced usage:
160
+
161
+ ```tsx
162
+ import { useLayers } from '@layers/client/react';
163
+
164
+ function Advanced() {
165
+ const layers = useLayers();
166
+ // layers.setUserProperties({ plan: 'pro' });
167
+ }
168
+ ```
169
+
170
+ ## Error Handling
171
+
172
+ Register error listeners to catch errors from `track()`, `screen()`, and `flush()` that would otherwise be silently dropped:
173
+
174
+ ```ts
175
+ const layers = new LayersClient({ ... });
176
+
177
+ layers.on('error', (err) => {
178
+ console.error('Layers SDK error:', err.message);
179
+ // Send to your error reporting service
23
180
  });
24
181
 
25
- await client.init();
26
- await client.track('app_open', { source: 'home' });
182
+ // Remove a specific listener
183
+ layers.off('error', myListener);
184
+ ```
185
+
186
+ When `enableDebug` is `true` and no error listeners are registered, errors are logged to `console.warn`.
187
+
188
+ ## Consent Management
189
+
190
+ Control what data the SDK collects:
191
+
192
+ ```ts
193
+ // Allow analytics, deny advertising
194
+ layers.setConsent({ analytics: true, advertising: false });
195
+
196
+ // Check current state
197
+ const consent = layers.getConsentState();
198
+ ```
199
+
200
+ When `analytics` is `false`, `track()` and `screen()` calls are silently dropped.
201
+
202
+ ## Page Lifecycle (sendBeacon)
203
+
204
+ The SDK automatically flushes events when the page becomes hidden using `navigator.sendBeacon()` for reliable delivery. If `sendBeacon` fails, events are persisted to localStorage and retried on the next page load.
205
+
206
+ On `beforeunload`, events are synchronously written to localStorage as a last resort.
207
+
208
+ ## Debug Mode
209
+
210
+ Enable `enableDebug: true` to see detailed logs for every SDK operation:
211
+
212
+ ```
213
+ [Layers] track("button_click", 2 properties)
214
+ [Layers] screen("home_page", 0 properties)
215
+ [Layers] setAppUserId("user-123")
27
216
  ```
28
217
 
29
- ## Links
218
+ ## Server-Side Rendering
30
219
 
31
- - Repo: https://github.com/layersai/sdks
32
- - Issues: https://github.com/layersai/sdks/issues
220
+ The SDK safely handles SSR environments where `window`, `document`, and `navigator` are unavailable. Device detection and lifecycle listeners are skipped in SSR. For server-side tracking, use [@layers/node](../node) instead.
33
221
 
34
222
  ## License
35
223
 
36
- ISC
224
+ MIT
@@ -0,0 +1,304 @@
1
+ //#region ../wasm/src/types.d.ts
2
+ type Environment = 'development' | 'staging' | 'production';
3
+ type Platform = 'ios' | 'android' | 'react-native' | 'web' | 'node' | 'flutter' | 'macos';
4
+ interface DeviceContext {
5
+ platform?: Platform;
6
+ osVersion?: string;
7
+ appVersion?: string;
8
+ deviceModel?: string;
9
+ locale?: string;
10
+ buildNumber?: string;
11
+ screenSize?: string;
12
+ installId?: string;
13
+ idfa?: string;
14
+ idfv?: string;
15
+ attStatus?: string;
16
+ }
17
+ interface ConsentState {
18
+ analytics?: boolean | null;
19
+ advertising?: boolean | null;
20
+ }
21
+ /**
22
+ * Event properties attached to track/screen calls.
23
+ *
24
+ * Supported value types:
25
+ * - `string` — text values (max 64 KB per value)
26
+ * - `number` — integers and floating-point numbers
27
+ * - `boolean` — true/false flags
28
+ * - `null` — explicit null to clear a property
29
+ * - Nested `Record<string, unknown>` objects (one level deep recommended)
30
+ *
31
+ * Keys must be plain strings (max 128 chars). Prototype-pollution keys
32
+ * (`__proto__`, `constructor`, `prototype`) are rejected. Maximum 100 keys
33
+ * per call, 1 MB total payload.
34
+ */
35
+ interface EventProperties {
36
+ [key: string]: unknown;
37
+ }
38
+ /**
39
+ * User properties set via `setUserProperties()`.
40
+ *
41
+ * Supported value types:
42
+ * - `string` — text values (max 64 KB per value)
43
+ * - `number` — integers and floating-point numbers
44
+ * - `boolean` — true/false flags
45
+ * - `null` — explicit null to clear a property
46
+ * - Nested `Record<string, unknown>` objects (one level deep recommended)
47
+ *
48
+ * Keys must be plain strings (max 128 chars). Prototype-pollution keys
49
+ * (`__proto__`, `constructor`, `prototype`) are rejected. Maximum 100 keys
50
+ * per call.
51
+ */
52
+ interface UserProperties {
53
+ [key: string]: unknown;
54
+ }
55
+ type LayersErrorCode = 'NOT_INITIALIZED' | 'ALREADY_INITIALIZED' | 'SHUT_DOWN' | 'INVALID_CONFIG' | 'INVALID_ARGUMENT' | 'QUEUE_FULL' | 'SERIALIZATION' | 'NETWORK' | 'HTTP' | 'CIRCUIT_OPEN' | 'RATE_LIMITED' | 'CONSENT_NOT_GRANTED' | 'PERSISTENCE' | 'REMOTE_CONFIG' | 'EVENT_DENIED' | 'INTERNAL';
56
+ declare class LayersError extends Error {
57
+ readonly code: LayersErrorCode;
58
+ readonly status?: number;
59
+ constructor(code: LayersErrorCode, message: string, status?: number);
60
+ }
61
+ //#endregion
62
+ //#region src/api-types.d.ts
63
+ interface BaseEvent {
64
+ event: string;
65
+ timestamp: string;
66
+ event_id?: string;
67
+ app_id: string;
68
+ app_user_id?: string;
69
+ user_id?: string;
70
+ anonymous_id?: string;
71
+ session_id?: string;
72
+ environment: 'development' | 'staging' | 'production';
73
+ platform: 'ios' | 'android' | 'react-native' | 'web' | 'node' | 'flutter' | 'macos';
74
+ os_version: string;
75
+ app_version: string;
76
+ build_number?: string;
77
+ device_model: string;
78
+ screen_size?: string;
79
+ locale: string;
80
+ install_id?: string;
81
+ install_source?: string;
82
+ campaign_hint?: string;
83
+ referrer?: string;
84
+ referrer_source?: string;
85
+ utm_source?: string;
86
+ utm_medium?: string;
87
+ utm_campaign?: string;
88
+ utm_content?: string;
89
+ utm_term?: string;
90
+ click_id_param?: string;
91
+ idfa?: string;
92
+ idfv?: string;
93
+ att_status?: 'authorized' | 'denied' | 'restricted' | 'not_determined';
94
+ country_code?: string;
95
+ subdivision1_code?: string;
96
+ properties?: Record<string, unknown>;
97
+ [key: string]: unknown;
98
+ }
99
+ interface EventsBatchPayload {
100
+ events: BaseEvent[];
101
+ batch_id?: string;
102
+ sent_at: string;
103
+ }
104
+ interface UserPropertiesPayload {
105
+ app_user_id?: string;
106
+ user_id?: string;
107
+ app_id: string;
108
+ properties: Record<string, unknown>;
109
+ timestamp: string;
110
+ }
111
+ interface ConsentPayload {
112
+ app_user_id?: string;
113
+ user_id?: string;
114
+ app_id: string;
115
+ consent: {
116
+ advertising?: boolean | null;
117
+ analytics?: boolean | null;
118
+ };
119
+ att_status?: 'authorized' | 'denied' | 'restricted' | 'not_determined';
120
+ timestamp: string;
121
+ }
122
+ interface RemoteConfigResponse {
123
+ config: {
124
+ att?: {
125
+ strategy: 'immediate' | 'after_onboarding' | 'after_paywall_view' | 'manual';
126
+ prompt_copy?: {
127
+ title?: string;
128
+ message?: string;
129
+ };
130
+ };
131
+ skan?: {
132
+ preset?: 'subscriptions' | 'engagement' | 'iap';
133
+ rules?: Record<string, unknown>;
134
+ lock_policy?: string;
135
+ };
136
+ events?: {
137
+ allowlist?: string[];
138
+ denylist?: string[];
139
+ sampling?: Record<string, number>;
140
+ sampling_rate?: number;
141
+ rate_limit?: {
142
+ per_minute?: number;
143
+ per_hour?: number;
144
+ per_event?: Record<string, {
145
+ per_minute?: number;
146
+ per_hour?: number;
147
+ }>;
148
+ };
149
+ };
150
+ connectors?: Record<string, {
151
+ enabled?: boolean;
152
+ app_id?: string;
153
+ pixel_id?: string;
154
+ test_mode?: boolean;
155
+ }>;
156
+ deeplinks?: {
157
+ allowed_hosts?: string[];
158
+ behavior?: string;
159
+ };
160
+ privacy?: {
161
+ killswitches?: string[];
162
+ analytics_enabled?: boolean;
163
+ advertising_enabled?: boolean;
164
+ };
165
+ };
166
+ version: string;
167
+ cache_ttl: number;
168
+ }
169
+ interface SKANPostbackPayload {
170
+ app_id: string;
171
+ version: string;
172
+ ad_network_id: string;
173
+ campaign_id?: string;
174
+ source_app_id?: string;
175
+ conversion_value?: number;
176
+ coarse_conversion_value?: string;
177
+ lock_window?: boolean;
178
+ postback_sequence_index?: number;
179
+ did_win?: boolean;
180
+ timestamp: string;
181
+ }
182
+ //#endregion
183
+ //#region src/attribution.d.ts
184
+ interface AttributionData {
185
+ click_id_param?: string;
186
+ click_id_value?: string;
187
+ utm_source?: string;
188
+ utm_medium?: string;
189
+ utm_campaign?: string;
190
+ utm_content?: string;
191
+ utm_term?: string;
192
+ referrer_url?: string;
193
+ captured_at: number;
194
+ }
195
+ /**
196
+ * Read stored attribution data, returning null if missing or expired.
197
+ */
198
+ declare function getAttribution(): AttributionData | null;
199
+ /**
200
+ * Return a flat property bag suitable for merging into event properties.
201
+ * Keys are prefixed with `$attribution_` to avoid collisions.
202
+ */
203
+ declare function getAttributionProperties(): Record<string, string>;
204
+ //#endregion
205
+ //#region src/index.d.ts
206
+ interface LayersConfig {
207
+ /** Unique application identifier issued by the Layers dashboard. */
208
+ appId: string;
209
+ /** Deployment environment label. @default "production" */
210
+ environment: Environment;
211
+ /** Optional user identifier to associate events with from the start. */
212
+ appUserId?: string;
213
+ /** Enable verbose debug logging to the console. @default false */
214
+ enableDebug?: boolean;
215
+ /** Base URL for the Layers ingest API. @default "https://in.layers.com" */
216
+ baseUrl?: string;
217
+ /** How often the event queue is flushed, in milliseconds. @default 30000 */
218
+ flushIntervalMs?: number;
219
+ /** Number of queued events that triggers an automatic flush. @default 10 */
220
+ flushThreshold?: number;
221
+ /** Maximum number of events to hold in the queue before dropping. @default 1000 */
222
+ maxQueueSize?: number;
223
+ }
224
+ type ErrorListener = (error: Error) => void;
225
+ declare class LayersClient {
226
+ private core;
227
+ private appUserId;
228
+ private isOnline;
229
+ private readonly enableDebug;
230
+ private readonly baseUrl;
231
+ private onlineListener;
232
+ private offlineListener;
233
+ private visibilityListener;
234
+ private beforeUnloadListener;
235
+ private readonly errorListeners;
236
+ constructor(config: LayersConfig);
237
+ /** Initialize the client: detects device info, attaches lifecycle listeners, and fetches remote config. */
238
+ init(): Promise<void>;
239
+ /**
240
+ * Record a custom analytics event with an optional property bag.
241
+ *
242
+ * Events are batched and flushed automatically when the queue reaches
243
+ * `flushThreshold` or the periodic flush timer fires.
244
+ */
245
+ track(eventName: string, properties?: EventProperties): void;
246
+ /**
247
+ * Record a screen view event with an optional property bag.
248
+ *
249
+ * Events are batched and flushed automatically when the queue reaches
250
+ * `flushThreshold` or the periodic flush timer fires.
251
+ */
252
+ screen(screenName: string, properties?: EventProperties): void;
253
+ /** Set or update user-level properties that persist across sessions. */
254
+ setUserProperties(properties: UserProperties): void;
255
+ /** Update the user's consent state for analytics and advertising data collection. */
256
+ setConsent(consent: ConsentState): void;
257
+ /** Associate all subsequent events with the given user ID, or clear it with `undefined`. */
258
+ setAppUserId(appUserId: string | undefined): void;
259
+ /** @deprecated Use setAppUserId instead */
260
+ setUserId(userId: string): void;
261
+ /** Return the current app user ID, or `undefined` if not set. */
262
+ getAppUserId(): string | undefined;
263
+ /** @deprecated Use getAppUserId instead */
264
+ getUserId(): string | undefined;
265
+ /** Return the current anonymous session ID. */
266
+ getSessionId(): string;
267
+ /** Return the current consent state for analytics and advertising. */
268
+ getConsentState(): ConsentState;
269
+ /** Override device-level context fields (platform, OS, locale, etc.). */
270
+ setDeviceInfo(deviceInfo: DeviceContext): void;
271
+ /** Flush all queued events to the server. Falls back to synchronous persistence on failure. */
272
+ flush(): Promise<void>;
273
+ /** Immediately shut down the client, removing all event listeners. Queued events are persisted but not flushed. */
274
+ shutdown(): void;
275
+ /**
276
+ * Async shutdown: flushes remaining events before shutting down.
277
+ * @param timeoutMs Maximum time to wait for flush (default 3000ms).
278
+ */
279
+ shutdownAsync(timeoutMs?: number): Promise<void>;
280
+ private cleanupListeners;
281
+ /** End the current session and start a new one with a fresh session ID. */
282
+ startNewSession(): void;
283
+ /**
284
+ * Register an error listener. Errors from track/screen/flush
285
+ * that would otherwise be silently dropped are forwarded here.
286
+ */
287
+ on(event: 'error', listener: ErrorListener): this;
288
+ /**
289
+ * Remove a previously registered error listener.
290
+ */
291
+ off(event: 'error', listener: ErrorListener): this;
292
+ private emitError;
293
+ private initializeDeviceInfo;
294
+ private detectOS;
295
+ private detectDeviceModel;
296
+ private detectLocale;
297
+ private detectScreenSize;
298
+ private setupNetworkListener;
299
+ private getBeaconUrl;
300
+ private setupLifecycleListeners;
301
+ }
302
+ //#endregion
303
+ export { LayersError as _, getAttribution as a, ConsentPayload as c, SKANPostbackPayload as d, UserPropertiesPayload as f, EventProperties as g, Environment as h, AttributionData as i, EventsBatchPayload as l, DeviceContext as m, LayersClient as n, getAttributionProperties as o, ConsentState as p, LayersConfig as r, BaseEvent as s, ErrorListener as t, RemoteConfigResponse as u, UserProperties as v };
304
+ //# sourceMappingURL=index-BCpCaNor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BCpCaNor.d.ts","names":[],"sources":["../../wasm/src/types.ts","../src/api-types.ts","../src/attribution.ts","../src/index.ts"],"sourcesContent":[],"mappings":";KAGY,WAAA;AAAA,KAEA,QAAA,GAFW,KAAA,GAAA,SAAA,GAAA,cAAA,GAAA,KAAA,GAAA,MAAA,GAAA,SAAA,GAAA,OAAA;UAgBN,aAAA;aACJ;;ECjBI,UAAA,CAAA,EAAS,MAAA;EAqCT,WAAA,CAAA,EAAA,MAAA;EAMA,MAAA,CAAA,EAAA,MAAA;EAQA,WAAA,CAAA,EAAA,MAAc;EAYd,UAAA,CAAA,EAAA,MAAA;EAQH,SAAA,CAAA,EAAA,MAAA;EAMG,IAAA,CAAA,EAAA,MAAA;EAKG,IAAA,CAAA,EAAA,MAAA;EAGH,SAAA,CAAA,EAAA,MAAA;;AAkBA,UDzEA,YAAA,CCyEmB;;;;AC7FpC;AAkGA;AAsBA;;;;ACjGA;AAmBA;AAEA;;;;;;AAqGsB,UH1GL,eAAA,CG0GK;EAsCD,CAAA,GAAA,EAAA,MAAA,CAAA,EAAA,OAAA;;;;;;;;;;;;;;;;UH9HJ,cAAA;;;KAsBL,eAAA;cAkBC,WAAA,SAAoB,K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;EAeH;EAEC,IAAA,CAAA,CAAA,EA6CG,OA7CS,CAAA,IAAA,CAAA;EAgBH;;;;;;EA2HD,KAAA,CAAA,SAAA,EAAA,MAAA,EAAA,UAAA,CAAA,EA9EmB,eA8EnB,CAAA,EAAA,IAAA;EAKO;;;;;;0CA/Dc;;gCAeV;;sBAKV;;;;;;;;;;;;qBAsCD;;4BAKO;;WAKX;;;;;;;qCAmBwB;;;;;;;;+BA2CV;;;;gCAQC"}
@@ -0,0 +1,2 @@
1
+ import { _ as LayersError, a as getAttribution, c as ConsentPayload, d as SKANPostbackPayload, f as UserPropertiesPayload, g as EventProperties, h as Environment, i as AttributionData, l as EventsBatchPayload, m as DeviceContext, n as LayersClient, o as getAttributionProperties, p as ConsentState, r as LayersConfig, s as BaseEvent, t as ErrorListener, u as RemoteConfigResponse, v as UserProperties } from "./index-BCpCaNor.js";
2
+ export { AttributionData, BaseEvent, ConsentPayload, ConsentState, DeviceContext, Environment, ErrorListener, EventProperties, EventsBatchPayload, LayersClient, LayersConfig, LayersError, RemoteConfigResponse, SKANPostbackPayload, UserProperties, UserPropertiesPayload, getAttribution, getAttributionProperties };