cryptique-sdk 1.0.6 → 1.0.8
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/lib/cjs/index.js +40 -40
- package/lib/esm/index.js +40 -40
- package/lib/umd/index.js +40 -40
- package/package.json +1 -1
package/lib/cjs/index.js
CHANGED
|
@@ -6741,10 +6741,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6741
6741
|
|
|
6742
6742
|
try {
|
|
6743
6743
|
const session = StorageManager.loadSession();
|
|
6744
|
-
const
|
|
6744
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6745
6745
|
|
|
6746
|
-
if (!session || !
|
|
6747
|
-
console.error('❌ [People] No active session or
|
|
6746
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6747
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6748
6748
|
return { success: false, error: 'No active session' };
|
|
6749
6749
|
}
|
|
6750
6750
|
|
|
@@ -6757,7 +6757,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6757
6757
|
},
|
|
6758
6758
|
body: JSON.stringify({
|
|
6759
6759
|
siteId: getCurrentSiteId(),
|
|
6760
|
-
userId:
|
|
6760
|
+
userId: currentDistinctId,
|
|
6761
6761
|
properties: properties
|
|
6762
6762
|
})
|
|
6763
6763
|
});
|
|
@@ -6791,10 +6791,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6791
6791
|
|
|
6792
6792
|
try {
|
|
6793
6793
|
const session = StorageManager.loadSession();
|
|
6794
|
-
const
|
|
6794
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6795
6795
|
|
|
6796
|
-
if (!session || !
|
|
6797
|
-
console.error('❌ [People] No active session or
|
|
6796
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6797
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6798
6798
|
return { success: false, error: 'No active session' };
|
|
6799
6799
|
}
|
|
6800
6800
|
|
|
@@ -6807,7 +6807,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6807
6807
|
},
|
|
6808
6808
|
body: JSON.stringify({
|
|
6809
6809
|
siteId: getCurrentSiteId(),
|
|
6810
|
-
userId:
|
|
6810
|
+
userId: currentDistinctId,
|
|
6811
6811
|
properties: properties
|
|
6812
6812
|
})
|
|
6813
6813
|
});
|
|
@@ -6841,10 +6841,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6841
6841
|
|
|
6842
6842
|
try {
|
|
6843
6843
|
const session = StorageManager.loadSession();
|
|
6844
|
-
const
|
|
6844
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6845
6845
|
|
|
6846
|
-
if (!session || !
|
|
6847
|
-
console.error('❌ [People] No active session or
|
|
6846
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6847
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6848
6848
|
return { success: false, error: 'No active session' };
|
|
6849
6849
|
}
|
|
6850
6850
|
|
|
@@ -6857,7 +6857,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6857
6857
|
},
|
|
6858
6858
|
body: JSON.stringify({
|
|
6859
6859
|
siteId: getCurrentSiteId(),
|
|
6860
|
-
userId:
|
|
6860
|
+
userId: currentDistinctId,
|
|
6861
6861
|
keys: keys
|
|
6862
6862
|
})
|
|
6863
6863
|
});
|
|
@@ -6897,10 +6897,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6897
6897
|
|
|
6898
6898
|
try {
|
|
6899
6899
|
const session = StorageManager.loadSession();
|
|
6900
|
-
const
|
|
6900
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6901
6901
|
|
|
6902
|
-
if (!session || !
|
|
6903
|
-
console.error('❌ [People] No active session or
|
|
6902
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6903
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6904
6904
|
return { success: false, error: 'No active session' };
|
|
6905
6905
|
}
|
|
6906
6906
|
|
|
@@ -6913,7 +6913,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6913
6913
|
},
|
|
6914
6914
|
body: JSON.stringify({
|
|
6915
6915
|
siteId: getCurrentSiteId(),
|
|
6916
|
-
userId:
|
|
6916
|
+
userId: currentDistinctId,
|
|
6917
6917
|
key: key,
|
|
6918
6918
|
amount: amount
|
|
6919
6919
|
})
|
|
@@ -6954,10 +6954,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6954
6954
|
|
|
6955
6955
|
try {
|
|
6956
6956
|
const session = StorageManager.loadSession();
|
|
6957
|
-
const
|
|
6957
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6958
6958
|
|
|
6959
|
-
if (!session || !
|
|
6960
|
-
console.error('❌ [People] No active session or
|
|
6959
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6960
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6961
6961
|
return { success: false, error: 'No active session' };
|
|
6962
6962
|
}
|
|
6963
6963
|
|
|
@@ -6970,7 +6970,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6970
6970
|
},
|
|
6971
6971
|
body: JSON.stringify({
|
|
6972
6972
|
siteId: getCurrentSiteId(),
|
|
6973
|
-
userId:
|
|
6973
|
+
userId: currentDistinctId,
|
|
6974
6974
|
key: key,
|
|
6975
6975
|
values: values
|
|
6976
6976
|
})
|
|
@@ -7011,10 +7011,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7011
7011
|
|
|
7012
7012
|
try {
|
|
7013
7013
|
const session = StorageManager.loadSession();
|
|
7014
|
-
const
|
|
7014
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7015
7015
|
|
|
7016
|
-
if (!session || !
|
|
7017
|
-
console.error('❌ [People] No active session or
|
|
7016
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7017
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7018
7018
|
return { success: false, error: 'No active session' };
|
|
7019
7019
|
}
|
|
7020
7020
|
|
|
@@ -7027,7 +7027,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7027
7027
|
},
|
|
7028
7028
|
body: JSON.stringify({
|
|
7029
7029
|
siteId: getCurrentSiteId(),
|
|
7030
|
-
userId:
|
|
7030
|
+
userId: currentDistinctId,
|
|
7031
7031
|
key: key,
|
|
7032
7032
|
values: values
|
|
7033
7033
|
})
|
|
@@ -7068,10 +7068,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7068
7068
|
|
|
7069
7069
|
try {
|
|
7070
7070
|
const session = StorageManager.loadSession();
|
|
7071
|
-
const
|
|
7071
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7072
7072
|
|
|
7073
|
-
if (!session || !
|
|
7074
|
-
console.error('❌ [People] No active session or
|
|
7073
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7074
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7075
7075
|
return { success: false, error: 'No active session' };
|
|
7076
7076
|
}
|
|
7077
7077
|
|
|
@@ -7084,7 +7084,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7084
7084
|
},
|
|
7085
7085
|
body: JSON.stringify({
|
|
7086
7086
|
siteId: getCurrentSiteId(),
|
|
7087
|
-
userId:
|
|
7087
|
+
userId: currentDistinctId,
|
|
7088
7088
|
key: key,
|
|
7089
7089
|
values: values
|
|
7090
7090
|
})
|
|
@@ -7120,10 +7120,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7120
7120
|
|
|
7121
7121
|
try {
|
|
7122
7122
|
const session = StorageManager.loadSession();
|
|
7123
|
-
const
|
|
7123
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7124
7124
|
|
|
7125
|
-
if (!session || !
|
|
7126
|
-
console.error('❌ [People] No active session or
|
|
7125
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7126
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7127
7127
|
return { success: false, error: 'No active session' };
|
|
7128
7128
|
}
|
|
7129
7129
|
|
|
@@ -7136,7 +7136,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7136
7136
|
},
|
|
7137
7137
|
body: JSON.stringify({
|
|
7138
7138
|
siteId: getCurrentSiteId(),
|
|
7139
|
-
userId:
|
|
7139
|
+
userId: currentDistinctId,
|
|
7140
7140
|
amount: amount,
|
|
7141
7141
|
properties: properties
|
|
7142
7142
|
})
|
|
@@ -7165,10 +7165,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7165
7165
|
async clearCharges() {
|
|
7166
7166
|
try {
|
|
7167
7167
|
const session = StorageManager.loadSession();
|
|
7168
|
-
const
|
|
7168
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7169
7169
|
|
|
7170
|
-
if (!session || !
|
|
7171
|
-
console.error('❌ [People] No active session or
|
|
7170
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7171
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7172
7172
|
return { success: false, error: 'No active session' };
|
|
7173
7173
|
}
|
|
7174
7174
|
|
|
@@ -7181,7 +7181,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7181
7181
|
},
|
|
7182
7182
|
body: JSON.stringify({
|
|
7183
7183
|
siteId: getCurrentSiteId(),
|
|
7184
|
-
userId:
|
|
7184
|
+
userId: currentDistinctId
|
|
7185
7185
|
})
|
|
7186
7186
|
});
|
|
7187
7187
|
|
|
@@ -7208,10 +7208,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7208
7208
|
async deleteUser() {
|
|
7209
7209
|
try {
|
|
7210
7210
|
const session = StorageManager.loadSession();
|
|
7211
|
-
const
|
|
7211
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7212
7212
|
|
|
7213
|
-
if (!session || !
|
|
7214
|
-
console.error('❌ [People] No active session or
|
|
7213
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7214
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7215
7215
|
return { success: false, error: 'No active session' };
|
|
7216
7216
|
}
|
|
7217
7217
|
|
|
@@ -7224,7 +7224,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7224
7224
|
},
|
|
7225
7225
|
body: JSON.stringify({
|
|
7226
7226
|
siteId: getCurrentSiteId(),
|
|
7227
|
-
userId:
|
|
7227
|
+
userId: currentDistinctId
|
|
7228
7228
|
})
|
|
7229
7229
|
});
|
|
7230
7230
|
|
package/lib/esm/index.js
CHANGED
|
@@ -6739,10 +6739,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6739
6739
|
|
|
6740
6740
|
try {
|
|
6741
6741
|
const session = StorageManager.loadSession();
|
|
6742
|
-
const
|
|
6742
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6743
6743
|
|
|
6744
|
-
if (!session || !
|
|
6745
|
-
console.error('❌ [People] No active session or
|
|
6744
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6745
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6746
6746
|
return { success: false, error: 'No active session' };
|
|
6747
6747
|
}
|
|
6748
6748
|
|
|
@@ -6755,7 +6755,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6755
6755
|
},
|
|
6756
6756
|
body: JSON.stringify({
|
|
6757
6757
|
siteId: getCurrentSiteId(),
|
|
6758
|
-
userId:
|
|
6758
|
+
userId: currentDistinctId,
|
|
6759
6759
|
properties: properties
|
|
6760
6760
|
})
|
|
6761
6761
|
});
|
|
@@ -6789,10 +6789,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6789
6789
|
|
|
6790
6790
|
try {
|
|
6791
6791
|
const session = StorageManager.loadSession();
|
|
6792
|
-
const
|
|
6792
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6793
6793
|
|
|
6794
|
-
if (!session || !
|
|
6795
|
-
console.error('❌ [People] No active session or
|
|
6794
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6795
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6796
6796
|
return { success: false, error: 'No active session' };
|
|
6797
6797
|
}
|
|
6798
6798
|
|
|
@@ -6805,7 +6805,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6805
6805
|
},
|
|
6806
6806
|
body: JSON.stringify({
|
|
6807
6807
|
siteId: getCurrentSiteId(),
|
|
6808
|
-
userId:
|
|
6808
|
+
userId: currentDistinctId,
|
|
6809
6809
|
properties: properties
|
|
6810
6810
|
})
|
|
6811
6811
|
});
|
|
@@ -6839,10 +6839,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6839
6839
|
|
|
6840
6840
|
try {
|
|
6841
6841
|
const session = StorageManager.loadSession();
|
|
6842
|
-
const
|
|
6842
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6843
6843
|
|
|
6844
|
-
if (!session || !
|
|
6845
|
-
console.error('❌ [People] No active session or
|
|
6844
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6845
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6846
6846
|
return { success: false, error: 'No active session' };
|
|
6847
6847
|
}
|
|
6848
6848
|
|
|
@@ -6855,7 +6855,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6855
6855
|
},
|
|
6856
6856
|
body: JSON.stringify({
|
|
6857
6857
|
siteId: getCurrentSiteId(),
|
|
6858
|
-
userId:
|
|
6858
|
+
userId: currentDistinctId,
|
|
6859
6859
|
keys: keys
|
|
6860
6860
|
})
|
|
6861
6861
|
});
|
|
@@ -6895,10 +6895,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6895
6895
|
|
|
6896
6896
|
try {
|
|
6897
6897
|
const session = StorageManager.loadSession();
|
|
6898
|
-
const
|
|
6898
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6899
6899
|
|
|
6900
|
-
if (!session || !
|
|
6901
|
-
console.error('❌ [People] No active session or
|
|
6900
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6901
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6902
6902
|
return { success: false, error: 'No active session' };
|
|
6903
6903
|
}
|
|
6904
6904
|
|
|
@@ -6911,7 +6911,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6911
6911
|
},
|
|
6912
6912
|
body: JSON.stringify({
|
|
6913
6913
|
siteId: getCurrentSiteId(),
|
|
6914
|
-
userId:
|
|
6914
|
+
userId: currentDistinctId,
|
|
6915
6915
|
key: key,
|
|
6916
6916
|
amount: amount
|
|
6917
6917
|
})
|
|
@@ -6952,10 +6952,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6952
6952
|
|
|
6953
6953
|
try {
|
|
6954
6954
|
const session = StorageManager.loadSession();
|
|
6955
|
-
const
|
|
6955
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6956
6956
|
|
|
6957
|
-
if (!session || !
|
|
6958
|
-
console.error('❌ [People] No active session or
|
|
6957
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6958
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6959
6959
|
return { success: false, error: 'No active session' };
|
|
6960
6960
|
}
|
|
6961
6961
|
|
|
@@ -6968,7 +6968,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
6968
6968
|
},
|
|
6969
6969
|
body: JSON.stringify({
|
|
6970
6970
|
siteId: getCurrentSiteId(),
|
|
6971
|
-
userId:
|
|
6971
|
+
userId: currentDistinctId,
|
|
6972
6972
|
key: key,
|
|
6973
6973
|
values: values
|
|
6974
6974
|
})
|
|
@@ -7009,10 +7009,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7009
7009
|
|
|
7010
7010
|
try {
|
|
7011
7011
|
const session = StorageManager.loadSession();
|
|
7012
|
-
const
|
|
7012
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7013
7013
|
|
|
7014
|
-
if (!session || !
|
|
7015
|
-
console.error('❌ [People] No active session or
|
|
7014
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7015
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7016
7016
|
return { success: false, error: 'No active session' };
|
|
7017
7017
|
}
|
|
7018
7018
|
|
|
@@ -7025,7 +7025,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7025
7025
|
},
|
|
7026
7026
|
body: JSON.stringify({
|
|
7027
7027
|
siteId: getCurrentSiteId(),
|
|
7028
|
-
userId:
|
|
7028
|
+
userId: currentDistinctId,
|
|
7029
7029
|
key: key,
|
|
7030
7030
|
values: values
|
|
7031
7031
|
})
|
|
@@ -7066,10 +7066,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7066
7066
|
|
|
7067
7067
|
try {
|
|
7068
7068
|
const session = StorageManager.loadSession();
|
|
7069
|
-
const
|
|
7069
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7070
7070
|
|
|
7071
|
-
if (!session || !
|
|
7072
|
-
console.error('❌ [People] No active session or
|
|
7071
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7072
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7073
7073
|
return { success: false, error: 'No active session' };
|
|
7074
7074
|
}
|
|
7075
7075
|
|
|
@@ -7082,7 +7082,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7082
7082
|
},
|
|
7083
7083
|
body: JSON.stringify({
|
|
7084
7084
|
siteId: getCurrentSiteId(),
|
|
7085
|
-
userId:
|
|
7085
|
+
userId: currentDistinctId,
|
|
7086
7086
|
key: key,
|
|
7087
7087
|
values: values
|
|
7088
7088
|
})
|
|
@@ -7118,10 +7118,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7118
7118
|
|
|
7119
7119
|
try {
|
|
7120
7120
|
const session = StorageManager.loadSession();
|
|
7121
|
-
const
|
|
7121
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7122
7122
|
|
|
7123
|
-
if (!session || !
|
|
7124
|
-
console.error('❌ [People] No active session or
|
|
7123
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7124
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7125
7125
|
return { success: false, error: 'No active session' };
|
|
7126
7126
|
}
|
|
7127
7127
|
|
|
@@ -7134,7 +7134,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7134
7134
|
},
|
|
7135
7135
|
body: JSON.stringify({
|
|
7136
7136
|
siteId: getCurrentSiteId(),
|
|
7137
|
-
userId:
|
|
7137
|
+
userId: currentDistinctId,
|
|
7138
7138
|
amount: amount,
|
|
7139
7139
|
properties: properties
|
|
7140
7140
|
})
|
|
@@ -7163,10 +7163,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7163
7163
|
async clearCharges() {
|
|
7164
7164
|
try {
|
|
7165
7165
|
const session = StorageManager.loadSession();
|
|
7166
|
-
const
|
|
7166
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7167
7167
|
|
|
7168
|
-
if (!session || !
|
|
7169
|
-
console.error('❌ [People] No active session or
|
|
7168
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7169
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7170
7170
|
return { success: false, error: 'No active session' };
|
|
7171
7171
|
}
|
|
7172
7172
|
|
|
@@ -7179,7 +7179,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7179
7179
|
},
|
|
7180
7180
|
body: JSON.stringify({
|
|
7181
7181
|
siteId: getCurrentSiteId(),
|
|
7182
|
-
userId:
|
|
7182
|
+
userId: currentDistinctId
|
|
7183
7183
|
})
|
|
7184
7184
|
});
|
|
7185
7185
|
|
|
@@ -7206,10 +7206,10 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7206
7206
|
async deleteUser() {
|
|
7207
7207
|
try {
|
|
7208
7208
|
const session = StorageManager.loadSession();
|
|
7209
|
-
const
|
|
7209
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7210
7210
|
|
|
7211
|
-
if (!session || !
|
|
7212
|
-
console.error('❌ [People] No active session or
|
|
7211
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7212
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7213
7213
|
return { success: false, error: 'No active session' };
|
|
7214
7214
|
}
|
|
7215
7215
|
|
|
@@ -7222,7 +7222,7 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7222
7222
|
},
|
|
7223
7223
|
body: JSON.stringify({
|
|
7224
7224
|
siteId: getCurrentSiteId(),
|
|
7225
|
-
userId:
|
|
7225
|
+
userId: currentDistinctId
|
|
7226
7226
|
})
|
|
7227
7227
|
});
|
|
7228
7228
|
|
package/lib/umd/index.js
CHANGED
|
@@ -6745,10 +6745,10 @@
|
|
|
6745
6745
|
|
|
6746
6746
|
try {
|
|
6747
6747
|
const session = StorageManager.loadSession();
|
|
6748
|
-
const
|
|
6748
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6749
6749
|
|
|
6750
|
-
if (!session || !
|
|
6751
|
-
console.error('❌ [People] No active session or
|
|
6750
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6751
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6752
6752
|
return { success: false, error: 'No active session' };
|
|
6753
6753
|
}
|
|
6754
6754
|
|
|
@@ -6761,7 +6761,7 @@
|
|
|
6761
6761
|
},
|
|
6762
6762
|
body: JSON.stringify({
|
|
6763
6763
|
siteId: getCurrentSiteId(),
|
|
6764
|
-
userId:
|
|
6764
|
+
userId: currentDistinctId,
|
|
6765
6765
|
properties: properties
|
|
6766
6766
|
})
|
|
6767
6767
|
});
|
|
@@ -6795,10 +6795,10 @@
|
|
|
6795
6795
|
|
|
6796
6796
|
try {
|
|
6797
6797
|
const session = StorageManager.loadSession();
|
|
6798
|
-
const
|
|
6798
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6799
6799
|
|
|
6800
|
-
if (!session || !
|
|
6801
|
-
console.error('❌ [People] No active session or
|
|
6800
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6801
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6802
6802
|
return { success: false, error: 'No active session' };
|
|
6803
6803
|
}
|
|
6804
6804
|
|
|
@@ -6811,7 +6811,7 @@
|
|
|
6811
6811
|
},
|
|
6812
6812
|
body: JSON.stringify({
|
|
6813
6813
|
siteId: getCurrentSiteId(),
|
|
6814
|
-
userId:
|
|
6814
|
+
userId: currentDistinctId,
|
|
6815
6815
|
properties: properties
|
|
6816
6816
|
})
|
|
6817
6817
|
});
|
|
@@ -6845,10 +6845,10 @@
|
|
|
6845
6845
|
|
|
6846
6846
|
try {
|
|
6847
6847
|
const session = StorageManager.loadSession();
|
|
6848
|
-
const
|
|
6848
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6849
6849
|
|
|
6850
|
-
if (!session || !
|
|
6851
|
-
console.error('❌ [People] No active session or
|
|
6850
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6851
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6852
6852
|
return { success: false, error: 'No active session' };
|
|
6853
6853
|
}
|
|
6854
6854
|
|
|
@@ -6861,7 +6861,7 @@
|
|
|
6861
6861
|
},
|
|
6862
6862
|
body: JSON.stringify({
|
|
6863
6863
|
siteId: getCurrentSiteId(),
|
|
6864
|
-
userId:
|
|
6864
|
+
userId: currentDistinctId,
|
|
6865
6865
|
keys: keys
|
|
6866
6866
|
})
|
|
6867
6867
|
});
|
|
@@ -6901,10 +6901,10 @@
|
|
|
6901
6901
|
|
|
6902
6902
|
try {
|
|
6903
6903
|
const session = StorageManager.loadSession();
|
|
6904
|
-
const
|
|
6904
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6905
6905
|
|
|
6906
|
-
if (!session || !
|
|
6907
|
-
console.error('❌ [People] No active session or
|
|
6906
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6907
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6908
6908
|
return { success: false, error: 'No active session' };
|
|
6909
6909
|
}
|
|
6910
6910
|
|
|
@@ -6917,7 +6917,7 @@
|
|
|
6917
6917
|
},
|
|
6918
6918
|
body: JSON.stringify({
|
|
6919
6919
|
siteId: getCurrentSiteId(),
|
|
6920
|
-
userId:
|
|
6920
|
+
userId: currentDistinctId,
|
|
6921
6921
|
key: key,
|
|
6922
6922
|
amount: amount
|
|
6923
6923
|
})
|
|
@@ -6958,10 +6958,10 @@
|
|
|
6958
6958
|
|
|
6959
6959
|
try {
|
|
6960
6960
|
const session = StorageManager.loadSession();
|
|
6961
|
-
const
|
|
6961
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
6962
6962
|
|
|
6963
|
-
if (!session || !
|
|
6964
|
-
console.error('❌ [People] No active session or
|
|
6963
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
6964
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
6965
6965
|
return { success: false, error: 'No active session' };
|
|
6966
6966
|
}
|
|
6967
6967
|
|
|
@@ -6974,7 +6974,7 @@
|
|
|
6974
6974
|
},
|
|
6975
6975
|
body: JSON.stringify({
|
|
6976
6976
|
siteId: getCurrentSiteId(),
|
|
6977
|
-
userId:
|
|
6977
|
+
userId: currentDistinctId,
|
|
6978
6978
|
key: key,
|
|
6979
6979
|
values: values
|
|
6980
6980
|
})
|
|
@@ -7015,10 +7015,10 @@
|
|
|
7015
7015
|
|
|
7016
7016
|
try {
|
|
7017
7017
|
const session = StorageManager.loadSession();
|
|
7018
|
-
const
|
|
7018
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7019
7019
|
|
|
7020
|
-
if (!session || !
|
|
7021
|
-
console.error('❌ [People] No active session or
|
|
7020
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7021
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7022
7022
|
return { success: false, error: 'No active session' };
|
|
7023
7023
|
}
|
|
7024
7024
|
|
|
@@ -7031,7 +7031,7 @@
|
|
|
7031
7031
|
},
|
|
7032
7032
|
body: JSON.stringify({
|
|
7033
7033
|
siteId: getCurrentSiteId(),
|
|
7034
|
-
userId:
|
|
7034
|
+
userId: currentDistinctId,
|
|
7035
7035
|
key: key,
|
|
7036
7036
|
values: values
|
|
7037
7037
|
})
|
|
@@ -7072,10 +7072,10 @@
|
|
|
7072
7072
|
|
|
7073
7073
|
try {
|
|
7074
7074
|
const session = StorageManager.loadSession();
|
|
7075
|
-
const
|
|
7075
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7076
7076
|
|
|
7077
|
-
if (!session || !
|
|
7078
|
-
console.error('❌ [People] No active session or
|
|
7077
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7078
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7079
7079
|
return { success: false, error: 'No active session' };
|
|
7080
7080
|
}
|
|
7081
7081
|
|
|
@@ -7088,7 +7088,7 @@
|
|
|
7088
7088
|
},
|
|
7089
7089
|
body: JSON.stringify({
|
|
7090
7090
|
siteId: getCurrentSiteId(),
|
|
7091
|
-
userId:
|
|
7091
|
+
userId: currentDistinctId,
|
|
7092
7092
|
key: key,
|
|
7093
7093
|
values: values
|
|
7094
7094
|
})
|
|
@@ -7124,10 +7124,10 @@
|
|
|
7124
7124
|
|
|
7125
7125
|
try {
|
|
7126
7126
|
const session = StorageManager.loadSession();
|
|
7127
|
-
const
|
|
7127
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7128
7128
|
|
|
7129
|
-
if (!session || !
|
|
7130
|
-
console.error('❌ [People] No active session or
|
|
7129
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7130
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7131
7131
|
return { success: false, error: 'No active session' };
|
|
7132
7132
|
}
|
|
7133
7133
|
|
|
@@ -7140,7 +7140,7 @@
|
|
|
7140
7140
|
},
|
|
7141
7141
|
body: JSON.stringify({
|
|
7142
7142
|
siteId: getCurrentSiteId(),
|
|
7143
|
-
userId:
|
|
7143
|
+
userId: currentDistinctId,
|
|
7144
7144
|
amount: amount,
|
|
7145
7145
|
properties: properties
|
|
7146
7146
|
})
|
|
@@ -7169,10 +7169,10 @@
|
|
|
7169
7169
|
async clearCharges() {
|
|
7170
7170
|
try {
|
|
7171
7171
|
const session = StorageManager.loadSession();
|
|
7172
|
-
const
|
|
7172
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7173
7173
|
|
|
7174
|
-
if (!session || !
|
|
7175
|
-
console.error('❌ [People] No active session or
|
|
7174
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7175
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7176
7176
|
return { success: false, error: 'No active session' };
|
|
7177
7177
|
}
|
|
7178
7178
|
|
|
@@ -7185,7 +7185,7 @@
|
|
|
7185
7185
|
},
|
|
7186
7186
|
body: JSON.stringify({
|
|
7187
7187
|
siteId: getCurrentSiteId(),
|
|
7188
|
-
userId:
|
|
7188
|
+
userId: currentDistinctId
|
|
7189
7189
|
})
|
|
7190
7190
|
});
|
|
7191
7191
|
|
|
@@ -7212,10 +7212,10 @@
|
|
|
7212
7212
|
async deleteUser() {
|
|
7213
7213
|
try {
|
|
7214
7214
|
const session = StorageManager.loadSession();
|
|
7215
|
-
const
|
|
7215
|
+
const currentDistinctId = StorageManager.getDistinctId();
|
|
7216
7216
|
|
|
7217
|
-
if (!session || !
|
|
7218
|
-
console.error('❌ [People] No active session or
|
|
7217
|
+
if (!session || !currentDistinctId || !SITE_ID) {
|
|
7218
|
+
console.error('❌ [People] No active session or distinct ID found');
|
|
7219
7219
|
return { success: false, error: 'No active session' };
|
|
7220
7220
|
}
|
|
7221
7221
|
|
|
@@ -7228,7 +7228,7 @@
|
|
|
7228
7228
|
},
|
|
7229
7229
|
body: JSON.stringify({
|
|
7230
7230
|
siteId: getCurrentSiteId(),
|
|
7231
|
-
userId:
|
|
7231
|
+
userId: currentDistinctId
|
|
7232
7232
|
})
|
|
7233
7233
|
});
|
|
7234
7234
|
|
package/package.json
CHANGED