@c15t/backend 2.0.0-rc.3 → 2.0.0-rc.5

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 (314) hide show
  1. package/dist/cache.cjs +4 -4
  2. package/dist/cache.js +4 -4
  3. package/dist/core.cjs +845 -87
  4. package/dist/core.js +821 -87
  5. package/dist/db/schema.cjs +37 -0
  6. package/dist/db/schema.js +33 -2
  7. package/dist/edge.cjs +1106 -0
  8. package/dist/edge.js +1069 -0
  9. package/dist/router.cjs +621 -71
  10. package/dist/router.js +621 -71
  11. package/{dist → dist-types}/cache/adapters/cloudflare-kv.d.ts +0 -1
  12. package/{dist → dist-types}/cache/adapters/index.d.ts +0 -1
  13. package/{dist → dist-types}/cache/adapters/memory.d.ts +0 -1
  14. package/{dist → dist-types}/cache/adapters/upstash-redis.d.ts +0 -1
  15. package/{dist → dist-types}/cache/gvl-resolver.d.ts +1 -2
  16. package/{dist → dist-types}/cache/index.d.ts +0 -1
  17. package/{dist → dist-types}/cache/keys.d.ts +0 -1
  18. package/{dist → dist-types}/cache/types.d.ts +0 -1
  19. package/{dist → dist-types}/core.d.ts +8 -1
  20. package/{dist → dist-types}/db/migrator/index.d.ts +0 -1
  21. package/{dist → dist-types}/db/registry/consent-policy.d.ts +0 -1
  22. package/{dist → dist-types}/db/registry/consent-purpose.d.ts +0 -1
  23. package/{dist → dist-types}/db/registry/domain.d.ts +0 -1
  24. package/{dist → dist-types}/db/registry/index.d.ts +22 -2
  25. package/dist-types/db/registry/runtime-policy-decision.d.ts +60 -0
  26. package/{dist → dist-types}/db/registry/subject.d.ts +0 -1
  27. package/{dist → dist-types}/db/registry/types.d.ts +1 -2
  28. package/{dist → dist-types}/db/registry/utils/generate-id.d.ts +0 -1
  29. package/{dist → dist-types}/db/registry/utils.d.ts +0 -1
  30. package/{dist → dist-types}/db/schema/1.0.0/audit-log.d.ts +0 -1
  31. package/{dist → dist-types}/db/schema/1.0.0/consent-policy.d.ts +0 -1
  32. package/{dist → dist-types}/db/schema/1.0.0/consent-purpose.d.ts +0 -1
  33. package/{dist → dist-types}/db/schema/1.0.0/consent-record.d.ts +0 -1
  34. package/{dist → dist-types}/db/schema/1.0.0/consent.d.ts +1 -2
  35. package/{dist → dist-types}/db/schema/1.0.0/domain.d.ts +0 -1
  36. package/{dist → dist-types}/db/schema/1.0.0/index.d.ts +0 -1
  37. package/{dist → dist-types}/db/schema/1.0.0/subject.d.ts +0 -1
  38. package/{dist → dist-types}/db/schema/2.0.0/audit-log.d.ts +1 -2
  39. package/{dist → dist-types}/db/schema/2.0.0/consent-policy.d.ts +1 -2
  40. package/{dist → dist-types}/db/schema/2.0.0/consent-purpose.d.ts +1 -2
  41. package/{dist → dist-types}/db/schema/2.0.0/consent.d.ts +5 -2
  42. package/{dist → dist-types}/db/schema/2.0.0/domain.d.ts +1 -2
  43. package/{dist → dist-types}/db/schema/2.0.0/index.d.ts +432 -17
  44. package/dist-types/db/schema/2.0.0/runtime-policy-decision.d.ts +23 -0
  45. package/{dist → dist-types}/db/schema/2.0.0/subject.d.ts +1 -2
  46. package/{dist → dist-types}/db/schema/index.d.ts +862 -33
  47. package/{dist → dist-types}/db/tenant-scope.d.ts +0 -1
  48. package/dist-types/define-config.d.ts +17 -0
  49. package/dist-types/edge/index.d.ts +5 -0
  50. package/dist-types/edge/init-handler.d.ts +38 -0
  51. package/dist-types/edge/resolve-consent.d.ts +80 -0
  52. package/dist-types/edge/types.d.ts +13 -0
  53. package/{dist → dist-types}/handlers/consent/check.handler.d.ts +0 -1
  54. package/{src/handlers/consent/index.ts → dist-types/handlers/consent/index.d.ts} +0 -1
  55. package/{dist → dist-types}/handlers/init/geo.d.ts +2 -3
  56. package/{dist → dist-types}/handlers/init/index.d.ts +4 -5
  57. package/dist-types/handlers/init/policy.d.ts +26 -0
  58. package/dist-types/handlers/init/resolve-init.d.ts +44 -0
  59. package/dist-types/handlers/init/translations.d.ts +48 -0
  60. package/dist-types/handlers/policy/snapshot.d.ts +99 -0
  61. package/{src/handlers/status/index.ts → dist-types/handlers/status/index.d.ts} +0 -1
  62. package/{dist → dist-types}/handlers/status/status.handler.d.ts +0 -1
  63. package/{dist → dist-types}/handlers/subject/get.handler.d.ts +0 -1
  64. package/{src/handlers/subject/index.ts → dist-types/handlers/subject/index.d.ts} +0 -1
  65. package/{dist → dist-types}/handlers/subject/list.handler.d.ts +0 -1
  66. package/{dist → dist-types}/handlers/subject/patch.handler.d.ts +0 -1
  67. package/{dist → dist-types}/handlers/subject/post.handler.d.ts +12 -1
  68. package/{dist → dist-types}/handlers/utils/consent-enrichment.d.ts +0 -1
  69. package/{dist → dist-types}/init.d.ts +4 -7
  70. package/{dist → dist-types}/middleware/auth/index.d.ts +0 -1
  71. package/{dist → dist-types}/middleware/auth/validate-api-key.d.ts +0 -1
  72. package/{dist → dist-types}/middleware/cors/cors.d.ts +0 -1
  73. package/{src/middleware/cors/index.ts → dist-types/middleware/cors/index.d.ts} +0 -1
  74. package/{dist → dist-types}/middleware/cors/is-origin-trusted.d.ts +1 -2
  75. package/{dist → dist-types}/middleware/cors/process-cors.d.ts +0 -1
  76. package/{dist → dist-types}/middleware/openapi/config.d.ts +0 -1
  77. package/{dist → dist-types}/middleware/openapi/handlers.d.ts +0 -1
  78. package/{src/middleware/openapi/index.ts → dist-types/middleware/openapi/index.d.ts} +0 -1
  79. package/{dist → dist-types}/middleware/process-ip/index.d.ts +0 -1
  80. package/dist-types/policies/builder.d.ts +127 -0
  81. package/dist-types/policies/defaults.d.ts +2 -0
  82. package/dist-types/policies/matchers.d.ts +3 -0
  83. package/{dist → dist-types}/router.d.ts +0 -1
  84. package/{dist → dist-types}/routes/consent.d.ts +0 -1
  85. package/{src/routes/index.ts → dist-types/routes/index.d.ts} +0 -1
  86. package/{dist → dist-types}/routes/init.d.ts +0 -1
  87. package/{dist → dist-types}/routes/status.d.ts +0 -1
  88. package/{dist → dist-types}/routes/subject.d.ts +0 -1
  89. package/{dist → dist-types}/types/api.d.ts +0 -1
  90. package/dist-types/types/index.d.ts +443 -0
  91. package/dist-types/utils/background.d.ts +6 -0
  92. package/{dist → dist-types}/utils/create-telemetry-options.d.ts +1 -2
  93. package/{dist → dist-types}/utils/env.d.ts +0 -1
  94. package/{dist → dist-types}/utils/extract-error-message.d.ts +0 -1
  95. package/{dist → dist-types}/utils/instrumentation.d.ts +0 -1
  96. package/{dist → dist-types}/utils/logger.d.ts +1 -2
  97. package/{dist → dist-types}/utils/metrics.d.ts +0 -1
  98. package/dist-types/version.d.ts +1 -0
  99. package/docs/README.md +49 -0
  100. package/docs/api/configuration.md +197 -0
  101. package/docs/api/endpoints.md +211 -0
  102. package/docs/guides/caching.md +85 -0
  103. package/docs/guides/database-setup.md +128 -0
  104. package/docs/guides/edge-deployment.md +248 -0
  105. package/docs/guides/framework-integration.md +142 -0
  106. package/docs/guides/iab-tcf.md +89 -0
  107. package/docs/guides/observability.md +96 -0
  108. package/docs/guides/policy-packs.md +396 -0
  109. package/docs/quickstart.md +129 -0
  110. package/package.json +37 -23
  111. package/.turbo/turbo-build.log +0 -49
  112. package/CHANGELOG.md +0 -115
  113. package/dist/cache/adapters/cloudflare-kv.d.ts.map +0 -1
  114. package/dist/cache/adapters/index.d.ts.map +0 -1
  115. package/dist/cache/adapters/memory.d.ts.map +0 -1
  116. package/dist/cache/adapters/upstash-redis.d.ts.map +0 -1
  117. package/dist/cache/gvl-resolver.d.ts.map +0 -1
  118. package/dist/cache/index.d.ts.map +0 -1
  119. package/dist/cache/keys.d.ts.map +0 -1
  120. package/dist/cache/types.d.ts.map +0 -1
  121. package/dist/core.d.ts.map +0 -1
  122. package/dist/db/adapters/drizzle.d.ts +0 -2
  123. package/dist/db/adapters/drizzle.d.ts.map +0 -1
  124. package/dist/db/adapters/index.d.ts +0 -2
  125. package/dist/db/adapters/index.d.ts.map +0 -1
  126. package/dist/db/adapters/kysely.d.ts +0 -2
  127. package/dist/db/adapters/kysely.d.ts.map +0 -1
  128. package/dist/db/adapters/mongo.d.ts +0 -2
  129. package/dist/db/adapters/mongo.d.ts.map +0 -1
  130. package/dist/db/adapters/prisma.d.ts +0 -2
  131. package/dist/db/adapters/prisma.d.ts.map +0 -1
  132. package/dist/db/adapters/typeorm.d.ts +0 -2
  133. package/dist/db/adapters/typeorm.d.ts.map +0 -1
  134. package/dist/db/migrator/index.d.ts.map +0 -1
  135. package/dist/db/registry/consent-policy.d.ts.map +0 -1
  136. package/dist/db/registry/consent-purpose.d.ts.map +0 -1
  137. package/dist/db/registry/domain.d.ts.map +0 -1
  138. package/dist/db/registry/index.d.ts.map +0 -1
  139. package/dist/db/registry/subject.d.ts.map +0 -1
  140. package/dist/db/registry/types.d.ts.map +0 -1
  141. package/dist/db/registry/utils/generate-id.d.ts.map +0 -1
  142. package/dist/db/registry/utils.d.ts.map +0 -1
  143. package/dist/db/schema/1.0.0/audit-log.d.ts.map +0 -1
  144. package/dist/db/schema/1.0.0/consent-policy.d.ts.map +0 -1
  145. package/dist/db/schema/1.0.0/consent-purpose.d.ts.map +0 -1
  146. package/dist/db/schema/1.0.0/consent-record.d.ts.map +0 -1
  147. package/dist/db/schema/1.0.0/consent.d.ts.map +0 -1
  148. package/dist/db/schema/1.0.0/domain.d.ts.map +0 -1
  149. package/dist/db/schema/1.0.0/index.d.ts.map +0 -1
  150. package/dist/db/schema/1.0.0/subject.d.ts.map +0 -1
  151. package/dist/db/schema/2.0.0/audit-log.d.ts.map +0 -1
  152. package/dist/db/schema/2.0.0/consent-policy.d.ts.map +0 -1
  153. package/dist/db/schema/2.0.0/consent-purpose.d.ts.map +0 -1
  154. package/dist/db/schema/2.0.0/consent.d.ts.map +0 -1
  155. package/dist/db/schema/2.0.0/domain.d.ts.map +0 -1
  156. package/dist/db/schema/2.0.0/index.d.ts.map +0 -1
  157. package/dist/db/schema/2.0.0/subject.d.ts.map +0 -1
  158. package/dist/db/schema/index.d.ts.map +0 -1
  159. package/dist/db/tenant-scope.d.ts.map +0 -1
  160. package/dist/define-config.d.ts +0 -5
  161. package/dist/define-config.d.ts.map +0 -1
  162. package/dist/handlers/consent/check.handler.d.ts.map +0 -1
  163. package/dist/handlers/consent/index.d.ts +0 -12
  164. package/dist/handlers/consent/index.d.ts.map +0 -1
  165. package/dist/handlers/init/geo.d.ts.map +0 -1
  166. package/dist/handlers/init/index.d.ts.map +0 -1
  167. package/dist/handlers/init/translations.d.ts +0 -28
  168. package/dist/handlers/init/translations.d.ts.map +0 -1
  169. package/dist/handlers/status/index.d.ts +0 -7
  170. package/dist/handlers/status/index.d.ts.map +0 -1
  171. package/dist/handlers/status/status.handler.d.ts.map +0 -1
  172. package/dist/handlers/subject/get.handler.d.ts.map +0 -1
  173. package/dist/handlers/subject/index.d.ts +0 -10
  174. package/dist/handlers/subject/index.d.ts.map +0 -1
  175. package/dist/handlers/subject/list.handler.d.ts.map +0 -1
  176. package/dist/handlers/subject/patch.handler.d.ts.map +0 -1
  177. package/dist/handlers/subject/post.handler.d.ts.map +0 -1
  178. package/dist/handlers/utils/consent-enrichment.d.ts.map +0 -1
  179. package/dist/init.d.ts.map +0 -1
  180. package/dist/middleware/auth/index.d.ts.map +0 -1
  181. package/dist/middleware/auth/validate-api-key.d.ts.map +0 -1
  182. package/dist/middleware/cors/cors.d.ts.map +0 -1
  183. package/dist/middleware/cors/index.d.ts +0 -30
  184. package/dist/middleware/cors/index.d.ts.map +0 -1
  185. package/dist/middleware/cors/is-origin-trusted.d.ts.map +0 -1
  186. package/dist/middleware/cors/process-cors.d.ts.map +0 -1
  187. package/dist/middleware/openapi/config.d.ts.map +0 -1
  188. package/dist/middleware/openapi/handlers.d.ts.map +0 -1
  189. package/dist/middleware/openapi/index.d.ts +0 -12
  190. package/dist/middleware/openapi/index.d.ts.map +0 -1
  191. package/dist/middleware/process-ip/index.d.ts.map +0 -1
  192. package/dist/router.d.ts.map +0 -1
  193. package/dist/routes/consent.d.ts.map +0 -1
  194. package/dist/routes/index.d.ts +0 -10
  195. package/dist/routes/index.d.ts.map +0 -1
  196. package/dist/routes/init.d.ts.map +0 -1
  197. package/dist/routes/status.d.ts.map +0 -1
  198. package/dist/routes/subject.d.ts.map +0 -1
  199. package/dist/types/api.d.ts.map +0 -1
  200. package/dist/types/index.d.ts +0 -263
  201. package/dist/types/index.d.ts.map +0 -1
  202. package/dist/utils/create-telemetry-options.d.ts.map +0 -1
  203. package/dist/utils/env.d.ts.map +0 -1
  204. package/dist/utils/extract-error-message.d.ts.map +0 -1
  205. package/dist/utils/index.d.ts +0 -4
  206. package/dist/utils/index.d.ts.map +0 -1
  207. package/dist/utils/instrumentation.d.ts.map +0 -1
  208. package/dist/utils/logger.d.ts.map +0 -1
  209. package/dist/utils/metrics.d.ts.map +0 -1
  210. package/dist/version.d.ts +0 -2
  211. package/dist/version.d.ts.map +0 -1
  212. package/knip.json +0 -31
  213. package/rslib.config.ts +0 -93
  214. package/src/cache/adapters/cloudflare-kv.ts +0 -71
  215. package/src/cache/adapters/index.ts +0 -22
  216. package/src/cache/adapters/memory.ts +0 -111
  217. package/src/cache/adapters/upstash-redis.ts +0 -113
  218. package/src/cache/gvl-resolver.ts +0 -289
  219. package/src/cache/index.ts +0 -34
  220. package/src/cache/keys.ts +0 -68
  221. package/src/cache/types.ts +0 -66
  222. package/src/core.ts +0 -369
  223. package/src/db/migrator/index.ts +0 -80
  224. package/src/db/registry/consent-policy.test.ts +0 -451
  225. package/src/db/registry/consent-policy.ts +0 -82
  226. package/src/db/registry/consent-purpose.test.ts +0 -428
  227. package/src/db/registry/consent-purpose.ts +0 -61
  228. package/src/db/registry/domain.test.ts +0 -445
  229. package/src/db/registry/domain.ts +0 -91
  230. package/src/db/registry/index.ts +0 -14
  231. package/src/db/registry/subject.test.ts +0 -371
  232. package/src/db/registry/subject.ts +0 -126
  233. package/src/db/registry/types.ts +0 -10
  234. package/src/db/registry/utils/generate-id.test.ts +0 -216
  235. package/src/db/registry/utils/generate-id.ts +0 -133
  236. package/src/db/registry/utils.ts +0 -133
  237. package/src/db/schema/1.0.0/audit-log.ts +0 -15
  238. package/src/db/schema/1.0.0/consent-policy.ts +0 -14
  239. package/src/db/schema/1.0.0/consent-purpose.ts +0 -14
  240. package/src/db/schema/1.0.0/consent-record.ts +0 -10
  241. package/src/db/schema/1.0.0/consent.ts +0 -20
  242. package/src/db/schema/1.0.0/domain.ts +0 -12
  243. package/src/db/schema/1.0.0/index.ts +0 -48
  244. package/src/db/schema/1.0.0/subject.ts +0 -11
  245. package/src/db/schema/2.0.0/audit-log.ts +0 -18
  246. package/src/db/schema/2.0.0/consent-policy.ts +0 -28
  247. package/src/db/schema/2.0.0/consent-purpose.ts +0 -12
  248. package/src/db/schema/2.0.0/consent.ts +0 -28
  249. package/src/db/schema/2.0.0/domain.ts +0 -12
  250. package/src/db/schema/2.0.0/index.ts +0 -47
  251. package/src/db/schema/2.0.0/subject.ts +0 -13
  252. package/src/db/schema/index.ts +0 -15
  253. package/src/db/tenant-scope.test.ts +0 -747
  254. package/src/db/tenant-scope.ts +0 -103
  255. package/src/define-config.ts +0 -5
  256. package/src/handlers/consent/check.handler.ts +0 -126
  257. package/src/handlers/init/geo.test.ts +0 -317
  258. package/src/handlers/init/geo.ts +0 -195
  259. package/src/handlers/init/index.test.ts +0 -205
  260. package/src/handlers/init/index.ts +0 -114
  261. package/src/handlers/init/translations.test.ts +0 -121
  262. package/src/handlers/init/translations.ts +0 -72
  263. package/src/handlers/status/status.handler.test.ts +0 -155
  264. package/src/handlers/status/status.handler.ts +0 -51
  265. package/src/handlers/subject/get.handler.ts +0 -92
  266. package/src/handlers/subject/list.handler.ts +0 -92
  267. package/src/handlers/subject/patch.handler.ts +0 -119
  268. package/src/handlers/subject/post.handler.test.ts +0 -294
  269. package/src/handlers/subject/post.handler.ts +0 -268
  270. package/src/handlers/utils/consent-enrichment.test.ts +0 -380
  271. package/src/handlers/utils/consent-enrichment.ts +0 -218
  272. package/src/init.test.ts +0 -126
  273. package/src/init.ts +0 -87
  274. package/src/middleware/auth/index.ts +0 -11
  275. package/src/middleware/auth/validate-api-key.test.ts +0 -86
  276. package/src/middleware/auth/validate-api-key.ts +0 -107
  277. package/src/middleware/cors/cors.test.ts +0 -135
  278. package/src/middleware/cors/cors.ts +0 -186
  279. package/src/middleware/cors/is-origin-trusted.test.ts +0 -164
  280. package/src/middleware/cors/is-origin-trusted.ts +0 -130
  281. package/src/middleware/cors/process-cors.ts +0 -91
  282. package/src/middleware/openapi/config.ts +0 -29
  283. package/src/middleware/openapi/handlers.ts +0 -34
  284. package/src/middleware/process-ip/index.test.ts +0 -195
  285. package/src/middleware/process-ip/index.ts +0 -199
  286. package/src/router.ts +0 -15
  287. package/src/routes/consent.ts +0 -52
  288. package/src/routes/init.ts +0 -105
  289. package/src/routes/status.ts +0 -46
  290. package/src/routes/subject.ts +0 -152
  291. package/src/types/api.ts +0 -48
  292. package/src/types/index.ts +0 -297
  293. package/src/utils/create-telemetry-options.test.ts +0 -302
  294. package/src/utils/create-telemetry-options.ts +0 -229
  295. package/src/utils/env.ts +0 -84
  296. package/src/utils/extract-error-message.ts +0 -21
  297. package/src/utils/instrumentation.test.ts +0 -185
  298. package/src/utils/instrumentation.ts +0 -196
  299. package/src/utils/logger.ts +0 -41
  300. package/src/utils/metrics.test.ts +0 -323
  301. package/src/utils/metrics.ts +0 -402
  302. package/src/utils/telemetry-pii.test.ts +0 -325
  303. package/src/version.ts +0 -2
  304. package/tsconfig.json +0 -11
  305. package/vitest.config.ts +0 -28
  306. /package/dist/{types.cjs → types/index.cjs} +0 -0
  307. /package/dist/{types.js → types/index.js} +0 -0
  308. /package/{src/db/adapters/drizzle.ts → dist-types/db/adapters/drizzle.d.ts} +0 -0
  309. /package/{src/db/adapters/index.ts → dist-types/db/adapters/index.d.ts} +0 -0
  310. /package/{src/db/adapters/kysely.ts → dist-types/db/adapters/kysely.d.ts} +0 -0
  311. /package/{src/db/adapters/mongo.ts → dist-types/db/adapters/mongo.d.ts} +0 -0
  312. /package/{src/db/adapters/prisma.ts → dist-types/db/adapters/prisma.d.ts} +0 -0
  313. /package/{src/db/adapters/typeorm.ts → dist-types/db/adapters/typeorm.d.ts} +0 -0
  314. /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 { c15tEdgeInit } from './init-handler';
