@perplexity-ai/perplexity_ai 0.41.0 → 0.42.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/generated/api.d.ts +637 -4
  3. package/dist/generated/api.d.ts.map +1 -1
  4. package/dist/generated/api.js +99 -0
  5. package/dist/generated/api.js.map +1 -1
  6. package/dist/resources/client.d.ts +16 -0
  7. package/dist/resources/client.d.ts.map +1 -1
  8. package/dist/resources/client.js +2 -0
  9. package/dist/resources/client.js.map +1 -1
  10. package/dist/resources/index.d.ts +1 -0
  11. package/dist/resources/index.d.ts.map +1 -1
  12. package/dist/resources/index.js +1 -0
  13. package/dist/resources/index.js.map +1 -1
  14. package/dist/resources/monitors/index.d.ts +4 -0
  15. package/dist/resources/monitors/index.d.ts.map +1 -0
  16. package/dist/resources/monitors/index.js +4 -0
  17. package/dist/resources/monitors/index.js.map +1 -0
  18. package/dist/resources/monitors/monitors.d.ts +16 -0
  19. package/dist/resources/monitors/monitors.d.ts.map +1 -0
  20. package/dist/resources/monitors/monitors.js +3 -0
  21. package/dist/resources/monitors/monitors.js.map +1 -0
  22. package/dist/resources/monitors/runs.d.ts +5 -0
  23. package/dist/resources/monitors/runs.d.ts.map +1 -0
  24. package/dist/resources/monitors/runs.js +3 -0
  25. package/dist/resources/monitors/runs.js.map +1 -0
  26. package/dist/resources/monitors/webhook.d.ts +4 -0
  27. package/dist/resources/monitors/webhook.d.ts.map +1 -0
  28. package/dist/resources/monitors/webhook.js +3 -0
  29. package/dist/resources/monitors/webhook.js.map +1 -0
  30. package/dist/resources/monitors.d.ts +2 -0
  31. package/dist/resources/monitors.d.ts.map +1 -0
  32. package/dist/resources/monitors.js +2 -0
  33. package/dist/resources/monitors.js.map +1 -0
  34. package/dist/resources/shared.d.ts +13 -0
  35. package/dist/resources/shared.d.ts.map +1 -1
  36. package/dist/version.d.ts +1 -1
  37. package/dist/version.js +1 -1
  38. package/package.json +1 -1
  39. package/src/generated/api.ts +706 -4
  40. package/src/resources/client.ts +17 -0
  41. package/src/resources/index.ts +1 -0
  42. package/src/resources/monitors/index.ts +3 -0
  43. package/src/resources/monitors/monitors.ts +15 -0
  44. package/src/resources/monitors/runs.ts +4 -0
  45. package/src/resources/monitors/webhook.ts +3 -0
  46. package/src/resources/monitors.ts +1 -0
  47. package/src/resources/shared.ts +13 -0
  48. package/src/version.ts +1 -1
@@ -612,6 +612,22 @@ export type CostOutput = {
612
612
  };
613
613
  export type CreateBrowserSessionRequestInput = {};
614
614
  export type CreateBrowserSessionRequestOutput = {};
615
+ export type CreateMonitorRequestInput = {
616
+ goal?: string;
617
+ metadata?: MonitorMetadataInput;
618
+ name: string;
619
+ schedule: MonitorScheduleRequestInput;
620
+ targets: MonitorTargetsInput;
621
+ webhook?: (Record<string, unknown> & (MonitorWebhookRequestInput)) | null;
622
+ };
623
+ export type CreateMonitorRequestOutput = {
624
+ goal?: string;
625
+ metadata?: MonitorMetadataOutput;
626
+ name: string;
627
+ schedule: MonitorScheduleRequestOutput;
628
+ targets: MonitorTargetsOutput;
629
+ webhook?: (Record<string, unknown> & (MonitorWebhookRequestOutput)) | null;
630
+ };
615
631
  export type CurrencyInput = "USD";
616
632
  export type CurrencyOutput = "USD";
