@almadar/std 15.15.0 → 15.15.1

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 (273) hide show
  1. package/behaviors/registry/app/atoms/std-ap-bill.orb +423 -171
  2. package/behaviors/registry/app/atoms/std-applicant.orb +207 -165
  3. package/behaviors/registry/app/atoms/std-application.orb +300 -188
  4. package/behaviors/registry/app/atoms/std-approval-request.orb +370 -215
  5. package/behaviors/registry/app/atoms/std-campaign-goal.orb +382 -167
  6. package/behaviors/registry/app/atoms/std-change-order.orb +458 -194
  7. package/behaviors/registry/app/atoms/std-chart-of-accounts.orb +201 -130
  8. package/behaviors/registry/app/atoms/std-checkin.orb +215 -151
  9. package/behaviors/registry/app/atoms/std-checkout-terminal.orb +322 -133
  10. package/behaviors/registry/app/atoms/std-class-roster.orb +343 -170
  11. package/behaviors/registry/app/atoms/std-class-session.orb +321 -190
  12. package/behaviors/registry/app/atoms/std-court-deadline.orb +353 -182
  13. package/behaviors/registry/app/atoms/std-customer-account.orb +376 -157
  14. package/behaviors/registry/app/atoms/std-donation-receipt.orb +214 -143
  15. package/behaviors/registry/app/atoms/std-donor.orb +191 -156
  16. package/behaviors/registry/app/atoms/std-drip-sequence.orb +409 -170
  17. package/behaviors/registry/app/atoms/std-driver.orb +440 -202
  18. package/behaviors/registry/app/atoms/std-dunning.orb +431 -167
  19. package/behaviors/registry/app/atoms/std-email-broadcast.orb +386 -143
  20. package/behaviors/registry/app/atoms/std-event.orb +309 -178
  21. package/behaviors/registry/app/atoms/std-form-builder.orb +353 -220
  22. package/behaviors/registry/app/atoms/std-health-score.orb +218 -183
  23. package/behaviors/registry/app/atoms/std-help-article.orb +425 -162
  24. package/behaviors/registry/app/atoms/std-help-category.orb +409 -166
  25. package/behaviors/registry/app/atoms/std-interview-slot.orb +311 -138
  26. package/behaviors/registry/app/atoms/std-invoice.orb +349 -211
  27. package/behaviors/registry/app/atoms/std-kitchen-display.orb +308 -184
  28. package/behaviors/registry/app/atoms/std-lease.orb +411 -178
  29. package/behaviors/registry/app/atoms/std-ledger-entry.orb +266 -195
  30. package/behaviors/registry/app/atoms/std-maintenance-request.orb +396 -177
  31. package/behaviors/registry/app/atoms/std-matter.orb +415 -189
  32. package/behaviors/registry/app/atoms/std-membership.orb +387 -167
  33. package/behaviors/registry/app/atoms/std-menu.orb +232 -175
  34. package/behaviors/registry/app/atoms/std-modifier-group.orb +224 -167
  35. package/behaviors/registry/app/atoms/std-nps-survey.orb +390 -138
  36. package/behaviors/registry/app/atoms/std-offer-letter.orb +242 -133
  37. package/behaviors/registry/app/atoms/std-payout-ledger.orb +428 -176
  38. package/behaviors/registry/app/atoms/std-question-bank.orb +211 -145
  39. package/behaviors/registry/app/atoms/std-receipt.orb +248 -177
  40. package/behaviors/registry/app/atoms/std-recurring-charge.orb +421 -149
  41. package/behaviors/registry/app/atoms/std-renewal-risk.orb +382 -153
  42. package/behaviors/registry/app/atoms/std-rent-charge.orb +476 -176
  43. package/behaviors/registry/app/atoms/std-reorder-rule.orb +246 -176
  44. package/behaviors/registry/app/atoms/std-response-collector.orb +213 -150
  45. package/behaviors/registry/app/atoms/std-rfi.orb +365 -210
  46. package/behaviors/registry/app/atoms/std-route-optimize.orb +195 -146
  47. package/behaviors/registry/app/atoms/std-segment.orb +173 -139
  48. package/behaviors/registry/app/atoms/std-stock-level.orb +205 -135
  49. package/behaviors/registry/app/atoms/std-submittal.orb +323 -166
  50. package/behaviors/registry/app/atoms/std-table-map.orb +187 -63
  51. package/behaviors/registry/app/atoms/std-technician-dispatch.orb +290 -202
  52. package/behaviors/registry/app/atoms/std-telematics-event.orb +156 -128
  53. package/behaviors/registry/app/atoms/std-template-editor.orb +255 -189
  54. package/behaviors/registry/app/atoms/std-tenant.orb +375 -147
  55. package/behaviors/registry/app/atoms/std-ticket-tier.orb +463 -150
  56. package/behaviors/registry/app/atoms/std-time-entry.orb +259 -150
  57. package/behaviors/registry/app/atoms/std-timesheet.orb +292 -183
  58. package/behaviors/registry/app/atoms/std-trial.orb +401 -183
  59. package/behaviors/registry/app/atoms/std-vehicle.orb +447 -205
  60. package/behaviors/registry/app/atoms/std-vendor-onboarding.orb +289 -245
  61. package/behaviors/registry/app/atoms/std-waitlist.orb +308 -177
  62. package/behaviors/registry/app/atoms/std-warehouse.orb +211 -141
  63. package/behaviors/registry/app/atoms/std-work-order.orb +374 -219
  64. package/behaviors/registry/app/organisms/std-subscription-billing.orb +282 -195
  65. package/behaviors/registry/core/atoms/std-approval-gate.orb +703 -0
  66. package/behaviors/registry/core/atoms/std-audit-capture.orb +150 -64
  67. package/behaviors/registry/core/atoms/std-data-erasure.orb +546 -0
  68. package/behaviors/registry/core/atoms/std-lifecycle.orb +343 -0
  69. package/behaviors/registry/core/atoms/std-notify-on-event.orb +132 -46
  70. package/behaviors/registry/core/atoms/std-reminder-scheduler.orb +330 -0
  71. package/behaviors/registry/marketing/atoms/std-marketing-article.orb +96 -0
  72. package/behaviors/registry/marketing/atoms/std-marketing-case-studies.orb +243 -0
  73. package/behaviors/registry/marketing/atoms/std-marketing-community.orb +134 -0
  74. package/behaviors/registry/marketing/atoms/std-marketing-cta.orb +206 -0
  75. package/behaviors/registry/marketing/atoms/std-marketing-features.orb +193 -0
  76. package/behaviors/registry/marketing/atoms/std-marketing-footer.orb +192 -0
  77. package/behaviors/registry/marketing/atoms/std-marketing-hero.orb +262 -0
  78. package/behaviors/registry/marketing/atoms/std-marketing-nav.orb +190 -0
  79. package/behaviors/registry/marketing/atoms/std-marketing-pricing.orb +232 -0
  80. package/behaviors/registry/marketing/atoms/std-marketing-showcase.orb +276 -0
  81. package/behaviors/registry/marketing/atoms/std-marketing-split.orb +135 -0
  82. package/behaviors/registry/marketing/atoms/std-marketing-stats.orb +120 -0
  83. package/behaviors/registry/marketing/atoms/std-marketing-steps.orb +179 -0
  84. package/behaviors/registry/marketing/atoms/std-marketing-team.orb +192 -0
  85. package/behaviors/registry/marketing/atoms/std-marketing-testimonials.orb +124 -0
  86. package/behaviors/registry/marketing/molecules/std-about-page.orb +440 -0
  87. package/behaviors/registry/marketing/molecules/std-feature-detail-page.orb +371 -0
  88. package/behaviors/registry/marketing/molecules/std-landing-page.orb +521 -0
  89. package/behaviors/registry/marketing/molecules/std-pricing-page.orb +406 -0
  90. package/behaviors/registry/marketing/organisms/std-marketing-site.orb +1654 -0
  91. package/dist/behaviors/behaviors-registry.json +2913 -156
  92. package/dist/behaviors/registry/app/atoms/std-ap-bill.orb +423 -171
  93. package/dist/behaviors/registry/app/atoms/std-applicant.orb +207 -165
  94. package/dist/behaviors/registry/app/atoms/std-application.orb +300 -188
  95. package/dist/behaviors/registry/app/atoms/std-approval-request.orb +370 -215
  96. package/dist/behaviors/registry/app/atoms/std-campaign-goal.orb +382 -167
  97. package/dist/behaviors/registry/app/atoms/std-change-order.orb +458 -194
  98. package/dist/behaviors/registry/app/atoms/std-chart-of-accounts.orb +201 -130
  99. package/dist/behaviors/registry/app/atoms/std-checkin.orb +215 -151
  100. package/dist/behaviors/registry/app/atoms/std-checkout-terminal.orb +322 -133
  101. package/dist/behaviors/registry/app/atoms/std-class-roster.orb +343 -170
  102. package/dist/behaviors/registry/app/atoms/std-class-session.orb +321 -190
  103. package/dist/behaviors/registry/app/atoms/std-court-deadline.orb +353 -182
  104. package/dist/behaviors/registry/app/atoms/std-customer-account.orb +376 -157
  105. package/dist/behaviors/registry/app/atoms/std-donation-receipt.orb +214 -143
  106. package/dist/behaviors/registry/app/atoms/std-donor.orb +191 -156
  107. package/dist/behaviors/registry/app/atoms/std-drip-sequence.orb +409 -170
  108. package/dist/behaviors/registry/app/atoms/std-driver.orb +440 -202
  109. package/dist/behaviors/registry/app/atoms/std-dunning.orb +431 -167
  110. package/dist/behaviors/registry/app/atoms/std-email-broadcast.orb +386 -143
  111. package/dist/behaviors/registry/app/atoms/std-event.orb +309 -178
  112. package/dist/behaviors/registry/app/atoms/std-form-builder.orb +353 -220
  113. package/dist/behaviors/registry/app/atoms/std-health-score.orb +218 -183
  114. package/dist/behaviors/registry/app/atoms/std-help-article.orb +425 -162
  115. package/dist/behaviors/registry/app/atoms/std-help-category.orb +409 -166
  116. package/dist/behaviors/registry/app/atoms/std-interview-slot.orb +311 -138
  117. package/dist/behaviors/registry/app/atoms/std-invoice.orb +349 -211
  118. package/dist/behaviors/registry/app/atoms/std-kitchen-display.orb +308 -184
  119. package/dist/behaviors/registry/app/atoms/std-lease.orb +411 -178
  120. package/dist/behaviors/registry/app/atoms/std-ledger-entry.orb +266 -195
  121. package/dist/behaviors/registry/app/atoms/std-maintenance-request.orb +396 -177
  122. package/dist/behaviors/registry/app/atoms/std-matter.orb +415 -189
  123. package/dist/behaviors/registry/app/atoms/std-membership.orb +387 -167
  124. package/dist/behaviors/registry/app/atoms/std-menu.orb +232 -175
  125. package/dist/behaviors/registry/app/atoms/std-modifier-group.orb +224 -167
  126. package/dist/behaviors/registry/app/atoms/std-nps-survey.orb +390 -138
  127. package/dist/behaviors/registry/app/atoms/std-offer-letter.orb +242 -133
  128. package/dist/behaviors/registry/app/atoms/std-payout-ledger.orb +428 -176
  129. package/dist/behaviors/registry/app/atoms/std-question-bank.orb +211 -145
  130. package/dist/behaviors/registry/app/atoms/std-receipt.orb +248 -177
  131. package/dist/behaviors/registry/app/atoms/std-recurring-charge.orb +421 -149
  132. package/dist/behaviors/registry/app/atoms/std-renewal-risk.orb +382 -153
  133. package/dist/behaviors/registry/app/atoms/std-rent-charge.orb +476 -176
  134. package/dist/behaviors/registry/app/atoms/std-reorder-rule.orb +246 -176
  135. package/dist/behaviors/registry/app/atoms/std-response-collector.orb +213 -150
  136. package/dist/behaviors/registry/app/atoms/std-rfi.orb +365 -210
  137. package/dist/behaviors/registry/app/atoms/std-route-optimize.orb +195 -146
  138. package/dist/behaviors/registry/app/atoms/std-segment.orb +173 -139
  139. package/dist/behaviors/registry/app/atoms/std-stock-level.orb +205 -135
  140. package/dist/behaviors/registry/app/atoms/std-submittal.orb +323 -166
  141. package/dist/behaviors/registry/app/atoms/std-table-map.orb +187 -63
  142. package/dist/behaviors/registry/app/atoms/std-technician-dispatch.orb +290 -202
  143. package/dist/behaviors/registry/app/atoms/std-telematics-event.orb +156 -128
  144. package/dist/behaviors/registry/app/atoms/std-template-editor.orb +255 -189
  145. package/dist/behaviors/registry/app/atoms/std-tenant.orb +375 -147
  146. package/dist/behaviors/registry/app/atoms/std-ticket-tier.orb +463 -150
  147. package/dist/behaviors/registry/app/atoms/std-time-entry.orb +259 -150
  148. package/dist/behaviors/registry/app/atoms/std-timesheet.orb +292 -183
  149. package/dist/behaviors/registry/app/atoms/std-trial.orb +401 -183
  150. package/dist/behaviors/registry/app/atoms/std-vehicle.orb +447 -205
  151. package/dist/behaviors/registry/app/atoms/std-vendor-onboarding.orb +289 -245
  152. package/dist/behaviors/registry/app/atoms/std-waitlist.orb +308 -177
  153. package/dist/behaviors/registry/app/atoms/std-warehouse.orb +211 -141
  154. package/dist/behaviors/registry/app/atoms/std-work-order.orb +374 -219
  155. package/dist/behaviors/registry/app/organisms/std-subscription-billing.orb +282 -195
  156. package/dist/behaviors/registry/core/atoms/std-approval-gate.orb +703 -0
  157. package/dist/behaviors/registry/core/atoms/std-audit-capture.orb +150 -64
  158. package/dist/behaviors/registry/core/atoms/std-data-erasure.orb +546 -0
  159. package/dist/behaviors/registry/core/atoms/std-lifecycle.orb +343 -0
  160. package/dist/behaviors/registry/core/atoms/std-notify-on-event.orb +132 -46
  161. package/dist/behaviors/registry/core/atoms/std-reminder-scheduler.orb +330 -0
  162. package/dist/behaviors/registry/marketing/atoms/std-marketing-article.orb +96 -0
  163. package/dist/behaviors/registry/marketing/atoms/std-marketing-case-studies.orb +243 -0
  164. package/dist/behaviors/registry/marketing/atoms/std-marketing-community.orb +134 -0
  165. package/dist/behaviors/registry/marketing/atoms/std-marketing-cta.orb +206 -0
  166. package/dist/behaviors/registry/marketing/atoms/std-marketing-features.orb +193 -0
  167. package/dist/behaviors/registry/marketing/atoms/std-marketing-footer.orb +192 -0
  168. package/dist/behaviors/registry/marketing/atoms/std-marketing-hero.orb +262 -0
  169. package/dist/behaviors/registry/marketing/atoms/std-marketing-nav.orb +190 -0
  170. package/dist/behaviors/registry/marketing/atoms/std-marketing-pricing.orb +232 -0
  171. package/dist/behaviors/registry/marketing/atoms/std-marketing-showcase.orb +276 -0
  172. package/dist/behaviors/registry/marketing/atoms/std-marketing-split.orb +135 -0
  173. package/dist/behaviors/registry/marketing/atoms/std-marketing-stats.orb +120 -0
  174. package/dist/behaviors/registry/marketing/atoms/std-marketing-steps.orb +179 -0
  175. package/dist/behaviors/registry/marketing/atoms/std-marketing-team.orb +192 -0
  176. package/dist/behaviors/registry/marketing/atoms/std-marketing-testimonials.orb +124 -0
  177. package/dist/behaviors/registry/marketing/molecules/std-about-page.orb +440 -0
  178. package/dist/behaviors/registry/marketing/molecules/std-feature-detail-page.orb +371 -0
  179. package/dist/behaviors/registry/marketing/molecules/std-landing-page.orb +521 -0
  180. package/dist/behaviors/registry/marketing/molecules/std-pricing-page.orb +406 -0
  181. package/dist/behaviors/registry/marketing/organisms/std-marketing-site.orb +1654 -0
  182. package/dist/behaviors-registry.json +2913 -156
  183. package/dist/registry/app/atoms/std-ap-bill.orb +423 -171
  184. package/dist/registry/app/atoms/std-applicant.orb +207 -165
  185. package/dist/registry/app/atoms/std-application.orb +300 -188
  186. package/dist/registry/app/atoms/std-approval-request.orb +370 -215
  187. package/dist/registry/app/atoms/std-campaign-goal.orb +382 -167
  188. package/dist/registry/app/atoms/std-change-order.orb +458 -194
  189. package/dist/registry/app/atoms/std-chart-of-accounts.orb +201 -130
  190. package/dist/registry/app/atoms/std-checkin.orb +215 -151
  191. package/dist/registry/app/atoms/std-checkout-terminal.orb +322 -133
  192. package/dist/registry/app/atoms/std-class-roster.orb +343 -170
  193. package/dist/registry/app/atoms/std-class-session.orb +321 -190
  194. package/dist/registry/app/atoms/std-court-deadline.orb +353 -182
  195. package/dist/registry/app/atoms/std-customer-account.orb +376 -157
  196. package/dist/registry/app/atoms/std-donation-receipt.orb +214 -143
  197. package/dist/registry/app/atoms/std-donor.orb +191 -156
  198. package/dist/registry/app/atoms/std-drip-sequence.orb +409 -170
  199. package/dist/registry/app/atoms/std-driver.orb +440 -202
  200. package/dist/registry/app/atoms/std-dunning.orb +431 -167
  201. package/dist/registry/app/atoms/std-email-broadcast.orb +386 -143
  202. package/dist/registry/app/atoms/std-event.orb +309 -178
  203. package/dist/registry/app/atoms/std-form-builder.orb +353 -220
  204. package/dist/registry/app/atoms/std-health-score.orb +218 -183
  205. package/dist/registry/app/atoms/std-help-article.orb +425 -162
  206. package/dist/registry/app/atoms/std-help-category.orb +409 -166
  207. package/dist/registry/app/atoms/std-interview-slot.orb +311 -138
  208. package/dist/registry/app/atoms/std-invoice.orb +349 -211
  209. package/dist/registry/app/atoms/std-kitchen-display.orb +308 -184
  210. package/dist/registry/app/atoms/std-lease.orb +411 -178
  211. package/dist/registry/app/atoms/std-ledger-entry.orb +266 -195
  212. package/dist/registry/app/atoms/std-maintenance-request.orb +396 -177
  213. package/dist/registry/app/atoms/std-matter.orb +415 -189
  214. package/dist/registry/app/atoms/std-membership.orb +387 -167
  215. package/dist/registry/app/atoms/std-menu.orb +232 -175
  216. package/dist/registry/app/atoms/std-modifier-group.orb +224 -167
  217. package/dist/registry/app/atoms/std-nps-survey.orb +390 -138
  218. package/dist/registry/app/atoms/std-offer-letter.orb +242 -133
  219. package/dist/registry/app/atoms/std-payout-ledger.orb +428 -176
  220. package/dist/registry/app/atoms/std-question-bank.orb +211 -145
  221. package/dist/registry/app/atoms/std-receipt.orb +248 -177
  222. package/dist/registry/app/atoms/std-recurring-charge.orb +421 -149
  223. package/dist/registry/app/atoms/std-renewal-risk.orb +382 -153
  224. package/dist/registry/app/atoms/std-rent-charge.orb +476 -176
  225. package/dist/registry/app/atoms/std-reorder-rule.orb +246 -176
  226. package/dist/registry/app/atoms/std-response-collector.orb +213 -150
  227. package/dist/registry/app/atoms/std-rfi.orb +365 -210
  228. package/dist/registry/app/atoms/std-route-optimize.orb +195 -146
  229. package/dist/registry/app/atoms/std-segment.orb +173 -139
  230. package/dist/registry/app/atoms/std-stock-level.orb +205 -135
  231. package/dist/registry/app/atoms/std-submittal.orb +323 -166
  232. package/dist/registry/app/atoms/std-table-map.orb +187 -63
  233. package/dist/registry/app/atoms/std-technician-dispatch.orb +290 -202
  234. package/dist/registry/app/atoms/std-telematics-event.orb +156 -128
  235. package/dist/registry/app/atoms/std-template-editor.orb +255 -189
  236. package/dist/registry/app/atoms/std-tenant.orb +375 -147
  237. package/dist/registry/app/atoms/std-ticket-tier.orb +463 -150
  238. package/dist/registry/app/atoms/std-time-entry.orb +259 -150
  239. package/dist/registry/app/atoms/std-timesheet.orb +292 -183
  240. package/dist/registry/app/atoms/std-trial.orb +401 -183
  241. package/dist/registry/app/atoms/std-vehicle.orb +447 -205
  242. package/dist/registry/app/atoms/std-vendor-onboarding.orb +289 -245
  243. package/dist/registry/app/atoms/std-waitlist.orb +308 -177
  244. package/dist/registry/app/atoms/std-warehouse.orb +211 -141
  245. package/dist/registry/app/atoms/std-work-order.orb +374 -219
  246. package/dist/registry/app/organisms/std-subscription-billing.orb +282 -195
  247. package/dist/registry/core/atoms/std-approval-gate.orb +703 -0
  248. package/dist/registry/core/atoms/std-audit-capture.orb +150 -64
  249. package/dist/registry/core/atoms/std-data-erasure.orb +546 -0
  250. package/dist/registry/core/atoms/std-lifecycle.orb +343 -0
  251. package/dist/registry/core/atoms/std-notify-on-event.orb +132 -46
  252. package/dist/registry/core/atoms/std-reminder-scheduler.orb +330 -0
  253. package/dist/registry/marketing/atoms/std-marketing-article.orb +96 -0
  254. package/dist/registry/marketing/atoms/std-marketing-case-studies.orb +243 -0
  255. package/dist/registry/marketing/atoms/std-marketing-community.orb +134 -0
  256. package/dist/registry/marketing/atoms/std-marketing-cta.orb +206 -0
  257. package/dist/registry/marketing/atoms/std-marketing-features.orb +193 -0
  258. package/dist/registry/marketing/atoms/std-marketing-footer.orb +192 -0
  259. package/dist/registry/marketing/atoms/std-marketing-hero.orb +262 -0
  260. package/dist/registry/marketing/atoms/std-marketing-nav.orb +190 -0
  261. package/dist/registry/marketing/atoms/std-marketing-pricing.orb +232 -0
  262. package/dist/registry/marketing/atoms/std-marketing-showcase.orb +276 -0
  263. package/dist/registry/marketing/atoms/std-marketing-split.orb +135 -0
  264. package/dist/registry/marketing/atoms/std-marketing-stats.orb +120 -0
  265. package/dist/registry/marketing/atoms/std-marketing-steps.orb +179 -0
  266. package/dist/registry/marketing/atoms/std-marketing-team.orb +192 -0
  267. package/dist/registry/marketing/atoms/std-marketing-testimonials.orb +124 -0
  268. package/dist/registry/marketing/molecules/std-about-page.orb +440 -0
  269. package/dist/registry/marketing/molecules/std-feature-detail-page.orb +371 -0
  270. package/dist/registry/marketing/molecules/std-landing-page.orb +521 -0
  271. package/dist/registry/marketing/molecules/std-pricing-page.orb +406 -0
  272. package/dist/registry/marketing/organisms/std-marketing-site.orb +1654 -0
  273. package/package.json +1 -1
