@c15t/backend 2.0.0-rc.0 → 2.0.0-rc.10

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 (336) hide show
  1. package/README.md +3 -3
  2. package/dist/302.js +473 -0
  3. package/dist/583.js +540 -0
  4. package/dist/915.js +1771 -0
  5. package/dist/cache.cjs +5 -5
  6. package/dist/cache.js +4 -415
  7. package/dist/core.cjs +1356 -120
  8. package/dist/core.js +163 -1981
  9. package/dist/db/adapters/drizzle.cjs +1 -1
  10. package/dist/db/adapters/drizzle.js +1 -2
  11. package/dist/db/adapters/kysely.cjs +1 -1
  12. package/dist/db/adapters/kysely.js +1 -2
  13. package/dist/db/adapters/mongo.cjs +1 -1
  14. package/dist/db/adapters/mongo.js +1 -2
  15. package/dist/db/adapters/prisma.cjs +1 -1
  16. package/dist/db/adapters/prisma.js +1 -2
  17. package/dist/db/adapters/typeorm.cjs +1 -1
  18. package/dist/db/adapters/typeorm.js +1 -2
  19. package/dist/db/adapters.cjs +1 -1
  20. package/dist/db/migrator.cjs +1 -1
  21. package/dist/db/schema.cjs +43 -3
  22. package/dist/db/schema.js +35 -4
  23. package/dist/define-config.cjs +1 -1
  24. package/dist/edge.cjs +1106 -0
  25. package/dist/edge.js +190 -0
  26. package/dist/router.cjs +885 -123
  27. package/dist/router.js +1 -1507
  28. package/dist/{types.cjs → types/index.cjs} +1 -1
  29. package/{dist → dist-types}/cache/adapters/cloudflare-kv.d.ts +0 -1
  30. package/{dist → dist-types}/cache/adapters/index.d.ts +0 -1
  31. package/{dist → dist-types}/cache/adapters/memory.d.ts +0 -1
  32. package/{dist → dist-types}/cache/adapters/upstash-redis.d.ts +0 -1
  33. package/{dist → dist-types}/cache/gvl-resolver.d.ts +0 -1
  34. package/{dist → dist-types}/cache/index.d.ts +0 -1
  35. package/{dist → dist-types}/cache/keys.d.ts +0 -1
  36. package/{dist → dist-types}/cache/types.d.ts +0 -1
  37. package/{dist → dist-types}/core.d.ts +8 -1
  38. package/{dist → dist-types}/db/migrator/index.d.ts +0 -1
  39. package/dist-types/db/registry/consent-policy.d.ts +78 -0
  40. package/{dist → dist-types}/db/registry/consent-purpose.d.ts +0 -1
  41. package/{dist → dist-types}/db/registry/domain.d.ts +0 -1
  42. package/dist-types/db/registry/index.d.ts +118 -0
  43. package/dist-types/db/registry/runtime-policy-decision.d.ts +60 -0
  44. package/{dist → dist-types}/db/registry/subject.d.ts +0 -2
  45. package/{dist → dist-types}/db/registry/types.d.ts +1 -1
  46. package/{dist → dist-types}/db/registry/utils/generate-id.d.ts +0 -1
  47. package/{dist → dist-types}/db/registry/utils.d.ts +0 -1
  48. package/{dist → dist-types}/db/schema/1.0.0/audit-log.d.ts +0 -1
  49. package/{dist → dist-types}/db/schema/1.0.0/consent-policy.d.ts +0 -1
  50. package/{dist → dist-types}/db/schema/1.0.0/consent-purpose.d.ts +0 -1
  51. package/{dist → dist-types}/db/schema/1.0.0/consent-record.d.ts +0 -1
  52. package/{dist → dist-types}/db/schema/1.0.0/consent.d.ts +1 -2
  53. package/{dist → dist-types}/db/schema/1.0.0/domain.d.ts +0 -1
  54. package/{dist → dist-types}/db/schema/1.0.0/index.d.ts +0 -32
  55. package/{dist → dist-types}/db/schema/1.0.0/subject.d.ts +0 -2
  56. package/{dist → dist-types}/db/schema/2.0.0/audit-log.d.ts +1 -2
  57. package/{dist → dist-types}/db/schema/2.0.0/consent-policy.d.ts +3 -3
  58. package/{dist → dist-types}/db/schema/2.0.0/consent-purpose.d.ts +1 -2
  59. package/{dist → dist-types}/db/schema/2.0.0/consent.d.ts +7 -2
  60. package/{dist → dist-types}/db/schema/2.0.0/domain.d.ts +1 -2
  61. package/{dist → dist-types}/db/schema/2.0.0/index.d.ts +455 -28
  62. package/dist-types/db/schema/2.0.0/runtime-policy-decision.d.ts +23 -0
  63. package/{dist → dist-types}/db/schema/2.0.0/subject.d.ts +1 -3
  64. package/{dist → dist-types}/db/schema/index.d.ts +908 -86
  65. package/{dist → dist-types}/db/tenant-scope.d.ts +0 -1
  66. package/dist-types/define-config.d.ts +17 -0
  67. package/dist-types/edge/index.d.ts +5 -0
  68. package/dist-types/edge/init-handler.d.ts +40 -0
  69. package/dist-types/edge/resolve-consent.d.ts +80 -0
  70. package/dist-types/edge/types.d.ts +13 -0
  71. package/{dist → dist-types}/handlers/consent/check.handler.d.ts +0 -1
  72. package/{src/handlers/consent/index.ts → dist-types/handlers/consent/index.d.ts} +0 -1
  73. package/{dist → dist-types}/handlers/init/geo.d.ts +2 -3
  74. package/{dist → dist-types}/handlers/init/index.d.ts +2 -3
  75. package/dist-types/handlers/init/policy.d.ts +26 -0
  76. package/dist-types/handlers/init/resolve-init.d.ts +44 -0
  77. package/dist-types/handlers/init/translations.d.ts +48 -0
  78. package/dist-types/handlers/legal-document/current.handler.d.ts +11 -0
  79. package/dist-types/handlers/legal-document/snapshot.d.ts +39 -0
  80. package/dist-types/handlers/policy/snapshot.d.ts +99 -0
  81. package/{src/handlers/status/index.ts → dist-types/handlers/status/index.d.ts} +0 -1
  82. package/{dist → dist-types}/handlers/status/status.handler.d.ts +0 -1
  83. package/{dist → dist-types}/handlers/subject/get.handler.d.ts +3 -2
  84. package/{src/handlers/subject/index.ts → dist-types/handlers/subject/index.d.ts} +0 -1
  85. package/{dist → dist-types}/handlers/subject/list.handler.d.ts +3 -2
  86. package/{dist → dist-types}/handlers/subject/patch.handler.d.ts +0 -2
  87. package/{dist → dist-types}/handlers/subject/post.handler.d.ts +12 -1
  88. package/{dist → dist-types}/handlers/utils/consent-enrichment.d.ts +3 -1
  89. package/{dist → dist-types}/init.d.ts +4 -7
  90. package/{dist → dist-types}/middleware/auth/index.d.ts +0 -1
  91. package/{dist → dist-types}/middleware/auth/validate-api-key.d.ts +0 -1
  92. package/{dist → dist-types}/middleware/cors/cors.d.ts +0 -1
  93. package/{src/middleware/cors/index.ts → dist-types/middleware/cors/index.d.ts} +0 -1
  94. package/{dist → dist-types}/middleware/cors/is-origin-trusted.d.ts +0 -1
  95. package/{dist → dist-types}/middleware/cors/process-cors.d.ts +0 -1
  96. package/{dist → dist-types}/middleware/openapi/config.d.ts +0 -1
  97. package/{dist → dist-types}/middleware/openapi/handlers.d.ts +0 -1
  98. package/{src/middleware/openapi/index.ts → dist-types/middleware/openapi/index.d.ts} +0 -1
  99. package/{dist → dist-types}/middleware/process-ip/index.d.ts +0 -1
  100. package/dist-types/policies/builder.d.ts +127 -0
  101. package/dist-types/policies/defaults.d.ts +2 -0
  102. package/dist-types/policies/matchers.d.ts +3 -0
  103. package/{dist → dist-types}/router.d.ts +0 -1
  104. package/{dist → dist-types}/routes/consent.d.ts +0 -1
  105. package/{dist → dist-types}/routes/index.d.ts +1 -1
  106. package/{dist → dist-types}/routes/init.d.ts +0 -1
  107. package/dist-types/routes/legal-document.d.ts +7 -0
  108. package/{dist → dist-types}/routes/status.d.ts +0 -1
  109. package/{dist → dist-types}/routes/subject.d.ts +0 -1
  110. package/{dist → dist-types}/types/api.d.ts +0 -1
  111. package/dist-types/types/index.d.ts +464 -0
  112. package/dist-types/utils/background.d.ts +6 -0
  113. package/{dist → dist-types}/utils/create-telemetry-options.d.ts +1 -2
  114. package/{dist → dist-types}/utils/env.d.ts +0 -1
  115. package/{dist → dist-types}/utils/extract-error-message.d.ts +0 -1
  116. package/{dist → dist-types}/utils/instrumentation.d.ts +2 -3
  117. package/{dist → dist-types}/utils/logger.d.ts +0 -1
  118. package/{dist → dist-types}/utils/metrics.d.ts +0 -1
  119. package/dist-types/version.d.ts +1 -0
  120. package/docs/README.md +49 -0
  121. package/docs/api/configuration.md +208 -0
  122. package/docs/api/endpoints.md +211 -0
  123. package/docs/guides/caching.md +85 -0
  124. package/docs/guides/database-setup.md +128 -0
  125. package/docs/guides/edge-deployment.md +251 -0
  126. package/docs/guides/framework-integration.md +142 -0
  127. package/docs/guides/iab-tcf.md +89 -0
  128. package/docs/guides/observability.md +96 -0
  129. package/docs/guides/policy-packs.md +396 -0
  130. package/docs/quickstart.md +129 -0
  131. package/package.json +53 -39
  132. package/.turbo/turbo-build.log +0 -49
  133. package/CHANGELOG.md +0 -89
  134. package/dist/cache/adapters/cloudflare-kv.d.ts.map +0 -1
  135. package/dist/cache/adapters/index.d.ts.map +0 -1
  136. package/dist/cache/adapters/memory.d.ts.map +0 -1
  137. package/dist/cache/adapters/upstash-redis.d.ts.map +0 -1
  138. package/dist/cache/gvl-resolver.d.ts.map +0 -1
  139. package/dist/cache/index.d.ts.map +0 -1
  140. package/dist/cache/keys.d.ts.map +0 -1
  141. package/dist/cache/types.d.ts.map +0 -1
  142. package/dist/core.d.ts.map +0 -1
  143. package/dist/db/adapters/drizzle.d.ts +0 -2
  144. package/dist/db/adapters/drizzle.d.ts.map +0 -1
  145. package/dist/db/adapters/index.d.ts +0 -2
  146. package/dist/db/adapters/index.d.ts.map +0 -1
  147. package/dist/db/adapters/kysely.d.ts +0 -2
  148. package/dist/db/adapters/kysely.d.ts.map +0 -1
  149. package/dist/db/adapters/mongo.d.ts +0 -2
  150. package/dist/db/adapters/mongo.d.ts.map +0 -1
  151. package/dist/db/adapters/prisma.d.ts +0 -2
  152. package/dist/db/adapters/prisma.d.ts.map +0 -1
  153. package/dist/db/adapters/typeorm.d.ts +0 -2
  154. package/dist/db/adapters/typeorm.d.ts.map +0 -1
  155. package/dist/db/migrator/index.d.ts.map +0 -1
  156. package/dist/db/registry/consent-policy.d.ts +0 -23
  157. package/dist/db/registry/consent-policy.d.ts.map +0 -1
  158. package/dist/db/registry/consent-purpose.d.ts.map +0 -1
  159. package/dist/db/registry/domain.d.ts.map +0 -1
  160. package/dist/db/registry/index.d.ts +0 -57
  161. package/dist/db/registry/index.d.ts.map +0 -1
  162. package/dist/db/registry/subject.d.ts.map +0 -1
  163. package/dist/db/registry/types.d.ts.map +0 -1
  164. package/dist/db/registry/utils/generate-id.d.ts.map +0 -1
  165. package/dist/db/registry/utils.d.ts.map +0 -1
  166. package/dist/db/schema/1.0.0/audit-log.d.ts.map +0 -1
  167. package/dist/db/schema/1.0.0/consent-policy.d.ts.map +0 -1
  168. package/dist/db/schema/1.0.0/consent-purpose.d.ts.map +0 -1
  169. package/dist/db/schema/1.0.0/consent-record.d.ts.map +0 -1
  170. package/dist/db/schema/1.0.0/consent.d.ts.map +0 -1
  171. package/dist/db/schema/1.0.0/domain.d.ts.map +0 -1
  172. package/dist/db/schema/1.0.0/index.d.ts.map +0 -1
  173. package/dist/db/schema/1.0.0/subject.d.ts.map +0 -1
  174. package/dist/db/schema/2.0.0/audit-log.d.ts.map +0 -1
  175. package/dist/db/schema/2.0.0/consent-policy.d.ts.map +0 -1
  176. package/dist/db/schema/2.0.0/consent-purpose.d.ts.map +0 -1
  177. package/dist/db/schema/2.0.0/consent.d.ts.map +0 -1
  178. package/dist/db/schema/2.0.0/domain.d.ts.map +0 -1
  179. package/dist/db/schema/2.0.0/index.d.ts.map +0 -1
  180. package/dist/db/schema/2.0.0/subject.d.ts.map +0 -1
  181. package/dist/db/schema/index.d.ts.map +0 -1
  182. package/dist/db/tenant-scope.d.ts.map +0 -1
  183. package/dist/define-config.d.ts +0 -5
  184. package/dist/define-config.d.ts.map +0 -1
  185. package/dist/handlers/consent/check.handler.d.ts.map +0 -1
  186. package/dist/handlers/consent/index.d.ts +0 -12
  187. package/dist/handlers/consent/index.d.ts.map +0 -1
  188. package/dist/handlers/init/geo.d.ts.map +0 -1
  189. package/dist/handlers/init/index.d.ts.map +0 -1
  190. package/dist/handlers/init/translations.d.ts +0 -28
  191. package/dist/handlers/init/translations.d.ts.map +0 -1
  192. package/dist/handlers/status/index.d.ts +0 -7
  193. package/dist/handlers/status/index.d.ts.map +0 -1
  194. package/dist/handlers/status/status.handler.d.ts.map +0 -1
  195. package/dist/handlers/subject/get.handler.d.ts.map +0 -1
  196. package/dist/handlers/subject/index.d.ts +0 -10
  197. package/dist/handlers/subject/index.d.ts.map +0 -1
  198. package/dist/handlers/subject/list.handler.d.ts.map +0 -1
  199. package/dist/handlers/subject/patch.handler.d.ts.map +0 -1
  200. package/dist/handlers/subject/post.handler.d.ts.map +0 -1
  201. package/dist/handlers/utils/consent-enrichment.d.ts.map +0 -1
  202. package/dist/init.d.ts.map +0 -1
  203. package/dist/middleware/auth/index.d.ts.map +0 -1
  204. package/dist/middleware/auth/validate-api-key.d.ts.map +0 -1
  205. package/dist/middleware/cors/cors.d.ts.map +0 -1
  206. package/dist/middleware/cors/index.d.ts +0 -30
  207. package/dist/middleware/cors/index.d.ts.map +0 -1
  208. package/dist/middleware/cors/is-origin-trusted.d.ts.map +0 -1
  209. package/dist/middleware/cors/process-cors.d.ts.map +0 -1
  210. package/dist/middleware/openapi/config.d.ts.map +0 -1
  211. package/dist/middleware/openapi/handlers.d.ts.map +0 -1
  212. package/dist/middleware/openapi/index.d.ts +0 -12
  213. package/dist/middleware/openapi/index.d.ts.map +0 -1
  214. package/dist/middleware/process-ip/index.d.ts.map +0 -1
  215. package/dist/router.d.ts.map +0 -1
  216. package/dist/routes/consent.d.ts.map +0 -1
  217. package/dist/routes/index.d.ts.map +0 -1
  218. package/dist/routes/init.d.ts.map +0 -1
  219. package/dist/routes/status.d.ts.map +0 -1
  220. package/dist/routes/subject.d.ts.map +0 -1
  221. package/dist/types/api.d.ts.map +0 -1
  222. package/dist/types/index.d.ts +0 -255
  223. package/dist/types/index.d.ts.map +0 -1
  224. package/dist/utils/create-telemetry-options.d.ts.map +0 -1
  225. package/dist/utils/env.d.ts.map +0 -1
  226. package/dist/utils/extract-error-message.d.ts.map +0 -1
  227. package/dist/utils/index.d.ts +0 -4
  228. package/dist/utils/index.d.ts.map +0 -1
  229. package/dist/utils/instrumentation.d.ts.map +0 -1
  230. package/dist/utils/logger.d.ts.map +0 -1
  231. package/dist/utils/metrics.d.ts.map +0 -1
  232. package/dist/version.d.ts +0 -2
  233. package/dist/version.d.ts.map +0 -1
  234. package/knip.json +0 -31
  235. package/rslib.config.ts +0 -93
  236. package/src/cache/adapters/cloudflare-kv.ts +0 -71
  237. package/src/cache/adapters/index.ts +0 -22
  238. package/src/cache/adapters/memory.ts +0 -111
  239. package/src/cache/adapters/upstash-redis.ts +0 -113
  240. package/src/cache/gvl-resolver.ts +0 -289
  241. package/src/cache/index.ts +0 -34
  242. package/src/cache/keys.ts +0 -68
  243. package/src/cache/types.ts +0 -66
  244. package/src/core.ts +0 -368
  245. package/src/db/migrator/index.ts +0 -80
  246. package/src/db/registry/consent-policy.test.ts +0 -451
  247. package/src/db/registry/consent-policy.ts +0 -82
  248. package/src/db/registry/consent-purpose.test.ts +0 -428
  249. package/src/db/registry/consent-purpose.ts +0 -61
  250. package/src/db/registry/domain.test.ts +0 -445
  251. package/src/db/registry/domain.ts +0 -91
  252. package/src/db/registry/index.ts +0 -14
  253. package/src/db/registry/subject.test.ts +0 -388
  254. package/src/db/registry/subject.ts +0 -129
  255. package/src/db/registry/types.ts +0 -10
  256. package/src/db/registry/utils/generate-id.test.ts +0 -216
  257. package/src/db/registry/utils/generate-id.ts +0 -133
  258. package/src/db/registry/utils.ts +0 -133
  259. package/src/db/schema/1.0.0/audit-log.ts +0 -15
  260. package/src/db/schema/1.0.0/consent-policy.ts +0 -14
  261. package/src/db/schema/1.0.0/consent-purpose.ts +0 -14
  262. package/src/db/schema/1.0.0/consent-record.ts +0 -10
  263. package/src/db/schema/1.0.0/consent.ts +0 -20
  264. package/src/db/schema/1.0.0/domain.ts +0 -12
  265. package/src/db/schema/1.0.0/index.ts +0 -48
  266. package/src/db/schema/1.0.0/subject.ts +0 -12
  267. package/src/db/schema/2.0.0/audit-log.ts +0 -18
  268. package/src/db/schema/2.0.0/consent-policy.ts +0 -28
  269. package/src/db/schema/2.0.0/consent-purpose.ts +0 -12
  270. package/src/db/schema/2.0.0/consent.ts +0 -26
  271. package/src/db/schema/2.0.0/domain.ts +0 -12
  272. package/src/db/schema/2.0.0/index.ts +0 -47
  273. package/src/db/schema/2.0.0/subject.ts +0 -14
  274. package/src/db/schema/index.ts +0 -15
  275. package/src/db/tenant-scope.test.ts +0 -750
  276. package/src/db/tenant-scope.ts +0 -103
  277. package/src/define-config.ts +0 -5
  278. package/src/handlers/consent/check.handler.ts +0 -126
  279. package/src/handlers/init/geo.test.ts +0 -317
  280. package/src/handlers/init/geo.ts +0 -195
  281. package/src/handlers/init/index.test.ts +0 -205
  282. package/src/handlers/init/index.ts +0 -114
  283. package/src/handlers/init/translations.test.ts +0 -121
  284. package/src/handlers/init/translations.ts +0 -72
  285. package/src/handlers/status/status.handler.test.ts +0 -155
  286. package/src/handlers/status/status.handler.ts +0 -51
  287. package/src/handlers/subject/get.handler.ts +0 -93
  288. package/src/handlers/subject/list.handler.ts +0 -93
  289. package/src/handlers/subject/patch.handler.ts +0 -122
  290. package/src/handlers/subject/post.handler.test.ts +0 -294
  291. package/src/handlers/subject/post.handler.ts +0 -254
  292. package/src/handlers/utils/consent-enrichment.test.ts +0 -380
  293. package/src/handlers/utils/consent-enrichment.ts +0 -218
  294. package/src/init.test.ts +0 -126
  295. package/src/init.ts +0 -87
  296. package/src/middleware/auth/index.ts +0 -11
  297. package/src/middleware/auth/validate-api-key.test.ts +0 -86
  298. package/src/middleware/auth/validate-api-key.ts +0 -107
  299. package/src/middleware/cors/cors.test.ts +0 -135
  300. package/src/middleware/cors/cors.ts +0 -186
  301. package/src/middleware/cors/is-origin-trusted.test.ts +0 -164
  302. package/src/middleware/cors/is-origin-trusted.ts +0 -130
  303. package/src/middleware/cors/process-cors.ts +0 -91
  304. package/src/middleware/openapi/config.ts +0 -29
  305. package/src/middleware/openapi/handlers.ts +0 -34
  306. package/src/middleware/process-ip/index.test.ts +0 -195
  307. package/src/middleware/process-ip/index.ts +0 -199
  308. package/src/router.ts +0 -15
  309. package/src/routes/consent.ts +0 -52
  310. package/src/routes/index.ts +0 -10
  311. package/src/routes/init.ts +0 -102
  312. package/src/routes/status.ts +0 -46
  313. package/src/routes/subject.ts +0 -152
  314. package/src/types/api.ts +0 -48
  315. package/src/types/index.ts +0 -288
  316. package/src/utils/create-telemetry-options.test.ts +0 -302
  317. package/src/utils/create-telemetry-options.ts +0 -229
  318. package/src/utils/env.ts +0 -84
  319. package/src/utils/extract-error-message.ts +0 -21
  320. package/src/utils/instrumentation.test.ts +0 -185
  321. package/src/utils/instrumentation.ts +0 -196
  322. package/src/utils/logger.ts +0 -41
  323. package/src/utils/metrics.test.ts +0 -323
  324. package/src/utils/metrics.ts +0 -402
  325. package/src/utils/telemetry-pii.test.ts +0 -325
  326. package/src/version.ts +0 -2
  327. package/tsconfig.json +0 -11
  328. package/vitest.config.ts +0 -28
  329. /package/dist/{types.js → types/index.js} +0 -0
  330. /package/{src/db/adapters/drizzle.ts → dist-types/db/adapters/drizzle.d.ts} +0 -0
  331. /package/{src/db/adapters/index.ts → dist-types/db/adapters/index.d.ts} +0 -0
  332. /package/{src/db/adapters/kysely.ts → dist-types/db/adapters/kysely.d.ts} +0 -0
  333. /package/{src/db/adapters/mongo.ts → dist-types/db/adapters/mongo.d.ts} +0 -0
  334. /package/{src/db/adapters/prisma.ts → dist-types/db/adapters/prisma.d.ts} +0 -0
  335. /package/{src/db/adapters/typeorm.ts → dist-types/db/adapters/typeorm.d.ts} +0 -0
  336. /package/{src/utils/index.ts → dist-types/utils/index.d.ts} +0 -0
