@arsel.sa/web-sdk 1.1.0 → 1.2.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/CHANGELOG.md +22 -1
- package/dist/arsel.js +442 -425
- package/dist/arsel.js.map +1 -1
- package/dist/arsel.umd.cjs +2 -2
- package/dist/arsel.umd.cjs.map +1 -1
- package/dist/events.d.ts +7 -2
- package/dist/install.d.ts +10 -0
- package/dist/store.d.ts +1 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/events.d.ts
CHANGED
|
@@ -5,8 +5,13 @@ export declare const RESERVED_PREFIX = "arsel.";
|
|
|
5
5
|
export declare const EVENT_SESSION_START = "arsel.session_start";
|
|
6
6
|
export declare const EVENT_SESSION_END = "arsel.session_end";
|
|
7
7
|
export declare const EVENT_IDENTIFY = "arsel.identify";
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
export declare const EVENT_APP_INSTALLED = "arsel.app_installed";
|
|
9
|
+
/**
|
|
10
|
+
* Screen views share one reserved name; the screen itself is a property. Named
|
|
11
|
+
* to match the Android and iOS SDKs — a segment or in-app rule keyed on it has
|
|
12
|
+
* to mean the same thing on every platform.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SCREEN_EVENT = "arsel.screen_view";
|
|
10
15
|
/** The batch ceiling `POST /v1/events/send` accepts in an `{ events: [...] }` body. */
|
|
11
16
|
export declare const MAX_BATCH = 50;
|
|
12
17
|
/**
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Emits `arsel.app_installed` once per browser profile.
|
|
3
|
+
*
|
|
4
|
+
* A browser has no install step, so this means "the first time we ever saw this
|
|
5
|
+
* device". Clearing site data resets the store and re-fires it; web install
|
|
6
|
+
* counts run high by that much, and a page cannot do better.
|
|
7
|
+
*/
|
|
8
|
+
export declare function reportInstall(alreadyInstalled: boolean): Promise<void>;
|
|
9
|
+
/** Must be read before `anonymousId()` mints one, or every visit looks new. */
|
|
10
|
+
export declare function hasDeviceIdentity(): Promise<boolean>;
|
package/dist/store.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export declare const KEYS: {
|
|
|
52
52
|
readonly vapidKeyVersion: "vapid_key_version";
|
|
53
53
|
readonly endpoint: "endpoint";
|
|
54
54
|
readonly subscriptionStatus: "subscription_status";
|
|
55
|
+
readonly installReported: "install_reported";
|
|
55
56
|
readonly sessionStartedAt: "session_started_at";
|
|
56
57
|
readonly backgroundedAt: "backgrounded_at";
|
|
57
58
|
readonly lastResponseCode: "last_response_code";
|
package/dist/version.d.ts
CHANGED