@alva-ai/toolkit 0.15.1-beta.0 → 0.16.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.cjs CHANGED
@@ -510,6 +510,29 @@ var FeedResource = class {
510
510
  `/api/v1/feed/${encodeURIComponent(String(id))}`
511
511
  );
512
512
  }
513
+ /**
514
+ * Publish or unpublish a feed. Backed by POST /api/v1/feed/:id/visibility.
515
+ *
516
+ * Setting visibility to 'public' publishes the feed (the backend sets
517
+ * feeds.is_public and projects the ALFS public read grant in the same
518
+ * transaction); 'private' unpublishes it. Prefer this over granting the
519
+ * ALFS public read subject directly (e.g. `alva fs grant`), which bypasses
520
+ * the is_public flag and causes drift.
521
+ *
522
+ * Auth: caller must own the feed (uid match), enforced by the backend.
523
+ */
524
+ async setVisibility(params) {
525
+ this.client._requireAuth();
526
+ const id = requireFeedID(params.id);
527
+ if (params.visibility !== "public" && params.visibility !== "private") {
528
+ throw new Error("visibility must be 'public' or 'private'");
529
+ }
530
+ return this.client._request(
531
+ "POST",
532
+ `/api/v1/feed/${encodeURIComponent(String(id))}/visibility`,
533
+ { body: { visibility: params.visibility } }
534
+ );
535
+ }
513
536
  };
