@objectstack/spec 0.3.3 → 0.4.2

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 (304) hide show
  1. package/dist/ai/conversation.zod.d.ts +14 -14
  2. package/dist/ai/cost.zod.d.ts +112 -112
  3. package/dist/ai/model-registry.zod.d.ts +44 -44
  4. package/dist/ai/nlq.zod.d.ts +2 -2
  5. package/dist/ai/orchestration.zod.d.ts +6 -6
  6. package/dist/ai/predictive.zod.d.ts +8 -8
  7. package/dist/ai/rag-pipeline.zod.d.ts +62 -62
  8. package/dist/api/contract.zod.d.ts +92 -92
  9. package/dist/api/discovery.zod.d.ts +2 -2
  10. package/dist/api/index.d.ts +2 -0
  11. package/dist/api/index.d.ts.map +1 -1
  12. package/dist/api/index.js +2 -0
  13. package/dist/api/odata.zod.d.ts +482 -0
  14. package/dist/api/odata.zod.d.ts.map +1 -0
  15. package/dist/api/odata.zod.js +401 -0
  16. package/dist/api/router.zod.d.ts +4 -4
  17. package/dist/auth/config.zod.d.ts +21 -21
  18. package/dist/auth/index.d.ts +1 -0
  19. package/dist/auth/index.d.ts.map +1 -1
  20. package/dist/auth/index.js +1 -0
  21. package/dist/auth/organization.zod.d.ts +2 -2
  22. package/dist/auth/role.zod.d.ts +14 -0
  23. package/dist/auth/role.zod.d.ts.map +1 -1
  24. package/dist/auth/role.zod.js +16 -1
  25. package/dist/auth/scim.zod.d.ts +2732 -0
  26. package/dist/auth/scim.zod.d.ts.map +1 -0
  27. package/dist/auth/scim.zod.js +811 -0
  28. package/dist/automation/approval.zod.d.ts +643 -0
  29. package/dist/automation/approval.zod.d.ts.map +1 -0
  30. package/dist/automation/approval.zod.js +84 -0
  31. package/dist/automation/connector.zod.d.ts +1284 -0
  32. package/dist/automation/connector.zod.d.ts.map +1 -0
  33. package/dist/automation/connector.zod.js +500 -0
  34. package/dist/automation/etl.zod.d.ts +623 -0
  35. package/dist/automation/etl.zod.d.ts.map +1 -0
  36. package/dist/automation/etl.zod.js +359 -0
  37. package/dist/automation/flow.zod.d.ts +6 -6
  38. package/dist/automation/index.d.ts +4 -0
  39. package/dist/automation/index.d.ts.map +1 -1
  40. package/dist/automation/index.js +4 -0
  41. package/dist/automation/sync.zod.d.ts +854 -0
  42. package/dist/automation/sync.zod.d.ts.map +1 -0
  43. package/dist/automation/sync.zod.js +444 -0
  44. package/dist/automation/webhook.zod.d.ts +24 -1
  45. package/dist/automation/webhook.zod.d.ts.map +1 -1
  46. package/dist/automation/webhook.zod.js +27 -3
  47. package/dist/automation/workflow.zod.d.ts +14 -0
  48. package/dist/automation/workflow.zod.d.ts.map +1 -1
  49. package/dist/automation/workflow.zod.js +16 -1
  50. package/dist/data/field.zod.d.ts +338 -8
  51. package/dist/data/field.zod.d.ts.map +1 -1
  52. package/dist/data/field.zod.js +100 -16
  53. package/dist/data/mapping.zod.d.ts +22 -10
  54. package/dist/data/mapping.zod.d.ts.map +1 -1
  55. package/dist/data/mapping.zod.js +16 -3
  56. package/dist/data/object.zod.d.ts +116 -22
  57. package/dist/data/object.zod.d.ts.map +1 -1
  58. package/dist/data/object.zod.js +4 -4
  59. package/dist/data/validation.zod.d.ts +18 -18
  60. package/dist/hub/composer.zod.d.ts +43 -1940
  61. package/dist/hub/composer.zod.d.ts.map +1 -1
  62. package/dist/hub/composer.zod.js +1 -1
  63. package/dist/hub/license.zod.d.ts +2 -2
  64. package/dist/hub/marketplace.zod.d.ts +6 -6
  65. package/dist/index.d.ts +2 -2
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +6 -3
  68. package/dist/permission/index.d.ts +7 -5
  69. package/dist/permission/index.d.ts.map +1 -1
  70. package/dist/permission/index.js +7 -5
  71. package/dist/permission/permission.zod.d.ts +14 -0
  72. package/dist/permission/permission.zod.d.ts.map +1 -1
  73. package/dist/permission/permission.zod.js +16 -1
  74. package/dist/permission/rls.zod.d.ts +605 -0
  75. package/dist/permission/rls.zod.d.ts.map +1 -0
  76. package/dist/permission/rls.zod.js +615 -0
  77. package/dist/permission/territory.zod.d.ts +13 -0
  78. package/dist/permission/territory.zod.d.ts.map +1 -1
  79. package/dist/permission/territory.zod.js +15 -1
  80. package/dist/shared/identifiers.zod.d.ts +87 -0
  81. package/dist/shared/identifiers.zod.d.ts.map +1 -0
  82. package/dist/shared/identifiers.zod.js +101 -0
  83. package/dist/shared/index.d.ts +6 -0
  84. package/dist/shared/index.d.ts.map +1 -0
  85. package/dist/{driver → shared}/index.js +5 -4
  86. package/dist/stack.zod.d.ts +19869 -0
  87. package/dist/stack.zod.d.ts.map +1 -0
  88. package/dist/stack.zod.js +248 -0
  89. package/dist/system/audit.zod.d.ts +12 -12
  90. package/dist/{kernel → system}/context.zod.d.ts.map +1 -1
  91. package/dist/{driver → system}/datasource.zod.d.ts +2 -2
  92. package/dist/{driver → system}/datasource.zod.d.ts.map +1 -1
  93. package/dist/{driver → system/driver}/mongo.zod.d.ts +2 -2
  94. package/dist/system/driver/mongo.zod.d.ts.map +1 -0
  95. package/dist/{driver → system/driver}/postgres.zod.d.ts +4 -4
  96. package/dist/system/driver/postgres.zod.d.ts.map +1 -0
  97. package/dist/{driver → system}/driver.zod.d.ts +14 -14
  98. package/dist/{driver → system}/driver.zod.d.ts.map +1 -1
  99. package/dist/system/events.zod.d.ts +15 -12
  100. package/dist/system/events.zod.d.ts.map +1 -1
  101. package/dist/system/events.zod.js +5 -1
  102. package/dist/system/feature.zod.d.ts +131 -0
  103. package/dist/system/feature.zod.d.ts.map +1 -0
  104. package/dist/system/feature.zod.js +45 -0
  105. package/dist/system/index.d.ts +10 -0
  106. package/dist/system/index.d.ts.map +1 -1
  107. package/dist/system/index.js +12 -0
  108. package/dist/system/job.zod.d.ts +8 -8
  109. package/dist/{kernel → system}/logger.zod.d.ts +4 -4
  110. package/dist/{kernel → system}/logger.zod.d.ts.map +1 -1
  111. package/dist/system/manifest.zod.d.ts +518 -0
  112. package/dist/system/manifest.zod.d.ts.map +1 -0
  113. package/dist/{kernel → system}/manifest.zod.js +8 -17
  114. package/dist/{kernel → system}/plugin.zod.d.ts.map +1 -1
  115. package/dist/{kernel → system}/scoped-storage.zod.d.ts +2 -2
  116. package/dist/{kernel → system}/scoped-storage.zod.d.ts.map +1 -1
  117. package/dist/ui/action.zod.d.ts +35 -10
  118. package/dist/ui/action.zod.d.ts.map +1 -1
  119. package/dist/ui/action.zod.js +30 -1
  120. package/dist/ui/app.zod.d.ts +23 -8
  121. package/dist/ui/app.zod.d.ts.map +1 -1
  122. package/dist/ui/app.zod.js +32 -4
  123. package/dist/ui/block.zod.d.ts +265 -0
  124. package/dist/ui/block.zod.d.ts.map +1 -0
  125. package/dist/ui/block.zod.js +90 -0
  126. package/dist/ui/component.zod.d.ts +265 -0
  127. package/dist/ui/component.zod.d.ts.map +1 -0
  128. package/dist/ui/component.zod.js +90 -0
  129. package/dist/ui/dashboard.zod.d.ts +15 -15
  130. package/dist/ui/dashboard.zod.d.ts.map +1 -1
  131. package/dist/ui/dashboard.zod.js +18 -8
  132. package/dist/ui/index.d.ts +1 -0
  133. package/dist/ui/index.d.ts.map +1 -1
  134. package/dist/ui/index.js +1 -0
  135. package/dist/ui/page.zod.d.ts +21 -3
  136. package/dist/ui/page.zod.d.ts.map +1 -1
  137. package/dist/ui/page.zod.js +37 -4
  138. package/dist/ui/report.zod.d.ts +7 -7
  139. package/dist/ui/view.zod.d.ts +252 -240
  140. package/dist/ui/view.zod.d.ts.map +1 -1
  141. package/dist/ui/view.zod.js +32 -3
  142. package/dist/ui/widget.zod.d.ts +673 -5
  143. package/dist/ui/widget.zod.d.ts.map +1 -1
  144. package/dist/ui/widget.zod.js +294 -1
  145. package/json-schema/api/ODataError.json +65 -0
  146. package/json-schema/api/ODataFilterFunction.json +39 -0
  147. package/json-schema/api/ODataFilterOperator.json +24 -0
  148. package/json-schema/api/ODataMetadata.json +115 -0
  149. package/json-schema/api/ODataQuery.json +89 -0
  150. package/json-schema/api/ODataResponse.json +37 -0
  151. package/json-schema/auth/Role.json +3 -2
  152. package/json-schema/auth/SCIMAddress.json +50 -0
  153. package/json-schema/auth/SCIMEmail.json +38 -0
  154. package/json-schema/auth/SCIMEnterpriseUser.json +55 -0
  155. package/json-schema/auth/SCIMError.json +52 -0
  156. package/json-schema/auth/SCIMGroup.json +102 -0
  157. package/json-schema/auth/SCIMGroupReference.json +36 -0
  158. package/json-schema/auth/SCIMListResponse.json +606 -0
  159. package/json-schema/auth/SCIMMemberReference.json +36 -0
  160. package/json-schema/auth/SCIMMeta.json +35 -0
  161. package/json-schema/auth/SCIMName.json +36 -0
  162. package/json-schema/auth/SCIMPatchOperation.json +31 -0
  163. package/json-schema/auth/SCIMPatchRequest.json +56 -0
  164. package/json-schema/auth/SCIMPhoneNumber.json +40 -0
  165. package/json-schema/auth/SCIMUser.json +462 -0
  166. package/json-schema/automation/ApprovalAction.json +35 -0
  167. package/json-schema/automation/ApprovalActionType.json +15 -0
  168. package/json-schema/automation/ApprovalProcess.json +326 -0
  169. package/json-schema/automation/ApprovalStep.json +147 -0
  170. package/json-schema/automation/ApproverType.json +16 -0
  171. package/json-schema/automation/AuthField.json +73 -0
  172. package/json-schema/automation/Authentication.json +159 -0
  173. package/json-schema/automation/AuthenticationType.json +18 -0
  174. package/json-schema/automation/ConflictResolution.json +16 -0
  175. package/json-schema/automation/Connector.json +440 -0
  176. package/json-schema/automation/ConnectorCategory.json +26 -0
  177. package/json-schema/automation/ConnectorInstance.json +69 -0
  178. package/json-schema/automation/ConnectorOperation.json +117 -0
  179. package/json-schema/automation/ConnectorTrigger.json +54 -0
  180. package/json-schema/automation/DataDestinationConfig.json +89 -0
  181. package/json-schema/automation/DataSourceConfig.json +34 -0
  182. package/json-schema/automation/DataSyncConfig.json +355 -0
  183. package/json-schema/automation/ETLDestination.json +57 -0
  184. package/json-schema/automation/ETLEndpointType.json +19 -0
  185. package/json-schema/automation/ETLPipeline.json +252 -0
  186. package/json-schema/automation/ETLPipelineRun.json +107 -0
  187. package/json-schema/automation/ETLRunStatus.json +17 -0
  188. package/json-schema/automation/ETLSource.json +60 -0
  189. package/json-schema/automation/ETLSyncMode.json +14 -0
  190. package/json-schema/automation/ETLTransformation.json +46 -0
  191. package/json-schema/automation/ETLTransformationType.json +21 -0
  192. package/json-schema/automation/FieldMapping.json +36 -0
  193. package/json-schema/automation/OAuth2Config.json +43 -0
  194. package/json-schema/automation/OperationParameter.json +59 -0
  195. package/json-schema/automation/OperationType.json +17 -0
  196. package/json-schema/automation/SyncDirection.json +14 -0
  197. package/json-schema/automation/SyncExecutionResult.json +135 -0
  198. package/json-schema/automation/SyncExecutionStatus.json +17 -0
  199. package/json-schema/automation/SyncMode.json +14 -0
  200. package/json-schema/automation/Webhook.json +3 -1
  201. package/json-schema/automation/WebhookReceiver.json +3 -1
  202. package/json-schema/automation/WorkflowRule.json +3 -2
  203. package/json-schema/data/Field.json +62 -4
  204. package/json-schema/data/FieldType.json +12 -2
  205. package/json-schema/data/Object.json +62 -4
  206. package/json-schema/data/SelectOption.json +4 -2
  207. package/json-schema/data/VectorConfig.json +51 -0
  208. package/json-schema/hub/ComposerResponse.json +4 -2163
  209. package/json-schema/permission/PermissionSet.json +3 -1
  210. package/json-schema/permission/RLSConfig.json +59 -0
  211. package/json-schema/permission/RLSEvaluationResult.json +40 -0
  212. package/json-schema/permission/RLSOperation.json +16 -0
  213. package/json-schema/permission/RLSUserContext.json +51 -0
  214. package/json-schema/permission/RowLevelSecurityPolicy.json +77 -0
  215. package/json-schema/permission/Territory.json +3 -1
  216. package/json-schema/shared/EventName.json +12 -0
  217. package/json-schema/shared/SnakeCaseIdentifier.json +12 -0
  218. package/json-schema/shared/SystemIdentifier.json +12 -0
  219. package/json-schema/system/Event.json +3 -2
  220. package/json-schema/system/FeatureFlag.json +87 -0
  221. package/json-schema/system/FeatureStrategy.json +16 -0
  222. package/json-schema/system/Manifest.json +398 -0
  223. package/json-schema/ui/Action.json +25 -4
  224. package/json-schema/ui/ActionParam.json +12 -2
  225. package/json-schema/ui/App.json +18 -7
  226. package/json-schema/ui/ChartType.json +9 -1
  227. package/json-schema/ui/Dashboard.json +9 -1
  228. package/json-schema/ui/DashboardNavItem.json +3 -1
  229. package/json-schema/ui/DashboardWidget.json +9 -1
  230. package/json-schema/ui/FieldWidgetProps.json +62 -4
  231. package/json-schema/ui/FormView.json +4 -1
  232. package/json-schema/ui/GroupNavItem.json +3 -1
  233. package/json-schema/ui/ListView.json +7 -1
  234. package/json-schema/ui/NavigationItem.json +15 -5
  235. package/json-schema/ui/ObjectNavItem.json +3 -1
  236. package/json-schema/ui/Page.json +36 -4
  237. package/json-schema/ui/PageCardProps.json +32 -0
  238. package/json-schema/ui/PageComponent.json +33 -3
  239. package/json-schema/ui/PageComponentType.json +32 -0
  240. package/json-schema/ui/PageHeaderProps.json +39 -0
  241. package/json-schema/ui/PageNavItem.json +3 -1
  242. package/json-schema/ui/PageRegion.json +33 -3
  243. package/json-schema/ui/PageTabsProps.json +55 -0
  244. package/json-schema/ui/RecordDetailsProps.json +37 -0
  245. package/json-schema/ui/RecordHighlightsProps.json +24 -0
  246. package/json-schema/ui/RecordRelatedListProps.json +39 -0
  247. package/json-schema/ui/UrlNavItem.json +3 -1
  248. package/json-schema/ui/View.json +22 -4
  249. package/json-schema/ui/WidgetEvent.json +42 -0
  250. package/json-schema/ui/WidgetLifecycle.json +40 -0
  251. package/json-schema/ui/WidgetManifest.json +262 -0
  252. package/json-schema/ui/WidgetProperty.json +58 -0
  253. package/package.json +1 -1
  254. package/prompts/architecture.md +5 -5
  255. package/prompts/create-new-project.md +85 -0
  256. package/dist/driver/index.d.ts +0 -5
  257. package/dist/driver/index.d.ts.map +0 -1
  258. package/dist/driver/mongo.zod.d.ts.map +0 -1
  259. package/dist/driver/postgres.zod.d.ts.map +0 -1
  260. package/dist/kernel/index.d.ts +0 -12
  261. package/dist/kernel/index.d.ts.map +0 -1
  262. package/dist/kernel/index.js +0 -27
  263. package/dist/kernel/manifest.zod.d.ts +0 -2153
  264. package/dist/kernel/manifest.zod.d.ts.map +0 -1
  265. package/json-schema/kernel/Manifest.json +0 -2557
  266. /package/dist/{kernel → system}/context.zod.d.ts +0 -0
  267. /package/dist/{kernel → system}/context.zod.js +0 -0
  268. /package/dist/{driver → system}/datasource.zod.js +0 -0
  269. /package/dist/{driver → system/driver}/mongo.zod.js +0 -0
  270. /package/dist/{driver → system/driver}/postgres.zod.js +0 -0
  271. /package/dist/{driver → system}/driver.zod.js +0 -0
  272. /package/dist/{kernel → system}/logger.zod.js +0 -0
  273. /package/dist/{kernel → system}/plugin.zod.d.ts +0 -0
  274. /package/dist/{kernel → system}/plugin.zod.js +0 -0
  275. /package/dist/{kernel → system}/scoped-storage.zod.js +0 -0
  276. /package/json-schema/{driver → system}/Datasource.json +0 -0
  277. /package/json-schema/{driver → system}/DatasourceCapabilities.json +0 -0
  278. /package/json-schema/{driver → system}/DriverCapabilities.json +0 -0
  279. /package/json-schema/{driver → system}/DriverDefinition.json +0 -0
  280. /package/json-schema/{driver → system}/DriverInterface.json +0 -0
  281. /package/json-schema/{driver → system}/DriverOptions.json +0 -0
  282. /package/json-schema/{driver → system}/DriverType.json +0 -0
  283. /package/json-schema/{kernel → system}/FileMetadata.json +0 -0
  284. /package/json-schema/{kernel → system}/I18nContext.json +0 -0
  285. /package/json-schema/{kernel → system}/KernelContext.json +0 -0
  286. /package/json-schema/{kernel → system}/LogEntry.json +0 -0
  287. /package/json-schema/{kernel → system}/LogFormat.json +0 -0
  288. /package/json-schema/{kernel → system}/LogLevel.json +0 -0
  289. /package/json-schema/{kernel → system}/Logger.json +0 -0
  290. /package/json-schema/{kernel → system}/LoggerConfig.json +0 -0
  291. /package/json-schema/{driver → system}/MongoConfig.json +0 -0
  292. /package/json-schema/{kernel → system}/ObjectQLClient.json +0 -0
  293. /package/json-schema/{kernel → system}/Plugin.json +0 -0
  294. /package/json-schema/{kernel → system}/PluginContext.json +0 -0
  295. /package/json-schema/{kernel → system}/PluginLifecycle.json +0 -0
  296. /package/json-schema/{driver → system}/PostgresConfig.json +0 -0
  297. /package/json-schema/{kernel → system}/Router.json +0 -0
  298. /package/json-schema/{kernel → system}/RuntimeMode.json +0 -0
  299. /package/json-schema/{kernel → system}/Scheduler.json +0 -0
  300. /package/json-schema/{kernel → system}/ScopedStorage.json +0 -0
  301. /package/json-schema/{kernel → system}/ScopedStorageConfig.json +0 -0
  302. /package/json-schema/{kernel → system}/StorageAdapterType.json +0 -0
  303. /package/json-schema/{kernel → system}/StorageScope.json +0 -0
  304. /package/json-schema/{kernel → system}/SystemAPI.json +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.zod.d.ts","sourceRoot":"","sources":["../../src/automation/sync.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB,8CAI9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,cAAc,gDAIzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,wBAAwB,kFAMnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;IAC7B;;OAEG;;IAGH;;OAEG;;IAGH;;;;;;OAMG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,sBAAsB;IACjC;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AAM,EAAE,MAAM,CAAC,CAAC;QAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,KAAG,cAAc;IAmBlB;;OAEG;yCACyB;QAC1B,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,mBAAmB,EAAE,MAAM,CAAC;QAC5B,gBAAgB,EAAE,MAAM,CAAC;QACzB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,KAAG,cAAc;CAkBV,CAAC"}