3
+ export type { C15TConsentResolverOptions, CategoryConsent, ResolvedConsent, } from './resolve-consent';
4
+ export { resolveConsent } from './resolve-consent';
5
+ export type { C15TEdgeOptions } from './types';
@@ -0,0 +1,38 @@
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
+ * @example
18
+ * ```ts
19
+ * // middleware.ts (Vercel Edge)
20
+ * import { c15tEdgeInit } from '@c15t/backend/edge';
21
+ *
22
+ * const initHandler = c15tEdgeInit({
23
+ * trustedOrigins: ['https://myapp.com'],
24
+ * policyPacks: [
25
+ * { id: 'eu', match: { countries: ['DE', 'FR'] }, consent: { model: 'opt-in' }, ui: { mode: 'banner' } },
26
+ * ],
27
+ * policySnapshot: { signingKey: process.env.SNAPSHOT_KEY! },
28
+ * });
29
+ *
30
+ * export async function middleware(request: Request) {
31
+ * const url = new URL(request.url);
32
+ * if (url.pathname === '/api/consent/init') {
33
+ * return initHandler(request);
34
+ * }
35
+ * }
36
+ * ```
37
+ */
38
+ export declare function 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 '../../../logger/dist-types/index.d.ts';
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 `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 may change in future versions.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * import { resolveConsent } from '@c15t/backend/edge';
63
+ *
64
+ * export function middleware(request: Request) {
65
+ * const consent = 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 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' | '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;
@@ -1,5 +1,5 @@
1
- import type { GlobalVendorList, NonIABVendor } from '@c15t/schema/types';
2
- import type { Translations } from '@c15t/translations';
1
+ import type { GlobalVendorList, NonIABVendor } from '../../../../schema/dist-types/types.d';
2
+ import type { Translations } from '../../../../translations/dist-types/index.d.ts';
3
3
  import type { Branding } from '../../types';
4
4
  import type { JurisdictionCode } from '../../types/api';
5
5
  /**
@@ -38,7 +38,7 @@ export declare function buildResponse({ jurisdiction, location, acceptLanguage,
38
38
  regionCode: string | null;
39
39
  };
40
40
  translations: {
41
- translations: import("@c15t/translations").CompleteTranslations;
41
+ translations: import("../../../../translations/dist-types/index.d.ts").CompleteTranslations;
42
42
  language: string;
43
43
  };
44
44
  branding: "c15t" | "consent" | "none";
@@ -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 '../../../../schema/dist-types/types.d';
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 '../../../../logger/dist-types/index.d.ts';
7
+ import type { ResolvedPolicy } from '../../../../schema/dist-types/types.d';
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 '../../../../translations/dist-types/index.d.ts';
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,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
+ primaryAction?: PolicyUiSurfaceConfig['primaryAction'];
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
@@ -28,4 +28,3 @@ export declare const getSubjectHandler: (c: Context) => Promise<Response & impor
28
28
  }[];
29
29
  isValid: boolean;
30
30
  }, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
31
- //# 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';
@@ -27,4 +27,3 @@ export declare const listSubjectsHandler: (c: Context) => Promise<Response & imp
27
27
  }[];
28
28
  }[];
29
29
  }, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
30
- //# sourceMappingURL=list.handler.d.ts.map
@@ -18,4 +18,3 @@ export declare const patchSubjectHandler: (c: Context) => Promise<Response & imp
18
18
  externalId: string;
19
19
  };
20
20
  }, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
21
- //# 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
@@ -49,4 +49,3 @@ export declare function resolveConsentPolicies(consents: Array<{
49
49
  policyId: string | null;
50
50
  }>, ctx: EnrichmentContext): Promise<ConsentPolicyInfo[]>;
51
51
  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';
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
- import type { Logger } from '@c15t/logger';
6
+ import type { Logger } from '../../../../logger/dist-types/index.d.ts';
7
7
  /**
8
8
  * Regular expression to strip protocol, trailing slashes, and port numbers from URLs
9
9
  * Matches:
@@ -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
@@ -28,4 +28,3 @@ import type { C15TContext } from '../../types';
28
28
  * @see {@link isOriginTrusted} for origin validation details
29
29
  */
30
30
  export declare const processCors: (request: Request, context: C15TContext, trustedOrigins?: string[]) => C15TContext;
31
- //# sourceMappingURL=process-cors.d.ts.map
@@ -39,4 +39,3 @@ export declare const createDefaultOpenAPIOptions: (options: C15TOptions) => {
39
39
  bearerAuth: never[];
40
40
  }[];
41
41
  };
42
- //# sourceMappingURL=config.d.ts.map
@@ -3,4 +3,3 @@ import type { C15TOptions } from '../../types';
3
3
  * Generate the default UI for API documentation
4
4
  */
5
5
  export declare const createDocsUI: (options: C15TOptions) => string;
6
- //# sourceMappingURL=handlers.d.ts.map
@@ -7,6 +7,5 @@
7
7
  *
8
8
  * Note: OpenAPI spec generation is now handled by hono-openapi middleware.
9
9
  */
10
-
11
10
  export { createDefaultOpenAPIOptions, createOpenAPIConfig } from './config';
12
11
  export { createDocsUI } from './handlers';
@@ -9,4 +9,3 @@ import type { C15TOptions } from '../../types';
9
9
  */
10
10
  export declare function maskIpAddress(ip: string | null): string | null;
11
11
  export declare function getIpAddress(req: Request | Headers, options: C15TOptions): string | null;
12
- //# sourceMappingURL=index.d.ts.map