@perplexity-ai/perplexity_ai 0.40.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 +14 -0
  2. package/dist/generated/api.d.ts +645 -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 +714 -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
  };
@@ -1702,6 +2242,7 @@ export type ResponsesObjectTypeInput = "response";
1702
2242
  export type ResponsesObjectTypeOutput = "response";
1703
2243
  export type ResponsesRequestInput = {
1704
2244
  background?: boolean | null;
2245
+ effort?: string;
1705
2246
  input: InputInput;
1706
2247
  instructions?: string;
1707
2248
  language_preference?: string;
@@ -1709,6 +2250,7 @@ export type ResponsesRequestInput = {
1709
2250
  max_steps?: number;
1710
2251
  model?: string;
1711
2252
  models?: string[];
2253
+ /** @deprecated Use effort instead. If both are supplied, effort takes precedence when non-null. */
1712
2254
  preset?: string;
1713
2255
  previous_response_id?: string;
1714
2256
  profile?: ProfileReferenceInput;
@@ -1727,6 +2269,7 @@ export type ResponsesRequestInput = {
1727
2269
  };
1728
2270
  export type ResponsesRequestOutput = {
1729
2271
  background?: boolean | null;
2272
+ effort?: string;
1730
2273
  input: InputOutput;
1731
2274
  instructions?: string;
1732
2275
  language_preference?: string;
@@ -1734,6 +2277,7 @@ export type ResponsesRequestOutput = {
1734
2277
  max_steps?: number;
1735
2278
  model?: string;
1736
2279
  models?: string[];
2280
+ /** @deprecated Use effort instead. If both are supplied, effort takes precedence when non-null. */
1737
2281
  preset?: string;
1738
2282
  previous_response_id?: string;
1739
2283
  profile?: ProfileReferenceOutput;
@@ -1753,11 +2297,13 @@ export type ResponsesRequestOutput = {
1753
2297
  export type ResponsesResponseInput = {
1754
2298
  background?: boolean;
1755
2299
  created_at: number;
2300
+ effort?: string;
1756
2301
  error?: ErrorInfoInput;
1757
2302
  id: string;
1758
2303
  model: string;
1759
2304
  object: ResponsesObjectTypeInput;
1760
2305
  output: OutputItemInput[];
2306
+ /** @deprecated Use effort instead. Contains the same configuration and version. */
1761
2307
  preset?: string;
1762
2308
  previous_response_id?: string | null;
1763
2309
  prompt_cache_key?: string | null;
@@ -1769,11 +2315,13 @@ export type ResponsesResponseInput = {
1769
2315
  export type ResponsesResponseOutput = {
1770
2316
  background?: boolean;
1771
2317
  created_at: number;
2318
+ effort?: string;
1772
2319
  error?: ErrorInfoOutput;
1773
2320
  id: string;
1774
2321
  model: string;
1775
2322
  object: ResponsesObjectTypeOutput;
1776
2323
  output: OutputItemOutput[];
2324
+ /** @deprecated Use effort instead. Contains the same configuration and version. */
1777
2325
  preset?: string;
1778
2326
  previous_response_id?: string | null;
1779
2327
  prompt_cache_key?: string | null;
@@ -2218,6 +2766,22 @@ export type UnknownOutputItemOutput = {
2218
2766
  payload: {} & Record<string, unknown>;
2219
2767
  type: "unknown";
2220
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
+ };
2221
2785
  export type URLInput = {
2222
2786
  url: string;
2223
2787
  };
@@ -2362,6 +2926,22 @@ export declare class ChatCompletionsResource {
2362
2926
  }, options?: RequestOptions): APIPromise<Stream<CompletionResponseOutput>>;
2363
2927
  create(body: ApiChatCompletionsRequestInput, options?: RequestOptions): APIPromise<CompletionResponseOutput | Stream<CompletionResponseOutput>>;
2364
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
+ }
2365
2945
  export declare class ResponsesFilesResource {
2366
2946
  private readonly _client;
2367
2947
  constructor(client: SdkTransport);
@@ -2437,6 +3017,25 @@ export declare class ModelsResource {
2437
3017
  constructor(client: SdkTransport);
2438
3018
  list(options?: RequestOptions): APIPromise<ModelListOutput>;
2439
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
+ }
2440
3039
  export declare class ResponsesResource {
2441
3040
  private readonly _client;
2442
3041
  readonly files: ResponsesFilesResource;
@@ -2532,6 +3131,7 @@ export declare class PerplexitySdk {
2532
3131
  readonly embeddings: EmbeddingsResource;
2533
3132
  readonly files: FilesResource;
2534
3133
  readonly models: ModelsResource;
3134
+ readonly monitors: MonitorsResource;
2535
3135
  readonly responses: ResponsesResource;
2536
3136
  readonly search: SearchResource;
2537
3137
  readonly skills: SkillsResource;
@@ -2555,6 +3155,8 @@ export declare class Files extends FilesResource {
2555
3155
  }
2556
3156
  export declare class Models extends ModelsResource {
2557
3157
  }
3158
+ export declare class Monitors extends MonitorsResource {
3159
+ }
2558
3160
  export declare class Responses extends ResponsesResource {
2559
3161
  }
2560
3162
  export declare class Search extends SearchResource {
@@ -2597,6 +3199,19 @@ export type JsonSchemaFormat = JSONSchemaFormatInput;
2597
3199
  export type ManagedSkill = ManagedSkillOutput;
2598
3200
  export type Model = ModelOutput;
2599
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;
2600
3215
  export type OutputItem = OutputItemOutput;
2601
3216
  export type ResponseCancelResponse = Awaited<ReturnType<ResponsesResource["cancel"]>>;
2602
3217
  export type ResponseCreateParams = ResponsesRequestInput;
@@ -2702,6 +3317,32 @@ export declare namespace Models {
2702
3317
  type Model = ModelOutput;
2703
3318
  type ModelListResponse = Awaited<ReturnType<ModelsResource["list"]>>;
2704
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
+ }
2705
3346
  export declare namespace Responses {
2706
3347
  class Files extends ResponsesFilesResource {
2707
3348
  }