semrush-cli 0.2.0 → 0.3.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,7 +1,7 @@
1
1
  import { Schema } from "effect";
2
2
 
3
3
  //#region package.json
4
- var version$1 = "0.2.0";
4
+ var version$1 = "0.3.0";
5
5
 
6
6
  //#endregion
7
7
  //#region src/report-catalog.json
@@ -2447,6 +2447,882 @@ var report_catalog_default = {
2447
2447
  },
2448
2448
  "required": ["folder_id"]
2449
2449
  }
2450
+ },
2451
+ keyword_list_limits: {
2452
+ "method": "user.GetInfo",
2453
+ "description": "Read Keyword Strategy Builder list and clustering allowances.",
2454
+ "transport": "kwm",
2455
+ "total_method": "",
2456
+ "web_report": "",
2457
+ "mutation": false,
2458
+ "destructive": false,
2459
+ "http_method": "POST",
2460
+ "schema": {
2461
+ "type": "object",
2462
+ "additionalProperties": false,
2463
+ "properties": {},
2464
+ "required": []
2465
+ }
2466
+ },
2467
+ keyword_lists: {
2468
+ "method": "baskets.BasketsGetAll",
2469
+ "description": "Read regular and structured keyword lists with pagination and ownership filters.",
2470
+ "transport": "kwm",
2471
+ "total_method": "",
2472
+ "web_report": "",
2473
+ "mutation": false,
2474
+ "destructive": false,
2475
+ "http_method": "POST",
2476
+ "schema": {
2477
+ "type": "object",
2478
+ "additionalProperties": false,
2479
+ "properties": {
2480
+ "page": {
2481
+ "type": "integer",
2482
+ "minimum": 1,
2483
+ "default": 1
2484
+ },
2485
+ "page_size": {
2486
+ "type": "integer",
2487
+ "minimum": 1,
2488
+ "maximum": 1e3,
2489
+ "default": 100
2490
+ },
2491
+ "sort_field": {
2492
+ "type": "string",
2493
+ "minLength": 1,
2494
+ "default": "updated_at"
2495
+ },
2496
+ "descending": {
2497
+ "type": "boolean",
2498
+ "default": true
2499
+ },
2500
+ "name_filter": {
2501
+ "type": "string",
2502
+ "default": ""
2503
+ },
2504
+ "ownership": {
2505
+ "type": "integer",
2506
+ "minimum": 1,
2507
+ "maximum": 7,
2508
+ "default": 7,
2509
+ "description": "Web ownership bitmask. 7 includes owned and shared lists."
2510
+ }
2511
+ },
2512
+ "required": []
2513
+ }
2514
+ },
2515
+ keyword_list_create: {
2516
+ "method": "baskets.BasketCreate",
2517
+ "description": "Create an empty regular keyword list. Does not cluster or generate a strategy.",
2518
+ "transport": "kwm",
2519
+ "total_method": "",
2520
+ "web_report": "",
2521
+ "mutation": true,
2522
+ "destructive": false,
2523
+ "http_method": "POST",
2524
+ "schema": {
2525
+ "type": "object",
2526
+ "additionalProperties": false,
2527
+ "properties": {
2528
+ "name": {
2529
+ "type": "string",
2530
+ "minLength": 1,
2531
+ "maxLength": 255,
2532
+ "pattern": "\\S"
2533
+ },
2534
+ "confirm": {
2535
+ "type": "boolean",
2536
+ "default": false,
2537
+ "description": "Confirm this account mutation."
2538
+ },
2539
+ "dry_run": {
2540
+ "type": "boolean",
2541
+ "default": false,
2542
+ "description": "Preview without authentication or network access."
2543
+ }
2544
+ },
2545
+ "required": ["name"]
2546
+ }
2547
+ },
2548
+ keyword_list_get: {
2549
+ "method": "baskets.BasketsGetByShareID",
2550
+ "description": "Read one keyword list and its permissions.",
2551
+ "transport": "kwm",
2552
+ "total_method": "",
2553
+ "web_report": "",
2554
+ "mutation": false,
2555
+ "destructive": false,
2556
+ "http_method": "POST",
2557
+ "schema": {
2558
+ "type": "object",
2559
+ "additionalProperties": false,
2560
+ "properties": {
2561
+ "basket_id": {
2562
+ "type": "integer",
2563
+ "minimum": 1,
2564
+ "maximum": 9007199254740991,
2565
+ "description": "BasketID from keyword-lists."
2566
+ },
2567
+ "owner_id": {
2568
+ "type": "integer",
2569
+ "minimum": 1,
2570
+ "maximum": 9007199254740991,
2571
+ "description": "Owner.ID from keyword-lists, including shared lists."
2572
+ }
2573
+ },
2574
+ "required": ["basket_id", "owner_id"]
2575
+ }
2576
+ },
2577
+ keyword_list_rename: {
2578
+ "method": "baskets.BasketRename",
2579
+ "description": "Rename a keyword list.",
2580
+ "transport": "kwm",
2581
+ "total_method": "",
2582
+ "web_report": "",
2583
+ "mutation": true,
2584
+ "destructive": false,
2585
+ "http_method": "POST",
2586
+ "schema": {
2587
+ "type": "object",
2588
+ "additionalProperties": false,
2589
+ "properties": {
2590
+ "basket_id": {
2591
+ "type": "integer",
2592
+ "minimum": 1,
2593
+ "maximum": 9007199254740991,
2594
+ "description": "BasketID from keyword-lists."
2595
+ },
2596
+ "owner_id": {
2597
+ "type": "integer",
2598
+ "minimum": 1,
2599
+ "maximum": 9007199254740991,
2600
+ "description": "Owner.ID from keyword-lists, including shared lists."
2601
+ },
2602
+ "name": {
2603
+ "type": "string",
2604
+ "minLength": 1,
2605
+ "maxLength": 255,
2606
+ "pattern": "\\S"
2607
+ },
2608
+ "confirm": {
2609
+ "type": "boolean",
2610
+ "default": false,
2611
+ "description": "Confirm this account mutation."
2612
+ },
2613
+ "dry_run": {
2614
+ "type": "boolean",
2615
+ "default": false,
2616
+ "description": "Preview without authentication or network access."
2617
+ }
2618
+ },
2619
+ "required": [
2620
+ "basket_id",
2621
+ "owner_id",
2622
+ "name"
2623
+ ]
2624
+ }
2625
+ },
2626
+ keyword_list_delete: {
2627
+ "method": "baskets.BasketDelete",
2628
+ "description": "Permanently delete one of your keyword lists.",
2629
+ "transport": "kwm",
2630
+ "total_method": "",
2631
+ "web_report": "",
2632
+ "mutation": true,
2633
+ "destructive": true,
2634
+ "http_method": "POST",
2635
+ "schema": {
2636
+ "type": "object",
2637
+ "additionalProperties": false,
2638
+ "properties": {
2639
+ "basket_id": {
2640
+ "type": "integer",
2641
+ "minimum": 1,
2642
+ "maximum": 9007199254740991,
2643
+ "description": "BasketID from keyword-lists."
2644
+ },
2645
+ "confirm": {
2646
+ "type": "boolean",
2647
+ "default": false,
2648
+ "description": "Confirm this account mutation."
2649
+ },
2650
+ "dry_run": {
2651
+ "type": "boolean",
2652
+ "default": false,
2653
+ "description": "Preview without authentication or network access."
2654
+ }
2655
+ },
2656
+ "required": ["basket_id"]
2657
+ }
2658
+ },
2659
+ keyword_list_keywords: {
2660
+ "method": "baskets.KeywordsGetByFilter",
2661
+ "description": "Read filtered, paginated keyword-list metrics.",
2662
+ "transport": "kwm",
2663
+ "total_method": "",
2664
+ "web_report": "",
2665
+ "mutation": false,
2666
+ "destructive": false,
2667
+ "http_method": "POST",
2668
+ "schema": {
2669
+ "type": "object",
2670
+ "additionalProperties": false,
2671
+ "properties": {
2672
+ "basket_id": {
2673
+ "type": "integer",
2674
+ "minimum": 1,
2675
+ "maximum": 9007199254740991,
2676
+ "description": "BasketID from keyword-lists."
2677
+ },
2678
+ "owner_id": {
2679
+ "type": "integer",
2680
+ "minimum": 1,
2681
+ "maximum": 9007199254740991,
2682
+ "description": "Owner.ID from keyword-lists, including shared lists."
2683
+ },
2684
+ "page": {
2685
+ "type": "integer",
2686
+ "minimum": 1,
2687
+ "default": 1
2688
+ },
2689
+ "page_size": {
2690
+ "type": "integer",
2691
+ "minimum": 1,
2692
+ "maximum": 1e3,
2693
+ "default": 100
2694
+ },
2695
+ "sort_field": {
2696
+ "type": "string",
2697
+ "minLength": 1,
2698
+ "default": "phrase"
2699
+ },
2700
+ "descending": {
2701
+ "type": "boolean",
2702
+ "default": true
2703
+ },
2704
+ "filters": {
2705
+ "type": "object",
2706
+ "description": "Keyword Strategy Builder Filter object. Unspecified fields default to empty arrays.",
2707
+ "properties": {
2708
+ "ClusterIDs": { "type": "array" },
2709
+ "Databases": { "type": "array" },
2710
+ "Phrase": { "type": "array" },
2711
+ "CompetitionLevel": { "type": "array" },
2712
+ "Cpc": { "type": "array" },
2713
+ "Difficulty": { "type": "array" },
2714
+ "SERPFeatures": { "type": "array" },
2715
+ "Volume": { "type": "array" },
2716
+ "ClickPotential": { "type": "array" },
2717
+ "Tags": { "type": "array" },
2718
+ "Intents": { "type": "array" }
2719
+ },
2720
+ "additionalProperties": false,
2721
+ "default": {}
2722
+ }
2723
+ },
2724
+ "required": ["basket_id", "owner_id"]
2725
+ }
2726
+ },
2727
+ keyword_list_summary: {
2728
+ "method": "baskets.KeywordsGetSummary",
2729
+ "description": "Read keyword totals, volume and difficulty for the selected filters.",
2730
+ "transport": "kwm",
2731
+ "total_method": "",
2732
+ "web_report": "",
2733
+ "mutation": false,
2734
+ "destructive": false,
2735
+ "http_method": "POST",
2736
+ "schema": {
2737
+ "type": "object",
2738
+ "additionalProperties": false,
2739
+ "properties": {
2740
+ "basket_id": {
2741
+ "type": "integer",
2742
+ "minimum": 1,
2743
+ "maximum": 9007199254740991,
2744
+ "description": "BasketID from keyword-lists."
2745
+ },
2746
+ "owner_id": {
2747
+ "type": "integer",
2748
+ "minimum": 1,
2749
+ "maximum": 9007199254740991,
2750
+ "description": "Owner.ID from keyword-lists, including shared lists."
2751
+ },
2752
+ "filters": {
2753
+ "type": "object",
2754
+ "description": "Keyword Strategy Builder Filter object. Unspecified fields default to empty arrays.",
2755
+ "properties": {
2756
+ "ClusterIDs": { "type": "array" },
2757
+ "Databases": { "type": "array" },
2758
+ "Phrase": { "type": "array" },
2759
+ "CompetitionLevel": { "type": "array" },
2760
+ "Cpc": { "type": "array" },
2761
+ "Difficulty": { "type": "array" },
2762
+ "SERPFeatures": { "type": "array" },
2763
+ "Volume": { "type": "array" },
2764
+ "ClickPotential": { "type": "array" },
2765
+ "Tags": { "type": "array" },
2766
+ "Intents": { "type": "array" }
2767
+ },
2768
+ "additionalProperties": false,
2769
+ "default": {}
2770
+ }
2771
+ },
2772
+ "required": ["basket_id", "owner_id"]
2773
+ }
2774
+ },
2775
+ keyword_list_import: {
2776
+ "method": "baskets.KeywordsImport",
2777
+ "description": "Import phrases into a regular keyword list. Account keyword limits apply.",
2778
+ "transport": "kwm",
2779
+ "total_method": "",
2780
+ "web_report": "",
2781
+ "mutation": true,
2782
+ "destructive": false,
2783
+ "http_method": "POST",
2784
+ "schema": {
2785
+ "type": "object",
2786
+ "additionalProperties": false,
2787
+ "properties": {
2788
+ "basket_id": {
2789
+ "type": "integer",
2790
+ "minimum": 1,
2791
+ "maximum": 9007199254740991,
2792
+ "description": "BasketID from keyword-lists."
2793
+ },
2794
+ "owner_id": {
2795
+ "type": "integer",
2796
+ "minimum": 1,
2797
+ "maximum": 9007199254740991,
2798
+ "description": "Owner.ID from keyword-lists, including shared lists."
2799
+ },
2800
+ "keywords": {
2801
+ "type": "array",
2802
+ "items": {
2803
+ "type": "string",
2804
+ "minLength": 1,
2805
+ "pattern": "\\S"
2806
+ },
2807
+ "minItems": 1,
2808
+ "uniqueItems": true
2809
+ },
2810
+ "database": {
2811
+ "type": "string",
2812
+ "pattern": "^[a-z]{2}(?:-[a-z]{2})?$",
2813
+ "default": "us"
2814
+ },
2815
+ "tags": {
2816
+ "type": "array",
2817
+ "items": {
2818
+ "type": "string",
2819
+ "minLength": 1,
2820
+ "pattern": "\\S"
2821
+ },
2822
+ "uniqueItems": true,
2823
+ "default": []
2824
+ },
2825
+ "confirm": {
2826
+ "type": "boolean",
2827
+ "default": false,
2828
+ "description": "Confirm this account mutation."
2829
+ },
2830
+ "dry_run": {
2831
+ "type": "boolean",
2832
+ "default": false,
2833
+ "description": "Preview without authentication or network access."
2834
+ }
2835
+ },
2836
+ "required": [
2837
+ "basket_id",
2838
+ "owner_id",
2839
+ "keywords"
2840
+ ]
2841
+ }
2842
+ },
2843
+ keyword_list_delete_keywords: {
2844
+ "method": "baskets.KeywordsDeleteByIDs",
2845
+ "description": "Delete selected phrases from a keyword list. Returns an undo ID.",
2846
+ "transport": "kwm",
2847
+ "total_method": "",
2848
+ "web_report": "",
2849
+ "mutation": true,
2850
+ "destructive": true,
2851
+ "http_method": "POST",
2852
+ "schema": {
2853
+ "type": "object",
2854
+ "additionalProperties": false,
2855
+ "properties": {
2856
+ "basket_id": {
2857
+ "type": "integer",
2858
+ "minimum": 1,
2859
+ "maximum": 9007199254740991,
2860
+ "description": "BasketID from keyword-lists."
2861
+ },
2862
+ "owner_id": {
2863
+ "type": "integer",
2864
+ "minimum": 1,
2865
+ "maximum": 9007199254740991,
2866
+ "description": "Owner.ID from keyword-lists, including shared lists."
2867
+ },
2868
+ "keywords": {
2869
+ "type": "array",
2870
+ "items": {
2871
+ "type": "string",
2872
+ "minLength": 1,
2873
+ "pattern": "\\S"
2874
+ },
2875
+ "minItems": 1,
2876
+ "uniqueItems": true
2877
+ },
2878
+ "database": {
2879
+ "type": "string",
2880
+ "pattern": "^[a-z]{2}(?:-[a-z]{2})?$",
2881
+ "default": "us"
2882
+ },
2883
+ "confirm": {
2884
+ "type": "boolean",
2885
+ "default": false,
2886
+ "description": "Confirm this account mutation."
2887
+ },
2888
+ "dry_run": {
2889
+ "type": "boolean",
2890
+ "default": false,
2891
+ "description": "Preview without authentication or network access."
2892
+ }
2893
+ },
2894
+ "required": [
2895
+ "basket_id",
2896
+ "owner_id",
2897
+ "keywords"
2898
+ ]
2899
+ }
2900
+ },
2901
+ keyword_list_undo_delete: {
2902
+ "method": "baskets.KeywordsDeleteUndo",
2903
+ "description": "Restore a keyword deletion using its returned UndoID.",
2904
+ "transport": "kwm",
2905
+ "total_method": "",
2906
+ "web_report": "",
2907
+ "mutation": true,
2908
+ "destructive": false,
2909
+ "http_method": "POST",
2910
+ "schema": {
2911
+ "type": "object",
2912
+ "additionalProperties": false,
2913
+ "properties": {
2914
+ "undo_id": {
2915
+ "type": "string",
2916
+ "minLength": 1
2917
+ },
2918
+ "confirm": {
2919
+ "type": "boolean",
2920
+ "default": false,
2921
+ "description": "Confirm this account mutation."
2922
+ },
2923
+ "dry_run": {
2924
+ "type": "boolean",
2925
+ "default": false,
2926
+ "description": "Preview without authentication or network access."
2927
+ }
2928
+ },
2929
+ "required": ["undo_id"]
2930
+ }
2931
+ },
2932
+ keyword_list_update_metrics: {
2933
+ "method": "baskets.KeywordsRequestUpdateByIDs",
2934
+ "description": "Request fresh metrics for selected phrases. Consumes the update allowance.",
2935
+ "transport": "kwm",
2936
+ "total_method": "",
2937
+ "web_report": "",
2938
+ "mutation": true,
2939
+ "destructive": false,
2940
+ "http_method": "POST",
2941
+ "schema": {
2942
+ "type": "object",
2943
+ "additionalProperties": false,
2944
+ "properties": {
2945
+ "basket_id": {
2946
+ "type": "integer",
2947
+ "minimum": 1,
2948
+ "maximum": 9007199254740991,
2949
+ "description": "BasketID from keyword-lists."
2950
+ },
2951
+ "owner_id": {
2952
+ "type": "integer",
2953
+ "minimum": 1,
2954
+ "maximum": 9007199254740991,
2955
+ "description": "Owner.ID from keyword-lists, including shared lists."
2956
+ },
2957
+ "keywords": {
2958
+ "type": "array",
2959
+ "items": {
2960
+ "type": "string",
2961
+ "minLength": 1,
2962
+ "pattern": "\\S"
2963
+ },
2964
+ "minItems": 1,
2965
+ "uniqueItems": true
2966
+ },
2967
+ "database": {
2968
+ "type": "string",
2969
+ "pattern": "^[a-z]{2}(?:-[a-z]{2})?$",
2970
+ "default": "us"
2971
+ },
2972
+ "confirm": {
2973
+ "type": "boolean",
2974
+ "default": false,
2975
+ "description": "Confirm this account mutation."
2976
+ },
2977
+ "dry_run": {
2978
+ "type": "boolean",
2979
+ "default": false,
2980
+ "description": "Preview without authentication or network access."
2981
+ }
2982
+ },
2983
+ "required": [
2984
+ "basket_id",
2985
+ "owner_id",
2986
+ "keywords"
2987
+ ]
2988
+ }
2989
+ },
2990
+ keyword_list_tags: {
2991
+ "method": "baskets.GetBasketTags",
2992
+ "description": "Read keyword tags and their usage in a list.",
2993
+ "transport": "kwm",
2994
+ "total_method": "",
2995
+ "web_report": "",
2996
+ "mutation": false,
2997
+ "destructive": false,
2998
+ "http_method": "POST",
2999
+ "schema": {
3000
+ "type": "object",
3001
+ "additionalProperties": false,
3002
+ "properties": {
3003
+ "basket_id": {
3004
+ "type": "integer",
3005
+ "minimum": 1,
3006
+ "maximum": 9007199254740991,
3007
+ "description": "BasketID from keyword-lists."
3008
+ },
3009
+ "owner_id": {
3010
+ "type": "integer",
3011
+ "minimum": 1,
3012
+ "maximum": 9007199254740991,
3013
+ "description": "Owner.ID from keyword-lists, including shared lists."
3014
+ }
3015
+ },
3016
+ "required": ["basket_id", "owner_id"]
3017
+ }
3018
+ },
3019
+ keyword_list_add_tags: {
3020
+ "method": "baskets.KeywordsAddTags",
3021
+ "description": "Add tags to selected phrases.",
3022
+ "transport": "kwm",
3023
+ "total_method": "",
3024
+ "web_report": "",
3025
+ "mutation": true,
3026
+ "destructive": false,
3027
+ "http_method": "POST",
3028
+ "schema": {
3029
+ "type": "object",
3030
+ "additionalProperties": false,
3031
+ "properties": {
3032
+ "basket_id": {
3033
+ "type": "integer",
3034
+ "minimum": 1,
3035
+ "maximum": 9007199254740991,
3036
+ "description": "BasketID from keyword-lists."
3037
+ },
3038
+ "owner_id": {
3039
+ "type": "integer",
3040
+ "minimum": 1,
3041
+ "maximum": 9007199254740991,
3042
+ "description": "Owner.ID from keyword-lists, including shared lists."
3043
+ },
3044
+ "keywords": {
3045
+ "type": "array",
3046
+ "items": {
3047
+ "type": "string",
3048
+ "minLength": 1,
3049
+ "pattern": "\\S"
3050
+ },
3051
+ "minItems": 1,
3052
+ "uniqueItems": true
3053
+ },
3054
+ "database": {
3055
+ "type": "string",
3056
+ "pattern": "^[a-z]{2}(?:-[a-z]{2})?$",
3057
+ "default": "us"
3058
+ },
3059
+ "tags": {
3060
+ "type": "array",
3061
+ "items": {
3062
+ "type": "string",
3063
+ "minLength": 1,
3064
+ "pattern": "\\S"
3065
+ },
3066
+ "uniqueItems": true,
3067
+ "default": [],
3068
+ "minItems": 1
3069
+ },
3070
+ "confirm": {
3071
+ "type": "boolean",
3072
+ "default": false,
3073
+ "description": "Confirm this account mutation."
3074
+ },
3075
+ "dry_run": {
3076
+ "type": "boolean",
3077
+ "default": false,
3078
+ "description": "Preview without authentication or network access."
3079
+ }
3080
+ },
3081
+ "required": [
3082
+ "basket_id",
3083
+ "owner_id",
3084
+ "keywords",
3085
+ "tags"
3086
+ ]
3087
+ }
3088
+ },
3089
+ keyword_list_remove_tags: {
3090
+ "method": "baskets.KeywordsDeleteTags",
3091
+ "description": "Remove tags from selected phrases.",
3092
+ "transport": "kwm",
3093
+ "total_method": "",
3094
+ "web_report": "",
3095
+ "mutation": true,
3096
+ "destructive": true,
3097
+ "http_method": "POST",
3098
+ "schema": {
3099
+ "type": "object",
3100
+ "additionalProperties": false,
3101
+ "properties": {
3102
+ "basket_id": {
3103
+ "type": "integer",
3104
+ "minimum": 1,
3105
+ "maximum": 9007199254740991,
3106
+ "description": "BasketID from keyword-lists."
3107
+ },
3108
+ "owner_id": {
3109
+ "type": "integer",
3110
+ "minimum": 1,
3111
+ "maximum": 9007199254740991,
3112
+ "description": "Owner.ID from keyword-lists, including shared lists."
3113
+ },
3114
+ "keywords": {
3115
+ "type": "array",
3116
+ "items": {
3117
+ "type": "string",
3118
+ "minLength": 1,
3119
+ "pattern": "\\S"
3120
+ },
3121
+ "minItems": 1,
3122
+ "uniqueItems": true
3123
+ },
3124
+ "database": {
3125
+ "type": "string",
3126
+ "pattern": "^[a-z]{2}(?:-[a-z]{2})?$",
3127
+ "default": "us"
3128
+ },
3129
+ "tags": {
3130
+ "type": "array",
3131
+ "items": {
3132
+ "type": "string",
3133
+ "minLength": 1,
3134
+ "pattern": "\\S"
3135
+ },
3136
+ "uniqueItems": true,
3137
+ "default": [],
3138
+ "minItems": 1
3139
+ },
3140
+ "confirm": {
3141
+ "type": "boolean",
3142
+ "default": false,
3143
+ "description": "Confirm this account mutation."
3144
+ },
3145
+ "dry_run": {
3146
+ "type": "boolean",
3147
+ "default": false,
3148
+ "description": "Preview without authentication or network access."
3149
+ }
3150
+ },
3151
+ "required": [
3152
+ "basket_id",
3153
+ "owner_id",
3154
+ "keywords",
3155
+ "tags"
3156
+ ]
3157
+ }
3158
+ },
3159
+ keyword_list_cluster: {
3160
+ "method": "baskets.RunClusterization",
3161
+ "description": "Start clustering a keyword list. Consumes the clustering allowance.",
3162
+ "transport": "kwm",
3163
+ "total_method": "",
3164
+ "web_report": "",
3165
+ "mutation": true,
3166
+ "destructive": false,
3167
+ "http_method": "POST",
3168
+ "schema": {
3169
+ "type": "object",
3170
+ "additionalProperties": false,
3171
+ "properties": {
3172
+ "basket_id": {
3173
+ "type": "integer",
3174
+ "minimum": 1,
3175
+ "maximum": 9007199254740991,
3176
+ "description": "BasketID from keyword-lists."
3177
+ },
3178
+ "owner_id": {
3179
+ "type": "integer",
3180
+ "minimum": 1,
3181
+ "maximum": 9007199254740991,
3182
+ "description": "Owner.ID from keyword-lists, including shared lists."
3183
+ },
3184
+ "confirm": {
3185
+ "type": "boolean",
3186
+ "default": false,
3187
+ "description": "Confirm this account mutation."
3188
+ },
3189
+ "dry_run": {
3190
+ "type": "boolean",
3191
+ "default": false,
3192
+ "description": "Preview without authentication or network access."
3193
+ }
3194
+ },
3195
+ "required": ["basket_id", "owner_id"]
3196
+ }
3197
+ },
3198
+ keyword_list_cluster_forecast: {
3199
+ "method": "baskets.BasketGetClusterizationForecast",
3200
+ "description": "Read the clustering forecast for a keyword list.",
3201
+ "transport": "kwm",
3202
+ "total_method": "",
3203
+ "web_report": "",
3204
+ "mutation": false,
3205
+ "destructive": false,
3206
+ "http_method": "POST",
3207
+ "schema": {
3208
+ "type": "object",
3209
+ "additionalProperties": false,
3210
+ "properties": {
3211
+ "basket_id": {
3212
+ "type": "integer",
3213
+ "minimum": 1,
3214
+ "maximum": 9007199254740991,
3215
+ "description": "BasketID from keyword-lists."
3216
+ },
3217
+ "owner_id": {
3218
+ "type": "integer",
3219
+ "minimum": 1,
3220
+ "maximum": 9007199254740991,
3221
+ "description": "Owner.ID from keyword-lists, including shared lists."
3222
+ }
3223
+ },
3224
+ "required": ["basket_id", "owner_id"]
3225
+ }
3226
+ },
3227
+ keyword_list_cluster_status: {
3228
+ "method": "baskets.BasketGetClusterizationStatuses",
3229
+ "description": "Read the current clustering status for a keyword list.",
3230
+ "transport": "kwm",
3231
+ "total_method": "",
3232
+ "web_report": "",
3233
+ "mutation": false,
3234
+ "destructive": false,
3235
+ "http_method": "POST",
3236
+ "schema": {
3237
+ "type": "object",
3238
+ "additionalProperties": false,
3239
+ "properties": {
3240
+ "basket_id": {
3241
+ "type": "integer",
3242
+ "minimum": 1,
3243
+ "maximum": 9007199254740991,
3244
+ "description": "BasketID from keyword-lists."
3245
+ },
3246
+ "owner_id": {
3247
+ "type": "integer",
3248
+ "minimum": 1,
3249
+ "maximum": 9007199254740991,
3250
+ "description": "Owner.ID from keyword-lists, including shared lists."
3251
+ }
3252
+ },
3253
+ "required": ["basket_id", "owner_id"]
3254
+ }
3255
+ },
3256
+ keyword_strategy_create: {
3257
+ "method": "baskets.BasketCreate",
3258
+ "description": "Generate a structured keyword strategy from a domain or seed phrases. Consumes the clustering allowance.",
3259
+ "transport": "kwm",
3260
+ "total_method": "",
3261
+ "web_report": "",
3262
+ "mutation": true,
3263
+ "destructive": false,
3264
+ "http_method": "POST",
3265
+ "schema": {
3266
+ "type": "object",
3267
+ "additionalProperties": false,
3268
+ "properties": {
3269
+ "name": {
3270
+ "type": "string",
3271
+ "minLength": 1,
3272
+ "maxLength": 255,
3273
+ "pattern": "\\S"
3274
+ },
3275
+ "domain": {
3276
+ "type": "string",
3277
+ "minLength": 1,
3278
+ "maxLength": 253,
3279
+ "pattern": "^(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z]{2,63}$",
3280
+ "description": "Domain or subdomain, without protocol or path."
3281
+ },
3282
+ "database": {
3283
+ "type": "string",
3284
+ "pattern": "^[a-z]{2}(?:-[a-z]{2})?$",
3285
+ "default": "us"
3286
+ },
3287
+ "seed_keywords": {
3288
+ "type": "array",
3289
+ "items": {
3290
+ "type": "string",
3291
+ "minLength": 1,
3292
+ "pattern": "\\S"
3293
+ },
3294
+ "default": [],
3295
+ "uniqueItems": true
3296
+ },
3297
+ "competitors": {
3298
+ "type": "array",
3299
+ "items": {
3300
+ "type": "string",
3301
+ "minLength": 1,
3302
+ "maxLength": 253,
3303
+ "pattern": "^(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z]{2,63}$",
3304
+ "description": "Domain or subdomain, without protocol or path."
3305
+ },
3306
+ "default": [],
3307
+ "uniqueItems": true
3308
+ },
3309
+ "confirm": {
3310
+ "type": "boolean",
3311
+ "default": false,
3312
+ "description": "Confirm this account mutation."
3313
+ },
3314
+ "dry_run": {
3315
+ "type": "boolean",
3316
+ "default": false,
3317
+ "description": "Preview without authentication or network access."
3318
+ }
3319
+ },
3320
+ "required": ["name"],
3321
+ "anyOf": [{ "required": ["domain"] }, {
3322
+ "required": ["seed_keywords"],
3323
+ "properties": { "seed_keywords": { "minItems": 1 } }
3324
+ }]
3325
+ }
2450
3326
  }
