@l4yercak3/cli 1.3.1 → 2.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/README.md +10 -220
  2. package/dist/api/client.d.ts +12 -0
  3. package/dist/api/client.d.ts.map +1 -0
  4. package/dist/api/client.js +37 -0
  5. package/dist/api/client.js.map +1 -0
  6. package/dist/api/platform.d.ts +161 -0
  7. package/dist/api/platform.d.ts.map +1 -0
  8. package/dist/api/platform.js +70 -0
  9. package/dist/api/platform.js.map +1 -0
  10. package/dist/bin/sevenlayers.d.ts +3 -0
  11. package/dist/bin/sevenlayers.d.ts.map +1 -0
  12. package/dist/bin/sevenlayers.js +198 -0
  13. package/dist/bin/sevenlayers.js.map +1 -0
  14. package/dist/commands/agent/catalog.d.ts +5 -0
  15. package/dist/commands/agent/catalog.d.ts.map +1 -0
  16. package/dist/commands/agent/catalog.js +142 -0
  17. package/dist/commands/agent/catalog.js.map +1 -0
  18. package/dist/commands/agent/drift.d.ts +5 -0
  19. package/dist/commands/agent/drift.d.ts.map +1 -0
  20. package/dist/commands/agent/drift.js +113 -0
  21. package/dist/commands/agent/drift.js.map +1 -0
  22. package/dist/commands/agent/init.d.ts +5 -0
  23. package/dist/commands/agent/init.d.ts.map +1 -0
  24. package/dist/commands/agent/init.js +75 -0
  25. package/dist/commands/agent/init.js.map +1 -0
  26. package/dist/commands/agent/permissions.d.ts +5 -0
  27. package/dist/commands/agent/permissions.d.ts.map +1 -0
  28. package/dist/commands/agent/permissions.js +88 -0
  29. package/dist/commands/agent/permissions.js.map +1 -0
  30. package/dist/commands/agent/runner.d.ts +14 -0
  31. package/dist/commands/agent/runner.d.ts.map +1 -0
  32. package/dist/commands/agent/runner.js +59 -0
  33. package/dist/commands/agent/runner.js.map +1 -0
  34. package/dist/commands/agent/shared.d.ts +13 -0
  35. package/dist/commands/agent/shared.d.ts.map +1 -0
  36. package/dist/commands/agent/shared.js +31 -0
  37. package/dist/commands/agent/shared.js.map +1 -0
  38. package/dist/commands/agent/template.d.ts +5 -0
  39. package/dist/commands/agent/template.d.ts.map +1 -0
  40. package/dist/commands/agent/template.js +104 -0
  41. package/dist/commands/agent/template.js.map +1 -0
  42. package/dist/commands/app/connect.d.ts +7 -0
  43. package/dist/commands/app/connect.d.ts.map +1 -0
  44. package/dist/commands/app/connect.js +12 -0
  45. package/dist/commands/app/connect.js.map +1 -0
  46. package/dist/commands/app/init.d.ts +7 -0
  47. package/dist/commands/app/init.d.ts.map +1 -0
  48. package/dist/commands/app/init.js +12 -0
  49. package/dist/commands/app/init.js.map +1 -0
  50. package/dist/commands/app/link.d.ts +3 -0
  51. package/dist/commands/app/link.d.ts.map +1 -0
  52. package/dist/commands/app/link.js +92 -0
  53. package/dist/commands/app/link.js.map +1 -0
  54. package/dist/commands/app/pages.d.ts +15 -0
  55. package/dist/commands/app/pages.d.ts.map +1 -0
  56. package/dist/commands/app/pages.js +180 -0
  57. package/dist/commands/app/pages.js.map +1 -0
  58. package/dist/commands/app/register.d.ts +3 -0
  59. package/dist/commands/app/register.d.ts.map +1 -0
  60. package/dist/commands/app/register.js +120 -0
  61. package/dist/commands/app/register.js.map +1 -0
  62. package/dist/commands/app/remote.d.ts +14 -0
  63. package/dist/commands/app/remote.d.ts.map +1 -0
  64. package/dist/commands/app/remote.js +44 -0
  65. package/dist/commands/app/remote.js.map +1 -0
  66. package/dist/commands/app/setup.d.ts +3 -0
  67. package/dist/commands/app/setup.d.ts.map +1 -0
  68. package/dist/commands/app/setup.js +299 -0
  69. package/dist/commands/app/setup.js.map +1 -0
  70. package/dist/commands/app/shared.d.ts +9 -0
  71. package/dist/commands/app/shared.d.ts.map +1 -0
  72. package/dist/commands/app/shared.js +122 -0
  73. package/dist/commands/app/shared.js.map +1 -0
  74. package/dist/commands/app/sync.d.ts +7 -0
  75. package/dist/commands/app/sync.d.ts.map +1 -0
  76. package/dist/commands/app/sync.js +107 -0
  77. package/dist/commands/app/sync.js.map +1 -0
  78. package/dist/commands/booking/check.d.ts +3 -0
  79. package/dist/commands/booking/check.d.ts.map +1 -0
  80. package/dist/commands/booking/check.js +68 -0
  81. package/dist/commands/booking/check.js.map +1 -0
  82. package/dist/commands/booking/setup.d.ts +3 -0
  83. package/dist/commands/booking/setup.d.ts.map +1 -0
  84. package/dist/commands/booking/setup.js +95 -0
  85. package/dist/commands/booking/setup.js.map +1 -0
  86. package/dist/commands/booking/shared.d.ts +31 -0
  87. package/dist/commands/booking/shared.d.ts.map +1 -0
  88. package/dist/commands/booking/shared.js +112 -0
  89. package/dist/commands/booking/shared.js.map +1 -0
  90. package/dist/commands/booking/smoke.d.ts +3 -0
  91. package/dist/commands/booking/smoke.d.ts.map +1 -0
  92. package/dist/commands/booking/smoke.js +101 -0
  93. package/dist/commands/booking/smoke.js.map +1 -0
  94. package/dist/commands/cms/bind.d.ts +3 -0
  95. package/dist/commands/cms/bind.d.ts.map +1 -0
  96. package/dist/commands/cms/bind.js +212 -0
  97. package/dist/commands/cms/bind.js.map +1 -0
  98. package/dist/commands/cms/content.d.ts +40 -0
  99. package/dist/commands/cms/content.d.ts.map +1 -0
  100. package/dist/commands/cms/content.js +169 -0
  101. package/dist/commands/cms/content.js.map +1 -0
  102. package/dist/commands/cms/doctor.d.ts +3 -0
  103. package/dist/commands/cms/doctor.d.ts.map +1 -0
  104. package/dist/commands/cms/doctor.js +69 -0
  105. package/dist/commands/cms/doctor.js.map +1 -0
  106. package/dist/commands/cms/migrate.d.ts +3 -0
  107. package/dist/commands/cms/migrate.d.ts.map +1 -0
  108. package/dist/commands/cms/migrate.js +78 -0
  109. package/dist/commands/cms/migrate.js.map +1 -0
  110. package/dist/commands/cms/registry.d.ts +3 -0
  111. package/dist/commands/cms/registry.d.ts.map +1 -0
  112. package/dist/commands/cms/registry.js +161 -0
  113. package/dist/commands/cms/registry.js.map +1 -0
  114. package/dist/commands/cms/seed.d.ts +3 -0
  115. package/dist/commands/cms/seed.d.ts.map +1 -0
  116. package/dist/commands/cms/seed.js +102 -0
  117. package/dist/commands/cms/seed.js.map +1 -0
  118. package/dist/commands/cms/shared.d.ts +22 -0
  119. package/dist/commands/cms/shared.d.ts.map +1 -0
  120. package/dist/commands/cms/shared.js +82 -0
  121. package/dist/commands/cms/shared.js.map +1 -0
  122. package/dist/commands/doctor/target.d.ts +3 -0
  123. package/dist/commands/doctor/target.d.ts.map +1 -0
  124. package/dist/commands/doctor/target.js +46 -0
  125. package/dist/commands/doctor/target.js.map +1 -0
  126. package/dist/commands/env/list.d.ts +3 -0
  127. package/dist/commands/env/list.d.ts.map +1 -0
  128. package/dist/commands/env/list.js +28 -0
  129. package/dist/commands/env/list.js.map +1 -0
  130. package/dist/commands/env/set.d.ts +3 -0
  131. package/dist/commands/env/set.d.ts.map +1 -0
  132. package/dist/commands/env/set.js +36 -0
  133. package/dist/commands/env/set.js.map +1 -0
  134. package/dist/commands/env/use.d.ts +3 -0
  135. package/dist/commands/env/use.d.ts.map +1 -0
  136. package/dist/commands/env/use.js +15 -0
  137. package/dist/commands/env/use.js.map +1 -0
  138. package/dist/commands/legacy/connect.d.ts +3 -0
  139. package/dist/commands/legacy/connect.d.ts.map +1 -0
  140. package/dist/commands/legacy/connect.js +8 -0
  141. package/dist/commands/legacy/connect.js.map +1 -0
  142. package/dist/commands/legacy/pages.d.ts +3 -0
  143. package/dist/commands/legacy/pages.d.ts.map +1 -0
  144. package/dist/commands/legacy/pages.js +16 -0
  145. package/dist/commands/legacy/pages.js.map +1 -0
  146. package/dist/commands/legacy/spread.d.ts +3 -0
  147. package/dist/commands/legacy/spread.d.ts.map +1 -0
  148. package/dist/commands/legacy/spread.js +8 -0
  149. package/dist/commands/legacy/spread.js.map +1 -0
  150. package/dist/commands/legacy/sync.d.ts +3 -0
  151. package/dist/commands/legacy/sync.d.ts.map +1 -0
  152. package/dist/commands/legacy/sync.js +8 -0
  153. package/dist/commands/legacy/sync.js.map +1 -0
  154. package/dist/config/env-diff.d.ts +10 -0
  155. package/dist/config/env-diff.d.ts.map +1 -0
  156. package/dist/config/env-diff.js +24 -0
  157. package/dist/config/env-diff.js.map +1 -0
  158. package/dist/config/env-parser.d.ts +20 -0
  159. package/dist/config/env-parser.d.ts.map +1 -0
  160. package/dist/config/env-parser.js +70 -0
  161. package/dist/config/env-parser.js.map +1 -0
  162. package/dist/config/env-writer.d.ts +22 -0
  163. package/dist/config/env-writer.d.ts.map +1 -0
  164. package/dist/config/env-writer.js +172 -0
  165. package/dist/config/env-writer.js.map +1 -0
  166. package/dist/config/profile-store.d.ts +29 -0
  167. package/dist/config/profile-store.d.ts.map +1 -0
  168. package/dist/config/profile-store.js +257 -0
  169. package/dist/config/profile-store.js.map +1 -0
  170. package/dist/core/args.d.ts +11 -0
  171. package/dist/core/args.d.ts.map +1 -0
  172. package/dist/core/args.js +106 -0
  173. package/dist/core/args.js.map +1 -0
  174. package/dist/core/colors.d.ts +6 -0
  175. package/dist/core/colors.d.ts.map +1 -0
  176. package/dist/core/colors.js +29 -0
  177. package/dist/core/colors.js.map +1 -0
  178. package/dist/safety/target-guard.d.ts +16 -0
  179. package/dist/safety/target-guard.d.ts.map +1 -0
  180. package/dist/safety/target-guard.js +55 -0
  181. package/dist/safety/target-guard.js.map +1 -0
  182. package/dist/testing/booking-smoke.d.ts +17 -0
  183. package/dist/testing/booking-smoke.d.ts.map +1 -0
  184. package/dist/testing/booking-smoke.js +43 -0
  185. package/dist/testing/booking-smoke.js.map +1 -0
  186. package/dist/tests/agent-commands.test.d.ts +2 -0
  187. package/dist/tests/agent-commands.test.d.ts.map +1 -0
  188. package/dist/tests/agent-commands.test.js +180 -0
  189. package/dist/tests/agent-commands.test.js.map +1 -0
  190. package/dist/tests/agent-governance.test.d.ts +2 -0
  191. package/dist/tests/agent-governance.test.d.ts.map +1 -0
  192. package/dist/tests/agent-governance.test.js +233 -0
  193. package/dist/tests/agent-governance.test.js.map +1 -0
  194. package/dist/tests/app-commands.test.d.ts +2 -0
  195. package/dist/tests/app-commands.test.d.ts.map +1 -0
  196. package/dist/tests/app-commands.test.js +462 -0
  197. package/dist/tests/app-commands.test.js.map +1 -0
  198. package/dist/tests/booking-commands.test.d.ts +2 -0
  199. package/dist/tests/booking-commands.test.d.ts.map +1 -0
  200. package/dist/tests/booking-commands.test.js +204 -0
  201. package/dist/tests/booking-commands.test.js.map +1 -0
  202. package/dist/tests/booking-smoke.test.d.ts +2 -0
  203. package/dist/tests/booking-smoke.test.d.ts.map +1 -0
  204. package/dist/tests/booking-smoke.test.js +183 -0
  205. package/dist/tests/booking-smoke.test.js.map +1 -0
  206. package/dist/tests/cms-commands.test.d.ts +2 -0
  207. package/dist/tests/cms-commands.test.d.ts.map +1 -0
  208. package/dist/tests/cms-commands.test.js +254 -0
  209. package/dist/tests/cms-commands.test.js.map +1 -0
  210. package/dist/tests/cms-ops.test.d.ts +2 -0
  211. package/dist/tests/cms-ops.test.d.ts.map +1 -0
  212. package/dist/tests/cms-ops.test.js +125 -0
  213. package/dist/tests/cms-ops.test.js.map +1 -0
  214. package/dist/tests/env-writer.test.d.ts +2 -0
  215. package/dist/tests/env-writer.test.d.ts.map +1 -0
  216. package/dist/tests/env-writer.test.js +90 -0
  217. package/dist/tests/env-writer.test.js.map +1 -0
  218. package/dist/tests/profile-store.test.d.ts +2 -0
  219. package/dist/tests/profile-store.test.d.ts.map +1 -0
  220. package/dist/tests/profile-store.test.js +88 -0
  221. package/dist/tests/profile-store.test.js.map +1 -0
  222. package/dist/tests/target-guard.test.d.ts +2 -0
  223. package/dist/tests/target-guard.test.d.ts.map +1 -0
  224. package/dist/tests/target-guard.test.js +132 -0
  225. package/dist/tests/target-guard.test.js.map +1 -0
  226. package/dist/ui/logo.d.ts +2 -0
  227. package/dist/ui/logo.d.ts.map +1 -0
  228. package/dist/ui/logo.js +22 -0
  229. package/dist/ui/logo.js.map +1 -0
  230. package/package.json +17 -53
  231. package/.claude/settings.local.json +0 -36
  232. package/.cursor/rules.md +0 -203
  233. package/.eslintrc.js +0 -31
  234. package/CLAUDE.md +0 -100
  235. package/bin/cli.js +0 -116
  236. package/docs/ADDING_FRAMEWORK_DETECTORS.md +0 -391
  237. package/docs/ADDING_NEW_PROJECT_TYPE.md +0 -156
  238. package/docs/ARCHITECTURE_RELATIONSHIPS.md +0 -411
  239. package/docs/CLI_AUTHENTICATION.md +0 -214
  240. package/docs/CLI_PAGE_DETECTION_REQUIREMENTS.md +0 -519
  241. package/docs/CRM-PIPELINES-SEQUENCES-SPEC.md +0 -429
  242. package/docs/DETECTOR_ARCHITECTURE.md +0 -326
  243. package/docs/DEVELOPMENT.md +0 -194
  244. package/docs/IMPLEMENTATION_PHASES.md +0 -468
  245. package/docs/INTEGRATION_PATHS_ARCHITECTURE.md +0 -1543
  246. package/docs/OAUTH_CLARIFICATION.md +0 -258
  247. package/docs/OAUTH_SETUP_GUIDE_TEMPLATE.md +0 -211
  248. package/docs/PHASE_0_PROGRESS.md +0 -120
  249. package/docs/PHASE_1_COMPLETE.md +0 -366
  250. package/docs/PHASE_SUMMARY.md +0 -149
  251. package/docs/PLAN.md +0 -511
  252. package/docs/README.md +0 -56
  253. package/docs/STRIPE_INTEGRATION.md +0 -447
  254. package/docs/SUMMARY.md +0 -230
  255. package/docs/UPDATED_PLAN.md +0 -447
  256. package/docs/mcp_server/MCP_EXTENSION_GUIDE.md +0 -1313
  257. package/docs/mcp_server/MCP_SERVER_ARCHITECTURE.md +0 -1481
  258. package/docs/mcp_server/applicationOntology.ts +0 -817
  259. package/docs/mcp_server/cliApplications.ts +0 -639
  260. package/docs/mcp_server/crmOntology.ts +0 -1063
  261. package/docs/mcp_server/eventOntology.ts +0 -1183
  262. package/docs/mcp_server/formsOntology.ts +0 -1401
  263. package/docs/mcp_server/ontologySchemas.ts +0 -185
  264. package/docs/mcp_server/schema.ts +0 -250
  265. package/docs/microsass_production_machine/CLI_API_REFERENCE.md +0 -1197
  266. package/docs/microsass_production_machine/CLI_PRODUCT_VISION.md +0 -676
  267. package/docs/microsass_production_machine/CLI_REQUIREMENTS.md +0 -606
  268. package/docs/microsass_production_machine/CONNECTED_APPLICATIONS_SPEC.md +0 -390
  269. package/docs/microsass_production_machine/IMPLEMENTATION_ROADMAP.md +0 -725
  270. package/docs/microsass_production_machine/OBJECT_MAPPINGS.md +0 -808
  271. package/docs/microsass_production_machine/REFERENCE_IMPLEMENTATION.md +0 -532
  272. package/src/api/backend-client.js +0 -449
  273. package/src/commands/api-keys.js +0 -119
  274. package/src/commands/connect.js +0 -243
  275. package/src/commands/login.js +0 -332
  276. package/src/commands/logout.js +0 -30
  277. package/src/commands/mcp-server.js +0 -85
  278. package/src/commands/mcp-setup.js +0 -686
  279. package/src/commands/pages.js +0 -317
  280. package/src/commands/scaffold.js +0 -409
  281. package/src/commands/spread.js +0 -861
  282. package/src/commands/status.js +0 -62
  283. package/src/commands/sync.js +0 -169
  284. package/src/commands/upgrade.js +0 -48
  285. package/src/config/config-manager.js +0 -206
  286. package/src/detectors/api-client-detector.js +0 -85
  287. package/src/detectors/base-detector.js +0 -77
  288. package/src/detectors/database-detector.js +0 -245
  289. package/src/detectors/expo-detector.js +0 -166
  290. package/src/detectors/github-detector.js +0 -74
  291. package/src/detectors/index.js +0 -106
  292. package/src/detectors/mapping-suggestor.js +0 -119
  293. package/src/detectors/model-detector.js +0 -318
  294. package/src/detectors/nextjs-detector.js +0 -139
  295. package/src/detectors/oauth-detector.js +0 -122
  296. package/src/detectors/page-detector.js +0 -480
  297. package/src/detectors/registry.js +0 -121
  298. package/src/generators/api-client-generator.js +0 -223
  299. package/src/generators/api-only/client.js +0 -683
  300. package/src/generators/api-only/index.js +0 -96
  301. package/src/generators/api-only/types.js +0 -618
  302. package/src/generators/api-only/webhooks.js +0 -377
  303. package/src/generators/env-generator.js +0 -191
  304. package/src/generators/expo-auth-generator.js +0 -1009
  305. package/src/generators/gitignore-generator.js +0 -92
  306. package/src/generators/index.js +0 -166
  307. package/src/generators/manifest-generator.js +0 -154
  308. package/src/generators/mcp-guide-generator.js +0 -256
  309. package/src/generators/nextauth-generator.js +0 -247
  310. package/src/generators/oauth-guide-generator.js +0 -277
  311. package/src/generators/quickstart/components/index.js +0 -1699
  312. package/src/generators/quickstart/components-mobile/index.js +0 -1440
  313. package/src/generators/quickstart/database/convex.js +0 -1257
  314. package/src/generators/quickstart/database/index.js +0 -34
  315. package/src/generators/quickstart/database/supabase.js +0 -1132
  316. package/src/generators/quickstart/hooks/index.js +0 -1065
  317. package/src/generators/quickstart/index.js +0 -191
  318. package/src/generators/quickstart/pages/index.js +0 -1466
  319. package/src/generators/quickstart/screens/index.js +0 -1498
  320. package/src/logo.js +0 -116
  321. package/src/mcp/auth.js +0 -127
  322. package/src/mcp/registry/domains/applications.js +0 -516
  323. package/src/mcp/registry/domains/benefits.js +0 -798
  324. package/src/mcp/registry/domains/codegen.js +0 -894
  325. package/src/mcp/registry/domains/core.js +0 -324
  326. package/src/mcp/registry/domains/crm.js +0 -591
  327. package/src/mcp/registry/domains/events.js +0 -649
  328. package/src/mcp/registry/domains/forms.js +0 -696
  329. package/src/mcp/registry/index.js +0 -164
  330. package/src/mcp/server.js +0 -116
  331. package/src/utils/file-utils.js +0 -117
  332. package/src/utils/init-helpers.js +0 -243
  333. package/src/utils/prompt-utils.js +0 -195
  334. package/templates/CLAUDE.md +0 -86
  335. package/tests/api-client-detector.test.js +0 -214
  336. package/tests/api-client-generator.test.js +0 -176
  337. package/tests/backend-client.test.js +0 -640
  338. package/tests/base-detector.test.js +0 -101
  339. package/tests/commands/login.test.js +0 -143
  340. package/tests/commands/logout.test.js +0 -84
  341. package/tests/commands/status.test.js +0 -167
  342. package/tests/config-manager.test.js +0 -321
  343. package/tests/database-detector.test.js +0 -221
  344. package/tests/detector-index.test.js +0 -209
  345. package/tests/detector-registry.test.js +0 -93
  346. package/tests/env-generator.test.js +0 -278
  347. package/tests/expo-detector.test.js +0 -263
  348. package/tests/file-utils.test.js +0 -194
  349. package/tests/generators-index.test.js +0 -454
  350. package/tests/github-detector.test.js +0 -145
  351. package/tests/gitignore-generator.test.js +0 -109
  352. package/tests/logo.test.js +0 -96
  353. package/tests/nextauth-generator.test.js +0 -255
  354. package/tests/nextjs-detector.test.js +0 -235
  355. package/tests/oauth-detector.test.js +0 -264
  356. package/tests/oauth-guide-generator.test.js +0 -273
  357. package/tests/page-detector.test.js +0 -371
