@voidly/agent-sdk 1.8.1 → 1.8.2
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 +10 -1
- package/dist/index.mjs +10 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2465,7 +2465,16 @@ var VoidlyAgent = class _VoidlyAgent {
|
|
|
2465
2465
|
const err = await res.json().catch(() => ({}));
|
|
2466
2466
|
throw new Error(`Send failed: ${err.error?.message || err.error || res.statusText}`);
|
|
2467
2467
|
}
|
|
2468
|
-
|
|
2468
|
+
const raw = await res.json();
|
|
2469
|
+
return {
|
|
2470
|
+
id: raw.id,
|
|
2471
|
+
from: raw.from,
|
|
2472
|
+
to: raw.to,
|
|
2473
|
+
timestamp: raw.timestamp,
|
|
2474
|
+
expiresAt: raw.expires_at || raw.expiresAt,
|
|
2475
|
+
encrypted: raw.encrypted,
|
|
2476
|
+
clientSide: raw.client_side || raw.clientSide
|
|
2477
|
+
};
|
|
2469
2478
|
}
|
|
2470
2479
|
/**
|
|
2471
2480
|
* Receive and decrypt messages. Decryption happens locally.
|
package/dist/index.mjs
CHANGED
|
@@ -2455,7 +2455,16 @@ var VoidlyAgent = class _VoidlyAgent {
|
|
|
2455
2455
|
const err = await res.json().catch(() => ({}));
|
|
2456
2456
|
throw new Error(`Send failed: ${err.error?.message || err.error || res.statusText}`);
|
|
2457
2457
|
}
|
|
2458
|
-
|
|
2458
|
+
const raw = await res.json();
|
|
2459
|
+
return {
|
|
2460
|
+
id: raw.id,
|
|
2461
|
+
from: raw.from,
|
|
2462
|
+
to: raw.to,
|
|
2463
|
+
timestamp: raw.timestamp,
|
|
2464
|
+
expiresAt: raw.expires_at || raw.expiresAt,
|
|
2465
|
+
encrypted: raw.encrypted,
|
|
2466
|
+
clientSide: raw.client_side || raw.clientSide
|
|
2467
|
+
};
|
|
2459
2468
|
}
|
|
2460
2469
|
/**
|
|
2461
2470
|
* Receive and decrypt messages. Decryption happens locally.
|