514
537
  function requireFeedID(id) {
515
538
  if (!Number.isInteger(id) || id <= 0) {
@@ -810,16 +833,6 @@ var SKILL_ENDPOINT_METADATA = [
810
833
  access: "free_and_pro",
811
834
  pro_required: false
812
835
  },
813
- {
814
- skill: "arrays-data-api-spot-market-price-and-volume",
815
- file: "crypto-detail",
816
- method: "GET",
817
- path: "/api/v1/crypto/detail",
818
- tier: "public",
819
- required_subscription_tier: "free",
820
- access: "free_and_pro",
821
- pro_required: false
822
- },
823
836
  {
824
837
  skill: "arrays-data-api-crypto-metrics-and-screener",
825
838
  file: "fear-greed-index",
@@ -860,16 +873,6 @@ var SKILL_ENDPOINT_METADATA = [
860
873
  access: "free_and_pro",
861
874
  pro_required: false
862
875
  },
863
- {
864
- skill: "arrays-data-api-crypto-metrics-and-screener",
865
- file: "list",
866
- method: "GET",
867
- path: "/api/v1/crypto/list",
868
- tier: "public",
869
- required_subscription_tier: "free",
870
- access: "free_and_pro",
871
- pro_required: false
872
- },
873
876
  {
874
877
  skill: "arrays-data-api-crypto-futures-data",
875
878
  file: "long-short-ratio",
@@ -932,9 +935,9 @@ var SKILL_ENDPOINT_METADATA = [
932
935
  },
933
936
  {
934
937
  skill: "arrays-data-api-crypto-metrics-and-screener",
935
- file: "trading-pair",
938
+ file: "crypto-detail",
936
939
  method: "GET",
937
- path: "/api/v1/crypto/trading-pair",
940
+ path: "/api/v1/crypto/detail",
938
941
  tier: "public",
939
942
  required_subscription_tier: "free",
940
943
  access: "free_and_pro",
@@ -1540,6 +1543,26 @@ var SKILL_ENDPOINT_METADATA = [
1540
1543
  access: "pro_only",
1541
1544
  pro_required: true
1542
1545
  },
1546
+ {
1547
+ skill: "arrays-data-api-options",
1548
+ file: "greeks",
1549
+ method: "GET",
1550
+ path: "/api/v1/options/greeks",
1551
+ tier: "alternative",
1552
+ required_subscription_tier: "pro",
1553
+ access: "pro_only",
1554
+ pro_required: true
1555
+ },
1556
+ {
1557
+ skill: "arrays-data-api-options",
1558
+ file: "chain",
1559
+ method: "GET",
1560
+ path: "/api/v1/options/chain",
1561
+ tier: "alternative",
1562
+ required_subscription_tier: "pro",
1563
+ access: "pro_only",
1564
+ pro_required: true
1565
+ },
1543
1566
  {
1544
1567
  skill: "arrays-data-api-equity-fundamentals",
1545
1568
  file: "company-executives",
@@ -1903,6 +1926,66 @@ var SKILL_ENDPOINT_METADATA = [
1903
1926
  required_subscription_tier: "free",
1904
1927
  access: "free_and_pro",
1905
1928
  pro_required: false
1929
+ },
1930
+ {
1931
+ skill: "arrays-data-api-semiconductor-price",
1932
+ file: "dram-spot-price",
1933
+ method: "GET",
1934
+ path: "/api/v1/other/semiconductor/dram-spot-price",
1935
+ tier: "alternative",
1936
+ required_subscription_tier: "pro",
1937
+ access: "pro_only",
1938
+ pro_required: true
1939
+ },
1940
+ {
1941
+ skill: "arrays-data-api-semiconductor-price",
1942
+ file: "dram-contract-price",
1943
+ method: "GET",
1944
+ path: "/api/v1/other/semiconductor/dram-contract-price",
1945
+ tier: "alternative",
1946
+ required_subscription_tier: "pro",
1947
+ access: "pro_only",
1948
+ pro_required: true
1949
+ },
1950
+ {
1951
+ skill: "arrays-data-api-semiconductor-price",
1952
+ file: "nand-flash-spot-price",
1953
+ method: "GET",
1954
+ path: "/api/v1/other/semiconductor/nand-flash-spot-price",
1955
+ tier: "alternative",
1956
+ required_subscription_tier: "pro",
1957
+ access: "pro_only",
1958
+ pro_required: true
1959
+ },
1960
+ {
1961
+ skill: "arrays-data-api-semiconductor-price",
1962
+ file: "nand-flash-contract-price",
1963
+ method: "GET",
1964
+ path: "/api/v1/other/semiconductor/nand-flash-contract-price",
1965
+ tier: "alternative",
1966
+ required_subscription_tier: "pro",
1967
+ access: "pro_only",
1968
+ pro_required: true
1969
+ },
1970
+ {
1971
+ skill: "arrays-data-api-semiconductor-price",
1972
+ file: "memory-card-price",
1973
+ method: "GET",
1974
+ path: "/api/v1/other/semiconductor/memory-card-price",
1975
+ tier: "alternative",
1976
+ required_subscription_tier: "pro",
1977
+ access: "pro_only",
1978
+ pro_required: true
1979
+ },
1980
+ {
1981
+ skill: "arrays-data-api-semiconductor-price",
1982
+ file: "dxi-index",
1983
+ method: "GET",
1984
+ path: "/api/v1/other/semiconductor/dxi-index",
1985
+ tier: "alternative",
1986
+ required_subscription_tier: "pro",
1987
+ access: "pro_only",
1988
+ pro_required: true
1906
1989
  }
1907
1990
  ];
1908
1991
  function getSkillEndpointMetadata(skill, file) {
@@ -2481,6 +2564,9 @@ var AlertsResource = class {
2481
2564
  list(params = {}) {
2482
2565
  return this.client.subscriptions.list(params);
2483
2566
  }
2567
+ follows(params = {}) {
2568
+ return this.client.subscriptions.follows(params);
2569
+ }
2484
2570
  enableAutomation(params) {
2485
2571
  return this.client.subscriptions.subscribeFeed(params);
2486
2572
  }
@@ -2548,6 +2634,24 @@ var ChannelGroupSubscriptionsResource = class {
2548
2634
  }
2549
2635
  );
2550
2636
  }
2637
+ /**
2638
+ * Read a group's buffered chat messages in a time window, for the group-chat
2639
+ * digest automation. Admin-gated: the authenticated caller must be that
2640
+ * group's Alva admin (a digest feed runs as that admin). Each message carries
2641
+ * a `permalink` deep-link back to the original message for "jump to original".
2642
+ * `from_micros`/`to_micros` are message-origin timestamps in microseconds.
2643
+ */
2644
+ async getGroupChatHistory(params) {
2645
+ this.client._requireAuth();
2646
+ return this.client._request("GET", "/api/v1/channel/group-history", {
2647
+ query: {
2648
+ channel: params.channel,
2649
+ remote_chat_id: params.remote_chat_id,
2650
+ from_micros: String(params.from_micros),
2651
+ to_micros: String(params.to_micros)
2652
+ }
2653
+ });
2654
+ }
2551
2655
  };
2552
2656
  function mutationBody(params) {
2553
2657
  return `{"session_id":${idLiteral(params.session_id)},"target_type":${JSON.stringify(params.target_type)},"target_id":${idLiteral(params.target_id)}}`;
@@ -3657,7 +3761,7 @@ var installPlaybookRuntime = (targetWindow) => {
3657
3761
  };
3658
3762
 
3659
3763
  // src/index.ts
3660
- var VERSION = true ? "0.15.1-beta.0" : "dev";
3764
+ var VERSION = true ? "0.16.0" : "dev";
3661
3765
  // Annotate the CommonJS export names for ESM import in node:
3662
3766
  0 && (module.exports = {
3663
3767
  AlertsResource,