@powerhousedao/switchboard 6.2.3-dev.8 → 6.2.3-dev.81

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 (272) hide show
  1. package/.tsbuild/test/attachments/byte-grants.test.d.ts +2 -0
  2. package/.tsbuild/test/attachments/byte-grants.test.d.ts.map +1 -0
  3. package/.tsbuild/test/attachments/byte-routes-read-gate.integration.test.d.ts +2 -0
  4. package/.tsbuild/test/attachments/byte-routes-read-gate.integration.test.d.ts.map +1 -0
  5. package/.tsbuild/test/attachments/reserve-metadata-parity.test.d.ts +2 -0
  6. package/.tsbuild/test/attachments/reserve-metadata-parity.test.d.ts.map +1 -0
  7. package/.tsbuild/test/attachments/url-signer.test.d.ts +2 -0
  8. package/.tsbuild/test/attachments/url-signer.test.d.ts.map +1 -0
  9. package/.tsbuild/test/boot-auth-config.test.d.ts +2 -0
  10. package/.tsbuild/test/boot-auth-config.test.d.ts.map +1 -0
  11. package/.tsbuild/test/boot-create-signature-policy.test.d.ts +2 -0
  12. package/.tsbuild/test/boot-create-signature-policy.test.d.ts.map +1 -0
  13. package/.tsbuild/test/boot-env-isolation.test.d.ts +2 -0
  14. package/.tsbuild/test/boot-env-isolation.test.d.ts.map +1 -0
  15. package/.tsbuild/test/boot-helpers.d.ts +5 -0
  16. package/.tsbuild/test/boot-helpers.d.ts.map +1 -0
  17. package/.tsbuild/test/boot-inspection-enabled.test.d.ts +2 -0
  18. package/.tsbuild/test/boot-inspection-enabled.test.d.ts.map +1 -0
  19. package/.tsbuild/test/boot-mcp-auth.test.d.ts +2 -0
  20. package/.tsbuild/test/boot-mcp-auth.test.d.ts.map +1 -0
  21. package/.tsbuild/test/boot-mcp-enabled.test.d.ts +2 -0
  22. package/.tsbuild/test/boot-mcp-enabled.test.d.ts.map +1 -0
  23. package/.tsbuild/test/boot-port-zero.test.d.ts +2 -0
  24. package/.tsbuild/test/boot-port-zero.test.d.ts.map +1 -0
  25. package/.tsbuild/test/boot-preconditions.test.d.ts +2 -0
  26. package/.tsbuild/test/boot-preconditions.test.d.ts.map +1 -0
  27. package/.tsbuild/test/boot-privacy.test.d.ts +2 -0
  28. package/.tsbuild/test/boot-privacy.test.d.ts.map +1 -0
  29. package/.tsbuild/test/boot-unsupported-stored-documents.test.d.ts +2 -0
  30. package/.tsbuild/test/boot-unsupported-stored-documents.test.d.ts.map +1 -0
  31. package/.tsbuild/test/boot-without-renown.test.d.ts +2 -0
  32. package/.tsbuild/test/boot-without-renown.test.d.ts.map +1 -0
  33. package/.tsbuild/test/boot-without-require-signatures.test.d.ts +2 -0
  34. package/.tsbuild/test/boot-without-require-signatures.test.d.ts.map +1 -0
  35. package/.tsbuild/test/boot-worker-trust-policy.test.d.ts +2 -0
  36. package/.tsbuild/test/boot-worker-trust-policy.test.d.ts.map +1 -0
  37. package/.tsbuild/test/boot-workflow-singleton-conflict.test.d.ts +2 -0
  38. package/.tsbuild/test/boot-workflow-singleton-conflict.test.d.ts.map +1 -0
  39. package/.tsbuild/test/boot-workflow-singleton-retry.test.d.ts +2 -0
  40. package/.tsbuild/test/boot-workflow-singleton-retry.test.d.ts.map +1 -0
  41. package/.tsbuild/test/builder-defaults.test.d.ts +2 -0
  42. package/.tsbuild/test/builder-defaults.test.d.ts.map +1 -0
  43. package/.tsbuild/test/config-from-env.test.d.ts +2 -0
  44. package/.tsbuild/test/config-from-env.test.d.ts.map +1 -0
  45. package/.tsbuild/test/config-merge.test.d.ts +2 -0
  46. package/.tsbuild/test/config-merge.test.d.ts.map +1 -0
  47. package/.tsbuild/test/config-schema.test.d.ts +2 -0
  48. package/.tsbuild/test/config-schema.test.d.ts.map +1 -0
  49. package/.tsbuild/test/create-signature-policy.test.d.ts +2 -0
  50. package/.tsbuild/test/create-signature-policy.test.d.ts.map +1 -0
  51. package/.tsbuild/test/default-drive-protocol-versions.test.d.ts +2 -0
  52. package/.tsbuild/test/default-drive-protocol-versions.test.d.ts.map +1 -0
  53. package/.tsbuild/test/default-drive-slug.test.d.ts +2 -0
  54. package/.tsbuild/test/default-drive-slug.test.d.ts.map +1 -0
  55. package/.tsbuild/test/durable-node-fs-pg16.test.d.ts +2 -0
  56. package/.tsbuild/test/durable-node-fs-pg16.test.d.ts.map +1 -0
  57. package/.tsbuild/test/fatal-shutdown.test.d.ts +2 -0
  58. package/.tsbuild/test/fatal-shutdown.test.d.ts.map +1 -0
  59. package/.tsbuild/test/inspection-throttle.test.d.ts +2 -0
  60. package/.tsbuild/test/inspection-throttle.test.d.ts.map +1 -0
  61. package/.tsbuild/test/observability-signals.test.d.ts +2 -0
  62. package/.tsbuild/test/observability-signals.test.d.ts.map +1 -0
  63. package/.tsbuild/test/permissions-backfill.test.d.ts +2 -0
  64. package/.tsbuild/test/permissions-backfill.test.d.ts.map +1 -0
  65. package/.tsbuild/test/pglite-preflight.test.d.ts +2 -0
  66. package/.tsbuild/test/pglite-preflight.test.d.ts.map +1 -0
  67. package/.tsbuild/test/pglite-storage-dirs.test.d.ts +2 -0
  68. package/.tsbuild/test/pglite-storage-dirs.test.d.ts.map +1 -0
  69. package/.tsbuild/test/pglite-store.test.d.ts +2 -0
  70. package/.tsbuild/test/pglite-store.test.d.ts.map +1 -0
  71. package/.tsbuild/test/plugin-config-schemas.test.d.ts +2 -0
  72. package/.tsbuild/test/plugin-config-schemas.test.d.ts.map +1 -0
  73. package/.tsbuild/test/plugin-presence.test.d.ts +2 -0
  74. package/.tsbuild/test/plugin-presence.test.d.ts.map +1 -0
  75. package/.tsbuild/test/port-probe.test.d.ts +2 -0
  76. package/.tsbuild/test/port-probe.test.d.ts.map +1 -0
  77. package/.tsbuild/test/renown-storage-path.test.d.ts +2 -0
  78. package/.tsbuild/test/renown-storage-path.test.d.ts.map +1 -0
  79. package/.tsbuild/test/renown-trust-policy.test.d.ts +2 -0
  80. package/.tsbuild/test/renown-trust-policy.test.d.ts.map +1 -0
  81. package/.tsbuild/test/served-schemas.test.d.ts +2 -0
  82. package/.tsbuild/test/served-schemas.test.d.ts.map +1 -0
  83. package/.tsbuild/test/shutdown.test.d.ts +2 -0
  84. package/.tsbuild/test/shutdown.test.d.ts.map +1 -0
  85. package/.tsbuild/test/snapshot-writer.d.ts +18 -0
  86. package/.tsbuild/test/snapshot-writer.d.ts.map +1 -0
  87. package/.tsbuild/test/store-lock.test.d.ts +2 -0
  88. package/.tsbuild/test/store-lock.test.d.ts.map +1 -0
  89. package/.tsbuild/test/two-switchboards.test.d.ts +2 -0
  90. package/.tsbuild/test/two-switchboards.test.d.ts.map +1 -0
  91. package/.tsbuild/test/unsupported-stored-documents.test.d.ts +2 -0
  92. package/.tsbuild/test/unsupported-stored-documents.test.d.ts.map +1 -0
  93. package/.tsbuild/test/workflow/harness.d.ts +56 -0
  94. package/.tsbuild/test/workflow/harness.d.ts.map +1 -0
  95. package/.tsbuild/test/workflow/oauth.test.d.ts +2 -0
  96. package/.tsbuild/test/workflow/oauth.test.d.ts.map +1 -0
  97. package/.tsbuild/test/workflow/resolvers.test.d.ts +2 -0
  98. package/.tsbuild/test/workflow/resolvers.test.d.ts.map +1 -0
  99. package/.tsbuild/test/workflow/runtime-host.test.d.ts +2 -0
  100. package/.tsbuild/test/workflow/runtime-host.test.d.ts.map +1 -0
  101. package/.tsbuild/test/workflow/webhook-dedupe.test.d.ts +2 -0
  102. package/.tsbuild/test/workflow/webhook-dedupe.test.d.ts.map +1 -0
  103. package/.tsbuild/test/workflow/webhook-signed.test.d.ts +2 -0
  104. package/.tsbuild/test/workflow/webhook-signed.test.d.ts.map +1 -0
  105. package/.tsbuild/test/workflow/webhook-trigger-test.test.d.ts +2 -0
  106. package/.tsbuild/test/workflow/webhook-trigger-test.test.d.ts.map +1 -0
  107. package/.tsbuild/test/workflow/webhook-unsigned.test.d.ts +2 -0
  108. package/.tsbuild/test/workflow/webhook-unsigned.test.d.ts.map +1 -0
  109. package/.tsbuild/test/workflow-reactor-access.test.d.ts +2 -0
  110. package/.tsbuild/test/workflow-reactor-access.test.d.ts.map +1 -0
  111. package/.tsbuild/test/workflow-reactor-enforcement.test.d.ts +2 -0
  112. package/.tsbuild/test/workflow-reactor-enforcement.test.d.ts.map +1 -0
  113. package/.tsbuild/test/workflow-read-gate.test.d.ts +2 -0
  114. package/.tsbuild/test/workflow-read-gate.test.d.ts.map +1 -0
  115. package/.tsbuild/test/workflow-runtime.test.d.ts +2 -0
  116. package/.tsbuild/test/workflow-runtime.test.d.ts.map +1 -0
  117. package/.tsbuild/test/workflows-plugin-config.test.d.ts +2 -0
  118. package/.tsbuild/test/workflows-plugin-config.test.d.ts.map +1 -0
  119. package/.tsbuild/tsconfig.tsbuildinfo +1 -1
  120. package/.tsbuild/tsdown.config.d.ts.map +1 -1
  121. package/.tsbuild/vitest.config.d.ts.map +1 -1
  122. package/Auth.md +144 -2
  123. package/CHANGELOG.md +1074 -0
  124. package/README.md +55 -14
  125. package/dist/boot.d.mts +46 -0
  126. package/dist/boot.d.mts.map +1 -0
  127. package/dist/boot.mjs +67 -0
  128. package/dist/boot.mjs.map +1 -0
  129. package/dist/config/from-env.d.mts +15 -0
  130. package/dist/config/from-env.d.mts.map +1 -0
  131. package/dist/config/from-env.mjs +4 -0
  132. package/dist/config/schema.d.mts +3 -0
  133. package/dist/config/schema.mjs +4 -0
  134. package/dist/from-env-BO0n9R02.mjs +401 -0
  135. package/dist/from-env-BO0n9R02.mjs.map +1 -0
  136. package/dist/index.d.mts +2 -1
  137. package/dist/index.mjs +76 -79
  138. package/dist/index.mjs.map +1 -1
  139. package/dist/install-packages.d.mts +2 -1
  140. package/dist/install-packages.mjs +2 -2
  141. package/dist/install-packages.mjs.map +1 -1
  142. package/dist/mcp-SsBK14Jm.mjs +32 -0
  143. package/dist/mcp-SsBK14Jm.mjs.map +1 -0
  144. package/dist/migrate.d.mts +2 -1
  145. package/dist/migrate.mjs +7 -5
  146. package/dist/migrate.mjs.map +1 -1
  147. package/dist/plugin-host-C1sYEm8g.d.mts +46 -0
  148. package/dist/plugin-host-C1sYEm8g.d.mts.map +1 -0
  149. package/dist/plugins/attachments.d.mts +33 -0
  150. package/dist/plugins/attachments.d.mts.map +1 -0
  151. package/dist/plugins/attachments.mjs +4 -0
  152. package/dist/plugins/mcp.d.mts +31 -0
  153. package/dist/plugins/mcp.d.mts.map +1 -0
  154. package/dist/plugins/mcp.mjs +4 -0
  155. package/dist/plugins/privacy.d.mts +22 -0
  156. package/dist/plugins/privacy.d.mts.map +1 -0
  157. package/dist/plugins/privacy.mjs +4 -0
  158. package/dist/plugins/workflows.d.mts +79 -0
  159. package/dist/plugins/workflows.d.mts.map +1 -0
  160. package/dist/plugins/workflows.mjs +4 -0
  161. package/dist/postgres-url-DTDhBjXX.mjs +11 -0
  162. package/dist/postgres-url-DTDhBjXX.mjs.map +1 -0
  163. package/dist/privacy-BO8Q25xI.mjs +44 -0
  164. package/dist/privacy-BO8Q25xI.mjs.map +1 -0
  165. package/dist/privacy-DxIJGH4P.mjs +91 -0
  166. package/dist/privacy-DxIJGH4P.mjs.map +1 -0
  167. package/dist/renown-layers-COZsrGQT.mjs +40 -0
  168. package/dist/renown-layers-COZsrGQT.mjs.map +1 -0
  169. package/dist/schema-0g_QdOWn.mjs +267 -0
  170. package/dist/schema-0g_QdOWn.mjs.map +1 -0
  171. package/dist/schema-ivUWPQOn.d.mts +202 -0
  172. package/dist/schema-ivUWPQOn.d.mts.map +1 -0
  173. package/dist/server-cE1BWLQu.mjs +2518 -0
  174. package/dist/server-cE1BWLQu.mjs.map +1 -0
  175. package/dist/server.d.mts +270 -48
  176. package/dist/server.d.mts.map +1 -1
  177. package/dist/server.mjs +5 -5
  178. package/dist/utils-C6AIF38Z.mjs +133 -0
  179. package/dist/utils-C6AIF38Z.mjs.map +1 -0
  180. package/dist/utils.d.mts +12 -5
  181. package/dist/utils.d.mts.map +1 -1
  182. package/dist/utils.mjs +4 -3
  183. package/dist/worker-pool-BWHBLBJd.mjs +304 -0
  184. package/dist/worker-pool-BWHBLBJd.mjs.map +1 -0
  185. package/dist/workflow-runtime-7GaJ13c9.d.mts +30 -0
  186. package/dist/workflow-runtime-7GaJ13c9.d.mts.map +1 -0
  187. package/dist/workflows-COM3MKfD.mjs +1437 -0
  188. package/dist/workflows-COM3MKfD.mjs.map +1 -0
  189. package/package.json +68 -23
  190. package/scripts/install-packages.sh +0 -0
  191. package/test/attachment-reference-read-model.test.ts +28 -20
  192. package/test/attachments/auth.test.ts +85 -0
  193. package/test/attachments/byte-grants.test.ts +290 -0
  194. package/test/attachments/byte-routes-read-gate.integration.test.ts +314 -0
  195. package/test/attachments/download-target.test.ts +211 -32
  196. package/test/attachments/index.test.ts +47 -4
  197. package/test/attachments/reserve-metadata-parity.test.ts +96 -0
  198. package/test/attachments/routes-integration.test.ts +60 -4
  199. package/test/attachments/routes.test.ts +297 -35
  200. package/test/attachments/service-config.test.ts +41 -19
  201. package/test/attachments/url-signer.test.ts +105 -0
  202. package/test/boot-auth-config.test.ts +109 -0
  203. package/test/boot-create-signature-policy.test.ts +110 -0
  204. package/test/boot-env-isolation.test.ts +26 -0
  205. package/test/boot-helpers.ts +19 -0
  206. package/test/boot-inspection-enabled.test.ts +140 -0
  207. package/test/boot-mcp-auth.test.ts +449 -0
  208. package/test/boot-mcp-enabled.test.ts +119 -0
  209. package/test/boot-port-zero.test.ts +101 -0
  210. package/test/boot-preconditions.test.ts +200 -0
  211. package/test/boot-privacy.test.ts +232 -0
  212. package/test/boot-unsupported-stored-documents.test.ts +214 -0
  213. package/test/boot-without-renown.test.ts +83 -0
  214. package/test/boot-without-require-signatures.test.ts +76 -0
  215. package/test/boot-worker-trust-policy.test.ts +91 -0
  216. package/test/boot-workflow-singleton-conflict.test.ts +109 -0
  217. package/test/boot-workflow-singleton-retry.test.ts +122 -0
  218. package/test/builder-defaults.test.ts +80 -0
  219. package/test/config-from-env.test.ts +758 -0
  220. package/test/config-merge.test.ts +215 -0
  221. package/test/config-schema.test.ts +128 -0
  222. package/test/create-signature-policy.test.ts +69 -0
  223. package/test/default-drive-protocol-versions.test.ts +102 -0
  224. package/test/default-drive-slug.test.ts +97 -0
  225. package/test/durable-node-fs-pg16.test.ts +80 -0
  226. package/test/fatal-shutdown.test.ts +165 -0
  227. package/test/goldens/packages.graphql +797 -0
  228. package/test/goldens/privacy.graphql +853 -0
  229. package/test/goldens/reactor-drive-nodes.graphql +827 -0
  230. package/test/goldens/resolvers.json +322 -0
  231. package/test/goldens/supergraph.graphql +5652 -0
  232. package/test/goldens/workflow-runtime.graphql +1419 -0
  233. package/test/inspection-throttle.test.ts +23 -0
  234. package/test/observability-signals.test.ts +131 -0
  235. package/test/permissions-backfill.test.ts +486 -0
  236. package/test/pglite-dialect.test.ts +237 -2
  237. package/test/pglite-preflight.test.ts +313 -0
  238. package/test/pglite-storage-dirs.test.ts +113 -0
  239. package/test/pglite-store.test.ts +264 -0
  240. package/test/pglite-version.test.ts +9 -1
  241. package/test/plugin-config-schemas.test.ts +83 -0
  242. package/test/plugin-presence.test.ts +262 -0
  243. package/test/port-probe.test.ts +45 -0
  244. package/test/renown-storage-path.test.ts +40 -0
  245. package/test/renown-trust-policy.test.ts +313 -0
  246. package/test/served-schemas.test.ts +134 -0
  247. package/test/shutdown.test.ts +278 -0
  248. package/test/snapshot-writer.ts +94 -0
  249. package/test/store-lock.test.ts +65 -0
  250. package/test/two-switchboards.test.ts +146 -0
  251. package/test/unsupported-stored-documents.test.ts +72 -0
  252. package/test/worker-pool.test.ts +27 -1
  253. package/test/workflow/harness.ts +289 -0
  254. package/test/workflow/oauth.test.ts +205 -0
  255. package/test/workflow/resolvers.test.ts +369 -0
  256. package/test/workflow/runtime-host.test.ts +19 -0
  257. package/test/workflow/webhook-dedupe.test.ts +295 -0
  258. package/test/workflow/webhook-signed.test.ts +509 -0
  259. package/test/workflow/webhook-trigger-test.test.ts +82 -0
  260. package/test/workflow/webhook-unsigned.test.ts +345 -0
  261. package/test/workflow-reactor-access.test.ts +384 -0
  262. package/test/workflow-reactor-enforcement.test.ts +808 -0
  263. package/test/workflow-read-gate.test.ts +213 -0
  264. package/test/workflow-runtime.test.ts +1135 -0
  265. package/test/workflows-plugin-config.test.ts +77 -0
  266. package/tsconfig.json +11 -2
  267. package/tsdown.config.ts +12 -1
  268. package/vitest.config.ts +65 -0
  269. package/dist/server-CiKkVE6g.mjs +0 -1555
  270. package/dist/server-CiKkVE6g.mjs.map +0 -1
  271. package/dist/utils-Baw7rThP.mjs +0 -80
  272. package/dist/utils-Baw7rThP.mjs.map +0 -1
@@ -0,0 +1,1419 @@
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
+ """
34
+ One action or trigger of a piece, as a workflow pins it. The engine's own
35
+ blocks are the piece @powerhousedao/piece-core.
36
+ """
37
+ input BlockInput {
38
+ pieceName: String!
39
+ """
40
+ Exact semver.
41
+ """
42
+ pieceVersion: String!
43
+ """
44
+ The action or trigger name.
45
+ """
46
+ name: String!
47
+ """
48
+ action | trigger
49
+ """
50
+ kind: String!
51
+ }
52
+
53
+ type BlockResolutionRecord {
54
+ """
55
+ The trigger's or step's id.
56
+ """
57
+ stepId: String!
58
+ pieceName: String!
59
+ """
60
+ The version the block pins.
61
+ """
62
+ pieceVersion: String!
63
+ """
64
+ The action or trigger name.
65
+ """
66
+ name: String!
67
+ """
68
+ action | trigger
69
+ """
70
+ kind: String!
71
+ """
72
+ The version that runs; null when nothing resolves.
73
+ """
74
+ resolvedVersion: String
75
+ """
76
+ local | registry | activepieces | npm; null when nothing resolves.
77
+ """
78
+ source: String
79
+ """
80
+ exact | compatible | fallback | installed | missing
81
+ """
82
+ match: String!
83
+ """
84
+ Why the version that runs differs from the pin, or why nothing resolves.
85
+ """
86
+ note: String
87
+ """
88
+ The newest version any source offers.
89
+ """
90
+ latestVersion: String
91
+ }
92
+
93
+ type BlockSearchHit {
94
+ pieceName: String!
95
+ """
96
+ The version the hit is listed at; pin to it when picking the block.
97
+ """
98
+ pieceVersion: String!
99
+ """
100
+ The action or trigger name.
101
+ """
102
+ name: String!
103
+ pieceDisplayName: String!
104
+ logoUrl: String!
105
+ displayName: String!
106
+ description: String!
107
+ """
108
+ action | trigger
109
+ """
110
+ kind: String!
111
+ """
112
+ Triggers only: POLLING | WEBHOOK | APP_WEBHOOK | MANUAL
113
+ """
114
+ strategy: String
115
+ """
116
+ Why this block cannot run on this reactor; null when it can.
117
+ """
118
+ unsupported: String
119
+ }
120
+
121
+ type Connection implements IDocument {
122
+ id: String!
123
+ name: String!
124
+ documentType: String!
125
+ operations(skip: Int, first: Int): [Operation!]!
126
+ revision: Int!
127
+ createdAtUtcIso: DateTime!
128
+ lastModifiedAtUtcIso: DateTime!
129
+ initialState: Connection_ConnectionState!
130
+ state: Connection_ConnectionState!
131
+ stateJSON: JSONObject
132
+ }
133
+
134
+ type ConnectionCheckResult {
135
+ ok: Boolean!
136
+ detail: String
137
+ """
138
+ From auth.getConnectionIdentifier when the check passes; otherwise the
139
+ label the connection already holds.
140
+ """
141
+ accountLabel: String
142
+ }
143
+
144
+ type ConnectionRecord {
145
+ id: String!
146
+ name: String!
147
+ connectorId: String!
148
+ authType: String!
149
+ status: String!
150
+ accountLabel: String
151
+ }
152
+
153
+ enum Connection_ConnectionAuthType {
154
+ SECRET_TEXT
155
+ BASIC_AUTH
156
+ CUSTOM_AUTH
157
+ OAUTH2
158
+ OIDC
159
+ NONE
160
+ """
161
+ Reactor access for a piece's ctx.reactor; any piece may bind it.
162
+ """
163
+ REACTOR
164
+ }
165
+
166
+ type Connection_ConnectionState {
167
+ name: String!
168
+ """
169
+ Fully-qualified connector id: '@acme/connector-imap#imap'.
170
+ """
171
+ connectorId: String!
172
+ """
173
+ Activepieces auth kind, so a piece's PieceAuth maps directly.
174
+ """
175
+ authType: Connection_ConnectionAuthType!
176
+ """
177
+ Non-secret configuration, validated against the connector's auth schema; a ReactorConnectionConfig for REACTOR.
178
+ """
179
+ config: Unknown!
180
+ """
181
+ Secret handles; values never appear in state, operations, or the run journal.
182
+ """
183
+ secretRefs: [Connection_SecretRef!]!
184
+ status: Connection_ConnectionStatus!
185
+ lastCheckedAt: DateTime
186
+ lastError: String
187
+ """
188
+ Populated by the connector's own metadata call. Display only.
189
+ """
190
+ accountLabel: String
191
+ }
192
+
193
+ enum Connection_ConnectionStatus {
194
+ UNCONFIGURED
195
+ OK
196
+ ERROR
197
+ REVOKED
198
+ }
199
+
200
+ """
201
+ Config of a REACTOR connection. It holds no secrets.
202
+ """
203
+ type Connection_ReactorConnectionConfig {
204
+ """
205
+ Which reactor the connection reaches; 'local' is the only value.
206
+ """
207
+ endpoint: String!
208
+ """
209
+ 'read' limits the connection to reads; absent allows what the step declares.
210
+ """
211
+ access: String
212
+ }
213
+
214
+ type Connection_SecretRef {
215
+ id: OID!
216
+ """
217
+ Matches an auth property name in the connector's config schema.
218
+ """
219
+ name: String!
220
+ """
221
+ Opaque handle into the host secret provider. Not the secret.
222
+ """
223
+ ref: String!
224
+ }
225
+
226
+ scalar Currency
227
+
228
+ scalar Date
229
+
230
+ scalar DateTime
231
+
232
+ type DocumentDrive implements IDocument {
233
+ id: String!
234
+ name: String!
235
+ documentType: String!
236
+ operations(skip: Int, first: Int): [Operation!]!
237
+ revision: Int!
238
+ createdAtUtcIso: DateTime!
239
+ lastModifiedAtUtcIso: DateTime!
240
+ initialState: DocumentDrive_DocumentDriveState!
241
+ state: DocumentDrive_DocumentDriveState!
242
+ stateJSON: JSONObject
243
+ }
244
+
245
+ type DocumentDrive_DocumentDriveLocalState {
246
+ sharingType: String
247
+ listeners: [DocumentDrive_Listener!]!
248
+ triggers: [DocumentDrive_Trigger!]!
249
+ availableOffline: Boolean!
250
+ }
251
+
252
+ type DocumentDrive_DocumentDriveState {
253
+ name: String!
254
+ nodes: [DocumentDrive_Node!]!
255
+ icon: String
256
+ }
257
+
258
+ type DocumentDrive_FileNode {
259
+ id: String!
260
+ name: String!
261
+ kind: String!
262
+ documentType: String!
263
+ parentFolder: String
264
+ }
265
+
266
+ type DocumentDrive_FolderNode {
267
+ id: String!
268
+ name: String!
269
+ kind: String!
270
+ parentFolder: String
271
+ }
272
+
273
+ type DocumentDrive_Listener {
274
+ listenerId: ID!
275
+ label: String
276
+ block: Boolean!
277
+ system: Boolean!
278
+ filter: DocumentDrive_ListenerFilter!
279
+ callInfo: DocumentDrive_ListenerCallInfo
280
+ }
281
+
282
+ type DocumentDrive_ListenerCallInfo {
283
+ transmitterType: DocumentDrive_TransmitterType
284
+ name: String
285
+ data: String
286
+ }
287
+
288
+ type DocumentDrive_ListenerFilter {
289
+ documentType: [String!]!
290
+ documentId: [ID!]
291
+ scope: [String!]
292
+ branch: [String!]
293
+ }
294
+
295
+ union DocumentDrive_Node = DocumentDrive_FolderNode | DocumentDrive_FileNode
296
+
297
+ type DocumentDrive_PullResponderTriggerData {
298
+ listenerId: ID!
299
+ url: String!
300
+ interval: String!
301
+ }
302
+
303
+ enum DocumentDrive_TransmitterType {
304
+ Internal
305
+ SwitchboardPush
306
+ PullResponder
307
+ SecureConnect
308
+ MatrixConnect
309
+ RESTWebhook
310
+ }
311
+
312
+ type DocumentDrive_Trigger {
313
+ id: ID!
314
+ type: DocumentDrive_TriggerType!
315
+ data: DocumentDrive_TriggerData
316
+ }
317
+
318
+ union DocumentDrive_TriggerData = DocumentDrive_PullResponderTriggerData
319
+
320
+ enum DocumentDrive_TriggerType {
321
+ PullResponder
322
+ }
323
+
324
+ type DocumentModel implements IDocument {
325
+ id: String!
326
+ name: String!
327
+ documentType: String!
328
+ operations(skip: Int, first: Int): [Operation!]!
329
+ revision: Int!
330
+ createdAtUtcIso: DateTime!
331
+ lastModifiedAtUtcIso: DateTime!
332
+ stateJSON: JSONObject
333
+ }
334
+
335
+ type DocumentModel_Author {
336
+ name: String!
337
+ website: String
338
+ }
339
+
340
+ type DocumentModel_CodeExample {
341
+ id: ID!
342
+ value: String!
343
+ }
344
+
345
+ type DocumentModel_DocumentModelGlobalState {
346
+ name: String!
347
+ id: String!
348
+ extension: String!
349
+ description: String!
350
+ author: DocumentModel_Author!
351
+ specifications: [DocumentModel_DocumentSpecification!]!
352
+ }
353
+
354
+ type DocumentModel_DocumentSpecification {
355
+ version: Int!
356
+ state: DocumentModel_ScopeState!
357
+ modules: [DocumentModel_Module!]!
358
+ changeLog: [String!]!
359
+ }
360
+
361
+ type DocumentModel_Module {
362
+ id: ID!
363
+ name: String!
364
+ description: String
365
+ operations: [DocumentModel_Operation!]!
366
+ }
367
+
368
+ type DocumentModel_Operation {
369
+ id: ID!
370
+ name: String
371
+ schema: String
372
+ description: String
373
+ template: String
374
+ errors: [DocumentModel_OperationError!]!
375
+ examples: [DocumentModel_CodeExample!]!
376
+ reducer: String
377
+ scope: String
378
+ }
379
+
380
+ type DocumentModel_OperationError {
381
+ id: ID!
382
+ code: String
383
+ name: String
384
+ description: String
385
+ template: String
386
+ }
387
+
388
+ type DocumentModel_ScopeState {
389
+ global: DocumentModel_State!
390
+ local: DocumentModel_State!
391
+ }
392
+
393
+ type DocumentModel_State {
394
+ schema: String!
395
+ initialValue: String!
396
+ examples: [DocumentModel_CodeExample!]!
397
+ }
398
+
399
+ type DriveDocument implements IDocument {
400
+ id: String!
401
+ name: String!
402
+ documentType: String!
403
+ revision: Int!
404
+ createdAtUtcIso: DateTime!
405
+ lastModifiedAtUtcIso: DateTime!
406
+ operations(first: Int, skip: Int): [Operation!]!
407
+ stateJSON: JSONObject
408
+ }
409
+
410
+ scalar EmailAddress
411
+
412
+ scalar EthereumAddress
413
+
414
+ type GqlDocument implements IDocument {
415
+ id: String!
416
+ name: String!
417
+ documentType: String!
418
+ revision: Int!
419
+ createdAtUtcIso: DateTime!
420
+ lastModifiedAtUtcIso: DateTime!
421
+ operations(first: Int, skip: Int): [Operation!]!
422
+ stateJSON: JSONObject
423
+ }
424
+
425
+ interface IDocument {
426
+ id: String!
427
+ name: String!
428
+ documentType: String!
429
+ revision: Int!
430
+ createdAtUtcIso: DateTime!
431
+ lastModifiedAtUtcIso: DateTime!
432
+ operations(first: Int, skip: Int): [Operation!]!
433
+ stateJSON: JSONObject
434
+ }
435
+
436
+ """
437
+ The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
438
+ """
439
+ scalar JSONObject
440
+
441
+ type Mutation {
442
+ workflowRuntime: WorkflowRuntimeMutations!
443
+ }
444
+
445
+ type OAuthAttempt {
446
+ connectionId: String!
447
+ """
448
+ PENDING | EXCHANGING | OK | ERROR
449
+ """
450
+ status: String!
451
+ error: String
452
+ }
453
+
454
+ type OAuthStart {
455
+ state: String!
456
+ """
457
+ Where to send the user to sign in.
458
+ """
459
+ authorizationUrl: String!
460
+ redirectUri: String!
461
+ expiresAt: String!
462
+ }
463
+
464
+ scalar OID
465
+
466
+ scalar OLabel
467
+
468
+ type Operation {
469
+ id: String!
470
+ type: String!
471
+ index: Int!
472
+ timestampUtcMs: DateTime!
473
+ hash: String!
474
+ skip: Int
475
+ inputText: String
476
+ error: String
477
+ context: PHOperationContext
478
+ }
479
+
480
+ scalar PHID
481
+
482
+ type PHOperationContext {
483
+ signer: Signer
484
+ }
485
+
486
+ type PieceSearchMatch {
487
+ pieceName: String!
488
+ pieceVersion: String!
489
+ displayName: String!
490
+ description: String!
491
+ logoUrl: String!
492
+ categories: [String!]!
493
+ """
494
+ local | registry | activepieces
495
+ """
496
+ source: String!
497
+ deprecated: Boolean
498
+ """
499
+ Why no block of the piece can run on this reactor.
500
+ """
501
+ unsupported: String
502
+ """
503
+ Every query token matched the piece's own name.
504
+ """
505
+ namedPiece: Boolean!
506
+ """
507
+ Matching blocks of the kind asked for, best first.
508
+ """
509
+ blocks: [BlockSearchHit!]!
510
+ }
511
+
512
+ type PieceSearchResult {
513
+ """
514
+ ready | indexing | error
515
+ """
516
+ status: String!
517
+ pieces: [PieceSearchMatch!]!
518
+ indexedPieces: Int!
519
+ error: String
520
+ }
521
+
522
+ type Query {
523
+ workflowRuntime: WorkflowRuntimeQueries!
524
+ _service: _Service!
525
+ }
526
+
527
+ type ReactorDrive implements IDocument {
528
+ id: String!
529
+ name: String!
530
+ documentType: String!
531
+ operations(skip: Int, first: Int): [Operation!]!
532
+ revision: Int!
533
+ createdAtUtcIso: DateTime!
534
+ lastModifiedAtUtcIso: DateTime!
535
+ initialState: ReactorDrive_ReactorDriveState!
536
+ state: ReactorDrive_ReactorDriveState!
537
+ stateJSON: JSONObject
538
+ }
539
+
540
+ type ReactorDrive_ReactorDriveLocalState {
541
+ sharingType: String!
542
+ availableOffline: Boolean!
543
+ }
544
+
545
+ type ReactorDrive_ReactorDriveState {
546
+ name: String!
547
+ icon: String
548
+ }
549
+
550
+ type ReactorGroup implements IDocument {
551
+ id: String!
552
+ name: String!
553
+ documentType: String!
554
+ operations(skip: Int, first: Int): [Operation!]!
555
+ revision: Int!
556
+ createdAtUtcIso: DateTime!
557
+ lastModifiedAtUtcIso: DateTime!
558
+ initialState: ReactorGroup_ReactorGroupState!
559
+ state: ReactorGroup_ReactorGroupState!
560
+ stateJSON: JSONObject
561
+ }
562
+
563
+ """
564
+ A member address list gated by the group document's own auth scope. Addresses
565
+ are stored as given and compared case-insensitively, matching how { address }
566
+ principals are compared during auth evaluation.
567
+ """
568
+ type ReactorGroup_ReactorGroupState {
569
+ """
570
+ Display name of the group.
571
+ """
572
+ name: String!
573
+ """
574
+ Free-text description of the group's purpose.
575
+ """
576
+ description: String!
577
+ """
578
+ Member wallet addresses. No duplicates under case-insensitive comparison.
579
+ """
580
+ members: [String!]!
581
+ }
582
+
583
+ type ReactorIdentity {
584
+ """
585
+ The address the host signs as; null without a signed-in identity.
586
+ """
587
+ address: String
588
+ """
589
+ The did:key that signs the host's operations.
590
+ """
591
+ key: String!
592
+ }
593
+
594
+ type RuntimeHost {
595
+ """
596
+ switchboard@<machine>: what apps record as the runner
597
+ """
598
+ id: String!
599
+ """
600
+ The machine's name, for people: where a sign-in has to happen
601
+ """
602
+ label: String!
603
+ }
604
+
605
+ type SecretRecord {
606
+ ref: String!
607
+ label: String
608
+ """
609
+ The document the secret resolves for; null for a host secret (an OAuth app's).
610
+ """
611
+ ownerId: String
612
+ """
613
+ Whether the caller may rotate or delete it: its creator, able to write its owner.
614
+ """
615
+ manageable: Boolean!
616
+ version: Int!
617
+ status: String!
618
+ createdAt: String!
619
+ updatedAt: String!
620
+ }
621
+
622
+ type Signer {
623
+ user: SignerUser
624
+ app: SignerApp
625
+ signatures: [String!]!
626
+ }
627
+
628
+ type SignerApp {
629
+ name: String!
630
+ key: String!
631
+ }
632
+
633
+ type SignerUser {
634
+ address: String!
635
+ networkId: String!
636
+ chainId: Int!
637
+ }
638
+
639
+ type TriggerStateRecord {
640
+ workflowId: String!
641
+ pieceName: String!
642
+ triggerName: String!
643
+ status: String!
644
+ intervalMs: Int!
645
+ nextPollAt: String
646
+ lastPollAt: String
647
+ lastError: String
648
+ consecutiveFailures: Int!
649
+ """
650
+ When a webhook trigger next renews its subscription; null if it never does.
651
+ """
652
+ nextRenewAt: String
653
+ """
654
+ The last failed renewal, kept apart from lastError, the poll's.
655
+ """
656
+ renewError: String
657
+ renewFailures: Int!
658
+ """
659
+ The piece version the trigger armed with; null for a host-fed trigger.
660
+ """
661
+ pieceVersion: String
662
+ pieceSource: String
663
+ versionMatch: String
664
+ versionNote: String
665
+ }
666
+
667
+ scalar URL
668
+
669
+ """
670
+ The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
671
+ """
672
+ scalar Unknown
673
+
674
+ scalar Upload
675
+
676
+ type WebhookEndpointRecord {
677
+ workflowId: String!
678
+ url: String!
679
+ """
680
+ False when the host gave the webhook service no public origin, so the url
681
+ above is a bare path. Switchboard always gives one, falling back to
682
+ http://localhost:<port> when PUBLIC_URL is unset.
683
+ """
684
+ absoluteUrl: Boolean!
685
+ """
686
+ True while the workflow is ENABLED with a valid webhook trigger
687
+ """
688
+ armed: Boolean!
689
+ createdAt: String!
690
+ }
691
+
692
+ type Workflow implements IDocument {
693
+ id: String!
694
+ name: String!
695
+ documentType: String!
696
+ operations(skip: Int, first: Int): [Operation!]!
697
+ revision: Int!
698
+ createdAtUtcIso: DateTime!
699
+ lastModifiedAtUtcIso: DateTime!
700
+ initialState: Workflow_WorkflowState!
701
+ state: Workflow_WorkflowState!
702
+ stateJSON: JSONObject
703
+ }
704
+
705
+ type WorkflowRunPayload {
706
+ runId: String
707
+ status: String!
708
+ error: String
709
+ errorName: String
710
+ steps: [WorkflowStepRun!]!
711
+ }
712
+
713
+ type WorkflowRunRecord {
714
+ id: String!
715
+ workflowId: String!
716
+ workflowName: String!
717
+ workflowVersion: Int!
718
+ triggerKind: String!
719
+ triggerPayload: Unknown
720
+ status: String!
721
+ error: String
722
+ errorName: String
723
+ """
724
+ When the run began executing; a PENDING run's is when it was journaled.
725
+ """
726
+ startedAt: String!
727
+ endedAt: String
728
+ rerunOf: String
729
+ """
730
+ How many warningNotes the run has; a run with any is not a plain success.
731
+ """
732
+ warnings: Int!
733
+ """
734
+ Steps that ran a fallback piece version, edges on ports nothing emits.
735
+ """
736
+ warningNotes: [String!]!
737
+ steps: [WorkflowStepRunRecord!]!
738
+ }
739
+
740
+ type WorkflowRunResultPage {
741
+ items: [WorkflowRunRecord!]!
742
+ hasNextPage: Boolean!
743
+ """
744
+ True when the page was read after a cursor.
745
+ """
746
+ hasPreviousPage: Boolean!
747
+ """
748
+ Resumes after this page's last run; null for an empty page.
749
+ """
750
+ cursor: String
751
+ }
752
+
753
+ input WorkflowRunsPagingInput {
754
+ """
755
+ Page size; default 25, at most 100.
756
+ """
757
+ limit: Int
758
+ """
759
+ The cursor of the previous page.
760
+ """
761
+ cursor: String
762
+ }
763
+
764
+ """
765
+ WorkflowRuntime Mutations
766
+ """
767
+ type WorkflowRuntimeMutations {
768
+ """
769
+ Fires a workflow's manual trigger (the core piece's) and runs it to completion.
770
+ """
771
+ fire(workflowId: String!, payload: Unknown): WorkflowRunPayload!
772
+ """
773
+ Runs the workflow's trigger now, as its schedule or poll would: a
774
+ schedule fires the workflow, a polling trigger polls its source ("sync
775
+ now"). False when it has no armed trigger (disabled, parked, erroring).
776
+ """
777
+ pollNow(workflowId: String!): Boolean!
778
+ """
779
+ Samples the draft trigger and saves it as the trigger's last test. A piece
780
+ trigger runs its test hook (no cursor changes). Of the core piece's
781
+ triggers, manual takes payload, schedule samples a fire now, and webhook
782
+ waits for the next delivery to the workflow's endpoint, up to
783
+ timeoutSeconds (default and cap 300), and that delivery runs nothing.
784
+ """
785
+ testTrigger(
786
+ workflowId: String!
787
+ payload: Unknown
788
+ timeoutSeconds: Int
789
+ driveId: String
790
+ ): Unknown
791
+ """
792
+ Stops a webhook trigger test that is waiting; false when none was.
793
+ """
794
+ cancelTriggerTest(workflowId: String!): Boolean!
795
+ """
796
+ Runs one draft step against the latest test outputs of the blocks it
797
+ reads, journaled as a "test" run and noted as the step's lastTest.
798
+ driveId waits for an unsynced workflow, as for webhookEndpoint.
799
+ """
800
+ testStep(
801
+ workflowId: String!
802
+ stepId: String!
803
+ driveId: String
804
+ ): WorkflowStepTestResult!
805
+ """
806
+ Resumes a FAILED run: succeeded steps replay from the journal,
807
+ execution restarts at the failure. Produces a new run.
808
+ """
809
+ rerun(runId: String!): WorkflowRunPayload!
810
+ """
811
+ Mints a managed secret for a connection or workflow document and returns
812
+ its ref; only that document resolves it. The value is stored encrypted
813
+ and is never readable back over any API.
814
+ """
815
+ createSecret(
816
+ value: String!
817
+ label: String
818
+ documentId: String!
819
+ ): SecretRecord!
820
+ """
821
+ Replaces the value behind an existing ref; documents stay untouched.
822
+ Only its creator, while able to write its owning document.
823
+ """
824
+ rotateSecret(ref: String!, value: String!): SecretRecord!
825
+ """
826
+ Tombstones a secret; its value becomes unrecoverable. Only its creator,
827
+ while able to write its owning document.
828
+ """
829
+ deleteSecret(ref: String!): Boolean!
830
+ """
831
+ Runs the piece's auth.validate against the connection's credentials,
832
+ then auth.getConnectionIdentifier for the account label, and records the
833
+ outcome on the connection document.
834
+ """
835
+ checkConnection(connectionId: String!): ConnectionCheckResult!
836
+ """
837
+ Opens an OAuth2 sign-in with the connection's own app (client_id in its
838
+ config, client_secret in its secretRefs). redirectUri is needed only when
839
+ oauthRedirectUri is a bare path. With returnUrl, which must be on the
840
+ caller's origin, the callback sends the browser back there with
841
+ ?ph_oauth=<state> instead of closing the window.
842
+ """
843
+ startOAuth(
844
+ connectionId: String!
845
+ redirectUri: String
846
+ returnUrl: String
847
+ ): OAuthStart!
848
+ }
849
+
850
+ """
851
+ WorkflowRuntime Queries
852
+ """
853
+ type WorkflowRuntimeQueries {
854
+ health: String!
855
+ """
856
+ Whether this reactor enforces document auth (REACTOR_AUTH_ENFORCEMENT).
857
+ On, a workflow needs a signed publish, and the host grants, to reach
858
+ documents. Answered to any caller.
859
+ """
860
+ authEnforcement: Boolean!
861
+ """
862
+ Who this host signs as: grant it on each document a step writes. Null for
863
+ a caller who is not signed in, or a host with no signer.
864
+ """
865
+ reactorIdentity: ReactorIdentity
866
+ """
867
+ REACTOR_AUTH_CONDITIONS. True: grant the host by key, with
868
+ { match: subject.key == key }; false: by address. Null for a caller who
869
+ is not signed in.
870
+ """
871
+ authConditions: Boolean
872
+ """
873
+ Why the workflow's last publish or enable got no reactor access, naming
874
+ the publisher and the connection; null when the check passed.
875
+ """
876
+ reactorAccessDenial(workflowId: String!): String
877
+ """
878
+ Persisted runs, newest first. Scope them to one workflow, or to every
879
+ workflow a drive holds; workflowId wins when both are given.
880
+ """
881
+ runs(
882
+ workflowId: String
883
+ driveId: String
884
+ limit: Int
885
+ """
886
+ Trigger kinds to leave out, e.g. test.
887
+ """
888
+ excludeTriggerKinds: [String!]
889
+ ): [WorkflowRunRecord!]!
890
+ """
891
+ The same listing a page at a time, newest journaled first. Pass a page's
892
+ cursor back in paging to read the next; a page is short only when
893
+ hasNextPage is false, or when the caller could read none of a long
894
+ stretch of runs. A run that starts between pages keeps its place.
895
+ """
896
+ runsPage(
897
+ workflowId: String
898
+ driveId: String
899
+ excludeTriggerKinds: [String!]
900
+ paging: WorkflowRunsPagingInput
901
+ ): WorkflowRunResultPage!
902
+ run(id: String!): WorkflowRunRecord
903
+ """
904
+ The descriptor (props, auth, ports) of one action or trigger, as the
905
+ version that runs it describes it; triggers come back under "trigger".
906
+ """
907
+ blockDescriptor(block: BlockInput!): Unknown
908
+ """
909
+ Resolves a dynamic prop against the current config values: a DROPDOWN
910
+ yields { options, placeholder, disabled }, a DYNAMIC prop yields the
911
+ resolved sub-property descriptor list.
912
+ """
913
+ blockOptions(
914
+ block: BlockInput!
915
+ propName: String!
916
+ input: Unknown
917
+ connectionId: String
918
+ """
919
+ What the author typed, for a DROPDOWN declared with refreshOnSearch.
920
+ """
921
+ searchValue: String
922
+ """
923
+ The step's reactor connection; its filter narrows what the resolver reads.
924
+ """
925
+ reactorConnectionId: String
926
+ ): Unknown
927
+ """
928
+ Every piece this reactor offers: the core piece, its package pieces, and
929
+ the pieces the registry and Activepieces publish.
930
+ """
931
+ pieceCatalog: Unknown
932
+ """
933
+ A piece's actions at one version; pin a step to that version.
934
+ """
935
+ pieceActions(
936
+ packageName: String!
937
+ """
938
+ That version; the installed or latest one when omitted.
939
+ """
940
+ version: String
941
+ ): Unknown
942
+ """
943
+ A piece's triggers at one version; pin a trigger to that version.
944
+ """
945
+ pieceTriggers(
946
+ packageName: String!
947
+ """
948
+ That version; the installed or latest one when omitted.
949
+ """
950
+ version: String
951
+ ): Unknown
952
+ """
953
+ Full piece detail (PieceMetadataModel-shaped), verbatim from the cloud API.
954
+ """
955
+ pieceDetail(
956
+ packageName: String!
957
+ """
958
+ That version; the installed or latest one when omitted.
959
+ """
960
+ version: String
961
+ ): Unknown
962
+ """
963
+ Piece and block search across the catalog, grouped by piece. The index
964
+ builds lazily on first use; poll while status is "indexing".
965
+ """
966
+ searchPieces(
967
+ query: String!
968
+ """
969
+ action | trigger
970
+ """
971
+ kind: String!
972
+ """
973
+ local | registry | activepieces; all when omitted.
974
+ """
975
+ sources: [String!]
976
+ """
977
+ Category ids, any of; all when omitted.
978
+ """
979
+ categories: [String!]
980
+ """
981
+ Pieces returned.
982
+ """
983
+ limit: Int
984
+ ): PieceSearchResult!
985
+ """
986
+ Health of every registered piece trigger (poll schedule, errors).
987
+ """
988
+ triggerStates: [TriggerStateRecord!]!
989
+ """
990
+ Authored output shape of a block (SDL / outputSchema / sampleData).
991
+ """
992
+ blockOutputTree(block: BlockInput!, config: Unknown): Unknown
993
+ """
994
+ Output shape of a draft step or trigger: its latest test output
995
+ (source "test", with sample and testedAt) when tested, else as blockOutputTree.
996
+ """
997
+ stepOutputTree(workflowId: String!, stepId: String!): Unknown
998
+ """
999
+ Every block of the draft (trigger first) as this reactor resolves it:
1000
+ which piece version runs, from where, and how it matches the pin.
1001
+ """
1002
+ blockResolutions(workflowId: String!): [BlockResolutionRecord!]!
1003
+ """
1004
+ Every powerhouse/connection document, for connection pickers.
1005
+ """
1006
+ connections: [ConnectionRecord!]!
1007
+ """
1008
+ The webhook endpoint for a workflow: the URL to hand the provider. Minted
1009
+ on first ask, whether or not the workflow is armed — an author needs the
1010
+ URL before enabling, and the armed field carries that difference. Null
1011
+ only when the host has no webhook service. With driveId, a workflow not
1012
+ synced here yet is waited for briefly, then fails as WORKFLOW_SYNCING.
1013
+ """
1014
+ webhookEndpoint(workflowId: String!, driveId: String): WebhookEndpointRecord
1015
+ """
1016
+ Secret metadata (label, version, status). Never the value. Only secrets
1017
+ whose owning document the caller can read.
1018
+ """
1019
+ secret(ref: String!): SecretRecord
1020
+ secrets: [SecretRecord!]!
1021
+ """
1022
+ The URL an OAuth2 app must register as its redirect. A bare path when
1023
+ this host does not know its public origin; resolve it against the URL
1024
+ this API is reached at. Null when the host serves no HTTP routes.
1025
+ """
1026
+ oauthRedirectUri: String
1027
+ """
1028
+ The switchboard this runtime lives in: what an app records as the runner
1029
+ of the workflows and connections it sets up here.
1030
+ """
1031
+ host: RuntimeHost!
1032
+ """
1033
+ How an OAuth2 sign-in opened by startOAuth stands; null when unknown.
1034
+ """
1035
+ oauthAttempt(state: String!): OAuthAttempt
1036
+ }
1037
+
1038
+ type WorkflowStepRun {
1039
+ stepId: String!
1040
+ key: String!
1041
+ pieceName: String!
1042
+ blockName: String!
1043
+ status: String!
1044
+ input: Unknown
1045
+ output: Unknown
1046
+ port: String
1047
+ error: String
1048
+ errorName: String
1049
+ }
1050
+
1051
+ type WorkflowStepRunRecord {
1052
+ stepId: String!
1053
+ stepKey: String!
1054
+ pieceName: String!
1055
+ """
1056
+ The action the step ran, or the trigger a trigger test sampled.
1057
+ """
1058
+ blockName: String!
1059
+ status: String!
1060
+ input: Unknown
1061
+ output: Unknown
1062
+ port: String
1063
+ error: String
1064
+ """
1065
+ The thrown error's name, e.g. ReactorAccessDeniedError.
1066
+ """
1067
+ errorName: String
1068
+ startedAt: String
1069
+ endedAt: String
1070
+ """
1071
+ The piece version that ran; null for an unresolved block.
1072
+ """
1073
+ pieceVersion: String
1074
+ """
1075
+ local | registry | activepieces | npm
1076
+ """
1077
+ pieceSource: String
1078
+ """
1079
+ exact | compatible | fallback | installed | missing
1080
+ """
1081
+ versionMatch: String
1082
+ """
1083
+ Why the version that ran differs from the pin.
1084
+ """
1085
+ versionNote: String
1086
+ }
1087
+
1088
+ type WorkflowStepTestResult {
1089
+ """
1090
+ Null when the test never started, e.g. an upstream block is untested.
1091
+ """
1092
+ runId: String
1093
+ """
1094
+ SUCCEEDED | FAILED | INDETERMINATE. INDETERMINATE is neither: a host call
1095
+ the block made timed out, so a write it asked for may well have landed.
1096
+ Show it distinctly - it is not a confirmed pass.
1097
+ """
1098
+ status: String!
1099
+ output: Unknown
1100
+ error: String
1101
+ errorName: String
1102
+ durationMs: Int!
1103
+ }
1104
+
1105
+ enum Workflow_BackoffKind {
1106
+ FIXED
1107
+ EXPONENTIAL
1108
+ }
1109
+
1110
+ enum Workflow_ConcurrencyMode {
1111
+ SINGLETON
1112
+ QUEUE
1113
+ PARALLEL
1114
+ }
1115
+
1116
+ enum Workflow_FailureMode {
1117
+ PARK
1118
+ NOTIFY
1119
+ IGNORE
1120
+ }
1121
+
1122
+ """
1123
+ Layout only. The runtime ignores it.
1124
+ """
1125
+ type Workflow_Point {
1126
+ x: Float!
1127
+ y: Float!
1128
+ }
1129
+
1130
+ enum Workflow_PropertyMode {
1131
+ """
1132
+ The field's own control.
1133
+ """
1134
+ MANUAL
1135
+ """
1136
+ The author switched the field to a free {{…}} expression.
1137
+ """
1138
+ EXPRESSION
1139
+ }
1140
+
1141
+ type Workflow_PropertySetting {
1142
+ prop: String!
1143
+ mode: Workflow_PropertyMode!
1144
+ """
1145
+ Resolved DynamicProperties children, options stripped.
1146
+ """
1147
+ schema: Unknown
1148
+ }
1149
+
1150
+ """
1151
+ Snapshot of the draft taken by PUBLISH_WORKFLOW.
1152
+ """
1153
+ type Workflow_PublishedWorkflow {
1154
+ """
1155
+ Draft version the snapshot was taken at.
1156
+ """
1157
+ version: Int!
1158
+ publishedAt: DateTime!
1159
+ trigger: Workflow_TriggerBinding
1160
+ steps: [Workflow_WorkflowStep!]!
1161
+ edges: [Workflow_WorkflowEdge!]!
1162
+ variables: [Workflow_WorkflowVariable!]!
1163
+ policy: Workflow_WorkflowPolicy!
1164
+ }
1165
+
1166
+ type Workflow_RetryPolicy {
1167
+ """
1168
+ 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.
1169
+ """
1170
+ maxAttempts: Int!
1171
+ backoff: Workflow_BackoffKind!
1172
+ initialDelaySeconds: Int!
1173
+ maxDelaySeconds: Int!
1174
+ """
1175
+ 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.
1176
+ """
1177
+ retryOn: [String!]!
1178
+ }
1179
+
1180
+ enum Workflow_RunStatus {
1181
+ PENDING
1182
+ RUNNING
1183
+ WAITING
1184
+ SUCCEEDED
1185
+ FAILED
1186
+ CANCELLED
1187
+ PARKED
1188
+ }
1189
+
1190
+ """
1191
+ Reference to the latest test run in the run store.
1192
+ """
1193
+ type Workflow_StepTestRecord {
1194
+ runId: String!
1195
+ testedAt: DateTime!
1196
+ }
1197
+
1198
+ type Workflow_TriggerBinding {
1199
+ id: OID!
1200
+ """
1201
+ Package name of the trigger's piece, e.g. '@powerhousedao/piece-core' or '@acme/piece-imap'.
1202
+ """
1203
+ pieceName: String!
1204
+ """
1205
+ Exact semver of the piece, e.g. '1.2.0'.
1206
+ """
1207
+ pieceVersion: String!
1208
+ """
1209
+ Trigger name within the piece, e.g. 'schedule' or 'new_message'.
1210
+ """
1211
+ triggerName: String!
1212
+ """
1213
+ Connection document id, when the trigger's connector requires one.
1214
+ """
1215
+ connectionId: PHID
1216
+ """
1217
+ Reactor connection document id, when the trigger declares requireReactor.
1218
+ """
1219
+ reactorConnectionId: PHID
1220
+ """
1221
+ Validated against the trigger's configSchema.
1222
+ """
1223
+ config: Unknown!
1224
+ propertySettings: [Workflow_PropertySetting!]
1225
+ lastTest: Workflow_StepTestRecord
1226
+ """
1227
+ Timestamp of the last real edit; a lastTest before it is stale.
1228
+ """
1229
+ updatedAt: DateTime
1230
+ }
1231
+
1232
+ enum Workflow_VariableType {
1233
+ TEXT
1234
+ NUMBER
1235
+ BOOLEAN
1236
+ JSON
1237
+ """
1238
+ value is a secret-provider handle (the format of a connection SecretRef.ref), never the plaintext.
1239
+ """
1240
+ SECRET
1241
+ }
1242
+
1243
+ type Workflow_WorkflowEdge {
1244
+ id: OID!
1245
+ """
1246
+ Source step id, or the trigger id for the entry edge.
1247
+ """
1248
+ from: OID!
1249
+ to: OID!
1250
+ """
1251
+ 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.
1252
+ """
1253
+ port: String!
1254
+ """
1255
+ Optional guard expression; the edge is taken only when it evaluates truthy.
1256
+ """
1257
+ condition: String
1258
+ }
1259
+
1260
+ """
1261
+ What manages a workflow: the document that defines it, and how to name it to a person.
1262
+ """
1263
+ type Workflow_WorkflowManager {
1264
+ documentId: PHID!
1265
+ """
1266
+ e.g. sektar/integration
1267
+ """
1268
+ documentType: String!
1269
+ """
1270
+ e.g. Powerhouse - Google Calendar
1271
+ """
1272
+ label: String!
1273
+ }
1274
+
1275
+ type Workflow_WorkflowPolicy {
1276
+ """
1277
+ ENFORCED. SINGLETON drops a firing while a run is active (journaled CANCELLED, not dropped silently); QUEUE serialises; PARALLEL runs concurrently.
1278
+ """
1279
+ concurrency: Workflow_ConcurrencyMode!
1280
+ """
1281
+ ENFORCED under PARALLEL: how many runs of this workflow may execute at once; null is unbounded. SINGLETON and QUEUE are 1 by definition.
1282
+ """
1283
+ maxParallelRuns: Int
1284
+ """
1285
+ ENFORCED. Checked between steps and while a retry waits; past it the run ends CANCELLED.
1286
+ """
1287
+ runTimeoutSeconds: Int!
1288
+ """
1289
+ 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.
1290
+ """
1291
+ maxSuspensionDays: Int!
1292
+ """
1293
+ ENFORCED. The fallback for a step with no retry of its own.
1294
+ """
1295
+ defaultRetry: Workflow_RetryPolicy!
1296
+ """
1297
+ 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.
1298
+ """
1299
+ onFailure: Workflow_FailureMode!
1300
+ """
1301
+ 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.
1302
+ """
1303
+ retainRunsDays: Int!
1304
+ """
1305
+ NOT YET ENFORCED. The run journal is relational; there is no run document model to write.
1306
+ """
1307
+ journalAsDocument: Boolean!
1308
+ }
1309
+
1310
+ type Workflow_WorkflowState {
1311
+ name: String!
1312
+ description: String
1313
+ """
1314
+ Only ENABLED workflows get trigger instances.
1315
+ """
1316
+ status: Workflow_WorkflowStatus!
1317
+ """
1318
+ Bumped on every draft edit; REVERT_TO_PUBLISHED resets it to published.version. A run records the version it executed.
1319
+ """
1320
+ version: Int!
1321
+ trigger: Workflow_TriggerBinding
1322
+ steps: [Workflow_WorkflowStep!]!
1323
+ edges: [Workflow_WorkflowEdge!]!
1324
+ variables: [Workflow_WorkflowVariable!]!
1325
+ policy: Workflow_WorkflowPolicy!
1326
+ """
1327
+ Last published snapshot; version !== published.version means unpublished changes.
1328
+ """
1329
+ published: Workflow_PublishedWorkflow
1330
+ """
1331
+ Who keeps this workflow as it is, e.g. an app's integration; null: people edit it. Editors show a managed workflow read-only.
1332
+ """
1333
+ managedBy: Workflow_WorkflowManager
1334
+ """
1335
+ Denormalised for inspectors; written by the runtime.
1336
+ """
1337
+ lastRunAt: DateTime
1338
+ lastRunStatus: Workflow_RunStatus
1339
+ }
1340
+
1341
+ enum Workflow_WorkflowStatus {
1342
+ DRAFT
1343
+ ENABLED
1344
+ DISABLED
1345
+ ARCHIVED
1346
+ }
1347
+
1348
+ type Workflow_WorkflowStep {
1349
+ id: OID!
1350
+ """
1351
+ Author-visible label; unique within the workflow; used in expressions.
1352
+ """
1353
+ key: String!
1354
+ name: String!
1355
+ """
1356
+ Package name of the step's piece, e.g. '@powerhousedao/piece-core' or '@activepieces/piece-http'.
1357
+ """
1358
+ pieceName: String!
1359
+ """
1360
+ Exact semver of the piece, e.g. '0.11.19'.
1361
+ """
1362
+ pieceVersion: String!
1363
+ """
1364
+ Action name within the piece, e.g. 'branch' or 'send_request'.
1365
+ """
1366
+ actionName: String!
1367
+ connectionId: PHID
1368
+ """
1369
+ Reactor connection document id, when the action declares requireReactor.
1370
+ """
1371
+ reactorConnectionId: PHID
1372
+ config: Unknown!
1373
+ """
1374
+ ENFORCED. Per-step override of the workflow default retry policy.
1375
+ """
1376
+ retry: Workflow_RetryPolicy
1377
+ """
1378
+ ENFORCED. Also raises the cap on each host call the step's piece makes, which is never shorter than the step's own timeout.
1379
+ """
1380
+ timeoutSeconds: Int
1381
+ """
1382
+ 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.
1383
+ """
1384
+ idempotencyKeyExpression: String
1385
+ position: Workflow_Point
1386
+ propertySettings: [Workflow_PropertySetting!]
1387
+ lastTest: Workflow_StepTestRecord
1388
+ """
1389
+ Skipped steps are passed over at run time.
1390
+ """
1391
+ skip: Boolean
1392
+ """
1393
+ Timestamp of the last real edit; a lastTest before it is stale.
1394
+ """
1395
+ updatedAt: DateTime
1396
+ }
1397
+
1398
+ type Workflow_WorkflowVariable {
1399
+ id: OID!
1400
+ """
1401
+ Name used in expressions.
1402
+ """
1403
+ key: String!
1404
+ """
1405
+ The value a run reads as variables.<key>.
1406
+ """
1407
+ value: Unknown
1408
+ description: String
1409
+ """
1410
+ Null means untyped; consumers infer the kind of value it holds.
1411
+ """
1412
+ type: Workflow_VariableType
1413
+ }
1414
+
1415
+ scalar _FieldSet
1416
+
1417
+ type _Service {
1418
+ sdl: String
1419
+ }