@ordersune/crm-web-sdk 1.0.12 → 1.0.14
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 +155 -37
- package/dist/index.js +1 -5
- package/dist/types/index.d.ts +1 -10
- package/dist/web-sdk.d.ts +2 -5
- package/package.json +19 -5
- package/dist/types/index.js +0 -3
- package/dist/utils/index.js +0 -9
- package/dist/web-sdk.js +0 -663
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface UserProfile {
|
|
2
2
|
id: string;
|
|
3
|
+
guestUserId?: string;
|
|
3
4
|
}
|
|
4
5
|
export interface EventOptions {
|
|
5
6
|
timestamp?: string;
|
|
@@ -24,19 +25,9 @@ export interface PurchasePayload {
|
|
|
24
25
|
}
|
|
25
26
|
export interface DeviceDetails {
|
|
26
27
|
deviceId: string;
|
|
27
|
-
deviceModel: string;
|
|
28
|
-
browser: string;
|
|
29
|
-
browserVersion: string;
|
|
30
|
-
language: string;
|
|
31
|
-
screenResolution: string;
|
|
32
|
-
userAgent: string;
|
|
33
28
|
platform: string;
|
|
34
29
|
pushToken?: string;
|
|
35
30
|
}
|
|
36
|
-
export interface BrowserInfo {
|
|
37
|
-
browserType: string;
|
|
38
|
-
browserVersion: string;
|
|
39
|
-
}
|
|
40
31
|
export interface ButtonProperties {
|
|
41
32
|
backgroundColor: string;
|
|
42
33
|
borderColor: string;
|
package/dist/web-sdk.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare class WebSDK {
|
|
|
7
7
|
private readonly batchInterval;
|
|
8
8
|
private readonly sdkVersion;
|
|
9
9
|
private deviceId;
|
|
10
|
+
private guestUserId;
|
|
10
11
|
private deviceDetails?;
|
|
11
12
|
private currentUser?;
|
|
12
13
|
private eventQueue;
|
|
@@ -34,10 +35,6 @@ export declare class WebSDK {
|
|
|
34
35
|
private getGuestUserId;
|
|
35
36
|
private buildPurchasePayload;
|
|
36
37
|
private initializeDeviceDetails;
|
|
37
|
-
private getBrowserInfo;
|
|
38
|
-
private detectDeviceType;
|
|
39
|
-
private detectBrowserType;
|
|
40
|
-
private detectBrowserVersion;
|
|
41
38
|
private startBatchProcessing;
|
|
42
39
|
private queueEvent;
|
|
43
40
|
private processBatch;
|
|
@@ -47,7 +44,7 @@ export declare class WebSDK {
|
|
|
47
44
|
private openWebUrl;
|
|
48
45
|
private showInAppMessage;
|
|
49
46
|
private logInAppMessageClick;
|
|
50
|
-
|
|
47
|
+
logClick(campaignId: string): Promise<void>;
|
|
51
48
|
private processCampaignClick;
|
|
52
49
|
private buildCampaignPayload;
|
|
53
50
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ordersune/crm-web-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"build": "
|
|
11
|
-
"
|
|
10
|
+
"build": "npm run build:bundle && npm run build:types",
|
|
11
|
+
"build:bundle": "webpack --config webpack.config.js",
|
|
12
|
+
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
|
13
|
+
"prepare": "npm run build && husky",
|
|
14
|
+
"release": "standard-version",
|
|
15
|
+
"lint:commit": "commitlint --edit"
|
|
12
16
|
},
|
|
13
17
|
"files": [
|
|
14
18
|
"dist",
|
|
@@ -18,7 +22,17 @@
|
|
|
18
22
|
"uuid": "^11.0.3"
|
|
19
23
|
},
|
|
20
24
|
"devDependencies": {
|
|
25
|
+
"@commitlint/cli": "^20.1.0",
|
|
26
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
27
|
+
"@types/uuid": "^9.0.0",
|
|
28
|
+
"husky": "^9.1.7",
|
|
29
|
+
"javascript-obfuscator": "^4.1.1",
|
|
30
|
+
"standard-version": "^9.5.0",
|
|
31
|
+
"terser-webpack-plugin": "^5.3.14",
|
|
32
|
+
"ts-loader": "^9.5.4",
|
|
21
33
|
"typescript": "^5.0.0",
|
|
22
|
-
"
|
|
34
|
+
"webpack": "^5.103.0",
|
|
35
|
+
"webpack-cli": "^6.0.1",
|
|
36
|
+
"webpack-obfuscator": "^3.5.1"
|
|
23
37
|
}
|
|
24
|
-
}
|
|
38
|
+
}
|
package/dist/types/index.js
DELETED
package/dist/utils/index.js
DELETED