hiloop-sdk 0.5.2 → 0.5.4
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 +13 -0
- package/dist/client.js +10 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -825,6 +825,19 @@ export declare class HiloopClient {
|
|
|
825
825
|
failInvocation(invocationId: string, opts?: {
|
|
826
826
|
error?: string;
|
|
827
827
|
}): Promise<Record<string, unknown>>;
|
|
828
|
+
/** Configure webhook URL and optional bearer token for this agent. */
|
|
829
|
+
configureWebhook(opts: {
|
|
830
|
+
webhookUrl: string;
|
|
831
|
+
authToken?: string;
|
|
832
|
+
}): Promise<{
|
|
833
|
+
webhookUrl: string;
|
|
834
|
+
hasSecret: boolean;
|
|
835
|
+
hasAuthToken: boolean;
|
|
836
|
+
}>;
|
|
837
|
+
/** Remove webhook configuration for this agent. */
|
|
838
|
+
removeWebhook(): Promise<{
|
|
839
|
+
ok: boolean;
|
|
840
|
+
}>;
|
|
828
841
|
static generateKeyPair(): KeyPair;
|
|
829
842
|
/** Encrypt plaintext with AES-256-GCM for session messages. */
|
|
830
843
|
static encryptAes(plaintext: string, keyBase64: string): Promise<string>;
|
package/dist/client.js
CHANGED
|
@@ -1221,6 +1221,16 @@ export class HiloopClient {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
return this.request("POST", `/agent/commands/invocations/${invocationId}/fail`, { body });
|
|
1223
1223
|
}
|
|
1224
|
+
/** Configure webhook URL and optional bearer token for this agent. */
|
|
1225
|
+
async configureWebhook(opts) {
|
|
1226
|
+
return this.request("PUT", "/agent/webhooks/config", {
|
|
1227
|
+
body: { webhookUrl: opts.webhookUrl, webhookAuthToken: opts.authToken },
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
/** Remove webhook configuration for this agent. */
|
|
1231
|
+
async removeWebhook() {
|
|
1232
|
+
return this.request("DELETE", "/agent/webhooks/config");
|
|
1233
|
+
}
|
|
1224
1234
|
// -- Crypto -----------------------------------------------------------------
|
|
1225
1235
|
static generateKeyPair() {
|
|
1226
1236
|
return generateKeyPair();
|