zixflow-reactnative 1.1.2 → 1.1.3
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 +1857 -325
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/zixflow/reactnative/sdk/NativeZixflowModule.kt +29 -19
- package/android/src/main/java/com/zixflow/reactnative/sdk/constant/Keys.kt +1 -4
- package/android/src/main/java/com/zixflow/reactnative/sdk/logging/NativeZixflowLoggingModule.kt +2 -2
- package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginapp/NativeMessagingInAppModule.kt +2 -13
- package/ios/wrappers/utils/ZixflowConfigUtils.swift +5 -9
- package/lib/commonjs/types/data-pipelines.js +3 -15
- package/lib/commonjs/types/data-pipelines.js.map +1 -1
- package/lib/commonjs/utils/param-validation.js +1 -1
- package/lib/commonjs/utils/param-validation.js.map +1 -1
- package/lib/commonjs/zixflow-cdp.js +2 -10
- package/lib/commonjs/zixflow-cdp.js.map +1 -1
- package/lib/commonjs/zixflow.js.map +1 -1
- package/lib/module/types/data-pipelines.js +2 -15
- package/lib/module/types/data-pipelines.js.map +1 -1
- package/lib/module/utils/param-validation.js +1 -1
- package/lib/module/utils/param-validation.js.map +1 -1
- package/lib/module/zixflow-cdp.js +2 -10
- package/lib/module/zixflow-cdp.js.map +1 -1
- package/lib/module/zixflow.js +0 -6
- package/lib/module/zixflow.js.map +1 -1
- package/lib/typescript/commonjs/types/data-pipelines.d.ts +4 -20
- package/lib/typescript/commonjs/types/data-pipelines.d.ts.map +1 -1
- package/lib/typescript/commonjs/zixflow-cdp.d.ts.map +1 -1
- package/lib/typescript/commonjs/zixflow.d.ts +0 -5
- package/lib/typescript/commonjs/zixflow.d.ts.map +1 -1
- package/lib/typescript/module/types/data-pipelines.d.ts +4 -20
- package/lib/typescript/module/types/data-pipelines.d.ts.map +1 -1
- package/lib/typescript/module/zixflow-cdp.d.ts.map +1 -1
- package/lib/typescript/module/zixflow.d.ts +0 -5
- package/lib/typescript/module/zixflow.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/types/data-pipelines.ts +4 -21
- package/src/utils/param-validation.ts +1 -1
- package/src/zixflow-cdp.ts +2 -12
- package/src/zixflow.ts +0 -6
- package/zixflow-reactnative-richpush.podspec +2 -2
- package/zixflow-reactnative.podspec +2 -2
|
@@ -33,11 +33,9 @@ export interface IdentifyParams {
|
|
|
33
33
|
/**
|
|
34
34
|
* Configuration options for initializing the Zixflow SDK.
|
|
35
35
|
*
|
|
36
|
-
* @param
|
|
37
|
-
* @param migrationSiteId - Legacy site ID for migrating from tracking API
|
|
38
|
-
* @param region - Data center region (US or EU)
|
|
36
|
+
* @param apiKey - API key from Zixflow dashboard
|
|
39
37
|
* @param logLevel - SDK logging verbosity level
|
|
40
|
-
* @param apiHost - Override the
|
|
38
|
+
* @param apiHost - Override the API host. Use to route SDK traffic through a first-party proxy.
|
|
41
39
|
* @param cdnHost - Override the CDN host. Use to route SDK traffic through a first-party proxy.
|
|
42
40
|
* @param flushAt - Number of events to batch before sending
|
|
43
41
|
* @param flushInterval - Time interval (seconds) to flush events
|
|
@@ -50,9 +48,7 @@ export interface IdentifyParams {
|
|
|
50
48
|
* @public
|
|
51
49
|
*/
|
|
52
50
|
export type ZixflowConfig = {
|
|
53
|
-
|
|
54
|
-
migrationSiteId?: string;
|
|
55
|
-
region?: ZixflowRegion;
|
|
51
|
+
apiKey: string;
|
|
56
52
|
logLevel?: ZixflowLogLevel;
|
|
57
53
|
apiHost?: string;
|
|
58
54
|
cdnHost?: string;
|
|
@@ -61,16 +57,13 @@ export type ZixflowConfig = {
|
|
|
61
57
|
screenViewUse?: ScreenView;
|
|
62
58
|
trackApplicationLifecycleEvents?: boolean;
|
|
63
59
|
autoTrackDeviceAttributes?: boolean;
|
|
64
|
-
inApp?: {
|
|
65
|
-
siteId?: string;
|
|
66
|
-
};
|
|
60
|
+
inApp?: {};
|
|
67
61
|
push?: {
|
|
68
62
|
android?: {
|
|
69
63
|
pushClickBehavior?: PushClickBehaviorAndroid;
|
|
70
64
|
};
|
|
71
65
|
};
|
|
72
66
|
location?: {
|
|
73
|
-
/** Location tracking mode. Defaults to 'manual' if location config is provided. */
|
|
74
67
|
trackingMode?: ZixflowLocationTrackingMode;
|
|
75
68
|
};
|
|
76
69
|
};
|
|
@@ -91,15 +84,6 @@ export declare enum ZixflowLogLevel {
|
|
|
91
84
|
/** All messages including debug information */
|
|
92
85
|
Debug = "debug"
|
|
93
86
|
}
|
|
94
|
-
/**
|
|
95
|
-
* Data center regions for Zixflow API endpoints.
|
|
96
|
-
*
|
|
97
|
-
* @public
|
|
98
|
-
*/
|
|
99
|
-
export declare enum ZixflowRegion {
|
|
100
|
-
US = "US",
|
|
101
|
-
EU = "EU"
|
|
102
|
-
}
|
|
103
87
|
/**
|
|
104
88
|
* Screen view tracking behavior configuration.
|
|
105
89
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-pipelines.d.ts","sourceRoot":"","sources":["../../../../src/types/data-pipelines.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAC;AAEvD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED
|
|
1
|
+
{"version":3,"file":"data-pipelines.d.ts","sourceRoot":"","sources":["../../../../src/types/data-pipelines.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAC;AAEvD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEnD;;;;;;;GAOG;AACH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AM,WAAW;IACjB,iDAAiD;IACjD,SAAS,cAAc;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zixflow-cdp.d.ts","sourceRoot":"","sources":["../../../src/zixflow-cdp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAMtD,OAAO,EAEL,WAAW,EACX,KAAK,aAAa,EAElB,KAAK,cAAc,EACpB,MAAM,SAAS,CAAC;AAkBjB,cAAc;AACd,qBAAa,OAAO;IAClB,2DAA2D;IAC3D,MAAM,CAAC,QAAQ,CAAC,UAAU,GAAU,QAAQ,aAAa,
|
|
1
|
+
{"version":3,"file":"zixflow-cdp.d.ts","sourceRoot":"","sources":["../../../src/zixflow-cdp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAMtD,OAAO,EAEL,WAAW,EACX,KAAK,aAAa,EAElB,KAAK,cAAc,EACpB,MAAM,SAAS,CAAC;AAkBjB,cAAc;AACd,qBAAa,OAAO;IAClB,2DAA2D;IAC3D,MAAM,CAAC,QAAQ,CAAC,UAAU,GAAU,QAAQ,aAAa,mBAuBvD;IAEF,0FAA0F;IAC1F,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAU,sBAG/B,cAAmB,kBAkBpB;IAEF,2DAA2D;IAC3D,MAAM,CAAC,QAAQ,CAAC,aAAa,qBAE3B;IAEF,+CAA+C;IAC/C,MAAM,CAAC,QAAQ,CAAC,KAAK,GACnB,MAAM,MAAM,EACZ,aAAa,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,kBAWhC;IAEF,0DAA0D;IAC1D,MAAM,CAAC,QAAQ,CAAC,MAAM,GACpB,OAAO,MAAM,EACb,aAAa,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,kBAWhC;IAEF,0EAA0E;IAC1E,MAAM,CAAC,QAAQ,CAAC,oBAAoB,GAClC,YAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,kBAS/B;IAEF,6CAA6C;IAC7C,MAAM,CAAC,QAAQ,CAAC,mBAAmB,GACjC,YAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,kBAS/B;IAEF,sDAAsD;IACtD,MAAM,CAAC,QAAQ,CAAC,mBAAmB,GAAU,OAAO,MAAM,mBAIxD;IAEF,4EAA4E;IAC5E,MAAM,CAAC,QAAQ,CAAC,iBAAiB,sBAE/B;IAEF,kFAAkF;IAClF,MAAM,CAAC,QAAQ,CAAC,WAAW,GAAU,qCAIlC;QACD,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,WAAW,CAAC;KACpB,mBAQC;IAEF;;;OAGG;IACH,MAAM,CAAC,QAAQ,CAAC,aAAa,gBAAsB;IAEnD,MAAM,CAAC,QAAQ,CAAC,cAAc,wBAA+B;IAC7D,MAAM,CAAC,QAAQ,CAAC,QAAQ,kBAAyB;IACjD,MAAM,CAAC,QAAQ,CAAC,aAAa,uBAA8B;CAC5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zixflow.d.ts","sourceRoot":"","sources":["../../../src/zixflow.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"zixflow.d.ts","sourceRoot":"","sources":["../../../src/zixflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGtD,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zixflow-reactnative",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Official Zixflow SDK for React Native.
|
|
3
|
+
"version": "1.1.3",
|
|
4
|
+
"description": "Official Zixflow SDK for React Native. Track customers and send messages to your iOS/Android apps.",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
7
7
|
"module": "./lib/module/index.js",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
},
|
|
20
20
|
"./package.json": "./package.json"
|
|
21
21
|
},
|
|
22
|
-
"zixflowNativeiOSSdkVersion": "= 1.1.
|
|
23
|
-
"zixflowNativeAndroidSdkVersion": "1.1.
|
|
22
|
+
"zixflowNativeiOSSdkVersion": "= 1.1.3",
|
|
23
|
+
"zixflowNativeAndroidSdkVersion": "1.1.3",
|
|
24
24
|
"files": [
|
|
25
25
|
"src",
|
|
26
26
|
"lib",
|
|
@@ -36,11 +36,9 @@ export interface IdentifyParams {
|
|
|
36
36
|
/**
|
|
37
37
|
* Configuration options for initializing the Zixflow SDK.
|
|
38
38
|
*
|
|
39
|
-
* @param
|
|
40
|
-
* @param migrationSiteId - Legacy site ID for migrating from tracking API
|
|
41
|
-
* @param region - Data center region (US or EU)
|
|
39
|
+
* @param apiKey - API key from Zixflow dashboard
|
|
42
40
|
* @param logLevel - SDK logging verbosity level
|
|
43
|
-
* @param apiHost - Override the
|
|
41
|
+
* @param apiHost - Override the API host. Use to route SDK traffic through a first-party proxy.
|
|
44
42
|
* @param cdnHost - Override the CDN host. Use to route SDK traffic through a first-party proxy.
|
|
45
43
|
* @param flushAt - Number of events to batch before sending
|
|
46
44
|
* @param flushInterval - Time interval (seconds) to flush events
|
|
@@ -53,9 +51,7 @@ export interface IdentifyParams {
|
|
|
53
51
|
* @public
|
|
54
52
|
*/
|
|
55
53
|
export type ZixflowConfig = {
|
|
56
|
-
|
|
57
|
-
migrationSiteId?: string;
|
|
58
|
-
region?: ZixflowRegion;
|
|
54
|
+
apiKey: string;
|
|
59
55
|
logLevel?: ZixflowLogLevel;
|
|
60
56
|
apiHost?: string;
|
|
61
57
|
cdnHost?: string;
|
|
@@ -64,16 +60,13 @@ export type ZixflowConfig = {
|
|
|
64
60
|
screenViewUse?: ScreenView;
|
|
65
61
|
trackApplicationLifecycleEvents?: boolean;
|
|
66
62
|
autoTrackDeviceAttributes?: boolean;
|
|
67
|
-
inApp?: {
|
|
68
|
-
siteId?: string; // Optional: defaults to cdpApiKey if not provided
|
|
69
|
-
};
|
|
63
|
+
inApp?: {};
|
|
70
64
|
push?: {
|
|
71
65
|
android?: {
|
|
72
66
|
pushClickBehavior?: PushClickBehaviorAndroid;
|
|
73
67
|
};
|
|
74
68
|
};
|
|
75
69
|
location?: {
|
|
76
|
-
/** Location tracking mode. Defaults to 'manual' if location config is provided. */
|
|
77
70
|
trackingMode?: ZixflowLocationTrackingMode;
|
|
78
71
|
};
|
|
79
72
|
};
|
|
@@ -96,16 +89,6 @@ export enum ZixflowLogLevel {
|
|
|
96
89
|
Debug = 'debug',
|
|
97
90
|
}
|
|
98
91
|
|
|
99
|
-
/**
|
|
100
|
-
* Data center regions for Zixflow API endpoints.
|
|
101
|
-
*
|
|
102
|
-
* @public
|
|
103
|
-
*/
|
|
104
|
-
export enum ZixflowRegion {
|
|
105
|
-
US = 'US',
|
|
106
|
-
EU = 'EU',
|
|
107
|
-
}
|
|
108
|
-
|
|
109
92
|
/**
|
|
110
93
|
* Screen view tracking behavior configuration.
|
|
111
94
|
*
|
|
@@ -151,7 +151,7 @@ function validateConfig(value: unknown): asserts value is ZixflowConfig {
|
|
|
151
151
|
});
|
|
152
152
|
|
|
153
153
|
const obj = value as ZixflowConfig;
|
|
154
|
-
validateString(obj.
|
|
154
|
+
validateString(obj.apiKey, `${fieldName}.apiKey`, {
|
|
155
155
|
allowEmpty: false,
|
|
156
156
|
usage: usage,
|
|
157
157
|
});
|
package/src/zixflow-cdp.ts
CHANGED
|
@@ -36,18 +36,8 @@ export class Zixflow {
|
|
|
36
36
|
static readonly initialize = async (config: ZixflowConfig) => {
|
|
37
37
|
assert.config(config);
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
config.inApp.siteId = config.cdpApiKey;
|
|
42
|
-
console.log('[Zixflow] Auto-derived inApp.siteId from cdpApiKey');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Warn if siteId doesn't match cdpApiKey (Customer.io legacy issue)
|
|
46
|
-
if (config.inApp && config.inApp.siteId && config.inApp.siteId !== config.cdpApiKey) {
|
|
47
|
-
console.warn(
|
|
48
|
-
'[Zixflow] Warning: inApp.siteId should equal cdpApiKey for Zixflow. ' +
|
|
49
|
-
'Using different values may cause in-app messaging to fail.'
|
|
50
|
-
);
|
|
39
|
+
if (config.inApp) {
|
|
40
|
+
(config.inApp as any).siteId = config.apiKey;
|
|
51
41
|
}
|
|
52
42
|
|
|
53
43
|
if (config.logLevel && config.logLevel !== ZixflowLogLevel.None) {
|
package/src/zixflow.ts
CHANGED
|
@@ -2,7 +2,7 @@ require "json"
|
|
|
2
2
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
4
|
|
|
5
|
-
# Used
|
|
5
|
+
# Used to install native iOS dependencies inside the Notification Service Extension (NSE) target to setup rich push.
|
|
6
6
|
# Note: We need a unique podspec for rich push because the other podspecs in this project install too many dependencies that should not be installed inside of a NSE target. We need this podspec which installs minimal dependencies that are only included in the NSE target.
|
|
7
7
|
Pod::Spec.new do |s|
|
|
8
8
|
s.name = "zixflow-reactnative-richpush"
|
|
@@ -24,7 +24,7 @@ Pod::Spec.new do |s|
|
|
|
24
24
|
# pod "ZixflowDataPipelines", "= 1.0.0"
|
|
25
25
|
# pod "ZixflowCommon", "= 1.0.0"
|
|
26
26
|
|
|
27
|
-
# Subspecs allow
|
|
27
|
+
# Subspecs allow choosing between APN or FCM for rich push notifications.
|
|
28
28
|
# Set default subspec to 'apn' to prevent both APN and FCM dependencies from being installed by default.
|
|
29
29
|
#
|
|
30
30
|
# To override the default subspec, specify the desired subspec in your Podfile. For example:
|
|
@@ -2,7 +2,7 @@ require "json"
|
|
|
2
2
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
4
|
|
|
5
|
-
# Used
|
|
5
|
+
# Used to install native iOS dependencies inside the host iOS app.
|
|
6
6
|
Pod::Spec.new do |s|
|
|
7
7
|
s.name = "zixflow-reactnative"
|
|
8
8
|
s.version = package["version"]
|
|
@@ -30,7 +30,7 @@ Pod::Spec.new do |s|
|
|
|
30
30
|
s.dependency "Zixflow/MessagingInApp", package["zixflowNativeiOSSdkVersion"]
|
|
31
31
|
|
|
32
32
|
# If we do not specify a default_subspec, then *all* dependencies inside of *all* the subspecs will be downloaded by cocoapods.
|
|
33
|
-
#
|
|
33
|
+
# Users should opt into push dependencies - FCM subspec downloads Firebase dependencies while APN does not.
|
|
34
34
|
s.default_subspec = "nopush"
|
|
35
35
|
|
|
36
36
|
s.subspec "nopush" do |ss|
|