picked 0.0.101-next.2 → 0.0.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -12
- package/docs/explanation/conditions-and-the-logic-engine.md +94 -0
- package/docs/explanation/content-references.md +99 -0
- package/docs/explanation/feature-flag-allocation.md +218 -0
- package/docs/explanation/how-picked-works.md +124 -0
- package/docs/explanation/how-pickedql-works.md +76 -0
- package/docs/explanation/pages-and-flows.md +64 -0
- package/docs/explanation/the-content-model.md +87 -0
- package/docs/explanation/the-two-apis.md +68 -0
- package/docs/explanation/why-server-side-rendering.md +76 -0
- package/docs/explanation/workspaces-and-versions.md +71 -0
- package/docs/how-to/add-a-step-field-or-action.md +56 -0
- package/docs/how-to/analytics/index.md +324 -0
- package/docs/how-to/archive-or-delete-a-workspace.md +59 -0
- package/docs/how-to/authenticate-the-cli.md +101 -0
- package/docs/how-to/authenticate-with-a-magic-link.md +56 -0
- package/docs/how-to/authenticate-with-a-password.md +68 -0
- package/docs/how-to/authenticate-with-an-api-key.md +60 -0
- package/docs/how-to/authenticate-with-oauth.md +49 -0
- package/docs/how-to/build-a-flow.md +106 -0
- package/docs/how-to/call-an-external-api-from-a-workflow.md +116 -0
- package/docs/how-to/connect-the-mcp-server.md +46 -0
- package/docs/how-to/create-a-content-entry.md +58 -0
- package/docs/how-to/create-a-project.md +40 -0
- package/docs/how-to/create-an-experience.md +51 -0
- package/docs/how-to/create-and-revoke-an-api-key.md +54 -0
- package/docs/how-to/debug-with-the-chrome-extension.md +57 -0
- package/docs/how-to/define-a-page-layout.md +54 -0
- package/docs/how-to/fill-and-publish-a-page.md +82 -0
- package/docs/how-to/install-the-gtm-template.md +84 -0
- package/docs/how-to/install-the-sdk.md +93 -0
- package/docs/how-to/install-the-vite-plugin.md +69 -0
- package/docs/how-to/invite-and-remove-members.md +45 -0
- package/docs/how-to/point-one-entry-at-another.md +75 -0
- package/docs/how-to/preview-a-workspace.md +39 -0
- package/docs/how-to/publish-a-workspace.md +42 -0
- package/docs/how-to/read-a-feature-flag.md +113 -0
- package/docs/how-to/read-a-referenced-entry.md +109 -0
- package/docs/how-to/register-a-component.md +55 -0
- package/docs/how-to/register-an-action-handler.md +85 -0
- package/docs/how-to/register-an-api-that-uses-oauth2.md +107 -0
- package/docs/how-to/render-a-step-form.md +131 -0
- package/docs/how-to/render-an-unpublished-preview.md +41 -0
- package/docs/how-to/retry-a-failed-call-with-a-loop.md +81 -0
- package/docs/how-to/reuse-a-section.md +64 -0
- package/docs/how-to/reuse-a-step-field-or-action.md +39 -0
- package/docs/how-to/roll-back-a-published-version.md +39 -0
- package/docs/how-to/run-an-ab-test.md +59 -0
- package/docs/how-to/run-code-on-a-form-submission.md +125 -0
- package/docs/how-to/server-render-a-page.md +81 -0
- package/docs/how-to/set-a-content-security-policy.md +32 -0
- package/docs/how-to/set-up-mfa.md +126 -0
- package/docs/how-to/switch-workspaces.md +122 -0
- package/docs/how-to/upload-and-use-an-asset.mdx +87 -0
- package/docs/how-to/validate-a-field.md +52 -0
- package/docs/how-to/wait-for-an-action-response.md +182 -0
- package/docs/how-to/write-a-condition.md +57 -0
- package/docs/how-to/write-a-predicate.md +60 -0
- package/docs/index.md +59 -0
- package/docs/reference/dashboard/actions.mdx +65 -0
- package/docs/reference/dashboard/api-keys.mdx +47 -0
- package/docs/reference/dashboard/conditions.mdx +51 -0
- package/docs/reference/dashboard/content/asset-library.mdx +74 -0
- package/docs/reference/dashboard/content/blocks.mdx +66 -0
- package/docs/reference/dashboard/content/content-entries.mdx +109 -0
- package/docs/reference/dashboard/content/models.mdx +119 -0
- package/docs/reference/dashboard/content/pages.mdx +72 -0
- package/docs/reference/dashboard/experiences.mdx +61 -0
- package/docs/reference/dashboard/external-apis.md +182 -0
- package/docs/reference/dashboard/features.mdx +165 -0
- package/docs/reference/dashboard/fields.mdx +120 -0
- package/docs/reference/dashboard/flow-builder/canvas.mdx +58 -0
- package/docs/reference/dashboard/flow-builder/condition-builder.md +69 -0
- package/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +72 -0
- package/docs/reference/dashboard/flow-builder/nodes.md +74 -0
- package/docs/reference/dashboard/labels.md +321 -0
- package/docs/reference/dashboard/lead-search.md +235 -0
- package/docs/reference/dashboard/projects.mdx +53 -0
- package/docs/reference/dashboard/reports.mdx +53 -0
- package/docs/reference/dashboard/steps.mdx +47 -0
- package/docs/reference/dashboard/team-management.md +38 -0
- package/docs/reference/dashboard/workflow-runs.md +157 -0
- package/docs/reference/dashboard/workflow-templates.md +182 -0
- package/docs/reference/dashboard/workflow-test-runs.md +85 -0
- package/docs/reference/dashboard/workspace-versioning.mdx +42 -0
- package/docs/reference/dashboard/workspaces.mdx +91 -0
- package/docs/reference/delivery-api/experience-content.md +152 -0
- package/docs/reference/delivery-api/index.md +45 -0
- package/docs/reference/delivery-api/preview-caching-crawling.md +79 -0
- package/docs/reference/delivery-api/project-config.md +65 -0
- package/docs/reference/delivery-api/workspace-schema.md +107 -0
- package/docs/reference/glossary.md +201 -0
- package/docs/reference/management-api/authentication.md +87 -0
- package/docs/reference/management-api/authorization-and-scopes.md +291 -0
- package/docs/reference/management-api/error-handling.md +232 -0
- package/docs/reference/management-api/pagination.md +192 -0
- package/docs/reference/management-api/schema/action.md +261 -0
- package/docs/reference/management-api/schema/analytics-session.md +363 -0
- package/docs/reference/management-api/schema/analytics.md +73 -0
- package/docs/reference/management-api/schema/api-key.md +170 -0
- package/docs/reference/management-api/schema/auth.md +1177 -0
- package/docs/reference/management-api/schema/cms-fields.md +954 -0
- package/docs/reference/management-api/schema/cms-models.md +1155 -0
- package/docs/reference/management-api/schema/common.md +362 -0
- package/docs/reference/management-api/schema/condition.md +254 -0
- package/docs/reference/management-api/schema/design-system.md +199 -0
- package/docs/reference/management-api/schema/experience.md +1098 -0
- package/docs/reference/management-api/schema/external-api.md +637 -0
- package/docs/reference/management-api/schema/feature.md +350 -0
- package/docs/reference/management-api/schema/feedback.md +103 -0
- package/docs/reference/management-api/schema/field.md +400 -0
- package/docs/reference/management-api/schema/index.md +243 -0
- package/docs/reference/management-api/schema/integration.md +272 -0
- package/docs/reference/management-api/schema/label.md +349 -0
- package/docs/reference/management-api/schema/lead.md +340 -0
- package/docs/reference/management-api/schema/mcp-server.md +299 -0
- package/docs/reference/management-api/schema/metric.md +223 -0
- package/docs/reference/management-api/schema/operation.md +96 -0
- package/docs/reference/management-api/schema/organization.md +749 -0
- package/docs/reference/management-api/schema/project.md +607 -0
- package/docs/reference/management-api/schema/report.md +243 -0
- package/docs/reference/management-api/schema/saved-view.md +288 -0
- package/docs/reference/management-api/schema/shopify.md +795 -0
- package/docs/reference/management-api/schema/step.md +273 -0
- package/docs/reference/management-api/schema/tenant-branding.md +185 -0
- package/docs/reference/management-api/schema/workbench.md +246 -0
- package/docs/reference/management-api/schema/workflow-run.md +263 -0
- package/docs/reference/management-api/schema/workflow.md +1110 -0
- package/docs/reference/management-api/schema/workspace-version.md +823 -0
- package/docs/reference/management-api/schema/workspace.md +917 -0
- package/docs/reference/pickedql/data-sources.md +174 -0
- package/docs/reference/pickedql/dimensions.md +103 -0
- package/docs/reference/pickedql/filtering.md +64 -0
- package/docs/reference/pickedql/index.md +18 -0
- package/docs/reference/pickedql/schema.md +172 -0
- package/docs/reference/pickedql/virtual-functions.md +248 -0
- package/docs/reference/sdk/actions.md +154 -0
- package/docs/reference/sdk/analytics-events.md +453 -0
- package/docs/reference/sdk/conditions.md +147 -0
- package/docs/reference/sdk/content-security-policy.md +21 -0
- package/docs/reference/sdk/content.md +253 -0
- package/docs/reference/sdk/experiences.md +51 -0
- package/docs/reference/sdk/features.md +256 -0
- package/docs/reference/sdk/fields.md +255 -0
- package/docs/reference/sdk/index.md +68 -0
- package/docs/reference/sdk/plugins/create-experience.md +123 -0
- package/docs/reference/sdk/plugins/dynamic-experiences.md +74 -0
- package/docs/reference/sdk/plugins/fingerprintjs.md +39 -0
- package/docs/reference/sdk/plugins/hotjar.md +60 -0
- package/docs/reference/sdk/plugins/index.md +33 -0
- package/docs/reference/sdk/plugins/sentry.md +51 -0
- package/docs/reference/sdk/plugins/shopify.md +109 -0
- package/docs/reference/sdk/plugins/window-object.md +25 -0
- package/docs/reference/sdk/predicates.md +43 -0
- package/docs/reference/sdk/react.md +61 -0
- package/docs/reference/sdk/ssr/index.md +33 -0
- package/docs/reference/sdk/ssr/rendering-and-hydration.md +103 -0
- package/docs/reference/sdk/ssr/serialize.md +80 -0
- package/docs/reference/sdk/ssr/slots-and-placements.md +113 -0
- package/docs/reference/sdk/steps.md +86 -0
- package/docs/reference/sdk/svelte.md +74 -0
- package/docs/reference/sdk/type-generation.md +265 -0
- package/docs/reference/tools/admin-api-client.md +89 -0
- package/docs/reference/tools/chrome-extension.md +16 -0
- package/docs/reference/tools/cli.md +319 -0
- package/docs/reference/tools/delivery-api-client.md +60 -0
- package/docs/reference/tools/image-optimisation-service.md +104 -0
- package/docs/reference/tools/mcp-run.md +121 -0
- package/docs/reference/tools/mcp.md +391 -0
- package/docs/reference/tools/vite-plugin.md +163 -0
- package/docs/tutorials/first-api-call.md +253 -0
- package/docs/tutorials/first-experience-in-the-dashboard.mdx +160 -0
- package/docs/tutorials/first-experience.mdx +254 -0
- package/docs/tutorials/first-server-rendered-page.mdx +186 -0
- package/package.json +8 -7
|
@@ -0,0 +1,1110 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
layout: docs
|
|
4
|
+
generated: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Workflow schema
|
|
8
|
+
|
|
9
|
+
The operations and types that `workflow.graphql` adds to the Management API. See [Management API schema](/reference/management-api/schema) for every domain, the endpoint and authentication.
|
|
10
|
+
|
|
11
|
+
## Queries
|
|
12
|
+
|
|
13
|
+
### `workflow`
|
|
14
|
+
|
|
15
|
+
Get a workflow by ID.
|
|
16
|
+
|
|
17
|
+
```graphql
|
|
18
|
+
workflow(id: ID!): Workflow @auth
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### `workflowTools`
|
|
22
|
+
|
|
23
|
+
Every tool a workflow node may run, with the arguments each accepts. Read by
|
|
24
|
+
the editor to build its node palette.
|
|
25
|
+
|
|
26
|
+
```graphql
|
|
27
|
+
workflowTools: [WorkflowToolDefinition!]! @auth
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### `workflows`
|
|
31
|
+
|
|
32
|
+
List workflows in a workspace. Filter by name with `search` (case-insensitive
|
|
33
|
+
substring) and order with `sortKey` (default `NAME`) plus `reverse`.
|
|
34
|
+
|
|
35
|
+
```graphql
|
|
36
|
+
workflows(first: Int, after: String, last: Int, before: String, workspaceId: ID!, search: String, sortKey: WorkflowSortKeys = NAME, reverse: Boolean = false): WorkflowConnection! @auth
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Mutations
|
|
40
|
+
|
|
41
|
+
### `workflowCreate`
|
|
42
|
+
|
|
43
|
+
Create a new workflow. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
|
|
44
|
+
|
|
45
|
+
```graphql
|
|
46
|
+
workflowCreate(input: WorkflowCreateInput!): WorkflowCreatePayload! @auth
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### `workflowUpdate`
|
|
50
|
+
|
|
51
|
+
Update a workflow. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
|
|
52
|
+
|
|
53
|
+
```graphql
|
|
54
|
+
workflowUpdate(input: WorkflowUpdateInput!): WorkflowUpdatePayload! @auth
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### `workflowGraphUpdate`
|
|
58
|
+
|
|
59
|
+
Apply a batch of changes to a workflow's graph, all or nothing. Requires
|
|
60
|
+
scope: `ORGANIZATION_PROJECTS_UPDATE`.
|
|
61
|
+
|
|
62
|
+
```graphql
|
|
63
|
+
workflowGraphUpdate(input: WorkflowGraphUpdateInput!): WorkflowGraphUpdatePayload! @auth
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### `workflowDelete`
|
|
67
|
+
|
|
68
|
+
Delete a workflow. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
|
|
69
|
+
|
|
70
|
+
```graphql
|
|
71
|
+
workflowDelete(input: WorkflowDeleteInput!): WorkflowDeletePayload! @auth
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### `workflowTestRun`
|
|
75
|
+
|
|
76
|
+
Walk a workflow's draft graph once against a supplied trigger input, holding
|
|
77
|
+
every write back, and return what each node did. Nothing is stored. Requires
|
|
78
|
+
scope `ORGANIZATION_WORKSPACE_UPDATE` and every scope in `Workflow.scopes`;
|
|
79
|
+
a refusal names each one missing.
|
|
80
|
+
|
|
81
|
+
```graphql
|
|
82
|
+
workflowTestRun(input: WorkflowTestRunInput!): WorkflowTestRunPayload! @auth
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Types
|
|
86
|
+
|
|
87
|
+
### `Workflow`
|
|
88
|
+
|
|
89
|
+
```graphql
|
|
90
|
+
"""
|
|
91
|
+
An automation rule: when its trigger fires, its definition runs.
|
|
92
|
+
|
|
93
|
+
The definition is a graph of `nodes` and `edges`, authored directly through
|
|
94
|
+
`workflowCreate` and `workflowGraphUpdate`.
|
|
95
|
+
"""
|
|
96
|
+
type Workflow {
|
|
97
|
+
"""Unique workflow identifier."""
|
|
98
|
+
id: ID!
|
|
99
|
+
"""Display name of the workflow."""
|
|
100
|
+
name: String!
|
|
101
|
+
"""
|
|
102
|
+
What causes this workflow to run. Chosen at create and fixed for the workflow's life.
|
|
103
|
+
"""
|
|
104
|
+
trigger: WorkflowTrigger!
|
|
105
|
+
"""
|
|
106
|
+
Scopes a run of this workflow acts with, derived from the tools its graph
|
|
107
|
+
names and rewritten whenever the graph is written. An author may only save a
|
|
108
|
+
graph naming tools they hold these for.
|
|
109
|
+
"""
|
|
110
|
+
scopes: [Scope!]!
|
|
111
|
+
"""Nodes in the workflow graph, typed by their `__typename`."""
|
|
112
|
+
nodes: [WorkflowNode!]!
|
|
113
|
+
"""Edges connecting nodes in the workflow graph."""
|
|
114
|
+
edges: [WorkflowEdge!]!
|
|
115
|
+
"""
|
|
116
|
+
How many times a run may visit any one node, from 1 to 100; 10 unless set. A run that
|
|
117
|
+
arrives at a node it has already visited this many times fails with `loop_limit_reached`.
|
|
118
|
+
"""
|
|
119
|
+
maxNodeVisits: Int!
|
|
120
|
+
"""When this workflow was created."""
|
|
121
|
+
createdAt: DateTime!
|
|
122
|
+
"""When this workflow was last updated."""
|
|
123
|
+
updatedAt: DateTime!
|
|
124
|
+
"""The workspace this workflow belongs to."""
|
|
125
|
+
workspace: Workspace!
|
|
126
|
+
"""
|
|
127
|
+
The workspace ID this workflow belongs to (denormalised for query convenience).
|
|
128
|
+
"""
|
|
129
|
+
workspaceId: ID
|
|
130
|
+
"""
|
|
131
|
+
Every path this workflow's templates and rules may address: `trigger`, `nodes.<id>` by
|
|
132
|
+
the tool the node runs, and the run's variables beneath `run`, `workflow` and `current`.
|
|
133
|
+
Read by the editor's reference picker and its condition builder.
|
|
134
|
+
"""
|
|
135
|
+
references: WorkflowReferences!
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### `WorkflowTriggerType`
|
|
140
|
+
|
|
141
|
+
```graphql
|
|
142
|
+
"""
|
|
143
|
+
Which kind of trigger this is: what tells `WorkflowEventTrigger` and `WorkflowActionTrigger` apart.
|
|
144
|
+
"""
|
|
145
|
+
enum WorkflowTriggerType {
|
|
146
|
+
"""A domain event starts the run."""
|
|
147
|
+
EVENT
|
|
148
|
+
"""One action starts the run."""
|
|
149
|
+
ACTION
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### `WorkflowEventName`
|
|
154
|
+
|
|
155
|
+
```graphql
|
|
156
|
+
"""
|
|
157
|
+
Domain events a workflow can be bound to.
|
|
158
|
+
|
|
159
|
+
An action is reached through an `ACTION` trigger rather than an event, so that a
|
|
160
|
+
workflow names the one action it answers to.
|
|
161
|
+
"""
|
|
162
|
+
enum WorkflowEventName {
|
|
163
|
+
"""A workspace was created."""
|
|
164
|
+
WORKSPACE_CREATED
|
|
165
|
+
"""A workspace was updated."""
|
|
166
|
+
WORKSPACE_UPDATED
|
|
167
|
+
"""A workspace was deleted."""
|
|
168
|
+
WORKSPACE_DELETED
|
|
169
|
+
"""A workspace version was published."""
|
|
170
|
+
WORKSPACE_PUBLISHED
|
|
171
|
+
"""A feature was created."""
|
|
172
|
+
FEATURE_CREATED
|
|
173
|
+
"""A feature was updated."""
|
|
174
|
+
FEATURE_UPDATED
|
|
175
|
+
"""A feature was deleted."""
|
|
176
|
+
FEATURE_DELETED
|
|
177
|
+
"""A step was deleted."""
|
|
178
|
+
STEP_DELETED
|
|
179
|
+
"""A condition was deleted."""
|
|
180
|
+
CONDITION_DELETED
|
|
181
|
+
"""An action was deleted."""
|
|
182
|
+
ACTION_DELETED
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### `WorkflowTrigger`
|
|
187
|
+
|
|
188
|
+
```graphql
|
|
189
|
+
"""
|
|
190
|
+
What starts a workflow's run. Use `__typename` to discriminate the implementation.
|
|
191
|
+
"""
|
|
192
|
+
interface WorkflowTrigger {
|
|
193
|
+
"""Which kind this is. `__typename` says the same thing."""
|
|
194
|
+
type: WorkflowTriggerType!
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### `WorkflowEventTrigger`
|
|
199
|
+
|
|
200
|
+
```graphql
|
|
201
|
+
"""A workflow started by a domain event."""
|
|
202
|
+
type WorkflowEventTrigger implements WorkflowTrigger {
|
|
203
|
+
type: WorkflowTriggerType!
|
|
204
|
+
"""The event that starts the run."""
|
|
205
|
+
eventName: WorkflowEventName!
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### `WorkflowActionTrigger`
|
|
210
|
+
|
|
211
|
+
```graphql
|
|
212
|
+
"""
|
|
213
|
+
A workflow started by one action. An action starts at most one workflow.
|
|
214
|
+
"""
|
|
215
|
+
type WorkflowActionTrigger implements WorkflowTrigger {
|
|
216
|
+
type: WorkflowTriggerType!
|
|
217
|
+
"""ID of the action whose run starts the workflow."""
|
|
218
|
+
actionId: ID!
|
|
219
|
+
"""
|
|
220
|
+
The action whose run starts the workflow. Null once that action is deleted.
|
|
221
|
+
"""
|
|
222
|
+
action: Action
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### `WorkflowTriggerInput`
|
|
227
|
+
|
|
228
|
+
```graphql
|
|
229
|
+
"""
|
|
230
|
+
Input form of a workflow's trigger. Only the field matching `type` is read.
|
|
231
|
+
"""
|
|
232
|
+
input WorkflowTriggerInput {
|
|
233
|
+
"""Which kind of trigger this is."""
|
|
234
|
+
type: WorkflowTriggerType!
|
|
235
|
+
"""For EVENT triggers: the domain event that starts the run."""
|
|
236
|
+
eventName: WorkflowEventName
|
|
237
|
+
"""
|
|
238
|
+
For ACTION triggers: the action to bind, which must start no workflow yet.
|
|
239
|
+
"""
|
|
240
|
+
actionId: ID
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### `WorkflowNodeType`
|
|
245
|
+
|
|
246
|
+
```graphql
|
|
247
|
+
"""Which kind of node this is: what tells the four node types apart."""
|
|
248
|
+
enum WorkflowNodeType {
|
|
249
|
+
"""Where a run starts. Exactly one per workflow."""
|
|
250
|
+
ORIGIN
|
|
251
|
+
"""A node that runs a registered tool."""
|
|
252
|
+
TOOL
|
|
253
|
+
"""A node that branches the run on a rule."""
|
|
254
|
+
CONDITION
|
|
255
|
+
"""A node that suspends the run for a duration."""
|
|
256
|
+
SLEEP
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### `WorkflowEdgeHandle`
|
|
261
|
+
|
|
262
|
+
```graphql
|
|
263
|
+
"""
|
|
264
|
+
Edge handle for `WorkflowConditionNode` outgoing edges. Picks which branch the
|
|
265
|
+
run follows when the condition resolves true / false.
|
|
266
|
+
"""
|
|
267
|
+
enum WorkflowEdgeHandle {
|
|
268
|
+
"""The TRUE branch of a condition."""
|
|
269
|
+
TRUE
|
|
270
|
+
"""The FALSE branch of a condition."""
|
|
271
|
+
FALSE
|
|
272
|
+
"""A tool's error exit, which a run follows when the tool fails."""
|
|
273
|
+
ERROR
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### `WorkflowNode`
|
|
278
|
+
|
|
279
|
+
```graphql
|
|
280
|
+
"""
|
|
281
|
+
A node in the workflow graph. Use `__typename` to discriminate the implementation.
|
|
282
|
+
"""
|
|
283
|
+
interface WorkflowNode {
|
|
284
|
+
"""
|
|
285
|
+
Stable node identifier within the graph, and the run's durable step id.
|
|
286
|
+
"""
|
|
287
|
+
id: ID!
|
|
288
|
+
"""Which kind of node this is. `__typename` says the same thing."""
|
|
289
|
+
type: WorkflowNodeType!
|
|
290
|
+
"""Canvas position for the dashboard editor."""
|
|
291
|
+
position: Position!
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### `WorkflowOriginNode`
|
|
296
|
+
|
|
297
|
+
```graphql
|
|
298
|
+
"""
|
|
299
|
+
Where a run starts. Exactly one per workflow.
|
|
300
|
+
|
|
301
|
+
It carries no trigger: what starts a workflow is the workflow's own `trigger`.
|
|
302
|
+
"""
|
|
303
|
+
type WorkflowOriginNode implements WorkflowNode {
|
|
304
|
+
id: ID!
|
|
305
|
+
type: WorkflowNodeType!
|
|
306
|
+
position: Position!
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### `WorkflowToolNode`
|
|
311
|
+
|
|
312
|
+
```graphql
|
|
313
|
+
"""A node that runs a registered tool with the given configuration."""
|
|
314
|
+
type WorkflowToolNode implements WorkflowNode {
|
|
315
|
+
id: ID!
|
|
316
|
+
type: WorkflowNodeType!
|
|
317
|
+
position: Position!
|
|
318
|
+
"""Name of the tool this node runs."""
|
|
319
|
+
tool: String!
|
|
320
|
+
"""Values for the arguments that tool declares."""
|
|
321
|
+
configuration: JSON!
|
|
322
|
+
}
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### `WorkflowConditionNode`
|
|
326
|
+
|
|
327
|
+
```graphql
|
|
328
|
+
"""
|
|
329
|
+
A node that branches the run. Outgoing edges carry `sourceHandle: TRUE | FALSE`.
|
|
330
|
+
"""
|
|
331
|
+
type WorkflowConditionNode implements WorkflowNode {
|
|
332
|
+
id: ID!
|
|
333
|
+
type: WorkflowNodeType!
|
|
334
|
+
position: Position!
|
|
335
|
+
"""The rule evaluated when the run reaches this node."""
|
|
336
|
+
logic: JSON!
|
|
337
|
+
}
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### `WorkflowSleepNode`
|
|
341
|
+
|
|
342
|
+
```graphql
|
|
343
|
+
"""A node that suspends the run."""
|
|
344
|
+
type WorkflowSleepNode implements WorkflowNode {
|
|
345
|
+
id: ID!
|
|
346
|
+
type: WorkflowNodeType!
|
|
347
|
+
position: Position!
|
|
348
|
+
"""
|
|
349
|
+
How long the run suspends for, as a count and a unit: `500ms`, `30s`, `5m`, `2h`, `1d`. At most one day.
|
|
350
|
+
"""
|
|
351
|
+
duration: String!
|
|
352
|
+
}
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### `WorkflowEdge`
|
|
356
|
+
|
|
357
|
+
```graphql
|
|
358
|
+
"""An edge connecting two nodes in the workflow graph."""
|
|
359
|
+
type WorkflowEdge {
|
|
360
|
+
"""Stable edge identifier within the graph."""
|
|
361
|
+
id: ID!
|
|
362
|
+
"""Node the edge leaves."""
|
|
363
|
+
sourceNodeId: ID!
|
|
364
|
+
"""Node the edge arrives at."""
|
|
365
|
+
destinationNodeId: ID!
|
|
366
|
+
"""
|
|
367
|
+
The exit the edge leaves by: a `WorkflowConditionNode` branch (TRUE / FALSE), or a `WorkflowToolNode`'s error exit (ERROR).
|
|
368
|
+
"""
|
|
369
|
+
sourceHandle: WorkflowEdgeHandle
|
|
370
|
+
}
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### `WorkflowToolNodeInput`
|
|
374
|
+
|
|
375
|
+
```graphql
|
|
376
|
+
"""
|
|
377
|
+
The data a `TOOL` node carries: which registered tool runs, and with what.
|
|
378
|
+
|
|
379
|
+
A tool's arguments belong to one node in one workflow, so they sit on the node
|
|
380
|
+
rather than on an entity of their own.
|
|
381
|
+
"""
|
|
382
|
+
input WorkflowToolNodeInput {
|
|
383
|
+
"""Name of a registered tool, as `workflowTools` lists it."""
|
|
384
|
+
name: String!
|
|
385
|
+
"""
|
|
386
|
+
Values for the arguments that tool declares. Omit for a tool that takes none.
|
|
387
|
+
"""
|
|
388
|
+
configuration: JSON
|
|
389
|
+
}
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
### `WorkflowConditionNodeInput`
|
|
393
|
+
|
|
394
|
+
```graphql
|
|
395
|
+
"""The data a `CONDITION` node carries: the rule that picks the branch."""
|
|
396
|
+
input WorkflowConditionNodeInput {
|
|
397
|
+
"""
|
|
398
|
+
The rule evaluated when the run reaches the node. Outgoing edges carry `sourceHandle`.
|
|
399
|
+
"""
|
|
400
|
+
logic: JSON!
|
|
401
|
+
}
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
### `WorkflowSleepNodeInput`
|
|
405
|
+
|
|
406
|
+
```graphql
|
|
407
|
+
"""The data a `SLEEP` node carries: how long the run suspends."""
|
|
408
|
+
input WorkflowSleepNodeInput {
|
|
409
|
+
"""A count and a unit: `500ms`, `30s`, `5m`, `2h`, `1d`. At most one day."""
|
|
410
|
+
duration: String!
|
|
411
|
+
}
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### `WorkflowNodeInput`
|
|
415
|
+
|
|
416
|
+
```graphql
|
|
417
|
+
"""
|
|
418
|
+
Input form of a node in the workflow graph. Every node carries an id, a kind and
|
|
419
|
+
a position; the block matching its kind carries the rest. `ORIGIN` has no block.
|
|
420
|
+
"""
|
|
421
|
+
input WorkflowNodeInput {
|
|
422
|
+
"""Graph-unique identifier, and the run's durable step id."""
|
|
423
|
+
id: ID!
|
|
424
|
+
"""Which kind of node to create."""
|
|
425
|
+
type: WorkflowNodeType!
|
|
426
|
+
"""Canvas position."""
|
|
427
|
+
position: PositionInput!
|
|
428
|
+
"""For TOOL nodes: the tool to run and its arguments."""
|
|
429
|
+
tool: WorkflowToolNodeInput
|
|
430
|
+
"""For CONDITION nodes: the rule that picks the branch."""
|
|
431
|
+
condition: WorkflowConditionNodeInput
|
|
432
|
+
"""For SLEEP nodes: how long the run suspends."""
|
|
433
|
+
sleep: WorkflowSleepNodeInput
|
|
434
|
+
}
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### `WorkflowEdgeInput`
|
|
438
|
+
|
|
439
|
+
```graphql
|
|
440
|
+
"""Input form of an edge in the workflow graph."""
|
|
441
|
+
input WorkflowEdgeInput {
|
|
442
|
+
"""Graph-unique identifier."""
|
|
443
|
+
id: ID!
|
|
444
|
+
"""Node the edge leaves."""
|
|
445
|
+
sourceNodeId: ID!
|
|
446
|
+
"""Node the edge arrives at."""
|
|
447
|
+
destinationNodeId: ID!
|
|
448
|
+
"""
|
|
449
|
+
The exit the edge leaves by: a `WorkflowConditionNode` branch (TRUE / FALSE), or a `WorkflowToolNode`'s error exit (ERROR).
|
|
450
|
+
"""
|
|
451
|
+
sourceHandle: WorkflowEdgeHandle
|
|
452
|
+
}
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
### `WorkflowArgumentType`
|
|
456
|
+
|
|
457
|
+
```graphql
|
|
458
|
+
"""
|
|
459
|
+
The type an argument takes.
|
|
460
|
+
|
|
461
|
+
Every argument also accepts a Liquid template — `{{ nodes.n1.leads[0].id }}` — in place of a
|
|
462
|
+
literal. A template that is the whole value keeps the type of what it names; one mixed with
|
|
463
|
+
text renders to text and is read as the declared type when the node runs.
|
|
464
|
+
"""
|
|
465
|
+
enum WorkflowArgumentType {
|
|
466
|
+
"""A text value."""
|
|
467
|
+
STRING
|
|
468
|
+
"""A numeric value."""
|
|
469
|
+
NUMBER
|
|
470
|
+
"""A true / false value."""
|
|
471
|
+
BOOLEAN
|
|
472
|
+
"""Any JSON value."""
|
|
473
|
+
JSON
|
|
474
|
+
"""
|
|
475
|
+
A query over one resource, written as a string in that resource's own query language.
|
|
476
|
+
A template may stand in a clause's value and nowhere else.
|
|
477
|
+
"""
|
|
478
|
+
QUERY
|
|
479
|
+
"""
|
|
480
|
+
One record of the resource type `resourceType` names, written as a reference to it.
|
|
481
|
+
The value resolves to that record's identifier before the tool runs.
|
|
482
|
+
"""
|
|
483
|
+
REFERENCE
|
|
484
|
+
}
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
### `WorkflowToolArgument`
|
|
488
|
+
|
|
489
|
+
```graphql
|
|
490
|
+
"""One argument a tool accepts."""
|
|
491
|
+
type WorkflowToolArgument {
|
|
492
|
+
"""Argument name, as it appears in a tool node's `configuration`."""
|
|
493
|
+
name: String!
|
|
494
|
+
"""
|
|
495
|
+
The argument's name for authors, such as `Lead`, which an editor's form field takes.
|
|
496
|
+
"""
|
|
497
|
+
label: String!
|
|
498
|
+
"""The type the argument takes."""
|
|
499
|
+
type: WorkflowArgumentType!
|
|
500
|
+
"""
|
|
501
|
+
For a `JSON` argument, the structured shape its value takes, such as `labels` — the
|
|
502
|
+
editor renders the control that shape calls for and validates against it. Null for
|
|
503
|
+
free-form JSON. Unlike `type` this vocabulary is open: an editor that does not know the
|
|
504
|
+
shape edits the value as raw JSON.
|
|
505
|
+
"""
|
|
506
|
+
shape: String
|
|
507
|
+
"""
|
|
508
|
+
For a `REFERENCE` argument, the resource type the value must name, such as `Lead` — the
|
|
509
|
+
editor offers only the paths that produce one. Null otherwise. Like `shape` this
|
|
510
|
+
vocabulary is open, and it is matched against `WorkflowReferenceEntry.resourceType` by
|
|
511
|
+
equality.
|
|
512
|
+
"""
|
|
513
|
+
resourceType: String
|
|
514
|
+
"""
|
|
515
|
+
For a `STRING` argument, the literals it admits, so the editor offers a choice rather
|
|
516
|
+
than free text. Null when the argument takes any string.
|
|
517
|
+
"""
|
|
518
|
+
options: [String!]
|
|
519
|
+
"""Whether the argument must be given."""
|
|
520
|
+
required: Boolean!
|
|
521
|
+
"""What the argument is for."""
|
|
522
|
+
description: String!
|
|
523
|
+
}
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
### `WorkflowToolDefinition`
|
|
527
|
+
|
|
528
|
+
```graphql
|
|
529
|
+
"""A tool a workflow node may run."""
|
|
530
|
+
type WorkflowToolDefinition {
|
|
531
|
+
"""Name a node references."""
|
|
532
|
+
name: String!
|
|
533
|
+
"""The tool's name for authors, such as `External endpoint`."""
|
|
534
|
+
label: String!
|
|
535
|
+
"""What the tool does."""
|
|
536
|
+
description: String!
|
|
537
|
+
"""The arguments it accepts."""
|
|
538
|
+
arguments: [WorkflowToolArgument!]!
|
|
539
|
+
"""
|
|
540
|
+
The scopes a run must hold for this tool to run. Empty for a tool that touches
|
|
541
|
+
no data. Read by the editor to show which tools the viewer can place.
|
|
542
|
+
"""
|
|
543
|
+
scopes: [Scope!]!
|
|
544
|
+
}
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
### `WorkflowReferenceType`
|
|
548
|
+
|
|
549
|
+
```graphql
|
|
550
|
+
"""How a reference entry's value reads."""
|
|
551
|
+
enum WorkflowReferenceType {
|
|
552
|
+
"""A text value."""
|
|
553
|
+
STRING
|
|
554
|
+
"""A numeric value."""
|
|
555
|
+
NUMBER
|
|
556
|
+
"""A true / false value."""
|
|
557
|
+
BOOLEAN
|
|
558
|
+
"""Any JSON value; paths beneath it are not listed."""
|
|
559
|
+
JSON
|
|
560
|
+
"""A record whose fields are listed beneath it."""
|
|
561
|
+
OBJECT
|
|
562
|
+
"""
|
|
563
|
+
A list of records, addressed by index; `.0.` entries describe each item and `.truncated` says whether the list was cut at its bound.
|
|
564
|
+
"""
|
|
565
|
+
COLLECTION
|
|
566
|
+
}
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
### `WorkflowReferenceEntry`
|
|
570
|
+
|
|
571
|
+
```graphql
|
|
572
|
+
"""
|
|
573
|
+
One path a workflow's templates and rules may address, with what the picker shows for it.
|
|
574
|
+
|
|
575
|
+
The path is relative to its owner and written in the dotted form a rule reads —
|
|
576
|
+
`action.responses.email` beneath `trigger`, `leads.0.id` beneath `nodes.<id>`, and
|
|
577
|
+
`current.startedAt` from the root for a variable. A template writes an index as
|
|
578
|
+
`leads[0].id`.
|
|
579
|
+
"""
|
|
580
|
+
type WorkflowReferenceEntry {
|
|
581
|
+
"""The path, relative to its owner."""
|
|
582
|
+
path: String!
|
|
583
|
+
"""How the value reads."""
|
|
584
|
+
type: WorkflowReferenceType!
|
|
585
|
+
"""A human-readable label."""
|
|
586
|
+
label: String!
|
|
587
|
+
"""A few words on what the path holds, shown beneath the label."""
|
|
588
|
+
description: String!
|
|
589
|
+
"""A representative value, declared with the tool."""
|
|
590
|
+
example: JSON!
|
|
591
|
+
"""
|
|
592
|
+
The resource type this path materialises to, such as `Lead`, for a path that names a
|
|
593
|
+
whole record or that record's identifier. Null for everything else. Matched against
|
|
594
|
+
`WorkflowToolArgument.resourceType` by equality.
|
|
595
|
+
"""
|
|
596
|
+
resourceType: String
|
|
597
|
+
}
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
### `WorkflowToolReferences`
|
|
601
|
+
|
|
602
|
+
```graphql
|
|
603
|
+
"""
|
|
604
|
+
The paths one tool's output makes addressable beneath `nodes.<id>` for every node running it.
|
|
605
|
+
"""
|
|
606
|
+
type WorkflowToolReferences {
|
|
607
|
+
"""The tool name, as a node's `tool` names it."""
|
|
608
|
+
tool: String!
|
|
609
|
+
"""The addressable paths, relative to the node."""
|
|
610
|
+
entries: [WorkflowReferenceEntry!]!
|
|
611
|
+
}
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
### `WorkflowReferences`
|
|
615
|
+
|
|
616
|
+
```graphql
|
|
617
|
+
"""
|
|
618
|
+
Everything one workflow's templates and rules may address: the trigger, resolved from the
|
|
619
|
+
workflow's trigger, each tool's output with its shapes resolved against the workspace's
|
|
620
|
+
fields, and the run's variables. The editor filters the tool outputs to the nodes upstream of
|
|
621
|
+
the one being edited.
|
|
622
|
+
"""
|
|
623
|
+
type WorkflowReferences {
|
|
624
|
+
"""
|
|
625
|
+
Paths beneath `trigger`: `action` and its responses on an action-triggered workflow, `event` on an event-triggered one.
|
|
626
|
+
"""
|
|
627
|
+
trigger: [WorkflowReferenceEntry!]!
|
|
628
|
+
"""Paths beneath `nodes.<id>`, by the tool the node runs."""
|
|
629
|
+
tools: [WorkflowToolReferences!]!
|
|
630
|
+
"""
|
|
631
|
+
The run's variables, the same on every workflow, each path written from its root:
|
|
632
|
+
`run.id`, `run.startedAt` and `run.preview` for the run; `workflow.id` and
|
|
633
|
+
`workflow.name` for the workflow; `current.id`, `current.startedAt` and `current.visit`
|
|
634
|
+
for the node that reads them. Times are ISO 8601 in UTC. A save refuses any other path
|
|
635
|
+
beneath these three roots.
|
|
636
|
+
"""
|
|
637
|
+
variables: [WorkflowReferenceEntry!]!
|
|
638
|
+
}
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
### `WorkflowChangesInput`
|
|
642
|
+
|
|
643
|
+
```graphql
|
|
644
|
+
"""Container for all change operations on a workflow graph."""
|
|
645
|
+
input WorkflowChangesInput {
|
|
646
|
+
"""Node changes in the workflow graph."""
|
|
647
|
+
nodes: WorkflowNodeChangesInput
|
|
648
|
+
"""Edge changes connecting nodes."""
|
|
649
|
+
edges: WorkflowEdgeChangesInput
|
|
650
|
+
}
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
### `WorkflowNodeChangesInput`
|
|
654
|
+
|
|
655
|
+
```graphql
|
|
656
|
+
"""Node-level changes within a `workflowGraphUpdate` batch."""
|
|
657
|
+
input WorkflowNodeChangesInput {
|
|
658
|
+
"""
|
|
659
|
+
Nodes to create, each named by its `clientId` until the server mints its id.
|
|
660
|
+
"""
|
|
661
|
+
create: [WorkflowNodeCreateData!]
|
|
662
|
+
"""
|
|
663
|
+
Fields to merge into the nodes they name. An id the graph lacks is ignored.
|
|
664
|
+
"""
|
|
665
|
+
update: [WorkflowNodeUpdateData!]
|
|
666
|
+
"""Node ids to delete. Edges touching a deleted node are dropped with it."""
|
|
667
|
+
delete: [ID!]
|
|
668
|
+
}
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
### `WorkflowNodeCreateData`
|
|
672
|
+
|
|
673
|
+
```graphql
|
|
674
|
+
"""
|
|
675
|
+
A node to add to the graph. The block matching `type` carries its data.
|
|
676
|
+
"""
|
|
677
|
+
input WorkflowNodeCreateData {
|
|
678
|
+
"""
|
|
679
|
+
Client-generated id, for cross-referencing from edges in the same change set.
|
|
680
|
+
The server mints the persisted id and returns the pair in `idMappings`.
|
|
681
|
+
"""
|
|
682
|
+
clientId: ID!
|
|
683
|
+
"""Which kind of node to create."""
|
|
684
|
+
type: WorkflowNodeType!
|
|
685
|
+
"""Canvas position."""
|
|
686
|
+
position: PositionInput!
|
|
687
|
+
"""For TOOL nodes: the tool to run and its arguments."""
|
|
688
|
+
tool: WorkflowToolNodeInput
|
|
689
|
+
"""For CONDITION nodes: the rule that picks the branch."""
|
|
690
|
+
condition: WorkflowConditionNodeInput
|
|
691
|
+
"""For SLEEP nodes: how long the run suspends."""
|
|
692
|
+
sleep: WorkflowSleepNodeInput
|
|
693
|
+
}
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
### `WorkflowNodeUpdateData`
|
|
697
|
+
|
|
698
|
+
```graphql
|
|
699
|
+
"""
|
|
700
|
+
Fields to merge into an existing node. Omit a field to leave it unchanged; a
|
|
701
|
+
kind block that is given replaces that kind's data whole.
|
|
702
|
+
"""
|
|
703
|
+
input WorkflowNodeUpdateData {
|
|
704
|
+
"""Id of the node to change."""
|
|
705
|
+
id: ID!
|
|
706
|
+
"""New canvas position."""
|
|
707
|
+
position: PositionInput
|
|
708
|
+
"""For TOOL nodes: the tool to run and its arguments."""
|
|
709
|
+
tool: WorkflowToolNodeInput
|
|
710
|
+
"""For CONDITION nodes: the rule that picks the branch."""
|
|
711
|
+
condition: WorkflowConditionNodeInput
|
|
712
|
+
"""For SLEEP nodes: how long the run suspends."""
|
|
713
|
+
sleep: WorkflowSleepNodeInput
|
|
714
|
+
}
|
|
715
|
+
```
|
|
716
|
+
|
|
717
|
+
### `WorkflowEdgeChangesInput`
|
|
718
|
+
|
|
719
|
+
```graphql
|
|
720
|
+
"""Edge-level changes within a `workflowGraphUpdate` batch."""
|
|
721
|
+
input WorkflowEdgeChangesInput {
|
|
722
|
+
"""
|
|
723
|
+
Edges to create, each named by its `clientId` until the server mints its id.
|
|
724
|
+
"""
|
|
725
|
+
create: [WorkflowEdgeCreateInput!]
|
|
726
|
+
"""
|
|
727
|
+
Fields to merge into the edges they name. An id the graph lacks is ignored.
|
|
728
|
+
"""
|
|
729
|
+
update: [WorkflowEdgeUpdateInput!]
|
|
730
|
+
"""Edge ids to delete."""
|
|
731
|
+
delete: [ID!]
|
|
732
|
+
}
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
### `WorkflowEdgeCreateInput`
|
|
736
|
+
|
|
737
|
+
```graphql
|
|
738
|
+
"""
|
|
739
|
+
An edge to add to the graph. Each endpoint is named one way: by its persisted id, or by the client id of a node created in the same change set.
|
|
740
|
+
"""
|
|
741
|
+
input WorkflowEdgeCreateInput {
|
|
742
|
+
"""
|
|
743
|
+
Client-generated id. The server mints the persisted id and returns the pair in `idMappings`.
|
|
744
|
+
"""
|
|
745
|
+
clientId: ID!
|
|
746
|
+
"""
|
|
747
|
+
Node the edge leaves, by persisted id. Mutually exclusive with `sourceNodeClientId`.
|
|
748
|
+
"""
|
|
749
|
+
sourceNodeId: ID
|
|
750
|
+
"""
|
|
751
|
+
Node the edge leaves, created in this same change set. Mutually exclusive with `sourceNodeId`.
|
|
752
|
+
"""
|
|
753
|
+
sourceNodeClientId: ID
|
|
754
|
+
"""
|
|
755
|
+
Node the edge arrives at, by persisted id. Mutually exclusive with `destinationNodeClientId`.
|
|
756
|
+
"""
|
|
757
|
+
destinationNodeId: ID
|
|
758
|
+
"""
|
|
759
|
+
Node the edge arrives at, created in this same change set. Mutually exclusive with `destinationNodeId`.
|
|
760
|
+
"""
|
|
761
|
+
destinationNodeClientId: ID
|
|
762
|
+
"""
|
|
763
|
+
The exit the edge leaves by: a `WorkflowConditionNode` branch (TRUE / FALSE), or a `WorkflowToolNode`'s error exit (ERROR).
|
|
764
|
+
"""
|
|
765
|
+
sourceHandle: WorkflowEdgeHandle
|
|
766
|
+
}
|
|
767
|
+
```
|
|
768
|
+
|
|
769
|
+
### `WorkflowEdgeUpdateInput`
|
|
770
|
+
|
|
771
|
+
```graphql
|
|
772
|
+
"""
|
|
773
|
+
Fields to merge into an existing edge. Omit a field to leave it unchanged.
|
|
774
|
+
"""
|
|
775
|
+
input WorkflowEdgeUpdateInput {
|
|
776
|
+
"""Id of the edge to change."""
|
|
777
|
+
id: ID!
|
|
778
|
+
"""New source node id."""
|
|
779
|
+
sourceNodeId: ID
|
|
780
|
+
"""New destination node id."""
|
|
781
|
+
destinationNodeId: ID
|
|
782
|
+
"""New exit: TRUE or FALSE off a condition, ERROR off a tool."""
|
|
783
|
+
sourceHandle: WorkflowEdgeHandle
|
|
784
|
+
}
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
### `WorkflowConnection`
|
|
788
|
+
|
|
789
|
+
```graphql
|
|
790
|
+
"""
|
|
791
|
+
Relay-style connection of workflows, with both an `edges` list and a flat `nodes` accessor.
|
|
792
|
+
"""
|
|
793
|
+
type WorkflowConnection {
|
|
794
|
+
"""List of workflow edges."""
|
|
795
|
+
edges: [WorkflowConnectionEdge!]!
|
|
796
|
+
"""
|
|
797
|
+
Flat list of workflows, equivalent to `edges[].node`. Convenience accessor.
|
|
798
|
+
"""
|
|
799
|
+
nodes: [Workflow!]!
|
|
800
|
+
"""Pagination metadata."""
|
|
801
|
+
pageInfo: PageInfo!
|
|
802
|
+
"""Total number of workflows."""
|
|
803
|
+
totalCount: Int!
|
|
804
|
+
}
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
### `WorkflowConnectionEdge`
|
|
808
|
+
|
|
809
|
+
```graphql
|
|
810
|
+
"""Edge type for `WorkflowConnection`."""
|
|
811
|
+
type WorkflowConnectionEdge {
|
|
812
|
+
"""Pagination cursor for this edge."""
|
|
813
|
+
cursor: String!
|
|
814
|
+
"""The workflow."""
|
|
815
|
+
node: Workflow!
|
|
816
|
+
}
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
### `WorkflowCreateInput`
|
|
820
|
+
|
|
821
|
+
```graphql
|
|
822
|
+
"""Input for `workflowCreate`."""
|
|
823
|
+
input WorkflowCreateInput {
|
|
824
|
+
"""Workspace ID to create the workflow in."""
|
|
825
|
+
workspaceId: ID!
|
|
826
|
+
"""
|
|
827
|
+
Display name. Omit it to derive one from the trigger, suffixed until unused.
|
|
828
|
+
"""
|
|
829
|
+
name: String
|
|
830
|
+
"""What causes this workflow to run."""
|
|
831
|
+
trigger: WorkflowTriggerInput!
|
|
832
|
+
"""Nodes of the graph to build. The `ORIGIN` node is added automatically."""
|
|
833
|
+
nodes: [WorkflowNodeInput!]
|
|
834
|
+
"""Edges of the graph to build. Read only when `nodes` is given."""
|
|
835
|
+
edges: [WorkflowEdgeInput!]
|
|
836
|
+
}
|
|
837
|
+
```
|
|
838
|
+
|
|
839
|
+
### `WorkflowCreatePayload`
|
|
840
|
+
|
|
841
|
+
```graphql
|
|
842
|
+
"""Payload returned by `workflowCreate`."""
|
|
843
|
+
type WorkflowCreatePayload {
|
|
844
|
+
"""The created workflow."""
|
|
845
|
+
workflow: Workflow
|
|
846
|
+
}
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
### `WorkflowUpdateInput`
|
|
850
|
+
|
|
851
|
+
```graphql
|
|
852
|
+
"""
|
|
853
|
+
Input for `workflowUpdate`. Omit a field to leave it unchanged. The trigger is fixed at create.
|
|
854
|
+
"""
|
|
855
|
+
input WorkflowUpdateInput {
|
|
856
|
+
"""Workflow ID."""
|
|
857
|
+
id: ID!
|
|
858
|
+
"""New display name."""
|
|
859
|
+
name: String
|
|
860
|
+
"""
|
|
861
|
+
How many times a run may visit any one node, from 1 to 100. A value outside that range is refused.
|
|
862
|
+
"""
|
|
863
|
+
maxNodeVisits: Int
|
|
864
|
+
}
|
|
865
|
+
```
|
|
866
|
+
|
|
867
|
+
### `WorkflowGraphUpdateInput`
|
|
868
|
+
|
|
869
|
+
```graphql
|
|
870
|
+
"""
|
|
871
|
+
Input for `workflowGraphUpdate`.
|
|
872
|
+
|
|
873
|
+
The whole change set is applied or none of it is: the graph is validated once,
|
|
874
|
+
after every change lands, so a set that would leave it unrunnable is refused
|
|
875
|
+
entire and nothing is written.
|
|
876
|
+
"""
|
|
877
|
+
input WorkflowGraphUpdateInput {
|
|
878
|
+
"""The workflow to update."""
|
|
879
|
+
workflowId: ID!
|
|
880
|
+
"""New display name."""
|
|
881
|
+
name: String
|
|
882
|
+
"""
|
|
883
|
+
How many times a run may visit any one node, from 1 to 100, set with the change set.
|
|
884
|
+
A value outside that range comes back in `errors` and nothing is written.
|
|
885
|
+
"""
|
|
886
|
+
maxNodeVisits: Int
|
|
887
|
+
"""All changes to apply to the workflow graph."""
|
|
888
|
+
changes: WorkflowChangesInput!
|
|
889
|
+
}
|
|
890
|
+
```
|
|
891
|
+
|
|
892
|
+
### `WorkflowGraphUpdatePayload`
|
|
893
|
+
|
|
894
|
+
```graphql
|
|
895
|
+
"""Payload returned by `workflowGraphUpdate`."""
|
|
896
|
+
type WorkflowGraphUpdatePayload {
|
|
897
|
+
"""
|
|
898
|
+
The updated workflow with all changes applied, or null when `errors` is non-empty.
|
|
899
|
+
"""
|
|
900
|
+
workflow: Workflow
|
|
901
|
+
"""Validation errors. An empty array indicates success."""
|
|
902
|
+
errors: [UserError!]!
|
|
903
|
+
"""
|
|
904
|
+
What the author should look at on a graph that saved. The change was written;
|
|
905
|
+
each entry names a node that will not do what its author meant when the
|
|
906
|
+
workflow runs: one no path from the origin reaches, a sleep of no length, or
|
|
907
|
+
one calling an origin the project has not registered as an external API.
|
|
908
|
+
Empty when `errors` is non-empty.
|
|
909
|
+
"""
|
|
910
|
+
warnings: [UserError!]!
|
|
911
|
+
"""
|
|
912
|
+
The persisted id minted for each created node and edge. Empty when `errors` is non-empty.
|
|
913
|
+
"""
|
|
914
|
+
idMappings: WorkflowIdMappings!
|
|
915
|
+
}
|
|
916
|
+
```
|
|
917
|
+
|
|
918
|
+
### `WorkflowIdMappings`
|
|
919
|
+
|
|
920
|
+
```graphql
|
|
921
|
+
"""
|
|
922
|
+
The persisted ids a change set's creates were given, keyed by the client ids that named them.
|
|
923
|
+
"""
|
|
924
|
+
type WorkflowIdMappings {
|
|
925
|
+
"""Node id mappings, in the order the nodes were created."""
|
|
926
|
+
nodes: [IdMapping!]!
|
|
927
|
+
"""Edge id mappings, in the order the edges were created."""
|
|
928
|
+
edges: [IdMapping!]!
|
|
929
|
+
}
|
|
930
|
+
```
|
|
931
|
+
|
|
932
|
+
### `WorkflowUpdatePayload`
|
|
933
|
+
|
|
934
|
+
```graphql
|
|
935
|
+
"""Payload returned by `workflowUpdate`."""
|
|
936
|
+
type WorkflowUpdatePayload {
|
|
937
|
+
"""The updated workflow."""
|
|
938
|
+
workflow: Workflow
|
|
939
|
+
}
|
|
940
|
+
```
|
|
941
|
+
|
|
942
|
+
### `WorkflowDeleteInput`
|
|
943
|
+
|
|
944
|
+
```graphql
|
|
945
|
+
"""Input for `workflowDelete`."""
|
|
946
|
+
input WorkflowDeleteInput {
|
|
947
|
+
"""Workflow ID."""
|
|
948
|
+
id: ID!
|
|
949
|
+
}
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
### `WorkflowDeletePayload`
|
|
953
|
+
|
|
954
|
+
```graphql
|
|
955
|
+
"""Payload returned by `workflowDelete`."""
|
|
956
|
+
type WorkflowDeletePayload {
|
|
957
|
+
"""ID of the deleted workflow."""
|
|
958
|
+
deletedWorkflowId: ID
|
|
959
|
+
}
|
|
960
|
+
```
|
|
961
|
+
|
|
962
|
+
### `WorkflowTestRunInput`
|
|
963
|
+
|
|
964
|
+
```graphql
|
|
965
|
+
"""
|
|
966
|
+
Input for `workflowTestRun`. Supply the field the workflow's trigger takes and
|
|
967
|
+
omit the other.
|
|
968
|
+
"""
|
|
969
|
+
input WorkflowTestRunInput {
|
|
970
|
+
"""The workflow to test-run."""
|
|
971
|
+
workflowId: ID!
|
|
972
|
+
"""
|
|
973
|
+
For an `ACTION` trigger: the answers the action carries, keyed by field key.
|
|
974
|
+
Templates and rules reach them as `trigger.action.responses.<key>`. Defaults to
|
|
975
|
+
no answers. Refused on an `EVENT` trigger.
|
|
976
|
+
"""
|
|
977
|
+
responses: JSON
|
|
978
|
+
"""
|
|
979
|
+
For an `EVENT` trigger: the entity the event is about, reached as
|
|
980
|
+
`trigger.entityId`. Defaults to the workflow's workspace ID.
|
|
981
|
+
"""
|
|
982
|
+
entityId: ID
|
|
983
|
+
}
|
|
984
|
+
```
|
|
985
|
+
|
|
986
|
+
### `WorkflowTestRunStatus`
|
|
987
|
+
|
|
988
|
+
```graphql
|
|
989
|
+
"""How a test run ended."""
|
|
990
|
+
enum WorkflowTestRunStatus {
|
|
991
|
+
"""Every node the walk reached did its work, or held its write back."""
|
|
992
|
+
COMPLETED
|
|
993
|
+
"""A node failed and the walk stopped there."""
|
|
994
|
+
FAILED
|
|
995
|
+
}
|
|
996
|
+
```
|
|
997
|
+
|
|
998
|
+
### `WorkflowTestRunTaskStatus`
|
|
999
|
+
|
|
1000
|
+
```graphql
|
|
1001
|
+
"""How one task of a test run ended."""
|
|
1002
|
+
enum WorkflowTestRunTaskStatus {
|
|
1003
|
+
"""The node did its work. A tool that reads ran for real."""
|
|
1004
|
+
SUCCEEDED
|
|
1005
|
+
"""The node failed, and the walk stopped there."""
|
|
1006
|
+
FAILED
|
|
1007
|
+
"""
|
|
1008
|
+
The tool writes, so the test run did not run it. `input` holds what it would
|
|
1009
|
+
have sent; it recorded nothing, so a later node addressing it finds nothing.
|
|
1010
|
+
"""
|
|
1011
|
+
SKIPPED
|
|
1012
|
+
}
|
|
1013
|
+
```
|
|
1014
|
+
|
|
1015
|
+
### `WorkflowTestRunTask`
|
|
1016
|
+
|
|
1017
|
+
```graphql
|
|
1018
|
+
"""
|
|
1019
|
+
One visit a test run made to a node. Never stored: it exists only in the payload that
|
|
1020
|
+
returned it.
|
|
1021
|
+
"""
|
|
1022
|
+
type WorkflowTestRunTask {
|
|
1023
|
+
"""The node's ID."""
|
|
1024
|
+
nodeId: ID!
|
|
1025
|
+
"""
|
|
1026
|
+
The node's place in the walk. The `ORIGIN` node is 0 and is not listed.
|
|
1027
|
+
"""
|
|
1028
|
+
index: Int!
|
|
1029
|
+
"""
|
|
1030
|
+
Which visit of its node the task is, from 1. A walk that re-enters a node lists each visit.
|
|
1031
|
+
"""
|
|
1032
|
+
visit: Int!
|
|
1033
|
+
"""The node's kind. Never `ORIGIN`."""
|
|
1034
|
+
type: WorkflowTaskType!
|
|
1035
|
+
"""The tool a `TOOL` node runs."""
|
|
1036
|
+
tool: String
|
|
1037
|
+
"""How the task ended."""
|
|
1038
|
+
status: WorkflowTestRunTaskStatus!
|
|
1039
|
+
"""
|
|
1040
|
+
A `TOOL` node's arguments with every template resolved, as the tool received
|
|
1041
|
+
them or, when `SKIPPED`, would have. A `SLEEP` node's `{ duration }`.
|
|
1042
|
+
"""
|
|
1043
|
+
input: JSON
|
|
1044
|
+
"""
|
|
1045
|
+
What a `TOOL` node recorded, in the form later nodes read it: a reference is a
|
|
1046
|
+
`$ref` envelope naming the tool and what it resolves. Null when skipped.
|
|
1047
|
+
"""
|
|
1048
|
+
output: JSON
|
|
1049
|
+
"""The branch a `CONDITION` node took."""
|
|
1050
|
+
branch: WorkflowEdgeHandle
|
|
1051
|
+
"""
|
|
1052
|
+
Why the task failed, naming the node, its tool and at most an argument.
|
|
1053
|
+
"""
|
|
1054
|
+
failureMessage: String
|
|
1055
|
+
}
|
|
1056
|
+
```
|
|
1057
|
+
|
|
1058
|
+
### `WorkflowTestRun`
|
|
1059
|
+
|
|
1060
|
+
```graphql
|
|
1061
|
+
"""
|
|
1062
|
+
A workflow's draft graph walked once against a supplied trigger, with every
|
|
1063
|
+
write held back.
|
|
1064
|
+
|
|
1065
|
+
Tools that read (`search_leads`, `http` with `GET` or `HEAD`) run for real;
|
|
1066
|
+
tools that write are `SKIPPED`. `SLEEP` nodes do not wait. Nothing is stored:
|
|
1067
|
+
no run appears in `Workflow.runs`, no operation is recorded and no event is
|
|
1068
|
+
published.
|
|
1069
|
+
"""
|
|
1070
|
+
type WorkflowTestRun {
|
|
1071
|
+
"""How the run ended."""
|
|
1072
|
+
status: WorkflowTestRunStatus!
|
|
1073
|
+
"""Why the run stopped, when `status` is `FAILED`."""
|
|
1074
|
+
failureMessage: String
|
|
1075
|
+
"""Every node the walk reached after the `ORIGIN`, in order."""
|
|
1076
|
+
tasks: [WorkflowTestRunTask!]!
|
|
1077
|
+
}
|
|
1078
|
+
```
|
|
1079
|
+
|
|
1080
|
+
### `WorkflowTestRunPayload`
|
|
1081
|
+
|
|
1082
|
+
```graphql
|
|
1083
|
+
"""Payload returned by `workflowTestRun`."""
|
|
1084
|
+
type WorkflowTestRunPayload {
|
|
1085
|
+
"""The test run, or null when `userErrors` is non-empty."""
|
|
1086
|
+
testRun: WorkflowTestRun
|
|
1087
|
+
"""
|
|
1088
|
+
Why the input cannot start this workflow. Codes: `RESPONSES_NOT_ACCEPTED`,
|
|
1089
|
+
`INVALID_RESPONSES`, `ACTION_DELETED`, `TRIGGER_UNUSABLE`.
|
|
1090
|
+
"""
|
|
1091
|
+
userErrors: [UserError!]!
|
|
1092
|
+
}
|
|
1093
|
+
```
|
|
1094
|
+
|
|
1095
|
+
### `WorkflowSortKeys`
|
|
1096
|
+
|
|
1097
|
+
```graphql
|
|
1098
|
+
"""
|
|
1099
|
+
Sort keys for `workflows(...)`. Pair with `reverse: true` to flip the order
|
|
1100
|
+
(`NAME` + `reverse: false` sorts A→Z; `CREATED_AT` + `reverse: true` is newest-first).
|
|
1101
|
+
"""
|
|
1102
|
+
enum WorkflowSortKeys {
|
|
1103
|
+
"""Sort by `name` (alphabetical)."""
|
|
1104
|
+
NAME
|
|
1105
|
+
"""Sort by `createdAt`."""
|
|
1106
|
+
CREATED_AT
|
|
1107
|
+
"""Sort by `updatedAt`."""
|
|
1108
|
+
UPDATED_AT
|
|
1109
|
+
}
|
|
1110
|
+
```
|