@tokenoftrust/storefront-runner 1.3.4-rc.4 → 1.4.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 (246) hide show
  1. package/apps/storefront/astro.config.mjs +15 -0
  2. package/apps/storefront/dev-plugins/dev-publish.mjs +55 -0
  3. package/apps/storefront/dev-plugins/tenant-hot-reload.mjs +86 -7
  4. package/apps/storefront/drizzle.config.apps.ts +13 -0
  5. package/apps/storefront/env.d.ts +10 -0
  6. package/apps/storefront/migrations/README.md +13 -7
  7. package/apps/storefront/migrations-apps/0000_fast_millenium_guard.sql +129 -0
  8. package/apps/storefront/migrations-apps/0001_woozy_lyja.sql +22 -0
  9. package/apps/storefront/migrations-apps/meta/0000_snapshot.json +843 -0
  10. package/apps/storefront/migrations-apps/meta/0001_snapshot.json +990 -0
  11. package/apps/storefront/migrations-apps/meta/_journal.json +20 -0
  12. package/apps/storefront/package.json +12 -1
  13. package/apps/storefront/perf/README.md +64 -0
  14. package/apps/storefront/perf/assert-budgets.ts +159 -0
  15. package/apps/storefront/playwright.config.ts +23 -0
  16. package/apps/storefront/public/js/dashboard-apps.js +173 -0
  17. package/apps/storefront/public/shared/commerce-marketing.css +221 -0
  18. package/apps/storefront/src/components/CollectionCard.astro +1 -0
  19. package/apps/storefront/src/components/ProductCard.astro +1 -0
  20. package/apps/storefront/src/components/admin/AdminPublishTab.astro +3562 -0
  21. package/apps/storefront/src/components/apps/AppWidgetFrame.astro +30 -0
  22. package/apps/storefront/src/components/chrome/NavDropdown.astro +6 -3
  23. package/apps/storefront/src/components/chrome/SiteFooter.astro +10 -0
  24. package/apps/storefront/src/components/chrome/SiteHeader.astro +10 -0
  25. package/apps/storefront/src/components/commerce/RatingStars.astro +3 -2
  26. package/apps/storefront/src/components/content/Callout.astro +75 -0
  27. package/apps/storefront/src/components/content/NeedsReviewCallout.astro +66 -0
  28. package/apps/storefront/src/components/content/ProseSections.astro +121 -0
  29. package/apps/storefront/src/components/content/ProseToc.astro +34 -0
  30. package/apps/storefront/src/components/content/RichText.astro +44 -0
  31. package/apps/storefront/src/components/content/TrustStrip.astro +46 -0
  32. package/apps/storefront/src/components/home/Hero.astro +14 -0
  33. package/apps/storefront/src/components/islands/CheckoutComplianceGate.tsx +295 -0
  34. package/apps/storefront/src/components/islands/ImageGallery.tsx +42 -21
  35. package/apps/storefront/src/components/islands/VariantSelector.tsx +62 -12
  36. package/apps/storefront/src/components/plp/FacetSidebar.astro +2 -2
  37. package/apps/storefront/src/components/subscription/ManageSubscriptionEntry.astro +1 -0
  38. package/apps/storefront/src/config/compliance/rulesets.ts +79 -0
  39. package/apps/storefront/src/config/storeName.ts +34 -0
  40. package/apps/storefront/src/layouts/Layout.astro +97 -23
  41. package/apps/storefront/src/lib/activity/alerts.ts +428 -0
  42. package/apps/storefront/src/lib/activity/changeActorAttribution.ts +85 -0
  43. package/apps/storefront/src/lib/activity/deployVersion.ts +127 -0
  44. package/apps/storefront/src/lib/activity/ingest.ts +188 -0
  45. package/apps/storefront/src/lib/activity/ingestAuth.ts +105 -0
  46. package/apps/storefront/src/lib/activity/killSwitch.ts +80 -0
  47. package/apps/storefront/src/lib/activity/query.ts +403 -0
  48. package/apps/storefront/src/lib/activity/recordActivity.ts +105 -0
  49. package/apps/storefront/src/lib/activity/store.ts +122 -0
  50. package/apps/storefront/src/lib/activity/uiActor.ts +150 -0
  51. package/apps/storefront/src/lib/activity/workerCommit.ts +70 -0
  52. package/apps/storefront/src/lib/analytics/budgets.json +69 -0
  53. package/apps/storefront/src/lib/analytics/lighthouseReport.ts +109 -0
  54. package/apps/storefront/src/lib/analytics/perfBudgets.ts +452 -0
  55. package/apps/storefront/src/lib/analytics/rumAlert.ts +179 -0
  56. package/apps/storefront/src/lib/analytics/webVitals.ts +269 -0
  57. package/apps/storefront/src/lib/apps/adminService.ts +106 -0
  58. package/apps/storefront/src/lib/apps/adminSession.ts +205 -0
  59. package/apps/storefront/src/lib/apps/apiAuth.ts +91 -0
  60. package/apps/storefront/src/lib/apps/apiRoute.ts +35 -0
  61. package/apps/storefront/src/lib/apps/catalogMapper.ts +39 -0
  62. package/apps/storefront/src/lib/apps/credentials.ts +153 -0
  63. package/apps/storefront/src/lib/apps/gatewayKeys.ts +156 -0
  64. package/apps/storefront/src/lib/apps/healthAggregate.ts +66 -0
  65. package/apps/storefront/src/lib/apps/orders/attributionService.ts +206 -0
  66. package/apps/storefront/src/lib/apps/orders/customerHash.ts +28 -0
  67. package/apps/storefront/src/lib/apps/orders/foxyOrderClient.ts +203 -0
  68. package/apps/storefront/src/lib/apps/orders/idempotency.ts +100 -0
  69. package/apps/storefront/src/lib/apps/orders/orderForwardReceiver.ts +117 -0
  70. package/apps/storefront/src/lib/apps/orders/orderMapper.ts +91 -0
  71. package/apps/storefront/src/lib/apps/orders/ordersStore.ts +181 -0
  72. package/apps/storefront/src/lib/apps/registryService.ts +579 -0
  73. package/apps/storefront/src/lib/apps/scopes.ts +79 -0
  74. package/apps/storefront/src/lib/apps/tokenIssuer.ts +121 -0
  75. package/apps/storefront/src/lib/apps/tokenVerifier.ts +148 -0
  76. package/apps/storefront/src/lib/apps/widgets/eligibility.ts +18 -0
  77. package/apps/storefront/src/lib/apps/widgets/frameProps.ts +52 -0
  78. package/apps/storefront/src/lib/apps/widgets/launchToken.ts +84 -0
  79. package/apps/storefront/src/lib/apps/widgets/placements.ts +57 -0
  80. package/apps/storefront/src/lib/apps/widgets/renderSlot.ts +111 -0
  81. package/apps/storefront/src/lib/auth/adminEntry.ts +119 -0
  82. package/apps/storefront/src/lib/auth/identityToken.ts +21 -2
  83. package/apps/storefront/src/lib/auth/loginGate.ts +102 -18
  84. package/apps/storefront/src/lib/auth/mcpClientAssertion.ts +219 -0
  85. package/apps/storefront/src/lib/auth/route.ts +60 -5
  86. package/apps/storefront/src/lib/auth/session.ts +8 -0
  87. package/apps/storefront/src/lib/auth/stepUpChallenge.ts +107 -0
  88. package/apps/storefront/src/lib/auth/totAccessClient.ts +208 -0
  89. package/apps/storefront/src/lib/blog/provider.ts +39 -0
  90. package/apps/storefront/src/lib/blog/types.ts +26 -0
  91. package/apps/storefront/src/lib/checkoutCommerce.ts +39 -1
  92. package/apps/storefront/src/lib/chrome/model.ts +11 -0
  93. package/apps/storefront/src/lib/compliance/enforcement.ts +95 -0
  94. package/apps/storefront/src/lib/content/callout.ts +78 -0
  95. package/apps/storefront/src/lib/content/index.ts +27 -0
  96. package/apps/storefront/src/lib/content/needsReview.ts +58 -0
  97. package/apps/storefront/src/lib/content/prose.ts +186 -0
  98. package/apps/storefront/src/lib/content/richtext.ts +76 -0
  99. package/apps/storefront/src/lib/content/trustStrip.ts +74 -0
  100. package/apps/storefront/src/lib/content-edit/client.ts +70 -14
  101. package/apps/storefront/src/lib/d1/catalog.ts +12 -0
  102. package/apps/storefront/src/lib/d1/schema-apps.ts +267 -0
  103. package/apps/storefront/src/lib/dev/apiBase.ts +8 -2
  104. package/apps/storefront/src/lib/dev/cliSignInCode.ts +65 -115
  105. package/apps/storefront/src/lib/dev/cockpitStore.ts +65 -0
  106. package/apps/storefront/src/lib/dev/previewStatus.ts +112 -0
  107. package/apps/storefront/src/lib/dev/rendezvousBroker.ts +241 -0
  108. package/apps/storefront/src/lib/dev/subjectReissue.ts +67 -0
  109. package/apps/storefront/src/lib/dev/vcBinding.ts +80 -0
  110. package/apps/storefront/src/lib/email/magicLinkInviteEmail.ts +10 -10
  111. package/apps/storefront/src/lib/env.ts +63 -0
  112. package/apps/storefront/src/lib/jsonld.ts +12 -17
  113. package/apps/storefront/src/lib/membership/eligibility.ts +37 -0
  114. package/apps/storefront/src/lib/monitoring/manifest.ts +302 -0
  115. package/apps/storefront/src/lib/privacy/emailHint.ts +13 -5
  116. package/apps/storefront/src/lib/publish/apex-readiness.ts +337 -0
  117. package/apps/storefront/src/lib/publish/dispatchHealth.ts +269 -0
  118. package/apps/storefront/src/lib/publish/domainState.ts +351 -0
  119. package/apps/storefront/src/lib/publish/shipWorkspace.ts +369 -0
  120. package/apps/storefront/src/lib/rawChrome.ts +34 -3
  121. package/apps/storefront/src/lib/storyblok/content-model.ts +34 -2
  122. package/apps/storefront/src/lib/storyblok/provider.ts +11 -4
  123. package/apps/storefront/src/lib/subscription/model.ts +114 -0
  124. package/apps/storefront/src/lib/tot/ToTClient.ts +3 -3
  125. package/apps/storefront/src/lib/tot/query.ts +32 -0
  126. package/apps/storefront/src/lib/webhooks/cloudflareQueueDispatcher.ts +82 -0
  127. package/apps/storefront/src/lib/webhooks/deliveryEngine.ts +245 -0
  128. package/apps/storefront/src/lib/webhooks/deliveryMapper.ts +34 -0
  129. package/apps/storefront/src/lib/webhooks/deliveryStore.ts +668 -0
  130. package/apps/storefront/src/lib/webhooks/dispatcher.ts +168 -0
  131. package/apps/storefront/src/lib/webhooks/emit.ts +167 -0
  132. package/apps/storefront/src/lib/webhooks/endpointGuard.ts +135 -0
  133. package/apps/storefront/src/lib/webhooks/events.ts +98 -0
  134. package/apps/storefront/src/lib/webhooks/getDispatcher.ts +49 -0
  135. package/apps/storefront/src/middleware/index.ts +45 -13
  136. package/apps/storefront/src/pages/404.astro +21 -9
  137. package/apps/storefront/src/pages/[...slug].astro +36 -2
  138. package/apps/storefront/src/pages/admin/ops-timeline.astro +420 -0
  139. package/apps/storefront/src/pages/admin.astro +183 -9
  140. package/apps/storefront/src/pages/api/activity.ts +137 -0
  141. package/apps/storefront/src/pages/api/admin/activity-alerts.ts +73 -0
  142. package/apps/storefront/src/pages/api/apps/admin/credentials/rotate.ts +86 -0
  143. package/apps/storefront/src/pages/api/apps/admin/health.ts +44 -0
  144. package/apps/storefront/src/pages/api/apps/admin/install.ts +125 -0
  145. package/apps/storefront/src/pages/api/apps/admin/list.ts +26 -0
  146. package/apps/storefront/src/pages/api/apps/admin/resume.ts +79 -0
  147. package/apps/storefront/src/pages/api/apps/admin/suspend.ts +80 -0
  148. package/apps/storefront/src/pages/api/apps/admin/uninstall.ts +98 -0
  149. package/apps/storefront/src/pages/api/apps/admin/update.ts +126 -0
  150. package/apps/storefront/src/pages/api/apps/admin/webhooks/deliveries/[deliveryId]/replay.ts +70 -0
  151. package/apps/storefront/src/pages/api/apps/admin/webhooks/deliveries.ts +51 -0
  152. package/apps/storefront/src/pages/api/apps/internal/order-forward.ts +183 -0
  153. package/apps/storefront/src/pages/api/apps/oauth/token.ts +87 -0
  154. package/apps/storefront/src/pages/api/apps/v1/attribution.ts +162 -0
  155. package/apps/storefront/src/pages/api/apps/v1/catalog/products/[handle].ts +39 -0
  156. package/apps/storefront/src/pages/api/apps/v1/catalog/products.ts +49 -0
  157. package/apps/storefront/src/pages/api/apps/v1/health.ts +32 -0
  158. package/apps/storefront/src/pages/api/apps/v1/inventory.ts +59 -0
  159. package/apps/storefront/src/pages/api/apps/v1/orders/[id].ts +48 -0
  160. package/apps/storefront/src/pages/api/apps/v1/orders.ts +73 -0
  161. package/apps/storefront/src/pages/api/apps/v1/reports.ts +21 -0
  162. package/apps/storefront/src/pages/api/apps/v1/webhooks/deliveries/[deliveryId]/replay.ts +74 -0
  163. package/apps/storefront/src/pages/api/apps/v1/webhooks/deliveries.ts +47 -0
  164. package/apps/storefront/src/pages/api/auth/magic-exchange.ts +48 -1
  165. package/apps/storefront/src/pages/api/auth/step-up-send.ts +57 -0
  166. package/apps/storefront/src/pages/api/auth/step-up-verify.ts +129 -0
  167. package/apps/storefront/src/pages/api/auth/verify.ts +23 -0
  168. package/apps/storefront/src/pages/api/cache-purge.ts +11 -0
  169. package/apps/storefront/src/pages/api/compliance/preflight.ts +206 -0
  170. package/apps/storefront/src/pages/api/dashboard/enter-vendor.ts +30 -0
  171. package/apps/storefront/src/pages/api/rum/vitals.ts +54 -0
  172. package/apps/storefront/src/pages/api/test/dev-session.ts +133 -0
  173. package/apps/storefront/src/pages/auth/login.astro +202 -45
  174. package/apps/storefront/src/pages/auth/magic.astro +75 -43
  175. package/apps/storefront/src/pages/blog/[slug].astro +107 -0
  176. package/apps/storefront/src/pages/blog/index.astro +98 -0
  177. package/apps/storefront/src/pages/capabilities.astro +8 -0
  178. package/apps/storefront/src/pages/cockpit.astro +470 -69
  179. package/apps/storefront/src/pages/collections/[handle].astro +8 -0
  180. package/apps/storefront/src/pages/collections/index.astro +10 -2
  181. package/apps/storefront/src/pages/dashboard/[appDomain]/apps/index.astro +119 -0
  182. package/apps/storefront/src/pages/dashboard/[appDomain]/index.astro +5 -0
  183. package/apps/storefront/src/pages/index.astro +57 -0
  184. package/apps/storefront/src/pages/llms.txt.ts +31 -10
  185. package/apps/storefront/src/pages/products/[handle].astro +100 -9
  186. package/apps/storefront/src/pages/sitemap.xml.ts +21 -4
  187. package/apps/storefront/src/pages/style-guide/[tenant]/[theme].astro +198 -0
  188. package/apps/storefront/src/pages/style-guide/[tenant]/chrome/[theme].astro +7 -0
  189. package/apps/storefront/src/pages/style-guide/[tenant]/guide/[theme].astro +7 -0
  190. package/apps/storefront/src/pages/style-guide/[tenant]/index.astro +7 -0
  191. package/apps/storefront/src/pages/style-guide/index.astro +10 -0
  192. package/apps/storefront/src/styles/fonts.css +54 -0
  193. package/apps/storefront/src/styles/global.css +22 -2
  194. package/apps/storefront/src/themes/schema.ts +3 -25
  195. package/apps/storefront/tsconfig.json +1 -1
  196. package/apps/storefront/vitest.config.ts +4 -1
  197. package/package.json +1 -1
  198. package/packages/public-runtime/src/activity/README.md +146 -0
  199. package/packages/public-runtime/src/activity/catalog.ts +501 -0
  200. package/packages/public-runtime/src/activity/event.ts +168 -0
  201. package/packages/public-runtime/src/activity/index.ts +16 -0
  202. package/packages/public-runtime/src/activity/redaction.ts +263 -0
  203. package/packages/public-runtime/src/candidate-index.ts +324 -0
  204. package/packages/public-runtime/src/checkout.ts +94 -2
  205. package/packages/public-runtime/src/compliance/evaluate.ts +265 -0
  206. package/packages/public-runtime/src/compliance/evidence-signals.ts +81 -0
  207. package/packages/public-runtime/src/compliance/index.ts +22 -0
  208. package/packages/public-runtime/src/compliance/pact-report.ts +94 -0
  209. package/packages/public-runtime/src/compliance/profile.ts +198 -0
  210. package/packages/public-runtime/src/compliance/ruleset.ts +117 -0
  211. package/packages/public-runtime/src/compliance/verification.ts +81 -0
  212. package/packages/public-runtime/src/csp.ts +27 -3
  213. package/packages/public-runtime/src/customization-reconcile.ts +35 -0
  214. package/packages/public-runtime/src/customization-runtime.ts +8 -0
  215. package/packages/public-runtime/src/customization-versioning.ts +17 -0
  216. package/packages/public-runtime/src/extension-contract.ts +2 -1
  217. package/packages/public-runtime/src/hash.ts +25 -0
  218. package/packages/public-runtime/src/index.ts +12 -0
  219. package/packages/public-runtime/src/membership.ts +353 -0
  220. package/packages/public-runtime/src/product.ts +24 -2
  221. package/packages/public-runtime/src/review-trust-proof.ts +194 -0
  222. package/packages/public-runtime/src/tenant-assets.ts +40 -5
  223. package/packages/public-runtime/src/tenant.ts +236 -0
  224. package/packages/public-runtime/src/widget-postmessage.ts +205 -0
  225. package/scripts/dev/publish.mjs +158 -0
  226. package/scripts/dev/transient-files.mjs +2 -1
  227. package/tenants/home/public/fonts/inter-latin-400-normal.woff2 +0 -0
  228. package/tenants/home/public/fonts/inter-latin-500-normal.woff2 +0 -0
  229. package/tenants/home/public/fonts/inter-latin-600-normal.woff2 +0 -0
  230. package/tenants/home/public/fonts/inter-latin-ext-400-normal.woff2 +0 -0
  231. package/tenants/home/public/fonts/inter-latin-ext-500-normal.woff2 +0 -0
  232. package/tenants/home/public/fonts/inter-latin-ext-600-normal.woff2 +0 -0
  233. package/tenants/home/public/fonts/jetbrains-mono-latin-400-normal.woff2 +0 -0
  234. package/tenants/home/public/fonts/jetbrains-mono-latin-500-normal.woff2 +0 -0
  235. package/tenants/home/public/fonts/jetbrains-mono-latin-ext-400-normal.woff2 +0 -0
  236. package/tenants/home/public/fonts/jetbrains-mono-latin-ext-500-normal.woff2 +0 -0
  237. package/tenants/home/public/fonts/plus-jakarta-sans-latin-500-normal.woff2 +0 -0
  238. package/tenants/home/public/fonts/plus-jakarta-sans-latin-600-normal.woff2 +0 -0
  239. package/tenants/home/public/fonts/plus-jakarta-sans-latin-700-normal.woff2 +0 -0
  240. package/tenants/home/public/fonts/plus-jakarta-sans-latin-800-normal.woff2 +0 -0
  241. package/tenants/home/public/fonts/plus-jakarta-sans-latin-ext-500-normal.woff2 +0 -0
  242. package/tenants/home/public/fonts/plus-jakarta-sans-latin-ext-600-normal.woff2 +0 -0
  243. package/tenants/home/public/fonts/plus-jakarta-sans-latin-ext-700-normal.woff2 +0 -0
  244. package/tenants/home/public/fonts/plus-jakarta-sans-latin-ext-800-normal.woff2 +0 -0
  245. package/tenants/home/public/pages/storefront.css +23 -0
  246. package/apps/storefront/src/lib/dev/hostedCockpit.ts +0 -169
