@objectstack/spec 0.3.1 → 0.3.3

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 (409) hide show
  1. package/README.md +32 -10
  2. package/dist/ai/agent.zod.d.ts +12 -12
  3. package/dist/ai/conversation.zod.d.ts +65 -65
  4. package/dist/ai/cost.zod.d.ts +125 -125
  5. package/dist/ai/index.d.ts +1 -1
  6. package/dist/ai/index.d.ts.map +1 -1
  7. package/dist/ai/index.js +1 -1
  8. package/dist/ai/model-registry.zod.d.ts +94 -94
  9. package/dist/ai/nlq.zod.d.ts +70 -70
  10. package/dist/ai/{workflow-automation.zod.d.ts → orchestration.zod.d.ts} +50 -49
  11. package/dist/ai/orchestration.zod.d.ts.map +1 -0
  12. package/dist/ai/{workflow-automation.zod.js → orchestration.zod.js} +26 -25
  13. package/dist/ai/predictive.zod.d.ts +31 -31
  14. package/dist/ai/rag-pipeline.zod.d.ts +86 -86
  15. package/dist/api/contract.zod.d.ts +125 -109
  16. package/dist/api/contract.zod.d.ts.map +1 -1
  17. package/dist/{system → api}/discovery.zod.d.ts +26 -26
  18. package/dist/api/discovery.zod.d.ts.map +1 -0
  19. package/dist/{system → api}/discovery.zod.js +9 -9
  20. package/dist/{system/api.zod.d.ts → api/endpoint.zod.d.ts} +53 -57
  21. package/dist/api/endpoint.zod.d.ts.map +1 -0
  22. package/dist/{system/api.zod.js → api/endpoint.zod.js} +3 -6
  23. package/dist/api/index.d.ts +4 -0
  24. package/dist/api/index.d.ts.map +1 -1
  25. package/dist/api/index.js +4 -0
  26. package/dist/{system → api}/realtime.zod.d.ts +4 -4
  27. package/dist/api/realtime.zod.d.ts.map +1 -0
  28. package/dist/api/router.zod.d.ts +182 -0
  29. package/dist/api/router.zod.d.ts.map +1 -0
  30. package/dist/api/router.zod.js +103 -0
  31. package/dist/{system/auth.zod.d.ts → auth/config.zod.d.ts} +191 -191
  32. package/dist/auth/config.zod.d.ts.map +1 -0
  33. package/dist/{system → auth}/identity.zod.d.ts +8 -8
  34. package/dist/auth/identity.zod.d.ts.map +1 -0
  35. package/dist/auth/index.d.ts +7 -0
  36. package/dist/auth/index.d.ts.map +1 -0
  37. package/dist/auth/index.js +22 -0
  38. package/dist/{system → auth}/organization.zod.d.ts +5 -5
  39. package/dist/auth/organization.zod.d.ts.map +1 -0
  40. package/dist/{system → auth}/policy.zod.d.ts +3 -3
  41. package/dist/auth/policy.zod.d.ts.map +1 -0
  42. package/dist/{system/auth-protocol.d.ts → auth/protocol.d.ts} +1 -1
  43. package/dist/auth/protocol.d.ts.map +1 -0
  44. package/dist/auth/role.zod.d.ts.map +1 -0
  45. package/dist/{data → automation}/flow.zod.d.ts +34 -16
  46. package/dist/automation/flow.zod.d.ts.map +1 -0
  47. package/dist/{data → automation}/flow.zod.js +6 -1
  48. package/dist/automation/index.d.ts +4 -0
  49. package/dist/automation/index.d.ts.map +1 -0
  50. package/dist/automation/index.js +19 -0
  51. package/dist/{system → automation}/webhook.zod.d.ts +2 -2
  52. package/dist/automation/webhook.zod.d.ts.map +1 -0
  53. package/dist/automation/workflow.zod.d.ts +2045 -0
  54. package/dist/automation/workflow.zod.d.ts.map +1 -0
  55. package/dist/{data → automation}/workflow.zod.js +24 -1
  56. package/dist/data/dataset.zod.d.ts +2 -2
  57. package/dist/data/field.zod.d.ts +443 -213
  58. package/dist/data/field.zod.d.ts.map +1 -1
  59. package/dist/data/field.zod.js +29 -1
  60. package/dist/data/filter.zod.d.ts +167 -30
  61. package/dist/data/filter.zod.d.ts.map +1 -1
  62. package/dist/data/filter.zod.js +25 -13
  63. package/dist/data/hook.zod.d.ts +191 -0
  64. package/dist/data/hook.zod.d.ts.map +1 -0
  65. package/dist/data/hook.zod.js +144 -0
  66. package/dist/data/index.d.ts +4 -17
  67. package/dist/data/index.d.ts.map +1 -1
  68. package/dist/data/index.js +4 -17
  69. package/dist/data/mapping.zod.d.ts +103 -91
  70. package/dist/data/mapping.zod.d.ts.map +1 -1
  71. package/dist/data/object.zod.d.ts +387 -127
  72. package/dist/data/object.zod.d.ts.map +1 -1
  73. package/dist/data/object.zod.js +87 -42
  74. package/dist/data/query.zod.d.ts +98 -169
  75. package/dist/data/query.zod.d.ts.map +1 -1
  76. package/dist/data/query.zod.js +42 -130
  77. package/dist/data/validation.zod.d.ts +166 -26
  78. package/dist/data/validation.zod.d.ts.map +1 -1
  79. package/dist/data/validation.zod.js +38 -16
  80. package/dist/{system → driver}/datasource.zod.d.ts +42 -8
  81. package/dist/driver/datasource.zod.d.ts.map +1 -0
  82. package/dist/{system → driver}/datasource.zod.js +17 -13
  83. package/dist/driver/driver.zod.d.ts +3392 -0
  84. package/dist/driver/driver.zod.d.ts.map +1 -0
  85. package/dist/{system → driver}/driver.zod.js +99 -0
  86. package/dist/driver/index.d.ts +5 -0
  87. package/dist/driver/index.d.ts.map +1 -0
  88. package/dist/driver/index.js +20 -0
  89. package/dist/driver/mongo.zod.d.ts +107 -0
  90. package/dist/driver/mongo.zod.d.ts.map +1 -0
  91. package/dist/driver/mongo.zod.js +80 -0
  92. package/dist/driver/postgres.zod.d.ts +134 -0
  93. package/dist/driver/postgres.zod.d.ts.map +1 -0
  94. package/dist/driver/postgres.zod.js +88 -0
  95. package/dist/hub/composer.zod.d.ts +2768 -0
  96. package/dist/hub/composer.zod.d.ts.map +1 -0
  97. package/dist/hub/composer.zod.js +111 -0
  98. package/dist/hub/index.d.ts +6 -0
  99. package/dist/hub/index.d.ts.map +1 -0
  100. package/dist/hub/index.js +22 -0
  101. package/dist/{system → hub}/license.zod.d.ts +11 -7
  102. package/dist/hub/license.zod.d.ts.map +1 -0
  103. package/dist/{system → hub}/license.zod.js +5 -3
  104. package/dist/hub/marketplace.zod.d.ts +191 -0
  105. package/dist/hub/marketplace.zod.d.ts.map +1 -0
  106. package/dist/hub/marketplace.zod.js +85 -0
  107. package/dist/hub/space.zod.d.ts +383 -0
  108. package/dist/hub/space.zod.d.ts.map +1 -0
  109. package/dist/hub/space.zod.js +103 -0
  110. package/dist/{system → hub}/tenant.zod.d.ts +73 -47
  111. package/dist/hub/tenant.zod.d.ts.map +1 -0
  112. package/dist/{system → hub}/tenant.zod.js +36 -10
  113. package/dist/index.d.ts +11 -4
  114. package/dist/index.d.ts.map +1 -1
  115. package/dist/index.js +12 -5
  116. package/dist/kernel/context.zod.d.ts +56 -0
  117. package/dist/kernel/context.zod.d.ts.map +1 -0
  118. package/dist/kernel/context.zod.js +43 -0
  119. package/dist/kernel/index.d.ts +12 -0
  120. package/dist/kernel/index.d.ts.map +1 -0
  121. package/dist/kernel/index.js +27 -0
  122. package/dist/kernel/logger.zod.d.ts +111 -0
  123. package/dist/kernel/logger.zod.d.ts.map +1 -0
  124. package/dist/kernel/logger.zod.js +75 -0
  125. package/dist/kernel/manifest.zod.d.ts +2153 -0
  126. package/dist/kernel/manifest.zod.d.ts.map +1 -0
  127. package/dist/{system → kernel}/manifest.zod.js +40 -0
  128. package/dist/{system → kernel}/plugin.zod.d.ts +598 -318
  129. package/dist/kernel/plugin.zod.d.ts.map +1 -0
  130. package/dist/{system → kernel}/plugin.zod.js +13 -0
  131. package/dist/kernel/scoped-storage.zod.d.ts +81 -0
  132. package/dist/kernel/scoped-storage.zod.d.ts.map +1 -0
  133. package/dist/kernel/scoped-storage.zod.js +66 -0
  134. package/dist/permission/index.d.ts +12 -0
  135. package/dist/permission/index.d.ts.map +1 -0
  136. package/dist/permission/index.js +27 -0
  137. package/dist/{data → permission}/permission.zod.d.ts +34 -3
  138. package/dist/permission/permission.zod.d.ts.map +1 -0
  139. package/dist/{data → permission}/permission.zod.js +10 -1
  140. package/dist/permission/sharing.zod.d.ts +146 -0
  141. package/dist/permission/sharing.zod.d.ts.map +1 -0
  142. package/dist/permission/sharing.zod.js +88 -0
  143. package/dist/permission/territory.zod.d.ts.map +1 -0
  144. package/dist/system/audit.zod.d.ts +52 -52
  145. package/dist/system/events.zod.d.ts +17 -17
  146. package/dist/system/index.d.ts +1 -20
  147. package/dist/system/index.d.ts.map +1 -1
  148. package/dist/system/index.js +3 -20
  149. package/dist/system/job.zod.d.ts +13 -13
  150. package/dist/ui/action.zod.d.ts +13 -13
  151. package/dist/ui/app.zod.d.ts +11 -11
  152. package/dist/ui/dashboard.zod.d.ts +12 -12
  153. package/dist/ui/page.zod.d.ts +2 -2
  154. package/dist/ui/report.zod.d.ts +7 -7
  155. package/dist/ui/theme.zod.d.ts +42 -42
  156. package/dist/ui/view.zod.d.ts +2320 -59
  157. package/dist/ui/view.zod.d.ts.map +1 -1
  158. package/dist/ui/view.zod.js +102 -3
  159. package/dist/ui/widget.zod.d.ts +61 -28
  160. package/dist/ui/widget.zod.d.ts.map +1 -1
  161. package/json-schema/ai/{AIWorkflowAutomation.json → AIOrchestration.json} +5 -5
  162. package/json-schema/ai/{AIWorkflowExecutionResult.json → AIOrchestrationExecutionResult.json} +2 -2
  163. package/json-schema/ai/{AIWorkflowTrigger.json → AIOrchestrationTrigger.json} +2 -2
  164. package/json-schema/ai/{BatchAIWorkflowExecution.json → BatchAIOrchestrationExecution.json} +3 -3
  165. package/json-schema/{system → api}/ApiEndpoint.json +3 -1
  166. package/json-schema/{system → api}/ApiRoutes.json +7 -7
  167. package/json-schema/{system → api}/Discovery.json +7 -7
  168. package/json-schema/api/ExportRequest.json +402 -438
  169. package/json-schema/api/HttpMethod.json +18 -0
  170. package/json-schema/api/RouteCategory.json +17 -0
  171. package/json-schema/api/RouteDefinition.json +77 -0
  172. package/json-schema/api/RouterConfig.json +117 -0
  173. package/json-schema/{data → automation}/Flow.json +31 -1
  174. package/json-schema/{data → automation}/FlowEdge.json +9 -0
  175. package/json-schema/{data/WorkflowRule.json → automation/TimeTrigger.json} +35 -25
  176. package/json-schema/automation/WorkflowRule.json +1031 -0
  177. package/json-schema/data/AggregationNode.json +23 -0
  178. package/json-schema/data/AsyncValidation.json +49 -2
  179. package/json-schema/data/ComparisonOperator.json +52 -0
  180. package/json-schema/data/ConditionalValidation.json +693 -46
  181. package/json-schema/data/CrossFieldValidation.json +33 -2
  182. package/json-schema/data/CurrencyConfig.json +35 -0
  183. package/json-schema/data/CurrencyValue.json +26 -0
  184. package/json-schema/data/CustomValidator.json +37 -10
  185. package/json-schema/data/Field.json +30 -0
  186. package/json-schema/data/FieldOperators.json +78 -0
  187. package/json-schema/data/FieldReference.json +19 -0
  188. package/json-schema/data/FormatValidation.json +33 -2
  189. package/json-schema/data/Hook.json +95 -0
  190. package/json-schema/data/HookContext.json +88 -0
  191. package/json-schema/data/HookEvent.json +29 -0
  192. package/json-schema/data/Index.json +10 -0
  193. package/json-schema/data/JSONValidation.json +85 -0
  194. package/json-schema/data/JoinNode.json +197 -213
  195. package/json-schema/data/{TriggerAction.json → JoinStrategy.json} +6 -5
  196. package/json-schema/data/NormalizedFilter.json +234 -0
  197. package/json-schema/data/Object.json +1580 -28
  198. package/json-schema/data/ObjectCapabilities.json +30 -12
  199. package/json-schema/data/Query.json +246 -262
  200. package/json-schema/data/RangeOperator.json +26 -0
  201. package/json-schema/data/ScriptValidation.json +33 -2
  202. package/json-schema/data/SearchConfig.json +36 -0
  203. package/json-schema/data/StateMachineValidation.json +33 -2
  204. package/json-schema/data/UniquenessValidation.json +33 -2
  205. package/json-schema/data/ValidationRule.json +693 -46
  206. package/json-schema/{system → driver}/Datasource.json +35 -0
  207. package/json-schema/{system → driver}/DriverCapabilities.json +10 -0
  208. package/json-schema/{system → driver}/DriverInterface.json +10 -0
  209. package/json-schema/{system → driver}/DriverOptions.json +11 -0
  210. package/json-schema/driver/MongoConfig.json +82 -0
  211. package/json-schema/driver/PostgresConfig.json +98 -0
  212. package/json-schema/hub/BillOfMaterials.json +70 -0
  213. package/json-schema/hub/ComposerRequest.json +86 -0
  214. package/json-schema/hub/ComposerResponse.json +2645 -0
  215. package/json-schema/hub/ConflictReport.json +53 -0
  216. package/json-schema/hub/DependencyRequirement.json +36 -0
  217. package/json-schema/hub/DeploymentTarget.json +38 -0
  218. package/json-schema/hub/HubSpace.json +279 -0
  219. package/json-schema/{system → hub}/License.json +11 -3
  220. package/json-schema/hub/MarketplacePlugin.json +141 -0
  221. package/json-schema/hub/PluginAuthor.json +26 -0
  222. package/json-schema/hub/PluginPricing.json +43 -0
  223. package/json-schema/hub/SpaceSubscription.json +77 -0
  224. package/json-schema/hub/SubscriptionStatus.json +16 -0
  225. package/json-schema/{system → hub}/Tenant.json +3 -5
  226. package/json-schema/kernel/FileMetadata.json +43 -0
  227. package/json-schema/kernel/KernelContext.json +62 -0
  228. package/json-schema/kernel/LogEntry.json +63 -0
  229. package/json-schema/kernel/LogFormat.json +15 -0
  230. package/json-schema/kernel/LogLevel.json +17 -0
  231. package/json-schema/kernel/LoggerConfig.json +70 -0
  232. package/json-schema/kernel/Manifest.json +2557 -0
  233. package/json-schema/{system → kernel}/PluginContext.json +8 -1
  234. package/json-schema/kernel/RuntimeMode.json +16 -0
  235. package/json-schema/kernel/ScopedStorageConfig.json +54 -0
  236. package/json-schema/kernel/StorageAdapterType.json +17 -0
  237. package/json-schema/kernel/StorageScope.json +18 -0
  238. package/json-schema/permission/CriteriaSharingRule.json +82 -0
  239. package/json-schema/{data → permission}/OWDModel.json +2 -1
  240. package/json-schema/{data → permission}/ObjectPermission.json +15 -0
  241. package/json-schema/permission/OwnerSharingRule.json +102 -0
  242. package/json-schema/{data → permission}/PermissionSet.json +15 -0
  243. package/json-schema/permission/ShareRecipientType.json +16 -0
  244. package/json-schema/{data → permission}/SharingLevel.json +2 -1
  245. package/json-schema/permission/SharingRule.json +182 -0
  246. package/json-schema/{data → permission}/SharingRuleType.json +1 -3
  247. package/json-schema/ui/FieldWidgetProps.json +30 -0
  248. package/json-schema/ui/FormField.json +61 -0
  249. package/json-schema/ui/FormSection.json +60 -1
  250. package/json-schema/ui/FormView.json +257 -2
  251. package/json-schema/{system → ui}/HttpMethod.json +2 -2
  252. package/json-schema/ui/HttpRequest.json +46 -0
  253. package/json-schema/ui/ListColumn.json +57 -0
  254. package/json-schema/ui/ListView.json +249 -4
  255. package/json-schema/ui/PaginationConfig.json +26 -0
  256. package/json-schema/ui/SelectionConfig.json +22 -0
  257. package/json-schema/ui/View.json +1012 -12
  258. package/json-schema/ui/ViewData.json +142 -0
  259. package/llms.txt +182 -0
  260. package/package.json +38 -16
  261. package/prompts/README.md +18 -0
  262. package/prompts/architecture.md +81 -0
  263. package/prompts/implement-objectai.md +39 -0
  264. package/prompts/implement-objectos.md +48 -0
  265. package/prompts/implement-objectql.md +39 -0
  266. package/prompts/implement-objectui.md +46 -0
  267. package/prompts/instructions.md +91 -0
  268. package/dist/ai/workflow-automation.zod.d.ts.map +0 -1
  269. package/dist/data/flow.zod.d.ts.map +0 -1
  270. package/dist/data/permission.zod.d.ts.map +0 -1
  271. package/dist/data/sharing.zod.d.ts +0 -63
  272. package/dist/data/sharing.zod.d.ts.map +0 -1
  273. package/dist/data/sharing.zod.js +0 -57
  274. package/dist/data/trigger.zod.d.ts +0 -354
  275. package/dist/data/trigger.zod.d.ts.map +0 -1
  276. package/dist/data/trigger.zod.js +0 -195
  277. package/dist/data/workflow.zod.d.ts +0 -986
  278. package/dist/data/workflow.zod.d.ts.map +0 -1
  279. package/dist/system/api.zod.d.ts.map +0 -1
  280. package/dist/system/auth-protocol.d.ts.map +0 -1
  281. package/dist/system/auth.zod.d.ts.map +0 -1
  282. package/dist/system/datasource.zod.d.ts.map +0 -1
  283. package/dist/system/discovery.zod.d.ts.map +0 -1
  284. package/dist/system/driver.zod.d.ts +0 -1631
  285. package/dist/system/driver.zod.d.ts.map +0 -1
  286. package/dist/system/identity.zod.d.ts.map +0 -1
  287. package/dist/system/license.zod.d.ts.map +0 -1
  288. package/dist/system/manifest.zod.d.ts +0 -397
  289. package/dist/system/manifest.zod.d.ts.map +0 -1
  290. package/dist/system/organization.zod.d.ts.map +0 -1
  291. package/dist/system/plugin.zod.d.ts.map +0 -1
  292. package/dist/system/policy.zod.d.ts.map +0 -1
  293. package/dist/system/realtime.zod.d.ts.map +0 -1
  294. package/dist/system/role.zod.d.ts.map +0 -1
  295. package/dist/system/tenant.zod.d.ts.map +0 -1
  296. package/dist/system/territory.zod.d.ts.map +0 -1
  297. package/dist/system/webhook.zod.d.ts.map +0 -1
  298. package/json-schema/README.md +0 -127
  299. package/json-schema/data/FieldMapping.json +0 -83
  300. package/json-schema/data/FilterNode.json +0 -52
  301. package/json-schema/data/FilterOperator.json +0 -26
  302. package/json-schema/data/LogicOperator.json +0 -14
  303. package/json-schema/data/Mapping.json +0 -598
  304. package/json-schema/data/SharingRule.json +0 -58
  305. package/json-schema/data/TransformType.json +0 -18
  306. package/json-schema/data/Trigger.json +0 -73
  307. package/json-schema/data/TriggerContext.json +0 -61
  308. package/json-schema/data/TriggerTiming.json +0 -13
  309. package/json-schema/system/Manifest.json +0 -315
  310. /package/dist/{system → api}/realtime.zod.js +0 -0
  311. /package/dist/{system/auth.zod.js → auth/config.zod.js} +0 -0
  312. /package/dist/{system → auth}/identity.zod.js +0 -0
  313. /package/dist/{system → auth}/organization.zod.js +0 -0
  314. /package/dist/{system → auth}/policy.zod.js +0 -0
  315. /package/dist/{system/auth-protocol.js → auth/protocol.js} +0 -0
  316. /package/dist/{system → auth}/role.zod.d.ts +0 -0
  317. /package/dist/{system → auth}/role.zod.js +0 -0
  318. /package/dist/{system → automation}/webhook.zod.js +0 -0
  319. /package/dist/{system → permission}/territory.zod.d.ts +0 -0
  320. /package/dist/{system → permission}/territory.zod.js +0 -0
  321. /package/json-schema/{system → api}/ApiCapabilities.json +0 -0
  322. /package/json-schema/{system → api}/ApiMapping.json +0 -0
  323. /package/json-schema/{system → api}/Presence.json +0 -0
  324. /package/json-schema/{system → api}/PresenceStatus.json +0 -0
  325. /package/json-schema/{system → api}/RateLimit.json +0 -0
  326. /package/json-schema/{system → api}/RealtimeAction.json +0 -0
  327. /package/json-schema/{system → api}/RealtimeEvent.json +0 -0
  328. /package/json-schema/{system → api}/RealtimeEventType.json +0 -0
  329. /package/json-schema/{system → api}/Subscription.json +0 -0
  330. /package/json-schema/{system → api}/SubscriptionEvent.json +0 -0
  331. /package/json-schema/{system → api}/TransportProtocol.json +0 -0
  332. /package/json-schema/{system → auth}/Account.json +0 -0
  333. /package/json-schema/{system → auth}/AccountLinkingConfig.json +0 -0
  334. /package/json-schema/{system → auth}/AuditPolicy.json +0 -0
  335. /package/json-schema/{system → auth}/AuthConfig.json +0 -0
  336. /package/json-schema/{system → auth}/AuthPluginConfig.json +0 -0
  337. /package/json-schema/{system → auth}/AuthStrategy.json +0 -0
  338. /package/json-schema/{system → auth}/CSRFConfig.json +0 -0
  339. /package/json-schema/{system → auth}/DatabaseAdapter.json +0 -0
  340. /package/json-schema/{system → auth}/DatabaseMapping.json +0 -0
  341. /package/json-schema/{system → auth}/EmailPasswordConfig.json +0 -0
  342. /package/json-schema/{system → auth}/EnterpriseAuthConfig.json +0 -0
  343. /package/json-schema/{system → auth}/Invitation.json +0 -0
  344. /package/json-schema/{system → auth}/InvitationStatus.json +0 -0
  345. /package/json-schema/{system → auth}/LDAPConfig.json +0 -0
  346. /package/json-schema/{system → auth}/MagicLinkConfig.json +0 -0
  347. /package/json-schema/{system → auth}/Member.json +0 -0
  348. /package/json-schema/{system → auth}/NetworkPolicy.json +0 -0
  349. /package/json-schema/{system → auth}/OAuthProvider.json +0 -0
  350. /package/json-schema/{system → auth}/OIDCConfig.json +0 -0
  351. /package/json-schema/{system → auth}/Organization.json +0 -0
  352. /package/json-schema/{system → auth}/PasskeyConfig.json +0 -0
  353. /package/json-schema/{system → auth}/PasswordPolicy.json +0 -0
  354. /package/json-schema/{system → auth}/Policy.json +0 -0
  355. /package/json-schema/{system → auth}/RateLimitConfig.json +0 -0
  356. /package/json-schema/{system → auth}/Role.json +0 -0
  357. /package/json-schema/{system → auth}/SAMLConfig.json +0 -0
  358. /package/json-schema/{system → auth}/Session.json +0 -0
  359. /package/json-schema/{system → auth}/SessionConfig.json +0 -0
  360. /package/json-schema/{system → auth}/SessionPolicy.json +0 -0
  361. /package/json-schema/{system → auth}/StandardAuthProvider.json +0 -0
  362. /package/json-schema/{system → auth}/TwoFactorConfig.json +0 -0
  363. /package/json-schema/{system → auth}/User.json +0 -0
  364. /package/json-schema/{system → auth}/UserFieldMapping.json +0 -0
  365. /package/json-schema/{system → auth}/VerificationToken.json +0 -0
  366. /package/json-schema/{data → automation}/CustomScriptAction.json +0 -0
  367. /package/json-schema/{data → automation}/EmailAlertAction.json +0 -0
  368. /package/json-schema/{data → automation}/FieldUpdateAction.json +0 -0
  369. /package/json-schema/{data → automation}/FlowNode.json +0 -0
  370. /package/json-schema/{data → automation}/FlowNodeAction.json +0 -0
  371. /package/json-schema/{data → automation}/FlowVariable.json +0 -0
  372. /package/json-schema/{data → automation}/HttpCallAction.json +0 -0
  373. /package/json-schema/{data → automation}/PushNotificationAction.json +0 -0
  374. /package/json-schema/{data → automation}/SlackMessageAction.json +0 -0
  375. /package/json-schema/{data → automation}/SmsNotificationAction.json +0 -0
  376. /package/json-schema/{data → automation}/TaskCreationAction.json +0 -0
  377. /package/json-schema/{data → automation}/TeamsMessageAction.json +0 -0
  378. /package/json-schema/{system → automation}/Webhook.json +0 -0
  379. /package/json-schema/{system → automation}/WebhookReceiver.json +0 -0
  380. /package/json-schema/{data → automation}/WebhookTriggerAction.json +0 -0
  381. /package/json-schema/{system → automation}/WebhookTriggerType.json +0 -0
  382. /package/json-schema/{data → automation}/WorkflowAction.json +0 -0
  383. /package/json-schema/{data → automation}/WorkflowTriggerType.json +0 -0
  384. /package/json-schema/{system → driver}/DatasourceCapabilities.json +0 -0
  385. /package/json-schema/{system → driver}/DriverDefinition.json +0 -0
  386. /package/json-schema/{system → driver}/DriverType.json +0 -0
  387. /package/json-schema/{system → hub}/DatabaseLevelIsolationStrategy.json +0 -0
  388. /package/json-schema/{system → hub}/Feature.json +0 -0
  389. /package/json-schema/{system → hub}/LevelIsolationStrategySchema.json +0 -0
  390. /package/json-schema/{system → hub}/MetricType.json +0 -0
  391. /package/json-schema/{system → hub}/Plan.json +0 -0
  392. /package/json-schema/{system → hub}/RowLevelIsolationStrategy.json +0 -0
  393. /package/json-schema/{system → hub}/TenantIsolationConfig.json +0 -0
  394. /package/json-schema/{system → hub}/TenantIsolationLevel.json +0 -0
  395. /package/json-schema/{system → hub}/TenantQuota.json +0 -0
  396. /package/json-schema/{system → hub}/TenantSecurityPolicy.json +0 -0
  397. /package/json-schema/{system → kernel}/I18nContext.json +0 -0
  398. /package/json-schema/{system → kernel}/Logger.json +0 -0
  399. /package/json-schema/{system → kernel}/ObjectQLClient.json +0 -0
  400. /package/json-schema/{system → kernel}/Plugin.json +0 -0
  401. /package/json-schema/{system → kernel}/PluginLifecycle.json +0 -0
  402. /package/json-schema/{system → kernel}/Router.json +0 -0
  403. /package/json-schema/{system → kernel}/Scheduler.json +0 -0
  404. /package/json-schema/{system → kernel}/ScopedStorage.json +0 -0
  405. /package/json-schema/{system → kernel}/SystemAPI.json +0 -0
  406. /package/json-schema/{data → permission}/FieldPermission.json +0 -0
  407. /package/json-schema/{system → permission}/Territory.json +0 -0
  408. /package/json-schema/{system → permission}/TerritoryModel.json +0 -0
  409. /package/json-schema/{system → permission}/TerritoryType.json +0 -0
