reportify-sdk 0.3.13 → 0.3.15

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
@@ -1409,7 +1409,7 @@ declare class UserModule {
1409
1409
  * Unfollow a company (remove from stock watchlist)
1410
1410
  *
1411
1411
  * @param symbol - Stock symbol in market:ticker format (e.g., US:AAPL, HK:00700)
1412
- * @returns Status of the unfollow operation
1412
+ * @returns Status of unfollow operation
1413
1413
  *
1414
1414
  * @example
1415
1415
  * ```typescript
@@ -1421,6 +1421,171 @@ declare class UserModule {
1421
1421
  symbol: string;
1422
1422
  success: boolean;
1423
1423
  }>;
1424
+ /**
1425
+ * Create a new follow group
1426
+ *
1427
+ * @param name - Group name
1428
+ * @param followValues - List of follow values (each with 'follow_type' as int and 'follow_value' as string)
1429
+ * follow_type: 1=company, 3=channel
1430
+ * @returns Created group information including group_id, name, and count
1431
+ *
1432
+ * @example
1433
+ * ```typescript
1434
+ * const result = await client.user.createFollowGroup('My Stocks', [
1435
+ * { follow_type: 1, follow_value: 'US:AAPL' },
1436
+ * { follow_type: 1, follow_value: 'HK:00700' }
1437
+ * ]);
1438
+ * console.log(`Created group: ${result.group_id}`);
1439
+ * ```
1440
+ */
1441
+ createFollowGroup(name: string, followValues?: Array<{
1442
+ follow_type: number;
1443
+ follow_value: string;
1444
+ }>): Promise<{
1445
+ group_id: string;
1446
+ name: string;
1447
+ count: number;
1448
+ }>;
1449
+ /**
1450
+ * Get all follow groups for authenticated user
1451
+ *
1452
+ * @returns List of follow groups with group_id, name, and count
1453
+ *
1454
+ * @example
1455
+ * ```typescript
1456
+ * const groups = await client.user.getFollowGroups();
1457
+ * groups.forEach(group => {
1458
+ * console.log(`${group.name}: ${group.count} items`);
1459
+ * });
1460
+ * ```
1461
+ */
1462
+ getFollowGroups(): Promise<Array<{
1463
+ group_id: string;
1464
+ name: string;
1465
+ count: number;
1466
+ }>>;
1467
+ /**
1468
+ * Get a follow group by ID
1469
+ *
1470
+ * @param groupId - Group ID
1471
+ * @returns Group information including group_id, name, and count
1472
+ *
1473
+ * @example
1474
+ * ```typescript
1475
+ * const group = await client.user.getFollowGroup('group_123');
1476
+ * console.log(`${group.name}: ${group.count} items`);
1477
+ * ```
1478
+ */
1479
+ getFollowGroup(groupId: string): Promise<{
1480
+ group_id: string;
1481
+ name: string;
1482
+ count: number;
1483
+ }>;
1484
+ /**
1485
+ * Update a follow group
1486
+ *
1487
+ * @param groupId - Group ID
1488
+ * @param name - New group name
1489
+ * @returns Updated group information
1490
+ *
1491
+ * @example
1492
+ * ```typescript
1493
+ * const result = await client.user.updateFollowGroup('group_123', 'New Name');
1494
+ * console.log(`Updated: ${result.name}`);
1495
+ * ```
1496
+ */
1497
+ updateFollowGroup(groupId: string, name?: string): Promise<{
1498
+ group_id: string;
1499
+ name: string;
1500
+ count: number;
1501
+ }>;
1502
+ /**
1503
+ * Delete a follow group
1504
+ *
1505
+ * @param groupId - Group ID
1506
+ * @returns Status message
1507
+ *
1508
+ * @example
1509
+ * ```typescript
1510
+ * await client.user.deleteFollowGroup('group_123');
1511
+ * ```
1512
+ */
1513
+ deleteFollowGroup(groupId: string): Promise<void>;
1514
+ /**
1515
+ * Add follows to a group
1516
+ *
1517
+ * @param groupId - Group ID
1518
+ * @param followValues - List of follow values (each with 'follow_type' as int and 'follow_value' as string)
1519
+ * follow_type: 1=company, 3=channel
1520
+ * @returns Status message
1521
+ *
1522
+ * @example
1523
+ * ```typescript
1524
+ * await client.user.addFollowsToGroup('group_123', [
1525
+ * { follow_type: 1, follow_value: 'US:TSLA' }
1526
+ * ]);
1527
+ * ```
1528
+ */
1529
+ addFollowsToGroup(groupId: string, followValues: Array<{
1530
+ follow_type: number;
1531
+ follow_value: string;
1532
+ }>): Promise<void>;
1533
+ /**
1534
+ * Remove follows from a group
1535
+ *
1536
+ * @param groupId - Group ID
1537
+ * @param followIds - List of follow IDs to remove
1538
+ * @returns Status message
1539
+ *
1540
+ * @example
1541
+ * ```typescript
1542
+ * await client.user.removeFollowsFromGroup('group_123', ['follow_1', 'follow_2']);
1543
+ * ```
1544
+ */
1545
+ removeFollowsFromGroup(groupId: string, followIds: string[]): Promise<void>;
1546
+ /**
1547
+ * Set follows for a group (replace all existing follows)
1548
+ *
1549
+ * @param groupId - Group ID
1550
+ * @param followValues - List of follow values (each with 'follow_type' as int and 'follow_value' as string)
1551
+ * follow_type: 1=company, 3=channel
1552
+ * @returns Status message
1553
+ *
1554
+ * @example
1555
+ * ```typescript
1556
+ * await client.user.setGroupFollows('group_123', [
1557
+ * { follow_type: 1, follow_value: 'US:AAPL' },
1558
+ * { follow_type: 1, follow_value: 'HK:00700' }
1559
+ * ]);
1560
+ * ```
1561
+ */
1562
+ setGroupFollows(groupId: string, followValues: Array<{
1563
+ follow_type: number;
1564
+ follow_value: string;
1565
+ }>): Promise<void>;
1566
+ /**
1567
+ * Get reports for a follow group
1568
+ *
1569
+ * @param groupId - Group ID
1570
+ * @param pageNum - Page number (default: 1)
1571
+ * @param pageSize - Page size (default: 10, max: 100)
1572
+ * @returns Report data including items list, total_count, page_num, and page_size
1573
+ *
1574
+ * @example
1575
+ * ```typescript
1576
+ * const result = await client.user.getGroupReports('group_123', 1, 20);
1577
+ * console.log(`Total: ${result.total_count}`);
1578
+ * result.items.forEach(report => {
1579
+ * console.log(report.title || 'Untitled');
1580
+ * });
1581
+ * ```
1582
+ */
1583
+ getGroupReports(groupId: string, pageNum?: number, pageSize?: number): Promise<{
1584
+ items: any[];
1585
+ total_count: number;
1586
+ page_num: number;
1587
+ page_size: number;
1588
+ }>;
1424
1589
  }
1425
1590
 
1426
1591
  /**
@@ -1499,6 +1664,34 @@ declare class SearchModule {
1499
1664
  * Search webpage content
1500
1665
  */
1501
1666
  webpages(query: string, options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
1667
+ /**
1668
+ * Crawl web content from given URLs.
1669
+ *
1670
+ * @param urls Array of URLs to get contents for
1671
+ * @param options Options for text, highlights, summary, subpages, etc.
1672
+ * @returns CrawlResponse Promise with extracted results and statuses
1673
+ */
1674
+ crawl(urls: string[], options?: {
1675
+ text?: boolean | {
1676
+ maxCharacters?: number;
1677
+ includeHtmlTags?: boolean;
1678
+ verbosity?: 'compact' | 'full';
1679
+ };
1680
+ highlights?: {
1681
+ query?: string;
1682
+ maxCharacters?: number;
1683
+ numSentences?: number;
1684
+ highlightsPerUrl?: number;
1685
+ };
1686
+ summary?: {
1687
+ query?: string;
1688
+ schema?: Record<string, unknown>;
1689
+ };
1690
+ subpages?: number;
1691
+ subpageTarget?: string[];
1692
+ maxAgeHours?: number;
1693
+ livecrawlTimeout?: number;
1694
+ }): Promise<any>;
1502
1695
  }
1503
1696
 
1504
1697
  /**
@@ -1556,6 +1749,10 @@ declare class Reportify {
1556
1749
  * Make a DELETE request
1557
1750
  */
1558
1751
  delete<T = unknown>(path: string, body?: Record<string, unknown>): Promise<T>;
1752
+ /**
1753
+ * Make a PUT request
1754
+ */
1755
+ put<T = unknown>(path: string, body?: Record<string, unknown>): Promise<T>;
1559
1756
  /**
1560
1757
  * Make a GET request and return raw bytes (for file downloads)
1561
1758
  */
package/dist/index.d.ts CHANGED
@@ -1409,7 +1409,7 @@ declare class UserModule {
1409
1409
  * Unfollow a company (remove from stock watchlist)
1410
1410
  *
1411
1411
  * @param symbol - Stock symbol in market:ticker format (e.g., US:AAPL, HK:00700)
1412
- * @returns Status of the unfollow operation
1412
+ * @returns Status of unfollow operation
1413
1413
  *
1414
1414
  * @example
1415
1415
  * ```typescript
@@ -1421,6 +1421,171 @@ declare class UserModule {
1421
1421
  symbol: string;
1422
1422
  success: boolean;
1423
1423
  }>;
1424
+ /**
1425
+ * Create a new follow group
1426
+ *
1427
+ * @param name - Group name
1428
+ * @param followValues - List of follow values (each with 'follow_type' as int and 'follow_value' as string)
1429
+ * follow_type: 1=company, 3=channel
1430
+ * @returns Created group information including group_id, name, and count
1431
+ *
1432
+ * @example
1433
+ * ```typescript
1434
+ * const result = await client.user.createFollowGroup('My Stocks', [
1435
+ * { follow_type: 1, follow_value: 'US:AAPL' },
1436
+ * { follow_type: 1, follow_value: 'HK:00700' }
1437
+ * ]);
1438
+ * console.log(`Created group: ${result.group_id}`);
1439
+ * ```
1440
+ */
1441
+ createFollowGroup(name: string, followValues?: Array<{
1442
+ follow_type: number;
1443
+ follow_value: string;
1444
+ }>): Promise<{
1445
+ group_id: string;
1446
+ name: string;
1447
+ count: number;
1448
+ }>;
1449
+ /**
1450
+ * Get all follow groups for authenticated user
1451
+ *
1452
+ * @returns List of follow groups with group_id, name, and count
1453
+ *
1454
+ * @example
1455
+ * ```typescript
1456
+ * const groups = await client.user.getFollowGroups();
1457
+ * groups.forEach(group => {
1458
+ * console.log(`${group.name}: ${group.count} items`);
1459
+ * });
1460
+ * ```
1461
+ */
1462
+ getFollowGroups(): Promise<Array<{
1463
+ group_id: string;
1464
+ name: string;
1465
+ count: number;
1466
+ }>>;
1467
+ /**
1468
+ * Get a follow group by ID
1469
+ *
1470
+ * @param groupId - Group ID
1471
+ * @returns Group information including group_id, name, and count
1472
+ *
1473
+ * @example
1474
+ * ```typescript
1475
+ * const group = await client.user.getFollowGroup('group_123');
1476
+ * console.log(`${group.name}: ${group.count} items`);
1477
+ * ```
1478
+ */
1479
+ getFollowGroup(groupId: string): Promise<{
1480
+ group_id: string;
1481
+ name: string;
1482
+ count: number;
1483
+ }>;
1484
+ /**
1485
+ * Update a follow group
1486
+ *
1487
+ * @param groupId - Group ID
1488
+ * @param name - New group name
1489
+ * @returns Updated group information
1490
+ *
1491
+ * @example
1492
+ * ```typescript
1493
+ * const result = await client.user.updateFollowGroup('group_123', 'New Name');
1494
+ * console.log(`Updated: ${result.name}`);
1495
+ * ```
1496
+ */
1497
+ updateFollowGroup(groupId: string, name?: string): Promise<{
1498
+ group_id: string;
1499
+ name: string;
1500
+ count: number;
1501
+ }>;
1502
+ /**
1503
+ * Delete a follow group
1504
+ *
1505
+ * @param groupId - Group ID
1506
+ * @returns Status message
1507
+ *
1508
+ * @example
1509
+ * ```typescript
1510
+ * await client.user.deleteFollowGroup('group_123');
1511
+ * ```
1512
+ */
1513
+ deleteFollowGroup(groupId: string): Promise<void>;
1514
+ /**
1515
+ * Add follows to a group
1516
+ *
1517
+ * @param groupId - Group ID
1518
+ * @param followValues - List of follow values (each with 'follow_type' as int and 'follow_value' as string)
1519
+ * follow_type: 1=company, 3=channel
1520
+ * @returns Status message
1521
+ *
1522
+ * @example
1523
+ * ```typescript
1524
+ * await client.user.addFollowsToGroup('group_123', [
1525
+ * { follow_type: 1, follow_value: 'US:TSLA' }
1526
+ * ]);
1527
+ * ```
1528
+ */
1529
+ addFollowsToGroup(groupId: string, followValues: Array<{
1530
+ follow_type: number;
1531
+ follow_value: string;
1532
+ }>): Promise<void>;
1533
+ /**
1534
+ * Remove follows from a group
1535
+ *
1536
+ * @param groupId - Group ID
1537
+ * @param followIds - List of follow IDs to remove
1538
+ * @returns Status message
1539
+ *
1540
+ * @example
1541
+ * ```typescript
1542
+ * await client.user.removeFollowsFromGroup('group_123', ['follow_1', 'follow_2']);
1543
+ * ```
1544
+ */
1545
+ removeFollowsFromGroup(groupId: string, followIds: string[]): Promise<void>;
1546
+ /**
1547
+ * Set follows for a group (replace all existing follows)
1548
+ *
1549
+ * @param groupId - Group ID
1550
+ * @param followValues - List of follow values (each with 'follow_type' as int and 'follow_value' as string)
1551
+ * follow_type: 1=company, 3=channel
1552
+ * @returns Status message
1553
+ *
1554
+ * @example
1555
+ * ```typescript
1556
+ * await client.user.setGroupFollows('group_123', [
1557
+ * { follow_type: 1, follow_value: 'US:AAPL' },
1558
+ * { follow_type: 1, follow_value: 'HK:00700' }
1559
+ * ]);
1560
+ * ```
1561
+ */
1562
+ setGroupFollows(groupId: string, followValues: Array<{
1563
+ follow_type: number;
1564
+ follow_value: string;
1565
+ }>): Promise<void>;
1566
+ /**
1567
+ * Get reports for a follow group
1568
+ *
1569
+ * @param groupId - Group ID
1570
+ * @param pageNum - Page number (default: 1)
1571
+ * @param pageSize - Page size (default: 10, max: 100)
1572
+ * @returns Report data including items list, total_count, page_num, and page_size
1573
+ *
1574
+ * @example
1575
+ * ```typescript
1576
+ * const result = await client.user.getGroupReports('group_123', 1, 20);
1577
+ * console.log(`Total: ${result.total_count}`);
1578
+ * result.items.forEach(report => {
1579
+ * console.log(report.title || 'Untitled');
1580
+ * });
1581
+ * ```
1582
+ */
1583
+ getGroupReports(groupId: string, pageNum?: number, pageSize?: number): Promise<{
1584
+ items: any[];
1585
+ total_count: number;
1586
+ page_num: number;
1587
+ page_size: number;
1588
+ }>;
1424
1589
  }
