@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-custom-bearer",
3
- "version": "1.0.0",
4
- "description": "std-service-custom-bearer as a Function",
3
+ "version": "2.0.0",
4
+ "description": "std-service-custom-bearer Bearer-token HTTP service. Bind via `uses CustomBearer from \"std/behaviors/std-service-custom-bearer\"` and configure `endpoint` / `method` / `body` / `token` at the call site. Pass `uiTrait: \"@trait.YourBearerForm\"` to inject your own request form; leave unset to render the atom's default test form (standalone surface).",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "ServiceCustomBearerOrbital",
@@ -11,64 +11,193 @@
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": "endpoint",
19
+ "type": "string",
20
+ "default": ""
19
21
  },
20
22
  {
21
- "name": "description",
22
- "type": "string"
23
+ "name": "method",
24
+ "type": "string",
25
+ "default": "GET"
23
26
  },
24
27
  {
25
- "name": "status",
28
+ "name": "body",
26
29
  "type": "string",
27
- "default": "active",
28
- "values": [
29
- "active",
30
- "inactive",
31
- "pending"
32
- ]
30
+ "default": ""
33
31
  },
34
32
  {
35
- "name": "createdAt",
36
- "type": "string"
33
+ "name": "token",
34
+ "type": "string",
35
+ "default": ""
37
36
  },
38
37
  {
39
- "name": "endpoint",
40
- "type": "string"
38
+ "name": "callId",
39
+ "type": "string",
40
+ "default": ""
41
41
  },
42
42
  {
43
- "name": "method",
43
+ "name": "statusCode",
44
44
  "type": "string",
45
- "default": "GET"
45
+ "default": ""
46
46
  },
47
47
  {
48
- "name": "requestBody",
49
- "type": "string"
48
+ "name": "error",
49
+ "type": "string",
50
+ "default": ""
50
51
  },
51
52
  {
52
- "name": "responseData",
53
+ "name": "name",
53
54
  "type": "string"
54
55
  },
55
56
  {
56
- "name": "statusCode",
57
- "type": "string",
58
- "default": ""
57
+ "name": "description",
58
+ "type": "string"
59
59
  },
60
60
  {
61
- "name": "callStatus",
61
+ "name": "status",
62
62
  "type": "string",
63
- "default": "idle"
63
+ "default": "active",
64
+ "values": [
65
+ "active",
66
+ "inactive",
67
+ "pending"
68
+ ]
64
69
  },
65
70
  {
66
- "name": "error",
71
+ "name": "createdAt",
67
72
  "type": "string"
68
73
  }
69
74
  ]
70
75
  },
