Cotton code
400 lines · 7.6 KB · JSONRaw
{  "format_version": 1,  "id": "secret",  "name": "Password",  "plural": "Passwords",  "visibility": "owner",  "title": "name",  "columns": [    {      "key": "name",      "name": "Name",      "type": "text",      "required": true    },    {      "key": "kind",      "name": "Kind",      "type": "choice",      "choices": [        "login",        "api_key",        "note",        "card",        "identity",        "document"      ],      "required": true,      "readonly": true,      "choice_names": {        "login": "Login",        "api_key": "API key",        "note": "Note",        "card": "Card",        "identity": "ID",        "document": "Document password"      }    },    {      "key": "site",      "type": "text",      "name": "Website",      "shown_when": {        "column": "kind",        "values": [          "login",          "api_key"        ]      }    },    {      "key": "username",      "name": "Username",      "type": "text",      "shown_when": {        "column": "kind",        "values": [          "login"        ]      }    },    {      "key": "service",      "name": "Service",      "type": "text",      "shown_when": {        "column": "kind",        "values": [          "api_key"        ]      }    },    {      "key": "hint",      "name": "Hint",      "type": "text",      "readonly": true    },    {      "key": "sealed",      "name": "Sealed",      "type": "longtext",      "readonly": true    },    {      "key": "expires_at",      "type": "date",      "name": "Runs out",      "month": true    },    {      "key": "last_used_at",      "type": "date",      "readonly": true,      "name": "Last used"    },    {      "key": "trashed_at",      "type": "date",      "readonly": true,      "name": "Binned"    },    {      "key": "updated_at",      "name": "Updated",      "type": "date",      "readonly": true    }  ],  "instructions": "A password record holds a login, an API key, a card, an identity or a secure note, sealed so only the devices in this database can open it — your own, or the people you share it with. Assistants can create, list, update and bin passwords, but never read one back. Never repeat a secret the owner typed into a conversation anywhere else.",  "tables": [],  "card": {    "face": "secret",    "fields": [      {        "slot": "title",        "column": "name"      },      {        "slot": "subtitle",        "column": "site",        "also": [          "service"        ]      },      {        "slot": "body",        "column": "username",        "label": "label.secret.username"      },      {        "slot": "state",        "column": "kind",        "only": [          "api_key",          "note",          "card",          "identity",          "document"        ]      },      {        "slot": "date",        "column": "last_used_at",        "form": "relative",        "label": "label.secret.last_used"      },      {        "slot": "expires",        "column": "expires_at",        "label": "label.secret.expires"      }    ]  },  "picture": {    "photo": "photo:3485bc7f726643a724a61ed3bf6954642e04592b99ed907c0becaf09b45029f1",    "object": "tool-passwords"  },  "builtin": true,  "engine": "vault",  "date": null,  "project": null,  "order": null,  "slip": {    "title": "name",    "subtitle": [      "site",      "service"    ],    "trailing": "kind",    "photo": null,    "toggle": null,    "subtitle_first": true  },  "tile": {    "face": "card-grid"  },  "page": [    {      "heading": null,      "columns": [        "name",        "kind"      ]    },    {      "heading": "Where it is used",      "columns": [        "username",        "site",        "service"      ]    },    {      "heading": "Dates",      "columns": [        "expires_at",        "last_used_at",        "updated_at",        "trashed_at"      ]    }  ],  "readonly_when": "trashed_at",  "sealed": true,  "record_route": "/passwords/[id]",  "group": {    "column": "kind",    "sections": [      {        "heading": "Logins",        "values": [          "login"        ]      },      {        "heading": "API keys",        "values": [          "api_key"        ]      },      {        "heading": "Notes",        "values": [          "note"        ]      },      {        "heading": "Cards",        "values": [          "card"        ]      },      {        "heading": "IDs",        "values": [          "identity"        ]      }    ]  },  "empty": {    "title": "Nothing kept yet",    "message": "Passwords, keys, cards and IDs, sealed with this database’s key, which only the devices in it hold."  },  "commands": [    {      "id": "copy_password",      "label": "Copy",      "kind": "copy",      "copies": "$sealed"    },    {      "id": "delete",      "label": "Delete",      "kind": "delete",      "verb": "delete_record",      "data": {        "table": "secret"      },      "confirm": "Undo on the receipt brings it back.",      "bindings": {        "id": "$id"      },      "receipt": "Deleted",      "does": "destroys"    }  ],  "tool": {    "views": [      {        "id": "logins",        "label": "Logins",        "visibility": "owner",        "is_default": true,        "read": {          "table": "secret",          "where": {            "kind": "login"          }        }      },      {        "id": "ids",        "label": "IDs",        "visibility": "owner",        "is_default": false,        "read": {          "table": "secret",          "where": {            "kind": "identity"          }        }      },      {        "id": "api_keys",        "label": "API keys",        "visibility": "owner",        "is_default": false,        "read": {          "table": "secret",          "where": {            "kind": "api_key"          }        }      },      {        "id": "cards",        "label": "Cards",        "visibility": "owner",        "is_default": false,        "read": {          "table": "secret",          "where": {            "kind": "card"          }        }      },      {        "id": "notes",        "label": "Notes",        "visibility": "owner",        "is_default": false,        "read": {          "table": "secret",          "where": {            "kind": "note"          }        }      },      {        "id": "documents",        "label": "Documents",        "visibility": "owner",        "is_default": false,        "read": {          "table": "secret",          "where": {            "kind": "document"          }        }      },      {        "id": "all",        "label": "All",        "visibility": "owner",        "is_default": false,        "read": {          "table": "secret"        }      }    ],    "name": "Passwords",    "purpose": "Passwords and other private secrets.",    "tables": [      "secret",      "placement_proposal"    ],    "key": "passwords",    "icon": "key-round",    "card_stock": "grey",    "route": "/passwords"  },  "parts": {    "shape": "sheet",    "head": {      "facts": [        "kind",        "username"      ]    },    "links": [],    "lists": [],    "acts": {      "main": "copy_password",      "more": [],      "away": "delete"    },    "cards": [      {        "column": "kind"      },      {        "column": "username"      },      {        "column": "site"      },      {        "column": "service"      },      {        "column": "expires_at"      },      {        "column": "last_used_at"      }    ],    "strip": []  }}