alepha 0.21.0 → 0.21.2

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 (120) hide show
  1. package/dist/api/audits/index.d.ts +2 -2
  2. package/dist/api/files/index.d.ts +44 -3
  3. package/dist/api/files/index.d.ts.map +1 -1
  4. package/dist/api/files/index.js +59 -3
  5. package/dist/api/files/index.js.map +1 -1
  6. package/dist/api/parameters/index.d.ts +2 -2
  7. package/dist/api/users/index.d.ts +9 -9
  8. package/dist/api/users/index.d.ts.map +1 -1
  9. package/dist/api/users/index.js +28 -26
  10. package/dist/api/users/index.js.map +1 -1
  11. package/dist/api/verifications/index.browser.js +1 -0
  12. package/dist/api/verifications/index.browser.js.map +1 -1
  13. package/dist/api/verifications/index.d.ts +17 -0
  14. package/dist/api/verifications/index.d.ts.map +1 -1
  15. package/dist/api/verifications/index.js +5 -1
  16. package/dist/api/verifications/index.js.map +1 -1
  17. package/dist/cli/core/index.d.ts +74 -5
  18. package/dist/cli/core/index.d.ts.map +1 -1
  19. package/dist/cli/core/index.js +152 -34
  20. package/dist/cli/core/index.js.map +1 -1
  21. package/dist/cli/platform/index.d.ts +53 -92
  22. package/dist/cli/platform/index.d.ts.map +1 -1
  23. package/dist/cli/platform/index.js +128 -195
  24. package/dist/cli/platform/index.js.map +1 -1
  25. package/dist/containers/core/index.d.ts +238 -0
  26. package/dist/containers/core/index.d.ts.map +1 -0
  27. package/dist/containers/core/index.js +222 -0
  28. package/dist/containers/core/index.js.map +1 -0
  29. package/dist/containers/core/index.workerd.js +177 -0
  30. package/dist/containers/core/index.workerd.js.map +1 -0
  31. package/dist/core/index.browser.js +6 -0
  32. package/dist/core/index.browser.js.map +1 -1
  33. package/dist/core/index.d.ts.map +1 -1
  34. package/dist/core/index.js +6 -0
  35. package/dist/core/index.js.map +1 -1
  36. package/dist/core/index.native.js +6 -0
  37. package/dist/core/index.native.js.map +1 -1
  38. package/dist/core/index.workerd.js +6 -0
  39. package/dist/core/index.workerd.js.map +1 -1
  40. package/dist/email/cloudflare/index.d.ts +90 -0
  41. package/dist/email/cloudflare/index.d.ts.map +1 -0
  42. package/dist/email/cloudflare/index.js +116 -0
  43. package/dist/email/cloudflare/index.js.map +1 -0
  44. package/dist/orm/core/index.bun.js +2 -2
  45. package/dist/orm/core/index.bun.js.map +1 -1
  46. package/dist/orm/core/index.d.ts.map +1 -1
  47. package/dist/orm/core/index.js +2 -2
  48. package/dist/orm/core/index.js.map +1 -1
  49. package/dist/react/form/index.d.ts +36 -1
  50. package/dist/react/form/index.d.ts.map +1 -1
  51. package/dist/react/form/index.js +91 -3
  52. package/dist/react/form/index.js.map +1 -1
  53. package/dist/react/router/index.browser.js +56 -8
  54. package/dist/react/router/index.browser.js.map +1 -1
  55. package/dist/react/router/index.d.ts +5 -0
  56. package/dist/react/router/index.d.ts.map +1 -1
  57. package/dist/react/router/index.js +55 -7
  58. package/dist/react/router/index.js.map +1 -1
  59. package/dist/server/core/index.d.ts.map +1 -1
  60. package/dist/server/core/index.js +1 -1
  61. package/dist/server/core/index.js.map +1 -1
  62. package/package.json +23 -1
  63. package/src/api/files/controllers/FileController.ts +41 -1
  64. package/src/api/files/providers/FileAccessProvider.ts +23 -1
  65. package/src/api/files/services/FileService.ts +5 -3
  66. package/src/api/users/services/CredentialService.ts +37 -26
  67. package/src/api/verifications/entities/verifications.ts +8 -0
  68. package/src/api/verifications/services/VerificationService.ts +14 -0
  69. package/src/cli/core/__tests__/BuildDockerTask.spec.ts +24 -0
  70. package/src/cli/core/__tests__/init.spec.ts +11 -0
  71. package/src/cli/core/atoms/buildOptions.ts +15 -0
  72. package/src/cli/core/commands/build.ts +14 -2
  73. package/src/cli/core/commands/db.ts +4 -0
  74. package/src/cli/core/services/ProjectScaffolder.ts +14 -6
  75. package/src/cli/core/tasks/BuildAssetsTask.ts +3 -0
  76. package/src/cli/core/tasks/BuildClientTask.ts +3 -0
  77. package/src/cli/core/tasks/BuildCloudflareTask.ts +136 -2
  78. package/src/cli/core/tasks/BuildCompressTask.ts +3 -0
  79. package/src/cli/core/tasks/BuildDockerTask.ts +12 -1
  80. package/src/cli/core/tasks/BuildPrerenderTask.ts +3 -0
  81. package/src/cli/core/tasks/BuildPwaTask.ts +3 -0
  82. package/src/cli/core/tasks/BuildServerTask.ts +3 -0
  83. package/src/cli/core/tasks/BuildTask.ts +8 -0
  84. package/src/cli/core/templates/saasAuthLayoutTsx.ts +9 -7
  85. package/src/cli/core/templates/saasRealmProviderTs.ts +24 -18
  86. package/src/cli/platform/__tests__/NamingService.spec.ts +0 -42
  87. package/src/cli/platform/__tests__/PlatformInspector.spec.ts +4 -48
  88. package/src/cli/platform/adapters/CloudflareAdapter.ts +24 -48
  89. package/src/cli/platform/adapters/PlatformAdapter.ts +8 -0
  90. package/src/cli/platform/adapters/VercelAdapter.ts +5 -15
  91. package/src/cli/platform/atoms/platformOptions.ts +0 -5
  92. package/src/cli/platform/commands/platform.ts +90 -93
  93. package/src/cli/platform/index.ts +16 -4
  94. package/src/cli/platform/services/NamingService.ts +11 -12
  95. package/src/cli/platform/services/PlatformInspector.ts +9 -43
  96. package/src/cli/platform/services/PlatformOrchestrator.ts +40 -98
  97. package/src/containers/core/__tests__/$container.spec.ts +83 -0
  98. package/src/containers/core/index.ts +50 -0
  99. package/src/containers/core/index.workerd.ts +37 -0
  100. package/src/containers/core/interfaces/ContainerOptions.ts +69 -0
  101. package/src/containers/core/primitives/$container.ts +100 -0
  102. package/src/containers/core/providers/CloudflareContainerProvider.ts +72 -0
  103. package/src/containers/core/providers/ContainerProvider.ts +78 -0
  104. package/src/containers/core/providers/MockContainerProvider.ts +62 -0
  105. package/src/containers/core/providers/NodeContainerProvider.ts +53 -0
  106. package/src/core/Alepha.ts +15 -0
  107. package/src/email/cloudflare/__tests__/CloudflareEmailProvider.spec.ts +150 -0
  108. package/src/email/cloudflare/index.ts +26 -0
  109. package/src/email/cloudflare/providers/CloudflareEmailProvider.ts +160 -0
  110. package/src/orm/core/services/Repository.ts +11 -2
  111. package/src/react/form/hooks/useFormQuerySync.ts +0 -0
  112. package/src/react/form/index.ts +1 -0
  113. package/src/react/form/services/FormModel.ts +18 -2
  114. package/src/react/router/__tests__/$page.browser.spec.tsx +123 -1
  115. package/src/react/router/components/ErrorViewer.tsx +29 -7
  116. package/src/react/router/providers/ReactBrowserProvider.ts +21 -5
  117. package/src/react/router/providers/ReactPageProvider.ts +81 -3
  118. package/src/server/core/providers/ServerRouterProvider.ts +7 -1
  119. package/src/cli/platform/hooks/PlatformHook.ts +0 -51
  120. package/src/orm/REFACTORING.md +0 -330
