@spfn/auth 0.2.0-beta.42 → 0.2.0-beta.44
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 +2 -0
- package/dist/{authenticate-gnTzrnU-.d.ts → authenticate-CRDUKQbi.d.ts} +8 -2
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/nextjs/server.d.ts +1 -0
- package/dist/server.d.ts +121 -65
- package/dist/server.js +24 -8
- package/dist/server.js.map +1 -1
- package/migrations/0002_deep_iceman.sql +11 -0
- package/migrations/0003_perfect_deathbird.sql +3 -0
- package/migrations/meta/0002_snapshot.json +1660 -0
- package/migrations/meta/0003_snapshot.json +1689 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +3 -3
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as AuthInitOptions, l as KeyAlgorithmType, n as InvitationStatus, f as VerificationPurpose, j as PermissionCategory, p as SocialProvider, q as AuthContext } from './authenticate-
|
|
2
|
-
export { B as ChangePasswordParams, w as CheckAccountExistsParams, C as CheckAccountExistsResult, a6 as EmailSchema, I as INVITATION_STATUSES, K as KEY_ALGORITHM, y as LoginParams, L as LoginResult, z as LogoutParams, a2 as OAuthCallbackParams, a3 as OAuthCallbackResult, a1 as OAuthStartParams, O as OAuthStartResult, a8 as PasswordSchema, a7 as PhoneSchema, x as RegisterParams, Q as RegisterPublicKeyParams, a as RegisterResult, W as RevokeKeyParams, T as RotateKeyParams, b as RotateKeyResult, e as SOCIAL_PROVIDERS, F as SendVerificationCodeParams, S as SendVerificationCodeResult, a9 as TargetTypeSchema, d as USER_STATUSES, o as UserStatus, h as VERIFICATION_PURPOSES, g as VERIFICATION_TARGET_TYPES, aa as VerificationPurposeSchema, V as VerificationTargetType, G as VerifyCodeParams, H as VerifyCodeResult, m as authRouter, a4 as authenticate, Z as buildOAuthErrorUrl, v as changePasswordService, r as checkAccountExistsService, $ as getEnabledOAuthProviders, a0 as getGoogleAccessToken, _ as isOAuthProviderEnabled, t as loginService, u as logoutService, Y as oauthCallbackService, X as oauthStartService, a5 as optionalAuth, J as registerPublicKeyService, s as registerService, N as revokeKeyService, M as rotateKeyService, D as sendVerificationCodeService, E as verifyCodeService } from './authenticate-
|
|
1
|
+
import { k as AuthInitOptions, l as KeyAlgorithmType, n as InvitationStatus, f as VerificationPurpose, j as PermissionCategory, p as SocialProvider, q as AuthContext } from './authenticate-CRDUKQbi.js';
|
|
2
|
+
export { B as ChangePasswordParams, w as CheckAccountExistsParams, C as CheckAccountExistsResult, a6 as EmailSchema, I as INVITATION_STATUSES, K as KEY_ALGORITHM, y as LoginParams, L as LoginResult, z as LogoutParams, a2 as OAuthCallbackParams, a3 as OAuthCallbackResult, a1 as OAuthStartParams, O as OAuthStartResult, a8 as PasswordSchema, a7 as PhoneSchema, x as RegisterParams, Q as RegisterPublicKeyParams, a as RegisterResult, W as RevokeKeyParams, T as RotateKeyParams, b as RotateKeyResult, e as SOCIAL_PROVIDERS, F as SendVerificationCodeParams, S as SendVerificationCodeResult, a9 as TargetTypeSchema, d as USER_STATUSES, o as UserStatus, h as VERIFICATION_PURPOSES, g as VERIFICATION_TARGET_TYPES, aa as VerificationPurposeSchema, V as VerificationTargetType, G as VerifyCodeParams, H as VerifyCodeResult, m as authRouter, a4 as authenticate, Z as buildOAuthErrorUrl, v as changePasswordService, r as checkAccountExistsService, $ as getEnabledOAuthProviders, a0 as getGoogleAccessToken, _ as isOAuthProviderEnabled, t as loginService, u as logoutService, Y as oauthCallbackService, X as oauthStartService, a5 as optionalAuth, J as registerPublicKeyService, s as registerService, N as revokeKeyService, M as rotateKeyService, D as sendVerificationCodeService, E as verifyCodeService } from './authenticate-CRDUKQbi.js';
|
|
3
3
|
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
4
4
|
import { UserProfile as UserProfile$1, ProfileInfo } from '@spfn/auth';
|
|
5
5
|
import { BaseRepository } from '@spfn/core/db';
|
|
@@ -79,6 +79,23 @@ declare const users: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
79
79
|
identity: undefined;
|
|
80
80
|
generated: undefined;
|
|
81
81
|
}, {}, {}>;
|
|
82
|
+
publicId: drizzle_orm_pg_core.PgColumn<{
|
|
83
|
+
name: "public_id";
|
|
84
|
+
tableName: "users";
|
|
85
|
+
dataType: "string";
|
|
86
|
+
columnType: "PgUUID";
|
|
87
|
+
data: string;
|
|
88
|
+
driverParam: string;
|
|
89
|
+
notNull: true;
|
|
90
|
+
hasDefault: true;
|
|
91
|
+
isPrimaryKey: false;
|
|
92
|
+
isAutoincrement: false;
|
|
93
|
+
hasRuntimeDefault: false;
|
|
94
|
+
enumValues: undefined;
|
|
95
|
+
baseColumn: never;
|
|
96
|
+
identity: undefined;
|
|
97
|
+
generated: undefined;
|
|
98
|
+
}, {}, {}>;
|
|
82
99
|
email: drizzle_orm_pg_core.PgColumn<{
|
|
83
100
|
name: "email";
|
|
84
101
|
tableName: "users";
|
|
@@ -268,6 +285,7 @@ declare function getUserByIdService(userId: number): Promise<{
|
|
|
268
285
|
createdAt: Date;
|
|
269
286
|
updatedAt: Date;
|
|
270
287
|
id: number;
|
|
288
|
+
publicId: string;
|
|
271
289
|
email: string | null;
|
|
272
290
|
phone: string | null;
|
|
273
291
|
username: string | null;
|
|
@@ -286,6 +304,7 @@ declare function getUserByEmailService(email: string): Promise<{
|
|
|
286
304
|
createdAt: Date;
|
|
287
305
|
updatedAt: Date;
|
|
288
306
|
id: number;
|
|
307
|
+
publicId: string;
|
|
289
308
|
email: string | null;
|
|
290
309
|
phone: string | null;
|
|
291
310
|
username: string | null;
|
|
@@ -304,6 +323,7 @@ declare function getUserByPhoneService(phone: string): Promise<{
|
|
|
304
323
|
createdAt: Date;
|
|
305
324
|
updatedAt: Date;
|
|
306
325
|
id: number;
|
|
326
|
+
publicId: string;
|
|
307
327
|
email: string | null;
|
|
308
328
|
phone: string | null;
|
|
309
329
|
username: string | null;
|
|
@@ -341,6 +361,7 @@ declare function updateUsernameService(userId: string | number | bigint, usernam
|
|
|
341
361
|
createdAt: Date;
|
|
342
362
|
updatedAt: Date;
|
|
343
363
|
id: number;
|
|
364
|
+
publicId: string;
|
|
344
365
|
email: string | null;
|
|
345
366
|
phone: string | null;
|
|
346
367
|
username: string | null;
|
|
@@ -1306,9 +1327,10 @@ declare function getAuthSessionService(userId: string | number | bigint): Promis
|
|
|
1306
1327
|
id: number;
|
|
1307
1328
|
name: string;
|
|
1308
1329
|
displayName: string;
|
|
1309
|
-
category: "
|
|
1330
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
|
|
1310
1331
|
}[];
|
|
1311
1332
|
userId: number;
|
|
1333
|
+
publicId: string;
|
|
1312
1334
|
email: string | null;
|
|
1313
1335
|
emailVerified: boolean;
|
|
1314
1336
|
phoneVerified: boolean;
|
|
@@ -1489,7 +1511,7 @@ declare const userProfiles: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
1489
1511
|
columnType: "PgText";
|
|
1490
1512
|
data: string;
|
|
1491
1513
|
driverParam: string;
|
|
1492
|
-
notNull:
|
|
1514
|
+
notNull: false;
|
|
1493
1515
|
hasDefault: false;
|
|
1494
1516
|
isPrimaryKey: false;
|
|
1495
1517
|
isAutoincrement: false;
|
|
@@ -2445,7 +2467,7 @@ declare const permissions: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
2445
2467
|
tableName: "permissions";
|
|
2446
2468
|
dataType: "string";
|
|
2447
2469
|
columnType: "PgText";
|
|
2448
|
-
data: "
|
|
2470
|
+
data: "auth" | "custom" | "user" | "rbac" | "system";
|
|
2449
2471
|
driverParam: string;
|
|
2450
2472
|
notNull: false;
|
|
2451
2473
|
hasDefault: false;
|
|
@@ -2823,6 +2845,7 @@ declare class UsersRepository extends BaseRepository {
|
|
|
2823
2845
|
createdAt: Date;
|
|
2824
2846
|
updatedAt: Date;
|
|
2825
2847
|
id: number;
|
|
2848
|
+
publicId: string;
|
|
2826
2849
|
email: string | null;
|
|
2827
2850
|
phone: string | null;
|
|
2828
2851
|
username: string | null;
|
|
@@ -2842,6 +2865,7 @@ declare class UsersRepository extends BaseRepository {
|
|
|
2842
2865
|
createdAt: Date;
|
|
2843
2866
|
updatedAt: Date;
|
|
2844
2867
|
id: number;
|
|
2868
|
+
publicId: string;
|
|
2845
2869
|
email: string | null;
|
|
2846
2870
|
phone: string | null;
|
|
2847
2871
|
username: string | null;
|
|
@@ -2861,6 +2885,7 @@ declare class UsersRepository extends BaseRepository {
|
|
|
2861
2885
|
createdAt: Date;
|
|
2862
2886
|
updatedAt: Date;
|
|
2863
2887
|
id: number;
|
|
2888
|
+
publicId: string;
|
|
2864
2889
|
email: string | null;
|
|
2865
2890
|
phone: string | null;
|
|
2866
2891
|
username: string | null;
|
|
@@ -2880,6 +2905,27 @@ declare class UsersRepository extends BaseRepository {
|
|
|
2880
2905
|
createdAt: Date;
|
|
2881
2906
|
updatedAt: Date;
|
|
2882
2907
|
id: number;
|
|
2908
|
+
publicId: string;
|
|
2909
|
+
email: string | null;
|
|
2910
|
+
phone: string | null;
|
|
2911
|
+
username: string | null;
|
|
2912
|
+
passwordHash: string | null;
|
|
2913
|
+
passwordChangeRequired: boolean;
|
|
2914
|
+
roleId: number;
|
|
2915
|
+
status: "active" | "inactive" | "suspended";
|
|
2916
|
+
emailVerifiedAt: Date | null;
|
|
2917
|
+
phoneVerifiedAt: Date | null;
|
|
2918
|
+
lastLoginAt: Date | null;
|
|
2919
|
+
}>;
|
|
2920
|
+
/**
|
|
2921
|
+
* Public ID(UUID)로 사용자 조회
|
|
2922
|
+
* Read replica 사용
|
|
2923
|
+
*/
|
|
2924
|
+
findByPublicId(publicId: string): Promise<{
|
|
2925
|
+
createdAt: Date;
|
|
2926
|
+
updatedAt: Date;
|
|
2927
|
+
id: number;
|
|
2928
|
+
publicId: string;
|
|
2883
2929
|
email: string | null;
|
|
2884
2930
|
phone: string | null;
|
|
2885
2931
|
username: string | null;
|
|
@@ -2899,6 +2945,7 @@ declare class UsersRepository extends BaseRepository {
|
|
|
2899
2945
|
createdAt: Date;
|
|
2900
2946
|
updatedAt: Date;
|
|
2901
2947
|
id: number;
|
|
2948
|
+
publicId: string;
|
|
2902
2949
|
email: string | null;
|
|
2903
2950
|
phone: string | null;
|
|
2904
2951
|
username: string | null;
|
|
@@ -2921,6 +2968,7 @@ declare class UsersRepository extends BaseRepository {
|
|
|
2921
2968
|
createdAt: Date;
|
|
2922
2969
|
updatedAt: Date;
|
|
2923
2970
|
id: number;
|
|
2971
|
+
publicId: string;
|
|
2924
2972
|
email: string | null;
|
|
2925
2973
|
phone: string | null;
|
|
2926
2974
|
username: string | null;
|
|
@@ -2943,16 +2991,17 @@ declare class UsersRepository extends BaseRepository {
|
|
|
2943
2991
|
* Write primary 사용
|
|
2944
2992
|
*/
|
|
2945
2993
|
create(data: NewUser): Promise<{
|
|
2946
|
-
username: string | null;
|
|
2947
|
-
status: "active" | "inactive" | "suspended";
|
|
2948
2994
|
email: string | null;
|
|
2949
2995
|
phone: string | null;
|
|
2950
2996
|
id: number;
|
|
2951
|
-
|
|
2952
|
-
|
|
2997
|
+
publicId: string;
|
|
2998
|
+
username: string | null;
|
|
2953
2999
|
passwordHash: string | null;
|
|
2954
3000
|
passwordChangeRequired: boolean;
|
|
2955
3001
|
roleId: number;
|
|
3002
|
+
createdAt: Date;
|
|
3003
|
+
updatedAt: Date;
|
|
3004
|
+
status: "active" | "inactive" | "suspended";
|
|
2956
3005
|
emailVerifiedAt: Date | null;
|
|
2957
3006
|
phoneVerifiedAt: Date | null;
|
|
2958
3007
|
lastLoginAt: Date | null;
|
|
@@ -2965,6 +3014,7 @@ declare class UsersRepository extends BaseRepository {
|
|
|
2965
3014
|
createdAt: Date;
|
|
2966
3015
|
updatedAt: Date;
|
|
2967
3016
|
id: number;
|
|
3017
|
+
publicId: string;
|
|
2968
3018
|
email: string | null;
|
|
2969
3019
|
phone: string | null;
|
|
2970
3020
|
username: string | null;
|
|
@@ -2984,6 +3034,7 @@ declare class UsersRepository extends BaseRepository {
|
|
|
2984
3034
|
createdAt: Date;
|
|
2985
3035
|
updatedAt: Date;
|
|
2986
3036
|
id: number;
|
|
3037
|
+
publicId: string;
|
|
2987
3038
|
email: string | null;
|
|
2988
3039
|
phone: string | null;
|
|
2989
3040
|
username: string | null;
|
|
@@ -3003,6 +3054,7 @@ declare class UsersRepository extends BaseRepository {
|
|
|
3003
3054
|
createdAt: Date;
|
|
3004
3055
|
updatedAt: Date;
|
|
3005
3056
|
id: number;
|
|
3057
|
+
publicId: string;
|
|
3006
3058
|
email: string | null;
|
|
3007
3059
|
phone: string | null;
|
|
3008
3060
|
username: string | null;
|
|
@@ -3019,16 +3071,17 @@ declare class UsersRepository extends BaseRepository {
|
|
|
3019
3071
|
* Write primary 사용
|
|
3020
3072
|
*/
|
|
3021
3073
|
deleteById(id: number): Promise<{
|
|
3022
|
-
username: string | null;
|
|
3023
|
-
status: "active" | "inactive" | "suspended";
|
|
3024
3074
|
email: string | null;
|
|
3025
3075
|
phone: string | null;
|
|
3026
3076
|
id: number;
|
|
3027
|
-
|
|
3028
|
-
|
|
3077
|
+
publicId: string;
|
|
3078
|
+
username: string | null;
|
|
3029
3079
|
passwordHash: string | null;
|
|
3030
3080
|
passwordChangeRequired: boolean;
|
|
3031
3081
|
roleId: number;
|
|
3082
|
+
createdAt: Date;
|
|
3083
|
+
updatedAt: Date;
|
|
3084
|
+
status: "active" | "inactive" | "suspended";
|
|
3032
3085
|
emailVerifiedAt: Date | null;
|
|
3033
3086
|
phoneVerifiedAt: Date | null;
|
|
3034
3087
|
lastLoginAt: Date | null;
|
|
@@ -3051,7 +3104,7 @@ declare class UsersRepository extends BaseRepository {
|
|
|
3051
3104
|
id: number;
|
|
3052
3105
|
name: string;
|
|
3053
3106
|
displayName: string;
|
|
3054
|
-
category: "
|
|
3107
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
|
|
3055
3108
|
}[];
|
|
3056
3109
|
}>;
|
|
3057
3110
|
/**
|
|
@@ -3063,6 +3116,7 @@ declare class UsersRepository extends BaseRepository {
|
|
|
3063
3116
|
*/
|
|
3064
3117
|
fetchMinimalUserData(userId: number): Promise<{
|
|
3065
3118
|
userId: number;
|
|
3119
|
+
publicId: string;
|
|
3066
3120
|
email: string | null;
|
|
3067
3121
|
username: string | null;
|
|
3068
3122
|
isEmailVerified: boolean;
|
|
@@ -3077,6 +3131,7 @@ declare class UsersRepository extends BaseRepository {
|
|
|
3077
3131
|
*/
|
|
3078
3132
|
fetchFullUserData(userId: number): Promise<{
|
|
3079
3133
|
userId: number;
|
|
3134
|
+
publicId: string;
|
|
3080
3135
|
email: string | null;
|
|
3081
3136
|
username: string | null;
|
|
3082
3137
|
isEmailVerified: boolean;
|
|
@@ -3163,16 +3218,16 @@ declare class KeysRepository extends BaseRepository {
|
|
|
3163
3218
|
* Write primary 사용
|
|
3164
3219
|
*/
|
|
3165
3220
|
create(data: NewUserPublicKey): Promise<{
|
|
3166
|
-
|
|
3221
|
+
publicKey: string;
|
|
3167
3222
|
keyId: string;
|
|
3223
|
+
fingerprint: string;
|
|
3224
|
+
algorithm: "ES256" | "RS256";
|
|
3225
|
+
userId: number;
|
|
3168
3226
|
id: number;
|
|
3169
3227
|
isActive: boolean;
|
|
3170
3228
|
createdAt: Date;
|
|
3171
|
-
publicKey: string;
|
|
3172
|
-
algorithm: "ES256" | "RS256";
|
|
3173
|
-
fingerprint: string;
|
|
3174
|
-
lastUsedAt: Date | null;
|
|
3175
3229
|
expiresAt: Date | null;
|
|
3230
|
+
lastUsedAt: Date | null;
|
|
3176
3231
|
revokedAt: Date | null;
|
|
3177
3232
|
revokedReason: string | null;
|
|
3178
3233
|
}>;
|
|
@@ -3199,16 +3254,16 @@ declare class KeysRepository extends BaseRepository {
|
|
|
3199
3254
|
* Write primary 사용
|
|
3200
3255
|
*/
|
|
3201
3256
|
deleteByKeyIdAndUserId(keyId: string, userId: number): Promise<{
|
|
3202
|
-
|
|
3257
|
+
publicKey: string;
|
|
3203
3258
|
keyId: string;
|
|
3259
|
+
fingerprint: string;
|
|
3260
|
+
algorithm: "ES256" | "RS256";
|
|
3261
|
+
userId: number;
|
|
3204
3262
|
id: number;
|
|
3205
3263
|
isActive: boolean;
|
|
3206
3264
|
createdAt: Date;
|
|
3207
|
-
publicKey: string;
|
|
3208
|
-
algorithm: "ES256" | "RS256";
|
|
3209
|
-
fingerprint: string;
|
|
3210
|
-
lastUsedAt: Date | null;
|
|
3211
3265
|
expiresAt: Date | null;
|
|
3266
|
+
lastUsedAt: Date | null;
|
|
3212
3267
|
revokedAt: Date | null;
|
|
3213
3268
|
revokedReason: string | null;
|
|
3214
3269
|
}>;
|
|
@@ -3323,14 +3378,14 @@ declare class VerificationCodesRepository extends BaseRepository {
|
|
|
3323
3378
|
* Write primary 사용
|
|
3324
3379
|
*/
|
|
3325
3380
|
create(data: NewVerificationCode): Promise<{
|
|
3381
|
+
target: string;
|
|
3382
|
+
targetType: "email" | "phone";
|
|
3383
|
+
purpose: "registration" | "login" | "password_reset" | "email_change" | "phone_change";
|
|
3384
|
+
code: string;
|
|
3326
3385
|
id: number;
|
|
3327
3386
|
createdAt: Date;
|
|
3328
3387
|
updatedAt: Date;
|
|
3329
3388
|
expiresAt: Date;
|
|
3330
|
-
target: string;
|
|
3331
|
-
targetType: "email" | "phone";
|
|
3332
|
-
code: string;
|
|
3333
|
-
purpose: "registration" | "login" | "password_reset" | "email_change" | "phone_change";
|
|
3334
3389
|
usedAt: Date | null;
|
|
3335
3390
|
attempts: number;
|
|
3336
3391
|
}>;
|
|
@@ -3519,7 +3574,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
3519
3574
|
name: string;
|
|
3520
3575
|
displayName: string;
|
|
3521
3576
|
description: string | null;
|
|
3522
|
-
category: "
|
|
3577
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | null;
|
|
3523
3578
|
isBuiltin: boolean;
|
|
3524
3579
|
isSystem: boolean;
|
|
3525
3580
|
isActive: boolean;
|
|
@@ -3535,7 +3590,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
3535
3590
|
name: string;
|
|
3536
3591
|
displayName: string;
|
|
3537
3592
|
description: string | null;
|
|
3538
|
-
category: "
|
|
3593
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | null;
|
|
3539
3594
|
isBuiltin: boolean;
|
|
3540
3595
|
isSystem: boolean;
|
|
3541
3596
|
isActive: boolean;
|
|
@@ -3575,7 +3630,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
3575
3630
|
name: string;
|
|
3576
3631
|
displayName: string;
|
|
3577
3632
|
description: string | null;
|
|
3578
|
-
category: "
|
|
3633
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | null;
|
|
3579
3634
|
isBuiltin: boolean;
|
|
3580
3635
|
isSystem: boolean;
|
|
3581
3636
|
isActive: boolean;
|
|
@@ -3586,6 +3641,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
3586
3641
|
*/
|
|
3587
3642
|
deleteById(id: number): Promise<{
|
|
3588
3643
|
description: string | null;
|
|
3644
|
+
metadata: Record<string, any> | null;
|
|
3589
3645
|
id: number;
|
|
3590
3646
|
name: string;
|
|
3591
3647
|
displayName: string;
|
|
@@ -3594,8 +3650,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
3594
3650
|
isActive: boolean;
|
|
3595
3651
|
createdAt: Date;
|
|
3596
3652
|
updatedAt: Date;
|
|
3597
|
-
|
|
3598
|
-
category: "custom" | "user" | "auth" | "rbac" | "system" | null;
|
|
3653
|
+
category: "auth" | "custom" | "user" | "rbac" | "system" | null;
|
|
3599
3654
|
}>;
|
|
3600
3655
|
}
|
|
3601
3656
|
declare const permissionsRepository: PermissionsRepository;
|
|
@@ -3640,9 +3695,9 @@ declare class RolePermissionsRepository extends BaseRepository {
|
|
|
3640
3695
|
*/
|
|
3641
3696
|
createMany(data: NewRolePermission[]): Promise<{
|
|
3642
3697
|
id: number;
|
|
3698
|
+
roleId: number;
|
|
3643
3699
|
createdAt: Date;
|
|
3644
3700
|
updatedAt: Date;
|
|
3645
|
-
roleId: number;
|
|
3646
3701
|
permissionId: number;
|
|
3647
3702
|
}[]>;
|
|
3648
3703
|
/**
|
|
@@ -3658,9 +3713,9 @@ declare class RolePermissionsRepository extends BaseRepository {
|
|
|
3658
3713
|
*/
|
|
3659
3714
|
setPermissionsForRole(roleId: number, permissionIds: number[]): Promise<{
|
|
3660
3715
|
id: number;
|
|
3716
|
+
roleId: number;
|
|
3661
3717
|
createdAt: Date;
|
|
3662
3718
|
updatedAt: Date;
|
|
3663
|
-
roleId: number;
|
|
3664
3719
|
permissionId: number;
|
|
3665
3720
|
}[]>;
|
|
3666
3721
|
}
|
|
@@ -3725,10 +3780,10 @@ declare class UserPermissionsRepository extends BaseRepository {
|
|
|
3725
3780
|
id: number;
|
|
3726
3781
|
createdAt: Date;
|
|
3727
3782
|
updatedAt: Date;
|
|
3728
|
-
expiresAt: Date | null;
|
|
3729
3783
|
permissionId: number;
|
|
3730
|
-
|
|
3784
|
+
expiresAt: Date | null;
|
|
3731
3785
|
reason: string | null;
|
|
3786
|
+
granted: boolean;
|
|
3732
3787
|
}>;
|
|
3733
3788
|
/**
|
|
3734
3789
|
* 사용자 권한 오버라이드 업데이트
|
|
@@ -3751,10 +3806,10 @@ declare class UserPermissionsRepository extends BaseRepository {
|
|
|
3751
3806
|
id: number;
|
|
3752
3807
|
createdAt: Date;
|
|
3753
3808
|
updatedAt: Date;
|
|
3754
|
-
expiresAt: Date | null;
|
|
3755
3809
|
permissionId: number;
|
|
3756
|
-
|
|
3810
|
+
expiresAt: Date | null;
|
|
3757
3811
|
reason: string | null;
|
|
3812
|
+
granted: boolean;
|
|
3758
3813
|
}>;
|
|
3759
3814
|
/**
|
|
3760
3815
|
* 사용자의 모든 권한 오버라이드 삭제
|
|
@@ -3786,7 +3841,7 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
3786
3841
|
updatedAt: Date;
|
|
3787
3842
|
id: number;
|
|
3788
3843
|
userId: number;
|
|
3789
|
-
displayName: string;
|
|
3844
|
+
displayName: string | null;
|
|
3790
3845
|
firstName: string | null;
|
|
3791
3846
|
lastName: string | null;
|
|
3792
3847
|
avatarUrl: string | null;
|
|
@@ -3813,7 +3868,7 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
3813
3868
|
updatedAt: Date;
|
|
3814
3869
|
id: number;
|
|
3815
3870
|
userId: number;
|
|
3816
|
-
displayName: string;
|
|
3871
|
+
displayName: string | null;
|
|
3817
3872
|
firstName: string | null;
|
|
3818
3873
|
lastName: string | null;
|
|
3819
3874
|
avatarUrl: string | null;
|
|
@@ -3832,9 +3887,10 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
3832
3887
|
* 프로필 생성
|
|
3833
3888
|
*/
|
|
3834
3889
|
create(data: NewUserProfile): Promise<{
|
|
3890
|
+
metadata: Record<string, any> | null;
|
|
3835
3891
|
userId: number;
|
|
3836
3892
|
id: number;
|
|
3837
|
-
displayName: string;
|
|
3893
|
+
displayName: string | null;
|
|
3838
3894
|
createdAt: Date;
|
|
3839
3895
|
updatedAt: Date;
|
|
3840
3896
|
firstName: string | null;
|
|
@@ -3849,7 +3905,6 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
3849
3905
|
location: string | null;
|
|
3850
3906
|
company: string | null;
|
|
3851
3907
|
jobTitle: string | null;
|
|
3852
|
-
metadata: Record<string, any> | null;
|
|
3853
3908
|
}>;
|
|
3854
3909
|
/**
|
|
3855
3910
|
* 프로필 업데이트 (by ID)
|
|
@@ -3859,7 +3914,7 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
3859
3914
|
updatedAt: Date;
|
|
3860
3915
|
id: number;
|
|
3861
3916
|
userId: number;
|
|
3862
|
-
displayName: string;
|
|
3917
|
+
displayName: string | null;
|
|
3863
3918
|
firstName: string | null;
|
|
3864
3919
|
lastName: string | null;
|
|
3865
3920
|
avatarUrl: string | null;
|
|
@@ -3882,7 +3937,7 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
3882
3937
|
updatedAt: Date;
|
|
3883
3938
|
id: number;
|
|
3884
3939
|
userId: number;
|
|
3885
|
-
displayName: string;
|
|
3940
|
+
displayName: string | null;
|
|
3886
3941
|
firstName: string | null;
|
|
3887
3942
|
lastName: string | null;
|
|
3888
3943
|
avatarUrl: string | null;
|
|
@@ -3901,9 +3956,10 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
3901
3956
|
* 프로필 삭제 (by ID)
|
|
3902
3957
|
*/
|
|
3903
3958
|
deleteById(id: number): Promise<{
|
|
3959
|
+
metadata: Record<string, any> | null;
|
|
3904
3960
|
userId: number;
|
|
3905
3961
|
id: number;
|
|
3906
|
-
displayName: string;
|
|
3962
|
+
displayName: string | null;
|
|
3907
3963
|
createdAt: Date;
|
|
3908
3964
|
updatedAt: Date;
|
|
3909
3965
|
firstName: string | null;
|
|
@@ -3918,15 +3974,15 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
3918
3974
|
location: string | null;
|
|
3919
3975
|
company: string | null;
|
|
3920
3976
|
jobTitle: string | null;
|
|
3921
|
-
metadata: Record<string, any> | null;
|
|
3922
3977
|
}>;
|
|
3923
3978
|
/**
|
|
3924
3979
|
* 프로필 삭제 (by User ID)
|
|
3925
3980
|
*/
|
|
3926
3981
|
deleteByUserId(userId: number): Promise<{
|
|
3982
|
+
metadata: Record<string, any> | null;
|
|
3927
3983
|
userId: number;
|
|
3928
3984
|
id: number;
|
|
3929
|
-
displayName: string;
|
|
3985
|
+
displayName: string | null;
|
|
3930
3986
|
createdAt: Date;
|
|
3931
3987
|
updatedAt: Date;
|
|
3932
3988
|
firstName: string | null;
|
|
@@ -3941,7 +3997,6 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
3941
3997
|
location: string | null;
|
|
3942
3998
|
company: string | null;
|
|
3943
3999
|
jobTitle: string | null;
|
|
3944
|
-
metadata: Record<string, any> | null;
|
|
3945
4000
|
}>;
|
|
3946
4001
|
/**
|
|
3947
4002
|
* 프로필 Upsert (by User ID)
|
|
@@ -3950,9 +4005,10 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
3950
4005
|
* 새로 생성 시 displayName은 필수 (없으면 'User'로 설정)
|
|
3951
4006
|
*/
|
|
3952
4007
|
upsertByUserId(userId: number, data: Partial<Omit<NewUserProfile, 'userId'>>): Promise<{
|
|
4008
|
+
metadata: Record<string, any> | null;
|
|
3953
4009
|
userId: number;
|
|
3954
4010
|
id: number;
|
|
3955
|
-
displayName: string;
|
|
4011
|
+
displayName: string | null;
|
|
3956
4012
|
createdAt: Date;
|
|
3957
4013
|
updatedAt: Date;
|
|
3958
4014
|
firstName: string | null;
|
|
@@ -3967,7 +4023,6 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
3967
4023
|
location: string | null;
|
|
3968
4024
|
company: string | null;
|
|
3969
4025
|
jobTitle: string | null;
|
|
3970
|
-
metadata: Record<string, any> | null;
|
|
3971
4026
|
}>;
|
|
3972
4027
|
/**
|
|
3973
4028
|
* User ID로 프로필 데이터 조회 (formatted)
|
|
@@ -3976,7 +4031,7 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
3976
4031
|
*/
|
|
3977
4032
|
fetchProfileData(userId: number): Promise<{
|
|
3978
4033
|
profileId: number;
|
|
3979
|
-
displayName: string;
|
|
4034
|
+
displayName: string | null;
|
|
3980
4035
|
firstName: string | null;
|
|
3981
4036
|
lastName: string | null;
|
|
3982
4037
|
avatarUrl: string | null;
|
|
@@ -4094,16 +4149,16 @@ declare class InvitationsRepository extends BaseRepository {
|
|
|
4094
4149
|
* 초대 생성
|
|
4095
4150
|
*/
|
|
4096
4151
|
create(data: NewInvitation): Promise<{
|
|
4097
|
-
status: "pending" | "accepted" | "expired" | "cancelled";
|
|
4098
4152
|
email: string;
|
|
4153
|
+
metadata: Record<string, any> | null;
|
|
4099
4154
|
id: number;
|
|
4155
|
+
roleId: number;
|
|
4100
4156
|
createdAt: Date;
|
|
4101
4157
|
updatedAt: Date;
|
|
4102
|
-
|
|
4103
|
-
metadata: Record<string, any> | null;
|
|
4104
|
-
expiresAt: Date;
|
|
4158
|
+
status: "pending" | "accepted" | "expired" | "cancelled";
|
|
4105
4159
|
token: string;
|
|
4106
4160
|
invitedBy: number;
|
|
4161
|
+
expiresAt: Date;
|
|
4107
4162
|
acceptedAt: Date | null;
|
|
4108
4163
|
cancelledAt: Date | null;
|
|
4109
4164
|
}>;
|
|
@@ -4128,16 +4183,16 @@ declare class InvitationsRepository extends BaseRepository {
|
|
|
4128
4183
|
* 초대 삭제
|
|
4129
4184
|
*/
|
|
4130
4185
|
deleteById(id: number): Promise<{
|
|
4131
|
-
status: "pending" | "accepted" | "expired" | "cancelled";
|
|
4132
4186
|
email: string;
|
|
4187
|
+
metadata: Record<string, any> | null;
|
|
4133
4188
|
id: number;
|
|
4189
|
+
roleId: number;
|
|
4134
4190
|
createdAt: Date;
|
|
4135
4191
|
updatedAt: Date;
|
|
4136
|
-
|
|
4137
|
-
metadata: Record<string, any> | null;
|
|
4138
|
-
expiresAt: Date;
|
|
4192
|
+
status: "pending" | "accepted" | "expired" | "cancelled";
|
|
4139
4193
|
token: string;
|
|
4140
4194
|
invitedBy: number;
|
|
4195
|
+
expiresAt: Date;
|
|
4141
4196
|
acceptedAt: Date | null;
|
|
4142
4197
|
cancelledAt: Date | null;
|
|
4143
4198
|
}>;
|
|
@@ -4802,16 +4857,17 @@ declare function getOptionalAuth(c: Context | {
|
|
|
4802
4857
|
declare function getUser(c: Context | {
|
|
4803
4858
|
raw: Context;
|
|
4804
4859
|
}): {
|
|
4805
|
-
username: string | null;
|
|
4806
|
-
status: "active" | "inactive" | "suspended";
|
|
4807
4860
|
email: string | null;
|
|
4808
4861
|
phone: string | null;
|
|
4809
4862
|
id: number;
|
|
4810
|
-
|
|
4811
|
-
|
|
4863
|
+
publicId: string;
|
|
4864
|
+
username: string | null;
|
|
4812
4865
|
passwordHash: string | null;
|
|
4813
4866
|
passwordChangeRequired: boolean;
|
|
4814
4867
|
roleId: number;
|
|
4868
|
+
createdAt: Date;
|
|
4869
|
+
updatedAt: Date;
|
|
4870
|
+
status: "active" | "inactive" | "suspended";
|
|
4815
4871
|
emailVerifiedAt: Date | null;
|
|
4816
4872
|
phoneVerifiedAt: Date | null;
|
|
4817
4873
|
lastLoginAt: Date | null;
|
|
@@ -5341,9 +5397,9 @@ declare const invitationCreatedEvent: _spfn_core_event.EventDef<{
|
|
|
5341
5397
|
} | undefined;
|
|
5342
5398
|
email: string;
|
|
5343
5399
|
roleId: number;
|
|
5344
|
-
expiresAt: string;
|
|
5345
5400
|
token: string;
|
|
5346
5401
|
invitedBy: string;
|
|
5402
|
+
expiresAt: string;
|
|
5347
5403
|
invitationId: string;
|
|
5348
5404
|
isResend: boolean;
|
|
5349
5405
|
}>;
|