oneie 2.0.2 → 2.0.5

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 (459) hide show
  1. package/AGENTS.md +245 -0
  2. package/CLAUDE.md +725 -0
  3. package/LICENSE.md +84 -0
  4. package/README.md +489 -931
  5. package/folders.yaml +78 -17
  6. package/one/.obsidian/app.json +1 -0
  7. package/one/.obsidian/appearance.json +1 -0
  8. package/one/.obsidian/core-plugins.json +33 -0
  9. package/one/.obsidian/workspace.json +211 -0
  10. package/one/connections/a2a.md +551 -0
  11. package/one/connections/acp.md +761 -0
  12. package/one/connections/acps.md +731 -0
  13. package/one/connections/agentkit.md +349 -0
  14. package/one/connections/agui.md +767 -0
  15. package/one/connections/any-backend.md +1702 -0
  16. package/one/connections/ap2.md +998 -0
  17. package/one/connections/api-docs.md +1891 -0
  18. package/one/connections/api.md +2190 -0
  19. package/one/connections/architecture-diagram.md +94 -0
  20. package/one/connections/communications.md +449 -0
  21. package/one/connections/connections.md +339 -0
  22. package/one/connections/copilotkit.md +1559 -0
  23. package/one/connections/cryptonetworks.md +781 -0
  24. package/one/connections/documentation.md +1120 -0
  25. package/one/connections/effect.md +279 -0
  26. package/one/connections/elizaos.md +1290 -0
  27. package/one/connections/inference.md +58 -0
  28. package/one/connections/kyc.md +632 -0
  29. package/one/connections/mcp.md +842 -0
  30. package/one/connections/membership.md +1152 -0
  31. package/one/connections/middleware.md +1067 -0
  32. package/one/connections/multitenant.md +1341 -0
  33. package/one/connections/n8n.md +1015 -0
  34. package/one/connections/patterns.md +89 -0
  35. package/one/connections/protocols.md +279 -0
  36. package/one/connections/relationships.md +107 -0
  37. package/one/connections/schema.md +587 -0
  38. package/one/connections/service-layer.md +550 -0
  39. package/one/connections/structure.md +0 -0
  40. package/one/connections/vectors.md +207 -0
  41. package/one/connections/wordpress.md +1302 -0
  42. package/one/connections/workflow-copy.md +905 -0
  43. package/one/connections/workflow-examples.md +741 -0
  44. package/one/connections/workflow.md +905 -0
  45. package/one/connections/workflows/delegation.md +885 -0
  46. package/one/connections/workflows/frontend.md +1037 -0
  47. package/one/connections/workflows/strategy.md +903 -0
  48. package/one/connections/workflows/tasks.md +698 -0
  49. package/one/connections/x402.md +1249 -0
  50. package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +412 -0
  51. package/one/events/FEATURE-2-4-COMPLETE.md +302 -0
  52. package/one/events/FEATURE_2_3_COMPLETE.md +575 -0
  53. package/one/events/GROUPS-MIGRATION.md +625 -0
  54. package/one/events/INSTALL-TESTS.md +293 -0
  55. package/one/events/INTEGRATION-ARCHITECTURE.md +561 -0
  56. package/one/events/INTEGRATION-CHECKLIST.md +1234 -0
  57. package/one/events/INTEGRATION-ORCHESTRATION.md +2623 -0
  58. package/one/events/INTEGRATION-SUMMARY.md +653 -0
  59. package/one/events/MIGRATION-REPORT.md +435 -0
  60. package/one/events/MIGRATION.md +69 -0
  61. package/one/events/README-archived.md +519 -0
  62. package/one/events/TEST-SUMMARY.md +393 -0
  63. package/one/events/TESTS-QUICK-REF.md +262 -0
  64. package/one/events/events.md +545 -0
  65. package/one/groups/groups.md +543 -0
  66. package/one/groups/one.md +599 -0
  67. package/one/groups/revenue.md +673 -0
  68. package/one/groups/strategy.md +869 -0
  69. package/one/groups/vision.md +98 -0
  70. package/one/knowledge/CLOUDFLARE_ENV_SETUP.md +49 -0
  71. package/one/knowledge/ai-platform.md +305 -0
  72. package/one/knowledge/architecture-any-backend.md +1366 -0
  73. package/one/knowledge/architecture-diagram.md +94 -0
  74. package/one/knowledge/architecture-frontend.md +930 -0
  75. package/one/knowledge/architecture.md +2077 -0
  76. package/one/knowledge/crypto.md +960 -0
  77. package/one/knowledge/docs/flow.md +0 -0
  78. package/one/knowledge/dsl.md +1660 -0
  79. package/one/knowledge/files.md +2471 -0
  80. package/one/knowledge/frontend.md +1038 -0
  81. package/one/knowledge/hono.md +2109 -0
  82. package/one/knowledge/implementation-examples.md +2536 -0
  83. package/one/knowledge/inference-score.md +159 -0
  84. package/one/knowledge/knowledge.md +642 -0
  85. package/one/knowledge/language.md +980 -0
  86. package/one/knowledge/lessons-learned.md +70 -0
  87. package/one/knowledge/ontology-6-dimensions.md +0 -0
  88. package/one/knowledge/ontology-documentation.md +356 -0
  89. package/one/knowledge/ontology-engineering-specification.md +1292 -0
  90. package/one/knowledge/ontology-engineering.md +1652 -0
  91. package/one/knowledge/ontology-frontend-copy-2.md +1492 -0
  92. package/one/knowledge/ontology-frontend-copy.md +753 -0
  93. package/one/knowledge/ontology-frontend-specifications.md +2188 -0
  94. package/one/knowledge/ontology-frontend.md +2427 -0
  95. package/one/knowledge/ontology-minimal.yaml +299 -0
  96. package/one/knowledge/ontology.md +2830 -0
  97. package/one/knowledge/ontology.md.backup +2822 -0
  98. package/one/knowledge/ontology.yaml +1165 -0
  99. package/one/knowledge/patterns/backend/convex-mutation-pattern.md +100 -0
  100. package/one/knowledge/patterns/backend/convex-query-pattern.md +88 -0
  101. package/one/knowledge/patterns/backend/mutation-template.md +231 -0
  102. package/one/knowledge/patterns/backend/query-template.md +267 -0
  103. package/one/knowledge/patterns/backend/service-template.md +237 -0
  104. package/one/knowledge/patterns/design/component-architecture.md +399 -0
  105. package/one/knowledge/patterns/design/test-driven-design-pattern.md +162 -0
  106. package/one/knowledge/patterns/design/wireframe-template.md +216 -0
  107. package/one/knowledge/patterns/frontend/component-template.md +195 -0
  108. package/one/knowledge/patterns/frontend/form-template.md +276 -0
  109. package/one/knowledge/patterns/frontend/page-template.md +178 -0
  110. package/one/knowledge/patterns/frontend/react-component-pattern.md +128 -0
  111. package/one/knowledge/patterns/test/acceptance-criteria-template.md +378 -0
  112. package/one/knowledge/patterns/test/technical-test-template.md +544 -0
  113. package/one/knowledge/patterns/test/test-driven-pattern.md +140 -0
  114. package/one/knowledge/patterns/test/user-flow-template.md +254 -0
  115. package/one/knowledge/provider-creation-guide.md +1064 -0
  116. package/one/knowledge/quality-loop.md +401 -0
  117. package/one/knowledge/readme.md +131 -0
  118. package/one/knowledge/rules.md +626 -0
  119. package/one/knowledge/score.md +67 -0
  120. package/one/knowledge/specifications.md +855 -0
  121. package/one/knowledge/tags.md +130 -0
  122. package/one/knowledge/todo.md +251 -0
  123. package/one/license.md +84 -0
  124. package/one/people/anthony-o-connell.md +440 -0
  125. package/one/people/people.md +567 -0
  126. package/one/things/CHECKLIST.md +356 -0
  127. package/one/things/ONE.md +510 -0
  128. package/one/things/agents/agent-backend.md +1401 -0
  129. package/one/things/agents/agent-builder.md +955 -0
  130. package/one/things/agents/agent-clean.md +709 -0
  131. package/one/things/agents/agent-clone.md +1341 -0
  132. package/one/things/agents/agent-designer.md +2177 -0
  133. package/one/things/agents/agent-director.md +1508 -0
  134. package/one/things/agents/agent-documenter.md +1049 -0
  135. package/one/things/agents/agent-frontend.md +1119 -0
  136. package/one/things/agents/agent-integrator.md +1192 -0
  137. package/one/things/agents/agent-problem-solver.md +1379 -0
  138. package/one/things/agents/agent-quality.md +1353 -0
  139. package/one/things/agents/agent-sales.md +986 -0
  140. package/one/things/cascade/cascade.yaml +464 -0
  141. package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +470 -0
  142. package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +264 -0
  143. package/one/things/cascade/docs/examples/1-1-agent-prompts.md +486 -0
  144. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +497 -0
  145. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +227 -0
  146. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +516 -0
  147. package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +544 -0
  148. package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +223 -0
  149. package/one/things/cascade/docs/examples/1-3-event-coordination.md +508 -0
  150. package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +609 -0
  151. package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +195 -0
  152. package/one/things/cascade/docs/examples/1-4-knowledge-management.md +577 -0
  153. package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +797 -0
  154. package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +212 -0
  155. package/one/things/cascade/docs/examples/1-5-quality-loops.md +641 -0
  156. package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +610 -0
  157. package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +213 -0
  158. package/one/things/cascade/docs/examples/1-6-numbering-structure.md +575 -0
  159. package/one/things/cascade/docs/examples/readme.md +222 -0
  160. package/one/things/cascade/docs/getting-started.md +515 -0
  161. package/one/things/cascade/docs/workflow.md +1372 -0
  162. package/one/things/cascade/readme.md +336 -0
  163. package/one/things/cascade/templates/feature-template.md +267 -0
  164. package/one/things/claude/agents/advocacy-activation-manager.md +685 -0
  165. package/one/things/claude/agents/advocacy-campaign-designer.md +663 -0
  166. package/one/things/claude/agents/analyst.md +483 -0
  167. package/one/things/claude/agents/architect.md +480 -0
  168. package/one/things/claude/agents/brand-identity-specialist.md +513 -0
  169. package/one/things/claude/agents/bstp-token-strategist.md +667 -0
  170. package/one/things/claude/agents/builder-repo.md +489 -0
  171. package/one/things/claude/agents/bullstamp-community-builder.md +574 -0
  172. package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +506 -0
  173. package/one/things/claude/agents/bulltilt-platform-growth.md +567 -0
  174. package/one/things/claude/agents/company-bullstamp-character.md +587 -0
  175. package/one/things/claude/agents/company-bullstamp-community.md +292 -0
  176. package/one/things/claude/agents/company-bullstamp-marketing.md +292 -0
  177. package/one/things/claude/agents/company-bullstamp-token.md +292 -0
  178. package/one/things/claude/agents/company-bulltilt-growth.md +292 -0
  179. package/one/things/claude/agents/content-bibliography-formatter.md +381 -0
  180. package/one/things/claude/agents/content-calendar-planner.md +448 -0
  181. package/one/things/claude/agents/content-chapter-formatter.md +488 -0
  182. package/one/things/claude/agents/content-formatter.md +546 -0
  183. package/one/things/claude/agents/content-hook-specialist.md +462 -0
  184. package/one/things/claude/agents/content-image-formatter.md +535 -0
  185. package/one/things/claude/agents/content-introduction-formatter.md +485 -0
  186. package/one/things/claude/agents/content-multiplication-engine.md +556 -0
  187. package/one/things/claude/agents/content-playbook-writer.md +448 -0
  188. package/one/things/claude/agents/content-team-manager.md +622 -0
  189. package/one/things/claude/agents/content-toc-formatter.md +522 -0
  190. package/one/things/claude/agents/convex-backend-specialist.md +2561 -0
  191. package/one/things/claude/agents/core-manager.md +582 -0
  192. package/one/things/claude/agents/core-master.md +403 -0
  193. package/one/things/claude/agents/cross-functional-manager.md +471 -0
  194. package/one/things/claude/agents/crypto-airdrop-strategist.md +602 -0
  195. package/one/things/claude/agents/crypto-analytics-educator.md +553 -0
  196. package/one/things/claude/agents/crypto-architecture-specialist.md +466 -0
  197. package/one/things/claude/agents/crypto-community-analyst.md +298 -0
  198. package/one/things/claude/agents/crypto-community-psychologist.md +509 -0
  199. package/one/things/claude/agents/crypto-dex-optimization-expert.md +538 -0
  200. package/one/things/claude/agents/crypto-dex-optimizer.md +292 -0
  201. package/one/things/claude/agents/crypto-diamond-formation-specialist.md +513 -0
  202. package/one/things/claude/agents/crypto-diamond-hands.md +292 -0
  203. package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +554 -0
  204. package/one/things/claude/agents/crypto-engagement-specialist.md +540 -0
  205. package/one/things/claude/agents/crypto-market-researcher.md +292 -0
  206. package/one/things/claude/agents/crypto-marketing-orchestrator.md +523 -0
  207. package/one/things/claude/agents/crypto-network-effect-amplifier.md +569 -0
  208. package/one/things/claude/agents/crypto-optimization-analyst.md +554 -0
  209. package/one/things/claude/agents/crypto-strategic-synthesizer.md +517 -0
  210. package/one/things/claude/agents/crypto-team-manager.md +387 -0
  211. package/one/things/claude/agents/crypto-token-analyst.md +278 -0
  212. package/one/things/claude/agents/crypto-viral-content-creator.md +546 -0
  213. package/one/things/claude/agents/crypto-wallet-identification-expert.md +517 -0
  214. package/one/things/claude/agents/crypto-wallet-identifier.md +292 -0
  215. package/one/things/claude/agents/customer-journey-designer.md +481 -0
  216. package/one/things/claude/agents/customer-success-manager.md +581 -0
  217. package/one/things/claude/agents/dev.md +413 -0
  218. package/one/things/claude/agents/documenter.md +546 -0
  219. package/one/things/claude/agents/elevate-marketing-orchestrator.md +410 -0
  220. package/one/things/claude/agents/engagement-specialist.md +509 -0
  221. package/one/things/claude/agents/engineering-architect.md +387 -0
  222. package/one/things/claude/agents/engineering-business-analyst.md +537 -0
  223. package/one/things/claude/agents/engineering-developer.md +387 -0
  224. package/one/things/claude/agents/engineering-director.md +282 -0
  225. package/one/things/claude/agents/engineering-ingestor.md +649 -0
  226. package/one/things/claude/agents/engineering-product-manager.md +537 -0
  227. package/one/things/claude/agents/engineering-product-owner.md +537 -0
  228. package/one/things/claude/agents/engineering-project-coordinator.md +537 -0
  229. package/one/things/claude/agents/engineering-quality-assurance.md +393 -0
  230. package/one/things/claude/agents/engineering-team-manager.md +512 -0
  231. package/one/things/claude/agents/engineering-user-experience.md +387 -0
  232. package/one/things/claude/agents/framework-elevate-manager.md +294 -0
  233. package/one/things/claude/agents/improver.md +763 -0
  234. package/one/things/claude/agents/intelligence-team-manager.md +385 -0
  235. package/one/things/claude/agents/lead-capture-expert.md +466 -0
  236. package/one/things/claude/agents/lead-magnet-creator.md +453 -0
  237. package/one/things/claude/agents/market-research-analyst.md +412 -0
  238. package/one/things/claude/agents/marketing-brand-identity.md +314 -0
  239. package/one/things/claude/agents/marketing-content-hooks.md +450 -0
  240. package/one/things/claude/agents/marketing-content-multiplier.md +326 -0
  241. package/one/things/claude/agents/marketing-content-poster.md +361 -0
  242. package/one/things/claude/agents/marketing-customer-journey.md +326 -0
  243. package/one/things/claude/agents/marketing-director.md +397 -0
  244. package/one/things/claude/agents/marketing-engagement.md +326 -0
  245. package/one/things/claude/agents/marketing-lead-capture.md +326 -0
  246. package/one/things/claude/agents/marketing-lead-magnet.md +326 -0
  247. package/one/things/claude/agents/marketing-network-effects.md +326 -0
  248. package/one/things/claude/agents/marketing-nurture-campaigns.md +326 -0
  249. package/one/things/claude/agents/marketing-share-optimizer.md +326 -0
  250. package/one/things/claude/agents/marketing-team-manager.md +446 -0
  251. package/one/things/claude/agents/marketing-viral-growth.md +201 -0
  252. package/one/things/claude/agents/mission-commander.md +373 -0
  253. package/one/things/claude/agents/network-effect-analyst.md +587 -0
  254. package/one/things/claude/agents/nextjs-15-specialist.md +1547 -0
  255. package/one/things/claude/agents/npx.md +890 -0
  256. package/one/things/claude/agents/nurture-campaign-manager.md +531 -0
  257. package/one/things/claude/agents/one-master.md +355 -0
  258. package/one/things/claude/agents/one-orchestrator.md +315 -0
  259. package/one/things/claude/agents/one.md +601 -0
  260. package/one/things/claude/agents/playbook-generator.md +503 -0
  261. package/one/things/claude/agents/pm.md +326 -0
  262. package/one/things/claude/agents/po.md +345 -0
  263. package/one/things/claude/agents/qa.md +336 -0
  264. package/one/things/claude/agents/research-foundation-analyst.md +307 -0
  265. package/one/things/claude/agents/research-intelligence-gatherer.md +408 -0
  266. package/one/things/claude/agents/research-market-analyst.md +307 -0
  267. package/one/things/claude/agents/research-team-manager.md +482 -0
  268. package/one/things/claude/agents/sales-environment-optimizer.md +494 -0
  269. package/one/things/claude/agents/sales-team-manager.md +400 -0
  270. package/one/things/claude/agents/sales-upsell-strategist.md +307 -0
  271. package/one/things/claude/agents/service-advocacy-campaigns.md +307 -0
  272. package/one/things/claude/agents/service-advocacy-manager.md +307 -0
  273. package/one/things/claude/agents/service-success-manager.md +307 -0
  274. package/one/things/claude/agents/service-team-manager.md +400 -0
  275. package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +2302 -0
  276. package/one/things/claude/agents/share-optimization-specialist.md +551 -0
  277. package/one/things/claude/agents/sm.md +327 -0
  278. package/one/things/claude/agents/story-teller.md +473 -0
  279. package/one/things/claude/agents/task-master.md +596 -0
  280. package/one/things/claude/agents/tauri-cross-platform-specialist.md +1827 -0
  281. package/one/things/claude/agents/tester.md +556 -0
  282. package/one/things/claude/agents/the-bull-character-manager.md +580 -0
  283. package/one/things/claude/agents/tools-playbook-generator.md +489 -0
  284. package/one/things/claude/agents/turbo-repo-builder.md +316 -0
  285. package/one/things/claude/agents/upsell-strategist.md +480 -0
  286. package/one/things/claude/agents/ux-expert.md +335 -0
  287. package/one/things/claude/agents/viral-growth-orchestrator.md +497 -0
  288. package/one/things/claude/claude-code-hooks-development.json +21 -0
  289. package/one/things/claude/claude-code-hooks-production.json +21 -0
  290. package/one/things/claude/claude-code-hooks.json +25 -0
  291. package/one/things/claude/commands/agent.md +104 -0
  292. package/one/things/claude/commands/cascade-status.md +128 -0
  293. package/one/things/claude/commands/ingest.md +290 -0
  294. package/one/things/claude/commands/ingestor.md +136 -0
  295. package/one/things/claude/commands/mission.md +83 -0
  296. package/one/things/claude/commands/npx.md +133 -0
  297. package/one/things/claude/commands/one.md +440 -0
  298. package/one/things/claude/commands/quality-check.md +204 -0
  299. package/one/things/claude/commands/smart-route.md +220 -0
  300. package/one/things/claude/commands/start.md +121 -0
  301. package/one/things/claude/commands/story.md +83 -0
  302. package/one/things/claude/commands/task.md +173 -0
  303. package/one/things/claude/hook-bypass.json +32 -0
  304. package/one/things/claude/hooks/agent-hook-config.json +427 -0
  305. package/one/things/claude/hooks/agent-hook-manager.js +525 -0
  306. package/one/things/claude/hooks/agent-load-balancer.js +271 -0
  307. package/one/things/claude/hooks/agent-request-interceptor.js +70 -0
  308. package/one/things/claude/hooks/build-hook.sh +156 -0
  309. package/one/things/claude/hooks/cascade-feedback.js +297 -0
  310. package/one/things/claude/hooks/cascade-integration-hooks.js +648 -0
  311. package/one/things/claude/hooks/cleanup-hook.sh +201 -0
  312. package/one/things/claude/hooks/continuous-improvement-monitor.js +510 -0
  313. package/one/things/claude/hooks/file-organization-engine.js +427 -0
  314. package/one/things/claude/hooks/file-organization-hook.sh +80 -0
  315. package/one/things/claude/hooks/file-organization-monitor.js +269 -0
  316. package/one/things/claude/hooks/format-hook.sh +43 -0
  317. package/one/things/claude/hooks/hook-bypass.sh +293 -0
  318. package/one/things/claude/hooks/hook-config-manager.js +202 -0
  319. package/one/things/claude/hooks/hook-debouncer.sh +62 -0
  320. package/one/things/claude/hooks/hook-logger.sh +89 -0
  321. package/one/things/claude/hooks/hook-orchestrator.js +662 -0
  322. package/one/things/claude/hooks/hook-performance-report.js +120 -0
  323. package/one/things/claude/hooks/lint-hook.sh +140 -0
  324. package/one/things/claude/hooks/mcp-cascade-integration.js +816 -0
  325. package/one/things/claude/hooks/memory-optimizer.js +510 -0
  326. package/one/things/claude/hooks/notification-hook.sh +204 -0
  327. package/one/things/claude/hooks/ontology-compliance.js +394 -0
  328. package/one/things/claude/hooks/ontology-hook-manager.js +316 -0
  329. package/one/things/claude/hooks/ontology-validation-engine.js +317 -0
  330. package/one/things/claude/hooks/ontology-validation-hook.sh +86 -0
  331. package/one/things/claude/hooks/performance-metrics.json +25 -0
  332. package/one/things/claude/hooks/performance-monitoring-hook.js +422 -0
  333. package/one/things/claude/hooks/quality-scoring-engine.js +834 -0
  334. package/one/things/claude/hooks/security-hook.sh +256 -0
  335. package/one/things/claude/hooks/simple-load-balancer.js +238 -0
  336. package/one/things/claude/hooks/startup-optimizer.js +625 -0
  337. package/one/things/claude/hooks/story-scoring-system.js +445 -0
  338. package/one/things/claude/hooks/story-validation-engine.js +473 -0
  339. package/one/things/claude/hooks/story-validation-hook-enhanced.sh +210 -0
  340. package/one/things/claude/hooks/story-validation-hook.sh +145 -0
  341. package/one/things/claude/hooks/structure-synchronizer.js +194 -0
  342. package/one/things/claude/hooks/sub-agent-output-validator.js +647 -0
  343. package/one/things/claude/hooks/sub-agent-validation-hook.js +343 -0
  344. package/one/things/claude/hooks/test-hook.sh +145 -0
  345. package/one/things/claude/hooks/test-story-validation.sh +170 -0
  346. package/one/things/claude/hooks/trinity-validation-system.js +392 -0
  347. package/one/things/claude/settings-local.json +86 -0
  348. package/one/things/cli/cli-code.md +652 -0
  349. package/one/things/cli/cli-compiler-code.md +652 -0
  350. package/one/things/cli/cli.md +1068 -0
  351. package/one/things/components/card-shadcn.md +929 -0
  352. package/one/things/components/card.md +1050 -0
  353. package/one/things/components.md +1669 -0
  354. package/one/things/componets.md +4 -0
  355. package/one/things/creator-diagram.md +166 -0
  356. package/one/things/examples/children/lemonade-stand.md +366 -0
  357. package/one/things/examples/enterprise/crm-saas.md +1429 -0
  358. package/one/things/features/1-1-agent-prompts/design.md +470 -0
  359. package/one/things/features/1-1-agent-prompts/tests.md +264 -0
  360. package/one/things/features/1-1-agent-prompts.md +486 -0
  361. package/one/things/features/1-2-yaml-orchestrator/design.md +497 -0
  362. package/one/things/features/1-2-yaml-orchestrator/tests.md +227 -0
  363. package/one/things/features/1-2-yaml-orchestrator.md +516 -0
  364. package/one/things/features/1-3-event-coordination/design.md +544 -0
  365. package/one/things/features/1-3-event-coordination/tests.md +223 -0
  366. package/one/things/features/1-3-event-coordination.md +508 -0
  367. package/one/things/features/1-4-knowledge-management/design.md +609 -0
  368. package/one/things/features/1-4-knowledge-management/tests.md +195 -0
  369. package/one/things/features/1-4-knowledge-management.md +577 -0
  370. package/one/things/features/1-5-quality-loops/design.md +797 -0
  371. package/one/things/features/1-5-quality-loops/tests.md +212 -0
  372. package/one/things/features/1-5-quality-loops.md +641 -0
  373. package/one/things/features/1-6-numbering-structure/design.md +610 -0
  374. package/one/things/features/1-6-numbering-structure/tests.md +213 -0
  375. package/one/things/features/1-6-numbering-structure.md +575 -0
  376. package/one/things/features/2-1-dataprovider-interface.md +2358 -0
  377. package/one/things/features/2-2-config-system.md +3075 -0
  378. package/one/things/features/2-3-effectts-services.md +1498 -0
  379. package/one/things/features/2-4-react-hooks.md +2120 -0
  380. package/one/things/features/2-5-auth-migration.md +2046 -0
  381. package/one/things/features/2-6-dashboard-migration.md +1985 -0
  382. package/one/things/features/2-7-alternative-providers.md +2505 -0
  383. package/one/things/features/2-7-implementation-report.md +680 -0
  384. package/one/things/features/2-cli.md +1235 -0
  385. package/one/things/features/2-design.md +1738 -0
  386. package/one/things/features/2-tests.md +520 -0
  387. package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +521 -0
  388. package/one/things/features/DECOUPLING.md +272 -0
  389. package/one/things/features/DEPLOYMENT.md +452 -0
  390. package/one/things/features/IMPLEMENTATION_SUMMARY.md +316 -0
  391. package/one/things/features/dataprovider-interface/1-tests.md +1522 -0
  392. package/one/things/features/improve.md +843 -0
  393. package/one/things/features/remove-convex-deps.md +45 -0
  394. package/one/things/features/top-features.md +79 -0
  395. package/one/things/features/use-one-backend.md +1180 -0
  396. package/one/things/ideas/1-create-workflow.md +189 -0
  397. package/one/things/ideas/2-backend-agnostic-frontend.md +384 -0
  398. package/one/things/plans/1-create-workflow-status.md +555 -0
  399. package/one/things/plans/1-create-workflow.md +713 -0
  400. package/one/things/plans/2-backend-agnostic-frontend.md +543 -0
  401. package/one/things/plans/3-groups.md +502 -0
  402. package/one/things/plans/app.md +761 -0
  403. package/one/things/plans/backend-agnostic-frontend.md +323 -0
  404. package/one/things/plans/better-auth-any-backend-revised.md +1065 -0
  405. package/one/things/plans/better-auth-any-backend.md +1852 -0
  406. package/one/things/plans/better-auth-available-features.md +235 -0
  407. package/one/things/plans/big-plan.md +38 -0
  408. package/one/things/plans/convex-better-auth.md +1109 -0
  409. package/one/things/plans/convex-on-off.md +389 -0
  410. package/one/things/plans/deploy-to-cloudflare.md +581 -0
  411. package/one/things/plans/desktop.md +1121 -0
  412. package/one/things/plans/effect-components.md +1669 -0
  413. package/one/things/plans/effect.md +973 -0
  414. package/one/things/plans/email.md +953 -0
  415. package/one/things/plans/enhance-auth.md +1669 -0
  416. package/one/things/plans/install-components.md +198 -0
  417. package/one/things/plans/landing.md +728 -0
  418. package/one/things/plans/layout.md +205 -0
  419. package/one/things/plans/mail-backend.md +1308 -0
  420. package/one/things/plans/mail.md +2624 -0
  421. package/one/things/plans/next-features.md +83 -0
  422. package/one/things/plans/one.md +658 -0
  423. package/one/things/plans/ontology-6-dimensions.md +2216 -0
  424. package/one/things/plans/ontology-driven-strategy.md +866 -0
  425. package/one/things/plans/ontology-ui-approach.md +357 -0
  426. package/one/things/plans/open-agent.md +785 -0
  427. package/one/things/plans/organizations-to-groups.md +705 -0
  428. package/one/things/plans/performace.md +90 -0
  429. package/one/things/plans/release.md +432 -0
  430. package/one/things/plans/releases.md +809 -0
  431. package/one/things/plans/repos.md +76 -0
  432. package/one/things/plans/separate-copy-2.md +1293 -0
  433. package/one/things/plans/separate-copy-3.md +2458 -0
  434. package/one/things/plans/separate-copy.md +1293 -0
  435. package/one/things/plans/separate.md +1983 -0
  436. package/one/things/plans/shadcn-integration-summary.md +450 -0
  437. package/one/things/plans/sidebar.md +172 -0
  438. package/one/things/plans/small-fixes.md +5 -0
  439. package/one/things/plans/test-backend-connection.md +476 -0
  440. package/one/things/plans/workflow-files.md +1196 -0
  441. package/one/things/plans/workflow.md +1372 -0
  442. package/one/things/products/cascade-landing-page.md +737 -0
  443. package/one/things/products/cascade.md +1518 -0
  444. package/one/things/products/context-engineering.md +1427 -0
  445. package/one/things/products/onthology.md +0 -0
  446. package/one/things/products/ontology-ui-shadcn.md +1280 -0
  447. package/one/things/products/ontology-ui.md +1387 -0
  448. package/one/things/products/ontology.md +717 -0
  449. package/one/things/products/sdk.md +557 -0
  450. package/one/things/promptkit.md +903 -0
  451. package/one/things/service-providers-new.md +982 -0
  452. package/one/things/service-providers.md +1092 -0
  453. package/one/things/system.md +600 -0
  454. package/one/things/tests/2-1-dataprovider-interface.md +1144 -0
  455. package/one/things/tests/2-1-test-analysis.md +496 -0
  456. package/one/things/things.md +349 -0
  457. package/one/things/todo.md +1248 -0
  458. package/one/things/vision/elegant-interface.md +214 -0
  459. package/package.json +5 -2
