cvx-kit 0.2.0 → 2.0.0-beta.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 (372) hide show
  1. package/README.md +556 -99
  2. package/dist/agent-tools.d.mts +39 -26
  3. package/dist/agent-tools.mjs +1 -1
  4. package/dist/agent-tools.mjs.map +1 -1
  5. package/dist/auth.d.mts +120 -308
  6. package/dist/auth.mjs +1 -1
  7. package/dist/auth.mjs.map +1 -1
  8. package/dist/components/approvals/_generated/api.d.mts +7 -9
  9. package/dist/components/approvals/_generated/api.mjs.map +1 -1
  10. package/dist/components/approvals/_generated/component.d.mts +1 -4
  11. package/dist/components/approvals/_generated/dataModel.d.mts +5 -8
  12. package/dist/components/approvals/_generated/server.d.mts +12 -15
  13. package/dist/components/approvals/_generated/server.mjs.map +1 -1
  14. package/dist/components/approvals/audit.d.mts +8 -9
  15. package/dist/components/approvals/audit.mjs +1 -1
  16. package/dist/components/approvals/audit.mjs.map +1 -1
  17. package/dist/components/approvals/client.d.mts +11 -12
  18. package/dist/components/approvals/client.mjs +1 -1
  19. package/dist/components/approvals/client.mjs.map +1 -1
  20. package/dist/components/approvals/constants.d.mts +30 -31
  21. package/dist/components/approvals/constants.mjs.map +1 -1
  22. package/dist/components/approvals/convex.config.d.mts +0 -2
  23. package/dist/components/approvals/convex.config.mjs.map +1 -1
  24. package/dist/components/approvals/decisions.d.mts +13 -17
  25. package/dist/components/approvals/decisions.mjs +1 -1
  26. package/dist/components/approvals/decisions.mjs.map +1 -1
  27. package/dist/components/approvals/functions.d.mts +3 -4
  28. package/dist/components/approvals/functions.mjs +1 -1
  29. package/dist/components/approvals/functions.mjs.map +1 -1
  30. package/dist/components/approvals/health.d.mts +2 -3
  31. package/dist/components/approvals/health.mjs.map +1 -1
  32. package/dist/components/approvals/requests.d.mts +114 -131
  33. package/dist/components/approvals/requests.mjs +1 -1
  34. package/dist/components/approvals/requests.mjs.map +1 -1
  35. package/dist/components/approvals/schema.d.ts +106 -315
  36. package/dist/components/approvals/schema.js +1 -1
  37. package/dist/components/approvals/validators.d.mts +323 -395
  38. package/dist/components/approvals/validators.mjs +1 -1
  39. package/dist/components/approvals/validators.mjs.map +1 -1
  40. package/dist/components/approvals/workflow.d.mts +4 -5
  41. package/dist/components/approvals/workflow.mjs +1 -1
  42. package/dist/components/approvals/workflow.mjs.map +1 -1
  43. package/dist/components/approvals/workflow_steps.d.mts +16 -17
  44. package/dist/components/approvals/workflow_steps.mjs +1 -1
  45. package/dist/components/approvals/workflow_steps.mjs.map +1 -1
  46. package/dist/components/foundation/_generated/api.d.mts +6 -8
  47. package/dist/components/foundation/_generated/api.mjs.map +1 -1
  48. package/dist/components/foundation/_generated/component.d.mts +1 -4
  49. package/dist/components/foundation/_generated/dataModel.d.mts +5 -8
  50. package/dist/components/foundation/_generated/server.d.mts +12 -15
  51. package/dist/components/foundation/_generated/server.mjs.map +1 -1
  52. package/dist/components/foundation/client.d.mts +45 -38
  53. package/dist/components/foundation/client.mjs +1 -1
  54. package/dist/components/foundation/client.mjs.map +1 -1
  55. package/dist/components/foundation/convex.config.d.mts +0 -2
  56. package/dist/components/foundation/convex.config.mjs.map +1 -1
  57. package/dist/components/foundation/functions.d.mts +2 -3
  58. package/dist/components/foundation/functions.mjs.map +1 -1
  59. package/dist/components/foundation/modules/command/command.d.mts +65 -17
  60. package/dist/components/foundation/modules/command/command.mjs +1 -1
  61. package/dist/components/foundation/modules/command/command.mjs.map +1 -1
  62. package/dist/components/foundation/modules/command/lifecycle.d.mts +78 -0
  63. package/dist/components/foundation/modules/command/lifecycle.mjs +2 -0
  64. package/dist/components/foundation/modules/command/lifecycle.mjs.map +1 -0
  65. package/dist/components/foundation/modules/observability/observability.d.mts +13 -6
  66. package/dist/components/foundation/modules/observability/observability.mjs +1 -1
  67. package/dist/components/foundation/modules/observability/observability.mjs.map +1 -1
  68. package/dist/components/foundation/modules/query/query.d.mts +11 -12
  69. package/dist/components/foundation/modules/query/query.mjs +1 -1
  70. package/dist/components/foundation/modules/query/query.mjs.map +1 -1
  71. package/dist/components/foundation/operation.d.mts +72 -0
  72. package/dist/components/foundation/operation.mjs +2 -0
  73. package/dist/components/foundation/operation.mjs.map +1 -0
  74. package/dist/components/foundation/result.d.mts +7 -8
  75. package/dist/components/foundation/result.mjs.map +1 -1
  76. package/dist/components/foundation/schema.d.ts +0 -2
  77. package/dist/components/foundation/telemetry.d.mts +2 -3
  78. package/dist/components/foundation/telemetry.mjs +1 -1
  79. package/dist/components/foundation/telemetry.mjs.map +1 -1
  80. package/dist/contracts.d.mts +5 -0
  81. package/dist/contracts.mjs +1 -0
  82. package/dist/crud.d.mts +185 -27
  83. package/dist/crud.mjs +1 -1
  84. package/dist/crud.mjs.map +1 -1
  85. package/dist/effect.d.mts +16 -0
  86. package/dist/effect.mjs +1 -0
  87. package/dist/errors.d.mts +6 -6
  88. package/dist/errors.mjs +1 -1
  89. package/dist/errors.mjs.map +1 -1
  90. package/dist/filters.d.mts +4 -0
  91. package/dist/filters.mjs +1 -0
  92. package/dist/idempotency.d.mts +2 -0
  93. package/dist/idempotency.mjs +1 -0
  94. package/dist/index.d.mts +14 -7
  95. package/dist/index.mjs +1 -1
  96. package/dist/json-schema.d.mts +40 -0
  97. package/dist/json-schema.mjs +2 -0
  98. package/dist/json-schema.mjs.map +1 -0
  99. package/dist/k/compile.d.mts +17 -0
  100. package/dist/k/compile.mjs +2 -0
  101. package/dist/k/compile.mjs.map +1 -0
  102. package/dist/k/dates.d.mts +23 -0
  103. package/dist/k/dates.mjs +2 -0
  104. package/dist/k/dates.mjs.map +1 -0
  105. package/dist/k/formats.d.mts +24 -0
  106. package/dist/k/formats.mjs +2 -0
  107. package/dist/k/formats.mjs.map +1 -0
  108. package/dist/k/index.d.mts +32 -0
  109. package/dist/k/index.mjs +2 -0
  110. package/dist/k/index.mjs.map +1 -0
  111. package/dist/k/issues.d.mts +31 -0
  112. package/dist/k/issues.mjs +2 -0
  113. package/dist/k/issues.mjs.map +1 -0
  114. package/dist/k/kinds.d.mts +81 -0
  115. package/dist/k/kinds.mjs +2 -0
  116. package/dist/k/kinds.mjs.map +1 -0
  117. package/dist/k/object.d.mts +43 -0
  118. package/dist/k/object.mjs +2 -0
  119. package/dist/k/object.mjs.map +1 -0
  120. package/dist/k/parse.d.mts +29 -0
  121. package/dist/k/parse.mjs +2 -0
  122. package/dist/k/parse.mjs.map +1 -0
  123. package/dist/k/schema.d.mts +100 -0
  124. package/dist/k/schema.mjs +2 -0
  125. package/dist/k/schema.mjs.map +1 -0
  126. package/dist/k/standard.d.mts +8 -0
  127. package/dist/k/standard.mjs +2 -0
  128. package/dist/k/standard.mjs.map +1 -0
  129. package/dist/k/types.d.mts +64 -0
  130. package/dist/k/types.mjs +1 -0
  131. package/dist/k.d.mts +8 -0
  132. package/dist/k.mjs +1 -0
  133. package/dist/middleware.d.mts +8 -11
  134. package/dist/middleware.mjs +1 -1
  135. package/dist/middleware.mjs.map +1 -1
  136. package/dist/modules/contracts/binding.d.mts +23 -0
  137. package/dist/modules/contracts/binding.mjs +2 -0
  138. package/dist/modules/contracts/binding.mjs.map +1 -0
  139. package/dist/modules/contracts/contract.d.mts +67 -0
  140. package/dist/modules/contracts/contract.mjs +2 -0
  141. package/dist/modules/contracts/contract.mjs.map +1 -0
  142. package/dist/modules/contracts/convex.d.mts +18 -0
  143. package/dist/modules/contracts/convex.mjs +2 -0
  144. package/dist/modules/contracts/convex.mjs.map +1 -0
  145. package/dist/modules/contracts/domain.d.mts +62 -0
  146. package/dist/modules/contracts/domain.mjs +2 -0
  147. package/dist/modules/contracts/domain.mjs.map +1 -0
  148. package/dist/modules/contracts/errors.d.mts +737 -0
  149. package/dist/modules/contracts/errors.mjs +2 -0
  150. package/dist/modules/contracts/errors.mjs.map +1 -0
  151. package/dist/modules/contracts/exposure.d.mts +103 -0
  152. package/dist/modules/contracts/exposure.mjs +2 -0
  153. package/dist/modules/contracts/exposure.mjs.map +1 -0
  154. package/dist/modules/contracts/idempotency.d.mts +85 -0
  155. package/dist/modules/contracts/idempotency.mjs +2 -0
  156. package/dist/modules/contracts/idempotency.mjs.map +1 -0
  157. package/dist/modules/contracts/lazy.d.mts +6 -0
  158. package/dist/modules/contracts/lazy.mjs +2 -0
  159. package/dist/modules/contracts/lazy.mjs.map +1 -0
  160. package/dist/modules/contracts/standard.d.mts +17 -0
  161. package/dist/modules/contracts/standard.mjs +2 -0
  162. package/dist/modules/contracts/standard.mjs.map +1 -0
  163. package/dist/modules/contracts/workflow.d.mts +165 -0
  164. package/dist/modules/contracts/workflow.mjs +2 -0
  165. package/dist/modules/contracts/workflow.mjs.map +1 -0
  166. package/dist/modules/effect/action.d.mts +63 -0
  167. package/dist/modules/effect/action.mjs +2 -0
  168. package/dist/modules/effect/action.mjs.map +1 -0
  169. package/dist/modules/effect/agent-tools.d.mts +2 -0
  170. package/dist/modules/effect/agent-tools.mjs +1 -0
  171. package/dist/modules/effect/api-runtime.d.mts +36 -0
  172. package/dist/modules/effect/api-runtime.mjs +2 -0
  173. package/dist/modules/effect/api-runtime.mjs.map +1 -0
  174. package/dist/modules/effect/api.d.mts +46 -0
  175. package/dist/modules/effect/api.mjs +2 -0
  176. package/dist/modules/effect/api.mjs.map +1 -0
  177. package/dist/modules/effect/auth.d.mts +46 -0
  178. package/dist/modules/effect/auth.mjs +2 -0
  179. package/dist/modules/effect/auth.mjs.map +1 -0
  180. package/dist/modules/effect/client.d.mts +15 -0
  181. package/dist/modules/effect/client.mjs +1 -0
  182. package/dist/modules/effect/command.d.mts +108 -0
  183. package/dist/modules/effect/command.mjs +2 -0
  184. package/dist/modules/effect/command.mjs.map +1 -0
  185. package/dist/modules/effect/crud.d.mts +885 -0
  186. package/dist/modules/effect/crud.mjs +2 -0
  187. package/dist/modules/effect/crud.mjs.map +1 -0
  188. package/dist/modules/effect/domain.d.mts +82 -0
  189. package/dist/modules/effect/domain.mjs +2 -0
  190. package/dist/modules/effect/domain.mjs.map +1 -0
  191. package/dist/modules/effect/errors.d.mts +13 -0
  192. package/dist/modules/effect/errors.mjs +2 -0
  193. package/dist/modules/effect/errors.mjs.map +1 -0
  194. package/dist/modules/effect/failure-audit.d.mts +48 -0
  195. package/dist/modules/effect/failure-audit.mjs +2 -0
  196. package/dist/modules/effect/failure-audit.mjs.map +1 -0
  197. package/dist/modules/effect/failures.d.mts +21 -0
  198. package/dist/modules/effect/failures.mjs +2 -0
  199. package/dist/modules/effect/failures.mjs.map +1 -0
  200. package/dist/modules/effect/foundation.d.mts +23 -0
  201. package/dist/modules/effect/foundation.mjs +2 -0
  202. package/dist/modules/effect/foundation.mjs.map +1 -0
  203. package/dist/modules/effect/idempotency.d.mts +29 -0
  204. package/dist/modules/effect/idempotency.mjs +2 -0
  205. package/dist/modules/effect/idempotency.mjs.map +1 -0
  206. package/dist/modules/effect/input.d.mts +10 -0
  207. package/dist/modules/effect/input.mjs +2 -0
  208. package/dist/modules/effect/input.mjs.map +1 -0
  209. package/dist/modules/effect/normalize.d.mts +7 -0
  210. package/dist/modules/effect/normalize.mjs +2 -0
  211. package/dist/modules/effect/normalize.mjs.map +1 -0
  212. package/dist/modules/effect/operation.d.mts +148 -0
  213. package/dist/modules/effect/operation.mjs +2 -0
  214. package/dist/modules/effect/operation.mjs.map +1 -0
  215. package/dist/modules/effect/query.d.mts +90 -0
  216. package/dist/modules/effect/query.mjs +2 -0
  217. package/dist/modules/effect/query.mjs.map +1 -0
  218. package/dist/modules/effect/schema.d.mts +30 -0
  219. package/dist/modules/effect/schema.mjs +2 -0
  220. package/dist/modules/effect/schema.mjs.map +1 -0
  221. package/dist/modules/effect/scope.d.mts +25 -0
  222. package/dist/modules/effect/scope.mjs +2 -0
  223. package/dist/modules/effect/scope.mjs.map +1 -0
  224. package/dist/modules/effect/workflow.d.mts +75 -0
  225. package/dist/modules/effect/workflow.mjs +2 -0
  226. package/dist/modules/effect/workflow.mjs.map +1 -0
  227. package/dist/modules/foundation/foundation.d.mts +108 -0
  228. package/dist/modules/foundation/foundation.mjs +2 -0
  229. package/dist/modules/foundation/foundation.mjs.map +1 -0
  230. package/dist/modules/foundation/operation.d.mts +139 -0
  231. package/dist/modules/foundation/operation.mjs +2 -0
  232. package/dist/modules/foundation/operation.mjs.map +1 -0
  233. package/dist/namespace.d.mts +104 -0
  234. package/dist/namespace.mjs +2 -0
  235. package/dist/namespace.mjs.map +1 -0
  236. package/dist/oxlint/architecture.d.mts +23 -0
  237. package/dist/oxlint/architecture.mjs +2 -0
  238. package/dist/oxlint/architecture.mjs.map +1 -0
  239. package/dist/oxlint/ast.d.mts +51 -0
  240. package/dist/oxlint/ast.mjs +2 -0
  241. package/dist/oxlint/ast.mjs.map +1 -0
  242. package/dist/oxlint/components.d.mts +4 -0
  243. package/dist/oxlint/components.mjs +2 -0
  244. package/dist/oxlint/components.mjs.map +1 -0
  245. package/dist/oxlint/ownership.d.mts +59 -0
  246. package/dist/oxlint/ownership.mjs +2 -0
  247. package/dist/oxlint/ownership.mjs.map +1 -0
  248. package/dist/oxlint/reserved-files.d.mts +4 -0
  249. package/dist/oxlint/reserved-files.mjs +2 -0
  250. package/dist/oxlint/reserved-files.mjs.map +1 -0
  251. package/dist/oxlint.d.mts +9 -0
  252. package/dist/oxlint.mjs +2 -0
  253. package/dist/oxlint.mjs.map +1 -0
  254. package/dist/querying/cursors.d.mts +94 -0
  255. package/dist/querying/cursors.mjs +2 -0
  256. package/dist/querying/cursors.mjs.map +1 -0
  257. package/dist/querying/execution.d.mts +40 -0
  258. package/dist/querying/execution.mjs +2 -0
  259. package/dist/querying/execution.mjs.map +1 -0
  260. package/dist/querying/failures.d.mts +11 -0
  261. package/dist/querying/failures.mjs +2 -0
  262. package/dist/querying/failures.mjs.map +1 -0
  263. package/dist/querying/filter-boundary.d.mts +25 -0
  264. package/dist/querying/filter-boundary.mjs +2 -0
  265. package/dist/querying/filter-boundary.mjs.map +1 -0
  266. package/dist/querying/filters.d.mts +180 -0
  267. package/dist/querying/filters.mjs +2 -0
  268. package/dist/querying/filters.mjs.map +1 -0
  269. package/dist/querying/planner.d.mts +61 -0
  270. package/dist/querying/planner.mjs +2 -0
  271. package/dist/querying/planner.mjs.map +1 -0
  272. package/dist/querying/relationships.d.mts +58 -0
  273. package/dist/querying/relationships.mjs +2 -0
  274. package/dist/querying/relationships.mjs.map +1 -0
  275. package/dist/querying/search.d.mts +69 -0
  276. package/dist/querying/search.mjs +2 -0
  277. package/dist/querying/search.mjs.map +1 -0
  278. package/dist/querying/security.d.mts +123 -0
  279. package/dist/querying/security.mjs +2 -0
  280. package/dist/querying/security.mjs.map +1 -0
  281. package/dist/querying/shared/ast.d.mts +26 -0
  282. package/dist/querying/shared/ast.mjs +2 -0
  283. package/dist/querying/shared/ast.mjs.map +1 -0
  284. package/dist/querying/shared/contract.d.mts +98 -0
  285. package/dist/querying/shared/contract.mjs +2 -0
  286. package/dist/querying/shared/contract.mjs.map +1 -0
  287. package/dist/querying/shared/evaluate.d.mts +5 -0
  288. package/dist/querying/shared/evaluate.mjs +2 -0
  289. package/dist/querying/shared/evaluate.mjs.map +1 -0
  290. package/dist/querying/shared/filters.d.mts +65 -0
  291. package/dist/querying/shared/filters.mjs +2 -0
  292. package/dist/querying/shared/filters.mjs.map +1 -0
  293. package/dist/querying/shared/native-json.d.mts +7 -0
  294. package/dist/querying/shared/native-json.mjs +2 -0
  295. package/dist/querying/shared/native-json.mjs.map +1 -0
  296. package/dist/querying/shared/page.d.mts +20 -0
  297. package/dist/querying/shared/page.mjs +2 -0
  298. package/dist/querying/shared/page.mjs.map +1 -0
  299. package/dist/querying.d.mts +82 -0
  300. package/dist/querying.mjs +2 -0
  301. package/dist/querying.mjs.map +1 -0
  302. package/dist/react/failures.d.mts +24 -0
  303. package/dist/react/failures.mjs +2 -0
  304. package/dist/react/failures.mjs.map +1 -0
  305. package/dist/react/optimistic.d.mts +46 -0
  306. package/dist/react/optimistic.mjs +2 -0
  307. package/dist/react/optimistic.mjs.map +1 -0
  308. package/dist/react/pagination-state.d.mts +39 -0
  309. package/dist/react/pagination-state.mjs +2 -0
  310. package/dist/react/pagination-state.mjs.map +1 -0
  311. package/dist/react/use-command.d.mts +22 -0
  312. package/dist/react/use-command.mjs +2 -0
  313. package/dist/react/use-command.mjs.map +1 -0
  314. package/dist/react/use-paginated-list.d.mts +34 -0
  315. package/dist/react/use-paginated-list.mjs +2 -0
  316. package/dist/react/use-paginated-list.mjs.map +1 -0
  317. package/dist/react.d.mts +6 -0
  318. package/dist/react.mjs +1 -0
  319. package/dist/registration.d.mts +65 -0
  320. package/dist/registration.mjs +2 -0
  321. package/dist/registration.mjs.map +1 -0
  322. package/dist/relations-public.d.mts +2 -0
  323. package/dist/relations-public.mjs +1 -0
  324. package/dist/relations.d.mts +274 -0
  325. package/dist/relations.mjs +2 -0
  326. package/dist/relations.mjs.map +1 -0
  327. package/dist/state-machine.d.mts +1 -4
  328. package/dist/state-machine.mjs.map +1 -1
  329. package/dist/table.d.mts +222 -0
  330. package/dist/table.mjs +2 -0
  331. package/dist/table.mjs.map +1 -0
  332. package/dist/tenancy.d.mts +6 -8
  333. package/dist/tenancy.mjs +1 -1
  334. package/dist/tenancy.mjs.map +1 -1
  335. package/dist/triggers.d.mts +12 -10
  336. package/dist/triggers.mjs +1 -1
  337. package/dist/triggers.mjs.map +1 -1
  338. package/dist/webhooks.d.mts +22 -112
  339. package/dist/webhooks.mjs +1 -1
  340. package/dist/webhooks.mjs.map +1 -1
  341. package/dist/workflow.d.mts +2 -0
  342. package/dist/workflow.mjs +1 -0
  343. package/dist/zod.d.mts +30 -0
  344. package/dist/zod.mjs +2 -0
  345. package/dist/zod.mjs.map +1 -0
  346. package/package.json +145 -33
  347. package/src/test.ts +9 -17
  348. package/CHANGELOG.md +0 -145
  349. package/ROADMAP.md +0 -126
  350. package/dist/zod-table.d.mts +0 -175
  351. package/dist/zod-table.mjs +0 -2
  352. package/dist/zod-table.mjs.map +0 -1
  353. package/docs/agent-tools.md +0 -41
  354. package/docs/approvals.md +0 -200
  355. package/docs/architecture.md +0 -124
  356. package/docs/auth.md +0 -218
  357. package/docs/commands.md +0 -278
  358. package/docs/conventions.md +0 -291
  359. package/docs/crud.md +0 -62
  360. package/docs/llms.md +0 -220
  361. package/docs/maintainability.md +0 -124
  362. package/docs/migration.md +0 -351
  363. package/docs/plans/2026-08-14-001-feat-v0.1.0-feature-set-plan.md +0 -461
  364. package/docs/plans/2026-08-21-0930-feat-resolve-organization-hook-plan.md +0 -178
  365. package/docs/tenancy.md +0 -179
  366. package/docs/triggers.md +0 -75
  367. package/docs/upgrading.md +0 -175
  368. package/docs/webhooks.md +0 -58
  369. package/docs/zod-table.md +0 -173
  370. package/scripts/convex-config-bridge.mjs +0 -55
  371. package/scripts/extract-changelog.mjs +0 -29
  372. package/scripts/smoke-packed-components.mjs +0 -374
