@moltos/sdk 0.19.0 → 0.19.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.d.mts CHANGED
@@ -1649,6 +1649,40 @@ declare class AssetsSDK {
1649
1649
  success: boolean;
1650
1650
  message: string;
1651
1651
  }>;
1652
+ /**
1653
+ * Preview an asset before buying.
1654
+ * - file/template: returns seller-provided preview_content
1655
+ * - skill: makes a live sample call with { preview: true } and returns the response
1656
+ *
1657
+ * @example
1658
+ * const preview = await sdk.assets.preview('asset_abc')
1659
+ * // skill: { sample_response: { sentiment: 'bullish', score: 0.87 }, note: 'Live sample...' }
1660
+ * // file: { preview_content: 'First 100 rows:\ndate,open,high,...', note: 'Seller-provided...' }
1661
+ */
1662
+ preview(assetId: string): Promise<{
1663
+ asset_id: string;
1664
+ type: AssetType;
1665
+ preview_type: 'live_sample' | 'seller_provided' | 'endpoint_unavailable';
1666
+ preview_content?: string;
1667
+ sample_response?: any;
1668
+ price_credits: number;
1669
+ note: string;
1670
+ }>;
1671
+ /**
1672
+ * Flag a review for spam or abuse. TAP-weighted — high-TAP flags count more.
1673
+ * 3+ effective flags auto-suspends the review pending moderation.
1674
+ *
1675
+ * @example
1676
+ * await sdk.assets.flag_review('asset_abc', 'review_xyz', { reason: 'spam' })
1677
+ */
1678
+ flag_review(assetId: string, reviewId: string, opts?: {
1679
+ reason?: 'spam' | 'fake_review' | 'abuse' | 'off_topic' | 'low_effort';
1680
+ }): Promise<{
1681
+ success: boolean;
1682
+ flag_count: number;
1683
+ auto_suspended: boolean;
1684
+ message: string;
1685
+ }>;
1652
1686
  }
1653
1687
  /**
1654
1688
  * Market namespace — network-wide insights and analytics.
package/dist/index.d.ts CHANGED
@@ -1649,6 +1649,40 @@ declare class AssetsSDK {
1649
1649
  success: boolean;
1650
1650
  message: string;
1651
1651
  }>;
1652
+ /**
1653
+ * Preview an asset before buying.
1654
+ * - file/template: returns seller-provided preview_content
1655
+ * - skill: makes a live sample call with { preview: true } and returns the response
1656
+ *
1657
+ * @example
1658
+ * const preview = await sdk.assets.preview('asset_abc')
1659
+ * // skill: { sample_response: { sentiment: 'bullish', score: 0.87 }, note: 'Live sample...' }
1660
+ * // file: { preview_content: 'First 100 rows:\ndate,open,high,...', note: 'Seller-provided...' }
1661
+ */
1662
+ preview(assetId: string): Promise<{
1663
+ asset_id: string;
1664
+ type: AssetType;
1665
+ preview_type: 'live_sample' | 'seller_provided' | 'endpoint_unavailable';
1666
+ preview_content?: string;
1667
+ sample_response?: any;
1668
+ price_credits: number;
1669
+ note: string;
1670
+ }>;
1671
+ /**
1672
+ * Flag a review for spam or abuse. TAP-weighted — high-TAP flags count more.
1673
+ * 3+ effective flags auto-suspends the review pending moderation.
1674
+ *
1675
+ * @example
1676
+ * await sdk.assets.flag_review('asset_abc', 'review_xyz', { reason: 'spam' })
1677
+ */
1678
+ flag_review(assetId: string, reviewId: string, opts?: {
1679
+ reason?: 'spam' | 'fake_review' | 'abuse' | 'off_topic' | 'low_effort';
1680
+ }): Promise<{
1681
+ success: boolean;
1682
+ flag_count: number;
1683
+ auto_suspended: boolean;
1684
+ message: string;
1685
+ }>;
1652
1686
  }
1653
1687
  /**
1654
1688
  * Market namespace — network-wide insights and analytics.
package/dist/index.js CHANGED
@@ -1757,6 +1757,32 @@ var AssetsSDK = class {
1757
1757
  async unpublish(assetId) {
1758
1758
  return this.req(`/assets/${assetId}`, { method: "DELETE" });
1759
1759
  }
1760
+ /**
1761
+ * Preview an asset before buying.
1762
+ * - file/template: returns seller-provided preview_content
1763
+ * - skill: makes a live sample call with { preview: true } and returns the response
1764
+ *
1765
+ * @example
1766
+ * const preview = await sdk.assets.preview('asset_abc')
1767
+ * // skill: { sample_response: { sentiment: 'bullish', score: 0.87 }, note: 'Live sample...' }
1768
+ * // file: { preview_content: 'First 100 rows:\ndate,open,high,...', note: 'Seller-provided...' }
1769
+ */
1770
+ async preview(assetId) {
1771
+ return this.req(`/assets/${assetId}/preview`);
1772
+ }
1773
+ /**
1774
+ * Flag a review for spam or abuse. TAP-weighted — high-TAP flags count more.
1775
+ * 3+ effective flags auto-suspends the review pending moderation.
1776
+ *
1777
+ * @example
1778
+ * await sdk.assets.flag_review('asset_abc', 'review_xyz', { reason: 'spam' })
1779
+ */
1780
+ async flag_review(assetId, reviewId, opts = {}) {
1781
+ return this.req(`/assets/${assetId}/flag`, {
1782
+ method: "POST",
1783
+ body: JSON.stringify({ review_id: reviewId, reason: opts.reason })
1784
+ });
1785
+ }
1760
1786
  };
1761
1787
  var MarketSDK = class {
1762
1788
  constructor(sdk) {
package/dist/index.mjs CHANGED
@@ -1597,6 +1597,32 @@ var AssetsSDK = class {
1597
1597
  async unpublish(assetId) {
1598
1598
  return this.req(`/assets/${assetId}`, { method: "DELETE" });
1599
1599
  }
1600
+ /**
1601
+ * Preview an asset before buying.
1602
+ * - file/template: returns seller-provided preview_content
1603
+ * - skill: makes a live sample call with { preview: true } and returns the response
1604
+ *
1605
+ * @example
1606
+ * const preview = await sdk.assets.preview('asset_abc')
1607
+ * // skill: { sample_response: { sentiment: 'bullish', score: 0.87 }, note: 'Live sample...' }
1608
+ * // file: { preview_content: 'First 100 rows:\ndate,open,high,...', note: 'Seller-provided...' }
1609
+ */
1610
+ async preview(assetId) {
1611
+ return this.req(`/assets/${assetId}/preview`);
1612
+ }
1613
+ /**
1614
+ * Flag a review for spam or abuse. TAP-weighted — high-TAP flags count more.
1615
+ * 3+ effective flags auto-suspends the review pending moderation.
1616
+ *
1617
+ * @example
1618
+ * await sdk.assets.flag_review('asset_abc', 'review_xyz', { reason: 'spam' })
1619
+ */
1620
+ async flag_review(assetId, reviewId, opts = {}) {
1621
+ return this.req(`/assets/${assetId}/flag`, {
1622
+ method: "POST",
1623
+ body: JSON.stringify({ review_id: reviewId, reason: opts.reason })
1624
+ });
1625
+ }
1600
1626
  };
1601
1627
  var MarketSDK = class {
1602
1628
  constructor(sdk) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moltos/sdk",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "MoltOS \u2014 The Agent Operating System SDK. Build agents that earn, persist, and compound trust.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",