@@ -0,0 +1,703 @@
1
+ {
2
+ "name": "std-approval-gate",
3
+ "version": "1.0.0",
4
+ "description": "std-approval-gate — generic approval workflow. Persists ApprovalRequest rows + surfaces them in a review queue with Approve / Deny actions. On approval emits ApprovalGranted; on denial emits ApprovalDenied. Differs from std-mod-queue, which is content-moderation-specific. v1.0 ships the queue + review UI; sentinel-event-driven auto-approval threshold lands in v1.1 (gap).",
5
+ "orbitals": [
6
+ {
7
+ "name": "ApprovalGateOrbital",
8
+ "entity": {
9
+ "name": "ApprovalRequest",
10
+ "collection": "approval_requests",
11
+ "persistence": "persistent",
12
+ "fields": [
13
+ {
14
+ "name": "id",
15
+ "type": "string",
16
+ "required": true
17
+ },
18
+ {
19
+ "name": "gatedEvent",
20
+ "type": "string",
21
+ "default": ""
22
+ },
23
+ {
24
+ "name": "status",
25
+ "type": "string",
26
+ "default": "pending",
27
+ "values": [
28
+ "pending",
29
+ "approved",
30
+ "denied",
31
+ "escalated"
32
+ ]
33
+ },
34
+ {
35
+ "name": "reviewer",
36
+ "type": "string",
37
+ "default": ""
38
+ },
39
+ {
40
+ "name": "requestedAt",
41
+ "type": "number",
42
+ "default": 0.0
43
+ },
44
+ {
45
+ "name": "decidedAt",
46
+ "type": "number",
47
+ "default": 0.0
48
+ },
49
+ {
50
+ "name": "escalatedAt",
51
+ "type": "number",
52
+ "default": 0.0
53
+ },
54
+ {
55
+ "name": "notes",
56
+ "type": "string",
57
+ "default": ""
58
+ }
59
+ ]
60
+ },
61
+ "traits": [
62
+ {
63
+ "name": "ApprovalGateReview",
64
+ "category": "interaction",
65
+ "linkedEntity": "ApprovalRequest",
66
+ "emits": [
67
+ {
68
+ "event": "APPROVE",
69
+ "payloadSchema": [
70
+ {
71
+ "name": "id",
72
+ "type": "string",
73
+ "required": true
74
+ },
75
+ {
76
+ "name": "row.id",
77
+ "type": "string",
78
+ "required": true
79
+ },
80
+ {
81
+ "name": "row.gatedEvent",
82
+ "type": "string"
83
+ },
84
+ {
85
+ "name": "row.status",
86
+ "type": "string"
87
+ },
88
+ {
89
+ "name": "row.reviewer",
90
+ "type": "string"
91
+ },
92
+ {
93
+ "name": "row.requestedAt",
94
+ "type": "number"
95
+ },
96
+ {
97
+ "name": "row.decidedAt",
98
+ "type": "number"
99
+ },
100
+ {
101
+ "name": "row.escalatedAt",
102
+ "type": "number"
103
+ },
104
+ {
105
+ "name": "row.notes",
106
+ "type": "string"
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "event": "DENY",
112
+ "payloadSchema": [
113
+ {
114
+ "name": "id",
115
+ "type": "string",
116
+ "required": true
117
+ },
118
+ {
119
+ "name": "row.id",
120
+ "type": "string",
121
+ "required": true
122
+ },
123
+ {
124
+ "name": "row.gatedEvent",
125
+ "type": "string"
126
+ },
127
+ {
128
+ "name": "row.status",
129
+ "type": "string"
130
+ },
131
+ {
132
+ "name": "row.reviewer",
133
+ "type": "string"
134
+ },
135
+ {
136
+ "name": "row.requestedAt",
137
+ "type": "number"
138
+ },
139
+ {
140
+ "name": "row.decidedAt",
141
+ "type": "number"
142
+ },
143
+ {
144
+ "name": "row.escalatedAt",
145
+ "type": "number"
146
+ },
147
+ {
148
+ "name": "row.notes",
149
+ "type": "string"
150
+ }
151
+ ]
152
+ },
153
+ {
154
+ "event": "ApprovalGranted",
155
+ "scope": "external",
156
+ "payloadSchema": [
157
+ {
158
+ "name": "requestId",
159
+ "type": "string"
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ "event": "ApprovalDenied",
165
+ "scope": "external",
166
+ "payloadSchema": [
167
+ {
168
+ "name": "requestId",
169
+ "type": "string"
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "event": "ApprovalRequestLoaded",
175
+ "payloadSchema": [
176
+ {
177
+ "name": "data",
178
+ "type": "[ApprovalRequest]"
179
+ }
180
+ ]
181
+ },
182
+ {
183
+ "event": "ApprovalRequestLoadFailed",
184
+ "payloadSchema": [
185
+ {
186
+ "name": "error",
187
+ "type": "string"
188
+ },
189
+ {
190
+ "name": "code",
191
+ "type": "string"
192
+ }
193
+ ]
194
+ },
195
+ {
196
+ "event": "ApprovalRequestReviewed",
197
+ "payloadSchema": [
198
+ {
199
+ "name": "row.id",
200
+ "type": "string",
201
+ "required": true
202
+ },
203
+ {
204
+ "name": "row.gatedEvent",
205
+ "type": "string"
206
+ },
207
+ {
208
+ "name": "row.status",
209
+ "type": "string"
210
+ },
211
+ {
212
+ "name": "row.reviewer",
213
+ "type": "string"
214
+ },
215
+ {
216
+ "name": "row.requestedAt",
217
+ "type": "number"
218
+ },
219
+ {
220
+ "name": "row.decidedAt",
221
+ "type": "number"
222
+ },
223
+ {
224
+ "name": "row.escalatedAt",
225
+ "type": "number"
226
+ },
227
+ {
228
+ "name": "row.notes",
229
+ "type": "string"
230
+ }
231
+ ]
232
+ },
233
+ {
234
+ "event": "ApprovalRequestReviewFailed",
235
+ "payloadSchema": [
236
+ {
237
+ "name": "error",
238
+ "type": "string"
239
+ },
240
+ {
241
+ "name": "code",
242
+ "type": "string"
243
+ }
244
+ ]
245
+ }
246
+ ],
247
+ "stateMachine": {
248
+ "states": [
249
+ {
250
+ "name": "loading",
251
+ "isInitial": true
252
+ },
253
+ {
254
+ "name": "reviewing"
255
+ },
256
+ {
257
+ "name": "error"
258
+ }
259
+ ],
260
+ "events": [
261
+ {
262
+ "key": "INIT",
263
+ "name": "Initialize"
264
+ },
265
+ {
266
+ "key": "ApprovalRequestLoaded",
267
+ "name": "ApprovalRequest loaded",
268
+ "payloadSchema": [
269
+ {
270
+ "name": "data",
271
+ "type": "[ApprovalRequest]"
272
+ }
273
+ ]
274
+ },
275
+ {
276
+ "key": "ApprovalRequestLoadFailed",
277
+ "name": "ApprovalRequest load failed",
278
+ "payloadSchema": [
279
+ {
280
+ "name": "error",
281
+ "type": "string"
282
+ },
283
+ {
284
+ "name": "code",
285
+ "type": "string"
286
+ }
287
+ ]
288
+ },
289
+ {
290
+ "key": "APPROVE",
291
+ "name": "Approve",
292
+ "payloadSchema": [
293
+ {
294
+ "name": "id",
295
+ "type": "string",
296
+ "required": true
297
+ },
298
+ {
299
+ "name": "row",
300
+ "type": "ApprovalRequest"
301
+ }
302
+ ]
303
+ },
304
+ {
305
+ "key": "DENY",
306
+ "name": "Deny",
307
+ "payloadSchema": [
308
+ {
309
+ "name": "id",
310
+ "type": "string",
311
+ "required": true
312
+ },
313
+ {
314
+ "name": "row",
315
+ "type": "ApprovalRequest"
316
+ }
317
+ ]
318
+ },
319
+ {
320
+ "key": "ApprovalRequestReviewed",
321
+ "name": "ApprovalRequest reviewed",
322
+ "payloadSchema": [
323
+ {
324
+ "name": "row",
325
+ "type": "ApprovalRequest"
326
+ }
327
+ ]
328
+ },
329
+ {
330
+ "key": "ApprovalRequestReviewFailed",
331
+ "name": "ApprovalRequest review failed",
332
+ "payloadSchema": [
333
+ {
334
+ "name": "error",
335
+ "type": "string"
336
+ },
337
+ {
338
+ "name": "code",
339
+ "type": "string"
340
+ }
341
+ ]
342
+ },
343
+ {
344
+ "key": "ApprovalGranted",
345
+ "name": "Approval granted",
346
+ "payloadSchema": [
347
+ {
348
+ "name": "requestId",
349
+ "type": "string"
350
+ }
351
+ ]
352
+ },
353
+ {
354
+ "key": "ApprovalDenied",
355
+ "name": "Approval denied",
356
+ "payloadSchema": [
357
+ {
358
+ "name": "requestId",
359
+ "type": "string"
360
+ }
361
+ ]
362
+ }
363
+ ],
364
+ "transitions": [
365
+ {
366
+ "from": "loading",
367
+ "to": "loading",
368
+ "event": "INIT",
369
+ "effects": [
370
+ [
371
+ "fetch",
372
+ "ApprovalRequest",
373
+ {
374
+ "emit": {
375
+ "success": "ApprovalRequestLoaded",
376
+ "failure": "ApprovalRequestLoadFailed"
377
+ }
378
+ }
379
+ ],
380
+ [
381
+ "render-ui",
382
+ "main",
383
+ {
384
+ "className": "py-12",
385
+ "gap": "md",
386
+ "direction": "vertical",
387
+ "children": [
388
+ {
389
+ "type": "spinner"
390
+ },
391
+ {
392
+ "color": "muted",
393
+ "content": "Loading approval queue…",
394
+ "variant": "caption",
395
+ "type": "typography"
396
+ }
397
+ ],
398
+ "align": "center",
399
+ "type": "stack"
400
+ }
401
+ ]
402
+ ]
403
+ },
404
+ {
405
+ "from": "loading",
406
+ "to": "reviewing",
407
+ "event": "ApprovalRequestLoaded",
408
+ "effects": [
409
+ [
410
+ "render-ui",
411
+ "main",
412
+ {
413
+ "direction": "vertical",
414
+ "gap": "md",
415
+ "type": "stack",
416
+ "children": [
417
+ {
418
+ "align": "center",
419
+ "children": [
420
+ {
421
+ "name": "shield-check",
422
+ "type": "icon"
423
+ },
424
+ {
425
+ "type": "typography",
426
+ "variant": "h3",
427
+ "content": "Approval queue"
428
+ }
429
+ ],
430
+ "gap": "sm",
431
+ "direction": "horizontal",
432
+ "type": "stack"
433
+ },
434
+ {
435
+ "type": "divider"
436
+ },
437
+ {
438
+ "entity": "@payload.data",
439
+ "itemActions": [
440
+ {
441
+ "label": "Approve",
442
+ "event": "APPROVE",
443
+ "variant": "primary",
444
+ "icon": "check"
445
+ },
446
+ {
447
+ "icon": "x",
448
+ "variant": "danger",
449
+ "event": "DENY",
450
+ "label": "Deny"
451
+ }
452
+ ],
453
+ "type": "data-grid",
454
+ "fields": [
455
+ {
456
+ "name": "gatedEvent",
457
+ "variant": "badge",
458
+ "label": "Action"
459
+ },
460
+ {
461
+ "name": "requestedAt",
462
+ "label": "Requested",
463
+ "variant": "caption"
464
+ },
465
+ {
466
+ "variant": "badge",
467
+ "label": "Status",
468
+ "name": "status"
469
+ }
470
+ ],
471
+ "cols": 1.0,
472
+ "gap": "sm"
473
+ }
474
+ ]
475
+ }
476
+ ]
477
+ ]
478
+ },
479
+ {
480
+ "from": "loading",
481
+ "to": "error",
482
+ "event": "ApprovalRequestLoadFailed",
483
+ "effects": [
484
+ [
485
+ "render-ui",
486
+ "main",
487
+ {
488
+ "type": "alert",
489
+ "message": "@payload.error",
490
+ "variant": "error"
491
+ }
492
+ ]
493
+ ]
494
+ },
495
+ {
496
+ "from": "reviewing",
497
+ "to": "reviewing",
498
+ "event": "APPROVE",
499
+ "effects": [
500
+ [
501
+ "set",
502
+ "@entity.id",
503
+ "@payload.id"
504
+ ],
505
+ [
506
+ "set",
507
+ "@entity.status",
508
+ "approved"
509
+ ],
510
+ [
511
+ "set",
512
+ "@entity.reviewer",
513
+ "@user.id"
514
+ ],
515
+ [
516
+ "persist",
517
+ "update",
518
+ "ApprovalRequest",
519
+ "@entity",
520
+ {
521
+ "emit": {
522
+ "success": "ApprovalRequestReviewed",
523
+ "failure": "ApprovalRequestReviewFailed"
524
+ }
525
+ }
526
+ ],
527
+ [
528
+ "emit",
529
+ "ApprovalGranted",
530
+ {
531
+ "requestId": "@payload.id"
532
+ }
533
+ ]
534
+ ]
535
+ },
536
+ {
537
+ "from": "reviewing",
538
+ "to": "reviewing",
539
+ "event": "DENY",
540
+ "effects": [
541
+ [
542
+ "set",
543
+ "@entity.id",
544
+ "@payload.id"
545
+ ],
546
+ [
547
+ "set",
548
+ "@entity.status",
549
+ "denied"
550
+ ],
551
+ [
552
+ "set",
553
+ "@entity.reviewer",
554
+ "@user.id"
555
+ ],
556
+ [
557
+ "persist",
558
+ "update",
559
+ "ApprovalRequest",
560
+ "@entity",
561
+ {
562
+ "emit": {
563
+ "failure": "ApprovalRequestReviewFailed",
564
+ "success": "ApprovalRequestReviewed"
565
+ }
566
+ }
567
+ ],
568
+ [
569
+ "emit",
570
+ "ApprovalDenied",
571
+ {
572
+ "requestId": "@payload.id"
573
+ }
574
+ ]
575
+ ]
576
+ },
577
+ {
578
+ "from": "reviewing",
579
+ "to": "loading",
580
+ "event": "ApprovalRequestReviewed",
581
+ "effects": [
582
+ [
583
+ "fetch",
584
+ "ApprovalRequest",
585
+ {
586
+ "emit": {
587
+ "success": "ApprovalRequestLoaded",
588
+ "failure": "ApprovalRequestLoadFailed"
589
+ }
590
+ }
591
+ ]
592
+ ]
593
+ },
594
+ {
595
+ "from": "reviewing",
596
+ "to": "reviewing",
597
+ "event": "ApprovalRequestReviewFailed",
598
+ "effects": [
599
+ [
600
+ "render-ui",
601
+ "main",
602
+ {
603
+ "message": "@payload.error",
604
+ "variant": "error",
605
+ "type": "alert"
606
+ }
607
+ ]
608
+ ]
609
+ },
610
+ {
611
+ "from": "error",
612
+ "to": "loading",
613
+ "event": "INIT",
614
+ "effects": [
615
+ [
616
+ "fetch",
617
+ "ApprovalRequest",
618
+ {
619
+ "emit": {
620
+ "failure": "ApprovalRequestLoadFailed",
621
+ "success": "ApprovalRequestLoaded"
622
+ }
623
+ }
624
+ ],
625
+ [
626
+ "render-ui",
627
+ "main",
628
+ {
629
+ "size": "sm",
630
+ "type": "spinner"
631
+ }
632
+ ]
633
+ ]
634
+ }
635
+ ]
636
+ },
637
+ "config": {
638
+ "escalationHours": {
639
+ "type": "number",
640
+ "default": 0.0,
641
+ "label": "Escalation hours",
642
+ "description": "Hours a request can sit pending before escalating. v1.0 declarative only; per-row escalation needs loop-with-emit primitive (gap).",
643
+ "tier": "customization"
644
+ },
645
+ "autoApproveBelowThreshold": {
646
+ "type": "boolean",
647
+ "default": true,
648
+ "label": "Auto-approve below threshold",
649
+ "description": "Skip the review queue when the gated event's value is below the threshold. v1.0 declarative only.",
650
+ "tier": "customization"
651
+ },
652
+ "approverRoles": {
653
+ "type": "[string]",
654
+ "default": [],
655
+ "label": "Approver roles",
656
+ "description": "Roles eligible to approve. The host application enforces role-gating on the page.",
657
+ "tier": "essential",
658
+ "items": {
659
+ "type": "string"
660
+ }
661
+ },
662
+ "valueField": {
663
+ "type": "string",
664
+ "default": "",
665
+ "label": "Value field",
666
+ "description": "Payload field name to compare against threshold (e.g. 'amount' on a RefundRequested event). v1.0 declarative only.",
667
+ "tier": "customization"
668
+ },
669
+ "escalationRoles": {
670
+ "type": "[string]",
671
+ "default": [],
672
+ "label": "Escalation roles",
673
+ "description": "Roles notified when a request escalates (compose sibling std-notify-on-event).",
674
+ "tier": "customization",
675
+ "items": {
676
+ "type": "string"
677
+ }
678
+ },
679
+ "threshold": {
680
+ "type": "number",
681
+ "default": 0.0,
682
+ "label": "Auto-approve threshold",
683
+ "description": "Below this value, requests should be auto-approved. v1.0 declarative only; wiring lands in v1.1 (gap).",
684
+ "tier": "customization"
685
+ }
686
+ },
687
+ "scope": "collection"
688
+ }
689
+ ],
690
+ "pages": [
691
+ {
692
+ "name": "ApprovalGateReviewPage",
693
+ "path": "/approvals/queue",
694
+ "traits": [
695
+ {
696
+ "ref": "ApprovalGateReview"
697
+ }
698
+ ]
699
+ }
700
+ ]
701
+ }
702
+ ]
703
+ }