@absolutejs/auth 0.55.3 → 0.55.4

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.
@@ -3,8 +3,8 @@ import { type MfaRouteProps } from './config';
3
3
  export declare const mfaChallenge: <UserType>({ authSessionStore, challengeRoute, cookieSecure, encryptionKey, getChallengeUser, getUserId, mfaStore, onMfaChallengeError, onMfaChallengeSuccess, onSendSmsCode, sessionDurationMs, smsCodeLength, smsCodeTtlMs, smsMaxAttempts, totpMaxAttempts }: MfaRouteProps<UserType>) => Elysia<"", {
4
4
  decorator: {};
5
5
  store: {
6
- session: import("..").SessionRecord<UserType>;
7
- unregisteredSession: import("..").UnregisteredSessionRecord;
6
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
7
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
8
8
  };
9
9
  derive: {};
10
10
  resolve: {};
@@ -14,8 +14,8 @@ export type MfaStatus = {
14
14
  export declare const mfaManagementRoutes: <UserType>({ authSessionStore, getUserId, managementRoute, mfaStore }: MfaRouteProps<UserType>) => Elysia<"", {
15
15
  decorator: {};
16
16
  store: {
17
- session: import("..").SessionRecord<UserType>;
18
- unregisteredSession: import("..").UnregisteredSessionRecord;
17
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
18
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
19
19
  };
20
20
  derive: {};
21
21
  resolve: {};
@@ -3,8 +3,8 @@ import type { MfaRouteProps } from './config';
3
3
  export declare const mfaRoutes: <UserType>(config: MfaRouteProps<UserType>) => Elysia<"", {
4
4
  decorator: {};
5
5
  store: {
6
- session: import("..").SessionRecord<UserType>;
7
- unregisteredSession: import("..").UnregisteredSessionRecord;
6
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
7
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
8
8
  };
9
9
  derive: {};
10
10
  resolve: {};
package/dist/mfa/sms.d.ts CHANGED
@@ -13,8 +13,8 @@ export declare const maskPhone: (phone: string) => string;
13
13
  export declare const mfaSmsRoutes: <UserType>({ authSessionStore, getUserId, mfaStore, onMfaEnrolled, onSendSmsCode, smsCodeLength, smsCodeTtlMs, smsMaxAttempts, smsSetupRoute, smsVerifyRoute }: MfaRouteProps<UserType>) => Elysia<"", {
14
14
  decorator: {};
15
15
  store: {
16
- session: import("..").SessionRecord<UserType>;
17
- unregisteredSession: import("..").UnregisteredSessionRecord;
16
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
17
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
18
18
  };
19
19
  derive: {};
20
20
  resolve: {};
@@ -3,8 +3,8 @@ import { type MfaRouteProps } from './config';
3
3
  export declare const mfaTotpRoutes: <UserType>({ authSessionStore, backupCodeCount, encryptionKey, getUserId, issuer, mfaStore, onMfaEnrolled, totpSetupRoute, totpVerifyRoute }: MfaRouteProps<UserType>) => Elysia<"", {
4
4
  decorator: {};
5
5
  store: {
6
- session: import("..").SessionRecord<UserType>;
7
- unregisteredSession: import("..").UnregisteredSessionRecord;
6
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
7
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
8
8
  };
9
9
  derive: {};
10
10
  resolve: {};
@@ -6,8 +6,8 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
6
6
  }) => Elysia<"", {
7
7
  decorator: {};
8
8
  store: {
9
- session: import("..").SessionRecord<UserType>;
10
- unregisteredSession: import("..").UnregisteredSessionRecord;
9
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
10
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
11
11
  };
12
12
  derive: {};
13
13
  resolve: {};
@@ -1,11 +1,10 @@
1
1
  import { Elysia } from 'elysia';
2
- import type { SessionRecord } from '../types';
3
2
  import { type OrganizationsRouteProps } from './config';
4
3
  export declare const organizationRoutes: <UserType>({ authSessionStore, canCreateOrganization, canManageMembers, emit, getUserId, invitationDurationMs, onMembershipAdded, onMembershipRemoved, onOrganizationCreated, onSendInvitation, organizationsRoute, organizationStore, ownerRoles }: OrganizationsRouteProps<UserType>) => Elysia<"", {
5
4
  decorator: {};
6
5
  store: {
7
- session: SessionRecord<UserType>;
8
- unregisteredSession: import("..").UnregisteredSessionRecord;
6
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
7
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
9
8
  };
10
9
  derive: {};
11
10
  resolve: {};
@@ -1,17 +1,16 @@
1
1
  import { Elysia } from 'elysia';
2
- import type { SessionRecord } from '../types';
3
2
  import { type PasswordlessRouteProps } from './config';
4
3
  export declare const passwordlessRoutes: <UserType>({ authSessionStore, cookieSecure, emit, getUserByEmail, getUserId, magicLinkTokenDurationMs, onCreateUser, onPasswordlessLogin, onSendMagicLink, onSendOtp, otpDurationMs, otpLength, passwordlessRoute, passwordlessTokenStore, sessionDurationMs }: PasswordlessRouteProps<UserType>) => Elysia<"", {
5
4
  decorator: {};
6
5
  store: {} | {
7
- session: SessionRecord<UserType>;
8
- unregisteredSession: import("..").UnregisteredSessionRecord;
6
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
7
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
9
8
  } | {
10
- session: SessionRecord<UserType>;
11
- unregisteredSession: import("..").UnregisteredSessionRecord;
9
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
10
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
12
11
  } | {
13
- session: SessionRecord<UserType>;
14
- unregisteredSession: import("..").UnregisteredSessionRecord;
12
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
13
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
15
14
  };
16
15
  derive: {};
17
16
  resolve: {};
@@ -1,11 +1,10 @@
1
1
  import { Elysia } from 'elysia';
2
- import type { SessionRecord } from '../types';
3
2
  import { type RolesRouteProps } from './config';
4
3
  export declare const roleRoutes: <UserType>({ authSessionStore, canManageRoles, emit, getUserId, onRolesAssigned, organizationStore, roleStore, rolesRoute }: RolesRouteProps<UserType>) => Elysia<"", {
5
4
  decorator: {};
6
5
  store: {
7
- session: SessionRecord<UserType>;
8
- unregisteredSession: import("..").UnregisteredSessionRecord;
6
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
7
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
9
8
  };
10
9
  derive: {};
11
10
  resolve: {};
@@ -15,8 +15,8 @@ type CallbackProps<UserType> = {
15
15
  export declare const callback: <UserType>({ authSessionStore, clientProviders, callbackRoute, resolveAuthIntent, onCallbackSuccess, onLinkIdentity, onLinkIdentityConflict, onLinkConnector, onCallbackError }: CallbackProps<UserType>) => Elysia<"", {
16
16
  decorator: {};
17
17
  store: {
18
- session: import("..").SessionRecord<UserType>;
19
- unregisteredSession: import("..").UnregisteredSessionRecord;
18
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
19
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
20
20
  };
21
21
  derive: {};
22
22
  resolve: {};
@@ -9,8 +9,8 @@ type ProfileProps = {
9
9
  export declare const profile: <UserType>({ clientProviders, profileRoute, onProfileSuccess, onProfileError }: ProfileProps) => Elysia<"", {
10
10
  decorator: {};
11
11
  store: {
12
- session: import("..").SessionRecord<UserType>;
13
- unregisteredSession: import("..").UnregisteredSessionRecord;
12
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
13
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
14
14
  };
15
15
  derive: {};
16
16
  resolve: {};
@@ -12,8 +12,8 @@ export declare const protectRoutePlugin: <UserType>({ authSessionStore }?: {
12
12
  }) => Elysia<"", {
13
13
  decorator: {};
14
14
  store: {
15
- session: import("..").SessionRecord<UserType>;
16
- unregisteredSession: import("..").UnregisteredSessionRecord;
15
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
16
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
17
17
  };
18
18
  derive: {
19
19
  readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: (error: AuthFailError) => AuthFailReturn) => Promise<AuthReturn | import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | NonNullable<AuthFailReturn> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401>>;
@@ -12,8 +12,8 @@ type RefreshProps<UserType> = {
12
12
  export declare const refresh: <UserType>({ authSessionStore, clientProviders, refreshRoute, onRefreshSuccess, onRefreshError, sessionDurationMs }: RefreshProps<UserType>) => Elysia<"", {
13
13
  decorator: {};
14
14
  store: {
15
- session: import("..").SessionRecord<UserType>;
16
- unregisteredSession: import("..").UnregisteredSessionRecord;
15
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
16
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
17
17
  };
18
18
  derive: {};
19
19
  resolve: {};
@@ -11,8 +11,8 @@ type RevokeProps<UserType> = {
11
11
  export declare const revoke: <UserType>({ authSessionStore, clientProviders, revokeRoute, onRevocationSuccess, onRevocationError }: RevokeProps<UserType>) => Elysia<"", {
12
12
  decorator: {};
13
13
  store: {
14
- session: import("..").SessionRecord<UserType>;
15
- unregisteredSession: import("..").UnregisteredSessionRecord;
14
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
15
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
16
16
  };
17
17
  derive: {};
18
18
  resolve: {};
@@ -10,8 +10,8 @@ type SessionSummary = {
10
10
  export declare const sessionRoutes: <UserType>({ authSessionStore, getUserId, sessionsRoute }: SessionsRouteProps<UserType>) => Elysia<"", {
11
11
  decorator: {};
12
12
  store: {
13
- session: import("..").SessionRecord<UserType>;
14
- unregisteredSession: import("..").UnregisteredSessionRecord;
13
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
14
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
15
15
  };
16
16
  derive: {};
17
17
  resolve: {};
@@ -1,6 +1,6 @@
1
1
  import { Elysia } from 'elysia';
2
2
  import type { AuthSessionStore } from '../session/types';
3
- import { OnSignOut, RouteString, type SessionRecord } from '../types';
3
+ import { OnSignOut, RouteString } from '../types';
4
4
  type SignOutProps<UserType> = {
5
5
  authSessionStore?: AuthSessionStore<UserType>;
6
6
  signoutRoute?: RouteString;
@@ -9,8 +9,8 @@ type SignOutProps<UserType> = {
9
9
  export declare const signout: <UserType>({ authSessionStore, signoutRoute, onSignOut }: SignOutProps<UserType>) => Elysia<"", {
10
10
  decorator: {};
11
11
  store: {
12
- session: SessionRecord<UserType>;
13
- unregisteredSession: import("..").UnregisteredSessionRecord;
12
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
13
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
14
14
  };
15
15
  derive: {};
16
16
  resolve: {};
@@ -9,8 +9,8 @@ export declare const stepUpPlugin: <UserType>({ authSessionStore }?: {
9
9
  }) => Elysia<"", {
10
10
  decorator: {};
11
11
  store: {
12
- session: import("..").SessionRecord<UserType>;
13
- unregisteredSession: import("..").UnregisteredSessionRecord;
12
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
13
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
14
14
  };
15
15
  derive: {
16
16
  readonly requireRecentAuth: <AuthReturn, AuthFailReturn>(maxAgeMs: number, handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: (error: ReauthFailError) => AuthFailReturn) => Promise<AuthReturn | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "Recent authentication required", 401> | NonNullable<AuthFailReturn>>;
@@ -9,8 +9,8 @@ type StatusProps<UserType> = {
9
9
  export declare const userStatus: <UserType>({ authSessionStore, statusRoute, onStatus }: StatusProps<UserType>) => Elysia<"", {
10
10
  decorator: {};
11
11
  store: {
12
- session: import("..").SessionRecord<UserType>;
13
- unregisteredSession: import("..").UnregisteredSessionRecord;
12
+ session: import("../session/internalData").InternalSessionRecord<UserType>;
13
+ unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
14
14
  };
15
15
  derive: {};
16
16
  resolve: {};