@@ -0,0 +1,2045 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Trigger events for workflow automation
4
+ */
5
+ export declare const WorkflowTriggerType: z.ZodEnum<["on_create", "on_update", "on_create_or_update", "on_delete", "schedule"]>;
6
+ /**
7
+ * Schema for Workflow Field Update Action
8
+ */
9
+ export declare const FieldUpdateActionSchema: z.ZodObject<{
10
+ name: z.ZodString;
11
+ type: z.ZodLiteral<"field_update">;
12
+ field: z.ZodString;
13
+ value: z.ZodAny;
14
+ }, "strip", z.ZodTypeAny, {
15
+ type: "field_update";
16
+ field: string;
17
+ name: string;
18
+ value?: any;
19
+ }, {
20
+ type: "field_update";
21
+ field: string;
22
+ name: string;
23
+ value?: any;
24
+ }>;
25
+ /**
26
+ * Schema for Workflow Email Alert Action
27
+ */
28
+ export declare const EmailAlertActionSchema: z.ZodObject<{
29
+ name: z.ZodString;
30
+ type: z.ZodLiteral<"email_alert">;
31
+ template: z.ZodString;
32
+ recipients: z.ZodArray<z.ZodString, "many">;
33
+ }, "strip", z.ZodTypeAny, {
34
+ type: "email_alert";
35
+ name: string;
36
+ template: string;
37
+ recipients: string[];
38
+ }, {
39
+ type: "email_alert";
40
+ name: string;
41
+ template: string;
42
+ recipients: string[];
43
+ }>;
44
+ /**
45
+ * Schema for Workflow SMS Notification Action
46
+ * Supports providers like Twilio, Vonage
47
+ */
48
+ export declare const SmsNotificationActionSchema: z.ZodObject<{
49
+ name: z.ZodString;
50
+ type: z.ZodLiteral<"sms_notification">;
51
+ provider: z.ZodEnum<["twilio", "vonage"]>;
52
+ recipients: z.ZodArray<z.ZodString, "many">;
53
+ message: z.ZodString;
54
+ fromNumber: z.ZodOptional<z.ZodString>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ message: string;
57
+ type: "sms_notification";
58
+ name: string;
59
+ provider: "twilio" | "vonage";
60
+ recipients: string[];
61
+ fromNumber?: string | undefined;
62
+ }, {
63
+ message: string;
64
+ type: "sms_notification";
65
+ name: string;
66
+ provider: "twilio" | "vonage";
67
+ recipients: string[];
68
+ fromNumber?: string | undefined;
69
+ }>;
70
+ /**
71
+ * Schema for Workflow Slack Message Action
72
+ */
73
+ export declare const SlackMessageActionSchema: z.ZodObject<{
74
+ name: z.ZodString;
75
+ type: z.ZodLiteral<"slack_message">;
76
+ channel: z.ZodString;
77
+ message: z.ZodString;
78
+ mentions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
79
+ threadId: z.ZodOptional<z.ZodString>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ message: string;
82
+ type: "slack_message";
83
+ name: string;
84
+ channel: string;
85
+ mentions?: string[] | undefined;
86
+ threadId?: string | undefined;
87
+ }, {
88
+ message: string;
89
+ type: "slack_message";
90
+ name: string;
91
+ channel: string;
92
+ mentions?: string[] | undefined;
93
+ threadId?: string | undefined;
94
+ }>;
95
+ /**
96
+ * Schema for Workflow Teams Message Action
97
+ */
98
+ export declare const TeamsMessageActionSchema: z.ZodObject<{
99
+ name: z.ZodString;
100
+ type: z.ZodLiteral<"teams_message">;
101
+ channel: z.ZodString;
102
+ message: z.ZodString;
103
+ mentions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
104
+ teamId: z.ZodOptional<z.ZodString>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ message: string;
107
+ type: "teams_message";
108
+ name: string;
109
+ channel: string;
110
+ mentions?: string[] | undefined;
111
+ teamId?: string | undefined;
112
+ }, {
113
+ message: string;
114
+ type: "teams_message";
115
+ name: string;
116
+ channel: string;
117
+ mentions?: string[] | undefined;
118
+ teamId?: string | undefined;
119
+ }>;
120
+ /**
121
+ * Schema for Workflow HTTP Call Action
122
+ * REST API integration support
123
+ */
124
+ export declare const HttpCallActionSchema: z.ZodObject<{
125
+ name: z.ZodString;
126
+ type: z.ZodLiteral<"http_call">;
127
+ url: z.ZodString;
128
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
129
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
130
+ body: z.ZodOptional<z.ZodAny>;
131
+ authentication: z.ZodOptional<z.ZodObject<{
132
+ type: z.ZodEnum<["none", "basic", "bearer", "api_key", "oauth2"]>;
133
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
134
+ }, "strip", z.ZodTypeAny, {
135
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
136
+ credentials?: Record<string, string> | undefined;
137
+ }, {
138
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
139
+ credentials?: Record<string, string> | undefined;
140
+ }>>;
141
+ timeout: z.ZodOptional<z.ZodNumber>;
142
+ }, "strip", z.ZodTypeAny, {
143
+ type: "http_call";
144
+ url: string;
145
+ name: string;
146
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
147
+ headers?: Record<string, string> | undefined;
148
+ timeout?: number | undefined;
149
+ body?: any;
150
+ authentication?: {
151
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
152
+ credentials?: Record<string, string> | undefined;
153
+ } | undefined;
154
+ }, {
155
+ type: "http_call";
156
+ url: string;
157
+ name: string;
158
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
159
+ headers?: Record<string, string> | undefined;
160
+ timeout?: number | undefined;
161
+ body?: any;
162
+ authentication?: {
163
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
164
+ credentials?: Record<string, string> | undefined;
165
+ } | undefined;
166
+ }>;
167
+ /**
168
+ * Schema for Workflow Webhook Trigger Action
169
+ */
170
+ export declare const WebhookTriggerActionSchema: z.ZodObject<{
171
+ name: z.ZodString;
172
+ type: z.ZodLiteral<"webhook_trigger">;
173
+ url: z.ZodString;
174
+ method: z.ZodDefault<z.ZodEnum<["POST", "PUT"]>>;
175
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
176
+ payload: z.ZodOptional<z.ZodAny>;
177
+ retryOnFailure: z.ZodDefault<z.ZodBoolean>;
178
+ maxRetries: z.ZodDefault<z.ZodNumber>;
179
+ }, "strip", z.ZodTypeAny, {
180
+ type: "webhook_trigger";
181
+ url: string;
182
+ name: string;
183
+ method: "POST" | "PUT";
184
+ maxRetries: number;
185
+ retryOnFailure: boolean;
186
+ headers?: Record<string, string> | undefined;
187
+ payload?: any;
188
+ }, {
189
+ type: "webhook_trigger";
190
+ url: string;
191
+ name: string;
192
+ method?: "POST" | "PUT" | undefined;
193
+ headers?: Record<string, string> | undefined;
194
+ payload?: any;
195
+ maxRetries?: number | undefined;
196
+ retryOnFailure?: boolean | undefined;
197
+ }>;
198
+ /**
199
+ * Schema for Workflow Task Creation Action
200
+ */
201
+ export declare const TaskCreationActionSchema: z.ZodObject<{
202
+ name: z.ZodString;
203
+ type: z.ZodLiteral<"task_creation">;
204
+ taskObject: z.ZodString;
205
+ subject: z.ZodString;
206
+ description: z.ZodOptional<z.ZodString>;
207
+ assignedTo: z.ZodOptional<z.ZodString>;
208
+ dueDate: z.ZodOptional<z.ZodString>;
209
+ priority: z.ZodOptional<z.ZodString>;
210
+ relatedTo: z.ZodOptional<z.ZodString>;
211
+ additionalFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
212
+ }, "strip", z.ZodTypeAny, {
213
+ type: "task_creation";
214
+ name: string;
215
+ taskObject: string;
216
+ subject: string;
217
+ description?: string | undefined;
218
+ priority?: string | undefined;
219
+ assignedTo?: string | undefined;
220
+ dueDate?: string | undefined;
221
+ relatedTo?: string | undefined;
222
+ additionalFields?: Record<string, any> | undefined;
223
+ }, {
224
+ type: "task_creation";
225
+ name: string;
226
+ taskObject: string;
227
+ subject: string;
228
+ description?: string | undefined;
229
+ priority?: string | undefined;
230
+ assignedTo?: string | undefined;
231
+ dueDate?: string | undefined;
232
+ relatedTo?: string | undefined;
233
+ additionalFields?: Record<string, any> | undefined;
234
+ }>;
235
+ /**
236
+ * Schema for Workflow Push Notification Action
237
+ */
238
+ export declare const PushNotificationActionSchema: z.ZodObject<{
239
+ name: z.ZodString;
240
+ type: z.ZodLiteral<"push_notification">;
241
+ title: z.ZodString;
242
+ body: z.ZodString;
243
+ recipients: z.ZodArray<z.ZodString, "many">;
244
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
245
+ badge: z.ZodOptional<z.ZodNumber>;
246
+ sound: z.ZodOptional<z.ZodString>;
247
+ clickAction: z.ZodOptional<z.ZodString>;
248
+ }, "strip", z.ZodTypeAny, {
249
+ type: "push_notification";
250
+ name: string;
251
+ body: string;
252
+ title: string;
253
+ recipients: string[];
254
+ data?: Record<string, any> | undefined;
255
+ badge?: number | undefined;
256
+ sound?: string | undefined;
257
+ clickAction?: string | undefined;
258
+ }, {
259
+ type: "push_notification";
260
+ name: string;
261
+ body: string;
262
+ title: string;
263
+ recipients: string[];
264
+ data?: Record<string, any> | undefined;
265
+ badge?: number | undefined;
266
+ sound?: string | undefined;
267
+ clickAction?: string | undefined;
268
+ }>;
269
+ /**
270
+ * Schema for Workflow Custom Script Action
271
+ */
272
+ export declare const CustomScriptActionSchema: z.ZodObject<{
273
+ name: z.ZodString;
274
+ type: z.ZodLiteral<"custom_script">;
275
+ language: z.ZodDefault<z.ZodEnum<["javascript", "typescript", "python"]>>;
276
+ code: z.ZodString;
277
+ timeout: z.ZodDefault<z.ZodNumber>;
278
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
279
+ }, "strip", z.ZodTypeAny, {
280
+ code: string;
281
+ type: "custom_script";
282
+ name: string;
283
+ language: "javascript" | "typescript" | "python";
284
+ timeout: number;
285
+ context?: Record<string, any> | undefined;
286
+ }, {
287
+ code: string;
288
+ type: "custom_script";
289
+ name: string;
290
+ language?: "javascript" | "typescript" | "python" | undefined;
291
+ timeout?: number | undefined;
292
+ context?: Record<string, any> | undefined;
293
+ }>;
294
+ /**
295
+ * Generic Workflow Action Wrapper
296
+ * Supports 10 action types for comprehensive automation
297
+ */
298
+ export declare const WorkflowActionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
299
+ name: z.ZodString;
300
+ type: z.ZodLiteral<"field_update">;
301
+ field: z.ZodString;
302
+ value: z.ZodAny;
303
+ }, "strip", z.ZodTypeAny, {
304
+ type: "field_update";
305
+ field: string;
306
+ name: string;
307
+ value?: any;
308
+ }, {
309
+ type: "field_update";
310
+ field: string;
311
+ name: string;
312
+ value?: any;
313
+ }>, z.ZodObject<{
314
+ name: z.ZodString;
315
+ type: z.ZodLiteral<"email_alert">;
316
+ template: z.ZodString;
317
+ recipients: z.ZodArray<z.ZodString, "many">;
318
+ }, "strip", z.ZodTypeAny, {
319
+ type: "email_alert";
320
+ name: string;
321
+ template: string;
322
+ recipients: string[];
323
+ }, {
324
+ type: "email_alert";
325
+ name: string;
326
+ template: string;
327
+ recipients: string[];
328
+ }>, z.ZodObject<{
329
+ name: z.ZodString;
330
+ type: z.ZodLiteral<"sms_notification">;
331
+ provider: z.ZodEnum<["twilio", "vonage"]>;
332
+ recipients: z.ZodArray<z.ZodString, "many">;
333
+ message: z.ZodString;
334
+ fromNumber: z.ZodOptional<z.ZodString>;
335
+ }, "strip", z.ZodTypeAny, {
336
+ message: string;
337
+ type: "sms_notification";
338
+ name: string;
339
+ provider: "twilio" | "vonage";
340
+ recipients: string[];
341
+ fromNumber?: string | undefined;
342
+ }, {
343
+ message: string;
344
+ type: "sms_notification";
345
+ name: string;
346
+ provider: "twilio" | "vonage";
347
+ recipients: string[];
348
+ fromNumber?: string | undefined;
349
+ }>, z.ZodObject<{
350
+ name: z.ZodString;
351
+ type: z.ZodLiteral<"slack_message">;
352
+ channel: z.ZodString;
353
+ message: z.ZodString;
354
+ mentions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
355
+ threadId: z.ZodOptional<z.ZodString>;
356
+ }, "strip", z.ZodTypeAny, {
357
+ message: string;
358
+ type: "slack_message";
359
+ name: string;
360
+ channel: string;
361
+ mentions?: string[] | undefined;
362
+ threadId?: string | undefined;
363
+ }, {
364
+ message: string;
365
+ type: "slack_message";
366
+ name: string;
367
+ channel: string;
368
+ mentions?: string[] | undefined;
369
+ threadId?: string | undefined;
370
+ }>, z.ZodObject<{
371
+ name: z.ZodString;
372
+ type: z.ZodLiteral<"teams_message">;
373
+ channel: z.ZodString;
374
+ message: z.ZodString;
375
+ mentions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
376
+ teamId: z.ZodOptional<z.ZodString>;
377
+ }, "strip", z.ZodTypeAny, {
378
+ message: string;
379
+ type: "teams_message";
380
+ name: string;
381
+ channel: string;
382
+ mentions?: string[] | undefined;
383
+ teamId?: string | undefined;
384
+ }, {
385
+ message: string;
386
+ type: "teams_message";
387
+ name: string;
388
+ channel: string;
389
+ mentions?: string[] | undefined;
390
+ teamId?: string | undefined;
391
+ }>, z.ZodObject<{
392
+ name: z.ZodString;
393
+ type: z.ZodLiteral<"http_call">;
394
+ url: z.ZodString;
395
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
396
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
397
+ body: z.ZodOptional<z.ZodAny>;
398
+ authentication: z.ZodOptional<z.ZodObject<{
399
+ type: z.ZodEnum<["none", "basic", "bearer", "api_key", "oauth2"]>;
400
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
401
+ }, "strip", z.ZodTypeAny, {
402
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
403
+ credentials?: Record<string, string> | undefined;
404
+ }, {
405
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
406
+ credentials?: Record<string, string> | undefined;
407
+ }>>;
408
+ timeout: z.ZodOptional<z.ZodNumber>;
409
+ }, "strip", z.ZodTypeAny, {
410
+ type: "http_call";
411
+ url: string;
412
+ name: string;
413
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
414
+ headers?: Record<string, string> | undefined;
415
+ timeout?: number | undefined;
416
+ body?: any;
417
+ authentication?: {
418
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
419
+ credentials?: Record<string, string> | undefined;
420
+ } | undefined;
421
+ }, {
422
+ type: "http_call";
423
+ url: string;
424
+ name: string;
425
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
426
+ headers?: Record<string, string> | undefined;
427
+ timeout?: number | undefined;
428
+ body?: any;
429
+ authentication?: {
430
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
431
+ credentials?: Record<string, string> | undefined;
432
+ } | undefined;
433
+ }>, z.ZodObject<{
434
+ name: z.ZodString;
435
+ type: z.ZodLiteral<"webhook_trigger">;
436
+ url: z.ZodString;
437
+ method: z.ZodDefault<z.ZodEnum<["POST", "PUT"]>>;
438
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
439
+ payload: z.ZodOptional<z.ZodAny>;
440
+ retryOnFailure: z.ZodDefault<z.ZodBoolean>;
441
+ maxRetries: z.ZodDefault<z.ZodNumber>;
442
+ }, "strip", z.ZodTypeAny, {
443
+ type: "webhook_trigger";
444
+ url: string;
445
+ name: string;
446
+ method: "POST" | "PUT";
447
+ maxRetries: number;
448
+ retryOnFailure: boolean;
449
+ headers?: Record<string, string> | undefined;
450
+ payload?: any;
451
+ }, {
452
+ type: "webhook_trigger";
453
+ url: string;
454
+ name: string;
455
+ method?: "POST" | "PUT" | undefined;
456
+ headers?: Record<string, string> | undefined;
457
+ payload?: any;
458
+ maxRetries?: number | undefined;
459
+ retryOnFailure?: boolean | undefined;
460
+ }>, z.ZodObject<{
461
+ name: z.ZodString;
462
+ type: z.ZodLiteral<"task_creation">;
463
+ taskObject: z.ZodString;
464
+ subject: z.ZodString;
465
+ description: z.ZodOptional<z.ZodString>;
466
+ assignedTo: z.ZodOptional<z.ZodString>;
467
+ dueDate: z.ZodOptional<z.ZodString>;
468
+ priority: z.ZodOptional<z.ZodString>;
469
+ relatedTo: z.ZodOptional<z.ZodString>;
470
+ additionalFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
471
+ }, "strip", z.ZodTypeAny, {
472
+ type: "task_creation";
473
+ name: string;
474
+ taskObject: string;
475
+ subject: string;
476
+ description?: string | undefined;
477
+ priority?: string | undefined;
478
+ assignedTo?: string | undefined;
479
+ dueDate?: string | undefined;
480
+ relatedTo?: string | undefined;
481
+ additionalFields?: Record<string, any> | undefined;
482
+ }, {
483
+ type: "task_creation";
484
+ name: string;
485
+ taskObject: string;
486
+ subject: string;
487
+ description?: string | undefined;
488
+ priority?: string | undefined;
489
+ assignedTo?: string | undefined;
490
+ dueDate?: string | undefined;
491
+ relatedTo?: string | undefined;
492
+ additionalFields?: Record<string, any> | undefined;
493
+ }>, z.ZodObject<{
494
+ name: z.ZodString;
495
+ type: z.ZodLiteral<"push_notification">;
496
+ title: z.ZodString;
497
+ body: z.ZodString;
498
+ recipients: z.ZodArray<z.ZodString, "many">;
499
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
500
+ badge: z.ZodOptional<z.ZodNumber>;
501
+ sound: z.ZodOptional<z.ZodString>;
502
+ clickAction: z.ZodOptional<z.ZodString>;
503
+ }, "strip", z.ZodTypeAny, {
504
+ type: "push_notification";
505
+ name: string;
506
+ body: string;
507
+ title: string;
508
+ recipients: string[];
509
+ data?: Record<string, any> | undefined;
510
+ badge?: number | undefined;
511
+ sound?: string | undefined;
512
+ clickAction?: string | undefined;
513
+ }, {
514
+ type: "push_notification";
515
+ name: string;
516
+ body: string;
517
+ title: string;
518
+ recipients: string[];
519
+ data?: Record<string, any> | undefined;
520
+ badge?: number | undefined;
521
+ sound?: string | undefined;
522
+ clickAction?: string | undefined;
523
+ }>, z.ZodObject<{
524
+ name: z.ZodString;
525
+ type: z.ZodLiteral<"custom_script">;
526
+ language: z.ZodDefault<z.ZodEnum<["javascript", "typescript", "python"]>>;
527
+ code: z.ZodString;
528
+ timeout: z.ZodDefault<z.ZodNumber>;
529
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
530
+ }, "strip", z.ZodTypeAny, {
531
+ code: string;
532
+ type: "custom_script";
533
+ name: string;
534
+ language: "javascript" | "typescript" | "python";
535
+ timeout: number;
536
+ context?: Record<string, any> | undefined;
537
+ }, {
538
+ code: string;
539
+ type: "custom_script";
540
+ name: string;
541
+ language?: "javascript" | "typescript" | "python" | undefined;
542
+ timeout?: number | undefined;
543
+ context?: Record<string, any> | undefined;
544
+ }>]>;
545
+ /**
546
+ * Time Trigger Definition
547
+ * Schedules actions to run relative to a specific time or date field.
548
+ */
549
+ export declare const TimeTriggerSchema: z.ZodObject<{
550
+ id: z.ZodOptional<z.ZodString>;
551
+ /** Timing Logic */
552
+ timeLength: z.ZodNumber;
553
+ timeUnit: z.ZodEnum<["minutes", "hours", "days"]>;
554
+ /** Reference Point */
555
+ offsetDirection: z.ZodEnum<["before", "after"]>;
556
+ offsetFrom: z.ZodEnum<["trigger_date", "date_field"]>;
557
+ dateField: z.ZodOptional<z.ZodString>;
558
+ /** Actions */
559
+ actions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
560
+ name: z.ZodString;
561
+ type: z.ZodLiteral<"field_update">;
562
+ field: z.ZodString;
563
+ value: z.ZodAny;
564
+ }, "strip", z.ZodTypeAny, {
565
+ type: "field_update";
566
+ field: string;
567
+ name: string;
568
+ value?: any;
569
+ }, {
570
+ type: "field_update";
571
+ field: string;
572
+ name: string;
573
+ value?: any;
574
+ }>, z.ZodObject<{
575
+ name: z.ZodString;
576
+ type: z.ZodLiteral<"email_alert">;
577
+ template: z.ZodString;
578
+ recipients: z.ZodArray<z.ZodString, "many">;
579
+ }, "strip", z.ZodTypeAny, {
580
+ type: "email_alert";
581
+ name: string;
582
+ template: string;
583
+ recipients: string[];
584
+ }, {
585
+ type: "email_alert";
586
+ name: string;
587
+ template: string;
588
+ recipients: string[];
589
+ }>, z.ZodObject<{
590
+ name: z.ZodString;
591
+ type: z.ZodLiteral<"sms_notification">;
592
+ provider: z.ZodEnum<["twilio", "vonage"]>;
593
+ recipients: z.ZodArray<z.ZodString, "many">;
594
+ message: z.ZodString;
595
+ fromNumber: z.ZodOptional<z.ZodString>;
596
+ }, "strip", z.ZodTypeAny, {
597
+ message: string;
598
+ type: "sms_notification";
599
+ name: string;
600
+ provider: "twilio" | "vonage";
601
+ recipients: string[];
602
+ fromNumber?: string | undefined;
603
+ }, {
604
+ message: string;
605
+ type: "sms_notification";
606
+ name: string;
607
+ provider: "twilio" | "vonage";
608
+ recipients: string[];
609
+ fromNumber?: string | undefined;
610
+ }>, z.ZodObject<{
611
+ name: z.ZodString;
612
+ type: z.ZodLiteral<"slack_message">;
613
+ channel: z.ZodString;
614
+ message: z.ZodString;
615
+ mentions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
616
+ threadId: z.ZodOptional<z.ZodString>;
617
+ }, "strip", z.ZodTypeAny, {
618
+ message: string;
619
+ type: "slack_message";
620
+ name: string;
621
+ channel: string;
622
+ mentions?: string[] | undefined;
623
+ threadId?: string | undefined;
624
+ }, {
625
+ message: string;
626
+ type: "slack_message";
627
+ name: string;
628
+ channel: string;
629
+ mentions?: string[] | undefined;
630
+ threadId?: string | undefined;
631
+ }>, z.ZodObject<{
632
+ name: z.ZodString;
633
+ type: z.ZodLiteral<"teams_message">;
634
+ channel: z.ZodString;
635
+ message: z.ZodString;
636
+ mentions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
637
+ teamId: z.ZodOptional<z.ZodString>;
638
+ }, "strip", z.ZodTypeAny, {
639
+ message: string;
640
+ type: "teams_message";
641
+ name: string;
642
+ channel: string;
643
+ mentions?: string[] | undefined;
644
+ teamId?: string | undefined;
645
+ }, {
646
+ message: string;
647
+ type: "teams_message";
648
+ name: string;
649
+ channel: string;
650
+ mentions?: string[] | undefined;
651
+ teamId?: string | undefined;
652
+ }>, z.ZodObject<{
653
+ name: z.ZodString;
654
+ type: z.ZodLiteral<"http_call">;
655
+ url: z.ZodString;
656
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
657
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
658
+ body: z.ZodOptional<z.ZodAny>;
659
+ authentication: z.ZodOptional<z.ZodObject<{
660
+ type: z.ZodEnum<["none", "basic", "bearer", "api_key", "oauth2"]>;
661
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
662
+ }, "strip", z.ZodTypeAny, {
663
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
664
+ credentials?: Record<string, string> | undefined;
665
+ }, {
666
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
667
+ credentials?: Record<string, string> | undefined;
668
+ }>>;
669
+ timeout: z.ZodOptional<z.ZodNumber>;
670
+ }, "strip", z.ZodTypeAny, {
671
+ type: "http_call";
672
+ url: string;
673
+ name: string;
674
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
675
+ headers?: Record<string, string> | undefined;
676
+ timeout?: number | undefined;
677
+ body?: any;
678
+ authentication?: {
679
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
680
+ credentials?: Record<string, string> | undefined;
681
+ } | undefined;
682
+ }, {
683
+ type: "http_call";
684
+ url: string;
685
+ name: string;
686
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
687
+ headers?: Record<string, string> | undefined;
688
+ timeout?: number | undefined;
689
+ body?: any;
690
+ authentication?: {
691
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
692
+ credentials?: Record<string, string> | undefined;
693
+ } | undefined;
694
+ }>, z.ZodObject<{
695
+ name: z.ZodString;
696
+ type: z.ZodLiteral<"webhook_trigger">;
697
+ url: z.ZodString;
698
+ method: z.ZodDefault<z.ZodEnum<["POST", "PUT"]>>;
699
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
700
+ payload: z.ZodOptional<z.ZodAny>;
701
+ retryOnFailure: z.ZodDefault<z.ZodBoolean>;
702
+ maxRetries: z.ZodDefault<z.ZodNumber>;
703
+ }, "strip", z.ZodTypeAny, {
704
+ type: "webhook_trigger";
705
+ url: string;
706
+ name: string;
707
+ method: "POST" | "PUT";
708
+ maxRetries: number;
709
+ retryOnFailure: boolean;
710
+ headers?: Record<string, string> | undefined;
711
+ payload?: any;
712
+ }, {
713
+ type: "webhook_trigger";
714
+ url: string;
715
+ name: string;
716
+ method?: "POST" | "PUT" | undefined;
717
+ headers?: Record<string, string> | undefined;
718
+ payload?: any;
719
+ maxRetries?: number | undefined;
720
+ retryOnFailure?: boolean | undefined;
721
+ }>, z.ZodObject<{
722
+ name: z.ZodString;
723
+ type: z.ZodLiteral<"task_creation">;
724
+ taskObject: z.ZodString;
725
+ subject: z.ZodString;
726
+ description: z.ZodOptional<z.ZodString>;
727
+ assignedTo: z.ZodOptional<z.ZodString>;
728
+ dueDate: z.ZodOptional<z.ZodString>;
729
+ priority: z.ZodOptional<z.ZodString>;
730
+ relatedTo: z.ZodOptional<z.ZodString>;
731
+ additionalFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
732
+ }, "strip", z.ZodTypeAny, {
733
+ type: "task_creation";
734
+ name: string;
735
+ taskObject: string;
736
+ subject: string;
737
+ description?: string | undefined;
738
+ priority?: string | undefined;
739
+ assignedTo?: string | undefined;
740
+ dueDate?: string | undefined;
741
+ relatedTo?: string | undefined;
742
+ additionalFields?: Record<string, any> | undefined;
743
+ }, {
744
+ type: "task_creation";
745
+ name: string;
746
+ taskObject: string;
747
+ subject: string;
748
+ description?: string | undefined;
749
+ priority?: string | undefined;
750
+ assignedTo?: string | undefined;
751
+ dueDate?: string | undefined;
752
+ relatedTo?: string | undefined;
753
+ additionalFields?: Record<string, any> | undefined;
754
+ }>, z.ZodObject<{
755
+ name: z.ZodString;
756
+ type: z.ZodLiteral<"push_notification">;
757
+ title: z.ZodString;
758
+ body: z.ZodString;
759
+ recipients: z.ZodArray<z.ZodString, "many">;
760
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
761
+ badge: z.ZodOptional<z.ZodNumber>;
762
+ sound: z.ZodOptional<z.ZodString>;
763
+ clickAction: z.ZodOptional<z.ZodString>;
764
+ }, "strip", z.ZodTypeAny, {
765
+ type: "push_notification";
766
+ name: string;
767
+ body: string;
768
+ title: string;
769
+ recipients: string[];
770
+ data?: Record<string, any> | undefined;
771
+ badge?: number | undefined;
772
+ sound?: string | undefined;
773
+ clickAction?: string | undefined;
774
+ }, {
775
+ type: "push_notification";
776
+ name: string;
777
+ body: string;
778
+ title: string;
779
+ recipients: string[];
780
+ data?: Record<string, any> | undefined;
781
+ badge?: number | undefined;
782
+ sound?: string | undefined;
783
+ clickAction?: string | undefined;
784
+ }>, z.ZodObject<{
785
+ name: z.ZodString;
786
+ type: z.ZodLiteral<"custom_script">;
787
+ language: z.ZodDefault<z.ZodEnum<["javascript", "typescript", "python"]>>;
788
+ code: z.ZodString;
789
+ timeout: z.ZodDefault<z.ZodNumber>;
790
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
791
+ }, "strip", z.ZodTypeAny, {
792
+ code: string;
793
+ type: "custom_script";
794
+ name: string;
795
+ language: "javascript" | "typescript" | "python";
796
+ timeout: number;
797
+ context?: Record<string, any> | undefined;
798
+ }, {
799
+ code: string;
800
+ type: "custom_script";
801
+ name: string;
802
+ language?: "javascript" | "typescript" | "python" | undefined;
803
+ timeout?: number | undefined;
804
+ context?: Record<string, any> | undefined;
805
+ }>]>, "many">;
806
+ }, "strip", z.ZodTypeAny, {
807
+ actions: ({
808
+ type: "field_update";
809
+ field: string;
810
+ name: string;
811
+ value?: any;
812
+ } | {
813
+ type: "email_alert";
814
+ name: string;
815
+ template: string;
816
+ recipients: string[];
817
+ } | {
818
+ message: string;
819
+ type: "sms_notification";
820
+ name: string;
821
+ provider: "twilio" | "vonage";
822
+ recipients: string[];
823
+ fromNumber?: string | undefined;
824
+ } | {
825
+ message: string;
826
+ type: "slack_message";
827
+ name: string;
828
+ channel: string;
829
+ mentions?: string[] | undefined;
830
+ threadId?: string | undefined;
831
+ } | {
832
+ message: string;
833
+ type: "teams_message";
834
+ name: string;
835
+ channel: string;
836
+ mentions?: string[] | undefined;
837
+ teamId?: string | undefined;
838
+ } | {
839
+ type: "http_call";
840
+ url: string;
841
+ name: string;
842
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
843
+ headers?: Record<string, string> | undefined;
844
+ timeout?: number | undefined;
845
+ body?: any;
846
+ authentication?: {
847
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
848
+ credentials?: Record<string, string> | undefined;
849
+ } | undefined;
850
+ } | {
851
+ type: "webhook_trigger";
852
+ url: string;
853
+ name: string;
854
+ method: "POST" | "PUT";
855
+ maxRetries: number;
856
+ retryOnFailure: boolean;
857
+ headers?: Record<string, string> | undefined;
858
+ payload?: any;
859
+ } | {
860
+ type: "task_creation";
861
+ name: string;
862
+ taskObject: string;
863
+ subject: string;
864
+ description?: string | undefined;
865
+ priority?: string | undefined;
866
+ assignedTo?: string | undefined;
867
+ dueDate?: string | undefined;
868
+ relatedTo?: string | undefined;
869
+ additionalFields?: Record<string, any> | undefined;
870
+ } | {
871
+ type: "push_notification";
872
+ name: string;
873
+ body: string;
874
+ title: string;
875
+ recipients: string[];
876
+ data?: Record<string, any> | undefined;
877
+ badge?: number | undefined;
878
+ sound?: string | undefined;
879
+ clickAction?: string | undefined;
880
+ } | {
881
+ code: string;
882
+ type: "custom_script";
883
+ name: string;
884
+ language: "javascript" | "typescript" | "python";
885
+ timeout: number;
886
+ context?: Record<string, any> | undefined;
887
+ })[];
888
+ timeLength: number;
889
+ timeUnit: "minutes" | "hours" | "days";
890
+ offsetDirection: "before" | "after";
891
+ offsetFrom: "trigger_date" | "date_field";
892
+ id?: string | undefined;
893
+ dateField?: string | undefined;
894
+ }, {
895
+ actions: ({
896
+ type: "field_update";
897
+ field: string;
898
+ name: string;
899
+ value?: any;
900
+ } | {
901
+ type: "email_alert";
902
+ name: string;
903
+ template: string;
904
+ recipients: string[];
905
+ } | {
906
+ message: string;
907
+ type: "sms_notification";
908
+ name: string;
909
+ provider: "twilio" | "vonage";
910
+ recipients: string[];
911
+ fromNumber?: string | undefined;
912
+ } | {
913
+ message: string;
914
+ type: "slack_message";
915
+ name: string;
916
+ channel: string;
917
+ mentions?: string[] | undefined;
918
+ threadId?: string | undefined;
919
+ } | {
920
+ message: string;
921
+ type: "teams_message";
922
+ name: string;
923
+ channel: string;
924
+ mentions?: string[] | undefined;
925
+ teamId?: string | undefined;
926
+ } | {
927
+ type: "http_call";
928
+ url: string;
929
+ name: string;
930
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
931
+ headers?: Record<string, string> | undefined;
932
+ timeout?: number | undefined;
933
+ body?: any;
934
+ authentication?: {
935
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
936
+ credentials?: Record<string, string> | undefined;
937
+ } | undefined;
938
+ } | {
939
+ type: "webhook_trigger";
940
+ url: string;
941
+ name: string;
942
+ method?: "POST" | "PUT" | undefined;
943
+ headers?: Record<string, string> | undefined;
944
+ payload?: any;
945
+ maxRetries?: number | undefined;
946
+ retryOnFailure?: boolean | undefined;
947
+ } | {
948
+ type: "task_creation";
949
+ name: string;
950
+ taskObject: string;
951
+ subject: string;
952
+ description?: string | undefined;
953
+ priority?: string | undefined;
954
+ assignedTo?: string | undefined;
955
+ dueDate?: string | undefined;
956
+ relatedTo?: string | undefined;
957
+ additionalFields?: Record<string, any> | undefined;
958
+ } | {
959
+ type: "push_notification";
960
+ name: string;
961
+ body: string;
962
+ title: string;
963
+ recipients: string[];
964
+ data?: Record<string, any> | undefined;
965
+ badge?: number | undefined;
966
+ sound?: string | undefined;
967
+ clickAction?: string | undefined;
968
+ } | {
969
+ code: string;
970
+ type: "custom_script";
971
+ name: string;
972
+ language?: "javascript" | "typescript" | "python" | undefined;
973
+ timeout?: number | undefined;
974
+ context?: Record<string, any> | undefined;
975
+ })[];
976
+ timeLength: number;
977
+ timeUnit: "minutes" | "hours" | "days";
978
+ offsetDirection: "before" | "after";
979
+ offsetFrom: "trigger_date" | "date_field";
980
+ id?: string | undefined;
981
+ dateField?: string | undefined;
982
+ }>;
983
+ /**
984
+ * Schema for Workflow Rules (Automation)
985
+ */
986
+ export declare const WorkflowRuleSchema: z.ZodObject<{
987
+ /** Machine name */
988
+ name: z.ZodString;
989
+ /** Target Object */
990
+ objectName: z.ZodString;
991
+ /** When to evaluate the rule */
992
+ triggerType: z.ZodEnum<["on_create", "on_update", "on_create_or_update", "on_delete", "schedule"]>;
993
+ /**
994
+ * Condition to start the workflow.
995
+ * If empty, runs on every trigger event.
996
+ */
997
+ criteria: z.ZodOptional<z.ZodString>;
998
+ /** Actions to execute immediately */
999
+ actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1000
+ name: z.ZodString;
1001
+ type: z.ZodLiteral<"field_update">;
1002
+ field: z.ZodString;
1003
+ value: z.ZodAny;
1004
+ }, "strip", z.ZodTypeAny, {
1005
+ type: "field_update";
1006
+ field: string;
1007
+ name: string;
1008
+ value?: any;
1009
+ }, {
1010
+ type: "field_update";
1011
+ field: string;
1012
+ name: string;
1013
+ value?: any;
1014
+ }>, z.ZodObject<{
1015
+ name: z.ZodString;
1016
+ type: z.ZodLiteral<"email_alert">;
1017
+ template: z.ZodString;
1018
+ recipients: z.ZodArray<z.ZodString, "many">;
1019
+ }, "strip", z.ZodTypeAny, {
1020
+ type: "email_alert";
1021
+ name: string;
1022
+ template: string;
1023
+ recipients: string[];
1024
+ }, {
1025
+ type: "email_alert";
1026
+ name: string;
1027
+ template: string;
1028
+ recipients: string[];
1029
+ }>, z.ZodObject<{
1030
+ name: z.ZodString;
1031
+ type: z.ZodLiteral<"sms_notification">;
1032
+ provider: z.ZodEnum<["twilio", "vonage"]>;
1033
+ recipients: z.ZodArray<z.ZodString, "many">;
1034
+ message: z.ZodString;
1035
+ fromNumber: z.ZodOptional<z.ZodString>;
1036
+ }, "strip", z.ZodTypeAny, {
1037
+ message: string;
1038
+ type: "sms_notification";
1039
+ name: string;
1040
+ provider: "twilio" | "vonage";
1041
+ recipients: string[];
1042
+ fromNumber?: string | undefined;
1043
+ }, {
1044
+ message: string;
1045
+ type: "sms_notification";
1046
+ name: string;
1047
+ provider: "twilio" | "vonage";
1048
+ recipients: string[];
1049
+ fromNumber?: string | undefined;
1050
+ }>, z.ZodObject<{
1051
+ name: z.ZodString;
1052
+ type: z.ZodLiteral<"slack_message">;
1053
+ channel: z.ZodString;
1054
+ message: z.ZodString;
1055
+ mentions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1056
+ threadId: z.ZodOptional<z.ZodString>;
1057
+ }, "strip", z.ZodTypeAny, {
1058
+ message: string;
1059
+ type: "slack_message";
1060
+ name: string;
1061
+ channel: string;
1062
+ mentions?: string[] | undefined;
1063
+ threadId?: string | undefined;
1064
+ }, {
1065
+ message: string;
1066
+ type: "slack_message";
1067
+ name: string;
1068
+ channel: string;
1069
+ mentions?: string[] | undefined;
1070
+ threadId?: string | undefined;
1071
+ }>, z.ZodObject<{
1072
+ name: z.ZodString;
1073
+ type: z.ZodLiteral<"teams_message">;
1074
+ channel: z.ZodString;
1075
+ message: z.ZodString;
1076
+ mentions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1077
+ teamId: z.ZodOptional<z.ZodString>;
1078
+ }, "strip", z.ZodTypeAny, {
1079
+ message: string;
1080
+ type: "teams_message";
1081
+ name: string;
1082
+ channel: string;
1083
+ mentions?: string[] | undefined;
1084
+ teamId?: string | undefined;
1085
+ }, {
1086
+ message: string;
1087
+ type: "teams_message";
1088
+ name: string;
1089
+ channel: string;
1090
+ mentions?: string[] | undefined;
1091
+ teamId?: string | undefined;
1092
+ }>, z.ZodObject<{
1093
+ name: z.ZodString;
1094
+ type: z.ZodLiteral<"http_call">;
1095
+ url: z.ZodString;
1096
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
1097
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1098
+ body: z.ZodOptional<z.ZodAny>;
1099
+ authentication: z.ZodOptional<z.ZodObject<{
1100
+ type: z.ZodEnum<["none", "basic", "bearer", "api_key", "oauth2"]>;
1101
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1102
+ }, "strip", z.ZodTypeAny, {
1103
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
1104
+ credentials?: Record<string, string> | undefined;
1105
+ }, {
1106
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
1107
+ credentials?: Record<string, string> | undefined;
1108
+ }>>;
1109
+ timeout: z.ZodOptional<z.ZodNumber>;
1110
+ }, "strip", z.ZodTypeAny, {
1111
+ type: "http_call";
1112
+ url: string;
1113
+ name: string;
1114
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1115
+ headers?: Record<string, string> | undefined;
1116
+ timeout?: number | undefined;
1117
+ body?: any;
1118
+ authentication?: {
1119
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
1120
+ credentials?: Record<string, string> | undefined;
1121
+ } | undefined;
1122
+ }, {
1123
+ type: "http_call";
1124
+ url: string;
1125
+ name: string;
1126
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1127
+ headers?: Record<string, string> | undefined;
1128
+ timeout?: number | undefined;
1129
+ body?: any;
1130
+ authentication?: {
1131
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
1132
+ credentials?: Record<string, string> | undefined;
1133
+ } | undefined;
1134
+ }>, z.ZodObject<{
1135
+ name: z.ZodString;
1136
+ type: z.ZodLiteral<"webhook_trigger">;
1137
+ url: z.ZodString;
1138
+ method: z.ZodDefault<z.ZodEnum<["POST", "PUT"]>>;
1139
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1140
+ payload: z.ZodOptional<z.ZodAny>;
1141
+ retryOnFailure: z.ZodDefault<z.ZodBoolean>;
1142
+ maxRetries: z.ZodDefault<z.ZodNumber>;
1143
+ }, "strip", z.ZodTypeAny, {
1144
+ type: "webhook_trigger";
1145
+ url: string;
1146
+ name: string;
1147
+ method: "POST" | "PUT";
1148
+ maxRetries: number;
1149
+ retryOnFailure: boolean;
1150
+ headers?: Record<string, string> | undefined;
1151
+ payload?: any;
1152
+ }, {
1153
+ type: "webhook_trigger";
1154
+ url: string;
1155
+ name: string;
1156
+ method?: "POST" | "PUT" | undefined;
1157
+ headers?: Record<string, string> | undefined;
1158
+ payload?: any;
1159
+ maxRetries?: number | undefined;
1160
+ retryOnFailure?: boolean | undefined;
1161
+ }>, z.ZodObject<{
1162
+ name: z.ZodString;
1163
+ type: z.ZodLiteral<"task_creation">;
1164
+ taskObject: z.ZodString;
1165
+ subject: z.ZodString;
1166
+ description: z.ZodOptional<z.ZodString>;
1167
+ assignedTo: z.ZodOptional<z.ZodString>;
1168
+ dueDate: z.ZodOptional<z.ZodString>;
1169
+ priority: z.ZodOptional<z.ZodString>;
1170
+ relatedTo: z.ZodOptional<z.ZodString>;
1171
+ additionalFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1172
+ }, "strip", z.ZodTypeAny, {
1173
+ type: "task_creation";
1174
+ name: string;
1175
+ taskObject: string;
1176
+ subject: string;
1177
+ description?: string | undefined;
1178
+ priority?: string | undefined;
1179
+ assignedTo?: string | undefined;
1180
+ dueDate?: string | undefined;
1181
+ relatedTo?: string | undefined;
1182
+ additionalFields?: Record<string, any> | undefined;
1183
+ }, {
1184
+ type: "task_creation";
1185
+ name: string;
1186
+ taskObject: string;
1187
+ subject: string;
1188
+ description?: string | undefined;
1189
+ priority?: string | undefined;
1190
+ assignedTo?: string | undefined;
1191
+ dueDate?: string | undefined;
1192
+ relatedTo?: string | undefined;
1193
+ additionalFields?: Record<string, any> | undefined;
1194
+ }>, z.ZodObject<{
1195
+ name: z.ZodString;
1196
+ type: z.ZodLiteral<"push_notification">;
1197
+ title: z.ZodString;
1198
+ body: z.ZodString;
1199
+ recipients: z.ZodArray<z.ZodString, "many">;
1200
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1201
+ badge: z.ZodOptional<z.ZodNumber>;
1202
+ sound: z.ZodOptional<z.ZodString>;
1203
+ clickAction: z.ZodOptional<z.ZodString>;
1204
+ }, "strip", z.ZodTypeAny, {
1205
+ type: "push_notification";
1206
+ name: string;
1207
+ body: string;
1208
+ title: string;
1209
+ recipients: string[];
1210
+ data?: Record<string, any> | undefined;
1211
+ badge?: number | undefined;
1212
+ sound?: string | undefined;
1213
+ clickAction?: string | undefined;
1214
+ }, {
1215
+ type: "push_notification";
1216
+ name: string;
1217
+ body: string;
1218
+ title: string;
1219
+ recipients: string[];
1220
+ data?: Record<string, any> | undefined;
1221
+ badge?: number | undefined;
1222
+ sound?: string | undefined;
1223
+ clickAction?: string | undefined;
1224
+ }>, z.ZodObject<{
1225
+ name: z.ZodString;
1226
+ type: z.ZodLiteral<"custom_script">;
1227
+ language: z.ZodDefault<z.ZodEnum<["javascript", "typescript", "python"]>>;
1228
+ code: z.ZodString;
1229
+ timeout: z.ZodDefault<z.ZodNumber>;
1230
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1231
+ }, "strip", z.ZodTypeAny, {
1232
+ code: string;
1233
+ type: "custom_script";
1234
+ name: string;
1235
+ language: "javascript" | "typescript" | "python";
1236
+ timeout: number;
1237
+ context?: Record<string, any> | undefined;
1238
+ }, {
1239
+ code: string;
1240
+ type: "custom_script";
1241
+ name: string;
1242
+ language?: "javascript" | "typescript" | "python" | undefined;
1243
+ timeout?: number | undefined;
1244
+ context?: Record<string, any> | undefined;
1245
+ }>]>, "many">>;
1246
+ /**
1247
+ * Time-Dependent Actions
1248
+ * Actions scheduled to run in the future.
1249
+ */
1250
+ timeTriggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1251
+ id: z.ZodOptional<z.ZodString>;
1252
+ /** Timing Logic */
1253
+ timeLength: z.ZodNumber;
1254
+ timeUnit: z.ZodEnum<["minutes", "hours", "days"]>;
1255
+ /** Reference Point */
1256
+ offsetDirection: z.ZodEnum<["before", "after"]>;
1257
+ offsetFrom: z.ZodEnum<["trigger_date", "date_field"]>;
1258
+ dateField: z.ZodOptional<z.ZodString>;
1259
+ /** Actions */
1260
+ actions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1261
+ name: z.ZodString;
1262
+ type: z.ZodLiteral<"field_update">;
1263
+ field: z.ZodString;
1264
+ value: z.ZodAny;
1265
+ }, "strip", z.ZodTypeAny, {
1266
+ type: "field_update";
1267
+ field: string;
1268
+ name: string;
1269
+ value?: any;
1270
+ }, {
1271
+ type: "field_update";
1272
+ field: string;
1273
+ name: string;
1274
+ value?: any;
1275
+ }>, z.ZodObject<{
1276
+ name: z.ZodString;
1277
+ type: z.ZodLiteral<"email_alert">;
1278
+ template: z.ZodString;
1279
+ recipients: z.ZodArray<z.ZodString, "many">;
1280
+ }, "strip", z.ZodTypeAny, {
1281
+ type: "email_alert";
1282
+ name: string;
1283
+ template: string;
1284
+ recipients: string[];
1285
+ }, {
1286
+ type: "email_alert";
1287
+ name: string;
1288
+ template: string;
1289
+ recipients: string[];
1290
+ }>, z.ZodObject<{
1291
+ name: z.ZodString;
1292
+ type: z.ZodLiteral<"sms_notification">;
1293
+ provider: z.ZodEnum<["twilio", "vonage"]>;
1294
+ recipients: z.ZodArray<z.ZodString, "many">;
1295
+ message: z.ZodString;
1296
+ fromNumber: z.ZodOptional<z.ZodString>;
1297
+ }, "strip", z.ZodTypeAny, {
1298
+ message: string;
1299
+ type: "sms_notification";
1300
+ name: string;
1301
+ provider: "twilio" | "vonage";
1302
+ recipients: string[];
1303
+ fromNumber?: string | undefined;
1304
+ }, {
1305
+ message: string;
1306
+ type: "sms_notification";
1307
+ name: string;
1308
+ provider: "twilio" | "vonage";
1309
+ recipients: string[];
1310
+ fromNumber?: string | undefined;
1311
+ }>, z.ZodObject<{
1312
+ name: z.ZodString;
1313
+ type: z.ZodLiteral<"slack_message">;
1314
+ channel: z.ZodString;
1315
+ message: z.ZodString;
1316
+ mentions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1317
+ threadId: z.ZodOptional<z.ZodString>;
1318
+ }, "strip", z.ZodTypeAny, {
1319
+ message: string;
1320
+ type: "slack_message";
1321
+ name: string;
1322
+ channel: string;
1323
+ mentions?: string[] | undefined;
1324
+ threadId?: string | undefined;
1325
+ }, {
1326
+ message: string;
1327
+ type: "slack_message";
1328
+ name: string;
1329
+ channel: string;
1330
+ mentions?: string[] | undefined;
1331
+ threadId?: string | undefined;
1332
+ }>, z.ZodObject<{
1333
+ name: z.ZodString;
1334
+ type: z.ZodLiteral<"teams_message">;
1335
+ channel: z.ZodString;
1336
+ message: z.ZodString;
1337
+ mentions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1338
+ teamId: z.ZodOptional<z.ZodString>;
1339
+ }, "strip", z.ZodTypeAny, {
1340
+ message: string;
1341
+ type: "teams_message";
1342
+ name: string;
1343
+ channel: string;
1344
+ mentions?: string[] | undefined;
1345
+ teamId?: string | undefined;
1346
+ }, {
1347
+ message: string;
1348
+ type: "teams_message";
1349
+ name: string;
1350
+ channel: string;
1351
+ mentions?: string[] | undefined;
1352
+ teamId?: string | undefined;
1353
+ }>, z.ZodObject<{
1354
+ name: z.ZodString;
1355
+ type: z.ZodLiteral<"http_call">;
1356
+ url: z.ZodString;
1357
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
1358
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1359
+ body: z.ZodOptional<z.ZodAny>;
1360
+ authentication: z.ZodOptional<z.ZodObject<{
1361
+ type: z.ZodEnum<["none", "basic", "bearer", "api_key", "oauth2"]>;
1362
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1363
+ }, "strip", z.ZodTypeAny, {
1364
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
1365
+ credentials?: Record<string, string> | undefined;
1366
+ }, {
1367
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
1368
+ credentials?: Record<string, string> | undefined;
1369
+ }>>;
1370
+ timeout: z.ZodOptional<z.ZodNumber>;
1371
+ }, "strip", z.ZodTypeAny, {
1372
+ type: "http_call";
1373
+ url: string;
1374
+ name: string;
1375
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1376
+ headers?: Record<string, string> | undefined;
1377
+ timeout?: number | undefined;
1378
+ body?: any;
1379
+ authentication?: {
1380
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
1381
+ credentials?: Record<string, string> | undefined;
1382
+ } | undefined;
1383
+ }, {
1384
+ type: "http_call";
1385
+ url: string;
1386
+ name: string;
1387
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1388
+ headers?: Record<string, string> | undefined;
1389
+ timeout?: number | undefined;
1390
+ body?: any;
1391
+ authentication?: {
1392
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
1393
+ credentials?: Record<string, string> | undefined;
1394
+ } | undefined;
1395
+ }>, z.ZodObject<{
1396
+ name: z.ZodString;
1397
+ type: z.ZodLiteral<"webhook_trigger">;
1398
+ url: z.ZodString;
1399
+ method: z.ZodDefault<z.ZodEnum<["POST", "PUT"]>>;
1400
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1401
+ payload: z.ZodOptional<z.ZodAny>;
1402
+ retryOnFailure: z.ZodDefault<z.ZodBoolean>;
1403
+ maxRetries: z.ZodDefault<z.ZodNumber>;
1404
+ }, "strip", z.ZodTypeAny, {
1405
+ type: "webhook_trigger";
1406
+ url: string;
1407
+ name: string;
1408
+ method: "POST" | "PUT";
1409
+ maxRetries: number;
1410
+ retryOnFailure: boolean;
1411
+ headers?: Record<string, string> | undefined;
1412
+ payload?: any;
1413
+ }, {
1414
+ type: "webhook_trigger";
1415
+ url: string;
1416
+ name: string;
1417
+ method?: "POST" | "PUT" | undefined;
1418
+ headers?: Record<string, string> | undefined;
1419
+ payload?: any;
1420
+ maxRetries?: number | undefined;
1421
+ retryOnFailure?: boolean | undefined;
1422
+ }>, z.ZodObject<{
1423
+ name: z.ZodString;
1424
+ type: z.ZodLiteral<"task_creation">;
1425
+ taskObject: z.ZodString;
1426
+ subject: z.ZodString;
1427
+ description: z.ZodOptional<z.ZodString>;
1428
+ assignedTo: z.ZodOptional<z.ZodString>;
1429
+ dueDate: z.ZodOptional<z.ZodString>;
1430
+ priority: z.ZodOptional<z.ZodString>;
1431
+ relatedTo: z.ZodOptional<z.ZodString>;
1432
+ additionalFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1433
+ }, "strip", z.ZodTypeAny, {
1434
+ type: "task_creation";
1435
+ name: string;
1436
+ taskObject: string;
1437
+ subject: string;
1438
+ description?: string | undefined;
1439
+ priority?: string | undefined;
1440
+ assignedTo?: string | undefined;
1441
+ dueDate?: string | undefined;
1442
+ relatedTo?: string | undefined;
1443
+ additionalFields?: Record<string, any> | undefined;
1444
+ }, {
1445
+ type: "task_creation";
1446
+ name: string;
1447
+ taskObject: string;
1448
+ subject: string;
1449
+ description?: string | undefined;
1450
+ priority?: string | undefined;
1451
+ assignedTo?: string | undefined;
1452
+ dueDate?: string | undefined;
1453
+ relatedTo?: string | undefined;
1454
+ additionalFields?: Record<string, any> | undefined;
1455
+ }>, z.ZodObject<{
1456
+ name: z.ZodString;
1457
+ type: z.ZodLiteral<"push_notification">;
1458
+ title: z.ZodString;
1459
+ body: z.ZodString;
1460
+ recipients: z.ZodArray<z.ZodString, "many">;
1461
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1462
+ badge: z.ZodOptional<z.ZodNumber>;
1463
+ sound: z.ZodOptional<z.ZodString>;
1464
+ clickAction: z.ZodOptional<z.ZodString>;
1465
+ }, "strip", z.ZodTypeAny, {
1466
+ type: "push_notification";
1467
+ name: string;
1468
+ body: string;
1469
+ title: string;
1470
+ recipients: string[];
1471
+ data?: Record<string, any> | undefined;
1472
+ badge?: number | undefined;
1473
+ sound?: string | undefined;
1474
+ clickAction?: string | undefined;
1475
+ }, {
1476
+ type: "push_notification";
1477
+ name: string;
1478
+ body: string;
1479
+ title: string;
1480
+ recipients: string[];
1481
+ data?: Record<string, any> | undefined;
1482
+ badge?: number | undefined;
1483
+ sound?: string | undefined;
1484
+ clickAction?: string | undefined;
1485
+ }>, z.ZodObject<{
1486
+ name: z.ZodString;
1487
+ type: z.ZodLiteral<"custom_script">;
1488
+ language: z.ZodDefault<z.ZodEnum<["javascript", "typescript", "python"]>>;
1489
+ code: z.ZodString;
1490
+ timeout: z.ZodDefault<z.ZodNumber>;
1491
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1492
+ }, "strip", z.ZodTypeAny, {
1493
+ code: string;
1494
+ type: "custom_script";
1495
+ name: string;
1496
+ language: "javascript" | "typescript" | "python";
1497
+ timeout: number;
1498
+ context?: Record<string, any> | undefined;
1499
+ }, {
1500
+ code: string;
1501
+ type: "custom_script";
1502
+ name: string;
1503
+ language?: "javascript" | "typescript" | "python" | undefined;
1504
+ timeout?: number | undefined;
1505
+ context?: Record<string, any> | undefined;
1506
+ }>]>, "many">;
1507
+ }, "strip", z.ZodTypeAny, {
1508
+ actions: ({
1509
+ type: "field_update";
1510
+ field: string;
1511
+ name: string;
1512
+ value?: any;
1513
+ } | {
1514
+ type: "email_alert";
1515
+ name: string;
1516
+ template: string;
1517
+ recipients: string[];
1518
+ } | {
1519
+ message: string;
1520
+ type: "sms_notification";
1521
+ name: string;
1522
+ provider: "twilio" | "vonage";
1523
+ recipients: string[];
1524
+ fromNumber?: string | undefined;
1525
+ } | {
1526
+ message: string;
1527
+ type: "slack_message";
1528
+ name: string;
1529
+ channel: string;
1530
+ mentions?: string[] | undefined;
1531
+ threadId?: string | undefined;
1532
+ } | {
1533
+ message: string;
1534
+ type: "teams_message";
1535
+ name: string;
1536
+ channel: string;
1537
+ mentions?: string[] | undefined;
1538
+ teamId?: string | undefined;
1539
+ } | {
1540
+ type: "http_call";
1541
+ url: string;
1542
+ name: string;
1543
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1544
+ headers?: Record<string, string> | undefined;
1545
+ timeout?: number | undefined;
1546
+ body?: any;
1547
+ authentication?: {
1548
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
1549
+ credentials?: Record<string, string> | undefined;
1550
+ } | undefined;
1551
+ } | {
1552
+ type: "webhook_trigger";
1553
+ url: string;
1554
+ name: string;
1555
+ method: "POST" | "PUT";
1556
+ maxRetries: number;
1557
+ retryOnFailure: boolean;
1558
+ headers?: Record<string, string> | undefined;
1559
+ payload?: any;
1560
+ } | {
1561
+ type: "task_creation";
1562
+ name: string;
1563
+ taskObject: string;
1564
+ subject: string;
1565
+ description?: string | undefined;
1566
+ priority?: string | undefined;
1567
+ assignedTo?: string | undefined;
1568
+ dueDate?: string | undefined;
1569
+ relatedTo?: string | undefined;
1570
+ additionalFields?: Record<string, any> | undefined;
1571
+ } | {
1572
+ type: "push_notification";
1573
+ name: string;
1574
+ body: string;
1575
+ title: string;
1576
+ recipients: string[];
1577
+ data?: Record<string, any> | undefined;
1578
+ badge?: number | undefined;
1579
+ sound?: string | undefined;
1580
+ clickAction?: string | undefined;
1581
+ } | {
1582
+ code: string;
1583
+ type: "custom_script";
1584
+ name: string;
1585
+ language: "javascript" | "typescript" | "python";
1586
+ timeout: number;
1587
+ context?: Record<string, any> | undefined;
1588
+ })[];
1589
+ timeLength: number;
1590
+ timeUnit: "minutes" | "hours" | "days";
1591
+ offsetDirection: "before" | "after";
1592
+ offsetFrom: "trigger_date" | "date_field";
1593
+ id?: string | undefined;
1594
+ dateField?: string | undefined;
1595
+ }, {
1596
+ actions: ({
1597
+ type: "field_update";
1598
+ field: string;
1599
+ name: string;
1600
+ value?: any;
1601
+ } | {
1602
+ type: "email_alert";
1603
+ name: string;
1604
+ template: string;
1605
+ recipients: string[];
1606
+ } | {
1607
+ message: string;
1608
+ type: "sms_notification";
1609
+ name: string;
1610
+ provider: "twilio" | "vonage";
1611
+ recipients: string[];
1612
+ fromNumber?: string | undefined;
1613
+ } | {
1614
+ message: string;
1615
+ type: "slack_message";
1616
+ name: string;
1617
+ channel: string;
1618
+ mentions?: string[] | undefined;
1619
+ threadId?: string | undefined;
1620
+ } | {
1621
+ message: string;
1622
+ type: "teams_message";
1623
+ name: string;
1624
+ channel: string;
1625
+ mentions?: string[] | undefined;
1626
+ teamId?: string | undefined;
1627
+ } | {
1628
+ type: "http_call";
1629
+ url: string;
1630
+ name: string;
1631
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1632
+ headers?: Record<string, string> | undefined;
1633
+ timeout?: number | undefined;
1634
+ body?: any;
1635
+ authentication?: {
1636
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
1637
+ credentials?: Record<string, string> | undefined;
1638
+ } | undefined;
1639
+ } | {
1640
+ type: "webhook_trigger";
1641
+ url: string;
1642
+ name: string;
1643
+ method?: "POST" | "PUT" | undefined;
1644
+ headers?: Record<string, string> | undefined;
1645
+ payload?: any;
1646
+ maxRetries?: number | undefined;
1647
+ retryOnFailure?: boolean | undefined;
1648
+ } | {
1649
+ type: "task_creation";
1650
+ name: string;
1651
+ taskObject: string;
1652
+ subject: string;
1653
+ description?: string | undefined;
1654
+ priority?: string | undefined;
1655
+ assignedTo?: string | undefined;
1656
+ dueDate?: string | undefined;
1657
+ relatedTo?: string | undefined;
1658
+ additionalFields?: Record<string, any> | undefined;
1659
+ } | {
1660
+ type: "push_notification";
1661
+ name: string;
1662
+ body: string;
1663
+ title: string;
1664
+ recipients: string[];
1665
+ data?: Record<string, any> | undefined;
1666
+ badge?: number | undefined;
1667
+ sound?: string | undefined;
1668
+ clickAction?: string | undefined;
1669
+ } | {
1670
+ code: string;
1671
+ type: "custom_script";
1672
+ name: string;
1673
+ language?: "javascript" | "typescript" | "python" | undefined;
1674
+ timeout?: number | undefined;
1675
+ context?: Record<string, any> | undefined;
1676
+ })[];
1677
+ timeLength: number;
1678
+ timeUnit: "minutes" | "hours" | "days";
1679
+ offsetDirection: "before" | "after";
1680
+ offsetFrom: "trigger_date" | "date_field";
1681
+ id?: string | undefined;
1682
+ dateField?: string | undefined;
1683
+ }>, "many">>;
1684
+ /** Active status */
1685
+ active: z.ZodDefault<z.ZodBoolean>;
1686
+ /** Recursion Control */
1687
+ reevaluateOnChange: z.ZodDefault<z.ZodBoolean>;
1688
+ }, "strip", z.ZodTypeAny, {
1689
+ name: string;
1690
+ active: boolean;
1691
+ objectName: string;
1692
+ triggerType: "schedule" | "on_update" | "on_create" | "on_create_or_update" | "on_delete";
1693
+ reevaluateOnChange: boolean;
1694
+ criteria?: string | undefined;
1695
+ actions?: ({
1696
+ type: "field_update";
1697
+ field: string;
1698
+ name: string;
1699
+ value?: any;
1700
+ } | {
1701
+ type: "email_alert";
1702
+ name: string;
1703
+ template: string;
1704
+ recipients: string[];
1705
+ } | {
1706
+ message: string;
1707
+ type: "sms_notification";
1708
+ name: string;
1709
+ provider: "twilio" | "vonage";
1710
+ recipients: string[];
1711
+ fromNumber?: string | undefined;
1712
+ } | {
1713
+ message: string;
1714
+ type: "slack_message";
1715
+ name: string;
1716
+ channel: string;
1717
+ mentions?: string[] | undefined;
1718
+ threadId?: string | undefined;
1719
+ } | {
1720
+ message: string;
1721
+ type: "teams_message";
1722
+ name: string;
1723
+ channel: string;
1724
+ mentions?: string[] | undefined;
1725
+ teamId?: string | undefined;
1726
+ } | {
1727
+ type: "http_call";
1728
+ url: string;
1729
+ name: string;
1730
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1731
+ headers?: Record<string, string> | undefined;
1732
+ timeout?: number | undefined;
1733
+ body?: any;
1734
+ authentication?: {
1735
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
1736
+ credentials?: Record<string, string> | undefined;
1737
+ } | undefined;
1738
+ } | {
1739
+ type: "webhook_trigger";
1740
+ url: string;
1741
+ name: string;
1742
+ method: "POST" | "PUT";
1743
+ maxRetries: number;
1744
+ retryOnFailure: boolean;
1745
+ headers?: Record<string, string> | undefined;
1746
+ payload?: any;
1747
+ } | {
1748
+ type: "task_creation";
1749
+ name: string;
1750
+ taskObject: string;
1751
+ subject: string;
1752
+ description?: string | undefined;
1753
+ priority?: string | undefined;
1754
+ assignedTo?: string | undefined;
1755
+ dueDate?: string | undefined;
1756
+ relatedTo?: string | undefined;
1757
+ additionalFields?: Record<string, any> | undefined;
1758
+ } | {
1759
+ type: "push_notification";
1760
+ name: string;
1761
+ body: string;
1762
+ title: string;
1763
+ recipients: string[];
1764
+ data?: Record<string, any> | undefined;
1765
+ badge?: number | undefined;
1766
+ sound?: string | undefined;
1767
+ clickAction?: string | undefined;
1768
+ } | {
1769
+ code: string;
1770
+ type: "custom_script";
1771
+ name: string;
1772
+ language: "javascript" | "typescript" | "python";
1773
+ timeout: number;
1774
+ context?: Record<string, any> | undefined;
1775
+ })[] | undefined;
1776
+ timeTriggers?: {
1777
+ actions: ({
1778
+ type: "field_update";
1779
+ field: string;
1780
+ name: string;
1781
+ value?: any;
1782
+ } | {
1783
+ type: "email_alert";
1784
+ name: string;
1785
+ template: string;
1786
+ recipients: string[];
1787
+ } | {
1788
+ message: string;
1789
+ type: "sms_notification";
1790
+ name: string;
1791
+ provider: "twilio" | "vonage";
1792
+ recipients: string[];
1793
+ fromNumber?: string | undefined;
1794
+ } | {
1795
+ message: string;
1796
+ type: "slack_message";
1797
+ name: string;
1798
+ channel: string;
1799
+ mentions?: string[] | undefined;
1800
+ threadId?: string | undefined;
1801
+ } | {
1802
+ message: string;
1803
+ type: "teams_message";
1804
+ name: string;
1805
+ channel: string;
1806
+ mentions?: string[] | undefined;
1807
+ teamId?: string | undefined;
1808
+ } | {
1809
+ type: "http_call";
1810
+ url: string;
1811
+ name: string;
1812
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1813
+ headers?: Record<string, string> | undefined;
1814
+ timeout?: number | undefined;
1815
+ body?: any;
1816
+ authentication?: {
1817
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
1818
+ credentials?: Record<string, string> | undefined;
1819
+ } | undefined;
1820
+ } | {
1821
+ type: "webhook_trigger";
1822
+ url: string;
1823
+ name: string;
1824
+ method: "POST" | "PUT";
1825
+ maxRetries: number;
1826
+ retryOnFailure: boolean;
1827
+ headers?: Record<string, string> | undefined;
1828
+ payload?: any;
1829
+ } | {
1830
+ type: "task_creation";
1831
+ name: string;
1832
+ taskObject: string;
1833
+ subject: string;
1834
+ description?: string | undefined;
1835
+ priority?: string | undefined;
1836
+ assignedTo?: string | undefined;
1837
+ dueDate?: string | undefined;
1838
+ relatedTo?: string | undefined;
1839
+ additionalFields?: Record<string, any> | undefined;
1840
+ } | {
1841
+ type: "push_notification";
1842
+ name: string;
1843
+ body: string;
1844
+ title: string;
1845
+ recipients: string[];
1846
+ data?: Record<string, any> | undefined;
1847
+ badge?: number | undefined;
1848
+ sound?: string | undefined;
1849
+ clickAction?: string | undefined;
1850
+ } | {
1851
+ code: string;
1852
+ type: "custom_script";
1853
+ name: string;
1854
+ language: "javascript" | "typescript" | "python";
1855
+ timeout: number;
1856
+ context?: Record<string, any> | undefined;
1857
+ })[];
1858
+ timeLength: number;
1859
+ timeUnit: "minutes" | "hours" | "days";
1860
+ offsetDirection: "before" | "after";
1861
+ offsetFrom: "trigger_date" | "date_field";
1862
+ id?: string | undefined;
1863
+ dateField?: string | undefined;
1864
+ }[] | undefined;
1865
+ }, {
1866
+ name: string;
1867
+ objectName: string;
1868
+ triggerType: "schedule" | "on_update" | "on_create" | "on_create_or_update" | "on_delete";
1869
+ active?: boolean | undefined;
1870
+ criteria?: string | undefined;
1871
+ actions?: ({
1872
+ type: "field_update";
1873
+ field: string;
1874
+ name: string;
1875
+ value?: any;
1876
+ } | {
1877
+ type: "email_alert";
1878
+ name: string;
1879
+ template: string;
1880
+ recipients: string[];
1881
+ } | {
1882
+ message: string;
1883
+ type: "sms_notification";
1884
+ name: string;
1885
+ provider: "twilio" | "vonage";
1886
+ recipients: string[];
1887
+ fromNumber?: string | undefined;
1888
+ } | {
1889
+ message: string;
1890
+ type: "slack_message";
1891
+ name: string;
1892
+ channel: string;
1893
+ mentions?: string[] | undefined;
1894
+ threadId?: string | undefined;
1895
+ } | {
1896
+ message: string;
1897
+ type: "teams_message";
1898
+ name: string;
1899
+ channel: string;
1900
+ mentions?: string[] | undefined;
1901
+ teamId?: string | undefined;
1902
+ } | {
1903
+ type: "http_call";
1904
+ url: string;
1905
+ name: string;
1906
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1907
+ headers?: Record<string, string> | undefined;
1908
+ timeout?: number | undefined;
1909
+ body?: any;
1910
+ authentication?: {
1911
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
1912
+ credentials?: Record<string, string> | undefined;
1913
+ } | undefined;
1914
+ } | {
1915
+ type: "webhook_trigger";
1916
+ url: string;
1917
+ name: string;
1918
+ method?: "POST" | "PUT" | undefined;
1919
+ headers?: Record<string, string> | undefined;
1920
+ payload?: any;
1921
+ maxRetries?: number | undefined;
1922
+ retryOnFailure?: boolean | undefined;
1923
+ } | {
1924
+ type: "task_creation";
1925
+ name: string;
1926
+ taskObject: string;
1927
+ subject: string;
1928
+ description?: string | undefined;
1929
+ priority?: string | undefined;
1930
+ assignedTo?: string | undefined;
1931
+ dueDate?: string | undefined;
1932
+ relatedTo?: string | undefined;
1933
+ additionalFields?: Record<string, any> | undefined;
1934
+ } | {
1935
+ type: "push_notification";
1936
+ name: string;
1937
+ body: string;
1938
+ title: string;
1939
+ recipients: string[];
1940
+ data?: Record<string, any> | undefined;
1941
+ badge?: number | undefined;
1942
+ sound?: string | undefined;
1943
+ clickAction?: string | undefined;
1944
+ } | {
1945
+ code: string;
1946
+ type: "custom_script";
1947
+ name: string;
1948
+ language?: "javascript" | "typescript" | "python" | undefined;
1949
+ timeout?: number | undefined;
1950
+ context?: Record<string, any> | undefined;
1951
+ })[] | undefined;
1952
+ timeTriggers?: {
1953
+ actions: ({
1954
+ type: "field_update";
1955
+ field: string;
1956
+ name: string;
1957
+ value?: any;
1958
+ } | {
1959
+ type: "email_alert";
1960
+ name: string;
1961
+ template: string;
1962
+ recipients: string[];
1963
+ } | {
1964
+ message: string;
1965
+ type: "sms_notification";
1966
+ name: string;
1967
+ provider: "twilio" | "vonage";
1968
+ recipients: string[];
1969
+ fromNumber?: string | undefined;
1970
+ } | {
1971
+ message: string;
1972
+ type: "slack_message";
1973
+ name: string;
1974
+ channel: string;
1975
+ mentions?: string[] | undefined;
1976
+ threadId?: string | undefined;
1977
+ } | {
1978
+ message: string;
1979
+ type: "teams_message";
1980
+ name: string;
1981
+ channel: string;
1982
+ mentions?: string[] | undefined;
1983
+ teamId?: string | undefined;
1984
+ } | {
1985
+ type: "http_call";
1986
+ url: string;
1987
+ name: string;
1988
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1989
+ headers?: Record<string, string> | undefined;
1990
+ timeout?: number | undefined;
1991
+ body?: any;
1992
+ authentication?: {
1993
+ type: "none" | "basic" | "bearer" | "api_key" | "oauth2";
1994
+ credentials?: Record<string, string> | undefined;
1995
+ } | undefined;
1996
+ } | {
1997
+ type: "webhook_trigger";
1998
+ url: string;
1999
+ name: string;
2000
+ method?: "POST" | "PUT" | undefined;
2001
+ headers?: Record<string, string> | undefined;
2002
+ payload?: any;
2003
+ maxRetries?: number | undefined;
2004
+ retryOnFailure?: boolean | undefined;
2005
+ } | {
2006
+ type: "task_creation";
2007
+ name: string;
2008
+ taskObject: string;
2009
+ subject: string;
2010
+ description?: string | undefined;
2011
+ priority?: string | undefined;
2012
+ assignedTo?: string | undefined;
2013
+ dueDate?: string | undefined;
2014
+ relatedTo?: string | undefined;
2015
+ additionalFields?: Record<string, any> | undefined;
2016
+ } | {
2017
+ type: "push_notification";
2018
+ name: string;
2019
+ body: string;
2020
+ title: string;
2021
+ recipients: string[];
2022
+ data?: Record<string, any> | undefined;
2023
+ badge?: number | undefined;
2024
+ sound?: string | undefined;
2025
+ clickAction?: string | undefined;
2026
+ } | {
2027
+ code: string;
2028
+ type: "custom_script";
2029
+ name: string;
2030
+ language?: "javascript" | "typescript" | "python" | undefined;
2031
+ timeout?: number | undefined;
2032
+ context?: Record<string, any> | undefined;
2033
+ })[];
2034
+ timeLength: number;
2035
+ timeUnit: "minutes" | "hours" | "days";
2036
+ offsetDirection: "before" | "after";
2037
+ offsetFrom: "trigger_date" | "date_field";
2038
+ id?: string | undefined;
2039
+ dateField?: string | undefined;
2040
+ }[] | undefined;
2041
+ reevaluateOnChange?: boolean | undefined;
2042
+ }>;
2043
+ export type WorkflowRule = z.infer<typeof WorkflowRuleSchema>;
2044
+ export type TimeTrigger = z.infer<typeof TimeTriggerSchema>;
2045
+ //# sourceMappingURL=workflow.zod.d.ts.map