@@ -17,4 +17,3 @@ type ORM = ReturnType<InferFumaDB<typeof LatestDB>['orm']>;
17
17
  */
18
18
  export declare function withTenantScope(db: ORM, tenantId: string): ORM;
19
19
  export {};
20
- //# sourceMappingURL=tenant-scope.d.ts.map
@@ -0,0 +1,17 @@
1
+ import type { C15TOptions } from './types';
2
+ /**
3
+ * c15t backend config accepted by `defineConfig`.
4
+ *
5
+ * Keep this as an intersection with `C15TOptions` (instead of `Omit`) so
6
+ * TypeScript preserves property-level JSDoc in editor completions.
7
+ */
8
+ export type C15TConfig = C15TOptions & {
9
+ /**
10
+ * Logger config is managed internally and is not supported via config files.
11
+ */
12
+ logger?: never;
13
+ };
14
+ /**
15
+ * Helper for typed backend configuration in `c15t-backend.config.ts`.
16
+ */
17
+ export declare const defineConfig: (config: C15TConfig) => C15TConfig;
@@ -0,0 +1,5 @@
1
+ export type { InitPayload } from './init-handler';
2
+ export { unstable_c15tEdgeInit } from './init-handler';
3
+ export type { C15TConsentResolverOptions, CategoryConsent, ResolvedConsent, } from './resolve-consent';
4
+ export { unstable_resolveConsent } from './resolve-consent';
5
+ export type { C15TEdgeOptions } from './types';
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Edge-compatible /init handler — runs as a pure Request → Response function
3
+ * without Hono or a database adapter.
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ import { type InitPayload } from '../handlers/init/resolve-init';
8
+ import type { C15TEdgeOptions } from './types';
9
+ export type { InitPayload };
10
+ /**
11
+ * Creates an edge-compatible /init handler.
12
+ *
13
+ * The returned function accepts a standard `Request` and returns a `Response`.
14
+ * It has no dependency on Hono or any database adapter, making it suitable for
15
+ * edge runtimes such as Vercel Middleware, Cloudflare Workers, or Deno Deploy.
16
+ *
17
+ * @experimental This API is unstable in 2.0 and may change or be removed.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * // middleware.ts (Vercel Edge)
22
+ * import { unstable_c15tEdgeInit } from '@c15t/backend/edge';
23
+ *
24
+ * const initHandler = unstable_c15tEdgeInit({
25
+ * trustedOrigins: ['https://myapp.com'],
26
+ * policyPacks: [
27
+ * { id: 'eu', match: { countries: ['DE', 'FR'] }, consent: { model: 'opt-in' }, ui: { mode: 'banner' } },
28
+ * ],
29
+ * policySnapshot: { signingKey: process.env.SNAPSHOT_KEY! },
30
+ * });
31
+ *
32
+ * export async function middleware(request: Request) {
33
+ * const url = new URL(request.url);
34
+ * if (url.pathname === '/api/consent/init') {
35
+ * return initHandler(request);
36
+ * }
37
+ * }
38
+ * ```
39
+ */
40
+ export declare function unstable_c15tEdgeInit(options: C15TEdgeOptions): (request: Request) => Promise<Response>;
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Lightweight edge consent resolver — resolves policy + default consent
3
+ * categories from geo headers without the full /init payload.
4
+ *
5
+ * Designed for enterprise customers who maintain their own consent cookie
6
+ * and need to know which categories to load in middleware.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ import type { Logger } from '@c15t/logger';
11
+ import type { C15TEdgeOptions } from './types';
12
+ /**
13
+ * Options for the consent resolver — a subset of C15TEdgeOptions
14
+ * containing only what's needed for policy resolution.
15
+ */
16
+ export type C15TConsentResolverOptions = Pick<C15TEdgeOptions, 'policyPacks' | 'disableGeoLocation'>;
17
+ /**
18
+ * Default consent state for a single category.
19
+ */
20
+ export interface CategoryConsent {
21
+ /** Whether this category is granted by default (before user interaction). */
22
+ granted: boolean;
23
+ /** Whether the user can toggle this category off. */
24
+ required: boolean;
25
+ }
26
+ /**
27
+ * Result of resolving consent defaults for a request.
28
+ */
29
+ export interface ResolvedConsent {
30
+ /** The jurisdiction code for this visitor (GDPR, CCPA, etc.) */
31
+ jurisdiction: string;
32
+ /** Visitor's detected location. */
33
+ location: {
34
+ countryCode: string | null;
35
+ regionCode: string | null;
36
+ };
37
+ /** The resolved consent model (opt-in, opt-out, none, iab). */
38
+ model: string;
39
+ /** The matched policy ID, or null if no policy matched. */
40
+ policyId: string | null;
41
+ /** Default consent state per category. */
42
+ defaults: Record<string, CategoryConsent>;
43
+ /** Whether a consent banner/dialog should be shown. */
44
+ showBanner: boolean;
45
+ /** Whether the GPC (Global Privacy Control) signal is active. */
46
+ gpc: boolean;
47
+ }
48
+ /**
49
+ * Resolves consent policy and default category states from a request.
50
+ *
51
+ * Fully synchronous — no async, no fetch calls, no crypto.
52
+ *
53
+ * This is a lightweight alternative to `unstable_c15tEdgeInit` for enterprise
54
+ * customers who manage their own consent cookie. It returns the resolved
55
+ * policy and default consent state without translations, GVL, branding,
56
+ * or snapshot tokens.
57
+ *
58
+ * @experimental This API is unstable in 2.0 and may change or be removed.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * import { unstable_resolveConsent } from '@c15t/backend/edge';
63
+ *
64
+ * export function middleware(request: Request) {
65
+ * const consent = unstable_resolveConsent(request, {
66
+ * policyPacks: [
67
+ * { id: 'eu', match: { countries: ['DE', 'FR'] }, consent: { model: 'opt-in', categories: ['necessary', 'marketing', 'measurement'] }, ui: { mode: 'banner' } },
68
+ * { id: 'us', match: { isDefault: true }, consent: { model: 'opt-out', categories: ['necessary', 'marketing', 'measurement'] }, ui: { mode: 'banner' } },
69
+ * ],
70
+ * });
71
+ *
72
+ * // consent.defaults => { necessary: { granted: true, required: true }, marketing: { granted: false, required: false }, ... }
73
+ * // consent.model => "opt-in"
74
+ * // consent.showBanner => true
75
+ *
76
+ * // Read your own cookie, merge with consent.defaults, decide what to load
77
+ * }
78
+ * ```
79
+ */
80
+ export declare function unstable_resolveConsent(request: Request, options: C15TConsentResolverOptions, logger?: Logger): ResolvedConsent;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Edge handler types — the minimal subset of C15TOptions needed to run /init
3
+ * without a database adapter.
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ import type { C15TOptions } from '../types';
8
+ /**
9
+ * Configuration for the edge init handler.
10
+ * This is a strict subset of {@link C15TOptions} containing only the fields
11
+ * needed for consent policy resolution — no database adapter required.
12
+ */
13
+ export type C15TEdgeOptions = Pick<C15TOptions, 'appName' | 'tenantId' | 'trustedOrigins' | 'disableGeoLocation' | 'customTranslations' | 'i18n' | 'policyPacks' | 'branding' | 'iab' | 'cache' | 'policySnapshot' | 'legalDocumentSnapshot' | 'telemetry' | 'logger'>;
@@ -21,4 +21,3 @@ export declare const checkConsentHandler: (c: Context) => Promise<Response & imp
21
21
  };
