@spfn/auth 0.2.0-beta.59 → 0.2.0-beta.60
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/{authenticate-CZW-7GE2.d.ts → authenticate-B_HkYBzq.d.ts} +3 -46
- package/dist/index.d.ts +4 -3
- package/dist/nextjs/api.js +336 -79
- package/dist/nextjs/api.js.map +1 -1
- package/dist/nextjs/server.d.ts +4 -4
- package/dist/nextjs/server.js +157 -22
- package/dist/nextjs/server.js.map +1 -1
- package/dist/server.d.ts +59 -106
- package/dist/session-Dbvz9Sdp.d.ts +53 -0
- package/dist/types-B1CzVZkU.d.ts +45 -0
- package/package.json +4 -4
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _spfn_core_route from '@spfn/core/route';
|
|
2
|
+
import { K as KeyAlgorithmType, d as SocialProvider } from './types-B1CzVZkU.js';
|
|
2
3
|
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
3
4
|
import { Static } from '@sinclair/typebox';
|
|
4
5
|
import { User } from '@spfn/auth/server';
|
|
@@ -84,50 +85,6 @@ interface UserProfile {
|
|
|
84
85
|
profile: ProfileInfo | null;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
/**
|
|
88
|
-
* @spfn/auth - Shared Types
|
|
89
|
-
*
|
|
90
|
-
* Common types and constants used across the auth package
|
|
91
|
-
*/
|
|
92
|
-
/**
|
|
93
|
-
* Supported JWT signature algorithms
|
|
94
|
-
*
|
|
95
|
-
* - ES256: ECDSA with P-256 and SHA-256 (recommended, smaller keys)
|
|
96
|
-
* - RS256: RSA with SHA-256 (fallback, larger keys)
|
|
97
|
-
*/
|
|
98
|
-
declare const KEY_ALGORITHM: readonly ["ES256", "RS256"];
|
|
99
|
-
/**
|
|
100
|
-
* Key algorithm type derived from the const array
|
|
101
|
-
*/
|
|
102
|
-
type KeyAlgorithmType = typeof KEY_ALGORITHM[number];
|
|
103
|
-
/**
|
|
104
|
-
* Invitation status enum values
|
|
105
|
-
* Single source of truth for all invitation statuses
|
|
106
|
-
*/
|
|
107
|
-
declare const INVITATION_STATUSES: readonly ["pending", "accepted", "expired", "cancelled"];
|
|
108
|
-
/**
|
|
109
|
-
* Invitation status type derived from the const array
|
|
110
|
-
*/
|
|
111
|
-
type InvitationStatus = typeof INVITATION_STATUSES[number];
|
|
112
|
-
/**
|
|
113
|
-
* User status enum values
|
|
114
|
-
* Single source of truth for all user statuses
|
|
115
|
-
*/
|
|
116
|
-
declare const USER_STATUSES: readonly ["active", "inactive", "suspended"];
|
|
117
|
-
/**
|
|
118
|
-
* User status type derived from the const array
|
|
119
|
-
*/
|
|
120
|
-
type UserStatus = typeof USER_STATUSES[number];
|
|
121
|
-
/**
|
|
122
|
-
* Social provider enum values
|
|
123
|
-
* Single source of truth for supported OAuth providers
|
|
124
|
-
*/
|
|
125
|
-
declare const SOCIAL_PROVIDERS: readonly ["google", "github", "kakao", "naver"];
|
|
126
|
-
/**
|
|
127
|
-
* Social provider type derived from the const array
|
|
128
|
-
*/
|
|
129
|
-
type SocialProvider = typeof SOCIAL_PROVIDERS[number];
|
|
130
|
-
|
|
131
88
|
/**
|
|
132
89
|
* @spfn/auth - Auth Service
|
|
133
90
|
*
|
|
@@ -574,7 +531,7 @@ declare const mainAuthRouter: _spfn_core_route.Router<{
|
|
|
574
531
|
id: number;
|
|
575
532
|
name: string;
|
|
576
533
|
displayName: string;
|
|
577
|
-
category: "
|
|
534
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
|
|
578
535
|
}[];
|
|
579
536
|
userId: number;
|
|
580
537
|
publicId: string;
|
|
@@ -939,4 +896,4 @@ declare const authenticate: _spfn_core_route.NamedMiddleware<"auth">;
|
|
|
939
896
|
*/
|
|
940
897
|
declare const optionalAuth: _spfn_core_route.NamedMiddleware<"optionalAuth">;
|
|
941
898
|
|
|
942
|
-
export {
|
|
899
|
+
export { authenticate as $, type AuthSession as A, registerPublicKeyService as B, type CheckAccountExistsResult as C, rotateKeyService as D, revokeKeyService as E, type RegisterPublicKeyParams as F, type RotateKeyParams as G, type RevokeKeyParams as H, type IssueOneTimeTokenResult as I, issueOneTimeTokenService as J, verifyOneTimeTokenService as K, type LoginResult as L, oauthStartService as M, oauthCallbackService as N, type OAuthStartResult as O, type PermissionConfig as P, buildOAuthErrorUrl as Q, type RoleConfig as R, type SendVerificationCodeResult as S, isOAuthProviderEnabled as T, type UserProfile as U, type VerificationTargetType as V, getEnabledOAuthProviders as W, getGoogleAccessToken as X, type OAuthStartParams as Y, type OAuthCallbackParams as Z, type OAuthCallbackResult as _, type RegisterResult as a, optionalAuth as a0, EmailSchema as a1, PhoneSchema as a2, PasswordSchema as a3, TargetTypeSchema as a4, VerificationPurposeSchema as a5, type RotateKeyResult as b, type ProfileInfo as c, type VerificationPurpose as d, VERIFICATION_TARGET_TYPES as e, VERIFICATION_PURPOSES as f, PERMISSION_CATEGORIES as g, type PermissionCategory as h, type AuthInitOptions as i, type AuthContext as j, checkAccountExistsService as k, loginService as l, mainAuthRouter as m, logoutService as n, changePasswordService as o, type CheckAccountExistsParams as p, type RegisterParams as q, registerService as r, type LoginParams as s, type LogoutParams as t, type ChangePasswordParams as u, sendVerificationCodeService as v, verifyCodeService as w, type SendVerificationCodeParams as x, type VerifyCodeParams as y, type VerifyCodeResult as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as _spfn_core_nextjs from '@spfn/core/nextjs';
|
|
2
|
-
import { R as RoleConfig, P as PermissionConfig, C as CheckAccountExistsResult, S as SendVerificationCodeResult, a as RegisterResult, L as LoginResult, b as RotateKeyResult, I as IssueOneTimeTokenResult, O as OAuthStartResult, U as UserProfile, c as ProfileInfo, m as mainAuthRouter } from './authenticate-
|
|
3
|
-
export {
|
|
2
|
+
import { R as RoleConfig, P as PermissionConfig, C as CheckAccountExistsResult, S as SendVerificationCodeResult, a as RegisterResult, L as LoginResult, b as RotateKeyResult, I as IssueOneTimeTokenResult, O as OAuthStartResult, U as UserProfile, c as ProfileInfo, m as mainAuthRouter } from './authenticate-B_HkYBzq.js';
|
|
3
|
+
export { i as AuthInitOptions, A as AuthSession, g as PERMISSION_CATEGORIES, h as PermissionCategory, f as VERIFICATION_PURPOSES, e as VERIFICATION_TARGET_TYPES, d as VerificationPurpose, V as VerificationTargetType } from './authenticate-B_HkYBzq.js';
|
|
4
4
|
import * as _spfn_core_route from '@spfn/core/route';
|
|
5
5
|
import { HttpMethod } from '@spfn/core/route';
|
|
6
|
+
export { I as INVITATION_STATUSES, b as InvitationStatus, a as KEY_ALGORITHM, K as KeyAlgorithmType, S as SOCIAL_PROVIDERS, d as SocialProvider, U as USER_STATUSES, c as UserStatus } from './types-B1CzVZkU.js';
|
|
6
7
|
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
7
8
|
import '@spfn/auth/server';
|
|
8
9
|
|
|
@@ -169,7 +170,7 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
|
|
|
169
170
|
id: number;
|
|
170
171
|
name: string;
|
|
171
172
|
displayName: string;
|
|
172
|
-
category: "
|
|
173
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
|
|
173
174
|
}[];
|
|
174
175
|
userId: number;
|
|
175
176
|
publicId: string;
|