apps-sdk 1.0.3 → 1.0.4
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/index.js +2 -2
- package/package.json +1 -1
- package/src/libraries/Session.js +1 -0
- package/types/index.d.ts +8 -4
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {NotificationsPush, Networking, Storage, Session} from "./src/libraries";
|
|
2
2
|
|
|
3
|
-
class
|
|
3
|
+
class AppsSDK {
|
|
4
4
|
initializePushNotifications = async() => {
|
|
5
5
|
await NotificationsPush.initialize();
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ class WebappsSDK {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const Core = new
|
|
14
|
+
const Core = new AppsSDK();
|
|
15
15
|
export default {
|
|
16
16
|
initializePushNotifications: Core.initializePushNotifications,
|
|
17
17
|
networking: Networking,
|
package/package.json
CHANGED
package/src/libraries/Session.js
CHANGED
|
@@ -46,6 +46,7 @@ class Session {
|
|
|
46
46
|
lang : Localization.getLocales()[0].languageCode || 'en',
|
|
47
47
|
package : Platform.OS === 'android' ? Constants.expoConfig.android.package : Constants.expoConfig.ios.bundleIdentifier,
|
|
48
48
|
};
|
|
49
|
+
config.DEBUG_MODE && console.debug("storeSessionStructure - sessionData: ", this.sessionData);
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
checkFirstOpen = async () => {
|
package/types/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
declare module 'apps-sdk' {
|
|
2
|
-
|
|
2
|
+
class Networking {
|
|
3
3
|
trackEvent(wid: any, event: any, user_id?: any): Promise<void>;
|
|
4
4
|
executeInit(): Promise<void>;
|
|
5
5
|
setToken(token: any): Promise<boolean | null>;
|
|
6
6
|
request(url: string, data?: any): Promise<any>;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
class Storage {
|
|
10
10
|
storeData(key: string, value: any): Promise<void>;
|
|
11
11
|
getData(key: string): Promise<any>;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
class Session {
|
|
15
15
|
sessionData: any;
|
|
16
16
|
sessionID: string | null;
|
|
17
17
|
isFirstOpen: boolean;
|
|
@@ -30,8 +30,12 @@ declare module 'apps-sdk' {
|
|
|
30
30
|
setIsDevUser(isDevUser: boolean): void;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
class AppsSDK {
|
|
34
|
+
initializePushNotifications(): Promise<string>;
|
|
35
|
+
}
|
|
36
|
+
|
|
34
37
|
export const networking: Networking;
|
|
35
38
|
export const storage: Storage;
|
|
36
39
|
export const session: Session;
|
|
40
|
+
export const SDK: AppsSDK;
|
|
37
41
|
}
|