@almadar/std 14.8.0 → 14.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/behaviors/registry/app/organisms/std-api-gateway.orb +1303 -4002
  2. package/behaviors/registry/app/organisms/std-booking-system.orb +2131 -3645
  3. package/behaviors/registry/app/organisms/std-cicd-pipeline.orb +1449 -3612
  4. package/behaviors/registry/app/organisms/std-cms.orb +1833 -4943
  5. package/behaviors/registry/app/organisms/std-coding-academy.orb +686 -1238
  6. package/behaviors/registry/app/organisms/std-crm.orb +1872 -5949
  7. package/behaviors/registry/app/organisms/std-devops-dashboard.orb +2046 -5532
  8. package/behaviors/registry/app/organisms/std-finance-tracker.orb +1141 -3716
  9. package/behaviors/registry/app/organisms/std-healthcare.orb +3281 -7478
  10. package/behaviors/registry/app/organisms/std-helpdesk.orb +1046 -4062
  11. package/behaviors/registry/app/organisms/std-hr-portal.orb +2560 -6447
  12. package/behaviors/registry/app/organisms/std-iot-dashboard.orb +1657 -3716
  13. package/behaviors/registry/app/organisms/std-lms.orb +1933 -3916
  14. package/behaviors/registry/app/organisms/std-project-manager.orb +1417 -5232
  15. package/behaviors/registry/app/organisms/std-realtime-chat.orb +1308 -3873
  16. package/behaviors/registry/app/organisms/std-social-feed.orb +1135 -1700
  17. package/behaviors/registry/app/organisms/std-trading-dashboard.orb +1333 -3187
  18. package/behaviors/registry/core/atoms/std-graphs.orb +40 -41
  19. package/behaviors/registry/core/atoms/std-stats.orb +131 -110
  20. package/behaviors/registry/core/molecules/std-app-layout.orb +90 -21
  21. package/behaviors/registry/service/atoms/std-service-custom-bearer.orb +351 -345
  22. package/behaviors/registry/service/atoms/std-service-email.orb +334 -328
  23. package/behaviors/registry/service/atoms/std-service-github.orb +308 -365
  24. package/behaviors/registry/service/atoms/std-service-llm.orb +329 -437
  25. package/behaviors/registry/service/atoms/std-service-oauth.orb +261 -564
  26. package/behaviors/registry/service/atoms/std-service-redis.orb +299 -405
  27. package/behaviors/registry/service/atoms/std-service-storage.orb +293 -505
  28. package/behaviors/registry/service/atoms/std-service-twilio.orb +315 -393
  29. package/behaviors/registry/service/atoms/std-service-youtube.orb +266 -547
  30. package/dist/behaviors/registry/app/organisms/std-api-gateway.orb +1303 -4002
  31. package/dist/behaviors/registry/app/organisms/std-booking-system.orb +2131 -3645
  32. package/dist/behaviors/registry/app/organisms/std-cicd-pipeline.orb +1449 -3612
  33. package/dist/behaviors/registry/app/organisms/std-cms.orb +1833 -4943
  34. package/dist/behaviors/registry/app/organisms/std-coding-academy.orb +686 -1238
  35. package/dist/behaviors/registry/app/organisms/std-crm.orb +1872 -5949
  36. package/dist/behaviors/registry/app/organisms/std-devops-dashboard.orb +2046 -5532
  37. package/dist/behaviors/registry/app/organisms/std-finance-tracker.orb +1141 -3716
  38. package/dist/behaviors/registry/app/organisms/std-healthcare.orb +3281 -7478
  39. package/dist/behaviors/registry/app/organisms/std-helpdesk.orb +1046 -4062
  40. package/dist/behaviors/registry/app/organisms/std-hr-portal.orb +2560 -6447
  41. package/dist/behaviors/registry/app/organisms/std-iot-dashboard.orb +1657 -3716
  42. package/dist/behaviors/registry/app/organisms/std-lms.orb +1933 -3916
  43. package/dist/behaviors/registry/app/organisms/std-project-manager.orb +1417 -5232
  44. package/dist/behaviors/registry/app/organisms/std-realtime-chat.orb +1308 -3873
  45. package/dist/behaviors/registry/app/organisms/std-social-feed.orb +1135 -1700
  46. package/dist/behaviors/registry/app/organisms/std-trading-dashboard.orb +1333 -3187
  47. package/dist/behaviors/registry/core/atoms/std-graphs.orb +40 -41
  48. package/dist/behaviors/registry/core/atoms/std-stats.orb +131 -110
  49. package/dist/behaviors/registry/core/molecules/std-app-layout.orb +90 -21
  50. package/dist/behaviors/registry/service/atoms/std-service-custom-bearer.orb +351 -345
  51. package/dist/behaviors/registry/service/atoms/std-service-email.orb +334 -328
  52. package/dist/behaviors/registry/service/atoms/std-service-github.orb +308 -365
  53. package/dist/behaviors/registry/service/atoms/std-service-llm.orb +329 -437
  54. package/dist/behaviors/registry/service/atoms/std-service-oauth.orb +261 -564
  55. package/dist/behaviors/registry/service/atoms/std-service-redis.orb +299 -405
  56. package/dist/behaviors/registry/service/atoms/std-service-storage.orb +293 -505
  57. package/dist/behaviors/registry/service/atoms/std-service-twilio.orb +315 -393
  58. package/dist/behaviors/registry/service/atoms/std-service-youtube.orb +266 -547
  59. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-service-twilio",