71
76
  "traits": [
77
+ {
78
+ "name": "ServiceCustomBearerDefaultForm",
79
+ "category": "interaction",
80
+ "emits": [
81
+ {
82
+ "event": "SEND",
83
+ "scope": "external",
84
+ "payloadSchema": [
85
+ {
86
+ "name": "source",
87
+ "type": "string"
88
+ }
89
+ ]
90
+ }
91
+ ],
92
+ "stateMachine": {
93
+ "states": [
94
+ {
95
+ "name": "ready",
96
+ "isInitial": true
97
+ }
98
+ ],
99
+ "events": [
100
+ {
101
+ "key": "INIT",
102
+ "name": "Initialize"
103
+ },
104
+ {
105
+ "key": "SEND",
106
+ "name": "Send"
107
+ }
108
+ ],
109
+ "transitions": [
110
+ {
111
+ "from": "ready",
112
+ "to": "ready",
113
+ "event": "INIT",
114
+ "effects": [
115
+ [
116
+ "render-ui",
117
+ "main",
118
+ {
119
+ "align": "center",
120
+ "type": "stack",
121
+ "gap": "lg",
122
+ "direction": "vertical",
123
+ "children": [
124
+ {
125
+ "children": [
126
+ {
127
+ "type": "icon",
128
+ "name": "shield"
129
+ },
130
+ {
131
+ "type": "typography",
132
+ "content": "Bearer API Tester",
133
+ "variant": "h2"
134
+ }
135
+ ],
136
+ "type": "stack",
137
+ "direction": "horizontal",
138
+ "gap": "md",
139
+ "align": "center"
140
+ },
141
+ {
142
+ "type": "divider"
143
+ },
144
+ {
145
+ "gap": "md",
146
+ "type": "stack",
147
+ "direction": "vertical",
148
+ "children": [
149
+ {
150
+ "options": [
151
+ {
152
+ "label": "GET",
153
+ "value": "GET"
154
+ },
155
+ {
156
+ "label": "POST",
157
+ "value": "POST"
158
+ },
159
+ {
160
+ "label": "PUT",
161
+ "value": "PUT"
162
+ },
163
+ {
164
+ "value": "DELETE",
165
+ "label": "DELETE"
166
+ }
167
+ ],
168
+ "type": "select"
169
+ },
170
+ {
171
+ "type": "input",
172
+ "placeholder": "/users"
173
+ },
174
+ {
175
+ "placeholder": "JSON request body",
176
+ "type": "textarea"
177
+ },
178
+ {
179
+ "inputType": "password",
180
+ "type": "input",
181
+ "placeholder": "Bearer token"
182
+ }
183
+ ]
184
+ },
185
+ {
186
+ "type": "button",
187
+ "variant": "primary",
188
+ "icon": "send",
189
+ "action": "SEND",
190
+ "label": "Send"
191
+ }
192
+ ]
193
+ }
194
+ ]
195
+ ]
196
+ }
197
+ ]
198
+ },
199
+ "scope": "instance"
200
+ },
72
201
  {
73
202
  "name": "ServiceCustomBearerCustomBearer",
74
203
  "category": "interaction",
@@ -95,9 +224,13 @@
95
224
  ]
96
225
  },
97
226
  {
98
- "event": "ServiceCustomBearerCustomBearerApiCompleted",
227
+ "event": "ServiceCustomBearerCustomBearerCompleted",
99
228
  "scope": "external",
100
229
  "payloadSchema": [
230
+ {
231
+ "name": "id",
232
+ "type": "string"
233
+ },
101
234
  {
102
235
  "name": "result",
103
236
  "type": "object"
@@ -105,7 +238,7 @@
105
238
  ]
106
239
  },
107
240
  {
108
- "event": "ServiceCustomBearerCustomBearerApiFailed",
241
+ "event": "ServiceCustomBearerCustomBearerFailed",
109
242
  "scope": "external",
110
243
  "payloadSchema": [
111
244
  {
@@ -117,6 +250,40 @@
117
250
  "type": "string"
118
251
  }
119
252
  ]
253
+ },
254
+ {
255
+ "event": "BearerDone",
256
+ "payloadSchema": [
257
+ {
258
+ "name": "id",
259
+ "type": "string",
260
+ "required": true
261
+ },
262
+ {
263
+ "name": "result",
264
+ "type": "object"
265
+ }
266
+ ]
267
+ },
268
+ {
269
+ "event": "FAILED",
270
+ "payloadSchema": [
271
+ {
272
+ "name": "error",
273
+ "type": "string",
274
+ "required": true
275
+ }
276
+ ]
277
+ }
278
+ ],
279
+ "listens": [
280
+ {
281
+ "event": "SEND",
282
+ "triggers": "SEND",
283
+ "source": {
284
+ "kind": "trait",
285
+ "trait": "ServiceCustomBearerDefaultForm"
286
+ }
120
287
  }
121
288
  ],
122
289
  "stateMachine": {
@@ -141,22 +308,41 @@
141
308
  "name": "Initialize"
142
309
  },
143
310
  {
144
- "key": "CALL_API",
145
- "name": "Call Api"
311
+ "key": "SEND",
312
+ "name": "Send"
146
313
  },
