semrush-cli 0.1.0 → 0.2.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.
@@ -1,5 +1,9 @@
1
1
  import { Schema } from "effect";
2
2
 
3
+ //#region package.json
4
+ var version$1 = "0.2.0";
5
+
6
+ //#endregion
3
7
  //#region src/report-catalog.json
4
8
  var report_catalog_default = {
5
9
  account_status: {
@@ -13,7 +17,10 @@ var report_catalog_default = {
13
17
  "properties": {},
14
18
  "title": "EmptyQuery",
15
19
  "type": "object"
16
- }
20
+ },
21
+ "mutation": false,
22
+ "destructive": false,
23
+ "http_method": ""
17
24
  },
18
25
  keyword_overview: {
19
26
  "method": "keywords.GetInfo",
@@ -40,7 +47,10 @@ var report_catalog_default = {
40
47
  "required": ["keyword"],
41
48
  "title": "KeywordQuery",
42
49
  "type": "object"
43
- }
50
+ },
51
+ "mutation": false,
52
+ "destructive": false,
53
+ "http_method": ""
44
54
  },
45
55
  keyword_ideas: {
46
56
  "method": "ideas.GetKeywords",
@@ -79,7 +89,10 @@ var report_catalog_default = {
79
89
  "required": ["keyword"],
80
90
  "title": "IdeasQuery",
81
91
  "type": "object"
82
- }
92
+ },
93
+ "mutation": false,
94
+ "destructive": false,
95
+ "http_method": ""
83
96
  },
84
97
  keyword_ideas_summary: {
85
98
  "method": "ideas.GetKeywordsSummary",
@@ -111,7 +124,10 @@ var report_catalog_default = {
111
124
  "required": ["keyword"],
112
125
  "title": "IdeasSummaryQuery",
113
126
  "type": "object"
114
- }
127
+ },
128
+ "mutation": false,
129
+ "destructive": false,
130
+ "http_method": ""
115
131
  },
116
132
  keyword_serp: {
117
133
  "method": "serp.GetURLs",
@@ -145,7 +161,10 @@ var report_catalog_default = {
145
161
  "required": ["keyword"],
146
162
  "title": "KeywordListQuery",
147
163
  "type": "object"
148
- }
164
+ },
165
+ "mutation": false,
166
+ "destructive": false,
167
+ "http_method": ""
149
168
  },
150
169
  keyword_ads: {
151
170
  "method": "adwords.GetCopies",
@@ -179,7 +198,10 @@ var report_catalog_default = {
179
198
  "required": ["keyword"],
180
199
  "title": "KeywordListQuery",
181
200
  "type": "object"
182
- }
201
+ },
202
+ "mutation": false,
203
+ "destructive": false,
204
+ "http_method": ""
183
205
  },
184
206
  keyword_clusters: {
185
207
  "method": "clusters.Get",
@@ -206,7 +228,10 @@ var report_catalog_default = {
206
228
  "required": ["keyword"],
207
229
  "title": "KeywordQuery",
208
230
  "type": "object"
209
- }
231
+ },
232
+ "mutation": false,
233
+ "destructive": false,
234
+ "http_method": ""
210
235
  },
211
236
  keyword_magic: {
212
237
  "method": "ideas.GetKeywords",
@@ -287,7 +312,10 @@ var report_catalog_default = {
287
312
  "required": ["keyword"],
288
313
  "title": "MagicQuery",
289
314
  "type": "object"
290
- }
315
+ },
316
+ "mutation": false,
317
+ "destructive": false,
318
+ "http_method": ""
291
319
  },
292
320
  keyword_magic_summary: {
293
321
  "method": "ideas.GetKeywordsSummary",
@@ -355,7 +383,10 @@ var report_catalog_default = {
355
383
  "required": ["keyword"],
356
384
  "title": "MagicSummaryQuery",
357
385
  "type": "object"
358
- }
386
+ },
387
+ "mutation": false,
388
+ "destructive": false,
389
+ "http_method": ""
359
390
  },
360
391
  keyword_magic_groups: {
361
392
  "method": "ideas.GetGroups",
@@ -436,7 +467,10 @@ var report_catalog_default = {
436
467
  "required": ["keyword"],
437
468
  "title": "MagicQuery",
438
469
  "type": "object"
439
- }
470
+ },
471
+ "mutation": false,
472
+ "destructive": false,
473
+ "http_method": ""
440
474
  },
441
475
  domain_overview: {
442
476
  "method": "organic.Summary",
@@ -464,7 +498,10 @@ var report_catalog_default = {
464
498
  "required": ["domain"],
465
499
  "title": "DomainQuery",
466
500
  "type": "object"
467
- }
501
+ },
502
+ "mutation": false,
503
+ "destructive": false,
504
+ "http_method": ""
468
505
  },
469
506
  domain_keywords: {
470
507
  "method": "organic.Positions",
@@ -543,7 +580,10 @@ var report_catalog_default = {
543
580
  "required": ["domain"],
544
581
  "title": "DomainReportQuery",
545
582
  "type": "object"
546
- }
583
+ },
584
+ "mutation": false,
585
+ "destructive": false,
586
+ "http_method": ""
547
587
  },
