@shiva004/surveys 0.9.0 → 0.11.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 +86 -0
- package/dist/elements.d.ts +36 -0
- package/dist/elements.js +20271 -0
- package/dist/events/data.d.ts +6 -0
- package/dist/events/snapshots.d.ts +12 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3078 -2999
- package/package.json +30 -14
package/dist/events/data.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export interface WireEvent {
|
|
|
11
11
|
user_id: string;
|
|
12
12
|
session_id: string;
|
|
13
13
|
properties: Record<string, unknown>;
|
|
14
|
+
/** Where the event came from: browser, OS, screen, timezone, network, plus your own fields (see IngestionConfig.context). */
|
|
15
|
+
context?: Record<string, unknown>;
|
|
14
16
|
}
|
|
15
17
|
export interface IngestEvent {
|
|
16
18
|
id: string;
|
|
@@ -57,6 +59,10 @@ export interface IngestionConfig {
|
|
|
57
59
|
maxPerSecond?: number;
|
|
58
60
|
maxRetries?: number;
|
|
59
61
|
source?: Source;
|
|
62
|
+
/** Extra fields added to every event's `context`, e.g. { app: 'portal', release: '1.4.2', env: 'uat' }. */
|
|
63
|
+
context?: Record<string, unknown>;
|
|
64
|
+
/** Add browser / OS / screen / timezone / network info to every event's `context`. Default true. Set false to switch off. */
|
|
65
|
+
device?: boolean;
|
|
60
66
|
}
|
|
61
67
|
export interface CaptureOptions {
|
|
62
68
|
pageViews?: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface SnapshotOptions {
|
|
2
|
+
/** How often to report. Default 30000 (30 s). A report is also sent when the tab is hidden. */
|
|
3
|
+
intervalMs?: number;
|
|
4
|
+
/** Send environment_snapshot (browser, network, storage key counts). Default true. */
|
|
5
|
+
environment?: boolean;
|
|
6
|
+
/** Send heatmap_summary for pages that changed since the last report. Default true. */
|
|
7
|
+
heatmap?: boolean;
|
|
8
|
+
/** Also send public IP, ISP and location (only filled when the Environment panel's public lookup is on). Default false. */
|
|
9
|
+
includeIp?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Start reporting. Returns a stop function. Call after startEventCapture({ endpoint }). */
|
|
12
|
+
export declare const startSnapshotReporting: (opts?: SnapshotOptions) => (() => void);
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export { getNetworkInfo, setNetworkName, refreshNetwork, setPublicLookup, isPubl
|
|
|
10
10
|
export { HeatmapApp } from './heatmap/HeatmapApp';
|
|
11
11
|
export { IngestionApp } from './events/IngestionApp';
|
|
12
12
|
export { startEventCapture, trackEvent, ingestRemote, identify, getUserId, configureIngestion, useIngestion, getIngestionSnapshot, setPaused as setIngestionPaused, resetIngestion, } from './events/data';
|
|
13
|
+
export { startSnapshotReporting } from './events/snapshots';
|
|
14
|
+
export type { SnapshotOptions } from './events/snapshots';
|
|
13
15
|
export type { IngestionConfig, CaptureOptions, RemoteEvent, WireEvent, IngestEvent, IngestStatus } from './events/data';
|
|
14
16
|
export { FlagsApp } from './flags/FlagsApp';
|
|
15
17
|
export type { FlagsAppProps } from './flags/FlagsApp';
|