147
314
  {
148
- "key": "API_RESPONSE",
149
- "name": "Api Response",
315
+ "key": "ServiceCustomBearerLoaded",
316
+ "name": "ServiceCustomBearer loaded",
150
317
  "payloadSchema": [
151
318
  {
152
- "name": "data",
319
+ "name": "id",
320
+ "type": "string"
321
+ }
322
+ ]
323
+ },
324
+ {
325
+ "key": "ServiceCustomBearerLoadFailed",
326
+ "name": "ServiceCustomBearer load failed",
327
+ "payloadSchema": [
328
+ {
329
+ "name": "message",
330
+ "type": "string"
331
+ }
332
+ ]
333
+ },
334
+ {
335
+ "key": "BearerDone",
336
+ "name": "Bearer done",
337
+ "payloadSchema": [
338
+ {
339
+ "name": "id",
153
340
  "type": "string",
154
341
  "required": true
155
342
  },
156
343
  {
157
- "name": "statusCode",
158
- "type": "string",
159
- "required": true
344
+ "name": "result",
345
+ "type": "object"
160
346
  }
161
347
  ]
162
348
  },
@@ -176,77 +362,13 @@
176
362
  "name": "Reset"
177
363
  },
178
364
  {
179
- "key": "RETRY",
180
- "name": "Retry"
181
- },
182
- {
183
- "key": "ServiceCustomBearerLoaded",
184
- "name": "ServiceCustomBearer loaded",
365
+ "key": "ServiceCustomBearerCustomBearerCompleted",
366
+ "name": "ServiceCustomBearer custom bearer completed",
185
367
  "payloadSchema": [
186
368
  {
187
369
  "name": "id",
188
370
  "type": "string"
189
371
  },
190
- {
191
- "name": "name",
192
- "type": "string"
193
- },
194
- {
195
- "name": "description",
196
- "type": "string"
197
- },
198
- {
199
- "name": "status",
200
- "type": "string"
201
- },
202
- {
203
- "name": "createdAt",
204
- "type": "string"
205
- },
206
- {
207
- "name": "endpoint",
208
- "type": "string"
209
- },
210
- {
211
- "name": "method",
212
- "type": "string"
213
- },
214
- {
215
- "name": "requestBody",
216
- "type": "string"
217
- },
218
- {
219
- "name": "responseData",
220
- "type": "string"
221
- },
222
- {
223
- "name": "statusCode",
224
- "type": "string"
225
- },
226
- {
227
- "name": "callStatus",
228
- "type": "string"
229
- },
230
- {
231
- "name": "error",
232
- "type": "string"
233
- }
234
- ]
235
- },
236
- {
237
- "key": "ServiceCustomBearerLoadFailed",
238
- "name": "ServiceCustomBearer load failed",
239
- "payloadSchema": [
240
- {
241
- "name": "message",
242
- "type": "string"
243
- }
244
- ]
245
- },
246
- {
247
- "key": "ServiceCustomBearerCustomBearerApiCompleted",
248
- "name": "ServiceCustomBearer custom bearer api completed",
249
- "payloadSchema": [
250
372
  {
251
373
  "name": "result",
252
374
  "type": "object"
@@ -254,8 +376,8 @@
254
376
  ]
255
377
  },
256
378
  {
257
- "key": "ServiceCustomBearerCustomBearerApiFailed",
258
- "name": "ServiceCustomBearer custom bearer api failed",
379
+ "key": "ServiceCustomBearerCustomBearerFailed",
380
+ "name": "ServiceCustomBearer custom bearer failed",
259
381
  "payloadSchema": [
260
382
  {
261
383
  "name": "error",
@@ -266,6 +388,10 @@
266
388
  "type": "string"
267
389
  }
268
390
  ]
391
+ },
392
+ {
393
+ "key": "RETRY",
394
+ "name": "Retry"
269
395
  }
270
396
  ],