1425
1590
 
1426
1591
  /**
@@ -1499,6 +1664,34 @@ declare class SearchModule {
1499
1664
  * Search webpage content
1500
1665
  */
1501
1666
  webpages(query: string, options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
1667
+ /**
1668
+ * Crawl web content from given URLs.
1669
+ *
1670
+ * @param urls Array of URLs to get contents for
1671
+ * @param options Options for text, highlights, summary, subpages, etc.
1672
+ * @returns CrawlResponse Promise with extracted results and statuses
1673
+ */
1674
+ crawl(urls: string[], options?: {
1675
+ text?: boolean | {
1676
+ maxCharacters?: number;
1677
+ includeHtmlTags?: boolean;
1678
+ verbosity?: 'compact' | 'full';
1679
+ };
1680
+ highlights?: {
1681
+ query?: string;
1682
+ maxCharacters?: number;
1683
+ numSentences?: number;
1684
+ highlightsPerUrl?: number;
1685
+ };
1686
+ summary?: {
1687
+ query?: string;
1688
+ schema?: Record<string, unknown>;
1689
+ };
1690
+ subpages?: number;
1691
+ subpageTarget?: string[];
1692
+ maxAgeHours?: number;
1693
+ livecrawlTimeout?: number;
1694
+ }): Promise<any>;
1502
1695
  }
