@miguelmorales13/nestkit 0.26.0 → 0.28.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 (278) hide show
  1. package/dist/alerts/alert-on-failure.decorator.d.ts +5 -0
  2. package/dist/alerts/alert-sinks.d.ts +29 -0
  3. package/dist/alerts/alerts.module.d.ts +19 -0
  4. package/dist/alerts/alerts.options.d.ts +1 -0
  5. package/dist/alerts/alerts.service.d.ts +28 -0
  6. package/dist/alerts/alerts.types.d.ts +66 -0
  7. package/dist/alerts/index.cjs +276 -0
  8. package/dist/alerts/index.d.ts +10 -0
  9. package/dist/alerts/index.js +276 -0
  10. package/dist/alerts/logger-with-alerts.d.ts +18 -0
  11. package/dist/alerts/process-guards.d.ts +21 -0
  12. package/dist/alerts/runtime.d.ts +4 -0
  13. package/dist/audit/index.cjs +13 -13
  14. package/dist/audit/index.js +2 -2
  15. package/dist/auth/index.cjs +21 -21
  16. package/dist/auth/index.js +3 -3
  17. package/dist/auth/oauth/index.cjs +101 -101
  18. package/dist/auth/oauth/index.js +3 -3
  19. package/dist/bootstrap/apply-defaults.d.ts +9 -0
  20. package/dist/bootstrap/index.cjs +7 -6
  21. package/dist/bootstrap/index.js +6 -5
  22. package/dist/chunk-3TUMVLPJ.js +14 -0
  23. package/dist/{chunk-PA24P76K.js → chunk-45SW7FBE.js} +1 -1
  24. package/dist/{chunk-RF75KC63.cjs → chunk-47IYXZHW.cjs} +2 -2
  25. package/dist/{chunk-TUNDBBQF.js → chunk-4WWOKZIO.js} +4 -4
  26. package/dist/{chunk-2DUEQKOI.js → chunk-5LVGCTJ3.js} +4 -4
  27. package/dist/chunk-A6YGIZCQ.cjs +14 -0
  28. package/dist/chunk-A7FI6HXV.js +40 -0
  29. package/dist/chunk-CU4FUIVJ.cjs +8 -0
  30. package/dist/{chunk-FH5UNWWW.cjs → chunk-D35TBVRO.cjs} +4 -4
  31. package/dist/{chunk-4MGIQFAJ.js → chunk-D3DDJWUD.js} +5 -0
  32. package/dist/chunk-DVGPEBUL.js +8 -0
  33. package/dist/{chunk-VKOPDDCC.js → chunk-ENZ7LQRE.js} +1 -1
  34. package/dist/{chunk-3AUOOEQO.cjs → chunk-F77X4QUN.cjs} +2 -2
  35. package/dist/chunk-FBNV5X6C.js +61 -0
  36. package/dist/{chunk-APUFKA4K.cjs → chunk-FDZQCLLK.cjs} +6 -6
  37. package/dist/{chunk-DYHSOULW.js → chunk-IGSNB5BX.js} +1 -1
  38. package/dist/chunk-IVWPA6QH.cjs +90 -0
  39. package/dist/{chunk-LSDY6ETG.cjs → chunk-JJKGQNGD.cjs} +5 -5
  40. package/dist/{chunk-ALIKVFOV.cjs → chunk-JRFE7NSO.cjs} +12 -4
  41. package/dist/{chunk-HVHYZXBB.cjs → chunk-KNU5RN3O.cjs} +3 -3
  42. package/dist/{chunk-52IOOHNX.cjs → chunk-KQPJCVN3.cjs} +26 -26
  43. package/dist/chunk-LGFHLAY3.cjs +61 -0
  44. package/dist/{chunk-2REOCMUD.cjs → chunk-LRX7AMSS.cjs} +6 -1
  45. package/dist/{chunk-4PFAKLT3.js → chunk-MUWHGBIB.js} +1 -1
  46. package/dist/{chunk-ZJMLEP5H.js → chunk-NJYLQDB3.js} +1 -1
  47. package/dist/{chunk-IFNYRZP2.js → chunk-OSRH6KYZ.js} +4 -4
  48. package/dist/{chunk-6RAPVLJM.js → chunk-OTE77ONL.js} +1 -1
  49. package/dist/chunk-UDACUMLO.cjs +40 -0
  50. package/dist/{chunk-PFHHLB7B.js → chunk-UGAAJRPO.js} +10 -2
  51. package/dist/{chunk-SPTDXUED.cjs → chunk-URLDTS2Q.cjs} +2 -2
  52. package/dist/{chunk-W2T2VFLC.cjs → chunk-VALDHJOO.cjs} +5 -5
  53. package/dist/chunk-WFCQDOSN.js +90 -0
  54. package/dist/consent/consent.interceptor.d.ts +20 -0
  55. package/dist/consent/consent.module.d.ts +25 -0
  56. package/dist/consent/consent.options.d.ts +30 -0
  57. package/dist/consent/consent.port.d.ts +17 -0
  58. package/dist/consent/consent.service.d.ts +44 -0
  59. package/dist/consent/guard/index.cjs +13 -0
  60. package/dist/consent/guard/index.d.ts +31 -0
  61. package/dist/consent/guard/index.js +13 -0
  62. package/dist/consent/index.cjs +271 -0
  63. package/dist/consent/index.d.ts +13 -0
  64. package/dist/consent/index.js +271 -0
  65. package/dist/consent/memory.store.d.ts +7 -0
  66. package/dist/consent/shared/index.cjs +11 -0
  67. package/dist/consent/shared/index.d.ts +19 -0
  68. package/dist/consent/shared/index.js +11 -0
  69. package/dist/consent/typeorm.store.d.ts +22 -0
  70. package/dist/crud/index.cjs +4 -4
  71. package/dist/crud/index.js +3 -3
  72. package/dist/database/postgres/index.cjs +3 -3
  73. package/dist/database/postgres/index.js +2 -2
  74. package/dist/database/supabase/index.cjs +3 -3
  75. package/dist/database/supabase/index.js +2 -2
  76. package/dist/database/typeorm/index.cjs +2 -2
  77. package/dist/database/typeorm/index.js +1 -1
  78. package/dist/devices/device-check.interceptor.d.ts +20 -0
  79. package/dist/devices/devices.module.d.ts +28 -0
  80. package/dist/devices/devices.options.d.ts +53 -0
  81. package/dist/devices/devices.port.d.ts +62 -0
  82. package/dist/devices/devices.service.d.ts +58 -0
  83. package/dist/devices/index.cjs +327 -0
  84. package/dist/devices/index.d.ts +8 -0
  85. package/dist/devices/index.js +327 -0
  86. package/dist/devices/memory.store.d.ts +12 -0
  87. package/dist/email/index.cjs +2 -2
  88. package/dist/email/index.js +1 -1
  89. package/dist/email/nodemailer/index.cjs +2 -2
  90. package/dist/email/nodemailer/index.js +1 -1
  91. package/dist/email/resend/index.cjs +2 -2
  92. package/dist/email/resend/index.js +1 -1
  93. package/dist/entities/index.cjs +1 -1
  94. package/dist/entities/index.js +1 -1
  95. package/dist/errors/index.cjs +7 -7
  96. package/dist/errors/index.js +7 -7
  97. package/dist/events/buses.d.ts +27 -0
  98. package/dist/events/events.controller.d.ts +15 -0
  99. package/dist/events/events.module.d.ts +29 -0
  100. package/dist/events/events.options.d.ts +50 -0
  101. package/dist/events/events.service.d.ts +49 -0
  102. package/dist/events/events.types.d.ts +77 -0
  103. package/dist/events/index.cjs +557 -0
  104. package/dist/events/index.d.ts +10 -0
  105. package/dist/events/index.js +557 -0
  106. package/dist/events/memory-ticket.store.d.ts +9 -0
  107. package/dist/google-business/google-business-http.d.ts +41 -0
  108. package/dist/google-business/google-business.errors.d.ts +75 -0
  109. package/dist/google-business/google-business.mappers.d.ts +52 -0
  110. package/dist/google-business/google-business.module.d.ts +26 -0
  111. package/dist/google-business/google-business.options.d.ts +40 -0
  112. package/dist/google-business/google-business.ports.d.ts +18 -0
  113. package/dist/google-business/google-business.service.d.ts +120 -0
  114. package/dist/google-business/google-business.types.d.ts +155 -0
  115. package/dist/google-business/index.cjs +1025 -0
  116. package/dist/google-business/index.d.ts +15 -0
  117. package/dist/google-business/index.js +1025 -0
  118. package/dist/google-business/testing/google-simulator.d.ts +61 -0
  119. package/dist/hardening/body-limits.d.ts +24 -0
  120. package/dist/hardening/http.types.d.ts +26 -0
  121. package/dist/hardening/index.cjs +179 -0
  122. package/dist/hardening/index.d.ts +19 -0
  123. package/dist/hardening/index.js +179 -0
  124. package/dist/hardening/memory-rate-limit.store.d.ts +10 -0
  125. package/dist/hardening/origin-secret.d.ts +29 -0
  126. package/dist/hardening/rate-limit.decorator.d.ts +8 -0
  127. package/dist/hardening/rate-limit.guard.d.ts +18 -0
  128. package/dist/hardening/rate-limit.module.d.ts +23 -0
  129. package/dist/hardening/rate-limit.options.d.ts +35 -0
  130. package/dist/hardening/rate-limit.port.d.ts +11 -0
  131. package/dist/hardening/redis-rate-limit.store.d.ts +23 -0
  132. package/dist/hardening/trust-proxy.d.ts +22 -0
  133. package/dist/health/health.controller.d.ts +32 -0
  134. package/dist/health/health.module.d.ts +15 -0
  135. package/dist/health/health.options.d.ts +24 -0
  136. package/dist/health/index.cjs +103 -0
  137. package/dist/health/index.d.ts +5 -0
  138. package/dist/health/index.js +103 -0
  139. package/dist/i18n/index.cjs +3 -3
  140. package/dist/i18n/index.js +2 -2
  141. package/dist/idempotency/idempotency.interceptor.d.ts +1 -0
  142. package/dist/idempotency/idempotency.options.d.ts +15 -0
  143. package/dist/idempotency/index.cjs +214 -7
  144. package/dist/idempotency/index.d.ts +5 -0
  145. package/dist/idempotency/index.js +210 -3
  146. package/dist/idempotency/no-idempotency.decorator.d.ts +8 -0
  147. package/dist/idempotency/postgres.store.d.ts +49 -0
  148. package/dist/idempotency/redis.store.d.ts +59 -0
  149. package/dist/index.cjs +19 -18
  150. package/dist/index.js +32 -31
  151. package/dist/invoicing/index.cjs +2 -2
  152. package/dist/invoicing/index.js +1 -1
  153. package/dist/jobs/defer-job.d.ts +10 -0
  154. package/dist/jobs/index.cjs +318 -0
  155. package/dist/jobs/index.d.ts +8 -0
  156. package/dist/jobs/index.js +318 -0
  157. package/dist/jobs/jobs-admin.controller.d.ts +18 -0
  158. package/dist/jobs/jobs.module.d.ts +33 -0
  159. package/dist/jobs/jobs.options.d.ts +62 -0
  160. package/dist/jobs/jobs.service.d.ts +53 -0
  161. package/dist/jobs/jobs.sql.d.ts +11 -0
  162. package/dist/media/index.cjs +14 -14
  163. package/dist/media/index.js +1 -1
  164. package/dist/meta/index.cjs +3 -3
  165. package/dist/meta/index.js +1 -1
  166. package/dist/notifications/index.cjs +375 -0
  167. package/dist/notifications/index.d.ts +8 -0
  168. package/dist/notifications/index.js +375 -0
  169. package/dist/notifications/memory.stores.d.ts +23 -0
  170. package/dist/notifications/notifications.controller.d.ts +11 -0
  171. package/dist/notifications/notifications.module.d.ts +31 -0
  172. package/dist/notifications/notifications.options.d.ts +33 -0
  173. package/dist/notifications/notifications.port.d.ts +97 -0
  174. package/dist/notifications/notifier.service.d.ts +31 -0
  175. package/dist/payments/index.cjs +7 -7
  176. package/dist/payments/index.js +1 -1
  177. package/dist/pinterest/index.cjs +3 -3
  178. package/dist/pinterest/index.js +1 -1
  179. package/dist/privacy/anonymizer.d.ts +14 -0
  180. package/dist/privacy/index.cjs +768 -0
  181. package/dist/privacy/index.d.ts +13 -0
  182. package/dist/privacy/index.js +768 -0
  183. package/dist/privacy/memory.store.d.ts +15 -0
  184. package/dist/privacy/privacy.module.d.ts +30 -0
  185. package/dist/privacy/privacy.options.d.ts +43 -0
  186. package/dist/privacy/privacy.port.d.ts +25 -0
  187. package/dist/privacy/privacy.service.d.ts +69 -0
  188. package/dist/privacy/privacy.types.d.ts +125 -0
  189. package/dist/privacy/sql.d.ts +7 -0
  190. package/dist/privacy/sql.store.d.ts +21 -0
  191. package/dist/privacy/zip.d.ts +23 -0
  192. package/dist/push/index.cjs +13 -13
  193. package/dist/push/index.js +5 -5
  194. package/dist/resilience/alert-channels.d.ts +39 -0
  195. package/dist/resilience/alert-errors.interceptor.d.ts +10 -0
  196. package/dist/resilience/alert-on-failure.decorator.d.ts +10 -0
  197. package/dist/resilience/alert.service.d.ts +77 -0
  198. package/dist/resilience/index.cjs +863 -0
  199. package/dist/resilience/index.d.ts +18 -0
  200. package/dist/resilience/index.js +863 -0
  201. package/dist/resilience/memory-alert-store.d.ts +26 -0
  202. package/dist/resilience/provider-health.controller.d.ts +14 -0
  203. package/dist/resilience/provider-unavailable.exception.d.ts +11 -0
  204. package/dist/resilience/resilience.module.d.ts +34 -0
  205. package/dist/resilience/resilience.options.d.ts +28 -0
  206. package/dist/resilience/resilience.types.d.ts +167 -0
  207. package/dist/resilience/resilient-fetch.d.ts +38 -0
  208. package/dist/resilience/runtime.d.ts +24 -0
  209. package/dist/resilience/typeorm/alert.entity.d.ts +21 -0
  210. package/dist/resilience/typeorm/index.cjs +102 -0
  211. package/dist/resilience/typeorm/index.d.ts +3 -0
  212. package/dist/resilience/typeorm/index.js +102 -0
  213. package/dist/resilience/typeorm/typeorm-alert-store.d.ts +39 -0
  214. package/dist/resilience/validate-destination.d.ts +63 -0
  215. package/dist/response/index.cjs +3 -3
  216. package/dist/response/index.js +2 -2
  217. package/dist/scheduling/cron-lock.service.d.ts +36 -0
  218. package/dist/scheduling/cron-unico.decorator.d.ts +27 -0
  219. package/dist/scheduling/fallback.store.d.ts +34 -0
  220. package/dist/scheduling/index.cjs +392 -0
  221. package/dist/scheduling/index.d.ts +18 -0
  222. package/dist/scheduling/index.js +392 -0
  223. package/dist/scheduling/lock-store.port.d.ts +19 -0
  224. package/dist/scheduling/memory.store.d.ts +15 -0
  225. package/dist/scheduling/redis.module.d.ts +31 -0
  226. package/dist/scheduling/redis.store.d.ts +24 -0
  227. package/dist/scheduling/scheduling.module.d.ts +24 -0
  228. package/dist/scheduling/scheduling.options.d.ts +27 -0
  229. package/dist/scheduling/sql.store.d.ts +26 -0
  230. package/dist/secrets/index.cjs +274 -0
  231. package/dist/secrets/index.d.ts +8 -0
  232. package/dist/secrets/index.js +274 -0
  233. package/dist/secrets/secrets.errors.d.ts +6 -0
  234. package/dist/secrets/secrets.module.d.ts +21 -0
  235. package/dist/secrets/secrets.options.d.ts +32 -0
  236. package/dist/secrets/secrets.service.d.ts +54 -0
  237. package/dist/secrets/secrets.transformer.d.ts +33 -0
  238. package/dist/security/hash.d.ts +8 -0
  239. package/dist/security/index.cjs +119 -2
  240. package/dist/security/index.d.ts +5 -0
  241. package/dist/security/index.js +119 -2
  242. package/dist/security/mask.d.ts +22 -0
  243. package/dist/security/signed-grant.d.ts +30 -0
  244. package/dist/storage/index.cjs +2 -2
  245. package/dist/storage/index.js +1 -1
  246. package/dist/stripe/index.cjs +7 -7
  247. package/dist/stripe/index.js +1 -1
  248. package/dist/telegram/index.cjs +2 -2
  249. package/dist/telegram/index.js +1 -1
  250. package/dist/tenancy/app-role.d.ts +24 -0
  251. package/dist/tenancy/db-helpers.d.ts +12 -0
  252. package/dist/tenancy/index.cjs +205 -0
  253. package/dist/tenancy/index.d.ts +14 -0
  254. package/dist/tenancy/index.js +205 -0
  255. package/dist/tenancy/pg/index.cjs +34 -0
  256. package/dist/tenancy/pg/index.d.ts +2 -0
  257. package/dist/tenancy/pg/index.js +34 -0
  258. package/dist/tenancy/pg/with-tenant.d.ts +23 -0
  259. package/dist/tenancy/request-context.d.ts +18 -0
  260. package/dist/tenancy/rls-guardrail.d.ts +38 -0
  261. package/dist/tenancy/scope.d.ts +5 -0
  262. package/dist/tenancy/tenancy.errors.d.ts +5 -0
  263. package/dist/tenancy/tenancy.middleware.d.ts +8 -0
  264. package/dist/tenancy/tenancy.module.d.ts +37 -0
  265. package/dist/tenancy/tenancy.options.d.ts +34 -0
  266. package/dist/tenancy/typeorm/index.cjs +41 -0
  267. package/dist/tenancy/typeorm/index.d.ts +2 -0
  268. package/dist/tenancy/typeorm/index.js +41 -0
  269. package/dist/tenancy/typeorm/with-tenant.d.ts +23 -0
  270. package/dist/tiktok/index.cjs +3 -3
  271. package/dist/tiktok/index.js +1 -1
  272. package/dist/tracking/index.cjs +3 -3
  273. package/dist/tracking/index.js +2 -2
  274. package/dist/umami/index.cjs +4 -4
  275. package/dist/umami/index.js +1 -1
  276. package/dist/whatsapp/index.cjs +2 -2
  277. package/dist/whatsapp/index.js +1 -1
  278. package/package.json +107 -2
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk2REOCMUDcjs = require('./chunk-2REOCMUD.cjs');
3
+ var _chunkLRX7AMSScjs = require('./chunk-LRX7AMSS.cjs');
4
4
 