3
- "version": "1.0.0",
4
- "description": "std-service-twilio as a Function",
3
+ "version": "2.0.0",
4
+ "description": "std-service-twilio Twilio messaging service. Bind via `uses Twilio from \"std/behaviors/std-service-twilio\"` and configure `recipient` / `body` / `sender` / `mode` at the call site (mapped to Twilio `to`/`body`/`from`/`mode`). Pass `uiTrait: \"@trait.YourMessagingForm\"` to inject your own form; leave unset to render the atom's default test form (standalone surface).",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "ServiceTwilioOrbital",
@@ -11,59 +11,183 @@
11
11
  "fields": [
12
12
  {
13
13
  "name": "id",
14
- "type": "string"
14
+ "type": "string",
15
+ "required": true
15
16
  },
16
17
  {
17
- "name": "name",
18
- "type": "string"
18
+ "name": "to",
19
+ "type": "string",
20
+ "default": ""
19
21
  },
20
22
  {
21
- "name": "description",
22
- "type": "string"
23
+ "name": "body",
24
+ "type": "string",
25
+ "default": ""
23
26
  },
24
27
  {
25
- "name": "status",
28
+ "name": "from",
26
29
  "type": "string",
27
- "default": "active",
30
+ "default": ""
31
+ },
32
+ {
33
+ "name": "mode",
34
+ "type": "string",
35
+ "default": "sms",
28
36
  "values": [
29
- "active",
30
- "inactive",
31
- "pending"
37
+ "sms",
38
+ "voice",
39
+ "whatsapp"
32
40
  ]
33
41
  },
34
42
  {
35
- "name": "createdAt",
36
- "type": "string"
43
+ "name": "messageSid",
44
+ "type": "string",
45
+ "default": ""
37
46
  },
38
47
  {
39
- "name": "to",
40
- "type": "string"
48
+ "name": "sendStatus",
49
+ "type": "string",
50
+ "default": "idle"
41
51
  },
42
52
  {
43
- "name": "messageBody",
44
- "type": "string"
53
+ "name": "error",
54
+ "type": "string",
55
+ "default": ""
45
56
  },
46
57
  {
47
- "name": "channel",
48
- "type": "string",
49
- "default": "sms"
58
+ "name": "name",
59
+ "type": "string"
50
60
  },
51
61
  {
52
- "name": "messageSid",
62
+ "name": "description",
53
63
  "type": "string"
54
64
  },
55
65
  {
56
- "name": "sendStatus",
66
+ "name": "status",
57
67
  "type": "string",
58
- "default": "idle"
68
+ "default": "active",
69
+ "values": [
70
+ "active",
71
+ "inactive",
72
+ "pending"
73
+ ]
59
74
  },
60
75
  {
61
- "name": "error",
76
+ "name": "createdAt",
62
77
  "type": "string"
63
78
  }
64
79
  ]
65
80
  },
