@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,1812 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "5a5fe337-901c-43c8-afcc-fe11d2c7b9fd",
5
+ "prevId": "09f5e867-f86e-4fc8-852e-094d1bb658b7",
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
+ "app_version_snapshots": {
508
+ "name": "app_version_snapshots",
509
+ "columns": {
510
+ "id": {
511
+ "name": "id",
512
+ "type": "text",
513
+ "primaryKey": true,
514
+ "notNull": true,
515
+ "autoincrement": false
516
+ },
517
+ "install_id": {
518
+ "name": "install_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
+ "seq": {
532
+ "name": "seq",
533
+ "type": "integer",
534
+ "primaryKey": false,
535
+ "notNull": true,
536
+ "autoincrement": false
537
+ },
538
+ "app_version": {
539
+ "name": "app_version",
540
+ "type": "text",
541
+ "primaryKey": false,
542
+ "notNull": true,
543
+ "autoincrement": false
544
+ },
545
+ "facets": {
546
+ "name": "facets",
547
+ "type": "text",
548
+ "primaryKey": false,
549
+ "notNull": true,
550
+ "autoincrement": false
551
+ },
552
+ "actor": {
553
+ "name": "actor",
554
+ "type": "text",
555
+ "primaryKey": false,
556
+ "notNull": true,
557
+ "autoincrement": false
558
+ },
559
+ "note": {
560
+ "name": "note",
561
+ "type": "text",
562
+ "primaryKey": false,
563
+ "notNull": false,
564
+ "autoincrement": false
565
+ },
566
+ "restored_from_seq": {
567
+ "name": "restored_from_seq",
568
+ "type": "integer",
569
+ "primaryKey": false,
570
+ "notNull": false,
571
+ "autoincrement": false
572
+ },
573
+ "created_at": {
574
+ "name": "created_at",
575
+ "type": "text",
576
+ "primaryKey": false,
577
+ "notNull": true,
578
+ "autoincrement": false
579
+ }
580
+ },
581
+ "indexes": {
582
+ "uq_app_version_snapshots_install_seq": {
583
+ "name": "uq_app_version_snapshots_install_seq",
584
+ "columns": [
585
+ "install_id",
586
+ "seq"
587
+ ],
588
+ "isUnique": true
589
+ },
590
+ "idx_app_version_snapshots_install": {
591
+ "name": "idx_app_version_snapshots_install",
592
+ "columns": [
593
+ "install_id"
594
+ ],
595
+ "isUnique": false
596
+ }
597
+ },
598
+ "foreignKeys": {},
599
+ "compositePrimaryKeys": {},
600
+ "uniqueConstraints": {},
601
+ "checkConstraints": {}
602
+ },
603
+ "candidate_attempts": {
604
+ "name": "candidate_attempts",
605
+ "columns": {
606
+ "id": {
607
+ "name": "id",
608
+ "type": "text",
609
+ "primaryKey": true,
610
+ "notNull": true,
611
+ "autoincrement": false
612
+ },
613
+ "candidate_id": {
614
+ "name": "candidate_id",
615
+ "type": "text",
616
+ "primaryKey": false,
617
+ "notNull": true,
618
+ "autoincrement": false
619
+ },
620
+ "tenant_id": {
621
+ "name": "tenant_id",
622
+ "type": "text",
623
+ "primaryKey": false,
624
+ "notNull": true,
625
+ "autoincrement": false
626
+ },
627
+ "attempt_number": {
628
+ "name": "attempt_number",
629
+ "type": "integer",
630
+ "primaryKey": false,
631
+ "notNull": true,
632
+ "autoincrement": false
633
+ },
634
+ "kind": {
635
+ "name": "kind",
636
+ "type": "text",
637
+ "primaryKey": false,
638
+ "notNull": true,
639
+ "autoincrement": false
640
+ },
641
+ "status": {
642
+ "name": "status",
643
+ "type": "text",
644
+ "primaryKey": false,
645
+ "notNull": true,
646
+ "autoincrement": false,
647
+ "default": "'pending'"
648
+ },
649
+ "head_sha": {
650
+ "name": "head_sha",
651
+ "type": "text",
652
+ "primaryKey": false,
653
+ "notNull": false,
654
+ "autoincrement": false
655
+ },
656
+ "detail": {
657
+ "name": "detail",
658
+ "type": "text",
659
+ "primaryKey": false,
660
+ "notNull": false,
661
+ "autoincrement": false
662
+ },
663
+ "evidence": {
664
+ "name": "evidence",
665
+ "type": "text",
666
+ "primaryKey": false,
667
+ "notNull": false,
668
+ "autoincrement": false
669
+ },
670
+ "started_at": {
671
+ "name": "started_at",
672
+ "type": "text",
673
+ "primaryKey": false,
674
+ "notNull": true,
675
+ "autoincrement": false
676
+ },
677
+ "finished_at": {
678
+ "name": "finished_at",
679
+ "type": "text",
680
+ "primaryKey": false,
681
+ "notNull": false,
682
+ "autoincrement": false
683
+ }
684
+ },
685
+ "indexes": {
686
+ "uq_candidate_attempts_candidate_number": {
687
+ "name": "uq_candidate_attempts_candidate_number",
688
+ "columns": [
689
+ "candidate_id",
690
+ "attempt_number"
691
+ ],
692
+ "isUnique": true
693
+ },
694
+ "idx_candidate_attempts_candidate": {
695
+ "name": "idx_candidate_attempts_candidate",
696
+ "columns": [
697
+ "candidate_id"
698
+ ],
699
+ "isUnique": false
700
+ },
701
+ "idx_candidate_attempts_tenant": {
702
+ "name": "idx_candidate_attempts_tenant",
703
+ "columns": [
704
+ "tenant_id"
705
+ ],
706
+ "isUnique": false
707
+ }
708
+ },
709
+ "foreignKeys": {},
710
+ "compositePrimaryKeys": {},
711
+ "uniqueConstraints": {},
712
+ "checkConstraints": {}
713
+ },
714
+ "candidates": {
715
+ "name": "candidates",
716
+ "columns": {
717
+ "id": {
718
+ "name": "id",
719
+ "type": "text",
720
+ "primaryKey": true,
721
+ "notNull": true,
722
+ "autoincrement": false
723
+ },
724
+ "tenant_id": {
725
+ "name": "tenant_id",
726
+ "type": "text",
727
+ "primaryKey": false,
728
+ "notNull": true,
729
+ "autoincrement": false
730
+ },
731
+ "repository": {
732
+ "name": "repository",
733
+ "type": "text",
734
+ "primaryKey": false,
735
+ "notNull": true,
736
+ "autoincrement": false
737
+ },
738
+ "pr_number": {
739
+ "name": "pr_number",
740
+ "type": "integer",
741
+ "primaryKey": false,
742
+ "notNull": true,
743
+ "autoincrement": false
744
+ },
745
+ "change_id": {
746
+ "name": "change_id",
747
+ "type": "text",
748
+ "primaryKey": false,
749
+ "notNull": true,
750
+ "autoincrement": false
751
+ },
752
+ "branch": {
753
+ "name": "branch",
754
+ "type": "text",
755
+ "primaryKey": false,
756
+ "notNull": false,
757
+ "autoincrement": false
758
+ },
759
+ "title": {
760
+ "name": "title",
761
+ "type": "text",
762
+ "primaryKey": false,
763
+ "notNull": false,
764
+ "autoincrement": false
765
+ },
766
+ "author": {
767
+ "name": "author",
768
+ "type": "text",
769
+ "primaryKey": false,
770
+ "notNull": false,
771
+ "autoincrement": false
772
+ },
773
+ "status": {
774
+ "name": "status",
775
+ "type": "text",
776
+ "primaryKey": false,
777
+ "notNull": true,
778
+ "autoincrement": false,
779
+ "default": "'open'"
780
+ },
781
+ "head_sha": {
782
+ "name": "head_sha",
783
+ "type": "text",
784
+ "primaryKey": false,
785
+ "notNull": false,
786
+ "autoincrement": false
787
+ },
788
+ "base_sha": {
789
+ "name": "base_sha",
790
+ "type": "text",
791
+ "primaryKey": false,
792
+ "notNull": false,
793
+ "autoincrement": false
794
+ },
795
+ "created_at": {
796
+ "name": "created_at",
797
+ "type": "text",
798
+ "primaryKey": false,
799
+ "notNull": true,
800
+ "autoincrement": false
801
+ },
802
+ "updated_at": {
803
+ "name": "updated_at",
804
+ "type": "text",
805
+ "primaryKey": false,
806
+ "notNull": true,
807
+ "autoincrement": false
808
+ }
809
+ },
810
+ "indexes": {
811
+ "uq_candidates_tenant_repo_pr": {
812
+ "name": "uq_candidates_tenant_repo_pr",
813
+ "columns": [
814
+ "tenant_id",
815
+ "repository",
816
+ "pr_number"
817
+ ],
818
+ "isUnique": true
819
+ },
820
+ "uq_candidates_tenant_change": {
821
+ "name": "uq_candidates_tenant_change",
822
+ "columns": [
823
+ "tenant_id",
824
+ "change_id"
825
+ ],
826
+ "isUnique": true
827
+ },
828
+ "idx_candidates_tenant_status": {
829
+ "name": "idx_candidates_tenant_status",
830
+ "columns": [
831
+ "tenant_id",
832
+ "status"
833
+ ],
834
+ "isUnique": false
835
+ }
836
+ },
837
+ "foreignKeys": {},
838
+ "compositePrimaryKeys": {},
839
+ "uniqueConstraints": {},
840
+ "checkConstraints": {}
841
+ },
842
+ "consent_cmp_demand": {
843
+ "name": "consent_cmp_demand",
844
+ "columns": {
845
+ "id": {
846
+ "name": "id",
847
+ "type": "text",
848
+ "primaryKey": true,
849
+ "notNull": true,
850
+ "autoincrement": false
851
+ },
852
+ "tenant_id": {
853
+ "name": "tenant_id",
854
+ "type": "text",
855
+ "primaryKey": false,
856
+ "notNull": true,
857
+ "autoincrement": false
858
+ },
859
+ "adapter_id": {
860
+ "name": "adapter_id",
861
+ "type": "text",
862
+ "primaryKey": false,
863
+ "notNull": true,
864
+ "autoincrement": false
865
+ },
866
+ "source": {
867
+ "name": "source",
868
+ "type": "text",
869
+ "primaryKey": false,
870
+ "notNull": false,
871
+ "autoincrement": false
872
+ },
873
+ "at": {
874
+ "name": "at",
875
+ "type": "text",
876
+ "primaryKey": false,
877
+ "notNull": true,
878
+ "autoincrement": false
879
+ }
880
+ },
881
+ "indexes": {
882
+ "uq_consent_cmp_demand_tenant_adapter": {
883
+ "name": "uq_consent_cmp_demand_tenant_adapter",
884
+ "columns": [
885
+ "tenant_id",
886
+ "adapter_id"
887
+ ],
888
+ "isUnique": true
889
+ },
890
+ "idx_consent_cmp_demand_adapter": {
891
+ "name": "idx_consent_cmp_demand_adapter",
892
+ "columns": [
893
+ "adapter_id"
894
+ ],
895
+ "isUnique": false
896
+ }
897
+ },
898
+ "foreignKeys": {},
899
+ "compositePrimaryKeys": {},
900
+ "uniqueConstraints": {},
901
+ "checkConstraints": {}
902
+ },
903
+ "consent_config_revisions": {
904
+ "name": "consent_config_revisions",
905
+ "columns": {
906
+ "id": {
907
+ "name": "id",
908
+ "type": "text",
909
+ "primaryKey": true,
910
+ "notNull": true,
911
+ "autoincrement": false
912
+ },
913
+ "tenant_id": {
914
+ "name": "tenant_id",
915
+ "type": "text",
916
+ "primaryKey": false,
917
+ "notNull": true,
918
+ "autoincrement": false
919
+ },
920
+ "revision": {
921
+ "name": "revision",
922
+ "type": "integer",
923
+ "primaryKey": false,
924
+ "notNull": true,
925
+ "autoincrement": false
926
+ },
927
+ "config": {
928
+ "name": "config",
929
+ "type": "text",
930
+ "primaryKey": false,
931
+ "notNull": true,
932
+ "autoincrement": false
933
+ },
934
+ "actor": {
935
+ "name": "actor",
936
+ "type": "text",
937
+ "primaryKey": false,
938
+ "notNull": true,
939
+ "autoincrement": false
940
+ },
941
+ "note": {
942
+ "name": "note",
943
+ "type": "text",
944
+ "primaryKey": false,
945
+ "notNull": false,
946
+ "autoincrement": false
947
+ },
948
+ "reverted_from": {
949
+ "name": "reverted_from",
950
+ "type": "integer",
951
+ "primaryKey": false,
952
+ "notNull": false,
953
+ "autoincrement": false
954
+ },
955
+ "created_at": {
956
+ "name": "created_at",
957
+ "type": "text",
958
+ "primaryKey": false,
959
+ "notNull": true,
960
+ "autoincrement": false
961
+ }
962
+ },
963
+ "indexes": {
964
+ "uq_consent_config_tenant_revision": {
965
+ "name": "uq_consent_config_tenant_revision",
966
+ "columns": [
967
+ "tenant_id",
968
+ "revision"
969
+ ],
970
+ "isUnique": true
971
+ },
972
+ "idx_consent_config_tenant": {
973
+ "name": "idx_consent_config_tenant",
974
+ "columns": [
975
+ "tenant_id"
976
+ ],
977
+ "isUnique": false
978
+ }
979
+ },
980
+ "foreignKeys": {},
981
+ "compositePrimaryKeys": {},
982
+ "uniqueConstraints": {},
983
+ "checkConstraints": {}
984
+ },
985
+ "correlation_replay": {
986
+ "name": "correlation_replay",
987
+ "columns": {
988
+ "jti": {
989
+ "name": "jti",
990
+ "type": "text",
991
+ "primaryKey": true,
992
+ "notNull": true,
993
+ "autoincrement": false
994
+ },
995
+ "expires_at": {
996
+ "name": "expires_at",
997
+ "type": "integer",
998
+ "primaryKey": false,
999
+ "notNull": true,
1000
+ "autoincrement": false
1001
+ },
1002
+ "consumed_at": {
1003
+ "name": "consumed_at",
1004
+ "type": "text",
1005
+ "primaryKey": false,
1006
+ "notNull": true,
1007
+ "autoincrement": false
1008
+ }
1009
+ },
1010
+ "indexes": {},
1011
+ "foreignKeys": {},
1012
+ "compositePrimaryKeys": {},
1013
+ "uniqueConstraints": {},
1014
+ "checkConstraints": {}
1015
+ },
1016
+ "idempotency_keys": {
1017
+ "name": "idempotency_keys",
1018
+ "columns": {
1019
+ "install_id": {
1020
+ "name": "install_id",
1021
+ "type": "text",
1022
+ "primaryKey": false,
1023
+ "notNull": true,
1024
+ "autoincrement": false
1025
+ },
1026
+ "idempotency_key": {
1027
+ "name": "idempotency_key",
1028
+ "type": "text",
1029
+ "primaryKey": false,
1030
+ "notNull": true,
1031
+ "autoincrement": false
1032
+ },
1033
+ "body_hash": {
1034
+ "name": "body_hash",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": true,
1038
+ "autoincrement": false
1039
+ },
1040
+ "response_body": {
1041
+ "name": "response_body",
1042
+ "type": "text",
1043
+ "primaryKey": false,
1044
+ "notNull": true,
1045
+ "autoincrement": false
1046
+ },
1047
+ "created_at": {
1048
+ "name": "created_at",
1049
+ "type": "text",
1050
+ "primaryKey": false,
1051
+ "notNull": true,
1052
+ "autoincrement": false
1053
+ }
1054
+ },
1055
+ "indexes": {},
1056
+ "foreignKeys": {},
1057
+ "compositePrimaryKeys": {
1058
+ "idempotency_keys_install_id_idempotency_key_pk": {
1059
+ "columns": [
1060
+ "install_id",
1061
+ "idempotency_key"
1062
+ ],
1063
+ "name": "idempotency_keys_install_id_idempotency_key_pk"
1064
+ }
1065
+ },
1066
+ "uniqueConstraints": {},
1067
+ "checkConstraints": {}
1068
+ },
1069
+ "newsletter_sends": {
1070
+ "name": "newsletter_sends",
1071
+ "columns": {
1072
+ "tenant_id": {
1073
+ "name": "tenant_id",
1074
+ "type": "text",
1075
+ "primaryKey": false,
1076
+ "notNull": true,
1077
+ "autoincrement": false
1078
+ },
1079
+ "collection": {
1080
+ "name": "collection",
1081
+ "type": "text",
1082
+ "primaryKey": false,
1083
+ "notNull": true,
1084
+ "autoincrement": false
1085
+ },
1086
+ "digest_id": {
1087
+ "name": "digest_id",
1088
+ "type": "text",
1089
+ "primaryKey": false,
1090
+ "notNull": true,
1091
+ "autoincrement": false
1092
+ },
1093
+ "post_slugs": {
1094
+ "name": "post_slugs",
1095
+ "type": "text",
1096
+ "primaryKey": false,
1097
+ "notNull": true,
1098
+ "autoincrement": false,
1099
+ "default": "'[]'"
1100
+ },
1101
+ "recipient_count": {
1102
+ "name": "recipient_count",
1103
+ "type": "integer",
1104
+ "primaryKey": false,
1105
+ "notNull": true,
1106
+ "autoincrement": false,
1107
+ "default": 0
1108
+ },
1109
+ "sent_at": {
1110
+ "name": "sent_at",
1111
+ "type": "text",
1112
+ "primaryKey": false,
1113
+ "notNull": true,
1114
+ "autoincrement": false
1115
+ }
1116
+ },
1117
+ "indexes": {},
1118
+ "foreignKeys": {},
1119
+ "compositePrimaryKeys": {
1120
+ "newsletter_sends_tenant_id_collection_digest_id_pk": {
1121
+ "columns": [
1122
+ "tenant_id",
1123
+ "collection",
1124
+ "digest_id"
1125
+ ],
1126
+ "name": "newsletter_sends_tenant_id_collection_digest_id_pk"
1127
+ }
1128
+ },
1129
+ "uniqueConstraints": {},
1130
+ "checkConstraints": {}
1131
+ },
1132
+ "newsletter_subscribers": {
1133
+ "name": "newsletter_subscribers",
1134
+ "columns": {
1135
+ "tenant_id": {
1136
+ "name": "tenant_id",
1137
+ "type": "text",
1138
+ "primaryKey": false,
1139
+ "notNull": true,
1140
+ "autoincrement": false
1141
+ },
1142
+ "collection": {
1143
+ "name": "collection",
1144
+ "type": "text",
1145
+ "primaryKey": false,
1146
+ "notNull": true,
1147
+ "autoincrement": false
1148
+ },
1149
+ "email": {
1150
+ "name": "email",
1151
+ "type": "text",
1152
+ "primaryKey": false,
1153
+ "notNull": true,
1154
+ "autoincrement": false
1155
+ },
1156
+ "status": {
1157
+ "name": "status",
1158
+ "type": "text",
1159
+ "primaryKey": false,
1160
+ "notNull": true,
1161
+ "autoincrement": false,
1162
+ "default": "'pending'"
1163
+ },
1164
+ "token": {
1165
+ "name": "token",
1166
+ "type": "text",
1167
+ "primaryKey": false,
1168
+ "notNull": true,
1169
+ "autoincrement": false
1170
+ },
1171
+ "consent_source": {
1172
+ "name": "consent_source",
1173
+ "type": "text",
1174
+ "primaryKey": false,
1175
+ "notNull": false,
1176
+ "autoincrement": false
1177
+ },
1178
+ "consent_ip_hash": {
1179
+ "name": "consent_ip_hash",
1180
+ "type": "text",
1181
+ "primaryKey": false,
1182
+ "notNull": false,
1183
+ "autoincrement": false
1184
+ },
1185
+ "subscribed_at": {
1186
+ "name": "subscribed_at",
1187
+ "type": "text",
1188
+ "primaryKey": false,
1189
+ "notNull": true,
1190
+ "autoincrement": false
1191
+ },
1192
+ "confirmed_at": {
1193
+ "name": "confirmed_at",
1194
+ "type": "text",
1195
+ "primaryKey": false,
1196
+ "notNull": false,
1197
+ "autoincrement": false
1198
+ },
1199
+ "unsubscribed_at": {
1200
+ "name": "unsubscribed_at",
1201
+ "type": "text",
1202
+ "primaryKey": false,
1203
+ "notNull": false,
1204
+ "autoincrement": false
1205
+ },
1206
+ "last_sent_at": {
1207
+ "name": "last_sent_at",
1208
+ "type": "text",
1209
+ "primaryKey": false,
1210
+ "notNull": false,
1211
+ "autoincrement": false
1212
+ }
1213
+ },
1214
+ "indexes": {
1215
+ "idx_newsletter_tenant_coll_status": {
1216
+ "name": "idx_newsletter_tenant_coll_status",
1217
+ "columns": [
1218
+ "tenant_id",
1219
+ "collection",
1220
+ "status"
1221
+ ],
1222
+ "isUnique": false
1223
+ }
1224
+ },
1225
+ "foreignKeys": {},
1226
+ "compositePrimaryKeys": {
1227
+ "newsletter_subscribers_tenant_id_collection_email_pk": {
1228
+ "columns": [
1229
+ "tenant_id",
1230
+ "collection",
1231
+ "email"
1232
+ ],
1233
+ "name": "newsletter_subscribers_tenant_id_collection_email_pk"
1234
+ }
1235
+ },
1236
+ "uniqueConstraints": {},
1237
+ "checkConstraints": {}
1238
+ },
1239
+ "order_attribution": {
1240
+ "name": "order_attribution",
1241
+ "columns": {
1242
+ "tenant_id": {
1243
+ "name": "tenant_id",
1244
+ "type": "text",
1245
+ "primaryKey": false,
1246
+ "notNull": true,
1247
+ "autoincrement": false
1248
+ },
1249
+ "external_order_id": {
1250
+ "name": "external_order_id",
1251
+ "type": "text",
1252
+ "primaryKey": false,
1253
+ "notNull": true,
1254
+ "autoincrement": false
1255
+ },
1256
+ "attributed": {
1257
+ "name": "attributed",
1258
+ "type": "integer",
1259
+ "primaryKey": false,
1260
+ "notNull": true,
1261
+ "autoincrement": false,
1262
+ "default": 0
1263
+ },
1264
+ "correlation_id": {
1265
+ "name": "correlation_id",
1266
+ "type": "text",
1267
+ "primaryKey": false,
1268
+ "notNull": false,
1269
+ "autoincrement": false
1270
+ },
1271
+ "correlation_expires_at": {
1272
+ "name": "correlation_expires_at",
1273
+ "type": "text",
1274
+ "primaryKey": false,
1275
+ "notNull": false,
1276
+ "autoincrement": false
1277
+ },
1278
+ "reason": {
1279
+ "name": "reason",
1280
+ "type": "text",
1281
+ "primaryKey": false,
1282
+ "notNull": false,
1283
+ "autoincrement": false
1284
+ },
1285
+ "recorded_at": {
1286
+ "name": "recorded_at",
1287
+ "type": "text",
1288
+ "primaryKey": false,
1289
+ "notNull": true,
1290
+ "autoincrement": false
1291
+ }
1292
+ },
1293
+ "indexes": {},
1294
+ "foreignKeys": {},
1295
+ "compositePrimaryKeys": {
1296
+ "order_attribution_tenant_id_external_order_id_pk": {
1297
+ "columns": [
1298
+ "tenant_id",
1299
+ "external_order_id"
1300
+ ],
1301
+ "name": "order_attribution_tenant_id_external_order_id_pk"
1302
+ }
1303
+ },
1304
+ "uniqueConstraints": {},
1305
+ "checkConstraints": {}
1306
+ },
1307
+ "orders": {
1308
+ "name": "orders",
1309
+ "columns": {
1310
+ "tenant_id": {
1311
+ "name": "tenant_id",
1312
+ "type": "text",
1313
+ "primaryKey": false,
1314
+ "notNull": true,
1315
+ "autoincrement": false
1316
+ },
1317
+ "external_order_id": {
1318
+ "name": "external_order_id",
1319
+ "type": "text",
1320
+ "primaryKey": false,
1321
+ "notNull": true,
1322
+ "autoincrement": false
1323
+ },
1324
+ "env": {
1325
+ "name": "env",
1326
+ "type": "text",
1327
+ "primaryKey": false,
1328
+ "notNull": true,
1329
+ "autoincrement": false
1330
+ },
1331
+ "status": {
1332
+ "name": "status",
1333
+ "type": "text",
1334
+ "primaryKey": false,
1335
+ "notNull": true,
1336
+ "autoincrement": false
1337
+ },
1338
+ "currency": {
1339
+ "name": "currency",
1340
+ "type": "text",
1341
+ "primaryKey": false,
1342
+ "notNull": true,
1343
+ "autoincrement": false
1344
+ },
1345
+ "total": {
1346
+ "name": "total",
1347
+ "type": "real",
1348
+ "primaryKey": false,
1349
+ "notNull": true,
1350
+ "autoincrement": false,
1351
+ "default": 0
1352
+ },
1353
+ "subtotal": {
1354
+ "name": "subtotal",
1355
+ "type": "real",
1356
+ "primaryKey": false,
1357
+ "notNull": false,
1358
+ "autoincrement": false
1359
+ },
1360
+ "customer_hash": {
1361
+ "name": "customer_hash",
1362
+ "type": "text",
1363
+ "primaryKey": false,
1364
+ "notNull": false,
1365
+ "autoincrement": false
1366
+ },
1367
+ "line_items": {
1368
+ "name": "line_items",
1369
+ "type": "text",
1370
+ "primaryKey": false,
1371
+ "notNull": true,
1372
+ "autoincrement": false,
1373
+ "default": "'[]'"
1374
+ },
1375
+ "created_at": {
1376
+ "name": "created_at",
1377
+ "type": "text",
1378
+ "primaryKey": false,
1379
+ "notNull": true,
1380
+ "autoincrement": false
1381
+ },
1382
+ "updated_at": {
1383
+ "name": "updated_at",
1384
+ "type": "text",
1385
+ "primaryKey": false,
1386
+ "notNull": true,
1387
+ "autoincrement": false
1388
+ }
1389
+ },
1390
+ "indexes": {
1391
+ "idx_orders_tenant": {
1392
+ "name": "idx_orders_tenant",
1393
+ "columns": [
1394
+ "tenant_id"
1395
+ ],
1396
+ "isUnique": false
1397
+ }
1398
+ },
1399
+ "foreignKeys": {},
1400
+ "compositePrimaryKeys": {
1401
+ "orders_tenant_id_external_order_id_pk": {
1402
+ "columns": [
1403
+ "tenant_id",
1404
+ "external_order_id"
1405
+ ],
1406
+ "name": "orders_tenant_id_external_order_id_pk"
1407
+ }
1408
+ },
1409
+ "uniqueConstraints": {},
1410
+ "checkConstraints": {}
1411
+ },
1412
+ "social_tokens": {
1413
+ "name": "social_tokens",
1414
+ "columns": {
1415
+ "tenant_id": {
1416
+ "name": "tenant_id",
1417
+ "type": "text",
1418
+ "primaryKey": false,
1419
+ "notNull": true,
1420
+ "autoincrement": false
1421
+ },
1422
+ "network": {
1423
+ "name": "network",
1424
+ "type": "text",
1425
+ "primaryKey": false,
1426
+ "notNull": true,
1427
+ "autoincrement": false
1428
+ },
1429
+ "ciphertext": {
1430
+ "name": "ciphertext",
1431
+ "type": "text",
1432
+ "primaryKey": false,
1433
+ "notNull": true,
1434
+ "autoincrement": false
1435
+ },
1436
+ "iv": {
1437
+ "name": "iv",
1438
+ "type": "text",
1439
+ "primaryKey": false,
1440
+ "notNull": true,
1441
+ "autoincrement": false
1442
+ },
1443
+ "expires_at": {
1444
+ "name": "expires_at",
1445
+ "type": "text",
1446
+ "primaryKey": false,
1447
+ "notNull": false,
1448
+ "autoincrement": false
1449
+ },
1450
+ "created_at": {
1451
+ "name": "created_at",
1452
+ "type": "text",
1453
+ "primaryKey": false,
1454
+ "notNull": true,
1455
+ "autoincrement": false
1456
+ },
1457
+ "updated_at": {
1458
+ "name": "updated_at",
1459
+ "type": "text",
1460
+ "primaryKey": false,
1461
+ "notNull": true,
1462
+ "autoincrement": false
1463
+ }
1464
+ },
1465
+ "indexes": {
1466
+ "idx_social_tokens_tenant": {
1467
+ "name": "idx_social_tokens_tenant",
1468
+ "columns": [
1469
+ "tenant_id"
1470
+ ],
1471
+ "isUnique": false
1472
+ }
1473
+ },
1474
+ "foreignKeys": {},
1475
+ "compositePrimaryKeys": {
1476
+ "social_tokens_tenant_id_network_pk": {
1477
+ "columns": [
1478
+ "tenant_id",
1479
+ "network"
1480
+ ],
1481
+ "name": "social_tokens_tenant_id_network_pk"
1482
+ }
1483
+ },
1484
+ "uniqueConstraints": {},
1485
+ "checkConstraints": {}
1486
+ },
1487
+ "webhook_deliveries": {
1488
+ "name": "webhook_deliveries",
1489
+ "columns": {
1490
+ "delivery_id": {
1491
+ "name": "delivery_id",
1492
+ "type": "text",
1493
+ "primaryKey": true,
1494
+ "notNull": true,
1495
+ "autoincrement": false
1496
+ },
1497
+ "event_id": {
1498
+ "name": "event_id",
1499
+ "type": "text",
1500
+ "primaryKey": false,
1501
+ "notNull": true,
1502
+ "autoincrement": false
1503
+ },
1504
+ "install_id": {
1505
+ "name": "install_id",
1506
+ "type": "text",
1507
+ "primaryKey": false,
1508
+ "notNull": true,
1509
+ "autoincrement": false
1510
+ },
1511
+ "tenant_id": {
1512
+ "name": "tenant_id",
1513
+ "type": "text",
1514
+ "primaryKey": false,
1515
+ "notNull": true,
1516
+ "autoincrement": false
1517
+ },
1518
+ "topic": {
1519
+ "name": "topic",
1520
+ "type": "text",
1521
+ "primaryKey": false,
1522
+ "notNull": true,
1523
+ "autoincrement": false
1524
+ },
1525
+ "state": {
1526
+ "name": "state",
1527
+ "type": "text",
1528
+ "primaryKey": false,
1529
+ "notNull": true,
1530
+ "autoincrement": false,
1531
+ "default": "'pending'"
1532
+ },
1533
+ "attempts": {
1534
+ "name": "attempts",
1535
+ "type": "integer",
1536
+ "primaryKey": false,
1537
+ "notNull": true,
1538
+ "autoincrement": false,
1539
+ "default": 0
1540
+ },
1541
+ "last_status": {
1542
+ "name": "last_status",
1543
+ "type": "integer",
1544
+ "primaryKey": false,
1545
+ "notNull": false,
1546
+ "autoincrement": false
1547
+ },
1548
+ "last_error_class": {
1549
+ "name": "last_error_class",
1550
+ "type": "text",
1551
+ "primaryKey": false,
1552
+ "notNull": false,
1553
+ "autoincrement": false
1554
+ },
1555
+ "last_trace_id": {
1556
+ "name": "last_trace_id",
1557
+ "type": "text",
1558
+ "primaryKey": false,
1559
+ "notNull": false,
1560
+ "autoincrement": false
1561
+ },
1562
+ "next_attempt_at": {
1563
+ "name": "next_attempt_at",
1564
+ "type": "text",
1565
+ "primaryKey": false,
1566
+ "notNull": false,
1567
+ "autoincrement": false
1568
+ },
1569
+ "created_at": {
1570
+ "name": "created_at",
1571
+ "type": "text",
1572
+ "primaryKey": false,
1573
+ "notNull": true,
1574
+ "autoincrement": false
1575
+ },
1576
+ "updated_at": {
1577
+ "name": "updated_at",
1578
+ "type": "text",
1579
+ "primaryKey": false,
1580
+ "notNull": true,
1581
+ "autoincrement": false
1582
+ }
1583
+ },
1584
+ "indexes": {
1585
+ "idx_webhook_deliveries_install": {
1586
+ "name": "idx_webhook_deliveries_install",
1587
+ "columns": [
1588
+ "install_id"
1589
+ ],
1590
+ "isUnique": false
1591
+ },
1592
+ "idx_webhook_deliveries_due": {
1593
+ "name": "idx_webhook_deliveries_due",
1594
+ "columns": [
1595
+ "state",
1596
+ "next_attempt_at"
1597
+ ],
1598
+ "isUnique": false
1599
+ }
1600
+ },
1601
+ "foreignKeys": {},
1602
+ "compositePrimaryKeys": {},
1603
+ "uniqueConstraints": {},
1604
+ "checkConstraints": {}
1605
+ },
1606
+ "webhook_delivery_attempts": {
1607
+ "name": "webhook_delivery_attempts",
1608
+ "columns": {
1609
+ "id": {
1610
+ "name": "id",
1611
+ "type": "text",
1612
+ "primaryKey": true,
1613
+ "notNull": true,
1614
+ "autoincrement": false
1615
+ },
1616
+ "delivery_id": {
1617
+ "name": "delivery_id",
1618
+ "type": "text",
1619
+ "primaryKey": false,
1620
+ "notNull": true,
1621
+ "autoincrement": false
1622
+ },
1623
+ "attempt_no": {
1624
+ "name": "attempt_no",
1625
+ "type": "integer",
1626
+ "primaryKey": false,
1627
+ "notNull": true,
1628
+ "autoincrement": false
1629
+ },
1630
+ "started_at": {
1631
+ "name": "started_at",
1632
+ "type": "text",
1633
+ "primaryKey": false,
1634
+ "notNull": true,
1635
+ "autoincrement": false
1636
+ },
1637
+ "duration_ms": {
1638
+ "name": "duration_ms",
1639
+ "type": "integer",
1640
+ "primaryKey": false,
1641
+ "notNull": false,
1642
+ "autoincrement": false
1643
+ },
1644
+ "http_status": {
1645
+ "name": "http_status",
1646
+ "type": "integer",
1647
+ "primaryKey": false,
1648
+ "notNull": false,
1649
+ "autoincrement": false
1650
+ },
1651
+ "error_class": {
1652
+ "name": "error_class",
1653
+ "type": "text",
1654
+ "primaryKey": false,
1655
+ "notNull": false,
1656
+ "autoincrement": false
1657
+ },
1658
+ "trace_id": {
1659
+ "name": "trace_id",
1660
+ "type": "text",
1661
+ "primaryKey": false,
1662
+ "notNull": false,
1663
+ "autoincrement": false
1664
+ }
1665
+ },
1666
+ "indexes": {
1667
+ "idx_webhook_delivery_attempts_delivery": {
1668
+ "name": "idx_webhook_delivery_attempts_delivery",
1669
+ "columns": [
1670
+ "delivery_id"
1671
+ ],
1672
+ "isUnique": false
1673
+ }
1674
+ },
1675
+ "foreignKeys": {},
1676
+ "compositePrimaryKeys": {},
1677
+ "uniqueConstraints": {},
1678
+ "checkConstraints": {}
1679
+ },
1680
+ "webhook_events": {
1681
+ "name": "webhook_events",
1682
+ "columns": {
1683
+ "id": {
1684
+ "name": "id",
1685
+ "type": "text",
1686
+ "primaryKey": true,
1687
+ "notNull": true,
1688
+ "autoincrement": false
1689
+ },
1690
+ "tenant_id": {
1691
+ "name": "tenant_id",
1692
+ "type": "text",
1693
+ "primaryKey": false,
1694
+ "notNull": true,
1695
+ "autoincrement": false
1696
+ },
1697
+ "topic": {
1698
+ "name": "topic",
1699
+ "type": "text",
1700
+ "primaryKey": false,
1701
+ "notNull": true,
1702
+ "autoincrement": false
1703
+ },
1704
+ "dataschema_version": {
1705
+ "name": "dataschema_version",
1706
+ "type": "text",
1707
+ "primaryKey": false,
1708
+ "notNull": true,
1709
+ "autoincrement": false
1710
+ },
1711
+ "payload": {
1712
+ "name": "payload",
1713
+ "type": "text",
1714
+ "primaryKey": false,
1715
+ "notNull": true,
1716
+ "autoincrement": false
1717
+ },
1718
+ "created_at": {
1719
+ "name": "created_at",
1720
+ "type": "text",
1721
+ "primaryKey": false,
1722
+ "notNull": true,
1723
+ "autoincrement": false
1724
+ }
1725
+ },
1726
+ "indexes": {},
1727
+ "foreignKeys": {},
1728
+ "compositePrimaryKeys": {},
1729
+ "uniqueConstraints": {},
1730
+ "checkConstraints": {}
1731
+ },
1732
+ "webhook_install_health": {
1733
+ "name": "webhook_install_health",
1734
+ "columns": {
1735
+ "install_id": {
1736
+ "name": "install_id",
1737
+ "type": "text",
1738
+ "primaryKey": true,
1739
+ "notNull": true,
1740
+ "autoincrement": false
1741
+ },
1742
+ "last_success_at": {
1743
+ "name": "last_success_at",
1744
+ "type": "text",
1745
+ "primaryKey": false,
1746
+ "notNull": false,
1747
+ "autoincrement": false
1748
+ },
1749
+ "failure_streak": {
1750
+ "name": "failure_streak",
1751
+ "type": "integer",
1752
+ "primaryKey": false,
1753
+ "notNull": true,
1754
+ "autoincrement": false,
1755
+ "default": 0
1756
+ },
1757
+ "dlq_count": {
1758
+ "name": "dlq_count",
1759
+ "type": "integer",
1760
+ "primaryKey": false,
1761
+ "notNull": true,
1762
+ "autoincrement": false,
1763
+ "default": 0
1764
+ },
1765
+ "last_status": {
1766
+ "name": "last_status",
1767
+ "type": "integer",
1768
+ "primaryKey": false,
1769
+ "notNull": false,
1770
+ "autoincrement": false
1771
+ },
1772
+ "last_error_class": {
1773
+ "name": "last_error_class",
1774
+ "type": "text",
1775
+ "primaryKey": false,
1776
+ "notNull": false,
1777
+ "autoincrement": false
1778
+ },
1779
+ "recent_trace_ids": {
1780
+ "name": "recent_trace_ids",
1781
+ "type": "text",
1782
+ "primaryKey": false,
1783
+ "notNull": true,
1784
+ "autoincrement": false,
1785
+ "default": "'[]'"
1786
+ },
1787
+ "updated_at": {
1788
+ "name": "updated_at",
1789
+ "type": "text",
1790
+ "primaryKey": false,
1791
+ "notNull": true,
1792
+ "autoincrement": false
1793
+ }
1794
+ },
1795
+ "indexes": {},
1796
+ "foreignKeys": {},
1797
+ "compositePrimaryKeys": {},
1798
+ "uniqueConstraints": {},
1799
+ "checkConstraints": {}
1800
+ }
1801
+ },
1802
+ "views": {},
1803
+ "enums": {},
1804
+ "_meta": {
1805
+ "schemas": {},
1806
+ "tables": {},
1807
+ "columns": {}
1808
+ },
1809
+ "internal": {
1810
+ "indexes": {}
1811
+ }
1812
+ }