@usermaven/sdk-js 1.0.9 → 1.1.0
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 +0 -2
- package/dist/npm/usermaven.cjs.js +422 -1812
- package/dist/npm/usermaven.d.ts +61 -40
- package/dist/npm/usermaven.es.js +422 -1812
- package/dist/web/lib.js +1 -1
- package/package.json +1 -1
package/dist/npm/usermaven.d.ts
CHANGED
|
@@ -59,6 +59,16 @@ export type UsermavenClient = {
|
|
|
59
59
|
* User
|
|
60
60
|
*/
|
|
61
61
|
unset(propertyName: string, opts: { eventType?: string, persist?: boolean });
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Trigger for auto-captured event.
|
|
65
|
+
* @param name event name
|
|
66
|
+
* @param payload event payload
|
|
67
|
+
* @return Promise, see _send3p documentation
|
|
68
|
+
*/
|
|
69
|
+
capture?: (name: string, properties?: EventPayload, opts?: UsermavenOptions) => void
|
|
70
|
+
|
|
71
|
+
|
|
62
72
|
}
|
|
63
73
|
|
|
64
74
|
/**
|
|
@@ -227,34 +237,6 @@ export type UsermavenOptions = {
|
|
|
227
237
|
*/
|
|
228
238
|
disable_event_persistence?: boolean
|
|
229
239
|
|
|
230
|
-
/**
|
|
231
|
-
* Type of persistence required
|
|
232
|
-
* Possible values: cookie | localStorage | localStorage+cookie | memory
|
|
233
|
-
*
|
|
234
|
-
* @default cookie
|
|
235
|
-
*/
|
|
236
|
-
persistence?: PersistenceType;
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Persistent connection name
|
|
240
|
-
*/
|
|
241
|
-
persistence_name?: string;
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Session tracking time in seconds (x)
|
|
245
|
-
* After x seconds of inactivity, new session will be created. Default time is 30 minutes i.e 1800 seconds
|
|
246
|
-
*
|
|
247
|
-
* @default 1800
|
|
248
|
-
*/
|
|
249
|
-
persistence_time?: number;
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Disable session tracking here
|
|
253
|
-
*
|
|
254
|
-
* @default false
|
|
255
|
-
*/
|
|
256
|
-
disable_persistence?: boolean;
|
|
257
|
-
|
|
258
240
|
/**
|
|
259
241
|
* Auto-capturing is disabled by default
|
|
260
242
|
*
|
|
@@ -262,13 +244,6 @@ export type UsermavenOptions = {
|
|
|
262
244
|
*/
|
|
263
245
|
autocapture?: boolean,
|
|
264
246
|
|
|
265
|
-
/**
|
|
266
|
-
* Should a page_view event be triggered on page load
|
|
267
|
-
*
|
|
268
|
-
* @default true
|
|
269
|
-
*/
|
|
270
|
-
capture_pageview?: boolean,
|
|
271
|
-
|
|
272
247
|
/**
|
|
273
248
|
* To control the payload properties character limit. Defaults to null that means there is no limit. i.e 65535
|
|
274
249
|
*
|
|
@@ -288,14 +263,21 @@ export type UsermavenOptions = {
|
|
|
288
263
|
*/
|
|
289
264
|
project_id?: string;
|
|
290
265
|
|
|
291
|
-
/**
|
|
292
|
-
* Enable cookie across subdomain
|
|
293
|
-
* Default value: true
|
|
294
|
-
*/
|
|
295
|
-
cross_subdomain_cookie?: boolean;
|
|
296
266
|
|
|
297
267
|
//NOTE: If any property is added here, please make sure it's added to browser.ts usermavenProps as well
|
|
298
268
|
|
|
269
|
+
/**
|
|
270
|
+
* Mask all element attributes
|
|
271
|
+
*/
|
|
272
|
+
mask_all_element_attributes?: boolean
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Mask all text
|
|
276
|
+
*/
|
|
277
|
+
mask_all_text?: boolean
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
299
281
|
};
|
|
300
282
|
|
|
301
283
|
/**
|
|
@@ -491,3 +473,42 @@ export type EventCompat = EventBasics & {
|
|
|
491
473
|
} & EventPayload;
|
|
492
474
|
|
|
493
475
|
export type PersistenceType = 'cookie' | 'localStorage' | 'localStorage+cookie' | 'memory';
|
|
476
|
+
|
|
477
|
+
// Autocapture
|
|
478
|
+
export type Property = any
|
|
479
|
+
export type Properties = Record<string, Property>
|
|
480
|
+
|
|
481
|
+
export enum Compression {
|
|
482
|
+
GZipJS = 'gzip-js',
|
|
483
|
+
LZ64 = 'lz64',
|
|
484
|
+
Base64 = 'base64',
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export interface EditorParams {
|
|
488
|
+
jsURL?: string
|
|
489
|
+
apiURL?: string
|
|
490
|
+
toolbarVersion?: 'toolbar'
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
export interface DecideResponse {
|
|
495
|
+
status: number
|
|
496
|
+
supportedCompression: Compression[]
|
|
497
|
+
config: {
|
|
498
|
+
enable_collect_everything: boolean
|
|
499
|
+
}
|
|
500
|
+
custom_properties: AutoCaptureCustomProperty[] // TODO: delete, not sent
|
|
501
|
+
featureFlags: Record<string, string | boolean>
|
|
502
|
+
sessionRecording?: {
|
|
503
|
+
endpoint?: string
|
|
504
|
+
}
|
|
505
|
+
editorParams: EditorParams
|
|
506
|
+
toolbarVersion: 'toolbar' /** deprecated, moved to editorParams */
|
|
507
|
+
isAuthenticated: boolean
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export interface AutoCaptureCustomProperty {
|
|
511
|
+
name: string
|
|
512
|
+
css_selector: string
|
|
513
|
+
event_selectors: string[]
|
|
514
|
+
}
|