@@ -0,0 +1,444 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Sync = exports.SyncExecutionResultSchema = exports.SyncExecutionStatusSchema = exports.DataSyncConfigSchema = exports.DataDestinationConfigSchema = exports.DataSourceConfigSchema = exports.FieldMappingSchema = exports.ConflictResolutionSchema = exports.SyncModeSchema = exports.SyncDirectionSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Data Sync Protocol
7
+ *
8
+ * Inspired by Salesforce Connect, Segment Sync, and Census Reverse ETL.
9
+ *
10
+ * Data sync provides bidirectional or unidirectional data synchronization
11
+ * between ObjectStack and external systems, maintaining data consistency
12
+ * across platforms.
13
+ *
14
+ * ## Use Cases
15
+ *
16
+ * 1. **CRM Integration**
17
+ * - Sync contacts between ObjectStack and Salesforce
18
+ * - Keep opportunity data synchronized
19
+ * - Bidirectional updates
20
+ *
21
+ * 2. **Customer Data Platform (CDP)**
22
+ * - Sync user profiles to Segment
23
+ * - Enrichment data from Clearbit
24
+ * - Marketing automation sync
25
+ *
26
+ * 3. **Operational Analytics**
27
+ * - Sync production data to analytics warehouse
28
+ * - Real-time dashboards
29
+ * - Business intelligence
30
+ *
31
+ * @see https://help.salesforce.com/s/articleView?id=sf.platform_connect_about.htm
32
+ * @see https://segment.com/docs/connections/sync/
33
+ * @see https://www.getcensus.com/
34
+ *
35
+ * @example
36
+ * ```typescript
37
+ * const contactSync: DataSyncConfig = {
38
+ * name: 'salesforce_contact_sync',
39
+ * label: 'Salesforce Contact Sync',
40
+ * source: {
41
+ * object: 'contact',
42
+ * filters: { status: 'active' }
43
+ * },
44
+ * destination: {
45
+ * connector: 'salesforce',
46
+ * operation: 'upsert_contact',
47
+ * mapping: {
48
+ * first_name: 'FirstName',
49
+ * last_name: 'LastName',
50
+ * email: 'Email'
51
+ * }
52
+ * },
53
+ * syncMode: 'incremental',
54
+ * schedule: '0 * * * *' // Hourly
55
+ * }
56
+ * ```
57
+ */
58
+ /**
59
+ * Sync Direction
60
+ */
61
+ exports.SyncDirectionSchema = zod_1.z.enum([
62
+ 'push', // ObjectStack -> External (one-way)
63
+ 'pull', // External -> ObjectStack (one-way)
64
+ 'bidirectional', // Both directions
65
+ ]);
66
+ /**
67
+ * Sync Mode
68
+ */
69
+ exports.SyncModeSchema = zod_1.z.enum([
70
+ 'full', // Full refresh every time
71
+ 'incremental', // Only sync changed records
72
+ 'realtime', // Real-time streaming sync
73
+ ]);
74
+ /**
75
+ * Conflict Resolution Strategy
76
+ */
77
+ exports.ConflictResolutionSchema = zod_1.z.enum([
78
+ 'source_wins', // Source system always wins
79
+ 'destination_wins', // Destination system always wins
80
+ 'latest_wins', // Most recently modified wins
81
+ 'manual', // Flag for manual resolution
82
+ 'merge', // Smart merge (custom logic)
83
+ ]);
84
+ /**
85
+ * Field Mapping Schema
86
+ *
87
+ * Maps fields between source and destination systems.
88
+ */
89
+ exports.FieldMappingSchema = zod_1.z.object({
90
+ /**
91
+ * Source field name
92
+ */
93
+ sourceField: zod_1.z.string().describe('Source field name'),
94
+ /**
95
+ * Destination field name
96
+ */
97
+ destinationField: zod_1.z.string().describe('Destination field name'),
98
+ /**
99
+ * Transformation formula
100
+ * JavaScript expression to transform the value
101
+ *
102
+ * @example "value.toUpperCase()"
103
+ * @example "new Date(value).toISOString()"
104
+ */
105
+ transform: zod_1.z.string().optional().describe('Transformation formula'),
106
+ /**
107
+ * Default value if source is null/undefined
108
+ */
109
+ default: zod_1.z.any().optional().describe('Default value'),
110
+ /**
111
+ * Whether to sync null values
112
+ */
113
+ syncNull: zod_1.z.boolean().default(false).describe('Sync null values'),
114
+ });
115
+ /**
116
+ * Data Source Configuration
117
+ */
118
+ exports.DataSourceConfigSchema = zod_1.z.object({
119
+ /**
120
+ * Source object name
121
+ * For ObjectStack objects
122
+ */
123
+ object: zod_1.z.string().optional().describe('ObjectStack object name'),
124
+ /**
125
+ * Filter conditions
126
+ * Only sync records matching these filters
127
+ */
128
+ filters: zod_1.z.any().optional().describe('Filter conditions'),
129
+ /**
130
+ * Fields to include
131
+ * If not specified, all fields are synced
132
+ */
133
+ fields: zod_1.z.array(zod_1.z.string()).optional().describe('Fields to sync'),
134
+ /**
135
+ * External connector instance ID
136
+ * For external data sources
137
+ */
138
+ connectorInstanceId: zod_1.z.string().optional().describe('Connector instance ID'),
139
+ /**
140
+ * External resource identifier
141
+ * e.g., Salesforce object name, database table, API endpoint
142
+ */
143
+ externalResource: zod_1.z.string().optional().describe('External resource ID'),
144
+ });
145
+ /**
146
+ * Data Destination Configuration
147
+ */
148
+ exports.DataDestinationConfigSchema = zod_1.z.object({
149
+ /**
150
+ * Destination object name
151
+ * For ObjectStack objects
152
+ */
153
+ object: zod_1.z.string().optional().describe('ObjectStack object name'),
154
+ /**
155
+ * Connector instance ID
156
+ * For external destinations
157
+ */
158
+ connectorInstanceId: zod_1.z.string().optional().describe('Connector instance ID'),
159
+ /**
160
+ * Operation to perform
161
+ */
162
+ operation: zod_1.z.enum([
163
+ 'insert', // Create new records only
164
+ 'update', // Update existing records only
165
+ 'upsert', // Insert or update based on key
166
+ 'delete', // Delete records
167
+ 'sync', // Full synchronization
168
+ ]).describe('Sync operation'),
169
+ /**
170
+ * Field mappings
171
+ * Maps source fields to destination fields
172
+ */
173
+ mapping: zod_1.z.union([
174
+ zod_1.z.record(zod_1.z.string()), // Simple mapping: { sourceField: 'destField' }
175
+ zod_1.z.array(exports.FieldMappingSchema), // Advanced mapping with transformations
176
+ ]).optional().describe('Field mappings'),
177
+ /**
178
+ * External resource identifier
179
+ */
180
+ externalResource: zod_1.z.string().optional().describe('External resource ID'),
181
+ /**
182
+ * Match key for upsert operations
183
+ * Fields to use for matching existing records
184
+ */
185
+ matchKey: zod_1.z.array(zod_1.z.string()).optional().describe('Match key fields'),
186
+ });
187
+ /**
188
+ * Data Sync Configuration Schema
189
+ *
190
+ * Complete definition of a data synchronization between systems.
191
+ */
192
+ exports.DataSyncConfigSchema = zod_1.z.object({
193
+ /**
194
+ * Sync configuration name (snake_case)
195
+ */
196
+ name: zod_1.z.string()
197
+ .regex(/^[a-z_][a-z0-9_]*$/)
198
+ .describe('Sync configuration name (snake_case)'),
199
+ /**
200
+ * Human-readable label
201
+ */
202
+ label: zod_1.z.string().optional().describe('Sync display name'),
203
+ /**
204
+ * Description
205
+ */
206
+ description: zod_1.z.string().optional().describe('Sync description'),
207
+ /**
208
+ * Source configuration
209
+ */
210
+ source: exports.DataSourceConfigSchema.describe('Data source'),
211
+ /**
212
+ * Destination configuration
213
+ */
214
+ destination: exports.DataDestinationConfigSchema.describe('Data destination'),
215
+ /**
216
+ * Sync direction
217
+ */
218
+ direction: exports.SyncDirectionSchema.default('push').describe('Sync direction'),
219
+ /**
220
+ * Sync mode
221
+ */
222
+ syncMode: exports.SyncModeSchema.default('incremental').describe('Sync mode'),
223
+ /**
224
+ * Conflict resolution strategy
225
+ */
226
+ conflictResolution: exports.ConflictResolutionSchema
227
+ .default('latest_wins')
228
+ .describe('Conflict resolution'),
229
+ /**
230
+ * Execution schedule (cron expression)
231
+ * For scheduled syncs
232
+ *
233
+ * @example "0 * * * *" - Hourly
234
+ * @example "*\/15 * * * *" - Every 15 minutes
235
+ */
236
+ schedule: zod_1.z.string().optional().describe('Cron schedule'),
237
+ /**
238
+ * Whether sync is enabled
239
+ */
240
+ enabled: zod_1.z.boolean().default(true).describe('Sync enabled'),
241
+ /**
242
+ * Change tracking field
243
+ * Field to track when records were last modified
244
+ * Used for incremental sync
245
+ *
246
+ * @example "updated_at", "modified_date"
247
+ */
248
+ changeTrackingField: zod_1.z.string()
249
+ .optional()
250
+ .describe('Field for change tracking'),
251
+ /**
252
+ * Batch size
253
+ * Number of records to process per batch
254
+ */
255
+ batchSize: zod_1.z.number().int().min(1).max(10000)
256
+ .default(100)
257
+ .describe('Batch size for processing'),
258
+ /**
259
+ * Retry configuration
260
+ */
261
+ retry: zod_1.z.object({
262
+ maxAttempts: zod_1.z.number().int().min(0).default(3).describe('Max retries'),
263
+ backoffMs: zod_1.z.number().int().min(0).default(30000).describe('Backoff duration'),
264
+ }).optional().describe('Retry configuration'),
265
+ /**
266
+ * Pre-sync validation rules
267
+ */
268
+ validation: zod_1.z.object({
269
+ required: zod_1.z.array(zod_1.z.string()).optional().describe('Required fields'),
270
+ unique: zod_1.z.array(zod_1.z.string()).optional().describe('Unique constraint fields'),
271
+ custom: zod_1.z.array(zod_1.z.object({
272
+ name: zod_1.z.string(),
273
+ condition: zod_1.z.string().describe('Validation condition'),
274
+ message: zod_1.z.string().describe('Error message'),
275
+ })).optional().describe('Custom validation rules'),
276
+ }).optional().describe('Validation rules'),
277
+ /**
278
+ * Error handling configuration
279
+ */
280
+ errorHandling: zod_1.z.object({
281
+ onValidationError: zod_1.z.enum(['skip', 'fail', 'log']).default('skip'),
282
+ onSyncError: zod_1.z.enum(['skip', 'fail', 'retry']).default('retry'),
283
+ notifyOnError: zod_1.z.array(zod_1.z.string()).optional().describe('Email notifications'),
284
+ }).optional().describe('Error handling'),
285
+ /**
286
+ * Performance optimization
287
+ */
288
+ optimization: zod_1.z.object({
289
+ parallelBatches: zod_1.z.boolean().default(false).describe('Process batches in parallel'),
290
+ cacheEnabled: zod_1.z.boolean().default(true).describe('Enable caching'),
291
+ compressionEnabled: zod_1.z.boolean().default(false).describe('Enable compression'),
292
+ }).optional().describe('Performance optimization'),
293
+ /**
294
+ * Audit and logging
295
+ */
296
+ audit: zod_1.z.object({
297
+ logLevel: zod_1.z.enum(['none', 'error', 'warn', 'info', 'debug']).default('info'),
298
+ retainLogsForDays: zod_1.z.number().int().min(1).default(30),
299
+ trackChanges: zod_1.z.boolean().default(true).describe('Track all changes'),
300
+ }).optional().describe('Audit configuration'),
301
+ /**
302
+ * Tags for organization
303
+ */
304
+ tags: zod_1.z.array(zod_1.z.string()).optional().describe('Sync tags'),
305
+ /**
306
+ * Custom metadata
307
+ */
308
+ metadata: zod_1.z.record(zod_1.z.any()).optional().describe('Custom metadata'),
309
+ });
310
+ /**
311
+ * Sync Execution Status
312
+ */
313
+ exports.SyncExecutionStatusSchema = zod_1.z.enum([
314
+ 'pending', // Queued
315
+ 'running', // Currently executing
316
+ 'completed', // Successfully completed
317
+ 'partial', // Completed with some errors
318
+ 'failed', // Failed
319
+ 'cancelled', // Manually cancelled
320
+ ]);
321
+ /**
322
+ * Sync Execution Result Schema
323
+ *
324
+ * Result of a sync execution.
325
+ */
326
+ exports.SyncExecutionResultSchema = zod_1.z.object({
327
+ /**
328
+ * Execution ID
329
+ */
330
+ id: zod_1.z.string().describe('Execution ID'),
331
+ /**
332
+ * Sync configuration name
333
+ */
334
+ syncName: zod_1.z.string().describe('Sync name'),
335
+ /**
336
+ * Execution status
337
+ */
338
+ status: exports.SyncExecutionStatusSchema.describe('Execution status'),
339
+ /**
340
+ * Start timestamp
341
+ */
342
+ startedAt: zod_1.z.string().datetime().describe('Start time'),
343
+ /**
344
+ * End timestamp
345
+ */
346
+ completedAt: zod_1.z.string().datetime().optional().describe('Completion time'),
347
+ /**
348
+ * Duration in milliseconds
349
+ */
350
+ durationMs: zod_1.z.number().optional().describe('Duration in ms'),
351
+ /**
352
+ * Statistics
353
+ */
354
+ stats: zod_1.z.object({
355
+ recordsProcessed: zod_1.z.number().int().default(0).describe('Total records processed'),
356
+ recordsInserted: zod_1.z.number().int().default(0).describe('Records inserted'),
357
+ recordsUpdated: zod_1.z.number().int().default(0).describe('Records updated'),
358
+ recordsDeleted: zod_1.z.number().int().default(0).describe('Records deleted'),
359
+ recordsSkipped: zod_1.z.number().int().default(0).describe('Records skipped'),
360
+ recordsErrored: zod_1.z.number().int().default(0).describe('Records with errors'),
361
+ conflictsDetected: zod_1.z.number().int().default(0).describe('Conflicts detected'),
362
+ conflictsResolved: zod_1.z.number().int().default(0).describe('Conflicts resolved'),
363
+ }).optional().describe('Execution statistics'),
364
+ /**
365
+ * Errors encountered
366
+ */
367
+ errors: zod_1.z.array(zod_1.z.object({
368
+ recordId: zod_1.z.string().optional().describe('Record ID'),
369
+ field: zod_1.z.string().optional().describe('Field name'),
370
+ message: zod_1.z.string().describe('Error message'),
371
+ code: zod_1.z.string().optional().describe('Error code'),
372
+ })).optional().describe('Errors'),
373
+ /**
374
+ * Execution logs
375
+ */
376
+ logs: zod_1.z.array(zod_1.z.string()).optional().describe('Execution logs'),
377
+ });
378
+ /**
379
+ * Helper factory for creating sync configurations
380
+ */
381
+ exports.Sync = {
382
+ /**
383
+ * Create a simple object-to-object sync
384
+ */
385
+ objectSync: (params) => ({
386
+ name: params.name,
387
+ source: {
388
+ object: params.sourceObject,
389
+ },
390
+ destination: {
391
+ object: params.destObject,
392
+ operation: 'upsert',
393
+ mapping: params.mapping,
394
+ },
395
+ direction: 'push',
396
+ syncMode: 'incremental',
397
+ conflictResolution: 'latest_wins',
398
+ batchSize: 100,
399
+ schedule: params.schedule,
400
+ enabled: true,
401
+ }),
402
+ /**
403
+ * Create a connector sync
404
+ */
405
+ connectorSync: (params) => ({
406
+ name: params.name,
407
+ source: {
408
+ object: params.sourceObject,
409
+ },
410
+ destination: {
411
+ connectorInstanceId: params.connectorInstanceId,
412
+ externalResource: params.externalResource,
413
+ operation: 'upsert',
414
+ mapping: params.mapping,
415
+ },
416
+ direction: 'push',
417
+ syncMode: 'incremental',
418
+ conflictResolution: 'latest_wins',
419
+ batchSize: 100,
420
+ schedule: params.schedule,
421
+ enabled: true,
422
+ }),
423
+ /**
424
+ * Create a bidirectional sync
425
+ */
426
+ bidirectionalSync: (params) => ({
427
+ name: params.name,
428
+ source: {
429
+ object: params.object,
430
+ },
431
+ destination: {
432
+ connectorInstanceId: params.connectorInstanceId,
433
+ externalResource: params.externalResource,
434
+ operation: 'sync',
435
+ mapping: params.mapping,
436
+ },
437
+ direction: 'bidirectional',
438
+ syncMode: 'incremental',
439
+ conflictResolution: 'latest_wins',
440
+ batchSize: 100,
441
+ schedule: params.schedule,
442
+ enabled: true,
443
+ }),
444
+ };
@@ -6,7 +6,19 @@ import { z } from 'zod';
6
6
  export declare const WebhookTriggerType: z.ZodEnum<["create", "update", "delete", "undelete", "api"]>;