271
397
  "transitions": [
@@ -277,17 +403,22 @@
277
403
  [
278
404
  "set",
279
405
  "@entity.endpoint",
280
- ""
406
+ "@config.endpoint"
281
407
  ],
282
408
  [
283
409
  "set",
284
410
  "@entity.method",
285
- "GET"
411
+ "@config.method"
412
+ ],
413
+ [
414
+ "set",
415
+ "@entity.body",
416
+ "@config.body"
286
417
  ],
287
418
  [
288
419
  "set",
289
- "@entity.requestBody",
290
- ""
420
+ "@entity.token",
421
+ "@config.token"
291
422
  ],
292
423
  [
293
424
  "fetch",
@@ -303,57 +434,12 @@
303
434
  "render-ui",
304
435
  "main",
305
436
  {
306
- "gap": "lg",
307
- "type": "stack",
308
- "align": "center",
309
- "direction": "vertical",
310
437
  "children": [
311
- {
312
- "type": "icon",
313
- "name": "shield"
314
- },
315
- {
316
- "content": "Bearer API Tester",
317
- "variant": "h2",
318
- "type": "typography"
319
- },
320
- {
321
- "type": "input",
322
- "placeholder": "/users"
323
- },
324
- {
325
- "options": [
326
- {
327
- "label": "GET",
328
- "value": "GET"
329
- },
330
- {
331
- "value": "POST",
332
- "label": "POST"
333
- },
334
- {
335
- "label": "PUT",
336
- "value": "PUT"
337
- },
338
- {
339
- "label": "DELETE",
340
- "value": "DELETE"
341
- }
342
- ],
343
- "type": "select"
344
- },
345
- {
346
- "placeholder": "JSON request body",
347
- "type": "textarea"
348
- },
349
- {
350
- "label": "Send Request",
351
- "variant": "primary",
352
- "icon": "send",
353
- "type": "button",
354
- "action": "CALL_API"
355
- }
356
- ]
438
+ "@config.uiTrait"
439
+ ],
440
+ "direction": "vertical",
441
+ "gap": "md",
442
+ "type": "stack"
357
443
  }
358
444
  ]
359
445
  ]
@@ -361,86 +447,95 @@
361
447
  {
362
448
  "from": "idle",
363
449
  "to": "calling",
364
- "event": "CALL_API",
450
+ "event": "SEND",
365
451
  "effects": [
366
452
  [
367
453
  "render-ui",
368
454
  "main",
369
455
  {
370
456
  "type": "loading-state",
371
- "message": "Sending request to servicecustombearer endpoint...",
372
- "title": "Calling API..."
457
+ "title": "Calling API...",
458
+ "message": "Sending bearer-authenticated request..."
373
459
  }
374
460
  ],
375
461
  [
376
462
  "call-service",
377
- "custom-bearer-api",
378
- "execute",
463
+ "customBearer",
464
+ "@config.method",
379
465
  {
380
- "body": "@entity.requestBody",
381
- "method": "@entity.method",
382
- "endpoint": "@entity.endpoint"
466
+ "endpoint": "@config.endpoint",
467
+ "body": "@config.body",
468
+ "token": "@config.token"
383
469
  },
384
470
  {
385
471
  "emit": {
386
- "success": "ServiceCustomBearerCustomBearerApiCompleted",
387
- "failure": "ServiceCustomBearerCustomBearerApiFailed"
472
+ "failure": "FAILED",
473
+ "success": "BearerDone"
388
474
  }
389
475
  }
390
476
  ]
391
477
  ]
392
478
  },
