|
803 | 803 | "$ref": "#/components/schemas/PolicyResponse" |
804 | 804 | }, |
805 | 805 | "example": { |
806 | | - "source_types": { |
| 806 | + "sourceTypes": { |
807 | 807 | "public_repos": { "enabled": true }, |
808 | 808 | "private_sources": { "enabled": true }, |
809 | 809 | "confluence": { "enabled": false }, |
810 | 810 | "uploaded_files": { "enabled": true }, |
811 | 811 | "websites": { "enabled": true }, |
812 | 812 | "llmstxt": { "enabled": true } |
813 | 813 | }, |
814 | | - "library_filters": { |
| 814 | + "libraryFilters": { |
815 | 815 | "mode": "quality", |
816 | 816 | "quality": { |
817 | | - "require_verified": false, |
818 | | - "min_trust_score": null, |
819 | | - "max_age_days": 365, |
820 | | - "blocked_libraries": ["/org/repo"], |
821 | | - "repo_filters": { "min_stars": 100 } |
| 817 | + "requireVerified": false, |
| 818 | + "minTrustScore": null, |
| 819 | + "maxAgeDays": 365, |
| 820 | + "blockedLibraries": ["/org/repo"], |
| 821 | + "repoFilters": { "minStars": 100 } |
822 | 822 | }, |
823 | 823 | "select": { |
824 | | - "allowed_libraries": [] |
| 824 | + "allowedLibraries": [] |
825 | 825 | } |
826 | 826 | }, |
827 | | - "accessible_library_count": 4521 |
| 827 | + "accessibleLibraryCount": 4521 |
828 | 828 | } |
829 | 829 | } |
830 | 830 | } |
|
853 | 853 | }, |
854 | 854 | "patch": { |
855 | 855 | "summary": "Update teamspace policies", |
856 | | - "description": "Incrementally update policy configuration for the teamspace associated with the API key. Only the fields you include in the request body are modified — omitted fields remain unchanged. For source types, use `enable`/`disable` arrays (both allowed if no overlap). For library lists, use `add`/`remove` objects or `clear: true` to remove all. Requires owner or admin role.", |
| 856 | + "description": "Incrementally update policy configuration for the teamspace associated with the API key. Only the fields you include in the request body are modified — omitted fields remain unchanged. For source types, use `enable`/`disable` arrays (both allowed if no overlap). For library lists, use `add`/`remove` objects or `clear: true` to remove all. Requires owner or admin role. All field names use camelCase.", |
857 | 857 | "operationId": "updatePolicies", |
858 | 858 | "tags": ["Policies"], |
859 | 859 | "requestBody": { |
|
867 | 867 | "disableSourceType": { |
868 | 868 | "summary": "Disable a source type", |
869 | 869 | "value": { |
870 | | - "source_types": { |
| 870 | + "sourceTypes": { |
871 | 871 | "disable": ["websites"] |
872 | 872 | } |
873 | 873 | } |
874 | 874 | }, |
875 | 875 | "setQualityFilters": { |
876 | 876 | "summary": "Set quality filter thresholds", |
877 | 877 | "value": { |
878 | | - "library_filters": { |
| 878 | + "libraryFilters": { |
879 | 879 | "quality": { |
880 | | - "require_verified": true, |
881 | | - "min_trust_score": 4, |
882 | | - "repo_filters": { "min_stars": 1000 } |
| 880 | + "requireVerified": true, |
| 881 | + "minTrustScore": 4, |
| 882 | + "repoFilters": { "minStars": 1000 } |
| 883 | + } |
| 884 | + } |
| 885 | + } |
| 886 | + }, |
| 887 | + "setWebsiteFilters": { |
| 888 | + "summary": "Set website quality filters", |
| 889 | + "value": { |
| 890 | + "libraryFilters": { |
| 891 | + "quality": { |
| 892 | + "websiteFilters": { |
| 893 | + "minBacklinks": 100, |
| 894 | + "minReferringDomains": 10, |
| 895 | + "minOrganicTraffic": 1000 |
| 896 | + } |
883 | 897 | } |
884 | 898 | } |
885 | 899 | } |
886 | 900 | }, |
887 | 901 | "blockLibrary": { |
888 | 902 | "summary": "Add a library to the blocked list", |
889 | 903 | "value": { |
890 | | - "library_filters": { |
| 904 | + "libraryFilters": { |
891 | 905 | "quality": { |
892 | | - "blocked_libraries": { "add": ["/org/repo"] } |
| 906 | + "blockedLibraries": { "add": ["/org/repo"] } |
893 | 907 | } |
894 | 908 | } |
895 | 909 | } |
896 | 910 | }, |
897 | 911 | "clearAllowedLibraries": { |
898 | 912 | "summary": "Clear all allowed libraries", |
899 | 913 | "value": { |
900 | | - "library_filters": { |
| 914 | + "libraryFilters": { |
901 | 915 | "select": { |
902 | | - "allowed_libraries": { "clear": true } |
| 916 | + "allowedLibraries": { "clear": true } |
903 | 917 | } |
904 | 918 | } |
905 | 919 | } |
906 | 920 | }, |
907 | 921 | "combined": { |
908 | 922 | "summary": "Multiple changes in one request", |
909 | 923 | "value": { |
910 | | - "source_types": { |
| 924 | + "sourceTypes": { |
911 | 925 | "enable": ["websites"], |
912 | 926 | "disable": ["confluence"] |
913 | 927 | }, |
914 | | - "library_filters": { |
| 928 | + "libraryFilters": { |
915 | 929 | "mode": "quality", |
916 | 930 | "quality": { |
917 | | - "min_trust_score": 4, |
918 | | - "max_age_days": 365, |
919 | | - "blocked_libraries": { |
| 931 | + "minTrustScore": 4, |
| 932 | + "maxAgeDays": 365, |
| 933 | + "blockedLibraries": { |
920 | 934 | "add": ["/org/repo"], |
921 | 935 | "remove": ["/org/old-repo"] |
922 | 936 | }, |
923 | | - "repo_filters": { "min_stars": 100 } |
| 937 | + "repoFilters": { "minStars": 100 }, |
| 938 | + "websiteFilters": { "minBacklinks": 100 } |
924 | 939 | } |
925 | 940 | } |
926 | 941 | } |
|
1419 | 1434 | "type": "object", |
1420 | 1435 | "description": "Complete teamspace policy configuration", |
1421 | 1436 | "properties": { |
1422 | | - "source_types": { |
| 1437 | + "sourceTypes": { |
1423 | 1438 | "type": "object", |
1424 | 1439 | "description": "Access settings for each documentation source type", |
1425 | 1440 | "properties": { |
|
1432 | 1447 | }, |
1433 | 1448 | "required": ["public_repos", "private_sources", "confluence", "uploaded_files", "websites", "llmstxt"] |
1434 | 1449 | }, |
1435 | | - "library_filters": { |
| 1450 | + "libraryFilters": { |
1436 | 1451 | "type": "object", |
1437 | 1452 | "description": "Library access filters. Mode determines which sub-object is active.", |
1438 | 1453 | "properties": { |
|
1446 | 1461 | "type": "object", |
1447 | 1462 | "description": "Quality-mode settings (active when mode is 'quality')", |
1448 | 1463 | "properties": { |
1449 | | - "require_verified": { "type": "boolean", "description": "Restrict to verified libraries only" }, |
1450 | | - "min_trust_score": { "type": "integer", "nullable": true, "description": "Minimum trust score, 0-10" }, |
1451 | | - "max_age_days": { "type": "integer", "nullable": true, "description": "Maximum days since last update" }, |
1452 | | - "blocked_libraries": { "type": "array", "items": { "type": "string" }, "description": "Libraries excluded from results" }, |
1453 | | - "repo_filters": { |
| 1464 | + "requireVerified": { "type": "boolean", "description": "Restrict to verified libraries only" }, |
| 1465 | + "minTrustScore": { "type": "integer", "nullable": true, "description": "Minimum trust score, 0-10" }, |
| 1466 | + "maxAgeDays": { "type": "integer", "nullable": true, "description": "Maximum days since last update" }, |
| 1467 | + "blockedLibraries": { "type": "array", "items": { "type": "string" }, "description": "Libraries excluded from results" }, |
| 1468 | + "repoFilters": { |
1454 | 1469 | "type": "object", |
1455 | 1470 | "description": "Repo-specific quality filters", |
1456 | 1471 | "properties": { |
1457 | | - "min_stars": { "type": "integer", "nullable": true, "description": "Minimum GitHub stars required" } |
| 1472 | + "minStars": { "type": "integer", "nullable": true, "description": "Minimum GitHub stars required" } |
1458 | 1473 | }, |
1459 | | - "required": ["min_stars"] |
| 1474 | + "required": ["minStars"] |
| 1475 | + }, |
| 1476 | + "websiteFilters": { |
| 1477 | + "type": "object", |
| 1478 | + "description": "Website-specific quality filters", |
| 1479 | + "properties": { |
| 1480 | + "minBacklinks": { "type": "integer", "nullable": true, "description": "Minimum number of backlinks required" }, |
| 1481 | + "minReferringDomains": { "type": "integer", "nullable": true, "description": "Minimum number of referring domains required" }, |
| 1482 | + "minOrganicTraffic": { "type": "integer", "nullable": true, "description": "Minimum monthly organic traffic required" } |
| 1483 | + }, |
| 1484 | + "required": ["minBacklinks", "minReferringDomains", "minOrganicTraffic"] |
1460 | 1485 | } |
1461 | 1486 | }, |
1462 | | - "required": ["require_verified", "min_trust_score", "max_age_days", "blocked_libraries", "repo_filters"] |
| 1487 | + "required": ["requireVerified", "minTrustScore", "maxAgeDays", "blockedLibraries", "repoFilters", "websiteFilters"] |
1463 | 1488 | }, |
1464 | 1489 | "select": { |
1465 | 1490 | "type": "object", |
1466 | 1491 | "description": "Select-mode settings (active when mode is 'select')", |
1467 | 1492 | "properties": { |
1468 | | - "allowed_libraries": { "type": "array", "items": { "type": "string" }, "description": "Libraries explicitly allowed" } |
| 1493 | + "allowedLibraries": { "type": "array", "items": { "type": "string" }, "description": "Libraries explicitly allowed" } |
1469 | 1494 | }, |
1470 | | - "required": ["allowed_libraries"] |
| 1495 | + "required": ["allowedLibraries"] |
1471 | 1496 | } |
1472 | 1497 | }, |
1473 | 1498 | "required": ["mode", "quality", "select"] |
1474 | 1499 | }, |
1475 | | - "accessible_library_count": { |
| 1500 | + "accessibleLibraryCount": { |
1476 | 1501 | "type": "integer", |
1477 | 1502 | "description": "Number of public libraries currently accessible under these filters" |
1478 | 1503 | } |
1479 | 1504 | }, |
1480 | | - "required": ["source_types", "library_filters", "accessible_library_count"] |
| 1505 | + "required": ["sourceTypes", "libraryFilters", "accessibleLibraryCount"] |
1481 | 1506 | }, |
1482 | 1507 | "ListOperation": { |
1483 | 1508 | "type": "object", |
|
1501 | 1526 | }, |
1502 | 1527 | "PatchPoliciesRequest": { |
1503 | 1528 | "type": "object", |
1504 | | - "description": "Incremental policy update. All fields are optional — only provided fields are modified. At least one of 'source_types' or 'library_filters' must be provided.", |
| 1529 | + "description": "Incremental policy update. All fields are optional — only provided fields are modified. At least one of 'sourceTypes' or 'libraryFilters' must be provided.", |
1505 | 1530 | "minProperties": 1, |
1506 | 1531 | "properties": { |
1507 | | - "source_types": { |
| 1532 | + "sourceTypes": { |
1508 | 1533 | "type": "object", |
1509 | 1534 | "description": "Enable or disable specific source types. Both can be provided in one request, but the same type cannot appear in both arrays.", |
1510 | 1535 | "properties": { |
|
1526 | 1551 | } |
1527 | 1552 | } |
1528 | 1553 | }, |
1529 | | - "library_filters": { |
| 1554 | + "libraryFilters": { |
1530 | 1555 | "type": "object", |
1531 | 1556 | "description": "Update library access filters.", |
1532 | 1557 | "properties": { |
|
1540 | 1565 | "type": "object", |
1541 | 1566 | "description": "Update quality-mode settings.", |
1542 | 1567 | "properties": { |
1543 | | - "require_verified": { "type": "boolean", "description": "Restrict to verified libraries only" }, |
1544 | | - "min_trust_score": { "type": "integer", "nullable": true, "minimum": 0, "maximum": 10, "description": "Minimum trust score, 0-10 (null to clear)" }, |
1545 | | - "max_age_days": { "type": "integer", "nullable": true, "minimum": 1, "description": "Maximum age in days (null to clear)" }, |
1546 | | - "blocked_libraries": { "$ref": "#/components/schemas/ListOperation" }, |
1547 | | - "repo_filters": { |
| 1568 | + "requireVerified": { "type": "boolean", "description": "Restrict to verified libraries only" }, |
| 1569 | + "minTrustScore": { "type": "integer", "nullable": true, "minimum": 0, "maximum": 10, "description": "Minimum trust score, 0-10 (null to clear)" }, |
| 1570 | + "maxAgeDays": { "type": "integer", "nullable": true, "minimum": 1, "description": "Maximum age in days (null to clear)" }, |
| 1571 | + "blockedLibraries": { "$ref": "#/components/schemas/ListOperation" }, |
| 1572 | + "repoFilters": { |
1548 | 1573 | "type": "object", |
1549 | 1574 | "description": "Update repo-specific quality filters.", |
1550 | 1575 | "properties": { |
1551 | | - "min_stars": { "type": "integer", "nullable": true, "minimum": 0, "description": "Minimum stars threshold (null to clear)" } |
| 1576 | + "minStars": { "type": "integer", "nullable": true, "minimum": 0, "description": "Minimum stars threshold (null to clear)" } |
| 1577 | + } |
| 1578 | + }, |
| 1579 | + "websiteFilters": { |
| 1580 | + "type": "object", |
| 1581 | + "description": "Update website-specific quality filters.", |
| 1582 | + "properties": { |
| 1583 | + "minBacklinks": { "type": "integer", "nullable": true, "minimum": 0, "description": "Minimum backlinks threshold (null to clear)" }, |
| 1584 | + "minReferringDomains": { "type": "integer", "nullable": true, "minimum": 0, "description": "Minimum referring domains threshold (null to clear)" }, |
| 1585 | + "minOrganicTraffic": { "type": "integer", "nullable": true, "minimum": 0, "description": "Minimum organic traffic threshold (null to clear)" } |
1552 | 1586 | } |
1553 | 1587 | } |
1554 | 1588 | } |
|
1557 | 1591 | "type": "object", |
1558 | 1592 | "description": "Update select-mode settings.", |
1559 | 1593 | "properties": { |
1560 | | - "allowed_libraries": { "$ref": "#/components/schemas/ListOperation" } |
| 1594 | + "allowedLibraries": { "$ref": "#/components/schemas/ListOperation" } |
1561 | 1595 | } |
1562 | 1596 | } |
1563 | 1597 | } |
|
0 commit comments