@fonderie/auth 5.0.4 → 5.2.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.
package/dist/index.d.cts CHANGED
@@ -2,8 +2,8 @@ export { IMfaChallenge, ISession, IUser } from './types.cjs';
2
2
  import { IFonderieModule, IReadinessProblem, IFonderieApp } from '@fonderie/core';
3
3
  import { IStoreAdapter } from '@fonderie/store';
4
4
  import { EventBus } from '@fonderie/events';
5
- import { I as IAuthConfig } from './session-CTSCI09F.cjs';
6
- export { A as AUTH_CONFIG_KEYS, a as AuthLimitedRoute, b as AuthMessageKey, c as IAuthRateLimitConfig, d as IAuthRuntimeConfig, e as IAuthSecrets, f as IDataExportContributor, M as MESSAGE_KEYS, g as buildAuthAccountLimiter, h as buildAuthIpLimiter, w as withSession } from './session-CTSCI09F.cjs';
5
+ import { I as IAuthConfig } from './session-DJNd1xp_.cjs';
6
+ export { A as AUTH_CONFIG_KEYS, a as AuthLimitedRoute, b as AuthMessageKey, c as IAuthRateLimitConfig, d as IAuthRuntimeConfig, e as IAuthSecrets, f as IDataExportContributor, M as MESSAGE_KEYS, g as buildAuthAccountLimiter, h as buildAuthIpLimiter, w as withSession } from './session-DJNd1xp_.cjs';
7
7
  export { IUserDTO, toUserDTO } from './dtos/user.cjs';
8
8
  export { requireAuth, validate } from '@fonderie/core/middlewares';
9
9
  import { z } from 'zod';
@@ -19,6 +19,74 @@ declare class AuthModule implements IFonderieModule {
19
19
  install(app: IFonderieApp): void;
20
20
  }
21
21
 
