@tokenoftrust/storefront-runner 1.4.2-rc.0 → 2.0.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 (370) hide show
  1. package/apps/storefront/astro.config.mjs +3 -3
  2. package/apps/storefront/dev-plugins/tenant-hot-reload.mjs +8 -3
  3. package/apps/storefront/env.d.ts +54 -5
  4. package/apps/storefront/integrations/materialize-guard.mjs +12 -14
  5. package/apps/storefront/migrations-apps/0004_deep_morph.sql +36 -0
  6. package/apps/storefront/migrations-apps/0005_common_mystique.sql +23 -0
  7. package/apps/storefront/migrations-apps/0006_broad_microchip.sql +16 -0
  8. package/apps/storefront/migrations-apps/0007_brave_outlaw_kid.sql +15 -0
  9. package/apps/storefront/migrations-apps/0008_blue_dazzler.sql +11 -0
  10. package/apps/storefront/migrations-apps/0009_bored_shinobi_shaw.sql +15 -0
  11. package/apps/storefront/migrations-apps/0010_ws4_verified_provider_measurement.sql +35 -0
  12. package/apps/storefront/migrations-apps/meta/0004_snapshot.json +1474 -0
  13. package/apps/storefront/migrations-apps/meta/0005_snapshot.json +1617 -0
  14. package/apps/storefront/migrations-apps/meta/0006_snapshot.json +1716 -0
  15. package/apps/storefront/migrations-apps/meta/0007_snapshot.json +1812 -0
  16. package/apps/storefront/migrations-apps/meta/0008_snapshot.json +1881 -0
  17. package/apps/storefront/migrations-apps/meta/0009_snapshot.json +1979 -0
  18. package/apps/storefront/migrations-apps/meta/_journal.json +42 -0
  19. package/apps/storefront/public/apps/tot.demo.analytics/0.1.0/entry.js +42 -0
  20. package/apps/storefront/public/platform/amplitude-http/v1/entry.mjs +19 -0
  21. package/apps/storefront/public/platform/google-measurement/v1/entry.mjs +19 -0
  22. package/apps/storefront/public/shared/commerce-chrome.css +20 -2
  23. package/apps/storefront/scripts/build-v84-clean-clone-standalone.mjs +68 -0
  24. package/apps/storefront/scripts/deny-v84-clean-clone-standalone-capabilities.mjs +111 -0
  25. package/apps/storefront/scripts/deny-v84-dogfood-capabilities.mjs +2 -0
  26. package/apps/storefront/scripts/deny-v84-lifecycle-capabilities.mjs +247 -0
  27. package/apps/storefront/scripts/dogfood-v84-nonportable-routes.ts +73 -0
  28. package/apps/storefront/scripts/fixed-v84-native-install-producer.ts +79 -0
  29. package/apps/storefront/scripts/generated/v84-clean-clone-replay.bundle.mjs +10982 -0
  30. package/apps/storefront/scripts/import-v84-through-ws2.ts +38 -0
  31. package/apps/storefront/scripts/initialize-v84-lifecycle-tooling-dependency.ts +2 -0
  32. package/apps/storefront/scripts/initialize-v84-lifecycle-tooling.ts +4 -0
  33. package/apps/storefront/scripts/install-v84-native-through-ws1.ts +185 -0
  34. package/apps/storefront/scripts/prove-clone-isolation.ts +506 -0
  35. package/apps/storefront/scripts/replay-v84-clean-clone-pass.ts +148 -0
  36. package/apps/storefront/scripts/replay-v84-clean-clone-standalone.ts +35 -0
  37. package/apps/storefront/scripts/replay-v84-clean-clone.ts +214 -0
  38. package/apps/storefront/scripts/run-fixed-v84-native-install-producer.mjs +18 -0
  39. package/apps/storefront/scripts/run-v84-clone-isolation-proof.mjs +18 -0
  40. package/apps/storefront/scripts/run-v84-clone-lifecycle-proof.mjs +18 -0
  41. package/apps/storefront/scripts/run-v84-import-through-ws2-proof.mjs +17 -0
  42. package/apps/storefront/scripts/run-v84-nonportable-route-dogfood.mjs +15 -0
  43. package/apps/storefront/scripts/sanitize-v84-proof-environment.mjs +21 -0
  44. package/apps/storefront/scripts/v84CleanCloneGraphPin.ts +42 -0
  45. package/apps/storefront/scripts/v84CleanCloneSourceGraph.ts +145 -0
  46. package/apps/storefront/scripts/validate-v84-clone-lifecycle.ts +18 -0
  47. package/apps/storefront/src/components/Img.astro +1 -1
  48. package/apps/storefront/src/components/admin/AdminBlogTab.astro +19 -16
  49. package/apps/storefront/src/components/admin/AdminIntegrationsTab.astro +105 -0
  50. package/apps/storefront/src/components/admin/AdminPublishTab.astro +1057 -412
  51. package/apps/storefront/src/components/admin/AdminSettingsTab.astro +2 -2
  52. package/apps/storefront/src/components/admin/orders/OrdersWorkspace.astro +5 -5
  53. package/apps/storefront/src/components/chrome/NavDropdown.astro +12 -0
  54. package/apps/storefront/src/components/chrome/SiteFooter.astro +7 -2
  55. package/apps/storefront/src/components/chrome/SiteHeader.astro +46 -10
  56. package/apps/storefront/src/components/compliance/AdultSignatureNotice.astro +1 -1
  57. package/apps/storefront/src/components/compliance/ComplianceNotice.astro +1 -2
  58. package/apps/storefront/src/components/compliance/ExciseTaxNotice.astro +1 -2
  59. package/apps/storefront/src/components/compliance/PactActNotice.astro +1 -1
  60. package/apps/storefront/src/components/compliance/Prop65Warning.astro +1 -2
  61. package/apps/storefront/src/components/compliance/PurchaseLimitNotice.astro +2 -3
  62. package/apps/storefront/src/components/compliance/ShippingRestrictionNotice.astro +2 -2
  63. package/apps/storefront/src/components/compliance/StateEligibilityNotice.astro +2 -3
  64. package/apps/storefront/src/components/content/TrustStrip.astro +4 -4
  65. package/apps/storefront/src/components/islands/MobileNav.tsx +26 -1
  66. package/apps/storefront/src/components/islands/VariantSelector.tsx +27 -2
  67. package/apps/storefront/src/components/islands/useCheckoutHandoffCorrelation.ts +75 -0
  68. package/apps/storefront/src/components/membership/IllustrativeLabel.astro +1 -2
  69. package/apps/storefront/src/components/membership/TierCards.astro +2 -2
  70. package/apps/storefront/src/components/membership/TierComparisonTable.astro +2 -2
  71. package/apps/storefront/src/components/subscription/SavingsExplainer.astro +2 -2
  72. package/apps/storefront/src/config/adminTenantLookup.ts +35 -0
  73. package/apps/storefront/src/config/devTenantSeed.ts +9 -9
  74. package/apps/storefront/src/config/resolver.ts +18 -10
  75. package/apps/storefront/src/layouts/Layout.astro +100 -20
  76. package/apps/storefront/src/lib/activity/candidateSubmitLease.ts +87 -0
  77. package/apps/storefront/src/lib/activity/changeActorAttribution.ts +86 -6
  78. package/apps/storefront/src/lib/activity/deployVersion.ts +1 -1
  79. package/apps/storefront/src/lib/admin/adminShell.ts +2 -0
  80. package/apps/storefront/src/lib/admin/envelope.ts +1 -2
  81. package/apps/storefront/src/lib/apps/adminService.ts +10 -0
  82. package/apps/storefront/src/lib/apps/adminSession.ts +1 -1
  83. package/apps/storefront/src/lib/apps/appVersionStore.ts +281 -0
  84. package/apps/storefront/src/lib/apps/consentConfigStore.ts +228 -0
  85. package/apps/storefront/src/lib/apps/gtmMigrationInstall.ts +447 -0
  86. package/apps/storefront/src/lib/apps/gtmMigrationReport.ts +367 -0
  87. package/apps/storefront/src/lib/apps/gtmMigrationTab.ts +315 -0
  88. package/apps/storefront/src/lib/apps/integrationLifecycle.ts +614 -0
  89. package/apps/storefront/src/lib/apps/integrationLifecycleController.ts +125 -0
  90. package/apps/storefront/src/lib/apps/integrationReadModel.ts +563 -0
  91. package/apps/storefront/src/lib/apps/integrationsTab.ts +547 -0
  92. package/apps/storefront/src/lib/apps/integrationsView.ts +106 -0
  93. package/apps/storefront/src/lib/apps/managedAnalyticsService.ts +599 -0
  94. package/apps/storefront/src/lib/apps/orders/orderConversionD1.ts +150 -0
  95. package/apps/storefront/src/lib/apps/orders/orderForwardReceiver.ts +8 -0
  96. package/apps/storefront/src/lib/apps/orders/ordersStore.ts +1 -1
  97. package/apps/storefront/src/lib/apps/orders/verifiedProviderMeasurement.ts +117 -0
  98. package/apps/storefront/src/lib/apps/registryService.ts +264 -10
  99. package/apps/storefront/src/lib/apps/tenantIntegrationMaterialization.ts +170 -0
  100. package/apps/storefront/src/lib/apps/v84CleanCloneReplayContext.ts +16 -0
  101. package/apps/storefront/src/lib/apps/v84CloneLifecycleCacheEvidence.ts +105 -0
  102. package/apps/storefront/src/lib/apps/v84CloneLifecycleEvidence.ts +177 -0
  103. package/apps/storefront/src/lib/apps/v84CloneLifecycleMaterialization.ts +251 -0
  104. package/apps/storefront/src/lib/apps/v84CloneLifecycleSemantics.ts +241 -0
  105. package/apps/storefront/src/lib/apps/v84CloneMigrationEvidence.ts +211 -0
  106. package/apps/storefront/src/lib/apps/v84CloneNativeInstallEvidence.ts +409 -0
  107. package/apps/storefront/src/lib/apps/v84NonportableCodeCoaching.ts +368 -0
  108. package/apps/storefront/src/lib/apps/v84NonportableRouteContract.ts +188 -0
  109. package/apps/storefront/src/lib/apps/v84NonportableRouteDogfood.ts +291 -0
  110. package/apps/storefront/src/lib/apps/ws1ManagedAnalyticsClient.ts +95 -0
  111. package/apps/storefront/src/lib/auth/adminApiGuard.ts +66 -0
  112. package/apps/storefront/src/lib/auth/adminEntry.ts +2 -2
  113. package/apps/storefront/src/lib/auth/adminLanding.ts +88 -0
  114. package/apps/storefront/src/lib/blog/collection.ts +114 -17
  115. package/apps/storefront/src/lib/blog/markdown.ts +1 -1
  116. package/apps/storefront/src/lib/blog/provider.ts +76 -9
  117. package/apps/storefront/src/lib/blog/types.ts +9 -9
  118. package/apps/storefront/src/lib/chrome/examples/tokenoftrust.chrome-assignments.example.json +6 -0
  119. package/apps/storefront/src/lib/chrome/examples/tokenoftrust.chrome.example.json +79 -0
  120. package/apps/storefront/src/lib/chrome/model.ts +48 -253
  121. package/apps/storefront/src/lib/chrome/navCurrent.ts +29 -0
  122. package/apps/storefront/src/lib/chrome/parseConfig.ts +18 -32
  123. package/apps/storefront/src/lib/chrome/variant.ts +39 -0
  124. package/apps/storefront/src/lib/commerce/checkoutHandoffCorrelation.ts +105 -0
  125. package/apps/storefront/src/lib/compliance/tamper-sentinel-boot.ts +152 -0
  126. package/apps/storefront/src/lib/compliance/tamper-sentinel.ts +327 -0
  127. package/apps/storefront/src/lib/content/index.ts +5 -5
  128. package/apps/storefront/src/lib/content-edit/applyDiff.ts +1 -1
  129. package/apps/storefront/src/lib/content-edit/route.ts +1 -1
  130. package/apps/storefront/src/lib/d1/catalog.ts +12 -0
  131. package/apps/storefront/src/lib/d1/schema-apps.ts +276 -0
  132. package/apps/storefront/src/lib/dev/cockpit/ask.ts +49 -0
  133. package/apps/storefront/src/lib/dev/cockpit/clickToSource.ts +71 -0
  134. package/apps/storefront/src/lib/dev/cockpit/copyCommand.ts +227 -0
  135. package/apps/storefront/src/lib/dev/cockpit/files.ts +249 -0
  136. package/apps/storefront/src/lib/dev/cockpit/hostedActivity.ts +500 -0
  137. package/apps/storefront/src/lib/dev/cockpit/infoPopover.ts +12 -0
  138. package/apps/storefront/src/lib/dev/cockpit/mcpCopy.ts +34 -0
  139. package/apps/storefront/src/lib/dev/cockpit/monitor.ts +107 -0
  140. package/apps/storefront/src/lib/dev/cockpit/stepper.ts +116 -0
  141. package/apps/storefront/src/lib/dev/cockpit/themeToggle.ts +23 -0
  142. package/apps/storefront/src/lib/dev/runtimeStore.ts +1 -1
  143. package/apps/storefront/src/lib/edgeCache.ts +18 -6
  144. package/apps/storefront/src/lib/email/candidateConflictEmail.ts +80 -0
  145. package/apps/storefront/src/lib/integration/browserEnvironment.ts +137 -0
  146. package/apps/storefront/src/lib/integration/managedInstallDeclarations.ts +72 -0
  147. package/apps/storefront/src/lib/integration/nonceStamp.ts +49 -0
  148. package/apps/storefront/src/lib/integration/tenantDeclarations.ts +116 -0
  149. package/apps/storefront/src/lib/membership/eligibility.ts +1 -1
  150. package/apps/storefront/src/lib/membership/model.ts +1 -2
  151. package/apps/storefront/src/lib/newsletter/confirmationEmail.ts +2 -2
  152. package/apps/storefront/src/lib/newsletter/consent.ts +2 -2
  153. package/apps/storefront/src/lib/newsletter/send.ts +3 -3
  154. package/apps/storefront/src/lib/previewReload.ts +57 -1
  155. package/apps/storefront/src/lib/publish/adminPublishTab.ts +1775 -669
  156. package/apps/storefront/src/lib/publish/buildStream.ts +269 -0
  157. package/apps/storefront/src/lib/publish/collapsePersistence.ts +72 -0
  158. package/apps/storefront/src/lib/publish/lifecycleState.ts +369 -0
  159. package/apps/storefront/src/lib/publish/liveReleaseSummary.ts +29 -0
  160. package/apps/storefront/src/lib/publish/mergeDoctorOnFailure.ts +78 -0
  161. package/apps/storefront/src/lib/publish/mergeHealthBanner.ts +62 -0
  162. package/apps/storefront/src/lib/publish/mergeRowFindings.ts +124 -0
  163. package/apps/storefront/src/lib/publish/mergeSupportEscalation.ts +75 -0
  164. package/apps/storefront/src/lib/publish/publish-guard.ts +88 -0
  165. package/apps/storefront/src/lib/publish/publishFormat.ts +165 -0
  166. package/apps/storefront/src/lib/publish/publishHero.ts +177 -0
  167. package/apps/storefront/src/lib/publish/reviewRelease/changeState.ts +66 -0
  168. package/apps/storefront/src/lib/publish/reviewRelease/copy.ts +141 -0
  169. package/apps/storefront/src/lib/publish/reviewRelease/index.ts +41 -0
  170. package/apps/storefront/src/lib/publish/reviewRelease/permissions.ts +47 -0
  171. package/apps/storefront/src/lib/publish/reviewRelease/releaseState.ts +42 -0
  172. package/apps/storefront/src/lib/publish/reviewRelease/types.ts +59 -0
  173. package/apps/storefront/src/lib/publish/reviewRelease/viewModel.ts +440 -0
  174. package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/actions.ts +161 -0
  175. package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/controller.ts +325 -0
  176. package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/render.ts +241 -0
  177. package/apps/storefront/src/lib/publish/shipWorkspace.ts +22 -3
  178. package/apps/storefront/src/lib/publish/sseRoute.ts +119 -0
  179. package/apps/storefront/src/lib/publish/streamLogConsole.ts +142 -0
  180. package/apps/storefront/src/lib/publish/versionNumber.ts +52 -0
  181. package/apps/storefront/src/lib/rawChrome.ts +125 -47
  182. package/apps/storefront/src/lib/rawMarketingHtml.ts +74 -3
  183. package/apps/storefront/src/lib/seo/alternates.ts +1 -1
  184. package/apps/storefront/src/lib/social/notify.ts +4 -4
  185. package/apps/storefront/src/lib/storyblok/content-model.ts +7 -33
  186. package/apps/storefront/src/lib/storyblok/provider.ts +203 -69
  187. package/apps/storefront/src/lib/subscription/model.ts +4 -4
  188. package/apps/storefront/src/lib/the-build/provider.ts +9 -4
  189. package/apps/storefront/src/middleware/index.ts +273 -51
  190. package/apps/storefront/src/pages/[...slug].astro +9 -4
  191. package/apps/storefront/src/pages/admin/review-release.astro +265 -0
  192. package/apps/storefront/src/pages/admin/select.astro +96 -0
  193. package/apps/storefront/src/pages/admin.astro +16 -2
  194. package/apps/storefront/src/pages/api/activity.ts +8 -8
  195. package/apps/storefront/src/pages/api/admin/activity-alerts.ts +5 -20
  196. package/apps/storefront/src/pages/api/admin/orders/[id].ts +7 -2
  197. package/apps/storefront/src/pages/api/admin/orders.ts +8 -2
  198. package/apps/storefront/src/pages/api/apps/admin/gtm-migration-install.ts +174 -0
  199. package/apps/storefront/src/pages/api/apps/admin/gtm-migration.ts +96 -0
  200. package/apps/storefront/src/pages/api/apps/admin/integration-lifecycle.ts +118 -0
  201. package/apps/storefront/src/pages/api/apps/admin/integrations.ts +89 -0
  202. package/apps/storefront/src/pages/api/apps/admin/platform-adapters.ts +85 -0
  203. package/apps/storefront/src/pages/api/apps/internal/order-forward.ts +74 -2
  204. package/apps/storefront/src/pages/api/commerce/checkout-handoff.ts +77 -0
  205. package/apps/storefront/src/pages/api/compliance/tamper.ts +88 -0
  206. package/apps/storefront/src/pages/api/integrations/v1/[operation].ts +108 -0
  207. package/apps/storefront/src/pages/api/rum/vitals.ts +1 -2
  208. package/apps/storefront/src/pages/blog/[slug].astro +5 -5
  209. package/apps/storefront/src/pages/blog/author/[author].astro +3 -3
  210. package/apps/storefront/src/pages/blog/category/[category].astro +2 -2
  211. package/apps/storefront/src/pages/blog/index.astro +2 -2
  212. package/apps/storefront/src/pages/blog/tag/[tag].astro +2 -2
  213. package/apps/storefront/src/pages/cockpit.astro +61 -1362
  214. package/apps/storefront/src/pages/index.astro +10 -5
  215. package/apps/storefront/src/pages/llms.txt.ts +1 -1
  216. package/apps/storefront/src/pages/products/[handle].astro +7 -6
  217. package/apps/storefront/src/pages/sitemap.xml.ts +2 -2
  218. package/apps/storefront/src/pages/style-guide/[tenant]/[theme].astro +42 -31
  219. package/apps/storefront/src/pages/style-guide/[tenant]/chrome/[theme].astro +8 -3
  220. package/apps/storefront/src/pages/style-guide/[tenant]/guide/[theme].astro +6 -2
  221. package/apps/storefront/src/pages/style-guide/[tenant]/index.astro +6 -2
  222. package/apps/storefront/src/pages/style-guide/index.astro +19 -5
  223. package/apps/storefront/src/pages/tenants/[id]/[...path].ts +38 -2
  224. package/apps/storefront/src/pages/the-build/[slug].astro +4 -4
  225. package/apps/storefront/src/pages/the-build/index.astro +2 -2
  226. package/apps/storefront/src/pages/the-build/rss.xml.ts +2 -2
  227. package/apps/storefront/src/styles/admin.css +27 -1
  228. package/apps/storefront/src/themes/tenants/index.ts +19 -7
  229. package/apps/storefront/tsconfig.json +1 -1
  230. package/package.json +1 -1
  231. package/packages/public-runtime/package.json +2 -1
  232. package/packages/public-runtime/schemas/managed-analytics/v1/adapter-definition.schema.json +427 -0
  233. package/packages/public-runtime/schemas/managed-analytics/v1/create-integration-install-request.schema.json +161 -0
  234. package/packages/public-runtime/schemas/managed-analytics/v1/create-migration-draft-request.schema.json +157 -0
  235. package/packages/public-runtime/schemas/managed-analytics/v1/delete-integration-install-request.schema.json +84 -0
  236. package/packages/public-runtime/schemas/managed-analytics/v1/delete-migration-draft-request.schema.json +84 -0
  237. package/packages/public-runtime/schemas/managed-analytics/v1/error-envelope.schema.json +180 -0
  238. package/packages/public-runtime/schemas/managed-analytics/v1/get-adapter-definition-request.schema.json +52 -0
  239. package/packages/public-runtime/schemas/managed-analytics/v1/get-integration-install-request.schema.json +52 -0
  240. package/packages/public-runtime/schemas/managed-analytics/v1/get-integration-revision-request.schema.json +79 -0
  241. package/packages/public-runtime/schemas/managed-analytics/v1/get-migration-draft-request.schema.json +52 -0
  242. package/packages/public-runtime/schemas/managed-analytics/v1/integration-install.schema.json +167 -0
  243. package/packages/public-runtime/schemas/managed-analytics/v1/integration-revision.schema.json +208 -0
  244. package/packages/public-runtime/schemas/managed-analytics/v1/list-adapter-definitions-request.schema.json +53 -0
  245. package/packages/public-runtime/schemas/managed-analytics/v1/list-integration-installs-request.schema.json +53 -0
  246. package/packages/public-runtime/schemas/managed-analytics/v1/list-integration-revisions-request.schema.json +82 -0
  247. package/packages/public-runtime/schemas/managed-analytics/v1/migration-draft.schema.json +218 -0
  248. package/packages/public-runtime/schemas/managed-analytics/v1/mutation-request.schema.json +52 -0
  249. package/packages/public-runtime/schemas/managed-analytics/v1/mutation-success-envelope.schema.json +49 -0
  250. package/packages/public-runtime/schemas/managed-analytics/v1/read-request.schema.json +20 -0
  251. package/packages/public-runtime/schemas/managed-analytics/v1/read-success-envelope.schema.json +45 -0
  252. package/packages/public-runtime/schemas/managed-analytics/v1/revise-integration-install-request.schema.json +156 -0
  253. package/packages/public-runtime/schemas/managed-analytics/v1/set-integration-install-status-request.schema.json +92 -0
  254. package/packages/public-runtime/schemas/managed-analytics/v1/update-migration-draft-request.schema.json +184 -0
  255. package/packages/public-runtime/scripts/generate-managed-analytics-api-v1-schemas.mjs +13 -0
  256. package/packages/public-runtime/src/activity/catalog.ts +41 -37
  257. package/packages/public-runtime/src/activity/event.ts +6 -6
  258. package/packages/public-runtime/src/activity/index.ts +2 -2
  259. package/packages/public-runtime/src/activity/redaction.ts +4 -4
  260. package/packages/public-runtime/src/candidate-index.ts +42 -8
  261. package/packages/public-runtime/src/checkout-orders.ts +2 -2
  262. package/packages/public-runtime/src/checkout-style-publish.ts +2 -2
  263. package/packages/public-runtime/src/checkout-style.ts +7 -7
  264. package/packages/public-runtime/src/checkout.ts +3 -3
  265. package/packages/public-runtime/src/chrome.ts +777 -0
  266. package/packages/public-runtime/src/compliance-obligations.ts +310 -0
  267. package/packages/public-runtime/src/csp.ts +99 -0
  268. package/packages/public-runtime/src/customization-runtime.ts +32 -1
  269. package/packages/public-runtime/src/destination-webhook/contract.ts +353 -0
  270. package/packages/public-runtime/src/embed-catalog.d.mts +9 -0
  271. package/packages/public-runtime/src/embed-catalog.mjs +40 -0
  272. package/packages/public-runtime/src/evidence.ts +288 -0
  273. package/packages/public-runtime/src/gtm-migration/bounds.ts +138 -0
  274. package/packages/public-runtime/src/gtm-migration/disposition-rules.ts +361 -0
  275. package/packages/public-runtime/src/gtm-migration/dispositions.ts +181 -0
  276. package/packages/public-runtime/src/gtm-migration/draft-generator.ts +400 -0
  277. package/packages/public-runtime/src/gtm-migration/graph.ts +468 -0
  278. package/packages/public-runtime/src/gtm-migration/index.ts +95 -0
  279. package/packages/public-runtime/src/gtm-migration/parse.ts +410 -0
  280. package/packages/public-runtime/src/gtm-migration/references.ts +266 -0
  281. package/packages/public-runtime/src/gtm-migration/types.ts +86 -0
  282. package/packages/public-runtime/src/index.ts +16 -1
  283. package/packages/public-runtime/src/integration/assurance-decision.ts +259 -0
  284. package/packages/public-runtime/src/integration/assurance.ts +228 -0
  285. package/packages/public-runtime/src/integration/candidate-evidence.ts +377 -0
  286. package/packages/public-runtime/src/integration/commerce-broker.ts +497 -0
  287. package/packages/public-runtime/src/integration/consent-broker.ts +337 -0
  288. package/packages/public-runtime/src/integration/consent-cmp-demand.ts +115 -0
  289. package/packages/public-runtime/src/integration/consent-config.ts +260 -0
  290. package/packages/public-runtime/src/integration/consent-preview.ts +125 -0
  291. package/packages/public-runtime/src/integration/correlation-token.ts +444 -0
  292. package/packages/public-runtime/src/integration/csp-compiler.ts +267 -0
  293. package/packages/public-runtime/src/integration/csp.ts +105 -0
  294. package/packages/public-runtime/src/integration/digest.ts +43 -0
  295. package/packages/public-runtime/src/integration/environment.ts +228 -0
  296. package/packages/public-runtime/src/integration/events-catalog.ts +186 -0
  297. package/packages/public-runtime/src/integration/events.ts +701 -0
  298. package/packages/public-runtime/src/integration/g2-action-boundary.ts +106 -0
  299. package/packages/public-runtime/src/integration/index.ts +90 -0
  300. package/packages/public-runtime/src/integration/interim-bridge.ts +138 -0
  301. package/packages/public-runtime/src/integration/lifecycle-boot.ts +317 -0
  302. package/packages/public-runtime/src/integration/lifecycle-runtime.ts +393 -0
  303. package/packages/public-runtime/src/integration/lifecycle.ts +94 -0
  304. package/packages/public-runtime/src/integration/managed-analytics-api-v1-safety.d.mts +2 -0
  305. package/packages/public-runtime/src/integration/managed-analytics-api-v1-safety.mjs +10 -0
  306. package/packages/public-runtime/src/integration/managed-analytics-api-v1.schemas.ts +382 -0
  307. package/packages/public-runtime/src/integration/managed-analytics-api-v1.ts +684 -0
  308. package/packages/public-runtime/src/integration/managed-analytics-bridge.ts +383 -0
  309. package/packages/public-runtime/src/integration/managed-analytics-value-safety.ts +14 -0
  310. package/packages/public-runtime/src/integration/managed-analytics.ts +277 -0
  311. package/packages/public-runtime/src/integration/manifest.ts +470 -0
  312. package/packages/public-runtime/src/integration/native-amplitude.ts +362 -0
  313. package/packages/public-runtime/src/integration/native-ga4.ts +352 -0
  314. package/packages/public-runtime/src/integration/observability.ts +451 -0
  315. package/packages/public-runtime/src/integration/order-conversion.ts +0 -0
  316. package/packages/public-runtime/src/integration/phases.ts +182 -0
  317. package/packages/public-runtime/src/integration/plan.ts +112 -0
  318. package/packages/public-runtime/src/integration/platform-adapter-runtime.ts +146 -0
  319. package/packages/public-runtime/src/integration/platform-adapters.ts +671 -0
  320. package/packages/public-runtime/src/integration/promotion-gate.ts +451 -0
  321. package/packages/public-runtime/src/integration/provider-checkout-extension.ts +425 -0
  322. package/packages/public-runtime/src/integration/receipt-measurement.ts +370 -0
  323. package/packages/public-runtime/src/integration/regulated-parent-cert.ts +311 -0
  324. package/packages/public-runtime/src/integration/render-phases.ts +267 -0
  325. package/packages/public-runtime/src/integration/resolve.ts +465 -0
  326. package/packages/public-runtime/src/integration/result.ts +239 -0
  327. package/packages/public-runtime/src/integration/secrets.ts +92 -0
  328. package/packages/public-runtime/src/integration/tamper-evidence.ts +205 -0
  329. package/packages/public-runtime/src/integration/tamper-recovery.ts +127 -0
  330. package/packages/public-runtime/src/integration/version.ts +92 -0
  331. package/packages/public-runtime/src/integration-capabilities.ts +520 -0
  332. package/packages/public-runtime/src/membership.ts +2 -2
  333. package/packages/public-runtime/src/raw-html-policy.ts +2 -4
  334. package/packages/public-runtime/src/regulated-commerce/broker/consent-dedupe.ts +144 -0
  335. package/packages/public-runtime/src/regulated-commerce/correlation/contract.ts +177 -0
  336. package/packages/public-runtime/src/regulated-commerce/diagnostics/local-dispatch.ts +24 -0
  337. package/packages/public-runtime/src/regulated-commerce/diagnostics/read-model.ts +69 -0
  338. package/packages/public-runtime/src/regulated-commerce/dispatch/core.ts +134 -0
  339. package/packages/public-runtime/src/regulated-commerce/events/contract.ts +113 -0
  340. package/packages/public-runtime/src/regulated-commerce/ledger/core.ts +81 -0
  341. package/packages/public-runtime/src/regulated-commerce/mappings/ga4-ads.ts +87 -0
  342. package/packages/public-runtime/src/regulated-commerce/provider-order/bridge.ts +52 -0
  343. package/packages/public-runtime/src/regulated-commerce/purchase-truth/contract.ts +252 -0
  344. package/packages/public-runtime/src/regulated-commerce/sources/accepted-browser-operation.ts +67 -0
  345. package/packages/public-runtime/src/regulated-commerce/testing/fake-destination.ts +93 -0
  346. package/packages/public-runtime/src/static-bundle.ts +5 -5
  347. package/packages/public-runtime/src/tenant-assets.ts +143 -4
  348. package/packages/public-runtime/src/tenant.ts +136 -9
  349. package/packages/public-runtime/tests/fixtures/integration/browser-environment.example.json +8 -0
  350. package/packages/public-runtime/tests/fixtures/integration/commerce-event.example.json +44 -0
  351. package/packages/public-runtime/tests/fixtures/integration/commerce-order-event.example.json +44 -0
  352. package/packages/public-runtime/tests/fixtures/integration/compliance-assurance-record.example.json +50 -0
  353. package/packages/public-runtime/tests/fixtures/integration/integration-manifest-v2.example.json +120 -0
  354. package/packages/public-runtime/tests/fixtures/integration/managed-analytics-v1/fake-adapter-catalog.json +35 -0
  355. package/packages/public-runtime/tests/fixtures/integration/tenant-action-registry.example.json +11 -0
  356. package/packages/public-runtime/tests/fixtures/integration/tenant-local-example/README.md +22 -0
  357. package/packages/public-runtime/tests/fixtures/integration/tenant-local-example/entry.js +30 -0
  358. package/packages/public-runtime/tests/fixtures/integration/tenant-local-example/manifest.json +75 -0
  359. package/packages/public-runtime/tests/fixtures/integration/tenant-local-example/public-config.json +3 -0
  360. package/packages/public-runtime/tests/fixtures/regulated-commerce/fake-destinations.ts +38 -0
  361. package/packages/public-runtime/tests/gtm-migration/fixtures/gtm-sample-container-v84.provenance.json +29 -0
  362. package/packages/public-runtime/tests/gtm-migration/fixtures/gtm-sample-container-v84.redacted.json +3397 -0
  363. package/scripts/build/copy-tenant-assets.mjs +12 -5
  364. package/scripts/dev/ai-edit.mjs +2 -1
  365. package/scripts/dev/file-browser.mjs +2 -2
  366. package/scripts/dev/file-writer.mjs +2 -2
  367. package/scripts/dev/integration-guardrails.mjs +498 -0
  368. package/scripts/dev/safe-path.mjs +2 -2
  369. package/scripts/dev/tenant-source-root.mjs +3 -2
  370. package/scripts/tot-dev.mjs +5 -4
