@alva-ai/toolkit 0.23.0-beta.0 → 0.23.1

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.cjs CHANGED
@@ -27,6 +27,7 @@ __export(src_exports, {
27
27
  CliUsageError: () => CliUsageError,
28
28
  MarketsResource: () => MarketsResource,
29
29
  PBSV_UPDATE_MESSAGE: () => PBSV_UPDATE_MESSAGE,
30
+ SUBSCRIBE_MANAGE_MESSAGE: () => SUBSCRIBE_MANAGE_MESSAGE,
30
31
  SUBSCRIBE_PROPOSE_MESSAGE: () => SUBSCRIBE_PROPOSE_MESSAGE,
31
32
  SUBSCRIBE_RESULT_MESSAGE: () => SUBSCRIBE_RESULT_MESSAGE,
32
33
  UDF_AUTH_REQUIRED_MESSAGE: () => UDF_AUTH_REQUIRED_MESSAGE,
@@ -3313,6 +3314,7 @@ var UDF_CONSENT_RESPONSE_MESSAGE = "alva:udf:consent-response";
3313
3314
  var UDF_AUTH_REQUIRED_MESSAGE = "alva:udf:auth-required";
3314
3315
  var SUBSCRIBE_PROPOSE_MESSAGE = "alva:subscribe:propose";
3315
3316
  var SUBSCRIBE_RESULT_MESSAGE = "alva:subscribe:result";
3317
+ var SUBSCRIBE_MANAGE_MESSAGE = "alva:subscribe:manage";
3316
3318
  var DEFAULT_API_ORIGIN = "https://api-llm.prd.alva.ai";
3317
3319
  var CONSENT_TIMEOUT_MS = 5 * 60 * 1e3;
3318
3320
  var cachedToken = null;
@@ -3505,8 +3507,19 @@ var proposeSubscribe = async (input) => {
3505
3507
  );
3506
3508
  });
3507
3509
  };
3510
+ var manageSubscriptions = () => {
3511
+ if (!runtimeWindow || !expectedParentOrigin) return;
3512
+ runtimeWindow.parent.postMessage(
3513
+ {
3514
+ type: SUBSCRIBE_MANAGE_MESSAGE,
3515
+ playbook_id: playbookIdFromBoot
3516
+ },
3517
+ expectedParentOrigin
3518
+ );
3519
+ };
3508
3520
  var subscribe = {
3509
- propose: proposeSubscribe
3521
+ propose: proposeSubscribe,
3522
+ manage: manageSubscriptions
3510
3523
  };
3511
3524
  var requestAuthentication = (functionName) => {
3512
3525
  if (!runtimeWindow || !expectedParentOrigin) return;
@@ -3682,7 +3695,7 @@ var installPlaybookRuntime = (targetWindow) => {
3682
3695
  };
3683
3696
 
3684
3697
  // src/index.ts
3685
- var VERSION = true ? "0.23.0-beta.0" : "dev";
3698
+ var VERSION = true ? "0.23.1" : "dev";
3686
3699
  // Annotate the CommonJS export names for ESM import in node:
3687
3700
  0 && (module.exports = {
3688
3701
  AlertsResource,
@@ -3692,6 +3705,7 @@ var VERSION = true ? "0.23.0-beta.0" : "dev";
3692
3705
  CliUsageError,
3693
3706
  MarketsResource,
3694
3707
  PBSV_UPDATE_MESSAGE,
3708
+ SUBSCRIBE_MANAGE_MESSAGE,
3695
3709
  SUBSCRIBE_PROPOSE_MESSAGE,
3696
3710
  SUBSCRIBE_RESULT_MESSAGE,
3697
3711
  UDF_AUTH_REQUIRED_MESSAGE,