66
81
  "traits": [
82
+ {
83
+ "name": "ServiceTwilioDefaultForm",
84
+ "category": "interaction",
85
+ "emits": [
86
+ {
87
+ "event": "SEND",
88
+ "scope": "external",
89
+ "payloadSchema": [
90
+ {
91
+ "name": "source",
92
+ "type": "string"
93
+ }
94
+ ]
95
+ }
96
+ ],
97
+ "stateMachine": {
98
+ "states": [
99
+ {
100
+ "name": "ready",
101
+ "isInitial": true
102
+ }
103
+ ],
104
+ "events": [
105
+ {
106
+ "key": "INIT",
107
+ "name": "Initialize"
108
+ },
109
+ {
110
+ "key": "SEND",
111
+ "name": "Send"
112
+ }
113
+ ],
114
+ "transitions": [
115
+ {
116
+ "from": "ready",
117
+ "to": "ready",
118
+ "event": "INIT",
119
+ "effects": [
120
+ [
121
+ "render-ui",
122
+ "main",
123
+ {
124
+ "gap": "lg",
125
+ "type": "stack",
126
+ "align": "stretch",
127
+ "direction": "vertical",
128
+ "children": [
129
+ {
130
+ "type": "stack",
131
+ "direction": "horizontal",
132
+ "align": "center",
133
+ "children": [
134
+ {
135
+ "type": "icon",
136
+ "name": "message-circle"
137
+ },
138
+ {
139
+ "content": "Twilio Messaging",
140
+ "variant": "h2",
141
+ "type": "typography"
142
+ }
143
+ ],
144
+ "gap": "md"
145
+ },
146
+ {
147
+ "type": "divider"
148
+ },
149
+ {
150
+ "inputType": "tel",
151
+ "type": "input",
152
+ "placeholder": "+1234567890"
153
+ },
154
+ {
155
+ "type": "textarea",
156
+ "placeholder": "Write your message..."
157
+ },
158
+ {
159
+ "type": "select",
160
+ "options": [
161
+ {
162
+ "label": "SMS",
163
+ "value": "sms"
164
+ },
165
+ {
166
+ "value": "voice",
167
+ "label": "Voice"
168
+ },
169
+ {
170
+ "label": "WhatsApp",
171
+ "value": "whatsapp"
172
+ }
173
+ ]
174
+ },
175
+ {
176
+ "variant": "primary",
177
+ "icon": "send",
178
+ "type": "button",
179
+ "label": "Send",
180
+ "action": "SEND"
181
+ }
182
+ ]
183
+ }
184
+ ]
185
+ ]
186
+ }
187
+ ]
188
+ },
189
+ "scope": "instance"
190
+ },
67
191
  {
68
192
  "name": "ServiceTwilioTwilio",
69
193
  "category": "interaction",
@@ -89,13 +213,23 @@
89
213
  }
90
214
  ]
91
215
  },
216
+ {
217
+ "event": "TwilioSent",
218
+ "scope": "external",
219
+ "payloadSchema": [
220
+ {
221
+ "name": "id",
222
+ "type": "string"
223
+ }
224
+ ]
225
+ },
92
226
  {
93
227
  "event": "ServiceTwilioTwilioCompleted",
94
228
  "scope": "external",
95
229
  "payloadSchema": [
96
230
  {
97
- "name": "result",
98
- "type": "object"
231
+ "name": "id",
232
+ "type": "string"
99
233
  }
100
234
  ]
101
235
  },
@@ -112,6 +246,26 @@
112
246
  "type": "string"
113
247
  }
114
248
  ]
249
+ },
250
+ {
251
+ "event": "FAILED",
252
+ "payloadSchema": [
253
+ {
254
+ "name": "error",
255
+ "type": "string",
256
+ "required": true
257
+ }
258
+ ]
259
+ }
260
+ ],
261
+ "listens": [
262
+ {
263
+ "event": "SEND",
264
+ "triggers": "SEND",
265
+ "source": {
266
+ "kind": "trait",
267
+ "trait": "ServiceTwilioDefaultForm"
268
+ }
115
269
  }
116
270
  ],
117
271
  "stateMachine": {
@@ -136,109 +290,61 @@
136
290
  "name": "Initialize"
137
291
  },
138
292
  {
139
- "key": "SEND_SMS",
140
- "name": "Send Sms"
293
+ "key": "SEND",
294
+ "name": "Send"
141
295
  },