22
22
  };
23
23
  }, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
24
- //# sourceMappingURL=check.handler.d.ts.map
@@ -8,5 +8,4 @@
8
8
  *
9
9
  * @packageDocumentation
10
10
  */
11
-
12
11
  export { checkConsentHandler } from './check.handler';
@@ -16,7 +16,7 @@ export declare function checkJurisdiction(countryCode: string | null, regionCode
16
16
  * @param options - The C15T options
17
17
  * @returns The location object with countryCode and regionCode
18
18
  */
19
- export declare function getLocation(request: Request, options: C15TOptions): Promise<{
19
+ export declare function getLocation(request: Request, options: Pick<C15TOptions, 'disableGeoLocation'>): Promise<{
20
20
  countryCode: string | null;
21
21
  regionCode: string | null;
22
22
  }>;
@@ -30,5 +30,4 @@ export declare function getLocation(request: Request, options: C15TOptions): Pro
30
30
  export declare function getJurisdiction(location: {
31
31
  countryCode: string | null;
32
32
  regionCode: string | null;
33
- }, options: C15TOptions): JurisdictionCode;
34
- //# sourceMappingURL=geo.d.ts.map
33
+ }, options: Pick<C15TOptions, 'disableGeoLocation'>): JurisdictionCode;
@@ -41,7 +41,7 @@ export declare function buildResponse({ jurisdiction, location, acceptLanguage,
41
41
  translations: import("@c15t/translations").CompleteTranslations;
42
42
  language: string;
43
43
  };
44
- branding: "c15t" | "consent" | "none";
44
+ branding: "c15t" | "consent" | "none" | "inth";
45
45
  gvl: {
46
46
  gvlSpecificationVersion: number;
47
47
  vendorListVersion: number;
@@ -153,5 +153,4 @@ export declare function buildResponse({ jurisdiction, location, acceptLanguage,
153
153
  }[] | undefined;
154
154
  };
155
155
  export { checkJurisdiction, getJurisdiction, getLocation } from './geo';
156
- export { getTranslations, getTranslationsData } from './translations';
157
- //# sourceMappingURL=index.d.ts.map
156
+ export { getTranslations, getTranslationsData, listProfiles, validateMessages, } from './translations';
@@ -0,0 +1,26 @@
1
+ import type { PolicyMatchedBy, PolicyValidationResult, ResolvedPolicyDecision as SharedResolvedPolicyDecision, ResolvedPolicyMatch as SharedResolvedPolicyMatch, ResolvedPolicy as SharedResolvedRuntimePolicy } from '@c15t/schema/types';
2
+ import type { JurisdictionCode as BackendJurisdictionCode } from '../../types';
3
+ export type { PolicyMatchedBy, PolicyValidationResult };
4
+ export type ResolvedRuntimePolicy = SharedResolvedRuntimePolicy;
5
+ export type ResolvedPolicyDecision = SharedResolvedPolicyDecision;
6
+ export type ResolvedPolicyMatch = SharedResolvedPolicyMatch;
7
+ export declare function inspectPolicies(policies: unknown, options?: {
8
+ iabEnabled?: boolean;
9
+ }): PolicyValidationResult;
10
+ export declare function validatePolicies(policies: unknown, options?: {
11
+ iabEnabled?: boolean;
12
+ }): void;
13
+ export declare function resolvePolicyDecision(params: {
14
+ policies?: unknown;
15
+ countryCode: string | null;
16
+ regionCode: string | null;
17
+ jurisdiction?: BackendJurisdictionCode;
18
+ iabEnabled?: boolean;
19
+ }): Promise<ResolvedPolicyDecision | undefined>;
20
+ export declare function resolvePolicySync(params: {
21
+ policies?: unknown;
22
+ countryCode: string | null;
23
+ regionCode: string | null;
24
+ jurisdiction?: BackendJurisdictionCode;
25
+ iabEnabled?: boolean;
26
+ }): ResolvedPolicyMatch | undefined;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Shared init payload resolution — used by both the Hono route and the edge handler.
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+ import type { Logger } from '@c15t/logger';
7
+ import type { ResolvedPolicy } from '@c15t/schema/types';
8
+ import type { C15TEdgeOptions } from '../../edge/types';
9
+ /**
10
+ * Subset of C15TOptions needed by the init resolver.
11
+ * Derived from {@link C15TEdgeOptions} minus `logger` (passed separately).
12
+ */
13
+ export type InitResolverOptions = Omit<C15TEdgeOptions, 'logger'>;
14
+ /** The JSON-serializable payload returned by /init. */
15
+ export interface InitPayload {
16
+ jurisdiction: string;
17
+ location: {
18
+ countryCode: string | null;
19
+ regionCode: string | null;
20
+ };
21
+ translations: {
22
+ translations: unknown;
23
+ language: string;
24
+ };
25
+ branding: string;
26
+ gvl?: unknown;
27
+ customVendors?: unknown[];
28
+ policy?: ResolvedPolicy;
29
+ policyDecision?: {
30
+ policyId: string;
31
+ fingerprint: string;
32
+ matchedBy: string;
33
+ country: string | null;
34
+ region: string | null;
35
+ jurisdiction: string;
36
+ };
37
+ policySnapshotToken?: string;
38
+ cmpId?: number;
39
+ }
40
+ /**
41
+ * Resolves the full /init payload from a request and options.
42
+ * Pure function — no Hono, no database dependency.
43
+ */
44
+ export declare function resolveInitPayload(request: Request, options: InitResolverOptions, logger?: Logger): Promise<InitPayload>;
@@ -0,0 +1,48 @@
1
+ import { type CompleteTranslations, type Translations } from '@c15t/translations';
2
+ import type { C15TOptions, PolicyConfig } from '../../types';
3
+ interface LoggerLike {
4
+ warn: (message: string, metadata?: Record<string, unknown>) => void;
5
+ }
6
+ interface TranslationResolutionOptions {
7
+ i18n?: C15TOptions['i18n'];
8
+ policyI18n?: PolicyConfig['i18n'];
9
+ logger?: LoggerLike;
10
+ }
11
+ export declare function listProfiles(options: {
12
+ customTranslations?: Record<string, Partial<Translations>>;
13
+ i18n?: C15TOptions['i18n'];
14
+ }): string[];
15
+ export declare function validateMessages(options: {
16
+ customTranslations?: Record<string, Partial<Translations>>;
17
+ i18n?: C15TOptions['i18n'];
18
+ policies?: PolicyConfig[];
19
+ }): {
20
+ profiles: string[];
21
+ errors: string[];
22
+ warnings: string[];
23
+ };
24
+ /**
25
+ * Gets the translations data for a given language, resolving optional policy
26
+ * profile/language hints and compatibility aliases.
27
+ *
28
+ * Fallback order:
29
+ * 1) profile + language
30
+ * 2) profile + fallback language
31
+ */
32
+ export declare function getTranslationsData(acceptLanguage: string | null, customTranslations?: Record<string, Partial<Translations>>, options?: TranslationResolutionOptions): {
33
+ translations: CompleteTranslations;
34
+ language: string;
35
+ };
36
+ /**
37
+ * Gets the translations for a given language from options.
38
+ */
39
+ export declare function getTranslations(acceptLanguage: string, options: {
40
+ customTranslations?: Record<string, Partial<Translations>>;
41
+ i18n?: C15TOptions['i18n'];
42
+ policyI18n?: PolicyConfig['i18n'];
43
+ logger?: LoggerLike;
44
+ }): Promise<{
45
+ translations: CompleteTranslations;
46
+ language: string;
47
+ }>;
48
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { Context } from 'hono';
2
+ export declare const syncCurrentLegalDocumentHandler: (c: Context) => Promise<Response & import("hono").TypedResponse<{
3
+ policy: {
4
+ id: string;
5
+ type: string;
6
+ version: string;
7
+ hash: string;
8
+ effectiveDate: string;
9
+ isActive: boolean;
10
+ };
11
+ }, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
@@ -0,0 +1,39 @@
1
+ import { type JWTPayload } from 'jose';
2
+ import type { LegalDocumentPolicyType, LegalDocumentSnapshotOptions } from '../../types';
3
+ export type LegalDocumentSnapshotVerificationFailureReason = 'missing' | 'malformed' | 'expired' | 'invalid';
4
+ export type LegalDocumentSnapshotVerificationResult = {
5
+ valid: true;
6
+ payload: LegalDocumentSnapshotPayload;
7
+ } | {
8
+ valid: false;
9
+ reason: LegalDocumentSnapshotVerificationFailureReason;
10
+ };
11
+ export interface LegalDocumentSnapshotPayload extends JWTPayload {
12
+ iss: string;
13
+ aud: string;
14
+ sub: string;
15
+ tenantId?: string;
16
+ type: LegalDocumentPolicyType;
17
+ version: string;
18
+ hash: string;
19
+ effectiveDate: string;
20
+ iat: number;
21
+ exp: number;
22
+ }
23
+ export declare function createLegalDocumentSnapshotToken(params: {
24
+ options?: LegalDocumentSnapshotOptions;
25
+ tenantId?: string;
26
+ type: LegalDocumentPolicyType;
27
+ version: string;
28
+ hash: string;
29
+ effectiveDate: string;
30
+ ttlSeconds?: number;
31
+ }): Promise<{
32
+ token: string;
33
+ payload: LegalDocumentSnapshotPayload;
34
+ } | undefined>;
35
+ export declare function verifyLegalDocumentSnapshotToken(params: {
36
+ token?: string;
37
+ options?: LegalDocumentSnapshotOptions;
38
+ tenantId?: string;
39
+ }): Promise<LegalDocumentSnapshotVerificationResult>;
@@ -0,0 +1,99 @@
1
+ import { type JWTPayload } from 'jose';
2
+ import type { JurisdictionCode, PolicyModel, PolicyScopeMode, PolicySnapshotOptions, PolicyUiMode, PolicyUiSurfaceConfig } from '../../types';
3
+ import type { PolicyMatchedBy } from '../init/policy';
4
+ export type PolicySnapshotVerificationFailureReason = 'missing' | 'malformed' | 'expired' | 'invalid';
5
+ export type PolicySnapshotVerificationResult = {
6
+ valid: true;
7
+ payload: PolicySnapshotPayload;
8
+ } | {
9
+ valid: false;
10
+ reason: PolicySnapshotVerificationFailureReason;
11
+ };
12
+ export interface PolicySnapshotUiSurface {
13
+ allowedActions?: PolicyUiSurfaceConfig['allowedActions'];
14
+ primaryActions?: PolicyUiSurfaceConfig['primaryActions'];
15
+ layout?: PolicyUiSurfaceConfig['layout'];
16
+ direction?: PolicyUiSurfaceConfig['direction'];
17
+ uiProfile?: PolicyUiSurfaceConfig['uiProfile'];
18
+ scrollLock?: PolicyUiSurfaceConfig['scrollLock'];
19
+ }
20
+ /**
21
+ * JWT payload for a policy snapshot token.
22
+ *
23
+ * @remarks
24
+ * Fields are intentionally flattened from the nested `ResolvedPolicy` structure
25
+ * to keep the JWT compact. For example, `scopeMode` maps to
26
+ * `ResolvedPolicy.consent.scopeMode` and `uiMode` maps to
27
+ * `ResolvedPolicy.ui.mode`. The post handler reconstructs the nested shape
28
+ * when verifying the token.
29
+ */
30
+ export interface PolicySnapshotPayload extends JWTPayload {
31
+ iss: string;
32
+ aud: string;
33
+ sub: string;
34
+ tenantId?: string;
35
+ policyId: string;
36
+ fingerprint: string;
37
+ matchedBy: PolicyMatchedBy;
38
+ country: string | null;
39
+ region: string | null;
40
+ jurisdiction: JurisdictionCode;
41
+ language?: string;
42
+ model: PolicyModel;
43
+ policyI18n?: {
44
+ language?: string;
45
+ messageProfile?: string;
46
+ };
47
+ expiryDays?: number;
48
+ scopeMode?: PolicyScopeMode;
49
+ uiMode?: PolicyUiMode;
50
+ bannerUi?: PolicySnapshotUiSurface;
51
+ dialogUi?: PolicySnapshotUiSurface;
52
+ categories?: string[];
53
+ preselectedCategories?: string[];
54
+ gpc?: boolean;
55
+ proofConfig?: {
56
+ storeIp?: boolean;
57
+ storeUserAgent?: boolean;
58
+ storeLanguage?: boolean;
59
+ };
60
+ iat: number;
61
+ exp: number;
62
+ }
63
+ export declare function createPolicySnapshotToken(params: {
64
+ options?: PolicySnapshotOptions;
65
+ tenantId?: string;
66
+ policyId: string;
67
+ fingerprint: string;
68
+ matchedBy: PolicyMatchedBy;
69
+ country: string | null;
70
+ region: string | null;
71
+ jurisdiction: JurisdictionCode;
72
+ language?: string;
73
+ model: PolicyModel;
74
+ policyI18n?: {
75
+ language?: string;
76
+ messageProfile?: string;
77
+ };
78
+ expiryDays?: number;
79
+ scopeMode?: PolicyScopeMode;
80
+ uiMode?: PolicyUiMode;
81
+ bannerUi?: PolicySnapshotUiSurface;
82
+ dialogUi?: PolicySnapshotUiSurface;
83
+ categories?: string[];
84
+ preselectedCategories?: string[];
85
+ gpc?: boolean;
86
+ proofConfig?: {
87
+ storeIp?: boolean;
88
+ storeUserAgent?: boolean;
89
+ storeLanguage?: boolean;
90
+ };
91
+ }): Promise<{
92
+ token: string;
93
+ payload: PolicySnapshotPayload;
94
+ } | undefined>;
95
+ export declare function verifyPolicySnapshotToken(params: {
96
+ token?: string;
97
+ options?: PolicySnapshotOptions;
98
+ tenantId?: string;
99
+ }): Promise<PolicySnapshotVerificationResult>;
@@ -3,5 +3,4 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
-
7
6
  export { statusHandler } from './status.handler';
@@ -23,4 +23,3 @@ export declare const statusHandler: (c: Context) => Promise<Response & import("h
23
23
  };
24
24
  };
25
25
  }, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
