Cotton code
202 lines · 4.2 KB · JSONRaw
{  "views": [    {      "id": "all",      "label": "All",      "visibility": "owner",      "is_default": true,      "read": {        "table": "thread"      }    },    {      "id": "cotton",      "label": "Cotton",      "visibility": "owner",      "is_default": false,      "read": {        "table": "thread",        "where": {          "channels": "cotton"        },        "empty": {          "line": "empty_views.messages.cotton",          "table": true        }      }    },    {      "id": "whatsapp",      "label": "WhatsApp",      "visibility": "owner",      "is_default": false,      "read": {        "table": "thread",        "where": {          "channels": "whatsapp"        },        "empty": {          "line": "empty_views.messages.whatsapp",          "table": true        }      }    },    {      "id": "sms",      "label": "SMS",      "visibility": "owner",      "is_default": false,      "read": {        "table": "thread",        "where": {          "channels": "sms"        },        "empty": {          "line": "empty_views.messages.sms",          "table": true        }      }    },    {      "id": "instagram",      "label": "Instagram",      "visibility": "owner",      "is_default": false,      "read": {        "table": "thread",        "where": {          "channels": "instagram"        },        "empty": {          "line": "empty_views.messages.instagram",          "table": true        }      }    },    {      "id": "starred",      "label": "Starred",      "visibility": "owner",      "is_default": false,      "read": {        "table": "message",        "where": {          "starred_at": {            "present": true          }        },        "empty": {          "line": "empty_views.messages.starred",          "table": true        }      },      "sort": {        "column": "starred_at",        "descending": true      },      "face": "cards",      "card": {        "face": "message",        "fields": [          {            "slot": "photo",            "column": "sender_photo"          },          {            "slot": "title",            "column": "sender_name"          },          {            "slot": "body",            "column": "display_body"          },          {            "slot": "date",            "column": "sent_at",            "form": "weekday_date"          },          {            "slot": "source",            "column": "channel"          }        ]      }    },    {      "id": "agents",      "label": "Agents",      "visibility": "owner",      "is_default": false,      "read": {        "table": "session",        "empty": {          "line": "empty_views.messages.agents",          "table": true        }      },      "sort": {        "column": "active_at",        "descending": true      },      "face": "cards"    },    {      "id": "devices",      "label": "Devices",      "visibility": "owner",      "is_default": false,      "read": {        "table": "vault_key",        "empty": {          "line": "empty_views.keys.devices",          "table": true        }      },      "sort": {        "column": "vmk_version",        "descending": false,        "tie": "created_at",        "tie_descending": false      }    }  ],  "id": "messages",  "name": "Messages",  "purpose": "Your conversations and the files shared in them.",  "picture": {    "photo": "photo:9713719602098b4534d4aa3d950031eac5a813fc66fa11de8027b29ec5cd4f9d",    "object": "tool-messages"  },  "card_stock": "rose",  "tables": [    "thread",    "message",    "story",    "thread_member",    "message_import",    "session",    "vault_key",    "email_draft",    "outbox",    "email_thread",    "email",    "email_sender",    "sender_merge",    "email_account",    "email_cut",    "email_bin_cut",    "email_read_cut",    "call"  ],  "instructions": "",  "automations": [],  "server": {    "needs": true,    "line": "Live WhatsApp, SMS and Instagram arrive through your Cotton server and the Mac app. You can import a WhatsApp or Instagram export here now."  },  "author": {    "device": "cotton",    "name": "Cotton"  },  "signature": null}