@ackplus/nest-auth-contracts 1.1.34 → 1.1.37
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.cjs.map +1 -1
- package/dist/index.d.cts +1 -10
- package/dist/index.d.ts +1 -10
- package/package.json +1 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/auth.ts"],"sourcesContent":["/**\n * @libs/auth-s - Shared authentication s\n */\n\n// Auth s (from auth.ts)\nexport {\n NestAuthMFAMethodEnum,\n NestAuthOTPTypeEnum,\n IEmailCredentials,\n IPhoneCredentials,\n ISocialCredentials,\n ILoginCredentials,\n ILoginRequest,\n ISignupRequest,\n IRefreshRequest,\n ITokenPair,\n IAuthResponse,\n IAuthUser,\n IAuthSession,\n IMessageResponse,\n IAuthCookieResponse,\n IAuthSuccessResponse,\n IUserResponse,\n ITokensResponse,\n // Entities\n INestAuthIdentity,\n INestAuthSession,\n INestAuthAccessKey,\n INestAuthOTP,\n} from './auth';\n\n// MFA (from mfa.ts)\nexport {\n IVerify2faRequest,\n IVerify2faResponse,\n ISendMfaCodeRequest,\n IToggleMfaRequest,\n IVerifyTotpSetupRequest,\n IMfaDevice,\n IMfaStatusResponse,\n IMfaCodeResponse,\n ITotpSetupResponse,\n // Entities\n INestAuthMFASecret,\n INestAuthTrustedDevice,\n} from './mfa';\n\n// Password\nexport {\n IForgotPasswordRequest,\n IResetPasswordWithTokenRequest,\n IChangePasswordRequest,\n IVerifyForgotPasswordOtpRequest,\n IVerifyOtpResponse,\n} from './password';\n\n// Verification\nexport {\n IVerifyEmailRequest,\n IResendVerificationRequest,\n ISendEmailVerificationRequest,\n ISessionVerifyResponse,\n} from './verification';\n\n// Admin\nexport {\n IInitializeAdminRequest,\n IInitializeAdminResponse,\n IAdminUser,\n} from './admin';\n\n// Config\nexport {\n IEmailAuthConfig,\n IPhoneAuthConfig,\n IProfileFieldOption,\n IProfileField,\n IRegistrationConfig,\n IMfaConfig,\n ITenantOption,\n ITenantsConfig,\n ISsoProviderConfig,\n ISsoConfig,\n IUiConfig
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/auth.ts"],"sourcesContent":["/**\n * @libs/auth-s - Shared authentication s\n */\n\n// Auth s (from auth.ts)\nexport {\n NestAuthMFAMethodEnum,\n NestAuthOTPTypeEnum,\n IEmailCredentials,\n IPhoneCredentials,\n ISocialCredentials,\n ILoginCredentials,\n ILoginRequest,\n ISignupRequest,\n IRefreshRequest,\n ITokenPair,\n IAuthResponse,\n IAuthUser,\n IAuthSession,\n IMessageResponse,\n IAuthCookieResponse,\n IAuthSuccessResponse,\n IUserResponse,\n ITokensResponse,\n // Entities\n INestAuthIdentity,\n INestAuthSession,\n INestAuthAccessKey,\n INestAuthOTP,\n} from './auth';\n\n// MFA (from mfa.ts)\nexport {\n IVerify2faRequest,\n IVerify2faResponse,\n ISendMfaCodeRequest,\n IToggleMfaRequest,\n IVerifyTotpSetupRequest,\n IMfaDevice,\n IMfaStatusResponse,\n IMfaCodeResponse,\n ITotpSetupResponse,\n // Entities\n INestAuthMFASecret,\n INestAuthTrustedDevice,\n} from './mfa';\n\n// Password\nexport {\n IForgotPasswordRequest,\n IResetPasswordWithTokenRequest,\n IChangePasswordRequest,\n IVerifyForgotPasswordOtpRequest,\n IVerifyOtpResponse,\n} from './password';\n\n// Verification\nexport {\n IVerifyEmailRequest,\n IResendVerificationRequest,\n ISendEmailVerificationRequest,\n ISessionVerifyResponse,\n} from './verification';\n\n// Admin\nexport {\n IInitializeAdminRequest,\n IInitializeAdminResponse,\n IAdminUser,\n} from './admin';\n\n// Config\nexport {\n IEmailAuthConfig,\n IPhoneAuthConfig,\n IProfileFieldOption,\n IProfileField,\n IRegistrationConfig,\n IMfaConfig,\n ITenantOption,\n ITenantsConfig,\n ISsoProviderConfig,\n ISsoConfig,\n IUiConfig\n} from './config';\n\n// User & Role (from user.ts)\nexport {\n INestAuthUser,\n INestAuthRole,\n INestAuthPermission,\n} from './user';\n\n// Tenant (from tenant.ts)\nexport {\n INestAuthTenant,\n} from './tenant';\n\n","/**\n * Auth Types\n * Contains: Login/Signup/Token types + Auth Entities (Session, Identity, AccessKey, OTP)\n */\n\n// OTP Type Enum\nexport enum NestAuthOTPTypeEnum {\n PASSWORD_RESET = 'password_reset',\n VERIFICATION = 'verification',\n MFA = 'mfa',\n}\n\n// MFA Method Enum (Needed for AuthResponse and others)\nexport enum NestAuthMFAMethodEnum {\n EMAIL = 'email',\n SMS = 'sms',\n TOTP = 'totp',\n}\n\n// --- Entity Interfaces ---\n\nexport interface INestAuthIdentity {\n id: string;\n provider: string;\n providerId: string;\n metadata?: Record<string, any>;\n userId: string;\n createdAt: Date;\n updatedAt: Date;\n}\n\nexport interface INestAuthSession {\n id: string;\n userId: string;\n data?: any;\n refreshToken?: string;\n expiresAt?: Date;\n userAgent?: string;\n deviceName?: string;\n ipAddress?: string;\n lastActive?: Date;\n createdAt?: Date;\n updatedAt?: Date;\n}\n\nexport interface INestAuthAccessKey {\n id: string;\n name: string;\n publicKey: string;\n privateKey: string;\n description?: string;\n isActive: boolean;\n expiresAt?: Date;\n lastUsedAt?: Date;\n userId: string;\n createdAt: Date;\n updatedAt: Date;\n}\n\nexport interface INestAuthOTP {\n id: string;\n userId: string;\n code: string;\n type: NestAuthOTPTypeEnum;\n expiresAt: Date;\n used: boolean;\n createdAt: Date;\n updatedAt: Date;\n}\n\n// --- Request/Response Interfaces ---\n\nexport interface IEmailCredentials {\n email: string;\n password: string;\n}\n\nexport interface IPhoneCredentials {\n phone: string;\n password: string;\n}\n\nexport interface ISocialCredentials {\n token: string;\n}\n\nexport type ILoginCredentials = IEmailCredentials | IPhoneCredentials | ISocialCredentials | Record<string, any>;\n\nexport interface ILoginRequest {\n providerName?: 'email' | 'phone' | 'google' | 'facebook' | 'apple' | 'github' | string;\n credentials: ILoginCredentials;\n tenantId?: string;\n createUserIfNotExists?: boolean;\n}\n\nexport interface ISignupRequest {\n email?: string;\n phone?: string;\n password: string;\n tenantId?: string;\n [key: string]: any;\n}\n\nexport interface IRefreshRequest {\n refreshToken?: string;\n}\n\nexport interface ITokenPair {\n accessToken: string;\n refreshToken: string;\n}\n\nexport interface IAuthUser {\n id: string;\n email?: string;\n phone?: string;\n isVerified?: boolean;\n isMfaEnabled?: boolean;\n roles?: string[];\n permissions?: string[];\n metadata?: Record<string, any>;\n tenantId?: string;\n}\n\nexport interface IAuthResponse extends ITokenPair {\n message?: string;\n isRequiresMfa?: boolean;\n mfaMethods?: NestAuthMFAMethodEnum[];\n defaultMfaMethod?: NestAuthMFAMethodEnum;\n user?: IAuthUser;\n}\n\nexport interface IAuthSession {\n id: string;\n userId: string;\n expiresAt: string;\n createdAt: string;\n}\n\nexport interface IMessageResponse {\n message: string;\n}\n\nexport interface IAuthCookieResponse {\n message: string;\n isRequiresMfa?: boolean;\n}\n\nexport interface IAuthSuccessResponse {\n message: string;\n isRequiresMfa?: boolean;\n}\n\nexport interface IUserResponse {\n id: string;\n email?: string;\n phone?: string;\n isVerified?: boolean;\n isMfaEnabled?: boolean;\n roles?: string[];\n permissions?: string[];\n metadata?: Record<string, any>;\n tenantId?: string;\n}\n\nexport interface ITokensResponse {\n accessToken: string;\n refreshToken: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMO,IAAK,sBAAL,kBAAKA,yBAAL;AACH,EAAAA,qBAAA,oBAAiB;AACjB,EAAAA,qBAAA,kBAAe;AACf,EAAAA,qBAAA,SAAM;AAHE,SAAAA;AAAA,GAAA;AAOL,IAAK,wBAAL,kBAAKC,2BAAL;AACH,EAAAA,uBAAA,WAAQ;AACR,EAAAA,uBAAA,SAAM;AACN,EAAAA,uBAAA,UAAQ;AAHA,SAAAA;AAAA,GAAA;","names":["NestAuthOTPTypeEnum","NestAuthMFAMethodEnum"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -327,15 +327,6 @@ interface IUiConfig {
|
|
|
327
327
|
logoUrl?: string;
|
|
328
328
|
backgroundImageUrl?: string;
|
|
329
329
|
}
|
|
330
|
-
interface IClientConfigResponse {
|
|
331
|
-
emailAuth: IEmailAuthConfig;
|
|
332
|
-
phoneAuth: IPhoneAuthConfig;
|
|
333
|
-
registration: IRegistrationConfig;
|
|
334
|
-
mfa: IMfaConfig;
|
|
335
|
-
tenants: ITenantsConfig;
|
|
336
|
-
sso: ISsoConfig;
|
|
337
|
-
ui?: IUiConfig;
|
|
338
|
-
}
|
|
339
330
|
|
|
340
331
|
interface INestAuthUser {
|
|
341
332
|
id: string;
|
|
@@ -389,4 +380,4 @@ interface INestAuthTenant {
|
|
|
389
380
|
updatedAt: Date;
|
|
390
381
|
}
|
|
391
382
|
|
|
392
|
-
export { type IAdminUser, type IAuthCookieResponse, type IAuthResponse, type IAuthSession, type IAuthSuccessResponse, type IAuthUser, type IChangePasswordRequest, type
|
|
383
|
+
export { type IAdminUser, type IAuthCookieResponse, type IAuthResponse, type IAuthSession, type IAuthSuccessResponse, type IAuthUser, type IChangePasswordRequest, type IEmailAuthConfig, type IEmailCredentials, type IForgotPasswordRequest, type IInitializeAdminRequest, type IInitializeAdminResponse, type ILoginCredentials, type ILoginRequest, type IMessageResponse, type IMfaCodeResponse, type IMfaConfig, type IMfaDevice, type IMfaStatusResponse, type INestAuthAccessKey, type INestAuthIdentity, type INestAuthMFASecret, type INestAuthOTP, type INestAuthPermission, type INestAuthRole, type INestAuthSession, type INestAuthTenant, type INestAuthTrustedDevice, type INestAuthUser, type IPhoneAuthConfig, type IPhoneCredentials, type IProfileField, type IProfileFieldOption, type IRefreshRequest, type IRegistrationConfig, type IResendVerificationRequest, type IResetPasswordWithTokenRequest, type ISendEmailVerificationRequest, type ISendMfaCodeRequest, type ISessionVerifyResponse, type ISignupRequest, type ISocialCredentials, type ISsoConfig, type ISsoProviderConfig, type ITenantOption, type ITenantsConfig, type IToggleMfaRequest, type ITokenPair, type ITokensResponse, type ITotpSetupResponse, type IUiConfig, type IUserResponse, type IVerify2faRequest, type IVerify2faResponse, type IVerifyEmailRequest, type IVerifyForgotPasswordOtpRequest, type IVerifyOtpResponse, type IVerifyTotpSetupRequest, NestAuthMFAMethodEnum, NestAuthOTPTypeEnum };
|
package/dist/index.d.ts
CHANGED
|
@@ -327,15 +327,6 @@ interface IUiConfig {
|
|
|
327
327
|
logoUrl?: string;
|
|
328
328
|
backgroundImageUrl?: string;
|
|
329
329
|
}
|
|
330
|
-
interface IClientConfigResponse {
|
|
331
|
-
emailAuth: IEmailAuthConfig;
|
|
332
|
-
phoneAuth: IPhoneAuthConfig;
|
|
333
|
-
registration: IRegistrationConfig;
|
|
334
|
-
mfa: IMfaConfig;
|
|
335
|
-
tenants: ITenantsConfig;
|
|
336
|
-
sso: ISsoConfig;
|
|
337
|
-
ui?: IUiConfig;
|
|
338
|
-
}
|
|
339
330
|
|
|
340
331
|
interface INestAuthUser {
|
|
341
332
|
id: string;
|
|
@@ -389,4 +380,4 @@ interface INestAuthTenant {
|
|
|
389
380
|
updatedAt: Date;
|
|
390
381
|
}
|
|
391
382
|
|
|
392
|
-
export { type IAdminUser, type IAuthCookieResponse, type IAuthResponse, type IAuthSession, type IAuthSuccessResponse, type IAuthUser, type IChangePasswordRequest, type
|
|
383
|
+
export { type IAdminUser, type IAuthCookieResponse, type IAuthResponse, type IAuthSession, type IAuthSuccessResponse, type IAuthUser, type IChangePasswordRequest, type IEmailAuthConfig, type IEmailCredentials, type IForgotPasswordRequest, type IInitializeAdminRequest, type IInitializeAdminResponse, type ILoginCredentials, type ILoginRequest, type IMessageResponse, type IMfaCodeResponse, type IMfaConfig, type IMfaDevice, type IMfaStatusResponse, type INestAuthAccessKey, type INestAuthIdentity, type INestAuthMFASecret, type INestAuthOTP, type INestAuthPermission, type INestAuthRole, type INestAuthSession, type INestAuthTenant, type INestAuthTrustedDevice, type INestAuthUser, type IPhoneAuthConfig, type IPhoneCredentials, type IProfileField, type IProfileFieldOption, type IRefreshRequest, type IRegistrationConfig, type IResendVerificationRequest, type IResetPasswordWithTokenRequest, type ISendEmailVerificationRequest, type ISendMfaCodeRequest, type ISessionVerifyResponse, type ISignupRequest, type ISocialCredentials, type ISsoConfig, type ISsoProviderConfig, type ITenantOption, type ITenantsConfig, type IToggleMfaRequest, type ITokenPair, type ITokensResponse, type ITotpSetupResponse, type IUiConfig, type IUserResponse, type IVerify2faRequest, type IVerify2faResponse, type IVerifyEmailRequest, type IVerifyForgotPasswordOtpRequest, type IVerifyOtpResponse, type IVerifyTotpSetupRequest, NestAuthMFAMethodEnum, NestAuthOTPTypeEnum };
|