548
588
  domain_pages: {
549
589
  "method": "organic.PagesV3",
@@ -622,7 +662,10 @@ var report_catalog_default = {
622
662
  "required": ["domain"],
623
663
  "title": "DomainPagesQuery",
624
664
  "type": "object"
625
- }
665
+ },
666
+ "mutation": false,
667
+ "destructive": false,
668
+ "http_method": ""
626
669
  },
627
670
  domain_subdomains: {
628
671
  "method": "organic.Subdomains",
@@ -701,7 +744,10 @@ var report_catalog_default = {
701
744
  "required": ["domain"],
702
745
  "title": "DomainPagesQuery",
703
746
  "type": "object"
704
- }
747
+ },
748
+ "mutation": false,
749
+ "destructive": false,
750
+ "http_method": ""
705
751
  },
706
752
  domain_position_changes: {
707
753
  "method": "organic.PositionChangesV2",
@@ -780,7 +826,10 @@ var report_catalog_default = {
780
826
  "required": ["domain"],
781
827
  "title": "DomainChangesQuery",
782
828
  "type": "object"
783
- }
829
+ },
830
+ "mutation": false,
831
+ "destructive": false,
832
+ "http_method": ""
784
833
  },
785
834
  domain_competitors: {
786
835
  "method": "organic.Competitors",
@@ -853,7 +902,10 @@ var report_catalog_default = {
853
902
  "required": ["domain"],
854
903
  "title": "DomainCompetitorsQuery",
855
904
  "type": "object"
856
- }
905
+ },
906
+ "mutation": false,
907
+ "destructive": false,
908
+ "http_method": ""
857
909
  },
858
910
  domain_backlinks: {
859
911
  "method": "backlinks.Overview",
@@ -873,7 +925,10 @@ var report_catalog_default = {
873
925
  "required": ["domain"],
874
926
  "title": "DomainIdentityQuery",
875
927
  "type": "object"
876
- }
928
+ },
929
+ "mutation": false,
930
+ "destructive": false,
931
+ "http_method": ""
877
932
  },
878
933
  domain_ai_visibility: {
879
934
  "method": "organic.AiSeoSummary",
@@ -893,7 +948,10 @@ var report_catalog_default = {
893
948
  "required": ["domain"],
894
949
  "title": "DomainIdentityQuery",
895
950
  "type": "object"
896
- }
951
+ },
952
+ "mutation": false,
953
+ "destructive": false,
954
+ "http_method": ""
897
955
  },
898
956
  domain_ai_countries: {
899
957
  "method": "organic.AiDistributionByCountry",
@@ -913,7 +971,10 @@ var report_catalog_default = {
913
971
  "required": ["domain"],
914
972
  "title": "DomainIdentityQuery",
915
973
  "type": "object"
916
- }
974
+ },
975
+ "mutation": false,
976
+ "destructive": false,
977
+ "http_method": ""
917
978
  },
918
979
  domain_ai_sources: {
919
980
  "method": "organic.AiTopSources",
@@ -954,7 +1015,10 @@ var report_catalog_default = {
954
1015
  "required": ["domain"],
955
1016
  "title": "AiSourcesQuery",
956
1017
  "type": "object"
957
- }
1018
+ },
1019
+ "mutation": false,
1020
+ "destructive": false,
1021
+ "http_method": ""
958
1022
  },
959
1023
  domain_trends: {
960
1024
  "method": "organic.OverviewTrend",
@@ -993,7 +1057,10 @@ var report_catalog_default = {
993
1057
  "required": ["domain"],
994
1058
  "title": "DomainTrendQuery",
995
1059
  "type": "object"
996
- }
1060
+ },
1061
+ "mutation": false,
1062
+ "destructive": false,
1063
+ "http_method": ""
997
1064
  },
998
1065
  domain_paid_keywords: {
999
1066
  "method": "adwords.PositionsOverview",
@@ -1028,7 +1095,10 @@ var report_catalog_default = {
1028
1095
  "required": ["domain"],
1029
1096
  "title": "DomainListQuery",
1030
1097
  "type": "object"
1031
- }
1098
+ },
1099
+ "mutation": false,
1100
+ "destructive": false,
1101
+ "http_method": ""
1032
1102
  },
1033
1103
  domain_paid_competitors: {
1034
1104
  "method": "adwords.CompetitorsOverview",
@@ -1063,7 +1133,10 @@ var report_catalog_default = {
1063
1133
  "required": ["domain"],
1064
1134
  "title": "DomainListQuery",
1065
1135
  "type": "object"
1066
- }
1136
+ },
1137
+ "mutation": false,
1138
+ "destructive": false,
1139
+ "http_method": ""
1067
1140
  },
1068
1141
  domain_topics: {
1069
1142
  "method": "organic.TopicsResult",
@@ -1091,7 +1164,10 @@ var report_catalog_default = {
1091
1164
  "required": ["domain"],
1092
1165
  "title": "DomainQuery",
1093
1166
  "type": "object"
1094
- }
1167
+ },
1168
+ "mutation": false,
1169
+ "destructive": false,
1170
+ "http_method": ""
1095
1171
  },
