clone

nostr relays on demand at <name>.bind.ws: claim one with your key, pay in zaps past the free allowance

dependabot/npm_and_yarn/npm-f01a459b0f
bindws / connection-template.schema.json
connection-template.schema.json 3.4K
1{2 "$schema": "http://json-schema.org/draft-07/schema#",3 "$id": "https://bind.ws/connection-template.schema.json",4 "title": "bind.ws connection template",5 "description": "One app shortcut for a relay's Connect fold: the app, what it does with this relay, and the links that hand a viewer over to it. Links carry {relay:*}, {owner:*}, {user:*} and {input:*} placeholders the relay fills in. The relay's parser (src/connections.ts) is the last word; this schema is for the editor.",6 "type": "object",7 "required": ["format", "title", "about", "app", "links"],8 "additionalProperties": false,9 "properties": {10 "$schema": { "type": "string" },11 "format": { "enum": ["bind.ws/connection-template/1"] },12 "title": { "type": "string", "minLength": 1, "maxLength": 40, "description": "what the shortcut is for, in the owner's words: Repos, Notes, Photo library" },13 "about": { "type": "string", "minLength": 1, "maxLength": 200, "description": "one sentence on what opens and what it does with this relay" },14 "app": { "type": "string", "minLength": 1, "maxLength": 40, "description": "the app the shortcut hands over to" },15 "where": { "type": "string", "maxLength": 40, "description": "where the app runs: web, phone, iPhone, Android, desktop, terminal" },16 "icon": { "enum": ["notes", "blog", "bookmark", "photo", "site", "git", "chat", "person", "files", "key", "search", "feed", "lock", "app"], "description": "one of the console's icons" },17 "feature": { "enum": ["search", "sync", "count", "discovery", "names", "files", "pages", "signer", "sites", "marmot", "grasp", "push"], "description": "the shortcut is shown only while this feature is on" },18 "visibility": { "enum": ["public", "auth", "members", "owner"], "description": "who sees the shortcut when the owner adds it without saying: anyone, anyone signed in, members, the owner" },19 "links": {20 "type": "array",21 "minItems": 1,22 "maxItems": 6,23 "items": {24 "type": "object",25 "required": ["label"],26 "additionalProperties": false,27 "properties": {28 "label": { "type": "string", "minLength": 1, "maxLength": 40 },29 "href": { "type": "string", "minLength": 1, "maxLength": 2000, "description": "a link to open: https://, or nostr: for the viewer's own app" },30 "copy": { "type": "string", "minLength": 1, "maxLength": 2000, "description": "text to put on the clipboard instead of a link" }31 },32 "oneOf": [{ "required": ["href"] }, { "required": ["copy"] }]33 }34 },35 "qr": { "type": "string", "minLength": 1, "maxLength": 2000, "description": "what the QR code carries; the first link's href when left out" },36 "inputs": {37 "type": "array",38 "maxItems": 4,39 "items": {40 "type": "object",41 "required": ["name", "label"],42 "additionalProperties": false,43 "properties": {44 "name": { "type": "string", "pattern": "^[a-z][a-z0-9_-]{0,23}$", "description": "the {input:name} placeholder it fills" },45 "label": { "type": "string", "minLength": 1, "maxLength": 60 },46 "placeholder": { "type": "string", "maxLength": 200 },47 "default": { "type": "string", "maxLength": 500, "description": "the value when the owner leaves it blank" },48 "pattern": { "type": "string", "maxLength": 200, "description": "a regular expression the owner's value must match; a value that lands in a URL path or a shell command names one" }49 }50 }51 }52 }53}