@almadar/std 3.2.3 → 3.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/LICENSE +72 -21
  2. package/README.md +1 -1
  3. package/behaviors/exports/atoms/std-combat-log.orb +12 -12
  4. package/behaviors/exports/atoms/std-dialogue-box.orb +11 -11
  5. package/behaviors/exports/atoms/std-game-audio.orb +9 -9
  6. package/behaviors/exports/atoms/std-game-canvas3d.orb +24 -24
  7. package/behaviors/exports/atoms/std-game-hud.orb +10 -10
  8. package/behaviors/exports/atoms/std-game-menu.orb +12 -12
  9. package/behaviors/exports/atoms/std-game-over-screen.orb +9 -9
  10. package/behaviors/exports/atoms/std-inventory-panel.orb +13 -13
  11. package/behaviors/exports/atoms/std-isometric-canvas.orb +9 -9
  12. package/behaviors/exports/atoms/std-platformer-canvas.orb +9 -9
  13. package/behaviors/exports/atoms/std-score-board.orb +9 -9
  14. package/behaviors/exports/atoms/std-selection.orb +32 -18
  15. package/behaviors/exports/atoms/std-service-custom-bearer.orb +557 -0
  16. package/behaviors/exports/atoms/std-service-custom-header.orb +559 -0
  17. package/behaviors/exports/atoms/std-service-custom-noauth.orb +553 -0
  18. package/behaviors/exports/atoms/std-service-custom-query.orb +559 -0
  19. package/behaviors/exports/atoms/std-service-email.orb +540 -0
  20. package/behaviors/exports/atoms/std-service-github.orb +586 -0
  21. package/behaviors/exports/atoms/std-service-llm.orb +671 -0
  22. package/behaviors/exports/atoms/std-service-oauth.orb +764 -0
  23. package/behaviors/exports/atoms/std-service-redis.orb +580 -0
  24. package/behaviors/exports/atoms/std-service-storage.orb +664 -0
  25. package/behaviors/exports/atoms/std-service-stripe.orb +639 -0
  26. package/behaviors/exports/atoms/std-service-twilio.orb +611 -0
  27. package/behaviors/exports/atoms/std-service-youtube.orb +696 -0
  28. package/behaviors/exports/atoms/std-simulation-canvas.orb +9 -9
  29. package/behaviors/exports/atoms/std-sprite.orb +17 -17
  30. package/behaviors/exports/atoms/std-validate-on-save.orb +623 -0
  31. package/behaviors/exports/molecules/std-quiz.orb +48 -24
  32. package/behaviors/exports/molecules/std-service-content-pipeline.orb +915 -0
  33. package/behaviors/exports/molecules/std-service-custom-api-tester.orb +860 -0
  34. package/behaviors/exports/molecules/std-service-devops-toolkit.orb +1526 -0
  35. package/behaviors/exports/molecules/std-service-notification-hub.orb +696 -0
  36. package/behaviors/exports/molecules/std-service-payment-flow.orb +873 -0
  37. package/behaviors/exports/organisms/std-service-marketplace.orb +5191 -0
  38. package/behaviors/exports/organisms/std-service-research-assistant.orb +3568 -0
  39. package/behaviors/exports/test-schemas/os-trigger-simulation.orb +202 -0
  40. package/behaviors/exports/validation-report.json +2 -2
  41. package/dist/behaviors/exports/atoms/std-combat-log.orb +12 -12
  42. package/dist/behaviors/exports/atoms/std-dialogue-box.orb +11 -11
  43. package/dist/behaviors/exports/atoms/std-game-audio.orb +9 -9
  44. package/dist/behaviors/exports/atoms/std-game-canvas3d.orb +24 -24
  45. package/dist/behaviors/exports/atoms/std-game-hud.orb +10 -10
  46. package/dist/behaviors/exports/atoms/std-game-menu.orb +12 -12
  47. package/dist/behaviors/exports/atoms/std-game-over-screen.orb +9 -9
  48. package/dist/behaviors/exports/atoms/std-inventory-panel.orb +13 -13
  49. package/dist/behaviors/exports/atoms/std-isometric-canvas.orb +9 -9
  50. package/dist/behaviors/exports/atoms/std-platformer-canvas.orb +9 -9
  51. package/dist/behaviors/exports/atoms/std-score-board.orb +9 -9
  52. package/dist/behaviors/exports/atoms/std-selection.orb +32 -18
  53. package/dist/behaviors/exports/atoms/std-service-custom-bearer.orb +557 -0
  54. package/dist/behaviors/exports/atoms/std-service-custom-header.orb +559 -0
  55. package/dist/behaviors/exports/atoms/std-service-custom-noauth.orb +553 -0
  56. package/dist/behaviors/exports/atoms/std-service-custom-query.orb +559 -0
  57. package/dist/behaviors/exports/atoms/std-service-email.orb +540 -0
  58. package/dist/behaviors/exports/atoms/std-service-github.orb +586 -0
  59. package/dist/behaviors/exports/atoms/std-service-llm.orb +671 -0
  60. package/dist/behaviors/exports/atoms/std-service-oauth.orb +764 -0
  61. package/dist/behaviors/exports/atoms/std-service-redis.orb +580 -0
  62. package/dist/behaviors/exports/atoms/std-service-storage.orb +664 -0
  63. package/dist/behaviors/exports/atoms/std-service-stripe.orb +639 -0
  64. package/dist/behaviors/exports/atoms/std-service-twilio.orb +611 -0
  65. package/dist/behaviors/exports/atoms/std-service-youtube.orb +696 -0
  66. package/dist/behaviors/exports/atoms/std-simulation-canvas.orb +9 -9
  67. package/dist/behaviors/exports/atoms/std-sprite.orb +17 -17
  68. package/dist/behaviors/exports/atoms/std-validate-on-save.orb +623 -0
  69. package/dist/behaviors/exports/molecules/std-quiz.orb +48 -24
  70. package/dist/behaviors/exports/molecules/std-service-content-pipeline.orb +915 -0
  71. package/dist/behaviors/exports/molecules/std-service-custom-api-tester.orb +860 -0
  72. package/dist/behaviors/exports/molecules/std-service-devops-toolkit.orb +1526 -0
  73. package/dist/behaviors/exports/molecules/std-service-notification-hub.orb +696 -0
  74. package/dist/behaviors/exports/molecules/std-service-payment-flow.orb +873 -0
  75. package/dist/behaviors/exports/organisms/std-service-marketplace.orb +5191 -0
  76. package/dist/behaviors/exports/organisms/std-service-research-assistant.orb +3568 -0
  77. package/dist/behaviors/exports/test-schemas/os-trigger-simulation.orb +202 -0
  78. package/dist/behaviors/exports/validation-report.json +2 -2
  79. package/dist/behaviors/functions/index.d.ts +662 -1
  80. package/dist/behaviors/functions/index.js +7638 -2117
  81. package/dist/behaviors/functions/index.js.map +1 -1
  82. package/dist/behaviors/index.d.ts +1 -1
  83. package/dist/behaviors/index.js +7638 -2117
  84. package/dist/behaviors/index.js.map +1 -1
  85. package/dist/exports/atoms/std-combat-log.orb +12 -12
  86. package/dist/exports/atoms/std-dialogue-box.orb +11 -11
  87. package/dist/exports/atoms/std-game-audio.orb +9 -9
  88. package/dist/exports/atoms/std-game-canvas3d.orb +24 -24
  89. package/dist/exports/atoms/std-game-hud.orb +10 -10
  90. package/dist/exports/atoms/std-game-menu.orb +12 -12
  91. package/dist/exports/atoms/std-game-over-screen.orb +9 -9
  92. package/dist/exports/atoms/std-inventory-panel.orb +13 -13
  93. package/dist/exports/atoms/std-isometric-canvas.orb +9 -9
  94. package/dist/exports/atoms/std-platformer-canvas.orb +9 -9
  95. package/dist/exports/atoms/std-score-board.orb +9 -9
  96. package/dist/exports/atoms/std-selection.orb +32 -18
  97. package/dist/exports/atoms/std-service-custom-bearer.orb +557 -0
  98. package/dist/exports/atoms/std-service-custom-header.orb +559 -0
  99. package/dist/exports/atoms/std-service-custom-noauth.orb +553 -0
  100. package/dist/exports/atoms/std-service-custom-query.orb +559 -0
  101. package/dist/exports/atoms/std-service-email.orb +540 -0
  102. package/dist/exports/atoms/std-service-github.orb +586 -0
  103. package/dist/exports/atoms/std-service-llm.orb +671 -0
  104. package/dist/exports/atoms/std-service-oauth.orb +764 -0
  105. package/dist/exports/atoms/std-service-redis.orb +580 -0
  106. package/dist/exports/atoms/std-service-storage.orb +664 -0
  107. package/dist/exports/atoms/std-service-stripe.orb +639 -0
  108. package/dist/exports/atoms/std-service-twilio.orb +611 -0
  109. package/dist/exports/atoms/std-service-youtube.orb +696 -0
  110. package/dist/exports/atoms/std-simulation-canvas.orb +9 -9
  111. package/dist/exports/atoms/std-sprite.orb +17 -17
  112. package/dist/exports/atoms/std-validate-on-save.orb +623 -0
  113. package/dist/exports/molecules/std-quiz.orb +48 -24
  114. package/dist/exports/molecules/std-service-content-pipeline.orb +915 -0
  115. package/dist/exports/molecules/std-service-custom-api-tester.orb +860 -0
  116. package/dist/exports/molecules/std-service-devops-toolkit.orb +1526 -0
  117. package/dist/exports/molecules/std-service-notification-hub.orb +696 -0
  118. package/dist/exports/molecules/std-service-payment-flow.orb +873 -0
  119. package/dist/exports/organisms/std-service-marketplace.orb +5191 -0
  120. package/dist/exports/organisms/std-service-research-assistant.orb +3568 -0
  121. package/dist/exports/test-schemas/os-trigger-simulation.orb +202 -0
  122. package/dist/exports/validation-report.json +2 -2
  123. package/dist/index.d.ts +3 -3
  124. package/dist/index.js +7887 -2216
  125. package/dist/index.js.map +1 -1
  126. package/dist/modules/array.d.ts +1 -1
  127. package/dist/modules/async.d.ts +1 -1
  128. package/dist/modules/contract.d.ts +22 -0
  129. package/dist/modules/contract.js +100 -0
  130. package/dist/modules/contract.js.map +1 -0
  131. package/dist/modules/data.d.ts +22 -0
  132. package/dist/modules/data.js +117 -0
  133. package/dist/modules/data.js.map +1 -0
  134. package/dist/modules/format.d.ts +1 -1
  135. package/dist/modules/graph.d.ts +23 -0
  136. package/dist/modules/graph.js +209 -0
  137. package/dist/modules/graph.js.map +1 -0
  138. package/dist/modules/index.d.ts +5 -1
  139. package/dist/modules/index.js +593 -63
  140. package/dist/modules/index.js.map +1 -1
  141. package/dist/modules/math.d.ts +1 -1
  142. package/dist/modules/nn.d.ts +1 -1
  143. package/dist/modules/nn.js +14 -14
  144. package/dist/modules/nn.js.map +1 -1
  145. package/dist/modules/object.d.ts +1 -1
  146. package/dist/modules/os.d.ts +19 -0
  147. package/dist/modules/os.js +116 -0
  148. package/dist/modules/os.js.map +1 -0
  149. package/dist/modules/prob.d.ts +1 -1
  150. package/dist/modules/str.d.ts +1 -1
  151. package/dist/modules/tensor.d.ts +1 -1
  152. package/dist/modules/tensor.js +29 -29
  153. package/dist/modules/tensor.js.map +1 -1
  154. package/dist/modules/time.d.ts +1 -1
  155. package/dist/modules/train.d.ts +1 -1
  156. package/dist/modules/train.js +19 -19
  157. package/dist/modules/train.js.map +1 -1
  158. package/dist/modules/validate.d.ts +1 -1
  159. package/dist/registry.d.ts +2 -2
  160. package/dist/registry.js +184 -65
  161. package/dist/registry.js.map +1 -1
  162. package/dist/{types-CmNM_IbV.d.ts → types-DOeGXRCm.d.ts} +3 -3
  163. package/package.json +4 -4