2451
3327
  };
2452
3328
 
@@ -2464,6 +3340,7 @@ const reports = report_catalog_default;
2464
3340
  /** Fixed request shapes observed in semrush-web-mcp. No arbitrary RPC or URL input. */
2465
3341
  function reportParameters(definition, q) {
2466
3342
  const family = definition.transport;
3343
+ if (family === "kwm") return keywordListParameters(definition, q);
2467
3344
  if (family === "project_web") return projectParameters(definition, q);
2468
3345
  if (family === "magic") return magicParameters(definition, q);
2469
3346
  if (family === "keyword") return keywordParameters(definition, q);
@@ -2720,8 +3597,13 @@ function projectParameters(definition, q) {
2720
3597
  if (definition.http_method === "DELETE") return {};
2721
3598
  return Object.fromEntries(Object.entries(q).filter(([key]) => key !== "confirm" && key !== "dry_run"));
2722
3599
  }
2723
- /** Paths come only from the catalog; folder IDs pass the decimal-string input schema. */
2724
- function projectRequest(definition, query) {
3600
+ /** Fixed public request plans. RPC credentials enter only inside the browser layer. */
3601
+ function webRequest(definition, query) {
3602
+ if (definition.transport === "kwm") return {
3603
+ method: "POST",
3604
+ path: "/kwm/rpc",
3605
+ body: rpcBody(definition.method, reportParameters(definition, query))
3606
+ };
2725
3607
  return {
2726
3608
  method: definition.http_method,
2727
3609
  path: definition.method.replace("{folder_id}", String(query.folder_id)),
@@ -2732,9 +3614,110 @@ function previewMutation(name, definition, query) {
2732
3614
  return definition.mutation && query.dry_run === true ? {
2733
3615
  dry_run: true,
2734
3616
  report: name,
2735
- request: projectRequest(definition, query)
3617
+ request: webRequest(definition, query)
2736
3618
  } : void 0;
2737
3619
  }
3620
+ /** One JSON-RPC envelope for execution and credential-free previews. */
3621
+ function rpcBody(method, params) {
3622
+ return {
3623
+ id: 1,
3624
+ jsonrpc: "2.0",
3625
+ method,
3626
+ params
3627
+ };
3628
+ }
3629
+ /** Keyword Strategy Builder's casing differs from the keyword-research API. */
3630
+ function keywordListParameters(definition, q) {
3631
+ const method = definition.method;
3632
+ if (method === "user.GetInfo") return {};
3633
+ if (method === "baskets.BasketsGetAll") return {
3634
+ Order: {
3635
+ Direction: q.descending ? 1 : 0,
3636
+ Field: q.sort_field ?? null
3637
+ },
3638
+ Page: {
3639
+ Number: q.page ?? null,
3640
+ Size: q.page_size ?? null
3641
+ },
3642
+ Filter: {
3643
+ Name: q.name_filter ?? "",
3644
+ OwningType: q.ownership ?? 7
3645
+ }
3646
+ };
3647
+ if (method === "baskets.BasketCreate") return {
3648
+ Name: q.name ?? null,
3649
+ Clusterization: "seed_keywords" in q ? {
3650
+ Databases: [q.database ?? "us"],
3651
+ Domain: q.domain ?? "",
3652
+ Competitors: q.competitors ?? [],
3653
+ SeedPhrases: q.seed_keywords ?? []
3654
+ } : null
3655
+ };
3656
+ if (method === "baskets.BasketDelete") return { BasketIDs: [q.basket_id ?? null] };
3657
+ if (method === "baskets.KeywordsDeleteUndo") return { UndoID: q.undo_id ?? null };
3658
+ const shared = {
3659
+ BasketID: q.basket_id ?? null,
3660
+ OwnerID: q.owner_id ?? null
3661
+ };
3662
+ if (method === "baskets.BasketGetClusterizationStatuses") return { BasketIDs: [shared] };
3663
+ if (method === "baskets.BasketRename") return {
3664
+ ...shared,
3665
+ Name: q.name ?? null
3666
+ };
3667
+ if ("keywords" in q) {
3668
+ const phrases = Array.isArray(q.keywords) ? q.keywords : [];
3669
+ if (method === "baskets.KeywordsImport") return {
3670
+ ...shared,
3671
+ Keywords: phrases.map((Phrase) => ({
3672
+ Phrase,
3673
+ Database: q.database ?? "us",
3674
+ Tags: q.tags ?? []
3675
+ }))
3676
+ };
3677
+ const params = {
3678
+ ...shared,
3679
+ KeywordIDs: phrases.map((Phrase) => ({
3680
+ Phrase,
3681
+ Database: q.database ?? "us"
3682
+ }))
3683
+ };
3684
+ if ("tags" in q) params.Tags = q.tags ?? [];
3685
+ return params;
3686
+ }
3687
+ if ("filters" in q) {
3688
+ const filter = Object.fromEntries([
3689
+ "ClusterIDs",
3690
+ "Databases",
3691
+ "Phrase",
3692
+ "CompetitionLevel",
3693
+ "Cpc",
3694
+ "Difficulty",
3695
+ "SERPFeatures",
3696
+ "Volume",
3697
+ "ClickPotential",
3698
+ "Tags",
3699
+ "Intents"
3700
+ ].map((key) => [key, []]));
3701
+ Object.assign(filter, q.filters);
3702
+ if (method === "baskets.KeywordsGetSummary") return {
3703
+ ...shared,
3704
+ Filter: filter
3705
+ };
3706
+ return {
3707
+ ...shared,
3708
+ Filter: filter,
3709
+ Order: {
3710
+ Direction: q.descending ? 1 : 0,
3711
+ Field: q.sort_field ?? null
3712
+ },
3713
+ Page: {
3714
+ Number: q.page ?? null,
3715
+ Size: q.page_size ?? null
3716
+ }
3717
+ };
3718
+ }
3719
+ return shared;
3720
+ }
2738
3721
 
2739
3722
  //#endregion
2740
3723
  //#region src/errors.ts
@@ -2747,5 +3730,5 @@ var ReportError = class extends Schema.TaggedError()("ReportError", { message: S
2747
3730
  var UsageError = class extends Schema.TaggedError()("UsageError", { message: Schema.String }) {};
2748
3731
 
2749
3732
  //#endregion
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
3733
+ export { reportParameters as a, version as c, previewMutation as i, webRequest as l, SessionError as n, reports as o, UsageError as r, rpcBody as s, ReportError as t };
3734
+ //# sourceMappingURL=errors-CU9T4acd.js.map