@almadar/std 6.1.0 → 6.1.7

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 (446) hide show
  1. package/behaviors/{exports → registry}/atoms/std-agent-activity-log.orb +154 -124
  2. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-agent-chat-thread.orb +4 -63
  3. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-agent-classifier.orb +8 -14
  4. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-agent-completion.orb +8 -14
  5. package/behaviors/{exports → registry}/atoms/std-agent-context-window.orb +4 -8
  6. package/behaviors/{exports → registry}/atoms/std-agent-conversation.orb +4 -79
  7. package/{dist/exports → behaviors/registry}/atoms/std-agent-memory.orb +13 -18
  8. package/behaviors/{exports → registry}/atoms/std-agent-provider.orb +9 -14
  9. package/{dist/exports → behaviors/registry}/atoms/std-agent-search.orb +5 -8
  10. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-agent-session.orb +11 -22
  11. package/behaviors/{exports → registry}/atoms/std-agent-step-progress.orb +4 -8
  12. package/{dist/exports → behaviors/registry}/atoms/std-agent-token-gauge.orb +4 -8
  13. package/behaviors/{exports → registry}/atoms/std-agent-tool-call.orb +8 -14
  14. package/behaviors/{exports → registry}/atoms/std-async.orb +4 -12
  15. package/{dist/exports → behaviors/registry}/atoms/std-autoregressive.orb +13 -2
  16. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-browse.orb +4 -8
  17. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-cache-aside.orb +4 -12
  18. package/{dist/exports → behaviors/registry}/atoms/std-calendar.orb +4 -8
  19. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-circuit-breaker.orb +4 -8
  20. package/behaviors/registry/atoms/std-classifier.orb.unconvertible.txt +7 -0
  21. package/behaviors/{exports → registry}/atoms/std-collision.orb +4 -8
  22. package/{dist/exports → behaviors/registry}/atoms/std-combat-log.orb +4 -8
  23. package/behaviors/{exports → registry}/atoms/std-combat.orb +4 -8
  24. package/{dist/exports → behaviors/registry}/atoms/std-confirmation.orb +6 -5
  25. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-dialogue-box.orb +4 -8
  26. package/behaviors/{exports → registry}/atoms/std-display.orb +4 -153
  27. package/{dist/exports → behaviors/registry}/atoms/std-drawer.orb +4 -58
  28. package/behaviors/{exports → registry}/atoms/std-filter.orb +4 -8
  29. package/{dist/exports → behaviors/registry}/atoms/std-flip-card.orb +4 -8
  30. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-gallery.orb +4 -8
  31. package/{dist/exports → behaviors/registry}/atoms/std-game-audio.orb +4 -8
  32. package/{dist/exports → behaviors/registry}/atoms/std-game-canvas2d.orb +3 -6
  33. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-game-canvas3d.orb +3 -6
  34. package/{dist/exports → behaviors/registry}/atoms/std-game-hud.orb +4 -16
  35. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-game-menu.orb +4 -8
  36. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-game-over-screen.orb +4 -8
  37. package/{dist/exports → behaviors/registry}/atoms/std-gameflow.orb +4 -8
  38. package/behaviors/registry/atoms/std-graph-classifier.orb.unconvertible.txt +7 -0
  39. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-input.orb +4 -8
  40. package/{dist/exports → behaviors/registry}/atoms/std-inventory-panel.orb +4 -12
  41. package/{dist/exports → behaviors/registry}/atoms/std-isometric-canvas.orb +4 -8
  42. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-loading.orb +4 -8
  43. package/behaviors/{exports → registry}/atoms/std-modal.orb +12 -9
  44. package/behaviors/{exports → registry}/atoms/std-movement.orb +4 -8
  45. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-notification.orb +4 -8
  46. package/{dist/exports → behaviors/registry}/atoms/std-overworld.orb +4 -8
  47. package/behaviors/{exports → registry}/atoms/std-pagination.orb +4 -8
  48. package/behaviors/{exports → registry}/atoms/std-physics2d.orb +4 -8
  49. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-platformer-canvas.orb +4 -8
  50. package/{dist/exports → behaviors/registry}/atoms/std-quest.orb +5 -14
  51. package/{dist/exports → behaviors/registry}/atoms/std-rate-limiter.orb +4 -8
  52. package/{dist/exports → behaviors/registry}/atoms/std-rating.orb +4 -8
  53. package/behaviors/registry/atoms/std-rl-agent.orb.unconvertible.txt +7 -0
  54. package/{dist/exports → behaviors/registry}/atoms/std-score-board.orb +4 -8
  55. package/{dist/exports → behaviors/registry}/atoms/std-score.orb +4 -8
  56. package/{dist/exports → behaviors/registry}/atoms/std-search.orb +4 -8
  57. package/{dist/exports → behaviors/registry}/atoms/std-selection.orb +4 -8
  58. package/{dist/exports → behaviors/registry}/atoms/std-service-custom-bearer.orb +4 -19
  59. package/{dist/exports → behaviors/registry}/atoms/std-service-custom-header.orb +4 -21
  60. package/behaviors/{exports → registry}/atoms/std-service-custom-noauth.orb +4 -15
  61. package/{dist/exports → behaviors/registry}/atoms/std-service-custom-query.orb +4 -21
  62. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-service-email.orb +4 -8
  63. package/{dist/exports → behaviors/registry}/atoms/std-service-github.orb +4 -8
  64. package/behaviors/{exports → registry}/atoms/std-service-llm.orb +4 -8
  65. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-service-oauth.orb +4 -8
  66. package/behaviors/{exports → registry}/atoms/std-service-redis.orb +4 -8
  67. package/{dist/exports → behaviors/registry}/atoms/std-service-storage.orb +4 -8
  68. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-service-stripe.orb +4 -8
  69. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-service-twilio.orb +4 -8
  70. package/{dist/exports → behaviors/registry}/atoms/std-service-youtube.orb +4 -8
  71. package/{dist/exports → behaviors/registry}/atoms/std-simulation-canvas.orb +4 -8
  72. package/{dist/exports → behaviors/registry}/atoms/std-sort.orb +4 -52
  73. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-sprite.orb +4 -8
  74. package/behaviors/{exports → registry}/atoms/std-tabs.orb +4 -16
  75. package/behaviors/registry/atoms/std-text-classifier.orb.unconvertible.txt +7 -0
  76. package/{dist/exports → behaviors/registry}/atoms/std-text-effects.orb +4 -8
  77. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-theme.orb +4 -8
  78. package/behaviors/{exports → registry}/atoms/std-timer.orb +4 -8
  79. package/behaviors/registry/atoms/std-trainer.orb.unconvertible.txt +7 -0
  80. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-undo.orb +4 -8
  81. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-upload.orb +4 -8
  82. package/{dist/exports → behaviors/registry}/atoms/std-validate-on-save.orb +4 -32
  83. package/{dist/exports → behaviors/registry}/atoms/std-wizard.orb +4 -26
  84. package/{dist/behaviors/exports → behaviors/registry}/molecules/std-agent-fix-loop.orb +1136 -1721
  85. package/{dist/behaviors/exports → behaviors/registry}/molecules/std-agent-learner.orb +606 -839
  86. package/behaviors/{exports → registry}/molecules/std-agent-planner.orb +613 -869
  87. package/behaviors/{exports → registry}/molecules/std-agent-rag.orb +562 -768
  88. package/behaviors/registry/molecules/std-agent-tool-loop.orb +2507 -0
  89. package/{dist/behaviors/exports → behaviors/registry}/molecules/std-builder-game.orb +4 -8
  90. package/{dist/exports → behaviors/registry}/molecules/std-cart.orb +197 -318
  91. package/{dist/behaviors/exports → behaviors/registry}/molecules/std-classifier-game.orb +4 -8
  92. package/{dist/exports → behaviors/registry}/molecules/std-debugger-game.orb +4 -8
  93. package/behaviors/registry/molecules/std-detail.orb +439 -0
  94. package/behaviors/{exports → registry}/molecules/std-event-handler-game.orb +4 -8
  95. package/{dist/exports → behaviors/registry}/molecules/std-form-advanced.orb +4 -12
  96. package/behaviors/registry/molecules/std-geospatial.orb +502 -0
  97. package/behaviors/registry/molecules/std-inventory.orb +564 -0
  98. package/behaviors/registry/molecules/std-list.orb +707 -0
  99. package/behaviors/registry/molecules/std-messaging.orb +424 -0
  100. package/behaviors/{exports → registry}/molecules/std-negotiator-game.orb +4 -8
  101. package/behaviors/{exports → registry}/molecules/std-platformer-game.orb +4 -8
  102. package/behaviors/{exports → registry}/molecules/std-puzzle-game.orb +4 -8
  103. package/{dist/behaviors/exports → behaviors/registry}/molecules/std-quiz.orb +4 -8
  104. package/{dist/exports → behaviors/registry}/molecules/std-sequencer-game.orb +4 -8
  105. package/behaviors/{exports → registry}/molecules/std-service-content-pipeline.orb +4 -8
  106. package/{dist/behaviors/exports → behaviors/registry}/molecules/std-service-custom-api-tester.orb +4 -46
  107. package/{dist/exports → behaviors/registry}/molecules/std-service-devops-toolkit.orb +4 -8
  108. package/{dist/exports → behaviors/registry}/molecules/std-service-notification-hub.orb +4 -8
  109. package/{dist/exports → behaviors/registry}/molecules/std-service-payment-flow.orb +8 -10
  110. package/behaviors/{exports → registry}/molecules/std-simulator-game.orb +4 -8
  111. package/{dist/behaviors/exports → behaviors/registry}/molecules/std-turn-based-battle.orb +4 -8
  112. package/{dist/exports → behaviors/registry}/organisms/std-agent-assistant.orb +24 -38
  113. package/behaviors/{exports → registry}/organisms/std-agent-builder.orb +816 -1320
  114. package/{dist/exports → behaviors/registry}/organisms/std-agent-pipeline.orb +785 -1283
  115. package/{dist/exports → behaviors/registry}/organisms/std-agent-reviewer.orb +308 -372
  116. package/{dist/exports → behaviors/registry}/organisms/std-agent-tutor.orb +325 -387
  117. package/{dist/exports → behaviors/registry}/organisms/std-api-gateway.orb +24 -26
  118. package/{dist/exports → behaviors/registry}/organisms/std-arcade-game.orb +4 -4
  119. package/{dist/exports → behaviors/registry}/organisms/std-booking-system.orb +44 -48
  120. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-cicd-pipeline.orb +24 -30
  121. package/behaviors/{exports → registry}/organisms/std-cms.orb +50 -55
  122. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-coding-academy.orb +4 -4
  123. package/{dist/exports → behaviors/registry}/organisms/std-crm.orb +50 -55
  124. package/{dist/exports → behaviors/registry}/organisms/std-devops-dashboard.orb +24 -26
  125. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-ecommerce.orb +48 -58
  126. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-finance-tracker.orb +30 -33
  127. package/{dist/exports → behaviors/registry}/organisms/std-healthcare.orb +50 -55
  128. package/{dist/exports → behaviors/registry}/organisms/std-helpdesk.orb +30 -33
  129. package/behaviors/{exports → registry}/organisms/std-hr-portal.orb +44 -48
  130. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-iot-dashboard.orb +24 -26
  131. package/{dist/exports → behaviors/registry}/organisms/std-lms.orb +24 -26
  132. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-logic-training.orb +4 -4
  133. package/behaviors/{exports → registry}/organisms/std-platformer-app.orb +20 -24
  134. package/behaviors/{exports → registry}/organisms/std-project-manager.orb +44 -48
  135. package/{dist/exports → behaviors/registry}/organisms/std-puzzle-app.orb +4 -4
  136. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-realtime-chat.orb +30 -33
  137. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-rpg-game.orb +20 -28
  138. package/{dist/exports → behaviors/registry}/organisms/std-service-marketplace.orb +52 -58
  139. package/{dist/exports → behaviors/registry}/organisms/std-service-research-assistant.orb +4 -15
  140. package/behaviors/{exports → registry}/organisms/std-social-feed.orb +16 -18
  141. package/behaviors/{exports → registry}/organisms/std-stem-lab.orb +4 -4
  142. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-strategy-game.orb +4 -4
  143. package/{dist/exports → behaviors/registry}/organisms/std-trading-dashboard.orb +24 -30
  144. package/dist/behaviors/{exports → registry}/atoms/std-agent-activity-log.orb +154 -124
  145. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-agent-chat-thread.orb +4 -63
  146. package/dist/{exports → behaviors/registry}/atoms/std-agent-classifier.orb +8 -14
  147. package/dist/{exports → behaviors/registry}/atoms/std-agent-completion.orb +8 -14
  148. package/dist/{exports → behaviors/registry}/atoms/std-agent-context-window.orb +4 -8
  149. package/dist/{exports → behaviors/registry}/atoms/std-agent-conversation.orb +4 -79
  150. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-agent-memory.orb +13 -18
  151. package/dist/{exports → behaviors/registry}/atoms/std-agent-provider.orb +9 -14
  152. package/dist/behaviors/{exports → registry}/atoms/std-agent-search.orb +5 -8
  153. package/dist/{exports → behaviors/registry}/atoms/std-agent-session.orb +11 -22
  154. package/dist/{exports → behaviors/registry}/atoms/std-agent-step-progress.orb +4 -8
  155. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-agent-token-gauge.orb +4 -8
  156. package/dist/behaviors/{exports → registry}/atoms/std-agent-tool-call.orb +8 -14
  157. package/dist/behaviors/{exports → registry}/atoms/std-async.orb +4 -12
  158. package/dist/behaviors/{exports → registry}/atoms/std-autoregressive.orb +13 -2
  159. package/dist/{exports → behaviors/registry}/atoms/std-browse.orb +4 -8
  160. package/dist/{exports → behaviors/registry}/atoms/std-cache-aside.orb +4 -12
  161. package/dist/behaviors/{exports → registry}/atoms/std-calendar.orb +4 -8
  162. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-circuit-breaker.orb +4 -8
  163. package/dist/behaviors/registry/atoms/std-classifier.orb.unconvertible.txt +7 -0
  164. package/dist/behaviors/{exports → registry}/atoms/std-collision.orb +4 -8
  165. package/dist/behaviors/{exports → registry}/atoms/std-combat-log.orb +4 -8
  166. package/dist/{exports → behaviors/registry}/atoms/std-combat.orb +4 -8
  167. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-confirmation.orb +6 -5
  168. package/dist/{exports → behaviors/registry}/atoms/std-dialogue-box.orb +4 -8
  169. package/dist/{exports → behaviors/registry}/atoms/std-display.orb +4 -153
  170. package/dist/behaviors/{exports → registry}/atoms/std-drawer.orb +4 -58
  171. package/dist/behaviors/{exports → registry}/atoms/std-filter.orb +4 -8
  172. package/dist/behaviors/{exports → registry}/atoms/std-flip-card.orb +4 -8
  173. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-gallery.orb +4 -8
  174. package/dist/behaviors/{exports → registry}/atoms/std-game-audio.orb +4 -8
  175. package/dist/behaviors/{exports → registry}/atoms/std-game-canvas2d.orb +3 -6
  176. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-game-canvas3d.orb +3 -6
  177. package/dist/behaviors/{exports → registry}/atoms/std-game-hud.orb +4 -16
  178. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-game-menu.orb +4 -8
  179. package/dist/{exports → behaviors/registry}/atoms/std-game-over-screen.orb +4 -8
  180. package/dist/behaviors/{exports → registry}/atoms/std-gameflow.orb +4 -8
  181. package/dist/behaviors/registry/atoms/std-graph-classifier.orb.unconvertible.txt +7 -0
  182. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-input.orb +4 -8
  183. package/dist/behaviors/{exports → registry}/atoms/std-inventory-panel.orb +4 -12
  184. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-isometric-canvas.orb +4 -8
  185. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-loading.orb +4 -8
  186. package/dist/{exports → behaviors/registry}/atoms/std-modal.orb +12 -9
  187. package/dist/behaviors/{exports → registry}/atoms/std-movement.orb +4 -8
  188. package/dist/{exports → behaviors/registry}/atoms/std-notification.orb +4 -8
  189. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-overworld.orb +4 -8
  190. package/dist/behaviors/{exports → registry}/atoms/std-pagination.orb +4 -8
  191. package/dist/behaviors/{exports → registry}/atoms/std-physics2d.orb +4 -8
  192. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-platformer-canvas.orb +4 -8
  193. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-quest.orb +5 -14
  194. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-rate-limiter.orb +4 -8
  195. package/dist/behaviors/{exports → registry}/atoms/std-rating.orb +4 -8
  196. package/dist/behaviors/registry/atoms/std-rl-agent.orb.unconvertible.txt +7 -0
  197. package/dist/behaviors/{exports → registry}/atoms/std-score-board.orb +4 -8
  198. package/dist/behaviors/{exports → registry}/atoms/std-score.orb +4 -8
  199. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-search.orb +4 -8
  200. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-selection.orb +4 -8
  201. package/dist/behaviors/{exports → registry}/atoms/std-service-custom-bearer.orb +4 -19
  202. package/dist/behaviors/{exports → registry}/atoms/std-service-custom-header.orb +4 -21
  203. package/dist/{exports → behaviors/registry}/atoms/std-service-custom-noauth.orb +4 -15
  204. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-service-custom-query.orb +4 -21
  205. package/dist/{exports → behaviors/registry}/atoms/std-service-email.orb +4 -8
  206. package/dist/behaviors/{exports → registry}/atoms/std-service-github.orb +4 -8
  207. package/dist/{exports → behaviors/registry}/atoms/std-service-llm.orb +4 -8
  208. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-service-oauth.orb +4 -8
  209. package/dist/behaviors/{exports → registry}/atoms/std-service-redis.orb +4 -8
  210. package/dist/behaviors/{exports → registry}/atoms/std-service-storage.orb +4 -8
  211. package/dist/{exports → behaviors/registry}/atoms/std-service-stripe.orb +4 -8
  212. package/dist/{exports → behaviors/registry}/atoms/std-service-twilio.orb +4 -8
  213. package/dist/behaviors/{exports → registry}/atoms/std-service-youtube.orb +4 -8
  214. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-simulation-canvas.orb +4 -8
  215. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-sort.orb +4 -52
  216. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-sprite.orb +4 -8
  217. package/dist/{exports → behaviors/registry}/atoms/std-tabs.orb +4 -16
  218. package/dist/behaviors/registry/atoms/std-text-classifier.orb.unconvertible.txt +7 -0
  219. package/dist/behaviors/{exports → registry}/atoms/std-text-effects.orb +4 -8
  220. package/dist/{exports → behaviors/registry}/atoms/std-theme.orb +4 -8
  221. package/dist/{exports → behaviors/registry}/atoms/std-timer.orb +4 -8
  222. package/dist/behaviors/registry/atoms/std-trainer.orb.unconvertible.txt +7 -0
  223. package/dist/{exports → behaviors/registry}/atoms/std-undo.orb +4 -8
  224. package/dist/{exports → behaviors/registry}/atoms/std-upload.orb +4 -8
  225. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-validate-on-save.orb +4 -32
  226. package/dist/behaviors/{exports → registry}/atoms/std-wizard.orb +4 -26
  227. package/dist/{exports → behaviors/registry}/molecules/std-agent-fix-loop.orb +1136 -1721
  228. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-agent-learner.orb +606 -839
  229. package/dist/{exports → behaviors/registry}/molecules/std-agent-planner.orb +613 -869
  230. package/dist/behaviors/{exports → registry}/molecules/std-agent-rag.orb +562 -768
  231. package/dist/behaviors/registry/molecules/std-agent-tool-loop.orb +2507 -0
  232. package/dist/{exports → behaviors/registry}/molecules/std-builder-game.orb +4 -8
  233. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-cart.orb +197 -318
  234. package/dist/{exports → behaviors/registry}/molecules/std-classifier-game.orb +4 -8
  235. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-debugger-game.orb +4 -8
  236. package/dist/behaviors/registry/molecules/std-detail.orb +439 -0
  237. package/dist/{exports → behaviors/registry}/molecules/std-event-handler-game.orb +4 -8
  238. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-form-advanced.orb +4 -12
  239. package/dist/behaviors/registry/molecules/std-geospatial.orb +502 -0
  240. package/dist/behaviors/registry/molecules/std-inventory.orb +564 -0
  241. package/dist/behaviors/registry/molecules/std-list.orb +707 -0
  242. package/dist/behaviors/registry/molecules/std-messaging.orb +424 -0
  243. package/dist/{exports → behaviors/registry}/molecules/std-negotiator-game.orb +4 -8
  244. package/dist/{exports → behaviors/registry}/molecules/std-platformer-game.orb +4 -8
  245. package/dist/behaviors/{exports → registry}/molecules/std-puzzle-game.orb +4 -8
  246. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-quiz.orb +4 -8
  247. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-sequencer-game.orb +4 -8
  248. package/dist/{exports → behaviors/registry}/molecules/std-service-content-pipeline.orb +4 -8
  249. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-service-custom-api-tester.orb +4 -46
  250. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-service-devops-toolkit.orb +4 -8
  251. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-service-notification-hub.orb +4 -8
  252. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-service-payment-flow.orb +8 -10
  253. package/dist/{exports → behaviors/registry}/molecules/std-simulator-game.orb +4 -8
  254. package/dist/{exports → behaviors/registry}/molecules/std-turn-based-battle.orb +4 -8
  255. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-agent-assistant.orb +24 -38
  256. package/dist/{exports → behaviors/registry}/organisms/std-agent-builder.orb +816 -1320
  257. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-agent-pipeline.orb +785 -1283
  258. package/dist/behaviors/{exports → registry}/organisms/std-agent-reviewer.orb +308 -372
  259. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-agent-tutor.orb +325 -387
  260. package/dist/behaviors/{exports → registry}/organisms/std-api-gateway.orb +24 -26
  261. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-arcade-game.orb +4 -4
  262. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-booking-system.orb +44 -48
  263. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-cicd-pipeline.orb +24 -30
  264. package/dist/{exports → behaviors/registry}/organisms/std-cms.orb +50 -55
  265. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-coding-academy.orb +4 -4
  266. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-crm.orb +50 -55
  267. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-devops-dashboard.orb +24 -26
  268. package/dist/{exports → behaviors/registry}/organisms/std-ecommerce.orb +48 -58
  269. package/dist/{exports → behaviors/registry}/organisms/std-finance-tracker.orb +30 -33
  270. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-healthcare.orb +50 -55
  271. package/dist/behaviors/{exports → registry}/organisms/std-helpdesk.orb +30 -33
  272. package/dist/behaviors/{exports → registry}/organisms/std-hr-portal.orb +44 -48
  273. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-iot-dashboard.orb +24 -26
  274. package/dist/behaviors/{exports → registry}/organisms/std-lms.orb +24 -26
  275. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-logic-training.orb +4 -4
  276. package/dist/behaviors/{exports → registry}/organisms/std-platformer-app.orb +20 -24
  277. package/dist/{exports → behaviors/registry}/organisms/std-project-manager.orb +44 -48
  278. package/dist/behaviors/{exports → registry}/organisms/std-puzzle-app.orb +4 -4
  279. package/dist/{exports → behaviors/registry}/organisms/std-realtime-chat.orb +30 -33
  280. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-rpg-game.orb +20 -28
  281. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-service-marketplace.orb +52 -58
  282. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-service-research-assistant.orb +4 -15
  283. package/dist/{exports → behaviors/registry}/organisms/std-social-feed.orb +16 -18
  284. package/dist/{exports → behaviors/registry}/organisms/std-stem-lab.orb +4 -4
  285. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-strategy-game.orb +4 -4
  286. package/dist/behaviors/{exports → registry}/organisms/std-trading-dashboard.orb +24 -30
  287. package/package.json +2 -2
  288. package/behaviors/exports/atoms/std-agent-classifier.orb +0 -879
  289. package/behaviors/exports/atoms/std-agent-completion.orb +0 -941
  290. package/behaviors/exports/atoms/std-agent-search.orb +0 -431
  291. package/behaviors/exports/atoms/std-agent-session.orb +0 -777
  292. package/behaviors/exports/atoms/std-autoregressive.orb +0 -420
  293. package/behaviors/exports/atoms/std-browse.orb +0 -251
  294. package/behaviors/exports/atoms/std-cache-aside.orb +0 -1101
  295. package/behaviors/exports/atoms/std-calendar.orb +0 -775
  296. package/behaviors/exports/atoms/std-combat-log.orb +0 -268
  297. package/behaviors/exports/atoms/std-dialogue-box.orb +0 -249
  298. package/behaviors/exports/atoms/std-drawer.orb +0 -578
  299. package/behaviors/exports/atoms/std-flip-card.orb +0 -601
  300. package/behaviors/exports/atoms/std-game-audio.orb +0 -350
  301. package/behaviors/exports/atoms/std-game-canvas2d.orb +0 -263
  302. package/behaviors/exports/atoms/std-game-hud.orb +0 -170
  303. package/behaviors/exports/atoms/std-game-over-screen.orb +0 -206
  304. package/behaviors/exports/atoms/std-gameflow.orb +0 -419
  305. package/behaviors/exports/atoms/std-inventory-panel.orb +0 -266
  306. package/behaviors/exports/atoms/std-notification.orb +0 -446
  307. package/behaviors/exports/atoms/std-rating.orb +0 -333
  308. package/behaviors/exports/atoms/std-score-board.orb +0 -249
  309. package/behaviors/exports/atoms/std-score.orb +0 -713
  310. package/behaviors/exports/atoms/std-service-custom-bearer.orb +0 -562
  311. package/behaviors/exports/atoms/std-service-custom-header.orb +0 -564
  312. package/behaviors/exports/atoms/std-service-email.orb +0 -545
  313. package/behaviors/exports/atoms/std-service-github.orb +0 -591
  314. package/behaviors/exports/atoms/std-service-storage.orb +0 -669
  315. package/behaviors/exports/atoms/std-service-stripe.orb +0 -644
  316. package/behaviors/exports/atoms/std-service-twilio.orb +0 -616
  317. package/behaviors/exports/atoms/std-service-youtube.orb +0 -701
  318. package/behaviors/exports/atoms/std-text-effects.orb +0 -663
  319. package/behaviors/exports/atoms/std-theme.orb +0 -578
  320. package/behaviors/exports/atoms/std-undo.orb +0 -830
  321. package/behaviors/exports/atoms/std-upload.orb +0 -540
  322. package/behaviors/exports/atoms/std-wizard.orb +0 -1120
  323. package/behaviors/exports/molecules/std-agent-fix-loop.orb +0 -3327
  324. package/behaviors/exports/molecules/std-agent-tool-loop.orb +0 -4451
  325. package/behaviors/exports/molecules/std-builder-game.orb +0 -234
  326. package/behaviors/exports/molecules/std-classifier-game.orb +0 -234
  327. package/behaviors/exports/molecules/std-detail.orb +0 -621
  328. package/behaviors/exports/molecules/std-geospatial.orb +0 -657
  329. package/behaviors/exports/molecules/std-inventory.orb +0 -823
  330. package/behaviors/exports/molecules/std-list.orb +0 -1066
  331. package/behaviors/exports/molecules/std-messaging.orb +0 -605
  332. package/behaviors/exports/molecules/std-turn-based-battle.orb +0 -514
  333. package/behaviors/exports/organisms/std-agent-reviewer.orb +0 -5277
  334. package/behaviors/exports/organisms/std-api-gateway.orb +0 -3745
  335. package/behaviors/exports/organisms/std-ecommerce.orb +0 -4553
  336. package/behaviors/exports/organisms/std-finance-tracker.orb +0 -3091
  337. package/behaviors/exports/organisms/std-helpdesk.orb +0 -3328
  338. package/behaviors/exports/organisms/std-lms.orb +0 -3885
  339. package/behaviors/exports/organisms/std-puzzle-app.orb +0 -889
  340. package/behaviors/exports/organisms/std-realtime-chat.orb +0 -3428
  341. package/behaviors/exports/organisms/std-trading-dashboard.orb +0 -3080
  342. package/behaviors/exports/test-schemas/os-trigger-simulation.orb +0 -202
  343. package/behaviors/exports/validation-report.json +0 -1672
  344. package/behaviors/exports/verify-results.json +0 -126
  345. package/dist/behaviors/exports/atoms/std-agent-context-window.orb +0 -2299
  346. package/dist/behaviors/exports/atoms/std-agent-conversation.orb +0 -1029
  347. package/dist/behaviors/exports/atoms/std-agent-memory.orb +0 -777
  348. package/dist/behaviors/exports/atoms/std-agent-provider.orb +0 -906
  349. package/dist/behaviors/exports/atoms/std-agent-step-progress.orb +0 -994
  350. package/dist/behaviors/exports/atoms/std-agent-token-gauge.orb +0 -1621
  351. package/dist/behaviors/exports/atoms/std-combat.orb +0 -421
  352. package/dist/behaviors/exports/atoms/std-confirmation.orb +0 -496
  353. package/dist/behaviors/exports/atoms/std-display.orb +0 -1803
  354. package/dist/behaviors/exports/atoms/std-isometric-canvas.orb +0 -642
  355. package/dist/behaviors/exports/atoms/std-modal.orb +0 -425
  356. package/dist/behaviors/exports/atoms/std-overworld.orb +0 -517
  357. package/dist/behaviors/exports/atoms/std-quest.orb +0 -1262
  358. package/dist/behaviors/exports/atoms/std-rate-limiter.orb +0 -897
  359. package/dist/behaviors/exports/atoms/std-search.orb +0 -394
  360. package/dist/behaviors/exports/atoms/std-selection.orb +0 -810
  361. package/dist/behaviors/exports/atoms/std-service-custom-noauth.orb +0 -558
  362. package/dist/behaviors/exports/atoms/std-service-custom-query.orb +0 -564
  363. package/dist/behaviors/exports/atoms/std-service-llm.orb +0 -676
  364. package/dist/behaviors/exports/atoms/std-simulation-canvas.orb +0 -194
  365. package/dist/behaviors/exports/atoms/std-sort.orb +0 -760
  366. package/dist/behaviors/exports/atoms/std-tabs.orb +0 -298
  367. package/dist/behaviors/exports/atoms/std-timer.orb +0 -1428
  368. package/dist/behaviors/exports/atoms/std-validate-on-save.orb +0 -624
  369. package/dist/behaviors/exports/molecules/std-agent-planner.orb +0 -2037
  370. package/dist/behaviors/exports/molecules/std-agent-tool-loop.orb +0 -4451
  371. package/dist/behaviors/exports/molecules/std-cart.orb +0 -754
  372. package/dist/behaviors/exports/molecules/std-debugger-game.orb +0 -234
  373. package/dist/behaviors/exports/molecules/std-detail.orb +0 -621
  374. package/dist/behaviors/exports/molecules/std-event-handler-game.orb +0 -234
  375. package/dist/behaviors/exports/molecules/std-form-advanced.orb +0 -659
  376. package/dist/behaviors/exports/molecules/std-geospatial.orb +0 -657
  377. package/dist/behaviors/exports/molecules/std-inventory.orb +0 -823
  378. package/dist/behaviors/exports/molecules/std-list.orb +0 -1066
  379. package/dist/behaviors/exports/molecules/std-messaging.orb +0 -605
  380. package/dist/behaviors/exports/molecules/std-negotiator-game.orb +0 -234
  381. package/dist/behaviors/exports/molecules/std-platformer-game.orb +0 -557
  382. package/dist/behaviors/exports/molecules/std-sequencer-game.orb +0 -234
  383. package/dist/behaviors/exports/molecules/std-service-content-pipeline.orb +0 -920
  384. package/dist/behaviors/exports/molecules/std-service-devops-toolkit.orb +0 -1531
  385. package/dist/behaviors/exports/molecules/std-service-notification-hub.orb +0 -701
  386. package/dist/behaviors/exports/molecules/std-service-payment-flow.orb +0 -878
  387. package/dist/behaviors/exports/molecules/std-simulator-game.orb +0 -234
  388. package/dist/behaviors/exports/organisms/std-agent-assistant.orb +0 -6336
  389. package/dist/behaviors/exports/organisms/std-agent-builder.orb +0 -14139
  390. package/dist/behaviors/exports/organisms/std-agent-pipeline.orb +0 -10974
  391. package/dist/behaviors/exports/organisms/std-agent-tutor.orb +0 -5003
  392. package/dist/behaviors/exports/organisms/std-arcade-game.orb +0 -1144
  393. package/dist/behaviors/exports/organisms/std-booking-system.orb +0 -5142
  394. package/dist/behaviors/exports/organisms/std-cms.orb +0 -2887
  395. package/dist/behaviors/exports/organisms/std-crm.orb +0 -4366
  396. package/dist/behaviors/exports/organisms/std-devops-dashboard.orb +0 -5772
  397. package/dist/behaviors/exports/organisms/std-healthcare.orb +0 -6001
  398. package/dist/behaviors/exports/organisms/std-project-manager.orb +0 -3819
  399. package/dist/behaviors/exports/organisms/std-service-marketplace.orb +0 -4479
  400. package/dist/behaviors/exports/organisms/std-service-research-assistant.orb +0 -3568
  401. package/dist/behaviors/exports/organisms/std-social-feed.orb +0 -1246
  402. package/dist/behaviors/exports/organisms/std-stem-lab.orb +0 -1922
  403. package/dist/behaviors/exports/test-schemas/os-trigger-simulation.orb +0 -202
  404. package/dist/behaviors/exports/validation-report.json +0 -1672
  405. package/dist/behaviors/exports/verify-results.json +0 -126
  406. package/dist/exports/atoms/std-agent-activity-log.orb +0 -575
  407. package/dist/exports/atoms/std-agent-chat-thread.orb +0 -783
  408. package/dist/exports/atoms/std-agent-tool-call.orb +0 -746
  409. package/dist/exports/atoms/std-async.orb +0 -443
  410. package/dist/exports/atoms/std-circuit-breaker.orb +0 -999
  411. package/dist/exports/atoms/std-collision.orb +0 -694
  412. package/dist/exports/atoms/std-filter.orb +0 -641
  413. package/dist/exports/atoms/std-gallery.orb +0 -387
  414. package/dist/exports/atoms/std-game-canvas3d.orb +0 -401
  415. package/dist/exports/atoms/std-game-menu.orb +0 -222
  416. package/dist/exports/atoms/std-input.orb +0 -640
  417. package/dist/exports/atoms/std-loading.orb +0 -496
  418. package/dist/exports/atoms/std-movement.orb +0 -1413
  419. package/dist/exports/atoms/std-pagination.orb +0 -266
  420. package/dist/exports/atoms/std-physics2d.orb +0 -430
  421. package/dist/exports/atoms/std-platformer-canvas.orb +0 -268
  422. package/dist/exports/atoms/std-service-oauth.orb +0 -769
  423. package/dist/exports/atoms/std-service-redis.orb +0 -585
  424. package/dist/exports/atoms/std-sprite.orb +0 -315
  425. package/dist/exports/molecules/std-agent-learner.orb +0 -2315
  426. package/dist/exports/molecules/std-agent-rag.orb +0 -1745
  427. package/dist/exports/molecules/std-agent-tool-loop.orb +0 -4451
  428. package/dist/exports/molecules/std-detail.orb +0 -621
  429. package/dist/exports/molecules/std-geospatial.orb +0 -657
  430. package/dist/exports/molecules/std-inventory.orb +0 -823
  431. package/dist/exports/molecules/std-list.orb +0 -1066
  432. package/dist/exports/molecules/std-messaging.orb +0 -605
  433. package/dist/exports/molecules/std-puzzle-game.orb +0 -584
  434. package/dist/exports/molecules/std-quiz.orb +0 -1074
  435. package/dist/exports/molecules/std-service-custom-api-tester.orb +0 -865
  436. package/dist/exports/organisms/std-cicd-pipeline.orb +0 -3425
  437. package/dist/exports/organisms/std-coding-academy.orb +0 -2084
  438. package/dist/exports/organisms/std-hr-portal.orb +0 -5236
  439. package/dist/exports/organisms/std-iot-dashboard.orb +0 -3914
  440. package/dist/exports/organisms/std-logic-training.orb +0 -753
  441. package/dist/exports/organisms/std-platformer-app.orb +0 -1679
  442. package/dist/exports/organisms/std-rpg-game.orb +0 -3298
  443. package/dist/exports/organisms/std-strategy-game.orb +0 -2443
  444. package/dist/exports/test-schemas/os-trigger-simulation.orb +0 -202
  445. package/dist/exports/validation-report.json +0 -1672
  446. package/dist/exports/verify-results.json +0 -126
