@shware/workflow 0.0.0-stage → 0.1.0

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 (442) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +154 -2
  3. package/dist/_virtual/_rolldown/runtime.cjs +23 -0
  4. package/dist/apns-relay.cjs +105 -0
  5. package/dist/apns-relay.cjs.map +1 -0
  6. package/dist/apns-relay.d.cts +28 -0
  7. package/dist/apns-relay.d.cts.map +1 -0
  8. package/dist/apns-relay.d.mts +28 -0
  9. package/dist/apns-relay.d.mts.map +1 -0
  10. package/dist/apns-relay.mjs +104 -0
  11. package/dist/apns-relay.mjs.map +1 -0
  12. package/dist/apns.cjs +121 -0
  13. package/dist/apns.cjs.map +1 -0
  14. package/dist/apns.d.cts +63 -0
  15. package/dist/apns.d.cts.map +1 -0
  16. package/dist/apns.d.mts +63 -0
  17. package/dist/apns.d.mts.map +1 -0
  18. package/dist/apns.mjs +116 -0
  19. package/dist/apns.mjs.map +1 -0
  20. package/dist/client.cjs +125 -0
  21. package/dist/client.cjs.map +1 -0
  22. package/dist/client.d.cts +108 -0
  23. package/dist/client.d.cts.map +1 -0
  24. package/dist/client.d.mts +108 -0
  25. package/dist/client.d.mts.map +1 -0
  26. package/dist/client.mjs +122 -0
  27. package/dist/client.mjs.map +1 -0
  28. package/dist/cloudflare/bindings.cjs +28 -0
  29. package/dist/cloudflare/bindings.cjs.map +1 -0
  30. package/dist/cloudflare/bindings.d.cts +144 -0
  31. package/dist/cloudflare/bindings.d.cts.map +1 -0
  32. package/dist/cloudflare/bindings.d.mts +144 -0
  33. package/dist/cloudflare/bindings.d.mts.map +1 -0
  34. package/dist/cloudflare/bindings.mjs +25 -0
  35. package/dist/cloudflare/bindings.mjs.map +1 -0
  36. package/dist/cloudflare/channels.cjs +164 -0
  37. package/dist/cloudflare/channels.cjs.map +1 -0
  38. package/dist/cloudflare/channels.d.cts +29 -0
  39. package/dist/cloudflare/channels.d.cts.map +1 -0
  40. package/dist/cloudflare/channels.d.mts +29 -0
  41. package/dist/cloudflare/channels.d.mts.map +1 -0
  42. package/dist/cloudflare/channels.mjs +161 -0
  43. package/dist/cloudflare/channels.mjs.map +1 -0
  44. package/dist/cloudflare/d1-env.cjs +17 -0
  45. package/dist/cloudflare/d1-env.cjs.map +1 -0
  46. package/dist/cloudflare/d1-env.d.cts +12 -0
  47. package/dist/cloudflare/d1-env.d.cts.map +1 -0
  48. package/dist/cloudflare/d1-env.d.mts +12 -0
  49. package/dist/cloudflare/d1-env.d.mts.map +1 -0
  50. package/dist/cloudflare/d1-env.mjs +16 -0
  51. package/dist/cloudflare/d1-env.mjs.map +1 -0
  52. package/dist/cloudflare/index.cjs +54 -0
  53. package/dist/cloudflare/index.d.cts +19 -0
  54. package/dist/cloudflare/index.d.mts +19 -0
  55. package/dist/cloudflare/index.mjs +16 -0
  56. package/dist/cloudflare/router.cjs +516 -0
  57. package/dist/cloudflare/router.cjs.map +1 -0
  58. package/dist/cloudflare/router.d.cts +157 -0
  59. package/dist/cloudflare/router.d.cts.map +1 -0
  60. package/dist/cloudflare/router.d.mts +157 -0
  61. package/dist/cloudflare/router.d.mts.map +1 -0
  62. package/dist/cloudflare/router.mjs +503 -0
  63. package/dist/cloudflare/router.mjs.map +1 -0
  64. package/dist/cloudflare/runner.cjs +225 -0
  65. package/dist/cloudflare/runner.cjs.map +1 -0
  66. package/dist/cloudflare/runner.d.cts +73 -0
  67. package/dist/cloudflare/runner.d.cts.map +1 -0
  68. package/dist/cloudflare/runner.d.mts +73 -0
  69. package/dist/cloudflare/runner.d.mts.map +1 -0
  70. package/dist/cloudflare/runner.mjs +224 -0
  71. package/dist/cloudflare/runner.mjs.map +1 -0
  72. package/dist/cloudflare/schema.sql +127 -0
  73. package/dist/cloudflare/senders.cjs +114 -0
  74. package/dist/cloudflare/senders.cjs.map +1 -0
  75. package/dist/cloudflare/senders.d.cts +68 -0
  76. package/dist/cloudflare/senders.d.cts.map +1 -0
  77. package/dist/cloudflare/senders.d.mts +68 -0
  78. package/dist/cloudflare/senders.d.mts.map +1 -0
  79. package/dist/cloudflare/senders.mjs +108 -0
  80. package/dist/cloudflare/senders.mjs.map +1 -0
  81. package/dist/cloudflare/worker.cjs +228 -0
  82. package/dist/cloudflare/worker.cjs.map +1 -0
  83. package/dist/cloudflare/worker.d.cts +92 -0
  84. package/dist/cloudflare/worker.d.cts.map +1 -0
  85. package/dist/cloudflare/worker.d.mts +92 -0
  86. package/dist/cloudflare/worker.d.mts.map +1 -0
  87. package/dist/cloudflare/worker.mjs +224 -0
  88. package/dist/cloudflare/worker.mjs.map +1 -0
  89. package/dist/cloudflare/workers.d.cjs +0 -0
  90. package/dist/cloudflare/workers.d.cts +44 -0
  91. package/dist/cloudflare/workers.d.cts.map +1 -0
  92. package/dist/cloudflare/workers.d.mts +44 -0
  93. package/dist/cloudflare/workers.d.mts.map +1 -0
  94. package/dist/config.cjs +151 -0
  95. package/dist/config.cjs.map +1 -0
  96. package/dist/config.d.cts +149 -0
  97. package/dist/config.d.cts.map +1 -0
  98. package/dist/config.d.mts +149 -0
  99. package/dist/config.d.mts.map +1 -0
  100. package/dist/config.mjs +143 -0
  101. package/dist/config.mjs.map +1 -0
  102. package/dist/contract.cjs +212 -0
  103. package/dist/contract.cjs.map +1 -0
  104. package/dist/contract.d.cts +90 -0
  105. package/dist/contract.d.cts.map +1 -0
  106. package/dist/contract.d.mts +90 -0
  107. package/dist/contract.d.mts.map +1 -0
  108. package/dist/contract.mjs +206 -0
  109. package/dist/contract.mjs.map +1 -0
  110. package/dist/dsl/action.cjs +29 -0
  111. package/dist/dsl/action.cjs.map +1 -0
  112. package/dist/dsl/action.d.cts +64 -0
  113. package/dist/dsl/action.d.cts.map +1 -0
  114. package/dist/dsl/action.d.mts +64 -0
  115. package/dist/dsl/action.d.mts.map +1 -0
  116. package/dist/dsl/action.mjs +28 -0
  117. package/dist/dsl/action.mjs.map +1 -0
  118. package/dist/dsl/base.cjs +34 -0
  119. package/dist/dsl/base.cjs.map +1 -0
  120. package/dist/dsl/base.d.cts +45 -0
  121. package/dist/dsl/base.d.cts.map +1 -0
  122. package/dist/dsl/base.d.mts +45 -0
  123. package/dist/dsl/base.d.mts.map +1 -0
  124. package/dist/dsl/base.mjs +30 -0
  125. package/dist/dsl/base.mjs.map +1 -0
  126. package/dist/dsl/bundle.cjs +207 -0
  127. package/dist/dsl/bundle.cjs.map +1 -0
  128. package/dist/dsl/bundle.d.cts +19 -0
  129. package/dist/dsl/bundle.d.cts.map +1 -0
  130. package/dist/dsl/bundle.d.mts +19 -0
  131. package/dist/dsl/bundle.d.mts.map +1 -0
  132. package/dist/dsl/bundle.mjs +206 -0
  133. package/dist/dsl/bundle.mjs.map +1 -0
  134. package/dist/dsl/condition.cjs +177 -0
  135. package/dist/dsl/condition.cjs.map +1 -0
  136. package/dist/dsl/condition.d.cts +140 -0
  137. package/dist/dsl/condition.d.cts.map +1 -0
  138. package/dist/dsl/condition.d.mts +140 -0
  139. package/dist/dsl/condition.d.mts.map +1 -0
  140. package/dist/dsl/condition.mjs +156 -0
  141. package/dist/dsl/condition.mjs.map +1 -0
  142. package/dist/dsl/flow.cjs +228 -0
  143. package/dist/dsl/flow.cjs.map +1 -0
  144. package/dist/dsl/flow.d.cts +223 -0
  145. package/dist/dsl/flow.d.cts.map +1 -0
  146. package/dist/dsl/flow.d.mts +223 -0
  147. package/dist/dsl/flow.d.mts.map +1 -0
  148. package/dist/dsl/flow.mjs +226 -0
  149. package/dist/dsl/flow.mjs.map +1 -0
  150. package/dist/dsl/index.cjs +38 -0
  151. package/dist/dsl/index.d.cts +10 -0
  152. package/dist/dsl/index.d.mts +10 -0
  153. package/dist/dsl/index.mjs +9 -0
  154. package/dist/dsl/refs.cjs +59 -0
  155. package/dist/dsl/refs.cjs.map +1 -0
  156. package/dist/dsl/refs.d.cts +88 -0
  157. package/dist/dsl/refs.d.cts.map +1 -0
  158. package/dist/dsl/refs.d.mts +88 -0
  159. package/dist/dsl/refs.d.mts.map +1 -0
  160. package/dist/dsl/refs.mjs +55 -0
  161. package/dist/dsl/refs.mjs.map +1 -0
  162. package/dist/dsl/template.cjs +65 -0
  163. package/dist/dsl/template.cjs.map +1 -0
  164. package/dist/dsl/template.d.cts +75 -0
  165. package/dist/dsl/template.d.cts.map +1 -0
  166. package/dist/dsl/template.d.mts +75 -0
  167. package/dist/dsl/template.d.mts.map +1 -0
  168. package/dist/dsl/template.mjs +63 -0
  169. package/dist/dsl/template.mjs.map +1 -0
  170. package/dist/dsl/trigger.cjs +40 -0
  171. package/dist/dsl/trigger.cjs.map +1 -0
  172. package/dist/dsl/trigger.d.cts +65 -0
  173. package/dist/dsl/trigger.d.cts.map +1 -0
  174. package/dist/dsl/trigger.d.mts +65 -0
  175. package/dist/dsl/trigger.d.mts.map +1 -0
  176. package/dist/dsl/trigger.mjs +39 -0
  177. package/dist/dsl/trigger.mjs.map +1 -0
  178. package/dist/dsl/workflow.cjs +121 -0
  179. package/dist/dsl/workflow.cjs.map +1 -0
  180. package/dist/dsl/workflow.d.cts +59 -0
  181. package/dist/dsl/workflow.d.cts.map +1 -0
  182. package/dist/dsl/workflow.d.mts +59 -0
  183. package/dist/dsl/workflow.d.mts.map +1 -0
  184. package/dist/dsl/workflow.mjs +120 -0
  185. package/dist/dsl/workflow.mjs.map +1 -0
  186. package/dist/engine/actions.cjs +27 -0
  187. package/dist/engine/actions.cjs.map +1 -0
  188. package/dist/engine/actions.d.cts +40 -0
  189. package/dist/engine/actions.d.cts.map +1 -0
  190. package/dist/engine/actions.d.mts +40 -0
  191. package/dist/engine/actions.d.mts.map +1 -0
  192. package/dist/engine/actions.mjs +26 -0
  193. package/dist/engine/actions.mjs.map +1 -0
  194. package/dist/engine/bucket.cjs +72 -0
  195. package/dist/engine/bucket.cjs.map +1 -0
  196. package/dist/engine/bucket.d.cts +32 -0
  197. package/dist/engine/bucket.d.cts.map +1 -0
  198. package/dist/engine/bucket.d.mts +32 -0
  199. package/dist/engine/bucket.d.mts.map +1 -0
  200. package/dist/engine/bucket.mjs +69 -0
  201. package/dist/engine/bucket.mjs.map +1 -0
  202. package/dist/engine/condition.cjs +166 -0
  203. package/dist/engine/condition.cjs.map +1 -0
  204. package/dist/engine/condition.d.cts +52 -0
  205. package/dist/engine/condition.d.cts.map +1 -0
  206. package/dist/engine/condition.d.mts +52 -0
  207. package/dist/engine/condition.d.mts.map +1 -0
  208. package/dist/engine/condition.mjs +161 -0
  209. package/dist/engine/condition.mjs.map +1 -0
  210. package/dist/engine/index.cjs +20 -0
  211. package/dist/engine/index.d.cts +8 -0
  212. package/dist/engine/index.d.mts +8 -0
  213. package/dist/engine/index.mjs +7 -0
  214. package/dist/engine/interpreter.cjs +428 -0
  215. package/dist/engine/interpreter.cjs.map +1 -0
  216. package/dist/engine/interpreter.d.cts +6 -0
  217. package/dist/engine/interpreter.d.cts.map +1 -0
  218. package/dist/engine/interpreter.d.mts +6 -0
  219. package/dist/engine/interpreter.d.mts.map +1 -0
  220. package/dist/engine/interpreter.mjs +427 -0
  221. package/dist/engine/interpreter.mjs.map +1 -0
  222. package/dist/engine/ports.cjs +0 -0
  223. package/dist/engine/ports.d.cts +252 -0
  224. package/dist/engine/ports.d.cts.map +1 -0
  225. package/dist/engine/ports.d.mts +252 -0
  226. package/dist/engine/ports.d.mts.map +1 -0
  227. package/dist/engine/ports.mjs +1 -0
  228. package/dist/engine/recipient.cjs +23 -0
  229. package/dist/engine/recipient.cjs.map +1 -0
  230. package/dist/engine/recipient.d.cts +13 -0
  231. package/dist/engine/recipient.d.cts.map +1 -0
  232. package/dist/engine/recipient.d.mts +13 -0
  233. package/dist/engine/recipient.d.mts.map +1 -0
  234. package/dist/engine/recipient.mjs +22 -0
  235. package/dist/engine/recipient.mjs.map +1 -0
  236. package/dist/engine/time-scale.cjs +54 -0
  237. package/dist/engine/time-scale.cjs.map +1 -0
  238. package/dist/engine/time-scale.d.cts +31 -0
  239. package/dist/engine/time-scale.d.cts.map +1 -0
  240. package/dist/engine/time-scale.d.mts +31 -0
  241. package/dist/engine/time-scale.d.mts.map +1 -0
  242. package/dist/engine/time-scale.mjs +52 -0
  243. package/dist/engine/time-scale.mjs.map +1 -0
  244. package/dist/engine/time-window.cjs +149 -0
  245. package/dist/engine/time-window.cjs.map +1 -0
  246. package/dist/engine/time-window.d.cts +22 -0
  247. package/dist/engine/time-window.d.cts.map +1 -0
  248. package/dist/engine/time-window.d.mts +22 -0
  249. package/dist/engine/time-window.d.mts.map +1 -0
  250. package/dist/engine/time-window.mjs +147 -0
  251. package/dist/engine/time-window.mjs.map +1 -0
  252. package/dist/fcm.cjs +125 -0
  253. package/dist/fcm.cjs.map +1 -0
  254. package/dist/fcm.d.cts +48 -0
  255. package/dist/fcm.d.cts.map +1 -0
  256. package/dist/fcm.d.mts +48 -0
  257. package/dist/fcm.d.mts.map +1 -0
  258. package/dist/fcm.mjs +121 -0
  259. package/dist/fcm.mjs.map +1 -0
  260. package/dist/hash.cjs +245 -0
  261. package/dist/hash.cjs.map +1 -0
  262. package/dist/hash.d.cts +30 -0
  263. package/dist/hash.d.cts.map +1 -0
  264. package/dist/hash.d.mts +30 -0
  265. package/dist/hash.d.mts.map +1 -0
  266. package/dist/hash.mjs +239 -0
  267. package/dist/hash.mjs.map +1 -0
  268. package/dist/index.cjs +100 -0
  269. package/dist/index.d.cts +18 -0
  270. package/dist/index.d.mts +18 -0
  271. package/dist/index.mjs +17 -0
  272. package/dist/ir.cjs +366 -0
  273. package/dist/ir.cjs.map +1 -0
  274. package/dist/ir.d.cts +486 -0
  275. package/dist/ir.d.cts.map +1 -0
  276. package/dist/ir.d.mts +486 -0
  277. package/dist/ir.d.mts.map +1 -0
  278. package/dist/ir.mjs +344 -0
  279. package/dist/ir.mjs.map +1 -0
  280. package/dist/jwt.cjs +22 -0
  281. package/dist/jwt.cjs.map +1 -0
  282. package/dist/jwt.d.cts +9 -0
  283. package/dist/jwt.d.cts.map +1 -0
  284. package/dist/jwt.d.mts +9 -0
  285. package/dist/jwt.d.mts.map +1 -0
  286. package/dist/jwt.mjs +20 -0
  287. package/dist/jwt.mjs.map +1 -0
  288. package/dist/plan.cjs +223 -0
  289. package/dist/plan.cjs.map +1 -0
  290. package/dist/plan.d.cts +68 -0
  291. package/dist/plan.d.cts.map +1 -0
  292. package/dist/plan.d.mts +68 -0
  293. package/dist/plan.d.mts.map +1 -0
  294. package/dist/plan.mjs +221 -0
  295. package/dist/plan.mjs.map +1 -0
  296. package/dist/postgres-js.cjs +42 -0
  297. package/dist/postgres-js.cjs.map +1 -0
  298. package/dist/postgres-js.d.cts +28 -0
  299. package/dist/postgres-js.d.cts.map +1 -0
  300. package/dist/postgres-js.d.mts +28 -0
  301. package/dist/postgres-js.d.mts.map +1 -0
  302. package/dist/postgres-js.mjs +38 -0
  303. package/dist/postgres-js.mjs.map +1 -0
  304. package/dist/provenance.cjs +67 -0
  305. package/dist/provenance.cjs.map +1 -0
  306. package/dist/provenance.d.cts +41 -0
  307. package/dist/provenance.d.cts.map +1 -0
  308. package/dist/provenance.d.mts +41 -0
  309. package/dist/provenance.d.mts.map +1 -0
  310. package/dist/provenance.mjs +65 -0
  311. package/dist/provenance.mjs.map +1 -0
  312. package/dist/push.cjs +14 -0
  313. package/dist/push.cjs.map +1 -0
  314. package/dist/push.d.cts +16 -0
  315. package/dist/push.d.cts.map +1 -0
  316. package/dist/push.d.mts +16 -0
  317. package/dist/push.d.mts.map +1 -0
  318. package/dist/push.mjs +13 -0
  319. package/dist/push.mjs.map +1 -0
  320. package/dist/react-email.cjs +48 -0
  321. package/dist/react-email.cjs.map +1 -0
  322. package/dist/react-email.d.cts +7 -0
  323. package/dist/react-email.d.cts.map +1 -0
  324. package/dist/react-email.d.mts +7 -0
  325. package/dist/react-email.d.mts.map +1 -0
  326. package/dist/react-email.mjs +47 -0
  327. package/dist/react-email.mjs.map +1 -0
  328. package/dist/reporting/classify.cjs +42 -0
  329. package/dist/reporting/classify.cjs.map +1 -0
  330. package/dist/reporting/classify.d.cts +60 -0
  331. package/dist/reporting/classify.d.cts.map +1 -0
  332. package/dist/reporting/classify.d.mts +60 -0
  333. package/dist/reporting/classify.d.mts.map +1 -0
  334. package/dist/reporting/classify.mjs +38 -0
  335. package/dist/reporting/classify.mjs.map +1 -0
  336. package/dist/reporting/observer.cjs +63 -0
  337. package/dist/reporting/observer.cjs.map +1 -0
  338. package/dist/reporting/observer.d.cts +18 -0
  339. package/dist/reporting/observer.d.cts.map +1 -0
  340. package/dist/reporting/observer.d.mts +18 -0
  341. package/dist/reporting/observer.d.mts.map +1 -0
  342. package/dist/reporting/observer.mjs +62 -0
  343. package/dist/reporting/observer.mjs.map +1 -0
  344. package/dist/reporting/tracking.cjs +153 -0
  345. package/dist/reporting/tracking.cjs.map +1 -0
  346. package/dist/reporting/tracking.d.cts +43 -0
  347. package/dist/reporting/tracking.d.cts.map +1 -0
  348. package/dist/reporting/tracking.d.mts +43 -0
  349. package/dist/reporting/tracking.d.mts.map +1 -0
  350. package/dist/reporting/tracking.mjs +151 -0
  351. package/dist/reporting/tracking.mjs.map +1 -0
  352. package/dist/runtime.cjs +19 -0
  353. package/dist/runtime.cjs.map +1 -0
  354. package/dist/runtime.d.cts +30 -0
  355. package/dist/runtime.d.cts.map +1 -0
  356. package/dist/runtime.d.mts +30 -0
  357. package/dist/runtime.d.mts.map +1 -0
  358. package/dist/runtime.mjs +18 -0
  359. package/dist/runtime.mjs.map +1 -0
  360. package/dist/store/d1.cjs +185 -0
  361. package/dist/store/d1.cjs.map +1 -0
  362. package/dist/store/d1.d.cts +55 -0
  363. package/dist/store/d1.d.cts.map +1 -0
  364. package/dist/store/d1.d.mts +55 -0
  365. package/dist/store/d1.d.mts.map +1 -0
  366. package/dist/store/d1.mjs +184 -0
  367. package/dist/store/d1.mjs.map +1 -0
  368. package/dist/store/facts.cjs +60 -0
  369. package/dist/store/facts.cjs.map +1 -0
  370. package/dist/store/facts.d.cts +38 -0
  371. package/dist/store/facts.d.cts.map +1 -0
  372. package/dist/store/facts.d.mts +38 -0
  373. package/dist/store/facts.d.mts.map +1 -0
  374. package/dist/store/facts.mjs +58 -0
  375. package/dist/store/facts.mjs.map +1 -0
  376. package/dist/store/index.cjs +31 -0
  377. package/dist/store/index.cjs.map +1 -0
  378. package/dist/store/index.d.cts +291 -0
  379. package/dist/store/index.d.cts.map +1 -0
  380. package/dist/store/index.d.mts +291 -0
  381. package/dist/store/index.d.mts.map +1 -0
  382. package/dist/store/index.mjs +22 -0
  383. package/dist/store/index.mjs.map +1 -0
  384. package/dist/store/postgres-reporting.cjs +213 -0
  385. package/dist/store/postgres-reporting.cjs.map +1 -0
  386. package/dist/store/postgres-reporting.d.cts +63 -0
  387. package/dist/store/postgres-reporting.d.cts.map +1 -0
  388. package/dist/store/postgres-reporting.d.mts +63 -0
  389. package/dist/store/postgres-reporting.d.mts.map +1 -0
  390. package/dist/store/postgres-reporting.mjs +212 -0
  391. package/dist/store/postgres-reporting.mjs.map +1 -0
  392. package/dist/store/postgres.cjs +309 -0
  393. package/dist/store/postgres.cjs.map +1 -0
  394. package/dist/store/postgres.d.cts +77 -0
  395. package/dist/store/postgres.d.cts.map +1 -0
  396. package/dist/store/postgres.d.mts +77 -0
  397. package/dist/store/postgres.d.mts.map +1 -0
  398. package/dist/store/postgres.mjs +306 -0
  399. package/dist/store/postgres.mjs.map +1 -0
  400. package/dist/store/sql.cjs +24 -0
  401. package/dist/store/sql.cjs.map +1 -0
  402. package/dist/store/sql.d.cts +25 -0
  403. package/dist/store/sql.d.cts.map +1 -0
  404. package/dist/store/sql.d.mts +25 -0
  405. package/dist/store/sql.d.mts.map +1 -0
  406. package/dist/store/sql.mjs +23 -0
  407. package/dist/store/sql.mjs.map +1 -0
  408. package/dist/store/tables.cjs +404 -0
  409. package/dist/store/tables.cjs.map +1 -0
  410. package/dist/store/tables.d.cts +81 -0
  411. package/dist/store/tables.d.cts.map +1 -0
  412. package/dist/store/tables.d.mts +81 -0
  413. package/dist/store/tables.d.mts.map +1 -0
  414. package/dist/store/tables.mjs +399 -0
  415. package/dist/store/tables.mjs.map +1 -0
  416. package/dist/templates.cjs +247 -0
  417. package/dist/templates.cjs.map +1 -0
  418. package/dist/templates.d.cts +187 -0
  419. package/dist/templates.d.cts.map +1 -0
  420. package/dist/templates.d.mts +187 -0
  421. package/dist/templates.d.mts.map +1 -0
  422. package/dist/templates.mjs +230 -0
  423. package/dist/templates.mjs.map +1 -0
  424. package/dist/webhooks.cjs +96 -0
  425. package/dist/webhooks.cjs.map +1 -0
  426. package/dist/webhooks.d.cts +25 -0
  427. package/dist/webhooks.d.cts.map +1 -0
  428. package/dist/webhooks.d.mts +25 -0
  429. package/dist/webhooks.d.mts.map +1 -0
  430. package/dist/webhooks.mjs +94 -0
  431. package/dist/webhooks.mjs.map +1 -0
  432. package/dist/webpush.cjs +180 -0
  433. package/dist/webpush.cjs.map +1 -0
  434. package/dist/webpush.d.cts +53 -0
  435. package/dist/webpush.d.cts.map +1 -0
  436. package/dist/webpush.d.mts +53 -0
  437. package/dist/webpush.d.mts.map +1 -0
  438. package/dist/webpush.mjs +175 -0
  439. package/dist/webpush.mjs.map +1 -0
  440. package/package.json +189 -3
  441. package/src/cloudflare/schema.sql +127 -0
  442. package/src/cloudflare/workers.d.ts +44 -0
