forked from bluesky-social/atproto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ozone signature methods (bluesky-social#2855)
* lexicons * fix typo & add proxy routes * changeset
- Loading branch information
Showing
24 changed files
with
1,443 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@atproto/ozone": patch | ||
"@atproto/api": patch | ||
--- | ||
|
||
Add tools.ozone.signature lexicons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "tools.ozone.signature.defs", | ||
"defs": { | ||
"sigDetail": { | ||
"type": "object", | ||
"required": ["property", "value"], | ||
"properties": { | ||
"property": { "type": "string" }, | ||
"value": { "type": "string" } | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "tools.ozone.signature.findCorrelation", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Find all correlated threat signatures between 2 or more accounts.", | ||
"parameters": { | ||
"type": "params", | ||
"required": ["dids"], | ||
"properties": { | ||
"dids": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"format": "did" | ||
} | ||
} | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["details"], | ||
"properties": { | ||
"details": { | ||
"type": "array", | ||
"items": { | ||
"type": "ref", | ||
"ref": "tools.ozone.signature.defs#sigDetail" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "tools.ozone.signature.findRelatedAccounts", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Get accounts that share some matching threat signatures with the root account.", | ||
"parameters": { | ||
"type": "params", | ||
"required": ["did"], | ||
"properties": { | ||
"did": { | ||
"type": "string", | ||
"format": "did" | ||
}, | ||
"cursor": { "type": "string" }, | ||
"limit": { | ||
"type": "integer", | ||
"minimum": 1, | ||
"maximum": 100, | ||
"default": 50 | ||
} | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["accounts"], | ||
"properties": { | ||
"cursor": { "type": "string" }, | ||
"accounts": { | ||
"type": "array", | ||
"items": { | ||
"type": "ref", | ||
"ref": "#relatedAccount" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"relatedAccount": { | ||
"type": "object", | ||
"required": ["account"], | ||
"properties": { | ||
"account": { | ||
"type": "ref", | ||
"ref": "com.atproto.admin.defs#accountView" | ||
}, | ||
"similarities": { | ||
"type": "array", | ||
"items": { | ||
"type": "ref", | ||
"ref": "tools.ozone.signature.defs#sigDetail" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "tools.ozone.signature.searchAccounts", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Search for accounts that match one or more threat signature values.", | ||
"parameters": { | ||
"type": "params", | ||
"required": ["values"], | ||
"properties": { | ||
"values": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"cursor": { "type": "string" }, | ||
"limit": { | ||
"type": "integer", | ||
"minimum": 1, | ||
"maximum": 100, | ||
"default": 50 | ||
} | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["accounts"], | ||
"properties": { | ||
"cursor": { "type": "string" }, | ||
"accounts": { | ||
"type": "array", | ||
"items": { | ||
"type": "ref", | ||
"ref": "com.atproto.admin.defs#accountView" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.