hiloop-sdk 0.5.2 → 0.5.3
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 +9 -0
- package/dist/client.js +6 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -825,6 +825,15 @@ 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
|
+
}>;
|
|
828
837
|
static generateKeyPair(): KeyPair;
|
|
829
838
|
/** Encrypt plaintext with AES-256-GCM for session messages. */
|
|
830
839
|
static encryptAes(plaintext: string, keyBase64: string): Promise<string>;
|
package/dist/client.js
CHANGED
|
@@ -1221,6 +1221,12 @@ 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
|
+
}
|
|
1224
1230
|
// -- Crypto -----------------------------------------------------------------
|
|
1225
1231
|
static generateKeyPair() {
|
|
1226
1232
|
return generateKeyPair();
|