22
+ declare const DEFAULT_TEMPLATES: {
23
+ "email-registration": {
24
+ subject: string;
25
+ html: string;
26
+ text: string;
27
+ };
28
+ "email-verification": {
29
+ subject: string;
30
+ html: string;
31
+ text: string;
32
+ };
33
+ "password-reset": {
34
+ subject: string;
35
+ html: string;
36
+ text: string;
37
+ };
38
+ "phone-otp": {
39
+ text: string;
40
+ };
41
+ "mfa-enabled": {
42
+ subject: string;
43
+ html: string;
44
+ text: string;
45
+ };
46
+ "mfa-disabled": {
47
+ subject: string;
48
+ html: string;
49
+ text: string;
50
+ };
51
+ "mfa-backup-codes-regenerated": {
52
+ subject: string;
53
+ html: string;
54
+ text: string;
55
+ };
56
+ "email-changed": {
57
+ subject: string;
58
+ html: string;
59
+ text: string;
60
+ };
61
+ "phone-changed": {
62
+ subject: string;
63
+ html: string;
64
+ text: string;
65
+ };
66
+ };
67
+
68
+ interface ILoginEventDTO {
69
+ id: string;
70
+ method: string;
71
+ outcome: string;
72
+ failureReason: string | null;
73
+ ipAddress: string | null;
74
+ userAgent: string | null;
75
+ createdAt: string;
76
+ }
77
+ interface ILoginHistoryPageDTO {
78
+ events: ILoginEventDTO[];
79
+ nextCursor: string | null;
80
+ }
81
+ interface ISessionDTO {
82
+ id: string;
83
+ current: boolean;
84
+ ipAddress: string | null;
85
+ userAgent: string | null;
86
+ createdAt: string;
87
+ expiresAt: string;
88
+ }
89
+
22
90
  declare const registerSchema: z.ZodUnion<readonly [z.ZodObject<{
23
91
  email: z.ZodPipe<z.ZodString, z.ZodEmail>;
24
92
  password: z.ZodString;
@@ -137,4 +205,4 @@ declare function startUserRetention(store: IStoreAdapter, options: IUserRetentio
137
205
 
138
206
  declare function validateAuthConfig(config: IAuthConfig): void;
139
207
 
140
- export { AuthModule, type ChangePasswordInput, IAuthConfig, type IImportUser, type IPurgeOptions, type IUserRetentionScheduleOptions, type LoginInput, type RegisterInput, type ResetPasswordInput, importUser, normalizeEmail, normalizeEmailSafe, purgeSoftDeletedUsers, schemas, startUserRetention, validateAuthConfig };
208
+ export { AuthModule, type ChangePasswordInput, DEFAULT_TEMPLATES, IAuthConfig, type IImportUser, type ILoginEventDTO, type ILoginHistoryPageDTO, type IPurgeOptions, type ISessionDTO, type IUserRetentionScheduleOptions, type LoginInput, type RegisterInput, type ResetPasswordInput, importUser, normalizeEmail, normalizeEmailSafe, purgeSoftDeletedUsers, schemas, startUserRetention, validateAuthConfig };
package/dist/index.d.ts CHANGED
@@ -2,8 +2,8 @@ export { IMfaChallenge, ISession, IUser } from './types.js';
2
2
  import { IFonderieModule, IReadinessProblem, IFonderieApp } from '@fonderie/core';
3
3
  import { IStoreAdapter } from '@fonderie/store';
4
4
  import { EventBus } from '@fonderie/events';
5
- import { I as IAuthConfig } from './session-CTSCI09F.js';
6
- export { A as AUTH_CONFIG_KEYS, a as AuthLimitedRoute, b as AuthMessageKey, c as IAuthRateLimitConfig, d as IAuthRuntimeConfig, e as IAuthSecrets, f as IDataExportContributor, M as MESSAGE_KEYS, g as buildAuthAccountLimiter, h as buildAuthIpLimiter, w as withSession } from './session-CTSCI09F.js';
5
+ import { I as IAuthConfig } from './session-DJNd1xp_.js';
6
+ export { A as AUTH_CONFIG_KEYS, a as AuthLimitedRoute, b as AuthMessageKey, c as IAuthRateLimitConfig, d as IAuthRuntimeConfig, e as IAuthSecrets, f as IDataExportContributor, M as MESSAGE_KEYS, g as buildAuthAccountLimiter, h as buildAuthIpLimiter, w as withSession } from './session-DJNd1xp_.js';
7
7
  export { IUserDTO, toUserDTO } from './dtos/user.js';
8
8
  export { requireAuth, validate } from '@fonderie/core/middlewares';
9
9
  import { z } from 'zod';
@@ -19,6 +19,74 @@ declare class AuthModule implements IFonderieModule {
19
19
  install(app: IFonderieApp): void;
20
20
  }
21
21
 
22
+ declare const DEFAULT_TEMPLATES: {
23
+ "email-registration": {
24
+ subject: string;
25
+ html: string;
26
+ text: string;
27
+ };
28
+ "email-verification": {
29
+ subject: string;
30
+ html: string;
31
+ text: string;
32
+ };
33
+ "password-reset": {
34
+ subject: string;
35
+ html: string;
36
+ text: string;
37
+ };
38
+ "phone-otp": {
39
+ text: string;
40
+ };
41
+ "mfa-enabled": {
42
+ subject: string;
43
+ html: string;
44
+ text: string;
45
+ };
46
+ "mfa-disabled": {
47
+ subject: string;
48
+ html: string;
49
+ text: string;
50
+ };
51
+ "mfa-backup-codes-regenerated": {
52
+ subject: string;
53
+ html: string;
54
+ text: string;
55
+ };
56
+ "email-changed": {
57
+ subject: string;
58
+ html: string;
59
+ text: string;
60
+ };
61
+ "phone-changed": {
62
+ subject: string;
63
+ html: string;
64
+ text: string;
65
+ };
66
+ };
67
+
68
+ interface ILoginEventDTO {
69
+ id: string;
70
+ method: string;
71
+ outcome: string;
72
+ failureReason: string | null;
73
+ ipAddress: string | null;
74
+ userAgent: string | null;
75
+ createdAt: string;
76
+ }
77
+ interface ILoginHistoryPageDTO {
78
+ events: ILoginEventDTO[];
79
+ nextCursor: string | null;
80
+ }
81
+ interface ISessionDTO {
82
+ id: string;
83
+ current: boolean;
84
+ ipAddress: string | null;
85
+ userAgent: string | null;
86
+ createdAt: string;
87
+ expiresAt: string;
88
+ }
89
+
22
90
  declare const registerSchema: z.ZodUnion<readonly [z.ZodObject<{
23
91
  email: z.ZodPipe<z.ZodString, z.ZodEmail>;
24
92
  password: z.ZodString;
@@ -137,4 +205,4 @@ declare function startUserRetention(store: IStoreAdapter, options: IUserRetentio
137
205
 
138
206
  declare function validateAuthConfig(config: IAuthConfig): void;
139
207
 
140
- export { AuthModule, type ChangePasswordInput, IAuthConfig, type IImportUser, type IPurgeOptions, type IUserRetentionScheduleOptions, type LoginInput, type RegisterInput, type ResetPasswordInput, importUser, normalizeEmail, normalizeEmailSafe, purgeSoftDeletedUsers, schemas, startUserRetention, validateAuthConfig };
208
+ export { AuthModule, type ChangePasswordInput, DEFAULT_TEMPLATES, IAuthConfig, type IImportUser, type ILoginEventDTO, type ILoginHistoryPageDTO, type IPurgeOptions, type ISessionDTO, type IUserRetentionScheduleOptions, type LoginInput, type RegisterInput, type ResetPasswordInput, importUser, normalizeEmail, normalizeEmailSafe, purgeSoftDeletedUsers, schemas, startUserRetention, validateAuthConfig };