410 lines · 9.9 KB · JSONRaw
{ "format_version": 1, "picture": null, "builtin": true, "engine": "filing", "date": "created_at", "project": null, "order": null, "add": false, "delete": false, "tables": [ { "name": "cotton_filing_proposals", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "owner", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n owner TEXT NOT NULL", "position": 2 }, { "name": "session", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n session TEXT NOT NULL", "position": 3 }, { "name": "source", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n source TEXT NOT NULL", "position": 4 }, { "name": "destination", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n destination TEXT NOT NULL", "position": 5 }, { "name": "kind", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n kind TEXT NOT NULL CHECK(kind IN ('move','capture'))", "position": 6 }, { "name": "candidates", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n candidates TEXT NOT NULL CHECK(json_valid(candidates) AND json_type(candidates)='array')", "position": 7 }, { "name": "arrivals", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n arrivals TEXT NOT NULL CHECK(json_valid(arrivals) AND json_type(arrivals)='array')", "position": 8 }, { "name": "revisions", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n revisions TEXT NOT NULL CHECK(json_valid(revisions) AND json_type(revisions)='object')", "position": 9 }, { "name": "payload", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n payload TEXT NOT NULL CHECK(json_valid(payload) AND json_type(payload)='object')", "position": 10 }, { "name": "reason", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n reason TEXT NOT NULL", "position": 11 }, { "name": "status", "type": "TEXT", "default": "'open'", "nullable": false, "primary_key": false, "declaration": "\n status TEXT NOT NULL DEFAULT 'open' CHECK(status IN ('open','approved','declined','stale'))", "position": 12 }, { "name": "decided_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n decided_at TEXT", "position": 13 }, { "name": "answer", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n answer TEXT", "position": 14 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 15 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 16 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 17 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 18 } ], "constraints": [ { "declaration": "\n FOREIGN KEY(workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE\n", "position": 19 } ], "prefix": "CREATE TABLE IF NOT EXISTS cotton_filing_proposals (", "suffix": ")", "indexes": [ "CREATE INDEX IF NOT EXISTS idx_cotton_filing_proposals_open ON cotton_filing_proposals(workspace_id,status,created_at)", "CREATE INDEX IF NOT EXISTS idx_cotton_filing_proposals_author ON cotton_filing_proposals(substr(_hlc,20),_hlc)" ], "full_text": [], "triggers": [] } ], "page": [ { "heading": null, "columns": [ "outcome", "kind", "count", "source", "destination", "thought", "answer", "created_at" ] } ], "tile": { "face": "slip-list" }, "empty": { "title": "Nothing waiting", "message": "Proposals wait here for your approval." }, "id": "filing_proposal", "name": "Proposal", "plural": "Proposals", "title": "reason", "columns": [ { "key": "reason", "name": "Proposal", "type": "longtext", "readonly": true }, { "key": "outcome", "name": "Answer", "type": "choice", "choices": [ "open", "accepted", "undone", "declined" ], "readonly": true }, { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "move", "capture" ], "readonly": true }, { "key": "count", "name": "Records", "type": "number", "readonly": true }, { "key": "source", "name": "From", "type": "link", "link_to": "database", "readonly": true }, { "key": "destination", "name": "File in", "type": "link", "link_to": "database", "readonly": true }, { "key": "thought", "name": "Your words", "type": "link", "link_to": "thought", "readonly": true }, { "key": "created_at", "name": "Proposed at", "type": "date", "readonly": true }, { "key": "answer", "name": "Why not", "type": "text", "readonly": true }, { "key": "move", "name": "Move", "type": "text", "readonly": true } ], "slip": { "title": "reason", "subtitle": "destination", "trailing": "outcome", "photo": null, "toggle": null }, "instructions": "An immutable proposal names its candidates and their exact source contents. Accept is the owner's signed act and moves them through the same undoable move a session would make; changed contents refuse the complete batch. Not this declines it with the owner's optional line on why, and the same records are never proposed for the same place again. An answered proposal shows its outcome for a day; Undo takes an Accept back.", "commands": [ { "id": "approve", "label": "Accept", "kind": "update", "method": "filing.approveProposal", "bindings": { "id": "$id", "database": "source" }, "when": { "outcome": "open" }, "does": "completes", "receipt": "Accepted", "object": "done" }, { "id": "decline", "label": "Not this", "kind": "update", "method": "filing.declineProposal", "bindings": { "id": "$id", "database": "source" }, "when": { "outcome": "open" }, "pick": { "argument": "answer", "kind": "text", "optional": true }, "does": "puts-away", "receipt": "Declined", "object": "unlink" }, { "id": "takeback", "label": "Undo", "kind": "update", "method": "records.move", "bindings": { "change_id": "move", "database": "source" }, "when": { "outcome": "accepted" }, "does": "moves", "receipt": "Taken back", "object": "unlink" } ], "parts": { "shape": "desk", "head": { "facts": [] }, "cards": [ { "column": "outcome" }, { "column": "kind" }, { "column": "count" }, { "column": "source" }, { "column": "destination" }, { "column": "thought" }, { "column": "answer" } ], "acts": { "main": "approve", "more": [ "takeback" ], "away": "decline" }, "links": [], "lists": [], "strip": [] }, "tool": { "name": "Proposals", "icon": "circle-help" ,"purpose":"Suggestions for where to file your records."}}