142
296
  {
143
- "key": "SEND_WHATSAPP",
144
- "name": "Send Whatsapp"
145
- },
146
- {
147
- "key": "SENT",
148
- "name": "Sent",
297
+ "key": "ServiceTwilioLoaded",
298
+ "name": "ServiceTwilio loaded",
149
299
  "payloadSchema": [
150
300
  {
151
- "name": "messageSid",
301
+ "name": "id",
152
302
  "type": "string"
153
303
  }
154
304
  ]
155
305
  },
156
306
  {
157
- "key": "FAILED",
158
- "name": "Failed",
307
+ "key": "ServiceTwilioLoadFailed",
308
+ "name": "ServiceTwilio load failed",
159
309
  "payloadSchema": [
160
310
  {
161
- "name": "error",
162
- "type": "string",
163
- "required": true
311
+ "name": "message",
312
+ "type": "string"
164
313
  }
165
314
  ]
166
315
  },
167
316
  {
168
- "key": "RESET",
169
- "name": "Reset"
170
- },
171
- {
172
- "key": "RETRY",
173
- "name": "Retry"
174
- },
175
- {
176
- "key": "ServiceTwilioLoaded",
177
- "name": "ServiceTwilio loaded",
317
+ "key": "TwilioSent",
318
+ "name": "Twilio sent",
178
319
  "payloadSchema": [
179
320
  {
180
321
  "name": "id",
181
322
  "type": "string"
182
- },
183
- {
184
- "name": "name",
185
- "type": "string"
186
- },
187
- {
188
- "name": "description",
189
- "type": "string"
190
- },
191
- {
192
- "name": "status",
193
- "type": "string"
194
- },
195
- {
196
- "name": "createdAt",
197
- "type": "string"
198
- },
199
- {
200
- "name": "to",
201
- "type": "string"
202
- },
203
- {
204
- "name": "messageBody",
205
- "type": "string"
206
- },
207
- {
208
- "name": "channel",
209
- "type": "string"
210
- },
211
- {
212
- "name": "messageSid",
213
- "type": "string"
214
- },
215
- {
216
- "name": "sendStatus",
217
- "type": "string"
218
- },
219
- {
220
- "name": "error",
221
- "type": "string"
222
323
  }
223
324
  ]
224
325
  },
225
326
  {
226
- "key": "ServiceTwilioLoadFailed",
227
- "name": "ServiceTwilio load failed",
327
+ "key": "FAILED",
328
+ "name": "Failed",
228
329
  "payloadSchema": [
229
330
  {
230
- "name": "message",
231
- "type": "string"
331
+ "name": "error",
332
+ "type": "string",
333
+ "required": true
232
334
  }
233
335
  ]
234
336
  },
337
+ {
338
+ "key": "RESET",
339
+ "name": "Reset"
340
+ },
235
341
  {
236
342
  "key": "ServiceTwilioTwilioCompleted",
237
343
  "name": "ServiceTwilio twilio completed",
238
344
  "payloadSchema": [
239
345
  {
240
- "name": "result",
241
- "type": "object"
346
+ "name": "id",
347
+ "type": "string"
242
348
  }
243
349
  ]
244
350
  },
@@ -255,6 +361,10 @@
255
361
  "type": "string"
256
362
  }
257
363
  ]
364
+ },
365
+ {
366
+ "key": "RETRY",
367
+ "name": "Retry"
258
368
  }
259
369
  ],