1503
1696
 
1504
1697
  /**
@@ -1556,6 +1749,10 @@ declare class Reportify {
1556
1749
  * Make a DELETE request
1557
1750
  */
1558
1751
  delete<T = unknown>(path: string, body?: Record<string, unknown>): Promise<T>;
1752
+ /**
1753
+ * Make a PUT request
1754
+ */
1755
+ put<T = unknown>(path: string, body?: Record<string, unknown>): Promise<T>;
1559
1756
  /**
1560
1757
  * Make a GET request and return raw bytes (for file downloads)
1561
1758
  */
package/dist/index.js CHANGED
@@ -1446,7 +1446,7 @@ var UserModule = class {
1446
1446
  * Unfollow a company (remove from stock watchlist)
1447
1447
  *
1448
1448
  * @param symbol - Stock symbol in market:ticker format (e.g., US:AAPL, HK:00700)
1449
- * @returns Status of the unfollow operation
1449
+ * @returns Status of unfollow operation
1450
1450
  *
1451
1451
  * @example
1452
1452
  * ```typescript
@@ -1460,6 +1460,186 @@ var UserModule = class {
1460
1460
  { symbol }
1461
1461
  );
1462
1462
  }
1463
+ /**
1464
+ * Create a new follow group
1465
+ *
1466
+ * @param name - Group name
1467
+ * @param followValues - List of follow values (each with 'follow_type' as int and 'follow_value' as string)
1468
+ * follow_type: 1=company, 3=channel
1469
+ * @returns Created group information including group_id, name, and count
1470
+ *
1471
+ * @example
1472
+ * ```typescript
1473
+ * const result = await client.user.createFollowGroup('My Stocks', [
1474
+ * { follow_type: 1, follow_value: 'US:AAPL' },
1475
+ * { follow_type: 1, follow_value: 'HK:00700' }
1476
+ * ]);
1477
+ * console.log(`Created group: ${result.group_id}`);
1478
+ * ```
1479
+ */
1480
+ async createFollowGroup(name, followValues) {
1481
+ const json = { name };
1482
+ if (followValues !== void 0) {
1483
+ json.follow_values = followValues;
1484
+ }
1485
+ return this.client.post(
1486
+ "/v1/tools/user/follow-groups",
1487
+ json
1488
+ );
1489
+ }
1490
+ /**
1491
+ * Get all follow groups for authenticated user
1492
+ *
1493
+ * @returns List of follow groups with group_id, name, and count
1494
+ *
1495
+ * @example
1496
+ * ```typescript
1497
+ * const groups = await client.user.getFollowGroups();
1498
+ * groups.forEach(group => {
1499
+ * console.log(`${group.name}: ${group.count} items`);
1500
+ * });
1501
+ * ```
1502
+ */
1503
+ async getFollowGroups() {
1504
+ const response = await this.client.get("/v1/tools/user/follow-groups");
1505
+ return response.groups || [];
1506
+ }
1507
+ /**
1508
+ * Get a follow group by ID
1509
+ *
1510
+ * @param groupId - Group ID
1511
+ * @returns Group information including group_id, name, and count
1512
+ *
1513
+ * @example
1514
+ * ```typescript
1515
+ * const group = await client.user.getFollowGroup('group_123');
1516
+ * console.log(`${group.name}: ${group.count} items`);
1517
+ * ```
1518
+ */
1519
+ async getFollowGroup(groupId) {
1520
+ return this.client.get(
1521
+ `/v1/tools/user/follow-groups/${groupId}`
1522
+ );
1523
+ }
1524
+ /**
1525
+ * Update a follow group
1526
+ *
1527
+ * @param groupId - Group ID
1528
+ * @param name - New group name
1529
+ * @returns Updated group information
1530
+ *
1531
+ * @example
1532
+ * ```typescript
1533
+ * const result = await client.user.updateFollowGroup('group_123', 'New Name');
1534
+ * console.log(`Updated: ${result.name}`);
1535
+ * ```
1536
+ */
1537
+ async updateFollowGroup(groupId, name) {
1538
+ const json = {};
1539
+ if (name !== void 0) {
1540
+ json.name = name;
1541
+ }
1542
+ return this.client.post(
1543
+ `/v1/tools/user/follow-groups/${groupId}`,
1544
+ json
1545
+ );
1546
+ }
1547
+ /**
1548
+ * Delete a follow group
1549
+ *
1550
+ * @param groupId - Group ID
1551
+ * @returns Status message
1552
+ *
1553
+ * @example
1554
+ * ```typescript
1555
+ * await client.user.deleteFollowGroup('group_123');
1556
+ * ```
1557
+ */
1558
+ async deleteFollowGroup(groupId) {
1559
+ return this.client.delete(`/v1/tools/user/follow-groups/${groupId}`);
1560
+ }
1561
+ /**
1562
+ * Add follows to a group
1563
+ *
1564
+ * @param groupId - Group ID
1565
+ * @param followValues - List of follow values (each with 'follow_type' as int and 'follow_value' as string)
1566
+ * follow_type: 1=company, 3=channel
1567
+ * @returns Status message
1568
+ *
1569
+ * @example
1570
+ * ```typescript
1571
+ * await client.user.addFollowsToGroup('group_123', [
1572
+ * { follow_type: 1, follow_value: 'US:TSLA' }
1573
+ * ]);
1574
+ * ```
1575
+ */
1576
+ async addFollowsToGroup(groupId, followValues) {
1577
+ return this.client.post(`/v1/tools/user/follow-groups/${groupId}/follows`, {
1578
+ follow_values: followValues
1579
+ });
1580
+ }
1581
+ /**
1582
+ * Remove follows from a group
1583
+ *
1584
+ * @param groupId - Group ID
1585
+ * @param followIds - List of follow IDs to remove
1586
+ * @returns Status message
1587
+ *
1588
+ * @example
1589
+ * ```typescript
1590
+ * await client.user.removeFollowsFromGroup('group_123', ['follow_1', 'follow_2']);
1591
+ * ```
1592
+ */
1593
+ async removeFollowsFromGroup(groupId, followIds) {
1594
+ return this.client.delete(
1595
+ `/v1/tools/user/follow-groups/${groupId}/follows`,
1596
+ { follow_ids: followIds }
1597
+ );
1598
+ }
1599
+ /**
1600
+ * Set follows for a group (replace all existing follows)
1601
+ *
1602
+ * @param groupId - Group ID
1603
+ * @param followValues - List of follow values (each with 'follow_type' as int and 'follow_value' as string)
1604
+ * follow_type: 1=company, 3=channel
1605
+ * @returns Status message
1606
+ *
1607
+ * @example
1608
+ * ```typescript
1609
+ * await client.user.setGroupFollows('group_123', [
1610
+ * { follow_type: 1, follow_value: 'US:AAPL' },
1611
+ * { follow_type: 1, follow_value: 'HK:00700' }
1612
+ * ]);
1613
+ * ```
1614
+ */
1615
+ async setGroupFollows(groupId, followValues) {
1616
+ return this.client.put(`/v1/tools/user/follow-groups/${groupId}/follows`, {
1617
+ follow_values: followValues
1618
+ });
1619
+ }
1620
+ /**
1621
+ * Get reports for a follow group
1622
+ *
1623
+ * @param groupId - Group ID
1624
+ * @param pageNum - Page number (default: 1)
1625
+ * @param pageSize - Page size (default: 10, max: 100)
1626
+ * @returns Report data including items list, total_count, page_num, and page_size
1627
+ *
1628
+ * @example
1629
+ * ```typescript
1630
+ * const result = await client.user.getGroupReports('group_123', 1, 20);
1631
+ * console.log(`Total: ${result.total_count}`);
1632
+ * result.items.forEach(report => {
1633
+ * console.log(report.title || 'Untitled');
1634
+ * });
1635
+ * ```
1636
+ */
1637
+ async getGroupReports(groupId, pageNum = 1, pageSize = 10) {
1638
+ return this.client.get(`/v1/tools/user/follow-groups/${groupId}/reports`, {
1639
+ page_num: pageNum,
1640
+ page_size: pageSize
1641
+ });
1642
+ }
1463
1643
  };
1464
1644
 
1465
1645
  // src/search.ts
@@ -1623,6 +1803,24 @@ var SearchModule = class {
1623
1803
  const response = await this.client.post("/v2/search/webpages", body);
1624
1804
  return response.docs || [];
1625
1805
  }
1806
+ /**
1807
+ * Crawl web content from given URLs.
1808
+ *
1809
+ * @param urls Array of URLs to get contents for
1810
+ * @param options Options for text, highlights, summary, subpages, etc.
1811
+ * @returns CrawlResponse Promise with extracted results and statuses
1812
+ */
1813
+ async crawl(urls, options) {
1814
+ const data = { ids: urls };
1815
+ if (options?.text !== void 0) data.text = options.text;
1816
+ if (options?.highlights !== void 0) data.highlights = options.highlights;
1817
+ if (options?.summary !== void 0) data.summary = options.summary;
1818
+ if (options?.subpages !== void 0) data.subpages = options.subpages;
1819
+ if (options?.subpageTarget !== void 0) data.subpageTarget = options.subpageTarget;
1820
+ if (options?.maxAgeHours !== void 0) data.maxAgeHours = options.maxAgeHours;
1821
+ if (options?.livecrawlTimeout !== void 0) data.livecrawlTimeout = options.livecrawlTimeout;
1822
+ return this.client.post("/v2/search/crawl", data);
1823
+ }
1626
1824
  };
1627
1825
 
1628
1826
  // src/types.ts
@@ -1768,6 +1966,12 @@ var Reportify = class {
1768
1966
  async delete(path, body) {
1769
1967
  return this.request("DELETE", path, { body });
1770
1968
  }
1969
+ /**
1970
+ * Make a PUT request
1971
+ */
1972
+ async put(path, body) {
1973
+ return this.request("PUT", path, { body });
1974
+ }
1771
1975
  /**
1772
1976
  * Make a GET request and return raw bytes (for file downloads)
1773
1977
  */
package/dist/index.mjs CHANGED
@@ -1404,7 +1404,7 @@ var UserModule = class {
1404
1404
  * Unfollow a company (remove from stock watchlist)
1405
1405
  *
1406
1406
  * @param symbol - Stock symbol in market:ticker format (e.g., US:AAPL, HK:00700)
1407
- * @returns Status of the unfollow operation
1407
+ * @returns Status of unfollow operation
1408
1408
  *
1409
1409
  * @example
1410
1410
  * ```typescript
@@ -1418,6 +1418,186 @@ var UserModule = class {
1418
1418
  { symbol }
1419
1419
  );
1420
1420
  }