@@ -1,4479 +0,0 @@
1
- {
2
- "name": "ServiceMarketplace",
3
- "version": "1.0.0",
4
- "orbitals": [
5
- {
6
- "name": "ProductOrbital",
7
- "entity": {
8
- "name": "Product",
9
- "persistence": "persistent",
10
- "collection": "products",
11
- "fields": [
12
- {
13
- "name": "id",
14
- "type": "string",
15
- "required": true
16
- },
17
- {
18
- "name": "name",
19
- "type": "string",
20
- "required": true
21
- },
22
- {
23
- "name": "description",
24
- "type": "string"
25
- },
26
- {
27
- "name": "price",
28
- "type": "number",
29
- "required": true
30
- },
31
- {
32
- "name": "category",
33
- "type": "string"
34
- },
35
- {
36
- "name": "inStock",
37
- "type": "boolean",
38
- "default": true
39
- },
40
- {
41
- "name": "pendingId",
42
- "type": "string",
43
- "default": ""
44
- }
45
- ]
46
- },
47
- "traits": [
48
- {
49
- "name": "ProductBrowse",
50
- "linkedEntity": "Product",
51
- "category": "interaction",
52
- "listens": [
53
- {
54
- "event": "PRODUCT_CREATED",
55
- "triggers": "INIT"
56
- },
57
- {
58
- "event": "PRODUCT_UPDATED",
59
- "triggers": "INIT"
60
- },
61
- {
62
- "event": "PRODUCT_DELETED",
63
- "triggers": "INIT"
64
- }
65
- ],
66
- "stateMachine": {
67
- "states": [
68
- {
69
- "name": "browsing",
70
- "isInitial": true
71
- }
72
- ],
73
- "events": [
74
- {
75
- "key": "INIT",
76
- "name": "Initialize"
77
- },
78
- {
79
- "key": "CREATE",
80
- "name": "CREATE"
81
- },
82
- {
83
- "key": "VIEW",
84
- "name": "VIEW",
85
- "payload": [
86
- {
87
- "name": "id",
88
- "type": "string",
89
- "required": true
90
- },
91
- {
92
- "name": "row",
93
- "type": "object"
94
- }
95
- ]
96
- },
97
- {
98
- "key": "EDIT",
99
- "name": "EDIT",
100
- "payload": [
101
- {
102
- "name": "id",
103
- "type": "string",
104
- "required": true
105
- },
106
- {
107
- "name": "row",
108
- "type": "object"
109
- }
110
- ]
111
- },
112
- {
113
- "key": "DELETE",
114
- "name": "DELETE",
115
- "payload": [
116
- {
117
- "name": "id",
118
- "type": "string",
119
- "required": true
120
- },
121
- {
122
- "name": "row",
123
- "type": "object"
124
- }
125
- ]
126
- }
127
- ],
128
- "transitions": [
129
- {
130
- "from": "browsing",
131
- "to": "browsing",
132
- "event": "INIT",
133
- "effects": [
134
- [
135
- "ref",
136
- "Product"
137
- ],
138
- [
139
- "render-ui",
140
- "main",
141
- {
142
- "type": "dashboard-layout",
143
- "appName": "ServiceMarketplace",
144
- "navItems": [
145
- {
146
- "label": "Products",
147
- "href": "/products",
148
- "icon": "package"
149
- },
150
- {
151
- "label": "Login",
152
- "href": "/login",
153
- "icon": "layout-list"
154
- },
155
- {
156
- "label": "Checkout",
157
- "href": "/checkout",
158
- "icon": "credit-card"
159
- },
160
- {
161
- "label": "Orders",
162
- "href": "/orders",
163
- "icon": "clipboard-list"
164
- }
165
- ],
166
- "children": [
167
- {
168
- "type": "stack",
169
- "direction": "vertical",
170
- "gap": "lg",
171
- "className": "max-w-5xl mx-auto w-full",
172
- "children": [
173
- {
174
- "type": "stack",
175
- "direction": "horizontal",
176
- "gap": "md",
177
- "justify": "space-between",
178
- "align": "center",
179
- "children": [
180
- {
181
- "type": "stack",
182
- "direction": "horizontal",
183
- "gap": "sm",
184
- "align": "center",
185
- "children": [
186
- {
187
- "type": "icon",
188
- "name": "shopping-bag",
189
- "size": "lg"
190
- },
191
- {
192
- "type": "typography",
193
- "content": "Products",
194
- "variant": "h2"
195
- }
196
- ]
197
- },
198
- {
199
- "type": "stack",
200
- "direction": "horizontal",
201
- "gap": "sm",
202
- "children": [
203
- {
204
- "type": "button",
205
- "label": "Create Product",
206
- "event": "CREATE",
207
- "variant": "primary",
208
- "icon": "plus"
209
- }
210
- ]
211
- }
212
- ]
213
- },
214
- {
215
- "type": "divider"
216
- },
217
- {
218
- "type": "data-grid",
219
- "entity": "Product",
220
- "emptyIcon": "inbox",
221
- "emptyTitle": "No products yet",
222
- "emptyDescription": "Add products to build your catalog.",
223
- "itemActions": [
224
- {
225
- "label": "View",
226
- "event": "VIEW",
227
- "variant": "ghost",
228
- "size": "sm"
229
- },
230
- {
231
- "label": "Edit",
232
- "event": "EDIT",
233
- "variant": "ghost",
234
- "size": "sm"
235
- },
236
- {
237
- "label": "Delete",
238
- "event": "DELETE",
239
- "variant": "danger",
240
- "size": "sm"
241
- }
242
- ],
243
- "columns": [
244
- {
245
- "name": "name",
246
- "label": "Name",
247
- "variant": "h4",
248
- "icon": "shopping-bag"
249
- },
250
- {
251
- "name": "description",
252
- "label": "Description",
253
- "variant": "badge",
254
- "colorMap": {
255
- "active": "success",
256
- "completed": "success",
257
- "done": "success",
258
- "pending": "warning",
259
- "draft": "warning",
260
- "scheduled": "warning",
261
- "inactive": "neutral",
262
- "archived": "neutral",
263
- "disabled": "neutral",
264
- "error": "destructive",
265
- "cancelled": "destructive",
266
- "failed": "destructive"
267
- }
268
- },
269
- {
270
- "name": "price",
271
- "label": "Price",
272
- "variant": "caption"
273
- }
274
- ]
275
- }
276
- ]
277
- }
278
- ]
279
- }
280
- ]
281
- ]
282
- }
283
- ]
284
- },
285
- "emits": [
286
- {
287
- "event": "CHECKOUT",
288
- "payload": [
289
- {
290
- "name": "id",
291
- "type": "string",
292
- "required": true
293
- }
294
- ],
295
- "scope": "external"
296
- }
297
- ]
298
- },
299
- {
300
- "name": "ProductCreate",
301
- "linkedEntity": "Product",
302
- "category": "interaction",
303
- "emits": [
304
- {
305
- "event": "SAVE"
306
- },
307
- {
308
- "event": "PRODUCT_CREATED"
309
- }
310
- ],
311
- "stateMachine": {
312
- "states": [
313
- {
314
- "name": "closed",
315
- "isInitial": true
316
- },
317
- {
318
- "name": "open"
319
- }
320
- ],
321
- "events": [
322
- {
323
- "key": "INIT",
324
- "name": "Initialize"
325
- },
326
- {
327
- "key": "CREATE",
328
- "name": "Open"
329
- },
330
- {
331
- "key": "CLOSE",
332
- "name": "Close"
333
- },
334
- {
335
- "key": "SAVE",
336
- "name": "Save",
337
- "payload": [
338
- {
339
- "name": "data",
340
- "type": "object",
341
- "required": true
342
- }
343
- ]
344
- }
345
- ],
346
- "transitions": [
347
- {
348
- "from": "closed",
349
- "to": "closed",
350
- "event": "INIT",
351
- "effects": [
352
- [
353
- "ref",
354
- "Product"
355
- ]
356
- ]
357
- },
358
- {
359
- "from": "closed",
360
- "to": "open",
361
- "event": "CREATE",
362
- "effects": [
363
- [
364
- "fetch",
365
- "Product"
366
- ],
367
- [
368
- "render-ui",
369
- "modal",
370
- {
371
- "type": "stack",
372
- "direction": "vertical",
373
- "gap": "md",
374
- "children": [
375
- {
376
- "type": "stack",
377
- "direction": "horizontal",
378
- "gap": "sm",
379
- "children": [
380
- {
381
- "type": "icon",
382
- "name": "plus-circle",
383
- "size": "md"
384
- },
385
- {
386
- "type": "typography",
387
- "content": "Create Product",
388
- "variant": "h3"
389
- }
390
- ]
391
- },
392
- {
393
- "type": "divider"
394
- },
395
- {
396
- "type": "form-section",
397
- "entity": "Product",
398
- "mode": "create",
399
- "submitEvent": "SAVE",
400
- "cancelEvent": "CLOSE",
401
- "fields": [
402
- "name",
403
- "description",
404
- "price",
405
- "category",
406
- "inStock"
407
- ]
408
- }
409
- ]
410
- }
411
- ]
412
- ]
413
- },
414
- {
415
- "from": "open",
416
- "to": "closed",
417
- "event": "CLOSE",
418
- "effects": [
419
- [
420
- "render-ui",
421
- "modal",
422
- null
423
- ],
424
- [
425
- "notify",
426
- "Cancelled",
427
- "info"
428
- ]
429
- ]
430
- },
431
- {
432
- "from": "open",
433
- "to": "closed",
434
- "event": "SAVE",
435
- "effects": [
436
- [
437
- "persist",
438
- "create",
439
- "Product",
440
- "@payload.data"
441
- ],
442
- [
443
- "render-ui",
444
- "modal",
445
- null
446
- ],
447
- [
448
- "emit",
449
- "PRODUCT_CREATED"
450
- ],
451
- [
452
- "notify",
453
- "Product created successfully"
454
- ]
455
- ]
456
- }
457
- ]
458
- }
459
- },
460
- {
461
- "name": "ProductEdit",
462
- "linkedEntity": "Product",
463
- "category": "interaction",
464
- "emits": [
465
- {
466
- "event": "SAVE"
467
- },
468
- {
469
- "event": "PRODUCT_UPDATED"
470
- }
471
- ],
472
- "stateMachine": {
473
- "states": [
474
- {
475
- "name": "closed",
476
- "isInitial": true
477
- },
478
- {
479
- "name": "open"
480
- }
481
- ],
482
- "events": [
483
- {
484
- "key": "INIT",
485
- "name": "Initialize"
486
- },
487
- {
488
- "key": "EDIT",
489
- "name": "Open",
490
- "payload": [
491
- {
492
- "name": "id",
493
- "type": "string",
494
- "required": true
495
- }
496
- ]
497
- },
498
- {
499
- "key": "CLOSE",
500
- "name": "Close"
501
- },
502
- {
503
- "key": "SAVE",
504
- "name": "Save",
505
- "payload": [
506
- {
507
- "name": "data",
508
- "type": "object",
509
- "required": true
510
- }
511
- ]
512
- }
513
- ],
514
- "transitions": [
515
- {
516
- "from": "closed",
517
- "to": "closed",
518
- "event": "INIT",
519
- "effects": [
520
- [
521
- "ref",
522
- "Product"
523
- ]
524
- ]
525
- },
526
- {
527
- "from": "closed",
528
- "to": "open",
529
- "event": "EDIT",
530
- "effects": [
531
- [
532
- "fetch",
533
- "Product",
534
- {
535
- "id": "@payload.id"
536
- }
537
- ],
538
- [
539
- "render-ui",
540
- "modal",
541
- {
542
- "type": "stack",
543
- "direction": "vertical",
544
- "gap": "md",
545
- "children": [
546
- {
547
- "type": "stack",
548
- "direction": "horizontal",
549
- "gap": "sm",
550
- "children": [
551
- {
552
- "type": "icon",
553
- "name": "edit",
554
- "size": "md"
555
- },
556
- {
557
- "type": "typography",
558
- "content": "Edit Product",
559
- "variant": "h3"
560
- }
561
- ]
562
- },
563
- {
564
- "type": "divider"
565
- },
566
- {
567
- "type": "form-section",
568
- "entity": "Product",
569
- "mode": "edit",
570
- "submitEvent": "SAVE",
571
- "cancelEvent": "CLOSE",
572
- "fields": [
573
- "name",
574
- "description",
575
- "price",
576
- "category",
577
- "inStock"
578
- ],
579
- "entityId": "@entity.id"
580
- }
581
- ]
582
- }
583
- ]
584
- ]
585
- },
586
- {
587
- "from": "open",
588
- "to": "closed",
589
- "event": "CLOSE",
590
- "effects": [
591
- [
592
- "render-ui",
593
- "modal",
594
- null
595
- ],
596
- [
597
- "notify",
598
- "Cancelled",
599
- "info"
600
- ]
601
- ]
602
- },
603
- {
604
- "from": "open",
605
- "to": "closed",
606
- "event": "SAVE",
607
- "effects": [
608
- [
609
- "persist",
610
- "update",
611
- "Product",
612
- "@payload.data"
613
- ],
614
- [
615
- "render-ui",
616
- "modal",
617
- null
618
- ],
619
- [
620
- "emit",
621
- "PRODUCT_UPDATED"
622
- ],
623
- [
624
- "notify",
625
- "Product updated successfully"
626
- ]
627
- ]
628
- }
629
- ]
630
- }
631
- },
632
- {
633
- "name": "ProductView",
634
- "linkedEntity": "Product",
635
- "category": "interaction",
636
- "emits": [
637
- {
638
- "event": "SAVE"
639
- }
640
- ],
641
- "stateMachine": {
642
- "states": [
643
- {
644
- "name": "closed",
645
- "isInitial": true
646
- },
647
- {
648
- "name": "open"
649
- }
650
- ],
651
- "events": [
652
- {
653
- "key": "INIT",
654
- "name": "Initialize"
655
- },
656
- {
657
- "key": "VIEW",
658
- "name": "Open",
659
- "payload": [
660
- {
661
- "name": "id",
662
- "type": "string",
663
- "required": true
664
- }
665
- ]
666
- },
667
- {
668
- "key": "CLOSE",
669
- "name": "Close"
670
- },
671
- {
672
- "key": "SAVE",
673
- "name": "Save",
674
- "payload": [
675
- {
676
- "name": "data",
677
- "type": "object",
678
- "required": true
679
- }
680
- ]
681
- }
682
- ],
683
- "transitions": [
684
- {
685
- "from": "closed",
686
- "to": "closed",
687
- "event": "INIT",
688
- "effects": [
689
- [
690
- "ref",
691
- "Product"
692
- ]
693
- ]
694
- },
695
- {
696
- "from": "closed",
697
- "to": "open",
698
- "event": "VIEW",
699
- "effects": [
700
- [
701
- "fetch",
702
- "Product",
703
- {
704
- "id": "@payload.id"
705
- }
706
- ],
707
- [
708
- "render-ui",
709
- "modal",
710
- {
711
- "type": "stack",
712
- "direction": "vertical",
713
- "gap": "md",
714
- "children": [
715
- {
716
- "type": "stack",
717
- "direction": "horizontal",
718
- "gap": "sm",
719
- "align": "center",
720
- "children": [
721
- {
722
- "type": "icon",
723
- "name": "eye",
724
- "size": "md"
725
- },
726
- {
727
- "type": "typography",
728
- "variant": "h3",
729
- "content": "@entity.name"
730
- }
731
- ]
732
- },
733
- {
734
- "type": "divider"
735
- },
736
- {
737
- "type": "stack",
738
- "direction": "horizontal",
739
- "gap": "md",
740
- "children": [
741
- {
742
- "type": "typography",
743
- "variant": "caption",
744
- "content": "Name"
745
- },
746
- {
747
- "type": "typography",
748
- "variant": "body",
749
- "content": "@entity.name"
750
- }
751
- ]
752
- },
753
- {
754
- "type": "stack",
755
- "direction": "horizontal",
756
- "gap": "md",
757
- "children": [
758
- {
759
- "type": "typography",
760
- "variant": "caption",
761
- "content": "Description"
762
- },
763
- {
764
- "type": "typography",
765
- "variant": "body",
766
- "content": "@entity.description"
767
- }
768
- ]
769
- },
770
- {
771
- "type": "stack",
772
- "direction": "horizontal",
773
- "gap": "md",
774
- "children": [
775
- {
776
- "type": "typography",
777
- "variant": "caption",
778
- "content": "Price"
779
- },
780
- {
781
- "type": "typography",
782
- "variant": "body",
783
- "content": "@entity.price"
784
- }
785
- ]
786
- },
787
- {
788
- "type": "stack",
789
- "direction": "horizontal",
790
- "gap": "md",
791
- "children": [
792
- {
793
- "type": "typography",
794
- "variant": "caption",
795
- "content": "Category"
796
- },
797
- {
798
- "type": "typography",
799
- "variant": "body",
800
- "content": "@entity.category"
801
- }
802
- ]
803
- },
804
- {
805
- "type": "stack",
806
- "direction": "horizontal",
807
- "gap": "md",
808
- "children": [
809
- {
810
- "type": "typography",
811
- "variant": "caption",
812
- "content": "In Stock"
813
- },
814
- {
815
- "type": "typography",
816
- "variant": "body",
817
- "content": "@entity.inStock"
818
- }
819
- ]
820
- },
821
- {
822
- "type": "divider"
823
- },
824
- {
825
- "type": "stack",
826
- "direction": "horizontal",
827
- "gap": "sm",
828
- "justify": "end",
829
- "children": [
830
- {
831
- "type": "button",
832
- "label": "Edit",
833
- "event": "EDIT",
834
- "variant": "primary",
835
- "icon": "edit"
836
- },
837
- {
838
- "type": "button",
839
- "label": "Close",
840
- "event": "CLOSE",
841
- "variant": "ghost"
842
- }
843
- ]
844
- }
845
- ]
846
- }
847
- ]
848
- ]
849
- },
850
- {
851
- "from": "open",
852
- "to": "closed",
853
- "event": "CLOSE",
854
- "effects": [
855
- [
856
- "render-ui",
857
- "modal",
858
- null
859
- ],
860
- [
861
- "notify",
862
- "Cancelled",
863
- "info"
864
- ]
865
- ]
866
- },
867
- {
868
- "from": "open",
869
- "to": "closed",
870
- "event": "SAVE",
871
- "effects": [
872
- [
873
- "render-ui",
874
- "modal",
875
- null
876
- ]
877
- ]
878
- }
879
- ]
880
- }
881
- },
882
- {
883
- "name": "ProductDelete",
884
- "linkedEntity": "Product",
885
- "category": "interaction",
886
- "emits": [
887
- {
888
- "event": "CONFIRM_DELETE"
889
- },
890
- {
891
- "event": "PRODUCT_DELETED"
892
- }
893
- ],
894
- "stateMachine": {
895
- "states": [
896
- {
897
- "name": "idle",
898
- "isInitial": true
899
- },
900
- {
901
- "name": "confirming"
902
- }
903
- ],
904
- "events": [
905
- {
906
- "key": "INIT",
907
- "name": "Initialize"
908
- },
909
- {
910
- "key": "DELETE",
911
- "name": "Request Confirmation",
912
- "payload": [
913
- {
914
- "name": "id",
915
- "type": "string",
916
- "required": true
917
- }
918
- ]
919
- },
920
- {
921
- "key": "CONFIRM_DELETE",
922
- "name": "Confirm"
923
- },
924
- {
925
- "key": "CANCEL",
926
- "name": "Cancel"
927
- },
928
- {
929
- "key": "CLOSE",
930
- "name": "Close"
931
- }
932
- ],
933
- "transitions": [
934
- {
935
- "from": "idle",
936
- "to": "idle",
937
- "event": "INIT",
938
- "effects": [
939
- [
940
- "ref",
941
- "Product"
942
- ]
943
- ]
944
- },
945
- {
946
- "from": "idle",
947
- "to": "confirming",
948
- "event": "DELETE",
949
- "effects": [
950
- [
951
- "set",
952
- "@entity.pendingId",
953
- "@payload.id"
954
- ],
955
- [
956
- "fetch",
957
- "Product",
958
- {
959
- "id": "@payload.id"
960
- }
961
- ],
962
- [
963
- "render-ui",
964
- "modal",
965
- {
966
- "type": "stack",
967
- "direction": "vertical",
968
- "gap": "md",
969
- "children": [
970
- {
971
- "type": "stack",
972
- "direction": "horizontal",
973
- "gap": "sm",
974
- "align": "center",
975
- "children": [
976
- {
977
- "type": "icon",
978
- "name": "alert-triangle",
979
- "size": "md"
980
- },
981
- {
982
- "type": "typography",
983
- "content": "Delete Product",
984
- "variant": "h3"
985
- }
986
- ]
987
- },
988
- {
989
- "type": "divider"
990
- },
991
- {
992
- "type": "alert",
993
- "variant": "danger",
994
- "message": "This action cannot be undone."
995
- },
996
- {
997
- "type": "stack",
998
- "direction": "horizontal",
999
- "gap": "sm",
1000
- "justify": "end",
1001
- "children": [
1002
- {
1003
- "type": "button",
1004
- "label": "Cancel",
1005
- "event": "CANCEL",
1006
- "variant": "ghost"
1007
- },
1008
- {
1009
- "type": "button",
1010
- "label": "Delete",
1011
- "event": "CONFIRM_DELETE",
1012
- "variant": "danger",
1013
- "icon": "check"
1014
- }
1015
- ]
1016
- }
1017
- ]
1018
- }
1019
- ]
1020
- ]
1021
- },
1022
- {
1023
- "from": "confirming",
1024
- "to": "idle",
1025
- "event": "CONFIRM_DELETE",
1026
- "effects": [
1027
- [
1028
- "persist",
1029
- "delete",
1030
- "Product",
1031
- "@entity.pendingId"
1032
- ],
1033
- [
1034
- "render-ui",
1035
- "modal",
1036
- null
1037
- ],
1038
- [
1039
- "ref",
1040
- "Product"
1041
- ],
1042
- [
1043
- "emit",
1044
- "PRODUCT_DELETED"
1045
- ],
1046
- [
1047
- "notify",
1048
- "Product deleted successfully"
1049
- ]
1050
- ]
1051
- },
1052
- {
1053
- "from": "confirming",
1054
- "to": "idle",
1055
- "event": "CANCEL",
1056
- "effects": [
1057
- [
1058
- "render-ui",
1059
- "modal",
1060
- null
1061
- ],
1062
- [
1063
- "ref",
1064
- "Product"
1065
- ]
1066
- ]
1067
- },
1068
- {
1069
- "from": "confirming",
1070
- "to": "idle",
1071
- "event": "CLOSE",
1072
- "effects": [
1073
- [
1074
- "render-ui",
1075
- "modal",
1076
- null
1077
- ],
1078
- [
1079
- "ref",
1080
- "Product"
1081
- ]
1082
- ]
1083
- }
1084
- ]
1085
- }
1086
- }
1087
- ],
1088
- "pages": [
1089
- {
1090
- "name": "ProductsPage",
1091
- "path": "/products",
1092
- "isInitial": true,
1093
- "traits": [
1094
- {
1095
- "ref": "ProductBrowse"
1096
- },
1097
- {
1098
- "ref": "ProductCreate"
1099
- },
1100
- {
1101
- "ref": "ProductEdit"
1102
- },
1103
- {
1104
- "ref": "ProductView"
1105
- },
1106
- {
1107
- "ref": "ProductDelete"
1108
- }
1109
- ]
1110
- }
1111
- ],
1112
- "services": []
1113
- },
1114
- {
1115
- "name": "AuthSessionOrbital",
1116
- "entity": {
1117
- "name": "AuthSession",
1118
- "persistence": "runtime",
1119
- "fields": [
1120
- {
1121
- "name": "id",
1122
- "type": "string",
1123
- "required": true
1124
- },
1125
- {
1126
- "name": "provider",
1127
- "type": "string",
1128
- "default": "google"
1129
- },
1130
- {
1131
- "name": "authUrl",
1132
- "type": "string",
1133
- "default": ""
1134
- },
1135
- {
1136
- "name": "accessToken",
1137
- "type": "string",
1138
- "default": ""
1139
- },
1140
- {
1141
- "name": "refreshToken",
1142
- "type": "string",
1143
- "default": ""
1144
- },
1145
- {
1146
- "name": "authStatus",
1147
- "type": "string",
1148
- "default": "unauthenticated"
1149
- },
1150
- {
1151
- "name": "error",
1152
- "type": "string",
1153
- "default": ""
1154
- }
1155
- ]
1156
- },
1157
- "traits": [
1158
- {
1159
- "name": "AuthSessionOauth",
1160
- "linkedEntity": "AuthSession",
1161
- "category": "interaction",
1162
- "stateMachine": {
1163
- "states": [
1164
- {
1165
- "name": "unauthenticated",
1166
- "isInitial": true
1167
- },
1168
- {
1169
- "name": "authorizing"
1170
- },
1171
- {
1172
- "name": "authenticated"
1173
- },
1174
- {
1175
- "name": "refreshing"
1176
- },
1177
- {
1178
- "name": "error"
1179
- }
1180
- ],
1181
- "events": [
1182
- {
1183
- "key": "INIT",
1184
- "name": "Initialize"
1185
- },
1186
- {
1187
- "key": "LOGIN",
1188
- "name": "Login"
1189
- },
1190
- {
1191
- "key": "AUTH_URL_RECEIVED",
1192
- "name": "Auth URL Received",
1193
- "payload": [
1194
- {
1195
- "name": "authUrl",
1196
- "type": "string",
1197
- "required": true
1198
- }
1199
- ]
1200
- },
1201
- {
1202
- "key": "CALLBACK",
1203
- "name": "Authorization Callback",
1204
- "payload": [
1205
- {
1206
- "name": "code",
1207
- "type": "string",
1208
- "required": true
1209
- }
1210
- ]
1211
- },
1212
- {
1213
- "key": "TOKEN_RECEIVED",
1214
- "name": "Token Received",
1215
- "payload": [
1216
- {
1217
- "name": "accessToken",
1218
- "type": "string",
1219
- "required": true
1220
- },
1221
- {
1222
- "name": "refreshToken",
1223
- "type": "string",
1224
- "required": true
1225
- }
1226
- ]
1227
- },
1228
- {
1229
- "key": "REFRESH",
1230
- "name": "Refresh Token"
1231
- },
1232
- {
1233
- "key": "TOKEN_REFRESHED",
1234
- "name": "Token Refreshed",
1235
- "payload": [
1236
- {
1237
- "name": "accessToken",
1238
- "type": "string",
1239
- "required": true
1240
- }
1241
- ]
1242
- },
1243
- {
1244
- "key": "LOGOUT",
1245
- "name": "Logout"
1246
- },
1247
- {
1248
- "key": "FAILED",
1249
- "name": "Failed",
1250
- "payload": [
1251
- {
1252
- "name": "error",
1253
- "type": "string",
1254
- "required": true
1255
- }
1256
- ]
1257
- },
1258
- {
1259
- "key": "RETRY",
1260
- "name": "Retry"
1261
- }
1262
- ],
1263
- "transitions": [
1264
- {
1265
- "from": "unauthenticated",
1266
- "to": "unauthenticated",
1267
- "event": "INIT",
1268
- "effects": [
1269
- [
1270
- "fetch",
1271
- "AuthSession"
1272
- ],
1273
- [
1274
- "render-ui",
1275
- "main",
1276
- {
1277
- "type": "dashboard-layout",
1278
- "appName": "ServiceMarketplace",
1279
- "navItems": [
1280
- {
1281
- "label": "Products",
1282
- "href": "/products",
1283
- "icon": "package"
1284
- },
1285
- {
1286
- "label": "Login",
1287
- "href": "/login",
1288
- "icon": "layout-list"
1289
- },
1290
- {
1291
- "label": "Checkout",
1292
- "href": "/checkout",
1293
- "icon": "credit-card"
1294
- },
1295
- {
1296
- "label": "Orders",
1297
- "href": "/orders",
1298
- "icon": "clipboard-list"
1299
- }
1300
- ],
1301
- "children": [
1302
- {
1303
- "type": "stack",
1304
- "direction": "vertical",
1305
- "gap": "lg",
1306
- "align": "center",
1307
- "children": [
1308
- {
1309
- "type": "stack",
1310
- "direction": "horizontal",
1311
- "gap": "md",
1312
- "align": "center",
1313
- "children": [
1314
- {
1315
- "type": "icon",
1316
- "name": "lock",
1317
- "size": "lg"
1318
- },
1319
- {
1320
- "type": "typography",
1321
- "content": "Sign In",
1322
- "variant": "h2"
1323
- }
1324
- ]
1325
- },
1326
- {
1327
- "type": "divider"
1328
- },
1329
- {
1330
- "type": "select",
1331
- "label": "Provider",
1332
- "field": "provider",
1333
- "bind": "@entity.provider",
1334
- "options": [
1335
- {
1336
- "label": "Google",
1337
- "value": "google"
1338
- },
1339
- {
1340
- "label": "GitHub",
1341
- "value": "github"
1342
- },
1343
- {
1344
- "label": "Microsoft",
1345
- "value": "microsoft"
1346
- }
1347
- ]
1348
- },
1349
- {
1350
- "type": "button",
1351
- "label": "Login",
1352
- "event": "LOGIN",
1353
- "variant": "primary",
1354
- "icon": "log-in"
1355
- }
1356
- ]
1357
- }
1358
- ]
1359
- }
1360
- ]
1361
- ]
1362
- },
1363
- {
1364
- "from": "unauthenticated",
1365
- "to": "authorizing",
1366
- "event": "LOGIN",
1367
- "effects": [
1368
- [
1369
- "render-ui",
1370
- "main",
1371
- {
1372
- "type": "dashboard-layout",
1373
- "appName": "ServiceMarketplace",
1374
- "navItems": [
1375
- {
1376
- "label": "Products",
1377
- "href": "/products",
1378
- "icon": "package"
1379
- },
1380
- {
1381
- "label": "Login",
1382
- "href": "/login",
1383
- "icon": "layout-list"
1384
- },
1385
- {
1386
- "label": "Checkout",
1387
- "href": "/checkout",
1388
- "icon": "credit-card"
1389
- },
1390
- {
1391
- "label": "Orders",
1392
- "href": "/orders",
1393
- "icon": "clipboard-list"
1394
- }
1395
- ],
1396
- "children": [
1397
- {
1398
- "type": "loading-state",
1399
- "title": "Authorizing...",
1400
- "message": "Redirecting to provider for authorization."
1401
- }
1402
- ]
1403
- }
1404
- ],
1405
- [
1406
- "call-service",
1407
- "oauth",
1408
- "authorize",
1409
- {
1410
- "provider": "@entity.provider",
1411
- "scopes": [
1412
- "openid",
1413
- "email"
1414
- ]
1415
- }
1416
- ]
1417
- ]
1418
- },
1419
- {
1420
- "from": "authorizing",
1421
- "to": "authorizing",
1422
- "event": "AUTH_URL_RECEIVED",
1423
- "effects": [
1424
- [
1425
- "set",
1426
- "@entity.authUrl",
1427
- "@payload.authUrl"
1428
- ],
1429
- [
1430
- "render-ui",
1431
- "main",
1432
- {
1433
- "type": "dashboard-layout",
1434
- "appName": "ServiceMarketplace",
1435
- "navItems": [
1436
- {
1437
- "label": "Products",
1438
- "href": "/products",
1439
- "icon": "package"
1440
- },
1441
- {
1442
- "label": "Login",
1443
- "href": "/login",
1444
- "icon": "layout-list"
1445
- },
1446
- {
1447
- "label": "Checkout",
1448
- "href": "/checkout",
1449
- "icon": "credit-card"
1450
- },
1451
- {
1452
- "label": "Orders",
1453
- "href": "/orders",
1454
- "icon": "clipboard-list"
1455
- }
1456
- ],
1457
- "children": [
1458
- {
1459
- "type": "stack",
1460
- "direction": "vertical",
1461
- "gap": "lg",
1462
- "align": "center",
1463
- "children": [
1464
- {
1465
- "type": "icon",
1466
- "name": "external-link",
1467
- "size": "lg"
1468
- },
1469
- {
1470
- "type": "typography",
1471
- "content": "Authorization Required",
1472
- "variant": "h2"
1473
- },
1474
- {
1475
- "type": "typography",
1476
- "content": "@entity.authUrl",
1477
- "variant": "body",
1478
- "color": "muted"
1479
- },
1480
- {
1481
- "type": "input",
1482
- "label": "Authorization Code",
1483
- "field": "code",
1484
- "placeholder": "Paste authorization code here"
1485
- },
1486
- {
1487
- "type": "button",
1488
- "label": "Submit",
1489
- "event": "CALLBACK",
1490
- "variant": "primary",
1491
- "icon": "check"
1492
- }
1493
- ]
1494
- }
1495
- ]
1496
- }
1497
- ]
1498
- ]
1499
- },
1500
- {
1501
- "from": "authorizing",
1502
- "to": "authenticated",
1503
- "event": "CALLBACK",
1504
- "effects": [
1505
- [
1506
- "call-service",
1507
- "oauth",
1508
- "token",
1509
- {
1510
- "code": "@payload.code"
1511
- }
1512
- ],
1513
- [
1514
- "render-ui",
1515
- "main",
1516
- {
1517
- "type": "dashboard-layout",
1518
- "appName": "ServiceMarketplace",
1519
- "navItems": [
1520
- {
1521
- "label": "Products",
1522
- "href": "/products",
1523
- "icon": "package"
1524
- },
1525
- {
1526
- "label": "Login",
1527
- "href": "/login",
1528
- "icon": "layout-list"
1529
- },
1530
- {
1531
- "label": "Checkout",
1532
- "href": "/checkout",
1533
- "icon": "credit-card"
1534
- },
1535
- {
1536
- "label": "Orders",
1537
- "href": "/orders",
1538
- "icon": "clipboard-list"
1539
- }
1540
- ],
1541
- "children": [
1542
- {
1543
- "type": "stack",
1544
- "direction": "vertical",
1545
- "gap": "lg",
1546
- "align": "center",
1547
- "children": [
1548
- {
1549
- "type": "icon",
1550
- "name": "check-circle",
1551
- "size": "lg"
1552
- },
1553
- {
1554
- "type": "alert",
1555
- "variant": "success",
1556
- "message": "Authenticated successfully"
1557
- },
1558
- {
1559
- "type": "stack",
1560
- "direction": "horizontal",
1561
- "gap": "sm",
1562
- "justify": "center",
1563
- "children": [
1564
- {
1565
- "type": "button",
1566
- "label": "Refresh Token",
1567
- "event": "REFRESH",
1568
- "variant": "outline",
1569
- "icon": "refresh-cw"
1570
- },
1571
- {
1572
- "type": "button",
1573
- "label": "Logout",
1574
- "event": "LOGOUT",
1575
- "variant": "ghost",
1576
- "icon": "log-out"
1577
- }
1578
- ]
1579
- }
1580
- ]
1581
- }
1582
- ]
1583
- }
1584
- ]
1585
- ]
1586
- },
1587
- {
1588
- "from": "authenticated",
1589
- "to": "authenticated",
1590
- "event": "TOKEN_RECEIVED",
1591
- "effects": [
1592
- [
1593
- "set",
1594
- "@entity.accessToken",
1595
- "@payload.accessToken"
1596
- ],
1597
- [
1598
- "set",
1599
- "@entity.refreshToken",
1600
- "@payload.refreshToken"
1601
- ],
1602
- [
1603
- "set",
1604
- "@entity.authStatus",
1605
- "authenticated"
1606
- ],
1607
- [
1608
- "render-ui",
1609
- "main",
1610
- {
1611
- "type": "dashboard-layout",
1612
- "appName": "ServiceMarketplace",
1613
- "navItems": [
1614
- {
1615
- "label": "Products",
1616
- "href": "/products",
1617
- "icon": "package"
1618
- },
1619
- {
1620
- "label": "Login",
1621
- "href": "/login",
1622
- "icon": "layout-list"
1623
- },
1624
- {
1625
- "label": "Checkout",
1626
- "href": "/checkout",
1627
- "icon": "credit-card"
1628
- },
1629
- {
1630
- "label": "Orders",
1631
- "href": "/orders",
1632
- "icon": "clipboard-list"
1633
- }
1634
- ],
1635
- "children": [
1636
- {
1637
- "type": "stack",
1638
- "direction": "vertical",
1639
- "gap": "lg",
1640
- "align": "center",
1641
- "children": [
1642
- {
1643
- "type": "icon",
1644
- "name": "check-circle",
1645
- "size": "lg"
1646
- },
1647
- {
1648
- "type": "alert",
1649
- "variant": "success",
1650
- "message": "Authenticated successfully"
1651
- },
1652
- {
1653
- "type": "stack",
1654
- "direction": "horizontal",
1655
- "gap": "sm",
1656
- "justify": "center",
1657
- "children": [
1658
- {
1659
- "type": "button",
1660
- "label": "Refresh Token",
1661
- "event": "REFRESH",
1662
- "variant": "outline",
1663
- "icon": "refresh-cw"
1664
- },
1665
- {
1666
- "type": "button",
1667
- "label": "Logout",
1668
- "event": "LOGOUT",
1669
- "variant": "ghost",
1670
- "icon": "log-out"
1671
- }
1672
- ]
1673
- }
1674
- ]
1675
- }
1676
- ]
1677
- }
1678
- ]
1679
- ]
1680
- },
1681
- {
1682
- "from": "authenticated",
1683
- "to": "refreshing",
1684
- "event": "REFRESH",
1685
- "effects": [
1686
- [
1687
- "render-ui",
1688
- "main",
1689
- {
1690
- "type": "dashboard-layout",
1691
- "appName": "ServiceMarketplace",
1692
- "navItems": [
1693
- {
1694
- "label": "Products",
1695
- "href": "/products",
1696
- "icon": "package"
1697
- },
1698
- {
1699
- "label": "Login",
1700
- "href": "/login",
1701
- "icon": "layout-list"
1702
- },
1703
- {
1704
- "label": "Checkout",
1705
- "href": "/checkout",
1706
- "icon": "credit-card"
1707
- },
1708
- {
1709
- "label": "Orders",
1710
- "href": "/orders",
1711
- "icon": "clipboard-list"
1712
- }
1713
- ],
1714
- "children": [
1715
- {
1716
- "type": "loading-state",
1717
- "title": "Refreshing token...",
1718
- "message": "Obtaining a new access token."
1719
- }
1720
- ]
1721
- }
1722
- ],
1723
- [
1724
- "call-service",
1725
- "oauth",
1726
- "refresh",
1727
- {
1728
- "refreshToken": "@entity.refreshToken"
1729
- }
1730
- ]
1731
- ]
1732
- },
1733
- {
1734
- "from": "refreshing",
1735
- "to": "authenticated",
1736
- "event": "TOKEN_REFRESHED",
1737
- "effects": [
1738
- [
1739
- "set",
1740
- "@entity.accessToken",
1741
- "@payload.accessToken"
1742
- ],
1743
- [
1744
- "render-ui",
1745
- "main",
1746
- {
1747
- "type": "dashboard-layout",
1748
- "appName": "ServiceMarketplace",
1749
- "navItems": [
1750
- {
1751
- "label": "Products",
1752
- "href": "/products",
1753
- "icon": "package"
1754
- },
1755
- {
1756
- "label": "Login",
1757
- "href": "/login",
1758
- "icon": "layout-list"
1759
- },
1760
- {
1761
- "label": "Checkout",
1762
- "href": "/checkout",
1763
- "icon": "credit-card"
1764
- },
1765
- {
1766
- "label": "Orders",
1767
- "href": "/orders",
1768
- "icon": "clipboard-list"
1769
- }
1770
- ],
1771
- "children": [
1772
- {
1773
- "type": "stack",
1774
- "direction": "vertical",
1775
- "gap": "lg",
1776
- "align": "center",
1777
- "children": [
1778
- {
1779
- "type": "icon",
1780
- "name": "check-circle",
1781
- "size": "lg"
1782
- },
1783
- {
1784
- "type": "alert",
1785
- "variant": "success",
1786
- "message": "Authenticated successfully"
1787
- },
1788
- {
1789
- "type": "stack",
1790
- "direction": "horizontal",
1791
- "gap": "sm",
1792
- "justify": "center",
1793
- "children": [
1794
- {
1795
- "type": "button",
1796
- "label": "Refresh Token",
1797
- "event": "REFRESH",
1798
- "variant": "outline",
1799
- "icon": "refresh-cw"
1800
- },
1801
- {
1802
- "type": "button",
1803
- "label": "Logout",
1804
- "event": "LOGOUT",
1805
- "variant": "ghost",
1806
- "icon": "log-out"
1807
- }
1808
- ]
1809
- }
1810
- ]
1811
- }
1812
- ]
1813
- }
1814
- ]
1815
- ]
1816
- },
1817
- {
1818
- "from": "authenticated",
1819
- "to": "unauthenticated",
1820
- "event": "LOGOUT",
1821
- "effects": [
1822
- [
1823
- "set",
1824
- "@entity.authStatus",
1825
- "unauthenticated"
1826
- ],
1827
- [
1828
- "render-ui",
1829
- "main",
1830
- {
1831
- "type": "dashboard-layout",
1832
- "appName": "ServiceMarketplace",
1833
- "navItems": [
1834
- {
1835
- "label": "Products",
1836
- "href": "/products",
1837
- "icon": "package"
1838
- },
1839
- {
1840
- "label": "Login",
1841
- "href": "/login",
1842
- "icon": "layout-list"
1843
- },
1844
- {
1845
- "label": "Checkout",
1846
- "href": "/checkout",
1847
- "icon": "credit-card"
1848
- },
1849
- {
1850
- "label": "Orders",
1851
- "href": "/orders",
1852
- "icon": "clipboard-list"
1853
- }
1854
- ],
1855
- "children": [
1856
- {
1857
- "type": "stack",
1858
- "direction": "vertical",
1859
- "gap": "lg",
1860
- "align": "center",
1861
- "children": [
1862
- {
1863
- "type": "stack",
1864
- "direction": "horizontal",
1865
- "gap": "md",
1866
- "align": "center",
1867
- "children": [
1868
- {
1869
- "type": "icon",
1870
- "name": "lock",
1871
- "size": "lg"
1872
- },
1873
- {
1874
- "type": "typography",
1875
- "content": "Sign In",
1876
- "variant": "h2"
1877
- }
1878
- ]
1879
- },
1880
- {
1881
- "type": "divider"
1882
- },
1883
- {
1884
- "type": "select",
1885
- "label": "Provider",
1886
- "field": "provider",
1887
- "bind": "@entity.provider",
1888
- "options": [
1889
- {
1890
- "label": "Google",
1891
- "value": "google"
1892
- },
1893
- {
1894
- "label": "GitHub",
1895
- "value": "github"
1896
- },
1897
- {
1898
- "label": "Microsoft",
1899
- "value": "microsoft"
1900
- }
1901
- ]
1902
- },
1903
- {
1904
- "type": "button",
1905
- "label": "Login",
1906
- "event": "LOGIN",
1907
- "variant": "primary",
1908
- "icon": "log-in"
1909
- }
1910
- ]
1911
- }
1912
- ]
1913
- }
1914
- ]
1915
- ]
1916
- },
1917
- {
1918
- "from": "authorizing",
1919
- "to": "error",
1920
- "event": "FAILED",
1921
- "effects": [
1922
- [
1923
- "set",
1924
- "@entity.error",
1925
- "@payload.error"
1926
- ],
1927
- [
1928
- "render-ui",
1929
- "main",
1930
- {
1931
- "type": "dashboard-layout",
1932
- "appName": "ServiceMarketplace",
1933
- "navItems": [
1934
- {
1935
- "label": "Products",
1936
- "href": "/products",
1937
- "icon": "package"
1938
- },
1939
- {
1940
- "label": "Login",
1941
- "href": "/login",
1942
- "icon": "layout-list"
1943
- },
1944
- {
1945
- "label": "Checkout",
1946
- "href": "/checkout",
1947
- "icon": "credit-card"
1948
- },
1949
- {
1950
- "label": "Orders",
1951
- "href": "/orders",
1952
- "icon": "clipboard-list"
1953
- }
1954
- ],
1955
- "children": [
1956
- {
1957
- "type": "stack",
1958
- "direction": "vertical",
1959
- "gap": "lg",
1960
- "align": "center",
1961
- "children": [
1962
- {
1963
- "type": "error-state",
1964
- "title": "Authentication Failed",
1965
- "message": "@entity.error",
1966
- "onRetry": "RETRY"
1967
- },
1968
- {
1969
- "type": "button",
1970
- "label": "Try Again",
1971
- "event": "RETRY",
1972
- "variant": "primary",
1973
- "icon": "rotate-ccw"
1974
- }
1975
- ]
1976
- }
1977
- ]
1978
- }
1979
- ]
1980
- ]
1981
- },
1982
- {
1983
- "from": "refreshing",
1984
- "to": "error",
1985
- "event": "FAILED",
1986
- "effects": [
1987
- [
1988
- "set",
1989
- "@entity.error",
1990
- "@payload.error"
1991
- ],
1992
- [
1993
- "render-ui",
1994
- "main",
1995
- {
1996
- "type": "dashboard-layout",
1997
- "appName": "ServiceMarketplace",
1998
- "navItems": [
1999
- {
2000
- "label": "Products",
2001
- "href": "/products",
2002
- "icon": "package"
2003
- },
2004
- {
2005
- "label": "Login",
2006
- "href": "/login",
2007
- "icon": "layout-list"
2008
- },
2009
- {
2010
- "label": "Checkout",
2011
- "href": "/checkout",
2012
- "icon": "credit-card"
2013
- },
2014
- {
2015
- "label": "Orders",
2016
- "href": "/orders",
2017
- "icon": "clipboard-list"
2018
- }
2019
- ],
2020
- "children": [
2021
- {
2022
- "type": "stack",
2023
- "direction": "vertical",
2024
- "gap": "lg",
2025
- "align": "center",
2026
- "children": [
2027
- {
2028
- "type": "error-state",
2029
- "title": "Authentication Failed",
2030
- "message": "@entity.error",
2031
- "onRetry": "RETRY"
2032
- },
2033
- {
2034
- "type": "button",
2035
- "label": "Try Again",
2036
- "event": "RETRY",
2037
- "variant": "primary",
2038
- "icon": "rotate-ccw"
2039
- }
2040
- ]
2041
- }
2042
- ]
2043
- }
2044
- ]
2045
- ]
2046
- },
2047
- {
2048
- "from": "error",
2049
- "to": "unauthenticated",
2050
- "event": "RETRY",
2051
- "effects": [
2052
- [
2053
- "render-ui",
2054
- "main",
2055
- {
2056
- "type": "dashboard-layout",
2057
- "appName": "ServiceMarketplace",
2058
- "navItems": [
2059
- {
2060
- "label": "Products",
2061
- "href": "/products",
2062
- "icon": "package"
2063
- },
2064
- {
2065
- "label": "Login",
2066
- "href": "/login",
2067
- "icon": "layout-list"
2068
- },
2069
- {
2070
- "label": "Checkout",
2071
- "href": "/checkout",
2072
- "icon": "credit-card"
2073
- },
2074
- {
2075
- "label": "Orders",
2076
- "href": "/orders",
2077
- "icon": "clipboard-list"
2078
- }
2079
- ],
2080
- "children": [
2081
- {
2082
- "type": "stack",
2083
- "direction": "vertical",
2084
- "gap": "lg",
2085
- "align": "center",
2086
- "children": [
2087
- {
2088
- "type": "stack",
2089
- "direction": "horizontal",
2090
- "gap": "md",
2091
- "align": "center",
2092
- "children": [
2093
- {
2094
- "type": "icon",
2095
- "name": "lock",
2096
- "size": "lg"
2097
- },
2098
- {
2099
- "type": "typography",
2100
- "content": "Sign In",
2101
- "variant": "h2"
2102
- }
2103
- ]
2104
- },
2105
- {
2106
- "type": "divider"
2107
- },
2108
- {
2109
- "type": "select",
2110
- "label": "Provider",
2111
- "field": "provider",
2112
- "bind": "@entity.provider",
2113
- "options": [
2114
- {
2115
- "label": "Google",
2116
- "value": "google"
2117
- },
2118
- {
2119
- "label": "GitHub",
2120
- "value": "github"
2121
- },
2122
- {
2123
- "label": "Microsoft",
2124
- "value": "microsoft"
2125
- }
2126
- ]
2127
- },
2128
- {
2129
- "type": "button",
2130
- "label": "Login",
2131
- "event": "LOGIN",
2132
- "variant": "primary",
2133
- "icon": "log-in"
2134
- }
2135
- ]
2136
- }
2137
- ]
2138
- }
2139
- ]
2140
- ]
2141
- }
2142
- ]
2143
- }
2144
- }
2145
- ],
2146
- "pages": [
2147
- {
2148
- "name": "LoginPage",
2149
- "path": "/login",
2150
- "traits": [
2151
- {
2152
- "ref": "AuthSessionOauth"
2153
- }
2154
- ]
2155
- }
2156
- ],
2157
- "services": []
2158
- },
2159
- {
2160
- "name": "OrderPaymentOrbital",
2161
- "entity": {
2162
- "name": "OrderPayment",
2163
- "persistence": "runtime",
2164
- "fields": [
2165
- {
2166
- "name": "id",
2167
- "type": "string",
2168
- "required": true
2169
- },
2170
- {
2171
- "name": "amount",
2172
- "type": "number"
2173
- },
2174
- {
2175
- "name": "currency",
2176
- "type": "string",
2177
- "default": "usd"
2178
- },
2179
- {
2180
- "name": "paymentIntentId",
2181
- "type": "string"
2182
- },
2183
- {
2184
- "name": "clientSecret",
2185
- "type": "string"
2186
- },
2187
- {
2188
- "name": "paymentStatus",
2189
- "type": "string",
2190
- "default": "idle"
2191
- },
2192
- {
2193
- "name": "to",
2194
- "type": "string"
2195
- },
2196
- {
2197
- "name": "subject",
2198
- "type": "string",
2199
- "default": "Payment Receipt"
2200
- },
2201
- {
2202
- "name": "body",
2203
- "type": "string"
2204
- },
2205
- {
2206
- "name": "sendStatus",
2207
- "type": "string",
2208
- "default": "idle"
2209
- },
2210
- {
2211
- "name": "error",
2212
- "type": "string"
2213
- }
2214
- ]
2215
- },
2216
- "traits": [
2217
- {
2218
- "name": "OrderPaymentPayment",
2219
- "linkedEntity": "OrderPayment",
2220
- "category": "interaction",
2221
- "emits": [
2222
- {
2223
- "event": "SEND_RECEIPT"
2224
- }
2225
- ],
2226
- "stateMachine": {
2227
- "states": [
2228
- {
2229
- "name": "idle",
2230
- "isInitial": true
2231
- },
2232
- {
2233
- "name": "creating"
2234
- },
2235
- {
2236
- "name": "confirming"
2237
- },
2238
- {
2239
- "name": "succeeded"
2240
- },
2241
- {
2242
- "name": "error"
2243
- }
2244
- ],
2245
- "events": [
2246
- {
2247
- "key": "INIT",
2248
- "name": "Initialize"
2249
- },
2250
- {
2251
- "key": "CREATE_PAYMENT",
2252
- "name": "Create Payment"
2253
- },
2254
- {
2255
- "key": "PAYMENT_CREATED",
2256
- "name": "Payment Created",
2257
- "payload": [
2258
- {
2259
- "name": "id",
2260
- "type": "string",
2261
- "required": true
2262
- },
2263
- {
2264
- "name": "clientSecret",
2265
- "type": "string",
2266
- "required": true
2267
- }
2268
- ]
2269
- },
2270
- {
2271
- "key": "PAYMENT_CONFIRMED",
2272
- "name": "Payment Confirmed"
2273
- },
2274
- {
2275
- "key": "FAILED",
2276
- "name": "Failed",
2277
- "payload": [
2278
- {
2279
- "name": "error",
2280
- "type": "string",
2281
- "required": true
2282
- }
2283
- ]
2284
- },
2285
- {
2286
- "key": "RETRY",
2287
- "name": "Retry"
2288
- },
2289
- {
2290
- "key": "RESET",
2291
- "name": "Reset"
2292
- }
2293
- ],
2294
- "transitions": [
2295
- {
2296
- "from": "idle",
2297
- "to": "idle",
2298
- "event": "INIT",
2299
- "effects": [
2300
- [
2301
- "fetch",
2302
- "OrderPayment"
2303
- ],
2304
- [
2305
- "render-ui",
2306
- "main",
2307
- {
2308
- "type": "dashboard-layout",
2309
- "appName": "ServiceMarketplace",
2310
- "navItems": [
2311
- {
2312
- "label": "Products",
2313
- "href": "/products",
2314
- "icon": "package"
2315
- },
2316
- {
2317
- "label": "Login",
2318
- "href": "/login",
2319
- "icon": "layout-list"
2320
- },
2321
- {
2322
- "label": "Checkout",
2323
- "href": "/checkout",
2324
- "icon": "credit-card"
2325
- },
2326
- {
2327
- "label": "Orders",
2328
- "href": "/orders",
2329
- "icon": "clipboard-list"
2330
- }
2331
- ],
2332
- "children": [
2333
- {
2334
- "type": "stack",
2335
- "direction": "vertical",
2336
- "gap": "lg",
2337
- "align": "center",
2338
- "children": [
2339
- {
2340
- "type": "stack",
2341
- "direction": "horizontal",
2342
- "gap": "md",
2343
- "align": "center",
2344
- "children": [
2345
- {
2346
- "type": "icon",
2347
- "name": "credit-card",
2348
- "size": "lg"
2349
- },
2350
- {
2351
- "type": "typography",
2352
- "content": "Payment",
2353
- "variant": "h2"
2354
- }
2355
- ]
2356
- },
2357
- {
2358
- "type": "divider"
2359
- },
2360
- {
2361
- "type": "stack",
2362
- "direction": "vertical",
2363
- "gap": "md",
2364
- "children": [
2365
- {
2366
- "type": "input",
2367
- "label": "Amount",
2368
- "field": "amount",
2369
- "inputType": "number",
2370
- "placeholder": "0.00"
2371
- },
2372
- {
2373
- "type": "select",
2374
- "label": "Currency",
2375
- "field": "currency",
2376
- "options": [
2377
- {
2378
- "label": "USD",
2379
- "value": "usd"
2380
- },
2381
- {
2382
- "label": "EUR",
2383
- "value": "eur"
2384
- },
2385
- {
2386
- "label": "GBP",
2387
- "value": "gbp"
2388
- }
2389
- ]
2390
- }
2391
- ]
2392
- },
2393
- {
2394
- "type": "button",
2395
- "label": "Pay",
2396
- "event": "CREATE_PAYMENT",
2397
- "variant": "primary",
2398
- "icon": "credit-card"
2399
- }
2400
- ]
2401
- }
2402
- ]
2403
- }
2404
- ]
2405
- ]
2406
- },
2407
- {
2408
- "from": "idle",
2409
- "to": "creating",
2410
- "event": "CREATE_PAYMENT",
2411
- "effects": [
2412
- [
2413
- "render-ui",
2414
- "main",
2415
- {
2416
- "type": "dashboard-layout",
2417
- "appName": "ServiceMarketplace",
2418
- "navItems": [
2419
- {
2420
- "label": "Products",
2421
- "href": "/products",
2422
- "icon": "package"
2423
- },
2424
- {
2425
- "label": "Login",
2426
- "href": "/login",
2427
- "icon": "layout-list"
2428
- },
2429
- {
2430
- "label": "Checkout",
2431
- "href": "/checkout",
2432
- "icon": "credit-card"
2433
- },
2434
- {
2435
- "label": "Orders",
2436
- "href": "/orders",
2437
- "icon": "clipboard-list"
2438
- }
2439
- ],
2440
- "children": [
2441
- {
2442
- "type": "loading-state",
2443
- "title": "Creating payment...",
2444
- "message": "Setting up your payment intent."
2445
- }
2446
- ]
2447
- }
2448
- ],
2449
- [
2450
- "call-service",
2451
- "stripe",
2452
- "createPaymentIntent",
2453
- {
2454
- "amount": "@entity.amount",
2455
- "currency": "@entity.currency"
2456
- }
2457
- ]
2458
- ]
2459
- },
2460
- {
2461
- "from": "creating",
2462
- "to": "confirming",
2463
- "event": "PAYMENT_CREATED",
2464
- "effects": [
2465
- [
2466
- "set",
2467
- "@entity.paymentIntentId",
2468
- "@payload.id"
2469
- ],
2470
- [
2471
- "set",
2472
- "@entity.clientSecret",
2473
- "@payload.clientSecret"
2474
- ],
2475
- [
2476
- "render-ui",
2477
- "main",
2478
- {
2479
- "type": "dashboard-layout",
2480
- "appName": "ServiceMarketplace",
2481
- "navItems": [
2482
- {
2483
- "label": "Products",
2484
- "href": "/products",
2485
- "icon": "package"
2486
- },
2487
- {
2488
- "label": "Login",
2489
- "href": "/login",
2490
- "icon": "layout-list"
2491
- },
2492
- {
2493
- "label": "Checkout",
2494
- "href": "/checkout",
2495
- "icon": "credit-card"
2496
- },
2497
- {
2498
- "label": "Orders",
2499
- "href": "/orders",
2500
- "icon": "clipboard-list"
2501
- }
2502
- ],
2503
- "children": [
2504
- {
2505
- "type": "loading-state",
2506
- "title": "Confirming payment...",
2507
- "message": "Processing your payment."
2508
- }
2509
- ]
2510
- }
2511
- ],
2512
- [
2513
- "call-service",
2514
- "stripe",
2515
- "confirmPayment",
2516
- {
2517
- "paymentIntentId": "@entity.paymentIntentId"
2518
- }
2519
- ]
2520
- ]
2521
- },
2522
- {
2523
- "from": "confirming",
2524
- "to": "succeeded",
2525
- "event": "PAYMENT_CONFIRMED",
2526
- "effects": [
2527
- [
2528
- "set",
2529
- "@entity.paymentStatus",
2530
- "succeeded"
2531
- ],
2532
- [
2533
- "emit",
2534
- "SEND_RECEIPT"
2535
- ],
2536
- [
2537
- "render-ui",
2538
- "main",
2539
- {
2540
- "type": "dashboard-layout",
2541
- "appName": "ServiceMarketplace",
2542
- "navItems": [
2543
- {
2544
- "label": "Products",
2545
- "href": "/products",
2546
- "icon": "package"
2547
- },
2548
- {
2549
- "label": "Login",
2550
- "href": "/login",
2551
- "icon": "layout-list"
2552
- },
2553
- {
2554
- "label": "Checkout",
2555
- "href": "/checkout",
2556
- "icon": "credit-card"
2557
- },
2558
- {
2559
- "label": "Orders",
2560
- "href": "/orders",
2561
- "icon": "clipboard-list"
2562
- }
2563
- ],
2564
- "children": [
2565
- {
2566
- "type": "stack",
2567
- "direction": "vertical",
2568
- "gap": "lg",
2569
- "align": "center",
2570
- "children": [
2571
- {
2572
- "type": "icon",
2573
- "name": "check-circle",
2574
- "size": "lg"
2575
- },
2576
- {
2577
- "type": "alert",
2578
- "variant": "success",
2579
- "message": "Payment successful! Sending receipt..."
2580
- },
2581
- {
2582
- "type": "typography",
2583
- "variant": "body",
2584
- "color": "muted",
2585
- "content": "@entity.paymentIntentId"
2586
- },
2587
- {
2588
- "type": "button",
2589
- "label": "New Payment",
2590
- "event": "RESET",
2591
- "variant": "ghost",
2592
- "icon": "rotate-ccw"
2593
- }
2594
- ]
2595
- }
2596
- ]
2597
- }
2598
- ]
2599
- ]
2600
- },
2601
- {
2602
- "from": "creating",
2603
- "to": "error",
2604
- "event": "FAILED",
2605
- "effects": [
2606
- [
2607
- "set",
2608
- "@entity.error",
2609
- "@payload.error"
2610
- ],
2611
- [
2612
- "render-ui",
2613
- "main",
2614
- {
2615
- "type": "dashboard-layout",
2616
- "appName": "ServiceMarketplace",
2617
- "navItems": [
2618
- {
2619
- "label": "Products",
2620
- "href": "/products",
2621
- "icon": "package"
2622
- },
2623
- {
2624
- "label": "Login",
2625
- "href": "/login",
2626
- "icon": "layout-list"
2627
- },
2628
- {
2629
- "label": "Checkout",
2630
- "href": "/checkout",
2631
- "icon": "credit-card"
2632
- },
2633
- {
2634
- "label": "Orders",
2635
- "href": "/orders",
2636
- "icon": "clipboard-list"
2637
- }
2638
- ],
2639
- "children": [
2640
- {
2641
- "type": "error-state",
2642
- "title": "Payment Failed",
2643
- "message": "@entity.error",
2644
- "onRetry": "RETRY"
2645
- }
2646
- ]
2647
- }
2648
- ]
2649
- ]
2650
- },
2651
- {
2652
- "from": "confirming",
2653
- "to": "error",
2654
- "event": "FAILED",
2655
- "effects": [
2656
- [
2657
- "set",
2658
- "@entity.error",
2659
- "@payload.error"
2660
- ],
2661
- [
2662
- "render-ui",
2663
- "main",
2664
- {
2665
- "type": "dashboard-layout",
2666
- "appName": "ServiceMarketplace",
2667
- "navItems": [
2668
- {
2669
- "label": "Products",
2670
- "href": "/products",
2671
- "icon": "package"
2672
- },
2673
- {
2674
- "label": "Login",
2675
- "href": "/login",
2676
- "icon": "layout-list"
2677
- },
2678
- {
2679
- "label": "Checkout",
2680
- "href": "/checkout",
2681
- "icon": "credit-card"
2682
- },
2683
- {
2684
- "label": "Orders",
2685
- "href": "/orders",
2686
- "icon": "clipboard-list"
2687
- }
2688
- ],
2689
- "children": [
2690
- {
2691
- "type": "error-state",
2692
- "title": "Payment Failed",
2693
- "message": "@entity.error",
2694
- "onRetry": "RETRY"
2695
- }
2696
- ]
2697
- }
2698
- ]
2699
- ]
2700
- },
2701
- {
2702
- "from": "error",
2703
- "to": "idle",
2704
- "event": "RETRY",
2705
- "effects": [
2706
- [
2707
- "render-ui",
2708
- "main",
2709
- {
2710
- "type": "dashboard-layout",
2711
- "appName": "ServiceMarketplace",
2712
- "navItems": [
2713
- {
2714
- "label": "Products",
2715
- "href": "/products",
2716
- "icon": "package"
2717
- },
2718
- {
2719
- "label": "Login",
2720
- "href": "/login",
2721
- "icon": "layout-list"
2722
- },
2723
- {
2724
- "label": "Checkout",
2725
- "href": "/checkout",
2726
- "icon": "credit-card"
2727
- },
2728
- {
2729
- "label": "Orders",
2730
- "href": "/orders",
2731
- "icon": "clipboard-list"
2732
- }
2733
- ],
2734
- "children": [
2735
- {
2736
- "type": "stack",
2737
- "direction": "vertical",
2738
- "gap": "lg",
2739
- "align": "center",
2740
- "children": [
2741
- {
2742
- "type": "stack",
2743
- "direction": "horizontal",
2744
- "gap": "md",
2745
- "align": "center",
2746
- "children": [
2747
- {
2748
- "type": "icon",
2749
- "name": "credit-card",
2750
- "size": "lg"
2751
- },
2752
- {
2753
- "type": "typography",
2754
- "content": "Payment",
2755
- "variant": "h2"
2756
- }
2757
- ]
2758
- },
2759
- {
2760
- "type": "divider"
2761
- },
2762
- {
2763
- "type": "stack",
2764
- "direction": "vertical",
2765
- "gap": "md",
2766
- "children": [
2767
- {
2768
- "type": "input",
2769
- "label": "Amount",
2770
- "field": "amount",
2771
- "inputType": "number",
2772
- "placeholder": "0.00"
2773
- },
2774
- {
2775
- "type": "select",
2776
- "label": "Currency",
2777
- "field": "currency",
2778
- "options": [
2779
- {
2780
- "label": "USD",
2781
- "value": "usd"
2782
- },
2783
- {
2784
- "label": "EUR",
2785
- "value": "eur"
2786
- },
2787
- {
2788
- "label": "GBP",
2789
- "value": "gbp"
2790
- }
2791
- ]
2792
- }
2793
- ]
2794
- },
2795
- {
2796
- "type": "button",
2797
- "label": "Pay",
2798
- "event": "CREATE_PAYMENT",
2799
- "variant": "primary",
2800
- "icon": "credit-card"
2801
- }
2802
- ]
2803
- }
2804
- ]
2805
- }
2806
- ]
2807
- ]
2808
- },
2809
- {
2810
- "from": "succeeded",
2811
- "to": "idle",
2812
- "event": "RESET",
2813
- "effects": [
2814
- [
2815
- "render-ui",
2816
- "main",
2817
- {
2818
- "type": "dashboard-layout",
2819
- "appName": "ServiceMarketplace",
2820
- "navItems": [
2821
- {
2822
- "label": "Products",
2823
- "href": "/products",
2824
- "icon": "package"
2825
- },
2826
- {
2827
- "label": "Login",
2828
- "href": "/login",
2829
- "icon": "layout-list"
2830
- },
2831
- {
2832
- "label": "Checkout",
2833
- "href": "/checkout",
2834
- "icon": "credit-card"
2835
- },
2836
- {
2837
- "label": "Orders",
2838
- "href": "/orders",
2839
- "icon": "clipboard-list"
2840
- }
2841
- ],
2842
- "children": [
2843
- {
2844
- "type": "stack",
2845
- "direction": "vertical",
2846
- "gap": "lg",
2847
- "align": "center",
2848
- "children": [
2849
- {
2850
- "type": "stack",
2851
- "direction": "horizontal",
2852
- "gap": "md",
2853
- "align": "center",
2854
- "children": [
2855
- {
2856
- "type": "icon",
2857
- "name": "credit-card",
2858
- "size": "lg"
2859
- },
2860
- {
2861
- "type": "typography",
2862
- "content": "Payment",
2863
- "variant": "h2"
2864
- }
2865
- ]
2866
- },
2867
- {
2868
- "type": "divider"
2869
- },
2870
- {
2871
- "type": "stack",
2872
- "direction": "vertical",
2873
- "gap": "md",
2874
- "children": [
2875
- {
2876
- "type": "input",
2877
- "label": "Amount",
2878
- "field": "amount",
2879
- "inputType": "number",
2880
- "placeholder": "0.00"
2881
- },
2882
- {
2883
- "type": "select",
2884
- "label": "Currency",
2885
- "field": "currency",
2886
- "options": [
2887
- {
2888
- "label": "USD",
2889
- "value": "usd"
2890
- },
2891
- {
2892
- "label": "EUR",
2893
- "value": "eur"
2894
- },
2895
- {
2896
- "label": "GBP",
2897
- "value": "gbp"
2898
- }
2899
- ]
2900
- }
2901
- ]
2902
- },
2903
- {
2904
- "type": "button",
2905
- "label": "Pay",
2906
- "event": "CREATE_PAYMENT",
2907
- "variant": "primary",
2908
- "icon": "credit-card"
2909
- }
2910
- ]
2911
- }
2912
- ]
2913
- }
2914
- ]
2915
- ]
2916
- },
2917
- {
2918
- "from": "error",
2919
- "to": "idle",
2920
- "event": "RESET",
2921
- "effects": [
2922
- [
2923
- "render-ui",
2924
- "main",
2925
- {
2926
- "type": "dashboard-layout",
2927
- "appName": "ServiceMarketplace",
2928
- "navItems": [
2929
- {
2930
- "label": "Products",
2931
- "href": "/products",
2932
- "icon": "package"
2933
- },
2934
- {
2935
- "label": "Login",
2936
- "href": "/login",
2937
- "icon": "layout-list"
2938
- },
2939
- {
2940
- "label": "Checkout",
2941
- "href": "/checkout",
2942
- "icon": "credit-card"
2943
- },
2944
- {
2945
- "label": "Orders",
2946
- "href": "/orders",
2947
- "icon": "clipboard-list"
2948
- }
2949
- ],
2950
- "children": [
2951
- {
2952
- "type": "stack",
2953
- "direction": "vertical",
2954
- "gap": "lg",
2955
- "align": "center",
2956
- "children": [
2957
- {
2958
- "type": "stack",
2959
- "direction": "horizontal",
2960
- "gap": "md",
2961
- "align": "center",
2962
- "children": [
2963
- {
2964
- "type": "icon",
2965
- "name": "credit-card",
2966
- "size": "lg"
2967
- },
2968
- {
2969
- "type": "typography",
2970
- "content": "Payment",
2971
- "variant": "h2"
2972
- }
2973
- ]
2974
- },
2975
- {
2976
- "type": "divider"
2977
- },
2978
- {
2979
- "type": "stack",
2980
- "direction": "vertical",
2981
- "gap": "md",
2982
- "children": [
2983
- {
2984
- "type": "input",
2985
- "label": "Amount",
2986
- "field": "amount",
2987
- "inputType": "number",
2988
- "placeholder": "0.00"
2989
- },
2990
- {
2991
- "type": "select",
2992
- "label": "Currency",
2993
- "field": "currency",
2994
- "options": [
2995
- {
2996
- "label": "USD",
2997
- "value": "usd"
2998
- },
2999
- {
3000
- "label": "EUR",
3001
- "value": "eur"
3002
- },
3003
- {
3004
- "label": "GBP",
3005
- "value": "gbp"
3006
- }
3007
- ]
3008
- }
3009
- ]
3010
- },
3011
- {
3012
- "type": "button",
3013
- "label": "Pay",
3014
- "event": "CREATE_PAYMENT",
3015
- "variant": "primary",
3016
- "icon": "credit-card"
3017
- }
3018
- ]
3019
- }
3020
- ]
3021
- }
3022
- ]
3023
- ]
3024
- }
3025
- ]
3026
- },
3027
- "listens": [
3028
- {
3029
- "event": "CHECKOUT",
3030
- "triggers": "INIT",
3031
- "scope": "external"
3032
- }
3033
- ]
3034
- },
3035
- {
3036
- "name": "OrderPaymentReceipt",
3037
- "linkedEntity": "OrderPayment",
3038
- "category": "interaction",
3039
- "listens": [
3040
- {
3041
- "event": "SEND_RECEIPT",
3042
- "triggers": "SEND_RECEIPT"
3043
- }
3044
- ],
3045
- "stateMachine": {
3046
- "states": [
3047
- {
3048
- "name": "waiting",
3049
- "isInitial": true
3050
- },
3051
- {
3052
- "name": "sending"
3053
- },
3054
- {
3055
- "name": "sent",
3056
- "isTerminal": true
3057
- },
3058
- {
3059
- "name": "receiptError"
3060
- }
3061
- ],
3062
- "events": [
3063
- {
3064
- "key": "INIT",
3065
- "name": "Initialize"
3066
- },
3067
- {
3068
- "key": "SEND_RECEIPT",
3069
- "name": "Send Receipt"
3070
- },
3071
- {
3072
- "key": "SENT",
3073
- "name": "Receipt Sent"
3074
- },
3075
- {
3076
- "key": "FAILED",
3077
- "name": "Send Failed",
3078
- "payload": [
3079
- {
3080
- "name": "error",
3081
- "type": "string",
3082
- "required": true
3083
- }
3084
- ]
3085
- },
3086
- {
3087
- "key": "RETRY_RECEIPT",
3088
- "name": "Retry Receipt"
3089
- }
3090
- ],
3091
- "transitions": [
3092
- {
3093
- "from": "waiting",
3094
- "to": "waiting",
3095
- "event": "INIT",
3096
- "effects": [
3097
- [
3098
- "render-ui",
3099
- "main",
3100
- {
3101
- "type": "dashboard-layout",
3102
- "appName": "ServiceMarketplace",
3103
- "navItems": [
3104
- {
3105
- "label": "Products",
3106
- "href": "/products",
3107
- "icon": "package"
3108
- },
3109
- {
3110
- "label": "Login",
3111
- "href": "/login",
3112
- "icon": "layout-list"
3113
- },
3114
- {
3115
- "label": "Checkout",
3116
- "href": "/checkout",
3117
- "icon": "credit-card"
3118
- },
3119
- {
3120
- "label": "Orders",
3121
- "href": "/orders",
3122
- "icon": "clipboard-list"
3123
- }
3124
- ],
3125
- "children": [
3126
- {
3127
- "type": "stack",
3128
- "direction": "vertical",
3129
- "gap": "md",
3130
- "align": "center",
3131
- "children": [
3132
- {
3133
- "type": "icon",
3134
- "name": "mail",
3135
- "size": "md"
3136
- },
3137
- {
3138
- "type": "typography",
3139
- "content": "Receipt will be sent after payment.",
3140
- "variant": "body",
3141
- "color": "muted"
3142
- }
3143
- ]
3144
- }
3145
- ]
3146
- }
3147
- ]
3148
- ]
3149
- },
3150
- {
3151
- "from": "waiting",
3152
- "to": "sending",
3153
- "event": "SEND_RECEIPT",
3154
- "effects": [
3155
- [
3156
- "render-ui",
3157
- "main",
3158
- {
3159
- "type": "dashboard-layout",
3160
- "appName": "ServiceMarketplace",
3161
- "navItems": [
3162
- {
3163
- "label": "Products",
3164
- "href": "/products",
3165
- "icon": "package"
3166
- },
3167
- {
3168
- "label": "Login",
3169
- "href": "/login",
3170
- "icon": "layout-list"
3171
- },
3172
- {
3173
- "label": "Checkout",
3174
- "href": "/checkout",
3175
- "icon": "credit-card"
3176
- },
3177
- {
3178
- "label": "Orders",
3179
- "href": "/orders",
3180
- "icon": "clipboard-list"
3181
- }
3182
- ],
3183
- "children": [
3184
- {
3185
- "type": "loading-state",
3186
- "title": "Sending receipt...",
3187
- "message": "Delivering your payment receipt."
3188
- }
3189
- ]
3190
- }
3191
- ],
3192
- [
3193
- "call-service",
3194
- "email",
3195
- "send",
3196
- {
3197
- "to": "@entity.to",
3198
- "subject": "@entity.subject",
3199
- "body": "@entity.body"
3200
- }
3201
- ]
3202
- ]
3203
- },
3204
- {
3205
- "from": "sending",
3206
- "to": "sent",
3207
- "event": "SENT",
3208
- "effects": [
3209
- [
3210
- "set",
3211
- "@entity.sendStatus",
3212
- "sent"
3213
- ],
3214
- [
3215
- "render-ui",
3216
- "main",
3217
- {
3218
- "type": "dashboard-layout",
3219
- "appName": "ServiceMarketplace",
3220
- "navItems": [
3221
- {
3222
- "label": "Products",
3223
- "href": "/products",
3224
- "icon": "package"
3225
- },
3226
- {
3227
- "label": "Login",
3228
- "href": "/login",
3229
- "icon": "layout-list"
3230
- },
3231
- {
3232
- "label": "Checkout",
3233
- "href": "/checkout",
3234
- "icon": "credit-card"
3235
- },
3236
- {
3237
- "label": "Orders",
3238
- "href": "/orders",
3239
- "icon": "clipboard-list"
3240
- }
3241
- ],
3242
- "children": [
3243
- {
3244
- "type": "stack",
3245
- "direction": "vertical",
3246
- "gap": "md",
3247
- "align": "center",
3248
- "children": [
3249
- {
3250
- "type": "icon",
3251
- "name": "check-circle",
3252
- "size": "md"
3253
- },
3254
- {
3255
- "type": "alert",
3256
- "variant": "success",
3257
- "message": "Receipt sent successfully"
3258
- }
3259
- ]
3260
- }
3261
- ]
3262
- }
3263
- ]
3264
- ]
3265
- },
3266
- {
3267
- "from": "sending",
3268
- "to": "receiptError",
3269
- "event": "FAILED",
3270
- "effects": [
3271
- [
3272
- "set",
3273
- "@entity.sendStatus",
3274
- "error"
3275
- ],
3276
- [
3277
- "render-ui",
3278
- "main",
3279
- {
3280
- "type": "dashboard-layout",
3281
- "appName": "ServiceMarketplace",
3282
- "navItems": [
3283
- {
3284
- "label": "Products",
3285
- "href": "/products",
3286
- "icon": "package"
3287
- },
3288
- {
3289
- "label": "Login",
3290
- "href": "/login",
3291
- "icon": "layout-list"
3292
- },
3293
- {
3294
- "label": "Checkout",
3295
- "href": "/checkout",
3296
- "icon": "credit-card"
3297
- },
3298
- {
3299
- "label": "Orders",
3300
- "href": "/orders",
3301
- "icon": "clipboard-list"
3302
- }
3303
- ],
3304
- "children": [
3305
- {
3306
- "type": "stack",
3307
- "direction": "vertical",
3308
- "gap": "md",
3309
- "align": "center",
3310
- "children": [
3311
- {
3312
- "type": "error-state",
3313
- "title": "Receipt Failed",
3314
- "message": "Could not send receipt email.",
3315
- "onRetry": "RETRY_RECEIPT"
3316
- },
3317
- {
3318
- "type": "button",
3319
- "label": "Retry",
3320
- "event": "RETRY_RECEIPT",
3321
- "variant": "primary",
3322
- "icon": "refresh-cw"
3323
- }
3324
- ]
3325
- }
3326
- ]
3327
- }
3328
- ]
3329
- ]
3330
- },
3331
- {
3332
- "from": "receiptError",
3333
- "to": "sending",
3334
- "event": "RETRY_RECEIPT",
3335
- "effects": [
3336
- [
3337
- "render-ui",
3338
- "main",
3339
- {
3340
- "type": "dashboard-layout",
3341
- "appName": "ServiceMarketplace",
3342
- "navItems": [
3343
- {
3344
- "label": "Products",
3345
- "href": "/products",
3346
- "icon": "package"
3347
- },
3348
- {
3349
- "label": "Login",
3350
- "href": "/login",
3351
- "icon": "layout-list"
3352
- },
3353
- {
3354
- "label": "Checkout",
3355
- "href": "/checkout",
3356
- "icon": "credit-card"
3357
- },
3358
- {
3359
- "label": "Orders",
3360
- "href": "/orders",
3361
- "icon": "clipboard-list"
3362
- }
3363
- ],
3364
- "children": [
3365
- {
3366
- "type": "loading-state",
3367
- "title": "Sending receipt...",
3368
- "message": "Delivering your payment receipt."
3369
- }
3370
- ]
3371
- }
3372
- ],
3373
- [
3374
- "call-service",
3375
- "email",
3376
- "send",
3377
- {
3378
- "to": "@entity.to",
3379
- "subject": "@entity.subject",
3380
- "body": "@entity.body"
3381
- }
3382
- ]
3383
- ]
3384
- }
3385
- ]
3386
- }
3387
- }
3388
- ],
3389
- "pages": [
3390
- {
3391
- "name": "CheckoutPage",
3392
- "path": "/checkout",
3393
- "traits": [
3394
- {
3395
- "ref": "OrderPaymentPayment"
3396
- },
3397
- {
3398
- "ref": "OrderPaymentReceipt"
3399
- }
3400
- ]
3401
- }
3402
- ],
3403
- "services": []
3404
- },
3405
- {
3406
- "name": "OrderOrbital",
3407
- "entity": {
3408
- "name": "Order",
3409
- "persistence": "persistent",
3410
- "collection": "orders",
3411
- "fields": [
3412
- {
3413
- "name": "id",
3414
- "type": "string",
3415
- "required": true
3416
- },
3417
- {
3418
- "name": "productName",
3419
- "type": "string",
3420
- "required": true
3421
- },
3422
- {
3423
- "name": "amount",
3424
- "type": "number",
3425
- "required": true
3426
- },
3427
- {
3428
- "name": "paymentStatus",
3429
- "type": "string",
3430
- "default": "pending"
3431
- },
3432
- {
3433
- "name": "orderDate",
3434
- "type": "string"
3435
- },
3436
- {
3437
- "name": "pendingId",
3438
- "type": "string",
3439
- "default": ""
3440
- }
3441
- ]
3442
- },
3443
- "traits": [
3444
- {
3445
- "name": "OrderBrowse",
3446
- "linkedEntity": "Order",
3447
- "category": "interaction",
3448
- "listens": [
3449
- {
3450
- "event": "ORDER_CREATED",
3451
- "triggers": "INIT"
3452
- },
3453
- {
3454
- "event": "ORDER_UPDATED",
3455
- "triggers": "INIT"
3456
- },
3457
- {
3458
- "event": "ORDER_DELETED",
3459
- "triggers": "INIT"
3460
- }
3461
- ],
3462
- "stateMachine": {
3463
- "states": [
3464
- {
3465
- "name": "browsing",
3466
- "isInitial": true
3467
- }
3468
- ],
3469
- "events": [
3470
- {
3471
- "key": "INIT",
3472
- "name": "Initialize"
3473
- },
3474
- {
3475
- "key": "CREATE",
3476
- "name": "CREATE"
3477
- },
3478
- {
3479
- "key": "VIEW",
3480
- "name": "VIEW",
3481
- "payload": [
3482
- {
3483
- "name": "id",
3484
- "type": "string",
3485
- "required": true
3486
- },
3487
- {
3488
- "name": "row",
3489
- "type": "object"
3490
- }
3491
- ]
3492
- },
3493
- {
3494
- "key": "EDIT",
3495
- "name": "EDIT",
3496
- "payload": [
3497
- {
3498
- "name": "id",
3499
- "type": "string",
3500
- "required": true
3501
- },
3502
- {
3503
- "name": "row",
3504
- "type": "object"
3505
- }
3506
- ]
3507
- },
3508
- {
3509
- "key": "DELETE",
3510
- "name": "DELETE",
3511
- "payload": [
3512
- {
3513
- "name": "id",
3514
- "type": "string",
3515
- "required": true
3516
- },
3517
- {
3518
- "name": "row",
3519
- "type": "object"
3520
- }
3521
- ]
3522
- }
3523
- ],
3524
- "transitions": [
3525
- {
3526
- "from": "browsing",
3527
- "to": "browsing",
3528
- "event": "INIT",
3529
- "effects": [
3530
- [
3531
- "ref",
3532
- "Order"
3533
- ],
3534
- [
3535
- "render-ui",
3536
- "main",
3537
- {
3538
- "type": "dashboard-layout",
3539
- "appName": "ServiceMarketplace",
3540
- "navItems": [
3541
- {
3542
- "label": "Products",
3543
- "href": "/products",
3544
- "icon": "package"
3545
- },
3546
- {
3547
- "label": "Login",
3548
- "href": "/login",
3549
- "icon": "layout-list"
3550
- },
3551
- {
3552
- "label": "Checkout",
3553
- "href": "/checkout",
3554
- "icon": "credit-card"
3555
- },
3556
- {
3557
- "label": "Orders",
3558
- "href": "/orders",
3559
- "icon": "clipboard-list"
3560
- }
3561
- ],
3562
- "children": [
3563
- {
3564
- "type": "stack",
3565
- "direction": "vertical",
3566
- "gap": "lg",
3567
- "className": "max-w-5xl mx-auto w-full",
3568
- "children": [
3569
- {
3570
- "type": "stack",
3571
- "direction": "horizontal",
3572
- "gap": "md",
3573
- "justify": "space-between",
3574
- "align": "center",
3575
- "children": [
3576
- {
3577
- "type": "stack",
3578
- "direction": "horizontal",
3579
- "gap": "sm",
3580
- "align": "center",
3581
- "children": [
3582
- {
3583
- "type": "icon",
3584
- "name": "list",
3585
- "size": "lg"
3586
- },
3587
- {
3588
- "type": "typography",
3589
- "content": "Orders",
3590
- "variant": "h2"
3591
- }
3592
- ]
3593
- },
3594
- {
3595
- "type": "stack",
3596
- "direction": "horizontal",
3597
- "gap": "sm",
3598
- "children": [
3599
- {
3600
- "type": "button",
3601
- "label": "Create Order",
3602
- "event": "CREATE",
3603
- "variant": "primary",
3604
- "icon": "plus"
3605
- }
3606
- ]
3607
- }
3608
- ]
3609
- },
3610
- {
3611
- "type": "divider"
3612
- },
3613
- {
3614
- "type": "data-grid",
3615
- "entity": "Order",
3616
- "emptyIcon": "inbox",
3617
- "emptyTitle": "No orders yet",
3618
- "emptyDescription": "Orders will appear here after checkout.",
3619
- "itemActions": [
3620
- {
3621
- "label": "View",
3622
- "event": "VIEW",
3623
- "variant": "ghost",
3624
- "size": "sm"
3625
- },
3626
- {
3627
- "label": "Edit",
3628
- "event": "EDIT",
3629
- "variant": "ghost",
3630
- "size": "sm"
3631
- },
3632
- {
3633
- "label": "Delete",
3634
- "event": "DELETE",
3635
- "variant": "danger",
3636
- "size": "sm"
3637
- }
3638
- ],
3639
- "columns": [
3640
- {
3641
- "name": "productName",
3642
- "label": "Product Name",
3643
- "variant": "h4",
3644
- "icon": "list"
3645
- },
3646
- {
3647
- "name": "amount",
3648
- "label": "Amount",
3649
- "variant": "badge",
3650
- "colorMap": {
3651
- "active": "success",
3652
- "completed": "success",
3653
- "done": "success",
3654
- "pending": "warning",
3655
- "draft": "warning",
3656
- "scheduled": "warning",
3657
- "inactive": "neutral",
3658
- "archived": "neutral",
3659
- "disabled": "neutral",
3660
- "error": "destructive",
3661
- "cancelled": "destructive",
3662
- "failed": "destructive"
3663
- }
3664
- },
3665
- {
3666
- "name": "paymentStatus",
3667
- "label": "Payment Status",
3668
- "variant": "caption"
3669
- }
3670
- ]
3671
- }
3672
- ]
3673
- }
3674
- ]
3675
- }
3676
- ]
3677
- ]
3678
- }
3679
- ]
3680
- }
3681
- },
3682
- {
3683
- "name": "OrderCreate",
3684
- "linkedEntity": "Order",
3685
- "category": "interaction",
3686
- "emits": [
3687
- {
3688
- "event": "SAVE"
3689
- },
3690
- {
3691
- "event": "ORDER_CREATED"
3692
- }
3693
- ],
3694
- "stateMachine": {
3695
- "states": [
3696
- {
3697
- "name": "closed",
3698
- "isInitial": true
3699
- },
3700
- {
3701
- "name": "open"
3702
- }
3703
- ],
3704
- "events": [
3705
- {
3706
- "key": "INIT",
3707
- "name": "Initialize"
3708
- },
3709
- {
3710
- "key": "CREATE",
3711
- "name": "Open"
3712
- },
3713
- {
3714
- "key": "CLOSE",
3715
- "name": "Close"
3716
- },
3717
- {
3718
- "key": "SAVE",
3719
- "name": "Save",
3720
- "payload": [
3721
- {
3722
- "name": "data",
3723
- "type": "object",
3724
- "required": true
3725
- }
3726
- ]
3727
- }
3728
- ],
3729
- "transitions": [
3730
- {
3731
- "from": "closed",
3732
- "to": "closed",
3733
- "event": "INIT",
3734
- "effects": [
3735
- [
3736
- "ref",
3737
- "Order"
3738
- ]
3739
- ]
3740
- },
3741
- {
3742
- "from": "closed",
3743
- "to": "open",
3744
- "event": "CREATE",
3745
- "effects": [
3746
- [
3747
- "fetch",
3748
- "Order"
3749
- ],
3750
- [
3751
- "render-ui",
3752
- "modal",
3753
- {
3754
- "type": "stack",
3755
- "direction": "vertical",
3756
- "gap": "md",
3757
- "children": [
3758
- {
3759
- "type": "stack",
3760
- "direction": "horizontal",
3761
- "gap": "sm",
3762
- "children": [
3763
- {
3764
- "type": "icon",
3765
- "name": "plus-circle",
3766
- "size": "md"
3767
- },
3768
- {
3769
- "type": "typography",
3770
- "content": "Create Order",
3771
- "variant": "h3"
3772
- }
3773
- ]
3774
- },
3775
- {
3776
- "type": "divider"
3777
- },
3778
- {
3779
- "type": "form-section",
3780
- "entity": "Order",
3781
- "mode": "create",
3782
- "submitEvent": "SAVE",
3783
- "cancelEvent": "CLOSE",
3784
- "fields": [
3785
- "productName",
3786
- "amount",
3787
- "paymentStatus",
3788
- "orderDate"
3789
- ]
3790
- }
3791
- ]
3792
- }
3793
- ]
3794
- ]
3795
- },
3796
- {
3797
- "from": "open",
3798
- "to": "closed",
3799
- "event": "CLOSE",
3800
- "effects": [
3801
- [
3802
- "render-ui",
3803
- "modal",
3804
- null
3805
- ],
3806
- [
3807
- "notify",
3808
- "Cancelled",
3809
- "info"
3810
- ]
3811
- ]
3812
- },
3813
- {
3814
- "from": "open",
3815
- "to": "closed",
3816
- "event": "SAVE",
3817
- "effects": [
3818
- [
3819
- "persist",
3820
- "create",
3821
- "Order",
3822
- "@payload.data"
3823
- ],
3824
- [
3825
- "render-ui",
3826
- "modal",
3827
- null
3828
- ],
3829
- [
3830
- "emit",
3831
- "ORDER_CREATED"
3832
- ],
3833
- [
3834
- "notify",
3835
- "Order created successfully"
3836
- ]
3837
- ]
3838
- }
3839
- ]
3840
- }
3841
- },
3842
- {
3843
- "name": "OrderEdit",
3844
- "linkedEntity": "Order",
3845
- "category": "interaction",
3846
- "emits": [
3847
- {
3848
- "event": "SAVE"
3849
- },
3850
- {
3851
- "event": "ORDER_UPDATED"
3852
- }
3853
- ],
3854
- "stateMachine": {
3855
- "states": [
3856
- {
3857
- "name": "closed",
3858
- "isInitial": true
3859
- },
3860
- {
3861
- "name": "open"
3862
- }
3863
- ],
3864
- "events": [
3865
- {
3866
- "key": "INIT",
3867
- "name": "Initialize"
3868
- },
3869
- {
3870
- "key": "EDIT",
3871
- "name": "Open",
3872
- "payload": [
3873
- {
3874
- "name": "id",
3875
- "type": "string",
3876
- "required": true
3877
- }
3878
- ]
3879
- },
3880
- {
3881
- "key": "CLOSE",
3882
- "name": "Close"
3883
- },
3884
- {
3885
- "key": "SAVE",
3886
- "name": "Save",
3887
- "payload": [
3888
- {
3889
- "name": "data",
3890
- "type": "object",
3891
- "required": true
3892
- }
3893
- ]
3894
- }
3895
- ],
3896
- "transitions": [
3897
- {
3898
- "from": "closed",
3899
- "to": "closed",
3900
- "event": "INIT",
3901
- "effects": [
3902
- [
3903
- "ref",
3904
- "Order"
3905
- ]
3906
- ]
3907
- },
3908
- {
3909
- "from": "closed",
3910
- "to": "open",
3911
- "event": "EDIT",
3912
- "effects": [
3913
- [
3914
- "fetch",
3915
- "Order",
3916
- {
3917
- "id": "@payload.id"
3918
- }
3919
- ],
3920
- [
3921
- "render-ui",
3922
- "modal",
3923
- {
3924
- "type": "stack",
3925
- "direction": "vertical",
3926
- "gap": "md",
3927
- "children": [
3928
- {
3929
- "type": "stack",
3930
- "direction": "horizontal",
3931
- "gap": "sm",
3932
- "children": [
3933
- {
3934
- "type": "icon",
3935
- "name": "edit",
3936
- "size": "md"
3937
- },
3938
- {
3939
- "type": "typography",
3940
- "content": "Edit Order",
3941
- "variant": "h3"
3942
- }
3943
- ]
3944
- },
3945
- {
3946
- "type": "divider"
3947
- },
3948
- {
3949
- "type": "form-section",
3950
- "entity": "Order",
3951
- "mode": "edit",
3952
- "submitEvent": "SAVE",
3953
- "cancelEvent": "CLOSE",
3954
- "fields": [
3955
- "productName",
3956
- "amount",
3957
- "paymentStatus",
3958
- "orderDate"
3959
- ],
3960
- "entityId": "@entity.id"
3961
- }
3962
- ]
3963
- }
3964
- ]
3965
- ]
3966
- },
3967
- {
3968
- "from": "open",
3969
- "to": "closed",
3970
- "event": "CLOSE",
3971
- "effects": [
3972
- [
3973
- "render-ui",
3974
- "modal",
3975
- null
3976
- ],
3977
- [
3978
- "notify",
3979
- "Cancelled",
3980
- "info"
3981
- ]
3982
- ]
3983
- },
3984
- {
3985
- "from": "open",
3986
- "to": "closed",
3987
- "event": "SAVE",
3988
- "effects": [
3989
- [
3990
- "persist",
3991
- "update",
3992
- "Order",
3993
- "@payload.data"
3994
- ],
3995
- [
3996
- "render-ui",
3997
- "modal",
3998
- null
3999
- ],
4000
- [
4001
- "emit",
4002
- "ORDER_UPDATED"
4003
- ],
4004
- [
4005
- "notify",
4006
- "Order updated successfully"
4007
- ]
4008
- ]
4009
- }
4010
- ]
4011
- }
4012
- },
4013
- {
4014
- "name": "OrderView",
4015
- "linkedEntity": "Order",
4016
- "category": "interaction",
4017
- "emits": [
4018
- {
4019
- "event": "SAVE"
4020
- }
4021
- ],
4022
- "stateMachine": {
4023
- "states": [
4024
- {
4025
- "name": "closed",
4026
- "isInitial": true
4027
- },
4028
- {
4029
- "name": "open"
4030
- }
4031
- ],
4032
- "events": [
4033
- {
4034
- "key": "INIT",
4035
- "name": "Initialize"
4036
- },
4037
- {
4038
- "key": "VIEW",
4039
- "name": "Open",
4040
- "payload": [
4041
- {
4042
- "name": "id",
4043
- "type": "string",
4044
- "required": true
4045
- }
4046
- ]
4047
- },
4048
- {
4049
- "key": "CLOSE",
4050
- "name": "Close"
4051
- },
4052
- {
4053
- "key": "SAVE",
4054
- "name": "Save",
4055
- "payload": [
4056
- {
4057
- "name": "data",
4058
- "type": "object",
4059
- "required": true
4060
- }
4061
- ]
4062
- }
4063
- ],
4064
- "transitions": [
4065
- {
4066
- "from": "closed",
4067
- "to": "closed",
4068
- "event": "INIT",
4069
- "effects": [
4070
- [
4071
- "ref",
4072
- "Order"
4073
- ]
4074
- ]
4075
- },
4076
- {
4077
- "from": "closed",
4078
- "to": "open",
4079
- "event": "VIEW",
4080
- "effects": [
4081
- [
4082
- "fetch",
4083
- "Order",
4084
- {
4085
- "id": "@payload.id"
4086
- }
4087
- ],
4088
- [
4089
- "render-ui",
4090
- "modal",
4091
- {
4092
- "type": "stack",
4093
- "direction": "vertical",
4094
- "gap": "md",
4095
- "children": [
4096
- {
4097
- "type": "stack",
4098
- "direction": "horizontal",
4099
- "gap": "sm",
4100
- "align": "center",
4101
- "children": [
4102
- {
4103
- "type": "icon",
4104
- "name": "eye",
4105
- "size": "md"
4106
- },
4107
- {
4108
- "type": "typography",
4109
- "variant": "h3",
4110
- "content": "@entity.productName"
4111
- }
4112
- ]
4113
- },
4114
- {
4115
- "type": "divider"
4116
- },
4117
- {
4118
- "type": "stack",
4119
- "direction": "horizontal",
4120
- "gap": "md",
4121
- "children": [
4122
- {
4123
- "type": "typography",
4124
- "variant": "caption",
4125
- "content": "Product Name"
4126
- },
4127
- {
4128
- "type": "typography",
4129
- "variant": "body",
4130
- "content": "@entity.productName"
4131
- }
4132
- ]
4133
- },
4134
- {
4135
- "type": "stack",
4136
- "direction": "horizontal",
4137
- "gap": "md",
4138
- "children": [
4139
- {
4140
- "type": "typography",
4141
- "variant": "caption",
4142
- "content": "Amount"
4143
- },
4144
- {
4145
- "type": "typography",
4146
- "variant": "body",
4147
- "content": "@entity.amount"
4148
- }
4149
- ]
4150
- },
4151
- {
4152
- "type": "stack",
4153
- "direction": "horizontal",
4154
- "gap": "md",
4155
- "children": [
4156
- {
4157
- "type": "typography",
4158
- "variant": "caption",
4159
- "content": "Payment Status"
4160
- },
4161
- {
4162
- "type": "typography",
4163
- "variant": "body",
4164
- "content": "@entity.paymentStatus"
4165
- }
4166
- ]
4167
- },
4168
- {
4169
- "type": "stack",
4170
- "direction": "horizontal",
4171
- "gap": "md",
4172
- "children": [
4173
- {
4174
- "type": "typography",
4175
- "variant": "caption",
4176
- "content": "Order Date"
4177
- },
4178
- {
4179
- "type": "typography",
4180
- "variant": "body",
4181
- "content": "@entity.orderDate"
4182
- }
4183
- ]
4184
- },
4185
- {
4186
- "type": "divider"
4187
- },
4188
- {
4189
- "type": "stack",
4190
- "direction": "horizontal",
4191
- "gap": "sm",
4192
- "justify": "end",
4193
- "children": [
4194
- {
4195
- "type": "button",
4196
- "label": "Edit",
4197
- "event": "EDIT",
4198
- "variant": "primary",
4199
- "icon": "edit"
4200
- },
4201
- {
4202
- "type": "button",
4203
- "label": "Close",
4204
- "event": "CLOSE",
4205
- "variant": "ghost"
4206
- }
4207
- ]
4208
- }
4209
- ]
4210
- }
4211
- ]
4212
- ]
4213
- },
4214
- {
4215
- "from": "open",
4216
- "to": "closed",
4217
- "event": "CLOSE",
4218
- "effects": [
4219
- [
4220
- "render-ui",
4221
- "modal",
4222
- null
4223
- ],
4224
- [
4225
- "notify",
4226
- "Cancelled",
4227
- "info"
4228
- ]
4229
- ]
4230
- },
4231
- {
4232
- "from": "open",
4233
- "to": "closed",
4234
- "event": "SAVE",
4235
- "effects": [
4236
- [
4237
- "render-ui",
4238
- "modal",
4239
- null
4240
- ]
4241
- ]
4242
- }
4243
- ]
4244
- }
4245
- },
4246
- {
4247
- "name": "OrderDelete",
4248
- "linkedEntity": "Order",
4249
- "category": "interaction",
4250
- "emits": [
4251
- {
4252
- "event": "CONFIRM_DELETE"
4253
- },
4254
- {
4255
- "event": "ORDER_DELETED"
4256
- }
4257
- ],
4258
- "stateMachine": {
4259
- "states": [
4260
- {
4261
- "name": "idle",
4262
- "isInitial": true
4263
- },
4264
- {
4265
- "name": "confirming"
4266
- }
4267
- ],
4268
- "events": [
4269
- {
4270
- "key": "INIT",
4271
- "name": "Initialize"
4272
- },
4273
- {
4274
- "key": "DELETE",
4275
- "name": "Request Confirmation",
4276
- "payload": [
4277
- {
4278
- "name": "id",
4279
- "type": "string",
4280
- "required": true
4281
- }
4282
- ]
4283
- },
4284
- {
4285
- "key": "CONFIRM_DELETE",
4286
- "name": "Confirm"
4287
- },
4288
- {
4289
- "key": "CANCEL",
4290
- "name": "Cancel"
4291
- },
4292
- {
4293
- "key": "CLOSE",
4294
- "name": "Close"
4295
- }
4296
- ],
4297
- "transitions": [
4298
- {
4299
- "from": "idle",
4300
- "to": "idle",
4301
- "event": "INIT",
4302
- "effects": [
4303
- [
4304
- "ref",
4305
- "Order"
4306
- ]
4307
- ]
4308
- },
4309
- {
4310
- "from": "idle",
4311
- "to": "confirming",
4312
- "event": "DELETE",
4313
- "effects": [
4314
- [
4315
- "set",
4316
- "@entity.pendingId",
4317
- "@payload.id"
4318
- ],
4319
- [
4320
- "fetch",
4321
- "Order",
4322
- {
4323
- "id": "@payload.id"
4324
- }
4325
- ],
4326
- [
4327
- "render-ui",
4328
- "modal",
4329
- {
4330
- "type": "stack",
4331
- "direction": "vertical",
4332
- "gap": "md",
4333
- "children": [
4334
- {
4335
- "type": "stack",
4336
- "direction": "horizontal",
4337
- "gap": "sm",
4338
- "align": "center",
4339
- "children": [
4340
- {
4341
- "type": "icon",
4342
- "name": "alert-triangle",
4343
- "size": "md"
4344
- },
4345
- {
4346
- "type": "typography",
4347
- "content": "Delete Order",
4348
- "variant": "h3"
4349
- }
4350
- ]
4351
- },
4352
- {
4353
- "type": "divider"
4354
- },
4355
- {
4356
- "type": "alert",
4357
- "variant": "danger",
4358
- "message": "This action cannot be undone."
4359
- },
4360
- {
4361
- "type": "stack",
4362
- "direction": "horizontal",
4363
- "gap": "sm",
4364
- "justify": "end",
4365
- "children": [
4366
- {
4367
- "type": "button",
4368
- "label": "Cancel",
4369
- "event": "CANCEL",
4370
- "variant": "ghost"
4371
- },
4372
- {
4373
- "type": "button",
4374
- "label": "Delete",
4375
- "event": "CONFIRM_DELETE",
4376
- "variant": "danger",
4377
- "icon": "check"
4378
- }
4379
- ]
4380
- }
4381
- ]
4382
- }
4383
- ]
4384
- ]
4385
- },
4386
- {
4387
- "from": "confirming",
4388
- "to": "idle",
4389
- "event": "CONFIRM_DELETE",
4390
- "effects": [
4391
- [
4392
- "persist",
4393
- "delete",
4394
- "Order",
4395
- "@entity.pendingId"
4396
- ],
4397
- [
4398
- "render-ui",
4399
- "modal",
4400
- null
4401
- ],
4402
- [
4403
- "ref",
4404
- "Order"
4405
- ],
4406
- [
4407
- "emit",
4408
- "ORDER_DELETED"
4409
- ],
4410
- [
4411
- "notify",
4412
- "Order deleted successfully"
4413
- ]
4414
- ]
4415
- },
4416
- {
4417
- "from": "confirming",
4418
- "to": "idle",
4419
- "event": "CANCEL",
4420
- "effects": [
4421
- [
4422
- "render-ui",
4423
- "modal",
4424
- null
4425
- ],
4426
- [
4427
- "ref",
4428
- "Order"
4429
- ]
4430
- ]
4431
- },
4432
- {
4433
- "from": "confirming",
4434
- "to": "idle",
4435
- "event": "CLOSE",
4436
- "effects": [
4437
- [
4438
- "render-ui",
4439
- "modal",
4440
- null
4441
- ],
4442
- [
4443
- "ref",
4444
- "Order"
4445
- ]
4446
- ]
4447
- }
4448
- ]
4449
- }
4450
- }
4451
- ],
4452
- "pages": [
4453
- {
4454
- "name": "OrdersPage",
4455
- "path": "/orders",
4456
- "traits": [
4457
- {
4458
- "ref": "OrderBrowse"
4459
- },
4460
- {
4461
- "ref": "OrderCreate"
4462
- },
4463
- {
4464
- "ref": "OrderEdit"
4465
- },
4466
- {
4467
- "ref": "OrderView"
4468
- },
4469
- {
4470
- "ref": "OrderDelete"
4471
- }
4472
- ]
4473
- }
4474
- ],
4475
- "services": []
4476
- }
4477
- ],
4478
- "description": "Service marketplace organism. Composes molecules and atoms via compose: - stdList(Product): product catalog with CRUD - stdServiceOauth(AuthSession): OAuth login with standalone provider picker - stdServicePaymentFlow(OrderPayment): Stripe payment + email receipt - stdList(Order): order history with CRUD Cross-orbital connections: - CHECKOUT: ProductBrowse -> OrderPaymentPayment (2026-04-08). The canonical source for std behaviors is now the registry `.orb` file at `packages/almadar-std/behaviors/registry/<level>/<name>.orb`, which is generated from this TS source by `tools/almadar-behavior-ts-to-orb/` and consumed by the compiler's embedded loader. Consumers should import behaviors via `.lolo`/`.orb` `uses` declarations and reference them as `Alias.entity` / `Alias.traits.X` / `Alias.pages.X`, applying overrides at the call site (`linkedEntity`, `name`, `events`, `effects`, `listens`, `emitsScope`). The TS `*Params` interface and the exported factory functions remain ONLY as the authoring path for the converter; they are NOT a stable public API and may change without notice. See `docs/Almadar_Orb_Behaviors.md` for the orbital-as-function model and `docs/LOLO_Gaps.md` for the migration plan."
4479
- }