@spfn/auth 0.2.0-beta.86 → 0.2.0-beta.87

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/server.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { j as AuthInitOptions, k as OAuthProvider, e as VerificationPurpose, i as PermissionCategory, l as AuthContext } from './authenticate-DTA7W4v2.js';
2
- export { C as ChangePasswordParams, a5 as EmailSchema, I as IssueOneTimeTokenResult, s as LoginParams, L as LoginResult, t as LogoutParams, ac as NativeVerifyOptions, aa as NormalizedIdentity, _ as OAuthCallbackParams, $ as OAuthCallbackResult, ad as OAuthCodeExchangeOptions, a2 as OAuthNativeParams, c as OAuthNativeResult, Z as OAuthStartParams, O as OAuthStartResult, ab as OAuthTokens, a7 as PasswordSchema, a6 as PhoneSchema, q as RegisterParams, E as RegisterPublicKeyParams, a as RegisterResult, G as RevokeKeyParams, F as RotateKeyParams, b as RotateKeyResult, w as SendVerificationCodeParams, S as SendVerificationCodeResult, a8 as TargetTypeSchema, af as UnlinkNotification, ag as UnlinkNotifyRejection, ae as UnlinkNotifyRequest, a0 as UnlinkNotifyResult, g as VERIFICATION_PURPOSES, f as VERIFICATION_TARGET_TYPES, a9 as VerificationPurposeSchema, V as VerificationTargetType, x as VerifyCodeParams, y as VerifyCodeResult, m as authRouter, a3 as authenticate, N as buildOAuthErrorUrl, p as changePasswordService, W as getEnabledOAuthProviders, X as getGoogleAccessToken, ai as getOAuthProvider, aj as getRegisteredProviders, Q as isOAuthProviderEnabled, H as issueOneTimeTokenService, n as loginService, o as logoutService, M as oauthCallbackService, a1 as oauthNativeService, K as oauthStartService, Y as oauthUnlinkNotifyService, a4 as optionalAuth, ah as registerOAuthProvider, z as registerPublicKeyService, r as registerService, T as requireEnabledProvider, D as revokeKeyService, B as rotateKeyService, u as sendVerificationCodeService, v as verifyCodeService, J as verifyOneTimeTokenService } from './authenticate-DTA7W4v2.js';
1
+ import { j as AuthInitOptions, k as OAuthProvider, e as VerificationPurpose, i as PermissionCategory, l as AuthContext } from './authenticate-C7w-pLOR.js';
2
+ export { a5 as AuthProfileVerifier, C as ChangePasswordParams, a8 as EmailSchema, I as IssueOneTimeTokenResult, s as LoginParams, L as LoginResult, t as LogoutParams, af as NativeVerifyOptions, ad as NormalizedIdentity, _ as OAuthCallbackParams, $ as OAuthCallbackResult, ag as OAuthCodeExchangeOptions, a2 as OAuthNativeParams, c as OAuthNativeResult, Z as OAuthStartParams, O as OAuthStartResult, ae as OAuthTokens, aa as PasswordSchema, a9 as PhoneSchema, q as RegisterParams, E as RegisterPublicKeyParams, a as RegisterResult, G as RevokeKeyParams, F as RotateKeyParams, b as RotateKeyResult, w as SendVerificationCodeParams, S as SendVerificationCodeResult, ab as TargetTypeSchema, ai as UnlinkNotification, aj as UnlinkNotifyRejection, ah as UnlinkNotifyRequest, a0 as UnlinkNotifyResult, g as VERIFICATION_PURPOSES, f as VERIFICATION_TARGET_TYPES, ac as VerificationPurposeSchema, V as VerificationTargetType, x as VerifyCodeParams, y as VerifyCodeResult, m as authRouter, a6 as authenticate, N as buildOAuthErrorUrl, p as changePasswordService, W as getEnabledOAuthProviders, X as getGoogleAccessToken, al as getOAuthProvider, am as getRegisteredProviders, Q as isOAuthProviderEnabled, H as issueOneTimeTokenService, n as loginService, o as logoutService, M as oauthCallbackService, a1 as oauthNativeService, K as oauthStartService, Y as oauthUnlinkNotifyService, a7 as optionalAuth, ak as registerOAuthProvider, z as registerPublicKeyService, r as registerService, T as requireEnabledProvider, a4 as resolveAuthenticatedUser, D as revokeKeyService, B as rotateKeyService, a3 as selectAuthProfile, u as sendVerificationCodeService, v as verifyCodeService, J as verifyOneTimeTokenService } from './authenticate-C7w-pLOR.js';
3
3
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
4
4
  import { K as KeyAlgorithmType, c as InvitationStatus, e as SocialProvider, g as AccountDeletionRequestedBy, h as PurgeStrategy } from './types-1BMx0OX1.js';