1421
+ /**
1422
+ * Create a new follow group
1423
+ *
1424
+ * @param name - Group name
1425
+ * @param followValues - List of follow values (each with 'follow_type' as int and 'follow_value' as string)
1426
+ * follow_type: 1=company, 3=channel
1427
+ * @returns Created group information including group_id, name, and count
1428
+ *
1429
+ * @example
1430
+ * ```typescript
1431
+ * const result = await client.user.createFollowGroup('My Stocks', [
1432
+ * { follow_type: 1, follow_value: 'US:AAPL' },
1433
+ * { follow_type: 1, follow_value: 'HK:00700' }
1434
+ * ]);
1435
+ * console.log(`Created group: ${result.group_id}`);
1436
+ * ```
1437
+ */
1438
+ async createFollowGroup(name, followValues) {
1439
+ const json = { name };
1440
+ if (followValues !== void 0) {
1441
+ json.follow_values = followValues;
1442
+ }
1443
+ return this.client.post(
1444
+ "/v1/tools/user/follow-groups",
1445
+ json
1446
+ );
1447
+ }
1448
+ /**
1449
+ * Get all follow groups for authenticated user
1450
+ *
1451
+ * @returns List of follow groups with group_id, name, and count
1452
+ *
1453
+ * @example
1454
+ * ```typescript
1455
+ * const groups = await client.user.getFollowGroups();
1456
+ * groups.forEach(group => {
1457
+ * console.log(`${group.name}: ${group.count} items`);
1458
+ * });
1459
+ * ```
1460
+ */
1461
+ async getFollowGroups() {
1462
+ const response = await this.client.get("/v1/tools/user/follow-groups");
1463
+ return response.groups || [];
1464
+ }
1465
+ /**
1466
+ * Get a follow group by ID
1467
+ *
1468
+ * @param groupId - Group ID
1469
+ * @returns Group information including group_id, name, and count
1470
+ *
1471
+ * @example
1472
+ * ```typescript
1473
+ * const group = await client.user.getFollowGroup('group_123');
1474
+ * console.log(`${group.name}: ${group.count} items`);
1475
+ * ```
1476
+ */
1477
+ async getFollowGroup(groupId) {
1478
+ return this.client.get(
1479
+ `/v1/tools/user/follow-groups/${groupId}`
1480
+ );
1481
+ }
1482
+ /**
1483
+ * Update a follow group
1484
+ *
1485
+ * @param groupId - Group ID
1486
+ * @param name - New group name
1487
+ * @returns Updated group information
1488
+ *
1489
+ * @example
1490
+ * ```typescript
1491
+ * const result = await client.user.updateFollowGroup('group_123', 'New Name');
1492
+ * console.log(`Updated: ${result.name}`);
1493
+ * ```
1494
+ */
1495
+ async updateFollowGroup(groupId, name) {
1496
+ const json = {};
1497
+ if (name !== void 0) {
1498
+ json.name = name;
1499
+ }
1500
+ return this.client.post(
1501
+ `/v1/tools/user/follow-groups/${groupId}`,
1502
+ json
1503
+ );
1504
+ }
1505
+ /**
1506
+ * Delete a follow group
1507
+ *
1508
+ * @param groupId - Group ID
1509
+ * @returns Status message
1510
+ *
1511
+ * @example
1512
+ * ```typescript
1513
+ * await client.user.deleteFollowGroup('group_123');
1514
+ * ```
1515
+ */
1516
+ async deleteFollowGroup(groupId) {
1517
+ return this.client.delete(`/v1/tools/user/follow-groups/${groupId}`);
1518
+ }
1519
+ /**
1520
+ * Add follows to a group
1521
+ *
1522
+ * @param groupId - Group ID
1523
+ * @param followValues - List of follow values (each with 'follow_type' as int and 'follow_value' as string)
1524
+ * follow_type: 1=company, 3=channel
1525
+ * @returns Status message
1526
+ *
1527
+ * @example
1528
+ * ```typescript
1529
+ * await client.user.addFollowsToGroup('group_123', [
1530
+ * { follow_type: 1, follow_value: 'US:TSLA' }
1531
+ * ]);
1532
+ * ```
1533
+ */
1534
+ async addFollowsToGroup(groupId, followValues) {
1535
+ return this.client.post(`/v1/tools/user/follow-groups/${groupId}/follows`, {
1536
+ follow_values: followValues
1537
+ });
1538
+ }
1539
+ /**
1540
+ * Remove follows from a group
1541
+ *
1542
+ * @param groupId - Group ID
1543
+ * @param followIds - List of follow IDs to remove
1544
+ * @returns Status message
1545
+ *
1546
+ * @example
1547
+ * ```typescript
1548
+ * await client.user.removeFollowsFromGroup('group_123', ['follow_1', 'follow_2']);
1549
+ * ```
1550
+ */
1551
+ async removeFollowsFromGroup(groupId, followIds) {
1552
+ return this.client.delete(
1553
+ `/v1/tools/user/follow-groups/${groupId}/follows`,
1554
+ { follow_ids: followIds }
1555
+ );
1556
+ }
1557
+ /**
1558
+ * Set follows for a group (replace all existing follows)
1559
+ *
1560
+ * @param groupId - Group ID
1561
+ * @param followValues - List of follow values (each with 'follow_type' as int and 'follow_value' as string)
1562
+ * follow_type: 1=company, 3=channel
1563
+ * @returns Status message
1564
+ *
1565
+ * @example
1566
+ * ```typescript
1567
+ * await client.user.setGroupFollows('group_123', [
1568
+ * { follow_type: 1, follow_value: 'US:AAPL' },
1569
+ * { follow_type: 1, follow_value: 'HK:00700' }
1570
+ * ]);
1571
+ * ```
1572
+ */
1573
+ async setGroupFollows(groupId, followValues) {
1574
+ return this.client.put(`/v1/tools/user/follow-groups/${groupId}/follows`, {
1575
+ follow_values: followValues
1576
+ });
1577
+ }
1578
+ /**
1579
+ * Get reports for a follow group
1580
+ *
1581
+ * @param groupId - Group ID
1582
+ * @param pageNum - Page number (default: 1)
1583
+ * @param pageSize - Page size (default: 10, max: 100)
1584
+ * @returns Report data including items list, total_count, page_num, and page_size
1585
+ *
1586
+ * @example
1587
+ * ```typescript
1588
+ * const result = await client.user.getGroupReports('group_123', 1, 20);
1589
+ * console.log(`Total: ${result.total_count}`);
1590
+ * result.items.forEach(report => {
1591
+ * console.log(report.title || 'Untitled');
1592
+ * });
1593
+ * ```
1594
+ */
1595
+ async getGroupReports(groupId, pageNum = 1, pageSize = 10) {
1596
+ return this.client.get(`/v1/tools/user/follow-groups/${groupId}/reports`, {
1597
+ page_num: pageNum,
1598
+ page_size: pageSize
1599
+ });
1600
+ }
1421
1601
  };
