@spfn/auth 0.2.0-beta.89 → 0.2.0-beta.90

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.
@@ -879,7 +879,7 @@ declare const mainAuthRouter: _spfn_core_route.Router<{
879
879
  id: number;
880
880
  name: string;
881
881
  displayName: string;
882
- category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
882
+ category: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
883
883
  }[];
884
884
  userId: number;
885
885
  publicId: string;
@@ -1179,8 +1179,8 @@ declare const mainAuthRouter: _spfn_core_route.Router<{
1179
1179
  }, {}, {
1180
1180
  roles: {
1181
1181
  description: string | null;
1182
- name: string;
1183
1182
  id: number;
1183
+ name: string;
1184
1184
  displayName: string;
1185
1185
  isBuiltin: boolean;
1186
1186
  isSystem: boolean;
@@ -1201,8 +1201,8 @@ declare const mainAuthRouter: _spfn_core_route.Router<{
1201
1201
  }, {}, {
1202
1202
  role: {
1203
1203
  description: string | null;
1204
- name: string;
1205
1204
  id: number;
1205
+ name: string;
1206
1206
  displayName: string;
1207
1207
  isBuiltin: boolean;
1208
1208
  isSystem: boolean;
@@ -1225,8 +1225,8 @@ declare const mainAuthRouter: _spfn_core_route.Router<{
1225
1225
  }, {}, {
1226
1226
  role: {
1227
1227
  description: string | null;
1228
- name: string;
1229
1228
  id: number;
1229
+ name: string;
1230
1230
  displayName: string;
1231
1231
  isBuiltin: boolean;
1232
1232
  isSystem: boolean;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _spfn_core_nextjs from '@spfn/core/nextjs';
2
- import { R as RoleConfig, P as PermissionConfig, S as SendVerificationCodeResult, a as RegisterResult, L as LoginResult, b as RotateKeyResult, K as KeySummary, c as RevokeAllKeysResult, I as IssueOneTimeTokenResult, O as OAuthStartResult, d as OAuthNativeResult, U as UserProfile, e as ProfileInfo, m as mainAuthRouter } from './authenticate-DK-hLSOW.js';
3
- export { k as AuthInitOptions, A as AuthSession, i as PERMISSION_CATEGORIES, j as PermissionCategory, h as VERIFICATION_PURPOSES, g as VERIFICATION_TARGET_TYPES, f as VerificationPurpose, V as VerificationTargetType } from './authenticate-DK-hLSOW.js';
2
+ import { R as RoleConfig, P as PermissionConfig, S as SendVerificationCodeResult, a as RegisterResult, L as LoginResult, b as RotateKeyResult, K as KeySummary, c as RevokeAllKeysResult, I as IssueOneTimeTokenResult, O as OAuthStartResult, d as OAuthNativeResult, U as UserProfile, e as ProfileInfo, m as mainAuthRouter } from './authenticate-CnccboAg.js';
3
+ export { k as AuthInitOptions, A as AuthSession, i as PERMISSION_CATEGORIES, j as PermissionCategory, h as VERIFICATION_PURPOSES, g as VERIFICATION_TARGET_TYPES, f as VerificationPurpose, V as VerificationTargetType } from './authenticate-CnccboAg.js';
4
4
  import * as _spfn_core_route from '@spfn/core/route';
5
5
  import { HttpMethod } from '@spfn/core/route';
6
6
  export { b as ACCOUNT_DELETION_REQUESTED_BY, A as ACCOUNT_DELETION_REQUEST_STATUSES, i as AccountDeletionRequestStatus, j as AccountDeletionRequestedBy, I as INVITATION_STATUSES, f as InvitationStatus, a as KEY_ALGORITHM, e as KEY_DEVICE_NAME_MAX_LENGTH, c as KEY_PLATFORM, K as KeyAlgorithmType, d as KeyPlatformType, P as PURGE_STRATEGIES, k as PurgeStrategy, S as SOCIAL_PROVIDERS, h as SocialProvider, U as USER_STATUSES, g as UserStatus } from './types-CD95yudz.js';
@@ -190,7 +190,7 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
190
190
  id: number;
191
191
  name: string;
192
192
  displayName: string;
193
- category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
193
+ category: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
194
194
  }[];
195
195
  userId: number;
196
196
  publicId: string;
@@ -490,8 +490,8 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
490
490
  }, {}, {
491
491
  roles: {
492
492
  description: string | null;
493
- name: string;
494
493
  id: number;
494
+ name: string;
495
495
  displayName: string;
496
496
  isBuiltin: boolean;
497
497
  isSystem: boolean;
@@ -512,8 +512,8 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
512
512
  }, {}, {
513
513
  role: {
514
514
  description: string | null;
515
- name: string;
516
515
  id: number;
516
+ name: string;
517
517
  displayName: string;
518
518
  isBuiltin: boolean;
519
519
  isSystem: boolean;
@@ -536,8 +536,8 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
536
536
  }, {}, {
537
537
  role: {
538
538
  description: string | null;
539
- name: string;
540
539
  id: number;
540
+ name: string;
541
541
  displayName: string;
542
542
  isBuiltin: boolean;
543
543
  isSystem: boolean;
package/dist/server.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { k as AuthInitOptions, l as OAuthProvider, f as VerificationPurpose, j as PermissionCategory, n as AuthContext } from './authenticate-DK-hLSOW.js';
2
- export { ab as AuthProfileVerifier, C as ChangePasswordParams, ag as DeviceNameSchema, ae as EmailSchema, I as IssueOneTimeTokenResult, H as KEY_FINGERPRINT_PREFIX_LENGTH, K as KeySummary, t as LoginParams, L as LoginResult, u as LogoutParams, an as NativeVerifyOptions, al as NormalizedIdentity, a4 as OAuthCallbackParams, a5 as OAuthCallbackResult, ao as OAuthCodeExchangeOptions, a8 as OAuthNativeParams, d as OAuthNativeResult, a3 as OAuthStartParams, O as OAuthStartResult, am as OAuthTokens, ai as PasswordSchema, af as PhoneSchema, ah as PlatformSchema, s as RegisterParams, J as RegisterPublicKeyParams, a as RegisterResult, Q as RevokeAllKeysParams, c as RevokeAllKeysResult, N as RevokeKeyParams, M as RotateKeyParams, b as RotateKeyResult, x as SendVerificationCodeParams, S as SendVerificationCodeResult, aj as TargetTypeSchema, aq as UnlinkNotification, ar as UnlinkNotifyRejection, ap as UnlinkNotifyRequest, a6 as UnlinkNotifyResult, h as VERIFICATION_PURPOSES, g as VERIFICATION_TARGET_TYPES, ak as VerificationPurposeSchema, V as VerificationTargetType, y as VerifyCodeParams, z as VerifyCodeResult, m as authRouter, ac as authenticate, Z as buildOAuthErrorUrl, q as changePasswordService, a0 as getEnabledOAuthProviders, a1 as getGoogleAccessToken, at as getOAuthProvider, au as getRegisteredProviders, _ as isOAuthProviderEnabled, T as issueOneTimeTokenService, F as listKeysService, o as loginService, p as logoutService, Y as oauthCallbackService, a7 as oauthNativeService, X as oauthStartService, a2 as oauthUnlinkNotifyService, ad as optionalAuth, as as registerOAuthProvider, B as registerPublicKeyService, r as registerService, $ as requireEnabledProvider, aa as resolveAuthenticatedUser, G as revokeAllKeysService, E as revokeKeyService, D as rotateKeyService, a9 as selectAuthProfile, v as sendVerificationCodeService, w as verifyCodeService, W as verifyOneTimeTokenService } from './authenticate-DK-hLSOW.js';
1
+ import { k as AuthInitOptions, l as OAuthProvider, f as VerificationPurpose, j as PermissionCategory, n as AuthContext } from './authenticate-CnccboAg.js';
2
+ export { ab as AuthProfileVerifier, C as ChangePasswordParams, ag as DeviceNameSchema, ae as EmailSchema, I as IssueOneTimeTokenResult, H as KEY_FINGERPRINT_PREFIX_LENGTH, K as KeySummary, t as LoginParams, L as LoginResult, u as LogoutParams, an as NativeVerifyOptions, al as NormalizedIdentity, a4 as OAuthCallbackParams, a5 as OAuthCallbackResult, ao as OAuthCodeExchangeOptions, a8 as OAuthNativeParams, d as OAuthNativeResult, a3 as OAuthStartParams, O as OAuthStartResult, am as OAuthTokens, ai as PasswordSchema, af as PhoneSchema, ah as PlatformSchema, s as RegisterParams, J as RegisterPublicKeyParams, a as RegisterResult, Q as RevokeAllKeysParams, c as RevokeAllKeysResult, N as RevokeKeyParams, M as RotateKeyParams, b as RotateKeyResult, x as SendVerificationCodeParams, S as SendVerificationCodeResult, aj as TargetTypeSchema, aq as UnlinkNotification, ar as UnlinkNotifyRejection, ap as UnlinkNotifyRequest, a6 as UnlinkNotifyResult, h as VERIFICATION_PURPOSES, g as VERIFICATION_TARGET_TYPES, ak as VerificationPurposeSchema, V as VerificationTargetType, y as VerifyCodeParams, z as VerifyCodeResult, m as authRouter, ac as authenticate, Z as buildOAuthErrorUrl, q as changePasswordService, a0 as getEnabledOAuthProviders, a1 as getGoogleAccessToken, at as getOAuthProvider, au as getRegisteredProviders, _ as isOAuthProviderEnabled, T as issueOneTimeTokenService, F as listKeysService, o as loginService, p as logoutService, Y as oauthCallbackService, a7 as oauthNativeService, X as oauthStartService, a2 as oauthUnlinkNotifyService, ad as optionalAuth, as as registerOAuthProvider, B as registerPublicKeyService, r as registerService, $ as requireEnabledProvider, aa as resolveAuthenticatedUser, G as revokeAllKeysService, E as revokeKeyService, D as rotateKeyService, a9 as selectAuthProfile, v as sendVerificationCodeService, w as verifyCodeService, W as verifyOneTimeTokenService } from './authenticate-CnccboAg.js';
3
3
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
4
4
  import { K as KeyAlgorithmType, f as InvitationStatus, h as SocialProvider, j as AccountDeletionRequestedBy, k as PurgeStrategy } from './types-CD95yudz.js';
5
5
  export { b as ACCOUNT_DELETION_REQUESTED_BY, A as ACCOUNT_DELETION_REQUEST_STATUSES, i as AccountDeletionRequestStatus, I as INVITATION_STATUSES, a as KEY_ALGORITHM, e as KEY_DEVICE_NAME_MAX_LENGTH, c as KEY_PLATFORM, d as KeyPlatformType, P as PURGE_STRATEGIES, S as SOCIAL_PROVIDERS, U as USER_STATUSES, g as UserStatus } from './types-CD95yudz.js';
@@ -1317,7 +1317,7 @@ declare function getAuthSessionService(userId: string | number | bigint): Promis
1317
1317
  id: number;
1318
1318
  name: string;
1319
1319
  displayName: string;
1320
- category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
1320
+ category: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
1321
1321
  }[];
1322
1322
  userId: number;
1323
1323
  publicId: string;
@@ -1763,7 +1763,7 @@ declare const accountDeletionRequests: drizzle_orm_pg_core.PgTableWithColumns<{
1763
1763
  name: string;
1764
1764
  tableName: "account_deletion_requests";
1765
1765
  dataType: "string enum";
1766
- data: "admin" | "self";
1766
+ data: "self" | "admin";
1767
1767
  driverParam: string;
1768
1768
  notNull: true;
1769
1769
  hasDefault: true;
@@ -2907,7 +2907,7 @@ declare const permissions: drizzle_orm_pg_core.PgTableWithColumns<{
2907
2907
  name: string;
2908
2908
  tableName: "permissions";
2909
2909
  dataType: "string enum";
2910
- data: "auth" | "custom" | "user" | "rbac" | "system";
2910
+ data: "custom" | "user" | "auth" | "rbac" | "system";
2911
2911
  driverParam: string;
2912
2912
  notNull: false;
2913
2913
  hasDefault: false;
@@ -3496,15 +3496,15 @@ declare class UsersRepository extends BaseRepository {
3496
3496
  create(data: NewUser): Promise<{
3497
3497
  email: string | null;
3498
3498
  phone: string | null;
3499
+ status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
3500
+ username: string | null;
3499
3501
  id: number;
3502
+ createdAt: Date;
3503
+ updatedAt: Date;
3500
3504
  publicId: string;
3501
- username: string | null;
3502
3505
  passwordHash: string | null;
3503
3506
  passwordChangeRequired: boolean;
3504
3507
  roleId: number;
3505
- createdAt: Date;
3506
- updatedAt: Date;
3507
- status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
3508
3508
  emailVerifiedAt: Date | null;
3509
3509
  phoneVerifiedAt: Date | null;
3510
3510
  lastLoginAt: Date | null;
@@ -3611,15 +3611,15 @@ declare class UsersRepository extends BaseRepository {
3611
3611
  deleteById(id: number): Promise<{
3612
3612
  email: string | null;
3613
3613
  phone: string | null;
3614
+ status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
3615
+ username: string | null;
3614
3616
  id: number;
3617
+ createdAt: Date;
3618
+ updatedAt: Date;
3615
3619
  publicId: string;
3616
- username: string | null;
3617
3620
  passwordHash: string | null;
3618
3621
  passwordChangeRequired: boolean;
3619
3622
  roleId: number;
3620
- createdAt: Date;
3621
- updatedAt: Date;
3622
- status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
3623
3623
  emailVerifiedAt: Date | null;
3624
3624
  phoneVerifiedAt: Date | null;
3625
3625
  lastLoginAt: Date | null;
@@ -3644,7 +3644,7 @@ declare class UsersRepository extends BaseRepository {
3644
3644
  id: number;
3645
3645
  name: string;
3646
3646
  displayName: string;
3647
- category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
3647
+ category: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
3648
3648
  }[];
3649
3649
  }>;
3650
3650
  /**
@@ -3787,18 +3787,18 @@ declare class KeysRepository extends BaseRepository {
3787
3787
  * Write primary 사용
3788
3788
  */
3789
3789
  create(data: NewUserPublicKey): Promise<{
3790
- publicKey: string;
3791
- keyId: string;
3792
- fingerprint: string;
3793
- algorithm: "ES256" | "RS256";
3794
- deviceName: string | null;
3795
- platform: "ios" | "android" | "web" | "desktop" | null;
3796
3790
  userId: number;
3791
+ keyId: string;
3797
3792
  id: number;
3798
3793
  isActive: boolean;
3799
3794
  createdAt: Date;
3800
- expiresAt: Date | null;
3795
+ publicKey: string;
3796
+ algorithm: "ES256" | "RS256";
3797
+ fingerprint: string;
3798
+ deviceName: string | null;
3799
+ platform: "ios" | "android" | "web" | "desktop" | null;
3801
3800
  lastUsedAt: Date | null;
3801
+ expiresAt: Date | null;
3802
3802
  revokedAt: Date | null;
3803
3803
  revokedReason: string | null;
3804
3804
  }>;
@@ -3873,18 +3873,18 @@ declare class KeysRepository extends BaseRepository {
3873
3873
  * Write primary 사용
3874
3874
  */
3875
3875
  deleteByKeyIdAndUserId(keyId: string, userId: number): Promise<{
3876
- publicKey: string;
3877
- keyId: string;
3878
- fingerprint: string;
3879
- algorithm: "ES256" | "RS256";
3880
- deviceName: string | null;
3881
- platform: "ios" | "android" | "web" | "desktop" | null;
3882
3876
  userId: number;
3877
+ keyId: string;
3883
3878
  id: number;
3884
3879
  isActive: boolean;
3885
3880
  createdAt: Date;
3886
- expiresAt: Date | null;
3881
+ publicKey: string;
3882
+ algorithm: "ES256" | "RS256";
3883
+ fingerprint: string;
3884
+ deviceName: string | null;
3885
+ platform: "ios" | "android" | "web" | "desktop" | null;
3887
3886
  lastUsedAt: Date | null;
3887
+ expiresAt: Date | null;
3888
3888
  revokedAt: Date | null;
3889
3889
  revokedReason: string | null;
3890
3890
  }>;
@@ -4046,14 +4046,14 @@ declare class VerificationCodesRepository extends BaseRepository {
4046
4046
  * Write primary 사용
4047
4047
  */
4048
4048
  create(data: NewVerificationCode): Promise<{
4049
- target: string;
4050
- targetType: "email" | "phone";
4051
- purpose: "registration" | "login" | "password_reset" | "email_change" | "phone_change" | "account_deletion";
4052
- code: string;
4053
4049
  id: number;
4054
4050
  createdAt: Date;
4055
4051
  updatedAt: Date;
4056
4052
  expiresAt: Date;
4053
+ target: string;
4054
+ targetType: "email" | "phone";
4055
+ code: string;
4056
+ purpose: "registration" | "login" | "password_reset" | "email_change" | "phone_change" | "account_deletion";
4057
4057
  usedAt: Date | null;
4058
4058
  attempts: number;
4059
4059
  }>;
@@ -4186,8 +4186,8 @@ declare class RolesRepository extends BaseRepository {
4186
4186
  */
4187
4187
  create(data: NewRoleEntity): Promise<{
4188
4188
  description: string | null;
4189
- name: string;
4190
4189
  id: number;
4190
+ name: string;
4191
4191
  displayName: string;
4192
4192
  isBuiltin: boolean;
4193
4193
  isSystem: boolean;
@@ -4216,8 +4216,8 @@ declare class RolesRepository extends BaseRepository {
4216
4216
  */
4217
4217
  deleteById(id: number): Promise<{
4218
4218
  description: string | null;
4219
- name: string;
4220
4219
  id: number;
4220
+ name: string;
4221
4221
  displayName: string;
4222
4222
  isBuiltin: boolean;
4223
4223
  isSystem: boolean;
@@ -4250,7 +4250,7 @@ declare class PermissionsRepository extends BaseRepository {
4250
4250
  name: string;
4251
4251
  displayName: string;
4252
4252
  description: string | null;
4253
- category: "auth" | "custom" | "user" | "rbac" | "system" | null;
4253
+ category: "custom" | "user" | "auth" | "rbac" | "system" | null;
4254
4254
  isBuiltin: boolean;
4255
4255
  isSystem: boolean;
4256
4256
  isActive: boolean;
@@ -4266,7 +4266,7 @@ declare class PermissionsRepository extends BaseRepository {
4266
4266
  name: string;
4267
4267
  displayName: string;
4268
4268
  description: string | null;
4269
- category: "auth" | "custom" | "user" | "rbac" | "system" | null;
4269
+ category: "custom" | "user" | "auth" | "rbac" | "system" | null;
4270
4270
  isBuiltin: boolean;
4271
4271
  isSystem: boolean;
4272
4272
  isActive: boolean;
@@ -4306,7 +4306,7 @@ declare class PermissionsRepository extends BaseRepository {
4306
4306
  name: string;
4307
4307
  displayName: string;
4308
4308
  description: string | null;
4309
- category: "auth" | "custom" | "user" | "rbac" | "system" | null;
4309
+ category: "custom" | "user" | "auth" | "rbac" | "system" | null;
4310
4310
  isBuiltin: boolean;
4311
4311
  isSystem: boolean;
4312
4312
  isActive: boolean;
@@ -4317,16 +4317,16 @@ declare class PermissionsRepository extends BaseRepository {
4317
4317
  */
4318
4318
  deleteById(id: number): Promise<{
4319
4319
  description: string | null;
4320
- metadata: Record<string, any> | null;
4321
- name: string;
4322
4320
  id: number;
4321
+ name: string;
4323
4322
  displayName: string;
4324
4323
  isBuiltin: boolean;
4325
4324
  isSystem: boolean;
4326
4325
  isActive: boolean;
4327
4326
  createdAt: Date;
4328
4327
  updatedAt: Date;
4329
- category: "auth" | "custom" | "user" | "rbac" | "system" | null;
4328
+ metadata: Record<string, any> | null;
4329
+ category: "custom" | "user" | "auth" | "rbac" | "system" | null;
4330
4330
  }>;
4331
4331
  }
4332
4332
  declare const permissionsRepository: PermissionsRepository;
@@ -4371,9 +4371,9 @@ declare class RolePermissionsRepository extends BaseRepository {
4371
4371
  */
4372
4372
  createMany(data: NewRolePermission[]): Promise<{
4373
4373
  id: number;
4374
- roleId: number;
4375
4374
  createdAt: Date;
4376
4375
  updatedAt: Date;
4376
+ roleId: number;
4377
4377
  permissionId: number;
4378
4378
  }[]>;
4379
4379
  /**
@@ -4389,9 +4389,9 @@ declare class RolePermissionsRepository extends BaseRepository {
4389
4389
  */
4390
4390
  setPermissionsForRole(roleId: number, permissionIds: number[]): Promise<{
4391
4391
  id: number;
4392
- roleId: number;
4393
4392
  createdAt: Date;
4394
4393
  updatedAt: Date;
4394
+ roleId: number;
4395
4395
  permissionId: number;
4396
4396
  }[]>;
4397
4397
  }
@@ -4456,9 +4456,9 @@ declare class UserPermissionsRepository extends BaseRepository {
4456
4456
  id: number;
4457
4457
  createdAt: Date;
4458
4458
  updatedAt: Date;
4459
- permissionId: number;
4460
- reason: string | null;
4461
4459
  expiresAt: Date | null;
4460
+ reason: string | null;
4461
+ permissionId: number;
4462
4462
  granted: boolean;
4463
4463
  }>;
4464
4464
  /**
@@ -4482,9 +4482,9 @@ declare class UserPermissionsRepository extends BaseRepository {
4482
4482
  id: number;
4483
4483
  createdAt: Date;
4484
4484
  updatedAt: Date;
4485
- permissionId: number;
4486
- reason: string | null;
4487
4485
  expiresAt: Date | null;
4486
+ reason: string | null;
4487
+ permissionId: number;
4488
4488
  granted: boolean;
4489
4489
  }>;
4490
4490
  /**
@@ -4563,7 +4563,6 @@ declare class UserProfilesRepository extends BaseRepository {
4563
4563
  * 프로필 생성
4564
4564
  */
4565
4565
  create(data: NewUserProfile): Promise<{
4566
- metadata: Record<string, any> | null;
4567
4566
  userId: number;
4568
4567
  id: number;
4569
4568
  displayName: string | null;
@@ -4581,6 +4580,7 @@ declare class UserProfilesRepository extends BaseRepository {
4581
4580
  location: string | null;
4582
4581
  company: string | null;
4583
4582
  jobTitle: string | null;
4583
+ metadata: Record<string, any> | null;
4584
4584
  }>;
4585
4585
  /**
4586
4586
  * 프로필 업데이트 (by ID)
@@ -4632,7 +4632,6 @@ declare class UserProfilesRepository extends BaseRepository {
4632
4632
  * 프로필 삭제 (by ID)
4633
4633
  */
4634
4634
  deleteById(id: number): Promise<{
4635
- metadata: Record<string, any> | null;
4636
4635
  userId: number;
4637
4636
  id: number;
4638
4637
  displayName: string | null;
@@ -4650,12 +4649,12 @@ declare class UserProfilesRepository extends BaseRepository {
4650
4649
  location: string | null;
4651
4650
  company: string | null;
4652
4651
  jobTitle: string | null;
4652
+ metadata: Record<string, any> | null;
4653
4653
  }>;
4654
4654
  /**
4655
4655
  * 프로필 삭제 (by User ID)
4656
4656
  */
4657
4657
  deleteByUserId(userId: number): Promise<{
4658
- metadata: Record<string, any> | null;
4659
4658
  userId: number;
4660
4659
  id: number;
4661
4660
  displayName: string | null;
@@ -4673,6 +4672,7 @@ declare class UserProfilesRepository extends BaseRepository {
4673
4672
  location: string | null;
4674
4673
  company: string | null;
4675
4674
  jobTitle: string | null;
4675
+ metadata: Record<string, any> | null;
4676
4676
  }>;
4677
4677
  /**
4678
4678
  * 프로필 Upsert (by User ID)
@@ -4681,7 +4681,6 @@ declare class UserProfilesRepository extends BaseRepository {
4681
4681
  * 새로 생성 시 displayName은 필수 (없으면 'User'로 설정)
4682
4682
  */
4683
4683
  upsertByUserId(userId: number, data: Partial<Omit<NewUserProfile, 'userId'>>): Promise<{
4684
- metadata: Record<string, any> | null;
4685
4684
  userId: number;
4686
4685
  id: number;
4687
4686
  displayName: string | null;
@@ -4699,6 +4698,7 @@ declare class UserProfilesRepository extends BaseRepository {
4699
4698
  location: string | null;
4700
4699
  company: string | null;
4701
4700
  jobTitle: string | null;
4701
+ metadata: Record<string, any> | null;
4702
4702
  }>;
4703
4703
  /**
4704
4704
  * User ID로 프로필 데이터 조회 (formatted)
@@ -4826,15 +4826,15 @@ declare class InvitationsRepository extends BaseRepository {
4826
4826
  */
4827
4827
  create(data: NewInvitation): Promise<{
4828
4828
  email: string;
4829
- metadata: Record<string, any> | null;
4829
+ status: "pending" | "accepted" | "expired" | "cancelled";
4830
4830
  id: number;
4831
- roleId: number;
4832
4831
  createdAt: Date;
4833
4832
  updatedAt: Date;
4834
- status: "pending" | "accepted" | "expired" | "cancelled";
4833
+ roleId: number;
4834
+ metadata: Record<string, any> | null;
4835
+ expiresAt: Date;
4835
4836
  token: string;
4836
4837
  invitedBy: number;
4837
- expiresAt: Date;
4838
4838
  acceptedAt: Date | null;
4839
4839
  cancelledAt: Date | null;
4840
4840
  }>;
@@ -4860,15 +4860,15 @@ declare class InvitationsRepository extends BaseRepository {
4860
4860
  */
4861
4861
  deleteById(id: number): Promise<{
4862
4862
  email: string;
4863
- metadata: Record<string, any> | null;
4863
+ status: "pending" | "accepted" | "expired" | "cancelled";
4864
4864
  id: number;
4865
- roleId: number;
4866
4865
  createdAt: Date;
4867
4866
  updatedAt: Date;
4868
- status: "pending" | "accepted" | "expired" | "cancelled";
4867
+ roleId: number;
4868
+ metadata: Record<string, any> | null;
4869
+ expiresAt: Date;
4869
4870
  token: string;
4870
4871
  invitedBy: number;
4871
- expiresAt: Date;
4872
4872
  acceptedAt: Date | null;
4873
4873
  cancelledAt: Date | null;
4874
4874
  }>;
@@ -5106,9 +5106,9 @@ declare class SocialAccountsRepository extends BaseRepository {
5106
5106
  createdAt: Date;
5107
5107
  updatedAt: Date;
5108
5108
  provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself";
5109
- accessToken: string | null;
5110
5109
  providerUserId: string;
5111
5110
  providerEmail: string | null;
5111
+ accessToken: string | null;
5112
5112
  refreshToken: string | null;
5113
5113
  tokenExpiresAt: Date | null;
5114
5114
  }>;
@@ -5122,9 +5122,9 @@ declare class SocialAccountsRepository extends BaseRepository {
5122
5122
  createdAt: Date;
5123
5123
  updatedAt: Date;
5124
5124
  provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself";
5125
- accessToken: string | null;
5126
5125
  providerUserId: string;
5127
5126
  providerEmail: string | null;
5127
+ accessToken: string | null;
5128
5128
  refreshToken: string | null;
5129
5129
  tokenExpiresAt: Date | null;
5130
5130
  }>;
@@ -5184,7 +5184,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5184
5184
  requestedAt: Date;
5185
5185
  purgeScheduledAt: Date;
5186
5186
  status: "pending" | "cancelled" | "completed";
5187
- requestedBy: "admin" | "self";
5187
+ requestedBy: "self" | "admin";
5188
5188
  reason: string | null;
5189
5189
  cancelledAt: Date | null;
5190
5190
  completedAt: Date | null;
@@ -5203,7 +5203,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5203
5203
  requestedAt: Date;
5204
5204
  purgeScheduledAt: Date;
5205
5205
  status: "pending" | "cancelled" | "completed";
5206
- requestedBy: "admin" | "self";
5206
+ requestedBy: "self" | "admin";
5207
5207
  reason: string | null;
5208
5208
  cancelledAt: Date | null;
5209
5209
  completedAt: Date | null;
@@ -5225,7 +5225,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5225
5225
  requestedAt: Date;
5226
5226
  purgeScheduledAt: Date;
5227
5227
  status: "pending" | "cancelled" | "completed";
5228
- requestedBy: "admin" | "self";
5228
+ requestedBy: "self" | "admin";
5229
5229
  reason: string | null;
5230
5230
  cancelledAt: Date | null;
5231
5231
  completedAt: Date | null;
@@ -5244,7 +5244,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5244
5244
  requestedAt: Date;
5245
5245
  purgeScheduledAt: Date;
5246
5246
  status: "pending" | "cancelled" | "completed";
5247
- requestedBy: "admin" | "self";
5247
+ requestedBy: "self" | "admin";
5248
5248
  reason: string | null;
5249
5249
  cancelledAt: Date | null;
5250
5250
  completedAt: Date | null;
@@ -5256,16 +5256,16 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5256
5256
  */
5257
5257
  create(data: NewAccountDeletionRequest): Promise<{
5258
5258
  userId: number | null;
5259
+ status: "pending" | "cancelled" | "completed";
5260
+ purgeScheduledAt: Date;
5259
5261
  id: number;
5260
5262
  createdAt: Date;
5261
5263
  updatedAt: Date;
5262
- status: "pending" | "cancelled" | "completed";
5263
- reason: string | null;
5264
- purgeScheduledAt: Date;
5265
5264
  cancelledAt: Date | null;
5266
5265
  userPublicId: string;
5267
5266
  requestedAt: Date;
5268
- requestedBy: "admin" | "self";
5267
+ requestedBy: "self" | "admin";
5268
+ reason: string | null;
5269
5269
  completedAt: Date | null;
5270
5270
  purgeStrategy: "anonymize" | "hard-delete" | null;
5271
5271
  }>;
@@ -5286,7 +5286,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5286
5286
  requestedAt: Date;
5287
5287
  purgeScheduledAt: Date;
5288
5288
  status: "pending" | "cancelled" | "completed";
5289
- requestedBy: "admin" | "self";
5289
+ requestedBy: "self" | "admin";
5290
5290
  reason: string | null;
5291
5291
  cancelledAt: Date | null;
5292
5292
  completedAt: Date | null;
@@ -5311,7 +5311,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5311
5311
  requestedAt: Date;
5312
5312
  purgeScheduledAt: Date;
5313
5313
  status: "pending" | "cancelled" | "completed";
5314
- requestedBy: "admin" | "self";
5314
+ requestedBy: "self" | "admin";
5315
5315
  reason: string | null;
5316
5316
  cancelledAt: Date | null;
5317
5317
  completedAt: Date | null;
@@ -5763,15 +5763,15 @@ declare function getUser(c: Context | {
5763
5763
  }): {
5764
5764
  email: string | null;
5765
5765
  phone: string | null;
5766
+ status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
5767
+ username: string | null;
5766
5768
  id: number;
5769
+ createdAt: Date;
5770
+ updatedAt: Date;
5767
5771
  publicId: string;
5768
- username: string | null;
5769
5772
  passwordHash: string | null;
5770
5773
  passwordChangeRequired: boolean;
5771
5774
  roleId: number;
5772
- createdAt: Date;
5773
- updatedAt: Date;
5774
- status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
5775
5775
  emailVerifiedAt: Date | null;
5776
5776
  phoneVerifiedAt: Date | null;
5777
5777
  lastLoginAt: Date | null;
@@ -6448,7 +6448,7 @@ declare const authLoginEvent: _spfn_core_event.EventDef<{
6448
6448
  email?: string | undefined;
6449
6449
  phone?: string | undefined;
6450
6450
  userId: string;
6451
- provider: "email" | "phone" | "google" | "apple" | "github" | "kakao" | "naver" | "superself";
6451
+ provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself" | "email" | "phone";
6452
6452
  }>;
6453
6453
  /**
6454
6454
  * auth.register - 회원가입 성공 이벤트
@@ -6471,7 +6471,7 @@ declare const authRegisterEvent: _spfn_core_event.EventDef<{
6471
6471
  [x: string]: unknown;
6472
6472
  } | undefined;
6473
6473
  userId: string;
6474
- provider: "email" | "phone" | "google" | "apple" | "github" | "kakao" | "naver" | "superself";
6474
+ provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself" | "email" | "phone";
6475
6475
  }>;
6476
6476
  /**
6477
6477
  * auth.invitation.created - 초대 생성 이벤트
@@ -6499,9 +6499,9 @@ declare const invitationCreatedEvent: _spfn_core_event.EventDef<{
6499
6499
  } | undefined;
6500
6500
  email: string;
6501
6501
  roleId: number;
6502
+ expiresAt: string;
6502
6503
  token: string;
6503
6504
  invitedBy: string;
6504
- expiresAt: string;
6505
6505
  invitationId: string;
6506
6506
  isResend: boolean;
6507
6507
  }>;
@@ -6545,7 +6545,7 @@ declare const authDeletionRequestedEvent: _spfn_core_event.EventDef<{
6545
6545
  userId: string;
6546
6546
  purgeScheduledAt: string;
6547
6547
  userPublicId: string;
6548
- requestedBy: "admin" | "self";
6548
+ requestedBy: "self" | "admin";
6549
6549
  }>;
6550
6550
  /**
6551
6551
  * auth.deletion.cancelled - 계정 탈퇴 복구 이벤트
@@ -6590,7 +6590,7 @@ declare const authDeletionCompletedEvent: _spfn_core_event.EventDef<{
6590
6590
  declare const oauthUnlinkedEvent: _spfn_core_event.EventDef<{
6591
6591
  reason?: string | undefined;
6592
6592
  userId: string;
6593
- provider: "email" | "phone" | "google" | "apple" | "github" | "kakao" | "naver" | "superself";
6593
+ provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself" | "email" | "phone";
6594
6594
  providerUserId: string;
6595
6595
  }>;
6596
6596
  /**
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@spfn/auth",
3
- "version": "0.2.0-beta.89",
3
+ "version": "0.2.0-beta.90",
4
4
  "type": "module",
5
- "description": "Authentication, authorization, and RBAC module for SPFN",
5
+ "description": "Authentication for a Next.js full-stack app: sessions, social login, OAuth, RBAC and admin roles, without assembling an auth stack yourself",
6
6
  "author": "Ray Im <rayim@fxy.global>",
7
7
  "main": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
@@ -85,7 +85,13 @@
85
85
  "authentication",
86
86
  "authorization",
87
87
  "rbac",
88
- "access-control"
88
+ "access-control",
89
+ "nextjs",
90
+ "typescript",
91
+ "oauth",
92
+ "social-login",
93
+ "session",
94
+ "ai-coding-agent"
89
95
  ],
90
96
  "license": "MIT",
91
97
  "repository": {