479
+ {
480
+ "from": "idle",
481
+ "to": "idle",
482
+ "event": "ServiceCustomBearerLoaded"
483
+ },
484
+ {
485
+ "from": "idle",
486
+ "to": "idle",
487
+ "event": "ServiceCustomBearerLoadFailed"
488
+ },
393
489
  {
394
490
  "from": "calling",
395
491
  "to": "complete",
396
- "event": "API_RESPONSE",
492
+ "event": "BearerDone",
397
493
  "effects": [
398
494
  [
399
495
  "set",
400
- "@entity.responseData",
401
- "@payload.data"
496
+ "@entity.callId",
497
+ "@payload.id"
402
498
  ],
403
499
  [
404
- "set",
405
- "@entity.statusCode",
406
- "@payload.statusCode"
500
+ "emit",
501
+ "ServiceCustomBearerCustomBearerCompleted",
502
+ {
503
+ "id": "@payload.id",
504
+ "result": "@payload.result"
505
+ }
407
506
  ],
408
507
  [
409
508
  "render-ui",
410
509
  "main",
411
510
  {
412
- "align": "center",
511
+ "type": "stack",
512
+ "gap": "lg",
513
+ "direction": "vertical",
413
514
  "children": [
414
515
  {
415
516
  "type": "icon",
416
517
  "name": "check-circle"
417
518
  },
418
519
  {
419
- "type": "typography",
420
- "variant": "h2",
421
- "content": "Response"
422
- },
423
- {
424
- "label": "@entity.statusCode",
425
- "type": "badge",
426
- "variant": "info"
520
+ "type": "alert",
521
+ "message": "Request successful!",
522
+ "variant": "success"
427
523
  },
428
524
  {
429
- "type": "code-block",
430
- "code": "@entity.responseData",
431
- "language": "json"
525
+ "type": "typography",
526
+ "content": "@entity.callId",
527
+ "color": "muted",
528
+ "variant": "body"
432
529
  },
433
530
  {
434
- "action": "RESET",
435
- "label": "New Request",
436
531
  "variant": "ghost",
437
532
  "icon": "rotate-ccw",
438
- "type": "button"
533
+ "type": "button",
534
+ "label": "New Request",
535
+ "action": "RESET"
439
536
  }
440
537
  ],
441
- "type": "stack",
442
- "direction": "vertical",
443
- "gap": "lg"
538
+ "align": "center"
444
539
  }
445
540
  ]
446
541
  ]
@@ -455,14 +550,22 @@
455
550
  "@entity.error",
456
551
  "@payload.error"
457
552
  ],
553
+ [
554
+ "emit",
555
+ "ServiceCustomBearerCustomBearerFailed",
556
+ {
557
+ "error": "@entity.error",
558
+ "code": "bearer_call_failed"
559
+ }
560
+ ],
458
561
  [
459
562
  "render-ui",
460
563
  "main",
461
564
  {
462
- "onRetry": "RETRY",
565
+ "type": "error-state",
463
566
  "message": "@entity.error",
464
567
  "title": "Request Failed",
465
- "type": "error-state"
568
+ "onRetry": "RETRY"
466
569
  }
467
570
  ]
468
571
  ]
@@ -476,61 +579,26 @@
476
579
  "render-ui",
477
580
  "main",
478
581
  {
479
- "align": "center",
480
582
  "type": "stack",
481
- "direction": "vertical",
482
- "gap": "lg",
483
583
  "children": [
484
- {
485
- "type": "icon",
486
- "name": "shield"
487
- },
488
- {
489
- "type": "typography",
490
- "content": "Bearer API Tester",
491
- "variant": "h2"
492
- },
493
- {
494
- "type": "input",
495
- "placeholder": "/users"
496
- },
497
- {
498
- "options": [
499
- {
500
- "value": "GET",
501
- "label": "GET"
502
- },
503
- {
504
- "value": "POST",
505
- "label": "POST"
506
- },
507
- {
508
- "value": "PUT",
509
- "label": "PUT"
510
- },
511
- {
512
- "label": "DELETE",
513
- "value": "DELETE"
514
- }
515
- ],
516
- "type": "select"
517
- },
518
- {
519
- "type": "textarea",
520
- "placeholder": "JSON request body"
521
- },
522
- {
523
- "type": "button",
524
- "action": "CALL_API",
525
- "icon": "send",
526
- "label": "Send Request",
527
- "variant": "primary"
528
- }
529
- ]
584
+ "@config.uiTrait"
585
+ ],
586
+ "direction": "vertical",
587
+ "gap": "md"
530
588
  }
531
589
  ]
532
590
  ]
533
591
  },
