@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,764 @@
1
+ {
2
+ "name": "ServiceOauthOrbital",
3
+ "orbitals": [
4
+ {
5
+ "name": "ServiceOauthOrbital",
6
+ "entity": {
7
+ "name": "ServiceOauth",
8
+ "persistence": "runtime",
9
+ "fields": [
10
+ {
11
+ "name": "id",
12
+ "type": "string",
13
+ "required": true
14
+ },
15
+ {
16
+ "name": "provider",
17
+ "type": "string",
18
+ "default": "google"
19
+ },
20
+ {
21
+ "name": "authUrl",
22
+ "type": "string",
23
+ "default": ""
24
+ },
25
+ {
26
+ "name": "accessToken",
27
+ "type": "string",
28
+ "default": ""
29
+ },
30
+ {
31
+ "name": "refreshToken",
32
+ "type": "string",
33
+ "default": ""
34
+ },
35
+ {
36
+ "name": "authStatus",
37
+ "type": "string",
38
+ "default": "unauthenticated"
39
+ },
40
+ {
41
+ "name": "error",
42
+ "type": "string",
43
+ "default": ""
44
+ },
45
+ {
46
+ "name": "name",
47
+ "type": "string"
48
+ },
49
+ {
50
+ "name": "description",
51
+ "type": "string"
52
+ },
53
+ {
54
+ "name": "status",
55
+ "type": "string",
56
+ "default": "active",
57
+ "values": [
58
+ "active",
59
+ "inactive",
60
+ "pending"
61
+ ]
62
+ },
63
+ {
64
+ "name": "createdAt",
65
+ "type": "string"
66
+ }
67
+ ]
68
+ },
69
+ "traits": [
70
+ {
71
+ "name": "ServiceOauthOauth",
72
+ "linkedEntity": "ServiceOauth",
73
+ "category": "interaction",
74
+ "stateMachine": {
75
+ "states": [
76
+ {
77
+ "name": "unauthenticated",
78
+ "isInitial": true
79
+ },
80
+ {
81
+ "name": "authorizing"
82
+ },
83
+ {
84
+ "name": "authenticated"
85
+ },
86
+ {
87
+ "name": "refreshing"
88
+ },
89
+ {
90
+ "name": "error"
91
+ }
92
+ ],
93
+ "events": [
94
+ {
95
+ "key": "INIT",
96
+ "name": "Initialize"
97
+ },
98
+ {
99
+ "key": "LOGIN",
100
+ "name": "Login"
101
+ },
102
+ {
103
+ "key": "AUTH_URL_RECEIVED",
104
+ "name": "Auth URL Received",
105
+ "payload": [
106
+ {
107
+ "name": "authUrl",
108
+ "type": "string",
109
+ "required": true
110
+ }
111
+ ]
112
+ },
113
+ {
114
+ "key": "CALLBACK",
115
+ "name": "Authorization Callback",
116
+ "payload": [
117
+ {
118
+ "name": "code",
119
+ "type": "string",
120
+ "required": true
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ "key": "TOKEN_RECEIVED",
126
+ "name": "Token Received",
127
+ "payload": [
128
+ {
129
+ "name": "accessToken",
130
+ "type": "string",
131
+ "required": true
132
+ },
133
+ {
134
+ "name": "refreshToken",
135
+ "type": "string",
136
+ "required": true
137
+ }
138
+ ]
139
+ },
140
+ {
141
+ "key": "REFRESH",
142
+ "name": "Refresh Token"
143
+ },
144
+ {
145
+ "key": "TOKEN_REFRESHED",
146
+ "name": "Token Refreshed",
147
+ "payload": [
148
+ {
149
+ "name": "accessToken",
150
+ "type": "string",
151
+ "required": true
152
+ }
153
+ ]
154
+ },
155
+ {
156
+ "key": "LOGOUT",
157
+ "name": "Logout"
158
+ },
159
+ {
160
+ "key": "FAILED",
161
+ "name": "Failed",
162
+ "payload": [
163
+ {
164
+ "name": "error",
165
+ "type": "string",
166
+ "required": true
167
+ }
168
+ ]
169
+ },
170
+ {
171
+ "key": "RETRY",
172
+ "name": "Retry"
173
+ }
174
+ ],
175
+ "transitions": [
176
+ {
177
+ "from": "unauthenticated",
178
+ "to": "unauthenticated",
179
+ "event": "INIT",
180
+ "effects": [
181
+ [
182
+ "fetch",
183
+ "ServiceOauth"
184
+ ],
185
+ [
186
+ "render-ui",
187
+ "main",
188
+ {
189
+ "type": "stack",
190
+ "direction": "vertical",
191
+ "gap": "lg",
192
+ "align": "center",
193
+ "children": [
194
+ {
195
+ "type": "stack",
196
+ "direction": "horizontal",
197
+ "gap": "md",
198
+ "align": "center",
199
+ "children": [
200
+ {
201
+ "type": "icon",
202
+ "name": "lock",
203
+ "size": "lg"
204
+ },
205
+ {
206
+ "type": "typography",
207
+ "content": "Sign In",
208
+ "variant": "h2"
209
+ }
210
+ ]
211
+ },
212
+ {
213
+ "type": "divider"
214
+ },
215
+ {
216
+ "type": "select",
217
+ "label": "Provider",
218
+ "field": "provider",
219
+ "bind": "@entity.provider",
220
+ "options": [
221
+ {
222
+ "label": "Google",
223
+ "value": "google"
224
+ },
225
+ {
226
+ "label": "GitHub",
227
+ "value": "github"
228
+ },
229
+ {
230
+ "label": "Microsoft",
231
+ "value": "microsoft"
232
+ }
233
+ ]
234
+ },
235
+ {
236
+ "type": "button",
237
+ "label": "Login",
238
+ "event": "LOGIN",
239
+ "variant": "primary",
240
+ "icon": "log-in"
241
+ }
242
+ ]
243
+ }
244
+ ]
245
+ ]
246
+ },
247
+ {
248
+ "from": "unauthenticated",
249
+ "to": "authorizing",
250
+ "event": "LOGIN",
251
+ "effects": [
252
+ [
253
+ "render-ui",
254
+ "main",
255
+ {
256
+ "type": "loading-state",
257
+ "title": "Authorizing...",
258
+ "message": "Redirecting to provider for authorization."
259
+ }
260
+ ],
261
+ [
262
+ "call-service",
263
+ "oauth",
264
+ "authorize",
265
+ {
266
+ "provider": "@entity.provider",
267
+ "scopes": [
268
+ "openid",
269
+ "email"
270
+ ]
271
+ }
272
+ ]
273
+ ]
274
+ },
275
+ {
276
+ "from": "authorizing",
277
+ "to": "authorizing",
278
+ "event": "AUTH_URL_RECEIVED",
279
+ "effects": [
280
+ [
281
+ "set",
282
+ "@entity.authUrl",
283
+ "@payload.authUrl"
284
+ ],
285
+ [
286
+ "render-ui",
287
+ "main",
288
+ {
289
+ "type": "stack",
290
+ "direction": "vertical",
291
+ "gap": "lg",
292
+ "align": "center",
293
+ "children": [
294
+ {
295
+ "type": "icon",
296
+ "name": "external-link",
297
+ "size": "lg"
298
+ },
299
+ {
300
+ "type": "typography",
301
+ "content": "Authorization Required",
302
+ "variant": "h2"
303
+ },
304
+ {
305
+ "type": "typography",
306
+ "content": "@entity.authUrl",
307
+ "variant": "body",
308
+ "color": "muted"
309
+ },
310
+ {
311
+ "type": "input",
312
+ "label": "Authorization Code",
313
+ "field": "code",
314
+ "placeholder": "Paste authorization code here"
315
+ },
316
+ {
317
+ "type": "button",
318
+ "label": "Submit",
319
+ "event": "CALLBACK",
320
+ "variant": "primary",
321
+ "icon": "check"
322
+ }
323
+ ]
324
+ }
325
+ ]
326
+ ]
327
+ },
328
+ {
329
+ "from": "authorizing",
330
+ "to": "authenticated",
331
+ "event": "CALLBACK",
332
+ "effects": [
333
+ [
334
+ "call-service",
335
+ "oauth",
336
+ "token",
337
+ {
338
+ "code": "@payload.code"
339
+ }
340
+ ],
341
+ [
342
+ "render-ui",
343
+ "main",
344
+ {
345
+ "type": "stack",
346
+ "direction": "vertical",
347
+ "gap": "lg",
348
+ "align": "center",
349
+ "children": [
350
+ {
351
+ "type": "icon",
352
+ "name": "check-circle",
353
+ "size": "lg"
354
+ },
355
+ {
356
+ "type": "alert",
357
+ "variant": "success",
358
+ "message": "Authenticated successfully"
359
+ },
360
+ {
361
+ "type": "stack",
362
+ "direction": "horizontal",
363
+ "gap": "sm",
364
+ "justify": "center",
365
+ "children": [
366
+ {
367
+ "type": "button",
368
+ "label": "Refresh Token",
369
+ "event": "REFRESH",
370
+ "variant": "outline",
371
+ "icon": "refresh-cw"
372
+ },
373
+ {
374
+ "type": "button",
375
+ "label": "Logout",
376
+ "event": "LOGOUT",
377
+ "variant": "ghost",
378
+ "icon": "log-out"
379
+ }
380
+ ]
381
+ }
382
+ ]
383
+ }
384
+ ]
385
+ ]
386
+ },
387
+ {
388
+ "from": "authenticated",
389
+ "to": "authenticated",
390
+ "event": "TOKEN_RECEIVED",
391
+ "effects": [
392
+ [
393
+ "set",
394
+ "@entity.accessToken",
395
+ "@payload.accessToken"
396
+ ],
397
+ [
398
+ "set",
399
+ "@entity.refreshToken",
400
+ "@payload.refreshToken"
401
+ ],
402
+ [
403
+ "set",
404
+ "@entity.authStatus",
405
+ "authenticated"
406
+ ],
407
+ [
408
+ "render-ui",
409
+ "main",
410
+ {
411
+ "type": "stack",
412
+ "direction": "vertical",
413
+ "gap": "lg",
414
+ "align": "center",
415
+ "children": [
416
+ {
417
+ "type": "icon",
418
+ "name": "check-circle",
419
+ "size": "lg"
420
+ },
421
+ {
422
+ "type": "alert",
423
+ "variant": "success",
424
+ "message": "Authenticated successfully"
425
+ },
426
+ {
427
+ "type": "stack",
428
+ "direction": "horizontal",
429
+ "gap": "sm",
430
+ "justify": "center",
431
+ "children": [
432
+ {
433
+ "type": "button",
434
+ "label": "Refresh Token",
435
+ "event": "REFRESH",
436
+ "variant": "outline",
437
+ "icon": "refresh-cw"
438
+ },
439
+ {
440
+ "type": "button",
441
+ "label": "Logout",
442
+ "event": "LOGOUT",
443
+ "variant": "ghost",
444
+ "icon": "log-out"
445
+ }
446
+ ]
447
+ }
448
+ ]
449
+ }
450
+ ]
451
+ ]
452
+ },
453
+ {
454
+ "from": "authenticated",
455
+ "to": "refreshing",
456
+ "event": "REFRESH",
457
+ "effects": [
458
+ [
459
+ "render-ui",
460
+ "main",
461
+ {
462
+ "type": "loading-state",
463
+ "title": "Refreshing token...",
464
+ "message": "Obtaining a new access token."
465
+ }
466
+ ],
467
+ [
468
+ "call-service",
469
+ "oauth",
470
+ "refresh",
471
+ {
472
+ "refreshToken": "@entity.refreshToken"
473
+ }
474
+ ]
475
+ ]
476
+ },
477
+ {
478
+ "from": "refreshing",
479
+ "to": "authenticated",
480
+ "event": "TOKEN_REFRESHED",
481
+ "effects": [
482
+ [
483
+ "set",
484
+ "@entity.accessToken",
485
+ "@payload.accessToken"
486
+ ],
487
+ [
488
+ "render-ui",
489
+ "main",
490
+ {
491
+ "type": "stack",
492
+ "direction": "vertical",
493
+ "gap": "lg",
494
+ "align": "center",
495
+ "children": [
496
+ {
497
+ "type": "icon",
498
+ "name": "check-circle",
499
+ "size": "lg"
500
+ },
501
+ {
502
+ "type": "alert",
503
+ "variant": "success",
504
+ "message": "Authenticated successfully"
505
+ },
506
+ {
507
+ "type": "stack",
508
+ "direction": "horizontal",
509
+ "gap": "sm",
510
+ "justify": "center",
511
+ "children": [
512
+ {
513
+ "type": "button",
514
+ "label": "Refresh Token",
515
+ "event": "REFRESH",
516
+ "variant": "outline",
517
+ "icon": "refresh-cw"
518
+ },
519
+ {
520
+ "type": "button",
521
+ "label": "Logout",
522
+ "event": "LOGOUT",
523
+ "variant": "ghost",
524
+ "icon": "log-out"
525
+ }
526
+ ]
527
+ }
528
+ ]
529
+ }
530
+ ]
531
+ ]
532
+ },
533
+ {
534
+ "from": "authenticated",
535
+ "to": "unauthenticated",
536
+ "event": "LOGOUT",
537
+ "effects": [
538
+ [
539
+ "set",
540
+ "@entity.authStatus",
541
+ "unauthenticated"
542
+ ],
543
+ [
544
+ "render-ui",
545
+ "main",
546
+ {
547
+ "type": "stack",
548
+ "direction": "vertical",
549
+ "gap": "lg",
550
+ "align": "center",
551
+ "children": [
552
+ {
553
+ "type": "stack",
554
+ "direction": "horizontal",
555
+ "gap": "md",
556
+ "align": "center",
557
+ "children": [
558
+ {
559
+ "type": "icon",
560
+ "name": "lock",
561
+ "size": "lg"
562
+ },
563
+ {
564
+ "type": "typography",
565
+ "content": "Sign In",
566
+ "variant": "h2"
567
+ }
568
+ ]
569
+ },
570
+ {
571
+ "type": "divider"
572
+ },
573
+ {
574
+ "type": "select",
575
+ "label": "Provider",
576
+ "field": "provider",
577
+ "bind": "@entity.provider",
578
+ "options": [
579
+ {
580
+ "label": "Google",
581
+ "value": "google"
582
+ },
583
+ {
584
+ "label": "GitHub",
585
+ "value": "github"
586
+ },
587
+ {
588
+ "label": "Microsoft",
589
+ "value": "microsoft"
590
+ }
591
+ ]
592
+ },
593
+ {
594
+ "type": "button",
595
+ "label": "Login",
596
+ "event": "LOGIN",
597
+ "variant": "primary",
598
+ "icon": "log-in"
599
+ }
600
+ ]
601
+ }
602
+ ]
603
+ ]
604
+ },
605
+ {
606
+ "from": "authorizing",
607
+ "to": "error",
608
+ "event": "FAILED",
609
+ "effects": [
610
+ [
611
+ "set",
612
+ "@entity.error",
613
+ "@payload.error"
614
+ ],
615
+ [
616
+ "render-ui",
617
+ "main",
618
+ {
619
+ "type": "stack",
620
+ "direction": "vertical",
621
+ "gap": "lg",
622
+ "align": "center",
623
+ "children": [
624
+ {
625
+ "type": "error-state",
626
+ "title": "Authentication Failed",
627
+ "message": "@entity.error",
628
+ "onRetry": "RETRY"
629
+ },
630
+ {
631
+ "type": "button",
632
+ "label": "Try Again",
633
+ "event": "RETRY",
634
+ "variant": "primary",
635
+ "icon": "rotate-ccw"
636
+ }
637
+ ]
638
+ }
639
+ ]
640
+ ]
641
+ },
642
+ {
643
+ "from": "refreshing",
644
+ "to": "error",
645
+ "event": "FAILED",
646
+ "effects": [
647
+ [
648
+ "set",
649
+ "@entity.error",
650
+ "@payload.error"
651
+ ],
652
+ [
653
+ "render-ui",
654
+ "main",
655
+ {
656
+ "type": "stack",
657
+ "direction": "vertical",
658
+ "gap": "lg",
659
+ "align": "center",
660
+ "children": [
661
+ {
662
+ "type": "error-state",
663
+ "title": "Authentication Failed",
664
+ "message": "@entity.error",
665
+ "onRetry": "RETRY"
666
+ },
667
+ {
668
+ "type": "button",
669
+ "label": "Try Again",
670
+ "event": "RETRY",
671
+ "variant": "primary",
672
+ "icon": "rotate-ccw"
673
+ }
674
+ ]
675
+ }
676
+ ]
677
+ ]
678
+ },
679
+ {
680
+ "from": "error",
681
+ "to": "unauthenticated",
682
+ "event": "RETRY",
683
+ "effects": [
684
+ [
685
+ "render-ui",
686
+ "main",
687
+ {
688
+ "type": "stack",
689
+ "direction": "vertical",
690
+ "gap": "lg",
691
+ "align": "center",
692
+ "children": [
693
+ {
694
+ "type": "stack",
695
+ "direction": "horizontal",
696
+ "gap": "md",
697
+ "align": "center",
698
+ "children": [
699
+ {
700
+ "type": "icon",
701
+ "name": "lock",
702
+ "size": "lg"
703
+ },
704
+ {
705
+ "type": "typography",
706
+ "content": "Sign In",
707
+ "variant": "h2"
708
+ }
709
+ ]
710
+ },
711
+ {
712
+ "type": "divider"
713
+ },
714
+ {
715
+ "type": "select",
716
+ "label": "Provider",
717
+ "field": "provider",
718
+ "bind": "@entity.provider",
719
+ "options": [
720
+ {
721
+ "label": "Google",
722
+ "value": "google"
723
+ },
724
+ {
725
+ "label": "GitHub",
726
+ "value": "github"
727
+ },
728
+ {
729
+ "label": "Microsoft",
730
+ "value": "microsoft"
731
+ }
732
+ ]
733
+ },
734
+ {
735
+ "type": "button",
736
+ "label": "Login",
737
+ "event": "LOGIN",
738
+ "variant": "primary",
739
+ "icon": "log-in"
740
+ }
741
+ ]
742
+ }
743
+ ]
744
+ ]
745
+ }
746
+ ]
747
+ }
748
+ }
749
+ ],
750
+ "pages": [
751
+ {
752
+ "name": "ServiceOauthPage",
753
+ "path": "/serviceoauths",
754
+ "traits": [
755
+ {
756
+ "ref": "ServiceOauthOauth"
757
+ }
758
+ ]
759
+ }
760
+ ]
761
+ }
762
+ ],
763
+ "description": "OAuth service integration behavior: authorize, token exchange, refresh. Wraps the `oauth` integration with a multi-step authorization flow. Pure function: params in, OrbitalDefinition out."
764
+ }