zubbl-sdk 1.1.6 → 1.1.7
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 +7 -5
- package/dist/zubbl-sdk.esm.js +7 -5
- package/dist/zubbl-sdk.umd.js +7 -5
- package/package.json +1 -1
package/dist/zubbl-sdk.cjs.js
CHANGED
|
@@ -63,10 +63,7 @@ async function identifyUser({ email, name }) {
|
|
|
63
63
|
return response.data;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
* Get tiles for a user using their external_user_id.
|
|
68
|
-
*/
|
|
69
|
-
async function getTiles({ external_user_id }) {
|
|
66
|
+
async function getTiles({ external_user_id, app_id = null }) {
|
|
70
67
|
if (!config.apiKey || !config.tenantId || !config.appId) {
|
|
71
68
|
throw new Error("Zubbl SDK not initialized");
|
|
72
69
|
}
|
|
@@ -83,8 +80,13 @@ async function getTiles({ external_user_id }) {
|
|
|
83
80
|
headers["X-Zubbl-Internal-Call"] = "true";
|
|
84
81
|
}
|
|
85
82
|
|
|
83
|
+
// Use API endpoint for "effective" tile rules!
|
|
84
|
+
const params = new URLSearchParams({ external_user_id });
|
|
85
|
+
// Use explicit app_id if passed (or config default)
|
|
86
|
+
params.set("app_id", app_id || config.appId);
|
|
87
|
+
|
|
86
88
|
const response = await axios.get(
|
|
87
|
-
`${config.baseUrl}/
|
|
89
|
+
`${config.baseUrl.replace(/\/$/, "")}/tiles/effective?${params.toString()}`,
|
|
88
90
|
{ headers }
|
|
89
91
|
);
|
|
90
92
|
return response.data;
|
package/dist/zubbl-sdk.esm.js
CHANGED
|
@@ -61,10 +61,7 @@ async function identifyUser({ email, name }) {
|
|
|
61
61
|
return response.data;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
* Get tiles for a user using their external_user_id.
|
|
66
|
-
*/
|
|
67
|
-
async function getTiles({ external_user_id }) {
|
|
64
|
+
async function getTiles({ external_user_id, app_id = null }) {
|
|
68
65
|
if (!config.apiKey || !config.tenantId || !config.appId) {
|
|
69
66
|
throw new Error("Zubbl SDK not initialized");
|
|
70
67
|
}
|
|
@@ -81,8 +78,13 @@ async function getTiles({ external_user_id }) {
|
|
|
81
78
|
headers["X-Zubbl-Internal-Call"] = "true";
|
|
82
79
|
}
|
|
83
80
|
|
|
81
|
+
// Use API endpoint for "effective" tile rules!
|
|
82
|
+
const params = new URLSearchParams({ external_user_id });
|
|
83
|
+
// Use explicit app_id if passed (or config default)
|
|
84
|
+
params.set("app_id", app_id || config.appId);
|
|
85
|
+
|
|
84
86
|
const response = await axios.get(
|
|
85
|
-
`${config.baseUrl}/
|
|
87
|
+
`${config.baseUrl.replace(/\/$/, "")}/tiles/effective?${params.toString()}`,
|
|
86
88
|
{ headers }
|
|
87
89
|
);
|
|
88
90
|
return response.data;
|
package/dist/zubbl-sdk.umd.js
CHANGED
|
@@ -65,10 +65,7 @@
|
|
|
65
65
|
return response.data;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
* Get tiles for a user using their external_user_id.
|
|
70
|
-
*/
|
|
71
|
-
async function getTiles({ external_user_id }) {
|
|
68
|
+
async function getTiles({ external_user_id, app_id = null }) {
|
|
72
69
|
if (!config.apiKey || !config.tenantId || !config.appId) {
|
|
73
70
|
throw new Error("Zubbl SDK not initialized");
|
|
74
71
|
}
|
|
@@ -85,8 +82,13 @@
|
|
|
85
82
|
headers["X-Zubbl-Internal-Call"] = "true";
|
|
86
83
|
}
|
|
87
84
|
|
|
85
|
+
// Use API endpoint for "effective" tile rules!
|
|
86
|
+
const params = new URLSearchParams({ external_user_id });
|
|
87
|
+
// Use explicit app_id if passed (or config default)
|
|
88
|
+
params.set("app_id", app_id || config.appId);
|
|
89
|
+
|
|
88
90
|
const response = await axios.get(
|
|
89
|
-
`${config.baseUrl}/
|
|
91
|
+
`${config.baseUrl.replace(/\/$/, "")}/tiles/effective?${params.toString()}`,
|
|
90
92
|
{ headers }
|
|
91
93
|
);
|
|
92
94
|
return response.data;
|