@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.
@@ -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: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
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 { oauthCallbackService as $, type AuthSession as A, type LogoutParams as B, type CheckAccountExistsResult as C, type ChangePasswordParams as D, sendVerificationCodeService as E, verifyCodeService as F, type SendVerificationCodeParams as G, type VerifyCodeParams as H, type IssueOneTimeTokenResult as I, type VerifyCodeResult as J, KEY_ALGORITHM as K, type LoginResult as L, registerPublicKeyService as M, rotateKeyService as N, type OAuthStartResult as O, type PermissionConfig as P, revokeKeyService as Q, type RoleConfig as R, type SendVerificationCodeResult as S, type RegisterPublicKeyParams as T, type UserProfile as U, type VerificationTargetType as V, type RotateKeyParams as W, type RevokeKeyParams as X, issueOneTimeTokenService as Y, verifyOneTimeTokenService as Z, oauthStartService as _, type RegisterResult as a, buildOAuthErrorUrl as a0, isOAuthProviderEnabled as a1, getEnabledOAuthProviders as a2, getGoogleAccessToken as a3, type OAuthStartParams as a4, type OAuthCallbackParams as a5, type OAuthCallbackResult as a6, authenticate as a7, optionalAuth as a8, EmailSchema as a9, PhoneSchema as aa, PasswordSchema as ab, TargetTypeSchema as ac, VerificationPurposeSchema as ad, type RotateKeyResult as b, type ProfileInfo as c, INVITATION_STATUSES as d, USER_STATUSES as e, SOCIAL_PROVIDERS as f, type VerificationPurpose as g, VERIFICATION_TARGET_TYPES as h, VERIFICATION_PURPOSES as i, PERMISSION_CATEGORIES as j, type PermissionCategory as k, type AuthInitOptions as l, mainAuthRouter as m, type KeyAlgorithmType as n, type InvitationStatus as o, type UserStatus as p, type SocialProvider as q, type AuthContext as r, checkAccountExistsService as s, registerService as t, loginService as u, logoutService as v, changePasswordService as w, type CheckAccountExistsParams as x, type RegisterParams as y, type LoginParams as z };
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-CZW-7GE2.js';
3
- export { l as AuthInitOptions, A as AuthSession, d as INVITATION_STATUSES, o as InvitationStatus, K as KEY_ALGORITHM, n as KeyAlgorithmType, j as PERMISSION_CATEGORIES, k as PermissionCategory, f as SOCIAL_PROVIDERS, q as SocialProvider, e as USER_STATUSES, p as UserStatus, i as VERIFICATION_PURPOSES, h as VERIFICATION_TARGET_TYPES, g as VerificationPurpose, V as VerificationTargetType } from './authenticate-CZW-7GE2.js';
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: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
173
+ category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
173
174
  }[];
174
175
  userId: number;
175
176
  publicId: string;