@@ -1,419 +1,347 @@
1
- import { z } from "zod";
1
+ import "../../k.mjs";
2
+ import { KOptional } from "../../k/schema.mjs";
3
+ import { KAny, KArray, KBoolean, KDiscriminatedUnion, KEnum, KId, KLiteral, KNumber, KRecord, KString, KUnion } from "../../k/kinds.mjs";
4
+ import { KObject } from "../../k/object.mjs";
5
+ import { k } from "../../k/index.mjs";
6
+ import { KNativeFields } from "../../k/types.mjs";
2
7
  declare namespace validators_d_exports {
3
- export { ApprovalActor, ApprovalCallbackInput, ApprovalMetadata, ApprovalWorkflowDescriptor, approvalActionCallback, approvalActor, approvalBranchStep, approvalCallback, approvalCallbackArgs, approvalCallbackInput, approvalCallbackKind, approvalCallbackStep, approvalDecision, approvalDecisionDocument, approvalDecisionStep, approvalMetadata, approvalMutationCallback, approvalName, approvalNotifyStep, approvalQuorum, approvalQuorumKind, approvalReason, approvalReference, approvalRunDocument, approvalRunState, approvalStepKind, approvalWorkflowDescriptor, approvalWorkflowStep };
8
+ export { ApprovalActor, ApprovalCallbackInput, ApprovalMetadata, ApprovalWorkflowDescriptor, approvalActionCallback, approvalActor, approvalAuditEventProjection, approvalBranchStep, approvalCallback, approvalCallbackArgs, approvalCallbackInput, approvalCallbackKind, approvalCallbackStep, approvalDecision, approvalDecisionDocument, approvalDecisionStep, approvalMetadata, approvalMutationCallback, approvalName, approvalNotifyStep, approvalOptionalString, approvalQuorum, approvalQuorumKind, approvalReason, approvalReference, approvalRunDocument, approvalRunState, approvalStepKind, approvalWorkflowDescriptor, approvalWorkflowStep };
4
9
  }