26
- //# sourceMappingURL=status.handler.d.ts.map
@@ -14,13 +14,15 @@ export declare const getSubjectHandler: (c: Context) => Promise<Response & impor
14
14
  subject: {
15
15
  id: string;
16
16
  externalId: string | undefined;
17
- isIdentified: boolean;
18
17
  createdAt: string;
19
18
  };
20
19
  consents: {
21
20
  id: string;
22
21
  type: string;
23
22
  policyId: string | undefined;
23
+ policyVersion: string | undefined;
24
+ policyHash: string | undefined;
25
+ policyEffectiveDate: string | undefined;
24
26
  isLatestPolicy: boolean;
25
27
  preferences: {
26
28
  [x: string]: boolean;
@@ -29,4 +31,3 @@ export declare const getSubjectHandler: (c: Context) => Promise<Response & impor
29
31
  }[];
30
32
  isValid: boolean;
31
33
  }, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
32
- //# sourceMappingURL=get.handler.d.ts.map
@@ -3,7 +3,6 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
-
7
6
  export { getSubjectHandler } from './get.handler';
8
7
  export { listSubjectsHandler } from './list.handler';
9
8
  export { patchSubjectHandler } from './patch.handler';
@@ -14,12 +14,14 @@ export declare const listSubjectsHandler: (c: Context) => Promise<Response & imp
14
14
  subjects: {
15
15
  id: string;
16
16
  externalId: string;
17
- isIdentified: boolean;
18
17
  createdAt: string;
19
18
  consents: {
20
19
  id: string;
21
20
  type: string;
22
21
  policyId: string | undefined;
22
+ policyVersion: string | undefined;
23
+ policyHash: string | undefined;
24
+ policyEffectiveDate: string | undefined;
23
25
  isLatestPolicy: boolean;
24
26
  preferences: {
25
27
  [x: string]: boolean;
@@ -28,4 +30,3 @@ export declare const listSubjectsHandler: (c: Context) => Promise<Response & imp
28
30
  }[];
29
31
  }[];
30
32
  }, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
