Cotton code
95 lines · 2.6 KB · JSONRaw
{  "format_version": 1,  "id": "email_account",  "name": "Mail account",  "plural": "Mail accounts",  "builtin": false,  "visibility": "owner",  "engine": null,  "columns": [    {      "key": "address",      "name": "Address",      "type": "text",      "required": true    },    {      "key": "kind",      "name": "Kind",      "type": "choice",      "choices": ["gmail", "icloud", "fastmail", "yahoo", "imap", "domain"],      "labels": {        "gmail": "Gmail",        "icloud": "iCloud",        "fastmail": "Fastmail",        "yahoo": "Yahoo",        "imap": "Other mail",        "domain": "Your domain"      },      "required": true    },    {      "key": "way",      "name": "How mail arrives",      "type": "choice",      "choices": ["phone", "mac", "cotton", "arrives"],      "labels": {        "phone": "This phone fetches",        "mac": "This Mac fetches",        "cotton": "Cotton fetches for me",        "arrives": "Arrives as it's sent"      },      "required": true    },    {      "key": "phone_device",      "name": "The phone that fetches",      "type": "text",      "readonly": true    },    {      "key": "host",      "name": "Mail server",      "type": "text"    },    {      "key": "smtp_host",      "name": "Sending server",      "type": "text"    },    {      "key": "name",      "name": "Your name on mail",      "type": "text"    },    {      "key": "signature",      "name": "Signature",      "type": "longtext"    },    {      "key": "tag",      "name": "Tag",      "type": "text"    },    {      "key": "position",      "name": "Order",      "type": "number"    },    {      "key": "added_at",      "name": "Added",      "type": "date",      "format": "calendar-datetime",      "readonly": true    }  ],  "seal": {    "clear": []  },  "title": "address",  "date": null,  "project": null,  "instructions": "One row per mailbox the owner reads in Post (assets/design/mail/DECISIONS.md, \"How mail arrives\"). way says who fetches it, and exactly one fetcher does: phone (the phone named by phone_device, the password in that phone's key store), mac (Cotton for Mac, the password in the Mac's keychain), cotton (Cotton's server, which holds the app password in the owner's own object, encrypted, and seals each mail as it arrives), or arrives (mail to the owner's own domain, which needs no password). No password is ever kept in this table. tag is the short word Post shows on a mail when it came to this address rather than the usual one. Everything is sealed: the server never reads which addresses the owner has."}