260
370
  "transitions": [
@@ -265,13 +375,18 @@
265
375
  "effects": [
266
376
  [
267
377
  "set",
268
- "@entity.messageBody",
269
- ""
378
+ "@entity.to",
379
+ "@config.recipient"
270
380
  ],
271
381
  [
272
382
  "set",
273
- "@entity.to",
274
- ""
383
+ "@entity.body",
384
+ "@config.body"
385
+ ],
386
+ [
387
+ "set",
388
+ "@entity.mode",
389
+ "@config.mode"
275
390
  ],
276
391
  [
277
392
  "fetch",
@@ -287,62 +402,12 @@
287
402
  "render-ui",
288
403
  "main",
289
404
  {
290
- "direction": "vertical",
291
- "gap": "lg",
292
405
  "children": [
293
- {
294
- "align": "center",
295
- "type": "stack",
296
- "children": [
297
- {
298
- "name": "message-circle",
299
- "type": "icon"
300
- },
301
- {
302
- "variant": "h2",
303
- "type": "typography",
304
- "content": "ServiceTwilio Messaging"
305
- }
306
- ],
307
- "gap": "md",
308
- "direction": "horizontal"
309
- },
310
- {
311
- "type": "divider"
312
- },
313
- {
314
- "type": "input",
315
- "placeholder": "+1234567890"
316
- },
317
- {
318
- "type": "textarea",
319
- "placeholder": "Write your message..."
320
- },
321
- {
322
- "justify": "center",
323
- "direction": "horizontal",
324
- "children": [
325
- {
326
- "action": "SEND_SMS",
327
- "label": "Send SMS",
328
- "variant": "primary",
329
- "icon": "message-circle",
330
- "type": "button"
331
- },
332
- {
333
- "action": "SEND_WHATSAPP",
334
- "type": "button",
335
- "variant": "secondary",
336
- "icon": "phone",
337
- "label": "Send WhatsApp"
338
- }
339
- ],
340
- "type": "stack",
341
- "gap": "sm"
342
- }
406
+ "@config.uiTrait"
343
407
  ],
344
- "align": "stretch",
345
- "type": "stack"
408
+ "type": "stack",
409
+ "gap": "md",
410
+ "direction": "vertical"
346
411
  }
347
412
  ]
348
413
  ]
@@ -350,15 +415,15 @@
350
415
  {
351
416
  "from": "idle",
352
417
  "to": "sending",
353
- "event": "SEND_SMS",
418
+ "event": "SEND",
354
419
  "effects": [
355
420
  [
356
421
  "render-ui",
357
422
  "main",
358
423
  {
359
- "message": "Delivering servicetwilio message...",
424
+ "type": "loading-state",
360
425
  "title": "Sending message...",
361
- "type": "loading-state"
426
+ "message": "Delivering your message."
362
427
  }
363
428
  ],
364
429
  [
@@ -366,13 +431,13 @@
366
431
  "twilio",
367
432
  "sendSMS",
368
433
  {
369
- "body": "@entity.messageBody",
370
- "to": "@entity.to"
434
+ "to": "@config.recipient",
435
+ "body": "@config.body"
371
436
  },
372
437
  {
373
438
  "emit": {
374
- "failure": "ServiceTwilioTwilioFailed",
375
- "success": "ServiceTwilioTwilioCompleted"
439
+ "success": "TwilioSent",
440
+ "failure": "FAILED"
376
441
  }
377
442
  }
378
443
  ]
@@ -380,39 +445,18 @@
380
445
  },
381
446
  {
382
447
  "from": "idle",
383
- "to": "sending",
384
- "event": "SEND_WHATSAPP",
385
- "effects": [
386
- [
387
- "render-ui",
388
- "main",
389
- {
390
- "title": "Sending message...",
391
- "message": "Delivering servicetwilio message...",
392
- "type": "loading-state"
393
- }
394
- ],
395
- [
396
- "call-service",
397
- "twilio",
398
- "sendWhatsApp",
399
- {
400
- "to": "@entity.to",
401
- "body": "@entity.messageBody"
402
- },
403
- {
404
- "emit": {
405
- "success": "ServiceTwilioTwilioCompleted",
406
- "failure": "ServiceTwilioTwilioFailed"
407
- }
408
- }
409
- ]
410
- ]
448
+ "to": "idle",
449
+ "event": "ServiceTwilioLoaded"
450
+ },
451
+ {
452
+ "from": "idle",
453
+ "to": "idle",
454
+ "event": "ServiceTwilioLoadFailed"
411
455
  },
412
456
  {
413
457
  "from": "sending",
414
458
  "to": "sent",
415
- "event": "SENT",
459
+ "event": "TwilioSent",
416
460
  "effects": [
417
461
  [
418
462
  "set",
@@ -422,7 +466,14 @@
422
466
  [
423
467
  "set",
424
468
  "@entity.messageSid",
425
- "@payload.messageSid"
469
+ "@payload.id"
470
+ ],
471
+ [
472
+ "emit",
473
+ "ServiceTwilioTwilioCompleted",
474
+ {
475
+ "id": "@entity.messageSid"
476
+ }
426
477
  ],
427
478
  [
428
479
  "render-ui",
@@ -431,25 +482,31 @@
431
482
  "type": "stack",
432
483
  "direction": "vertical",
433
484
  "gap": "lg",
434
- "align": "center",
435
485
  "children": [
436
486
  {
437
- "name": "check-circle",
438
- "type": "icon"
487
+ "type": "icon",
488
+ "name": "check-circle"
439
489
  },
440
490
  {
441
491
  "type": "alert",
442
492
  "variant": "success",
443
493
  "message": "Message sent successfully"
444
494
  },
495
+ {
496
+ "type": "typography",
497
+ "variant": "body",
498
+ "color": "muted",
499
+ "content": "@entity.messageSid"
500
+ },
445
501
  {
446
502
  "icon": "rotate-ccw",
447
- "action": "RESET",
448
503
  "type": "button",
449
504
  "label": "Send Another",
450
- "variant": "ghost"
505
+ "variant": "ghost",
506
+ "action": "RESET"
451
507
  }
452
- ]
508
+ ],
509
+ "align": "center"
453
510
  }
454
511
  ]
455
512
  ]
@@ -469,44 +526,22 @@
469
526
  "@entity.error",
470
527
  "@payload.error"
471
528
  ],
529
+ [
530
+ "emit",
531
+ "ServiceTwilioTwilioFailed",
532
+ {
533
+ "code": "send_failed",
534
+ "error": "@entity.error"
535
+ }
536
+ ],
472
537
  [
473
538
  "render-ui",
474
539
  "main",
475
540
  {
476
- "gap": "lg",
477
- "children": [
478
- {
479
- "type": "error-state",
480
- "title": "Send Failed",
481
- "message": "Could not deliver the message.",
482
- "onRetry": "RETRY"
483
- },
484
- {
485
- "children": [
486
- {
487
- "type": "button",
488
- "label": "Retry",
489
- "action": "RETRY",
490
- "variant": "primary",
491
- "icon": "refresh-cw"
492
- },
493
- {
494
- "type": "button",
495
- "action": "RESET",
496
- "label": "Reset",
497
- "variant": "ghost",
498
- "icon": "rotate-ccw"
499
- }
500
- ],
501
- "type": "stack",
502
- "gap": "sm",
503
- "direction": "horizontal",
504
- "justify": "center"
505
- }
506
- ],
507
- "align": "center",
508
- "direction": "vertical",
509
- "type": "stack"
541
+ "message": "@entity.error",
542
+ "onRetry": "RETRY",
543
+ "type": "error-state",
544
+ "title": "Send Failed"
510
545
  }
511
546
  ]
512
547
  ]
