hiloop-sdk 0.5.4 → 0.5.5
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/client.d.ts +2 -0
- package/dist/client.js +5 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -838,6 +838,8 @@ export declare class HiloopClient {
|
|
|
838
838
|
removeWebhook(): Promise<{
|
|
839
839
|
ok: boolean;
|
|
840
840
|
}>;
|
|
841
|
+
/** Decrypt an encrypted session message (e.g., from a webhook payload). */
|
|
842
|
+
decryptSessionMessage(encryptedContent: string): Promise<string | null>;
|
|
841
843
|
static generateKeyPair(): KeyPair;
|
|
842
844
|
/** Encrypt plaintext with AES-256-GCM for session messages. */
|
|
843
845
|
static encryptAes(plaintext: string, keyBase64: string): Promise<string>;
|
package/dist/client.js
CHANGED
|
@@ -1231,6 +1231,11 @@ export class HiloopClient {
|
|
|
1231
1231
|
async removeWebhook() {
|
|
1232
1232
|
return this.request("DELETE", "/agent/webhooks/config");
|
|
1233
1233
|
}
|
|
1234
|
+
/** Decrypt an encrypted session message (e.g., from a webhook payload). */
|
|
1235
|
+
async decryptSessionMessage(encryptedContent) {
|
|
1236
|
+
await this.ensureInitialized();
|
|
1237
|
+
return this.crypto.decryptSessionMessage(encryptedContent);
|
|
1238
|
+
}
|
|
1234
1239
|
// -- Crypto -----------------------------------------------------------------
|
|
1235
1240
|
static generateKeyPair() {
|
|
1236
1241
|
return generateKeyPair();
|