Liking cljdoc? Tell your friends :D

com.blockether.vis.contract.app

Pure rules of app attachments: threads, drafts and Send receipts.

An app attachment is a live view with the attachment placement. The engine and the TUI apply these rules to the same engine-shaped maps, so both paint the same threads and receipts. Every function here is pure: ids, authors and times come from the caller.

Pure rules of app attachments: threads, drafts and Send receipts.

An app attachment is a live view with the `attachment` placement. The engine
and the TUI apply these rules to the same engine-shaped maps, so both paint the
same threads and receipts. Every function here is pure: ids, authors and times
come from the caller.
raw docstring

agent-note-errorclj

(agent-note-error view text)

nil when text can be the note of view for the model, otherwise the reason. Only an app takes a note. A blank text is valid: it removes the note.

nil when `text` can be the note of `view` for the model, otherwise the reason.
Only an app takes a note. A blank text is valid: it removes the note.
sourceraw docstring

app?clj

(app? view)

True when view is an app attachment.

True when `view` is an app attachment.
sourceraw docstring

blank-text?clj

(blank-text? text)

True for nil or text with only whitespace.

True for nil or text with only whitespace.
sourceraw docstring

boundsclj

How many receipts, threads, messages, Send values and Send comments an app holds, and the longest texts: a message body, a Send note and the note for the model.

How many receipts, threads, messages, Send values and Send comments an app
holds, and the longest texts: a message body, a Send note and the note for the
model.
sourceraw docstring

check-shortcutsclj

(check-shortcuts view)

view when its shortcuts are valid. Otherwise refuses with the reason.

`view` when its shortcuts are valid. Otherwise refuses with the reason.
sourceraw docstring

draft-opclj

(draft-op node {:keys [thread-id anchor body]} new-id)

The patch operation that saves body as the draft of a thread in node, or nil when nothing changes. action holds :thread-id, :anchor and :body. A new thread takes new-id. Blank text removes a draft, and a new blank thread is never created.

The patch operation that saves `body` as the draft of a thread in `node`, or
nil when nothing changes. `action` holds `:thread-id`, `:anchor` and `:body`.
A new thread takes `new-id`. Blank text removes a draft, and a new blank thread
is never created.
sourceraw docstring

find-shortcutclj

(find-shortcut view k)

The shortcut of view that binds key k, or nil.

The shortcut of `view` that binds key `k`, or nil.
sourceraw docstring

find-submissionclj

(find-submission view submission-id)

Receipt submission-id of view, or nil.

Receipt `submission-id` of `view`, or nil.
sourceraw docstring

find-threadclj

(find-thread node thread-id)

Thread thread-id of node node, or nil.

Thread `thread-id` of node `node`, or nil.
sourceraw docstring

idempotency-key?clj

(idempotency-key? k)

True when k is a valid idempotency key of a Send.

True when `k` is a valid idempotency key of a Send.
sourceraw docstring

media-typeclj

Media type of the attachment row that lists an app.

Media type of the attachment row that lists an app.
sourceraw docstring

placementclj

Internal placement of an app attachment.

Internal placement of an app attachment.
sourceraw docstring

post-draftsclj

(post-drafts nodes {:keys [author at submission-id new-id]})

Post every saved draft of the thread nodes in nodes as a message. post holds :author, :at, :submission-id and :new-id, a function that gives one fresh message id per call. Answers {:ops [...] :comments [...]}.

Post every saved draft of the thread nodes in `nodes` as a message. `post`
holds `:author`, `:at`, `:submission-id` and `:new-id`, a function that gives
one fresh message id per call. Answers `{:ops [...] :comments [...]}`.
sourceraw docstring

remove-threadsclj

(remove-threads node thread-ids)

Diff node node without the threads in thread-ids. A missing id changes nothing.

Diff node `node` without the threads in `thread-ids`. A missing id changes nothing.
sourceraw docstring

reply-opclj

(reply-op node {:keys [thread-id anchor new-thread-id]} message)

The patch operation that adds message to a thread of node. Without :thread-id, a diff starts thread :new-thread-id at :anchor.

The patch operation that adds `message` to a thread of `node`. Without
`:thread-id`, a diff starts thread `:new-thread-id` at `:anchor`.
sourceraw docstring

revisionclj

(revision node)

The reviewed revision of node node: the new_revision of a diff, else nil.

The reviewed revision of node `node`: the `new_revision` of a diff, else nil.
sourceraw docstring

set-agent-noteclj

(set-agent-note view text)

App view with text as its note for the model. The model reads the note with the next user message. A blank text removes the note.

App `view` with `text` as its note for the model. The model reads the note
with the next user message. A blank text removes the note.
sourceraw docstring

set-shortcutsclj

(set-shortcuts view shortcuts)

App view with shortcuts in place of its old list. An empty list removes every shortcut.

App `view` with `shortcuts` in place of its old list. An empty list removes
every shortcut.
sourceraw docstring

settled-statusesclj

Stages after which a receipt no longer changes.

Stages after which a receipt no longer changes.
sourceraw docstring

shortcut-boundsclj

How many shortcuts an app holds, and the longest label and action id.

How many shortcuts an app holds, and the longest label and action id.
sourceraw docstring

shortcut-key-textclj

The valid shortcut keys, as one sentence part that a refusal can quote.

The valid shortcut keys, as one sentence part that a refusal can quote.
sourceraw docstring

shortcut-key?clj

(shortcut-key? k)

True when k is a key that an app shortcut can bind.

True when `k` is a key that an app shortcut can bind.
sourceraw docstring

shortcut-namesclj

Named keys that an app shortcut can bind, besides one printable character.

Named keys that an app shortcut can bind, besides one printable character.
sourceraw docstring

shortcut-shape-errorclj

(shortcut-shape-error shortcut)

nil when shortcut has a valid shape, otherwise the reason. Whether its node_id exists is the answer of shortcuts-error.

nil when `shortcut` has a valid shape, otherwise the reason. Whether its
`node_id` exists is the answer of [[shortcuts-error]].
sourceraw docstring

shortcuts-errorclj

(shortcuts-error view)

nil when the shortcuts of view are valid, otherwise the reason. Only an app takes shortcuts, each key is bound once, and a node_id shortcut presses a button or a selectable card of the app.

nil when the shortcuts of `view` are valid, otherwise the reason. Only an app
takes shortcuts, each key is bound once, and a `node_id` shortcut presses a
button or a selectable card of the app.
sourceraw docstring

submission-for-keyclj

(submission-for-key view k)

The receipt that idempotency key k made in view, or nil.

The receipt that idempotency key `k` made in `view`, or nil.
sourceraw docstring

submission-statusesclj

Delivery stages of a Send, in order.

Delivery stages of a Send, in order.
sourceraw docstring

thread-typesclj

Node types that hold threads.

Node types that hold threads.
sourceraw docstring

threadsclj

(threads node)

The threads of node node: every thread of a diff, or the thread node itself.

The threads of node `node`: every thread of a diff, or the thread node itself.
sourceraw docstring

upsert-submissionclj

(upsert-submission view submission)

View view with receipt submission in place. When the view holds too many receipts, the oldest settled receipt goes first, then the oldest receipt.

View `view` with receipt `submission` in place. When the view holds too many
receipts, the oldest settled receipt goes first, then the oldest receipt.
sourceraw docstring

upsert-threadclj

(upsert-thread node thread)

Node node with thread in place. A diff replaces the thread with the same id or adds it. A thread node takes the messages, draft, anchor and resolution.

Node `node` with `thread` in place. A diff replaces the thread with the same
id or adds it. A thread node takes the messages, draft, anchor and resolution.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close