@tokenoftrust/storefront-runner 1.4.2-rc.0 → 2.0.0

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