1096
1172
  domain_topics_status: {
1097
1173
  "method": "organic.TopicsStatus",
@@ -1119,7 +1195,10 @@ var report_catalog_default = {
1119
1195
  "required": ["domain"],
1120
1196
  "title": "DomainQuery",
1121
1197
  "type": "object"
1122
- }
1198
+ },
1199
+ "mutation": false,
1200
+ "destructive": false,
1201
+ "http_method": ""
1123
1202
  },
1124
1203
  databases: {
1125
1204
  "method": "user.Databases",
@@ -1132,7 +1211,10 @@ var report_catalog_default = {
1132
1211
  "properties": {},
1133
1212
  "title": "EmptyQuery",
1134
1213
  "type": "object"
1135
- }
1214
+ },
1215
+ "mutation": false,
1216
+ "destructive": false,
1217
+ "http_method": ""
1136
1218
  },
1137
1219
  snapshot_dates: {
1138
1220
  "method": "organic.SnapshotDates",
@@ -1157,7 +1239,10 @@ var report_catalog_default = {
1157
1239
  },
1158
1240
  "title": "HistoryQuery",
1159
1241
  "type": "object"
1160
- }
1242
+ },
1243
+ "mutation": false,
1244
+ "destructive": false,
1245
+ "http_method": ""
1161
1246
  },
1162
1247
  report_permissions: {
1163
1248
  "method": "dpa.UserPermissions",
@@ -1175,7 +1260,10 @@ var report_catalog_default = {
1175
1260
  } },
1176
1261
  "title": "DatabaseQuery",
1177
1262
  "type": "object"
1178
- }
1263
+ },
1264
+ "mutation": false,
1265
+ "destructive": false,
1266
+ "http_method": ""
1179
1267
  },
1180
1268
  backlink_links: {
1181
1269
  "method": "backlinks",
@@ -1226,7 +1314,10 @@ var report_catalog_default = {
1226
1314
  "required": ["domain"],
1227
1315
  "title": "BacklinkListQuery",
1228
1316
  "type": "object"
1229
- }
1317
+ },
1318
+ "mutation": false,
1319
+ "destructive": false,
1320
+ "http_method": ""
1230
1321
  },
1231
1322
  backlink_referring_domains: {
1232
1323
  "method": "backlinks_refdomains",
@@ -1277,7 +1368,10 @@ var report_catalog_default = {
1277
1368
  "required": ["domain"],
1278
1369
  "title": "BacklinkListQuery",
1279
1370
  "type": "object"
1280
- }
1371
+ },
1372
+ "mutation": false,
1373
+ "destructive": false,
1374
+ "http_method": ""
1281
1375
  },
1282
1376
  backlink_history: {
1283
1377
  "method": "historical",
@@ -1304,7 +1398,10 @@ var report_catalog_default = {
1304
1398
  "required": ["domain"],
1305
1399
  "title": "BacklinkQuery",
1306
1400
  "type": "object"
1307
- }
1401
+ },
1402
+ "mutation": false,
1403
+ "destructive": false,
1404
+ "http_method": ""
1308
1405
  },
1309
1406
  backlink_competitors: {
1310
1407
  "method": "competitors",
@@ -1331,7 +1428,10 @@ var report_catalog_default = {
1331
1428
  "required": ["domain"],
1332
1429
  "title": "BacklinkQuery",
1333
1430
  "type": "object"
1334
- }
1431
+ },
1432
+ "mutation": false,
1433
+ "destructive": false,
1434
+ "http_method": ""
1335
1435
  },
1336
1436
  backlink_top_pages: {
1337
1437
  "method": "backlinks_pages",
@@ -1382,7 +1482,10 @@ var report_catalog_default = {
1382
1482
  "required": ["domain"],
1383
1483
  "title": "BacklinkListQuery",
1384
1484
  "type": "object"
1385
- }
1485
+ },
1486
+ "mutation": false,
1487
+ "destructive": false,
1488
+ "http_method": ""
1386
1489
  },
1387
1490
  backlink_anchors: {
1388
1491
  "method": "backlinks_anchors",
@@ -1433,7 +1536,10 @@ var report_catalog_default = {
1433
1536
  "required": ["domain"],
1434
1537
  "title": "BacklinkListQuery",
1435
1538
  "type": "object"
1436
- }
1539
+ },
1540
+ "mutation": false,
1541
+ "destructive": false,
1542
+ "http_method": ""
1437
1543
  },
1438
1544
  backlink_outgoing_domains: {
1439
1545
  "method": "backlinks_outgoing_domains",
@@ -1484,7 +1590,10 @@ var report_catalog_default = {
1484
1590
  "required": ["domain"],
1485
1591
  "title": "BacklinkListQuery",
1486
1592
  "type": "object"
1487
- }
1593
+ },
1594
+ "mutation": false,
1595
+ "destructive": false,
1596
+ "http_method": ""
1488
1597
  },
1489
1598
  backlink_countries: {
1490
1599
  "method": "geodomains",
@@ -1511,7 +1620,10 @@ var report_catalog_default = {
1511
1620
  "required": ["domain"],
1512
1621
  "title": "BacklinkQuery",
1513
1622
  "type": "object"
1514
- }
1623
+ },
1624
+ "mutation": false,
1625
+ "destructive": false,
1626
+ "http_method": ""
1515
1627
  },