31
- //# sourceMappingURL=list.handler.d.ts.map
@@ -16,7 +16,5 @@ export declare const patchSubjectHandler: (c: Context) => Promise<Response & imp
16
16
  subject: {
17
17
  id: string;
18
18
  externalId: string;
19
- isIdentified: true;
20
19
  };
21
20
  }, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
22
- //# sourceMappingURL=patch.handler.d.ts.map
@@ -4,6 +4,15 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
  import type { Context } from 'hono';
7
+ export declare function buildRuntimeDecisionDedupeKey(input: {
8
+ tenantId?: string;
9
+ fingerprint: string;
10
+ matchedBy: string;
11
+ countryCode: string | null;
12
+ regionCode: string | null;
13
+ jurisdiction: string;
14
+ language?: string;
15
+ }): string;
7
16
  /**
8
17
  * Handles the creation of a new consent record for a subject.
9
18
  *
@@ -19,7 +28,9 @@ export declare const postSubjectHandler: (c: Context) => Promise<Response & impo
19
28
  metadata: {
20
29
  [x: string]: import("hono/utils/types").JSONValue;
21
30
  } | undefined;
31
+ appliedPreferences: {
32
+ [x: string]: boolean;
33
+ } | undefined;
22
34
  uiSource: string | undefined;
23
35
  givenAt: string;
24
36
  }, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
25
- //# sourceMappingURL=post.handler.d.ts.map
@@ -12,6 +12,9 @@ export interface EnrichedConsentItem {
12
12
  id: string;
13
13
  type: string;
14
14
  policyId: string | undefined;
15
+ policyVersion: string | undefined;
16
+ policyHash: string | undefined;
17
+ policyEffectiveDate: Date | undefined;
15
18
  isLatestPolicy: boolean;
16
19
  preferences: Record<string, boolean> | undefined;
17
20
  givenAt: Date;
@@ -49,4 +52,3 @@ export declare function resolveConsentPolicies(consents: Array<{
49
52
  policyId: string | null;
50
53
  }>, ctx: EnrichmentContext): Promise<ConsentPolicyInfo[]>;
51
54
  export {};
52
- //# sourceMappingURL=consent-enrichment.d.ts.map
@@ -16,15 +16,12 @@ import type { C15TContext, C15TOptions } from './types';
16
16
  *
17
17
  * // Then pass telemetry config
18
18
  * const instance = c15tInstance({
19
- * advanced: {
20
- * telemetry: {
21
- * enabled: true,
22
- * tracer: trace.getTracer('my-app'),
23
- * meter: metrics.getMeter('my-app'),
24
- * },
19
+ * telemetry: {
20
+ * enabled: true,
21
+ * tracer: trace.getTracer('my-app'),
22
+ * meter: metrics.getMeter('my-app'),
25
23
  * },
26
24
  * });
27
25
  * ```
28
26
  */