617
633
  export type CustomSkillInput = {
@@ -736,20 +752,40 @@ export type DecisionsResponseOutput = {
736
752
  model: string;
737
753
  usage: DecisionUsageOutput;
738
754
  };
755
+ export type DecisionToolCallDetailsInput = {
756
+ invocation: number;
757
+ };
758
+ export type DecisionToolCallDetailsOutput = {
759
+ invocation: number;
760
+ };
739
761
  export type DecisionUsageInput = {
740
762
  input_tokens: number;
741
763
  output_tokens: number;
764
+ tool_calls_details?: {} & Record<string, DecisionToolCallDetailsInput>;
742
765
  };
743
766
  export type DecisionUsageOutput = {
744
767
  input_tokens: number;
745
768
  output_tokens: number;
769
+ tool_calls_details?: {} & Record<string, DecisionToolCallDetailsOutput>;
770
+ };
771
+ export type DeleteMonitorResponseInput = {
772
+ deleted: boolean;
773
+ id: string;
774
+ object: "monitor";
775
+ };
776
+ export type DeleteMonitorResponseOutput = {
777
+ deleted: boolean;
778
+ id: string;
779
+ object: "monitor";
746
780
  };
747
781
  export type EmbeddingObjectInput = {
782
+ data?: EmbeddingObjectInput[];
748
783
  embedding?: string;
749
784
  index?: number;
750
785
  object?: string;
751
786
  };
752
787
  export type EmbeddingObjectOutput = {
788
+ data?: EmbeddingObjectOutput[];
753
789
  embedding?: string;
754
790
  index?: number;
755
791
  object?: string;
@@ -757,14 +793,24 @@ export type EmbeddingObjectOutput = {
757
793
  export type EmbeddingsRequestInput = {
758
794
  dimensions?: number;
759
795
  encoding_format?: "base64_int8" | "base64_binary";
760
- input: string | string[];
761
- model: "pplx-embed-v1-0.6b" | "pplx-embed-v1-4b";
796
+ input: string | string[] | string[][] | {
797
+ image: string;
798
+ type: "image";
799
+ }[];
800
+ input_type?: "query" | "document";
801
+ model: "pplx-embed-v1-0.6b" | "pplx-embed-v1-4b" | "pplx-embed-v2-context-9b" | "pplx-embed-v2-context-0.6b";
802
+ num_chunks?: 1 | 2 | 4 | 8 | 16 | 32;
762
803
  };
763
804
  export type EmbeddingsRequestOutput = {
764
805
  dimensions?: number;
765
806
  encoding_format?: "base64_int8" | "base64_binary";
766
- input: string | string[];
767
- model: "pplx-embed-v1-0.6b" | "pplx-embed-v1-4b";
807
+ input: string | string[] | string[][] | {
808
+ image: string;
809
+ type: "image";
810
+ }[];
811
+ input_type?: "query" | "document";
812
+ model: "pplx-embed-v1-0.6b" | "pplx-embed-v1-4b" | "pplx-embed-v2-context-9b" | "pplx-embed-v2-context-0.6b";
813
+ num_chunks?: 1 | 2 | 4 | 8 | 16 | 32;
768
814
  };
769
815
  export type EmbeddingsResponseInput = {
770
816
  data?: EmbeddingObjectInput[];
@@ -806,6 +852,20 @@ export type ErrorInfoOutput = {
806
852
  message: string;
807
853
  type?: string;
808
854
  };
855
+ export type EventMonitorInput = {
856
+ id: string;
857
+ metadata: {} & Record<string, string>;
858
+ name: string;
859
+ pause_reason?: MonitorPauseReasonInput;
860
+ status: MonitorStatusInput;
861
+ };
862
+ export type EventMonitorOutput = {
863
+ id: string;
864
+ metadata: {} & Record<string, string>;
865
+ name: string;
866
+ pause_reason?: MonitorPauseReasonOutput;
867
+ status: MonitorStatusOutput;
868
+ };
809
869
  export type EventTypeInput = "response.created" | "response.in_progress" | "response.completed" | "response.failed" | "response.output_item.added" | "response.output_item.done" | "response.output_text.delta" | "response.output_text.done" | "response.reasoning.started" | "response.reasoning.search_queries" | "response.reasoning.search_results" | "response.reasoning.image_search_queries" | "response.reasoning.image_search_results" | "response.reasoning.fetch_url_queries" | "response.reasoning.fetch_url_results" | "response.reasoning.stopped" | "response.skill.loaded";
810
870
  export type EventTypeOutput = "response.created" | "response.in_progress" | "response.completed" | "response.failed" | "response.output_item.added" | "response.output_item.done" | "response.output_text.delta" | "response.output_text.done" | "response.reasoning.started" | "response.reasoning.search_queries" | "response.reasoning.search_results" | "response.reasoning.image_search_queries" | "response.reasoning.image_search_results" | "response.reasoning.fetch_url_queries" | "response.reasoning.fetch_url_results" | "response.reasoning.stopped" | "response.skill.loaded";
811
871
  export type ExecutePythonStepDetailsInput = {
@@ -1394,6 +1454,472 @@ export type ModelListOutput = {
1394
1454
  data: ModelOutput[];
1395
1455
  object: "list";
1396
1456
  };
1457
+ export type MonitorInput = {
1458
+ created_at: MonitorTimestampInput;
1459
+ current_run_id?: string;
1460
+ goal: string;
1461
+ id: string;
1462
+ last_run?: MonitorLastRunInput;
1463
+ metadata: MonitorMetadataInput;
1464
+ name: string;
1465
+ next_run_at?: MonitorTimestampInput;
1466
+ object: "monitor";
1467
+ pause_reason?: MonitorPauseReasonInput;
1468
+ schedule: MonitorScheduleInput;
1469
+ status: MonitorStatusInput;
1470
+ targets: MonitorTargetInput[];
1471
+ updated_at: MonitorTimestampInput;
1472
+ webhook?: MonitorWebhookInput;
1473
+ };
1474
+ export type MonitorOutput = {
1475
+ created_at: MonitorTimestampOutput;
1476
+ current_run_id?: string;
1477
+ goal: string;
1478
+ id: string;
1479
+ last_run?: MonitorLastRunOutput;
1480
+ metadata: MonitorMetadataOutput;
1481
+ name: string;
1482
+ next_run_at?: MonitorTimestampOutput;
1483
+ object: "monitor";
1484
+ pause_reason?: MonitorPauseReasonOutput;
1485
+ schedule: MonitorScheduleOutput;
1486
+ status: MonitorStatusOutput;
1487
+ targets: MonitorTargetOutput[];
1488
+ updated_at: MonitorTimestampOutput;
1489
+ webhook?: MonitorWebhookOutput;
1490
+ };
1491
+ export type MonitorChangeInput = MonitorSearchResultChangeInput | MonitorPageChangeInput;
1492
+ export type MonitorChangeOutput = MonitorSearchResultChangeOutput | MonitorPageChangeOutput;
1493
+ export type MonitorChangeIdInput = string;
1494
+ export type MonitorChangeIdOutput = string;
1495
+ export type MonitorChangesDetectedEventInput = {
1496
+ data: MonitorRunEventDataInput;
1497
+ id: MonitorEventIdInput;
1498
+ object: MonitorEventObjectInput;
1499
+ timestamp: MonitorTimestampInput;
1500
+ type: "monitor.changes.detected";
1501
+ };
1502
+ export type MonitorChangesDetectedEventOutput = {
1503
+ data: MonitorRunEventDataOutput;
1504
+ id: MonitorEventIdOutput;
1505
+ object: MonitorEventObjectOutput;
1506
+ timestamp: MonitorTimestampOutput;
1507
+ type: "monitor.changes.detected";
1508
+ };
1509
+ export type MonitorCronScheduleInput = {
1510
+ cron: string;
1511
+ timezone: string;
1512
+ type: "cron";
1513
+ };
1514
+ export type MonitorCronScheduleOutput = {
1515
+ cron: string;
1516
+ timezone: string;
1517
+ type: "cron";
1518
+ };
1519
+ export type MonitorCronScheduleRequestInput = {
1520
+ cron: string;
1521
+ timezone?: string;
1522
+ type: "cron";
1523
+ };
1524
+ export type MonitorCronScheduleRequestOutput = {
1525
+ cron: string;
1526
+ timezone?: string;
1527
+ type: "cron";
1528
+ };
1529
+ export type MonitorCurrencyInput = "USD";
1530
+ export type MonitorCurrencyOutput = "USD";
1531
+ export type MonitorDiffInput = {
1532
+ added_lines: number;
1533
+ removed_lines: number;
1534
+ truncated: boolean;
1535
+ unified: string;
1536
+ };
1537
+ export type MonitorDiffOutput = {
1538
+ added_lines: number;
1539
+ removed_lines: number;
1540
+ truncated: boolean;
1541
+ unified: string;
1542
+ };
1543
+ export type MonitorDomainInput = string;
1544
+ export type MonitorDomainOutput = string;
1545
+ export type MonitorEventInput = MonitorChangesDetectedEventInput | MonitorRunCompletedEventInput | MonitorPausedEventInput | MonitorWebhookTestEventInput;
1546
+ export type MonitorEventOutput = MonitorChangesDetectedEventOutput | MonitorRunCompletedEventOutput | MonitorPausedEventOutput | MonitorWebhookTestEventOutput;
1547
+ export type MonitorEventIdInput = string;
1548
+ export type MonitorEventIdOutput = string;
1549
+ export type MonitorEventObjectInput = "event";
1550
+ export type MonitorEventObjectOutput = "event";
1551
+ export type MonitorEventTypeInput = "monitor.changes.detected" | "monitor.run.completed" | "monitor.paused";
1552
+ export type MonitorEventTypeOutput = "monitor.changes.detected" | "monitor.run.completed" | "monitor.paused";
1553
+ export type MonitorFreshnessInput = "published" | "updated";
1554
+ export type MonitorFreshnessOutput = "published" | "updated";
1555
+ export type MonitorIntervalScheduleInput = {
1556
+ interval: string;
1557
+ type: "interval";
1558
+ };
1559
+ export type MonitorIntervalScheduleOutput = {
1560
+ interval: string;
1561
+ type: "interval";
1562
+ };
1563
+ export type MonitorIntervalScheduleRequestInput = {
1564
+ interval: string;
1565
+ type: "interval";
1566
+ };
1567
+ export type MonitorIntervalScheduleRequestOutput = {
1568
+ interval: string;
1569
+ type: "interval";
1570
+ };
1571
+ export type MonitorLastRunInput = {
1572
+ change_count: number;
1573
+ finished_at: MonitorTimestampInput;
1574
+ id: string;
1575
+ status: MonitorRunStatusInput;
1576
+ };
1577
+ export type MonitorLastRunOutput = {
1578
+ change_count: number;
1579
+ finished_at: MonitorTimestampOutput;
1580
+ id: string;
1581
+ status: MonitorRunStatusOutput;
1582
+ };
1583
+ export type MonitorListInput = {
1584
+ data: MonitorInput[];
1585
+ has_more: boolean;
1586
+ object: "list";
1587
+ };
1588
+ export type MonitorListOutput = {
1589
+ data: MonitorOutput[];
1590
+ has_more: boolean;
1591
+ object: "list";
1592
+ };
1593
+ export type MonitorMetadataInput = {} & Record<string, string>;
1594
+ export type MonitorMetadataOutput = {} & Record<string, string>;
1595
+ export type MonitorPageChangeInput = {
1596
+ confidence: number;
1597
+ diff: MonitorDiffInput;
1598
+ fetched_at: MonitorTimestampInput;
1599
+ id: MonitorChangeIdInput;
1600
+ previous_fetched_at: MonitorTimestampInput;
1601
+ title?: string;
1602
+ type: "page_change";
1603
+ url: string;
1604
+ };
1605
+ export type MonitorPageChangeOutput = {
1606
+ confidence: number;
1607
+ diff: MonitorDiffOutput;
1608
+ fetched_at: MonitorTimestampOutput;
1609
+ id: MonitorChangeIdOutput;
1610
+ previous_fetched_at: MonitorTimestampOutput;
1611
+ title?: string;
1612
+ type: "page_change";
1613
+ url: string;
1614
+ };
1615
+ export type MonitorPageTargetInput = {
1616
+ type: "page";
1617
+ url: string;
1618
+ };
1619
+ export type MonitorPageTargetOutput = {
1620
+ type: "page";
1621
+ url: string;
1622
+ };
1623
+ export type MonitorPageTargetErrorInput = {
1624
+ code: MonitorTargetErrorCodeInput;
1625
+ message: string;
1626
+ status_code?: number;
1627
+ type: "page";
1628
+ url: string;
1629
+ };
1630
+ export type MonitorPageTargetErrorOutput = {
1631
+ code: MonitorTargetErrorCodeOutput;
1632
+ message: string;
1633
+ status_code?: number;
1634
+ type: "page";
1635
+ url: string;
1636
+ };
1637
+ export type MonitorPageTargetRequestInput = {
1638
+ type: "page";
1639
+ url: string;
1640
+ };
1641
+ export type MonitorPageTargetRequestOutput = {
1642
+ type: "page";
1643
+ url: string;
1644
+ };
1645
+ export type MonitorPausedEventInput = {
1646
+ data: MonitorPausedEventDataInput;
1647
+ id: MonitorEventIdInput;
1648
+ object: MonitorEventObjectInput;
1649
+ timestamp: MonitorTimestampInput;
1650
+ type: "monitor.paused";
1651
+ };
1652
+ export type MonitorPausedEventOutput = {
1653
+ data: MonitorPausedEventDataOutput;
1654
+ id: MonitorEventIdOutput;
1655
+ object: MonitorEventObjectOutput;
1656
+ timestamp: MonitorTimestampOutput;
1657
+ type: "monitor.paused";
1658
+ };
1659
+ export type MonitorPausedEventDataInput = {
1660
+ monitor: PausedEventMonitorInput;
1661
+ run?: MonitorRunInput;
1662
+ };
1663
+ export type MonitorPausedEventDataOutput = {
1664
+ monitor: PausedEventMonitorOutput;
1665
+ run?: MonitorRunOutput;
1666
+ };
1667
+ export type MonitorPauseReasonInput = "user" | "insufficient_credits" | "org_policy" | "webhook_failing" | "source_failing";
1668
+ export type MonitorPauseReasonOutput = "user" | "insufficient_credits" | "org_policy" | "webhook_failing" | "source_failing";
1669
+ export type MonitorRunInput = {
1670
+ changes: MonitorChangeInput[];
1671
+ counts: MonitorRunCountsInput;
1672
+ created_at: MonitorTimestampInput;
1673
+ error?: MonitorRunErrorInput;
1674
+ finished_at?: MonitorTimestampInput;
1675
+ id: string;
1676
+ monitor_id: string;
1677
+ object: "monitor.run";
1678
+ status: MonitorRunStatusInput;
1679
+ target_errors: MonitorTargetErrorInput[];
1680
+ trigger: MonitorRunTriggerInput;
1681
+ usage: MonitorRunUsageInput;
1682
+ window?: MonitorRunWindowInput;
1683
+ };
1684
+ export type MonitorRunOutput = {
1685
+ changes: MonitorChangeOutput[];
1686
+ counts: MonitorRunCountsOutput;
1687
+ created_at: MonitorTimestampOutput;
1688
+ error?: MonitorRunErrorOutput;
1689
+ finished_at?: MonitorTimestampOutput;
1690
+ id: string;
1691
+ monitor_id: string;
1692
+ object: "monitor.run";
1693
+ status: MonitorRunStatusOutput;
1694
+ target_errors: MonitorTargetErrorOutput[];
1695
+ trigger: MonitorRunTriggerOutput;
1696
+ usage: MonitorRunUsageOutput;
1697
+ window?: MonitorRunWindowOutput;
1698
+ };
1699
+ export type MonitorRunCompletedEventInput = {
1700
+ data: MonitorRunEventDataInput;
1701
+ id: MonitorEventIdInput;
1702
+ object: MonitorEventObjectInput;
1703
+ timestamp: MonitorTimestampInput;
1704
+ type: "monitor.run.completed";
1705
+ };
1706
+ export type MonitorRunCompletedEventOutput = {
1707
+ data: MonitorRunEventDataOutput;
1708
+ id: MonitorEventIdOutput;
1709
+ object: MonitorEventObjectOutput;
1710
+ timestamp: MonitorTimestampOutput;
1711
+ type: "monitor.run.completed";
1712
+ };
1713
+ export type MonitorRunCostInput = {
1714
+ currency: MonitorCurrencyInput;
1715
+ total_cost: number;
1716
+ };
1717
+ export type MonitorRunCostOutput = {
1718
+ currency: MonitorCurrencyOutput;
1719
+ total_cost: number;
1720
+ };
1721
+ export type MonitorRunCountsInput = {
1722
+ candidates: number;
1723
+ changes: number;
1724
+ errors: number;
1725
+ };
1726
+ export type MonitorRunCountsOutput = {
1727
+ candidates: number;
1728
+ changes: number;
1729
+ errors: number;
1730
+ };
1731
+ export type MonitorRunErrorInput = {
1732
+ code?: MonitorRunFailureCodeInput;
1733
+ message: string;
1734
+ skip_reason?: MonitorPauseReasonInput;
1735
+ };
1736
+ export type MonitorRunErrorOutput = {
1737
+ code?: MonitorRunFailureCodeOutput;
1738
+ message: string;
1739
+ skip_reason?: MonitorPauseReasonOutput;
1740
+ };
1741
+ export type MonitorRunEventDataInput = {
1742
+ monitor: EventMonitorInput;
1743
+ run: MonitorRunInput;
1744
+ };
1745
+ export type MonitorRunEventDataOutput = {
1746
+ monitor: EventMonitorOutput;
1747
+ run: MonitorRunOutput;
1748
+ };
1749
+ export type MonitorRunFailureCodeInput = "gate_unavailable" | "detect_failed" | "judge_failed" | "source_failed" | "notify_failed" | "timed_out";
1750
+ export type MonitorRunFailureCodeOutput = "gate_unavailable" | "detect_failed" | "judge_failed" | "source_failed" | "notify_failed" | "timed_out";
1751
+ export type MonitorRunListInput = {
1752
+ data: MonitorRunInput[];
1753
+ has_more: boolean;
1754
+ object: "list";
1755
+ };
1756
+ export type MonitorRunListOutput = {
1757
+ data: MonitorRunOutput[];
1758
+ has_more: boolean;
1759
+ object: "list";
1760
+ };
1761
+ export type MonitorRunStatusInput = "queued" | "running" | "succeeded" | "failed" | "skipped";
1762
+ export type MonitorRunStatusOutput = "queued" | "running" | "succeeded" | "failed" | "skipped";
1763
+ export type MonitorRunTriggerInput = "schedule" | "manual";
1764
+ export type MonitorRunTriggerOutput = "schedule" | "manual";
1765
+ export type MonitorRunUsageInput = {
1766
+ cost: MonitorRunCostInput;
1767
+ fetched_urls: number;
1768
+ };
1769
+ export type MonitorRunUsageOutput = {
1770
+ cost: MonitorRunCostOutput;
1771
+ fetched_urls: number;
1772
+ };
1773
+ export type MonitorRunWindowInput = {
1774
+ from: MonitorTimestampInput;
1775
+ to: MonitorTimestampInput;
1776
+ };
1777
+ export type MonitorRunWindowOutput = {
1778
+ from: MonitorTimestampOutput;
1779
+ to: MonitorTimestampOutput;
1780
+ };
1781
+ export type MonitorScheduleInput = MonitorIntervalScheduleInput | MonitorCronScheduleInput;
1782
+ export type MonitorScheduleOutput = MonitorIntervalScheduleOutput | MonitorCronScheduleOutput;
1783
+ export type MonitorScheduleRequestInput = MonitorIntervalScheduleRequestInput | MonitorCronScheduleRequestInput;
1784
+ export type MonitorScheduleRequestOutput = MonitorIntervalScheduleRequestOutput | MonitorCronScheduleRequestOutput;
1785
+ export type MonitorSearchFiltersInput = {
1786
+ exclude_domains: MonitorDomainInput[];
1787
+ freshness: MonitorFreshnessInput[];
1788
+ include_domains: MonitorDomainInput[];
1789
+ };
1790
+ export type MonitorSearchFiltersOutput = {
1791
+ exclude_domains: MonitorDomainOutput[];
1792
+ freshness: MonitorFreshnessOutput[];
1793
+ include_domains: MonitorDomainOutput[];
1794
+ };
1795
+ export type MonitorSearchFiltersRequestInput = {
1796
+ exclude_domains?: string[];
1797
+ freshness?: MonitorFreshnessInput[];
1798
+ include_domains?: string[];
1799
+ };
1800
+ export type MonitorSearchFiltersRequestOutput = {
1801
+ exclude_domains?: string[];
1802
+ freshness?: MonitorFreshnessOutput[];
1803
+ include_domains?: string[];
1804
+ };
1805
+ export type MonitorSearchResultChangeInput = {
1806
+ confidence: number;
1807
+ id: MonitorChangeIdInput;
1808
+ last_updated_at?: MonitorTimestampInput;
1809
+ published_at?: MonitorTimestampInput;
1810
+ snippet?: string;
1811
+ title?: string;
1812
+ type: "search_result";
1813
+ url: string;
1814
+ };
1815
+ export type MonitorSearchResultChangeOutput = {
1816
+ confidence: number;
1817
+ id: MonitorChangeIdOutput;
1818
+ last_updated_at?: MonitorTimestampOutput;
1819
+ published_at?: MonitorTimestampOutput;
1820
+ snippet?: string;
1821
+ title?: string;
1822
+ type: "search_result";
1823
+ url: string;
1824
+ };
1825
+ export type MonitorSearchTargetInput = {
1826
+ filters: MonitorSearchFiltersInput;
1827
+ max_results: number;
1828
+ query: string;
1829
+ type: "search";
1830
+ };
1831
+ export type MonitorSearchTargetOutput = {
1832
+ filters: MonitorSearchFiltersOutput;
1833
+ max_results: number;
1834
+ query: string;
1835
+ type: "search";
1836
+ };
1837
+ export type MonitorSearchTargetRequestInput = {
1838
+ filters?: MonitorSearchFiltersRequestInput;
1839
+ max_results?: number;
1840
+ query: string;
1841
+ type: "search";
1842
+ };
1843
+ export type MonitorSearchTargetRequestOutput = {
1844
+ filters?: MonitorSearchFiltersRequestOutput;
1845
+ max_results?: number;
1846
+ query: string;
1847
+ type: "search";
1848
+ };
1849
+ export type MonitorStatusInput = "active" | "paused";
1850
+ export type MonitorStatusOutput = "active" | "paused";
1851
+ export type MonitorTargetInput = MonitorSearchTargetInput | MonitorPageTargetInput;
1852
+ export type MonitorTargetOutput = MonitorSearchTargetOutput | MonitorPageTargetOutput;
1853
+ export type MonitorTargetErrorInput = MonitorPageTargetErrorInput;
1854
+ export type MonitorTargetErrorOutput = MonitorPageTargetErrorOutput;
1855
+ export type MonitorTargetErrorCodeInput = "invalid_url" | "blocked" | "no_content" | "load_failed" | "timeout" | "fetch_unavailable" | "http_status";
1856
+ export type MonitorTargetErrorCodeOutput = "invalid_url" | "blocked" | "no_content" | "load_failed" | "timeout" | "fetch_unavailable" | "http_status";
1857
+ export type MonitorTargetRequestInput = MonitorSearchTargetRequestInput | MonitorPageTargetRequestInput;
1858
+ export type MonitorTargetRequestOutput = MonitorSearchTargetRequestOutput | MonitorPageTargetRequestOutput;
1859
+ export type MonitorTargetsInput = MonitorTargetRequestInput[];
1860
+ export type MonitorTargetsOutput = MonitorTargetRequestOutput[];
1861
+ export type MonitorTimestampInput = string;
1862
+ export type MonitorTimestampOutput = string;
1863
+ export type MonitorWebhookInput = {
1864
+ events: MonitorEventTypeInput[];
1865
+ secret?: MonitorWebhookSecretInput;
1866
+ url: string;
1867
+ };
1868
+ export type MonitorWebhookOutput = {
1869
+ events: MonitorEventTypeOutput[];
1870
+ secret?: MonitorWebhookSecretOutput;
1871
+ url: string;
1872
+ };
1873
+ export type MonitorWebhookRequestInput = {
1874
+ events?: MonitorEventTypeInput[];
1875
+ secret?: MonitorWebhookSecretInput;
1876
+ url: string;
1877
+ } | null;
1878
+ export type MonitorWebhookRequestOutput = {
1879
+ events?: MonitorEventTypeOutput[];
1880
+ secret?: MonitorWebhookSecretOutput;
1881
+ url: string;
1882
+ } | null;
1883
+ export type MonitorWebhookSecretInput = string;
1884
+ export type MonitorWebhookSecretOutput = string;
1885
+ export type MonitorWebhookTestInput = {
1886
+ delivered: boolean;
1887
+ duration_ms: number;
1888
+ error?: MonitorWebhookTestErrorInput;
1889
+ event_id: string;
1890
+ object: "monitor.webhook_test";
1891
+ status_code?: number;
1892
+ };
1893
+ export type MonitorWebhookTestOutput = {
1894
+ delivered: boolean;
1895
+ duration_ms: number;
1896
+ error?: MonitorWebhookTestErrorOutput;
1897
+ event_id: string;
1898
+ object: "monitor.webhook_test";
1899
+ status_code?: number;
1900
+ };
1901
+ export type MonitorWebhookTestErrorInput = "http_status" | "timeout" | "network_error" | "tls_certificate" | "blocked_address" | "invalid_url" | "send_failed";
1902
+ export type MonitorWebhookTestErrorOutput = "http_status" | "timeout" | "network_error" | "tls_certificate" | "blocked_address" | "invalid_url" | "send_failed";
1903
+ export type MonitorWebhookTestEventInput = {
1904
+ data: MonitorWebhookTestEventDataInput;
1905
+ id: MonitorEventIdInput;
1906
+ object: MonitorEventObjectInput;
1907
+ timestamp: MonitorTimestampInput;
1908
+ type: "monitor.webhook.test";
1909
+ };
1910
+ export type MonitorWebhookTestEventOutput = {
1911
+ data: MonitorWebhookTestEventDataOutput;
1912
+ id: MonitorEventIdOutput;
1913
+ object: MonitorEventObjectOutput;
1914
+ timestamp: MonitorTimestampOutput;
1915
+ type: "monitor.webhook.test";
1916
+ };
1917
+ export type MonitorWebhookTestEventDataInput = {
1918
+ monitor: EventMonitorInput;
1919
+ };
1920
+ export type MonitorWebhookTestEventDataOutput = {
1921
+ monitor: EventMonitorOutput;
1922
+ };
1397
1923
  export type NamespaceToolInput = {
1398
1924
  description: string;
1399
1925
  name: string;
@@ -1462,6 +1988,20 @@ export type ParameterSpecOutput = {
1462
1988
  required?: string[] | null;
1463
1989
  type: string;
1464
1990
  };
1991
+ export type PausedEventMonitorInput = {
1992
+ id: string;
1993
+ metadata: {} & Record<string, string>;
1994
+ name: string;
1995
+ pause_reason: MonitorPauseReasonInput;
1996
+ status: "paused";
1997
+ };
1998
+ export type PausedEventMonitorOutput = {
1999
+ id: string;
2000
+ metadata: {} & Record<string, string>;
2001
+ name: string;
2002
+ pause_reason: MonitorPauseReasonOutput;
2003
+ status: "paused";
2004
+ };
1465
2005
  export type PeopleSearchToolInput = {
1466
2006
  type: "people_search";
1467
2007
  };
@@ -2226,6 +2766,22 @@ export type UnknownOutputItemOutput = {
2226
2766
  payload: {} & Record<string, unknown>;
2227
2767
  type: "unknown";
2228
2768
  };
2769
+ export type UpdateMonitorRequestInput = {
2770
+ goal?: string | null;
2771
+ metadata?: ({} & Record<string, string>) | null;
2772
+ name?: string;
2773
+ schedule?: MonitorScheduleRequestInput;
2774
+ targets?: MonitorTargetsInput;
2775
+ webhook?: (Record<string, unknown> & (MonitorWebhookRequestInput)) | null;
2776
+ };
2777
+ export type UpdateMonitorRequestOutput = {
2778
+ goal?: string | null;
2779
+ metadata?: ({} & Record<string, string>) | null;
2780
+ name?: string;
2781
+ schedule?: MonitorScheduleRequestOutput;
2782
+ targets?: MonitorTargetsOutput;
2783
+ webhook?: (Record<string, unknown> & (MonitorWebhookRequestOutput)) | null;
2784
+ };
2229
2785
  export type URLInput = {
2230
2786
  url: string;
2231
2787
  };
@@ -2370,6 +2926,22 @@ export declare class ChatCompletionsResource {
2370
2926
  }, options?: RequestOptions): APIPromise<Stream<CompletionResponseOutput>>;
2371
2927
  create(body: ApiChatCompletionsRequestInput, options?: RequestOptions): APIPromise<CompletionResponseOutput | Stream<CompletionResponseOutput>>;
2372
2928
  }
2929
+ export declare class MonitorsRunsResource {
2930
+ private readonly _client;
2931
+ constructor(client: SdkTransport);
2932
+ list(monitorID: string, params?: {
2933
+ after?: string;
2934
+ limit?: number;
2935
+ }, options?: RequestOptions): APIPromise<MonitorRunListOutput>;
2936
+ retrieve(runID: string, params: {
2937
+ monitor_id: string;
2938
+ }, options?: RequestOptions): APIPromise<MonitorRunOutput>;
2939
+ }
2940
+ export declare class MonitorsWebhookResource {
2941
+ private readonly _client;
2942
+ constructor(client: SdkTransport);
2943
+ test(monitorID: string, options?: RequestOptions): APIPromise<MonitorWebhookTestOutput>;
2944
+ }
2373
2945
  export declare class ResponsesFilesResource {
2374
2946
  private readonly _client;
2375
2947
  constructor(client: SdkTransport);
@@ -2445,6 +3017,25 @@ export declare class ModelsResource {
2445
3017
  constructor(client: SdkTransport);
2446
3018
  list(options?: RequestOptions): APIPromise<ModelListOutput>;
2447
3019
  }
3020
+ export declare class MonitorsResource {
3021
+ private readonly _client;
3022
+ readonly runs: MonitorsRunsResource;
3023
+ readonly webhook: MonitorsWebhookResource;
3024
+ constructor(client: SdkTransport);
3025
+ create(body: CreateMonitorRequestInput, params?: {
3026
+ "Idempotency-Key"?: string;
3027
+ }, options?: RequestOptions): APIPromise<MonitorOutput>;
3028
+ delete(monitorID: string, options?: RequestOptions): APIPromise<DeleteMonitorResponseOutput>;
3029
+ list(params?: {
3030
+ after?: string;
3031
+ limit?: number;
3032
+ }, options?: RequestOptions): APIPromise<MonitorListOutput>;
3033
+ pause(monitorID: string, options?: RequestOptions): APIPromise<MonitorOutput>;
3034
+ resume(monitorID: string, options?: RequestOptions): APIPromise<MonitorOutput>;
3035
+ retrieve(monitorID: string, options?: RequestOptions): APIPromise<MonitorOutput>;
3036
+ run(monitorID: string, options?: RequestOptions): APIPromise<MonitorRunOutput>;
3037
+ update(monitorID: string, body: UpdateMonitorRequestInput, options?: RequestOptions): APIPromise<MonitorOutput>;
3038
+ }
2448
3039
  export declare class ResponsesResource {
2449
3040
  private readonly _client;
2450
3041
  readonly files: ResponsesFilesResource;
@@ -2540,6 +3131,7 @@ export declare class PerplexitySdk {
2540
3131
  readonly embeddings: EmbeddingsResource;
2541
3132
  readonly files: FilesResource;
2542
3133
  readonly models: ModelsResource;
3134
+ readonly monitors: MonitorsResource;
2543
3135
  readonly responses: ResponsesResource;
2544
3136
  readonly search: SearchResource;
2545
3137
  readonly skills: SkillsResource;
@@ -2563,6 +3155,8 @@ export declare class Files extends FilesResource {
2563
3155
  }
2564
3156
  export declare class Models extends ModelsResource {
2565
3157
  }
3158
+ export declare class Monitors extends MonitorsResource {
3159
+ }
2566
3160
  export declare class Responses extends ResponsesResource {
2567
3161
  }
2568
3162
  export declare class Search extends SearchResource {
@@ -2605,6 +3199,19 @@ export type JsonSchemaFormat = JSONSchemaFormatInput;
2605
3199
  export type ManagedSkill = ManagedSkillOutput;
2606
3200
  export type Model = ModelOutput;
2607
3201
  export type ModelListResponse = Awaited<ReturnType<ModelsResource["list"]>>;
3202
+ export type Monitor = MonitorOutput;
3203
+ export type MonitorChangesDetectedEvent = MonitorChangesDetectedEventOutput;
3204
+ export type MonitorCreateParams = CreateMonitorRequestInput;
3205
+ export type MonitorDeleteResponse = DeleteMonitorResponseOutput;
3206
+ export type MonitorEvent = MonitorEventOutput;
3207
+ export type MonitorListResponse = MonitorListOutput;
3208
+ export type MonitorPausedEvent = MonitorPausedEventOutput;
3209
+ export type MonitorRun = MonitorRunOutput;
3210
+ export type MonitorRunCompletedEvent = MonitorRunCompletedEventOutput;
3211
+ export type MonitorRunListResponse = MonitorRunListOutput;
3212
+ export type MonitorUpdateParams = UpdateMonitorRequestInput;
3213
+ export type MonitorWebhookTestEvent = MonitorWebhookTestEventOutput;
3214
+ export type MonitorWebhookTestResponse = MonitorWebhookTestOutput;
2608
3215
  export type OutputItem = OutputItemOutput;
2609
3216
  export type ResponseCancelResponse = Awaited<ReturnType<ResponsesResource["cancel"]>>;
2610
3217
  export type ResponseCreateParams = ResponsesRequestInput;
@@ -2710,6 +3317,32 @@ export declare namespace Models {
2710
3317
  type Model = ModelOutput;
2711
3318
  type ModelListResponse = Awaited<ReturnType<ModelsResource["list"]>>;
2712
3319
  }
3320
+ export declare namespace Monitors {
3321
+ class Runs extends MonitorsRunsResource {
3322
+ }
3323
+ class Webhook extends MonitorsWebhookResource {
3324
+ }
3325
+ type Monitor = MonitorOutput;
3326
+ type MonitorChangesDetectedEvent = MonitorChangesDetectedEventOutput;
3327
+ type MonitorCreateParams = CreateMonitorRequestInput;
3328
+ type MonitorDeleteResponse = DeleteMonitorResponseOutput;
3329
+ type MonitorEvent = MonitorEventOutput;
3330
+ type MonitorListResponse = MonitorListOutput;
3331
+ type MonitorPausedEvent = MonitorPausedEventOutput;
3332
+ type MonitorRun = MonitorRunOutput;
3333
+ type MonitorRunCompletedEvent = MonitorRunCompletedEventOutput;
3334
+ type MonitorRunListResponse = MonitorRunListOutput;
3335
+ type MonitorUpdateParams = UpdateMonitorRequestInput;
3336
+ type MonitorWebhookTestEvent = MonitorWebhookTestEventOutput;
3337
+ type MonitorWebhookTestResponse = MonitorWebhookTestOutput;
3338
+ namespace Runs {
3339
+ type MonitorRun = MonitorRunOutput;
3340
+ type MonitorRunListResponse = MonitorRunListOutput;
3341
+ }
3342
+ namespace Webhook {
3343
+ type MonitorWebhookTestResponse = MonitorWebhookTestOutput;
3344
+ }
3345
+ }
2713
3346
  export declare namespace Responses {
2714
3347
  class Files extends ResponsesFilesResource {
2715
3348
  }