1516
1628
  backlink_authority: {
1517
1629
  "method": "ascore",
@@ -1538,7 +1650,10 @@ var report_catalog_default = {
1538
1650
  "required": ["domain"],
1539
1651
  "title": "BacklinkQuery",
1540
1652
  "type": "object"
1541
- }
1653
+ },
1654
+ "mutation": false,
1655
+ "destructive": false,
1656
+ "http_method": ""
1542
1657
  },
1543
1658
  backlink_categories: {
1544
1659
  "method": "category-profile",
@@ -1565,7 +1680,10 @@ var report_catalog_default = {
1565
1680
  "required": ["domain"],
1566
1681
  "title": "BacklinkQuery",
1567
1682
  "type": "object"
1568
- }
1683
+ },
1684
+ "mutation": false,
1685
+ "destructive": false,
1686
+ "http_method": ""
1569
1687
  },
1570
1688
  keyword_gap: {
1571
1689
  "method": "/spectrum/v1/Gap/KeywordsList",
@@ -1621,7 +1739,10 @@ var report_catalog_default = {
1621
1739
  "required": ["domains"],
1622
1740
  "title": "GapQuery",
1623
1741
  "type": "object"
1624
- }
1742
+ },
1743
+ "mutation": false,
1744
+ "destructive": false,
1745
+ "http_method": ""
1625
1746
  },
1626
1747
  keyword_gap_totals: {
1627
1748
  "method": "/spectrum/v1/Gap/KeywordsTotals",
@@ -1656,7 +1777,10 @@ var report_catalog_default = {
1656
1777
  "required": ["domains"],
1657
1778
  "title": "GapSummaryQuery",
1658
1779
  "type": "object"
1659
- }
1780
+ },
1781
+ "mutation": false,
1782
+ "destructive": false,
1783
+ "http_method": ""
1660
1784
  },
1661
1785
  keyword_gap_overlap: {
1662
1786
  "method": "/spectrum/v1/Gap/Overlaps",
@@ -1691,7 +1815,10 @@ var report_catalog_default = {
1691
1815
  "required": ["domains"],
1692
1816
  "title": "GapSummaryQuery",
1693
1817
  "type": "object"
1694
- }
1818
+ },
1819
+ "mutation": false,
1820
+ "destructive": false,
1821
+ "http_method": ""
1695
1822
  },
1696
1823
  backlink_gap: {
1697
1824
  "method": "backlinks_matrix",
@@ -1751,7 +1878,10 @@ var report_catalog_default = {
1751
1878
  "required": ["domains"],
1752
1879
  "title": "BacklinkGapQuery",
1753
1880
  "type": "object"
1754
- }
1881
+ },
1882
+ "mutation": false,
1883
+ "destructive": false,
1884
+ "http_method": ""
1755
1885
  },
1756
1886
  backlink_comparison: {
1757
1887
  "method": "backlinks_comparison",
@@ -1772,7 +1902,10 @@ var report_catalog_default = {
1772
1902
  "required": ["domains"],
1773
1903
  "title": "BacklinkComparisonQuery",
1774
1904
  "type": "object"
1775
- }
1905
+ },
1906
+ "mutation": false,
1907
+ "destructive": false,
1908
+ "http_method": ""
1776
1909
  },
1777
1910
  projects: {
1778
1911
  "method": "/apis/v4-raw/crossroad/api/v0/crossroad/list",
@@ -1805,7 +1938,10 @@ var report_catalog_default = {
1805
1938
  },
1806
1939
  "title": "ProjectListQuery",
1807
1940
  "type": "object"
1808
- }
1941
+ },
1942
+ "mutation": false,
1943
+ "destructive": false,
1944
+ "http_method": ""
1809
1945
  },
1810
1946
  ai_capabilities: {
1811
1947
  "method": "/ai-seo/api/v2/user/user_capabilities",
@@ -1818,7 +1954,10 @@ var report_catalog_default = {
1818
1954
  "properties": {},
1819
1955
  "title": "EmptyQuery",
1820
1956
  "type": "object"
1821
- }
1957
+ },
1958
+ "mutation": false,
1959
+ "destructive": false,
1960
+ "http_method": ""
1822
1961
  },
1823
1962
  audit_campaigns: {
1824
1963
  "method": "/siteaudit/api/campaigns/seolist",
@@ -1831,7 +1970,10 @@ var report_catalog_default = {
1831
1970
  "properties": {},
1832
1971
  "title": "EmptyQuery",
1833
1972
  "type": "object"
1834
- }
1973
+ },
1974
+ "mutation": false,
1975
+ "destructive": false,
1976
+ "http_method": ""
1835
1977
  },
1836
1978
  folders: {
1837
1979
  "method": "/apis/v4-raw/folders/api/v0/folders/selector-list",
@@ -1844,7 +1986,10 @@ var report_catalog_default = {
1844
1986
  "properties": {},
1845
1987
  "title": "EmptyQuery",
1846
1988
  "type": "object"
1847
- }
1989
+ },
1990
+ "mutation": false,
1991
+ "destructive": false,
1992
+ "http_method": ""
1848
1993
  },
