Skip to content

Commit 2273d52

Browse files
authored
docs: add website filters (upstash#2333)
1 parent b4f77af commit 2273d52

1 file changed

Lines changed: 83 additions & 49 deletions

File tree

docs/openapi.json

Lines changed: 83 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -803,28 +803,28 @@
803803
"$ref": "#/components/schemas/PolicyResponse"
804804
},
805805
"example": {
806-
"source_types": {
806+
"sourceTypes": {
807807
"public_repos": { "enabled": true },
808808
"private_sources": { "enabled": true },
809809
"confluence": { "enabled": false },
810810
"uploaded_files": { "enabled": true },
811811
"websites": { "enabled": true },
812812
"llmstxt": { "enabled": true }
813813
},
814-
"library_filters": {
814+
"libraryFilters": {
815815
"mode": "quality",
816816
"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 }
822822
},
823823
"select": {
824-
"allowed_libraries": []
824+
"allowedLibraries": []
825825
}
826826
},
827-
"accessible_library_count": 4521
827+
"accessibleLibraryCount": 4521
828828
}
829829
}
830830
}
@@ -853,7 +853,7 @@
853853
},
854854
"patch": {
855855
"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.",
857857
"operationId": "updatePolicies",
858858
"tags": ["Policies"],
859859
"requestBody": {
@@ -867,60 +867,75 @@
867867
"disableSourceType": {
868868
"summary": "Disable a source type",
869869
"value": {
870-
"source_types": {
870+
"sourceTypes": {
871871
"disable": ["websites"]
872872
}
873873
}
874874
},
875875
"setQualityFilters": {
876876
"summary": "Set quality filter thresholds",
877877
"value": {
878-
"library_filters": {
878+
"libraryFilters": {
879879
"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+
}
883897
}
884898
}
885899
}
886900
},
887901
"blockLibrary": {
888902
"summary": "Add a library to the blocked list",
889903
"value": {
890-
"library_filters": {
904+
"libraryFilters": {
891905
"quality": {
892-
"blocked_libraries": { "add": ["/org/repo"] }
906+
"blockedLibraries": { "add": ["/org/repo"] }
893907
}
894908
}
895909
}
896910
},
897911
"clearAllowedLibraries": {
898912
"summary": "Clear all allowed libraries",
899913
"value": {
900-
"library_filters": {
914+
"libraryFilters": {
901915
"select": {
902-
"allowed_libraries": { "clear": true }
916+
"allowedLibraries": { "clear": true }
903917
}
904918
}
905919
}
906920
},
907921
"combined": {
908922
"summary": "Multiple changes in one request",
909923
"value": {
910-
"source_types": {
924+
"sourceTypes": {
911925
"enable": ["websites"],
912926
"disable": ["confluence"]
913927
},
914-
"library_filters": {
928+
"libraryFilters": {
915929
"mode": "quality",
916930
"quality": {
917-
"min_trust_score": 4,
918-
"max_age_days": 365,
919-
"blocked_libraries": {
931+
"minTrustScore": 4,
932+
"maxAgeDays": 365,
933+
"blockedLibraries": {
920934
"add": ["/org/repo"],
921935
"remove": ["/org/old-repo"]
922936
},
923-
"repo_filters": { "min_stars": 100 }
937+
"repoFilters": { "minStars": 100 },
938+
"websiteFilters": { "minBacklinks": 100 }
924939
}
925940
}
926941
}
@@ -1419,7 +1434,7 @@
14191434
"type": "object",
14201435
"description": "Complete teamspace policy configuration",
14211436
"properties": {
1422-
"source_types": {
1437+
"sourceTypes": {
14231438
"type": "object",
14241439
"description": "Access settings for each documentation source type",
14251440
"properties": {
@@ -1432,7 +1447,7 @@
14321447
},
14331448
"required": ["public_repos", "private_sources", "confluence", "uploaded_files", "websites", "llmstxt"]
14341449
},
1435-
"library_filters": {
1450+
"libraryFilters": {
14361451
"type": "object",
14371452
"description": "Library access filters. Mode determines which sub-object is active.",
14381453
"properties": {
@@ -1446,38 +1461,48 @@
14461461
"type": "object",
14471462
"description": "Quality-mode settings (active when mode is 'quality')",
14481463
"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": {
14541469
"type": "object",
14551470
"description": "Repo-specific quality filters",
14561471
"properties": {
1457-
"min_stars": { "type": "integer", "nullable": true, "description": "Minimum GitHub stars required" }
1472+
"minStars": { "type": "integer", "nullable": true, "description": "Minimum GitHub stars required" }
14581473
},
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"]
14601485
}
14611486
},
1462-
"required": ["require_verified", "min_trust_score", "max_age_days", "blocked_libraries", "repo_filters"]
1487+
"required": ["requireVerified", "minTrustScore", "maxAgeDays", "blockedLibraries", "repoFilters", "websiteFilters"]
14631488
},
14641489
"select": {
14651490
"type": "object",
14661491
"description": "Select-mode settings (active when mode is 'select')",
14671492
"properties": {
1468-
"allowed_libraries": { "type": "array", "items": { "type": "string" }, "description": "Libraries explicitly allowed" }
1493+
"allowedLibraries": { "type": "array", "items": { "type": "string" }, "description": "Libraries explicitly allowed" }
14691494
},
1470-
"required": ["allowed_libraries"]
1495+
"required": ["allowedLibraries"]
14711496
}
14721497
},
14731498
"required": ["mode", "quality", "select"]
14741499
},
1475-
"accessible_library_count": {
1500+
"accessibleLibraryCount": {
14761501
"type": "integer",
14771502
"description": "Number of public libraries currently accessible under these filters"
14781503
}
14791504
},
1480-
"required": ["source_types", "library_filters", "accessible_library_count"]
1505+
"required": ["sourceTypes", "libraryFilters", "accessibleLibraryCount"]
14811506
},
14821507
"ListOperation": {
14831508
"type": "object",
@@ -1501,10 +1526,10 @@
15011526
},
15021527
"PatchPoliciesRequest": {
15031528
"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.",
15051530
"minProperties": 1,
15061531
"properties": {
1507-
"source_types": {
1532+
"sourceTypes": {
15081533
"type": "object",
15091534
"description": "Enable or disable specific source types. Both can be provided in one request, but the same type cannot appear in both arrays.",
15101535
"properties": {
@@ -1526,7 +1551,7 @@
15261551
}
15271552
}
15281553
},
1529-
"library_filters": {
1554+
"libraryFilters": {
15301555
"type": "object",
15311556
"description": "Update library access filters.",
15321557
"properties": {
@@ -1540,15 +1565,24 @@
15401565
"type": "object",
15411566
"description": "Update quality-mode settings.",
15421567
"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": {
15481573
"type": "object",
15491574
"description": "Update repo-specific quality filters.",
15501575
"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)" }
15521586
}
15531587
}
15541588
}
@@ -1557,7 +1591,7 @@
15571591
"type": "object",
15581592
"description": "Update select-mode settings.",
15591593
"properties": {
1560-
"allowed_libraries": { "$ref": "#/components/schemas/ListOperation" }
1594+
"allowedLibraries": { "$ref": "#/components/schemas/ListOperation" }
15611595
}
15621596
}
15631597
}

0 commit comments

Comments
 (0)