Workflow source elements
Generated from brezel/api@ddd04f543e0fecc433a351dcaab24d39087b24be — do not edit by hand.
source/chunkedEntities
Section titled “source/chunkedEntities”Run a workflow for each chunk of entities.
Input ports: default (any; Input).
Output ports: default (any; Output).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
chunk_size | number | 100 | yes (requireOption) | Number of entities that get processed in one batch. |
workflow | workflow | null | yes (requireOption) | The workflow to run for each chunk. |
module | module | null | yes (requireOption) | Module |
where | text | null | not declared | Where |
depth | text | 1 | not declared | Depth |
source/entities
Section titled “source/entities”Get entities from a module. This is the main way you load Entities to use in a workflow. Use filters to narrow down the selection.
Input ports: default (any; Input), ids (any; IDs).
Output ports: default (resource; Output; recipe type {"kind":"conditional","option":"first","whenTruthy":{"kind":"entity","moduleFromOption":"module"},"whenFalsy":{"kind":"collection","of":{"kind":"entity","moduleFromOption":"module"}}}), query (query; Query; recipe type {"kind":"query","moduleFromOption":"module"}).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | yes (requireOption) | Module |
listItems | field | null | not declared | Query list items (corresponding entity props accessible under “$entity.xyz”) |
filters | filters | [] | not declared | Filters |
with | field | [] | not declared | Load related entities. Use dot notation for nested relations. |
fields | field | [] | not declared | Only select and return these fields. |
groupBy | field | [] | not declared | Group the result by the given fields. |
orderBy | field | [] | not declared | Order the result by the given fields. |
having | filters | [] | not declared | Behaves like SQL having. |
limit | text | null | not declared | If either limit or offset is set, the other one has to be set too. |
offset | text | null | not declared | If either limit or offset is set, the other one has to be set too. |
first | bool | false | not declared | Only return the first entry. |
scopes | event | null | not declared | Apply scopes and policies to this query. Either trigger existing policies or pass custom created scopes. |
permissions | bool | false | not declared | Apply role-based permissions and dynamic policies to this query. |
withTrashed | bool | false | not declared | Include deleted entries in the result. |
global | bool | false | not declared | Retrieve all entries without considering the client |
autoDistinct | bool | true | not declared | Automatically add DISTINCT to the query if the fields are not unique (e.g. when using list items). |
distinct | bool | false | not declared | Only select distinct entries. If auto distinct is enabled, this option is ignored. |
hydrateRelations | bool | false | not declared | Hydrate relation columns containing dots to relations. |
rollup | bool | false | not declared | If true, add a WITH ROLLUP to the query. |
source/entitiesFromInput
Section titled “source/entitiesFromInput”Deprecated - Extract IDs yourself and use source/entities instead! Gets entities from input array.
Input ports: default (any; Input).
Output ports: default (any; Output).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | yes (requireOption) | Module |
source/getSecret
Section titled “source/getSecret”Retrieve a stored secret by key and scope. Scope can be User, Client or any Entity.
Input ports: default (any; Input), entity (resource; Entity).
Output ports: default (any; Output).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
key | text | null | not declared | Key |
scope | select | null | not declared | Scope this secret to the current user, client or input entity Values: entity, user, client. |
source/getSession
Section titled “source/getSession”Get a workflow session by key.
Input ports: default (any; Input).
Output ports: default (any; Output).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
key | text | null | not declared | Key |
source/new
Section titled “source/new”Creates a new Entity for the given module. Supports setting values with the option ‘values’. If the option ‘client’ is set, the entity will be created for the given client.
Input ports: default (any; Input).
Output ports: default (resource; Output; recipe type {"kind":"entity","moduleFromOption":"module"}).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
values | text | null | not declared | values |
client | client | null | not declared | client |
source/oauthToken
Section titled “source/oauthToken”Gets a stored OAuth token for the given user and provider. If the token is expired, the ‘expired’ port is triggered.
Input ports: default (any; Input), user (resource; User).
Output ports: token (any; Token), notFound (any; Not Found), expired (any; Expired).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
provider | select | null | not declared | Provider Values: youtube, custom. |
consumer | text | null | not declared | The consumer identifier of your specific OAuth process. This should correspond to the consumer that was chosen in action/oauth. |
source/readFile
Section titled “source/readFile”Finds a View by the name of `value` in the defined views module and renders it. If no View is found, the option ‘value’ is returned.
Input ports: default (any; Input).
Output ports: default (any; Output).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
view_module | text | views | not declared | View Module |
value | text | “ | not declared | Name |
source/renderView
Section titled “source/renderView”Materializes a view with the given data and renders it. Ports: ViewResource (eg. from source/resource) If the input is a view the option filename will be ignored. If it is not a View the this will be the $resource available in the View. Options: Filename (optional)
Input ports: default (any; Input), view (resource; View), data (any; Data).
Output ports: default (any; Output).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
view_name | entity | “ | not declared | View |
data | recipes | [] | not declared | Data |
source/resources
Section titled “source/resources”DEPRECATED Use source/entities instead. Get resources/Entities from a module.
Input ports: default (any; Input).
Output ports: default (resource; Output; recipe type {"kind":"conditional","option":"first","whenTruthy":{"kind":"entity","moduleFromOption":"module"},"whenFalsy":{"kind":"collection","of":{"kind":"entity","moduleFromOption":"module"}}}).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
first | bool | false | not declared | First |
latest | bool | false | not declared | Latest |
where | filters | [] | not declared | Where |
depth | text | 1 | not declared | Depth |
orderBy | text | null | not declared | Order by |
source/user
Section titled “source/user”Get the current User that triggered the workflow.
Input ports: default (any; Input).
Output ports: default (any; Output).
Options: none.