1849
1994
  saved_keyword_lists: {
1850
1995
  "method": "/apis/v4-raw/saved-keywords/api/v0/list/all",
@@ -1857,6 +2002,450 @@ var report_catalog_default = {
1857
2002
  "properties": {},
1858
2003
  "title": "EmptyQuery",
1859
2004
  "type": "object"
2005
+ },
2006
+ "mutation": false,
2007
+ "destructive": false,
2008
+ "http_method": ""
2009
+ },
2010
+ project_create: {
2011
+ "method": "/apis/v4-raw/folders/api/v0/folders",
2012
+ "description": "Create a project, optionally with a website. Does not start tools or share it.",
2013
+ "transport": "project_web",
2014
+ "total_method": "",
2015
+ "web_report": "",
2016
+ "mutation": true,
2017
+ "destructive": false,
2018
+ "http_method": "POST",
2019
+ "schema": {
2020
+ "type": "object",
2021
+ "additionalProperties": false,
2022
+ "properties": {
2023
+ "name": {
2024
+ "type": "string",
2025
+ "minLength": 1,
2026
+ "maxLength": 255,
2027
+ "pattern": "^(?=.*\\S)[^~|`!#%^&*=\\[\\]\\\\\\x27/{}\":<>?]+$",
2028
+ "description": "Project name, up to 255 characters. The web UI restricts punctuation."
2029
+ },
2030
+ "domain": {
2031
+ "type": "string",
2032
+ "minLength": 1,
2033
+ "maxLength": 253,
2034
+ "pattern": "^(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z]{2,63}$",
2035
+ "description": "Domain or subdomain, without protocol or path."
2036
+ },
2037
+ "confirm": {
2038
+ "type": "boolean",
2039
+ "default": false,
2040
+ "description": "Confirm this account mutation."
2041
+ },
2042
+ "dry_run": {
2043
+ "type": "boolean",
2044
+ "default": false,
2045
+ "description": "Print the request without sending it."
2046
+ }
2047
+ },
2048
+ "required": ["name"]
2049
+ }
2050
+ },
2051
+ project_get: {
2052
+ "method": "/apis/v4-raw/folders/api/v0/folders/folder",
2053
+ "description": "Read one project by its current web folder ID.",
2054
+ "transport": "project_web",
2055
+ "total_method": "",
2056
+ "web_report": "",
2057
+ "mutation": false,
2058
+ "destructive": false,
2059
+ "http_method": "GET",
2060
+ "schema": {
2061
+ "type": "object",
2062
+ "additionalProperties": false,
2063
+ "properties": { "folder_id": {
2064
+ "type": "string",
2065
+ "pattern": "^[0-9]+$",
2066
+ "maxLength": 30,
2067
+ "description": "Current web project folder ID, as a decimal string."
2068
+ } },
2069
+ "required": ["folder_id"]
2070
+ }
2071
+ },
2072
+ project_update: {
2073
+ "method": "/apis/v4-raw/folders/api/v0/folders/{folder_id}",
2074
+ "description": "Rename a project or add its first domain. Existing domains cannot be changed.",
2075
+ "transport": "project_web",
2076
+ "total_method": "",
2077
+ "web_report": "",
2078
+ "mutation": true,
2079
+ "destructive": false,
2080
+ "http_method": "PUT",
2081
+ "schema": {
2082
+ "type": "object",
2083
+ "additionalProperties": false,
2084
+ "properties": {
2085
+ "folder_id": {
2086
+ "type": "string",
2087
+ "pattern": "^[0-9]+$",
2088
+ "maxLength": 30,
2089
+ "description": "Current web project folder ID, as a decimal string."
2090
+ },
2091
+ "name": {
2092
+ "type": "string",
2093
+ "minLength": 1,
2094
+ "maxLength": 255,
2095
+ "pattern": "^(?=.*\\S)[^~|`!#%^&*=\\[\\]\\\\\\x27/{}\":<>?]+$",
2096
+ "description": "Project name, up to 255 characters. The web UI restricts punctuation."
2097
+ },
2098
+ "domain": {
2099
+ "type": "string",
2100
+ "minLength": 1,
2101
+ "maxLength": 253,
2102
+ "pattern": "^(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z]{2,63}$",
2103
+ "description": "Domain or subdomain, without protocol or path."
2104
+ },
2105
+ "confirm": {
2106
+ "type": "boolean",
2107
+ "default": false,
2108
+ "description": "Confirm this account mutation."
2109
+ },
2110
+ "dry_run": {
2111
+ "type": "boolean",
2112
+ "default": false,
2113
+ "description": "Print the request without sending it."
2114
+ }
2115
+ },
2116
+ "required": ["folder_id"],
2117
+ "anyOf": [{ "required": ["name"] }, { "required": ["domain"] }]
2118
+ }
2119
+ },
2120
+ project_delete: {
2121
+ "method": "/apis/v4-raw/folders/api/v0/folders/{folder_id}",
2122
+ "description": "Permanently delete a project and its attached tool data.",
2123
+ "transport": "project_web",
2124
+ "total_method": "",
2125
+ "web_report": "",
2126
+ "mutation": true,
2127
+ "destructive": true,
2128
+ "http_method": "DELETE",
2129
+ "schema": {
2130
+ "type": "object",
2131
+ "additionalProperties": false,
2132
+ "properties": {
2133
+ "folder_id": {
2134
+ "type": "string",
2135
+ "pattern": "^[0-9]+$",
2136
+ "maxLength": 30,
2137
+ "description": "Current web project folder ID, as a decimal string."
2138
+ },
2139
+ "confirm": {
2140
+ "type": "boolean",
2141
+ "default": false,
2142
+ "description": "Confirm this account mutation."
2143
+ },
2144
+ "dry_run": {
2145
+ "type": "boolean",
2146
+ "default": false,
2147
+ "description": "Print the request without sending it."
2148
+ }
2149
+ },
2150
+ "required": ["folder_id"]
2151
+ }
2152
+ },
2153
+ project_leave: {
2154
+ "method": "/share/json/leave/project-smb",
2155
+ "description": "Leave a shared project.",
2156
+ "transport": "project_web",
2157
+ "total_method": "",
2158
+ "web_report": "",
2159
+ "mutation": true,
2160
+ "destructive": true,
2161
+ "http_method": "POST",
2162
+ "schema": {
2163
+ "type": "object",
2164
+ "additionalProperties": false,
2165
+ "properties": {
2166
+ "folder_id": {
2167
+ "type": "string",
2168
+ "pattern": "^[0-9]+$",
2169
+ "maxLength": 30,
2170
+ "description": "Current web project folder ID, as a decimal string."
2171
+ },
2172
+ "confirm": {
2173
+ "type": "boolean",
2174
+ "default": false,
2175
+ "description": "Confirm this account mutation."
2176
+ },
2177
+ "dry_run": {
2178
+ "type": "boolean",
2179
+ "default": false,
2180
+ "description": "Print the request without sending it."
2181
+ }
2182
+ },
2183
+ "required": ["folder_id"]
2184
+ }
2185
+ },
2186
+ project_limits: {
2187
+ "method": "/apis/v4-raw/folders/api/v0/folders/limits",
2188
+ "description": "Read project creation limits.",
2189
+ "transport": "project_web",
2190
+ "total_method": "",
2191
+ "web_report": "",
2192
+ "mutation": false,
2193
+ "destructive": false,
2194
+ "http_method": "GET",
2195
+ "schema": {
2196
+ "type": "object",
2197
+ "additionalProperties": false,
2198
+ "properties": {},
2199
+ "required": []
2200
+ }
2201
+ },
2202
+ project_tags: {
2203
+ "method": "/apis/v4-raw/folders/api/v0/folders/tags",
2204
+ "description": "Read available project tags.",
2205
+ "transport": "project_web",
2206
+ "total_method": "",
2207
+ "web_report": "",
2208
+ "mutation": false,
2209
+ "destructive": false,
2210
+ "http_method": "GET",
2211
+ "schema": {
2212
+ "type": "object",
2213
+ "additionalProperties": false,
2214
+ "properties": {},
2215
+ "required": []
2216
+ }
2217
+ },
2218
+ project_set_tags: {
2219
+ "method": "/apis/v4-raw/folders/api/v0/folders/tags/{folder_id}",
2220
+ "description": "Replace project tags. An empty array removes all its tags.",
2221
+ "transport": "project_web",
2222
+ "total_method": "",
2223
+ "web_report": "",
2224
+ "mutation": true,
2225
+ "destructive": false,
2226
+ "http_method": "POST",
2227
+ "schema": {
2228
+ "type": "object",
2229
+ "additionalProperties": false,
2230
+ "properties": {
2231
+ "folder_id": {
2232
+ "type": "string",
2233
+ "pattern": "^[0-9]+$",
2234
+ "maxLength": 30,
2235
+ "description": "Current web project folder ID, as a decimal string."
2236
+ },
2237
+ "tags": {
2238
+ "type": "array",
2239
+ "items": {
2240
+ "type": "string",
2241
+ "minLength": 1,
2242
+ "maxLength": 50,
2243
+ "pattern": "^[^~|`!#%^&*=\\[\\]\\\\\\x27/{}\":<>?]+$"
2244
+ },
2245
+ "maxItems": 3,
2246
+ "uniqueItems": true
2247
+ },
2248
+ "confirm": {
2249
+ "type": "boolean",
2250
+ "default": false,
2251
+ "description": "Confirm this account mutation."
2252
+ },
2253
+ "dry_run": {
2254
+ "type": "boolean",
2255
+ "default": false,
2256
+ "description": "Print the request without sending it."
2257
+ }
2258
+ },
2259
+ "required": ["folder_id", "tags"]
2260
+ }
2261
+ },
2262
+ project_check_domain: {
2263
+ "method": "/apis/v4-raw/folders/api/v0/folders/check-domain",
2264
+ "description": "Check website information before creating a project.",
2265
+ "transport": "project_web",
2266
+ "total_method": "",
2267
+ "web_report": "",
2268
+ "mutation": false,
2269
+ "destructive": false,
2270
+ "http_method": "GET",
2271
+ "schema": {
2272
+ "type": "object",
2273
+ "additionalProperties": false,
2274
+ "properties": { "domain": {
2275
+ "type": "string",
2276
+ "minLength": 1,
2277
+ "maxLength": 253,
2278
+ "pattern": "^(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z]{2,63}$",
2279
+ "description": "Domain or subdomain, without protocol or path."
2280
+ } },
2281
+ "required": ["domain"]
2282
+ }
2283
+ },
2284
+ project_pin: {
2285
+ "method": "/apis/v4-raw/crossroad/api/v0/crossroad/set-pinned",
2286
+ "description": "Pin or unpin a project on the dashboard.",
2287
+ "transport": "project_web",
2288
+ "total_method": "",
2289
+ "web_report": "",
2290
+ "mutation": true,
2291
+ "destructive": false,
2292
+ "http_method": "POST",
2293
+ "schema": {
2294
+ "type": "object",
2295
+ "additionalProperties": false,
2296
+ "properties": {
2297
+ "folder_id": {
2298
+ "type": "string",
2299
+ "pattern": "^[0-9]+$",
2300
+ "maxLength": 30,
2301
+ "description": "Current web project folder ID, as a decimal string."
2302
+ },
2303
+ "pinned": { "type": "boolean" },
2304
+ "confirm": {
2305
+ "type": "boolean",
2306
+ "default": false,
2307
+ "description": "Confirm this account mutation."
2308
+ },
2309
+ "dry_run": {
2310
+ "type": "boolean",
2311
+ "default": false,
2312
+ "description": "Print the request without sending it."
2313
+ }
2314
+ },
2315
+ "required": ["folder_id", "pinned"]
2316
+ }
2317
+ },
2318
+ project_toolkits: {
2319
+ "method": "/apis/v4-raw/crossroad/api/v0/crossroad/toolkits",
2320
+ "description": "Read SEO, AI, local, social, advertising and content toolkit status.",
2321
+ "transport": "project_web",
2322
+ "total_method": "",
2323
+ "web_report": "",
2324
+ "mutation": false,
2325
+ "destructive": false,
2326
+ "http_method": "POST",
2327
+ "schema": {
2328
+ "type": "object",
2329
+ "additionalProperties": false,
2330
+ "properties": {
2331
+ "folder_ids": {
2332
+ "type": "array",
2333
+ "items": {
2334
+ "type": "string",
2335
+ "pattern": "^[0-9]+$",
2336
+ "maxLength": 30,
2337
+ "description": "Current web project folder ID, as a decimal string."
2338
+ },
2339
+ "minItems": 1,
2340
+ "maxItems": 100,
2341
+ "uniqueItems": true
2342
+ },
2343
+ "with_promo": {
2344
+ "type": "boolean",
2345
+ "default": false
2346
+ }
2347
+ },
2348
+ "required": ["folder_ids"]
2349
+ }
2350
+ },
2351
+ project_tools: {
2352
+ "method": "/apis/v4-raw/crossroad/api/v0/crossroad/tools",
2353
+ "description": "Read project dashboard metrics. Tool IDs match the web dashboard.",
2354
+ "transport": "project_web",
2355
+ "total_method": "",
2356
+ "web_report": "",
2357
+ "mutation": false,
2358
+ "destructive": false,
2359
+ "http_method": "POST",
2360
+ "schema": {
2361
+ "type": "object",
2362
+ "additionalProperties": false,
2363
+ "properties": {
2364
+ "folder_id": {
2365
+ "type": "string",
2366
+ "pattern": "^[0-9]+$",
2367
+ "maxLength": 30,
2368
+ "description": "Current web project folder ID, as a decimal string."
2369
+ },
2370
+ "tools": {
2371
+ "type": "array",
2372
+ "items": {
2373
+ "type": "integer",
2374
+ "minimum": 3,
2375
+ "maximum": 33
2376
+ },
2377
+ "minItems": 1,
2378
+ "maxItems": 31,
2379
+ "uniqueItems": true
2380
+ }
2381
+ },
2382
+ "required": ["folder_id", "tools"]
2383
+ }
2384
+ },
2385
+ project_enable_seo: {
2386
+ "method": "/projects/api/projects",
2387
+ "description": "Create the SEO project associated with an existing web project. Uses project allowance.",
2388
+ "transport": "project_web",
2389
+ "total_method": "",
2390
+ "web_report": "",
2391
+ "mutation": true,
2392
+ "destructive": false,
2393
+ "http_method": "POST",
2394
+ "schema": {
2395
+ "type": "object",
2396
+ "additionalProperties": false,
2397
+ "properties": {
2398
+ "folder_id": {
2399
+ "type": "string",
2400
+ "pattern": "^[0-9]+$",
2401
+ "maxLength": 30,
2402
+ "description": "Current web project folder ID, as a decimal string."
2403
+ },
2404
+ "confirm": {
2405
+ "type": "boolean",
2406
+ "default": false,
2407
+ "description": "Confirm this account mutation."
2408
+ },
2409
+ "dry_run": {
2410
+ "type": "boolean",
2411
+ "default": false,
2412
+ "description": "Print the request without sending it."
2413
+ }
2414
+ },
2415
+ "required": ["folder_id"]
2416
+ }
2417
+ },
2418
+ project_seo_auto_setup: {
2419
+ "method": "/projects/api/projects/seo_auto_setup",
2420
+ "description": "Start automatic SEO setup, including Site Audit and Position Tracking. Uses account allowances.",
2421
+ "transport": "project_web",
2422
+ "total_method": "",
2423
+ "web_report": "",
2424
+ "mutation": true,
2425
+ "destructive": false,
2426
+ "http_method": "POST",
2427
+ "schema": {
2428
+ "type": "object",
2429
+ "additionalProperties": false,
2430
+ "properties": {
2431
+ "folder_id": {
2432
+ "type": "string",
2433
+ "pattern": "^[0-9]+$",
2434
+ "maxLength": 30,
2435
+ "description": "Current web project folder ID, as a decimal string."
2436
+ },
2437
+ "confirm": {
2438
+ "type": "boolean",
2439
+ "default": false,
2440
+ "description": "Confirm this account mutation."
2441
+ },
2442
+ "dry_run": {
2443
+ "type": "boolean",
2444
+ "default": false,
2445
+ "description": "Print the request without sending it."
2446
+ }
2447
+ },
2448
+ "required": ["folder_id"]
1860
2449
  }
1861
2450
  }
