apps-sdk 1.0.39 → 1.0.40

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps-sdk",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -24,7 +24,7 @@ class Networking {
24
24
  event : event
25
25
  };
26
26
 
27
- await fetch(config.ENDPOINTS.TRACKING, {
27
+ await fetch(config.ENDPOINTS.EVENTS_PUSH, {
28
28
  method: 'POST',
29
29
  headers: {
30
30
  Accept: 'application/json',
@@ -42,7 +42,7 @@ class Networking {
42
42
  async executeInit() {
43
43
  config.DEBUG_MODE && console.debug("executeInit");
44
44
  try {
45
- let initData = await this.request(config.ENDPOINTS.INIT);
45
+ let initData = await this.request(config.ENDPOINTS.CONFIG);
46
46
  if (initData) {
47
47
  config.DEBUG_MODE && console.debug("initData", JSON.stringify(initData));
48
48
  this.setEndpoints(initData.data.domains);
@@ -58,7 +58,7 @@ class Networking {
58
58
  getUserID = async () => {
59
59
  config.DEBUG_MODE && console.debug("getUserID");
60
60
  try {
61
- let userIDData = await this.request(config.ENDPOINTS.GET_USER_ID);
61
+ let userIDData = await this.request(config.ENDPOINTS.USER_CREATE_ID);
62
62
  if (userIDData && userIDData.success === 1) {
63
63
  config.DEBUG_MODE && console.debug("new userID", userIDData.data.external_id);
64
64
  return userIDData.data.external_id;
@@ -72,7 +72,7 @@ class Networking {
72
72
  async setToken(token) {
73
73
  try {
74
74
  const installID = await storage.getData('install_id');
75
- const response = await fetch(config.ENDPOINTS.TRACKING.replace('[TOKEN]', token).replace('[INSTALL_ID]', installID));
75
+ const response = await fetch(config.ENDPOINTS.EVENTS_PUSH.replace('[TOKEN]', token).replace('[INSTALL_ID]', installID));
76
76
  const json = await response.json();
77
77
  if(json.success){
78
78
  return true;
@@ -187,7 +187,7 @@ class Networking {
187
187
  sendEvent = async (eventType, eventKeyword, eventData={}) => {
188
188
  config.DEBUG_MODE && console.debug("sendEvent", eventType, eventKeyword, eventData);
189
189
  try {
190
- let eventResponse = await this.request(config.ENDPOINTS.TRACKING, {
190
+ let eventResponse = await this.request(config.ENDPOINTS.EVENTS_PUSH, {
191
191
  event_name: eventType,
192
192
  event_type: eventType,
193
193
  action: eventKeyword,