@frostbridge/imdl 0.1.5 → 0.1.6
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/index.js +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2784,11 +2784,12 @@ async function sendBatch(apiUrl, sessionId, events, developerId) {
|
|
|
2784
2784
|
if (config.authToken) {
|
|
2785
2785
|
headers["X-IMDL-Key"] = config.authToken;
|
|
2786
2786
|
}
|
|
2787
|
+
const agentType = events.find((e) => e.agentType)?.agentType;
|
|
2787
2788
|
try {
|
|
2788
2789
|
const res = await fetch(`${apiUrl}/api/sessions/${sessionId}/events`, {
|
|
2789
2790
|
method: "POST",
|
|
2790
2791
|
headers,
|
|
2791
|
-
body: JSON.stringify({ events, developerId }),
|
|
2792
|
+
body: JSON.stringify({ events, developerId, ...agentType && { agentType } }),
|
|
2792
2793
|
signal: AbortSignal.timeout(FLUSH_TIMEOUT)
|
|
2793
2794
|
});
|
|
2794
2795
|
return res.ok;
|