@@ -0,0 +1,696 @@
1
+ {
2
+ "name": "ServiceNotificationHubOrbital",
3
+ "orbitals": [
4
+ {
5
+ "name": "ServiceNotificationHubOrbital",
6
+ "entity": {
7
+ "name": "ServiceNotificationHub",
8
+ "persistence": "runtime",
9
+ "fields": [
10
+ {
11
+ "name": "id",
12
+ "type": "string"
13
+ },
14
+ {
15
+ "name": "name",
16
+ "type": "string"
17
+ },
18
+ {
19
+ "name": "description",
20
+ "type": "string"
21
+ },
22
+ {
23
+ "name": "status",
24
+ "type": "string",
25
+ "default": "active",
26
+ "values": [
27
+ "active",
28
+ "inactive",
29
+ "pending"
30
+ ]
31
+ },
32
+ {
33
+ "name": "createdAt",
34
+ "type": "string"
35
+ },
36
+ {
37
+ "name": "recipient",
38
+ "type": "string"
39
+ },
40
+ {
41
+ "name": "subject",
42
+ "type": "string"
43
+ },
44
+ {
45
+ "name": "messageBody",
46
+ "type": "string"
47
+ },
48
+ {
49
+ "name": "channel",
50
+ "type": "string",
51
+ "default": "email"
52
+ },
53
+ {
54
+ "name": "sendStatus",
55
+ "type": "string",
56
+ "default": "idle"
57
+ },
58
+ {
59
+ "name": "error",
60
+ "type": "string"
61
+ }
62
+ ]
63
+ },
64
+ "traits": [
65
+ {
66
+ "name": "ServiceNotificationHubNotificationHub",
67
+ "linkedEntity": "ServiceNotificationHub",
68
+ "category": "interaction",
69
+ "stateMachine": {
70
+ "states": [
71
+ {
72
+ "name": "idle",
73
+ "isInitial": true
74
+ },
75
+ {
76
+ "name": "sending"
77
+ },
78
+ {
79
+ "name": "sent"
80
+ },
81
+ {
82
+ "name": "error"
83
+ }
84
+ ],
85
+ "events": [
86
+ {
87
+ "key": "INIT",
88
+ "name": "Initialize"
89
+ },
90
+ {
91
+ "key": "SEND_EMAIL",
92
+ "name": "Send Email"
93
+ },
94
+ {
95
+ "key": "SEND_SMS",
96
+ "name": "Send SMS"
97
+ },
98
+ {
99
+ "key": "SEND_WHATSAPP",
100
+ "name": "Send WhatsApp"
101
+ },
102
+ {
103
+ "key": "SENT",
104
+ "name": "Notification Sent"
105
+ },
106
+ {
107
+ "key": "FAILED",
108
+ "name": "Send Failed",
109
+ "payload": [
110
+ {
111
+ "name": "error",
112
+ "type": "string",
113
+ "required": true
114
+ }
115
+ ]
116
+ },
117
+ {
118
+ "key": "RETRY",
119
+ "name": "Retry"
120
+ },
121
+ {
122
+ "key": "RESET",
123
+ "name": "Reset"
124
+ }
125
+ ],
126
+ "transitions": [
127
+ {
128
+ "from": "idle",
129
+ "to": "idle",
130
+ "event": "INIT",
131
+ "effects": [
132
+ [
133
+ "fetch",
134
+ "ServiceNotificationHub"
135
+ ],
136
+ [
137
+ "render-ui",
138
+ "main",
139
+ {
140
+ "type": "stack",
141
+ "direction": "vertical",
142
+ "gap": "lg",
143
+ "align": "stretch",
144
+ "children": [
145
+ {
146
+ "type": "stack",
147
+ "direction": "horizontal",
148
+ "gap": "md",
149
+ "align": "center",
150
+ "children": [
151
+ {
152
+ "type": "icon",
153
+ "name": "bell",
154
+ "size": "lg"
155
+ },
156
+ {
157
+ "type": "typography",
158
+ "content": "ServiceNotificationHub Notification Hub",
159
+ "variant": "h2"
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ "type": "divider"
165
+ },
166
+ {
167
+ "type": "input",
168
+ "label": "Recipient",
169
+ "bind": "@entity.recipient",
170
+ "placeholder": "Email or phone number"
171
+ },
172
+ {
173
+ "type": "input",
174
+ "label": "Subject",
175
+ "bind": "@entity.subject",
176
+ "placeholder": "Notification subject"
177
+ },
178
+ {
179
+ "type": "textarea",
180
+ "label": "Message",
181
+ "bind": "@entity.messageBody",
182
+ "placeholder": "Write your message..."
183
+ },
184
+ {
185
+ "type": "stack",
186
+ "direction": "horizontal",
187
+ "gap": "sm",
188
+ "justify": "center",
189
+ "children": [
190
+ {
191
+ "type": "button",
192
+ "label": "Email",
193
+ "event": "SEND_EMAIL",
194
+ "variant": "primary",
195
+ "icon": "mail"
196
+ },
197
+ {
198
+ "type": "button",
199
+ "label": "SMS",
200
+ "event": "SEND_SMS",
201
+ "variant": "secondary",
202
+ "icon": "message-circle"
203
+ },
204
+ {
205
+ "type": "button",
206
+ "label": "WhatsApp",
207
+ "event": "SEND_WHATSAPP",
208
+ "variant": "secondary",
209
+ "icon": "phone"
210
+ }
211
+ ]
212
+ }
213
+ ]
214
+ }
215
+ ]
216
+ ]
217
+ },
218
+ {
219
+ "from": "idle",
220
+ "to": "sending",
221
+ "event": "SEND_EMAIL",
222
+ "effects": [
223
+ [
224
+ "set",
225
+ "@entity.channel",
226
+ "email"
227
+ ],
228
+ [
229
+ "render-ui",
230
+ "main",
231
+ {
232
+ "type": "loading-state",
233
+ "title": "Sending notification...",
234
+ "message": "Delivering servicenotificationhub notification..."
235
+ }
236
+ ],
237
+ [
238
+ "call-service",
239
+ "email",
240
+ "send",
241
+ {
242
+ "to": "@entity.recipient",
243
+ "subject": "@entity.subject",
244
+ "body": "@entity.messageBody"
245
+ }
246
+ ]
247
+ ]
248
+ },
249
+ {
250
+ "from": "idle",
251
+ "to": "sending",
252
+ "event": "SEND_SMS",
253
+ "effects": [
254
+ [
255
+ "set",
256
+ "@entity.channel",
257
+ "sms"
258
+ ],
259
+ [
260
+ "render-ui",
261
+ "main",
262
+ {
263
+ "type": "loading-state",
264
+ "title": "Sending notification...",
265
+ "message": "Delivering servicenotificationhub notification..."
266
+ }
267
+ ],
268
+ [
269
+ "call-service",
270
+ "twilio",
271
+ "sendSMS",
272
+ {
273
+ "to": "@entity.recipient",
274
+ "body": "@entity.messageBody"
275
+ }
276
+ ]
277
+ ]
278
+ },
279
+ {
280
+ "from": "idle",
281
+ "to": "sending",
282
+ "event": "SEND_WHATSAPP",
283
+ "effects": [
284
+ [
285
+ "set",
286
+ "@entity.channel",
287
+ "whatsapp"
288
+ ],
289
+ [
290
+ "render-ui",
291
+ "main",
292
+ {
293
+ "type": "loading-state",
294
+ "title": "Sending notification...",
295
+ "message": "Delivering servicenotificationhub notification..."
296
+ }
297
+ ],
298
+ [
299
+ "call-service",
300
+ "twilio",
301
+ "sendWhatsApp",
302
+ {
303
+ "to": "@entity.recipient",
304
+ "body": "@entity.messageBody"
305
+ }
306
+ ]
307
+ ]
308
+ },
309
+ {
310
+ "from": "sending",
311
+ "to": "sent",
312
+ "event": "SENT",
313
+ "effects": [
314
+ [
315
+ "set",
316
+ "@entity.sendStatus",
317
+ "sent"
318
+ ],
319
+ [
320
+ "render-ui",
321
+ "main",
322
+ {
323
+ "type": "stack",
324
+ "direction": "vertical",
325
+ "gap": "lg",
326
+ "align": "center",
327
+ "children": [
328
+ {
329
+ "type": "icon",
330
+ "name": "check-circle",
331
+ "size": "lg"
332
+ },
333
+ {
334
+ "type": "alert",
335
+ "variant": "success",
336
+ "message": "Notification sent successfully"
337
+ },
338
+ {
339
+ "type": "button",
340
+ "label": "Send Another",
341
+ "event": "RESET",
342
+ "variant": "ghost",
343
+ "icon": "rotate-ccw"
344
+ }
345
+ ]
346
+ }
347
+ ]
348
+ ]
349
+ },
350
+ {
351
+ "from": "sending",
352
+ "to": "error",
353
+ "event": "FAILED",
354
+ "effects": [
355
+ [
356
+ "set",
357
+ "@entity.sendStatus",
358
+ "error"
359
+ ],
360
+ [
361
+ "set",
362
+ "@entity.error",
363
+ "@payload.error"
364
+ ],
365
+ [
366
+ "render-ui",
367
+ "main",
368
+ {
369
+ "type": "stack",
370
+ "direction": "vertical",
371
+ "gap": "lg",
372
+ "align": "center",
373
+ "children": [
374
+ {
375
+ "type": "error-state",
376
+ "title": "Send Failed",
377
+ "message": "Could not deliver the notification.",
378
+ "onRetry": "RETRY"
379
+ },
380
+ {
381
+ "type": "stack",
382
+ "direction": "horizontal",
383
+ "gap": "sm",
384
+ "justify": "center",
385
+ "children": [
386
+ {
387
+ "type": "button",
388
+ "label": "Retry",
389
+ "event": "RETRY",
390
+ "variant": "primary",
391
+ "icon": "refresh-cw"
392
+ },
393
+ {
394
+ "type": "button",
395
+ "label": "Reset",
396
+ "event": "RESET",
397
+ "variant": "ghost",
398
+ "icon": "rotate-ccw"
399
+ }
400
+ ]
401
+ }
402
+ ]
403
+ }
404
+ ]
405
+ ]
406
+ },
407
+ {
408
+ "from": "error",
409
+ "to": "idle",
410
+ "event": "RETRY",
411
+ "effects": [
412
+ [
413
+ "render-ui",
414
+ "main",
415
+ {
416
+ "type": "stack",
417
+ "direction": "vertical",
418
+ "gap": "lg",
419
+ "align": "stretch",
420
+ "children": [
421
+ {
422
+ "type": "stack",
423
+ "direction": "horizontal",
424
+ "gap": "md",
425
+ "align": "center",
426
+ "children": [
427
+ {
428
+ "type": "icon",
429
+ "name": "bell",
430
+ "size": "lg"
431
+ },
432
+ {
433
+ "type": "typography",
434
+ "content": "ServiceNotificationHub Notification Hub",
435
+ "variant": "h2"
436
+ }
437
+ ]
438
+ },
439
+ {
440
+ "type": "divider"
441
+ },
442
+ {
443
+ "type": "input",
444
+ "label": "Recipient",
445
+ "bind": "@entity.recipient",
446
+ "placeholder": "Email or phone number"
447
+ },
448
+ {
449
+ "type": "input",
450
+ "label": "Subject",
451
+ "bind": "@entity.subject",
452
+ "placeholder": "Notification subject"
453
+ },
454
+ {
455
+ "type": "textarea",
456
+ "label": "Message",
457
+ "bind": "@entity.messageBody",
458
+ "placeholder": "Write your message..."
459
+ },
460
+ {
461
+ "type": "stack",
462
+ "direction": "horizontal",
463
+ "gap": "sm",
464
+ "justify": "center",
465
+ "children": [
466
+ {
467
+ "type": "button",
468
+ "label": "Email",
469
+ "event": "SEND_EMAIL",
470
+ "variant": "primary",
471
+ "icon": "mail"
472
+ },
473
+ {
474
+ "type": "button",
475
+ "label": "SMS",
476
+ "event": "SEND_SMS",
477
+ "variant": "secondary",
478
+ "icon": "message-circle"
479
+ },
480
+ {
481
+ "type": "button",
482
+ "label": "WhatsApp",
483
+ "event": "SEND_WHATSAPP",
484
+ "variant": "secondary",
485
+ "icon": "phone"
486
+ }
487
+ ]
488
+ }
489
+ ]
490
+ }
491
+ ]
492
+ ]
493
+ },
494
+ {
495
+ "from": "sent",
496
+ "to": "idle",
497
+ "event": "RESET",
498
+ "effects": [
499
+ [
500
+ "set",
501
+ "@entity.sendStatus",
502
+ "idle"
503
+ ],
504
+ [
505
+ "render-ui",
506
+ "main",
507
+ {
508
+ "type": "stack",
509
+ "direction": "vertical",
510
+ "gap": "lg",
511
+ "align": "stretch",
512
+ "children": [
513
+ {
514
+ "type": "stack",
515
+ "direction": "horizontal",
516
+ "gap": "md",
517
+ "align": "center",
518
+ "children": [
519
+ {
520
+ "type": "icon",
521
+ "name": "bell",
522
+ "size": "lg"
523
+ },
524
+ {
525
+ "type": "typography",
526
+ "content": "ServiceNotificationHub Notification Hub",
527
+ "variant": "h2"
528
+ }
529
+ ]
530
+ },
531
+ {
532
+ "type": "divider"
533
+ },
534
+ {
535
+ "type": "input",
536
+ "label": "Recipient",
537
+ "bind": "@entity.recipient",
538
+ "placeholder": "Email or phone number"
539
+ },
540
+ {
541
+ "type": "input",
542
+ "label": "Subject",
543
+ "bind": "@entity.subject",
544
+ "placeholder": "Notification subject"
545
+ },
546
+ {
547
+ "type": "textarea",
548
+ "label": "Message",
549
+ "bind": "@entity.messageBody",
550
+ "placeholder": "Write your message..."
551
+ },
552
+ {
553
+ "type": "stack",
554
+ "direction": "horizontal",
555
+ "gap": "sm",
556
+ "justify": "center",
557
+ "children": [
558
+ {
559
+ "type": "button",
560
+ "label": "Email",
561
+ "event": "SEND_EMAIL",
562
+ "variant": "primary",
563
+ "icon": "mail"
564
+ },
565
+ {
566
+ "type": "button",
567
+ "label": "SMS",
568
+ "event": "SEND_SMS",
569
+ "variant": "secondary",
570
+ "icon": "message-circle"
571
+ },
572
+ {
573
+ "type": "button",
574
+ "label": "WhatsApp",
575
+ "event": "SEND_WHATSAPP",
576
+ "variant": "secondary",
577
+ "icon": "phone"
578
+ }
579
+ ]
580
+ }
581
+ ]
582
+ }
583
+ ]
584
+ ]
585
+ },
586
+ {
587
+ "from": "error",
588
+ "to": "idle",
589
+ "event": "RESET",
590
+ "effects": [
591
+ [
592
+ "set",
593
+ "@entity.sendStatus",
594
+ "idle"
595
+ ],
596
+ [
597
+ "render-ui",
598
+ "main",
599
+ {
600
+ "type": "stack",
601
+ "direction": "vertical",
602
+ "gap": "lg",
603
+ "align": "stretch",
604
+ "children": [
605
+ {
606
+ "type": "stack",
607
+ "direction": "horizontal",
608
+ "gap": "md",
609
+ "align": "center",
610
+ "children": [
611
+ {
612
+ "type": "icon",
613
+ "name": "bell",
614
+ "size": "lg"
615
+ },
616
+ {
617
+ "type": "typography",
618
+ "content": "ServiceNotificationHub Notification Hub",
619
+ "variant": "h2"
620
+ }
621
+ ]
622
+ },
623
+ {
624
+ "type": "divider"
625
+ },
626
+ {
627
+ "type": "input",
628
+ "label": "Recipient",
629
+ "bind": "@entity.recipient",
630
+ "placeholder": "Email or phone number"
631
+ },
632
+ {
633
+ "type": "input",
634
+ "label": "Subject",
635
+ "bind": "@entity.subject",
636
+ "placeholder": "Notification subject"
637
+ },
638
+ {
639
+ "type": "textarea",
640
+ "label": "Message",
641
+ "bind": "@entity.messageBody",
642
+ "placeholder": "Write your message..."
643
+ },
644
+ {
645
+ "type": "stack",
646
+ "direction": "horizontal",
647
+ "gap": "sm",
648
+ "justify": "center",
649
+ "children": [
650
+ {
651
+ "type": "button",
652
+ "label": "Email",
653
+ "event": "SEND_EMAIL",
654
+ "variant": "primary",
655
+ "icon": "mail"
656
+ },
657
+ {
658
+ "type": "button",
659
+ "label": "SMS",
660
+ "event": "SEND_SMS",
661
+ "variant": "secondary",
662
+ "icon": "message-circle"
663
+ },
664
+ {
665
+ "type": "button",
666
+ "label": "WhatsApp",
667
+ "event": "SEND_WHATSAPP",
668
+ "variant": "secondary",
669
+ "icon": "phone"
670
+ }
671
+ ]
672
+ }
673
+ ]
674
+ }
675
+ ]
676
+ ]
677
+ }
678
+ ]
679
+ }
680
+ }
681
+ ],
682
+ "pages": [
683
+ {
684
+ "name": "ServiceNotificationHubPage",
685
+ "path": "/servicenotificationhubs",
686
+ "traits": [
687
+ {
688
+ "ref": "ServiceNotificationHubNotificationHub"
689
+ }
690
+ ]
691
+ }
692
+ ]
693
+ }
694
+ ],
695
+ "description": "Unified notification sender molecule. Composes email and twilio into a single trait with channel selection (Email, SMS, WhatsApp). A single state machine routes to the appropriate call-service based on the chosen channel. States: idle -> sending -> sent | error Channels: email (call-service email/send), sms (call-service twilio/sendSMS), whatsapp (call-service twilio/sendWhatsApp)"
696
+ }