Workflow event elements — part 3
Generated from brezel/api@ddd04f543e0fecc433a351dcaab24d39087b24be — do not edit by hand.
event/policyRead
Section titled “event/policyRead”Runs when someone tries to read an Entity of a given module
Input ports: none.
Output ports: default (query; Query).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
roles | text | null | not declared | When not empty, this policy will only apply if users have at least one of these roles. |
allow | text | null | not declared | When not empty, this policy will not apply if users have at least one of these roles. |
roleKey | select | name | not declared | Id roles by Values: slug, name. |
event/policyUpdate
Section titled “event/policyUpdate”Runs when someone tries to update an Entity of a given module
Input ports: none.
Output ports: default (query; Query), entity (resource; Entity).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
roles | text | null | not declared | When not empty, this policy will only apply if users have at least one of these roles. |
allow | text | null | not declared | When not empty, this policy will not apply if users have at least one of these roles. |
roleKey | select | name | not declared | Id roles by Values: slug, name. |
event/purchaseCompleted
Section titled “event/purchaseCompleted”Fires once when a one-time product (e.g. a credit pack) of a Buyable module was paid for an entity.
Input ports: none.
Output ports: default (resource; Entity), product (resource; Product), price (resource; Price), purchase (resource; Purchase).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
event/read
Section titled “event/read”Runs when an entity is read.
Input ports: none.
Output ports: default (resource; Entity; recipe type {"kind":"entity","moduleFromOption":"module"}).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
event/scope
Section titled “event/scope”Runs when a scoped query is run on this module.
Input ports: none.
Output ports: default (query; default).
Options: none.
event/subscriptionActivated
Section titled “event/subscriptionActivated”Fires when a subscription plan is activated for an entity in a given module.
Input ports: none.
Output ports: default (resource; Entity), plan (resource; Plan).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
event/subscriptionDeactivated
Section titled “event/subscriptionDeactivated”Fires when a subscription plan is deactivated for an entity in a given module.
Input ports: none.
Output ports: default (resource; Entity), plan (resource; Plan).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
event/subscriptionFeaturesChanged
Section titled “event/subscriptionFeaturesChanged”Fires when the active_features for an entity of a given module changed.
Input ports: none.
Output ports: default (resource; Entity), active_features (resource; Active Features), old_active_features (resource; Old Active Features).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
event/subscriptionInvoicePaid
Section titled “event/subscriptionInvoicePaid”Fires when an invoice for a subscription was paid.
Input ports: none.
Output ports: default (resource; Entity), plan (resource; Plan), price (resource; Price).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
event/subscriptionPaymentFailed
Section titled “event/subscriptionPaymentFailed”Fires when a payment for a subscription plan fails for an entity in a given module.
Input ports: none.
Output ports: default (resource; Entity), plan (string; Plan), attempts (any; Attempts).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
event/update
Section titled “event/update”Run when an entity of a module is updated. Can be configured to only run when specific fields are changed.
Input ports: none.
Output ports: default (resource; default; recipe type {"kind":"entity","moduleFromOption":"module"}), original (resource; original; recipe type {"kind":"entity","moduleFromOption":"module"}).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
fields | field | [] | not declared | Fields to watch for changes. If empty, all fields will be watched. |
event/webhook
Section titled “event/webhook”A multipurpose Event that can be triggered by e.g. buttons or even manually. Run when the webhook is called.
Input ports: none.
Output ports: default (flow; default; runnable; recipe type {"kind":"entity","moduleFromOption":"module"}), prototype (resource; prototype), context (resource; context), selected (any; Selected), input (any; Params), request (any; Request).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
title | text | null | not declared | Title |
module | module | null | not declared | Module |
async | bool | false | not declared | Async |
roles | text | null | not declared | Restrict this events to these roles only (identified by their slug) |
features | text | null | not declared | Restrict this events to entities with these (subscription plan) features activated only (identified by their slug) |
allow_agent_trigger | bool | false | not declared | Allow agents to trigger this webhook explicitly. Keep disabled for UI-only webhooks. |
agent_input_description | text | null | not declared | Optional human-readable description of request/input payloads agents may pass. |
agent_input_schema | text | null | not declared | Optional JSON schema for payloads agents may pass. |
public | bool | false | not declared | Public |
refresh_prototype | bool | true | not declared | If true, the prototype’s relations will be refreshed before the event is executed. |