@@ -0,0 +1,1617 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "2a3a3f8c-c126-43c0-b9fe-d14f79103321",
5
+ "prevId": "acf2cadd-ff2f-4930-ab74-985d6e296dbe",
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
+ "candidate_attempts": {
508
+ "name": "candidate_attempts",
509
+ "columns": {
510
+ "id": {
511
+ "name": "id",
512
+ "type": "text",
513
+ "primaryKey": true,
514
+ "notNull": true,
515
+ "autoincrement": false
516
+ },
517
+ "candidate_id": {
518
+ "name": "candidate_id",
519
+ "type": "text",
520
+ "primaryKey": false,
521
+ "notNull": true,
522
+ "autoincrement": false
523
+ },
524
+ "tenant_id": {
525
+ "name": "tenant_id",
526
+ "type": "text",
527
+ "primaryKey": false,
528
+ "notNull": true,
529
+ "autoincrement": false
530
+ },
531
+ "attempt_number": {
532
+ "name": "attempt_number",
533
+ "type": "integer",
534
+ "primaryKey": false,
535
+ "notNull": true,
536
+ "autoincrement": false
537
+ },
538
+ "kind": {
539
+ "name": "kind",
540
+ "type": "text",
541
+ "primaryKey": false,
542
+ "notNull": true,
543
+ "autoincrement": false
544
+ },
545
+ "status": {
546
+ "name": "status",
547
+ "type": "text",
548
+ "primaryKey": false,
549
+ "notNull": true,
550
+ "autoincrement": false,
551
+ "default": "'pending'"
552
+ },
553
+ "head_sha": {
554
+ "name": "head_sha",
555
+ "type": "text",
556
+ "primaryKey": false,
557
+ "notNull": false,
558
+ "autoincrement": false
559
+ },
560
+ "detail": {
561
+ "name": "detail",
562
+ "type": "text",
563
+ "primaryKey": false,
564
+ "notNull": false,
565
+ "autoincrement": false
566
+ },
567
+ "evidence": {
568
+ "name": "evidence",
569
+ "type": "text",
570
+ "primaryKey": false,
571
+ "notNull": false,
572
+ "autoincrement": false
573
+ },
574
+ "started_at": {
575
+ "name": "started_at",
576
+ "type": "text",
577
+ "primaryKey": false,
578
+ "notNull": true,
579
+ "autoincrement": false
580
+ },
581
+ "finished_at": {
582
+ "name": "finished_at",
583
+ "type": "text",
584
+ "primaryKey": false,
585
+ "notNull": false,
586
+ "autoincrement": false
587
+ }
588
+ },
589
+ "indexes": {
590
+ "uq_candidate_attempts_candidate_number": {
591
+ "name": "uq_candidate_attempts_candidate_number",
592
+ "columns": [
593
+ "candidate_id",
594
+ "attempt_number"
595
+ ],
596
+ "isUnique": true
597
+ },
598
+ "idx_candidate_attempts_candidate": {
599
+ "name": "idx_candidate_attempts_candidate",
600
+ "columns": [
601
+ "candidate_id"
602
+ ],
603
+ "isUnique": false
604
+ },
605
+ "idx_candidate_attempts_tenant": {
606
+ "name": "idx_candidate_attempts_tenant",
607
+ "columns": [
608
+ "tenant_id"
609
+ ],
610
+ "isUnique": false
611
+ }
612
+ },
613
+ "foreignKeys": {},
614
+ "compositePrimaryKeys": {},
615
+ "uniqueConstraints": {},
616
+ "checkConstraints": {}
617
+ },
618
+ "candidates": {
619
+ "name": "candidates",
620
+ "columns": {
621
+ "id": {
622
+ "name": "id",
623
+ "type": "text",
624
+ "primaryKey": true,
625
+ "notNull": true,
626
+ "autoincrement": false
627
+ },
628
+ "tenant_id": {
629
+ "name": "tenant_id",
630
+ "type": "text",
631
+ "primaryKey": false,
632
+ "notNull": true,
633
+ "autoincrement": false
634
+ },
635
+ "repository": {
636
+ "name": "repository",
637
+ "type": "text",
638
+ "primaryKey": false,
639
+ "notNull": true,
640
+ "autoincrement": false
641
+ },
642
+ "pr_number": {
643
+ "name": "pr_number",
644
+ "type": "integer",
645
+ "primaryKey": false,
646
+ "notNull": true,
647
+ "autoincrement": false
648
+ },
649
+ "change_id": {
650
+ "name": "change_id",
651
+ "type": "text",
652
+ "primaryKey": false,
653
+ "notNull": true,
654
+ "autoincrement": false
655
+ },
656
+ "branch": {
657
+ "name": "branch",
658
+ "type": "text",
659
+ "primaryKey": false,
660
+ "notNull": false,
661
+ "autoincrement": false
662
+ },
663
+ "title": {
664
+ "name": "title",
665
+ "type": "text",
666
+ "primaryKey": false,
667
+ "notNull": false,
668
+ "autoincrement": false
669
+ },
670
+ "author": {
671
+ "name": "author",
672
+ "type": "text",
673
+ "primaryKey": false,
674
+ "notNull": false,
675
+ "autoincrement": false
676
+ },
677
+ "status": {
678
+ "name": "status",
679
+ "type": "text",
680
+ "primaryKey": false,
681
+ "notNull": true,
682
+ "autoincrement": false,
683
+ "default": "'open'"
684
+ },
685
+ "head_sha": {
686
+ "name": "head_sha",
687
+ "type": "text",
688
+ "primaryKey": false,
689
+ "notNull": false,
690
+ "autoincrement": false
691
+ },
692
+ "base_sha": {
693
+ "name": "base_sha",
694
+ "type": "text",
695
+ "primaryKey": false,
696
+ "notNull": false,
697
+ "autoincrement": false
698
+ },
699
+ "created_at": {
700
+ "name": "created_at",
701
+ "type": "text",
702
+ "primaryKey": false,
703
+ "notNull": true,
704
+ "autoincrement": false
705
+ },
706
+ "updated_at": {
707
+ "name": "updated_at",
708
+ "type": "text",
709
+ "primaryKey": false,
710
+ "notNull": true,
711
+ "autoincrement": false
712
+ }
713
+ },
714
+ "indexes": {
715
+ "uq_candidates_tenant_repo_pr": {
716
+ "name": "uq_candidates_tenant_repo_pr",
717
+ "columns": [
718
+ "tenant_id",
719
+ "repository",
720
+ "pr_number"
721
+ ],
722
+ "isUnique": true
723
+ },
724
+ "uq_candidates_tenant_change": {
725
+ "name": "uq_candidates_tenant_change",
726
+ "columns": [
727
+ "tenant_id",
728
+ "change_id"
729
+ ],
730
+ "isUnique": true
731
+ },
732
+ "idx_candidates_tenant_status": {
733
+ "name": "idx_candidates_tenant_status",
734
+ "columns": [
735
+ "tenant_id",
736
+ "status"
737
+ ],
738
+ "isUnique": false
739
+ }
740
+ },
741
+ "foreignKeys": {},
742
+ "compositePrimaryKeys": {},
743
+ "uniqueConstraints": {},
744
+ "checkConstraints": {}
745
+ },
746
+ "consent_cmp_demand": {
747
+ "name": "consent_cmp_demand",
748
+ "columns": {
749
+ "id": {
750
+ "name": "id",
751
+ "type": "text",
752
+ "primaryKey": true,
753
+ "notNull": true,
754
+ "autoincrement": false
755
+ },
756
+ "tenant_id": {
757
+ "name": "tenant_id",
758
+ "type": "text",
759
+ "primaryKey": false,
760
+ "notNull": true,
761
+ "autoincrement": false
762
+ },
763
+ "adapter_id": {
764
+ "name": "adapter_id",
765
+ "type": "text",
766
+ "primaryKey": false,
767
+ "notNull": true,
768
+ "autoincrement": false
769
+ },
770
+ "source": {
771
+ "name": "source",
772
+ "type": "text",
773
+ "primaryKey": false,
774
+ "notNull": false,
775
+ "autoincrement": false
776
+ },
777
+ "at": {
778
+ "name": "at",
779
+ "type": "text",
780
+ "primaryKey": false,
781
+ "notNull": true,
782
+ "autoincrement": false
783
+ }
784
+ },
785
+ "indexes": {
786
+ "uq_consent_cmp_demand_tenant_adapter": {
787
+ "name": "uq_consent_cmp_demand_tenant_adapter",
788
+ "columns": [
789
+ "tenant_id",
790
+ "adapter_id"
791
+ ],
792
+ "isUnique": true
793
+ },
794
+ "idx_consent_cmp_demand_adapter": {
795
+ "name": "idx_consent_cmp_demand_adapter",
796
+ "columns": [
797
+ "adapter_id"
798
+ ],
799
+ "isUnique": false
800
+ }
801
+ },
802
+ "foreignKeys": {},
803
+ "compositePrimaryKeys": {},
804
+ "uniqueConstraints": {},
805
+ "checkConstraints": {}
806
+ },
807
+ "consent_config_revisions": {
808
+ "name": "consent_config_revisions",
809
+ "columns": {
810
+ "id": {
811
+ "name": "id",
812
+ "type": "text",
813
+ "primaryKey": true,
814
+ "notNull": true,
815
+ "autoincrement": false
816
+ },
817
+ "tenant_id": {
818
+ "name": "tenant_id",
819
+ "type": "text",
820
+ "primaryKey": false,
821
+ "notNull": true,
822
+ "autoincrement": false
823
+ },
824
+ "revision": {
825
+ "name": "revision",
826
+ "type": "integer",
827
+ "primaryKey": false,
828
+ "notNull": true,
829
+ "autoincrement": false
830
+ },
831
+ "config": {
832
+ "name": "config",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": true,
836
+ "autoincrement": false
837
+ },
838
+ "actor": {
839
+ "name": "actor",
840
+ "type": "text",
841
+ "primaryKey": false,
842
+ "notNull": true,
843
+ "autoincrement": false
844
+ },
845
+ "note": {
846
+ "name": "note",
847
+ "type": "text",
848
+ "primaryKey": false,
849
+ "notNull": false,
850
+ "autoincrement": false
851
+ },
852
+ "reverted_from": {
853
+ "name": "reverted_from",
854
+ "type": "integer",
855
+ "primaryKey": false,
856
+ "notNull": false,
857
+ "autoincrement": false
858
+ },
859
+ "created_at": {
860
+ "name": "created_at",
861
+ "type": "text",
862
+ "primaryKey": false,
863
+ "notNull": true,
864
+ "autoincrement": false
865
+ }
866
+ },
867
+ "indexes": {
868
+ "uq_consent_config_tenant_revision": {
869
+ "name": "uq_consent_config_tenant_revision",
870
+ "columns": [
871
+ "tenant_id",
872
+ "revision"
873
+ ],
874
+ "isUnique": true
875
+ },
876
+ "idx_consent_config_tenant": {
877
+ "name": "idx_consent_config_tenant",
878
+ "columns": [
879
+ "tenant_id"
880
+ ],
881
+ "isUnique": false
882
+ }
883
+ },
884
+ "foreignKeys": {},
885
+ "compositePrimaryKeys": {},
886
+ "uniqueConstraints": {},
887
+ "checkConstraints": {}
888
+ },
889
+ "idempotency_keys": {
890
+ "name": "idempotency_keys",
891
+ "columns": {
892
+ "install_id": {
893
+ "name": "install_id",
894
+ "type": "text",
895
+ "primaryKey": false,
896
+ "notNull": true,
897
+ "autoincrement": false
898
+ },
899
+ "idempotency_key": {
900
+ "name": "idempotency_key",
901
+ "type": "text",
902
+ "primaryKey": false,
903
+ "notNull": true,
904
+ "autoincrement": false
905
+ },
906
+ "body_hash": {
907
+ "name": "body_hash",
908
+ "type": "text",
909
+ "primaryKey": false,
910
+ "notNull": true,
911
+ "autoincrement": false
912
+ },
913
+ "response_body": {
914
+ "name": "response_body",
915
+ "type": "text",
916
+ "primaryKey": false,
917
+ "notNull": true,
918
+ "autoincrement": false
919
+ },
920
+ "created_at": {
921
+ "name": "created_at",
922
+ "type": "text",
923
+ "primaryKey": false,
924
+ "notNull": true,
925
+ "autoincrement": false
926
+ }
927
+ },
928
+ "indexes": {},
929
+ "foreignKeys": {},
930
+ "compositePrimaryKeys": {
931
+ "idempotency_keys_install_id_idempotency_key_pk": {
932
+ "columns": [
933
+ "install_id",
934
+ "idempotency_key"
935
+ ],
936
+ "name": "idempotency_keys_install_id_idempotency_key_pk"
937
+ }
938
+ },
939
+ "uniqueConstraints": {},
940
+ "checkConstraints": {}
941
+ },
942
+ "newsletter_sends": {
943
+ "name": "newsletter_sends",
944
+ "columns": {
945
+ "tenant_id": {
946
+ "name": "tenant_id",
947
+ "type": "text",
948
+ "primaryKey": false,
949
+ "notNull": true,
950
+ "autoincrement": false
951
+ },
952
+ "collection": {
953
+ "name": "collection",
954
+ "type": "text",
955
+ "primaryKey": false,
956
+ "notNull": true,
957
+ "autoincrement": false
958
+ },
959
+ "digest_id": {
960
+ "name": "digest_id",
961
+ "type": "text",
962
+ "primaryKey": false,
963
+ "notNull": true,
964
+ "autoincrement": false
965
+ },
966
+ "post_slugs": {
967
+ "name": "post_slugs",
968
+ "type": "text",
969
+ "primaryKey": false,
970
+ "notNull": true,
971
+ "autoincrement": false,
972
+ "default": "'[]'"
973
+ },
974
+ "recipient_count": {
975
+ "name": "recipient_count",
976
+ "type": "integer",
977
+ "primaryKey": false,
978
+ "notNull": true,
979
+ "autoincrement": false,
980
+ "default": 0
981
+ },
982
+ "sent_at": {
983
+ "name": "sent_at",
984
+ "type": "text",
985
+ "primaryKey": false,
986
+ "notNull": true,
987
+ "autoincrement": false
988
+ }
989
+ },
990
+ "indexes": {},
991
+ "foreignKeys": {},
992
+ "compositePrimaryKeys": {
993
+ "newsletter_sends_tenant_id_collection_digest_id_pk": {
994
+ "columns": [
995
+ "tenant_id",
996
+ "collection",
997
+ "digest_id"
998
+ ],
999
+ "name": "newsletter_sends_tenant_id_collection_digest_id_pk"
1000
+ }
1001
+ },
1002
+ "uniqueConstraints": {},
1003
+ "checkConstraints": {}
1004
+ },
1005
+ "newsletter_subscribers": {
1006
+ "name": "newsletter_subscribers",
1007
+ "columns": {
1008
+ "tenant_id": {
1009
+ "name": "tenant_id",
1010
+ "type": "text",
1011
+ "primaryKey": false,
1012
+ "notNull": true,
1013
+ "autoincrement": false
1014
+ },
1015
+ "collection": {
1016
+ "name": "collection",
1017
+ "type": "text",
1018
+ "primaryKey": false,
1019
+ "notNull": true,
1020
+ "autoincrement": false
1021
+ },
1022
+ "email": {
1023
+ "name": "email",
1024
+ "type": "text",
1025
+ "primaryKey": false,
1026
+ "notNull": true,
1027
+ "autoincrement": false
1028
+ },
1029
+ "status": {
1030
+ "name": "status",
1031
+ "type": "text",
1032
+ "primaryKey": false,
1033
+ "notNull": true,
1034
+ "autoincrement": false,
1035
+ "default": "'pending'"
1036
+ },
1037
+ "token": {
1038
+ "name": "token",
1039
+ "type": "text",
1040
+ "primaryKey": false,
1041
+ "notNull": true,
1042
+ "autoincrement": false
1043
+ },
1044
+ "consent_source": {
1045
+ "name": "consent_source",
1046
+ "type": "text",
1047
+ "primaryKey": false,
1048
+ "notNull": false,
1049
+ "autoincrement": false
1050
+ },
1051
+ "consent_ip_hash": {
1052
+ "name": "consent_ip_hash",
1053
+ "type": "text",
1054
+ "primaryKey": false,
1055
+ "notNull": false,
1056
+ "autoincrement": false
1057
+ },
1058
+ "subscribed_at": {
1059
+ "name": "subscribed_at",
1060
+ "type": "text",
1061
+ "primaryKey": false,
1062
+ "notNull": true,
1063
+ "autoincrement": false
1064
+ },
1065
+ "confirmed_at": {
1066
+ "name": "confirmed_at",
1067
+ "type": "text",
1068
+ "primaryKey": false,
1069
+ "notNull": false,
1070
+ "autoincrement": false
1071
+ },
1072
+ "unsubscribed_at": {
1073
+ "name": "unsubscribed_at",
1074
+ "type": "text",
1075
+ "primaryKey": false,
1076
+ "notNull": false,
1077
+ "autoincrement": false
1078
+ },
1079
+ "last_sent_at": {
1080
+ "name": "last_sent_at",
1081
+ "type": "text",
1082
+ "primaryKey": false,
1083
+ "notNull": false,
1084
+ "autoincrement": false
1085
+ }
1086
+ },
1087
+ "indexes": {
1088
+ "idx_newsletter_tenant_coll_status": {
1089
+ "name": "idx_newsletter_tenant_coll_status",
1090
+ "columns": [
1091
+ "tenant_id",
1092
+ "collection",
1093
+ "status"
1094
+ ],
1095
+ "isUnique": false
1096
+ }
1097
+ },
1098
+ "foreignKeys": {},
1099
+ "compositePrimaryKeys": {
1100
+ "newsletter_subscribers_tenant_id_collection_email_pk": {
1101
+ "columns": [
1102
+ "tenant_id",
1103
+ "collection",
1104
+ "email"
1105
+ ],
1106
+ "name": "newsletter_subscribers_tenant_id_collection_email_pk"
1107
+ }
1108
+ },
1109
+ "uniqueConstraints": {},
1110
+ "checkConstraints": {}
1111
+ },
1112
+ "orders": {
1113
+ "name": "orders",
1114
+ "columns": {
1115
+ "tenant_id": {
1116
+ "name": "tenant_id",
1117
+ "type": "text",
1118
+ "primaryKey": false,
1119
+ "notNull": true,
1120
+ "autoincrement": false
1121
+ },
1122
+ "external_order_id": {
1123
+ "name": "external_order_id",
1124
+ "type": "text",
1125
+ "primaryKey": false,
1126
+ "notNull": true,
1127
+ "autoincrement": false
1128
+ },
1129
+ "env": {
1130
+ "name": "env",
1131
+ "type": "text",
1132
+ "primaryKey": false,
1133
+ "notNull": true,
1134
+ "autoincrement": false
1135
+ },
1136
+ "status": {
1137
+ "name": "status",
1138
+ "type": "text",
1139
+ "primaryKey": false,
1140
+ "notNull": true,
1141
+ "autoincrement": false
1142
+ },
1143
+ "currency": {
1144
+ "name": "currency",
1145
+ "type": "text",
1146
+ "primaryKey": false,
1147
+ "notNull": true,
1148
+ "autoincrement": false
1149
+ },
1150
+ "total": {
1151
+ "name": "total",
1152
+ "type": "real",
1153
+ "primaryKey": false,
1154
+ "notNull": true,
1155
+ "autoincrement": false,
1156
+ "default": 0
1157
+ },
1158
+ "subtotal": {
1159
+ "name": "subtotal",
1160
+ "type": "real",
1161
+ "primaryKey": false,
1162
+ "notNull": false,
1163
+ "autoincrement": false
1164
+ },
1165
+ "customer_hash": {
1166
+ "name": "customer_hash",
1167
+ "type": "text",
1168
+ "primaryKey": false,
1169
+ "notNull": false,
1170
+ "autoincrement": false
1171
+ },
1172
+ "line_items": {
1173
+ "name": "line_items",
1174
+ "type": "text",
1175
+ "primaryKey": false,
1176
+ "notNull": true,
1177
+ "autoincrement": false,
1178
+ "default": "'[]'"
1179
+ },
1180
+ "created_at": {
1181
+ "name": "created_at",
1182
+ "type": "text",
1183
+ "primaryKey": false,
1184
+ "notNull": true,
1185
+ "autoincrement": false
1186
+ },
1187
+ "updated_at": {
1188
+ "name": "updated_at",
1189
+ "type": "text",
1190
+ "primaryKey": false,
1191
+ "notNull": true,
1192
+ "autoincrement": false
1193
+ }
1194
+ },
1195
+ "indexes": {
1196
+ "idx_orders_tenant": {
1197
+ "name": "idx_orders_tenant",
1198
+ "columns": [
1199
+ "tenant_id"
1200
+ ],
1201
+ "isUnique": false
1202
+ }
1203
+ },
1204
+ "foreignKeys": {},
1205
+ "compositePrimaryKeys": {
1206
+ "orders_tenant_id_external_order_id_pk": {
1207
+ "columns": [
1208
+ "tenant_id",
1209
+ "external_order_id"
1210
+ ],
1211
+ "name": "orders_tenant_id_external_order_id_pk"
1212
+ }
1213
+ },
1214
+ "uniqueConstraints": {},
1215
+ "checkConstraints": {}
1216
+ },
1217
+ "social_tokens": {
1218
+ "name": "social_tokens",
1219
+ "columns": {
1220
+ "tenant_id": {
1221
+ "name": "tenant_id",
1222
+ "type": "text",
1223
+ "primaryKey": false,
1224
+ "notNull": true,
1225
+ "autoincrement": false
1226
+ },
1227
+ "network": {
1228
+ "name": "network",
1229
+ "type": "text",
1230
+ "primaryKey": false,
1231
+ "notNull": true,
1232
+ "autoincrement": false
1233
+ },
1234
+ "ciphertext": {
1235
+ "name": "ciphertext",
1236
+ "type": "text",
1237
+ "primaryKey": false,
1238
+ "notNull": true,
1239
+ "autoincrement": false
1240
+ },
1241
+ "iv": {
1242
+ "name": "iv",
1243
+ "type": "text",
1244
+ "primaryKey": false,
1245
+ "notNull": true,
1246
+ "autoincrement": false
1247
+ },
1248
+ "expires_at": {
1249
+ "name": "expires_at",
1250
+ "type": "text",
1251
+ "primaryKey": false,
1252
+ "notNull": false,
1253
+ "autoincrement": false
1254
+ },
1255
+ "created_at": {
1256
+ "name": "created_at",
1257
+ "type": "text",
1258
+ "primaryKey": false,
1259
+ "notNull": true,
1260
+ "autoincrement": false
1261
+ },
1262
+ "updated_at": {
1263
+ "name": "updated_at",
1264
+ "type": "text",
1265
+ "primaryKey": false,
1266
+ "notNull": true,
1267
+ "autoincrement": false
1268
+ }
1269
+ },
1270
+ "indexes": {
1271
+ "idx_social_tokens_tenant": {
1272
+ "name": "idx_social_tokens_tenant",
1273
+ "columns": [
1274
+ "tenant_id"
1275
+ ],
1276
+ "isUnique": false
1277
+ }
1278
+ },
1279
+ "foreignKeys": {},
1280
+ "compositePrimaryKeys": {
1281
+ "social_tokens_tenant_id_network_pk": {
1282
+ "columns": [
1283
+ "tenant_id",
1284
+ "network"
1285
+ ],
1286
+ "name": "social_tokens_tenant_id_network_pk"
1287
+ }
1288
+ },
1289
+ "uniqueConstraints": {},
1290
+ "checkConstraints": {}
1291
+ },
1292
+ "webhook_deliveries": {
1293
+ "name": "webhook_deliveries",
1294
+ "columns": {
1295
+ "delivery_id": {
1296
+ "name": "delivery_id",
1297
+ "type": "text",
1298
+ "primaryKey": true,
1299
+ "notNull": true,
1300
+ "autoincrement": false
1301
+ },
1302
+ "event_id": {
1303
+ "name": "event_id",
1304
+ "type": "text",
1305
+ "primaryKey": false,
1306
+ "notNull": true,
1307
+ "autoincrement": false
1308
+ },
1309
+ "install_id": {
1310
+ "name": "install_id",
1311
+ "type": "text",
1312
+ "primaryKey": false,
1313
+ "notNull": true,
1314
+ "autoincrement": false
1315
+ },
1316
+ "tenant_id": {
1317
+ "name": "tenant_id",
1318
+ "type": "text",
1319
+ "primaryKey": false,
1320
+ "notNull": true,
1321
+ "autoincrement": false
1322
+ },
1323
+ "topic": {
1324
+ "name": "topic",
1325
+ "type": "text",
1326
+ "primaryKey": false,
1327
+ "notNull": true,
1328
+ "autoincrement": false
1329
+ },
1330
+ "state": {
1331
+ "name": "state",
1332
+ "type": "text",
1333
+ "primaryKey": false,
1334
+ "notNull": true,
1335
+ "autoincrement": false,
1336
+ "default": "'pending'"
1337
+ },
1338
+ "attempts": {
1339
+ "name": "attempts",
1340
+ "type": "integer",
1341
+ "primaryKey": false,
1342
+ "notNull": true,
1343
+ "autoincrement": false,
1344
+ "default": 0
1345
+ },
1346
+ "last_status": {
1347
+ "name": "last_status",
1348
+ "type": "integer",
1349
+ "primaryKey": false,
1350
+ "notNull": false,
1351
+ "autoincrement": false
1352
+ },
1353
+ "last_error_class": {
1354
+ "name": "last_error_class",
1355
+ "type": "text",
1356
+ "primaryKey": false,
1357
+ "notNull": false,
1358
+ "autoincrement": false
1359
+ },
1360
+ "last_trace_id": {
1361
+ "name": "last_trace_id",
1362
+ "type": "text",
1363
+ "primaryKey": false,
1364
+ "notNull": false,
1365
+ "autoincrement": false
1366
+ },
1367
+ "next_attempt_at": {
1368
+ "name": "next_attempt_at",
1369
+ "type": "text",
1370
+ "primaryKey": false,
1371
+ "notNull": false,
1372
+ "autoincrement": false
1373
+ },
1374
+ "created_at": {
1375
+ "name": "created_at",
1376
+ "type": "text",
1377
+ "primaryKey": false,
1378
+ "notNull": true,
1379
+ "autoincrement": false
1380
+ },
1381
+ "updated_at": {
1382
+ "name": "updated_at",
1383
+ "type": "text",
1384
+ "primaryKey": false,
1385
+ "notNull": true,
1386
+ "autoincrement": false
1387
+ }
1388
+ },
1389
+ "indexes": {
1390
+ "idx_webhook_deliveries_install": {
1391
+ "name": "idx_webhook_deliveries_install",
1392
+ "columns": [
1393
+ "install_id"
1394
+ ],
1395
+ "isUnique": false
1396
+ },
1397
+ "idx_webhook_deliveries_due": {
1398
+ "name": "idx_webhook_deliveries_due",
1399
+ "columns": [
1400
+ "state",
1401
+ "next_attempt_at"
1402
+ ],
1403
+ "isUnique": false
1404
+ }
1405
+ },
1406
+ "foreignKeys": {},
1407
+ "compositePrimaryKeys": {},
1408
+ "uniqueConstraints": {},
1409
+ "checkConstraints": {}
1410
+ },
1411
+ "webhook_delivery_attempts": {
1412
+ "name": "webhook_delivery_attempts",
1413
+ "columns": {
1414
+ "id": {
1415
+ "name": "id",
1416
+ "type": "text",
1417
+ "primaryKey": true,
1418
+ "notNull": true,
1419
+ "autoincrement": false
1420
+ },
1421
+ "delivery_id": {
1422
+ "name": "delivery_id",
1423
+ "type": "text",
1424
+ "primaryKey": false,
1425
+ "notNull": true,
1426
+ "autoincrement": false
1427
+ },
1428
+ "attempt_no": {
1429
+ "name": "attempt_no",
1430
+ "type": "integer",
1431
+ "primaryKey": false,
1432
+ "notNull": true,
1433
+ "autoincrement": false
1434
+ },
1435
+ "started_at": {
1436
+ "name": "started_at",
1437
+ "type": "text",
1438
+ "primaryKey": false,
1439
+ "notNull": true,
1440
+ "autoincrement": false
1441
+ },
1442
+ "duration_ms": {
1443
+ "name": "duration_ms",
1444
+ "type": "integer",
1445
+ "primaryKey": false,
1446
+ "notNull": false,
1447
+ "autoincrement": false
1448
+ },
1449
+ "http_status": {
1450
+ "name": "http_status",
1451
+ "type": "integer",
1452
+ "primaryKey": false,
1453
+ "notNull": false,
1454
+ "autoincrement": false
1455
+ },
1456
+ "error_class": {
1457
+ "name": "error_class",
1458
+ "type": "text",
1459
+ "primaryKey": false,
1460
+ "notNull": false,
1461
+ "autoincrement": false
1462
+ },
1463
+ "trace_id": {
1464
+ "name": "trace_id",
1465
+ "type": "text",
1466
+ "primaryKey": false,
1467
+ "notNull": false,
1468
+ "autoincrement": false
1469
+ }
1470
+ },
1471
+ "indexes": {
1472
+ "idx_webhook_delivery_attempts_delivery": {
1473
+ "name": "idx_webhook_delivery_attempts_delivery",
1474
+ "columns": [
1475
+ "delivery_id"
1476
+ ],
1477
+ "isUnique": false
1478
+ }
1479
+ },
1480
+ "foreignKeys": {},
1481
+ "compositePrimaryKeys": {},
1482
+ "uniqueConstraints": {},
1483
+ "checkConstraints": {}
1484
+ },
1485
+ "webhook_events": {
1486
+ "name": "webhook_events",
1487
+ "columns": {
1488
+ "id": {
1489
+ "name": "id",
1490
+ "type": "text",
1491
+ "primaryKey": true,
1492
+ "notNull": true,
1493
+ "autoincrement": false
1494
+ },
1495
+ "tenant_id": {
1496
+ "name": "tenant_id",
1497
+ "type": "text",
1498
+ "primaryKey": false,
1499
+ "notNull": true,
1500
+ "autoincrement": false
1501
+ },
1502
+ "topic": {
1503
+ "name": "topic",
1504
+ "type": "text",
1505
+ "primaryKey": false,
1506
+ "notNull": true,
1507
+ "autoincrement": false
1508
+ },
1509
+ "dataschema_version": {
1510
+ "name": "dataschema_version",
1511
+ "type": "text",
1512
+ "primaryKey": false,
1513
+ "notNull": true,
1514
+ "autoincrement": false
1515
+ },
1516
+ "payload": {
1517
+ "name": "payload",
1518
+ "type": "text",
1519
+ "primaryKey": false,
1520
+ "notNull": true,
1521
+ "autoincrement": false
1522
+ },
1523
+ "created_at": {
1524
+ "name": "created_at",
1525
+ "type": "text",
1526
+ "primaryKey": false,
1527
+ "notNull": true,
1528
+ "autoincrement": false
1529
+ }
1530
+ },
1531
+ "indexes": {},
1532
+ "foreignKeys": {},
1533
+ "compositePrimaryKeys": {},
1534
+ "uniqueConstraints": {},
1535
+ "checkConstraints": {}
1536
+ },
1537
+ "webhook_install_health": {
1538
+ "name": "webhook_install_health",
1539
+ "columns": {
1540
+ "install_id": {
1541
+ "name": "install_id",
1542
+ "type": "text",
1543
+ "primaryKey": true,
1544
+ "notNull": true,
1545
+ "autoincrement": false
1546
+ },
1547
+ "last_success_at": {
1548
+ "name": "last_success_at",
1549
+ "type": "text",
1550
+ "primaryKey": false,
1551
+ "notNull": false,
1552
+ "autoincrement": false
1553
+ },
1554
+ "failure_streak": {
1555
+ "name": "failure_streak",
1556
+ "type": "integer",
1557
+ "primaryKey": false,
1558
+ "notNull": true,
1559
+ "autoincrement": false,
1560
+ "default": 0
1561
+ },
1562
+ "dlq_count": {
1563
+ "name": "dlq_count",
1564
+ "type": "integer",
1565
+ "primaryKey": false,
1566
+ "notNull": true,
1567
+ "autoincrement": false,
1568
+ "default": 0
1569
+ },
1570
+ "last_status": {
1571
+ "name": "last_status",
1572
+ "type": "integer",
1573
+ "primaryKey": false,
1574
+ "notNull": false,
1575
+ "autoincrement": false
1576
+ },
1577
+ "last_error_class": {
1578
+ "name": "last_error_class",
1579
+ "type": "text",
1580
+ "primaryKey": false,
1581
+ "notNull": false,
1582
+ "autoincrement": false
1583
+ },
1584
+ "recent_trace_ids": {
1585
+ "name": "recent_trace_ids",
1586
+ "type": "text",
1587
+ "primaryKey": false,
1588
+ "notNull": true,
1589
+ "autoincrement": false,
1590
+ "default": "'[]'"
1591
+ },
1592
+ "updated_at": {
1593
+ "name": "updated_at",
1594
+ "type": "text",
1595
+ "primaryKey": false,
1596
+ "notNull": true,
1597
+ "autoincrement": false
1598
+ }
1599
+ },
1600
+ "indexes": {},
1601
+ "foreignKeys": {},
1602
+ "compositePrimaryKeys": {},
1603
+ "uniqueConstraints": {},
1604
+ "checkConstraints": {}
1605
+ }
1606
+ },
1607
+ "views": {},
1608
+ "enums": {},
1609
+ "_meta": {
1610
+ "schemas": {},
1611
+ "tables": {},
1612
+ "columns": {}
1613
+ },
1614
+ "internal": {
1615
+ "indexes": {}
1616
+ }
1617
+ }