@@ -1,808 +0,0 @@
1
- # L4YERCAK3 CLI - Object Type Mappings
2
-
3
- This document defines how external application models map to L4YERCAK3 object types.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- The CLI uses intelligent detection to map external application models to L4YERCAK3's universal ontology. Each L4YERCAK3 object type has specific properties and behaviors.
10
-
11
- ---
12
-
13
- ## L4YERCAK3 Object Types
14
-
15
- ### Core Object Structure
16
-
17
- All objects in L4YERCAK3 follow this base structure:
18
-
19
- ```typescript
20
- interface L4YERCAK3Object {
21
- _id: Id<"objects">;
22
- organizationId: Id<"organizations">;
23
- type: string; // "contact", "event", "invoice", etc.
24
- subtype?: string; // More specific categorization
25
- status: string; // Lifecycle status
26
- displayName: string; // Human-readable name
27
- customProperties: Record<string, any>; // Type-specific data
28
- createdAt: number;
29
- updatedAt: number;
30
- createdBy?: Id<"users">;
31
- }
32
- ```
33
-
34
- ---
35
-
36
- ## Type: `contact`
37
-
38
- ### Description
39
- Represents a person in the CRM. Customers, leads, attendees, members.
40
-
41
- ### Status Values
42
- - `active` - Normal contact
43
- - `archived` - Archived/inactive
44
- - `blocked` - Blocked from communications
45
-
46
- ### Custom Properties
47
- ```typescript
48
- {
49
- email: string;
50
- phone?: string;
51
- firstName?: string;
52
- lastName?: string;
53
- company?: string;
54
- jobTitle?: string;
55
- addresses?: Address[];
56
- tags?: string[];
57
- source?: string; // "web", "import", "event", "api"
58
- marketingConsent?: boolean;
59
- notes?: string;
60
- customFields?: Record<string, any>;
61
- }
62
- ```
63
-
64
- ### Detection Patterns
65
-
66
- **Model Name Matches:**
67
- - `user`, `User`, `users`
68
- - `customer`, `Customer`
69
- - `member`, `Member`
70
- - `subscriber`, `Subscriber`
71
- - `lead`, `Lead`
72
- - `attendee`, `Attendee`
73
- - `person`, `Person`
74
- - `contact`, `Contact`
75
-
76
- **Field Indicators (presence increases confidence):**
77
- - `email` (required indicator)
78
- - `firstName`, `lastName`, `name`
79
- - `phone`, `phoneNumber`, `mobile`
80
- - `company`, `companyName`, `organization`
81
-
82
- ### Example Mapping
83
-
84
- ```yaml
85
- External Model: User
86
- L4YERCAK3 Type: contact
87
- Confidence: 95%
88
-
89
- Field Mappings:
90
- email → email
91
- name → displayName
92
- firstName → customProperties.firstName
93
- lastName → customProperties.lastName
94
- phoneNumber → customProperties.phone
95
- company → customProperties.company
96
- createdAt → createdAt
97
- ```
98
-
99
- ---
100
-
101
- ## Type: `crm_organization`
102
-
103
- ### Description
104
- Represents a company/business in the CRM. B2B clients, partners, vendors.
105
-
106
- ### Status Values
107
- - `active` - Active organization
108
- - `prospect` - Potential client
109
- - `archived` - No longer active
110
-
111
- ### Custom Properties
112
- ```typescript
113
- {
114
- name: string;
115
- website?: string;
116
- industry?: string;
117
- employeeCount?: number;
118
- taxId?: string;
119
- vatNumber?: string;
120
- addresses?: {
121
- billing?: Address;
122
- shipping?: Address;
123
- };
124
- primaryContactId?: Id<"objects">;
125
- annualRevenue?: number;
126
- notes?: string;
127
- }
128
- ```
129
-
130
- ### Detection Patterns
131
-
132
- **Model Name Matches:**
133
- - `company`, `Company`
134
- - `organization`, `Organization`
135
- - `business`, `Business`
136
- - `client`, `Client`
137
- - `account`, `Account`
138
- - `vendor`, `Vendor`
139
- - `partner`, `Partner`
140
-
141
- **Field Indicators:**
142
- - `companyName`, `name`
143
- - `taxId`, `vatNumber`, `ein`
144
- - `website`, `url`
145
- - `industry`
146
- - `employees`, `employeeCount`
147
-
148
- ### Example Mapping
149
-
150
- ```yaml
151
- External Model: Company
152
- L4YERCAK3 Type: crm_organization
153
- Confidence: 92%
154
-
155
- Field Mappings:
156
- name → displayName
157
- website → customProperties.website
158
- taxId → customProperties.taxId
159
- industry → customProperties.industry
160
- ```
161
-
162
- ---
163
-
164
- ## Type: `event`
165
-
166
- ### Description
167
- Represents gatherings - conferences, workshops, webinars, meetups.
168
-
169
- ### Subtypes
170
- - `conference` - Multi-day conference
171
- - `workshop` - Interactive session
172
- - `webinar` - Online event
173
- - `meetup` - Informal gathering
174
- - `concert` - Performance event
175
-
176
- ### Status Values
177
- - `draft` - Not yet published
178
- - `published` - Open for registration
179
- - `in_progress` - Currently happening
180
- - `completed` - Event finished
181
- - `cancelled` - Event cancelled
182
-
183
- ### Custom Properties
184
- ```typescript
185
- {
186
- startDate: string; // ISO 8601
187
- endDate: string;
188
- timezone?: string;
189
- location?: string;
190
- venue?: {
191
- name: string;
192
- address: Address;
193
- coordinates?: { lat: number; lng: number };
194
- };
195
- isOnline?: boolean;
196
- onlineUrl?: string;
197
- capacity?: number;
198
- registeredCount?: number;
199
- description?: string;
200
- agenda?: AgendaItem[];
201
- sponsors?: Sponsor[];
202
- speakers?: Speaker[];
203
- imageUrl?: string;
204
- }
205
- ```
206
-
207
- ### Detection Patterns
208
-
209
- **Model Name Matches:**
210
- - `event`, `Event`
211
- - `conference`, `Conference`
212
- - `workshop`, `Workshop`
213
- - `webinar`, `Webinar`
214
- - `meetup`, `Meetup`
215
- - `session`, `Session`
216
-
217
- **Field Indicators:**
218
- - `startDate`, `startTime`, `eventDate`
219
- - `endDate`, `endTime`
220
- - `location`, `venue`
221
- - `capacity`, `maxAttendees`
222
-
223
- ### Example Mapping
224
-
225
- ```yaml
226
- External Model: Event
227
- L4YERCAK3 Type: event
228
- Confidence: 100%
229
-
230
- Field Mappings:
231
- title → displayName
232
- startDate → customProperties.startDate
233
- endDate → customProperties.endDate
234
- venue → customProperties.location
235
- maxCapacity → customProperties.capacity
236
- ```
237
-
238
- ---
239
-
240
- ## Type: `product`
241
-
242
- ### Description
243
- Sellable items - tickets, physical goods, digital products, services.
244
-
245
- ### Subtypes
246
- - `ticket` - Event ticket
247
- - `physical` - Physical goods
248
- - `digital` - Digital download/access
249
- - `service` - Service offering
250
- - `subscription` - Recurring product
251
-
252
- ### Status Values
253
- - `draft` - Not yet available
254
- - `active` - Available for purchase
255
- - `sold_out` - No inventory
256
- - `archived` - Discontinued
257
-
258
- ### Custom Properties
259
- ```typescript
260
- {
261
- price: number; // In cents
262
- currency: string; // "EUR", "USD"
263
- quantity?: number; // -1 for unlimited
264
- sold?: number;
265
- description?: string;
266
- images?: string[];
267
- sku?: string;
268
- taxCategory?: string;
269
- taxRate?: number;
270
- linkedEventId?: Id<"objects">;
271
- variants?: ProductVariant[];
272
- formId?: Id<"objects">; // Registration form
273
- }
274
- ```
275
-
276
- ### Detection Patterns
277
-
278
- **Model Name Matches:**
279
- - `product`, `Product`
280
- - `item`, `Item`
281
- - `sku`, `SKU`
282
- - `offering`, `Offering`
283
- - `service`, `Service`
284
- - `ticket`, `Ticket` (maps to product with subtype="ticket")
285
-
286
- **Field Indicators:**
287
- - `price`, `amount`, `cost`
288
- - `currency`
289
- - `quantity`, `stock`, `inventory`
290
- - `sku`, `productCode`
291
-
292
- ### Example Mapping
293
-
294
- ```yaml
295
- External Model: Product
296
- L4YERCAK3 Type: product
297
- Confidence: 98%
298
-
299
- Field Mappings:
300
- name → displayName
301
- priceInCents → customProperties.price
302
- stockCount → customProperties.quantity
303
- productCode → customProperties.sku
304
- ```
305
-
306
- ---
307
-
308
- ## Type: `ticket`
309
-
310
- ### Description
311
- Event access ticket - issued after purchase, contains QR code.
312
-
313
- ### Status Values
314
- - `valid` - Can be used
315
- - `redeemed` - Already used/checked-in
316
- - `cancelled` - Cancelled ticket
317
- - `expired` - Past validity date
318
-
319
- ### Custom Properties
320
- ```typescript
321
- {
322
- qrCode: string; // Unique scannable code
323
- productId: Id<"objects">;
324
- eventId: Id<"objects">;
325
- attendeeName: string;
326
- attendeeEmail: string;
327
- purchasedAt: number;
328
- validFrom?: string;
329
- validUntil?: string;
330
- checkedIn?: boolean;
331
- checkedInAt?: number;
332
- checkedInBy?: Id<"users">;
333
- seatNumber?: string;
334
- registrationData?: Record<string, any>;
335
- pdfUrl?: string;
336
- }
337
- ```
338
-
339
- ### Detection Patterns
340
-
341
- **Model Name Matches:**
342
- - `ticket`, `Ticket`
343
- - `registration`, `Registration`
344
- - `booking`, `Booking`
345
- - `rsvp`, `RSVP`
346
- - `admission`, `Admission`
347
-
348
- **Field Indicators:**
349
- - `qrCode`, `barcode`, `ticketCode`
350
- - `eventId`, `event`
351
- - `attendee`, `holder`
352
- - `checkedIn`, `redeemed`
353
-
354
- ---
355
-
356
- ## Type: `invoice`
357
-
358
- ### Description
359
- B2B/B2C invoice for billing.
360
-
361
- ### Status Values
362
- - `draft` - Can be edited
363
- - `sealed` - Locked, assigned number
364
- - `sent` - Sent to client
365
- - `paid` - Full payment received
366
- - `partially_paid` - Partial payment
367
- - `overdue` - Past due date
368
- - `void` - Cancelled
369
-
370
- ### Custom Properties
371
- ```typescript
372
- {
373
- invoiceNumber: string;
374
- clientId: Id<"objects">; // Contact or CRM org
375
- clientName: string;
376
- clientEmail: string;
377
- clientAddress?: Address;
378
- lineItems: {
379
- description: string;
380
- quantity: number;
381
- unitPrice: number;
382
- total: number;
383
- taxRate?: number;
384
- }[];
385
- subtotal: number;
386
- taxRate: number;
387
- tax: number;
388
- total: number;
389
- currency: string;
390
- issueDate: string;
391
- dueDate: string;
392
- paymentTerms: string; // "net30", "net60", "due_on_receipt"
393
- paidAmount?: number;
394
- paidAt?: number;
395
- notes?: string;
396
- pdfUrl?: string;
397
- stripeInvoiceId?: string;
398
- }
399
- ```
400
-
401
- ### Detection Patterns
402
-
403
- **Model Name Matches:**
404
- - `invoice`, `Invoice`
405
- - `bill`, `Bill`
406
- - `receipt`, `Receipt`
407
-
408
- **Field Indicators:**
409
- - `invoiceNumber`, `billNumber`
410
- - `lineItems`, `items`
411
- - `dueDate`, `paymentDue`
412
- - `totalAmount`, `grandTotal`
413
-
414
- ---
415
-
416
- ## Type: `transaction`
417
-
418
- ### Description
419
- Financial transaction record (from checkout).
420
-
421
- ### Subtypes
422
- - `ticket_purchase` - Event ticket
423
- - `product_purchase` - Product sale
424
- - `service` - Service payment
425
- - `subscription` - Recurring payment
426
-
427
- ### Status Values
428
- - `pending` - Awaiting payment
429
- - `completed` - Payment successful
430
- - `failed` - Payment failed
431
- - `refunded` - Money returned
432
- - `invoiced` - Linked to invoice
433
-
434
- ### Custom Properties
435
- ```typescript
436
- {
437
- lineItems: {
438
- productId: Id<"objects">;
439
- productName: string;
440
- quantity: number;
441
- unitPrice: number;
442
- total: number;
443
- taxAmount: number;
444
- }[];
445
- subtotal: number;
446
- tax: number;
447
- total: number;
448
- currency: string;
449
- customerEmail: string;
450
- customerName?: string;
451
- paymentMethod: string;
452
- paymentIntentId?: string;
453
- checkoutSessionId?: string;
454
- invoiceId?: Id<"objects">;
455
- }
456
- ```
457
-
458
- ### Detection Patterns
459
-
460
- **Model Name Matches:**
461
- - `transaction`, `Transaction`
462
- - `payment`, `Payment`
463
- - `order`, `Order`
464
- - `purchase`, `Purchase`
465
- - `sale`, `Sale`
466
-
467
- ---
468
-
469
- ## Type: `form`
470
-
471
- ### Description
472
- Data collection form (registration, survey, application).
473
-
474
- ### Subtypes
475
- - `registration` - Event/product registration
476
- - `survey` - Feedback/research
477
- - `application` - Job/grant application
478
- - `contact` - Contact form
479
-
480
- ### Status Values
481
- - `draft` - Not accepting responses
482
- - `published` - Accepting responses
483
- - `archived` - Closed
484
-
485
- ### Custom Properties
486
- ```typescript
487
- {
488
- fields: {
489
- id: string;
490
- type: string; // "text", "email", "select", "checkbox", etc.
491
- label: string;
492
- required: boolean;
493
- placeholder?: string;
494
- options?: string[]; // For select/radio/checkbox
495
- validation?: {
496
- pattern?: string;
497
- min?: number;
498
- max?: number;
499
- };
500
- conditionalDisplay?: {
501
- dependsOn: string;
502
- showWhen: any;
503
- };
504
- }[];
505
- responseCount?: number;
506
- linkedProductId?: Id<"objects">;
507
- linkedEventId?: Id<"objects">;
508
- confirmationMessage?: string;
509
- notifyEmail?: string;
510
- }
511
- ```
512
-
513
- ### Detection Patterns
514
-
515
- **Model Name Matches:**
516
- - `form`, `Form`
517
- - `survey`, `Survey`
518
- - `questionnaire`, `Questionnaire`
519
- - `application`, `Application`
520
-
521
- ---
522
-
523
- ## Type: `form_response`
524
-
525
- ### Description
526
- Submitted form data.
527
-
528
- ### Status Values
529
- - `partial` - Incomplete submission
530
- - `complete` - Full submission
531
- - `abandoned` - Started but not completed
532
-
533
- ### Custom Properties
534
- ```typescript
535
- {
536
- formId: Id<"objects">;
537
- responses: Record<string, any>;
538
- submittedAt: number;
539
- submittedBy?: Id<"objects">; // Contact if known
540
- ipAddress?: string;
541
- userAgent?: string;
542
- }
543
- ```
544
-
545
- ---
546
-
547
- ## Type: `project`
548
-
549
- ### Description
550
- Client project with milestones and tasks.
551
-
552
- ### Status Values
553
- - `draft` - Planning phase
554
- - `active` - In progress
555
- - `on_hold` - Paused
556
- - `completed` - Finished
557
- - `cancelled` - Abandoned
558
-
559
- ### Custom Properties
560
- ```typescript
561
- {
562
- clientId: Id<"objects">; // Contact or CRM org
563
- clientName: string;
564
- description?: string;
565
- budget?: number;
566
- currency?: string;
567
- startDate?: string;
568
- endDate?: string;
569
- progress?: number; // 0-100
570
- milestones?: {
571
- id: string;
572
- name: string;
573
- status: string;
574
- dueDate?: string;
575
- completedAt?: number;
576
- }[];
577
- tasks?: {
578
- id: string;
579
- title: string;
580
- status: string;
581
- assigneeId?: Id<"users">;
582
- dueDate?: string;
583
- priority: string;
584
- }[];
585
- teamMembers?: {
586
- userId: Id<"users">;
587
- role: string;
588
- }[];
589
- }
590
- ```
591
-
592
- ### Detection Patterns
593
-
594
- **Model Name Matches:**
595
- - `project`, `Project`
596
- - `campaign`, `Campaign`
597
- - `engagement`, `Engagement`
598
- - `job`, `Job`
599
-
600
- ---
601
-
602
- ## Type: `template`
603
-
604
- ### Description
605
- Reusable templates for PDFs, emails, pages.
606
-
607
- ### Subtypes
608
- - `ticket_pdf` - Ticket PDF
609
- - `invoice_pdf` - Invoice PDF
610
- - `email` - Email template
611
- - `sms` - SMS template
612
- - `landing_page` - Web page
613
-
614
- ### Custom Properties
615
- ```typescript
616
- {
617
- // For email
618
- subject?: string;
619
- htmlContent?: string;
620
- textContent?: string;
621
-
622
- // For PDF
623
- htmlTemplate?: string;
624
- cssStyles?: string;
625
-
626
- // Common
627
- variables: string[]; // Available merge fields
628
- previewImageUrl?: string;
629
- }
630
- ```
631
-
632
- ---
633
-
634
- ## Type: `workflow`
635
-
636
- ### Description
637
- Automation workflow with triggers and actions.
638
-
639
- ### Status Values
640
- - `draft` - Not active
641
- - `active` - Running
642
- - `paused` - Temporarily disabled
643
-
644
- ### Custom Properties
645
- ```typescript
646
- {
647
- trigger: {
648
- type: string; // "contact_created", "form_submitted", etc.
649
- conditions?: Record<string, any>;
650
- };
651
- actions: {
652
- type: string; // "send_email", "create_contact", etc.
653
- config: Record<string, any>;
654
- delay?: number; // Minutes to wait
655
- }[];
656
- lastRunAt?: number;
657
- runCount?: number;
658
- }
659
- ```
660
-
661
- ---
662
-
663
- ## Type: `page` (Web Publishing)
664
-
665
- ### Description
666
- Published web page/portal.
667
-
668
- ### Subtypes
669
- - `freelancer_portal` - Client portal
670
- - `landing_page` - Marketing page
671
- - `checkout_page` - Payment page
672
- - `event_page` - Event info page
673
-
674
- ### Status Values
675
- - `draft` - Not published
676
- - `published` - Live
677
- - `archived` - Taken down
678
-
679
- ### Custom Properties
680
- ```typescript
681
- {
682
- slug: string;
683
- publicUrl: string;
684
- templateCode: string;
685
- themeCode: string;
686
- content: Record<string, any>;
687
- customCss?: string;
688
- metaTitle?: string;
689
- metaDescription?: string;
690
- ogImage?: string;
691
- analyticsEnabled?: boolean;
692
- viewCount?: number;
693
- }
694
- ```
695
-
696
- ---
697
-
698
- ## Type: `certificate`
699
-
700
- ### Description
701
- Achievement/completion certificate.
702
-
703
- ### Status Values
704
- - `issued` - Active certificate
705
- - `revoked` - Invalidated
706
-
707
- ### Custom Properties
708
- ```typescript
709
- {
710
- recipientId: Id<"objects">; // Contact
711
- recipientName: string;
712
- title: string;
713
- description: string;
714
- issueDate: string;
715
- expiryDate?: string;
716
- certificateNumber: string;
717
- verificationUrl: string;
718
- pdfUrl?: string;
719
- linkedEventId?: Id<"objects">;
720
- linkedProductId?: Id<"objects">;
721
- }
722
- ```
723
-
724
- ---
725
-
726
- ## Type: `benefit`
727
-
728
- ### Description
729
- Membership/community benefit.
730
-
731
- ### Status Values
732
- - `active` - Available
733
- - `inactive` - Not available
734
- - `archived` - Removed
735
-
736
- ### Custom Properties
737
- ```typescript
738
- {
739
- title: string;
740
- description: string;
741
- category: string;
742
- redemptionInstructions?: string;
743
- partnerName?: string;
744
- partnerUrl?: string;
745
- discountCode?: string;
746
- discountPercentage?: number;
747
- validFrom?: string;
748
- validUntil?: string;
749
- imageUrl?: string;
750
- }
751
- ```
752
-
753
- ---
754
-
755
- ## Mapping Confidence Calculation
756
-
757
- The CLI calculates mapping confidence based on:
758
-
759
- 1. **Name Match Score (40%)**
760
- - Exact match: 100
761
- - Case-insensitive match: 90
762
- - Plural/singular variant: 85
763
- - Partial match: 60
764
-
765
- 2. **Field Presence Score (40%)**
766
- - Each indicator field present: +20
767
- - Required field (e.g., email for contact): +30
768
- - Cap at 100
769
-
770
- 3. **Type Compatibility Score (20%)**
771
- - Field types align with expected: +10 each
772
- - Cap at 100
773
-
774
- **Final Score = (Name * 0.4) + (Fields * 0.4) + (Types * 0.2)**
775
-
776
- **Thresholds:**
777
- - 90%+ : Auto-accept
778
- - 70-89%: Suggest with confirmation
779
- - 50-69%: Show as option
780
- - <50%: Custom mapping required
781
-
782
- ---
783
-
784
- ## Custom Mapping
785
-
786
- For models that don't match standard patterns:
787
-
788
- ```yaml
789
- # .l4yercak3/mappings.yaml
790
-
791
- mappings:
792
- - localModel: Subscription
793
- layerCakeType: product
794
- subtype: subscription
795
- confidence: manual
796
- fieldMappings:
797
- planName: displayName
798
- monthlyPrice: customProperties.price
799
- features: customProperties.description
800
- status: status
801
- transforms:
802
- monthlyPrice: "value * 100" # Convert to cents
803
- ```
804
-
805
- ---
806
-
807
- *Document Version: 1.0*
808
- *Last Updated: January 2025*