@@ -525,66 +560,26 @@
525
560
  "render-ui",
526
561
  "main",
527
562
  {
528
- "gap": "lg",
529
- "direction": "vertical",
530
563
  "children": [
531
- {
532
- "gap": "md",
533
- "direction": "horizontal",
534
- "align": "center",
535
- "children": [
536
- {
537
- "type": "icon",
538
- "name": "message-circle"
539
- },
540
- {
541
- "variant": "h2",
542
- "type": "typography",
543
- "content": "ServiceTwilio Messaging"
544
- }
545
- ],
546
- "type": "stack"
547
- },
548
- {
549
- "type": "divider"
550
- },
551
- {
552
- "placeholder": "+1234567890",
553
- "type": "input"
554
- },
555
- {
556
- "placeholder": "Write your message...",
557
- "type": "textarea"
558
- },
559
- {
560
- "type": "stack",
561
- "gap": "sm",
562
- "direction": "horizontal",
563
- "children": [
564
- {
565
- "icon": "message-circle",
566
- "action": "SEND_SMS",
567
- "variant": "primary",
568
- "type": "button",
569
- "label": "Send SMS"
570
- },
571
- {
572
- "action": "SEND_WHATSAPP",
573
- "variant": "secondary",
574
- "type": "button",
575
- "label": "Send WhatsApp",
576
- "icon": "phone"
577
- }
578
- ],
579
- "justify": "center"
580
- }
564
+ "@config.uiTrait"
581
565
  ],
582
- "align": "stretch",
583
- "type": "stack"
566
+ "type": "stack",
567
+ "direction": "vertical",
568
+ "gap": "md"
584
569
  }
585
570
  ]
586
571
  ]
587
572
  },