29
27
  export declare const init: (options: C15TOptions) => C15TContext;
30
- //# sourceMappingURL=init.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
  export { extractBearerToken, validateApiKey, validateRequestAuth, } from './validate-api-key';
7
- //# sourceMappingURL=index.d.ts.map
@@ -46,4 +46,3 @@ export declare function validateApiKey(token: string | null, validKeys: string[]
46
46
  * ```
47
47
  */
48
48
  export declare function validateRequestAuth(headers: Headers | undefined, validKeys: string[] | undefined): boolean;
49
- //# sourceMappingURL=validate-api-key.d.ts.map
@@ -30,4 +30,3 @@ export interface CorsOptions {
30
30
  * ```
31
31
  */
32
32
  export declare function createCORSOptions(trustedOrigins?: string[] | string): CorsOptions;
33
- //# sourceMappingURL=cors.d.ts.map
@@ -24,7 +24,6 @@
24
24
  *
25
25
  * @packageDocumentation
26
26
  */
27
-
28
27
  export { createCORSOptions } from './cors';
29
28
  export { isOriginTrusted } from './is-origin-trusted';
30
29
  export { processCors } from './process-cors';
@@ -46,4 +46,3 @@ export declare const STRIP_REGEX: RegExp;
46
46
  * ```
47
47
  */
48
48
  export declare function isOriginTrusted(origin: string, trustedDomains: string[], logger?: Logger): boolean;
49
- //# sourceMappingURL=is-origin-trusted.d.ts.map