7
7
  /**
8
8
  * Webhook Schema
9
- * outbound Integration: Push data to external URL when events happen.
9
+ * Outbound Integration: Push data to external URL when events happen.
10
+ *
11
+ * **NAMING CONVENTION:**
12
+ * Webhook names are machine identifiers and must be lowercase snake_case.
13
+ *
14
+ * @example Good webhook names
15
+ * - 'stripe_payment_sync'
16
+ * - 'slack_notification'
17
+ * - 'crm_lead_export'
18
+ *
19
+ * @example Bad webhook names (will be rejected)
20
+ * - 'StripePaymentSync' (PascalCase)
21
+ * - 'slackNotification' (camelCase)
10
22
  */
11
23
  export declare const WebhookSchema: z.ZodObject<{
12
24
  name: z.ZodString;
@@ -56,6 +68,17 @@ export declare const WebhookSchema: z.ZodObject<{
56
68
  /**
57
69
  * Webhook Receiver Schema (Inbound)
58
70
  * Handling incoming HTTP hooks from Stripe, Slack, etc.
71
+ *
72
+ * **NAMING CONVENTION:**
73
+ * Webhook receiver names are machine identifiers and must be lowercase snake_case.
74
+ *
75
+ * @example Good names
76
+ * - 'stripe_webhook_handler'
77
+ * - 'github_events'
78
+ * - 'twilio_status_callback'
79
+ *
80
+ * @example Bad names (will be rejected)
81
+ * - 'StripeWebhookHandler' (PascalCase)
59
82
  */
60
83
  export declare const WebhookReceiverSchema: z.ZodObject<{
61
84
  name: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"webhook.zod.d.ts","sourceRoot":"","sources":["../../src/automation/webhook.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,kBAAkB,8DAM7B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,aAAa;;;IAIxB,YAAY;;;IAIZ,aAAa;;;IAIb,eAAe;;;IAIf,4BAA4B;;;IAI5B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGlB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;IAIhC,mBAAmB;;;;;;;;;;;;;;;IAQnB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;EAGb,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"webhook.zod.d.ts","sourceRoot":"","sources":["../../src/automation/webhook.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;GAGG;AACH,eAAO,MAAM,kBAAkB,8DAM7B,CAAC;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa;;;IAIxB,YAAY;;;IAIZ,aAAa;;;IAIb,eAAe;;;IAIf,4BAA4B;;;IAI5B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGlB,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB;;;IAIhC,mBAAmB;;;;;;;;;;;;;;;IAQnB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;EAGb,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebhookReceiverSchema = exports.WebhookSchema = exports.WebhookTriggerType = void 0;
4
4
  const zod_1 = require("zod");
5
+ const identifiers_zod_1 = require("../shared/identifiers.zod");
5
6
  /**
6
7
  * Webhook Trigger Event
7
8
  * When should this webhook fire?
@@ -15,10 +16,22 @@ exports.WebhookTriggerType = zod_1.z.enum([
15
16
  ]);
16
17
  /**
17
18
  * Webhook Schema
18
- * outbound Integration: Push data to external URL when events happen.
19
+ * Outbound Integration: Push data to external URL when events happen.
20
+ *
21
+ * **NAMING CONVENTION:**
22
+ * Webhook names are machine identifiers and must be lowercase snake_case.
23
+ *
24
+ * @example Good webhook names
25
+ * - 'stripe_payment_sync'
26
+ * - 'slack_notification'
27
+ * - 'crm_lead_export'
28
+ *
29
+ * @example Bad webhook names (will be rejected)
30
+ * - 'StripePaymentSync' (PascalCase)
31
+ * - 'slackNotification' (camelCase)
19
32
  */
20
33
  exports.WebhookSchema = zod_1.z.object({
21
- name: zod_1.z.string().regex(/^[a-z_][a-z0-9_]*$/),
34
+ name: identifiers_zod_1.SnakeCaseIdentifierSchema.describe('Webhook unique name (lowercase snake_case)'),
22
35
  label: zod_1.z.string().optional(),
23
36
  /** Scope */
24
37
  object: zod_1.z.string().describe('Object to listen to'),
@@ -39,9 +52,20 @@ exports.WebhookSchema = zod_1.z.object({
39
52
  /**
40
53
  * Webhook Receiver Schema (Inbound)
41
54
  * Handling incoming HTTP hooks from Stripe, Slack, etc.
55
+ *
56
+ * **NAMING CONVENTION:**
57
+ * Webhook receiver names are machine identifiers and must be lowercase snake_case.
58
+ *
59
+ * @example Good names
60
+ * - 'stripe_webhook_handler'
61
+ * - 'github_events'
62
+ * - 'twilio_status_callback'
63
+ *
64
+ * @example Bad names (will be rejected)
65
+ * - 'StripeWebhookHandler' (PascalCase)
42
66
  */
43
67
  exports.WebhookReceiverSchema = zod_1.z.object({
44
- name: zod_1.z.string().regex(/^[a-z_][a-z0-9_]*$/),
68
+ name: identifiers_zod_1.SnakeCaseIdentifierSchema.describe('Webhook receiver unique name (lowercase snake_case)'),
45
69
  path: zod_1.z.string().describe('URL Path (e.g. /webhooks/stripe)'),
46
70
  /** Verification */
47
71
  verificationType: zod_1.z.enum(['none', 'header_token', 'hmac', 'ip_whitelist']).default('none'),
@@ -982,6 +982,20 @@ export declare const TimeTriggerSchema: z.ZodObject<{
982
982
  }>;
983
983
  /**
984
984
  * Schema for Workflow Rules (Automation)
985
+ *
986
+ * **NAMING CONVENTION:**
987
+ * Workflow names are machine identifiers and must be lowercase snake_case.
988
+ *
989
+ * @example Good workflow names
990
+ * - 'send_welcome_email'
991
+ * - 'update_lead_status'
992
+ * - 'notify_manager_on_close'
993
+ * - 'calculate_discount'
994
+ *
995
+ * @example Bad workflow names (will be rejected)
996
+ * - 'SendWelcomeEmail' (PascalCase)
997
+ * - 'updateLeadStatus' (camelCase)
998
+ * - 'Send Welcome Email' (spaces)
985
999
  */
986
1000
  export declare const WorkflowRuleSchema: z.ZodObject<{
987
1001
  /** Machine name */
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.zod.d.ts","sourceRoot":"","sources":["../../src/automation/workflow.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,mBAAmB,uFAM9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EAKlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAKjC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;EAOtC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;EAOnC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,w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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAExB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WorkflowRuleSchema = exports.TimeTriggerSchema = exports.WorkflowActionSchema = exports.CustomScriptActionSchema = exports.PushNotificationActionSchema = exports.TaskCreationActionSchema = exports.WebhookTriggerActionSchema = exports.HttpCallActionSchema = exports.TeamsMessageActionSchema = exports.SlackMessageActionSchema = exports.SmsNotificationActionSchema = exports.EmailAlertActionSchema = exports.FieldUpdateActionSchema = exports.WorkflowTriggerType = void 0;
4
4
  const zod_1 = require("zod");
5
+ const identifiers_zod_1 = require("../shared/identifiers.zod");
5
6
  /**
6
7
  * Trigger events for workflow automation
7
8
  */
@@ -168,10 +169,24 @@ exports.TimeTriggerSchema = zod_1.z.object({
168
169
  });
169
170
  /**
170
171
  * Schema for Workflow Rules (Automation)
172
+ *
173
+ * **NAMING CONVENTION:**
174
+ * Workflow names are machine identifiers and must be lowercase snake_case.
175
+ *
176
+ * @example Good workflow names
177
+ * - 'send_welcome_email'
178
+ * - 'update_lead_status'
179
+ * - 'notify_manager_on_close'
180
+ * - 'calculate_discount'
181
+ *
182
+ * @example Bad workflow names (will be rejected)
183
+ * - 'SendWelcomeEmail' (PascalCase)
184
+ * - 'updateLeadStatus' (camelCase)
185
+ * - 'Send Welcome Email' (spaces)
171
186
  */
172
187
  exports.WorkflowRuleSchema = zod_1.z.object({
173
188
  /** Machine name */
174
- name: zod_1.z.string().regex(/^[a-z_][a-z0-9_]*$/).describe('Unique workflow name'),
189
+ name: identifiers_zod_1.SnakeCaseIdentifierSchema.describe('Unique workflow name (lowercase snake_case)'),
175
190
  /** Target Object */
176
191
  objectName: zod_1.z.string().describe('Target Object'),
177
192
  /** When to evaluate the rule */