package/dist/ir.d.cts ADDED
@@ -0,0 +1,486 @@
1
+ import * as z from "zod/mini";
2
+ //#region src/ir.d.ts
3
+ /**
4
+ * IR (Intermediate Representation) — what the DSL compiles to: serializable
5
+ * JSON. It is the three-way contract between the engine that interprets it,
6
+ * the UI (react-flow) that renders it, and diff / audit tooling.
7
+ *
8
+ * Validation strategy: the zod/mini schemas are the authoritative definition.
9
+ * TS types are either inferred from a schema or hand-written under the same
10
+ * name (zod cannot infer recursive types; the hand-written type is anchored
11
+ * with a ZodMiniType<T> annotation, so any drift fails to compile). IR crosses
12
+ * process boundaries (database, network, UI), so runtime validation is a must.
13
+ *
14
+ * ## Versioning (two independent axes)
15
+ *
16
+ * 1. IR format version (irVersion): evolution of the IR schema itself. Adding
17
+ * optional fields does not bump it; only structurally incompatible changes
18
+ * do (changing a discriminant, dropping a field, altering semantics).
19
+ * Readers dispatch on irVersion to the matching schema/migrator; writers
20
+ * always write the current version.
21
+ * 2. Content version (contentHash): a content-addressed id for a single
22
+ * definition's **execution semantics** — the canonical-JSON hash after
23
+ * metadata (meta / label / reason) is stripped, see hash.ts. It is used to:
24
+ * - pin a version when a user enters, so an in-flight journey runs the
25
+ * pinned version to completion (the default policy; compatible hot
26
+ * updates are a future explicit-migration topic). Known exception:
27
+ * segment conditions are resolved **by id at evaluation time** — a
28
+ * segment redeploy changes behaviour of in-flight journeys that
29
+ * reference it. Pinning covers the workflow's own structure; per-hash
30
+ * segment snapshots are future work;
31
+ * - diff on deploy: same hash means unchanged, skip publishing;
32
+ * - audit: answer "which version was this user on" at any point.
33
+ *
34
+ * ## Node ids
35
+ *
36
+ * Derived from the structural path at compile time — stable and deterministic:
37
+ * root level '0', '1', …; the j-th child of a branch's i-th case is
38
+ * '{branchId}.c{i}.{j}', the default arm '{branchId}.o.{j}'; cohort arms use
39
+ * the arm name '{cohortId}.{armName}.{j}'; a waitUntil timeout flow '{id}.t.{j}'.
40
+ * Editing a node's parameters keeps its id; inserting a node shifts the ids of
41
+ * its later siblings (a known trade-off — locating in-flight users relies on
42
+ * the pinned version rather than cross-version id alignment, and cross-version
43
+ * mapping is an explicit migrator's job).
44
+ */
45
+ export declare const IR_VERSION = 2;
46
+ export declare const ScalarIR: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>]>;
47
+ export type ScalarIR = z.infer<typeof ScalarIR>;
48
+ /** Duration: `value` keeps the DSL literal ('23 hours', for display), `ms` is what the engine uses. */
49
+ export declare const DurationIR: z.ZodMiniObject<{
50
+ value: z.ZodMiniString<string>;
51
+ ms: z.ZodMiniNumber<number>;
52
+ }, z.core.$strip>;
53
+ export type DurationIR = z.infer<typeof DurationIR>;
54
+ /** User-property reference — isomorphic to the DSL's UserPropertyRef once serialized (phantom type dropped). */
55
+ export declare const UserPropertyRefIR: z.ZodMiniObject<{
56
+ type: z.ZodMiniLiteral<"user_property">;
57
+ path: z.ZodMiniString<string>;
58
+ }, z.core.$strip>;
59
+ export type UserPropertyRefIR = z.infer<typeof UserPropertyRefIR>;
60
+ /** A message prop / event payload value: either a literal or a user-property reference. */
61
+ export declare const PropValueIR: z.ZodMiniUnion<readonly [z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>]>, z.ZodMiniObject<{
62
+ type: z.ZodMiniLiteral<"user_property">;
63
+ path: z.ZodMiniString<string>;
64
+ }, z.core.$strip>]>;
65
+ export type PropValueIR = z.infer<typeof PropValueIR>;
66
+ export declare const ChannelIR: z.ZodMiniEnum<{
67
+ discord: "discord";
68
+ email: "email";
69
+ in_app: "in_app";
70
+ push: "push";
71
+ slack: "slack";
72
+ sms: "sms";
73
+ survey: "survey";
74
+ }>;
75
+ export type ChannelIR = z.infer<typeof ChannelIR>;
76
+ export declare const WeekdayIR: z.ZodMiniEnum<{
77
+ fri: "fri";
78
+ mon: "mon";
79
+ sat: "sat";
80
+ sun: "sun";
81
+ thu: "thu";
82
+ tue: "tue";
83
+ wed: "wed";
84
+ }>;
85
+ export type WeekdayIR = z.infer<typeof WeekdayIR>;
86
+ /**
87
+ * Source location of the builder call that produced a definition — the IR's
88
+ * source map. Lives under `meta`, so it is **excluded from contentHash**
89
+ * (see hash.ts): provenance never affects execution identity or plan.
90
+ * `file` is cwd-relative when compiled under Node, a URL under Vite dev.
91
+ */
92
+ export declare const SourceLocIR: z.ZodMiniObject<{
93
+ file: z.ZodMiniString<string>;
94
+ line: z.ZodMiniNumber<number>;
95
+ column: z.ZodMiniNumber<number>;
96
+ }, z.core.$strip>;
97
+ export type SourceLocIR = z.infer<typeof SourceLocIR>;
98
+ /** Node-level metadata: provenance only, for now. Excluded from contentHash. */
99
+ export declare const NodeMetaIR: z.ZodMiniObject<{
100
+ loc: z.ZodMiniOptional<z.ZodMiniObject<{
101
+ file: z.ZodMiniString<string>;
102
+ line: z.ZodMiniNumber<number>;
103
+ column: z.ZodMiniNumber<number>;
104
+ }, z.core.$strip>>;
105
+ }, z.core.$strip>;
106
+ export type NodeMetaIR = z.infer<typeof NodeMetaIR>;
107
+ export declare const PropertyOperatorIR: z.ZodMiniEnum<{
108
+ between: "between";
109
+ contains: "contains";
110
+ eq: "eq";
111
+ exists: "exists";
112
+ gt: "gt";
113
+ gte: "gte";
114
+ in_array: "in_array";
115
+ lt: "lt";
116
+ lte: "lte";
117
+ ne: "ne";
118
+ not_between: "not_between";
119
+ not_contains: "not_contains";
120
+ not_exists: "not_exists";
121
+ not_in_array: "not_in_array";
122
+ }>;
123
+ export type PropertyOperatorIR = z.infer<typeof PropertyOperatorIR>;
124
+ /**
125
+ * Condition expression tree. The shape of value/values follows `op`:
126
+ * eq/ne/gt/gte/lt/lte/contains/not_contains → value; in_array/not_in_array →
127
+ * values; between/not_between → values = [min, max]; exists/not_exists → neither.
128
+ *
129
+ * `payload` predicates test the payload of an event (dotted paths reach nested
130
+ * fields). They are only valid inside a `where` subtree — `performed.where`
131
+ * and the event trigger's `where` — where an event row is in scope; the
132
+ * compiler (compileBundle) and the evaluator both enforce the placement.
133
+ * TODO: runtime refinement narrowing by op.
134
+ */
135
+ /**
136
+ * Provenance rides on conditions too, so the studio can point at the exact
137
+ * `eq(...)` / `and(...)` that produced a node — same rule as nodes: `meta` is
138
+ * dropped before hashing, so carrying it never affects execution identity.
139
+ */
140
+ interface ConditionBaseIR {
141
+ meta?: NodeMetaIR | undefined;
142
+ }
143
+ export type ConditionIR = (ConditionBaseIR & {
144
+ type: 'and';
145
+ conditions: ConditionIR[];
146
+ }) | (ConditionBaseIR & {
147
+ type: 'or';
148
+ conditions: ConditionIR[];
149
+ }) | (ConditionBaseIR & {
150
+ type: 'not';
151
+ condition: ConditionIR;
152
+ }) |
153
+ /** Reference a segment by id (defined in SegmentIR, versioned separately). */
154
+ (ConditionBaseIR & {
155
+ type: 'segment';
156
+ segment: string;
157
+ }) | (ConditionBaseIR & {
158
+ type: 'property';
159
+ path: string;
160
+ op: PropertyOperatorIR;
161
+ value?: ScalarIR | undefined;
162
+ values?: ScalarIR[] | undefined;
163
+ }) | (ConditionBaseIR & {
164
+ /** Event payload predicate; `path` is dotted for nested fields ('tags.utm_source'). */
165
+ type: 'payload';
166
+ path: string;
167
+ op: PropertyOperatorIR;
168
+ value?: ScalarIR | undefined;
169
+ values?: ScalarIR[] | undefined;
170
+ }) | (ConditionBaseIR & {
171
+ type: 'performed';
172
+ event: string;
173
+ /** Payload filter: only events matching it count (a payload-only subtree). */
174
+ where?: ConditionIR | undefined;
175
+ within?: DurationIR | undefined;
176
+ count?: number | undefined;
177
+ }) |
178
+ /**
179
+ * The user can be reached on the channel right now: for push, the host's
180
+ * device directory lists at least one device; for the others, the channel's
181
+ * recipient property (email, phone, …) is set.
182
+ */
183
+ (ConditionBaseIR & {
184
+ type: 'reachable';
185
+ channel: ChannelIR;
186
+ });
187
+ export declare const ConditionIR: z.ZodMiniType<ConditionIR>;
188
+ /**
189
+ * Trigger shapes. The event trigger has two independent gates: `where` tests
190
+ * the triggering event's payload (payload-only subtree, evaluated against the
191
+ * incoming event before anything else), `filter` tests the user's profile.
192
+ */
193
+ export declare const TriggerIR: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
194
+ type: z.ZodMiniLiteral<"event">;
195
+ event: z.ZodMiniString<string>;
196
+ where: z.ZodMiniOptional<z.ZodMiniType<ConditionIR, unknown, z.core.$ZodTypeInternals<ConditionIR, unknown>>>;
197
+ filter: z.ZodMiniOptional<z.ZodMiniType<ConditionIR, unknown, z.core.$ZodTypeInternals<ConditionIR, unknown>>>;
198
+ }, z.core.$strip>, z.ZodMiniObject<{
199
+ type: z.ZodMiniLiteral<"segment">;
200
+ segment: z.ZodMiniString<string>;
201
+ }, z.core.$strip>, z.ZodMiniObject<{
202
+ type: z.ZodMiniLiteral<"date">;
203
+ at: z.ZodMiniString<string>;
204
+ }, z.core.$strip>, z.ZodMiniObject<{
205
+ type: z.ZodMiniLiteral<"webhook">;
206
+ }, z.core.$strip>], "type">;
207
+ export type TriggerIR = z.infer<typeof TriggerIR>;
208
+ interface NodeBaseIR {
209
+ /** Stable id derived from the structural path (rules in the file header). */
210
+ id: string;
211
+ /** Optional node name: UI title / observability handle (branch's optional first argument lands here). */
212
+ label?: string | undefined;
213
+ /** Metadata (provenance); excluded from contentHash. */
214
+ meta?: NodeMetaIR | undefined;
215
+ }
216
+ export type NodeIR = (NodeBaseIR & {
217
+ type: 'message';
218
+ channel: ChannelIR;
219
+ template: string;
220
+ props: Record<string, PropValueIR>;
221
+ /**
222
+ * Push only: which of the user's devices get a copy. Absent means every
223
+ * device the directory lists; 'latest' only the most recently registered.
224
+ */
225
+ devices?: 'latest' | undefined;
226
+ }) | (NodeBaseIR & {
227
+ type: 'delay';
228
+ duration: DurationIR;
229
+ }) | (NodeBaseIR & {
230
+ type: 'random_delay';
231
+ min: DurationIR;
232
+ max: DurationIR;
233
+ }) | (NodeBaseIR & {
234
+ type: 'time_window';
235
+ days: WeekdayIR[];
236
+ between: [string, string];
237
+ tz: string;
238
+ }) | (NodeBaseIR & {
239
+ type: 'wait_until';
240
+ condition: ConditionIR;
241
+ timeout: DurationIR;
242
+ onTimeout: 'continue' | 'exit' | NodeIR[];
243
+ }) | (NodeBaseIR & {
244
+ type: 'branch';
245
+ cases: {
246
+ label?: string | undefined;
247
+ condition: ConditionIR;
248
+ flow: NodeIR[];
249
+ }[];
250
+ /** Default arm (the DSL's bare tail argument). Absent = fall through to the main line. */
251
+ otherwise?: NodeIR[] | undefined;
252
+ }) | (NodeBaseIR & {
253
+ type: 'filter';
254
+ /** Audit-log line for the users this gate drops. Metadata: excluded from contentHash. */
255
+ reason?: string | undefined;
256
+ condition: ConditionIR;
257
+ }) | (NodeBaseIR & {
258
+ type: 'cohort';
259
+ /**
260
+ * Explicit experiment key: bucketing hashes `userId:key` instead of the
261
+ * structural node id, so the assignment survives node insertion/moves and
262
+ * the experiment keeps one identity across workflow versions. Absent →
263
+ * the node id is used (fine for one-off splits).
264
+ */
265
+ key?: string | undefined;
266
+ /**
267
+ * Arms in authoring order — the order the interpreter accumulates weights
268
+ * in, so it decides which bucket range each arm owns. The DSL keeps that
269
+ * promise by rejecting integer-like arm names, which JavaScript would
270
+ * hoist to the front of the object in numeric order. Weights sum to 100.
271
+ */
272
+ arms: {
273
+ name: string;
274
+ weight: number;
275
+ flow: NodeIR[];
276
+ }[];
277
+ }) | (NodeBaseIR & {
278
+ /** `reason` is the audit-log line. Metadata: excluded from contentHash. */
279
+ type: 'exit';
280
+ reason?: string | undefined;
281
+ }) | (NodeBaseIR & {
282
+ type: 'send_event';
283
+ event: string;
284
+ payload: Record<string, PropValueIR>;
285
+ }) | (NodeBaseIR & {
286
+ type: 'action';
287
+ /** Registry name of the custom action; the code itself lives in the deployed Worker bundle. */
288
+ action: string;
289
+ /** Argument values; user_property references are resolved at run time, like message props. */
290
+ args: Record<string, PropValueIR>;
291
+ /**
292
+ * Hash of the action's source at compile time — the code-identity pin.
293
+ * IR carries identity only (dual-plane model): the runtime looks the
294
+ * action up by name and compares this hash against the registered
295
+ * implementation to detect version skew (warn by default).
296
+ */
297
+ codeHash?: string | undefined;
298
+ });
299
+ export declare const NodeIR: z.ZodMiniType<NodeIR>;
300
+ export declare const GoalIR: z.ZodMiniObject<{
301
+ condition: z.ZodMiniType<ConditionIR, unknown, z.core.$ZodTypeInternals<ConditionIR, unknown>>;
302
+ within: z.ZodMiniOptional<z.ZodMiniObject<{
303
+ value: z.ZodMiniString<string>;
304
+ ms: z.ZodMiniNumber<number>;
305
+ }, z.core.$strip>>;
306
+ exitOnMatch: z.ZodMiniBoolean<boolean>;
307
+ }, z.core.$strip>;
308
+ export type GoalIR = z.infer<typeof GoalIR>;
309
+ /**
310
+ * Human-facing metadata: **excluded from contentHash** (see hash.ts).
311
+ * Editing a name or description does not touch execution semantics, so it never
312
+ * invalidates the version in-flight users are pinned to, nor shows up in plan.
313
+ */
314
+ export declare const MetaIR: z.ZodMiniObject<{
315
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
316
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
317
+ loc: z.ZodMiniOptional<z.ZodMiniObject<{
318
+ file: z.ZodMiniString<string>;
319
+ line: z.ZodMiniNumber<number>;
320
+ column: z.ZodMiniNumber<number>;
321
+ }, z.core.$strip>>;
322
+ }, z.core.$strip>;
323
+ export type MetaIR = z.infer<typeof MetaIR>;
324
+ export declare const WorkflowIR: z.ZodMiniObject<{
325
+ irVersion: z.ZodMiniLiteral<2>;
326
+ id: z.ZodMiniString<string>;
327
+ contentHash: z.ZodMiniString<string>;
328
+ meta: z.ZodMiniOptional<z.ZodMiniObject<{
329
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
330
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
331
+ loc: z.ZodMiniOptional<z.ZodMiniObject<{
332
+ file: z.ZodMiniString<string>;
333
+ line: z.ZodMiniNumber<number>;
334
+ column: z.ZodMiniNumber<number>;
335
+ }, z.core.$strip>>;
336
+ }, z.core.$strip>>;
337
+ trigger: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
338
+ type: z.ZodMiniLiteral<"event">;
339
+ event: z.ZodMiniString<string>;
340
+ where: z.ZodMiniOptional<z.ZodMiniType<ConditionIR, unknown, z.core.$ZodTypeInternals<ConditionIR, unknown>>>;
341
+ filter: z.ZodMiniOptional<z.ZodMiniType<ConditionIR, unknown, z.core.$ZodTypeInternals<ConditionIR, unknown>>>;
342
+ }, z.core.$strip>, z.ZodMiniObject<{
343
+ type: z.ZodMiniLiteral<"segment">;
344
+ segment: z.ZodMiniString<string>;
345
+ }, z.core.$strip>, z.ZodMiniObject<{
346
+ type: z.ZodMiniLiteral<"date">;
347
+ at: z.ZodMiniString<string>;
348
+ }, z.core.$strip>, z.ZodMiniObject<{
349
+ type: z.ZodMiniLiteral<"webhook">;
350
+ }, z.core.$strip>], "type">;
351
+ goal: z.ZodMiniOptional<z.ZodMiniObject<{
352
+ condition: z.ZodMiniType<ConditionIR, unknown, z.core.$ZodTypeInternals<ConditionIR, unknown>>;
353
+ within: z.ZodMiniOptional<z.ZodMiniObject<{
354
+ value: z.ZodMiniString<string>;
355
+ ms: z.ZodMiniNumber<number>;
356
+ }, z.core.$strip>>;
357
+ exitOnMatch: z.ZodMiniBoolean<boolean>;
358
+ }, z.core.$strip>>;
359
+ exitWhen: z.ZodMiniOptional<z.ZodMiniType<ConditionIR, unknown, z.core.$ZodTypeInternals<ConditionIR, unknown>>>;
360
+ flow: z.ZodMiniArray<z.ZodMiniType<NodeIR, unknown, z.core.$ZodTypeInternals<NodeIR, unknown>>>;
361
+ }, z.core.$strip>;
362
+ export type WorkflowIR = z.infer<typeof WorkflowIR>;
363
+ export declare const SegmentIR: z.ZodMiniObject<{
364
+ irVersion: z.ZodMiniLiteral<2>;
365
+ id: z.ZodMiniString<string>;
366
+ contentHash: z.ZodMiniString<string>;
367
+ meta: z.ZodMiniOptional<z.ZodMiniObject<{
368
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
369
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
370
+ loc: z.ZodMiniOptional<z.ZodMiniObject<{
371
+ file: z.ZodMiniString<string>;
372
+ line: z.ZodMiniNumber<number>;
373
+ column: z.ZodMiniNumber<number>;
374
+ }, z.core.$strip>>;
375
+ }, z.core.$strip>>;
376
+ condition: z.ZodMiniType<ConditionIR, unknown, z.core.$ZodTypeInternals<ConditionIR, unknown>>;
377
+ }, z.core.$strip>;
378
+ export type SegmentIR = z.infer<typeof SegmentIR>;
379
+ /** Template manifest entry: IR records only the reference; the body lives in the template system. */
380
+ export declare const TemplateIR: z.ZodMiniObject<{
381
+ irVersion: z.ZodMiniLiteral<2>;
382
+ key: z.ZodMiniString<string>;
383
+ channel: z.ZodMiniEnum<{
384
+ discord: "discord";
385
+ email: "email";
386
+ in_app: "in_app";
387
+ push: "push";
388
+ slack: "slack";
389
+ sms: "sms";
390
+ survey: "survey";
391
+ }>;
392
+ }, z.core.$strip>;
393
+ export type TemplateIR = z.infer<typeof TemplateIR>;
394
+ /**
395
+ * Action manifest entry: IR records the name and the code-identity hash; the
396
+ * implementation solidifies into the Worker bundle at deploy time, never into
397
+ * IR (custom code stays out of the data plane by design).
398
+ */
399
+ export declare const ActionIR: z.ZodMiniObject<{
400
+ irVersion: z.ZodMiniLiteral<2>;
401
+ name: z.ZodMiniString<string>;
402
+ codeHash: z.ZodMiniString<string>;
403
+ }, z.core.$strip>;
404
+ export type ActionIR = z.infer<typeof ActionIR>;
405
+ /**
406
+ * Deployment unit: the complete snapshot one `deploy` produces (terraform
407
+ * apply, same mental model). The server diffs each definition's contentHash to
408
+ * decide publish / skip / retire.
409
+ */
410
+ export declare const BundleIR: z.ZodMiniObject<{
411
+ irVersion: z.ZodMiniLiteral<2>;
412
+ workflows: z.ZodMiniArray<z.ZodMiniObject<{
413
+ irVersion: z.ZodMiniLiteral<2>;
414
+ id: z.ZodMiniString<string>;
415
+ contentHash: z.ZodMiniString<string>;
416
+ meta: z.ZodMiniOptional<z.ZodMiniObject<{
417
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
418
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
419
+ loc: z.ZodMiniOptional<z.ZodMiniObject<{
420
+ file: z.ZodMiniString<string>;
421
+ line: z.ZodMiniNumber<number>;
422
+ column: z.ZodMiniNumber<number>;
423
+ }, z.core.$strip>>;
424
+ }, z.core.$strip>>;
425
+ trigger: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
426
+ type: z.ZodMiniLiteral<"event">;
427
+ event: z.ZodMiniString<string>;
428
+ where: z.ZodMiniOptional<z.ZodMiniType<ConditionIR, unknown, z.core.$ZodTypeInternals<ConditionIR, unknown>>>;
429
+ filter: z.ZodMiniOptional<z.ZodMiniType<ConditionIR, unknown, z.core.$ZodTypeInternals<ConditionIR, unknown>>>;
430
+ }, z.core.$strip>, z.ZodMiniObject<{
431
+ type: z.ZodMiniLiteral<"segment">;
432
+ segment: z.ZodMiniString<string>;
433
+ }, z.core.$strip>, z.ZodMiniObject<{
434
+ type: z.ZodMiniLiteral<"date">;
435
+ at: z.ZodMiniString<string>;
436
+ }, z.core.$strip>, z.ZodMiniObject<{
437
+ type: z.ZodMiniLiteral<"webhook">;
438
+ }, z.core.$strip>], "type">;
439
+ goal: z.ZodMiniOptional<z.ZodMiniObject<{
440
+ condition: z.ZodMiniType<ConditionIR, unknown, z.core.$ZodTypeInternals<ConditionIR, unknown>>;
441
+ within: z.ZodMiniOptional<z.ZodMiniObject<{
442
+ value: z.ZodMiniString<string>;
443
+ ms: z.ZodMiniNumber<number>;
444
+ }, z.core.$strip>>;
445
+ exitOnMatch: z.ZodMiniBoolean<boolean>;
446
+ }, z.core.$strip>>;
447
+ exitWhen: z.ZodMiniOptional<z.ZodMiniType<ConditionIR, unknown, z.core.$ZodTypeInternals<ConditionIR, unknown>>>;
448
+ flow: z.ZodMiniArray<z.ZodMiniType<NodeIR, unknown, z.core.$ZodTypeInternals<NodeIR, unknown>>>;
449
+ }, z.core.$strip>>;
450
+ segments: z.ZodMiniArray<z.ZodMiniObject<{
451
+ irVersion: z.ZodMiniLiteral<2>;
452
+ id: z.ZodMiniString<string>;
453
+ contentHash: z.ZodMiniString<string>;
454
+ meta: z.ZodMiniOptional<z.ZodMiniObject<{
455
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
456
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
457
+ loc: z.ZodMiniOptional<z.ZodMiniObject<{
458
+ file: z.ZodMiniString<string>;
459
+ line: z.ZodMiniNumber<number>;
460
+ column: z.ZodMiniNumber<number>;
461
+ }, z.core.$strip>>;
462
+ }, z.core.$strip>>;
463
+ condition: z.ZodMiniType<ConditionIR, unknown, z.core.$ZodTypeInternals<ConditionIR, unknown>>;
464
+ }, z.core.$strip>>;
465
+ templates: z.ZodMiniArray<z.ZodMiniObject<{
466
+ irVersion: z.ZodMiniLiteral<2>;
467
+ key: z.ZodMiniString<string>;
468
+ channel: z.ZodMiniEnum<{
469
+ discord: "discord";
470
+ email: "email";
471
+ in_app: "in_app";
472
+ push: "push";
473
+ slack: "slack";
474
+ sms: "sms";
475
+ survey: "survey";
476
+ }>;
477
+ }, z.core.$strip>>;
478
+ actions: z.ZodMiniArray<z.ZodMiniObject<{
479
+ irVersion: z.ZodMiniLiteral<2>;
480
+ name: z.ZodMiniString<string>;
481
+ codeHash: z.ZodMiniString<string>;
482
+ }, z.core.$strip>>;
483
+ }, z.core.$strip>;
484
+ export type BundleIR = z.infer<typeof BundleIR>;
485
+ //#endregion
486
+ //# sourceMappingURL=ir.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ir.d.cts","names":[],"sources":["../src/ir.ts"],"mappings":"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"}