@spfn/auth 0.2.0-beta.84 → 0.2.0-beta.86
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/README.md +93 -2
- package/dist/{authenticate-ngWdlWWL.d.ts → authenticate-DTA7W4v2.d.ts} +4 -4
- package/dist/client-proof.d.ts +418 -0
- package/dist/client-proof.js +1264 -0
- package/dist/client-proof.js.map +1 -0
- package/dist/index.d.ts +6 -6
- package/dist/server.d.ts +70 -70
- package/package.json +7 -1
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-
|
|
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-
|
|
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';
|
|
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: "
|
|
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: "
|
|
1766
|
+
data: "self" | "admin";
|
|
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: "
|
|
2880
|
+
data: "custom" | "user" | "auth" | "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;
|
|
3469
3471
|
id: number;
|
|
3472
|
+
createdAt: Date;
|
|
3473
|
+
updatedAt: Date;
|
|
3470
3474
|
publicId: string;
|
|
3471
|
-
username: string | null;
|
|
3472
3475
|
passwordHash: string | null;
|
|
3473
3476
|
passwordChangeRequired: boolean;
|
|
3474
3477
|
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;
|
|
3584
3586
|
id: number;
|
|
3587
|
+
createdAt: Date;
|
|
3588
|
+
updatedAt: Date;
|
|
3585
3589
|
publicId: string;
|
|
3586
|
-
username: string | null;
|
|
3587
3590
|
passwordHash: string | null;
|
|
3588
3591
|
passwordChangeRequired: boolean;
|
|
3589
3592
|
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: "
|
|
3617
|
+
category: "custom" | "user" | "auth" | "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
|
-
publicKey: string;
|
|
3733
|
-
keyId: string;
|
|
3734
|
-
fingerprint: string;
|
|
3735
|
-
algorithm: "ES256" | "RS256";
|
|
3736
3732
|
userId: number;
|
|
3733
|
+
keyId: string;
|
|
3737
3734
|
id: number;
|
|
3738
3735
|
isActive: boolean;
|
|
3739
3736
|
createdAt: Date;
|
|
3740
|
-
|
|
3737
|
+
publicKey: string;
|
|
3738
|
+
algorithm: "ES256" | "RS256";
|
|
3739
|
+
fingerprint: string;
|
|
3741
3740
|
lastUsedAt: Date | null;
|
|
3741
|
+
expiresAt: 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
|
-
publicKey: string;
|
|
3790
|
-
keyId: string;
|
|
3791
|
-
fingerprint: string;
|
|
3792
|
-
algorithm: "ES256" | "RS256";
|
|
3793
3789
|
userId: number;
|
|
3790
|
+
keyId: string;
|
|
3794
3791
|
id: number;
|
|
3795
3792
|
isActive: boolean;
|
|
3796
3793
|
createdAt: Date;
|
|
3797
|
-
|
|
3794
|
+
publicKey: string;
|
|
3795
|
+
algorithm: "ES256" | "RS256";
|
|
3796
|
+
fingerprint: string;
|
|
3798
3797
|
lastUsedAt: Date | null;
|
|
3798
|
+
expiresAt: Date | null;
|
|
3799
3799
|
revokedAt: Date | null;
|
|
3800
3800
|
revokedReason: string | null;
|
|
3801
3801
|
}>;
|
|
@@ -3910,14 +3910,14 @@ declare class VerificationCodesRepository extends BaseRepository {
|
|
|
3910
3910
|
* Write primary 사용
|
|
3911
3911
|
*/
|
|
3912
3912
|
create(data: NewVerificationCode): Promise<{
|
|
3913
|
-
target: string;
|
|
3914
|
-
targetType: "email" | "phone";
|
|
3915
|
-
purpose: "registration" | "login" | "password_reset" | "email_change" | "phone_change" | "account_deletion";
|
|
3916
|
-
code: string;
|
|
3917
3913
|
id: number;
|
|
3918
3914
|
createdAt: Date;
|
|
3919
3915
|
updatedAt: Date;
|
|
3920
3916
|
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
3921
|
usedAt: Date | null;
|
|
3922
3922
|
attempts: number;
|
|
3923
3923
|
}>;
|
|
@@ -4050,8 +4050,8 @@ declare class RolesRepository extends BaseRepository {
|
|
|
4050
4050
|
*/
|
|
4051
4051
|
create(data: NewRoleEntity): Promise<{
|
|
4052
4052
|
description: string | null;
|
|
4053
|
-
name: string;
|
|
4054
4053
|
id: number;
|
|
4054
|
+
name: string;
|
|
4055
4055
|
displayName: string;
|
|
4056
4056
|
isBuiltin: boolean;
|
|
4057
4057
|
isSystem: boolean;
|
|
@@ -4080,8 +4080,8 @@ declare class RolesRepository extends BaseRepository {
|
|
|
4080
4080
|
*/
|
|
4081
4081
|
deleteById(id: number): Promise<{
|
|
4082
4082
|
description: string | null;
|
|
4083
|
-
name: string;
|
|
4084
4083
|
id: number;
|
|
4084
|
+
name: string;
|
|
4085
4085
|
displayName: string;
|
|
4086
4086
|
isBuiltin: boolean;
|
|
4087
4087
|
isSystem: boolean;
|
|
@@ -4114,7 +4114,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
4114
4114
|
name: string;
|
|
4115
4115
|
displayName: string;
|
|
4116
4116
|
description: string | null;
|
|
4117
|
-
category: "
|
|
4117
|
+
category: "custom" | "user" | "auth" | "rbac" | "system" | null;
|
|
4118
4118
|
isBuiltin: boolean;
|
|
4119
4119
|
isSystem: boolean;
|
|
4120
4120
|
isActive: boolean;
|
|
@@ -4130,7 +4130,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
4130
4130
|
name: string;
|
|
4131
4131
|
displayName: string;
|
|
4132
4132
|
description: string | null;
|
|
4133
|
-
category: "
|
|
4133
|
+
category: "custom" | "user" | "auth" | "rbac" | "system" | null;
|
|
4134
4134
|
isBuiltin: boolean;
|
|
4135
4135
|
isSystem: boolean;
|
|
4136
4136
|
isActive: boolean;
|
|
@@ -4170,7 +4170,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
4170
4170
|
name: string;
|
|
4171
4171
|
displayName: string;
|
|
4172
4172
|
description: string | null;
|
|
4173
|
-
category: "
|
|
4173
|
+
category: "custom" | "user" | "auth" | "rbac" | "system" | null;
|
|
4174
4174
|
isBuiltin: boolean;
|
|
4175
4175
|
isSystem: boolean;
|
|
4176
4176
|
isActive: boolean;
|
|
@@ -4181,16 +4181,16 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
4181
4181
|
*/
|
|
4182
4182
|
deleteById(id: number): Promise<{
|
|
4183
4183
|
description: string | null;
|
|
4184
|
-
metadata: Record<string, any> | null;
|
|
4185
|
-
name: string;
|
|
4186
4184
|
id: number;
|
|
4185
|
+
name: string;
|
|
4187
4186
|
displayName: string;
|
|
4188
4187
|
isBuiltin: boolean;
|
|
4189
4188
|
isSystem: boolean;
|
|
4190
4189
|
isActive: boolean;
|
|
4191
4190
|
createdAt: Date;
|
|
4192
4191
|
updatedAt: Date;
|
|
4193
|
-
|
|
4192
|
+
metadata: Record<string, any> | null;
|
|
4193
|
+
category: "custom" | "user" | "auth" | "rbac" | "system" | null;
|
|
4194
4194
|
}>;
|
|
4195
4195
|
}
|
|
4196
4196
|
declare const permissionsRepository: PermissionsRepository;
|
|
@@ -4235,9 +4235,9 @@ declare class RolePermissionsRepository extends BaseRepository {
|
|
|
4235
4235
|
*/
|
|
4236
4236
|
createMany(data: NewRolePermission[]): Promise<{
|
|
4237
4237
|
id: number;
|
|
4238
|
-
roleId: number;
|
|
4239
4238
|
createdAt: Date;
|
|
4240
4239
|
updatedAt: Date;
|
|
4240
|
+
roleId: number;
|
|
4241
4241
|
permissionId: number;
|
|
4242
4242
|
}[]>;
|
|
4243
4243
|
/**
|
|
@@ -4253,9 +4253,9 @@ declare class RolePermissionsRepository extends BaseRepository {
|
|
|
4253
4253
|
*/
|
|
4254
4254
|
setPermissionsForRole(roleId: number, permissionIds: number[]): Promise<{
|
|
4255
4255
|
id: number;
|
|
4256
|
-
roleId: number;
|
|
4257
4256
|
createdAt: Date;
|
|
4258
4257
|
updatedAt: Date;
|
|
4258
|
+
roleId: number;
|
|
4259
4259
|
permissionId: number;
|
|
4260
4260
|
}[]>;
|
|
4261
4261
|
}
|
|
@@ -4320,9 +4320,9 @@ declare class UserPermissionsRepository extends BaseRepository {
|
|
|
4320
4320
|
id: number;
|
|
4321
4321
|
createdAt: Date;
|
|
4322
4322
|
updatedAt: Date;
|
|
4323
|
-
permissionId: number;
|
|
4324
|
-
reason: string | null;
|
|
4325
4323
|
expiresAt: Date | null;
|
|
4324
|
+
reason: string | null;
|
|
4325
|
+
permissionId: number;
|
|
4326
4326
|
granted: boolean;
|
|
4327
4327
|
}>;
|
|
4328
4328
|
/**
|
|
@@ -4346,9 +4346,9 @@ declare class UserPermissionsRepository extends BaseRepository {
|
|
|
4346
4346
|
id: number;
|
|
4347
4347
|
createdAt: Date;
|
|
4348
4348
|
updatedAt: Date;
|
|
4349
|
-
permissionId: number;
|
|
4350
|
-
reason: string | null;
|
|
4351
4349
|
expiresAt: Date | null;
|
|
4350
|
+
reason: string | null;
|
|
4351
|
+
permissionId: number;
|
|
4352
4352
|
granted: boolean;
|
|
4353
4353
|
}>;
|
|
4354
4354
|
/**
|
|
@@ -4427,7 +4427,6 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4427
4427
|
* 프로필 생성
|
|
4428
4428
|
*/
|
|
4429
4429
|
create(data: NewUserProfile): Promise<{
|
|
4430
|
-
metadata: Record<string, any> | null;
|
|
4431
4430
|
userId: number;
|
|
4432
4431
|
id: number;
|
|
4433
4432
|
displayName: string | null;
|
|
@@ -4445,6 +4444,7 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4445
4444
|
location: string | null;
|
|
4446
4445
|
company: string | null;
|
|
4447
4446
|
jobTitle: string | null;
|
|
4447
|
+
metadata: Record<string, any> | null;
|
|
4448
4448
|
}>;
|
|
4449
4449
|
/**
|
|
4450
4450
|
* 프로필 업데이트 (by ID)
|
|
@@ -4496,7 +4496,6 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4496
4496
|
* 프로필 삭제 (by ID)
|
|
4497
4497
|
*/
|
|
4498
4498
|
deleteById(id: number): Promise<{
|
|
4499
|
-
metadata: Record<string, any> | null;
|
|
4500
4499
|
userId: number;
|
|
4501
4500
|
id: number;
|
|
4502
4501
|
displayName: string | null;
|
|
@@ -4514,12 +4513,12 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4514
4513
|
location: string | null;
|
|
4515
4514
|
company: string | null;
|
|
4516
4515
|
jobTitle: string | null;
|
|
4516
|
+
metadata: Record<string, any> | null;
|
|
4517
4517
|
}>;
|
|
4518
4518
|
/**
|
|
4519
4519
|
* 프로필 삭제 (by User ID)
|
|
4520
4520
|
*/
|
|
4521
4521
|
deleteByUserId(userId: number): Promise<{
|
|
4522
|
-
metadata: Record<string, any> | null;
|
|
4523
4522
|
userId: number;
|
|
4524
4523
|
id: number;
|
|
4525
4524
|
displayName: string | null;
|
|
@@ -4537,6 +4536,7 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4537
4536
|
location: string | null;
|
|
4538
4537
|
company: string | null;
|
|
4539
4538
|
jobTitle: string | null;
|
|
4539
|
+
metadata: Record<string, any> | null;
|
|
4540
4540
|
}>;
|
|
4541
4541
|
/**
|
|
4542
4542
|
* 프로필 Upsert (by User ID)
|
|
@@ -4545,7 +4545,6 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4545
4545
|
* 새로 생성 시 displayName은 필수 (없으면 'User'로 설정)
|
|
4546
4546
|
*/
|
|
4547
4547
|
upsertByUserId(userId: number, data: Partial<Omit<NewUserProfile, 'userId'>>): Promise<{
|
|
4548
|
-
metadata: Record<string, any> | null;
|
|
4549
4548
|
userId: number;
|
|
4550
4549
|
id: number;
|
|
4551
4550
|
displayName: string | null;
|
|
@@ -4563,6 +4562,7 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4563
4562
|
location: string | null;
|
|
4564
4563
|
company: string | null;
|
|
4565
4564
|
jobTitle: string | null;
|
|
4565
|
+
metadata: Record<string, any> | null;
|
|
4566
4566
|
}>;
|
|
4567
4567
|
/**
|
|
4568
4568
|
* User ID로 프로필 데이터 조회 (formatted)
|
|
@@ -4690,15 +4690,15 @@ declare class InvitationsRepository extends BaseRepository {
|
|
|
4690
4690
|
*/
|
|
4691
4691
|
create(data: NewInvitation): Promise<{
|
|
4692
4692
|
email: string;
|
|
4693
|
-
|
|
4693
|
+
status: "pending" | "accepted" | "expired" | "cancelled";
|
|
4694
4694
|
id: number;
|
|
4695
|
-
roleId: number;
|
|
4696
4695
|
createdAt: Date;
|
|
4697
4696
|
updatedAt: Date;
|
|
4698
|
-
|
|
4697
|
+
roleId: number;
|
|
4698
|
+
metadata: Record<string, any> | null;
|
|
4699
|
+
expiresAt: Date;
|
|
4699
4700
|
token: string;
|
|
4700
4701
|
invitedBy: number;
|
|
4701
|
-
expiresAt: Date;
|
|
4702
4702
|
acceptedAt: Date | null;
|
|
4703
4703
|
cancelledAt: Date | null;
|
|
4704
4704
|
}>;
|
|
@@ -4724,15 +4724,15 @@ declare class InvitationsRepository extends BaseRepository {
|
|
|
4724
4724
|
*/
|
|
4725
4725
|
deleteById(id: number): Promise<{
|
|
4726
4726
|
email: string;
|
|
4727
|
-
|
|
4727
|
+
status: "pending" | "accepted" | "expired" | "cancelled";
|
|
4728
4728
|
id: number;
|
|
4729
|
-
roleId: number;
|
|
4730
4729
|
createdAt: Date;
|
|
4731
4730
|
updatedAt: Date;
|
|
4732
|
-
|
|
4731
|
+
roleId: number;
|
|
4732
|
+
metadata: Record<string, any> | null;
|
|
4733
|
+
expiresAt: Date;
|
|
4733
4734
|
token: string;
|
|
4734
4735
|
invitedBy: number;
|
|
4735
|
-
expiresAt: Date;
|
|
4736
4736
|
acceptedAt: Date | null;
|
|
4737
4737
|
cancelledAt: Date | null;
|
|
4738
4738
|
}>;
|
|
@@ -5048,7 +5048,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
|
|
|
5048
5048
|
requestedAt: Date;
|
|
5049
5049
|
purgeScheduledAt: Date;
|
|
5050
5050
|
status: "pending" | "cancelled" | "completed";
|
|
5051
|
-
requestedBy: "
|
|
5051
|
+
requestedBy: "self" | "admin";
|
|
5052
5052
|
reason: string | null;
|
|
5053
5053
|
cancelledAt: Date | null;
|
|
5054
5054
|
completedAt: Date | null;
|
|
@@ -5067,7 +5067,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
|
|
|
5067
5067
|
requestedAt: Date;
|
|
5068
5068
|
purgeScheduledAt: Date;
|
|
5069
5069
|
status: "pending" | "cancelled" | "completed";
|
|
5070
|
-
requestedBy: "
|
|
5070
|
+
requestedBy: "self" | "admin";
|
|
5071
5071
|
reason: string | null;
|
|
5072
5072
|
cancelledAt: Date | null;
|
|
5073
5073
|
completedAt: Date | null;
|
|
@@ -5089,7 +5089,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
|
|
|
5089
5089
|
requestedAt: Date;
|
|
5090
5090
|
purgeScheduledAt: Date;
|
|
5091
5091
|
status: "pending" | "cancelled" | "completed";
|
|
5092
|
-
requestedBy: "
|
|
5092
|
+
requestedBy: "self" | "admin";
|
|
5093
5093
|
reason: string | null;
|
|
5094
5094
|
cancelledAt: Date | null;
|
|
5095
5095
|
completedAt: Date | null;
|
|
@@ -5108,7 +5108,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
|
|
|
5108
5108
|
requestedAt: Date;
|
|
5109
5109
|
purgeScheduledAt: Date;
|
|
5110
5110
|
status: "pending" | "cancelled" | "completed";
|
|
5111
|
-
requestedBy: "
|
|
5111
|
+
requestedBy: "self" | "admin";
|
|
5112
5112
|
reason: string | null;
|
|
5113
5113
|
cancelledAt: Date | null;
|
|
5114
5114
|
completedAt: Date | null;
|
|
@@ -5120,16 +5120,16 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
|
|
|
5120
5120
|
*/
|
|
5121
5121
|
create(data: NewAccountDeletionRequest): Promise<{
|
|
5122
5122
|
userId: number | null;
|
|
5123
|
+
status: "pending" | "cancelled" | "completed";
|
|
5124
|
+
purgeScheduledAt: Date;
|
|
5123
5125
|
id: number;
|
|
5124
5126
|
createdAt: Date;
|
|
5125
5127
|
updatedAt: Date;
|
|
5126
|
-
status: "pending" | "cancelled" | "completed";
|
|
5127
|
-
reason: string | null;
|
|
5128
|
-
purgeScheduledAt: Date;
|
|
5129
5128
|
cancelledAt: Date | null;
|
|
5130
5129
|
userPublicId: string;
|
|
5131
5130
|
requestedAt: Date;
|
|
5132
|
-
requestedBy: "
|
|
5131
|
+
requestedBy: "self" | "admin";
|
|
5132
|
+
reason: string | null;
|
|
5133
5133
|
completedAt: Date | null;
|
|
5134
5134
|
purgeStrategy: "anonymize" | "hard-delete" | null;
|
|
5135
5135
|
}>;
|
|
@@ -5150,7 +5150,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
|
|
|
5150
5150
|
requestedAt: Date;
|
|
5151
5151
|
purgeScheduledAt: Date;
|
|
5152
5152
|
status: "pending" | "cancelled" | "completed";
|
|
5153
|
-
requestedBy: "
|
|
5153
|
+
requestedBy: "self" | "admin";
|
|
5154
5154
|
reason: string | null;
|
|
5155
5155
|
cancelledAt: Date | null;
|
|
5156
5156
|
completedAt: Date | null;
|
|
@@ -5175,7 +5175,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
|
|
|
5175
5175
|
requestedAt: Date;
|
|
5176
5176
|
purgeScheduledAt: Date;
|
|
5177
5177
|
status: "pending" | "cancelled" | "completed";
|
|
5178
|
-
requestedBy: "
|
|
5178
|
+
requestedBy: "self" | "admin";
|
|
5179
5179
|
reason: string | null;
|
|
5180
5180
|
cancelledAt: Date | null;
|
|
5181
5181
|
completedAt: Date | null;
|
|
@@ -5627,15 +5627,15 @@ declare function getUser(c: Context | {
|
|
|
5627
5627
|
}): {
|
|
5628
5628
|
email: string | null;
|
|
5629
5629
|
phone: string | null;
|
|
5630
|
+
status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
|
|
5631
|
+
username: string | null;
|
|
5630
5632
|
id: number;
|
|
5633
|
+
createdAt: Date;
|
|
5634
|
+
updatedAt: Date;
|
|
5631
5635
|
publicId: string;
|
|
5632
|
-
username: string | null;
|
|
5633
5636
|
passwordHash: string | null;
|
|
5634
5637
|
passwordChangeRequired: boolean;
|
|
5635
5638
|
roleId: number;
|
|
5636
|
-
createdAt: Date;
|
|
5637
|
-
updatedAt: Date;
|
|
5638
|
-
status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
|
|
5639
5639
|
emailVerifiedAt: Date | null;
|
|
5640
5640
|
phoneVerifiedAt: Date | null;
|
|
5641
5641
|
lastLoginAt: Date | null;
|
|
@@ -6363,9 +6363,9 @@ declare const invitationCreatedEvent: _spfn_core_event.EventDef<{
|
|
|
6363
6363
|
} | undefined;
|
|
6364
6364
|
email: string;
|
|
6365
6365
|
roleId: number;
|
|
6366
|
+
expiresAt: string;
|
|
6366
6367
|
token: string;
|
|
6367
6368
|
invitedBy: string;
|
|
6368
|
-
expiresAt: string;
|
|
6369
6369
|
invitationId: string;
|
|
6370
6370
|
isResend: boolean;
|
|
6371
6371
|
}>;
|
|
@@ -6409,7 +6409,7 @@ declare const authDeletionRequestedEvent: _spfn_core_event.EventDef<{
|
|
|
6409
6409
|
userId: string;
|
|
6410
6410
|
purgeScheduledAt: string;
|
|
6411
6411
|
userPublicId: string;
|
|
6412
|
-
requestedBy: "
|
|
6412
|
+
requestedBy: "self" | "admin";
|
|
6413
6413
|
}>;
|
|
6414
6414
|
/**
|
|
6415
6415
|
* auth.deletion.cancelled - 계정 탈퇴 복구 이벤트
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spfn/auth",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.86",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Authentication, authorization, and RBAC module for SPFN",
|
|
6
6
|
"author": "Ray Im <rayim@fxy.global>",
|
|
@@ -32,6 +32,11 @@
|
|
|
32
32
|
"import": "./dist/errors.js",
|
|
33
33
|
"require": "./dist/errors.js"
|
|
34
34
|
},
|
|
35
|
+
"./client-proof": {
|
|
36
|
+
"types": "./dist/client-proof.d.ts",
|
|
37
|
+
"import": "./dist/client-proof.js",
|
|
38
|
+
"require": "./dist/client-proof.js"
|
|
39
|
+
},
|
|
35
40
|
"./nextjs/api": {
|
|
36
41
|
"types": "./dist/nextjs/api.d.ts",
|
|
37
42
|
"import": "./dist/nextjs/api.js",
|
|
@@ -62,6 +67,7 @@
|
|
|
62
67
|
"clean": "rm -rf dist",
|
|
63
68
|
"db:generate": "drizzle-kit generate",
|
|
64
69
|
"codegen": "spfn codegen run",
|
|
70
|
+
"export:mobile-contract": "tsx scripts/export-mobile-contract.ts",
|
|
65
71
|
"test": "vitest run",
|
|
66
72
|
"test:unit": "vitest run src/__tests__/unit/",
|
|
67
73
|
"test:integration": "vitest run src/__tests__/integration/",
|