reportify-sdk 0.3.18 → 0.3.20

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
@@ -1281,19 +1281,28 @@ declare class AgentModule {
1281
1281
  * Create a new agent conversation
1282
1282
  *
1283
1283
  * @param agentId - Agent ID
1284
- * @param title - Optional conversation title
1284
+ * @param options - Optional parameters
1285
+ * @param options.title - Conversation title
1286
+ * @param options.conversationType - Conversation type: "agent_chat", "task_chat", "debug_chat", "bot_chat"
1285
1287
  */
1286
- createConversation(agentId: number, title?: string): Promise<AgentConversation>;
1288
+ createConversation(agentId: number, options?: {
1289
+ title?: string;
1290
+ conversationType?: string;
1291
+ }): Promise<AgentConversation>;
1287
1292
  /**
1288
1293
  * Chat with agent in a conversation
1289
1294
  *
1290
1295
  * @param conversationId - Conversation ID
1291
1296
  * @param message - User message
1292
1297
  * @param options - Chat options
1298
+ * @param options.documents - Related documents
1299
+ * @param options.stream - Whether to use streaming response (default: true)
1300
+ * @param options.background - Whether to run agent task in background (default: false). When true, returns immediately without waiting for events.
1293
1301
  */
1294
1302
  chat(conversationId: number, message: string, options?: {
1295
1303
  documents?: DocumentInput[];
1296
1304
  stream?: boolean;
1305
+ background?: boolean;
1297
1306
  }): Promise<unknown>;
1298
1307
  /**
1299
1308
  * Get conversation details
@@ -1513,6 +1522,122 @@ declare class UserModule {
1513
1522
  symbol: string;
1514
1523
  success: boolean;
1515
1524
  }>;
1525
+ }
1526
+
1527
+ /**
1528
+ * Search Module
1529
+ *
1530
+ * Provides document search functionality across various categories.
1531
+ */
1532
+
1533
+ /**
1534
+ * Search module for document search functionality.
1535
+ *
1536
+ * @example
1537
+ * ```typescript
1538
+ * const results = await client.search.all('Tesla earnings');
1539
+ * const news = await client.search.news('Apple iPhone');
1540
+ * ```
1541
+ */
1542
+ declare class SearchModule {
1543
+ private client;
1544
+ constructor(client: Reportify);
1545
+ /**
1546
+ * Search documents across all categories
1547
+ *
1548
+ * @param query - Search query string
1549
+ * @param options - Search options
1550
+ * @returns List of matching documents
1551
+ */
1552
+ all(query: string, options?: SearchOptions): Promise<Document[]>;
1553
+ /**
1554
+ * Search news articles
1555
+ */
1556
+ news(query: string, options?: SearchOptions): Promise<Document[]>;
1557
+ /**
1558
+ * Search research reports
1559
+ */
1560
+ reports(query: string, options?: SearchOptions): Promise<Document[]>;
1561
+ /**
1562
+ * Search company filings
1563
+ *
1564
+ * @param query - Search query string
1565
+ * @param symbols - Stock symbols in market:ticker format (required, e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
1566
+ * @param options - Search options
1567
+ */
1568
+ filings(query: string, symbols: string[], options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
1569
+ /**
1570
+ * Search for earnings-related conference call transcripts and presentation slides.
1571
+ * Query is optional - if not provided, returns documents in reverse chronological order;
1572
+ * if provided, results are sorted by relevance by default.
1573
+ *
1574
+ * @param symbols - Stock symbols in market:ticker format (required, e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
1575
+ * @param options - Search options including query, fiscal year/quarter filters, and sort order
1576
+ */
1577
+ conferenceCalls(symbols: string[], options?: EarningsSearchOptions & {
1578
+ query?: string;
1579
+ }): Promise<Document[]>;
1580
+ /**
1581
+ * Search for earnings-related documents submitted to exchanges, including quarterly reports,
1582
+ * semi-annual reports, and annual reports. Query is optional - if not provided, returns
1583
+ * documents in reverse chronological order; if provided, results are sorted by relevance by default.
1584
+ *
1585
+ * @param symbols - Stock symbols in market:ticker format (required, e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
1586
+ * @param options - Search options including query, fiscal year/quarter filters, and sort order
1587
+ */
1588
+ earningsPack(symbols: string[], options?: EarningsSearchOptions & {
1589
+ query?: string;
1590
+ }): Promise<Document[]>;
1591
+ /**
1592
+ * Search conference calls and IR (Investor Relations) meetings
1593
+ */
1594
+ minutes(query: string, options?: SearchOptions): Promise<Document[]>;
1595
+ /**
1596
+ * Search social media content
1597
+ */
1598
+ socials(query: string, options?: SearchOptions): Promise<Document[]>;
1599
+ /**
1600
+ * Search webpage content
1601
+ */
1602
+ webpages(query: string, options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
1603
+ /**
1604
+ * Crawl web content from given URLs.
1605
+ *
1606
+ * @param urls Array of URLs to get contents for
1607
+ * @param options Options for text, highlights, summary, subpages, etc.
1608
+ * @returns CrawlResponse Promise with extracted results and statuses
1609
+ */
1610
+ crawl(urls: string[], options?: {
1611
+ text?: boolean | {
1612
+ max_characters?: number;
1613
+ include_html_tags?: boolean;
1614
+ verbosity?: 'compact' | 'full';
1615
+ };
1616
+ highlights?: {
1617
+ query?: string;
1618
+ max_characters?: number;
1619
+ num_sentences?: number;
1620
+ highlights_per_url?: number;
1621
+ };
1622
+ summary?: {
1623
+ query?: string;
1624
+ };
1625
+ subpages?: number;
1626
+ subpage_target?: string[];
1627
+ max_age_hours?: number;
1628
+ livecrawl_timeout?: number;
1629
+ }): Promise<any>;
1630
+ }
1631
+
1632
+ /**
1633
+ * Following Module
1634
+ *
1635
+ * Provides access to follow group management functionality.
1636
+ */
1637
+
1638
+ declare class FollowingModule {
1639
+ private client;
1640
+ constructor(client: Reportify);
1516
1641
  /**
1517
1642
  * Create a new follow group
1518
1643
  *
@@ -1523,7 +1648,7 @@ declare class UserModule {
1523
1648
  *
1524
1649
  * @example
1525
1650
  * ```typescript
1526
- * const result = await client.user.createFollowGroup('My Stocks', [
1651
+ * const result = await client.following.createFollowGroup('My Stocks', [
1527
1652
  * { follow_type: 1, follow_value: 'US:AAPL' },
1528
1653
  * { follow_type: 1, follow_value: 'HK:00700' }
1529
1654
  * ]);
@@ -1545,7 +1670,7 @@ declare class UserModule {
1545
1670
  *
1546
1671
  * @example
1547
1672
  * ```typescript
1548
- * const groups = await client.user.getFollowGroups();
1673
+ * const groups = await client.following.getFollowGroups();
1549
1674
  * groups.forEach(group => {
1550
1675
  * console.log(`${group.name}: ${group.count} items`);
1551
1676
  * });
@@ -1564,7 +1689,7 @@ declare class UserModule {
1564
1689
  *
1565
1690
  * @example
1566
1691
  * ```typescript
1567
- * const group = await client.user.getFollowGroup('group_123');
1692
+ * const group = await client.following.getFollowGroup('group_123');
1568
1693
  * console.log(`${group.name}: ${group.count} items`);
1569
1694
  * ```
1570
1695
  */
@@ -1586,7 +1711,7 @@ declare class UserModule {
1586
1711
  *
1587
1712
  * @example
1588
1713
  * ```typescript
1589
- * const result = await client.user.updateFollowGroup('group_123', 'New Name');
1714
+ * const result = await client.following.updateFollowGroup('group_123', 'New Name');
1590
1715
  * console.log(`Updated: ${result.name}`);
1591
1716
  * ```
1592
1717
  */
@@ -1603,7 +1728,7 @@ declare class UserModule {
1603
1728
  *
1604
1729
  * @example
1605
1730
  * ```typescript
1606
- * await client.user.deleteFollowGroup('group_123');
1731
+ * await client.following.deleteFollowGroup('group_123');
1607
1732
  * ```
1608
1733
  */
1609
1734
  deleteFollowGroup(groupId: string): Promise<void>;
@@ -1617,7 +1742,7 @@ declare class UserModule {
1617
1742
  *
1618
1743
  * @example
1619
1744
  * ```typescript
1620
- * await client.user.addFollowsToGroup('group_123', [
1745
+ * await client.following.addFollowsToGroup('group_123', [
1621
1746
  * { follow_type: 1, follow_value: 'US:TSLA' }
1622
1747
  * ]);
1623
1748
  * ```
@@ -1635,7 +1760,7 @@ declare class UserModule {
1635
1760
  *
1636
1761
  * @example
1637
1762
  * ```typescript
1638
- * await client.user.removeFollowsFromGroup('group_123', ['AAPL', 'MSFT']);
1763
+ * await client.following.removeFollowsFromGroup('group_123', ['AAPL', 'MSFT']);
1639
1764
  * ```
1640
1765
  */
1641
1766
  removeFollowsFromGroup(groupId: string, followValues: string[]): Promise<void>;
@@ -1649,7 +1774,7 @@ declare class UserModule {
1649
1774
  *
1650
1775
  * @example
1651
1776
  * ```typescript
1652
- * await client.user.setGroupFollows('group_123', [
1777
+ * await client.following.setGroupFollows('group_123', [
1653
1778
  * { follow_type: 1, follow_value: 'US:AAPL' },
1654
1779
  * { follow_type: 1, follow_value: 'HK:00700' }
1655
1780
  * ]);
@@ -1660,23 +1785,23 @@ declare class UserModule {
1660
1785
  follow_value: string;
1661
1786
  }>): Promise<void>;
1662
1787
  /**
1663
- * Get reports for a follow group
1788
+ * Get docs for a follow group
1664
1789
  *
1665
1790
  * @param groupId - Group ID
1666
1791
  * @param pageNum - Page number (default: 1)
1667
1792
  * @param pageSize - Page size (default: 10, max: 100)
1668
- * @returns Report data including items list, total_count, page_num, and page_size
1793
+ * @returns docs data including items list, total_count, page_num, and page_size
1669
1794
  *
1670
1795
  * @example
1671
1796
  * ```typescript
1672
- * const result = await client.user.getGroupReports('group_123', 1, 20);
1797
+ * const result = await client.following.getFollowGroupDocs('group_123', 1, 20);
1673
1798
  * console.log(`Total: ${result.total_count}`);
1674
- * result.items.forEach(report => {
1675
- * console.log(report.title || 'Untitled');
1799
+ * result.items.forEach(doc => {
1800
+ * console.log(doc.title || 'Untitled');
1676
1801
  * });
1677
1802
  * ```
1678
1803
  */
1679
- getGroupReports(groupId: string, pageNum?: number, pageSize?: number): Promise<{
1804
+ getFollowGroupDocs(groupId: string, pageNum?: number, pageSize?: number): Promise<{
1680
1805
  items: any[];
1681
1806
  total_count: number;
1682
1807
  page_num: number;
@@ -1684,111 +1809,6 @@ declare class UserModule {
1684
1809
  }>;
1685
1810
  }
1686
1811
 
1687
- /**
1688
- * Search Module
1689
- *
1690
- * Provides document search functionality across various categories.
1691
- */
1692
-
1693
- /**
1694
- * Search module for document search functionality.
1695
- *
1696
- * @example
1697
- * ```typescript
1698
- * const results = await client.search.all('Tesla earnings');
1699
- * const news = await client.search.news('Apple iPhone');
1700
- * ```
1701
- */
1702
- declare class SearchModule {
1703
- private client;
1704
- constructor(client: Reportify);
1705
- /**
1706
- * Search documents across all categories
1707
- *
1708
- * @param query - Search query string
1709
- * @param options - Search options
1710
- * @returns List of matching documents
1711
- */
1712
- all(query: string, options?: SearchOptions): Promise<Document[]>;
1713
- /**
1714
- * Search news articles
1715
- */
1716
- news(query: string, options?: SearchOptions): Promise<Document[]>;
1717
- /**
1718
- * Search research reports
1719
- */
1720
- reports(query: string, options?: SearchOptions): Promise<Document[]>;
1721
- /**
1722
- * Search company filings
1723
- *
1724
- * @param query - Search query string
1725
- * @param symbols - Stock symbols in market:ticker format (required, e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
1726
- * @param options - Search options
1727
- */
1728
- filings(query: string, symbols: string[], options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
1729
- /**
1730
- * Search for earnings-related conference call transcripts and presentation slides.
1731
- * Query is optional - if not provided, returns documents in reverse chronological order;
1732
- * if provided, results are sorted by relevance by default.
1733
- *
1734
- * @param symbols - Stock symbols in market:ticker format (required, e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
1735
- * @param options - Search options including query, fiscal year/quarter filters, and sort order
1736
- */
1737
- conferenceCalls(symbols: string[], options?: EarningsSearchOptions & {
1738
- query?: string;
1739
- }): Promise<Document[]>;
1740
- /**
1741
- * Search for earnings-related documents submitted to exchanges, including quarterly reports,
1742
- * semi-annual reports, and annual reports. Query is optional - if not provided, returns
1743
- * documents in reverse chronological order; if provided, results are sorted by relevance by default.
1744
- *
1745
- * @param symbols - Stock symbols in market:ticker format (required, e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
1746
- * @param options - Search options including query, fiscal year/quarter filters, and sort order
1747
- */
1748
- earningsPack(symbols: string[], options?: EarningsSearchOptions & {
1749
- query?: string;
1750
- }): Promise<Document[]>;
1751
- /**
1752
- * Search conference calls and IR (Investor Relations) meetings
1753
- */
1754
- minutes(query: string, options?: SearchOptions): Promise<Document[]>;
1755
- /**
1756
- * Search social media content
1757
- */
1758
- socials(query: string, options?: SearchOptions): Promise<Document[]>;
1759
- /**
1760
- * Search webpage content
1761
- */
1762
- webpages(query: string, options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
1763
- /**
1764
- * Crawl web content from given URLs.
1765
- *
1766
- * @param urls Array of URLs to get contents for
1767
- * @param options Options for text, highlights, summary, subpages, etc.
1768
- * @returns CrawlResponse Promise with extracted results and statuses
1769
- */
1770
- crawl(urls: string[], options?: {
1771
- text?: boolean | {
1772
- max_characters?: number;
1773
- include_html_tags?: boolean;
1774
- verbosity?: 'compact' | 'full';
1775
- };
1776
- highlights?: {
1777
- query?: string;
1778
- max_characters?: number;
1779
- num_sentences?: number;
1780
- highlights_per_url?: number;
1781
- };
1782
- summary?: {
1783
- query?: string;
1784
- };
1785
- subpages?: number;
1786
- subpage_target?: string[];
1787
- max_age_hours?: number;
1788
- livecrawl_timeout?: number;
1789
- }): Promise<any>;
1790
- }
1791
-
1792
1812
  /**
1793
1813
  * Reportify Client
1794
1814
  *
@@ -1824,6 +1844,7 @@ declare class Reportify {
1824
1844
  readonly kb: KBModule;
1825
1845
  readonly timeline: TimelineModule;
1826
1846
  readonly user: UserModule;
1847
+ readonly following: FollowingModule;
1827
1848
  constructor(config: ReportifyConfig);
1828
1849
  /**
1829
1850
  * Make an HTTP request to the API
@@ -1854,4 +1875,4 @@ declare class Reportify {
1854
1875
  getBytes(path: string): Promise<ArrayBuffer>;
1855
1876
  }
1856
1877
 
1857
- export { APIError, type AgentConversation, type AgentMessage, AgentModule, AuthenticationError, type BacktestParams, type BacktestResult, type BatchKline1mParams, type BatchMinuteParams, type BatchOHLCVParams, type Calendar, type Channel, ChannelsModule, type ChatCompletionOptions, type ChatCompletionResponse, type ChatMode, ChatModule, type Chunk, type ChunkSearchOptions, type CompanyInfo, type CompanyOverview, type Concept, type ConceptDoc, type ConceptEvent, type ConceptFeed, type ConceptStock, ConceptsModule, type DocsListOptions, DocsModule, type Document, type DocumentInput, type EarningsEvent, type EarningsSearchOptions, type FactorComputeParams, type FactorMeta, type FinancialStatement, type FollowedCompany, type IPOEvent, type IPOStatus, type IndexConstituent, type IndexFund, type IndicatorComputeParams, type IndicatorData, type IndicatorMeta, type IndustryConstituent, KBModule, type KBSearchOptions, type Kline1mParams, type Market, type MinuteParams, NotFoundError, type OHLCVData, type OHLCVParams, type PaginatedResponse, type Period, type PriceData, QuantModule, type Quote, RateLimitError, Reportify, type ReportifyConfig, ReportifyError, type ScreenParams, type ScreenedStock, SearchModule, type SearchOptions, type Shareholder, type ShareholderType, type StockInfo, type StockMarket, StockModule, TimelineModule, type TimelineOptions, type UploadDocRequest, UserModule };
1878
+ export { APIError, type AgentConversation, type AgentMessage, AgentModule, AuthenticationError, type BacktestParams, type BacktestResult, type BatchKline1mParams, type BatchMinuteParams, type BatchOHLCVParams, type Calendar, type Channel, ChannelsModule, type ChatCompletionOptions, type ChatCompletionResponse, type ChatMode, ChatModule, type Chunk, type ChunkSearchOptions, type CompanyInfo, type CompanyOverview, type Concept, type ConceptDoc, type ConceptEvent, type ConceptFeed, type ConceptStock, ConceptsModule, type DocsListOptions, DocsModule, type Document, type DocumentInput, type EarningsEvent, type EarningsSearchOptions, type FactorComputeParams, type FactorMeta, type FinancialStatement, type FollowedCompany, FollowingModule, type IPOEvent, type IPOStatus, type IndexConstituent, type IndexFund, type IndicatorComputeParams, type IndicatorData, type IndicatorMeta, type IndustryConstituent, KBModule, type KBSearchOptions, type Kline1mParams, type Market, type MinuteParams, NotFoundError, type OHLCVData, type OHLCVParams, type PaginatedResponse, type Period, type PriceData, QuantModule, type Quote, RateLimitError, Reportify, type ReportifyConfig, ReportifyError, type ScreenParams, type ScreenedStock, SearchModule, type SearchOptions, type Shareholder, type ShareholderType, type StockInfo, type StockMarket, StockModule, TimelineModule, type TimelineOptions, type UploadDocRequest, UserModule };