592
+ {
593
+ "from": "complete",
594
+ "to": "complete",
595
+ "event": "ServiceCustomBearerCustomBearerCompleted"
596
+ },
597
+ {
598
+ "from": "error",
599
+ "to": "error",
600
+ "event": "ServiceCustomBearerCustomBearerFailed"
601
+ },
534
602
  {
535
603
  "from": "error",
536
604
  "to": "idle",
@@ -540,57 +608,12 @@
540
608
  "render-ui",
541
609
  "main",
542
610
  {
543
- "direction": "vertical",
544
- "gap": "lg",
545
- "align": "center",
546
- "type": "stack",
547
611
  "children": [
548
- {
549
- "type": "icon",
550
- "name": "shield"
551
- },
552
- {
553
- "type": "typography",
554
- "variant": "h2",
555
- "content": "Bearer API Tester"
556
- },
557
- {
558
- "type": "input",
559
- "placeholder": "/users"
560
- },
561
- {
562
- "options": [
563
- {
564
- "value": "GET",
565
- "label": "GET"
566
- },
567
- {
568
- "label": "POST",
569
- "value": "POST"
570
- },
571
- {
572
- "value": "PUT",
573
- "label": "PUT"
574
- },
575
- {
576
- "label": "DELETE",
577
- "value": "DELETE"
578
- }
579
- ],
580
- "type": "select"
581
- },
582
- {
583
- "placeholder": "JSON request body",
584
- "type": "textarea"
585
- },
586
- {
587
- "icon": "send",
588
- "label": "Send Request",
589
- "variant": "primary",
590
- "action": "CALL_API",
591
- "type": "button"
592
- }
593
- ]
612
+ "@config.uiTrait"
613
+ ],
614
+ "gap": "md",
615
+ "type": "stack",
616
+ "direction": "vertical"
594
617
  }
595
618
  ]
596
619
  ]
@@ -604,63 +627,46 @@
604
627
  "render-ui",
605
628
  "main",
606
629
  {
607
- "children": [
608
- {
609
- "type": "icon",
610
- "name": "shield"
611
- },
612
- {
613
- "content": "Bearer API Tester",
614
- "type": "typography",
615
- "variant": "h2"
616
- },
617
- {
618
- "placeholder": "/users",
619
- "type": "input"
620
- },
621
- {
622
- "type": "select",
623
- "options": [
624
- {
625
- "label": "GET",
626
- "value": "GET"
627
- },
628
- {
629
- "label": "POST",
630
- "value": "POST"
631
- },
632
- {
633
- "label": "PUT",
634
- "value": "PUT"
635
- },
636
- {
637
- "value": "DELETE",
638
- "label": "DELETE"
639
- }
640
- ]
641
- },
642
- {
643
- "placeholder": "JSON request body",
644
- "type": "textarea"
645
- },
646
- {
647
- "label": "Send Request",
648
- "action": "CALL_API",
649
- "type": "button",
650
- "variant": "primary",
651
- "icon": "send"
652
- }
653
- ],
654
630
  "type": "stack",
655
631
  "direction": "vertical",
656
- "align": "center",
657
- "gap": "lg"
632
+ "gap": "md",
633
+ "children": [
634
+ "@config.uiTrait"
635
+ ]
658
636
  }
659
637
  ]
660
638
  ]
661
639
  }
662
640
  ]
663
641
  },
642
+ "config": {
643
+ "uiTrait": {
644
+ "type": "trait",
645
+ "default": "@trait.ServiceCustomBearerDefaultForm"
646
+ },
647
+ "body": {
648
+ "type": "string",
649
+ "default": ""
650
+ },
651
+ "token": {
652
+ "type": "string",
653
+ "default": ""
654
+ },
655
+ "method": {
656
+ "type": "string",
657
+ "default": "GET",
658
+ "values": [
659
+ "GET",
660
+ "POST",
661
+ "PUT",
662
+ "DELETE"
663
+ ]
664
+ },
665
+ "endpoint": {
666
+ "type": "string",
667
+ "default": ""
668
+ }
669
+ },
664
670
  "scope": "instance"
665
671
  }
666
672
  ],