5
- declare const approvalRunState: z.ZodEnum<{
6
- approved: "approved";
7
- canceled: "canceled";
8
- expired: "expired";
9
- pending: "pending";
10
- rejected: "rejected";
11
- }>;
12
- declare const approvalDecision: z.ZodEnum<{
13
- approved: "approved";
14
- rejected: "rejected";
15
- }>;
16
- declare const approvalStepKind: z.ZodEnum<{
17
- action: "action";
18
- branch: "branch";
19
- decision: "decision";
20
- mutation: "mutation";
21
- notify: "notify";
22
- }>;
23
- declare const approvalCallbackKind: z.ZodEnum<{
24
- action: "action";
25
- mutation: "mutation";
26
- }>;
27
- declare const approvalQuorumKind: z.ZodEnum<{
28
- count: "count";
10
+ export declare const approvalRunState: KEnum<readonly ["pending", "approved", "rejected", "expired", "canceled"]>;
11
+ export declare const approvalDecision: KEnum<readonly ["approved", "rejected"]>;
12
+ export declare const approvalStepKind: KEnum<readonly ["mutation", "action", "notify", "decision", "branch"]>;
13
+ export declare const approvalCallbackKind: KEnum<readonly ["mutation", "action"]>;
14
+ export declare const approvalQuorumKind: KEnum<readonly ["count"]>;
15
+ export declare const approvalReference: KString;
16
+ export declare const approvalName: KString;
17
+ export declare const approvalReason: KString;
18
+ export declare const approvalMetadata: KRecord<KString, KString>;
19
+ export declare const approvalCallbackInput: KObject<{
20
+ runId: KString;
21
+ scopeRef: KString;
22
+ resourceType: KString;
23
+ resourceRef: KString;
24
+ metadata: KOptional<KRecord<KString, KString>>;
25
+ decision: KOptional<KObject<{
26
+ stepKey: KString;
27
+ outcome: KUnion<readonly [KEnum<readonly ["approved", "rejected"]>, KLiteral<"expired">]>;
28
+ evidence: KArray<KObject<{
29
+ stepKey: KString;
30
+ actorRef: KString;
31
+ decision: KEnum<readonly ["approved", "rejected"]>;
32
+ reason: KOptional<KString>;
33
+ decidedAt: KNumber;
34
+ }>>;
35
+ terminalEvidence: KOptional<KObject<Omit<{
36
+ stepKey: KString;
37
+ actorRef: KString;
38
+ decision: KEnum<readonly ["approved", "rejected"]>;
39
+ reason: KOptional<KString>;
40
+ decidedAt: KNumber;
41
+ }, "stepKey">>>;
42
+ }>>;
29
43
  }>;
30
- declare const approvalReference: z.ZodString;
31
- declare const approvalName: z.ZodString;
32
- declare const approvalReason: z.ZodString;
33
- declare const approvalMetadata: z.ZodRecord<z.ZodString, z.ZodString>;
34
- declare const approvalCallbackInput: z.ZodObject<{
35
- runId: z.ZodString;
36
- scopeRef: z.ZodString;
37
- resourceType: z.ZodString;
38
- resourceRef: z.ZodString;
39
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
40
- decision: z.ZodOptional<z.ZodObject<{
41
- stepKey: z.ZodString;
42
- outcome: z.ZodUnion<readonly [z.ZodEnum<{
43
- approved: "approved";
44
- rejected: "rejected";
45
- }>, z.ZodLiteral<"expired">]>;
46
- evidence: z.ZodArray<z.ZodObject<{
47
- stepKey: z.ZodString;
48
- actorRef: z.ZodString;
49
- decision: z.ZodEnum<{
50
- approved: "approved";
51
- rejected: "rejected";
52
- }>;
53
- reason: z.ZodOptional<z.ZodString>;
54
- decidedAt: z.ZodNumber;
55
- }, z.core.$strict>>;
56
- terminalEvidence: z.ZodOptional<z.ZodObject<{
57
- actorRef: z.ZodString;
58
- decision: z.ZodEnum<{
59
- approved: "approved";
60
- rejected: "rejected";
61
- }>;
62
- reason: z.ZodOptional<z.ZodString>;
63
- decidedAt: z.ZodNumber;
64
- }, z.core.$strict>>;
65
- }, z.core.$strict>>;
66
- }, z.core.$strict>;
67
44
  /** Convex argument validator for approval mutation, action, and notify callbacks. */
68
- declare const approvalCallbackArgs: import("convex/values").VObject<{
69
- runId: string;
70
- scopeRef: string;
71
- resourceType: string;
72
- resourceRef: string;
73
- metadata?: {
74
- [x: string]: string;
75
- } | undefined;
45
+ export declare const approvalCallbackArgs: import("convex/values").VObject<{
76
46
  decision?: {
77
- stepKey: string;
78
- outcome: "approved" | "expired" | "rejected";
79
47
  evidence: {
80
- stepKey: string;
81
48
  actorRef: string;
82
- decision: "approved" | "rejected";
83
- reason?: string | undefined;
84
49
  decidedAt: number;
85
- }[];
86
- terminalEvidence?: {
87
- actorRef: string;
88
50
  decision: "approved" | "rejected";
89
51
  reason?: string | undefined;
90
- decidedAt: number;
91
- } | undefined;
92
- } | undefined;
93
- }, {
94
- runId: import("convex/values").VString<string, "required">;
95
- scopeRef: import("convex/values").VString<string, "required">;
96
- resourceType: import("convex/values").VString<string, "required">;
97
- resourceRef: import("convex/values").VString<string, "required">;
98
- metadata: import("convex/values").VRecord<Record<string, string> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "optional", string>;
99
- decision: import("convex/values").VObject<{
100
- stepKey: string;
101
- outcome: "approved" | "expired" | "rejected";
102
- evidence: {
103
52
  stepKey: string;
104
- actorRef: string;
105
- decision: "approved" | "rejected";
106
- reason?: string | undefined;
107
- decidedAt: number;
108
53
  }[];
54
+ outcome: "approved" | "expired" | "rejected";
55
+ stepKey: string;
109
56
  terminalEvidence?: {
110
57
  actorRef: string;
111
- decision: "approved" | "rejected";
112
- reason?: string | undefined;
113
- decidedAt: number;
114
- } | undefined;
115
- } | undefined, {
116
- stepKey: import("convex/values").VString<string, "required">;
117
- outcome: import("convex/values").VUnion<"approved" | "expired" | "rejected", [import("convex/values").VUnion<"approved" | "rejected", (import("convex/values").VLiteral<"approved", "required"> | import("convex/values").VLiteral<"rejected", "required">)[], "required", never>, import("convex/values").VLiteral<"expired", "required">], "required", never>;
118
- evidence: import("convex/values").VArray<{
119
- stepKey: string;
120
- actorRef: string;
121
- decision: "approved" | "rejected";
122
- reason?: string | undefined;
123
- decidedAt: number;
124
- }[], import("convex/values").VObject<{
125
- stepKey: string;
126
- actorRef: string;
127
- decision: "approved" | "rejected";
128
- reason?: string | undefined;
129
58
  decidedAt: number;
130
- }, {
131
- stepKey: import("convex/values").VString<string, "required">;
132
- actorRef: import("convex/values").VString<string, "required">;
133
- decision: import("convex/values").VUnion<"approved" | "rejected", (import("convex/values").VLiteral<"approved", "required"> | import("convex/values").VLiteral<"rejected", "required">)[], "required", never>;
134
- reason: import("convex/values").VString<string | undefined, "optional">;
135
- decidedAt: import("convex/values").VFloat64<number, "required">;
136
- }, "required", "actorRef" | "decidedAt" | "decision" | "reason" | "stepKey">, "required">;
137
- terminalEvidence: import("convex/values").VObject<{
138
- actorRef: string;
139
59
  decision: "approved" | "rejected";
140
60
  reason?: string | undefined;
141
- decidedAt: number;
142
- } | undefined, {
143
- actorRef: import("convex/values").VString<string, "required">;
144
- decision: import("convex/values").VUnion<"approved" | "rejected", (import("convex/values").VLiteral<"approved", "required"> | import("convex/values").VLiteral<"rejected", "required">)[], "required", never>;
145
- reason: import("convex/values").VString<string | undefined, "optional">;
146
- decidedAt: import("convex/values").VFloat64<number, "required">;
147
- }, "optional", "actorRef" | "decidedAt" | "decision" | "reason">;
148
- }, "optional", "evidence" | "outcome" | "stepKey" | "terminalEvidence" | "terminalEvidence.actorRef" | "terminalEvidence.decidedAt" | "terminalEvidence.decision" | "terminalEvidence.reason">;
149
- }, "required", "decision" | "decision.evidence" | "decision.outcome" | "decision.stepKey" | "decision.terminalEvidence" | "decision.terminalEvidence.actorRef" | "decision.terminalEvidence.decidedAt" | "decision.terminalEvidence.decision" | "decision.terminalEvidence.reason" | "metadata" | "resourceRef" | "resourceType" | "runId" | "scopeRef" | `metadata.${string}`>;
150
- declare const approvalActor: z.ZodObject<{
151
- actorRef: z.ZodString;
152
- capabilities: z.ZodArray<z.ZodString>;
153
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
154
- }, z.core.$strict>;
155
- declare const approvalMutationCallback: z.ZodObject<{
156
- kind: z.ZodLiteral<"mutation">;
157
- handle: z.ZodString;
158
- retry: z.ZodBoolean;
159
- }, z.core.$strict>;
160
- declare const approvalActionCallback: z.ZodObject<{
161
- kind: z.ZodLiteral<"action">;
162
- handle: z.ZodString;
163
- retry: z.ZodBoolean;
164
- }, z.core.$strict>;
165
- declare const approvalCallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
166
- kind: z.ZodLiteral<"mutation">;
167
- handle: z.ZodString;
168
- retry: z.ZodBoolean;
169
- }, z.core.$strict>, z.ZodObject<{
170
- kind: z.ZodLiteral<"action">;
171
- handle: z.ZodString;
172
- retry: z.ZodBoolean;
173
- }, z.core.$strict>], "kind">;
174
- declare const approvalQuorum: z.ZodObject<{
175
- kind: z.ZodEnum<{
176
- count: "count";
177
- }>;
178
- approvals: z.ZodNumber;
179
- }, z.core.$strict>;
180
- declare const approvalCallbackStep: z.ZodDiscriminatedUnion<[z.ZodObject<{
181
- kind: z.ZodLiteral<"mutation">;
182
- key: z.ZodString;
183
- callback: z.ZodObject<{
184
- kind: z.ZodLiteral<"mutation">;
185
- handle: z.ZodString;
186
- retry: z.ZodBoolean;
187
- }, z.core.$strict>;
188
- }, z.core.$strict>, z.ZodObject<{
189
- kind: z.ZodLiteral<"action">;
190
- key: z.ZodString;
191
- callback: z.ZodObject<{
192
- kind: z.ZodLiteral<"action">;
193
- handle: z.ZodString;
194
- retry: z.ZodBoolean;
195
- }, z.core.$strict>;
196
- }, z.core.$strict>], "kind">;
197
- declare const approvalNotifyStep: z.ZodObject<{
198
- kind: z.ZodLiteral<"notify">;
199
- key: z.ZodString;
200
- callback: z.ZodObject<{
201
- kind: z.ZodLiteral<"action">;
202
- handle: z.ZodString;
203
- retry: z.ZodBoolean;
204
- }, z.core.$strict>;
205
- }, z.core.$strict>;
206
- declare const approvalDecisionStep: z.ZodObject<{
207
- kind: z.ZodLiteral<"decision">;
208
- key: z.ZodString;
209
- decisions: z.ZodArray<z.ZodEnum<{
210
- approved: "approved";
211
- rejected: "rejected";
61
+ } | undefined;
62
+ } | undefined;
63
+ metadata?: Record<string, string> | undefined;
64
+ resourceRef: string;
65
+ resourceType: string;
66
+ runId: string;
67
+ scopeRef: string;
68
+ }, KNativeFields<{
69
+ runId: KString;
70
+ scopeRef: KString;
71
+ resourceType: KString;
72
+ resourceRef: KString;
73
+ metadata: KOptional<KRecord<KString, KString>>;
74
+ decision: KOptional<KObject<{
75
+ stepKey: KString;
76
+ outcome: KUnion<readonly [KEnum<readonly ["approved", "rejected"]>, KLiteral<"expired">]>;
77
+ evidence: KArray<KObject<{
78
+ stepKey: KString;
79
+ actorRef: KString;
80
+ decision: KEnum<readonly ["approved", "rejected"]>;
81
+ reason: KOptional<KString>;
82
+ decidedAt: KNumber;
83
+ }>>;
84
+ terminalEvidence: KOptional<KObject<Omit<{
85
+ stepKey: KString;
86
+ actorRef: KString;
87
+ decision: KEnum<readonly ["approved", "rejected"]>;
88
+ reason: KOptional<KString>;
89
+ decidedAt: KNumber;
90
+ }, "stepKey">>>;
212
91
  }>>;
213
- quorum: z.ZodObject<{
214
- kind: z.ZodEnum<{
215
- count: "count";
92
+ }>, "required", "decision" | "decision.evidence" | "decision.outcome" | "decision.stepKey" | "decision.terminalEvidence" | "decision.terminalEvidence.actorRef" | "decision.terminalEvidence.decidedAt" | "decision.terminalEvidence.decision" | "decision.terminalEvidence.reason" | "metadata" | "resourceRef" | "resourceType" | "runId" | "scopeRef" | `metadata.${string}`>;
93
+ export declare const approvalActor: KObject<{
94
+ actorRef: KString;
95
+ capabilities: KArray<KString>;
96
+ metadata: KOptional<KRecord<KString, KString>>;
97
+ }>;
98
+ export declare const approvalMutationCallback: KObject<{
99
+ kind: KLiteral<"mutation">;
100
+ handle: KString;
101
+ retry: KBoolean;
102
+ }>;
103
+ export declare const approvalActionCallback: KObject<{
104
+ kind: KLiteral<"action">;
105
+ handle: KString;
106
+ retry: KBoolean;
107
+ }>;
108
+ export declare const approvalCallback: KDiscriminatedUnion<"kind", readonly [KObject<{
109
+ kind: KLiteral<"mutation">;
110
+ handle: KString;
111
+ retry: KBoolean;
112
+ }>, KObject<{
113
+ kind: KLiteral<"action">;
114
+ handle: KString;
115
+ retry: KBoolean;
116
+ }>]>;
117
+ export declare const approvalQuorum: KObject<{
118
+ kind: KEnum<readonly ["count"]>;
119
+ approvals: KNumber;
120
+ }>;
121
+ export declare const approvalCallbackStep: KDiscriminatedUnion<"kind", readonly [KObject<{
122
+ kind: KLiteral<"mutation">;
123
+ key: KString;
124
+ callback: KObject<{
125
+ kind: KLiteral<"mutation">;
126
+ handle: KString;
127
+ retry: KBoolean;
128
+ }>;
129
+ }>, KObject<{
130
+ kind: KLiteral<"action">;
131
+ key: KString;
132
+ callback: KObject<{
133
+ kind: KLiteral<"action">;
134
+ handle: KString;
135
+ retry: KBoolean;
136
+ }>;
137
+ }>]>;
138
+ export declare const approvalNotifyStep: KObject<{
139
+ kind: KLiteral<"notify">;
140
+ key: KString;
141
+ callback: KObject<{
142
+ kind: KLiteral<"action">;
143
+ handle: KString;
144
+ retry: KBoolean;
145
+ }>;
146
+ }>;
147
+ export declare const approvalDecisionStep: KObject<{
148
+ kind: KLiteral<"decision">;
149
+ key: KString;
150
+ decisions: KArray<KEnum<readonly ["approved", "rejected"]>>;
151
+ quorum: KObject<{
152
+ kind: KEnum<readonly ["count"]>;
153
+ approvals: KNumber;
154
+ }>;
155
+ makerChecker: KBoolean;
156
+ expiresAfterMs: KOptional<KNumber>;
157
+ }>;
158
+ export declare const approvalBranchStep: KObject<{
159
+ kind: KLiteral<"branch">;
160
+ key: KString;
161
+ approvedStepKey: KString;
162
+ rejectedStepKey: KString;
163
+ }>;
164
+ /**
165
+ * A plain union, not a discriminated one: its first member is itself a union over `kind`, which a
166
+ * discriminated union cannot dispatch to. Natively both are the same `v.union`.
167
+ */
168
+ export declare const approvalWorkflowStep: KUnion<readonly [KDiscriminatedUnion<"kind", readonly [KObject<{
169
+ kind: KLiteral<"mutation">;
170
+ key: KString;
171
+ callback: KObject<{
172
+ kind: KLiteral<"mutation">;
173
+ handle: KString;
174
+ retry: KBoolean;
175
+ }>;
176
+ }>, KObject<{
177
+ kind: KLiteral<"action">;
178
+ key: KString;
179
+ callback: KObject<{
180
+ kind: KLiteral<"action">;
181
+ handle: KString;
182
+ retry: KBoolean;
183
+ }>;
184
+ }>]>, KObject<{
185
+ kind: KLiteral<"notify">;
186
+ key: KString;
187
+ callback: KObject<{
188
+ kind: KLiteral<"action">;
189
+ handle: KString;
190
+ retry: KBoolean;
191
+ }>;
192
+ }>, KObject<{
193
+ kind: KLiteral<"decision">;
194
+ key: KString;
195
+ decisions: KArray<KEnum<readonly ["approved", "rejected"]>>;
196
+ quorum: KObject<{
197
+ kind: KEnum<readonly ["count"]>;
198
+ approvals: KNumber;
199
+ }>;
200
+ makerChecker: KBoolean;
201
+ expiresAfterMs: KOptional<KNumber>;
202
+ }>, KObject<{
203
+ kind: KLiteral<"branch">;
204
+ key: KString;
205
+ approvedStepKey: KString;
206
+ rejectedStepKey: KString;
207
+ }>]>;
208
+ export declare const approvalWorkflowDescriptor: KObject<{
209
+ schemaVersion: KLiteral<1>;
210
+ compatibilityKey: KString;
211
+ name: KString;
212
+ steps: KArray<KUnion<readonly [KDiscriminatedUnion<"kind", readonly [KObject<{
213
+ kind: KLiteral<"mutation">;
214
+ key: KString;
215
+ callback: KObject<{
216
+ kind: KLiteral<"mutation">;
217
+ handle: KString;
218
+ retry: KBoolean;
216
219
  }>;
217
- approvals: z.ZodNumber;
218
- }, z.core.$strict>;
219
- makerChecker: z.ZodBoolean;
220
- expiresAfterMs: z.ZodOptional<z.ZodNumber>;
221
- }, z.core.$strict>;
222
- declare const approvalBranchStep: z.ZodObject<{
223
- kind: z.ZodLiteral<"branch">;
224
- key: z.ZodString;
225
- approvedStepKey: z.ZodString;
226
- rejectedStepKey: z.ZodString;
227
- }, z.core.$strict>;
228
- declare const approvalWorkflowStep: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
229
- kind: z.ZodLiteral<"mutation">;
230
- key: z.ZodString;
231
- callback: z.ZodObject<{
232
- kind: z.ZodLiteral<"mutation">;
233
- handle: z.ZodString;
234
- retry: z.ZodBoolean;
235
- }, z.core.$strict>;
236
- }, z.core.$strict>, z.ZodObject<{
237
- kind: z.ZodLiteral<"action">;
238
- key: z.ZodString;
239
- callback: z.ZodObject<{
240
- kind: z.ZodLiteral<"action">;
241
- handle: z.ZodString;
242
- retry: z.ZodBoolean;
243
- }, z.core.$strict>;
244
- }, z.core.$strict>], "kind">, z.ZodObject<{
245
- kind: z.ZodLiteral<"notify">;
246
- key: z.ZodString;
247
- callback: z.ZodObject<{
248
- kind: z.ZodLiteral<"action">;
249
- handle: z.ZodString;
250
- retry: z.ZodBoolean;
251
- }, z.core.$strict>;
252
- }, z.core.$strict>, z.ZodObject<{
253
- kind: z.ZodLiteral<"decision">;
254
- key: z.ZodString;
255
- decisions: z.ZodArray<z.ZodEnum<{
256
- approved: "approved";
257
- rejected: "rejected";
258
- }>>;
259
- quorum: z.ZodObject<{
260
- kind: z.ZodEnum<{
261
- count: "count";
220
+ }>, KObject<{
221
+ kind: KLiteral<"action">;
222
+ key: KString;
223
+ callback: KObject<{
224
+ kind: KLiteral<"action">;
225
+ handle: KString;
226
+ retry: KBoolean;
262
227
  }>;
263
- approvals: z.ZodNumber;
264
- }, z.core.$strict>;
265
- makerChecker: z.ZodBoolean;
266
- expiresAfterMs: z.ZodOptional<z.ZodNumber>;
267
- }, z.core.$strict>, z.ZodObject<{
268
- kind: z.ZodLiteral<"branch">;
269
- key: z.ZodString;
270
- approvedStepKey: z.ZodString;
271
- rejectedStepKey: z.ZodString;
272
- }, z.core.$strict>], "kind">;
273
- declare const approvalWorkflowDescriptor: z.ZodObject<{
274
- schemaVersion: z.ZodLiteral<1>;
275
- compatibilityKey: z.ZodString;
276
- name: z.ZodString;
277
- steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
278
- kind: z.ZodLiteral<"mutation">;
279
- key: z.ZodString;
280
- callback: z.ZodObject<{
281
- kind: z.ZodLiteral<"mutation">;
282
- handle: z.ZodString;
283
- retry: z.ZodBoolean;
284
- }, z.core.$strict>;
285
- }, z.core.$strict>, z.ZodObject<{
286
- kind: z.ZodLiteral<"action">;
287
- key: z.ZodString;
288
- callback: z.ZodObject<{
289
- kind: z.ZodLiteral<"action">;
290
- handle: z.ZodString;
291
- retry: z.ZodBoolean;
292
- }, z.core.$strict>;
293
- }, z.core.$strict>], "kind">, z.ZodObject<{
294
- kind: z.ZodLiteral<"notify">;
295
- key: z.ZodString;
296
- callback: z.ZodObject<{
297
- kind: z.ZodLiteral<"action">;
298
- handle: z.ZodString;
299
- retry: z.ZodBoolean;
300
- }, z.core.$strict>;
301
- }, z.core.$strict>, z.ZodObject<{
302
- kind: z.ZodLiteral<"decision">;
303
- key: z.ZodString;
304
- decisions: z.ZodArray<z.ZodEnum<{
305
- approved: "approved";
306
- rejected: "rejected";
307
- }>>;
308
- quorum: z.ZodObject<{
309
- kind: z.ZodEnum<{
310
- count: "count";
228
+ }>]>, KObject<{
229
+ kind: KLiteral<"notify">;
230
+ key: KString;
231
+ callback: KObject<{
232
+ kind: KLiteral<"action">;
233
+ handle: KString;
234
+ retry: KBoolean;
235
+ }>;
236
+ }>, KObject<{
237
+ kind: KLiteral<"decision">;
238
+ key: KString;
239
+ decisions: KArray<KEnum<readonly ["approved", "rejected"]>>;
240
+ quorum: KObject<{
241
+ kind: KEnum<readonly ["count"]>;
242
+ approvals: KNumber;
243
+ }>;
244
+ makerChecker: KBoolean;
245
+ expiresAfterMs: KOptional<KNumber>;
246
+ }>, KObject<{
247
+ kind: KLiteral<"branch">;
248
+ key: KString;
249
+ approvedStepKey: KString;
250
+ rejectedStepKey: KString;
251
+ }>]>>;
252
+ }>;
253
+ export declare const approvalRunDocument: KObject<{
254
+ scopeRef: KString;
255
+ resourceType: KString;
256
+ resourceRef: KString;
257
+ requester: KObject<{
258
+ actorRef: KString;
259
+ capabilities: KArray<KString>;
260
+ metadata: KOptional<KRecord<KString, KString>>;
261
+ }>;
262
+ metadata: KOptional<KRecord<KString, KString>>;
263
+ workflow: KObject<{
264
+ schemaVersion: KLiteral<1>;
265
+ compatibilityKey: KString;
266
+ name: KString;
267
+ steps: KArray<KUnion<readonly [KDiscriminatedUnion<"kind", readonly [KObject<{
268
+ kind: KLiteral<"mutation">;
269
+ key: KString;
270
+ callback: KObject<{
271
+ kind: KLiteral<"mutation">;
272
+ handle: KString;
273
+ retry: KBoolean;
274
+ }>;
275
+ }>, KObject<{
276
+ kind: KLiteral<"action">;
277
+ key: KString;
278
+ callback: KObject<{
279
+ kind: KLiteral<"action">;
280
+ handle: KString;
281
+ retry: KBoolean;
282
+ }>;
283
+ }>]>, KObject<{
284
+ kind: KLiteral<"notify">;
285
+ key: KString;
286
+ callback: KObject<{
287
+ kind: KLiteral<"action">;
288
+ handle: KString;
289
+ retry: KBoolean;
311
290
  }>;
312
- approvals: z.ZodNumber;
313
- }, z.core.$strict>;
314
- makerChecker: z.ZodBoolean;
315
- expiresAfterMs: z.ZodOptional<z.ZodNumber>;
316
- }, z.core.$strict>, z.ZodObject<{
317
- kind: z.ZodLiteral<"branch">;
318
- key: z.ZodString;
319
- approvedStepKey: z.ZodString;
320
- rejectedStepKey: z.ZodString;
321
- }, z.core.$strict>], "kind">>;
322
- }, z.core.$strict>;
323
- declare const approvalRunDocument: z.ZodObject<{
324
- scopeRef: z.ZodString;
325
- resourceType: z.ZodString;
326
- resourceRef: z.ZodString;
327
- requester: z.ZodObject<{
328
- actorRef: z.ZodString;
329
- capabilities: z.ZodArray<z.ZodString>;
330
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
331
- }, z.core.$strict>;
332
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
333
- workflow: z.ZodObject<{
334
- schemaVersion: z.ZodLiteral<1>;
335
- compatibilityKey: z.ZodString;
336
- name: z.ZodString;
337
- steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
338
- kind: z.ZodLiteral<"mutation">;
339
- key: z.ZodString;
340
- callback: z.ZodObject<{
341
- kind: z.ZodLiteral<"mutation">;
342
- handle: z.ZodString;
343
- retry: z.ZodBoolean;
344
- }, z.core.$strict>;
345
- }, z.core.$strict>, z.ZodObject<{
346
- kind: z.ZodLiteral<"action">;
347
- key: z.ZodString;
348
- callback: z.ZodObject<{
349
- kind: z.ZodLiteral<"action">;
350
- handle: z.ZodString;
351
- retry: z.ZodBoolean;
352
- }, z.core.$strict>;
353
- }, z.core.$strict>], "kind">, z.ZodObject<{
354
- kind: z.ZodLiteral<"notify">;
355
- key: z.ZodString;
356
- callback: z.ZodObject<{
357
- kind: z.ZodLiteral<"action">;
358
- handle: z.ZodString;
359
- retry: z.ZodBoolean;
360
- }, z.core.$strict>;
361
- }, z.core.$strict>, z.ZodObject<{
362
- kind: z.ZodLiteral<"decision">;
363
- key: z.ZodString;
364
- decisions: z.ZodArray<z.ZodEnum<{
365
- approved: "approved";
366
- rejected: "rejected";
367
- }>>;
368
- quorum: z.ZodObject<{
369
- kind: z.ZodEnum<{
370
- count: "count";
371
- }>;
372
- approvals: z.ZodNumber;
373
- }, z.core.$strict>;
374
- makerChecker: z.ZodBoolean;
375
- expiresAfterMs: z.ZodOptional<z.ZodNumber>;
376
- }, z.core.$strict>, z.ZodObject<{
377
- kind: z.ZodLiteral<"branch">;
378
- key: z.ZodString;
379
- approvedStepKey: z.ZodString;
380
- rejectedStepKey: z.ZodString;
381
- }, z.core.$strict>], "kind">>;
382
- }, z.core.$strict>;
383
- state: z.ZodEnum<{
384
- approved: "approved";
385
- canceled: "canceled";
386
- expired: "expired";
387
- pending: "pending";
388
- rejected: "rejected";
291
+ }>, KObject<{
292
+ kind: KLiteral<"decision">;
293
+ key: KString;
294
+ decisions: KArray<KEnum<readonly ["approved", "rejected"]>>;
295
+ quorum: KObject<{
296
+ kind: KEnum<readonly ["count"]>;
297
+ approvals: KNumber;
298
+ }>;
299
+ makerChecker: KBoolean;
300
+ expiresAfterMs: KOptional<KNumber>;
301
+ }>, KObject<{
302
+ kind: KLiteral<"branch">;
303
+ key: KString;
304
+ approvedStepKey: KString;
305
+ rejectedStepKey: KString;
306
+ }>]>>;
389
307
  }>;
