(Activity)(Activity id)(Activity & kvs)Entity for 'activity' table; instance of ActivityInstance.
Entity for 'activity' table; instance of ActivityInstance.
(can-? perms-check-fn activity)Implementation for can-read?/can-write? for items in the activity feed. Dispatches off of the activity :topic,
e.g. :user-joined. perms-check-fn is can-read? or can-write? and should be called as needed on models the
activity records.
Implementation for `can-read?`/`can-write?` for items in the activity feed. Dispatches off of the activity `:topic`, e.g. `:user-joined`. `perms-check-fn` is `can-read?` or `can-write?` and should be called as needed on models the activity records.
(record-activity! &
{:keys [topic object details-fn database-id table-id user-id
model model-id]})Inserts a new Activity entry.
Takes the following kwargs:
:topic Required. The activity topic.
:object Optional. The activity object being saved.
:database-id Optional. ID of the Database related to the activity.
:table-id Optional. ID of the Table related to the activity.
:details-fn Optional. Gets called with object as the arg and the result is saved as the :details of the Activity.
:user-id Optional. ID of the User responsible for the activity. defaults to (events/object->user-id object)
:model Optional. name of the model representing the activity. defaults to (events/topic->model topic)
:model-id Optional. ID of the model representing the activity. defaults to (events/object->model-id topic object)
ex: (record-activity! :topic :segment-update :object segment :database-id 1 :table-id 13 :details-fn #(dissoc % :some-key))
Inserts a new `Activity` entry.
Takes the following kwargs:
:topic Required. The activity topic.
:object Optional. The activity object being saved.
:database-id Optional. ID of the `Database` related to the activity.
:table-id Optional. ID of the `Table` related to the activity.
:details-fn Optional. Gets called with `object` as the arg and the result is saved as the `:details` of the Activity.
:user-id Optional. ID of the `User` responsible for the activity. defaults to (events/object->user-id object)
:model Optional. name of the model representing the activity. defaults to (events/topic->model topic)
:model-id Optional. ID of the model representing the activity. defaults to (events/object->model-id topic object)
ex: (record-activity!
:topic :segment-update
:object segment
:database-id 1
:table-id 13
:details-fn #(dissoc % :some-key))cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |