@powerhousedao/switchboard 6.2.3-dev.8 → 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 (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 +1057 -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-eNNf230W.mjs +2518 -0
  174. package/dist/server-eNNf230W.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-BbV_nodR.mjs +119 -0
  179. package/dist/utils-BbV_nodR.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-5Chwj98o.mjs +1440 -0
  188. package/dist/workflows-5Chwj98o.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 +78 -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 +321 -0
  231. package/test/goldens/supergraph.graphql +5636 -0
  232. package/test/goldens/workflow-runtime.graphql +1403 -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 +214 -0
  255. package/test/workflow/resolvers.test.ts +357 -0
  256. package/test/workflow/runtime-host.test.ts +20 -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,1403 @@
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
+ version: Int!
609
+ status: String!
610
+ createdAt: String!
611
+ updatedAt: String!
612
+ }
613
+
614
+ type Signer {
615
+ user: SignerUser
616
+ app: SignerApp
617
+ signatures: [String!]!
618
+ }
619
+
620
+ type SignerApp {
621
+ name: String!
622
+ key: String!
623
+ }
624
+
625
+ type SignerUser {
626
+ address: String!
627
+ networkId: String!
628
+ chainId: Int!
629
+ }
630
+
631
+ type TriggerStateRecord {
632
+ workflowId: String!
633
+ pieceName: String!
634
+ triggerName: String!
635
+ status: String!
636
+ intervalMs: Int!
637
+ nextPollAt: String
638
+ lastPollAt: String
639
+ lastError: String
640
+ consecutiveFailures: Int!
641
+ """
642
+ When a webhook trigger next renews its subscription; null if it never does.
643
+ """
644
+ nextRenewAt: String
645
+ """
646
+ The last failed renewal, kept apart from lastError, the poll's.
647
+ """
648
+ renewError: String
649
+ renewFailures: Int!
650
+ """
651
+ The piece version the trigger armed with; null for a host-fed trigger.
652
+ """
653
+ pieceVersion: String
654
+ pieceSource: String
655
+ versionMatch: String
656
+ versionNote: String
657
+ }
658
+
659
+ scalar URL
660
+
661
+ """
662
+ The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
663
+ """
664
+ scalar Unknown
665
+
666
+ scalar Upload
667
+
668
+ type WebhookEndpointRecord {
669
+ workflowId: String!
670
+ url: String!
671
+ """
672
+ False when the host gave the webhook service no public origin, so the url
673
+ above is a bare path. Switchboard always gives one, falling back to
674
+ http://localhost:<port> when PUBLIC_URL is unset.
675
+ """
676
+ absoluteUrl: Boolean!
677
+ """
678
+ True while the workflow is ENABLED with a valid webhook trigger
679
+ """
680
+ armed: Boolean!
681
+ createdAt: String!
682
+ }
683
+
684
+ type Workflow implements IDocument {
685
+ id: String!
686
+ name: String!
687
+ documentType: String!
688
+ operations(skip: Int, first: Int): [Operation!]!
689
+ revision: Int!
690
+ createdAtUtcIso: DateTime!
691
+ lastModifiedAtUtcIso: DateTime!
692
+ initialState: Workflow_WorkflowState!
693
+ state: Workflow_WorkflowState!
694
+ stateJSON: JSONObject
695
+ }
696
+
697
+ type WorkflowRunPayload {
698
+ runId: String
699
+ status: String!
700
+ error: String
701
+ errorName: String
702
+ steps: [WorkflowStepRun!]!
703
+ }
704
+
705
+ type WorkflowRunRecord {
706
+ id: String!
707
+ workflowId: String!
708
+ workflowName: String!
709
+ workflowVersion: Int!
710
+ triggerKind: String!
711
+ triggerPayload: Unknown
712
+ status: String!
713
+ error: String
714
+ errorName: String
715
+ """
716
+ When the run began executing; a PENDING run's is when it was journaled.
717
+ """
718
+ startedAt: String!
719
+ endedAt: String
720
+ rerunOf: String
721
+ """
722
+ How many warningNotes the run has; a run with any is not a plain success.
723
+ """
724
+ warnings: Int!
725
+ """
726
+ Steps that ran a fallback piece version, edges on ports nothing emits.
727
+ """
728
+ warningNotes: [String!]!
729
+ steps: [WorkflowStepRunRecord!]!
730
+ }
731
+
732
+ type WorkflowRunResultPage {
733
+ items: [WorkflowRunRecord!]!
734
+ hasNextPage: Boolean!
735
+ """
736
+ True when the page was read after a cursor.
737
+ """
738
+ hasPreviousPage: Boolean!
739
+ """
740
+ Resumes after this page's last run; null for an empty page.
741
+ """
742
+ cursor: String
743
+ }
744
+
745
+ input WorkflowRunsPagingInput {
746
+ """
747
+ Page size; default 25, at most 100.
748
+ """
749
+ limit: Int
750
+ """
751
+ The cursor of the previous page.
752
+ """
753
+ cursor: String
754
+ }
755
+
756
+ """
757
+ WorkflowRuntime Mutations
758
+ """
759
+ type WorkflowRuntimeMutations {
760
+ """
761
+ Fires a workflow's manual trigger (the core piece's) and runs it to completion.
762
+ """
763
+ fire(workflowId: String!, payload: Unknown): WorkflowRunPayload!
764
+ """
765
+ Runs the workflow's trigger now, as its schedule or poll would: a
766
+ schedule fires the workflow, a polling trigger polls its source ("sync
767
+ now"). False when it has no armed trigger (disabled, parked, erroring).
768
+ """
769
+ pollNow(workflowId: String!): Boolean!
770
+ """
771
+ Samples the draft trigger and saves it as the trigger's last test. A piece
772
+ trigger runs its test hook (no cursor changes). Of the core piece's
773
+ triggers, manual takes payload, schedule samples a fire now, and webhook
774
+ waits for the next delivery to the workflow's endpoint, up to
775
+ timeoutSeconds (default and cap 300), and that delivery runs nothing.
776
+ """
777
+ testTrigger(
778
+ workflowId: String!
779
+ payload: Unknown
780
+ timeoutSeconds: Int
781
+ driveId: String
782
+ ): Unknown
783
+ """
784
+ Stops a webhook trigger test that is waiting; false when none was.
785
+ """
786
+ cancelTriggerTest(workflowId: String!): Boolean!
787
+ """
788
+ Runs one draft step against the latest test outputs of the blocks it
789
+ reads, journaled as a "test" run and noted as the step's lastTest.
790
+ driveId waits for an unsynced workflow, as for webhookEndpoint.
791
+ """
792
+ testStep(
793
+ workflowId: String!
794
+ stepId: String!
795
+ driveId: String
796
+ ): WorkflowStepTestResult!
797
+ """
798
+ Resumes a FAILED run: succeeded steps replay from the journal,
799
+ execution restarts at the failure. Produces a new run.
800
+ """
801
+ rerun(runId: String!): WorkflowRunPayload!
802
+ """
803
+ Mints a managed secret and returns its ref; the value is stored
804
+ encrypted and is never readable back over any API.
805
+ """
806
+ createSecret(value: String!, label: String): SecretRecord!
807
+ """
808
+ Replaces the value behind an existing ref; documents stay untouched.
809
+ """
810
+ rotateSecret(ref: String!, value: String!): SecretRecord!
811
+ """
812
+ Tombstones a secret; its value becomes unrecoverable.
813
+ """
814
+ deleteSecret(ref: String!): Boolean!
815
+ """
816
+ Runs the piece's auth.validate against the connection's credentials,
817
+ then auth.getConnectionIdentifier for the account label, and records the
818
+ outcome on the connection document.
819
+ """
820
+ checkConnection(connectionId: String!): ConnectionCheckResult!
821
+ """
822
+ Opens an OAuth2 sign-in with the connection's own app (client_id in its
823
+ config, client_secret in its secretRefs). redirectUri is needed only when
824
+ oauthRedirectUri is a bare path. With returnUrl, which must be on the
825
+ caller's origin, the callback sends the browser back there with
826
+ ?ph_oauth=<state> instead of closing the window.
827
+ """
828
+ startOAuth(
829
+ connectionId: String!
830
+ redirectUri: String
831
+ returnUrl: String
832
+ ): OAuthStart!
833
+ }
834
+
835
+ """
836
+ WorkflowRuntime Queries
837
+ """
838
+ type WorkflowRuntimeQueries {
839
+ health: String!
840
+ """
841
+ Whether this reactor enforces document auth (REACTOR_AUTH_ENFORCEMENT).
842
+ On, a workflow needs a signed publish, and the host grants, to reach
843
+ documents. Answered to any caller.
844
+ """
845
+ authEnforcement: Boolean!
846
+ """
847
+ Who this host signs as: grant it on each document a step writes. Null for
848
+ a caller who is not signed in, or a host with no signer.
849
+ """
850
+ reactorIdentity: ReactorIdentity
851
+ """
852
+ REACTOR_AUTH_CONDITIONS. True: grant the host by key, with
853
+ { match: subject.key == key }; false: by address. Null for a caller who
854
+ is not signed in.
855
+ """
856
+ authConditions: Boolean
857
+ """
858
+ Why the workflow's last publish or enable got no reactor access, naming
859
+ the publisher and the connection; null when the check passed.
860
+ """
861
+ reactorAccessDenial(workflowId: String!): String
862
+ """
863
+ Persisted runs, newest first. Scope them to one workflow, or to every
864
+ workflow a drive holds; workflowId wins when both are given.
865
+ """
866
+ runs(
867
+ workflowId: String
868
+ driveId: String
869
+ limit: Int
870
+ """
871
+ Trigger kinds to leave out, e.g. test.
872
+ """
873
+ excludeTriggerKinds: [String!]
874
+ ): [WorkflowRunRecord!]!
875
+ """
876
+ The same listing a page at a time, newest journaled first. Pass a page's
877
+ cursor back in paging to read the next; a page is short only when
878
+ hasNextPage is false, or when the caller could read none of a long
879
+ stretch of runs. A run that starts between pages keeps its place.
880
+ """
881
+ runsPage(
882
+ workflowId: String
883
+ driveId: String
884
+ excludeTriggerKinds: [String!]
885
+ paging: WorkflowRunsPagingInput
886
+ ): WorkflowRunResultPage!
887
+ run(id: String!): WorkflowRunRecord
888
+ """
889
+ The descriptor (props, auth, ports) of one action or trigger, as the
890
+ version that runs it describes it; triggers come back under "trigger".
891
+ """
892
+ blockDescriptor(block: BlockInput!): Unknown
893
+ """
894
+ Resolves a dynamic prop against the current config values: a DROPDOWN
895
+ yields { options, placeholder, disabled }, a DYNAMIC prop yields the
896
+ resolved sub-property descriptor list.
897
+ """
898
+ blockOptions(
899
+ block: BlockInput!
900
+ propName: String!
901
+ input: Unknown
902
+ connectionId: String
903
+ """
904
+ What the author typed, for a DROPDOWN declared with refreshOnSearch.
905
+ """
906
+ searchValue: String
907
+ """
908
+ The step's reactor connection; its filter narrows what the resolver reads.
909
+ """
910
+ reactorConnectionId: String
911
+ ): Unknown
912
+ """
913
+ Every piece this reactor offers: the core piece, its package pieces, and
914
+ the pieces the registry and Activepieces publish.
915
+ """
916
+ pieceCatalog: Unknown
917
+ """
918
+ A piece's actions at one version; pin a step to that version.
919
+ """
920
+ pieceActions(
921
+ packageName: String!
922
+ """
923
+ That version; the installed or latest one when omitted.
924
+ """
925
+ version: String
926
+ ): Unknown
927
+ """
928
+ A piece's triggers at one version; pin a trigger to that version.
929
+ """
930
+ pieceTriggers(
931
+ packageName: String!
932
+ """
933
+ That version; the installed or latest one when omitted.
934
+ """
935
+ version: String
936
+ ): Unknown
937
+ """
938
+ Full piece detail (PieceMetadataModel-shaped), verbatim from the cloud API.
939
+ """
940
+ pieceDetail(
941
+ packageName: String!
942
+ """
943
+ That version; the installed or latest one when omitted.
944
+ """
945
+ version: String
946
+ ): Unknown
947
+ """
948
+ Piece and block search across the catalog, grouped by piece. The index
949
+ builds lazily on first use; poll while status is "indexing".
950
+ """
951
+ searchPieces(
952
+ query: String!
953
+ """
954
+ action | trigger
955
+ """
956
+ kind: String!
957
+ """
958
+ local | registry | activepieces; all when omitted.
959
+ """
960
+ sources: [String!]
961
+ """
962
+ Category ids, any of; all when omitted.
963
+ """
964
+ categories: [String!]
965
+ """
966
+ Pieces returned.
967
+ """
968
+ limit: Int
969
+ ): PieceSearchResult!
970
+ """
971
+ Health of every registered piece trigger (poll schedule, errors).
972
+ """
973
+ triggerStates: [TriggerStateRecord!]!
974
+ """
975
+ Authored output shape of a block (SDL / outputSchema / sampleData).
976
+ """
977
+ blockOutputTree(block: BlockInput!, config: Unknown): Unknown
978
+ """
979
+ Output shape of a draft step or trigger: its latest test output
980
+ (source "test", with sample and testedAt) when tested, else as blockOutputTree.
981
+ """
982
+ stepOutputTree(workflowId: String!, stepId: String!): Unknown
983
+ """
984
+ Every block of the draft (trigger first) as this reactor resolves it:
985
+ which piece version runs, from where, and how it matches the pin.
986
+ """
987
+ blockResolutions(workflowId: String!): [BlockResolutionRecord!]!
988
+ """
989
+ Every powerhouse/connection document, for connection pickers.
990
+ """
991
+ connections: [ConnectionRecord!]!
992
+ """
993
+ The webhook endpoint for a workflow: the URL to hand the provider. Minted
994
+ on first ask, whether or not the workflow is armed — an author needs the
995
+ URL before enabling, and the armed field carries that difference. Null
996
+ only when the host has no webhook service. With driveId, a workflow not
997
+ synced here yet is waited for briefly, then fails as WORKFLOW_SYNCING.
998
+ """
999
+ webhookEndpoint(workflowId: String!, driveId: String): WebhookEndpointRecord
1000
+ """
1001
+ Secret metadata (label, version, status). Never the value.
1002
+ """
1003
+ secret(ref: String!): SecretRecord
1004
+ secrets: [SecretRecord!]!
1005
+ """
1006
+ The URL an OAuth2 app must register as its redirect. A bare path when
1007
+ this host does not know its public origin; resolve it against the URL
1008
+ this API is reached at. Null when the host serves no HTTP routes.
1009
+ """
1010
+ oauthRedirectUri: String
1011
+ """
1012
+ The switchboard this runtime lives in: what an app records as the runner
1013
+ of the workflows and connections it sets up here.
1014
+ """
1015
+ host: RuntimeHost!
1016
+ """
1017
+ How an OAuth2 sign-in opened by startOAuth stands; null when unknown.
1018
+ """
1019
+ oauthAttempt(state: String!): OAuthAttempt
1020
+ }
1021
+
1022
+ type WorkflowStepRun {
1023
+ stepId: String!
1024
+ key: String!
1025
+ pieceName: String!
1026
+ blockName: String!
1027
+ status: String!
1028
+ input: Unknown
1029
+ output: Unknown
1030
+ port: String
1031
+ error: String
1032
+ errorName: String
1033
+ }
1034
+
1035
+ type WorkflowStepRunRecord {
1036
+ stepId: String!
1037
+ stepKey: String!
1038
+ pieceName: String!
1039
+ """
1040
+ The action the step ran, or the trigger a trigger test sampled.
1041
+ """
1042
+ blockName: String!
1043
+ status: String!
1044
+ input: Unknown
1045
+ output: Unknown
1046
+ port: String
1047
+ error: String
1048
+ """
1049
+ The thrown error's name, e.g. ReactorAccessDeniedError.
1050
+ """
1051
+ errorName: String
1052
+ startedAt: String
1053
+ endedAt: String
1054
+ """
1055
+ The piece version that ran; null for an unresolved block.
1056
+ """
1057
+ pieceVersion: String
1058
+ """
1059
+ local | registry | activepieces | npm
1060
+ """
1061
+ pieceSource: String
1062
+ """
1063
+ exact | compatible | fallback | installed | missing
1064
+ """
1065
+ versionMatch: String
1066
+ """
1067
+ Why the version that ran differs from the pin.
1068
+ """
1069
+ versionNote: String
1070
+ }
1071
+
1072
+ type WorkflowStepTestResult {
1073
+ """
1074
+ Null when the test never started, e.g. an upstream block is untested.
1075
+ """
1076
+ runId: String
1077
+ """
1078
+ SUCCEEDED | FAILED | INDETERMINATE. INDETERMINATE is neither: a host call
1079
+ the block made timed out, so a write it asked for may well have landed.
1080
+ Show it distinctly - it is not a confirmed pass.
1081
+ """
1082
+ status: String!
1083
+ output: Unknown
1084
+ error: String
1085
+ errorName: String
1086
+ durationMs: Int!
1087
+ }
1088
+
1089
+ enum Workflow_BackoffKind {
1090
+ FIXED
1091
+ EXPONENTIAL
1092
+ }
1093
+
1094
+ enum Workflow_ConcurrencyMode {
1095
+ SINGLETON
1096
+ QUEUE
1097
+ PARALLEL
1098
+ }
1099
+
1100
+ enum Workflow_FailureMode {
1101
+ PARK
1102
+ NOTIFY
1103
+ IGNORE
1104
+ }
1105
+
1106
+ """
1107
+ Layout only. The runtime ignores it.
1108
+ """
1109
+ type Workflow_Point {
1110
+ x: Float!
1111
+ y: Float!
1112
+ }
1113
+
1114
+ enum Workflow_PropertyMode {
1115
+ """
1116
+ The field's own control.
1117
+ """
1118
+ MANUAL
1119
+ """
1120
+ The author switched the field to a free {{…}} expression.
1121
+ """
1122
+ EXPRESSION
1123
+ }
1124
+
1125
+ type Workflow_PropertySetting {
1126
+ prop: String!
1127
+ mode: Workflow_PropertyMode!
1128
+ """
1129
+ Resolved DynamicProperties children, options stripped.
1130
+ """
1131
+ schema: Unknown
1132
+ }
1133
+
1134
+ """
1135
+ Snapshot of the draft taken by PUBLISH_WORKFLOW.
1136
+ """
1137
+ type Workflow_PublishedWorkflow {
1138
+ """
1139
+ Draft version the snapshot was taken at.
1140
+ """
1141
+ version: Int!
1142
+ publishedAt: DateTime!
1143
+ trigger: Workflow_TriggerBinding
1144
+ steps: [Workflow_WorkflowStep!]!
1145
+ edges: [Workflow_WorkflowEdge!]!
1146
+ variables: [Workflow_WorkflowVariable!]!
1147
+ policy: Workflow_WorkflowPolicy!
1148
+ }
1149
+
1150
+ type Workflow_RetryPolicy {
1151
+ """
1152
+ 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.
1153
+ """
1154
+ maxAttempts: Int!
1155
+ backoff: Workflow_BackoffKind!
1156
+ initialDelaySeconds: Int!
1157
+ maxDelaySeconds: Int!
1158
+ """
1159
+ 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.
1160
+ """
1161
+ retryOn: [String!]!
1162
+ }
1163
+
1164
+ enum Workflow_RunStatus {
1165
+ PENDING
1166
+ RUNNING
1167
+ WAITING
1168
+ SUCCEEDED
1169
+ FAILED
1170
+ CANCELLED
1171
+ PARKED
1172
+ }
1173
+
1174
+ """
1175
+ Reference to the latest test run in the run store.
1176
+ """
1177
+ type Workflow_StepTestRecord {
1178
+ runId: String!
1179
+ testedAt: DateTime!
1180
+ }
1181
+
1182
+ type Workflow_TriggerBinding {
1183
+ id: OID!
1184
+ """
1185
+ Package name of the trigger's piece, e.g. '@powerhousedao/piece-core' or '@acme/piece-imap'.
1186
+ """
1187
+ pieceName: String!
1188
+ """
1189
+ Exact semver of the piece, e.g. '1.2.0'.
1190
+ """
1191
+ pieceVersion: String!
1192
+ """
1193
+ Trigger name within the piece, e.g. 'schedule' or 'new_message'.
1194
+ """
1195
+ triggerName: String!
1196
+ """
1197
+ Connection document id, when the trigger's connector requires one.
1198
+ """
1199
+ connectionId: PHID
1200
+ """
1201
+ Reactor connection document id, when the trigger declares requireReactor.
1202
+ """
1203
+ reactorConnectionId: PHID
1204
+ """
1205
+ Validated against the trigger's configSchema.
1206
+ """
1207
+ config: Unknown!
1208
+ propertySettings: [Workflow_PropertySetting!]
1209
+ lastTest: Workflow_StepTestRecord
1210
+ """
1211
+ Timestamp of the last real edit; a lastTest before it is stale.
1212
+ """
1213
+ updatedAt: DateTime
1214
+ }
1215
+
1216
+ enum Workflow_VariableType {
1217
+ TEXT
1218
+ NUMBER
1219
+ BOOLEAN
1220
+ JSON
1221
+ """
1222
+ value is a secret-provider handle (the format of a connection SecretRef.ref), never the plaintext.
1223
+ """
1224
+ SECRET
1225
+ }
1226
+
1227
+ type Workflow_WorkflowEdge {
1228
+ id: OID!
1229
+ """
1230
+ Source step id, or the trigger id for the entry edge.
1231
+ """
1232
+ from: OID!
1233
+ to: OID!
1234
+ """
1235
+ 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.
1236
+ """
1237
+ port: String!
1238
+ """
1239
+ Optional guard expression; the edge is taken only when it evaluates truthy.
1240
+ """
1241
+ condition: String
1242
+ }
1243
+
1244
+ """
1245
+ What manages a workflow: the document that defines it, and how to name it to a person.
1246
+ """
1247
+ type Workflow_WorkflowManager {
1248
+ documentId: PHID!
1249
+ """
1250
+ e.g. sektar/integration
1251
+ """
1252
+ documentType: String!
1253
+ """
1254
+ e.g. Powerhouse - Google Calendar
1255
+ """
1256
+ label: String!
1257
+ }
1258
+
1259
+ type Workflow_WorkflowPolicy {
1260
+ """
1261
+ ENFORCED. SINGLETON drops a firing while a run is active (journaled CANCELLED, not dropped silently); QUEUE serialises; PARALLEL runs concurrently.
1262
+ """
1263
+ concurrency: Workflow_ConcurrencyMode!
1264
+ """
1265
+ ENFORCED under PARALLEL: how many runs of this workflow may execute at once; null is unbounded. SINGLETON and QUEUE are 1 by definition.
1266
+ """
1267
+ maxParallelRuns: Int
1268
+ """
1269
+ ENFORCED. Checked between steps and while a retry waits; past it the run ends CANCELLED.
1270
+ """
1271
+ runTimeoutSeconds: Int!
1272
+ """
1273
+ 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.
1274
+ """
1275
+ maxSuspensionDays: Int!
1276
+ """
1277
+ ENFORCED. The fallback for a step with no retry of its own.
1278
+ """
1279
+ defaultRetry: Workflow_RetryPolicy!
1280
+ """
1281
+ 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.
1282
+ """
1283
+ onFailure: Workflow_FailureMode!
1284
+ """
1285
+ 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.
1286
+ """
1287
+ retainRunsDays: Int!
1288
+ """
1289
+ NOT YET ENFORCED. The run journal is relational; there is no run document model to write.
1290
+ """
1291
+ journalAsDocument: Boolean!
1292
+ }
1293
+
1294
+ type Workflow_WorkflowState {
1295
+ name: String!
1296
+ description: String
1297
+ """
1298
+ Only ENABLED workflows get trigger instances.
1299
+ """
1300
+ status: Workflow_WorkflowStatus!
1301
+ """
1302
+ Bumped on every draft edit; REVERT_TO_PUBLISHED resets it to published.version. A run records the version it executed.
1303
+ """
1304
+ version: Int!
1305
+ trigger: Workflow_TriggerBinding
1306
+ steps: [Workflow_WorkflowStep!]!
1307
+ edges: [Workflow_WorkflowEdge!]!
1308
+ variables: [Workflow_WorkflowVariable!]!
1309
+ policy: Workflow_WorkflowPolicy!
1310
+ """
1311
+ Last published snapshot; version !== published.version means unpublished changes.
1312
+ """
1313
+ published: Workflow_PublishedWorkflow
1314
+ """
1315
+ Who keeps this workflow as it is, e.g. an app's integration; null: people edit it. Editors show a managed workflow read-only.
1316
+ """
1317
+ managedBy: Workflow_WorkflowManager
1318
+ """
1319
+ Denormalised for inspectors; written by the runtime.
1320
+ """
1321
+ lastRunAt: DateTime
1322
+ lastRunStatus: Workflow_RunStatus
1323
+ }
1324
+
1325
+ enum Workflow_WorkflowStatus {
1326
+ DRAFT
1327
+ ENABLED
1328
+ DISABLED
1329
+ ARCHIVED
1330
+ }
1331
+
1332
+ type Workflow_WorkflowStep {
1333
+ id: OID!
1334
+ """
1335
+ Author-visible label; unique within the workflow; used in expressions.
1336
+ """
1337
+ key: String!
1338
+ name: String!
1339
+ """
1340
+ Package name of the step's piece, e.g. '@powerhousedao/piece-core' or '@activepieces/piece-http'.
1341
+ """
1342
+ pieceName: String!
1343
+ """
1344
+ Exact semver of the piece, e.g. '0.11.19'.
1345
+ """
1346
+ pieceVersion: String!
1347
+ """
1348
+ Action name within the piece, e.g. 'branch' or 'send_request'.
1349
+ """
1350
+ actionName: String!
1351
+ connectionId: PHID
1352
+ """
1353
+ Reactor connection document id, when the action declares requireReactor.
1354
+ """
1355
+ reactorConnectionId: PHID
1356
+ config: Unknown!
1357
+ """
1358
+ ENFORCED. Per-step override of the workflow default retry policy.
1359
+ """
1360
+ retry: Workflow_RetryPolicy
1361
+ """
1362
+ ENFORCED. Also raises the cap on each host call the step's piece makes, which is never shorter than the step's own timeout.
1363
+ """
1364
+ timeoutSeconds: Int
1365
+ """
1366
+ 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.
1367
+ """
1368
+ idempotencyKeyExpression: String
1369
+ position: Workflow_Point
1370
+ propertySettings: [Workflow_PropertySetting!]
1371
+ lastTest: Workflow_StepTestRecord
1372
+ """
1373
+ Skipped steps are passed over at run time.
1374
+ """
1375
+ skip: Boolean
1376
+ """
1377
+ Timestamp of the last real edit; a lastTest before it is stale.
1378
+ """
1379
+ updatedAt: DateTime
1380
+ }
1381
+
1382
+ type Workflow_WorkflowVariable {
1383
+ id: OID!
1384
+ """
1385
+ Name used in expressions.
1386
+ """
1387
+ key: String!
1388
+ """
1389
+ The value a run reads as variables.<key>.
1390
+ """
1391
+ value: Unknown
1392
+ description: String
1393
+ """
1394
+ Null means untyped; consumers infer the kind of value it holds.
1395
+ """
1396
+ type: Workflow_VariableType
1397
+ }
1398
+
1399
+ scalar _FieldSet
1400
+
1401
+ type _Service {
1402
+ sdl: String
1403
+ }