@@ -0,0 +1,990 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "0fee5e2d-81e4-4ad7-a976-2d93db67ea1c",
5
+ "prevId": "63405d13-2199-40e7-95d0-8ff7edd4b18f",
6
+ "tables": {
7
+ "activity_events": {
8
+ "name": "activity_events",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "tenant_id": {
18
+ "name": "tenant_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "action": {
25
+ "name": "action",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "actor_kind": {
32
+ "name": "actor_kind",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "actor_id": {
39
+ "name": "actor_id",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "actor_ref": {
46
+ "name": "actor_ref",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": false,
50
+ "autoincrement": false
51
+ },
52
+ "source": {
53
+ "name": "source",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": true,
57
+ "autoincrement": false
58
+ },
59
+ "status": {
60
+ "name": "status",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": true,
64
+ "autoincrement": false
65
+ },
66
+ "error_class": {
67
+ "name": "error_class",
68
+ "type": "text",
69
+ "primaryKey": false,
70
+ "notNull": false,
71
+ "autoincrement": false
72
+ },
73
+ "duration_ms": {
74
+ "name": "duration_ms",
75
+ "type": "integer",
76
+ "primaryKey": false,
77
+ "notNull": false,
78
+ "autoincrement": false
79
+ },
80
+ "change_id": {
81
+ "name": "change_id",
82
+ "type": "text",
83
+ "primaryKey": false,
84
+ "notNull": false,
85
+ "autoincrement": false
86
+ },
87
+ "trace_id": {
88
+ "name": "trace_id",
89
+ "type": "text",
90
+ "primaryKey": false,
91
+ "notNull": false,
92
+ "autoincrement": false
93
+ },
94
+ "payload": {
95
+ "name": "payload",
96
+ "type": "text",
97
+ "primaryKey": false,
98
+ "notNull": true,
99
+ "autoincrement": false,
100
+ "default": "'{}'"
101
+ },
102
+ "schema_version": {
103
+ "name": "schema_version",
104
+ "type": "integer",
105
+ "primaryKey": false,
106
+ "notNull": true,
107
+ "autoincrement": false
108
+ },
109
+ "at": {
110
+ "name": "at",
111
+ "type": "text",
112
+ "primaryKey": false,
113
+ "notNull": true,
114
+ "autoincrement": false
115
+ },
116
+ "ingested_at": {
117
+ "name": "ingested_at",
118
+ "type": "text",
119
+ "primaryKey": false,
120
+ "notNull": true,
121
+ "autoincrement": false
122
+ }
123
+ },
124
+ "indexes": {
125
+ "idx_activity_tenant_at": {
126
+ "name": "idx_activity_tenant_at",
127
+ "columns": [
128
+ "tenant_id",
129
+ "at"
130
+ ],
131
+ "isUnique": false
132
+ },
133
+ "idx_activity_tenant_action": {
134
+ "name": "idx_activity_tenant_action",
135
+ "columns": [
136
+ "tenant_id",
137
+ "action"
138
+ ],
139
+ "isUnique": false
140
+ },
141
+ "idx_activity_change": {
142
+ "name": "idx_activity_change",
143
+ "columns": [
144
+ "change_id"
145
+ ],
146
+ "isUnique": false
147
+ }
148
+ },
149
+ "foreignKeys": {},
150
+ "compositePrimaryKeys": {},
151
+ "uniqueConstraints": {},
152
+ "checkConstraints": {}
153
+ },
154
+ "app_attributions": {
155
+ "name": "app_attributions",
156
+ "columns": {
157
+ "install_id": {
158
+ "name": "install_id",
159
+ "type": "text",
160
+ "primaryKey": false,
161
+ "notNull": true,
162
+ "autoincrement": false
163
+ },
164
+ "attribution_id": {
165
+ "name": "attribution_id",
166
+ "type": "text",
167
+ "primaryKey": false,
168
+ "notNull": true,
169
+ "autoincrement": false
170
+ },
171
+ "tenant_id": {
172
+ "name": "tenant_id",
173
+ "type": "text",
174
+ "primaryKey": false,
175
+ "notNull": true,
176
+ "autoincrement": false
177
+ },
178
+ "order_id": {
179
+ "name": "order_id",
180
+ "type": "text",
181
+ "primaryKey": false,
182
+ "notNull": true,
183
+ "autoincrement": false
184
+ },
185
+ "campaign": {
186
+ "name": "campaign",
187
+ "type": "text",
188
+ "primaryKey": false,
189
+ "notNull": false,
190
+ "autoincrement": false
191
+ },
192
+ "referral_code": {
193
+ "name": "referral_code",
194
+ "type": "text",
195
+ "primaryKey": false,
196
+ "notNull": false,
197
+ "autoincrement": false
198
+ },
199
+ "commission_amount": {
200
+ "name": "commission_amount",
201
+ "type": "real",
202
+ "primaryKey": false,
203
+ "notNull": false,
204
+ "autoincrement": false
205
+ },
206
+ "commission_currency": {
207
+ "name": "commission_currency",
208
+ "type": "text",
209
+ "primaryKey": false,
210
+ "notNull": false,
211
+ "autoincrement": false
212
+ },
213
+ "customer_hash": {
214
+ "name": "customer_hash",
215
+ "type": "text",
216
+ "primaryKey": false,
217
+ "notNull": false,
218
+ "autoincrement": false
219
+ },
220
+ "recorded_at": {
221
+ "name": "recorded_at",
222
+ "type": "text",
223
+ "primaryKey": false,
224
+ "notNull": true,
225
+ "autoincrement": false
226
+ }
227
+ },
228
+ "indexes": {
229
+ "idx_app_attributions_tenant_order": {
230
+ "name": "idx_app_attributions_tenant_order",
231
+ "columns": [
232
+ "tenant_id",
233
+ "order_id"
234
+ ],
235
+ "isUnique": false
236
+ }
237
+ },
238
+ "foreignKeys": {},
239
+ "compositePrimaryKeys": {
240
+ "app_attributions_install_id_attribution_id_pk": {
241
+ "columns": [
242
+ "install_id",
243
+ "attribution_id"
244
+ ],
245
+ "name": "app_attributions_install_id_attribution_id_pk"
246
+ }
247
+ },
248
+ "uniqueConstraints": {},
249
+ "checkConstraints": {}
250
+ },
251
+ "app_audit_log": {
252
+ "name": "app_audit_log",
253
+ "columns": {
254
+ "id": {
255
+ "name": "id",
256
+ "type": "text",
257
+ "primaryKey": true,
258
+ "notNull": true,
259
+ "autoincrement": false
260
+ },
261
+ "install_id": {
262
+ "name": "install_id",
263
+ "type": "text",
264
+ "primaryKey": false,
265
+ "notNull": true,
266
+ "autoincrement": false
267
+ },
268
+ "tenant_id": {
269
+ "name": "tenant_id",
270
+ "type": "text",
271
+ "primaryKey": false,
272
+ "notNull": true,
273
+ "autoincrement": false
274
+ },
275
+ "event": {
276
+ "name": "event",
277
+ "type": "text",
278
+ "primaryKey": false,
279
+ "notNull": true,
280
+ "autoincrement": false
281
+ },
282
+ "actor": {
283
+ "name": "actor",
284
+ "type": "text",
285
+ "primaryKey": false,
286
+ "notNull": true,
287
+ "autoincrement": false
288
+ },
289
+ "trace_id": {
290
+ "name": "trace_id",
291
+ "type": "text",
292
+ "primaryKey": false,
293
+ "notNull": false,
294
+ "autoincrement": false
295
+ },
296
+ "detail": {
297
+ "name": "detail",
298
+ "type": "text",
299
+ "primaryKey": false,
300
+ "notNull": true,
301
+ "autoincrement": false,
302
+ "default": "'{}'"
303
+ },
304
+ "at": {
305
+ "name": "at",
306
+ "type": "text",
307
+ "primaryKey": false,
308
+ "notNull": true,
309
+ "autoincrement": false
310
+ }
311
+ },
312
+ "indexes": {
313
+ "idx_app_audit_install": {
314
+ "name": "idx_app_audit_install",
315
+ "columns": [
316
+ "install_id"
317
+ ],
318
+ "isUnique": false
319
+ }
320
+ },
321
+ "foreignKeys": {},
322
+ "compositePrimaryKeys": {},
323
+ "uniqueConstraints": {},
324
+ "checkConstraints": {}
325
+ },
326
+ "app_credentials": {
327
+ "name": "app_credentials",
328
+ "columns": {
329
+ "install_id": {
330
+ "name": "install_id",
331
+ "type": "text",
332
+ "primaryKey": true,
333
+ "notNull": true,
334
+ "autoincrement": false
335
+ },
336
+ "client_id": {
337
+ "name": "client_id",
338
+ "type": "text",
339
+ "primaryKey": false,
340
+ "notNull": true,
341
+ "autoincrement": false
342
+ },
343
+ "secret_hash": {
344
+ "name": "secret_hash",
345
+ "type": "text",
346
+ "primaryKey": false,
347
+ "notNull": true,
348
+ "autoincrement": false
349
+ },
350
+ "secret_created_at": {
351
+ "name": "secret_created_at",
352
+ "type": "text",
353
+ "primaryKey": false,
354
+ "notNull": true,
355
+ "autoincrement": false
356
+ },
357
+ "rotated_at": {
358
+ "name": "rotated_at",
359
+ "type": "text",
360
+ "primaryKey": false,
361
+ "notNull": false,
362
+ "autoincrement": false
363
+ },
364
+ "jwks_kid": {
365
+ "name": "jwks_kid",
366
+ "type": "text",
367
+ "primaryKey": false,
368
+ "notNull": true,
369
+ "autoincrement": false
370
+ }
371
+ },
372
+ "indexes": {
373
+ "app_credentials_client_id_unique": {
374
+ "name": "app_credentials_client_id_unique",
375
+ "columns": [
376
+ "client_id"
377
+ ],
378
+ "isUnique": true
379
+ }
380
+ },
381
+ "foreignKeys": {},
382
+ "compositePrimaryKeys": {},
383
+ "uniqueConstraints": {},
384
+ "checkConstraints": {}
385
+ },
386
+ "app_installs": {
387
+ "name": "app_installs",
388
+ "columns": {
389
+ "install_id": {
390
+ "name": "install_id",
391
+ "type": "text",
392
+ "primaryKey": true,
393
+ "notNull": true,
394
+ "autoincrement": false
395
+ },
396
+ "app_id": {
397
+ "name": "app_id",
398
+ "type": "text",
399
+ "primaryKey": false,
400
+ "notNull": true,
401
+ "autoincrement": false
402
+ },
403
+ "app_version": {
404
+ "name": "app_version",
405
+ "type": "text",
406
+ "primaryKey": false,
407
+ "notNull": true,
408
+ "autoincrement": false
409
+ },
410
+ "tenant_id": {
411
+ "name": "tenant_id",
412
+ "type": "text",
413
+ "primaryKey": false,
414
+ "notNull": true,
415
+ "autoincrement": false
416
+ },
417
+ "env": {
418
+ "name": "env",
419
+ "type": "text",
420
+ "primaryKey": false,
421
+ "notNull": true,
422
+ "autoincrement": false
423
+ },
424
+ "status": {
425
+ "name": "status",
426
+ "type": "text",
427
+ "primaryKey": false,
428
+ "notNull": true,
429
+ "autoincrement": false,
430
+ "default": "'active'"
431
+ },
432
+ "scopes": {
433
+ "name": "scopes",
434
+ "type": "text",
435
+ "primaryKey": false,
436
+ "notNull": true,
437
+ "autoincrement": false,
438
+ "default": "'[]'"
439
+ },
440
+ "manifest": {
441
+ "name": "manifest",
442
+ "type": "text",
443
+ "primaryKey": false,
444
+ "notNull": true,
445
+ "autoincrement": false
446
+ },
447
+ "webhook_endpoint": {
448
+ "name": "webhook_endpoint",
449
+ "type": "text",
450
+ "primaryKey": false,
451
+ "notNull": false,
452
+ "autoincrement": false
453
+ },
454
+ "widget_placements": {
455
+ "name": "widget_placements",
456
+ "type": "text",
457
+ "primaryKey": false,
458
+ "notNull": true,
459
+ "autoincrement": false,
460
+ "default": "'[]'"
461
+ },
462
+ "install_actor": {
463
+ "name": "install_actor",
464
+ "type": "text",
465
+ "primaryKey": false,
466
+ "notNull": true,
467
+ "autoincrement": false
468
+ },
469
+ "created_at": {
470
+ "name": "created_at",
471
+ "type": "text",
472
+ "primaryKey": false,
473
+ "notNull": true,
474
+ "autoincrement": false
475
+ },
476
+ "updated_at": {
477
+ "name": "updated_at",
478
+ "type": "text",
479
+ "primaryKey": false,
480
+ "notNull": true,
481
+ "autoincrement": false
482
+ }
483
+ },
484
+ "indexes": {
485
+ "uq_app_installs_app_tenant_env": {
486
+ "name": "uq_app_installs_app_tenant_env",
487
+ "columns": [
488
+ "app_id",
489
+ "tenant_id",
490
+ "env"
491
+ ],
492
+ "isUnique": true
493
+ },
494
+ "idx_app_installs_tenant": {
495
+ "name": "idx_app_installs_tenant",
496
+ "columns": [
497
+ "tenant_id"
498
+ ],
499
+ "isUnique": false
500
+ }
501
+ },
502
+ "foreignKeys": {},
503
+ "compositePrimaryKeys": {},
504
+ "uniqueConstraints": {},
505
+ "checkConstraints": {}
506
+ },
507
+ "idempotency_keys": {
508
+ "name": "idempotency_keys",
509
+ "columns": {
510
+ "install_id": {
511
+ "name": "install_id",
512
+ "type": "text",
513
+ "primaryKey": false,
514
+ "notNull": true,
515
+ "autoincrement": false
516
+ },
517
+ "idempotency_key": {
518
+ "name": "idempotency_key",
519
+ "type": "text",
520
+ "primaryKey": false,
521
+ "notNull": true,
522
+ "autoincrement": false
523
+ },
524
+ "body_hash": {
525
+ "name": "body_hash",
526
+ "type": "text",
527
+ "primaryKey": false,
528
+ "notNull": true,
529
+ "autoincrement": false
530
+ },
531
+ "response_body": {
532
+ "name": "response_body",
533
+ "type": "text",
534
+ "primaryKey": false,
535
+ "notNull": true,
536
+ "autoincrement": false
537
+ },
538
+ "created_at": {
539
+ "name": "created_at",
540
+ "type": "text",
541
+ "primaryKey": false,
542
+ "notNull": true,
543
+ "autoincrement": false
544
+ }
545
+ },
546
+ "indexes": {},
547
+ "foreignKeys": {},
548
+ "compositePrimaryKeys": {
549
+ "idempotency_keys_install_id_idempotency_key_pk": {
550
+ "columns": [
551
+ "install_id",
552
+ "idempotency_key"
553
+ ],
554
+ "name": "idempotency_keys_install_id_idempotency_key_pk"
555
+ }
556
+ },
557
+ "uniqueConstraints": {},
558
+ "checkConstraints": {}
559
+ },
560
+ "orders": {
561
+ "name": "orders",
562
+ "columns": {
563
+ "tenant_id": {
564
+ "name": "tenant_id",
565
+ "type": "text",
566
+ "primaryKey": false,
567
+ "notNull": true,
568
+ "autoincrement": false
569
+ },
570
+ "external_order_id": {
571
+ "name": "external_order_id",
572
+ "type": "text",
573
+ "primaryKey": false,
574
+ "notNull": true,
575
+ "autoincrement": false
576
+ },
577
+ "env": {
578
+ "name": "env",
579
+ "type": "text",
580
+ "primaryKey": false,
581
+ "notNull": true,
582
+ "autoincrement": false
583
+ },
584
+ "status": {
585
+ "name": "status",
586
+ "type": "text",
587
+ "primaryKey": false,
588
+ "notNull": true,
589
+ "autoincrement": false
590
+ },
591
+ "currency": {
592
+ "name": "currency",
593
+ "type": "text",
594
+ "primaryKey": false,
595
+ "notNull": true,
596
+ "autoincrement": false
597
+ },
598
+ "total": {
599
+ "name": "total",
600
+ "type": "real",
601
+ "primaryKey": false,
602
+ "notNull": true,
603
+ "autoincrement": false,
604
+ "default": 0
605
+ },
606
+ "subtotal": {
607
+ "name": "subtotal",
608
+ "type": "real",
609
+ "primaryKey": false,
610
+ "notNull": false,
611
+ "autoincrement": false
612
+ },
613
+ "customer_hash": {
614
+ "name": "customer_hash",
615
+ "type": "text",
616
+ "primaryKey": false,
617
+ "notNull": false,
618
+ "autoincrement": false
619
+ },
620
+ "line_items": {
621
+ "name": "line_items",
622
+ "type": "text",
623
+ "primaryKey": false,
624
+ "notNull": true,
625
+ "autoincrement": false,
626
+ "default": "'[]'"
627
+ },
628
+ "created_at": {
629
+ "name": "created_at",
630
+ "type": "text",
631
+ "primaryKey": false,
632
+ "notNull": true,
633
+ "autoincrement": false
634
+ },
635
+ "updated_at": {
636
+ "name": "updated_at",
637
+ "type": "text",
638
+ "primaryKey": false,
639
+ "notNull": true,
640
+ "autoincrement": false
641
+ }
642
+ },
643
+ "indexes": {
644
+ "idx_orders_tenant": {
645
+ "name": "idx_orders_tenant",
646
+ "columns": [
647
+ "tenant_id"
648
+ ],
649
+ "isUnique": false
650
+ }
651
+ },
652
+ "foreignKeys": {},
653
+ "compositePrimaryKeys": {
654
+ "orders_tenant_id_external_order_id_pk": {
655
+ "columns": [
656
+ "tenant_id",
657
+ "external_order_id"
658
+ ],
659
+ "name": "orders_tenant_id_external_order_id_pk"
660
+ }
661
+ },
662
+ "uniqueConstraints": {},
663
+ "checkConstraints": {}
664
+ },
665
+ "webhook_deliveries": {
666
+ "name": "webhook_deliveries",
667
+ "columns": {
668
+ "delivery_id": {
669
+ "name": "delivery_id",
670
+ "type": "text",
671
+ "primaryKey": true,
672
+ "notNull": true,
673
+ "autoincrement": false
674
+ },
675
+ "event_id": {
676
+ "name": "event_id",
677
+ "type": "text",
678
+ "primaryKey": false,
679
+ "notNull": true,
680
+ "autoincrement": false
681
+ },
682
+ "install_id": {
683
+ "name": "install_id",
684
+ "type": "text",
685
+ "primaryKey": false,
686
+ "notNull": true,
687
+ "autoincrement": false
688
+ },
689
+ "tenant_id": {
690
+ "name": "tenant_id",
691
+ "type": "text",
692
+ "primaryKey": false,
693
+ "notNull": true,
694
+ "autoincrement": false
695
+ },
696
+ "topic": {
697
+ "name": "topic",
698
+ "type": "text",
699
+ "primaryKey": false,
700
+ "notNull": true,
701
+ "autoincrement": false
702
+ },
703
+ "state": {
704
+ "name": "state",
705
+ "type": "text",
706
+ "primaryKey": false,
707
+ "notNull": true,
708
+ "autoincrement": false,
709
+ "default": "'pending'"
710
+ },
711
+ "attempts": {
712
+ "name": "attempts",
713
+ "type": "integer",
714
+ "primaryKey": false,
715
+ "notNull": true,
716
+ "autoincrement": false,
717
+ "default": 0
718
+ },
719
+ "last_status": {
720
+ "name": "last_status",
721
+ "type": "integer",
722
+ "primaryKey": false,
723
+ "notNull": false,
724
+ "autoincrement": false
725
+ },
726
+ "last_error_class": {
727
+ "name": "last_error_class",
728
+ "type": "text",
729
+ "primaryKey": false,
730
+ "notNull": false,
731
+ "autoincrement": false
732
+ },
733
+ "last_trace_id": {
734
+ "name": "last_trace_id",
735
+ "type": "text",
736
+ "primaryKey": false,
737
+ "notNull": false,
738
+ "autoincrement": false
739
+ },
740
+ "next_attempt_at": {
741
+ "name": "next_attempt_at",
742
+ "type": "text",
743
+ "primaryKey": false,
744
+ "notNull": false,
745
+ "autoincrement": false
746
+ },
747
+ "created_at": {
748
+ "name": "created_at",
749
+ "type": "text",
750
+ "primaryKey": false,
751
+ "notNull": true,
752
+ "autoincrement": false
753
+ },
754
+ "updated_at": {
755
+ "name": "updated_at",
756
+ "type": "text",
757
+ "primaryKey": false,
758
+ "notNull": true,
759
+ "autoincrement": false
760
+ }
761
+ },
762
+ "indexes": {
763
+ "idx_webhook_deliveries_install": {
764
+ "name": "idx_webhook_deliveries_install",
765
+ "columns": [
766
+ "install_id"
767
+ ],
768
+ "isUnique": false
769
+ },
770
+ "idx_webhook_deliveries_due": {
771
+ "name": "idx_webhook_deliveries_due",
772
+ "columns": [
773
+ "state",
774
+ "next_attempt_at"
775
+ ],
776
+ "isUnique": false
777
+ }
778
+ },
779
+ "foreignKeys": {},
780
+ "compositePrimaryKeys": {},
781
+ "uniqueConstraints": {},
782
+ "checkConstraints": {}
783
+ },
784
+ "webhook_delivery_attempts": {
785
+ "name": "webhook_delivery_attempts",
786
+ "columns": {
787
+ "id": {
788
+ "name": "id",
789
+ "type": "text",
790
+ "primaryKey": true,
791
+ "notNull": true,
792
+ "autoincrement": false
793
+ },
794
+ "delivery_id": {
795
+ "name": "delivery_id",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": true,
799
+ "autoincrement": false
800
+ },
801
+ "attempt_no": {
802
+ "name": "attempt_no",
803
+ "type": "integer",
804
+ "primaryKey": false,
805
+ "notNull": true,
806
+ "autoincrement": false
807
+ },
808
+ "started_at": {
809
+ "name": "started_at",
810
+ "type": "text",
811
+ "primaryKey": false,
812
+ "notNull": true,
813
+ "autoincrement": false
814
+ },
815
+ "duration_ms": {
816
+ "name": "duration_ms",
817
+ "type": "integer",
818
+ "primaryKey": false,
819
+ "notNull": false,
820
+ "autoincrement": false
821
+ },
822
+ "http_status": {
823
+ "name": "http_status",
824
+ "type": "integer",
825
+ "primaryKey": false,
826
+ "notNull": false,
827
+ "autoincrement": false
828
+ },
829
+ "error_class": {
830
+ "name": "error_class",
831
+ "type": "text",
832
+ "primaryKey": false,
833
+ "notNull": false,
834
+ "autoincrement": false
835
+ },
836
+ "trace_id": {
837
+ "name": "trace_id",
838
+ "type": "text",
839
+ "primaryKey": false,
840
+ "notNull": false,
841
+ "autoincrement": false
842
+ }
843
+ },
844
+ "indexes": {
845
+ "idx_webhook_delivery_attempts_delivery": {
846
+ "name": "idx_webhook_delivery_attempts_delivery",
847
+ "columns": [
848
+ "delivery_id"
849
+ ],
850
+ "isUnique": false
851
+ }
852
+ },
853
+ "foreignKeys": {},
854
+ "compositePrimaryKeys": {},
855
+ "uniqueConstraints": {},
856
+ "checkConstraints": {}
857
+ },
858
+ "webhook_events": {
859
+ "name": "webhook_events",
860
+ "columns": {
861
+ "id": {
862
+ "name": "id",
863
+ "type": "text",
864
+ "primaryKey": true,
865
+ "notNull": true,
866
+ "autoincrement": false
867
+ },
868
+ "tenant_id": {
869
+ "name": "tenant_id",
870
+ "type": "text",
871
+ "primaryKey": false,
872
+ "notNull": true,
873
+ "autoincrement": false
874
+ },
875
+ "topic": {
876
+ "name": "topic",
877
+ "type": "text",
878
+ "primaryKey": false,
879
+ "notNull": true,
880
+ "autoincrement": false
881
+ },
882
+ "dataschema_version": {
883
+ "name": "dataschema_version",
884
+ "type": "text",
885
+ "primaryKey": false,
886
+ "notNull": true,
887
+ "autoincrement": false
888
+ },
889
+ "payload": {
890
+ "name": "payload",
891
+ "type": "text",
892
+ "primaryKey": false,
893
+ "notNull": true,
894
+ "autoincrement": false
895
+ },
896
+ "created_at": {
897
+ "name": "created_at",
898
+ "type": "text",
899
+ "primaryKey": false,
900
+ "notNull": true,
901
+ "autoincrement": false
902
+ }
903
+ },
904
+ "indexes": {},
905
+ "foreignKeys": {},
906
+ "compositePrimaryKeys": {},
907
+ "uniqueConstraints": {},
908
+ "checkConstraints": {}
909
+ },
910
+ "webhook_install_health": {
911
+ "name": "webhook_install_health",
912
+ "columns": {
913
+ "install_id": {
914
+ "name": "install_id",
915
+ "type": "text",
916
+ "primaryKey": true,
917
+ "notNull": true,
918
+ "autoincrement": false
919
+ },
920
+ "last_success_at": {
921
+ "name": "last_success_at",
922
+ "type": "text",
923
+ "primaryKey": false,
924
+ "notNull": false,
925
+ "autoincrement": false
926
+ },
927
+ "failure_streak": {
928
+ "name": "failure_streak",
929
+ "type": "integer",
930
+ "primaryKey": false,
931
+ "notNull": true,
932
+ "autoincrement": false,
933
+ "default": 0
934
+ },
935
+ "dlq_count": {
936
+ "name": "dlq_count",
937
+ "type": "integer",
938
+ "primaryKey": false,
939
+ "notNull": true,
940
+ "autoincrement": false,
941
+ "default": 0
942
+ },
943
+ "last_status": {
944
+ "name": "last_status",
945
+ "type": "integer",
946
+ "primaryKey": false,
947
+ "notNull": false,
948
+ "autoincrement": false
949
+ },
950
+ "last_error_class": {
951
+ "name": "last_error_class",
952
+ "type": "text",
953
+ "primaryKey": false,
954
+ "notNull": false,
955
+ "autoincrement": false
956
+ },
957
+ "recent_trace_ids": {
958
+ "name": "recent_trace_ids",
959
+ "type": "text",
960
+ "primaryKey": false,
961
+ "notNull": true,
962
+ "autoincrement": false,
963
+ "default": "'[]'"
964
+ },
965
+ "updated_at": {
966
+ "name": "updated_at",
967
+ "type": "text",
968
+ "primaryKey": false,
969
+ "notNull": true,
970
+ "autoincrement": false
971
+ }
972
+ },
973
+ "indexes": {},
974
+ "foreignKeys": {},
975
+ "compositePrimaryKeys": {},
976
+ "uniqueConstraints": {},
977
+ "checkConstraints": {}
978
+ }
979
+ },
980
+ "views": {},
981
+ "enums": {},
982
+ "_meta": {
983
+ "schemas": {},
984
+ "tables": {},
985
+ "columns": {}
986
+ },
987
+ "internal": {
988
+ "indexes": {}
989
+ }
990
+ }