1422
1602
 
1423
1603
  // src/search.ts
@@ -1581,6 +1761,24 @@ var SearchModule = class {
1581
1761
  const response = await this.client.post("/v2/search/webpages", body);
1582
1762
  return response.docs || [];
1583
1763
  }
1764
+ /**
1765
+ * Crawl web content from given URLs.
1766
+ *
1767
+ * @param urls Array of URLs to get contents for
1768
+ * @param options Options for text, highlights, summary, subpages, etc.
1769
+ * @returns CrawlResponse Promise with extracted results and statuses
1770
+ */
1771
+ async crawl(urls, options) {
1772
+ const data = { ids: urls };
1773
+ if (options?.text !== void 0) data.text = options.text;
1774
+ if (options?.highlights !== void 0) data.highlights = options.highlights;
1775
+ if (options?.summary !== void 0) data.summary = options.summary;
1776
+ if (options?.subpages !== void 0) data.subpages = options.subpages;
1777
+ if (options?.subpageTarget !== void 0) data.subpageTarget = options.subpageTarget;
1778
+ if (options?.maxAgeHours !== void 0) data.maxAgeHours = options.maxAgeHours;
1779
+ if (options?.livecrawlTimeout !== void 0) data.livecrawlTimeout = options.livecrawlTimeout;
1780
+ return this.client.post("/v2/search/crawl", data);
1781
+ }
1584
1782
  };
1585
1783
 
1586
1784
  // src/types.ts
@@ -1726,6 +1924,12 @@ var Reportify = class {
1726
1924
  async delete(path, body) {
1727
1925
  return this.request("DELETE", path, { body });
1728
1926
  }
1927
+ /**
1928
+ * Make a PUT request
1929
+ */
1930
+ async put(path, body) {
1931
+ return this.request("PUT", path, { body });
1932
+ }
1729
1933
  /**
1730
1934
  * Make a GET request and return raw bytes (for file downloads)
1731
1935
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reportify-sdk",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
4
4
  "description": "TypeScript SDK for Reportify API - Financial data and document search",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",