@@ -0,0 +1,1891 @@
1
+ # ONE Platform API Documentation (OpenAPI 3.1.0)
2
+
3
+ **Version:** 1.0.0
4
+ **Last Updated:** 2025-01-15
5
+ **Base URL:** `https://your-deployment.convex.cloud`
6
+
7
+ This document provides complete API documentation for the ONE platform using OpenAPI 3.1.0 specification format.
8
+
9
+ ---
10
+
11
+ ## Table of Contents
12
+
13
+ 1. [Authentication](#authentication)
14
+ 2. [API Endpoints](#api-endpoints)
15
+ - [Authentication & User Management](#authentication--user-management)
16
+ - [Entity Operations](#entity-operations)
17
+ - [Connection Operations](#connection-operations)
18
+ - [Event Operations](#event-operations)
19
+ - [Tag Operations](#tag-operations)
20
+ 3. [Schemas](#schemas)
21
+ 4. [Error Responses](#error-responses)
22
+
23
+ ---
24
+
25
+ ## OpenAPI Specification
26
+
27
+ ```yaml
28
+ openapi: 3.1.0
29
+ info:
30
+ title: ONE Platform API
31
+ version: 1.0.0
32
+ description: |
33
+ Complete API for the ONE platform - Creator Economy Platform with AI Clones,
34
+ Token Economics, and Multi-Chain Support.
35
+
36
+ ## Architecture
37
+ - **Backend**: Convex (real-time, edge-deployed)
38
+ - **Authentication**: Better Auth with OAuth (GitHub, Google)
39
+ - **Database**: 6-dimension ontology (organizations, people, things, connections, events, knowledge)
40
+ - **Blockchain**: Multi-chain support (Sui, Base, Solana)
41
+
42
+ ## Authentication
43
+ All endpoints (except auth endpoints) require a session token in the request.
44
+ Pass the token via query parameter: `?token=your_session_token`
45
+
46
+ contact:
47
+ name: ONE Platform Support
48
+ url: https://one.ie
49
+ email: support@one.ie
50
+ license:
51
+ name: Proprietary
52
+
53
+ servers:
54
+ - url: https://your-deployment.convex.cloud
55
+ description: Production Convex Deployment
56
+ - url: http://localhost:3000
57
+ description: Local Development
58
+
59
+ tags:
60
+ - name: Authentication
61
+ description: User authentication and session management
62
+ - name: Users
63
+ description: User profile and settings
64
+ - name: Entities
65
+ description: Entity CRUD operations (46 entity types)
66
+ - name: Connections
67
+ description: Relationship management (25 connection types)
68
+ - name: Events
69
+ description: Event logging and history (35 event types)
70
+ - name: Tags
71
+ description: Taxonomy and categorization
72
+ - name: AI Clones
73
+ description: AI clone creation and management
74
+ - name: Tokens
75
+ description: Creator token operations
76
+ - name: Courses
77
+ description: Course creation and enrollment
78
+ - name: Content
79
+ description: Content management and generation
80
+ - name: Analytics
81
+ description: Metrics and insights
82
+
83
+ paths:
84
+ # ============================================================================
85
+ # AUTHENTICATION ENDPOINTS
86
+ # ============================================================================
87
+
88
+ /auth/signUp:
89
+ post:
90
+ tags:
91
+ - Authentication
92
+ summary: Create a new user account
93
+ operationId: signUp
94
+ description: |
95
+ Register a new user with email and password. Optionally sends
96
+ email verification link.
97
+
98
+ **Rate Limit:** 3 requests per hour per email
99
+ requestBody:
100
+ required: true
101
+ content:
102
+ application/json:
103
+ schema:
104
+ type: object
105
+ required:
106
+ - email
107
+ - password
108
+ properties:
109
+ email:
110
+ type: string
111
+ format: email
112
+ example: user@example.com
113
+ password:
114
+ type: string
115
+ format: password
116
+ minLength: 8
117
+ example: SecurePass123!
118
+ name:
119
+ type: string
120
+ example: John Doe
121
+ sendVerificationEmail:
122
+ type: boolean
123
+ default: false
124
+ description: Send email verification link
125
+ baseUrl:
126
+ type: string
127
+ format: uri
128
+ example: https://one.ie
129
+ description: Base URL for verification link (required if sendVerificationEmail=true)
130
+ responses:
131
+ '200':
132
+ description: User created successfully
133
+ content:
134
+ application/json:
135
+ schema:
136
+ type: object
137
+ properties:
138
+ token:
139
+ type: string
140
+ description: Session token (valid for 30 days)
141
+ example: a1b2c3d4e5f6...
142
+ userId:
143
+ type: string
144
+ description: Convex ID of created user
145
+ example: k17abc123def456
146
+ '400':
147
+ $ref: '#/components/responses/BadRequest'
148
+ '429':
149
+ $ref: '#/components/responses/RateLimitExceeded'
150
+ '500':
151
+ $ref: '#/components/responses/InternalError'
152
+
153
+ /auth/signIn:
154
+ post:
155
+ tags:
156
+ - Authentication
157
+ summary: Sign in with email and password
158
+ operationId: signIn
159
+ description: |
160
+ Authenticate user and create session.
161
+
162
+ **Rate Limit:** 5 requests per 15 minutes per email
163
+ requestBody:
164
+ required: true
165
+ content:
166
+ application/json:
167
+ schema:
168
+ type: object
169
+ required:
170
+ - email
171
+ - password
172
+ properties:
173
+ email:
174
+ type: string
175
+ format: email
176
+ example: user@example.com
177
+ password:
178
+ type: string
179
+ format: password
180
+ example: SecurePass123!
181
+ responses:
182
+ '200':
183
+ description: Signed in successfully
184
+ content:
185
+ application/json:
186
+ schema:
187
+ type: object
188
+ properties:
189
+ token:
190
+ type: string
191
+ description: Session token (valid for 30 days)
192
+ userId:
193
+ type: string
194
+ description: Convex ID of user
195
+ '400':
196
+ description: Invalid credentials
197
+ content:
198
+ application/json:
199
+ schema:
200
+ $ref: '#/components/schemas/Error'
201
+ '429':
202
+ $ref: '#/components/responses/RateLimitExceeded'
203
+
204
+ /auth/signOut:
205
+ post:
206
+ tags:
207
+ - Authentication
208
+ summary: Sign out and invalidate session
209
+ operationId: signOut
210
+ security:
211
+ - sessionToken: []
212
+ requestBody:
213
+ required: true
214
+ content:
215
+ application/json:
216
+ schema:
217
+ type: object
218
+ required:
219
+ - token
220
+ properties:
221
+ token:
222
+ type: string
223
+ description: Session token to invalidate
224
+ responses:
225
+ '200':
226
+ description: Signed out successfully
227
+ content:
228
+ application/json:
229
+ schema:
230
+ type: object
231
+ properties:
232
+ success:
233
+ type: boolean
234
+ example: true
235
+
236
+ /auth/signInWithOAuth:
237
+ post:
238
+ tags:
239
+ - Authentication
240
+ summary: Sign in with OAuth provider
241
+ operationId: signInWithOAuth
242
+ description: |
243
+ Authenticate user via OAuth (GitHub, Google). Creates user if doesn't exist.
244
+ requestBody:
245
+ required: true
246
+ content:
247
+ application/json:
248
+ schema:
249
+ type: object
250
+ required:
251
+ - provider
252
+ - email
253
+ - providerId
254
+ properties:
255
+ provider:
256
+ type: string
257
+ enum: [github, google]
258
+ example: github
259
+ email:
260
+ type: string
261
+ format: email
262
+ example: user@example.com
263
+ name:
264
+ type: string
265
+ example: John Doe
266
+ providerId:
267
+ type: string
268
+ description: OAuth provider's user ID
269
+ example: github_12345
270
+ responses:
271
+ '200':
272
+ description: Signed in successfully
273
+ content:
274
+ application/json:
275
+ schema:
276
+ type: object
277
+ properties:
278
+ token:
279
+ type: string
280
+ userId:
281
+ type: string
282
+
283
+ /auth/getCurrentUser:
284
+ get:
285
+ tags:
286
+ - Authentication
287
+ summary: Get current authenticated user
288
+ operationId: getCurrentUser
289
+ security:
290
+ - sessionToken: []
291
+ parameters:
292
+ - name: token
293
+ in: query
294
+ required: false
295
+ schema:
296
+ type: string
297
+ description: Session token
298
+ responses:
299
+ '200':
300
+ description: User details
301
+ content:
302
+ application/json:
303
+ schema:
304
+ oneOf:
305
+ - $ref: '#/components/schemas/CurrentUser'
306
+ - type: 'null'
307
+
308
+ /auth/requestPasswordReset:
309
+ post:
310
+ tags:
311
+ - Authentication
312
+ summary: Request password reset link
313
+ operationId: requestPasswordReset
314
+ description: |
315
+ Send password reset email with token. Returns success even if
316
+ user doesn't exist (security).
317
+
318
+ **Rate Limit:** 3 requests per hour per email
319
+ requestBody:
320
+ required: true
321
+ content:
322
+ application/json:
323
+ schema:
324
+ type: object
325
+ required:
326
+ - email
327
+ - baseUrl
328
+ properties:
329
+ email:
330
+ type: string
331
+ format: email
332
+ example: user@example.com
333
+ baseUrl:
334
+ type: string
335
+ format: uri
336
+ example: https://one.ie
337
+ description: Base URL for reset link
338
+ responses:
339
+ '200':
340
+ description: Request processed (always returns success)
341
+ content:
342
+ application/json:
343
+ schema:
344
+ type: object
345
+ properties:
346
+ success:
347
+ type: boolean
348
+ example: true
349
+ '429':
350
+ $ref: '#/components/responses/RateLimitExceeded'
351
+
352
+ /auth/validateResetToken:
353
+ get:
354
+ tags:
355
+ - Authentication
356
+ summary: Check if password reset token is valid
357
+ operationId: validateResetToken
358
+ parameters:
359
+ - name: token
360
+ in: query
361
+ required: true
362
+ schema:
363
+ type: string
364
+ description: Password reset token
365
+ responses:
366
+ '200':
367
+ description: Token validation result
368
+ content:
369
+ application/json:
370
+ schema:
371
+ type: object
372
+ properties:
373
+ valid:
374
+ type: boolean
375
+ example: true
376
+
377
+ /auth/resetPassword:
378
+ post:
379
+ tags:
380
+ - Authentication
381
+ summary: Reset password with token
382
+ operationId: resetPassword
383
+ description: |
384
+ Reset user password using valid reset token. Invalidates all
385
+ existing sessions.
386
+ requestBody:
387
+ required: true
388
+ content:
389
+ application/json:
390
+ schema:
391
+ type: object
392
+ required:
393
+ - token
394
+ - password
395
+ properties:
396
+ token:
397
+ type: string
398
+ description: Password reset token
399
+ password:
400
+ type: string
401
+ format: password
402
+ minLength: 8
403
+ description: New password
404
+ responses:
405
+ '200':
406
+ description: Password reset successfully
407
+ content:
408
+ application/json:
409
+ schema:
410
+ type: object
411
+ properties:
412
+ success:
413
+ type: boolean
414
+ example: true
415
+ '400':
416
+ description: Invalid or expired token
417
+
418
+ /auth/verifyEmail:
419
+ post:
420
+ tags:
421
+ - Authentication
422
+ summary: Verify email with token
423
+ operationId: verifyEmail
424
+ requestBody:
425
+ required: true
426
+ content:
427
+ application/json:
428
+ schema:
429
+ type: object
430
+ required:
431
+ - token
432
+ properties:
433
+ token:
434
+ type: string
435
+ description: Email verification token
436
+ responses:
437
+ '200':
438
+ description: Email verified successfully
439
+ content:
440
+ application/json:
441
+ schema:
442
+ type: object
443
+ properties:
444
+ success:
445
+ type: boolean
446
+ example: true
447
+ '400':
448
+ description: Invalid or expired verification token
449
+
450
+ /auth/isEmailVerified:
451
+ get:
452
+ tags:
453
+ - Authentication
454
+ summary: Check if user's email is verified
455
+ operationId: isEmailVerified
456
+ security:
457
+ - sessionToken: []
458
+ parameters:
459
+ - name: token
460
+ in: query
461
+ required: false
462
+ schema:
463
+ type: string
464
+ description: Session token
465
+ responses:
466
+ '200':
467
+ description: Email verification status
468
+ content:
469
+ application/json:
470
+ schema:
471
+ type: object
472
+ properties:
473
+ verified:
474
+ type: boolean
475
+ example: true
476
+
477
+ /auth/requestMagicLink:
478
+ post:
479
+ tags:
480
+ - Authentication
481
+ summary: Request magic link for passwordless sign in
482
+ operationId: requestMagicLink
483
+ description: |
484
+ Send magic link email for passwordless authentication.
485
+ Link expires in 15 minutes.
486
+
487
+ **Rate Limit:** 3 requests per hour per email
488
+ requestBody:
489
+ required: true
490
+ content:
491
+ application/json:
492
+ schema:
493
+ type: object
494
+ required:
495
+ - email
496
+ - baseUrl
497
+ properties:
498
+ email:
499
+ type: string
500
+ format: email
501
+ example: user@example.com
502
+ baseUrl:
503
+ type: string
504
+ format: uri
505
+ example: https://one.ie
506
+ responses:
507
+ '200':
508
+ description: Request processed
509
+ content:
510
+ application/json:
511
+ schema:
512
+ type: object
513
+ properties:
514
+ success:
515
+ type: boolean
516
+ example: true
517
+ '429':
518
+ $ref: '#/components/responses/RateLimitExceeded'
519
+
520
+ /auth/signInWithMagicLink:
521
+ post:
522
+ tags:
523
+ - Authentication
524
+ summary: Sign in with magic link token
525
+ operationId: signInWithMagicLink
526
+ requestBody:
527
+ required: true
528
+ content:
529
+ application/json:
530
+ schema:
531
+ type: object
532
+ required:
533
+ - token
534
+ properties:
535
+ token:
536
+ type: string
537
+ description: Magic link token
538
+ responses:
539
+ '200':
540
+ description: Signed in successfully
541
+ content:
542
+ application/json:
543
+ schema:
544
+ type: object
545
+ properties:
546
+ token:
547
+ type: string
548
+ description: Session token
549
+ userId:
550
+ type: string
551
+ '400':
552
+ description: Invalid or expired magic link
553
+
554
+ /auth/setup2FA:
555
+ post:
556
+ tags:
557
+ - Authentication
558
+ summary: Setup two-factor authentication
559
+ operationId: setup2FA
560
+ security:
561
+ - sessionToken: []
562
+ description: |
563
+ Initialize 2FA setup. Returns TOTP secret and backup codes.
564
+ requestBody:
565
+ required: true
566
+ content:
567
+ application/json:
568
+ schema:
569
+ type: object
570
+ required:
571
+ - token
572
+ properties:
573
+ token:
574
+ type: string
575
+ description: Session token
576
+ responses:
577
+ '200':
578
+ description: 2FA setup initiated
579
+ content:
580
+ application/json:
581
+ schema:
582
+ type: object
583
+ properties:
584
+ secret:
585
+ type: string
586
+ description: TOTP secret for authenticator app
587
+ example: JBSWY3DPEHPK3PXP
588
+ backupCodes:
589
+ type: array
590
+ items:
591
+ type: string
592
+ description: 10 backup codes
593
+ example: [A1B2C3D4, E5F6G7H8, ...]
594
+
595
+ /auth/verify2FA:
596
+ post:
597
+ tags:
598
+ - Authentication
599
+ summary: Verify and enable 2FA
600
+ operationId: verify2FA
601
+ security:
602
+ - sessionToken: []
603
+ requestBody:
604
+ required: true
605
+ content:
606
+ application/json:
607
+ schema:
608
+ type: object
609
+ required:
610
+ - token
611
+ properties:
612
+ token:
613
+ type: string
614
+ description: Session token
615
+ responses:
616
+ '200':
617
+ description: 2FA enabled successfully
618
+ content:
619
+ application/json:
620
+ schema:
621
+ type: object
622
+ properties:
623
+ success:
624
+ type: boolean
625
+ example: true
626
+
627
+ /auth/disable2FA:
628
+ post:
629
+ tags:
630
+ - Authentication
631
+ summary: Disable two-factor authentication
632
+ operationId: disable2FA
633
+ security:
634
+ - sessionToken: []
635
+ requestBody:
636
+ required: true
637
+ content:
638
+ application/json:
639
+ schema:
640
+ type: object
641
+ required:
642
+ - token
643
+ - password
644
+ properties:
645
+ token:
646
+ type: string
647
+ description: Session token
648
+ password:
649
+ type: string
650
+ format: password
651
+ description: User password for confirmation
652
+ responses:
653
+ '200':
654
+ description: 2FA disabled successfully
655
+ content:
656
+ application/json:
657
+ schema:
658
+ type: object
659
+ properties:
660
+ success:
661
+ type: boolean
662
+ example: true
663
+
664
+ /auth/get2FAStatus:
665
+ get:
666
+ tags:
667
+ - Authentication
668
+ summary: Get 2FA status for current user
669
+ operationId: get2FAStatus
670
+ security:
671
+ - sessionToken: []
672
+ parameters:
673
+ - name: token
674
+ in: query
675
+ required: false
676
+ schema:
677
+ type: string
678
+ description: Session token
679
+ responses:
680
+ '200':
681
+ description: 2FA status
682
+ content:
683
+ application/json:
684
+ schema:
685
+ type: object
686
+ properties:
687
+ enabled:
688
+ type: boolean
689
+ description: Whether 2FA is currently enabled
690
+ example: true
691
+ hasSetup:
692
+ type: boolean
693
+ description: Whether 2FA has been set up (even if disabled)
694
+ example: true
695
+
696
+ # ============================================================================
697
+ # ENTITY ENDPOINTS
698
+ # ============================================================================
699
+
700
+ /entities/create:
701
+ post:
702
+ tags:
703
+ - Entities
704
+ summary: Create a new entity
705
+ operationId: createEntity
706
+ security:
707
+ - sessionToken: []
708
+ description: |
709
+ Create any of the 46 entity types in the ONE platform.
710
+
711
+ **Entity Types:**
712
+ - Core: creator, ai_clone, audience_member
713
+ - Business Agents: 10 types (strategy_agent, marketing_agent, etc.)
714
+ - Content: 7 types (blog_post, video, podcast, etc.)
715
+ - Products: 4 types (digital_product, membership, etc.)
716
+ - And 22 more types...
717
+ requestBody:
718
+ required: true
719
+ content:
720
+ application/json:
721
+ schema:
722
+ $ref: '#/components/schemas/CreateEntityRequest'
723
+ examples:
724
+ creator:
725
+ summary: Create a creator
726
+ value:
727
+ type: creator
728
+ name: John Doe
729
+ properties:
730
+ email: john@example.com
731
+ username: johndoe
732
+ niche: [fitness, nutrition]
733
+ expertise: [training, coaching]
734
+ targetAudience: fitness enthusiasts
735
+ status: active
736
+ token:
737
+ summary: Create a token
738
+ value:
739
+ type: token
740
+ name: JOHN Token
741
+ properties:
742
+ contractAddress: "0x1234..."
743
+ blockchain: sui
744
+ totalSupply: 1000000
745
+ price: 0.10
746
+ status: active
747
+ responses:
748
+ '200':
749
+ description: Entity created successfully
750
+ content:
751
+ application/json:
752
+ schema:
753
+ type: object
754
+ properties:
755
+ entityId:
756
+ type: string
757
+ description: Convex ID of created entity
758
+ example: k17abc123def456
759
+ type:
760
+ type: string
761
+ example: creator
762
+ '400':
763
+ $ref: '#/components/responses/BadRequest'
764
+ '401':
765
+ $ref: '#/components/responses/Unauthorized'
766
+
767
+ /entities/get:
768
+ get:
769
+ tags:
770
+ - Entities
771
+ summary: Get entity by ID
772
+ operationId: getEntity
773
+ security:
774
+ - sessionToken: []
775
+ parameters:
776
+ - name: id
777
+ in: query
778
+ required: true
779
+ schema:
780
+ type: string
781
+ description: Entity ID
782
+ example: k17abc123def456
783
+ responses:
784
+ '200':
785
+ description: Entity details
786
+ content:
787
+ application/json:
788
+ schema:
789
+ oneOf:
790
+ - $ref: '#/components/schemas/Entity'
791
+ - type: 'null'
792
+
793
+ /entities/list:
794
+ get:
795
+ tags:
796
+ - Entities
797
+ summary: List entities by type
798
+ operationId: listEntities
799
+ security:
800
+ - sessionToken: []
801
+ parameters:
802
+ - name: type
803
+ in: query
804
+ required: true
805
+ schema:
806
+ $ref: '#/components/schemas/EntityType'
807
+ description: Entity type to filter
808
+ - name: status
809
+ in: query
810
+ required: false
811
+ schema:
812
+ type: string
813
+ enum: [active, inactive, draft, published, archived]
814
+ description: Filter by status
815
+ - name: limit
816
+ in: query
817
+ required: false
818
+ schema:
819
+ type: integer
820
+ minimum: 1
821
+ maximum: 100
822
+ default: 20
823
+ description: Maximum results to return
824
+ responses:
825
+ '200':
826
+ description: List of entities
827
+ content:
828
+ application/json:
829
+ schema:
830
+ type: array
831
+ items:
832
+ $ref: '#/components/schemas/Entity'
833
+
834
+ /entities/update:
835
+ post:
836
+ tags:
837
+ - Entities
838
+ summary: Update entity
839
+ operationId: updateEntity
840
+ security:
841
+ - sessionToken: []
842
+ requestBody:
843
+ required: true
844
+ content:
845
+ application/json:
846
+ schema:
847
+ type: object
848
+ required:
849
+ - id
850
+ properties:
851
+ id:
852
+ type: string
853
+ description: Entity ID
854
+ name:
855
+ type: string
856
+ description: Updated name
857
+ properties:
858
+ type: object
859
+ description: Updated properties (merged with existing)
860
+ status:
861
+ type: string
862
+ enum: [active, inactive, draft, published, archived]
863
+ responses:
864
+ '200':
865
+ description: Entity updated successfully
866
+ content:
867
+ application/json:
868
+ schema:
869
+ type: object
870
+ properties:
871
+ success:
872
+ type: boolean
873
+ example: true
874
+
875
+ /entities/delete:
876
+ post:
877
+ tags:
878
+ - Entities
879
+ summary: Soft delete entity
880
+ operationId: deleteEntity
881
+ security:
882
+ - sessionToken: []
883
+ description: |
884
+ Soft delete by setting deletedAt timestamp. Entity remains
885
+ in database but is filtered from queries.
886
+ requestBody:
887
+ required: true
888
+ content:
889
+ application/json:
890
+ schema:
891
+ type: object
892
+ required:
893
+ - id
894
+ properties:
895
+ id:
896
+ type: string
897
+ description: Entity ID
898
+ responses:
899
+ '200':
900
+ description: Entity deleted successfully
901
+ content:
902
+ application/json:
903
+ schema:
904
+ type: object
905
+ properties:
906
+ success:
907
+ type: boolean
908
+ example: true
909
+
910
+ # ============================================================================
911
+ # CONNECTION ENDPOINTS
912
+ # ============================================================================
913
+
914
+ /connections/create:
915
+ post:
916
+ tags:
917
+ - Connections
918
+ summary: Create a connection between entities
919
+ operationId: createConnection
920
+ security:
921
+ - sessionToken: []
922
+ description: |
923
+ Create relationship between two entities using one of 25 connection types.
924
+
925
+ **Connection Types:**
926
+ - Ownership: owns, created_by
927
+ - AI: clone_of, trained_on, powers
928
+ - Content: authored, generated_by, published_to, part_of, references
929
+ - Community: member_of, following, moderates, participated_in
930
+ - Business: manages, reports_to, collaborates_with, assigned_to
931
+ - Token: holds_tokens, staked_in, earned_from
932
+ - Product: purchased, enrolled_in, completed, teaching
933
+ - And 6 more types...
934
+ requestBody:
935
+ required: true
936
+ content:
937
+ application/json:
938
+ schema:
939
+ $ref: '#/components/schemas/CreateConnectionRequest'
940
+ examples:
941
+ following:
942
+ summary: User follows creator
943
+ value:
944
+ fromEntityId: k17user123
945
+ toEntityId: k17creator456
946
+ relationshipType: following
947
+ tokenHolding:
948
+ summary: User holds tokens
949
+ value:
950
+ fromEntityId: k17user123
951
+ toEntityId: k17token456
952
+ relationshipType: holds_tokens
953
+ metadata:
954
+ balance: 1000
955
+ blockchain: sui
956
+ responses:
957
+ '200':
958
+ description: Connection created
959
+ content:
960
+ application/json:
961
+ schema:
962
+ type: object
963
+ properties:
964
+ connectionId:
965
+ type: string
966
+ example: k17conn789
967
+
968
+ /connections/get:
969
+ get:
970
+ tags:
971
+ - Connections
972
+ summary: Get connections for an entity
973
+ operationId: getConnections
974
+ security:
975
+ - sessionToken: []
976
+ parameters:
977
+ - name: entityId
978
+ in: query
979
+ required: true
980
+ schema:
981
+ type: string
982
+ description: Entity ID
983
+ - name: direction
984
+ in: query
985
+ required: false
986
+ schema:
987
+ type: string
988
+ enum: [from, to, both]
989
+ default: both
990
+ description: Connection direction
991
+ - name: relationshipType
992
+ in: query
993
+ required: false
994
+ schema:
995
+ $ref: '#/components/schemas/ConnectionType'
996
+ description: Filter by relationship type
997
+ responses:
998
+ '200':
999
+ description: List of connections
1000
+ content:
1001
+ application/json:
1002
+ schema:
1003
+ type: array
1004
+ items:
1005
+ $ref: '#/components/schemas/Connection'
1006
+
1007
+ /connections/delete:
1008
+ post:
1009
+ tags:
1010
+ - Connections
1011
+ summary: Delete a connection
1012
+ operationId: deleteConnection
1013
+ security:
1014
+ - sessionToken: []
1015
+ requestBody:
1016
+ required: true
1017
+ content:
1018
+ application/json:
1019
+ schema:
1020
+ type: object
1021
+ required:
1022
+ - id
1023
+ properties:
1024
+ id:
1025
+ type: string
1026
+ description: Connection ID
1027
+ responses:
1028
+ '200':
1029
+ description: Connection deleted
1030
+ content:
1031
+ application/json:
1032
+ schema:
1033
+ type: object
1034
+ properties:
1035
+ success:
1036
+ type: boolean
1037
+ example: true
1038
+
1039
+ # ============================================================================
1040
+ # EVENT ENDPOINTS
1041
+ # ============================================================================
1042
+
1043
+ /events/log:
1044
+ post:
1045
+ tags:
1046
+ - Events
1047
+ summary: Log a new event
1048
+ operationId: logEvent
1049
+ security:
1050
+ - sessionToken: []
1051
+ description: |
1052
+ Log any of the 35 event types in the ONE platform.
1053
+
1054
+ **Event Types:**
1055
+ - Creator: creator_created, creator_updated, content_uploaded
1056
+ - AI Clone: 5 types (clone_created, clone_interaction, etc.)
1057
+ - Agent: 4 types (agent_created, agent_executed, etc.)
1058
+ - Content: 2 consolidated types (content_changed, content_interacted)
1059
+ - Token: 7 types (token_deployed, tokens_purchased, etc.)
1060
+ - And 20 more types...
1061
+ requestBody:
1062
+ required: true
1063
+ content:
1064
+ application/json:
1065
+ schema:
1066
+ $ref: '#/components/schemas/LogEventRequest'
1067
+ examples:
1068
+ tokenPurchase:
1069
+ summary: Log token purchase
1070
+ value:
1071
+ type: tokens_purchased
1072
+ actorId: k17user123
1073
+ targetId: k17token456
1074
+ metadata:
1075
+ amount: 100
1076
+ usdAmount: 10
1077
+ blockchain: sui
1078
+ txHash: "0xabc..."
1079
+ contentView:
1080
+ summary: Log content view
1081
+ value:
1082
+ type: content_interacted
1083
+ actorId: k17user123
1084
+ targetId: k17content456
1085
+ metadata:
1086
+ interactionType: viewed
1087
+ duration: 120
1088
+ source: feed
1089
+ responses:
1090
+ '200':
1091
+ description: Event logged
1092
+ content:
1093
+ application/json:
1094
+ schema:
1095
+ type: object
1096
+ properties:
1097
+ eventId:
1098
+ type: string
1099
+ example: k17event789
1100
+
1101
+ /events/getHistory:
1102
+ get:
1103
+ tags:
1104
+ - Events
1105
+ summary: Get event history
1106
+ operationId: getEventHistory
1107
+ security:
1108
+ - sessionToken: []
1109
+ parameters:
1110
+ - name: entityId
1111
+ in: query
1112
+ required: false
1113
+ schema:
1114
+ type: string
1115
+ description: Filter by target entity
1116
+ - name: actorId
1117
+ in: query
1118
+ required: false
1119
+ schema:
1120
+ type: string
1121
+ description: Filter by actor entity
1122
+ - name: type
1123
+ in: query
1124
+ required: false
1125
+ schema:
1126
+ $ref: '#/components/schemas/EventType'
1127
+ description: Filter by event type
1128
+ - name: startTime
1129
+ in: query
1130
+ required: false
1131
+ schema:
1132
+ type: integer
1133
+ format: int64
1134
+ description: Filter events after this timestamp
1135
+ - name: endTime
1136
+ in: query
1137
+ required: false
1138
+ schema:
1139
+ type: integer
1140
+ format: int64
1141
+ description: Filter events before this timestamp
1142
+ - name: limit
1143
+ in: query
1144
+ required: false
1145
+ schema:
1146
+ type: integer
1147
+ minimum: 1
1148
+ maximum: 1000
1149
+ default: 100
1150
+ responses:
1151
+ '200':
1152
+ description: Event history
1153
+ content:
1154
+ application/json:
1155
+ schema:
1156
+ type: array
1157
+ items:
1158
+ $ref: '#/components/schemas/Event'
1159
+
1160
+ # ============================================================================
1161
+ # TAG ENDPOINTS
1162
+ # ============================================================================
1163
+
1164
+ /tags/create:
1165
+ post:
1166
+ tags:
1167
+ - Tags
1168
+ summary: Create a new tag
1169
+ operationId: createTag
1170
+ security:
1171
+ - sessionToken: []
1172
+ requestBody:
1173
+ required: true
1174
+ content:
1175
+ application/json:
1176
+ schema:
1177
+ type: object
1178
+ required:
1179
+ - entityId
1180
+ - key
1181
+ - value
1182
+ properties:
1183
+ entityId:
1184
+ type: string
1185
+ description: Entity to tag
1186
+ key:
1187
+ type: string
1188
+ description: Tag category
1189
+ example: skill
1190
+ value:
1191
+ type: string
1192
+ description: Tag value
1193
+ example: video-editing
1194
+ responses:
1195
+ '200':
1196
+ description: Tag created
1197
+ content:
1198
+ application/json:
1199
+ schema:
1200
+ type: object
1201
+ properties:
1202
+ tagId:
1203
+ type: string
1204
+ example: k17tag123
1205
+
1206
+ /tags/get:
1207
+ get:
1208
+ tags:
1209
+ - Tags
1210
+ summary: Get tags for an entity
1211
+ operationId: getTags
1212
+ security:
1213
+ - sessionToken: []
1214
+ parameters:
1215
+ - name: entityId
1216
+ in: query
1217
+ required: true
1218
+ schema:
1219
+ type: string
1220
+ description: Entity ID
1221
+ - name: key
1222
+ in: query
1223
+ required: false
1224
+ schema:
1225
+ type: string
1226
+ description: Filter by tag category
1227
+ responses:
1228
+ '200':
1229
+ description: Entity tags
1230
+ content:
1231
+ application/json:
1232
+ schema:
1233
+ type: array
1234
+ items:
1235
+ $ref: '#/components/schemas/Tag'
1236
+
1237
+ /tags/search:
1238
+ get:
1239
+ tags:
1240
+ - Tags
1241
+ summary: Search entities by tag
1242
+ operationId: searchByTag
1243
+ security:
1244
+ - sessionToken: []
1245
+ parameters:
1246
+ - name: key
1247
+ in: query
1248
+ required: true
1249
+ schema:
1250
+ type: string
1251
+ description: Tag category
1252
+ example: industry
1253
+ - name: value
1254
+ in: query
1255
+ required: true
1256
+ schema:
1257
+ type: string
1258
+ description: Tag value
1259
+ example: fitness
1260
+ responses:
1261
+ '200':
1262
+ description: Tagged entities
1263
+ content:
1264
+ application/json:
1265
+ schema:
1266
+ type: array
1267
+ items:
1268
+ $ref: '#/components/schemas/Entity'
1269
+
1270
+ # ============================================================================
1271
+ # COMPONENTS
1272
+ # ============================================================================
1273
+
1274
+ components:
1275
+ securitySchemes:
1276
+ sessionToken:
1277
+ type: apiKey
1278
+ in: query
1279
+ name: token
1280
+ description: Session token obtained from sign in/sign up
1281
+
1282
+ schemas:
1283
+ # ========================================================================
1284
+ # AUTHENTICATION SCHEMAS
1285
+ # ========================================================================
1286
+
1287
+ CurrentUser:
1288
+ type: object
1289
+ properties:
1290
+ id:
1291
+ type: string
1292
+ description: User ID
1293
+ example: k17abc123def456
1294
+ email:
1295
+ type: string
1296
+ format: email
1297
+ example: user@example.com
1298
+ name:
1299
+ type: string
1300
+ example: John Doe
1301
+
1302
+ # ========================================================================
1303
+ # ENTITY SCHEMAS
1304
+ # ========================================================================
1305
+
1306
+ EntityType:
1307
+ type: string
1308
+ enum:
1309
+ # Core (3)
1310
+ - creator
1311
+ - ai_clone
1312
+ - audience_member
1313
+ # Business Agents (10)
1314
+ - strategy_agent
1315
+ - research_agent
1316
+ - marketing_agent
1317
+ - sales_agent
1318
+ - service_agent
1319
+ - design_agent
1320
+ - engineering_agent
1321
+ - finance_agent
1322
+ - legal_agent
1323
+ - intelligence_agent
1324
+ # Content (7)
1325
+ - blog_post
1326
+ - video
1327
+ - podcast
1328
+ - social_post
1329
+ - email
1330
+ - course
1331
+ - lesson
1332
+ # Products (4)
1333
+ - digital_product
1334
+ - membership
1335
+ - consultation
1336
+ - nft
1337
+ # Community (3)
1338
+ - community
1339
+ - conversation
1340
+ - message
1341
+ # Token (2)
1342
+ - token
1343
+ - token_contract
1344
+ # Knowledge (2)
1345
+ - knowledge_item
1346
+ - embedding
1347
+ # Platform (6)
1348
+ - website
1349
+ - landing_page
1350
+ - template
1351
+ - livestream
1352
+ - recording
1353
+ - media_asset
1354
+ # Business (7)
1355
+ - payment
1356
+ - subscription
1357
+ - invoice
1358
+ - metric
1359
+ - insight
1360
+ - prediction
1361
+ - report
1362
+ # Marketing (5)
1363
+ - notification
1364
+ - email_campaign
1365
+ - announcement
1366
+ - referral
1367
+ - campaign
1368
+ - lead
1369
+
1370
+ Entity:
1371
+ type: object
1372
+ required:
1373
+ - _id
1374
+ - type
1375
+ - name
1376
+ - createdAt
1377
+ - updatedAt
1378
+ properties:
1379
+ _id:
1380
+ type: string
1381
+ description: Convex entity ID
1382
+ example: k17abc123def456
1383
+ type:
1384
+ $ref: '#/components/schemas/EntityType'
1385
+ name:
1386
+ type: string
1387
+ description: Display name
1388
+ example: John Doe
1389
+ properties:
1390
+ type: object
1391
+ description: Type-specific properties (JSON)
1392
+ additionalProperties: true
1393
+ status:
1394
+ type: string
1395
+ enum: [active, inactive, draft, published, archived]
1396
+ example: active
1397
+ createdAt:
1398
+ type: integer
1399
+ format: int64
1400
+ description: Unix timestamp (ms)
1401
+ example: 1705334400000
1402
+ updatedAt:
1403
+ type: integer
1404
+ format: int64
1405
+ description: Unix timestamp (ms)
1406
+ example: 1705420800000
1407
+ deletedAt:
1408
+ type: integer
1409
+ format: int64
1410
+ description: Soft delete timestamp (if deleted)
1411
+ nullable: true
1412
+
1413
+ CreateEntityRequest:
1414
+ type: object
1415
+ required:
1416
+ - type
1417
+ - name
1418
+ properties:
1419
+ type:
1420
+ $ref: '#/components/schemas/EntityType'
1421
+ name:
1422
+ type: string
1423
+ minLength: 1
1424
+ maxLength: 255
1425
+ properties:
1426
+ type: object
1427
+ description: Type-specific properties
1428
+ additionalProperties: true
1429
+ default: {}
1430
+ status:
1431
+ type: string
1432
+ enum: [active, inactive, draft, published, archived]
1433
+ default: active
1434
+
1435
+ # ========================================================================
1436
+ # CONNECTION SCHEMAS
1437
+ # ========================================================================
1438
+
1439
+ ConnectionType:
1440
+ type: string
1441
+ enum:
1442
+ # Ownership (2)
1443
+ - owns
1444
+ - created_by
1445
+ # AI (3)
1446
+ - clone_of
1447
+ - trained_on
1448
+ - powers
1449
+ # Content (5)
1450
+ - authored
1451
+ - generated_by
1452
+ - published_to
1453
+ - part_of
1454
+ - references
1455
+ # Community (4)
1456
+ - member_of
1457
+ - following
1458
+ - moderates
1459
+ - participated_in
1460
+ # Business (4)
1461
+ - manages
1462
+ - reports_to
1463
+ - collaborates_with
1464
+ - assigned_to
1465
+ # Token (3)
1466
+ - holds_tokens
1467
+ - staked_in
1468
+ - earned_from
1469
+ # Product (4)
1470
+ - purchased
1471
+ - enrolled_in
1472
+ - completed
1473
+ - teaching
1474
+ # Consolidated (3)
1475
+ - transacted
1476
+ - referred
1477
+ - notified
1478
+ # Media (2)
1479
+ - featured_in
1480
+ - hosted_on
1481
+ # Analytics (3)
1482
+ - analyzed_by
1483
+ - optimized_by
1484
+ - influences
1485
+
1486
+ Connection:
1487
+ type: object
1488
+ required:
1489
+ - _id
1490
+ - fromEntityId
1491
+ - toEntityId
1492
+ - relationshipType
1493
+ - createdAt
1494
+ properties:
1495
+ _id:
1496
+ type: string
1497
+ description: Connection ID
1498
+ example: k17conn789
1499
+ fromEntityId:
1500
+ type: string
1501
+ description: Source entity ID
1502
+ example: k17abc123
1503
+ toEntityId:
1504
+ type: string
1505
+ description: Target entity ID
1506
+ example: k17def456
1507
+ relationshipType:
1508
+ $ref: '#/components/schemas/ConnectionType'
1509
+ metadata:
1510
+ type: object
1511
+ description: Relationship-specific data
1512
+ additionalProperties: true
1513
+ nullable: true
1514
+ createdAt:
1515
+ type: integer
1516
+ format: int64
1517
+ description: Unix timestamp (ms)
1518
+ deletedAt:
1519
+ type: integer
1520
+ format: int64
1521
+ nullable: true
1522
+
1523
+ CreateConnectionRequest:
1524
+ type: object
1525
+ required:
1526
+ - fromEntityId
1527
+ - toEntityId
1528
+ - relationshipType
1529
+ properties:
1530
+ fromEntityId:
1531
+ type: string
1532
+ description: Source entity ID
1533
+ toEntityId:
1534
+ type: string
1535
+ description: Target entity ID
1536
+ relationshipType:
1537
+ $ref: '#/components/schemas/ConnectionType'
1538
+ metadata:
1539
+ type: object
1540
+ description: Optional relationship data
1541
+ additionalProperties: true
1542
+
1543
+ # ========================================================================
1544
+ # EVENT SCHEMAS
1545
+ # ========================================================================
1546
+
1547
+ EventType:
1548
+ type: string
1549
+ enum:
1550
+ # Creator (3)
1551
+ - creator_created
1552
+ - creator_updated
1553
+ - content_uploaded
1554
+ # AI Clone (5)
1555
+ - clone_created
1556
+ - clone_interaction
1557
+ - clone_generated_content
1558
+ - voice_cloned
1559
+ - appearance_cloned
1560
+ # Agent (4)
1561
+ - agent_created
1562
+ - agent_executed
1563
+ - agent_completed
1564
+ - agent_failed
1565
+ # Content (2 consolidated)
1566
+ - content_changed
1567
+ - content_interacted
1568
+ # Audience (4)
1569
+ - user_joined
1570
+ - user_engaged
1571
+ - ugc_created
1572
+ - comment_posted
1573
+ # Course (5)
1574
+ - course_created
1575
+ - course_enrolled
1576
+ - lesson_completed
1577
+ - course_completed
1578
+ - certificate_earned
1579
+ # Token (7)
1580
+ - token_deployed
1581
+ - tokens_purchased
1582
+ - tokens_earned
1583
+ - tokens_burned
1584
+ - tokens_staked
1585
+ - tokens_unstaked
1586
+ - governance_vote
1587
+ # Business (3)
1588
+ - revenue_generated
1589
+ - cost_incurred
1590
+ - referral_made
1591
+ # Growth (4)
1592
+ - viral_share
1593
+ - referral_converted
1594
+ - achievement_unlocked
1595
+ - level_up
1596
+ # Analytics (5)
1597
+ - metric_calculated
1598
+ - insight_generated
1599
+ - prediction_made
1600
+ - optimization_applied
1601
+ - report_generated
1602
+ # Consolidated (6)
1603
+ - payment_processed
1604
+ - subscription_updated
1605
+ - livestream_status_changed
1606
+ - livestream_interaction
1607
+ - notification_delivered
1608
+ - referral_activity
1609
+ - lead_captured
1610
+
1611
+ Event:
1612
+ type: object
1613
+ required:
1614
+ - _id
1615
+ - type
1616
+ - actorId
1617
+ - timestamp
1618
+ - metadata
1619
+ properties:
1620
+ _id:
1621
+ type: string
1622
+ description: Event ID
1623
+ example: k17event789
1624
+ type:
1625
+ $ref: '#/components/schemas/EventType'
1626
+ actorId:
1627
+ type: string
1628
+ description: Entity that caused the event
1629
+ example: k17user123
1630
+ targetId:
1631
+ type: string
1632
+ description: Optional target entity
1633
+ nullable: true
1634
+ example: k17content456
1635
+ timestamp:
1636
+ type: integer
1637
+ format: int64
1638
+ description: Unix timestamp (ms)
1639
+ example: 1705334400000
1640
+ metadata:
1641
+ type: object
1642
+ description: Event-specific data
1643
+ additionalProperties: true
1644
+
1645
+ LogEventRequest:
1646
+ type: object
1647
+ required:
1648
+ - type
1649
+ - actorId
1650
+ properties:
1651
+ type:
1652
+ $ref: '#/components/schemas/EventType'
1653
+ actorId:
1654
+ type: string
1655
+ description: Entity causing the event
1656
+ targetId:
1657
+ type: string
1658
+ description: Optional target entity
1659
+ nullable: true
1660
+ metadata:
1661
+ type: object
1662
+ description: Event-specific data
1663
+ additionalProperties: true
1664
+ default: {}
1665
+
1666
+ # ========================================================================
1667
+ # TAG SCHEMAS
1668
+ # ========================================================================
1669
+
1670
+ Tag:
1671
+ type: object
1672
+ required:
1673
+ - _id
1674
+ - entityId
1675
+ - key
1676
+ - value
1677
+ properties:
1678
+ _id:
1679
+ type: string
1680
+ description: Tag ID
1681
+ example: k17tag123
1682
+ entityId:
1683
+ type: string
1684
+ description: Tagged entity ID
1685
+ example: k17entity456
1686
+ key:
1687
+ type: string
1688
+ description: Tag category
1689
+ example: industry
1690
+ value:
1691
+ type: string
1692
+ description: Tag value
1693
+ example: fitness
1694
+
1695
+ # ========================================================================
1696
+ # ERROR SCHEMAS
1697
+ # ========================================================================
1698
+
1699
+ Error:
1700
+ type: object
1701
+ required:
1702
+ - message
1703
+ properties:
1704
+ message:
1705
+ type: string
1706
+ description: Error message
1707
+ example: Invalid email or password
1708
+ code:
1709
+ type: string
1710
+ description: Error code
1711
+ example: AUTH_FAILED
1712
+ details:
1713
+ type: object
1714
+ description: Additional error details
1715
+ additionalProperties: true
1716
+
1717
+ responses:
1718
+ BadRequest:
1719
+ description: Bad request - invalid parameters
1720
+ content:
1721
+ application/json:
1722
+ schema:
1723
+ $ref: '#/components/schemas/Error'
1724
+ example:
1725
+ message: Invalid request parameters
1726
+ code: BAD_REQUEST
1727
+
1728
+ Unauthorized:
1729
+ description: Unauthorized - invalid or missing session token
1730
+ content:
1731
+ application/json:
1732
+ schema:
1733
+ $ref: '#/components/schemas/Error'
1734
+ example:
1735
+ message: Invalid or expired session token
1736
+ code: UNAUTHORIZED
1737
+
1738
+ NotFound:
1739
+ description: Resource not found
1740
+ content:
1741
+ application/json:
1742
+ schema:
1743
+ $ref: '#/components/schemas/Error'
1744
+ example:
1745
+ message: Entity not found
1746
+ code: NOT_FOUND
1747
+
1748
+ RateLimitExceeded:
1749
+ description: Rate limit exceeded
1750
+ content:
1751
+ application/json:
1752
+ schema:
1753
+ $ref: '#/components/schemas/Error'
1754
+ example:
1755
+ message: Too many requests. Please try again later.
1756
+ code: RATE_LIMIT_EXCEEDED
1757
+
1758
+ InternalError:
1759
+ description: Internal server error
1760
+ content:
1761
+ application/json:
1762
+ schema:
1763
+ $ref: '#/components/schemas/Error'
1764
+ example:
1765
+ message: An unexpected error occurred
1766
+ code: INTERNAL_ERROR
1767
+ ```
1768
+
1769
+ ---
1770
+
1771
+ ## Additional API Notes
1772
+
1773
+ ### Rate Limiting
1774
+
1775
+ The following endpoints have rate limits:
1776
+
1777
+ | Endpoint | Limit | Window |
1778
+ |----------|-------|--------|
1779
+ | `/auth/signUp` | 3 requests | 1 hour |
1780
+ | `/auth/signIn` | 5 requests | 15 minutes |
1781
+ | `/auth/requestPasswordReset` | 3 requests | 1 hour |
1782
+ | `/auth/requestMagicLink` | 3 requests | 1 hour |
1783
+
1784
+ Rate limits are per email address for authentication endpoints.
1785
+
1786
+ ### Session Management
1787
+
1788
+ - Session tokens are valid for **30 days**
1789
+ - Tokens are returned in authentication responses
1790
+ - Pass tokens via query parameter: `?token=your_session_token`
1791
+ - Sessions are automatically cleaned up on expiration
1792
+ - Password reset invalidates all existing sessions
1793
+
1794
+ ### Convex Real-Time Updates
1795
+
1796
+ All query endpoints support **real-time subscriptions** when using Convex client libraries:
1797
+
1798
+ ```typescript
1799
+ // React example
1800
+ import { useQuery } from "convex/react";
1801
+ import { api } from "@/convex/_generated/api";
1802
+
1803
+ const entity = useQuery(api.entities.get, { id: "k17abc123" });
1804
+ // Automatically updates when entity changes
1805
+ ```
1806
+
1807
+ ### Error Handling
1808
+
1809
+ All endpoints follow consistent error response format:
1810
+
1811
+ ```json
1812
+ {
1813
+ "message": "Human-readable error message",
1814
+ "code": "ERROR_CODE",
1815
+ "details": {
1816
+ "field": "Additional context"
1817
+ }
1818
+ }
1819
+ ```
1820
+
1821
+ Common error codes:
1822
+ - `AUTH_FAILED` - Authentication failed
1823
+ - `UNAUTHORIZED` - Invalid/expired session token
1824
+ - `BAD_REQUEST` - Invalid parameters
1825
+ - `NOT_FOUND` - Resource not found
1826
+ - `RATE_LIMIT_EXCEEDED` - Too many requests
1827
+ - `INTERNAL_ERROR` - Server error
1828
+
1829
+ ### Pagination
1830
+
1831
+ For large result sets, use the `limit` parameter:
1832
+
1833
+ ```
1834
+ GET /entities/list?type=creator&limit=50
1835
+ ```
1836
+
1837
+ Default limits:
1838
+ - Entity lists: 20 items
1839
+ - Event history: 100 items
1840
+ - Maximum allowed: 1000 items per request
1841
+
1842
+ For more results, implement pagination using timestamps or IDs.
1843
+
1844
+ ### Multi-Chain Support
1845
+
1846
+ Token-related endpoints support multiple blockchains:
1847
+
1848
+ **Supported Chains:**
1849
+ - `sui` - Sui blockchain (Move language)
1850
+ - `base` - Base L2 (Coinbase, EVM-compatible)
1851
+ - `solana` - Solana blockchain (high-speed)
1852
+
1853
+ Specify blockchain in entity properties or connection metadata:
1854
+
1855
+ ```json
1856
+ {
1857
+ "type": "token",
1858
+ "name": "CREATOR Token",
1859
+ "properties": {
1860
+ "blockchain": "sui",
1861
+ "contractAddress": "0x..."
1862
+ }
1863
+ }
1864
+ ```
1865
+
1866
+ ---
1867
+
1868
+ ## Webhook Events (Future)
1869
+
1870
+ The following events will be available via webhooks in future releases:
1871
+
1872
+ - `entity.created`
1873
+ - `entity.updated`
1874
+ - `entity.deleted`
1875
+ - `connection.created`
1876
+ - `connection.deleted`
1877
+ - `event.logged`
1878
+ - `payment.completed`
1879
+ - `subscription.updated`
1880
+
1881
+ ---
1882
+
1883
+ **API Version:** 1.0.0
1884
+ **Last Updated:** 2025-01-15
1885
+ **Maintained By:** ONE Platform Team
1886
+
1887
+ **See Also:**
1888
+ - `API.md` - Complete API reference with code examples
1889
+ - `Ontology.md` - 6-dimension ontology specification
1890
+ - `Schema.md` - Convex schema details
1891
+ - `AGENTS.md` - Convex development guide