@@ -13,6 +13,7 @@ const verifications = $entity({
13
13
  version: db.version(),
14
14
  type: verificationTypeEnumSchema,
15
15
  target: t.text({ description: "Can be a phone (E.164 format) or email address" }),
16
+ purpose: db.default(t.text({ description: "Logical purpose bucket (e.g. 'default', 'password-reset'). Scopes the cooldown and daily-limit checks so unrelated flows that share the same (type, target) — most notably email verification and password reset — don't collide." }), "default"),
16
17
  code: t.text({ description: "Hashed verification token (n-digit code or UUID)" }),
17
18
  verifiedAt: t.optional(t.datetime({ description: "When it was successfully verified" })),
18
19
  attempts: db.default(t.integer({ description: "Number of failed attempts (to prevent brute-force)" }), 0)
@@ -1 +1 @@
1
- {"version":3,"file":"index.browser.js","names":[],"sources":["../../../src/api/verifications/schemas/verificationTypeEnumSchema.ts","../../../src/api/verifications/entities/verifications.ts","../../../src/api/verifications/schemas/requestVerificationCodeResponseSchema.ts","../../../src/api/verifications/schemas/validateVerificationCodeResponseSchema.ts","../../../src/api/verifications/index.browser.ts"],"sourcesContent":["import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\n\nexport const verificationTypeEnumSchema = t.enum([\"code\", \"link\"]);\nexport type VerificationTypeEnum = Static<typeof verificationTypeEnumSchema>;\n","import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\nimport { $entity, db } from \"alepha/orm\";\nimport { verificationTypeEnumSchema } from \"../schemas/verificationTypeEnumSchema.ts\";\n\nexport const verifications = $entity({\n name: \"verification\",\n schema: t.object({\n id: db.primaryKey(t.bigint()),\n\n createdAt: db.createdAt(),\n\n updatedAt: db.updatedAt(),\n\n version: db.version(),\n\n type: verificationTypeEnumSchema,\n\n target: t.text({\n description: \"Can be a phone (E.164 format) or email address\",\n }),\n\n code: t.text({\n description: \"Hashed verification token (n-digit code or UUID)\",\n }),\n\n verifiedAt: t.optional(\n t.datetime({\n description: \"When it was successfully verified\",\n }),\n ),\n\n attempts: db.default(\n t.integer({\n description: \"Number of failed attempts (to prevent brute-force)\",\n }),\n 0,\n ),\n }),\n indexes: [\n \"createdAt\",\n {\n columns: [\"target\", \"code\"],\n },\n ],\n});\n\nexport const verificationEntitySchema = verifications.schema;\nexport const verificationEntityInsertSchema = verifications.insertSchema;\nexport type VerificationEntity = Static<typeof verifications.schema>;\n","import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\n\nexport const requestVerificationCodeResponseSchema = t.object({\n token: t.string({\n description:\n \"The verification token (6-digit code for phone, UUID for email). The caller should send this to the user via their preferred notification method.\",\n }),\n codeExpiration: t.integer({\n description: \"Time in seconds before your verification token expires.\",\n }),\n verificationCooldown: t.integer({\n description:\n \"Cooldown period in seconds before you can request another verification.\",\n }),\n maxVerificationAttempts: t.integer({\n description:\n \"Maximum number of verification attempts allowed before the token is locked.\",\n }),\n});\n\nexport type RequestVerificationResponse = Static<\n typeof requestVerificationCodeResponseSchema\n>;\n","import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\n\nexport const validateVerificationCodeResponseSchema = t.object({\n ok: t.boolean({\n description: \"Indicates whether the verification was successful.\",\n }),\n alreadyVerified: t.optional(\n t.boolean({\n description: \"Indicates whether the target was already verified.\",\n }),\n ),\n});\n\nexport type ValidateVerificationCodeResponse = Static<\n typeof validateVerificationCodeResponseSchema\n>;\n","import { $module } from \"alepha\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport * from \"./entities/verifications.ts\";\nexport * from \"./schemas/requestVerificationCodeResponseSchema.ts\";\nexport * from \"./schemas/validateVerificationCodeResponseSchema.ts\";\nexport * from \"./schemas/verificationTypeEnumSchema.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport const AlephaApiVerification = $module({\n name: \"alepha.api.verifications\",\n services: [],\n});\n"],"mappings":";;;AAGA,MAAa,6BAA6B,EAAE,KAAK,CAAC,QAAQ,OAAO,CAAC;;;ACElE,MAAa,gBAAgB,QAAQ;CACnC,MAAM;CACN,QAAQ,EAAE,OAAO;EACf,IAAI,GAAG,WAAW,EAAE,QAAQ,CAAC;EAE7B,WAAW,GAAG,WAAW;EAEzB,WAAW,GAAG,WAAW;EAEzB,SAAS,GAAG,SAAS;EAErB,MAAM;EAEN,QAAQ,EAAE,KAAK,EACb,aAAa,kDACd,CAAC;EAEF,MAAM,EAAE,KAAK,EACX,aAAa,oDACd,CAAC;EAEF,YAAY,EAAE,SACZ,EAAE,SAAS,EACT,aAAa,qCACd,CAAC,CACH;EAED,UAAU,GAAG,QACX,EAAE,QAAQ,EACR,aAAa,sDACd,CAAC,EACF,EACD;EACF,CAAC;CACF,SAAS,CACP,aACA,EACE,SAAS,CAAC,UAAU,OAAO,EAC5B,CACF;CACF,CAAC;AAEF,MAAa,2BAA2B,cAAc;AACtD,MAAa,iCAAiC,cAAc;;;AC7C5D,MAAa,wCAAwC,EAAE,OAAO;CAC5D,OAAO,EAAE,OAAO,EACd,aACE,qJACH,CAAC;CACF,gBAAgB,EAAE,QAAQ,EACxB,aAAa,2DACd,CAAC;CACF,sBAAsB,EAAE,QAAQ,EAC9B,aACE,2EACH,CAAC;CACF,yBAAyB,EAAE,QAAQ,EACjC,aACE,+EACH,CAAC;CACH,CAAC;;;AChBF,MAAa,yCAAyC,EAAE,OAAO;CAC7D,IAAI,EAAE,QAAQ,EACZ,aAAa,sDACd,CAAC;CACF,iBAAiB,EAAE,SACjB,EAAE,QAAQ,EACR,aAAa,sDACd,CAAC,CACH;CACF,CAAC;;;ACDF,MAAa,wBAAwB,QAAQ;CAC3C,MAAM;CACN,UAAU,EAAE;CACb,CAAC"}
1
+ {"version":3,"file":"index.browser.js","names":[],"sources":["../../../src/api/verifications/schemas/verificationTypeEnumSchema.ts","../../../src/api/verifications/entities/verifications.ts","../../../src/api/verifications/schemas/requestVerificationCodeResponseSchema.ts","../../../src/api/verifications/schemas/validateVerificationCodeResponseSchema.ts","../../../src/api/verifications/index.browser.ts"],"sourcesContent":["import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\n\nexport const verificationTypeEnumSchema = t.enum([\"code\", \"link\"]);\nexport type VerificationTypeEnum = Static<typeof verificationTypeEnumSchema>;\n","import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\nimport { $entity, db } from \"alepha/orm\";\nimport { verificationTypeEnumSchema } from \"../schemas/verificationTypeEnumSchema.ts\";\n\nexport const verifications = $entity({\n name: \"verification\",\n schema: t.object({\n id: db.primaryKey(t.bigint()),\n\n createdAt: db.createdAt(),\n\n updatedAt: db.updatedAt(),\n\n version: db.version(),\n\n type: verificationTypeEnumSchema,\n\n target: t.text({\n description: \"Can be a phone (E.164 format) or email address\",\n }),\n\n purpose: db.default(\n t.text({\n description:\n \"Logical purpose bucket (e.g. 'default', 'password-reset'). Scopes the cooldown and daily-limit checks so unrelated flows that share the same (type, target) — most notably email verification and password reset — don't collide.\",\n }),\n \"default\",\n ),\n\n code: t.text({\n description: \"Hashed verification token (n-digit code or UUID)\",\n }),\n\n verifiedAt: t.optional(\n t.datetime({\n description: \"When it was successfully verified\",\n }),\n ),\n\n attempts: db.default(\n t.integer({\n description: \"Number of failed attempts (to prevent brute-force)\",\n }),\n 0,\n ),\n }),\n indexes: [\n \"createdAt\",\n {\n columns: [\"target\", \"code\"],\n },\n ],\n});\n\nexport const verificationEntitySchema = verifications.schema;\nexport const verificationEntityInsertSchema = verifications.insertSchema;\nexport type VerificationEntity = Static<typeof verifications.schema>;\n","import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\n\nexport const requestVerificationCodeResponseSchema = t.object({\n token: t.string({\n description:\n \"The verification token (6-digit code for phone, UUID for email). The caller should send this to the user via their preferred notification method.\",\n }),\n codeExpiration: t.integer({\n description: \"Time in seconds before your verification token expires.\",\n }),\n verificationCooldown: t.integer({\n description:\n \"Cooldown period in seconds before you can request another verification.\",\n }),\n maxVerificationAttempts: t.integer({\n description:\n \"Maximum number of verification attempts allowed before the token is locked.\",\n }),\n});\n\nexport type RequestVerificationResponse = Static<\n typeof requestVerificationCodeResponseSchema\n>;\n","import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\n\nexport const validateVerificationCodeResponseSchema = t.object({\n ok: t.boolean({\n description: \"Indicates whether the verification was successful.\",\n }),\n alreadyVerified: t.optional(\n t.boolean({\n description: \"Indicates whether the target was already verified.\",\n }),\n ),\n});\n\nexport type ValidateVerificationCodeResponse = Static<\n typeof validateVerificationCodeResponseSchema\n>;\n","import { $module } from \"alepha\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport * from \"./entities/verifications.ts\";\nexport * from \"./schemas/requestVerificationCodeResponseSchema.ts\";\nexport * from \"./schemas/validateVerificationCodeResponseSchema.ts\";\nexport * from \"./schemas/verificationTypeEnumSchema.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport const AlephaApiVerification = $module({\n name: \"alepha.api.verifications\",\n services: [],\n});\n"],"mappings":";;;AAGA,MAAa,6BAA6B,EAAE,KAAK,CAAC,QAAQ,OAAO,CAAC;;;ACElE,MAAa,gBAAgB,QAAQ;CACnC,MAAM;CACN,QAAQ,EAAE,OAAO;EACf,IAAI,GAAG,WAAW,EAAE,QAAQ,CAAC;EAE7B,WAAW,GAAG,WAAW;EAEzB,WAAW,GAAG,WAAW;EAEzB,SAAS,GAAG,SAAS;EAErB,MAAM;EAEN,QAAQ,EAAE,KAAK,EACb,aAAa,kDACd,CAAC;EAEF,SAAS,GAAG,QACV,EAAE,KAAK,EACL,aACE,qOACH,CAAC,EACF,UACD;EAED,MAAM,EAAE,KAAK,EACX,aAAa,oDACd,CAAC;EAEF,YAAY,EAAE,SACZ,EAAE,SAAS,EACT,aAAa,qCACd,CAAC,CACH;EAED,UAAU,GAAG,QACX,EAAE,QAAQ,EACR,aAAa,sDACd,CAAC,EACF,EACD;EACF,CAAC;CACF,SAAS,CACP,aACA,EACE,SAAS,CAAC,UAAU,OAAO,EAC5B,CACF;CACF,CAAC;AAEF,MAAa,2BAA2B,cAAc;AACtD,MAAa,iCAAiC,cAAc;;;ACrD5D,MAAa,wCAAwC,EAAE,OAAO;CAC5D,OAAO,EAAE,OAAO,EACd,aACE,qJACH,CAAC;CACF,gBAAgB,EAAE,QAAQ,EACxB,aAAa,2DACd,CAAC;CACF,sBAAsB,EAAE,QAAQ,EAC9B,aACE,2EACH,CAAC;CACF,yBAAyB,EAAE,QAAQ,EACjC,aACE,+EACH,CAAC;CACH,CAAC;;;AChBF,MAAa,yCAAyC,EAAE,OAAO;CAC7D,IAAI,EAAE,QAAQ,EACZ,aAAa,sDACd,CAAC;CACF,iBAAiB,EAAE,SACjB,EAAE,QAAQ,EACR,aAAa,sDACd,CAAC,CACH;CACF,CAAC;;;ACDF,MAAa,wBAAwB,QAAQ;CAC3C,MAAM;CACN,UAAU,EAAE;CACb,CAAC"}
@@ -16,6 +16,7 @@ declare const verifications: _$alepha_orm0.EntityPrimitive<_$typebox.TObject<{
16
16
  version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
17
17
  type: _$typebox.TUnsafe<"link" | "code">;
18
18
  target: _$typebox.TString;
19
+ purpose: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_DEFAULT>;
19
20
  code: _$typebox.TString;
20
21
  verifiedAt: _$typebox.TOptional<_$typebox.TString>;
21
22
  attempts: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
@@ -27,6 +28,7 @@ declare const verificationEntitySchema: _$typebox.TObject<{
27
28
  version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
28
29
  type: _$typebox.TUnsafe<"link" | "code">;
29
30
  target: _$typebox.TString;
31
+ purpose: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_DEFAULT>;
30
32
  code: _$typebox.TString;
31
33
  verifiedAt: _$typebox.TOptional<_$typebox.TString>;
32
34
  attempts: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
@@ -38,6 +40,7 @@ declare const verificationEntityInsertSchema: _$alepha_orm0.TObjectInsert<_$type
38
40
  version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
39
41
  type: _$typebox.TUnsafe<"link" | "code">;
40
42
  target: _$typebox.TString;
43
+ purpose: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_DEFAULT>;
41
44
  code: _$typebox.TString;
42
45
  verifiedAt: _$typebox.TOptional<_$typebox.TString>;
43
46
  attempts: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
@@ -142,6 +145,7 @@ declare class VerificationService {
142
145
  version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
143
146
  type: _$typebox.TUnsafe<"link" | "code">;
144
147
  target: _$typebox.TString;
148
+ purpose: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_DEFAULT>;
145
149
  code: _$typebox.TString;
146
150
  verifiedAt: _$typebox.TOptional<_$typebox.TString>;
147
151
  attempts: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
@@ -154,6 +158,7 @@ declare class VerificationService {
154
158
  version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
155
159
  type: _$typebox.TUnsafe<"link" | "code">;
156
160
  target: _$typebox.TString;
161
+ purpose: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_DEFAULT>;
157
162
  code: _$typebox.TString;
158
163
  verifiedAt: _$typebox.TOptional<_$typebox.TString>;
159
164
  attempts: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
@@ -164,6 +169,7 @@ declare class VerificationService {
164
169
  version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
165
170
  type: _$typebox.TUnsafe<"link" | "code">;
166
171
  target: _$typebox.TString;
172
+ purpose: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_DEFAULT>;
167
173
  code: _$typebox.TString;
168
174
  verifiedAt: _$typebox.TOptional<_$typebox.TString>;
169
175
  attempts: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
@@ -181,6 +187,16 @@ declare class VerificationService {
181
187
  interface VerificationEntry {
182
188
  type: VerificationTypeEnum;
183
189
  target: string;
190
+ /**
191
+ * Logical purpose bucket. Cooldown and daily-limit checks are scoped to
192
+ * `(type, target, purpose)`, so flows that share a `(type, target)` pair
193
+ * — e.g. email verification and password reset, both `type: "code"` on the
194
+ * same email — get independent rate-limit windows instead of colliding.
195
+ *
196
+ * Defaults to `"default"` when omitted (back-compatible with callers and
197
+ * rows that predate this field).
198
+ */
199
+ purpose?: string;
184
200
  }
185
201
  //#endregion
186
202
  //#region ../../src/api/verifications/controllers/VerificationController.d.ts
@@ -226,6 +242,7 @@ declare class VerificationJobs {
226
242
  version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
227
243
  type: _$typebox.TUnsafe<"link" | "code">;
228
244
  target: _$typebox.TString;
245
+ purpose: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_DEFAULT>;
229
246
  code: _$typebox.TString;
230
247
  verifiedAt: _$typebox.TOptional<_$typebox.TString>;
231
248
  attempts: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/api/verifications/entities/verifications.ts","../../../src/api/verifications/schemas/verificationSettingsSchema.ts","../../../src/api/verifications/parameters/VerificationParameters.ts","../../../src/api/verifications/schemas/requestVerificationCodeResponseSchema.ts","../../../src/api/verifications/schemas/validateVerificationCodeResponseSchema.ts","../../../src/api/verifications/schemas/verificationTypeEnumSchema.ts","../../../src/api/verifications/services/VerificationService.ts","../../../src/api/verifications/controllers/VerificationController.ts","../../../src/api/verifications/jobs/VerificationJobs.ts","../../../src/api/verifications/index.ts"],"mappings":";;;;;;;;;;;cAKa,aAAA,EAAa,aAAA,CAAA,eAAA,WAAA,OAAA;gDAwCxB,SAAA,CAAA,OAAA;;;;;;;;;;cAEW,wBAAA,YAAwB,OAAA;gDAAuB,SAAA,CAAA,OAAA;;;;;;;;;;cAC/C,8BAAA,EAA8B,aAAA,CAAA,aAAA,WAAA,OAAA;gDAA6B,SAAA,CAAA,OAAA;;;;;;;;;;KAC5D,kBAAA,GAAqB,MAAA,QAAc,aAAA,CAAc,MAAA;;;cC9ChD,0BAAA,YAA0B,OAAA;;iBAsErC,SAAA,CAAA,QAAA;;;;;;;;;;;;;;KAEU,oBAAA,GAAuB,MAAA,QAAc,0BAAA;;;;;;cChEpC,mBAAA,EAAmB,QAAA,CA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,IAAA,WACC,OAAA,CAAQ,gCAAA;EA+EJ,QAAA,CAAS,IAAA;EAIT,aAAA,CAAc,IAAA,EAAM,oBAAA;AAAA;AAAA,UAcZ,iBAAA;EACf,IAAA,EAAM,oBAAA;EACN,MAAA;AAAA;;;cC3PW,sBAAA;EAAA,mBACQ,mBAAA,EAAmB,mBAAA;EAAA,SAEtB,GAAA;EAAA,SACA,KAAA;EAAA,SAEA,uBAAA,mBAAuB,iBAAA;;YALD,SAAA,CAAA,OAAA;IAAA;;;;;;;;;;;WA0BtB,wBAAA,mBAAwB,iBAAA;;YArBD,SAAA,CAAA,OAAA;IAAA;;;;;;;;;;;;;cCN5B,gBAAA;EAAA,mBACQ,sBAAA,EAAsB,aAAA,CAAA,UAAA,WAAA,OAAA;kDADd,SAAA,CAAA,OAAA;;;;;;;;;;qBAER,sBAAA,EAAsB,sBAAA;EAAA,mBACtB,gBAAA,EAAgB,gBAAA;EAAA,SAEnB,YAAA,EAFmB,mBAAA,CAEP,kBAAA;AAAA;;;;;;ARP9B;;;;;;;;cSyBa,qBAAA,EAAqB,QAAA,CAAA,OAAA,CAQhC,QAAA,CARgC,MAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/api/verifications/entities/verifications.ts","../../../src/api/verifications/schemas/verificationSettingsSchema.ts","../../../src/api/verifications/parameters/VerificationParameters.ts","../../../src/api/verifications/schemas/requestVerificationCodeResponseSchema.ts","../../../src/api/verifications/schemas/validateVerificationCodeResponseSchema.ts","../../../src/api/verifications/schemas/verificationTypeEnumSchema.ts","../../../src/api/verifications/services/VerificationService.ts","../../../src/api/verifications/controllers/VerificationController.ts","../../../src/api/verifications/jobs/VerificationJobs.ts","../../../src/api/verifications/index.ts"],"mappings":";;;;;;;;;;;cAKa,aAAA,EAAa,aAAA,CAAA,eAAA,WAAA,OAAA;gDAgDxB,SAAA,CAAA,OAAA;;;;;;;;;;;cAEW,wBAAA,YAAwB,OAAA;gDAAuB,SAAA,CAAA,OAAA;;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O,iBAAA,GACN,OAAA,CAAQ,kBAAA;EAoCJ,kBAAA,CAAmB,KAAA,EAAO,iBAAA,GAAiB,OAAA,eAAA,QAAA,WAAA,OAAA;kDAAA,SAAA,CAAA,OAAA;;;;;;;;;;;kDAAA,SAAA,CAAA,OAAA;;;;;;;;;;;ENxD1B;;;;;EMmFX,kBAAA,CACX,KAAA,EAAO,iBAAA,GACN,OAAA,CAAQ,2BAAA;EAqEE,UAAA,CACX,KAAA,EAAO,iBAAA,EACP,IAAA,WACC,OAAA,CAAQ,gCAAA;EA+EJ,QAAA,CAAS,IAAA;EAIT,aAAA,CAAc,IAAA,EAAM,oBAAA;AAAA;AAAA,UAcZ,iBAAA;EACf,IAAA,EAAM,oBAAA;EACN,MAAA;;;;;;;;;;EAWA,OAAA;AAAA;;;cCzQW,sBAAA;EAAA,mBACQ,mBAAA,EAAmB,mBAAA;EAAA,SAEtB,GAAA;EAAA,SACA,KAAA;EAAA,SAEA,uBAAA,mBAAuB,iBAAA;;YALD,SAAA,CAAA,OAAA;IAAA;;;;;;;;;;;WA0BtB,wBAAA,mBAAwB,iBAAA;;YArBD,SAAA,CAAA,OAAA;IAAA;;;;;;;;;;;;;cCN5B,gBAAA;EAAA,mBACQ,sBAAA,EAAsB,aAAA,CAAA,UAAA,WAAA,OAAA;kDADd,SAAA,CAAA,OAAA;;;;;;;;;;;qBAER,sBAAA,EAAsB,sBAAA;EAAA,mBACtB,gBAAA,EAAgB,gBAAA;EAAA,SAEnB,YAAA,EAFmB,mBAAA,CAEP,kBAAA;AAAA;;;;;;ARP9B;;;;;;;;cSyBa,qBAAA,EAAqB,QAAA,CAAA,OAAA,CAQhC,QAAA,CARgC,MAAA"}
@@ -33,6 +33,7 @@ const verifications = $entity({
33
33
  version: db.version(),
34
34
  type: verificationTypeEnumSchema,
35
35
  target: t.text({ description: "Can be a phone (E.164 format) or email address" }),
36
+ purpose: db.default(t.text({ description: "Logical purpose bucket (e.g. 'default', 'password-reset'). Scopes the cooldown and daily-limit checks so unrelated flows that share the same (type, target) — most notably email verification and password reset — don't collide." }), "default"),
36
37
  code: t.text({ description: "Hashed verification token (n-digit code or UUID)" }),
37
38
  verifiedAt: t.optional(t.datetime({ description: "When it was successfully verified" })),
38
39
  attempts: db.default(t.integer({ description: "Number of failed attempts (to prevent brute-force)" }), 0)
@@ -148,7 +149,8 @@ var VerificationService = class {
148
149
  },
149
150
  where: {
150
151
  type: { eq: entry.type },
151
- target: { eq: entry.target }
152
+ target: { eq: entry.target },
153
+ purpose: { eq: entry.purpose ?? "default" }
152
154
  }
153
155
  });
154
156
  if (results.length === 0) {
@@ -178,6 +180,7 @@ var VerificationService = class {
178
180
  where: {
179
181
  type: { eq: entry.type },
180
182
  target: { eq: entry.target },
183
+ purpose: { eq: entry.purpose ?? "default" },
181
184
  createdAt: { gte: this.dateTimeProvider.now().startOf("day").toISOString() }
182
185
  }
183
186
  });
@@ -220,6 +223,7 @@ var VerificationService = class {
220
223
  const verification = await this.verificationRepository.create({
221
224
  type: entry.type,
222
225
  target: entry.target,
226
+ purpose: entry.purpose ?? "default",
223
227
  code: this.hashCode(token),
224
228
  createdAt: this.dateTimeProvider.nowISOString()
225
229
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/api/verifications/schemas/requestVerificationCodeResponseSchema.ts","../../../src/api/verifications/schemas/validateVerificationCodeResponseSchema.ts","../../../src/api/verifications/schemas/verificationTypeEnumSchema.ts","../../../src/api/verifications/entities/verifications.ts","../../../src/api/verifications/schemas/verificationSettingsSchema.ts","../../../src/api/verifications/parameters/VerificationParameters.ts","../../../src/api/verifications/services/VerificationService.ts","../../../src/api/verifications/controllers/VerificationController.ts","../../../src/api/verifications/jobs/VerificationJobs.ts","../../../src/api/verifications/index.ts"],"sourcesContent":["import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\n\nexport const requestVerificationCodeResponseSchema = t.object({\n token: t.string({\n description:\n \"The verification token (6-digit code for phone, UUID for email). The caller should send this to the user via their preferred notification method.\",\n }),\n codeExpiration: t.integer({\n description: \"Time in seconds before your verification token expires.\",\n }),\n verificationCooldown: t.integer({\n description:\n \"Cooldown period in seconds before you can request another verification.\",\n }),\n maxVerificationAttempts: t.integer({\n description:\n \"Maximum number of verification attempts allowed before the token is locked.\",\n }),\n});\n\nexport type RequestVerificationResponse = Static<\n typeof requestVerificationCodeResponseSchema\n>;\n","import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\n\nexport const validateVerificationCodeResponseSchema = t.object({\n ok: t.boolean({\n description: \"Indicates whether the verification was successful.\",\n }),\n alreadyVerified: t.optional(\n t.boolean({\n description: \"Indicates whether the target was already verified.\",\n }),\n ),\n});\n\nexport type ValidateVerificationCodeResponse = Static<\n typeof validateVerificationCodeResponseSchema\n>;\n","import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\n\nexport const verificationTypeEnumSchema = t.enum([\"code\", \"link\"]);\nexport type VerificationTypeEnum = Static<typeof verificationTypeEnumSchema>;\n","import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\nimport { $entity, db } from \"alepha/orm\";\nimport { verificationTypeEnumSchema } from \"../schemas/verificationTypeEnumSchema.ts\";\n\nexport const verifications = $entity({\n name: \"verification\",\n schema: t.object({\n id: db.primaryKey(t.bigint()),\n\n createdAt: db.createdAt(),\n\n updatedAt: db.updatedAt(),\n\n version: db.version(),\n\n type: verificationTypeEnumSchema,\n\n target: t.text({\n description: \"Can be a phone (E.164 format) or email address\",\n }),\n\n code: t.text({\n description: \"Hashed verification token (n-digit code or UUID)\",\n }),\n\n verifiedAt: t.optional(\n t.datetime({\n description: \"When it was successfully verified\",\n }),\n ),\n\n attempts: db.default(\n t.integer({\n description: \"Number of failed attempts (to prevent brute-force)\",\n }),\n 0,\n ),\n }),\n indexes: [\n \"createdAt\",\n {\n columns: [\"target\", \"code\"],\n },\n ],\n});\n\nexport const verificationEntitySchema = verifications.schema;\nexport const verificationEntityInsertSchema = verifications.insertSchema;\nexport type VerificationEntity = Static<typeof verifications.schema>;\n","import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\n\nexport const verificationSettingsSchema = t.object({\n code: t.object(\n {\n maxAttempts: t.integer({\n description:\n \"Maximum number of attempts before locking the verification.\",\n minimum: 1,\n maximum: 10,\n }),\n codeLength: t.integer({\n description: \"Length of the verification code.\",\n minimum: 4,\n maximum: 12,\n }),\n codeExpiration: t.integer({\n description: \"Time in seconds before the verification code expires.\",\n minimum: 60, // 1 minute\n maximum: 3600, // 1 hour\n }),\n verificationCooldown: t.integer({\n description: \"Cooldown period in seconds after a request verification.\",\n minimum: 0,\n maximum: 3600, // 1 hour\n }),\n limitPerDay: t.integer({\n description:\n \"Maximum number of verification requests per day for one entry.\",\n minimum: 1,\n maximum: 100,\n }),\n },\n {\n description: \"Settings specific to code verifications.\",\n },\n ),\n link: t.object(\n {\n maxAttempts: t.integer({\n description:\n \"Maximum number of attempts before locking the verification.\",\n minimum: 1,\n maximum: 10,\n }),\n codeExpiration: t.integer({\n description: \"Time in seconds before the verification token expires.\",\n minimum: 60, // 1 minute\n maximum: 7200, // 2 hours\n }),\n verificationCooldown: t.integer({\n description: \"Cooldown period in seconds after a request verification.\",\n minimum: 0,\n maximum: 3600, // 1 hour\n }),\n limitPerDay: t.integer({\n description:\n \"Maximum number of verification requests per day for one entry.\",\n minimum: 1,\n maximum: 100,\n }),\n },\n {\n description: \"Settings specific to link verifications.\",\n },\n ),\n purgeDays: t.integer({\n description:\n \"Number of days after which expired verifications are automatically deleted. Set to 0 to disable auto-deletion.\",\n minimum: 0,\n maximum: 365,\n }),\n});\n\nexport type VerificationSettings = Static<typeof verificationSettingsSchema>;\n","import { $atom, $state, type Static } from \"alepha\";\nimport {\n type VerificationSettings,\n verificationSettingsSchema,\n} from \"../schemas/verificationSettingsSchema.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n/**\n * Verification settings configuration atom\n */\nexport const verificationOptions = $atom({\n name: \"alepha.api.verifications.options\",\n schema: verificationSettingsSchema,\n default: {\n code: {\n maxAttempts: 5,\n codeLength: 6,\n codeExpiration: 300, // 5 minutes\n verificationCooldown: 90,\n limitPerDay: 10,\n },\n link: {\n maxAttempts: 3, // Lower since UUIDs are harder to guess\n codeExpiration: 1800, // 30 minutes\n verificationCooldown: 90,\n limitPerDay: 10,\n },\n purgeDays: 1,\n },\n});\n\nexport type VerificationOptions = Static<typeof verificationOptions.schema>;\n\ndeclare module \"alepha\" {\n interface State {\n [verificationOptions.key]: VerificationOptions;\n }\n}\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport class VerificationParameters {\n protected readonly options = $state(verificationOptions);\n\n public get<K extends keyof VerificationSettings>(\n key: K,\n ): VerificationSettings[K] {\n return this.options[key];\n }\n}\n","import { createHash, randomInt } from \"node:crypto\";\nimport { $inject } from \"alepha\";\nimport { CryptoProvider } from \"alepha/crypto\";\nimport { DateTimeProvider } from \"alepha/datetime\";\nimport { $logger } from \"alepha/logger\";\nimport { $repository } from \"alepha/orm\";\nimport { BadRequestError, NotFoundError } from \"alepha/server\";\nimport {\n type VerificationEntity,\n verifications,\n} from \"../entities/verifications.ts\";\nimport { VerificationParameters } from \"../parameters/VerificationParameters.ts\";\nimport type { RequestVerificationResponse } from \"../schemas/requestVerificationCodeResponseSchema.ts\";\nimport type { ValidateVerificationCodeResponse } from \"../schemas/validateVerificationCodeResponseSchema.ts\";\nimport type { VerificationTypeEnum } from \"../schemas/verificationTypeEnumSchema.ts\";\n\nexport class VerificationService {\n protected readonly log = $logger();\n protected readonly dateTimeProvider = $inject(DateTimeProvider);\n protected readonly crypto = $inject(CryptoProvider);\n protected readonly verificationParameters = $inject(VerificationParameters);\n protected readonly verificationRepository = $repository(verifications);\n\n public async findByEntry(\n entry: VerificationEntry,\n ): Promise<VerificationEntity> {\n this.log.trace(\"Finding verification by entry\", {\n type: entry.type,\n target: entry.target,\n });\n\n const results = await this.verificationRepository.findMany({\n limit: 1, // only need the most recent entry\n orderBy: {\n column: \"createdAt\",\n direction: \"desc\",\n },\n where: {\n type: { eq: entry.type },\n target: { eq: entry.target },\n },\n });\n\n if (results.length === 0) {\n this.log.debug(\"Verification entry not found\", {\n type: entry.type,\n target: entry.target,\n });\n throw new NotFoundError(\"Verification entry not found\");\n }\n\n this.log.debug(\"Verification entry found\", {\n id: results[0].id,\n type: entry.type,\n target: entry.target,\n });\n\n return results[0];\n }\n\n public findRecentsByEntry(entry: VerificationEntry) {\n this.log.trace(\"Finding recent verifications by entry\", {\n type: entry.type,\n target: entry.target,\n });\n\n return this.verificationRepository.findMany({\n orderBy: {\n column: \"createdAt\",\n direction: \"desc\",\n },\n where: {\n type: { eq: entry.type },\n target: { eq: entry.target },\n createdAt: {\n gte: this.dateTimeProvider.now().startOf(\"day\").toISOString(),\n },\n },\n });\n }\n\n /**\n * Creates a verification entry and returns the token.\n * The caller is responsible for sending notifications with the token.\n * This allows for context-specific notifications (e.g., password reset vs email verification).\n */\n public async createVerification(\n entry: VerificationEntry,\n ): Promise<RequestVerificationResponse> {\n this.log.trace(\"Creating verification\", {\n type: entry.type,\n target: entry.target,\n });\n\n const settings = this.verificationParameters.get(entry.type);\n\n const recents = await this.findRecentsByEntry(entry);\n if (recents.length >= settings.limitPerDay) {\n this.log.warn(\"Daily verification limit reached\", {\n type: entry.type,\n target: entry.target,\n limit: settings.limitPerDay,\n count: recents.length,\n });\n throw new BadRequestError(\n `Maximum number of verification requests per day reached (${settings.limitPerDay})`,\n );\n }\n\n const existingVerification = recents[0];\n if (existingVerification) {\n const nowSec = this.dateTimeProvider.now().unix();\n const createdAtSec = this.dateTimeProvider\n .of(existingVerification.createdAt)\n .unix();\n\n const diffSec = nowSec - createdAtSec;\n if (diffSec < settings.verificationCooldown) {\n const remainingCooldown = Math.floor(\n settings.verificationCooldown - diffSec,\n );\n this.log.debug(\"Verification on cooldown\", {\n type: entry.type,\n target: entry.target,\n remainingSeconds: remainingCooldown,\n });\n throw new BadRequestError(\n `Verification is on cooldown for ${remainingCooldown} seconds`,\n );\n }\n }\n\n const token = this.generateToken(entry.type);\n\n const verification = await this.verificationRepository.create({\n type: entry.type,\n target: entry.target,\n code: this.hashCode(token),\n createdAt: this.dateTimeProvider.nowISOString(),\n });\n\n this.log.info(\"Verification created\", {\n id: verification.id,\n type: entry.type,\n target: entry.target,\n expiresInSeconds: settings.codeExpiration,\n });\n\n return {\n token,\n codeExpiration: settings.codeExpiration,\n verificationCooldown: settings.verificationCooldown,\n maxVerificationAttempts: settings.maxAttempts,\n };\n }\n\n public async verifyCode(\n entry: VerificationEntry,\n code: string,\n ): Promise<ValidateVerificationCodeResponse> {\n this.log.trace(\"Verifying code\", {\n type: entry.type,\n target: entry.target,\n });\n\n const settings = this.verificationParameters.get(entry.type);\n\n const verification = await this.findByEntry(entry);\n if (verification.verifiedAt) {\n this.log.debug(\"Verification already verified\", {\n id: verification.id,\n type: entry.type,\n target: entry.target,\n verifiedAt: verification.verifiedAt,\n });\n return { ok: true, alreadyVerified: true };\n }\n\n // DO NOT DELETE THE VERIFICATION WHEN IT IS REJECTED,\n // or we won't be able to cooldown the verification\n\n const now = this.dateTimeProvider.now();\n const expirationDate = this.dateTimeProvider\n .of(verification.createdAt)\n .add(settings.codeExpiration, \"seconds\");\n\n if (now > expirationDate) {\n this.log.warn(\"Verification code expired\", {\n id: verification.id,\n type: entry.type,\n target: entry.target,\n createdAt: verification.createdAt,\n expiredAt: expirationDate.toISOString(),\n });\n throw new BadRequestError(\"Verification code has expired\");\n }\n\n if (verification.attempts >= settings.maxAttempts) {\n this.log.warn(\"Verification locked due to max attempts\", {\n id: verification.id,\n type: entry.type,\n target: entry.target,\n attempts: verification.attempts,\n maxAttempts: settings.maxAttempts,\n });\n throw new BadRequestError(\n \"Maximum number of attempts reached - verification is locked\",\n );\n }\n\n if (verification.code !== this.hashCode(code)) {\n const newAttempts = verification.attempts + 1;\n this.log.warn(\"Invalid verification code\", {\n id: verification.id,\n type: entry.type,\n target: entry.target,\n attempts: newAttempts,\n maxAttempts: settings.maxAttempts,\n });\n await this.verificationRepository.updateById(verification.id, {\n attempts: newAttempts,\n });\n throw new BadRequestError(\"Invalid verification code\");\n }\n\n await this.verificationRepository.updateById(verification.id, {\n verifiedAt: this.dateTimeProvider.nowISOString(),\n });\n\n this.log.info(\"Verification code verified\", {\n id: verification.id,\n type: entry.type,\n target: entry.target,\n });\n\n return { ok: true };\n }\n\n public hashCode(code: string): string {\n return createHash(\"sha256\").update(code).digest(\"hex\");\n }\n\n public generateToken(type: VerificationTypeEnum): string {\n if (type === \"code\") {\n const settings = this.verificationParameters.get(\"code\");\n return randomInt(0, 1_000_000)\n .toString()\n .padStart(settings.codeLength, \"0\");\n } else if (type === \"link\") {\n return this.crypto.randomUUID();\n }\n\n throw new BadRequestError(`Invalid verification type: ${type}`);\n }\n}\n\nexport interface VerificationEntry {\n type: VerificationTypeEnum;\n target: string;\n}\n","import { $inject, t } from \"alepha\";\nimport { $action } from \"alepha/server\";\nimport { requestVerificationCodeResponseSchema } from \"../schemas/requestVerificationCodeResponseSchema.ts\";\nimport { validateVerificationCodeResponseSchema } from \"../schemas/validateVerificationCodeResponseSchema.ts\";\nimport { verificationTypeEnumSchema } from \"../schemas/verificationTypeEnumSchema.ts\";\nimport { VerificationService } from \"../services/VerificationService.ts\";\n\nexport class VerificationController {\n protected readonly verificationService = $inject(VerificationService);\n\n public readonly url = \"/verifications\";\n public readonly group = \"verifications\";\n\n public readonly requestVerificationCode = $action({\n path: `${this.url}/:type`,\n group: this.group,\n method: \"POST\",\n schema: {\n params: t.object({\n type: verificationTypeEnumSchema,\n }),\n body: t.object({\n target: t.text(),\n }),\n response: requestVerificationCodeResponseSchema,\n },\n handler: async ({ body, params }) => {\n return await this.verificationService.createVerification({\n type: params.type,\n target: body.target,\n });\n },\n });\n\n public readonly validateVerificationCode = $action({\n path: `${this.url}/:type/validate`,\n group: this.group,\n method: \"POST\",\n schema: {\n params: t.object({\n type: verificationTypeEnumSchema,\n }),\n body: t.object({\n target: t.text(),\n token: t.text({\n description:\n \"The verification token (6-digit code for phone, UUID for email).\",\n }),\n }),\n response: validateVerificationCodeResponseSchema,\n },\n handler: async ({ body, params }) => {\n return this.verificationService.verifyCode(\n {\n type: params.type,\n target: body.target,\n },\n body.token,\n );\n },\n });\n}\n","import { $inject } from \"alepha\";\nimport { DateTimeProvider } from \"alepha/datetime\";\nimport { $repository } from \"alepha/orm\";\nimport { $scheduler } from \"alepha/scheduler\";\nimport { verifications } from \"../entities/verifications.ts\";\nimport { VerificationParameters } from \"../parameters/VerificationParameters.ts\";\n\nexport class VerificationJobs {\n protected readonly verificationRepository = $repository(verifications);\n protected readonly verificationParameters = $inject(VerificationParameters);\n protected readonly dateTimeProvider = $inject(DateTimeProvider);\n\n public readonly cleanExpired = $scheduler({\n name: \"api:verifications:cleanExpired\",\n cron: \"0 * * * *\", // Hourly at minute 0\n description: \"Clean expired verifications\",\n handler: async () => {\n const purgeDays = this.verificationParameters.get(\"purgeDays\");\n if (purgeDays <= 0) {\n return; // Auto deletion is disabled\n }\n\n const dayMs = 24 * 60 * 60 * 1000;\n const purgeThreshold =\n this.dateTimeProvider.nowMillis() - purgeDays * dayMs;\n\n await this.verificationRepository.deleteMany({\n createdAt: {\n lt: this.dateTimeProvider.of(purgeThreshold).toISOString(),\n },\n });\n },\n });\n}\n","import { $module } from \"alepha\";\nimport { VerificationController } from \"./controllers/VerificationController.ts\";\nimport { VerificationJobs } from \"./jobs/VerificationJobs.ts\";\nimport { VerificationParameters } from \"./parameters/VerificationParameters.ts\";\nimport { VerificationService } from \"./services/VerificationService.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport * from \"./controllers/VerificationController.ts\";\nexport * from \"./entities/verifications.ts\";\nexport * from \"./jobs/VerificationJobs.ts\";\nexport * from \"./parameters/VerificationParameters.ts\";\nexport * from \"./schemas/requestVerificationCodeResponseSchema.ts\";\nexport * from \"./schemas/validateVerificationCodeResponseSchema.ts\";\nexport * from \"./schemas/verificationTypeEnumSchema.ts\";\nexport * from \"./services/VerificationService.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n/**\n * Email and phone verification workflows.\n *\n * **Features:**\n * - Verification token generation\n * - Verification code sending\n * - Verification completion tracking\n * - Resend functionality\n *\n * @module alepha.api.verifications\n */\nexport const AlephaApiVerification = $module({\n name: \"alepha.api.verifications\",\n services: [\n VerificationController,\n VerificationJobs,\n VerificationService,\n VerificationParameters,\n ],\n});\n"],"mappings":";;;;;;;;;AAGA,MAAa,wCAAwC,EAAE,OAAO;CAC5D,OAAO,EAAE,OAAO,EACd,aACE,qJACH,CAAC;CACF,gBAAgB,EAAE,QAAQ,EACxB,aAAa,2DACd,CAAC;CACF,sBAAsB,EAAE,QAAQ,EAC9B,aACE,2EACH,CAAC;CACF,yBAAyB,EAAE,QAAQ,EACjC,aACE,+EACH,CAAC;CACH,CAAC;;;AChBF,MAAa,yCAAyC,EAAE,OAAO;CAC7D,IAAI,EAAE,QAAQ,EACZ,aAAa,sDACd,CAAC;CACF,iBAAiB,EAAE,SACjB,EAAE,QAAQ,EACR,aAAa,sDACd,CAAC,CACH;CACF,CAAC;;;ACTF,MAAa,6BAA6B,EAAE,KAAK,CAAC,QAAQ,OAAO,CAAC;;;ACElE,MAAa,gBAAgB,QAAQ;CACnC,MAAM;CACN,QAAQ,EAAE,OAAO;EACf,IAAI,GAAG,WAAW,EAAE,QAAQ,CAAC;EAE7B,WAAW,GAAG,WAAW;EAEzB,WAAW,GAAG,WAAW;EAEzB,SAAS,GAAG,SAAS;EAErB,MAAM;EAEN,QAAQ,EAAE,KAAK,EACb,aAAa,kDACd,CAAC;EAEF,MAAM,EAAE,KAAK,EACX,aAAa,oDACd,CAAC;EAEF,YAAY,EAAE,SACZ,EAAE,SAAS,EACT,aAAa,qCACd,CAAC,CACH;EAED,UAAU,GAAG,QACX,EAAE,QAAQ,EACR,aAAa,sDACd,CAAC,EACF,EACD;EACF,CAAC;CACF,SAAS,CACP,aACA,EACE,SAAS,CAAC,UAAU,OAAO,EAC5B,CACF;C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ACN;;EAEJ,CAAC;;;;ACrDJ,IAAa,mBAAb,MAA8B;CAC5B,yBAA4C,YAAY,cAAc;CACtE,yBAA4C,QAAQ,uBAAuB;CAC3E,mBAAsC,QAAQ,iBAAiB;CAE/D,eAA+B,WAAW;EACxC,MAAM;EACN,MAAM;EACN,aAAa;EACb,SAAS,YAAY;GACnB,MAAM,YAAY,KAAK,uBAAuB,IAAI,YAAY;GAC9D,IAAI,aAAa,GACf;GAIF,MAAM,iBACJ,KAAK,iBAAiB,WAAW,GAAG,aAFxB,OAAU,KAAK;GAI7B,MAAM,KAAK,uBAAuB,WAAW,EAC3C,WAAW,EACT,IAAI,KAAK,iBAAiB,GAAG,eAAe,CAAC,aAAa,EAC3D,EACF,CAAC;;EAEL,CAAC;;;;;;;;;;;;;;;ACFJ,MAAa,wBAAwB,QAAQ;CAC3C,MAAM;CACN,UAAU;EACR;EACA;EACA;EACA;EACD;CACF,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/api/verifications/schemas/requestVerificationCodeResponseSchema.ts","../../../src/api/verifications/schemas/validateVerificationCodeResponseSchema.ts","../../../src/api/verifications/schemas/verificationTypeEnumSchema.ts","../../../src/api/verifications/entities/verifications.ts","../../../src/api/verifications/schemas/verificationSettingsSchema.ts","../../../src/api/verifications/parameters/VerificationParameters.ts","../../../src/api/verifications/services/VerificationService.ts","../../../src/api/verifications/controllers/VerificationController.ts","../../../src/api/verifications/jobs/VerificationJobs.ts","../../../src/api/verifications/index.ts"],"sourcesContent":["import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\n\nexport const requestVerificationCodeResponseSchema = t.object({\n token: t.string({\n description:\n \"The verification token (6-digit code for phone, UUID for email). The caller should send this to the user via their preferred notification method.\",\n }),\n codeExpiration: t.integer({\n description: \"Time in seconds before your verification token expires.\",\n }),\n verificationCooldown: t.integer({\n description:\n \"Cooldown period in seconds before you can request another verification.\",\n }),\n maxVerificationAttempts: t.integer({\n description:\n \"Maximum number of verification attempts allowed before the token is locked.\",\n }),\n});\n\nexport type RequestVerificationResponse = Static<\n typeof requestVerificationCodeResponseSchema\n>;\n","import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\n\nexport const validateVerificationCodeResponseSchema = t.object({\n ok: t.boolean({\n description: \"Indicates whether the verification was successful.\",\n }),\n alreadyVerified: t.optional(\n t.boolean({\n description: \"Indicates whether the target was already verified.\",\n }),\n ),\n});\n\nexport type ValidateVerificationCodeResponse = Static<\n typeof validateVerificationCodeResponseSchema\n>;\n","import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\n\nexport const verificationTypeEnumSchema = t.enum([\"code\", \"link\"]);\nexport type VerificationTypeEnum = Static<typeof verificationTypeEnumSchema>;\n","import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\nimport { $entity, db } from \"alepha/orm\";\nimport { verificationTypeEnumSchema } from \"../schemas/verificationTypeEnumSchema.ts\";\n\nexport const verifications = $entity({\n name: \"verification\",\n schema: t.object({\n id: db.primaryKey(t.bigint()),\n\n createdAt: db.createdAt(),\n\n updatedAt: db.updatedAt(),\n\n version: db.version(),\n\n type: verificationTypeEnumSchema,\n\n target: t.text({\n description: \"Can be a phone (E.164 format) or email address\",\n }),\n\n purpose: db.default(\n t.text({\n description:\n \"Logical purpose bucket (e.g. 'default', 'password-reset'). Scopes the cooldown and daily-limit checks so unrelated flows that share the same (type, target) — most notably email verification and password reset — don't collide.\",\n }),\n \"default\",\n ),\n\n code: t.text({\n description: \"Hashed verification token (n-digit code or UUID)\",\n }),\n\n verifiedAt: t.optional(\n t.datetime({\n description: \"When it was successfully verified\",\n }),\n ),\n\n attempts: db.default(\n t.integer({\n description: \"Number of failed attempts (to prevent brute-force)\",\n }),\n 0,\n ),\n }),\n indexes: [\n \"createdAt\",\n {\n columns: [\"target\", \"code\"],\n },\n ],\n});\n\nexport const verificationEntitySchema = verifications.schema;\nexport const verificationEntityInsertSchema = verifications.insertSchema;\nexport type VerificationEntity = Static<typeof verifications.schema>;\n","import type { Static } from \"alepha\";\nimport { t } from \"alepha\";\n\nexport const verificationSettingsSchema = t.object({\n code: t.object(\n {\n maxAttempts: t.integer({\n description:\n \"Maximum number of attempts before locking the verification.\",\n minimum: 1,\n maximum: 10,\n }),\n codeLength: t.integer({\n description: \"Length of the verification code.\",\n minimum: 4,\n maximum: 12,\n }),\n codeExpiration: t.integer({\n description: \"Time in seconds before the verification code expires.\",\n minimum: 60, // 1 minute\n maximum: 3600, // 1 hour\n }),\n verificationCooldown: t.integer({\n description: \"Cooldown period in seconds after a request verification.\",\n minimum: 0,\n maximum: 3600, // 1 hour\n }),\n limitPerDay: t.integer({\n description:\n \"Maximum number of verification requests per day for one entry.\",\n minimum: 1,\n maximum: 100,\n }),\n },\n {\n description: \"Settings specific to code verifications.\",\n },\n ),\n link: t.object(\n {\n maxAttempts: t.integer({\n description:\n \"Maximum number of attempts before locking the verification.\",\n minimum: 1,\n maximum: 10,\n }),\n codeExpiration: t.integer({\n description: \"Time in seconds before the verification token expires.\",\n minimum: 60, // 1 minute\n maximum: 7200, // 2 hours\n }),\n verificationCooldown: t.integer({\n description: \"Cooldown period in seconds after a request verification.\",\n minimum: 0,\n maximum: 3600, // 1 hour\n }),\n limitPerDay: t.integer({\n description:\n \"Maximum number of verification requests per day for one entry.\",\n minimum: 1,\n maximum: 100,\n }),\n },\n {\n description: \"Settings specific to link verifications.\",\n },\n ),\n purgeDays: t.integer({\n description:\n \"Number of days after which expired verifications are automatically deleted. Set to 0 to disable auto-deletion.\",\n minimum: 0,\n maximum: 365,\n }),\n});\n\nexport type VerificationSettings = Static<typeof verificationSettingsSchema>;\n","import { $atom, $state, type Static } from \"alepha\";\nimport {\n type VerificationSettings,\n verificationSettingsSchema,\n} from \"../schemas/verificationSettingsSchema.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n/**\n * Verification settings configuration atom\n */\nexport const verificationOptions = $atom({\n name: \"alepha.api.verifications.options\",\n schema: verificationSettingsSchema,\n default: {\n code: {\n maxAttempts: 5,\n codeLength: 6,\n codeExpiration: 300, // 5 minutes\n verificationCooldown: 90,\n limitPerDay: 10,\n },\n link: {\n maxAttempts: 3, // Lower since UUIDs are harder to guess\n codeExpiration: 1800, // 30 minutes\n verificationCooldown: 90,\n limitPerDay: 10,\n },\n purgeDays: 1,\n },\n});\n\nexport type VerificationOptions = Static<typeof verificationOptions.schema>;\n\ndeclare module \"alepha\" {\n interface State {\n [verificationOptions.key]: VerificationOptions;\n }\n}\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport class VerificationParameters {\n protected readonly options = $state(verificationOptions);\n\n public get<K extends keyof VerificationSettings>(\n key: K,\n ): VerificationSettings[K] {\n return this.options[key];\n }\n}\n","import { createHash, randomInt } from \"node:crypto\";\nimport { $inject } from \"alepha\";\nimport { CryptoProvider } from \"alepha/crypto\";\nimport { DateTimeProvider } from \"alepha/datetime\";\nimport { $logger } from \"alepha/logger\";\nimport { $repository } from \"alepha/orm\";\nimport { BadRequestError, NotFoundError } from \"alepha/server\";\nimport {\n type VerificationEntity,\n verifications,\n} from \"../entities/verifications.ts\";\nimport { VerificationParameters } from \"../parameters/VerificationParameters.ts\";\nimport type { RequestVerificationResponse } from \"../schemas/requestVerificationCodeResponseSchema.ts\";\nimport type { ValidateVerificationCodeResponse } from \"../schemas/validateVerificationCodeResponseSchema.ts\";\nimport type { VerificationTypeEnum } from \"../schemas/verificationTypeEnumSchema.ts\";\n\nexport class VerificationService {\n protected readonly log = $logger();\n protected readonly dateTimeProvider = $inject(DateTimeProvider);\n protected readonly crypto = $inject(CryptoProvider);\n protected readonly verificationParameters = $inject(VerificationParameters);\n protected readonly verificationRepository = $repository(verifications);\n\n public async findByEntry(\n entry: VerificationEntry,\n ): Promise<VerificationEntity> {\n this.log.trace(\"Finding verification by entry\", {\n type: entry.type,\n target: entry.target,\n });\n\n const results = await this.verificationRepository.findMany({\n limit: 1, // only need the most recent entry\n orderBy: {\n column: \"createdAt\",\n direction: \"desc\",\n },\n where: {\n type: { eq: entry.type },\n target: { eq: entry.target },\n purpose: { eq: entry.purpose ?? \"default\" },\n },\n });\n\n if (results.length === 0) {\n this.log.debug(\"Verification entry not found\", {\n type: entry.type,\n target: entry.target,\n });\n throw new NotFoundError(\"Verification entry not found\");\n }\n\n this.log.debug(\"Verification entry found\", {\n id: results[0].id,\n type: entry.type,\n target: entry.target,\n });\n\n return results[0];\n }\n\n public findRecentsByEntry(entry: VerificationEntry) {\n this.log.trace(\"Finding recent verifications by entry\", {\n type: entry.type,\n target: entry.target,\n });\n\n return this.verificationRepository.findMany({\n orderBy: {\n column: \"createdAt\",\n direction: \"desc\",\n },\n where: {\n type: { eq: entry.type },\n target: { eq: entry.target },\n purpose: { eq: entry.purpose ?? \"default\" },\n createdAt: {\n gte: this.dateTimeProvider.now().startOf(\"day\").toISOString(),\n },\n },\n });\n }\n\n /**\n * Creates a verification entry and returns the token.\n * The caller is responsible for sending notifications with the token.\n * This allows for context-specific notifications (e.g., password reset vs email verification).\n */\n public async createVerification(\n entry: VerificationEntry,\n ): Promise<RequestVerificationResponse> {\n this.log.trace(\"Creating verification\", {\n type: entry.type,\n target: entry.target,\n });\n\n const settings = this.verificationParameters.get(entry.type);\n\n const recents = await this.findRecentsByEntry(entry);\n if (recents.length >= settings.limitPerDay) {\n this.log.warn(\"Daily verification limit reached\", {\n type: entry.type,\n target: entry.target,\n limit: settings.limitPerDay,\n count: recents.length,\n });\n throw new BadRequestError(\n `Maximum number of verification requests per day reached (${settings.limitPerDay})`,\n );\n }\n\n const existingVerification = recents[0];\n if (existingVerification) {\n const nowSec = this.dateTimeProvider.now().unix();\n const createdAtSec = this.dateTimeProvider\n .of(existingVerification.createdAt)\n .unix();\n\n const diffSec = nowSec - createdAtSec;\n if (diffSec < settings.verificationCooldown) {\n const remainingCooldown = Math.floor(\n settings.verificationCooldown - diffSec,\n );\n this.log.debug(\"Verification on cooldown\", {\n type: entry.type,\n target: entry.target,\n remainingSeconds: remainingCooldown,\n });\n throw new BadRequestError(\n `Verification is on cooldown for ${remainingCooldown} seconds`,\n );\n }\n }\n\n const token = this.generateToken(entry.type);\n\n const verification = await this.verificationRepository.create({\n type: entry.type,\n target: entry.target,\n purpose: entry.purpose ?? \"default\",\n code: this.hashCode(token),\n createdAt: this.dateTimeProvider.nowISOString(),\n });\n\n this.log.info(\"Verification created\", {\n id: verification.id,\n type: entry.type,\n target: entry.target,\n expiresInSeconds: settings.codeExpiration,\n });\n\n return {\n token,\n codeExpiration: settings.codeExpiration,\n verificationCooldown: settings.verificationCooldown,\n maxVerificationAttempts: settings.maxAttempts,\n };\n }\n\n public async verifyCode(\n entry: VerificationEntry,\n code: string,\n ): Promise<ValidateVerificationCodeResponse> {\n this.log.trace(\"Verifying code\", {\n type: entry.type,\n target: entry.target,\n });\n\n const settings = this.verificationParameters.get(entry.type);\n\n const verification = await this.findByEntry(entry);\n if (verification.verifiedAt) {\n this.log.debug(\"Verification already verified\", {\n id: verification.id,\n type: entry.type,\n target: entry.target,\n verifiedAt: verification.verifiedAt,\n });\n return { ok: true, alreadyVerified: true };\n }\n\n // DO NOT DELETE THE VERIFICATION WHEN IT IS REJECTED,\n // or we won't be able to cooldown the verification\n\n const now = this.dateTimeProvider.now();\n const expirationDate = this.dateTimeProvider\n .of(verification.createdAt)\n .add(settings.codeExpiration, \"seconds\");\n\n if (now > expirationDate) {\n this.log.warn(\"Verification code expired\", {\n id: verification.id,\n type: entry.type,\n target: entry.target,\n createdAt: verification.createdAt,\n expiredAt: expirationDate.toISOString(),\n });\n throw new BadRequestError(\"Verification code has expired\");\n }\n\n if (verification.attempts >= settings.maxAttempts) {\n this.log.warn(\"Verification locked due to max attempts\", {\n id: verification.id,\n type: entry.type,\n target: entry.target,\n attempts: verification.attempts,\n maxAttempts: settings.maxAttempts,\n });\n throw new BadRequestError(\n \"Maximum number of attempts reached - verification is locked\",\n );\n }\n\n if (verification.code !== this.hashCode(code)) {\n const newAttempts = verification.attempts + 1;\n this.log.warn(\"Invalid verification code\", {\n id: verification.id,\n type: entry.type,\n target: entry.target,\n attempts: newAttempts,\n maxAttempts: settings.maxAttempts,\n });\n await this.verificationRepository.updateById(verification.id, {\n attempts: newAttempts,\n });\n throw new BadRequestError(\"Invalid verification code\");\n }\n\n await this.verificationRepository.updateById(verification.id, {\n verifiedAt: this.dateTimeProvider.nowISOString(),\n });\n\n this.log.info(\"Verification code verified\", {\n id: verification.id,\n type: entry.type,\n target: entry.target,\n });\n\n return { ok: true };\n }\n\n public hashCode(code: string): string {\n return createHash(\"sha256\").update(code).digest(\"hex\");\n }\n\n public generateToken(type: VerificationTypeEnum): string {\n if (type === \"code\") {\n const settings = this.verificationParameters.get(\"code\");\n return randomInt(0, 1_000_000)\n .toString()\n .padStart(settings.codeLength, \"0\");\n } else if (type === \"link\") {\n return this.crypto.randomUUID();\n }\n\n throw new BadRequestError(`Invalid verification type: ${type}`);\n }\n}\n\nexport interface VerificationEntry {\n type: VerificationTypeEnum;\n target: string;\n\n /**\n * Logical purpose bucket. Cooldown and daily-limit checks are scoped to\n * `(type, target, purpose)`, so flows that share a `(type, target)` pair\n * — e.g. email verification and password reset, both `type: \"code\"` on the\n * same email — get independent rate-limit windows instead of colliding.\n *\n * Defaults to `\"default\"` when omitted (back-compatible with callers and\n * rows that predate this field).\n */\n purpose?: string;\n}\n","import { $inject, t } from \"alepha\";\nimport { $action } from \"alepha/server\";\nimport { requestVerificationCodeResponseSchema } from \"../schemas/requestVerificationCodeResponseSchema.ts\";\nimport { validateVerificationCodeResponseSchema } from \"../schemas/validateVerificationCodeResponseSchema.ts\";\nimport { verificationTypeEnumSchema } from \"../schemas/verificationTypeEnumSchema.ts\";\nimport { VerificationService } from \"../services/VerificationService.ts\";\n\nexport class VerificationController {\n protected readonly verificationService = $inject(VerificationService);\n\n public readonly url = \"/verifications\";\n public readonly group = \"verifications\";\n\n public readonly requestVerificationCode = $action({\n path: `${this.url}/:type`,\n group: this.group,\n method: \"POST\",\n schema: {\n params: t.object({\n type: verificationTypeEnumSchema,\n }),\n body: t.object({\n target: t.text(),\n }),\n response: requestVerificationCodeResponseSchema,\n },\n handler: async ({ body, params }) => {\n return await this.verificationService.createVerification({\n type: params.type,\n target: body.target,\n });\n },\n });\n\n public readonly validateVerificationCode = $action({\n path: `${this.url}/:type/validate`,\n group: this.group,\n method: \"POST\",\n schema: {\n params: t.object({\n type: verificationTypeEnumSchema,\n }),\n body: t.object({\n target: t.text(),\n token: t.text({\n description:\n \"The verification token (6-digit code for phone, UUID for email).\",\n }),\n }),\n response: validateVerificationCodeResponseSchema,\n },\n handler: async ({ body, params }) => {\n return this.verificationService.verifyCode(\n {\n type: params.type,\n target: body.target,\n },\n body.token,\n );\n },\n });\n}\n","import { $inject } from \"alepha\";\nimport { DateTimeProvider } from \"alepha/datetime\";\nimport { $repository } from \"alepha/orm\";\nimport { $scheduler } from \"alepha/scheduler\";\nimport { verifications } from \"../entities/verifications.ts\";\nimport { VerificationParameters } from \"../parameters/VerificationParameters.ts\";\n\nexport class VerificationJobs {\n protected readonly verificationRepository = $repository(verifications);\n protected readonly verificationParameters = $inject(VerificationParameters);\n protected readonly dateTimeProvider = $inject(DateTimeProvider);\n\n public readonly cleanExpired = $scheduler({\n name: \"api:verifications:cleanExpired\",\n cron: \"0 * * * *\", // Hourly at minute 0\n description: \"Clean expired verifications\",\n handler: async () => {\n const purgeDays = this.verificationParameters.get(\"purgeDays\");\n if (purgeDays <= 0) {\n return; // Auto deletion is disabled\n }\n\n const dayMs = 24 * 60 * 60 * 1000;\n const purgeThreshold =\n this.dateTimeProvider.nowMillis() - purgeDays * dayMs;\n\n await this.verificationRepository.deleteMany({\n createdAt: {\n lt: this.dateTimeProvider.of(purgeThreshold).toISOString(),\n },\n });\n },\n });\n}\n","import { $module } from \"alepha\";\nimport { VerificationController } from \"./controllers/VerificationController.ts\";\nimport { VerificationJobs } from \"./jobs/VerificationJobs.ts\";\nimport { VerificationParameters } from \"./parameters/VerificationParameters.ts\";\nimport { VerificationService } from \"./services/VerificationService.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport * from \"./controllers/VerificationController.ts\";\nexport * from \"./entities/verifications.ts\";\nexport * from \"./jobs/VerificationJobs.ts\";\nexport * from \"./parameters/VerificationParameters.ts\";\nexport * from \"./schemas/requestVerificationCodeResponseSchema.ts\";\nexport * from \"./schemas/validateVerificationCodeResponseSchema.ts\";\nexport * from \"./schemas/verificationTypeEnumSchema.ts\";\nexport * from \"./services/VerificationService.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n/**\n * Email and phone verification workflows.\n *\n * **Features:**\n * - Verification token generation\n * - Verification code sending\n * - Verification completion tracking\n * - Resend functionality\n *\n * @module alepha.api.verifications\n */\nexport const AlephaApiVerification = $module({\n name: \"alepha.api.verifications\",\n services: [\n VerificationController,\n VerificationJobs,\n VerificationService,\n VerificationParameters,\n ],\n});\n"],"mappings":";;;;;;;;;AAGA,MAAa,wCAAwC,EAAE,OAAO;CAC5D,OAAO,EAAE,OAAO,EACd,aACE,qJACH,CAAC;CACF,gBAAgB,EAAE,QAAQ,EACxB,aAAa,2DACd,CAAC;CACF,sBAAsB,EAAE,QAAQ,EAC9B,aACE,2EACH,CAAC;CACF,yBAAyB,EAAE,QAAQ,EACjC,aACE,+EACH,CAAC;CACH,CAAC;;;AChBF,MAAa,yCAAyC,EAAE,OAAO;CAC7D,IAAI,EAAE,QAAQ,EACZ,aAAa,sDACd,CAAC;CACF,iBAAiB,EAAE,SACjB,EAAE,QAAQ,EACR,aAAa,sDACd,CAAC,CACH;CACF,CAAC;;;ACTF,MAAa,6BAA6B,EAAE,KAAK,CAAC,QAAQ,OAAO,CAAC;;;ACElE,MAAa,gBAAgB,QAAQ;CACnC,MAAM;CACN,QAAQ,EAAE,OAAO;EACf,IAAI,GAAG,WAAW,EAAE,QAAQ,CAAC;EAE7B,WAAW,GAAG,WAAW;EAEzB,WAAW,GAAG,WAAW;EAEzB,SAAS,GAAG,SAAS;EAErB,MAAM;EAEN,QAAQ,EAAE,KAAK,EACb,aA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B;IACvD,MAAM,OAAO;IACb,QAAQ,KAAK;IACd,CAAC;;EAEL,CAAC;CAEF,2BAA2C,QAAQ;EACjD,MAAM,GAAG,KAAK,IAAI;EAClB,OAAO,KAAK;EACZ,QAAQ;EACR,QAAQ;GACN,QAAQ,EAAE,OAAO,EACf,MAAM,4BACP,CAAC;GACF,MAAM,EAAE,OAAO;IACb,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,KAAK,EACZ,aACE,oEACH,CAAC;IACH,CAAC;GACF,UAAU;GACX;EACD,SAAS,OAAO,EAAE,MAAM,aAAa;GACnC,OAAO,KAAK,oBAAoB,WAC9B;IACE,MAAM,OAAO;IACb,QAAQ,KAAK;IACd,EACD,KAAK,MACN;;EAEJ,CAAC;;;;ACrDJ,IAAa,mBAAb,MAA8B;CAC5B,yBAA4C,YAAY,cAAc;CACtE,yBAA4C,QAAQ,uBAAuB;CAC3E,mBAAsC,QAAQ,iBAAiB;CAE/D,eAA+B,WAAW;EACxC,MAAM;EACN,MAAM;EACN,aAAa;EACb,SAAS,YAAY;GACnB,MAAM,YAAY,KAAK,uBAAuB,IAAI,YAAY;GAC9D,IAAI,aAAa,GACf;GAIF,MAAM,iBACJ,KAAK,iBAAiB,WAAW,GAAG,aAFxB,OAAU,KAAK;GAI7B,MAAM,KAAK,uBAAuB,WAAW,EAC3C,WAAW,EACT,IAAI,KAAK,iBAAiB,GAAG,eAAe,CAAC,aAAa,EAC3D,EACF,CAAC;;EAEL,CAAC;;;;;;;;;;;;;;;ACFJ,MAAa,wBAAwB,QAAQ;CAC3C,MAAM;CACN,UAAU;EACR;EACA;EACA;EACA;EACD;CACF,CAAC"}
@@ -247,6 +247,12 @@ declare const alephaPackageJson: {
247
247
  import: string;
248
248
  default: string;
249
249
  };
250
+ "./containers": {
251
+ types: string;
252
+ workerd: string;
253
+ import: string;
254
+ default: string;
255
+ };
250
256
  ".": {
251
257
  types: string;
252
258
  "react-native": string;
@@ -272,6 +278,11 @@ declare const alephaPackageJson: {
272
278
  import: string;
273
279
  default: string;
274
280
  };
281
+ "./email/cloudflare": {
282
+ types: string;
283
+ import: string;
284
+ default: string;
285
+ };
275
286
  "./email": {
276
287
  types: string;
277
288
  workerd: string;
@@ -660,6 +671,12 @@ declare const alephaPackageJson: {
660
671
  import: string;
661
672
  default: string;
662
673
  };
674
+ "./containers": {
675
+ types: string;
676
+ workerd: string;
677
+ import: string;
678
+ default: string;
679
+ };
663
680
  ".": {
664
681
  types: string;
665
682
  "react-native": string;
@@ -685,6 +702,11 @@ declare const alephaPackageJson: {
685
702
  import: string;
686
703
  default: string;
687
704
  };
705
+ "./email/cloudflare": {
706
+ types: string;
707
+ import: string;
708
+ default: string;
709
+ };
688
710
  "./email": {
689
711
  types: string;
690
712
  workerd: string;
@@ -1047,6 +1069,20 @@ declare const buildOptions: _$alepha.Atom<_$typebox.TObject<{
1047
1069
  * @default "bun" for bun runtime
1048
1070
  */
1049
1071
  command: _$typebox.TOptional<_$typebox.TString>;
1072
+ /**
1073
+ * Extra packages to install globally in the generated image.
1074
+ *
1075
+ * Each entry becomes a `RUN npm install --global --no-fund
1076
+ * --no-audit <pkg> …` line inserted after `FROM` and before the
1077
+ * app `COPY`. Use it for CLI tools the running app shells out to
1078
+ * — typical example is `wrangler` for a service that deploys to
1079
+ * Cloudflare on someone else's behalf.
1080
+ *
1081
+ * Ignored in `compile` mode (the distroless base has no `npm`).
1082
+ *
1083
+ * @example install: ["wrangler"]
1084
+ */
1085
+ install: _$typebox.TOptional<_$typebox.TArray<_$typebox.TString>>;
1050
1086
  /**
1051
1087
  * Docker build options (used when --image flag is passed).
1052
1088
  */
@@ -1684,10 +1720,10 @@ declare class ProjectScaffolder {
1684
1720
  force?: boolean;
1685
1721
  }): Promise<void>;
1686
1722
  /**
1687
- * Best-effort lookup for the developer's git email (used as the seeded
1688
- * `adminEmails` entry in the SaaS realm). Returns undefined if git isn't
1689
- * available or if `user.email` isn't configured the template falls back
1690
- * to `admin@example.com` in that case.
1723
+ * Best-effort lookup for the developer's git email seeded as
1724
+ * `ADMIN_EMAILS` in the SaaS project's `.env`. Returns undefined if git
1725
+ * isn't available or `user.email` isn't configured; the caller then falls
1726
+ * back to the neutral `admin@alepha.dev`.
1691
1727
  */
1692
1728
  protected detectGitEmail(): Promise<string | undefined>;
1693
1729
  /**
@@ -1780,6 +1816,14 @@ interface BuildTaskContext {
1780
1816
  */
1781
1817
  flags?: {
1782
1818
  image?: boolean | string;
1819
+ /**
1820
+ * Skip the slow build steps (Vite client + Vite server + asset
1821
+ * compression). Only runs the deploy-config generation
1822
+ * (wrangler.jsonc, etc.) — useful when the caller already has a
1823
+ * built `dist/` and just needs the wrangler config refreshed for
1824
+ * per-tenant overrides.
1825
+ */
1826
+ prebuilt?: boolean;
1783
1827
  };
1784
1828
  }
1785
1829
  /**
@@ -1856,7 +1900,29 @@ declare class BuildCloudflareTask extends BuildTask {
1856
1900
  protected enhanceR2(wrangler: WranglerConfig): void;
1857
1901
  protected enhanceKV(wrangler: WranglerConfig): void;
1858
1902
  protected enhanceQueue(wrangler: WranglerConfig): void;
1859
- protected writeWorkerEntryPoint(root: string, distDir: string): Promise<void>;
1903
+ protected enhanceEmail(ctx: BuildTaskContext, wrangler: WranglerConfig): void;
1904
+ /**
1905
+ * Discover `$container` primitives and emit the matching Cloudflare
1906
+ * Containers bindings, Durable Object bindings, and migrations into
1907
+ * `wrangler.jsonc`. The DO class declarations are added later, when
1908
+ * the worker entry point is written.
1909
+ *
1910
+ * Returns the list of container descriptors so
1911
+ * `writeWorkerEntryPoint` can emit `export class <NAME> extends
1912
+ * Container` declarations referencing them.
1913
+ */
1914
+ protected enhanceContainers(ctx: BuildTaskContext, wrangler: WranglerConfig): ContainerDescriptor[];
1915
+ protected writeWorkerEntryPoint(root: string, distDir: string, containers?: ContainerDescriptor[]): Promise<void>;
1916
+ }
1917
+ interface ContainerDescriptor {
1918
+ name: string;
1919
+ className: string;
1920
+ image: string;
1921
+ port: number;
1922
+ sleepAfter: string;
1923
+ instanceType: "dev" | "basic" | "standard";
1924
+ maxInstances: number;
1925
+ envVars?: Record<string, string>;
1860
1926
  }
1861
1927
  //#endregion
1862
1928
  //#region ../../src/cli/core/tasks/BuildCompressTask.d.ts
@@ -1969,6 +2035,7 @@ declare class BuildDockerTask extends BuildTask {
1969
2035
  command: string;
1970
2036
  };
1971
2037
  hasMigrations: boolean;
2038
+ install: string[];
1972
2039
  }): Promise<void>;
1973
2040
  protected buildDockerImage(ctx: BuildTaskContext, distDir: string): Promise<void>;
1974
2041
  }
@@ -2160,6 +2227,7 @@ declare class BuildCommand {
2160
2227
  docker?: {
2161
2228
  from?: string | undefined;
2162
2229
  command?: string | undefined;
2230
+ install?: string[] | undefined;
2163
2231
  image?: {
2164
2232
  args?: string | undefined;
2165
2233
  oci?: boolean | undefined;
@@ -2228,6 +2296,7 @@ declare class BuildCommand {
2228
2296
  runtime: _$typebox.TOptional<_$typebox.TUnsafe<"node" | "bun" | "workerd">>;
2229
2297
  image: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TBoolean, _$typebox.TString]>>;
2230
2298
  compile: _$typebox.TOptional<_$typebox.TBoolean>;
2299
+ prebuilt: _$typebox.TOptional<_$typebox.TBoolean>;
2231
2300
  sitemap: _$typebox.TOptional<_$typebox.TString>;
2232
2301
  }>, _$typebox.TSchema, _$typebox.TObject<_$typebox.TProperties>>;
2233
2302
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/cli/core/alephaPackageJson.ts","../../../src/cli/core/atoms/appEntryOptions.ts","../../../src/cli/core/atoms/buildOptions.ts","../../../src/cli/core/atoms/changelogOptions.ts","../../../src/cli/core/atoms/devOptions.ts","../../../src/cli/core/providers/AppEntryProvider.ts","../../../src/cli/core/services/ViteUtils.ts","../../../src/cli/core/providers/ViteBuildProvider.ts","../../../src/cli/core/services/AlephaCliUtils.ts","../../../src/cli/core/services/PackageManagerUtils.ts","../../../src/cli/core/services/ProjectScaffolder.ts","../../../src/cli/core/tasks/BuildTask.ts","../../../src/cli/core/tasks/BuildAssetsTask.ts","../../../src/cli/core/tasks/BuildClientTask.ts","../../../src/cli/core/tasks/BuildCloudflareTask.ts","../../../src/cli/core/tasks/BuildCompressTask.ts","../../../src/cli/core/tasks/BuildDockerTask.ts","../../../src/cli/core/tasks/BuildPrerenderTask.ts","../../../src/cli/core/tasks/BuildPwaTask.ts","../../../src/cli/core/tasks/BuildServerTask.ts","../../../src/cli/core/tasks/BuildSitemapTask.ts","../../../src/cli/core/tasks/BuildStaticTask.ts","../../../src/cli/core/tasks/BuildVercelTask.ts","../../../src/cli/core/commands/build.ts","../../../src/cli/core/commands/clean.ts","../../../src/cli/core/commands/db.ts","../../../src/cli/core/providers/ViteDevServerProvider.ts","../../../src/cli/core/commands/dev.ts","../../../src/cli/core/services/GitMessageParser.ts","../../../src/cli/core/commands/gen/changelog.ts","../../../src/cli/core/commands/gen/openapi.ts","../../../src/cli/core/commands/init.ts","../../../src/cli/core/commands/lint.ts","../../../src/cli/core/commands/root.ts","../../../src/cli/core/commands/test.ts","../../../src/cli/core/commands/typecheck.ts","../../../src/cli/core/commands/verify.ts","../../../src/cli/core/providers/AlephaCliExtensionProvider.ts","../../../src/cli/core/index.ts"],"mappings":";;;;;;;;;;;;;;;cAEa,iBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAA,gBAAA,CAAA,SAAA,CAAA,OAAA,CAfD,SAAA,CAeC,WAAA,GAAA,SAAA,CAAA,OAAA,EAAA,SAAA,CAAA,OAAA,CAAA,SAAA,CAAA,WAAA;AAAA;;;cClBX,0BAAA;EAAA,mBACQ,MAAA,EAAM,MAAA;EAAA,mBACN,EAAA,EAAE,kBAAA;EAAA,mBAEF,WAAA,EAFE,QAAA,CAES,aAAA;AAAA;;;;;;;cC6EnB,iBAAA,EAAiB,QAAA,CAAA,OAAA,CAc5B,QAAA,CAd4B,MAAA;;;;cAqBjB,SAAA,EAAS,QAAA,CAAA,OAAA,CA6BpB,QAAA,CA7BoB,MAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/cli/core/alephaPackageJson.ts","../../../src/cli/core/atoms/appEntryOptions.ts","../../../src/cli/core/atoms/buildOptions.ts","../../../src/cli/core/atoms/changelogOptions.ts","../../../src/cli/core/atoms/devOptions.ts","../../../src/cli/core/providers/AppEntryProvider.ts","../../../src/cli/core/services/ViteUtils.ts","../../../src/cli/core/providers/ViteBuildProvider.ts","../../../src/cli/core/services/AlephaCliUtils.ts","../../../src/cli/core/services/PackageManagerUtils.ts","../../../src/cli/core/services/ProjectScaffolder.ts","../../../src/cli/core/tasks/BuildTask.ts","../../../src/cli/core/tasks/BuildAssetsTask.ts","../../../src/cli/core/tasks/BuildClientTask.ts","../../../src/cli/core/tasks/BuildCloudflareTask.ts","../../../src/cli/core/tasks/BuildCompressTask.ts","../../../src/cli/core/tasks/BuildDockerTask.ts","../../../src/cli/core/tasks/BuildPrerenderTask.ts","../../../src/cli/core/tasks/BuildPwaTask.ts","../../../src/cli/core/tasks/BuildServerTask.ts","../../../src/cli/core/tasks/BuildSitemapTask.ts","../../../src/cli/core/tasks/BuildStaticTask.ts","../../../src/cli/core/tasks/BuildVercelTask.ts","../../../src/cli/core/commands/build.ts","../../../src/cli/core/commands/clean.ts","../../../src/cli/core/commands/db.ts","../../../src/cli/core/providers/ViteDevServerProvider.ts","../../../src/cli/core/commands/dev.ts","../../../src/cli/core/services/GitMessageParser.ts","../../../src/cli/core/commands/gen/changelog.ts","../../../src/cli/core/commands/gen/openapi.ts","../../../src/cli/core/commands/init.ts","../../../src/cli/core/commands/lint.ts","../../../src/cli/core/commands/root.ts","../../../src/cli/core/commands/test.ts","../../../src/cli/core/commands/typecheck.ts","../../../src/cli/core/commands/verify.ts","../../../src/cli/core/providers/AlephaCliExtensionProvider.ts","../../../src/cli/core/index.ts"],"mappings":";;;;;;;;;;;;;;;cAEa,iBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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