@jetthai/cuora 1.1.78 → 1.1.79

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/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.1.79](https://github.com/jetthai/cuora-module/compare/v1.1.78...v1.1.79) (2023-04-18)
6
+
5
7
  ### [1.1.78](https://github.com/jetthai/cuora-module/compare/v1.1.66-1...v1.1.78) (2023-04-14)
6
8
 
7
9
  ### [1.1.77](https://github.com/jetthai/cuora-module/compare/v1.1.76...v1.1.77) (2023-04-13)
package/dist/bundle.mjs CHANGED
@@ -15689,7 +15689,7 @@ function auth (request) {
15689
15689
  });
15690
15690
  sentry.setTag('dt', dt);
15691
15691
 
15692
- const referralCode = storage.get('referralCode');
15692
+ const affiliateCode = storage.get('affiliateCode');
15693
15693
  const messages = {
15694
15694
  url: window.location.href,
15695
15695
  channelOrders: [
@@ -15697,13 +15697,13 @@ function auth (request) {
15697
15697
  { channel: defaultChannel, subchannel: defaultSubchannel },
15698
15698
  { channel: channel, subchannel: subchannel },
15699
15699
  ],
15700
- referralCode,
15700
+ affiliateCode,
15701
15701
  };
15702
15702
  sentry.captureMessage(JSON.stringify(messages));
15703
15703
 
15704
15704
  const referralObj = {};
15705
- if (![undefined, 'undefined', null, 'null'].includes(referralCode)) {
15706
- referralObj.referralCode = referralCode;
15705
+ if (![undefined, 'undefined', null, 'null'].includes(affiliateCode)) {
15706
+ referralObj.ac = affiliateCode;
15707
15707
  } else {
15708
15708
  (referralObj.channel = storage.get('channel') || defaultChannel || channel),
15709
15709
  (referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel);
@@ -16822,7 +16822,7 @@ function common (request) {
16822
16822
  sentNormalBroadcastList: [],
16823
16823
  channel: null,
16824
16824
  subchannel: null,
16825
- referralCode: null,
16825
+ affiliateCode: null,
16826
16826
  },
16827
16827
  states: {
16828
16828
  config: {
@@ -16938,7 +16938,7 @@ function common (request) {
16938
16938
  let urlParams = new URLSearchParams(window.location.search);
16939
16939
  const channel = urlParams.get('channel') || storage.get('channel') || defaultChannel || 'official';
16940
16940
  const subchannel = urlParams.get('subchannel') || storage.get('subchannel') || defaultSubchannel || 'pwa';
16941
- const referralCode = urlParams.get('referralCode') || storage.get('referralCode');
16941
+ const affiliateCode = urlParams.get('ac') || storage.get('affiliateCode') || urlParams.get('referralCode') || storage.get('referralCode');
16942
16942
 
16943
16943
  storage.set('channel', channel, {
16944
16944
  path: '/',
@@ -16948,7 +16948,7 @@ function common (request) {
16948
16948
  path: '/',
16949
16949
  maxAge: 60 * 60 * 24 * 7,
16950
16950
  });
16951
- storage.set('referralCode', referralCode, {
16951
+ storage.set('affiliateCode', affiliateCode, {
16952
16952
  path: '/',
16953
16953
  maxAge: 60 * 60 * 24 * 7,
16954
16954
  });
@@ -16956,7 +16956,7 @@ function common (request) {
16956
16956
  return {
16957
16957
  channel,
16958
16958
  subchannel,
16959
- referralCode,
16959
+ affiliateCode,
16960
16960
  }
16961
16961
  }
16962
16962
  }),
@@ -20332,7 +20332,7 @@ function user_sign_up (request) {
20332
20332
  const dt = await getDeviceToken({ fpToken, sentry, hosts: request.hosts });
20333
20333
  sentry.setTag('dt', dt);
20334
20334
 
20335
- const referralCode = storage.get('referralCode');
20335
+ const affiliateCode = storage.get('affiliateCode');
20336
20336
  const messages = {
20337
20337
  url: window.location.href,
20338
20338
  channelOrders: [
@@ -20340,13 +20340,13 @@ function user_sign_up (request) {
20340
20340
  { channel: defaultChannel, subchannel: defaultSubchannel },
20341
20341
  { channel: channel, subchannel: subchannel },
20342
20342
  ],
20343
- referralCode,
20343
+ affiliateCode,
20344
20344
  };
20345
20345
  sentry.captureMessage(JSON.stringify(messages));
20346
20346
 
20347
20347
  const referralObj = {};
20348
- if (![undefined, 'undefined', null, 'null'].includes(referralCode)) {
20349
- referralObj.referralCode = referralCode;
20348
+ if (![undefined, 'undefined', null, 'null'].includes(affiliateCode)) {
20349
+ referralObj.ac = affiliateCode;
20350
20350
  } else {
20351
20351
  (referralObj.channel = storage.get('channel') || defaultChannel || channel),
20352
20352
  (referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.78",
3
+ "version": "1.1.79",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -330,7 +330,7 @@ export default function (request) {
330
330
  })
331
331
  sentry.setTag('dt', dt)
332
332
 
333
- const referralCode = storage.get('referralCode')
333
+ const affiliateCode = storage.get('affiliateCode')
334
334
  const messages = {
335
335
  url: window.location.href,
336
336
  channelOrders: [
@@ -338,13 +338,13 @@ export default function (request) {
338
338
  { channel: defaultChannel, subchannel: defaultSubchannel },
339
339
  { channel: channel, subchannel: subchannel },
340
340
  ],
341
- referralCode,
341
+ affiliateCode,
342
342
  }
343
343
  sentry.captureMessage(JSON.stringify(messages))
344
344
 
345
345
  const referralObj = {}
346
- if (![undefined, 'undefined', null, 'null'].includes(referralCode)) {
347
- referralObj.referralCode = referralCode
346
+ if (![undefined, 'undefined', null, 'null'].includes(affiliateCode)) {
347
+ referralObj.ac = affiliateCode
348
348
  } else {
349
349
  ;(referralObj.channel = storage.get('channel') || defaultChannel || channel),
350
350
  (referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel)
@@ -41,7 +41,7 @@ export default function (request) {
41
41
  sentNormalBroadcastList: [],
42
42
  channel: null,
43
43
  subchannel: null,
44
- referralCode: null,
44
+ affiliateCode: null,
45
45
  },
46
46
  states: {
47
47
  config: {
@@ -157,7 +157,7 @@ export default function (request) {
157
157
  let urlParams = new URLSearchParams(window.location.search)
158
158
  const channel = urlParams.get('channel') || storage.get('channel') || defaultChannel || 'official'
159
159
  const subchannel = urlParams.get('subchannel') || storage.get('subchannel') || defaultSubchannel || 'pwa'
160
- const referralCode = urlParams.get('referralCode') || storage.get('referralCode')
160
+ const affiliateCode = urlParams.get('ac') || storage.get('affiliateCode') || urlParams.get('referralCode') || storage.get('referralCode')
161
161
 
162
162
  storage.set('channel', channel, {
163
163
  path: '/',
@@ -167,7 +167,7 @@ export default function (request) {
167
167
  path: '/',
168
168
  maxAge: 60 * 60 * 24 * 7,
169
169
  })
170
- storage.set('referralCode', referralCode, {
170
+ storage.set('affiliateCode', affiliateCode, {
171
171
  path: '/',
172
172
  maxAge: 60 * 60 * 24 * 7,
173
173
  })
@@ -175,7 +175,7 @@ export default function (request) {
175
175
  return {
176
176
  channel,
177
177
  subchannel,
178
- referralCode,
178
+ affiliateCode,
179
179
  }
180
180
  }
181
181
  }),
@@ -112,7 +112,7 @@ export default function (request) {
112
112
  const dt = await getDeviceToken({ fpToken, sentry, hosts: request.hosts })
113
113
  sentry.setTag('dt', dt)
114
114
 
115
- const referralCode = storage.get('referralCode')
115
+ const affiliateCode = storage.get('affiliateCode')
116
116
  const messages = {
117
117
  url: window.location.href,
118
118
  channelOrders: [
@@ -120,13 +120,13 @@ export default function (request) {
120
120
  { channel: defaultChannel, subchannel: defaultSubchannel },
121
121
  { channel: channel, subchannel: subchannel },
122
122
  ],
123
- referralCode,
123
+ affiliateCode,
124
124
  }
125
125
  sentry.captureMessage(JSON.stringify(messages))
126
126
 
127
127
  const referralObj = {}
128
- if (![undefined, 'undefined', null, 'null'].includes(referralCode)) {
129
- referralObj.referralCode = referralCode
128
+ if (![undefined, 'undefined', null, 'null'].includes(affiliateCode)) {
129
+ referralObj.ac = affiliateCode
130
130
  } else {
131
131
  ;(referralObj.channel = storage.get('channel') || defaultChannel || channel),
132
132
  (referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel)