apps-sdk 1.1.15 → 1.1.17

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/config.js CHANGED
@@ -71,4 +71,6 @@ export var FORCED_UPDATE = false;
71
71
 
72
72
  export var CONFIG_EXTRA = {};
73
73
 
74
+ export var QUICK_ACTIONS = {};
75
+
74
76
  export const DEBUG_MODE = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps-sdk",
3
- "version": "1.1.15",
3
+ "version": "1.1.17",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -26,9 +26,10 @@ class Networking {
26
26
  this.setEvents(initData.data.attribution);
27
27
  this.setEventsMixPanel(initData.data.tracking);
28
28
  this.setPayWallData(initData);
29
- this.checkSubscription();
29
+ await this.checkSubscription();
30
30
  this.setForcedUpdate(initData.data);
31
31
  this.setConfigExtra(initData.data.config || {});
32
+ this.setQuickActions(initData.data.quick_actions);
32
33
  if (initData.data.image) {
33
34
  this.setImageCompression(initData.data.image);
34
35
  }
@@ -184,6 +185,14 @@ class Networking {
184
185
  return config.CONFIG_EXTRA;
185
186
  }
186
187
 
188
+ setQuickActions = (quickActions) => {
189
+ config.QUICK_ACTIONS = quickActions;
190
+ }
191
+
192
+ getQuickActions = () => {
193
+ return config.QUICK_ACTIONS;
194
+ }
195
+
187
196
  setEvents(events) {
188
197
  events && (config.EVENTS = events);
189
198
  }
@@ -57,9 +57,9 @@ class PayWallLogic {
57
57
  "subscription_status": "premium",
58
58
  "plan_type": purchase.productId,
59
59
  });
60
- if (data.subs_id) {
60
+ if (purchaseResponse.subs_previous_id || data.subs_id) {
61
61
  await Mixpanel.resetUserID();
62
- await Mixpanel.identifyUser(data.subs_id);
62
+ await Mixpanel.identifyUser(purchaseResponse.subs_previous_id || data.subs_id);
63
63
  console.log('SDK purchaseUpdatedListener Mixpanel identifyUser', data.subs_id);
64
64
  } else {
65
65
  console.log('No subs_id in purchaseResp');
package/types/index.d.ts CHANGED
@@ -84,6 +84,7 @@ declare module 'apps-sdk' {
84
84
  setPayWallData(payWallData: any): void;
85
85
  getPayWallData(): any;
86
86
  getConfigExtra(): any;
87
+ getQuickActions(): any;
87
88
  }
88
89
 
89
90
  export class Storage {