5
5
  export { b as ACCOUNT_DELETION_REQUESTED_BY, A as ACCOUNT_DELETION_REQUEST_STATUSES, f as AccountDeletionRequestStatus, I as INVITATION_STATUSES, a as KEY_ALGORITHM, P as PURGE_STRATEGIES, S as SOCIAL_PROVIDERS, U as USER_STATUSES, d as UserStatus } from './types-1BMx0OX1.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: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
1320
+ category: "auth" | "custom" | "user" | "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: "self" | "admin";
1766
+ data: "admin" | "self";
1767
1767
  driverParam: string;
1768
1768
  notNull: true;
1769
1769
  hasDefault: true;
@@ -2877,7 +2877,7 @@ declare const permissions: drizzle_orm_pg_core.PgTableWithColumns<{
2877
2877
  name: string;
2878
2878
  tableName: "permissions";
2879
2879
  dataType: "string enum";
2880
- data: "custom" | "user" | "auth" | "rbac" | "system";
2880
+ data: "auth" | "custom" | "user" | "rbac" | "system";
2881
2881
  driverParam: string;
2882
2882
  notNull: false;
2883
2883
  hasDefault: false;
@@ -3466,15 +3466,15 @@ declare class UsersRepository extends BaseRepository {
3466
3466
  create(data: NewUser): Promise<{
3467
3467
  email: string | null;
3468
3468
  phone: string | null;
3469
- status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
3470
- username: string | null;
3471
3469
  id: number;
3472
- createdAt: Date;
3473
- updatedAt: Date;
3474
3470
  publicId: string;
3471
+ username: string | null;
3475
3472
  passwordHash: string | null;
3476
3473
  passwordChangeRequired: boolean;
3477
3474
  roleId: number;
3475
+ createdAt: Date;
3476
+ updatedAt: Date;
3477
+ status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
3478
3478
  emailVerifiedAt: Date | null;
3479
3479
  phoneVerifiedAt: Date | null;
3480
3480
  lastLoginAt: Date | null;
@@ -3581,15 +3581,15 @@ declare class UsersRepository extends BaseRepository {
3581
3581
  deleteById(id: number): Promise<{
3582
3582
  email: string | null;
3583
3583
  phone: string | null;
3584
- status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
3585
- username: string | null;
3586
3584
  id: number;
3587
- createdAt: Date;
3588
- updatedAt: Date;
3589
3585
  publicId: string;
3586
+ username: string | null;
3590
3587
  passwordHash: string | null;
3591
3588
  passwordChangeRequired: boolean;
3592
3589
  roleId: number;
3590
+ createdAt: Date;
3591
+ updatedAt: Date;
3592
+ status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
3593
3593
  emailVerifiedAt: Date | null;
3594
3594
  phoneVerifiedAt: Date | null;
3595
3595
  lastLoginAt: Date | null;
@@ -3614,7 +3614,7 @@ declare class UsersRepository extends BaseRepository {
3614
3614
  id: number;
3615
3615
  name: string;
3616
3616
  displayName: string;
3617
- category: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
3617
+ category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
3618
3618
  }[];
3619
3619
  }>;
3620
3620
  /**
@@ -3729,16 +3729,16 @@ declare class KeysRepository extends BaseRepository {
3729
3729
  * Write primary 사용
3730
3730
  */
3731
3731
  create(data: NewUserPublicKey): Promise<{
3732
- userId: number;
3732
+ publicKey: string;
3733
3733
  keyId: string;
3734
+ fingerprint: string;
3735
+ algorithm: "ES256" | "RS256";
3736
+ userId: number;
3734
3737
  id: number;
3735
3738
  isActive: boolean;
3736
3739
  createdAt: Date;
3737
- publicKey: string;
3738
- algorithm: "ES256" | "RS256";
3739
- fingerprint: string;
3740
- lastUsedAt: Date | null;
3741
3740
  expiresAt: Date | null;
3741
+ lastUsedAt: Date | null;
3742
3742
  revokedAt: Date | null;
3743
3743
  revokedReason: string | null;
3744
3744
  }>;
@@ -3786,16 +3786,16 @@ declare class KeysRepository extends BaseRepository {
3786
3786
  * Write primary 사용
3787
3787
  */
3788
3788
  deleteByKeyIdAndUserId(keyId: string, userId: number): Promise<{
3789
- userId: number;
3789
+ publicKey: string;
3790
3790
  keyId: string;
3791
+ fingerprint: string;
3792
+ algorithm: "ES256" | "RS256";
3793
+ userId: number;
3791
3794
  id: number;
3792
3795
  isActive: boolean;
3793
3796
  createdAt: Date;
3794
- publicKey: string;
3795
- algorithm: "ES256" | "RS256";
3796
- fingerprint: string;
3797
- lastUsedAt: Date | null;
3798
3797
  expiresAt: Date | null;
3798
+ lastUsedAt: Date | null;
3799
3799
  revokedAt: Date | null;
3800
3800
  revokedReason: string | null;
3801
3801
  }>;
@@ -3825,6 +3825,27 @@ declare class KeysRepository extends BaseRepository {
3825
3825
  revokedAt: Date | null;
3826
3826
  revokedReason: string | null;
3827
3827
  }>;
3828
+ /**
3829
+ * Key ID로 공개키 조회 — 활성 여부 무관 (clientProofV1 admission의 revocation 판정용)
3830
+ *
3831
+ * 폐기(isActive=false)·만료(expiresAt 경과)를 SESSION_REVOKED로, 미등록을
3832
+ * PROOF_INVALID로 구분해야 하므로 활성 필터 없이 조회한다. keyId는 UNIQUE.
3833
+ * Read replica 사용
3834
+ */
3835
+ findByKeyId(keyId: string): Promise<{
3836
+ id: number;
3837
+ userId: number;
3838
+ keyId: string;
3839
+ publicKey: string;
3840
+ algorithm: "ES256" | "RS256";
3841
+ fingerprint: string;
3842
+ isActive: boolean;
3843
+ createdAt: Date;
3844
+ lastUsedAt: Date | null;
3845
+ expiresAt: Date | null;
3846
+ revokedAt: Date | null;
3847
+ revokedReason: string | null;
3848
+ }>;
3828
3849
  /**
3829
3850
  * Key ID로 활성 공개키 조회 (authenticate용)
3830
3851
  * Read replica 사용
@@ -3910,14 +3931,14 @@ declare class VerificationCodesRepository extends BaseRepository {
3910
3931
  * Write primary 사용
3911
3932
  */
3912
3933
  create(data: NewVerificationCode): Promise<{
3934
+ target: string;
3935
+ targetType: "email" | "phone";
3936
+ purpose: "registration" | "login" | "password_reset" | "email_change" | "phone_change" | "account_deletion";
3937
+ code: string;
3913
3938
  id: number;
3914
3939
  createdAt: Date;
3915
3940
  updatedAt: Date;
3916
3941
  expiresAt: Date;
3917
- target: string;
3918
- targetType: "email" | "phone";
3919
- code: string;
3920
- purpose: "registration" | "login" | "password_reset" | "email_change" | "phone_change" | "account_deletion";
3921
3942
  usedAt: Date | null;
3922
3943
  attempts: number;
3923
3944
  }>;
@@ -4050,8 +4071,8 @@ declare class RolesRepository extends BaseRepository {
4050
4071
  */
4051
4072
  create(data: NewRoleEntity): Promise<{
4052
4073
  description: string | null;
4053
- id: number;
4054
4074
  name: string;
4075
+ id: number;
4055
4076
  displayName: string;
4056
4077
  isBuiltin: boolean;
4057
4078
  isSystem: boolean;
@@ -4080,8 +4101,8 @@ declare class RolesRepository extends BaseRepository {
4080
4101
  */
4081
4102
  deleteById(id: number): Promise<{
4082
4103
  description: string | null;
4083
- id: number;
4084
4104
  name: string;
4105
+ id: number;
4085
4106
  displayName: string;
4086
4107
  isBuiltin: boolean;
4087
4108
  isSystem: boolean;
@@ -4114,7 +4135,7 @@ declare class PermissionsRepository extends BaseRepository {
4114
4135
  name: string;
4115
4136
  displayName: string;
4116
4137
  description: string | null;
4117
- category: "custom" | "user" | "auth" | "rbac" | "system" | null;
4138
+ category: "auth" | "custom" | "user" | "rbac" | "system" | null;
4118
4139
  isBuiltin: boolean;
4119
4140
  isSystem: boolean;
4120
4141
  isActive: boolean;
@@ -4130,7 +4151,7 @@ declare class PermissionsRepository extends BaseRepository {
4130
4151
  name: string;
4131
4152
  displayName: string;
4132
4153
  description: string | null;
4133
- category: "custom" | "user" | "auth" | "rbac" | "system" | null;
4154
+ category: "auth" | "custom" | "user" | "rbac" | "system" | null;
4134
4155
  isBuiltin: boolean;
4135
4156
  isSystem: boolean;
4136
4157
  isActive: boolean;
@@ -4170,7 +4191,7 @@ declare class PermissionsRepository extends BaseRepository {
4170
4191
  name: string;
4171
4192
  displayName: string;
4172
4193
  description: string | null;
4173
- category: "custom" | "user" | "auth" | "rbac" | "system" | null;
4194
+ category: "auth" | "custom" | "user" | "rbac" | "system" | null;
4174
4195
  isBuiltin: boolean;
4175
4196
  isSystem: boolean;
4176
4197
  isActive: boolean;
@@ -4181,16 +4202,16 @@ declare class PermissionsRepository extends BaseRepository {
4181
4202
  */
4182
4203
  deleteById(id: number): Promise<{
4183
4204
  description: string | null;
4184
- id: number;
4205
+ metadata: Record<string, any> | null;
4185
4206
  name: string;
4207
+ id: number;
4186
4208
  displayName: string;
4187
4209
  isBuiltin: boolean;
4188
4210
  isSystem: boolean;
4189
4211
  isActive: boolean;
4190
4212
  createdAt: Date;
4191
4213
  updatedAt: Date;
4192
- metadata: Record<string, any> | null;
4193
- category: "custom" | "user" | "auth" | "rbac" | "system" | null;
4214
+ category: "auth" | "custom" | "user" | "rbac" | "system" | null;
4194
4215
  }>;
4195
4216
  }
4196
4217
  declare const permissionsRepository: PermissionsRepository;
@@ -4235,9 +4256,9 @@ declare class RolePermissionsRepository extends BaseRepository {
4235
4256
  */
4236
4257
  createMany(data: NewRolePermission[]): Promise<{
4237
4258
  id: number;
4259
+ roleId: number;
4238
4260
  createdAt: Date;
4239
4261
  updatedAt: Date;
4240
- roleId: number;
4241
4262
  permissionId: number;
4242
4263
  }[]>;
4243
4264
  /**
@@ -4253,9 +4274,9 @@ declare class RolePermissionsRepository extends BaseRepository {
4253
4274
  */
4254
4275
  setPermissionsForRole(roleId: number, permissionIds: number[]): Promise<{
4255
4276
  id: number;
4277
+ roleId: number;
4256
4278
  createdAt: Date;
4257
4279
  updatedAt: Date;
4258
- roleId: number;
4259
4280
  permissionId: number;
4260
4281
  }[]>;
4261
4282
  }
@@ -4320,9 +4341,9 @@ declare class UserPermissionsRepository extends BaseRepository {
4320
4341
  id: number;
4321
4342
  createdAt: Date;
4322
4343
  updatedAt: Date;
4323
- expiresAt: Date | null;
4324
- reason: string | null;
4325
4344
  permissionId: number;
4345
+ reason: string | null;
4346
+ expiresAt: Date | null;
4326
4347
  granted: boolean;
4327
4348
  }>;
4328
4349
  /**
@@ -4346,9 +4367,9 @@ declare class UserPermissionsRepository extends BaseRepository {
4346
4367
  id: number;
4347
4368
  createdAt: Date;
4348
4369
  updatedAt: Date;
4349
- expiresAt: Date | null;
4350
- reason: string | null;
4351
4370
  permissionId: number;
4371
+ reason: string | null;
4372
+ expiresAt: Date | null;
4352
4373
  granted: boolean;
4353
4374
  }>;
4354
4375
  /**
@@ -4427,6 +4448,7 @@ declare class UserProfilesRepository extends BaseRepository {
4427
4448
  * 프로필 생성
4428
4449
  */
4429
4450
  create(data: NewUserProfile): Promise<{
4451
+ metadata: Record<string, any> | null;
4430
4452
  userId: number;
4431
4453
  id: number;
4432
4454
  displayName: string | null;
@@ -4444,7 +4466,6 @@ declare class UserProfilesRepository extends BaseRepository {
4444
4466
  location: string | null;
4445
4467
  company: string | null;
4446
4468
  jobTitle: string | null;
4447
- metadata: Record<string, any> | null;
4448
4469
  }>;
4449
4470
  /**
4450
4471
  * 프로필 업데이트 (by ID)
@@ -4496,6 +4517,7 @@ declare class UserProfilesRepository extends BaseRepository {
4496
4517
  * 프로필 삭제 (by ID)
4497
4518
  */
4498
4519
  deleteById(id: number): Promise<{
4520
+ metadata: Record<string, any> | null;
4499
4521
  userId: number;
4500
4522
  id: number;
4501
4523
  displayName: string | null;
@@ -4513,12 +4535,12 @@ declare class UserProfilesRepository extends BaseRepository {
4513
4535
  location: string | null;
4514
4536
  company: string | null;
4515
4537
  jobTitle: string | null;
4516
- metadata: Record<string, any> | null;
4517
4538
  }>;
4518
4539
  /**
4519
4540
  * 프로필 삭제 (by User ID)
4520
4541
  */
4521
4542
  deleteByUserId(userId: number): Promise<{
4543
+ metadata: Record<string, any> | null;
4522
4544
  userId: number;
4523
4545
  id: number;
4524
4546
  displayName: string | null;
@@ -4536,7 +4558,6 @@ declare class UserProfilesRepository extends BaseRepository {
4536
4558
  location: string | null;
4537
4559
  company: string | null;
4538
4560
  jobTitle: string | null;
4539
- metadata: Record<string, any> | null;
4540
4561
  }>;
4541
4562
  /**
4542
4563
  * 프로필 Upsert (by User ID)
@@ -4545,6 +4566,7 @@ declare class UserProfilesRepository extends BaseRepository {
4545
4566
  * 새로 생성 시 displayName은 필수 (없으면 'User'로 설정)
4546
4567
  */
4547
4568
  upsertByUserId(userId: number, data: Partial<Omit<NewUserProfile, 'userId'>>): Promise<{
4569
+ metadata: Record<string, any> | null;
4548
4570
  userId: number;
4549
4571
  id: number;
4550
4572
  displayName: string | null;
@@ -4562,7 +4584,6 @@ declare class UserProfilesRepository extends BaseRepository {
4562
4584
  location: string | null;
4563
4585
  company: string | null;
4564
4586
  jobTitle: string | null;
4565
- metadata: Record<string, any> | null;
4566
4587
  }>;
4567
4588
  /**
4568
4589
  * User ID로 프로필 데이터 조회 (formatted)
@@ -4690,15 +4711,15 @@ declare class InvitationsRepository extends BaseRepository {
4690
4711
  */
4691
4712
  create(data: NewInvitation): Promise<{
4692
4713
  email: string;
4693
- status: "pending" | "accepted" | "expired" | "cancelled";
4714
+ metadata: Record<string, any> | null;
4694
4715
  id: number;
4716
+ roleId: number;
4695
4717
  createdAt: Date;
4696
4718
  updatedAt: Date;
4697
- roleId: number;
4698
- metadata: Record<string, any> | null;
4699
- expiresAt: Date;
4719
+ status: "pending" | "accepted" | "expired" | "cancelled";
4700
4720
  token: string;
4701
4721
  invitedBy: number;
4722
+ expiresAt: Date;
4702
4723
  acceptedAt: Date | null;
4703
4724
  cancelledAt: Date | null;
4704
4725
  }>;
@@ -4724,15 +4745,15 @@ declare class InvitationsRepository extends BaseRepository {
4724
4745
  */
4725
4746
  deleteById(id: number): Promise<{
4726
4747
  email: string;
4727
- status: "pending" | "accepted" | "expired" | "cancelled";
4748
+ metadata: Record<string, any> | null;
4728
4749
  id: number;
4750
+ roleId: number;
4729
4751
  createdAt: Date;
4730
4752
  updatedAt: Date;
4731
- roleId: number;
4732
- metadata: Record<string, any> | null;
4733
- expiresAt: Date;
4753
+ status: "pending" | "accepted" | "expired" | "cancelled";
4734
4754
  token: string;
4735
4755
  invitedBy: number;
4756
+ expiresAt: Date;
4736
4757
  acceptedAt: Date | null;
4737
4758
  cancelledAt: Date | null;
4738
4759
  }>;
@@ -5048,7 +5069,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5048
5069
  requestedAt: Date;
5049
5070
  purgeScheduledAt: Date;
5050
5071
  status: "pending" | "cancelled" | "completed";
5051
- requestedBy: "self" | "admin";
5072
+ requestedBy: "admin" | "self";
5052
5073
  reason: string | null;
5053
5074
  cancelledAt: Date | null;
5054
5075
  completedAt: Date | null;
@@ -5067,7 +5088,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5067
5088
  requestedAt: Date;
5068
5089
  purgeScheduledAt: Date;
5069
5090
  status: "pending" | "cancelled" | "completed";
5070
- requestedBy: "self" | "admin";
5091
+ requestedBy: "admin" | "self";
5071
5092
  reason: string | null;
5072
5093
  cancelledAt: Date | null;
5073
5094
  completedAt: Date | null;
@@ -5089,7 +5110,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5089
5110
  requestedAt: Date;
5090
5111
  purgeScheduledAt: Date;
5091
5112
  status: "pending" | "cancelled" | "completed";
5092
- requestedBy: "self" | "admin";
5113
+ requestedBy: "admin" | "self";
5093
5114
  reason: string | null;
5094
5115
  cancelledAt: Date | null;
5095
5116
  completedAt: Date | null;
@@ -5108,7 +5129,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5108
5129
  requestedAt: Date;
5109
5130
  purgeScheduledAt: Date;
5110
5131
  status: "pending" | "cancelled" | "completed";
5111
- requestedBy: "self" | "admin";
5132
+ requestedBy: "admin" | "self";
5112
5133
  reason: string | null;
5113
5134
  cancelledAt: Date | null;
5114
5135
  completedAt: Date | null;
@@ -5120,16 +5141,16 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5120
5141
  */
5121
5142
  create(data: NewAccountDeletionRequest): Promise<{
5122
5143
  userId: number | null;
5123
- status: "pending" | "cancelled" | "completed";
5124
- purgeScheduledAt: Date;
5125
5144
  id: number;
5126
5145
  createdAt: Date;
5127
5146
  updatedAt: Date;
5147
+ status: "pending" | "cancelled" | "completed";
5148
+ reason: string | null;
5149
+ purgeScheduledAt: Date;
5128
5150
  cancelledAt: Date | null;
5129
5151
  userPublicId: string;
5130
5152
  requestedAt: Date;
5131
- requestedBy: "self" | "admin";
5132
- reason: string | null;
5153
+ requestedBy: "admin" | "self";
5133
5154
  completedAt: Date | null;
5134
5155
  purgeStrategy: "anonymize" | "hard-delete" | null;
5135
5156
  }>;
@@ -5150,7 +5171,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5150
5171
  requestedAt: Date;
5151
5172
  purgeScheduledAt: Date;
5152
5173
  status: "pending" | "cancelled" | "completed";
5153
- requestedBy: "self" | "admin";
5174
+ requestedBy: "admin" | "self";
5154
5175
  reason: string | null;
5155
5176
  cancelledAt: Date | null;
5156
5177
  completedAt: Date | null;
@@ -5175,7 +5196,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5175
5196
  requestedAt: Date;
5176
5197
  purgeScheduledAt: Date;
5177
5198
  status: "pending" | "cancelled" | "completed";
5178
- requestedBy: "self" | "admin";
5199
+ requestedBy: "admin" | "self";
5179
5200
  reason: string | null;
5180
5201
  cancelledAt: Date | null;
5181
5202
  completedAt: Date | null;
@@ -5627,15 +5648,15 @@ declare function getUser(c: Context | {
5627
5648
  }): {
5628
5649
  email: string | null;
5629
5650
  phone: string | null;
5630
- status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
5631
- username: string | null;
5632
5651
  id: number;
5633
- createdAt: Date;
5634
- updatedAt: Date;
5635
5652
  publicId: string;
5653
+ username: string | null;
5636
5654
  passwordHash: string | null;
5637
5655
  passwordChangeRequired: boolean;
5638
5656
  roleId: number;
5657
+ createdAt: Date;
5658
+ updatedAt: Date;
5659
+ status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
5639
5660
  emailVerifiedAt: Date | null;
5640
5661
  phoneVerifiedAt: Date | null;
5641
5662
  lastLoginAt: Date | null;
@@ -6363,9 +6384,9 @@ declare const invitationCreatedEvent: _spfn_core_event.EventDef<{
6363
6384
  } | undefined;
6364
6385
  email: string;
6365
6386
  roleId: number;
6366
- expiresAt: string;
6367
6387
  token: string;
6368
6388
  invitedBy: string;
6389
+ expiresAt: string;
6369
6390
  invitationId: string;
6370
6391
  isResend: boolean;
6371
6392
  }>;
@@ -6409,7 +6430,7 @@ declare const authDeletionRequestedEvent: _spfn_core_event.EventDef<{
6409
6430
  userId: string;
6410
6431
  purgeScheduledAt: string;
6411
6432
  userPublicId: string;
6412
- requestedBy: "self" | "admin";
6433
+ requestedBy: "admin" | "self";
6413
6434
  }>;
6414
6435
  /**
6415
6436
  * auth.deletion.cancelled - 계정 탈퇴 복구 이벤트