zubbl-sdk 1.0.8 → 1.1.0
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/dist/zubbl-sdk.cjs.js +24 -14
- package/dist/zubbl-sdk.esm.js +24 -14
- package/dist/zubbl-sdk.umd.js +24 -14
- package/package.json +1 -1
package/dist/zubbl-sdk.cjs.js
CHANGED
|
@@ -22,13 +22,19 @@ async function identifyUser({ email, name }) {
|
|
|
22
22
|
if (!email) throw new Error("email is required");
|
|
23
23
|
|
|
24
24
|
try {
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
const headers = {
|
|
26
|
+
"x-api-key": config.apiKey,
|
|
27
|
+
"x-tenant-id": config.tenantId,
|
|
28
|
+
"x-app-id": config.appId
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// FIXED ROUTE:
|
|
32
|
+
const response = await axios.post(
|
|
33
|
+
"https://api.zubbl.com/sdk/identify",
|
|
34
|
+
{ email, name },
|
|
35
|
+
{ headers }
|
|
36
|
+
);
|
|
37
|
+
|
|
32
38
|
console.log("[ZUBBL SDK] identifyUser response:", response.data);
|
|
33
39
|
return response.data;
|
|
34
40
|
} catch (err) {
|
|
@@ -44,13 +50,17 @@ async function getTiles({ external_user_id }) {
|
|
|
44
50
|
if (!external_user_id) throw new Error("external_user_id is required");
|
|
45
51
|
|
|
46
52
|
try {
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
const headers = {
|
|
54
|
+
"x-api-key": config.apiKey,
|
|
55
|
+
"x-tenant-id": config.tenantId,
|
|
56
|
+
"x-app-id": config.appId
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const response = await axios.get(
|
|
60
|
+
`https://api.zubbl.com/sdk/external-users/${external_user_id}/tiles`,
|
|
61
|
+
{ headers }
|
|
62
|
+
);
|
|
63
|
+
|
|
54
64
|
console.log("[ZUBBL SDK] getTiles response:", response.data);
|
|
55
65
|
return response.data;
|
|
56
66
|
} catch (err) {
|
package/dist/zubbl-sdk.esm.js
CHANGED
|
@@ -20,13 +20,19 @@ async function identifyUser({ email, name }) {
|
|
|
20
20
|
if (!email) throw new Error("email is required");
|
|
21
21
|
|
|
22
22
|
try {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
const headers = {
|
|
24
|
+
"x-api-key": config.apiKey,
|
|
25
|
+
"x-tenant-id": config.tenantId,
|
|
26
|
+
"x-app-id": config.appId
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// FIXED ROUTE:
|
|
30
|
+
const response = await axios.post(
|
|
31
|
+
"https://api.zubbl.com/sdk/identify",
|
|
32
|
+
{ email, name },
|
|
33
|
+
{ headers }
|
|
34
|
+
);
|
|
35
|
+
|
|
30
36
|
console.log("[ZUBBL SDK] identifyUser response:", response.data);
|
|
31
37
|
return response.data;
|
|
32
38
|
} catch (err) {
|
|
@@ -42,13 +48,17 @@ async function getTiles({ external_user_id }) {
|
|
|
42
48
|
if (!external_user_id) throw new Error("external_user_id is required");
|
|
43
49
|
|
|
44
50
|
try {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
const headers = {
|
|
52
|
+
"x-api-key": config.apiKey,
|
|
53
|
+
"x-tenant-id": config.tenantId,
|
|
54
|
+
"x-app-id": config.appId
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const response = await axios.get(
|
|
58
|
+
`https://api.zubbl.com/sdk/external-users/${external_user_id}/tiles`,
|
|
59
|
+
{ headers }
|
|
60
|
+
);
|
|
61
|
+
|
|
52
62
|
console.log("[ZUBBL SDK] getTiles response:", response.data);
|
|
53
63
|
return response.data;
|
|
54
64
|
} catch (err) {
|
package/dist/zubbl-sdk.umd.js
CHANGED
|
@@ -24,13 +24,19 @@
|
|
|
24
24
|
if (!email) throw new Error("email is required");
|
|
25
25
|
|
|
26
26
|
try {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
const headers = {
|
|
28
|
+
"x-api-key": config.apiKey,
|
|
29
|
+
"x-tenant-id": config.tenantId,
|
|
30
|
+
"x-app-id": config.appId
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// FIXED ROUTE:
|
|
34
|
+
const response = await axios.post(
|
|
35
|
+
"https://api.zubbl.com/sdk/identify",
|
|
36
|
+
{ email, name },
|
|
37
|
+
{ headers }
|
|
38
|
+
);
|
|
39
|
+
|
|
34
40
|
console.log("[ZUBBL SDK] identifyUser response:", response.data);
|
|
35
41
|
return response.data;
|
|
36
42
|
} catch (err) {
|
|
@@ -46,13 +52,17 @@
|
|
|
46
52
|
if (!external_user_id) throw new Error("external_user_id is required");
|
|
47
53
|
|
|
48
54
|
try {
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
const headers = {
|
|
56
|
+
"x-api-key": config.apiKey,
|
|
57
|
+
"x-tenant-id": config.tenantId,
|
|
58
|
+
"x-app-id": config.appId
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const response = await axios.get(
|
|
62
|
+
`https://api.zubbl.com/sdk/external-users/${external_user_id}/tiles`,
|
|
63
|
+
{ headers }
|
|
64
|
+
);
|
|
65
|
+
|
|
56
66
|
console.log("[ZUBBL SDK] getTiles response:", response.data);
|
|
57
67
|
return response.data;
|
|
58
68
|
} catch (err) {
|