573
+ {
574
+ "from": "sent",
575
+ "to": "sent",
576
+ "event": "ServiceTwilioTwilioCompleted"
577
+ },
578
+ {
579
+ "from": "error",
580
+ "to": "error",
581
+ "event": "ServiceTwilioTwilioFailed"
582
+ },
588
583
  {
589
584
  "from": "error",
590
585
  "to": "idle",
@@ -594,62 +589,12 @@
594
589
  "render-ui",
595
590
  "main",
596
591
  {
597
- "type": "stack",
592
+ "direction": "vertical",
598
593
  "children": [
599
- {
600
- "direction": "horizontal",
601
- "gap": "md",
602
- "align": "center",
603
- "type": "stack",
604
- "children": [
605
- {
606
- "name": "message-circle",
607
- "type": "icon"
608
- },
609
- {
610
- "content": "ServiceTwilio Messaging",
611
- "variant": "h2",
612
- "type": "typography"
613
- }
614
- ]
615
- },
616
- {
617
- "type": "divider"
618
- },
619
- {
620
- "placeholder": "+1234567890",
621
- "type": "input"
622
- },
623
- {
624
- "placeholder": "Write your message...",
625
- "type": "textarea"
626
- },
627
- {
628
- "type": "stack",
629
- "justify": "center",
630
- "children": [
631
- {
632
- "icon": "message-circle",
633
- "label": "Send SMS",
634
- "action": "SEND_SMS",
635
- "variant": "primary",
636
- "type": "button"
637
- },
638
- {
639
- "type": "button",
640
- "action": "SEND_WHATSAPP",
641
- "variant": "secondary",
642
- "icon": "phone",
643
- "label": "Send WhatsApp"
644
- }
645
- ],
646
- "gap": "sm",
647
- "direction": "horizontal"
648
- }
594
+ "@config.uiTrait"
649
595
  ],
650
- "direction": "vertical",
651
- "align": "stretch",
652
- "gap": "lg"
596
+ "gap": "md",
597
+ "type": "stack"
653
598
  }
654
599
  ]
655
600
  ]
@@ -669,67 +614,44 @@
669
614
  "main",
670
615
  {
671
616
  "children": [
672
- {
673
- "gap": "md",
674
- "type": "stack",
675
- "children": [
676
- {
677
- "name": "message-circle",
678
- "type": "icon"
679
- },
680
- {
681
- "variant": "h2",
682
- "type": "typography",
683
- "content": "ServiceTwilio Messaging"
684
- }
685
- ],
686
- "direction": "horizontal",
687
- "align": "center"
688
- },
689
- {
690
- "type": "divider"
691
- },
692
- {
693
- "placeholder": "+1234567890",
694
- "type": "input"
695
- },
696
- {
697
- "type": "textarea",
698
- "placeholder": "Write your message..."
699
- },
700
- {
701
- "justify": "center",
702
- "type": "stack",
703
- "gap": "sm",
704
- "children": [
705
- {
706
- "type": "button",
707
- "icon": "message-circle",
708
- "action": "SEND_SMS",
709
- "label": "Send SMS",
710
- "variant": "primary"
711
- },
712
- {
713
- "action": "SEND_WHATSAPP",
714
- "variant": "secondary",
715
- "type": "button",
716
- "label": "Send WhatsApp",
717
- "icon": "phone"
718
- }
719
- ],
720
- "direction": "horizontal"
721
- }
617
+ "@config.uiTrait"
722
618
  ],
723
- "gap": "lg",
724
- "align": "stretch",
619
+ "direction": "vertical",
725
620
  "type": "stack",
726
- "direction": "vertical"
621
+ "gap": "md"
727
622
  }
728
623
  ]
729
624
  ]
730
625
  }
731
626
  ]
732
627
  },
628
+ "config": {
629
+ "sender": {
630
+ "type": "string",
631
+ "default": ""
632
+ },
633
+ "mode": {
634
+ "type": "string",
635
+ "default": "sms",
636
+ "values": [
637
+ "sms",
638
+ "voice",
639
+ "whatsapp"
640
+ ]
641
+ },
642
+ "body": {
643
+ "type": "string",
644
+ "default": ""
645
+ },
646
+ "uiTrait": {
647
+ "type": "trait",
648
+ "default": "@trait.ServiceTwilioDefaultForm"
649
+ },
650
+ "recipient": {
651
+ "type": "string",
652
+ "default": ""
653
+ }
654
+ },
733
655
  "scope": "instance"
734
656
  }
735
657
  ],