Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.automation.core

Automation definitions: validation, storage and the wire shape.

An automation joins triggers, one prompt, one target and delivery options. The runner owns execution; this namespace never starts a turn. Definitions keep the contract spelling: string keys in snake_case.

Automation definitions: validation, storage and the wire shape.

An automation joins triggers, one prompt, one target and delivery options.
The runner owns execution; this namespace never starts a turn. Definitions
keep the contract spelling: string keys in snake_case.
raw docstring

->wireclj

(->wire {:keys [id definition created_at updated_at webhook_secret
                callback_secret]
         :as row}
        last-run
        now)

The contract shape of one stored automation. Secrets never appear.

The contract shape of one stored automation. Secrets never appear.
raw docstring

create!clj

(create! db input now)

delete!clj

(delete! db id)

describeclj

(describe db id now)

The wire shape of one automation, or a 404 ex-info.

The wire shape of one automation, or a 404 ex-info.
raw docstring

limitclj

(limit k)

One value of the contract x-vis-limits.

One value of the contract `x-vis-limits`.
raw docstring

list-allclj

(list-all db now)

new-secretclj

(new-secret)

A Standard Webhooks secret: whsec_ and 32 random bytes in base64.

A Standard Webhooks secret: `whsec_` and 32 random bytes in base64.
raw docstring

next-fireclj

(next-fire trigger anchor from)

The first fire time of one schedule trigger strictly after from, or nil. anchor is the start of an interval schedule.

The first fire time of one schedule trigger strictly after `from`, or nil.
`anchor` is the start of an interval schedule.
raw docstring

next-run-atclj

(next-run-at {:keys [definition created_at]} now)

The next scheduled fire time of an enabled automation after now, or nil.

The next scheduled fire time of an enabled automation after `now`, or nil.
raw docstring

normalizeclj

(normalize definition)

Fill the optional fields of a valid input with their defaults.

Fill the optional fields of a valid input with their defaults.
raw docstring

not-found!clj

(not-found! what id)

rotate-secret!clj

(rotate-secret! db id kind now)

Create or replace one secret and answer it once.

Create or replace one secret and answer it once.
raw docstring

runclj

(run db run-id)

run->wireclj

(run->wire run automation-name)

run-filterclj

(run-filter {:strs [automation_id status session_id limit]})

The run filter of the wire parameters automation_id, status, session_id and limit. limit defaults to 50 and stays between 1 and 200.

The run filter of the wire parameters `automation_id`, `status`, `session_id`
and `limit`. `limit` defaults to 50 and stays between 1 and 200.
raw docstring

runsclj

(runs db opts)

Runs newest first, with the automation names.

Runs newest first, with the automation names.
raw docstring

schedule-kindsclj


update!clj

(update! db id patch now)

Replace the given top-level fields and validate the result as a whole.

Replace the given top-level fields and validate the result as a whole.
raw docstring

validateclj

(validate definition now)

Check one complete definition; answer it with defaults. Throws ex-info with :status 400 and a readable message.

Check one complete definition; answer it with defaults. Throws ex-info with
`:status 400` and a readable message.
raw docstring

webhook-triggerclj

(webhook-trigger definition)

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