@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.
- package/LICENSE +21 -0
- package/README.md +154 -2
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/apns-relay.cjs +105 -0
- package/dist/apns-relay.cjs.map +1 -0
- package/dist/apns-relay.d.cts +28 -0
- package/dist/apns-relay.d.cts.map +1 -0
- package/dist/apns-relay.d.mts +28 -0
- package/dist/apns-relay.d.mts.map +1 -0
- package/dist/apns-relay.mjs +104 -0
- package/dist/apns-relay.mjs.map +1 -0
- package/dist/apns.cjs +121 -0
- package/dist/apns.cjs.map +1 -0
- package/dist/apns.d.cts +63 -0
- package/dist/apns.d.cts.map +1 -0
- package/dist/apns.d.mts +63 -0
- package/dist/apns.d.mts.map +1 -0
- package/dist/apns.mjs +116 -0
- package/dist/apns.mjs.map +1 -0
- package/dist/client.cjs +125 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +108 -0
- package/dist/client.d.cts.map +1 -0
- package/dist/client.d.mts +108 -0
- package/dist/client.d.mts.map +1 -0
- package/dist/client.mjs +122 -0
- package/dist/client.mjs.map +1 -0
- package/dist/cloudflare/bindings.cjs +28 -0
- package/dist/cloudflare/bindings.cjs.map +1 -0
- package/dist/cloudflare/bindings.d.cts +144 -0
- package/dist/cloudflare/bindings.d.cts.map +1 -0
- package/dist/cloudflare/bindings.d.mts +144 -0
- package/dist/cloudflare/bindings.d.mts.map +1 -0
- package/dist/cloudflare/bindings.mjs +25 -0
- package/dist/cloudflare/bindings.mjs.map +1 -0
- package/dist/cloudflare/channels.cjs +164 -0
- package/dist/cloudflare/channels.cjs.map +1 -0
- package/dist/cloudflare/channels.d.cts +29 -0
- package/dist/cloudflare/channels.d.cts.map +1 -0
- package/dist/cloudflare/channels.d.mts +29 -0
- package/dist/cloudflare/channels.d.mts.map +1 -0
- package/dist/cloudflare/channels.mjs +161 -0
- package/dist/cloudflare/channels.mjs.map +1 -0
- package/dist/cloudflare/d1-env.cjs +17 -0
- package/dist/cloudflare/d1-env.cjs.map +1 -0
- package/dist/cloudflare/d1-env.d.cts +12 -0
- package/dist/cloudflare/d1-env.d.cts.map +1 -0
- package/dist/cloudflare/d1-env.d.mts +12 -0
- package/dist/cloudflare/d1-env.d.mts.map +1 -0
- package/dist/cloudflare/d1-env.mjs +16 -0
- package/dist/cloudflare/d1-env.mjs.map +1 -0
- package/dist/cloudflare/index.cjs +54 -0
- package/dist/cloudflare/index.d.cts +19 -0
- package/dist/cloudflare/index.d.mts +19 -0
- package/dist/cloudflare/index.mjs +16 -0
- package/dist/cloudflare/router.cjs +516 -0
- package/dist/cloudflare/router.cjs.map +1 -0
- package/dist/cloudflare/router.d.cts +157 -0
- package/dist/cloudflare/router.d.cts.map +1 -0
- package/dist/cloudflare/router.d.mts +157 -0
- package/dist/cloudflare/router.d.mts.map +1 -0
- package/dist/cloudflare/router.mjs +503 -0
- package/dist/cloudflare/router.mjs.map +1 -0
- package/dist/cloudflare/runner.cjs +225 -0
- package/dist/cloudflare/runner.cjs.map +1 -0
- package/dist/cloudflare/runner.d.cts +73 -0
- package/dist/cloudflare/runner.d.cts.map +1 -0
- package/dist/cloudflare/runner.d.mts +73 -0
- package/dist/cloudflare/runner.d.mts.map +1 -0
- package/dist/cloudflare/runner.mjs +224 -0
- package/dist/cloudflare/runner.mjs.map +1 -0
- package/dist/cloudflare/schema.sql +127 -0
- package/dist/cloudflare/senders.cjs +114 -0
- package/dist/cloudflare/senders.cjs.map +1 -0
- package/dist/cloudflare/senders.d.cts +68 -0
- package/dist/cloudflare/senders.d.cts.map +1 -0
- package/dist/cloudflare/senders.d.mts +68 -0
- package/dist/cloudflare/senders.d.mts.map +1 -0
- package/dist/cloudflare/senders.mjs +108 -0
- package/dist/cloudflare/senders.mjs.map +1 -0
- package/dist/cloudflare/worker.cjs +228 -0
- package/dist/cloudflare/worker.cjs.map +1 -0
- package/dist/cloudflare/worker.d.cts +92 -0
- package/dist/cloudflare/worker.d.cts.map +1 -0
- package/dist/cloudflare/worker.d.mts +92 -0
- package/dist/cloudflare/worker.d.mts.map +1 -0
- package/dist/cloudflare/worker.mjs +224 -0
- package/dist/cloudflare/worker.mjs.map +1 -0
- package/dist/cloudflare/workers.d.cjs +0 -0
- package/dist/cloudflare/workers.d.cts +44 -0
- package/dist/cloudflare/workers.d.cts.map +1 -0
- package/dist/cloudflare/workers.d.mts +44 -0
- package/dist/cloudflare/workers.d.mts.map +1 -0
- package/dist/config.cjs +151 -0
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +149 -0
- package/dist/config.d.cts.map +1 -0
- package/dist/config.d.mts +149 -0
- package/dist/config.d.mts.map +1 -0
- package/dist/config.mjs +143 -0
- package/dist/config.mjs.map +1 -0
- package/dist/contract.cjs +212 -0
- package/dist/contract.cjs.map +1 -0
- package/dist/contract.d.cts +90 -0
- package/dist/contract.d.cts.map +1 -0
- package/dist/contract.d.mts +90 -0
- package/dist/contract.d.mts.map +1 -0
- package/dist/contract.mjs +206 -0
- package/dist/contract.mjs.map +1 -0
- package/dist/dsl/action.cjs +29 -0
- package/dist/dsl/action.cjs.map +1 -0
- package/dist/dsl/action.d.cts +64 -0
- package/dist/dsl/action.d.cts.map +1 -0
- package/dist/dsl/action.d.mts +64 -0
- package/dist/dsl/action.d.mts.map +1 -0
- package/dist/dsl/action.mjs +28 -0
- package/dist/dsl/action.mjs.map +1 -0
- package/dist/dsl/base.cjs +34 -0
- package/dist/dsl/base.cjs.map +1 -0
- package/dist/dsl/base.d.cts +45 -0
- package/dist/dsl/base.d.cts.map +1 -0
- package/dist/dsl/base.d.mts +45 -0
- package/dist/dsl/base.d.mts.map +1 -0
- package/dist/dsl/base.mjs +30 -0
- package/dist/dsl/base.mjs.map +1 -0
- package/dist/dsl/bundle.cjs +207 -0
- package/dist/dsl/bundle.cjs.map +1 -0
- package/dist/dsl/bundle.d.cts +19 -0
- package/dist/dsl/bundle.d.cts.map +1 -0
- package/dist/dsl/bundle.d.mts +19 -0
- package/dist/dsl/bundle.d.mts.map +1 -0
- package/dist/dsl/bundle.mjs +206 -0
- package/dist/dsl/bundle.mjs.map +1 -0
- package/dist/dsl/condition.cjs +177 -0
- package/dist/dsl/condition.cjs.map +1 -0
- package/dist/dsl/condition.d.cts +140 -0
- package/dist/dsl/condition.d.cts.map +1 -0
- package/dist/dsl/condition.d.mts +140 -0
- package/dist/dsl/condition.d.mts.map +1 -0
- package/dist/dsl/condition.mjs +156 -0
- package/dist/dsl/condition.mjs.map +1 -0
- package/dist/dsl/flow.cjs +228 -0
- package/dist/dsl/flow.cjs.map +1 -0
- package/dist/dsl/flow.d.cts +223 -0
- package/dist/dsl/flow.d.cts.map +1 -0
- package/dist/dsl/flow.d.mts +223 -0
- package/dist/dsl/flow.d.mts.map +1 -0
- package/dist/dsl/flow.mjs +226 -0
- package/dist/dsl/flow.mjs.map +1 -0
- package/dist/dsl/index.cjs +38 -0
- package/dist/dsl/index.d.cts +10 -0
- package/dist/dsl/index.d.mts +10 -0
- package/dist/dsl/index.mjs +9 -0
- package/dist/dsl/refs.cjs +59 -0
- package/dist/dsl/refs.cjs.map +1 -0
- package/dist/dsl/refs.d.cts +88 -0
- package/dist/dsl/refs.d.cts.map +1 -0
- package/dist/dsl/refs.d.mts +88 -0
- package/dist/dsl/refs.d.mts.map +1 -0
- package/dist/dsl/refs.mjs +55 -0
- package/dist/dsl/refs.mjs.map +1 -0
- package/dist/dsl/template.cjs +65 -0
- package/dist/dsl/template.cjs.map +1 -0
- package/dist/dsl/template.d.cts +75 -0
- package/dist/dsl/template.d.cts.map +1 -0
- package/dist/dsl/template.d.mts +75 -0
- package/dist/dsl/template.d.mts.map +1 -0
- package/dist/dsl/template.mjs +63 -0
- package/dist/dsl/template.mjs.map +1 -0
- package/dist/dsl/trigger.cjs +40 -0
- package/dist/dsl/trigger.cjs.map +1 -0
- package/dist/dsl/trigger.d.cts +65 -0
- package/dist/dsl/trigger.d.cts.map +1 -0
- package/dist/dsl/trigger.d.mts +65 -0
- package/dist/dsl/trigger.d.mts.map +1 -0
- package/dist/dsl/trigger.mjs +39 -0
- package/dist/dsl/trigger.mjs.map +1 -0
- package/dist/dsl/workflow.cjs +121 -0
- package/dist/dsl/workflow.cjs.map +1 -0
- package/dist/dsl/workflow.d.cts +59 -0
- package/dist/dsl/workflow.d.cts.map +1 -0
- package/dist/dsl/workflow.d.mts +59 -0
- package/dist/dsl/workflow.d.mts.map +1 -0
- package/dist/dsl/workflow.mjs +120 -0
- package/dist/dsl/workflow.mjs.map +1 -0
- package/dist/engine/actions.cjs +27 -0
- package/dist/engine/actions.cjs.map +1 -0
- package/dist/engine/actions.d.cts +40 -0
- package/dist/engine/actions.d.cts.map +1 -0
- package/dist/engine/actions.d.mts +40 -0
- package/dist/engine/actions.d.mts.map +1 -0
- package/dist/engine/actions.mjs +26 -0
- package/dist/engine/actions.mjs.map +1 -0
- package/dist/engine/bucket.cjs +72 -0
- package/dist/engine/bucket.cjs.map +1 -0
- package/dist/engine/bucket.d.cts +32 -0
- package/dist/engine/bucket.d.cts.map +1 -0
- package/dist/engine/bucket.d.mts +32 -0
- package/dist/engine/bucket.d.mts.map +1 -0
- package/dist/engine/bucket.mjs +69 -0
- package/dist/engine/bucket.mjs.map +1 -0
- package/dist/engine/condition.cjs +166 -0
- package/dist/engine/condition.cjs.map +1 -0
- package/dist/engine/condition.d.cts +52 -0
- package/dist/engine/condition.d.cts.map +1 -0
- package/dist/engine/condition.d.mts +52 -0
- package/dist/engine/condition.d.mts.map +1 -0
- package/dist/engine/condition.mjs +161 -0
- package/dist/engine/condition.mjs.map +1 -0
- package/dist/engine/index.cjs +20 -0
- package/dist/engine/index.d.cts +8 -0
- package/dist/engine/index.d.mts +8 -0
- package/dist/engine/index.mjs +7 -0
- package/dist/engine/interpreter.cjs +428 -0
- package/dist/engine/interpreter.cjs.map +1 -0
- package/dist/engine/interpreter.d.cts +6 -0
- package/dist/engine/interpreter.d.cts.map +1 -0
- package/dist/engine/interpreter.d.mts +6 -0
- package/dist/engine/interpreter.d.mts.map +1 -0
- package/dist/engine/interpreter.mjs +427 -0
- package/dist/engine/interpreter.mjs.map +1 -0
- package/dist/engine/ports.cjs +0 -0
- package/dist/engine/ports.d.cts +252 -0
- package/dist/engine/ports.d.cts.map +1 -0
- package/dist/engine/ports.d.mts +252 -0
- package/dist/engine/ports.d.mts.map +1 -0
- package/dist/engine/ports.mjs +1 -0
- package/dist/engine/recipient.cjs +23 -0
- package/dist/engine/recipient.cjs.map +1 -0
- package/dist/engine/recipient.d.cts +13 -0
- package/dist/engine/recipient.d.cts.map +1 -0
- package/dist/engine/recipient.d.mts +13 -0
- package/dist/engine/recipient.d.mts.map +1 -0
- package/dist/engine/recipient.mjs +22 -0
- package/dist/engine/recipient.mjs.map +1 -0
- package/dist/engine/time-scale.cjs +54 -0
- package/dist/engine/time-scale.cjs.map +1 -0
- package/dist/engine/time-scale.d.cts +31 -0
- package/dist/engine/time-scale.d.cts.map +1 -0
- package/dist/engine/time-scale.d.mts +31 -0
- package/dist/engine/time-scale.d.mts.map +1 -0
- package/dist/engine/time-scale.mjs +52 -0
- package/dist/engine/time-scale.mjs.map +1 -0
- package/dist/engine/time-window.cjs +149 -0
- package/dist/engine/time-window.cjs.map +1 -0
- package/dist/engine/time-window.d.cts +22 -0
- package/dist/engine/time-window.d.cts.map +1 -0
- package/dist/engine/time-window.d.mts +22 -0
- package/dist/engine/time-window.d.mts.map +1 -0
- package/dist/engine/time-window.mjs +147 -0
- package/dist/engine/time-window.mjs.map +1 -0
- package/dist/fcm.cjs +125 -0
- package/dist/fcm.cjs.map +1 -0
- package/dist/fcm.d.cts +48 -0
- package/dist/fcm.d.cts.map +1 -0
- package/dist/fcm.d.mts +48 -0
- package/dist/fcm.d.mts.map +1 -0
- package/dist/fcm.mjs +121 -0
- package/dist/fcm.mjs.map +1 -0
- package/dist/hash.cjs +245 -0
- package/dist/hash.cjs.map +1 -0
- package/dist/hash.d.cts +30 -0
- package/dist/hash.d.cts.map +1 -0
- package/dist/hash.d.mts +30 -0
- package/dist/hash.d.mts.map +1 -0
- package/dist/hash.mjs +239 -0
- package/dist/hash.mjs.map +1 -0
- package/dist/index.cjs +100 -0
- package/dist/index.d.cts +18 -0
- package/dist/index.d.mts +18 -0
- package/dist/index.mjs +17 -0
- package/dist/ir.cjs +366 -0
- package/dist/ir.cjs.map +1 -0
- package/dist/ir.d.cts +486 -0
- package/dist/ir.d.cts.map +1 -0
- package/dist/ir.d.mts +486 -0
- package/dist/ir.d.mts.map +1 -0
- package/dist/ir.mjs +344 -0
- package/dist/ir.mjs.map +1 -0
- package/dist/jwt.cjs +22 -0
- package/dist/jwt.cjs.map +1 -0
- package/dist/jwt.d.cts +9 -0
- package/dist/jwt.d.cts.map +1 -0
- package/dist/jwt.d.mts +9 -0
- package/dist/jwt.d.mts.map +1 -0
- package/dist/jwt.mjs +20 -0
- package/dist/jwt.mjs.map +1 -0
- package/dist/plan.cjs +223 -0
- package/dist/plan.cjs.map +1 -0
- package/dist/plan.d.cts +68 -0
- package/dist/plan.d.cts.map +1 -0
- package/dist/plan.d.mts +68 -0
- package/dist/plan.d.mts.map +1 -0
- package/dist/plan.mjs +221 -0
- package/dist/plan.mjs.map +1 -0
- package/dist/postgres-js.cjs +42 -0
- package/dist/postgres-js.cjs.map +1 -0
- package/dist/postgres-js.d.cts +28 -0
- package/dist/postgres-js.d.cts.map +1 -0
- package/dist/postgres-js.d.mts +28 -0
- package/dist/postgres-js.d.mts.map +1 -0
- package/dist/postgres-js.mjs +38 -0
- package/dist/postgres-js.mjs.map +1 -0
- package/dist/provenance.cjs +67 -0
- package/dist/provenance.cjs.map +1 -0
- package/dist/provenance.d.cts +41 -0
- package/dist/provenance.d.cts.map +1 -0
- package/dist/provenance.d.mts +41 -0
- package/dist/provenance.d.mts.map +1 -0
- package/dist/provenance.mjs +65 -0
- package/dist/provenance.mjs.map +1 -0
- package/dist/push.cjs +14 -0
- package/dist/push.cjs.map +1 -0
- package/dist/push.d.cts +16 -0
- package/dist/push.d.cts.map +1 -0
- package/dist/push.d.mts +16 -0
- package/dist/push.d.mts.map +1 -0
- package/dist/push.mjs +13 -0
- package/dist/push.mjs.map +1 -0
- package/dist/react-email.cjs +48 -0
- package/dist/react-email.cjs.map +1 -0
- package/dist/react-email.d.cts +7 -0
- package/dist/react-email.d.cts.map +1 -0
- package/dist/react-email.d.mts +7 -0
- package/dist/react-email.d.mts.map +1 -0
- package/dist/react-email.mjs +47 -0
- package/dist/react-email.mjs.map +1 -0
- package/dist/reporting/classify.cjs +42 -0
- package/dist/reporting/classify.cjs.map +1 -0
- package/dist/reporting/classify.d.cts +60 -0
- package/dist/reporting/classify.d.cts.map +1 -0
- package/dist/reporting/classify.d.mts +60 -0
- package/dist/reporting/classify.d.mts.map +1 -0
- package/dist/reporting/classify.mjs +38 -0
- package/dist/reporting/classify.mjs.map +1 -0
- package/dist/reporting/observer.cjs +63 -0
- package/dist/reporting/observer.cjs.map +1 -0
- package/dist/reporting/observer.d.cts +18 -0
- package/dist/reporting/observer.d.cts.map +1 -0
- package/dist/reporting/observer.d.mts +18 -0
- package/dist/reporting/observer.d.mts.map +1 -0
- package/dist/reporting/observer.mjs +62 -0
- package/dist/reporting/observer.mjs.map +1 -0
- package/dist/reporting/tracking.cjs +153 -0
- package/dist/reporting/tracking.cjs.map +1 -0
- package/dist/reporting/tracking.d.cts +43 -0
- package/dist/reporting/tracking.d.cts.map +1 -0
- package/dist/reporting/tracking.d.mts +43 -0
- package/dist/reporting/tracking.d.mts.map +1 -0
- package/dist/reporting/tracking.mjs +151 -0
- package/dist/reporting/tracking.mjs.map +1 -0
- package/dist/runtime.cjs +19 -0
- package/dist/runtime.cjs.map +1 -0
- package/dist/runtime.d.cts +30 -0
- package/dist/runtime.d.cts.map +1 -0
- package/dist/runtime.d.mts +30 -0
- package/dist/runtime.d.mts.map +1 -0
- package/dist/runtime.mjs +18 -0
- package/dist/runtime.mjs.map +1 -0
- package/dist/store/d1.cjs +185 -0
- package/dist/store/d1.cjs.map +1 -0
- package/dist/store/d1.d.cts +55 -0
- package/dist/store/d1.d.cts.map +1 -0
- package/dist/store/d1.d.mts +55 -0
- package/dist/store/d1.d.mts.map +1 -0
- package/dist/store/d1.mjs +184 -0
- package/dist/store/d1.mjs.map +1 -0
- package/dist/store/facts.cjs +60 -0
- package/dist/store/facts.cjs.map +1 -0
- package/dist/store/facts.d.cts +38 -0
- package/dist/store/facts.d.cts.map +1 -0
- package/dist/store/facts.d.mts +38 -0
- package/dist/store/facts.d.mts.map +1 -0
- package/dist/store/facts.mjs +58 -0
- package/dist/store/facts.mjs.map +1 -0
- package/dist/store/index.cjs +31 -0
- package/dist/store/index.cjs.map +1 -0
- package/dist/store/index.d.cts +291 -0
- package/dist/store/index.d.cts.map +1 -0
- package/dist/store/index.d.mts +291 -0
- package/dist/store/index.d.mts.map +1 -0
- package/dist/store/index.mjs +22 -0
- package/dist/store/index.mjs.map +1 -0
- package/dist/store/postgres-reporting.cjs +213 -0
- package/dist/store/postgres-reporting.cjs.map +1 -0
- package/dist/store/postgres-reporting.d.cts +63 -0
- package/dist/store/postgres-reporting.d.cts.map +1 -0
- package/dist/store/postgres-reporting.d.mts +63 -0
- package/dist/store/postgres-reporting.d.mts.map +1 -0
- package/dist/store/postgres-reporting.mjs +212 -0
- package/dist/store/postgres-reporting.mjs.map +1 -0
- package/dist/store/postgres.cjs +309 -0
- package/dist/store/postgres.cjs.map +1 -0
- package/dist/store/postgres.d.cts +77 -0
- package/dist/store/postgres.d.cts.map +1 -0
- package/dist/store/postgres.d.mts +77 -0
- package/dist/store/postgres.d.mts.map +1 -0
- package/dist/store/postgres.mjs +306 -0
- package/dist/store/postgres.mjs.map +1 -0
- package/dist/store/sql.cjs +24 -0
- package/dist/store/sql.cjs.map +1 -0
- package/dist/store/sql.d.cts +25 -0
- package/dist/store/sql.d.cts.map +1 -0
- package/dist/store/sql.d.mts +25 -0
- package/dist/store/sql.d.mts.map +1 -0
- package/dist/store/sql.mjs +23 -0
- package/dist/store/sql.mjs.map +1 -0
- package/dist/store/tables.cjs +404 -0
- package/dist/store/tables.cjs.map +1 -0
- package/dist/store/tables.d.cts +81 -0
- package/dist/store/tables.d.cts.map +1 -0
- package/dist/store/tables.d.mts +81 -0
- package/dist/store/tables.d.mts.map +1 -0
- package/dist/store/tables.mjs +399 -0
- package/dist/store/tables.mjs.map +1 -0
- package/dist/templates.cjs +247 -0
- package/dist/templates.cjs.map +1 -0
- package/dist/templates.d.cts +187 -0
- package/dist/templates.d.cts.map +1 -0
- package/dist/templates.d.mts +187 -0
- package/dist/templates.d.mts.map +1 -0
- package/dist/templates.mjs +230 -0
- package/dist/templates.mjs.map +1 -0
- package/dist/webhooks.cjs +96 -0
- package/dist/webhooks.cjs.map +1 -0
- package/dist/webhooks.d.cts +25 -0
- package/dist/webhooks.d.cts.map +1 -0
- package/dist/webhooks.d.mts +25 -0
- package/dist/webhooks.d.mts.map +1 -0
- package/dist/webhooks.mjs +94 -0
- package/dist/webhooks.mjs.map +1 -0
- package/dist/webpush.cjs +180 -0
- package/dist/webpush.cjs.map +1 -0
- package/dist/webpush.d.cts +53 -0
- package/dist/webpush.d.cts.map +1 -0
- package/dist/webpush.d.mts +53 -0
- package/dist/webpush.d.mts.map +1 -0
- package/dist/webpush.mjs +175 -0
- package/dist/webpush.mjs.map +1 -0
- package/package.json +189 -3
- package/src/cloudflare/schema.sql +127 -0
- package/src/cloudflare/workers.d.ts +44 -0
package/dist/ir.d.mts
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.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ir.d.mts","names":[],"sources":["../src/ir.ts"],"mappings":"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"}
|