@alva-ai/toolkit 0.19.0 → 0.20.0

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.d.cts CHANGED
@@ -196,6 +196,10 @@ interface CronjobCreateRequest {
196
196
  cron_expression: string;
197
197
  name: string;
198
198
  args?: Record<string, unknown>;
199
+ /**
200
+ * Let successful scheduled and manually triggered Feed runs deliver declared
201
+ * alert outputs to eligible subscribers. Does not create subscriptions.
202
+ */
199
203
  push_notify?: boolean;
200
204
  /** Override per-cronjob V8 heap limit (MB). Valid range 1–2046. */
201
205
  max_heap_size_mb?: number;
@@ -226,6 +230,7 @@ interface Cronjob {
226
230
  cron_expression: string;
227
231
  status: string;
228
232
  args: Record<string, unknown>;
233
+ /** Whether successful Feed runs may deliver alerts to subscribers. */
229
234
  push_notify: boolean;
230
235
  /** Per-cronjob V8 heap cap (MB). null when using the server default. */
231
236
  max_heap_size_mb: number | null;
@@ -263,6 +268,7 @@ interface CronjobUpdateRequest {
263
268
  name?: string;
264
269
  cron_expression?: string;
265
270
  args?: Record<string, unknown>;
271
+ /** Enable or disable delivery of declared Feed alert outputs. */
266
272
  push_notify?: boolean;
267
273
  /** Override per-cronjob V8 heap limit (MB). Valid range 1–2046. */
268
274
  max_heap_size_mb?: number;
@@ -807,6 +813,8 @@ interface PushSubscription {
807
813
  target: PushTarget;
808
814
  created_at_ms: number;
809
815
  updated_at_ms: number;
816
+ /** Alva delivery channel id. "0" denotes the agent/home channel. */
817
+ channel_id?: string;
810
818
  /** Present on list responses. */
811
819
  cursor?: string;
812
820
  /** Feed metadata is present for FEED targets when available. */
@@ -840,6 +848,10 @@ interface PushSubscriptionFeedParams {
840
848
  username: string;
841
849
  name: string;
842
850
  }
851
+ interface SubscribeFeedParams extends PushSubscriptionFeedParams {
852
+ /** Delivery channel id. Omit for the user's agent/home channel. */
853
+ channelId?: string;
854
+ }
843
855
  interface PushSubscriptionListParams {
844
856
  /** Page size, default 50, max 200 server-side. */
845
857
  first?: number;
@@ -1071,6 +1083,8 @@ declare class DeployResource {
1071
1083
  }): Promise<void>;
1072
1084
  /**
1073
1085
  * Fire the cronjob workflow once, immediately, bypassing the schedule.
1086
+ * This is not a dry run: when publisher push and subscriber alert bindings
1087
+ * are enabled, a successful Feed execution may send real notifications.
1074
1088
  * Async — returns the Hatchet workflow run id at enqueue. The
1075
1089
  * `cronjob_runs` row can appear as DISPATCHED/RUNNING before it reaches a
1076
1090
  * terminal status; callers verify completion by polling
@@ -1598,7 +1612,7 @@ declare class SubscriptionsResource {
1598
1612
  * single automation's alerts, regardless of which playbook(s) consume it.
1599
1613
  * Does NOT follow any playbook. Idempotent.
1600
1614
  */
1601
- subscribeFeed(params: PushSubscriptionFeedParams): Promise<SubscribeFeedResponse>;
1615
+ subscribeFeed(params: SubscribeFeedParams): Promise<SubscribeFeedResponse>;
1602
1616
  /**
1603
1617
  * Unsubscribe from one feed `(username, name)` — disable that automation's
1604
1618
  * alerts for the caller. Idempotent.
@@ -1633,7 +1647,7 @@ declare class AlertsResource {
1633
1647
  constructor(client: AlvaClient);
1634
1648
  list(params?: PushSubscriptionListParams): Promise<PushSubscriptionListResponse>;
1635
1649
  follows(params?: FollowsListParams): Promise<FollowsListResponse>;
1636
- enableAutomation(params: PushSubscriptionFeedParams): Promise<SubscribeFeedResponse>;
1650
+ enableAutomation(params: SubscribeFeedParams): Promise<SubscribeFeedResponse>;
1637
1651
  disableAutomation(params: PushSubscriptionFeedParams): Promise<UnsubscribeResponse>;
1638
1652
  enableBatch(params: SubscribeBatchParams): Promise<SubscribeBatchResponse>;
1639
1653
  disableBatch(params: UnsubscribeBatchParams): Promise<UnsubscribeBatchResponse>;
package/dist/index.d.ts CHANGED
@@ -196,6 +196,10 @@ interface CronjobCreateRequest {
196
196
  cron_expression: string;
197
197
  name: string;
198
198
  args?: Record<string, unknown>;
199
+ /**
200
+ * Let successful scheduled and manually triggered Feed runs deliver declared
201
+ * alert outputs to eligible subscribers. Does not create subscriptions.
202
+ */
199
203
  push_notify?: boolean;
200
204
  /** Override per-cronjob V8 heap limit (MB). Valid range 1–2046. */
201
205
  max_heap_size_mb?: number;
@@ -226,6 +230,7 @@ interface Cronjob {
226
230
  cron_expression: string;
227
231
  status: string;
228
232
  args: Record<string, unknown>;
233
+ /** Whether successful Feed runs may deliver alerts to subscribers. */
229
234
  push_notify: boolean;
230
235
  /** Per-cronjob V8 heap cap (MB). null when using the server default. */
231
236
  max_heap_size_mb: number | null;
@@ -263,6 +268,7 @@ interface CronjobUpdateRequest {
263
268
  name?: string;
264
269
  cron_expression?: string;
265
270
  args?: Record<string, unknown>;
271
+ /** Enable or disable delivery of declared Feed alert outputs. */
266
272
  push_notify?: boolean;
267
273
  /** Override per-cronjob V8 heap limit (MB). Valid range 1–2046. */
268
274
  max_heap_size_mb?: number;
@@ -807,6 +813,8 @@ interface PushSubscription {
807
813
  target: PushTarget;
808
814
  created_at_ms: number;
809
815
  updated_at_ms: number;
816
+ /** Alva delivery channel id. "0" denotes the agent/home channel. */
817
+ channel_id?: string;
810
818
  /** Present on list responses. */
811
819
  cursor?: string;
812
820
  /** Feed metadata is present for FEED targets when available. */
@@ -840,6 +848,10 @@ interface PushSubscriptionFeedParams {
840
848
  username: string;
841
849
  name: string;
842
850
  }
851
+ interface SubscribeFeedParams extends PushSubscriptionFeedParams {
852
+ /** Delivery channel id. Omit for the user's agent/home channel. */
853
+ channelId?: string;
854
+ }
843
855
  interface PushSubscriptionListParams {
844
856
  /** Page size, default 50, max 200 server-side. */
845
857
  first?: number;
@@ -1071,6 +1083,8 @@ declare class DeployResource {
1071
1083
  }): Promise<void>;
1072
1084
  /**
1073
1085
  * Fire the cronjob workflow once, immediately, bypassing the schedule.
1086
+ * This is not a dry run: when publisher push and subscriber alert bindings
1087
+ * are enabled, a successful Feed execution may send real notifications.
1074
1088
  * Async — returns the Hatchet workflow run id at enqueue. The
1075
1089
  * `cronjob_runs` row can appear as DISPATCHED/RUNNING before it reaches a
1076
1090
  * terminal status; callers verify completion by polling
@@ -1598,7 +1612,7 @@ declare class SubscriptionsResource {
1598
1612
  * single automation's alerts, regardless of which playbook(s) consume it.
1599
1613
  * Does NOT follow any playbook. Idempotent.
1600
1614
  */
1601
- subscribeFeed(params: PushSubscriptionFeedParams): Promise<SubscribeFeedResponse>;
1615
+ subscribeFeed(params: SubscribeFeedParams): Promise<SubscribeFeedResponse>;
1602
1616
  /**
1603
1617
  * Unsubscribe from one feed `(username, name)` — disable that automation's
1604
1618
  * alerts for the caller. Idempotent.
@@ -1633,7 +1647,7 @@ declare class AlertsResource {
1633
1647
  constructor(client: AlvaClient);
1634
1648
  list(params?: PushSubscriptionListParams): Promise<PushSubscriptionListResponse>;
1635
1649
  follows(params?: FollowsListParams): Promise<FollowsListResponse>;
1636
- enableAutomation(params: PushSubscriptionFeedParams): Promise<SubscribeFeedResponse>;
1650
+ enableAutomation(params: SubscribeFeedParams): Promise<SubscribeFeedResponse>;
1637
1651
  disableAutomation(params: PushSubscriptionFeedParams): Promise<UnsubscribeResponse>;
1638
1652
  enableBatch(params: SubscribeBatchParams): Promise<SubscribeBatchResponse>;
1639
1653
  disableBatch(params: UnsubscribeBatchParams): Promise<UnsubscribeBatchResponse>;
package/dist/index.js CHANGED
@@ -270,6 +270,8 @@ var DeployResource = class {
270
270
  }
271
271
  /**
272
272
  * Fire the cronjob workflow once, immediately, bypassing the schedule.
273
+ * This is not a dry run: when publisher push and subscriber alert bindings
274
+ * are enabled, a successful Feed execution may send real notifications.
273
275
  * Async — returns the Hatchet workflow run id at enqueue. The
274
276
  * `cronjob_runs` row can appear as DISPATCHED/RUNNING before it reaches a
275
277
  * terminal status; callers verify completion by polling
@@ -1487,40 +1489,40 @@ var SKILL_ENDPOINT_METADATA = [
1487
1489
  file: "contracts",
1488
1490
  method: "GET",
1489
1491
  path: "/api/v1/options/contracts",
1490
- tier: "alternative",
1491
- required_subscription_tier: "pro",
1492
- access: "pro_only",
1493
- pro_required: true
1492
+ tier: "public",
1493
+ required_subscription_tier: "free",
1494
+ access: "free_and_pro",
1495
+ pro_required: false
1494
1496
  },
1495
1497
  {
1496
1498
  skill: "arrays-data-api-options",
1497
1499
  file: "kline",
1498
1500
  method: "GET",
1499
1501
  path: "/api/v1/options/kline",
1500
- tier: "alternative",
1501
- required_subscription_tier: "pro",
1502
- access: "pro_only",
1503
- pro_required: true
1502
+ tier: "public",
1503
+ required_subscription_tier: "free",
1504
+ access: "free_and_pro",
1505
+ pro_required: false
1504
1506
  },
1505
1507
  {
1506
1508
  skill: "arrays-data-api-options",
1507
1509
  file: "greeks",
1508
1510
  method: "GET",
1509
1511
  path: "/api/v1/options/greeks",
1510
- tier: "alternative",
1511
- required_subscription_tier: "pro",
1512
- access: "pro_only",
1513
- pro_required: true
1512
+ tier: "public",
1513
+ required_subscription_tier: "free",
1514
+ access: "free_and_pro",
1515
+ pro_required: false
1514
1516
  },
1515
1517
  {
1516
1518
  skill: "arrays-data-api-options",
1517
1519
  file: "chain",
1518
1520
  method: "GET",
1519
1521
  path: "/api/v1/options/chain",
1520
- tier: "alternative",
1521
- required_subscription_tier: "pro",
1522
- access: "pro_only",
1523
- pro_required: true
1522
+ tier: "public",
1523
+ required_subscription_tier: "free",
1524
+ access: "free_and_pro",
1525
+ pro_required: false
1524
1526
  },
1525
1527
  {
1526
1528
  skill: "arrays-data-api-equity-fundamentals",
@@ -2437,7 +2439,15 @@ var SubscriptionsResource = class {
2437
2439
  async subscribeFeed(params) {
2438
2440
  this.client._requireAuth();
2439
2441
  const path = `/api/v1/subscriptions/feed/${encodeURIComponent(params.username)}/${encodeURIComponent(params.name)}`;
2440
- return this.client._request("POST", path);
2442
+ if (params.channelId === void 0) {
2443
+ return this.client._request(
2444
+ "POST",
2445
+ path
2446
+ );
2447
+ }
2448
+ return this.client._request("POST", path, {
2449
+ body: { channel_id: params.channelId }
2450
+ });
2441
2451
  }
2442
2452
  /**
2443
2453
  * Unsubscribe from one feed `(username, name)` — disable that automation's
@@ -3714,7 +3724,7 @@ var installPlaybookRuntime = (targetWindow) => {
3714
3724
  };
3715
3725
 
3716
3726
  // src/index.ts
3717
- var VERSION = true ? "0.19.0" : "dev";
3727
+ var VERSION = true ? "0.20.0" : "dev";
3718
3728
  export {
3719
3729
  AlertsResource,
3720
3730
  AlvaClient,