@powerhousedao/switchboard 6.2.3-dev.79 → 6.2.3-dev.80

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.
Files changed (38) hide show
  1. package/.tsbuild/test/boot-helpers.d.ts +2 -2
  2. package/.tsbuild/test/boot-helpers.d.ts.map +1 -1
  3. package/.tsbuild/test/boot-mcp-auth.test.d.ts +2 -0
  4. package/.tsbuild/test/boot-mcp-auth.test.d.ts.map +1 -0
  5. package/.tsbuild/test/served-schemas.test.d.ts +2 -0
  6. package/.tsbuild/test/served-schemas.test.d.ts.map +1 -0
  7. package/.tsbuild/test/workflow/runtime-host.test.d.ts +2 -0
  8. package/.tsbuild/test/workflow/runtime-host.test.d.ts.map +1 -0
  9. package/.tsbuild/tsconfig.tsbuildinfo +1 -1
  10. package/CHANGELOG.md +27 -0
  11. package/dist/from-env-BO0n9R02.mjs +2 -2
  12. package/dist/from-env-BO0n9R02.mjs.map +1 -1
  13. package/dist/index.mjs +1 -1
  14. package/dist/plugins/attachments.mjs +3 -3
  15. package/dist/plugins/workflows.mjs +3 -3
  16. package/dist/{server-CtGBZlTg.mjs → server-eNNf230W.mjs} +58 -9
  17. package/dist/server-eNNf230W.mjs.map +1 -0
  18. package/dist/server.d.mts +10 -0
  19. package/dist/server.d.mts.map +1 -1
  20. package/dist/server.mjs +3 -3
  21. package/dist/workflow-runtime-7GaJ13c9.d.mts.map +1 -1
  22. package/dist/{workflows-QY9Y2eoD.mjs → workflows-5Chwj98o.mjs} +72 -3
  23. package/dist/workflows-5Chwj98o.mjs.map +1 -0
  24. package/package.json +16 -16
  25. package/test/boot-helpers.ts +3 -2
  26. package/test/boot-mcp-auth.test.ts +449 -0
  27. package/test/goldens/packages.graphql +797 -0
  28. package/test/goldens/privacy.graphql +853 -0
  29. package/test/goldens/reactor-drive-nodes.graphql +827 -0
  30. package/test/goldens/resolvers.json +321 -0
  31. package/test/goldens/supergraph.graphql +5636 -0
  32. package/test/goldens/workflow-runtime.graphql +1403 -0
  33. package/test/served-schemas.test.ts +134 -0
  34. package/test/workflow/runtime-host.test.ts +20 -0
  35. package/test/workflow-runtime.test.ts +70 -0
  36. package/vitest.config.ts +14 -4
  37. package/dist/server-CtGBZlTg.mjs.map +0 -1
  38. package/dist/workflows-QY9Y2eoD.mjs.map +0 -1