1862
2451
  };
@@ -1870,10 +2459,12 @@ const backlinkSorts = new Map([
1870
2459
  ["backlinks_pages", "domainsnum"],
1871
2460
  ["backlinks_outgoing_domains", "links_num"]
1872
2461
  ]);
2462
+ const version = version$1;
1873
2463
  const reports = report_catalog_default;
1874
2464
  /** Fixed request shapes observed in semrush-web-mcp. No arbitrary RPC or URL input. */
1875
2465
  function reportParameters(definition, q) {
1876
2466
  const family = definition.transport;
2467
+ if (family === "project_web") return projectParameters(definition, q);
1877
2468
  if (family === "magic") return magicParameters(definition, q);
1878
2469
  if (family === "keyword") return keywordParameters(definition, q);
1879
2470
  if (family === "direct") return "database" in q ? {
@@ -2103,6 +2694,47 @@ function gapParameters(definition, q) {
2103
2694
  });
2104
2695
  return params;
2105
2696
  }
2697
+ /** Current project-selector and Crossroad web contracts. Control flags never go on wire. */
2698
+ function projectParameters(definition, q) {
2699
+ const path = definition.method;
2700
+ if (path === "/apis/v4-raw/folders/api/v0/folders" || definition.http_method === "PUT") {
2701
+ const properties = [];
2702
+ if (q.name !== void 0) properties.push({ name: { value: q.name } });
2703
+ if (q.domain !== void 0) properties.push({ domain: { value: q.domain } });
2704
+ return { properties };
2705
+ }
2706
+ if (path.endsWith("/leave/project-smb")) return { object_ids: [q.folder_id ?? null] };
2707
+ if (path.includes("/tags/")) return { tags: Array.isArray(q.tags) ? q.tags.map((name) => ({ name })) : [] };
2708
+ if (path.endsWith("/set-pinned")) return {
2709
+ id: q.folder_id ?? null,
2710
+ is_pinned: q.pinned ?? null
2711
+ };
2712
+ if (path.endsWith("/toolkits")) return {
2713
+ folders: q.folder_ids ?? [],
2714
+ withPromo: q.with_promo ?? false
2715
+ };
2716
+ if (path.endsWith("/tools")) return { items: Array.isArray(q.tools) ? q.tools.map((tool) => ({
2717
+ folder_id: q.folder_id ?? null,
2718
+ tool
2719
+ })) : [] };
2720
+ if (definition.http_method === "DELETE") return {};
2721
+ return Object.fromEntries(Object.entries(q).filter(([key]) => key !== "confirm" && key !== "dry_run"));
2722
+ }
2723
+ /** Paths come only from the catalog; folder IDs pass the decimal-string input schema. */
2724
+ function projectRequest(definition, query) {
2725
+ return {
2726
+ method: definition.http_method,
2727
+ path: definition.method.replace("{folder_id}", String(query.folder_id)),
2728
+ body: reportParameters(definition, query)
2729
+ };
2730
+ }
2731
+ function previewMutation(name, definition, query) {
2732
+ return definition.mutation && query.dry_run === true ? {
2733
+ dry_run: true,
2734
+ report: name,
2735
+ request: projectRequest(definition, query)
2736
+ } : void 0;
2737
+ }
2106
2738
 
2107
2739
  //#endregion
2108
2740
  //#region src/errors.ts
@@ -2115,5 +2747,5 @@ var ReportError = class extends Schema.TaggedError()("ReportError", { message: S
2115
2747
  var UsageError = class extends Schema.TaggedError()("UsageError", { message: Schema.String }) {};
2116
2748
 
2117
2749
  //#endregion
2118
- export { reports as a, reportParameters as i, SessionError as n, UsageError as r, ReportError as t };
2119
- //# sourceMappingURL=errors-aN5dmXgv.js.map
2750
+ export { projectRequest as a, version as c, previewMutation as i, SessionError as n, reportParameters as o, UsageError as r, reports as s, ReportError as t };
2751
+ //# sourceMappingURL=errors-CJuwKbEZ.js.map