5
5
  // src/database/supabase/supabase.module.ts
6
6
  var _common = require('@nestjs/common');
@@ -16,7 +16,7 @@ function requireEnv(name) {
16
16
  }
17
17
  var SupabaseModule = class {
18
18
  };
19
- SupabaseModule = exports.SupabaseModule = _chunk2REOCMUDcjs.__decorateClass.call(void 0, [
19
+ SupabaseModule = exports.SupabaseModule = _chunkLRX7AMSScjs.__decorateClass.call(void 0, [
20
20
  _common.Module.call(void 0, {
21
21
  providers: [
22
22
  {
@@ -4,7 +4,7 @@ var _chunkSDWHKPXIcjs = require('./chunk-SDWHKPXI.cjs');
4
4
 
5
5
 
6
6
 
7
- var _chunk2REOCMUDcjs = require('./chunk-2REOCMUD.cjs');
7
+ var _chunkLRX7AMSScjs = require('./chunk-LRX7AMSS.cjs');
8
8
 
9
9
  // src/audit/audit.port.ts
10
10
  var AUDIT_SINK = /* @__PURE__ */ Symbol("AUDIT_SINK");
@@ -42,11 +42,11 @@ var AuditService = class {
42
42
  }
43
43
  }
44
44
  };
45
- AuditService = exports.AuditService = _chunk2REOCMUDcjs.__decorateClass.call(void 0, [
45
+ AuditService = exports.AuditService = _chunkLRX7AMSScjs.__decorateClass.call(void 0, [
46
46
  _common.Injectable.call(void 0, ),
47
- _chunk2REOCMUDcjs.__decorateParam.call(void 0, 0, _common.Inject.call(void 0, AUDIT_SINK)),
48
- _chunk2REOCMUDcjs.__decorateParam.call(void 0, 1, _common.Optional.call(void 0, )),
49
- _chunk2REOCMUDcjs.__decorateParam.call(void 0, 1, _common.Inject.call(void 0, AUDIT_OPTIONS))
47
+ _chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Inject.call(void 0, AUDIT_SINK)),
48
+ _chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Optional.call(void 0, )),
49
+ _chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Inject.call(void 0, AUDIT_OPTIONS))
50
50
  ], AuditService);
51
51
 
52
52
 
@@ -0,0 +1,90 @@
1
+ // src/hardening/http.types.ts
2
+ function pathOf(req) {
3
+ const raw = req.path ?? req.originalUrl ?? req.url ?? "";
4
+ const q = raw.indexOf("?");
5
+ return q === -1 ? raw : raw.slice(0, q);
6
+ }
7
+ function headerOf(req, name) {
8
+ const v = req.headers?.[name.toLowerCase()];
9
+ return Array.isArray(v) ? v[0] : v;
10
+ }
11
+ function matchesPath(rule, path) {
12
+ if (rule instanceof RegExp) return rule.test(path);
13
+ if (rule.endsWith("*")) return path.startsWith(rule.slice(0, -1));
14
+ return path === rule;
15
+ }
16
+
17
+ // src/hardening/body-limits.ts
18
+ import { createRequire } from "module";
19
+ import { join } from "path";
20
+ var DEFAULT_BODY_LIMIT = "1mb";
21
+ var expressJson = (limit) => {
22
+ const req = createRequire(join(process.cwd(), "noop.js"));
23
+ return req("express").json({ limit });
24
+ };
25
+ function applyBodyLimits(app, options, factory = expressJson) {
26
+ const routes = options.routes ?? [];
27
+ if (routes.length) {
28
+ const parsers = /* @__PURE__ */ new Map();
29
+ const parserFor = (limit) => {
30
+ let p = parsers.get(limit);
31
+ if (!p) parsers.set(limit, p = factory(limit));
32
+ return p;
33
+ };
34
+ app.use((req, res, next) => {
35
+ const path = pathOf(req);
36
+ const rule = routes.find((r) => matchesPath(r.match, path));
37
+ return rule ? parserFor(rule.limit)(req, res, next) : next();
38
+ });
39
+ }
40
+ app.useBodyParser?.("json", { limit: options.default ?? DEFAULT_BODY_LIMIT });
41
+ }
42
+
43
+ // src/hardening/origin-secret.ts
44
+ import { createHash, timingSafeEqual } from "crypto";
45
+ var digest = (v) => createHash("sha256").update(v).digest();
46
+ function sameSecret(received, expected) {
47
+ return typeof received === "string" && timingSafeEqual(digest(received), expected);
48
+ }
49
+ function originSecretMiddleware(options) {
50
+ const expected = options.value ? digest(options.value) : null;
51
+ const scoped = (options.scoped ?? []).filter((s) => s.value).map((s) => ({ header: s.header, paths: s.paths, expected: digest(s.value) }));
52
+ const exclude = options.exclude ?? [];
53
+ return (req, res, next) => {
54
+ if (!expected) return next();
55
+ const path = pathOf(req);
56
+ if (exclude.some((r) => matchesPath(r, path))) return next();
57
+ if (sameSecret(headerOf(req, options.header), expected)) return next();
58
+ if (scoped.some(
59
+ (s) => s.paths.some((r) => matchesPath(r, path)) && sameSecret(headerOf(req, s.header), s.expected)
60
+ ))
61
+ return next();
62
+ res.status(options.status ?? 403).json({
63
+ success: false,
64
+ error: { code: options.code ?? "UNTRUSTED_ORIGIN", message: options.message ?? "Access not allowed." }
65
+ });
66
+ };
67
+ }
68
+
69
+ // src/hardening/trust-proxy.ts
70
+ function trustedIp(req, options = {}) {
71
+ for (const name of options.trustedHeaders ?? []) {
72
+ const v = headerOf(req, name);
73
+ if (v) return v;
74
+ }
75
+ return req.ips?.length ? req.ips[0] : req.ip ?? "";
76
+ }
77
+ function applyTrustProxy(app, value) {
78
+ const instance = app.getHttpAdapter().getInstance();
79
+ instance.set?.("trust proxy", value);
80
+ }
81
+
82
+ export {
83
+ pathOf,
84
+ matchesPath,
85
+ DEFAULT_BODY_LIMIT,
86
+ applyBodyLimits,
87
+ originSecretMiddleware,
88
+ trustedIp,
89
+ applyTrustProxy
90
+ };
@@ -0,0 +1,20 @@
1
+ import { type CallHandler, type ExecutionContext, type NestInterceptor } from '@nestjs/common';
2
+ import type { Observable } from 'rxjs';
3
+ import { type ConsentOptions } from './consent.options.js';
4
+ import { ConsentService } from './consent.service.js';
5
+ /**
6
+ * Blocks anyone who has not accepted a version >= the minimum of each document
7
+ * with a 403 and a stable code (`CONSENT_PENDIENTE` by default). The details
8
+ * carry the current version(s) so the client can show the right screen.
9
+ *
10
+ * An interceptor and not a guard on purpose: global guards run BEFORE the
11
+ * per-controller auth guard, so `req.user` does not exist yet; interceptors run
12
+ * after every guard. Mount it globally (`app.useGlobalInterceptors(app.get(ConsentInterceptor))`
13
+ * or `APP_INTERCEPTOR`).
14
+ */
15
+ export declare class ConsentInterceptor implements NestInterceptor {
16
+ private readonly options;
17
+ private readonly consent;
18
+ constructor(options: ConsentOptions, consent: ConsentService);
19
+ intercept(ctx: ExecutionContext, next: CallHandler): Promise<Observable<unknown>>;
20
+ }
@@ -0,0 +1,25 @@
1
+ import { type DynamicModule } from '@nestjs/common';
2
+ import { type ConsentOptions } from './consent.options.js';
3
+ /**
4
+ * Legal-consent gate.
5
+ *
6
+ * ```ts
7
+ * ConsentModule.forRoot({
8
+ * documentos: [{ id: 'terminos', version: '2026-10-15', minima: '2026-09-12' }],
9
+ * rutasLibres: [/^\/api\/v1\/auth(\/|$)/, /^\/api\/v1\/cuenta(\/|$)/, /^\/(health|ready)$/],
10
+ * puertoDeAceptaciones: new TypeOrmConsentStore(dataSource),
11
+ * })
12
+ * // main.ts: app.useGlobalInterceptors(app.get(ConsentInterceptor));
13
+ * ```
14
+ *
15
+ * Not wired into `applyNestKitDefaults`: switching it on changes the contract
16
+ * of every endpoint at once, so mounting it is a decision.
17
+ */
18
+ export declare class ConsentModule {
19
+ static forRoot(options: ConsentOptions): DynamicModule;
20
+ static forRootAsync(config: {
21
+ imports?: any[];
22
+ inject?: any[];
23
+ useFactory: (...args: any[]) => ConsentOptions | Promise<ConsentOptions>;
24
+ }): DynamicModule;
25
+ }
@@ -0,0 +1,30 @@
1
+ import type { ConsentStore } from './consent.port.js';
2
+ export declare const CONSENT_OPTIONS: unique symbol;
3
+ export interface ConsentDocument {
4
+ /** Stable id: `terminos`, `privacidad`. */
5
+ id: string;
6
+ /** Current version, the one shown and stored on acceptance. Raising it blocks nobody. */
7
+ version: string;
8
+ /** Minimum accepted version. This is what blocks (403). Raise only for a substantial legal change. */
9
+ minima: string;
10
+ }
11
+ export interface ConsentOptions {
12
+ documentos: ConsentDocument[];
13
+ /** Paths that never require consent (login, the accept endpoint, health). Tested against `req.path`. */
14
+ rutasLibres?: RegExp[];
15
+ /** Where acceptances live. Defaults to an in-process store (single instance, lost on restart). */
16
+ puertoDeAceptaciones?: ConsentStore;
17
+ /** Stable error code of the 403. Defaults to `CONSENT_PENDIENTE`. */
18
+ codigoError?: string;
19
+ /** How long an accepted version is cached per user, ms. Defaults to 60 000. `0` disables. */
20
+ ttlCache?: number;
21
+ /** Message of the 403. */
22
+ textoError?: string;
23
+ /** Who is asking. Defaults to `req.user.sub`. Return `undefined` for anonymous (let through). */
24
+ getUserId?: (request: any) => string | undefined;
25
+ /** Clock, for tests. */
26
+ now?: () => number;
27
+ }
28
+ export declare const DEFAULT_CONSENT_CODE = "CONSENT_PENDIENTE";
29
+ export declare const DEFAULT_CONSENT_TTL_MS = 60000;
30
+ export declare const DEFAULT_CONSENT_TEXT = "Antes de continuar acepta los documentos legales vigentes.";
@@ -0,0 +1,17 @@
1
+ /** DI token for the {@link ConsentStore}. */
2
+ export declare const CONSENT_STORE: unique symbol;
3
+ /** What was accepted, when, and anything the app wants to keep as evidence. */
4
+ export interface ConsentRecord {
5
+ version: string;
6
+ acceptedAt: Date;
7
+ /** Declared age of majority, IP, locale… whatever the app must be able to prove later. */
8
+ meta?: Record<string, unknown>;
9
+ }
10
+ /**
11
+ * Where acceptances live. The library keeps nothing itself: a consent receipt
12
+ * belongs in the consumer's database, under its retention rules.
13
+ */
14
+ export interface ConsentStore {
15
+ get(userId: string, docId: string): Promise<ConsentRecord | null>;
16
+ save(userId: string, docId: string, record: ConsentRecord): Promise<void>;
17
+ }
@@ -0,0 +1,44 @@
1
+ import { type ConsentOptions } from './consent.options.js';
2
+ import { type ConsentRecord, type ConsentStore } from './consent.port.js';
3
+ /** Anything with `record(event)`: the real `AuditService`, or a stub. */
4
+ export interface ConsentAudit {
5
+ record(event: {
6
+ action: string;
7
+ resource: string;
8
+ resourceId?: string;
9
+ after?: unknown;
10
+ metadata?: Record<string, unknown>;
11
+ }): Promise<unknown>;
12
+ }
13
+ /**
14
+ * Decides whether a user may use the API and records acceptances.
15
+ *
16
+ * `hasAccepted` reads the accepted version through a short per-user cache so
17
+ * the interceptor does not hit the store on every request; `accept` refreshes
18
+ * the entry, so the user sees the effect immediately.
19
+ */
20
+ export declare class ConsentService {
21
+ private readonly options;
22
+ private readonly store;
23
+ private readonly audit?;
24
+ private readonly cache;
25
+ constructor(options: ConsentOptions, store: ConsentStore, audit?: ConsentAudit | undefined);
26
+ private now;
27
+ private ttl;
28
+ private doc;
29
+ private remember;
30
+ /** Accepted version of one document (cached), or `null`. */
31
+ acceptedVersion(userId: string, docId: string): Promise<string | null>;
32
+ /** Pure check over a version: at or above the document's minimum. */
33
+ isValid(docId: string, version: string | null | undefined): boolean;
34
+ /** Ids of the documents the user has not accepted at the minimum version. */
35
+ pending(userId: string): Promise<string[]>;
36
+ /** True when every document is accepted at >= its minimum. */
37
+ hasAccepted(userId: string): Promise<boolean>;
38
+ /**
39
+ * Records the acceptance of the **current** version. Idempotent: if that
40
+ * version is already stored, the original receipt (date included) is kept
41
+ * and nothing is audited again.
42
+ */
43
+ accept(userId: string, docId: string, meta?: Record<string, unknown>): Promise<ConsentRecord>;
44
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+ var _chunkUDACUMLOcjs = require('../../chunk-UDACUMLO.cjs');
7
+ require('../../chunk-LRX7AMSS.cjs');
8
+
9
+
10
+
11
+
12
+
13
+ exports.bundleContains = _chunkUDACUMLOcjs.bundleContains; exports.checkParity = _chunkUDACUMLOcjs.checkParity; exports.extractVersion = _chunkUDACUMLOcjs.extractVersion; exports.verifyRelease = _chunkUDACUMLOcjs.verifyRelease;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Release guard for the consent minimum. Pure functions, no I/O: wire them into
3
+ * a deploy script that reads the files and fetches the bundle.
4
+ *
5
+ * Origin: raising the enforced minimum on the API before the web and mobile
6
+ * clients shipped it locked everyone out (Cajón, 2026-10-16). Order is:
7
+ * clients first, API last.
8
+ */
9
+ /** Pulls a version out of source text with a regex whose group 1 is the version. */
10
+ export declare function extractVersion(source: string, pattern: RegExp): string | null;
11
+ export interface ParityResult {
12
+ ok: boolean;
13
+ message: string;
14
+ }
15
+ /** The mobile client's constant must equal the server's minimum. */
16
+ export declare function checkParity(mobile: string | null, server: string | null): ParityResult;
17
+ /** Does a published web bundle (text) contain the minimum version? */
18
+ export declare function bundleContains(bundleText: string, minimum: string): ParityResult;
19
+ export interface GuardInput {
20
+ server: string | null;
21
+ mobile: string | null;
22
+ /** Text of the published web bundle(s). Omit to skip that check. */
23
+ webBundle?: string;
24
+ /** Version the operator confirms the store builds ship. Omit to skip. */
25
+ mobilePublished?: string;
26
+ }
27
+ /** Runs every check; `ok` only if all pass. */
28
+ export declare function verifyRelease(input: GuardInput): {
29
+ ok: boolean;
30
+ results: ParityResult[];
31
+ };
@@ -0,0 +1,13 @@
1
+ import {
2
+ bundleContains,
3
+ checkParity,
4
+ extractVersion,
5
+ verifyRelease
6
+ } from "../../chunk-A7FI6HXV.js";
7
+ import "../../chunk-D3DDJWUD.js";
8
+ export {
9
+ bundleContains,
10
+ checkParity,
11
+ extractVersion,
12
+ verifyRelease
13
+ };
@@ -0,0 +1,271 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+ var _chunkUDACUMLOcjs = require('../chunk-UDACUMLO.cjs');
4
+
5
+
6
+
7
+
8
+ var _chunkA6YGIZCQcjs = require('../chunk-A6YGIZCQ.cjs');
9
+
10
+
11
+ var _chunkVALDHJOOcjs = require('../chunk-VALDHJOO.cjs');
12
+ require('../chunk-SDWHKPXI.cjs');
13
+
14
+
15
+
16
+ var _chunkHDFPSA2Vcjs = require('../chunk-HDFPSA2V.cjs');
17
+ require('../chunk-Q5Y33L7B.cjs');
18
+ require('../chunk-PNK5WMPP.cjs');
19
+
20
+
21
+
22
+ var _chunkLRX7AMSScjs = require('../chunk-LRX7AMSS.cjs');
23
+
24
+ // src/consent/consent.module.ts
25
+ var _common = require('@nestjs/common');
26
+
27
+ // src/consent/consent.interceptor.ts
28
+
29
+
30
+
31
+
32
+
33
+ // src/consent/consent.options.ts
34
+ var CONSENT_OPTIONS = /* @__PURE__ */ Symbol("CONSENT_OPTIONS");
35
+ var DEFAULT_CONSENT_CODE = "CONSENT_PENDIENTE";
36
+ var DEFAULT_CONSENT_TTL_MS = 6e4;
37
+ var DEFAULT_CONSENT_TEXT = "Antes de continuar acepta los documentos legales vigentes.";
38
+
39
+ // src/consent/consent.service.ts
40
+
41
+
42
+ // src/consent/consent.port.ts
43
+ var CONSENT_STORE = /* @__PURE__ */ Symbol("CONSENT_STORE");
44
+
45
+ // src/consent/consent.service.ts
46
+ var ConsentService = class {
47
+ constructor(options, store, audit) {
48
+ this.options = options;
49
+ this.store = store;
50
+ this.audit = audit;
51
+ this.cache = /* @__PURE__ */ new Map();
52
+ }
53
+ now() {
54
+ return (_nullishCoalesce(this.options.now, () => ( Date.now)))();
55
+ }
56
+ ttl() {
57
+ return _nullishCoalesce(this.options.ttlCache, () => ( DEFAULT_CONSENT_TTL_MS));
58
+ }
59
+ doc(docId) {
60
+ const d = this.options.documentos.find((x) => x.id === docId);
61
+ if (!d) throw new (0, _chunkHDFPSA2Vcjs.ValidationAppException)(`Unknown consent document: ${docId}`);
62
+ return d;
63
+ }
64
+ remember(userId, docId, version) {
65
+ if (this.ttl() > 0) this.cache.set(`${userId}\0${docId}`, { version, until: this.now() + this.ttl() });
66
+ }
67
+ /** Accepted version of one document (cached), or `null`. */
68
+ async acceptedVersion(userId, docId) {
69
+ const key = `${userId}\0${docId}`;
70
+ const hit = this.cache.get(key);
71
+ if (hit && hit.until > this.now()) return hit.version;
72
+ const version = await _asyncNullishCoalesce(await _asyncOptionalChain([(await this.store.get(userId, docId)), 'optionalAccess', async _ => _.version]), async () => ( null));
73
+ this.remember(userId, docId, version);
74
+ return version;
75
+ }
76
+ /** Pure check over a version: at or above the document's minimum. */
77
+ isValid(docId, version) {
78
+ return _chunkA6YGIZCQcjs.versionAceptadaVigente.call(void 0, version, this.doc(docId).minima);
79
+ }
80
+ /** Ids of the documents the user has not accepted at the minimum version. */
81
+ async pending(userId) {
82
+ const out = [];
83
+ for (const d of this.options.documentos) {
84
+ if (!this.isValid(d.id, await this.acceptedVersion(userId, d.id))) out.push(d.id);
85
+ }
86
+ return out;
87
+ }
88
+ /** True when every document is accepted at >= its minimum. */
89
+ async hasAccepted(userId) {
90
+ return (await this.pending(userId)).length === 0;
91
+ }
92
+ /**
93
+ * Records the acceptance of the **current** version. Idempotent: if that
94
+ * version is already stored, the original receipt (date included) is kept
95
+ * and nothing is audited again.
96
+ */
97
+ async accept(userId, docId, meta) {
98
+ const d = this.doc(docId);
99
+ const previous = await this.store.get(userId, docId);
100
+ if (previous && previous.version === d.version) {
101
+ this.remember(userId, docId, d.version);
102
+ return previous;
103
+ }
104
+ const record = { version: d.version, acceptedAt: new Date(this.now()), meta };
105
+ await this.store.save(userId, docId, record);
106
+ this.remember(userId, docId, d.version);
107
+ await _optionalChain([this, 'access', _2 => _2.audit, 'optionalAccess', _3 => _3.record, 'call', _4 => _4({
108
+ action: "consent.accepted",
109
+ resource: docId,
110
+ resourceId: userId,
111
+ after: { version: d.version },
112
+ metadata: meta
113
+ })]);
114
+ return record;
115
+ }
116
+ };
117
+ ConsentService = exports.ConsentService = _chunkLRX7AMSScjs.__decorateClass.call(void 0, [
118
+ _common.Injectable.call(void 0, ),
119
+ _chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Inject.call(void 0, CONSENT_OPTIONS)),
120
+ _chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Inject.call(void 0, CONSENT_STORE)),
121
+ _chunkLRX7AMSScjs.__decorateParam.call(void 0, 2, _common.Optional.call(void 0, )),
122
+ _chunkLRX7AMSScjs.__decorateParam.call(void 0, 2, _common.Inject.call(void 0, _chunkVALDHJOOcjs.AuditService))
123
+ ], ConsentService);
124
+
125
+ // src/consent/consent.interceptor.ts
126
+ var ConsentInterceptor = class {
127
+ constructor(options, consent) {
128
+ this.options = options;
129
+ this.consent = consent;
130
+ }
131
+ async intercept(ctx, next) {
132
+ const req = ctx.switchToHttp().getRequest();
133
+ const userId = this.options.getUserId ? this.options.getUserId(req) : _optionalChain([req, 'optionalAccess', _5 => _5.user, 'optionalAccess', _6 => _6.sub]);
134
+ if (userId) {
135
+ const path = _nullishCoalesce(req.path, () => ( String(_nullishCoalesce(req.url, () => ( ""))).split("?")[0]));
136
+ const free = (_nullishCoalesce(this.options.rutasLibres, () => ( []))).some((r) => r.test(path));
137
+ if (!free) {
138
+ const pending = await this.consent.pending(userId);
139
+ if (pending.length > 0) {
140
+ const docs = this.options.documentos.filter((d) => pending.includes(d.id));
141
+ throw new (0, _chunkHDFPSA2Vcjs.ForbiddenAppException)(
142
+ _nullishCoalesce(this.options.textoError, () => ( DEFAULT_CONSENT_TEXT)),
143
+ {
144
+ pendientes: pending,
145
+ version: _optionalChain([docs, 'access', _7 => _7[0], 'optionalAccess', _8 => _8.version]),
146
+ versiones: Object.fromEntries(docs.map((d) => [d.id, d.version]))
147
+ },
148
+ _nullishCoalesce(this.options.codigoError, () => ( DEFAULT_CONSENT_CODE))
149
+ );
150
+ }
151
+ }
152
+ }
153
+ return next.handle();
154
+ }
155
+ };
156
+ ConsentInterceptor = exports.ConsentInterceptor = _chunkLRX7AMSScjs.__decorateClass.call(void 0, [
157
+ _common.Injectable.call(void 0, ),
158
+ _chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Inject.call(void 0, CONSENT_OPTIONS))
159
+ ], ConsentInterceptor);
160
+
161
+ // src/consent/memory.store.ts
162
+ var MemoryConsentStore = class {
163
+ constructor() {
164
+ this.rows = /* @__PURE__ */ new Map();
165
+ }
166
+ async get(userId, docId) {
167
+ return _nullishCoalesce(this.rows.get(`${userId}\0${docId}`), () => ( null));
168
+ }
169
+ async save(userId, docId, record) {
170
+ this.rows.set(`${userId}\0${docId}`, record);
171
+ }
172
+ };
173
+
174
+ // src/consent/consent.module.ts
175
+ var ConsentModule = class {
176
+ static forRoot(options) {
177
+ const providers = [
178
+ { provide: CONSENT_OPTIONS, useValue: options },
179
+ { provide: CONSENT_STORE, useValue: _nullishCoalesce(options.puertoDeAceptaciones, () => ( new MemoryConsentStore())) },
180
+ ConsentService,
181
+ ConsentInterceptor
182
+ ];
183
+ return {
184
+ module: ConsentModule,
185
+ providers,
186
+ exports: [CONSENT_OPTIONS, CONSENT_STORE, ConsentService, ConsentInterceptor]
187
+ };
188
+ }
189
+ static forRootAsync(config) {
190
+ const providers = [
191
+ { provide: CONSENT_OPTIONS, useFactory: config.useFactory, inject: _nullishCoalesce(config.inject, () => ( [])) },
192
+ {
193
+ provide: CONSENT_STORE,
194
+ useFactory: (o) => _nullishCoalesce(o.puertoDeAceptaciones, () => ( new MemoryConsentStore())),
195
+ inject: [CONSENT_OPTIONS]
196
+ },
197
+ ConsentService,
198
+ ConsentInterceptor
199
+ ];
200
+ return {
201
+ module: ConsentModule,
202
+ imports: _nullishCoalesce(config.imports, () => ( [])),
203
+ providers,
204
+ exports: [CONSENT_OPTIONS, CONSENT_STORE, ConsentService, ConsentInterceptor]
205
+ };
206
+ }
207
+ };
208
+ ConsentModule = exports.ConsentModule = _chunkLRX7AMSScjs.__decorateClass.call(void 0, [
209
+ _common.Global.call(void 0, ),
210
+ _common.Module.call(void 0, {})
211
+ ], ConsentModule);
212
+
213
+ // src/consent/typeorm.store.ts
214
+ var TypeOrmConsentStore = class {
215
+ constructor(db, options = {}) {
216
+ this.db = db;
217
+ this.table = assertIdent(_nullishCoalesce(options.table, () => ( "consent_acceptance")));
218
+ }
219
+ async get(userId, docId) {
220
+ const rows = await this.db.query(
221
+ `SELECT version, accepted_at, meta FROM "${this.table}" WHERE user_id = $1 AND doc_id = $2 LIMIT 1`,
222
+ [userId, docId]
223
+ );
224
+ const r = Array.isArray(rows) ? rows[0] : _optionalChain([rows, 'optionalAccess', _9 => _9.rows, 'optionalAccess', _10 => _10[0]]);
225
+ if (!r) return null;
226
+ return {
227
+ version: r.version,
228
+ acceptedAt: r.accepted_at instanceof Date ? r.accepted_at : new Date(r.accepted_at),
229
+ meta: _nullishCoalesce(r.meta, () => ( void 0))
230
+ };
231
+ }
232
+ async save(userId, docId, record) {
233
+ await this.db.query(
234
+ `INSERT INTO "${this.table}" (user_id, doc_id, version, accepted_at, meta)
235
+ VALUES ($1, $2, $3, $4, $5)
236
+ ON CONFLICT (user_id, doc_id)
237
+ DO UPDATE SET version = EXCLUDED.version, accepted_at = EXCLUDED.accepted_at, meta = EXCLUDED.meta`,
238
+ [userId, docId, record.version, record.acceptedAt, record.meta ? JSON.stringify(record.meta) : null]
239
+ );
240
+ }
241
+ };
242
+ function consentTableSql(table = "consent_acceptance") {
243
+ const t = assertIdent(table);
244
+ return `CREATE TABLE IF NOT EXISTS "${t}" (
245
+ user_id text NOT NULL,
246
+ doc_id text NOT NULL,
247
+ version text NOT NULL,
248
+ accepted_at timestamptz NOT NULL,
249
+ meta jsonb,
250
+ PRIMARY KEY (user_id, doc_id)
251
+ );`;
252
+ }
253
+ function assertIdent(name) {
254
+ if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(name)) throw new Error(`Invalid table name: ${name}`);
255
+ return name;
256
+ }
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+ exports.CONSENT_OPTIONS = CONSENT_OPTIONS; exports.CONSENT_STORE = CONSENT_STORE; exports.ConsentInterceptor = ConsentInterceptor; exports.ConsentModule = ConsentModule; exports.ConsentService = ConsentService; exports.DEFAULT_CONSENT_CODE = DEFAULT_CONSENT_CODE; exports.MemoryConsentStore = MemoryConsentStore; exports.TypeOrmConsentStore = TypeOrmConsentStore; exports.compareVersions = _chunkA6YGIZCQcjs.compareVersions; exports.consentGuard = _chunkUDACUMLOcjs.guard_exports; exports.consentTableSql = consentTableSql; exports.isAcceptedVersionValid = _chunkA6YGIZCQcjs.isAcceptedVersionValid; exports.versionAceptadaVigente = _chunkA6YGIZCQcjs.versionAceptadaVigente;
@@ -0,0 +1,13 @@
1
+ export { ConsentModule } from './consent.module.js';
2
+ export { ConsentService } from './consent.service.js';
3
+ export type { ConsentAudit } from './consent.service.js';
4
+ export { ConsentInterceptor } from './consent.interceptor.js';
5
+ export { CONSENT_OPTIONS, DEFAULT_CONSENT_CODE } from './consent.options.js';
6
+ export type { ConsentOptions, ConsentDocument } from './consent.options.js';
7
+ export { CONSENT_STORE } from './consent.port.js';
8
+ export type { ConsentStore, ConsentRecord } from './consent.port.js';
9
+ export { MemoryConsentStore } from './memory.store.js';
10
+ export { TypeOrmConsentStore, consentTableSql } from './typeorm.store.js';
11
+ export type { SqlRunner, TypeOrmConsentStoreOptions } from './typeorm.store.js';
12
+ export { versionAceptadaVigente, isAcceptedVersionValid, compareVersions } from './shared/index.js';
13
+ export * as consentGuard from './guard/index.js';