390
- currentStepKey: z.ZodOptional<z.ZodString>;
391
- executionFailedStepKey: z.ZodOptional<z.ZodString>;
392
- expiresAt: z.ZodOptional<z.ZodNumber>;
393
- workflowId: z.ZodOptional<z.ZodString>;
394
- createdAt: z.ZodNumber;
395
- updatedAt: z.ZodNumber;
396
- terminalAt: z.ZodOptional<z.ZodNumber>;
397
- }, z.core.$strict>;
398
- declare const approvalDecisionDocument: z.ZodObject<{
399
- runId: import("convex-helpers/server/zod4").Zid<"approvalRuns">;
400
- stepKey: z.ZodString;
401
- actor: z.ZodObject<{
402
- actorRef: z.ZodString;
403
- capabilities: z.ZodArray<z.ZodString>;
404
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
405
- }, z.core.$strict>;
406
- decision: z.ZodEnum<{
407
- approved: "approved";
408
- rejected: "rejected";
308
+ state: KEnum<readonly ["pending", "approved", "rejected", "expired", "canceled"]>;
309
+ currentStepKey: KOptional<KString>;
310
+ executionFailedStepKey: KOptional<KString>;
311
+ expiresAt: KOptional<KNumber>;
312
+ workflowId: KOptional<KString>;
313
+ createdAt: KNumber;
314
+ updatedAt: KNumber;
315
+ terminalAt: KOptional<KNumber>;
316
+ }>;
317
+ export declare const approvalDecisionDocument: KObject<{
318
+ runId: KId<"approvalRuns">;
319
+ stepKey: KString;
320
+ actor: KObject<{
321
+ actorRef: KString;
322
+ capabilities: KArray<KString>;
323
+ metadata: KOptional<KRecord<KString, KString>>;
409
324
  }>;
410
- reason: z.ZodOptional<z.ZodString>;
411
- decidedAt: z.ZodNumber;
412
- }, z.core.$strict>;
413
- type ApprovalWorkflowDescriptor = z.infer<typeof approvalWorkflowDescriptor>;
414
- type ApprovalActor = z.infer<typeof approvalActor>;
415
- type ApprovalMetadata = z.infer<typeof approvalMetadata>;
416
- type ApprovalCallbackInput = Readonly<z.infer<typeof approvalCallbackInput>>;
417
- //#endregion
418
- export { ApprovalActor, ApprovalCallbackInput, ApprovalMetadata, ApprovalWorkflowDescriptor, approvalActionCallback, approvalActor, approvalBranchStep, approvalCallback, approvalCallbackArgs, approvalCallbackInput, approvalCallbackKind, approvalCallbackStep, approvalDecision, approvalDecisionDocument, approvalDecisionStep, approvalMetadata, approvalMutationCallback, approvalName, approvalNotifyStep, approvalQuorum, approvalQuorumKind, approvalReason, approvalReference, approvalRunDocument, approvalRunState, approvalStepKind, approvalWorkflowDescriptor, approvalWorkflowStep, validators_d_exports };
325
+ decision: KEnum<readonly ["approved", "rejected"]>;
326
+ reason: KOptional<KString>;
327
+ decidedAt: KNumber;
328
+ }>;
329
+ /**
330
+ * The fields `approvals.audit.history` reads from an audit-log event. Unknown keys are stripped, as
331
+ * v1's non-strict Zod objects did, and a non-string `actorId` is dropped by the caller.
332
+ */
333
+ export declare const approvalAuditEventProjection: KObject<{
334
+ action: KString;
335
+ actorId: KOptional<KAny>;
336
+ metadata: KObject<{
337
+ correlationKey: KString;
338
+ transition: KString;
339
+ }>;
340
+ }>;
341
+ export declare const approvalOptionalString: KOptional<KString>;
342
+ export type ApprovalWorkflowDescriptor = k.infer<typeof approvalWorkflowDescriptor>;
343
+ export type ApprovalActor = k.infer<typeof approvalActor>;
344
+ export type ApprovalMetadata = k.infer<typeof approvalMetadata>;
345
+ export type ApprovalCallbackInput = Readonly<k.infer<typeof approvalCallbackInput>>;
346
+ export { validators_d_exports };
419
347
  //# sourceMappingURL=validators.d.mts.map