@@ -0,0 +1,797 @@
1
+ directive @extends on OBJECT | INTERFACE
2
+
3
+ directive @external on FIELD_DEFINITION
4
+
5
+ directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE
6
+
7
+ directive @provides(fields: _FieldSet!) on FIELD_DEFINITION
8
+
9
+ directive @requires(fields: _FieldSet!) on FIELD_DEFINITION
10
+
11
+ directive @tag(
12
+ name: String!
13
+ ) repeatable on FIELD_DEFINITION | INTERFACE | OBJECT | UNION | ARGUMENT_DEFINITION | SCALAR | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION
14
+
15
+ scalar Address
16
+
17
+ scalar Amount
18
+
19
+ scalar Amount_Crypto
20
+
21
+ scalar Amount_Currency
22
+
23
+ scalar Amount_Fiat
24
+
25
+ scalar Amount_Money
26
+
27
+ scalar Amount_Percentage
28
+
29
+ scalar Amount_Tokens
30
+
31
+ scalar AttachmentRef
32
+
33
+ type Connection implements IDocument {
34
+ id: String!
35
+ name: String!
36
+ documentType: String!
37
+ operations(skip: Int, first: Int): [Operation!]!
38
+ revision: Int!
39
+ createdAtUtcIso: DateTime!
40
+ lastModifiedAtUtcIso: DateTime!
41
+ initialState: Connection_ConnectionState!
42
+ state: Connection_ConnectionState!
43
+ stateJSON: JSONObject
44
+ }
45
+
46
+ enum Connection_ConnectionAuthType {
47
+ SECRET_TEXT
48
+ BASIC_AUTH
49
+ CUSTOM_AUTH
50
+ OAUTH2
51
+ OIDC
52
+ NONE
53
+ """
54
+ Reactor access for a piece's ctx.reactor; any piece may bind it.
55
+ """
56
+ REACTOR
57
+ }
58
+
59
+ type Connection_ConnectionState {
60
+ name: String!
61
+ """
62
+ Fully-qualified connector id: '@acme/connector-imap#imap'.
63
+ """
64
+ connectorId: String!
65
+ """
66
+ Activepieces auth kind, so a piece's PieceAuth maps directly.
67
+ """
68
+ authType: Connection_ConnectionAuthType!
69
+ """
70
+ Non-secret configuration, validated against the connector's auth schema; a ReactorConnectionConfig for REACTOR.
71
+ """
72
+ config: Unknown!
73
+ """
74
+ Secret handles; values never appear in state, operations, or the run journal.
75
+ """
76
+ secretRefs: [Connection_SecretRef!]!
77
+ status: Connection_ConnectionStatus!
78
+ lastCheckedAt: DateTime
79
+ lastError: String
80
+ """
81
+ Populated by the connector's own metadata call. Display only.
82
+ """
83
+ accountLabel: String
84
+ }
85
+
86
+ enum Connection_ConnectionStatus {
87
+ UNCONFIGURED
88
+ OK
89
+ ERROR
90
+ REVOKED
91
+ }
92
+
93
+ """
94
+ Config of a REACTOR connection. It holds no secrets.
95
+ """
96
+ type Connection_ReactorConnectionConfig {
97
+ """
98
+ Which reactor the connection reaches; 'local' is the only value.
99
+ """
100
+ endpoint: String!
101
+ """
102
+ 'read' limits the connection to reads; absent allows what the step declares.
103
+ """
104
+ access: String
105
+ }
106
+
107
+ type Connection_SecretRef {
108
+ id: OID!
109
+ """
110
+ Matches an auth property name in the connector's config schema.
111
+ """
112
+ name: String!
113
+ """
114
+ Opaque handle into the host secret provider. Not the secret.
115
+ """
116
+ ref: String!
117
+ }
118
+
119
+ scalar Currency
120
+
121
+ scalar Date
122
+
123
+ scalar DateTime
124
+
125
+ type DocumentDrive implements IDocument {
126
+ id: String!
127
+ name: String!
128
+ documentType: String!
129
+ operations(skip: Int, first: Int): [Operation!]!
130
+ revision: Int!
131
+ createdAtUtcIso: DateTime!
132
+ lastModifiedAtUtcIso: DateTime!
133
+ initialState: DocumentDrive_DocumentDriveState!
134
+ state: DocumentDrive_DocumentDriveState!
135
+ stateJSON: JSONObject
136
+ }
137
+
138
+ type DocumentDrive_DocumentDriveLocalState {
139
+ sharingType: String
140
+ listeners: [DocumentDrive_Listener!]!
141
+ triggers: [DocumentDrive_Trigger!]!
142
+ availableOffline: Boolean!
143
+ }
144
+
145
+ type DocumentDrive_DocumentDriveState {
146
+ name: String!
147
+ nodes: [DocumentDrive_Node!]!
148
+ icon: String
149
+ }
150
+
151
+ type DocumentDrive_FileNode {
152
+ id: String!
153
+ name: String!
154
+ kind: String!
155
+ documentType: String!
156
+ parentFolder: String
157
+ }
158
+
159
+ type DocumentDrive_FolderNode {
160
+ id: String!
161
+ name: String!
162
+ kind: String!
163
+ parentFolder: String
164
+ }
165
+
166
+ type DocumentDrive_Listener {
167
+ listenerId: ID!
168
+ label: String
169
+ block: Boolean!
170
+ system: Boolean!
171
+ filter: DocumentDrive_ListenerFilter!
172
+ callInfo: DocumentDrive_ListenerCallInfo
173
+ }
174
+
175
+ type DocumentDrive_ListenerCallInfo {
176
+ transmitterType: DocumentDrive_TransmitterType
177
+ name: String
178
+ data: String
179
+ }
180
+
181
+ type DocumentDrive_ListenerFilter {
182
+ documentType: [String!]!
183
+ documentId: [ID!]
184
+ scope: [String!]
185
+ branch: [String!]
186
+ }
187
+
188
+ union DocumentDrive_Node = DocumentDrive_FolderNode | DocumentDrive_FileNode
189
+
190
+ type DocumentDrive_PullResponderTriggerData {
191
+ listenerId: ID!
192
+ url: String!
193
+ interval: String!
194
+ }
195
+
196
+ enum DocumentDrive_TransmitterType {
197
+ Internal
198
+ SwitchboardPush
199
+ PullResponder
200
+ SecureConnect
201
+ MatrixConnect
202
+ RESTWebhook
203
+ }
204
+
205
+ type DocumentDrive_Trigger {
206
+ id: ID!
207
+ type: DocumentDrive_TriggerType!
208
+ data: DocumentDrive_TriggerData
209
+ }
210
+
211
+ union DocumentDrive_TriggerData = DocumentDrive_PullResponderTriggerData
212
+
213
+ enum DocumentDrive_TriggerType {
214
+ PullResponder
215
+ }
216
+
217
+ type DocumentModel implements IDocument {
218
+ id: String!
219
+ name: String!
220
+ documentType: String!
221
+ operations(skip: Int, first: Int): [Operation!]!
222
+ revision: Int!
223
+ createdAtUtcIso: DateTime!
224
+ lastModifiedAtUtcIso: DateTime!
225
+ stateJSON: JSONObject
226
+ }
227
+
228
+ type DocumentModel_Author {
229
+ name: String!
230
+ website: String
231
+ }
232
+
233
+ type DocumentModel_CodeExample {
234
+ id: ID!
235
+ value: String!
236
+ }
237
+
238
+ type DocumentModel_DocumentModelGlobalState {
239
+ name: String!
240
+ id: String!
241
+ extension: String!
242
+ description: String!
243
+ author: DocumentModel_Author!
244
+ specifications: [DocumentModel_DocumentSpecification!]!
245
+ }
246
+
247
+ type DocumentModel_DocumentSpecification {
248
+ version: Int!
249
+ state: DocumentModel_ScopeState!
250
+ modules: [DocumentModel_Module!]!
251
+ changeLog: [String!]!
252
+ }
253
+
254
+ type DocumentModel_Module {
255
+ id: ID!
256
+ name: String!
257
+ description: String
258
+ operations: [DocumentModel_Operation!]!
259
+ }
260
+
261
+ type DocumentModel_Operation {
262
+ id: ID!
263
+ name: String
264
+ schema: String
265
+ description: String
266
+ template: String
267
+ errors: [DocumentModel_OperationError!]!
268
+ examples: [DocumentModel_CodeExample!]!
269
+ reducer: String
270
+ scope: String
271
+ }
272
+
273
+ type DocumentModel_OperationError {
274
+ id: ID!
275
+ code: String
276
+ name: String
277
+ description: String
278
+ template: String
279
+ }
280
+
281
+ type DocumentModel_ScopeState {
282
+ global: DocumentModel_State!
283
+ local: DocumentModel_State!
284
+ }
285
+
286
+ type DocumentModel_State {
287
+ schema: String!
288
+ initialValue: String!
289
+ examples: [DocumentModel_CodeExample!]!
290
+ }
291
+
292
+ type DriveDocument implements IDocument {
293
+ id: String!
294
+ name: String!
295
+ documentType: String!
296
+ revision: Int!
297
+ createdAtUtcIso: DateTime!
298
+ lastModifiedAtUtcIso: DateTime!
299
+ operations(first: Int, skip: Int): [Operation!]!
300
+ stateJSON: JSONObject
301
+ }
302
+
303
+ scalar EmailAddress
304
+
305
+ scalar EthereumAddress
306
+
307
+ type GqlDocument implements IDocument {
308
+ id: String!
309
+ name: String!
310
+ documentType: String!
311
+ revision: Int!
312
+ createdAtUtcIso: DateTime!
313
+ lastModifiedAtUtcIso: DateTime!
314
+ operations(first: Int, skip: Int): [Operation!]!
315
+ stateJSON: JSONObject
316
+ }
317
+
318
+ interface IDocument {
319
+ id: String!
320
+ name: String!
321
+ documentType: String!
322
+ revision: Int!
323
+ createdAtUtcIso: DateTime!
324
+ lastModifiedAtUtcIso: DateTime!
325
+ operations(first: Int, skip: Int): [Operation!]!
326
+ stateJSON: JSONObject
327
+ }
328
+
329
+ type InstallPackageResult {
330
+ package: InstalledPackage!
331
+ documentModelsLoaded: Int!
332
+ }
333
+
334
+ type InstalledPackage {
335
+ name: String!
336
+ version: String
337
+ registryUrl: String!
338
+ installedAt: DateTime!
339
+ documentTypes: [String!]!
340
+ }
341
+
342
+ """
343
+ The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
344
+ """
345
+ scalar JSONObject
346
+
347
+ type Mutation {
348
+ Packages: PackagesMutations!
349
+ }
350
+
351
+ scalar OID
352
+
353
+ scalar OLabel
354
+
355
+ type Operation {
356
+ id: String!
357
+ type: String!
358
+ index: Int!
359
+ timestampUtcMs: DateTime!
360
+ hash: String!
361
+ skip: Int
362
+ inputText: String
363
+ error: String
364
+ context: PHOperationContext
365
+ }
366
+
367
+ scalar PHID
368
+
369
+ type PHOperationContext {
370
+ signer: Signer
371
+ }
372
+
373
+ type PackagesMutations {
374
+ installPackage(name: String!, registryUrl: String): InstallPackageResult!
375
+ uninstallPackage(name: String!): Boolean!
376
+ }
377
+
378
+ type PackagesQueries {
379
+ installedPackages: [InstalledPackage!]!
380
+ installedPackage(name: String!): InstalledPackage
381
+ }
382
+
383
+ type Query {
384
+ Packages: PackagesQueries!
385
+ _service: _Service!
386
+ }
387
+
388
+ type ReactorDrive implements IDocument {
389
+ id: String!
390
+ name: String!
391
+ documentType: String!
392
+ operations(skip: Int, first: Int): [Operation!]!
393
+ revision: Int!
394
+ createdAtUtcIso: DateTime!
395
+ lastModifiedAtUtcIso: DateTime!
396
+ initialState: ReactorDrive_ReactorDriveState!
397
+ state: ReactorDrive_ReactorDriveState!
398
+ stateJSON: JSONObject
399
+ }
400
+
401
+ type ReactorDrive_ReactorDriveLocalState {
402
+ sharingType: String!
403
+ availableOffline: Boolean!
404
+ }
405
+
406
+ type ReactorDrive_ReactorDriveState {
407
+ name: String!
408
+ icon: String
409
+ }
410
+
411
+ type ReactorGroup implements IDocument {
412
+ id: String!
413
+ name: String!
414
+ documentType: String!
415
+ operations(skip: Int, first: Int): [Operation!]!
416
+ revision: Int!
417
+ createdAtUtcIso: DateTime!
418
+ lastModifiedAtUtcIso: DateTime!
419
+ initialState: ReactorGroup_ReactorGroupState!
420
+ state: ReactorGroup_ReactorGroupState!
421
+ stateJSON: JSONObject
422
+ }
423
+
424
+ """
425
+ A member address list gated by the group document's own auth scope. Addresses
426
+ are stored as given and compared case-insensitively, matching how { address }
427
+ principals are compared during auth evaluation.
428
+ """
429
+ type ReactorGroup_ReactorGroupState {
430
+ """
431
+ Display name of the group.
432
+ """
433
+ name: String!
434
+ """
435
+ Free-text description of the group's purpose.
436
+ """
437
+ description: String!
438
+ """
439
+ Member wallet addresses. No duplicates under case-insensitive comparison.
440
+ """
441
+ members: [String!]!
442
+ }
443
+
444
+ type Signer {
445
+ user: SignerUser
446
+ app: SignerApp
447
+ signatures: [String!]!
448
+ }
449
+
450
+ type SignerApp {
451
+ name: String!
452
+ key: String!
453
+ }
454
+
455
+ type SignerUser {
456
+ address: String!
457
+ networkId: String!
458
+ chainId: Int!
459
+ }
460
+
461
+ scalar URL
462
+
463
+ """
464
+ The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
465
+ """
466
+ scalar Unknown
467
+
468
+ scalar Upload
469
+
470
+ type Workflow implements IDocument {
471
+ id: String!
472
+ name: String!
473
+ documentType: String!
474
+ operations(skip: Int, first: Int): [Operation!]!
475
+ revision: Int!
476
+ createdAtUtcIso: DateTime!
477
+ lastModifiedAtUtcIso: DateTime!
478
+ initialState: Workflow_WorkflowState!
479
+ state: Workflow_WorkflowState!
480
+ stateJSON: JSONObject
481
+ }
482
+
483
+ enum Workflow_BackoffKind {
484
+ FIXED
485
+ EXPONENTIAL
486
+ }
487
+
488
+ enum Workflow_ConcurrencyMode {
489
+ SINGLETON
490
+ QUEUE
491
+ PARALLEL
492
+ }
493
+
494
+ enum Workflow_FailureMode {
495
+ PARK
496
+ NOTIFY
497
+ IGNORE
498
+ }
499
+
500
+ """
501
+ Layout only. The runtime ignores it.
502
+ """
503
+ type Workflow_Point {
504
+ x: Float!
505
+ y: Float!
506
+ }
507
+
508
+ enum Workflow_PropertyMode {
509
+ """
510
+ The field's own control.
511
+ """
512
+ MANUAL
513
+ """
514
+ The author switched the field to a free {{…}} expression.
515
+ """
516
+ EXPRESSION
517
+ }
518
+
519
+ type Workflow_PropertySetting {
520
+ prop: String!
521
+ mode: Workflow_PropertyMode!
522
+ """
523
+ Resolved DynamicProperties children, options stripped.
524
+ """
525
+ schema: Unknown
526
+ }
527
+
528
+ """
529
+ Snapshot of the draft taken by PUBLISH_WORKFLOW.
530
+ """
531
+ type Workflow_PublishedWorkflow {
532
+ """
533
+ Draft version the snapshot was taken at.
534
+ """
535
+ version: Int!
536
+ publishedAt: DateTime!
537
+ trigger: Workflow_TriggerBinding
538
+ steps: [Workflow_WorkflowStep!]!
539
+ edges: [Workflow_WorkflowEdge!]!
540
+ variables: [Workflow_WorkflowVariable!]!
541
+ policy: Workflow_WorkflowPolicy!
542
+ }
543
+
544
+ type Workflow_RetryPolicy {
545
+ """
546
+ Attempts, not retries: 1 is no retry. Clamped to 10 by the runtime, since each attempt re-runs a side effect and holds the run's worker slot.
547
+ """
548
+ maxAttempts: Int!
549
+ backoff: Workflow_BackoffKind!
550
+ initialDelaySeconds: Int!
551
+ maxDelaySeconds: Int!
552
+ """
553
+ Error classes that are retryable, matched against the error's class name or anywhere in its message, case-insensitively. EMPTY admits every error: an empty list with maxAttempts > 1 means retry, not never-retry.
554
+ """
555
+ retryOn: [String!]!
556
+ }
557
+
558
+ enum Workflow_RunStatus {
559
+ PENDING
560
+ RUNNING
561
+ WAITING
562
+ SUCCEEDED
563
+ FAILED
564
+ CANCELLED
565
+ PARKED
566
+ }
567
+
568
+ """
569
+ Reference to the latest test run in the run store.
570
+ """
571
+ type Workflow_StepTestRecord {
572
+ runId: String!
573
+ testedAt: DateTime!
574
+ }
575
+
576
+ type Workflow_TriggerBinding {
577
+ id: OID!
578
+ """
579
+ Package name of the trigger's piece, e.g. '@powerhousedao/piece-core' or '@acme/piece-imap'.
580
+ """
581
+ pieceName: String!
582
+ """
583
+ Exact semver of the piece, e.g. '1.2.0'.
584
+ """
585
+ pieceVersion: String!
586
+ """
587
+ Trigger name within the piece, e.g. 'schedule' or 'new_message'.
588
+ """
589
+ triggerName: String!
590
+ """
591
+ Connection document id, when the trigger's connector requires one.
592
+ """
593
+ connectionId: PHID
594
+ """
595
+ Reactor connection document id, when the trigger declares requireReactor.
596
+ """
597
+ reactorConnectionId: PHID
598
+ """
599
+ Validated against the trigger's configSchema.
600
+ """
601
+ config: Unknown!
602
+ propertySettings: [Workflow_PropertySetting!]
603
+ lastTest: Workflow_StepTestRecord
604
+ """
605
+ Timestamp of the last real edit; a lastTest before it is stale.
606
+ """
607
+ updatedAt: DateTime
608
+ }
609
+
610
+ enum Workflow_VariableType {
611
+ TEXT
612
+ NUMBER
613
+ BOOLEAN
614
+ JSON
615
+ """
616
+ value is a secret-provider handle (the format of a connection SecretRef.ref), never the plaintext.
617
+ """
618
+ SECRET
619
+ }
620
+
621
+ type Workflow_WorkflowEdge {
622
+ id: OID!
623
+ """
624
+ Source step id, or the trigger id for the entry edge.
625
+ """
626
+ from: OID!
627
+ to: OID!
628
+ """
629
+ Output port of the source, one it declares: 'next' and 'error' for a piece action, 'next' for the trigger, 'true', 'false' and 'error' for a branch.
630
+ """
631
+ port: String!
632
+ """
633
+ Optional guard expression; the edge is taken only when it evaluates truthy.
634
+ """
635
+ condition: String
636
+ }
637
+
638
+ """
639
+ What manages a workflow: the document that defines it, and how to name it to a person.
640
+ """
641
+ type Workflow_WorkflowManager {
642
+ documentId: PHID!
643
+ """
644
+ e.g. sektar/integration
645
+ """
646
+ documentType: String!
647
+ """
648
+ e.g. Powerhouse - Google Calendar
649
+ """
650
+ label: String!
651
+ }
652
+
653
+ type Workflow_WorkflowPolicy {
654
+ """
655
+ ENFORCED. SINGLETON drops a firing while a run is active (journaled CANCELLED, not dropped silently); QUEUE serialises; PARALLEL runs concurrently.
656
+ """
657
+ concurrency: Workflow_ConcurrencyMode!
658
+ """
659
+ ENFORCED under PARALLEL: how many runs of this workflow may execute at once; null is unbounded. SINGLETON and QUEUE are 1 by definition.
660
+ """
661
+ maxParallelRuns: Int
662
+ """
663
+ ENFORCED. Checked between steps and while a retry waits; past it the run ends CANCELLED.
664
+ """
665
+ runTimeoutSeconds: Int!
666
+ """
667
+ NOT YET ENFORCED. Bounds how long a run may stay suspended on a waitpoint - but nothing suspends: waitpoints, run.pause and generateResumeUrl all throw, so there is no suspended state to bound.
668
+ """
669
+ maxSuspensionDays: Int!
670
+ """
671
+ ENFORCED. The fallback for a step with no retry of its own.
672
+ """
673
+ defaultRetry: Workflow_RetryPolicy!
674
+ """
675
+ ENFORCED. What happens to a run whose steps have all failed terminally: PARK takes the trigger out of the supervisor's ENABLED set until the workflow is re-published or re-enabled, NOTIFY logs at error level (the only notification channel this engine has), IGNORE does nothing.
676
+ """
677
+ onFailure: Workflow_FailureMode!
678
+ """
679
+ NOT YET ENFORCED per workflow. Retention is a journal-wide sweep on the relational handle, which has no reactor read to resolve a per-workflow window with; PH_WORKFLOWS_RUN_RETENTION_DAYS (30 days by default) is the control that applies.
680
+ """
681
+ retainRunsDays: Int!
682
+ """
683
+ NOT YET ENFORCED. The run journal is relational; there is no run document model to write.
684
+ """
685
+ journalAsDocument: Boolean!
686
+ }
687
+
688
+ type Workflow_WorkflowState {
689
+ name: String!
690
+ description: String
691
+ """
692
+ Only ENABLED workflows get trigger instances.
693
+ """
694
+ status: Workflow_WorkflowStatus!
695
+ """
696
+ Bumped on every draft edit; REVERT_TO_PUBLISHED resets it to published.version. A run records the version it executed.
697
+ """
698
+ version: Int!
699
+ trigger: Workflow_TriggerBinding
700
+ steps: [Workflow_WorkflowStep!]!
701
+ edges: [Workflow_WorkflowEdge!]!
702
+ variables: [Workflow_WorkflowVariable!]!
703
+ policy: Workflow_WorkflowPolicy!
704
+ """
705
+ Last published snapshot; version !== published.version means unpublished changes.
706
+ """
707
+ published: Workflow_PublishedWorkflow
708
+ """
709
+ Who keeps this workflow as it is, e.g. an app's integration; null: people edit it. Editors show a managed workflow read-only.
710
+ """
711
+ managedBy: Workflow_WorkflowManager
712
+ """
713
+ Denormalised for inspectors; written by the runtime.
714
+ """
715
+ lastRunAt: DateTime
716
+ lastRunStatus: Workflow_RunStatus
717
+ }
718
+
719
+ enum Workflow_WorkflowStatus {
720
+ DRAFT
721
+ ENABLED
722
+ DISABLED
723
+ ARCHIVED
724
+ }
725
+
726
+ type Workflow_WorkflowStep {
727
+ id: OID!
728
+ """
729
+ Author-visible label; unique within the workflow; used in expressions.
730
+ """
731
+ key: String!
732
+ name: String!
733
+ """
734
+ Package name of the step's piece, e.g. '@powerhousedao/piece-core' or '@activepieces/piece-http'.
735
+ """
736
+ pieceName: String!
737
+ """
738
+ Exact semver of the piece, e.g. '0.11.19'.
739
+ """
740
+ pieceVersion: String!
741
+ """
742
+ Action name within the piece, e.g. 'branch' or 'send_request'.
743
+ """
744
+ actionName: String!
745
+ connectionId: PHID
746
+ """
747
+ Reactor connection document id, when the action declares requireReactor.
748
+ """
749
+ reactorConnectionId: PHID
750
+ config: Unknown!
751
+ """
752
+ ENFORCED. Per-step override of the workflow default retry policy.
753
+ """
754
+ retry: Workflow_RetryPolicy
755
+ """
756
+ ENFORCED. Also raises the cap on each host call the step's piece makes, which is never shorter than the step's own timeout.
757
+ """
758
+ timeoutSeconds: Int
759
+ """
760
+ NOT YET ENFORCED. Expression yielding a stable key; two executions with the same key are one side effect. A fire is deduplicated on its trigger operation or a trigger item's _dedupe_key, never on a step expression.
761
+ """
762
+ idempotencyKeyExpression: String
763
+ position: Workflow_Point
764
+ propertySettings: [Workflow_PropertySetting!]
765
+ lastTest: Workflow_StepTestRecord
766
+ """
767
+ Skipped steps are passed over at run time.
768
+ """
769
+ skip: Boolean
770
+ """
771
+ Timestamp of the last real edit; a lastTest before it is stale.
772
+ """
773
+ updatedAt: DateTime
774
+ }
775
+
776
+ type Workflow_WorkflowVariable {
777
+ id: OID!
778
+ """
779
+ Name used in expressions.
780
+ """
781
+ key: String!
782
+ """
783
+ The value a run reads as variables.<key>.
784
+ """
785
+ value: Unknown
786
+ description: String
787
+ """
788
+ Null means untyped; consumers infer the kind of value it holds.
789
+ """
790
+ type: Workflow_VariableType
791
+ }
792
+
793
+ scalar _FieldSet
794
+
795
+ type _Service {
796
+ sdl: String
797
+ }