@inngageregistry/inngage-react 4.0.1 → 4.0.2
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/dist/Inngage.d.ts +7 -1
- package/dist/Inngage.js +15 -13
- package/package.json +1 -1
package/dist/Inngage.d.ts
CHANGED
|
@@ -14,6 +14,12 @@ interface SendEventProps {
|
|
|
14
14
|
conversionNotId?: string;
|
|
15
15
|
eventValues?: any;
|
|
16
16
|
}
|
|
17
|
+
interface AddUserDataProps {
|
|
18
|
+
identifier?: string;
|
|
19
|
+
customFields?: Record<string, any>;
|
|
20
|
+
email?: string;
|
|
21
|
+
phoneNumber?: string;
|
|
22
|
+
}
|
|
17
23
|
declare class Inngage {
|
|
18
24
|
private static instance;
|
|
19
25
|
private apiService;
|
|
@@ -22,7 +28,7 @@ declare class Inngage {
|
|
|
22
28
|
static notificationListener(firebaseListenCallback?: (data: Record<string, string>) => void, imageNotification?: string, colorNotification?: string): void;
|
|
23
29
|
static subscribe({ appToken, friendlyIdentifier, customFields, phoneNumber, email, }: SubscriptionProps): Promise<Response>;
|
|
24
30
|
static sendEvent({ eventName, conversionEvent, conversionValue, conversionNotId, eventValues, }: SendEventProps): Promise<Response>;
|
|
25
|
-
static addUserData(customFields:
|
|
31
|
+
static addUserData({ identifier, customFields, email, phoneNumber }: AddUserDataProps): Promise<Response>;
|
|
26
32
|
static setDebugMode(value: boolean): void;
|
|
27
33
|
}
|
|
28
34
|
export default Inngage;
|
package/dist/Inngage.js
CHANGED
|
@@ -106,22 +106,22 @@ class Inngage {
|
|
|
106
106
|
const subscription = {
|
|
107
107
|
registerSubscriberRequest: {
|
|
108
108
|
app_token: appToken,
|
|
109
|
-
identifier: friendlyIdentifier,
|
|
109
|
+
identifier: friendlyIdentifier ?? uuid,
|
|
110
110
|
registration: respToken,
|
|
111
111
|
platform: DeviceInfo.getSystemName(),
|
|
112
112
|
sdk: DeviceInfo.getBuildNumber(),
|
|
113
|
-
|
|
114
|
-
deviceManufacturer,
|
|
115
|
-
osLocale,
|
|
116
|
-
osLanguage,
|
|
113
|
+
device_model: DeviceInfo.getModel(),
|
|
114
|
+
device_manufacturer: deviceManufacturer,
|
|
115
|
+
os_locale: osLocale,
|
|
116
|
+
os_language: osLanguage,
|
|
117
117
|
os_version: DeviceInfo.getReadableVersion(),
|
|
118
118
|
app_version: DeviceInfo.getBuildNumber(),
|
|
119
|
-
appInstalledIn,
|
|
120
|
-
appUpdatedIn,
|
|
119
|
+
app_installed_in: appInstalledIn,
|
|
120
|
+
app_updated_in: appUpdatedIn,
|
|
121
121
|
uuid,
|
|
122
|
-
phone_Number: phoneNumber,
|
|
123
|
-
email: email,
|
|
124
|
-
|
|
122
|
+
phone_Number: phoneNumber ?? '',
|
|
123
|
+
email: email ?? '',
|
|
124
|
+
custom_field: customFields ?? {},
|
|
125
125
|
},
|
|
126
126
|
};
|
|
127
127
|
return inngage.apiService.subscribe(subscription);
|
|
@@ -143,13 +143,15 @@ class Inngage {
|
|
|
143
143
|
};
|
|
144
144
|
return inngage.apiService.sendEvent(request);
|
|
145
145
|
}
|
|
146
|
-
static async addUserData(customFields) {
|
|
146
|
+
static async addUserData({ identifier, customFields, email, phoneNumber }) {
|
|
147
147
|
const inngage = Inngage.getInstance();
|
|
148
148
|
const request = {
|
|
149
149
|
fieldsRequest: {
|
|
150
150
|
appToken: InngageProperties.appToken,
|
|
151
|
-
identifier:
|
|
152
|
-
|
|
151
|
+
identifier: identifier,
|
|
152
|
+
custom_field: customFields,
|
|
153
|
+
email: email,
|
|
154
|
+
phone_number: phoneNumber
|
|
153
155
|
},
|
|
154
156
|
};
|
|
155
157
|
return inngage.apiService.addUserData(request);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inngageregistry/inngage-react",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "Inngage Plugin for React Native applications for marketing campaign optimization using Push Notification.",
|
|
5
5
|
"author": "Inngage Developer",
|
|
6
6
|
"license": "ISC",
|