@sentiance-react-native/core 6.0.0-beta.9
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 +24 -0
- package/android/build.gradle +17 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradle.properties +2 -0
- package/android/gradlew +185 -0
- package/android/gradlew.bat +89 -0
- package/android/package-json-reader.gradle +62 -0
- package/android/sentiance-version-finder.gradle +17 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/sentiance/react/bridge/core/SentianceConverter.java +364 -0
- package/android/src/main/java/com/sentiance/react/bridge/core/SentianceEmitter.java +46 -0
- package/android/src/main/java/com/sentiance/react/bridge/core/SentianceHelper.java +207 -0
- package/android/src/main/java/com/sentiance/react/bridge/core/SentianceModule.java +529 -0
- package/android/src/main/java/com/sentiance/react/bridge/core/SentiancePackage.java +30 -0
- package/android/src/main/java/com/sentiance/react/bridge/core/UserLinker.java +34 -0
- package/android/src/main/java/com/sentiance/react/bridge/core/base/AbstractSentianceEmitter.java +59 -0
- package/android/src/main/java/com/sentiance/react/bridge/core/base/AbstractSentianceModule.java +33 -0
- package/android/src/main/java/com/sentiance/react/bridge/core/utils/ErrorCodes.java +16 -0
- package/android/src/main/java/com/sentiance/react/bridge/core/utils/SentianceUtils.java +160 -0
- package/android/src/main/java/com/sentiance/react/bridge/core/utils/UserCreationCompletionHandler.java +31 -0
- package/ios/RNSentianceCore+Converter.h +46 -0
- package/ios/RNSentianceCore+Converter.m +986 -0
- package/ios/RNSentianceCore.h +29 -0
- package/ios/RNSentianceCore.m +1036 -0
- package/ios/RNSentianceCore.podspec +24 -0
- package/ios/RNSentianceCore.xcodeproj/project.pbxproj +290 -0
- package/ios/RNSentianceErrorCodes.h +20 -0
- package/ios/RNSentianceErrorCodes.m +22 -0
- package/ios/RNSentianceHelper.h +31 -0
- package/ios/RNSentianceHelper.m +38 -0
- package/ios/RNSentianceNativeInitialization.h +6 -0
- package/ios/RNSentianceNativeInitialization.m +56 -0
- package/lib/core.js +64 -0
- package/lib/index.d.ts +198 -0
- package/lib/index.js +194 -0
- package/lib/utils.js +1 -0
- package/package.json +38 -0
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
declare module "sentiance-react-native-core" {
|
|
2
|
+
import {EmitterSubscription} from "react-native";
|
|
3
|
+
|
|
4
|
+
export type LocationPermission = "ALWAYS" | "ONLY_WHILE_IN_USE" | "NEVER";
|
|
5
|
+
export type SdkInitState =
|
|
6
|
+
"NOT_INITIALIZED"
|
|
7
|
+
| "INIT_IN_PROGRESS"
|
|
8
|
+
| "INITIALIZED"
|
|
9
|
+
| "RESETTING"
|
|
10
|
+
| "UNRECOGNIZED_STATE";
|
|
11
|
+
export type TripType = "TRIP_TYPE_SDK" | "TRIP_TYPE_EXTERNAL";
|
|
12
|
+
|
|
13
|
+
export enum TransportMode {
|
|
14
|
+
UNKNOWN = 1,
|
|
15
|
+
CAR,
|
|
16
|
+
BICYCLE,
|
|
17
|
+
ON_FOOT,
|
|
18
|
+
TRAIN,
|
|
19
|
+
TRAM,
|
|
20
|
+
BUS,
|
|
21
|
+
PLANE,
|
|
22
|
+
BOAT,
|
|
23
|
+
METRO,
|
|
24
|
+
RUNNING,
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface UserInfo {
|
|
28
|
+
userId: string,
|
|
29
|
+
tokenId: string,
|
|
30
|
+
tokenExpiryDate: string,
|
|
31
|
+
isTokenExpired: boolean
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface UserLinkingResult {
|
|
35
|
+
userInfo: UserInfo
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface CreateUserResult {
|
|
39
|
+
userInfo: UserInfo
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface UserCreationOptions {
|
|
43
|
+
appId: string,
|
|
44
|
+
appSecret: string,
|
|
45
|
+
authCode: string,
|
|
46
|
+
platformUrl: string,
|
|
47
|
+
linker: (installId: string) => boolean
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface Location {
|
|
51
|
+
latitude: string;
|
|
52
|
+
longitude: string;
|
|
53
|
+
accuracy?: string; // Android only
|
|
54
|
+
altitude?: string; // Android only
|
|
55
|
+
provider?: string; // Android only
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface StationaryInfo {
|
|
59
|
+
location?: Location;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface TripInfo {
|
|
63
|
+
type: "TRIP_TYPE_SDK" | "TRIP_TYPE_EXTERNAL" | "TRIP_TYPE_UNRECOGNIZED" | "ANY";
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface UserActivity {
|
|
67
|
+
type: "USER_ACTIVITY_TYPE_TRIP" | "USER_ACTIVITY_TYPE_STATIONARY" | "USER_ACTIVITY_TYPE_UNKNOWN" | "USER_ACTIVITY_TYPE_UNRECOGNIZED";
|
|
68
|
+
tripInfo?: TripInfo;
|
|
69
|
+
stationaryInfo?: StationaryInfo;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface MetadataObject {
|
|
73
|
+
[key: string]: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface UserAccessToken {
|
|
77
|
+
tokenId: string;
|
|
78
|
+
expiryDate?: string; // Android only
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface ResetResult {
|
|
82
|
+
initState: string
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface SdkStatus {
|
|
86
|
+
startStatus: string;
|
|
87
|
+
canDetect: boolean;
|
|
88
|
+
isRemoteEnabled: boolean;
|
|
89
|
+
isAccelPresent: boolean;
|
|
90
|
+
isGyroPresent: boolean;
|
|
91
|
+
isGpsPresent: boolean;
|
|
92
|
+
wifiQuotaStatus: string;
|
|
93
|
+
mobileQuotaStatus: string;
|
|
94
|
+
diskQuotaStatus: string;
|
|
95
|
+
locationPermission: LocationPermission;
|
|
96
|
+
isBgAccessPermGranted?: boolean; // iOS only
|
|
97
|
+
isActivityRecognitionPermGranted?: boolean; // Android only
|
|
98
|
+
locationSetting?: string; // Android only
|
|
99
|
+
isAirplaneModeEnabled?: boolean; // Android only
|
|
100
|
+
isLocationAvailable?: boolean; // Android only
|
|
101
|
+
isGooglePlayServicesMissing?: boolean; // Android only
|
|
102
|
+
isBatteryOptimizationEnabled?: boolean; // Android only
|
|
103
|
+
isBatterySavingEnabled?: boolean; // Android only
|
|
104
|
+
isBackgroundProcessingRestricted?: boolean; // Android only
|
|
105
|
+
isPreciseLocationAuthorizationGranted: boolean;
|
|
106
|
+
isSchedulingExactAlarmsPermitted?: boolean; // Android only
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface EnableDisableDetectionsResult {
|
|
110
|
+
sdkStatus: SdkStatus,
|
|
111
|
+
detectionStatus: string
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface SentianceCore {
|
|
115
|
+
userLinkCallback(linkResult: boolean): void;
|
|
116
|
+
|
|
117
|
+
userExists(): Promise<boolean>;
|
|
118
|
+
|
|
119
|
+
enableDetections(): Promise<EnableDisableDetectionsResult>;
|
|
120
|
+
|
|
121
|
+
enableDetectionsWithExpiryDate(expiryEpochTimeMs: number | null): Promise<EnableDisableDetectionsResult>;
|
|
122
|
+
|
|
123
|
+
disableDetections(): Promise<EnableDisableDetectionsResult>;
|
|
124
|
+
|
|
125
|
+
reset(): Promise<ResetResult>;
|
|
126
|
+
|
|
127
|
+
isUserLinked(): Promise<boolean>;
|
|
128
|
+
|
|
129
|
+
getVersion(): Promise<string>;
|
|
130
|
+
|
|
131
|
+
getUserId(): Promise<string>;
|
|
132
|
+
|
|
133
|
+
requestUserAccessToken(): Promise<UserAccessToken>;
|
|
134
|
+
|
|
135
|
+
addUserMetadataField(label: string, value: string): Promise<void>;
|
|
136
|
+
|
|
137
|
+
addUserMetadataFields(label: MetadataObject): Promise<void>;
|
|
138
|
+
|
|
139
|
+
removeUserMetadataField(label: string): Promise<void>;
|
|
140
|
+
|
|
141
|
+
getUserActivity(): Promise<UserActivity>;
|
|
142
|
+
|
|
143
|
+
listenUserActivityUpdates(): Promise<void>;
|
|
144
|
+
|
|
145
|
+
listenTripTimeout(): Promise<void>;
|
|
146
|
+
|
|
147
|
+
startTrip(metadata: MetadataObject | null, hint: TransportMode): Promise<void>;
|
|
148
|
+
|
|
149
|
+
stopTrip(): Promise<void>;
|
|
150
|
+
|
|
151
|
+
isTripOngoing(type: TripType): Promise<boolean>;
|
|
152
|
+
|
|
153
|
+
submitDetections(): Promise<void>;
|
|
154
|
+
|
|
155
|
+
updateSdkNotification(title: string, message: string): Promise<void>;
|
|
156
|
+
|
|
157
|
+
addTripMetadata(metadata: MetadataObject): Promise<boolean>;
|
|
158
|
+
|
|
159
|
+
setAppSessionDataCollectionEnabled(enabled: boolean): Promise<void>;
|
|
160
|
+
|
|
161
|
+
isAppSessionDataCollectionEnabled(): Promise<boolean>;
|
|
162
|
+
|
|
163
|
+
getInitState(): Promise<SdkInitState>;
|
|
164
|
+
|
|
165
|
+
getSdkStatus(): Promise<SdkStatus>;
|
|
166
|
+
|
|
167
|
+
getWiFiQuotaLimit(): Promise<string>;
|
|
168
|
+
|
|
169
|
+
getWiFiQuotaUsage(): Promise<string>;
|
|
170
|
+
|
|
171
|
+
getMobileQuotaLimit(): Promise<string>;
|
|
172
|
+
|
|
173
|
+
getMobileQuotaUsage(): Promise<string>;
|
|
174
|
+
|
|
175
|
+
getDiskQuotaLimit(): Promise<string>;
|
|
176
|
+
|
|
177
|
+
getDiskQuotaUsage(): Promise<string>;
|
|
178
|
+
|
|
179
|
+
disableBatteryOptimization(): Promise<void>;
|
|
180
|
+
|
|
181
|
+
createUser(options: UserCreationOptions): Promise<CreateUserResult>;
|
|
182
|
+
|
|
183
|
+
linkUser(): Promise<UserLinkingResult>;
|
|
184
|
+
|
|
185
|
+
linkUserWithAuthCode(authCode: string): Promise<UserLinkingResult>;
|
|
186
|
+
|
|
187
|
+
addSdkStatusUpdateListener(onSdkStatusUpdated: (sdkStatus: SdkStatus) => void): Promise<EmitterSubscription>;
|
|
188
|
+
|
|
189
|
+
addTripTimeoutListener(onTripTimedOut: () => void): Promise<EmitterSubscription>;
|
|
190
|
+
|
|
191
|
+
addOnDetectionsEnabledListener(onDetectionsEnabled: (sdkStatus: SdkStatus) => void): Promise<EmitterSubscription>;
|
|
192
|
+
|
|
193
|
+
addSdkUserActivityUpdateListener(onUserActivityUpdated: (userActivity: UserActivity) => void): Promise<EmitterSubscription>;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const SentianceCore: SentianceCore;
|
|
197
|
+
export default SentianceCore;
|
|
198
|
+
}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import core from './core';
|
|
2
|
+
import Platform from 'react-native';
|
|
3
|
+
|
|
4
|
+
const enableDetections = () => core.enableDetections();
|
|
5
|
+
const enableDetectionsWithExpiryDate = (expiryTime) => core.enableDetectionsWithExpiryDate(expiryTime);
|
|
6
|
+
const disableDetections = () => core.disableDetections();
|
|
7
|
+
const getInitState = () => core.getInitState();
|
|
8
|
+
const userLinkCallback = (userLinkResult) => core.userLinkCallback(userLinkResult);
|
|
9
|
+
const userExists = () => core.userExists();
|
|
10
|
+
const isUserLinked = () => core.isUserLinked();
|
|
11
|
+
const getVersion = () => core.getVersion();
|
|
12
|
+
const getUserId = () => core.getUserId();
|
|
13
|
+
const requestUserAccessToken = () => core.requestUserAccessToken();
|
|
14
|
+
const addUserMetadataField = (label, value) => core.addUserMetadataField(label, value);
|
|
15
|
+
const addUserMetadataFields = (metadata) => core.addUserMetadataFields(metadata);
|
|
16
|
+
const removeUserMetadataField = (label) => core.removeUserMetadataField(label);
|
|
17
|
+
const getUserActivity = () => core.getUserActivity();
|
|
18
|
+
const listenUserActivityUpdates = () => core.listenUserActivityUpdates();
|
|
19
|
+
const listenTripTimeout = () => core.listenTripTimeout();
|
|
20
|
+
const isTripOngoing = (tripType) => core.isTripOngoing(tripType);
|
|
21
|
+
const updateSdkNotification = (title, message) => core.updateSdkNotification(title, message);
|
|
22
|
+
const addTripMetadata = (metadata) => core.addTripMetadata(metadata);
|
|
23
|
+
const setAppSessionDataCollectionEnabled = (enabled) => core.setAppSessionDataCollectionEnabled(enabled);
|
|
24
|
+
const isAppSessionDataCollectionEnabled = () => core.isAppSessionDataCollectionEnabled();
|
|
25
|
+
const getSdkStatus = () => core.getSdkStatus();
|
|
26
|
+
const getDiskQuotaLimit = () => core.getDiskQuotaLimit();
|
|
27
|
+
const getDiskQuotaUsage = () => core.getDiskQuotaUsage();
|
|
28
|
+
const disableBatteryOptimization = () => core.disableBatteryOptimization();
|
|
29
|
+
const getMobileQuotaLimit = () => core.getMobileQuotaLimit();
|
|
30
|
+
const getMobileQuotaUsage = () => core.getMobileQuotaUsage();
|
|
31
|
+
const getWiFiQuotaLimit = () => core.getWiFiQuotaLimit();
|
|
32
|
+
const getWiFiQuotaUsage = () => core.getWiFiQuotaUsage();
|
|
33
|
+
const linkUserWithAuthCode = (authCode) => core.linkUserWithAuthCode(authCode);
|
|
34
|
+
|
|
35
|
+
var startTrip
|
|
36
|
+
var stopTrip
|
|
37
|
+
var submitDetections
|
|
38
|
+
var reset
|
|
39
|
+
|
|
40
|
+
if (Platform.OS === 'ios') {
|
|
41
|
+
startTrip = (metadata, hint) => core.startTripNewApi(metadata, hint);
|
|
42
|
+
stopTrip = () => core.stopTripNewApi();
|
|
43
|
+
submitDetections = () => core.submitDetectionsNewApi();
|
|
44
|
+
reset = () => core.resetNewApi();
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
startTrip = (metadata, hint) => core.startTrip(metadata, hint);
|
|
48
|
+
stopTrip = () => core.stopTrip();
|
|
49
|
+
submitDetections = () => core.submitDetections();
|
|
50
|
+
reset = () => core.reset();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const linkUser = async (linker) => {
|
|
54
|
+
await core._addUserLinkListener(linker);
|
|
55
|
+
return core.linkUser();
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @typedef {Object} UserCreationOptions
|
|
60
|
+
* @property {String} authCode - Auth Code
|
|
61
|
+
* @property {String} platformUrl - Sentiance Platform URL
|
|
62
|
+
* @property {String} appId - APP ID
|
|
63
|
+
* @property {String} appSecret - APP Secret
|
|
64
|
+
* @property {Function} linker (data) => result - Function to handle the user linking
|
|
65
|
+
*
|
|
66
|
+
* const userCreationOptions = {
|
|
67
|
+
* authCode: "<AUTH_CODE>"
|
|
68
|
+
* }
|
|
69
|
+
*
|
|
70
|
+
* createUser(userCreationOptions);
|
|
71
|
+
*
|
|
72
|
+
* Or with appId / appSecret (Not recommended)
|
|
73
|
+
*
|
|
74
|
+
* const userCreationOptions = {
|
|
75
|
+
* linker : (installId) => {
|
|
76
|
+
* return linkUser(installId);
|
|
77
|
+
* },
|
|
78
|
+
* appId : "<APP_ID>",
|
|
79
|
+
* appSecret: "<APP_SECRET>"
|
|
80
|
+
* }
|
|
81
|
+
*
|
|
82
|
+
* createUser(userCreationOptions);
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Creates a Sentiance user if one does not yet exist, and links it to your app's user on the Sentiance platform.
|
|
88
|
+
* This method requires an initialized SDK, otherwise it throws a runtime exception.
|
|
89
|
+
*
|
|
90
|
+
* @param {UserCreationOptions} userCreationOptions
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* const userCreationOptions = {
|
|
94
|
+
* authCode: "<AUTH_CODE>"
|
|
95
|
+
* }
|
|
96
|
+
*
|
|
97
|
+
* createUser(userCreationOptions);
|
|
98
|
+
*
|
|
99
|
+
* Or with appId / appSecret (Not recommended)
|
|
100
|
+
*
|
|
101
|
+
* const userCreationOptions = {
|
|
102
|
+
* linker : (installId) => {
|
|
103
|
+
* return linkUser(installId);
|
|
104
|
+
* },
|
|
105
|
+
* appId : "<APP_ID>",
|
|
106
|
+
* appSecret: "<APP_SECRET>"
|
|
107
|
+
* }
|
|
108
|
+
*
|
|
109
|
+
* createUser(userCreationOptions);
|
|
110
|
+
*/
|
|
111
|
+
const createUser = async (userCreationOptions) => {
|
|
112
|
+
const appId = userCreationOptions.appId;
|
|
113
|
+
const appSecret = userCreationOptions.appSecret;
|
|
114
|
+
const authCode = userCreationOptions.authCode;
|
|
115
|
+
const platformUrl = userCreationOptions.platformUrl;
|
|
116
|
+
const linker = userCreationOptions.linker;
|
|
117
|
+
|
|
118
|
+
if (!appId && !appSecret && !authCode) {
|
|
119
|
+
return Promise.reject('Invalid userCreationOptions passed, please set authCode or appId/appSecret with a linker to create user');
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (authCode) {
|
|
123
|
+
return core.createLinkedUserWithAuthCode(authCode, platformUrl);
|
|
124
|
+
} else if (linker) {
|
|
125
|
+
await core._addUserLinkListener(linker);
|
|
126
|
+
return core.createLinkedUser(appId, appSecret, platformUrl);
|
|
127
|
+
} else {
|
|
128
|
+
return core.createUnlinkedUser(appId, appSecret, platformUrl);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const addSdkStatusUpdateListener = core._addSdkStatusUpdateListener;
|
|
133
|
+
const addOnDetectionsEnabledListener = core._addOnDetectionsEnabledListener;
|
|
134
|
+
const addSdkUserActivityUpdateListener = core._addSdkUserActivityUpdateListener;
|
|
135
|
+
const addTripTimeoutListener = core._addTripTimeoutListener;
|
|
136
|
+
|
|
137
|
+
const transportModes = {};
|
|
138
|
+
(function (transportModes) {
|
|
139
|
+
transportModes[transportModes["UNKNOWN"] = 1] = "UNKNOWN";
|
|
140
|
+
transportModes[transportModes["CAR"] = 2] = "CAR";
|
|
141
|
+
transportModes[transportModes["BICYCLE"] = 3] = "BICYCLE";
|
|
142
|
+
transportModes[transportModes["ON_FOOT"] = 4] = "ON_FOOT";
|
|
143
|
+
transportModes[transportModes["TRAIN"] = 5] = "TRAIN";
|
|
144
|
+
transportModes[transportModes["TRAM"] = 6] = "TRAM";
|
|
145
|
+
transportModes[transportModes["BUS"] = 7] = "BUS";
|
|
146
|
+
transportModes[transportModes["PLANE"] = 8] = "PLANE";
|
|
147
|
+
transportModes[transportModes["BOAT"] = 9] = "BOAT";
|
|
148
|
+
transportModes[transportModes["METRO"] = 10] = "METRO";
|
|
149
|
+
transportModes[transportModes["RUNNING"] = 11] = "RUNNING";
|
|
150
|
+
})(transportModes);
|
|
151
|
+
|
|
152
|
+
module.exports = {
|
|
153
|
+
userLinkCallback,
|
|
154
|
+
userExists,
|
|
155
|
+
enableDetections,
|
|
156
|
+
enableDetectionsWithExpiryDate,
|
|
157
|
+
reset,
|
|
158
|
+
isUserLinked,
|
|
159
|
+
getVersion,
|
|
160
|
+
getUserId,
|
|
161
|
+
requestUserAccessToken,
|
|
162
|
+
addUserMetadataField,
|
|
163
|
+
addUserMetadataFields,
|
|
164
|
+
removeUserMetadataField,
|
|
165
|
+
getUserActivity,
|
|
166
|
+
listenUserActivityUpdates,
|
|
167
|
+
startTrip,
|
|
168
|
+
stopTrip,
|
|
169
|
+
isTripOngoing,
|
|
170
|
+
submitDetections,
|
|
171
|
+
updateSdkNotification,
|
|
172
|
+
addTripMetadata,
|
|
173
|
+
setAppSessionDataCollectionEnabled,
|
|
174
|
+
isAppSessionDataCollectionEnabled,
|
|
175
|
+
disableDetections,
|
|
176
|
+
getInitState,
|
|
177
|
+
getSdkStatus,
|
|
178
|
+
getDiskQuotaLimit,
|
|
179
|
+
getDiskQuotaUsage,
|
|
180
|
+
getMobileQuotaLimit,
|
|
181
|
+
getMobileQuotaUsage,
|
|
182
|
+
getWiFiQuotaLimit,
|
|
183
|
+
getWiFiQuotaUsage,
|
|
184
|
+
disableBatteryOptimization,
|
|
185
|
+
createUser,
|
|
186
|
+
linkUser,
|
|
187
|
+
linkUserWithAuthCode,
|
|
188
|
+
addSdkStatusUpdateListener,
|
|
189
|
+
addOnDetectionsEnabledListener,
|
|
190
|
+
addSdkUserActivityUpdateListener,
|
|
191
|
+
addTripTimeoutListener,
|
|
192
|
+
listenTripTimeout,
|
|
193
|
+
transportModes
|
|
194
|
+
};
|
package/lib/utils.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const varToString = varObj => Object.keys(varObj)[0];
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sentiance-react-native/core",
|
|
3
|
+
"version": "6.0.0-beta.9",
|
|
4
|
+
"description": "React Native Sentiance core library",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"typings": "lib/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
+
"lint": "npx eslint lib/index.d.ts"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"react-native",
|
|
13
|
+
"core",
|
|
14
|
+
"sentiance"
|
|
15
|
+
],
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"react-native": ">=0.60"
|
|
18
|
+
},
|
|
19
|
+
"author": "",
|
|
20
|
+
"license": "",
|
|
21
|
+
"homepage": "https://github.com/sentiance/react-native-sentiance/sentiance#readme",
|
|
22
|
+
"repository": "github:sentiance/react-native-sentiance",
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"sdkVersions": {
|
|
27
|
+
"android": {
|
|
28
|
+
"minSdk": 23,
|
|
29
|
+
"targetSdk": 31,
|
|
30
|
+
"compileSdk": 31,
|
|
31
|
+
"buildTools": "30.0.3",
|
|
32
|
+
"sentiance": "6.0.0-beta4"
|
|
33
|
+
},
|
|
34
|
+
"ios": {
|
|
35
|
+
"sentiance": "6.0.0-beta10"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|