@spfn/auth 0.2.0-beta.65 → 0.2.0-beta.66
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 +296 -2540
- package/dist/{authenticate-mfVRzeIK.d.ts → authenticate-DKGNvSsH.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/server.d.ts +55 -55
- package/package.json +7 -5
|
@@ -620,7 +620,7 @@ declare const mainAuthRouter: _spfn_core_route.Router<{
|
|
|
620
620
|
id: number;
|
|
621
621
|
name: string;
|
|
622
622
|
displayName: string;
|
|
623
|
-
category: "
|
|
623
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
|
|
624
624
|
}[];
|
|
625
625
|
userId: number;
|
|
626
626
|
publicId: string;
|
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, 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 { 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-
|
|
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-DKGNvSsH.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-DKGNvSsH.js';
|
|
4
4
|
import * as _spfn_core_route from '@spfn/core/route';
|
|
5
5
|
import { HttpMethod } from '@spfn/core/route';
|
|
6
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-B4auHIax.js';
|
|
@@ -170,7 +170,7 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
|
|
|
170
170
|
id: number;
|
|
171
171
|
name: string;
|
|
172
172
|
displayName: string;
|
|
173
|
-
category: "
|
|
173
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
|
|
174
174
|
}[];
|
|
175
175
|
userId: number;
|
|
176
176
|
publicId: string;
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as AuthInitOptions, j as OAuthProvider, d as VerificationPurpose, h as PermissionCategory, k as AuthContext } from './authenticate-
|
|
2
|
-
export { v as ChangePasswordParams, q as CheckAccountExistsParams, C as CheckAccountExistsResult, a3 as EmailSchema, I as IssueOneTimeTokenResult, t as LoginParams, L as LoginResult, u as LogoutParams, a8 as NormalizedIdentity, $ as OAuthCallbackParams, a0 as OAuthCallbackResult, _ as OAuthStartParams, O as OAuthStartResult, a9 as OAuthTokens, a5 as PasswordSchema, a4 as PhoneSchema, s as RegisterParams, G as RegisterPublicKeyParams, a as RegisterResult, J as RevokeKeyParams, H as RotateKeyParams, b as RotateKeyResult, y as SendVerificationCodeParams, S as SendVerificationCodeResult, a6 as TargetTypeSchema, f as VERIFICATION_PURPOSES, e as VERIFICATION_TARGET_TYPES, a7 as VerificationPurposeSchema, V as VerificationTargetType, z as VerifyCodeParams, B as VerifyCodeResult, m as authRouter, a1 as authenticate, T as buildOAuthErrorUrl, p as changePasswordService, l as checkAccountExistsService, Y as getEnabledOAuthProviders, Z as getGoogleAccessToken, ab as getOAuthProvider, ac as getRegisteredProviders, W as isOAuthProviderEnabled, K as issueOneTimeTokenService, n as loginService, o as logoutService, Q as oauthCallbackService, N as oauthStartService, a2 as optionalAuth, aa as registerOAuthProvider, D as registerPublicKeyService, r as registerService, X as requireEnabledProvider, F as revokeKeyService, E as rotateKeyService, w as sendVerificationCodeService, x as verifyCodeService, M as verifyOneTimeTokenService } from './authenticate-
|
|
1
|
+
import { i as AuthInitOptions, j as OAuthProvider, d as VerificationPurpose, h as PermissionCategory, k as AuthContext } from './authenticate-DKGNvSsH.js';
|
|
2
|
+
export { v as ChangePasswordParams, q as CheckAccountExistsParams, C as CheckAccountExistsResult, a3 as EmailSchema, I as IssueOneTimeTokenResult, t as LoginParams, L as LoginResult, u as LogoutParams, a8 as NormalizedIdentity, $ as OAuthCallbackParams, a0 as OAuthCallbackResult, _ as OAuthStartParams, O as OAuthStartResult, a9 as OAuthTokens, a5 as PasswordSchema, a4 as PhoneSchema, s as RegisterParams, G as RegisterPublicKeyParams, a as RegisterResult, J as RevokeKeyParams, H as RotateKeyParams, b as RotateKeyResult, y as SendVerificationCodeParams, S as SendVerificationCodeResult, a6 as TargetTypeSchema, f as VERIFICATION_PURPOSES, e as VERIFICATION_TARGET_TYPES, a7 as VerificationPurposeSchema, V as VerificationTargetType, z as VerifyCodeParams, B as VerifyCodeResult, m as authRouter, a1 as authenticate, T as buildOAuthErrorUrl, p as changePasswordService, l as checkAccountExistsService, Y as getEnabledOAuthProviders, Z as getGoogleAccessToken, ab as getOAuthProvider, ac as getRegisteredProviders, W as isOAuthProviderEnabled, K as issueOneTimeTokenService, n as loginService, o as logoutService, Q as oauthCallbackService, N as oauthStartService, a2 as optionalAuth, aa as registerOAuthProvider, D as registerPublicKeyService, r as registerService, X as requireEnabledProvider, F as revokeKeyService, E as rotateKeyService, w as sendVerificationCodeService, x as verifyCodeService, M as verifyOneTimeTokenService } from './authenticate-DKGNvSsH.js';
|
|
3
3
|
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
4
4
|
import { K as KeyAlgorithmType, b as InvitationStatus, d as SocialProvider } from './types-B4auHIax.js';
|
|
5
5
|
export { I as INVITATION_STATUSES, a as KEY_ALGORITHM, S as SOCIAL_PROVIDERS, U as USER_STATUSES, c as UserStatus } from './types-B4auHIax.js';
|
|
@@ -1333,7 +1333,7 @@ declare function getAuthSessionService(userId: string | number | bigint): Promis
|
|
|
1333
1333
|
id: number;
|
|
1334
1334
|
name: string;
|
|
1335
1335
|
displayName: string;
|
|
1336
|
-
category: "
|
|
1336
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
|
|
1337
1337
|
}[];
|
|
1338
1338
|
userId: number;
|
|
1339
1339
|
publicId: string;
|
|
@@ -2595,7 +2595,7 @@ declare const permissions: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
2595
2595
|
tableName: "permissions";
|
|
2596
2596
|
dataType: "string";
|
|
2597
2597
|
columnType: "PgText";
|
|
2598
|
-
data: "
|
|
2598
|
+
data: "auth" | "custom" | "user" | "rbac" | "system";
|
|
2599
2599
|
driverParam: string;
|
|
2600
2600
|
notNull: false;
|
|
2601
2601
|
hasDefault: false;
|
|
@@ -3186,17 +3186,17 @@ declare class UsersRepository extends BaseRepository {
|
|
|
3186
3186
|
* Write primary 사용
|
|
3187
3187
|
*/
|
|
3188
3188
|
create(data: NewUser): Promise<{
|
|
3189
|
-
username: string | null;
|
|
3190
|
-
status: "active" | "inactive" | "suspended";
|
|
3191
3189
|
email: string | null;
|
|
3192
3190
|
phone: string | null;
|
|
3193
3191
|
id: number;
|
|
3194
|
-
createdAt: Date;
|
|
3195
|
-
updatedAt: Date;
|
|
3196
3192
|
publicId: string;
|
|
3193
|
+
username: string | null;
|
|
3197
3194
|
passwordHash: string | null;
|
|
3198
3195
|
passwordChangeRequired: boolean;
|
|
3199
3196
|
roleId: number;
|
|
3197
|
+
createdAt: Date;
|
|
3198
|
+
updatedAt: Date;
|
|
3199
|
+
status: "active" | "inactive" | "suspended";
|
|
3200
3200
|
emailVerifiedAt: Date | null;
|
|
3201
3201
|
phoneVerifiedAt: Date | null;
|
|
3202
3202
|
lastLoginAt: Date | null;
|
|
@@ -3266,17 +3266,17 @@ declare class UsersRepository extends BaseRepository {
|
|
|
3266
3266
|
* Write primary 사용
|
|
3267
3267
|
*/
|
|
3268
3268
|
deleteById(id: number): Promise<{
|
|
3269
|
-
username: string | null;
|
|
3270
|
-
status: "active" | "inactive" | "suspended";
|
|
3271
3269
|
email: string | null;
|
|
3272
3270
|
phone: string | null;
|
|
3273
3271
|
id: number;
|
|
3274
|
-
createdAt: Date;
|
|
3275
|
-
updatedAt: Date;
|
|
3276
3272
|
publicId: string;
|
|
3273
|
+
username: string | null;
|
|
3277
3274
|
passwordHash: string | null;
|
|
3278
3275
|
passwordChangeRequired: boolean;
|
|
3279
3276
|
roleId: number;
|
|
3277
|
+
createdAt: Date;
|
|
3278
|
+
updatedAt: Date;
|
|
3279
|
+
status: "active" | "inactive" | "suspended";
|
|
3280
3280
|
emailVerifiedAt: Date | null;
|
|
3281
3281
|
phoneVerifiedAt: Date | null;
|
|
3282
3282
|
lastLoginAt: Date | null;
|
|
@@ -3299,7 +3299,7 @@ declare class UsersRepository extends BaseRepository {
|
|
|
3299
3299
|
id: number;
|
|
3300
3300
|
name: string;
|
|
3301
3301
|
displayName: string;
|
|
3302
|
-
category: "
|
|
3302
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
|
|
3303
3303
|
}[];
|
|
3304
3304
|
}>;
|
|
3305
3305
|
/**
|
|
@@ -3414,16 +3414,16 @@ declare class KeysRepository extends BaseRepository {
|
|
|
3414
3414
|
* Write primary 사용
|
|
3415
3415
|
*/
|
|
3416
3416
|
create(data: NewUserPublicKey): Promise<{
|
|
3417
|
-
|
|
3417
|
+
publicKey: string;
|
|
3418
3418
|
keyId: string;
|
|
3419
|
+
fingerprint: string;
|
|
3420
|
+
algorithm: "ES256" | "RS256";
|
|
3421
|
+
userId: number;
|
|
3419
3422
|
id: number;
|
|
3420
3423
|
isActive: boolean;
|
|
3421
3424
|
createdAt: Date;
|
|
3422
|
-
publicKey: string;
|
|
3423
|
-
algorithm: "ES256" | "RS256";
|
|
3424
|
-
fingerprint: string;
|
|
3425
|
-
lastUsedAt: Date | null;
|
|
3426
3425
|
expiresAt: Date | null;
|
|
3426
|
+
lastUsedAt: Date | null;
|
|
3427
3427
|
revokedAt: Date | null;
|
|
3428
3428
|
revokedReason: string | null;
|
|
3429
3429
|
}>;
|
|
@@ -3450,16 +3450,16 @@ declare class KeysRepository extends BaseRepository {
|
|
|
3450
3450
|
* Write primary 사용
|
|
3451
3451
|
*/
|
|
3452
3452
|
deleteByKeyIdAndUserId(keyId: string, userId: number): Promise<{
|
|
3453
|
-
|
|
3453
|
+
publicKey: string;
|
|
3454
3454
|
keyId: string;
|
|
3455
|
+
fingerprint: string;
|
|
3456
|
+
algorithm: "ES256" | "RS256";
|
|
3457
|
+
userId: number;
|
|
3455
3458
|
id: number;
|
|
3456
3459
|
isActive: boolean;
|
|
3457
3460
|
createdAt: Date;
|
|
3458
|
-
publicKey: string;
|
|
3459
|
-
algorithm: "ES256" | "RS256";
|
|
3460
|
-
fingerprint: string;
|
|
3461
|
-
lastUsedAt: Date | null;
|
|
3462
3461
|
expiresAt: Date | null;
|
|
3462
|
+
lastUsedAt: Date | null;
|
|
3463
3463
|
revokedAt: Date | null;
|
|
3464
3464
|
revokedReason: string | null;
|
|
3465
3465
|
}>;
|
|
@@ -3574,14 +3574,14 @@ declare class VerificationCodesRepository extends BaseRepository {
|
|
|
3574
3574
|
* Write primary 사용
|
|
3575
3575
|
*/
|
|
3576
3576
|
create(data: NewVerificationCode): Promise<{
|
|
3577
|
+
target: string;
|
|
3578
|
+
targetType: "email" | "phone";
|
|
3579
|
+
purpose: "registration" | "login" | "password_reset" | "email_change" | "phone_change";
|
|
3580
|
+
code: string;
|
|
3577
3581
|
id: number;
|
|
3578
3582
|
createdAt: Date;
|
|
3579
3583
|
updatedAt: Date;
|
|
3580
3584
|
expiresAt: Date;
|
|
3581
|
-
target: string;
|
|
3582
|
-
targetType: "email" | "phone";
|
|
3583
|
-
code: string;
|
|
3584
|
-
purpose: "registration" | "login" | "password_reset" | "email_change" | "phone_change";
|
|
3585
3585
|
usedAt: Date | null;
|
|
3586
3586
|
attempts: number;
|
|
3587
3587
|
}>;
|
|
@@ -3770,7 +3770,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
3770
3770
|
name: string;
|
|
3771
3771
|
displayName: string;
|
|
3772
3772
|
description: string | null;
|
|
3773
|
-
category: "
|
|
3773
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | null;
|
|
3774
3774
|
isBuiltin: boolean;
|
|
3775
3775
|
isSystem: boolean;
|
|
3776
3776
|
isActive: boolean;
|
|
@@ -3786,7 +3786,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
3786
3786
|
name: string;
|
|
3787
3787
|
displayName: string;
|
|
3788
3788
|
description: string | null;
|
|
3789
|
-
category: "
|
|
3789
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | null;
|
|
3790
3790
|
isBuiltin: boolean;
|
|
3791
3791
|
isSystem: boolean;
|
|
3792
3792
|
isActive: boolean;
|
|
@@ -3826,7 +3826,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
3826
3826
|
name: string;
|
|
3827
3827
|
displayName: string;
|
|
3828
3828
|
description: string | null;
|
|
3829
|
-
category: "
|
|
3829
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | null;
|
|
3830
3830
|
isBuiltin: boolean;
|
|
3831
3831
|
isSystem: boolean;
|
|
3832
3832
|
isActive: boolean;
|
|
@@ -3837,6 +3837,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
3837
3837
|
*/
|
|
3838
3838
|
deleteById(id: number): Promise<{
|
|
3839
3839
|
description: string | null;
|
|
3840
|
+
metadata: Record<string, any> | null;
|
|
3840
3841
|
id: number;
|
|
3841
3842
|
name: string;
|
|
3842
3843
|
displayName: string;
|
|
@@ -3845,8 +3846,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
3845
3846
|
isActive: boolean;
|
|
3846
3847
|
createdAt: Date;
|
|
3847
3848
|
updatedAt: Date;
|
|
3848
|
-
|
|
3849
|
-
category: "custom" | "user" | "auth" | "rbac" | "system" | null;
|
|
3849
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | null;
|
|
3850
3850
|
}>;
|
|
3851
3851
|
}
|
|
3852
3852
|
declare const permissionsRepository: PermissionsRepository;
|
|
@@ -3891,9 +3891,9 @@ declare class RolePermissionsRepository extends BaseRepository {
|
|
|
3891
3891
|
*/
|
|
3892
3892
|
createMany(data: NewRolePermission[]): Promise<{
|
|
3893
3893
|
id: number;
|
|
3894
|
+
roleId: number;
|
|
3894
3895
|
createdAt: Date;
|
|
3895
3896
|
updatedAt: Date;
|
|
3896
|
-
roleId: number;
|
|
3897
3897
|
permissionId: number;
|
|
3898
3898
|
}[]>;
|
|
3899
3899
|
/**
|
|
@@ -3909,9 +3909,9 @@ declare class RolePermissionsRepository extends BaseRepository {
|
|
|
3909
3909
|
*/
|
|
3910
3910
|
setPermissionsForRole(roleId: number, permissionIds: number[]): Promise<{
|
|
3911
3911
|
id: number;
|
|
3912
|
+
roleId: number;
|
|
3912
3913
|
createdAt: Date;
|
|
3913
3914
|
updatedAt: Date;
|
|
3914
|
-
roleId: number;
|
|
3915
3915
|
permissionId: number;
|
|
3916
3916
|
}[]>;
|
|
3917
3917
|
}
|
|
@@ -3976,10 +3976,10 @@ declare class UserPermissionsRepository extends BaseRepository {
|
|
|
3976
3976
|
id: number;
|
|
3977
3977
|
createdAt: Date;
|
|
3978
3978
|
updatedAt: Date;
|
|
3979
|
-
expiresAt: Date | null;
|
|
3980
3979
|
permissionId: number;
|
|
3981
|
-
|
|
3980
|
+
expiresAt: Date | null;
|
|
3982
3981
|
reason: string | null;
|
|
3982
|
+
granted: boolean;
|
|
3983
3983
|
}>;
|
|
3984
3984
|
/**
|
|
3985
3985
|
* 사용자 권한 오버라이드 업데이트
|
|
@@ -4002,10 +4002,10 @@ declare class UserPermissionsRepository extends BaseRepository {
|
|
|
4002
4002
|
id: number;
|
|
4003
4003
|
createdAt: Date;
|
|
4004
4004
|
updatedAt: Date;
|
|
4005
|
-
expiresAt: Date | null;
|
|
4006
4005
|
permissionId: number;
|
|
4007
|
-
|
|
4006
|
+
expiresAt: Date | null;
|
|
4008
4007
|
reason: string | null;
|
|
4008
|
+
granted: boolean;
|
|
4009
4009
|
}>;
|
|
4010
4010
|
/**
|
|
4011
4011
|
* 사용자의 모든 권한 오버라이드 삭제
|
|
@@ -4083,6 +4083,7 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4083
4083
|
* 프로필 생성
|
|
4084
4084
|
*/
|
|
4085
4085
|
create(data: NewUserProfile): Promise<{
|
|
4086
|
+
metadata: Record<string, any> | null;
|
|
4086
4087
|
userId: number;
|
|
4087
4088
|
id: number;
|
|
4088
4089
|
displayName: string | null;
|
|
@@ -4100,7 +4101,6 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4100
4101
|
location: string | null;
|
|
4101
4102
|
company: string | null;
|
|
4102
4103
|
jobTitle: string | null;
|
|
4103
|
-
metadata: Record<string, any> | null;
|
|
4104
4104
|
}>;
|
|
4105
4105
|
/**
|
|
4106
4106
|
* 프로필 업데이트 (by ID)
|
|
@@ -4152,6 +4152,7 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4152
4152
|
* 프로필 삭제 (by ID)
|
|
4153
4153
|
*/
|
|
4154
4154
|
deleteById(id: number): Promise<{
|
|
4155
|
+
metadata: Record<string, any> | null;
|
|
4155
4156
|
userId: number;
|
|
4156
4157
|
id: number;
|
|
4157
4158
|
displayName: string | null;
|
|
@@ -4169,12 +4170,12 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4169
4170
|
location: string | null;
|
|
4170
4171
|
company: string | null;
|
|
4171
4172
|
jobTitle: string | null;
|
|
4172
|
-
metadata: Record<string, any> | null;
|
|
4173
4173
|
}>;
|
|
4174
4174
|
/**
|
|
4175
4175
|
* 프로필 삭제 (by User ID)
|
|
4176
4176
|
*/
|
|
4177
4177
|
deleteByUserId(userId: number): Promise<{
|
|
4178
|
+
metadata: Record<string, any> | null;
|
|
4178
4179
|
userId: number;
|
|
4179
4180
|
id: number;
|
|
4180
4181
|
displayName: string | null;
|
|
@@ -4192,7 +4193,6 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4192
4193
|
location: string | null;
|
|
4193
4194
|
company: string | null;
|
|
4194
4195
|
jobTitle: string | null;
|
|
4195
|
-
metadata: Record<string, any> | null;
|
|
4196
4196
|
}>;
|
|
4197
4197
|
/**
|
|
4198
4198
|
* 프로필 Upsert (by User ID)
|
|
@@ -4201,6 +4201,7 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4201
4201
|
* 새로 생성 시 displayName은 필수 (없으면 'User'로 설정)
|
|
4202
4202
|
*/
|
|
4203
4203
|
upsertByUserId(userId: number, data: Partial<Omit<NewUserProfile, 'userId'>>): Promise<{
|
|
4204
|
+
metadata: Record<string, any> | null;
|
|
4204
4205
|
userId: number;
|
|
4205
4206
|
id: number;
|
|
4206
4207
|
displayName: string | null;
|
|
@@ -4218,7 +4219,6 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4218
4219
|
location: string | null;
|
|
4219
4220
|
company: string | null;
|
|
4220
4221
|
jobTitle: string | null;
|
|
4221
|
-
metadata: Record<string, any> | null;
|
|
4222
4222
|
}>;
|
|
4223
4223
|
/**
|
|
4224
4224
|
* User ID로 프로필 데이터 조회 (formatted)
|
|
@@ -4345,16 +4345,16 @@ declare class InvitationsRepository extends BaseRepository {
|
|
|
4345
4345
|
* 초대 생성
|
|
4346
4346
|
*/
|
|
4347
4347
|
create(data: NewInvitation): Promise<{
|
|
4348
|
-
status: "pending" | "accepted" | "expired" | "cancelled";
|
|
4349
4348
|
email: string;
|
|
4349
|
+
metadata: Record<string, any> | null;
|
|
4350
4350
|
id: number;
|
|
4351
|
+
roleId: number;
|
|
4351
4352
|
createdAt: Date;
|
|
4352
4353
|
updatedAt: Date;
|
|
4353
|
-
|
|
4354
|
-
metadata: Record<string, any> | null;
|
|
4355
|
-
expiresAt: Date;
|
|
4354
|
+
status: "pending" | "accepted" | "expired" | "cancelled";
|
|
4356
4355
|
token: string;
|
|
4357
4356
|
invitedBy: number;
|
|
4357
|
+
expiresAt: Date;
|
|
4358
4358
|
acceptedAt: Date | null;
|
|
4359
4359
|
cancelledAt: Date | null;
|
|
4360
4360
|
}>;
|
|
@@ -4379,16 +4379,16 @@ declare class InvitationsRepository extends BaseRepository {
|
|
|
4379
4379
|
* 초대 삭제
|
|
4380
4380
|
*/
|
|
4381
4381
|
deleteById(id: number): Promise<{
|
|
4382
|
-
status: "pending" | "accepted" | "expired" | "cancelled";
|
|
4383
4382
|
email: string;
|
|
4383
|
+
metadata: Record<string, any> | null;
|
|
4384
4384
|
id: number;
|
|
4385
|
+
roleId: number;
|
|
4385
4386
|
createdAt: Date;
|
|
4386
4387
|
updatedAt: Date;
|
|
4387
|
-
|
|
4388
|
-
metadata: Record<string, any> | null;
|
|
4389
|
-
expiresAt: Date;
|
|
4388
|
+
status: "pending" | "accepted" | "expired" | "cancelled";
|
|
4390
4389
|
token: string;
|
|
4391
4390
|
invitedBy: number;
|
|
4391
|
+
expiresAt: Date;
|
|
4392
4392
|
acceptedAt: Date | null;
|
|
4393
4393
|
cancelledAt: Date | null;
|
|
4394
4394
|
}>;
|
|
@@ -5103,17 +5103,17 @@ declare function getOptionalAuth(c: Context | {
|
|
|
5103
5103
|
declare function getUser(c: Context | {
|
|
5104
5104
|
raw: Context;
|
|
5105
5105
|
}): {
|
|
5106
|
-
username: string | null;
|
|
5107
|
-
status: "active" | "inactive" | "suspended";
|
|
5108
5106
|
email: string | null;
|
|
5109
5107
|
phone: string | null;
|
|
5110
5108
|
id: number;
|
|
5111
|
-
createdAt: Date;
|
|
5112
|
-
updatedAt: Date;
|
|
5113
5109
|
publicId: string;
|
|
5110
|
+
username: string | null;
|
|
5114
5111
|
passwordHash: string | null;
|
|
5115
5112
|
passwordChangeRequired: boolean;
|
|
5116
5113
|
roleId: number;
|
|
5114
|
+
createdAt: Date;
|
|
5115
|
+
updatedAt: Date;
|
|
5116
|
+
status: "active" | "inactive" | "suspended";
|
|
5117
5117
|
emailVerifiedAt: Date | null;
|
|
5118
5118
|
phoneVerifiedAt: Date | null;
|
|
5119
5119
|
lastLoginAt: Date | null;
|
|
@@ -5575,9 +5575,9 @@ declare const invitationCreatedEvent: _spfn_core_event.EventDef<{
|
|
|
5575
5575
|
} | undefined;
|
|
5576
5576
|
email: string;
|
|
5577
5577
|
roleId: number;
|
|
5578
|
-
expiresAt: string;
|
|
5579
5578
|
token: string;
|
|
5580
5579
|
invitedBy: string;
|
|
5580
|
+
expiresAt: string;
|
|
5581
5581
|
invitationId: string;
|
|
5582
5582
|
isResend: boolean;
|
|
5583
5583
|
}>;
|
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.66",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Authentication, authorization, and RBAC module for SPFN",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -84,9 +84,7 @@
|
|
|
84
84
|
"drizzle-orm": "^0.45.0",
|
|
85
85
|
"jose": "^6.1.0",
|
|
86
86
|
"jsonwebtoken": "^9.0.2",
|
|
87
|
-
"postgres": "^3.4.0"
|
|
88
|
-
"@spfn/core": "0.2.0-beta.48",
|
|
89
|
-
"@spfn/notification": "0.1.0-beta.18"
|
|
87
|
+
"postgres": "^3.4.0"
|
|
90
88
|
},
|
|
91
89
|
"devDependencies": {
|
|
92
90
|
"@types/bcryptjs": "^2.4.6",
|
|
@@ -103,9 +101,13 @@
|
|
|
103
101
|
"tsx": "^4.20.6",
|
|
104
102
|
"typescript": "^5.3.3",
|
|
105
103
|
"vitest": "^4.0.6",
|
|
106
|
-
"spfn": "0.
|
|
104
|
+
"@spfn/notification": "0.1.0-beta.19",
|
|
105
|
+
"spfn": "0.2.0-beta.48",
|
|
106
|
+
"@spfn/core": "0.2.0-beta.49"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
109
|
+
"@spfn/core": ">=0.2.0-beta.49",
|
|
110
|
+
"@spfn/notification": ">=0.1.0-beta.18",
|
|
109
111
|
"next": "^15.0.0 || ^16.0.0"
|
|
110
112
|
},
|
|
111
113
|
"peerDependenciesMeta": {
|