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.
sourceraw docstring

create!clj

(create! db input now)
source

delete!clj

(delete! db id)
source

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.
sourceraw docstring

limitclj

(limit k)

One value of the contract x-vis-limits.

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

list-allclj

(list-all db now)
source

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.
sourceraw 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.
sourceraw 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.
sourceraw 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.
sourceraw docstring

not-found!clj

(not-found! what id)
source

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.
sourceraw docstring

runclj

(run db run-id)
source

run->wireclj

(run->wire run automation-name)
source

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.
sourceraw docstring

runsclj

(runs db opts)

Runs newest first, with the automation names.

Runs newest first, with the automation names.
sourceraw docstring

schedule-kindsclj

source

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.
sourceraw 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.
sourceraw docstring

webhook-triggerclj

(webhook-trigger definition)
source

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