atproto blogging
at main 101 lines 2.8 kB view raw
1{ 2 "lexicon": 1, 3 "id": "com.atproto.temp.checkHandleAvailability", 4 "defs": { 5 "main": { 6 "type": "query", 7 "description": "Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions.", 8 "parameters": { 9 "type": "params", 10 "required": [ 11 "handle" 12 ], 13 "properties": { 14 "birthDate": { 15 "type": "string", 16 "description": "User-provided birth date. Might be used to build handle suggestions.", 17 "format": "datetime" 18 }, 19 "email": { 20 "type": "string", 21 "description": "User-provided email. Might be used to build handle suggestions." 22 }, 23 "handle": { 24 "type": "string", 25 "description": "Tentative handle. Will be checked for availability or used to build handle suggestions.", 26 "format": "handle" 27 } 28 } 29 }, 30 "output": { 31 "encoding": "application/json", 32 "schema": { 33 "type": "object", 34 "required": [ 35 "handle", 36 "result" 37 ], 38 "properties": { 39 "handle": { 40 "type": "string", 41 "description": "Echo of the input handle.", 42 "format": "handle" 43 }, 44 "result": { 45 "type": "union", 46 "refs": [ 47 "#resultAvailable", 48 "#resultUnavailable" 49 ] 50 } 51 } 52 } 53 }, 54 "errors": [ 55 { 56 "description": "An invalid email was provided.", 57 "name": "InvalidEmail" 58 } 59 ] 60 }, 61 "resultAvailable": { 62 "type": "object", 63 "description": "Indicates the provided handle is available.", 64 "properties": {} 65 }, 66 "resultUnavailable": { 67 "type": "object", 68 "description": "Indicates the provided handle is unavailable and gives suggestions of available handles.", 69 "required": [ 70 "suggestions" 71 ], 72 "properties": { 73 "suggestions": { 74 "type": "array", 75 "description": "List of suggested handles based on the provided inputs.", 76 "items": { 77 "type": "ref", 78 "ref": "#suggestion" 79 } 80 } 81 } 82 }, 83 "suggestion": { 84 "type": "object", 85 "required": [ 86 "handle", 87 "method" 88 ], 89 "properties": { 90 "handle": { 91 "type": "string", 92 "format": "handle" 93 }, 94 "method": { 95 "type": "string", 96 "description": "Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics." 97 } 98 } 99 } 100 } 101}