@spfn/auth 0.3.0-beta.5 → 0.3.0-beta.7
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 +146 -0
- package/dist/{authenticate-Ctul07Sc.d.ts → authenticate-Mg9D7Nys.d.ts} +174 -7
- package/dist/config.d.ts +60 -0
- package/dist/config.js +27 -0
- package/dist/config.js.map +1 -1
- package/dist/errors.d.ts +39 -2
- package/dist/errors.js +24 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +33 -6
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -1
- package/dist/nextjs/api.js +58 -1
- package/dist/nextjs/api.js.map +1 -1
- package/dist/nextjs/server.js +4 -0
- package/dist/nextjs/server.js.map +1 -1
- package/dist/server.d.ts +359 -85
- package/dist/server.js +800 -368
- package/dist/server.js.map +1 -1
- package/migrations/20260810112144_colorful_tomorrow_man/migration.sql +18 -0
- package/migrations/20260810112144_colorful_tomorrow_man/snapshot.json +3576 -0
- package/package.json +2 -2
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AuthInitOptions,
|
|
2
|
-
export {
|
|
1
|
+
import { A as AuthInitOptions, n as OAuthProvider, k as VerificationPurpose, i as PermissionCategory, o as AuthContext } from './authenticate-Mg9D7Nys.js';
|
|
2
|
+
export { p as AuthProfileOutcome, q as AuthProfileVerifier, r as ChangePasswordParams, s as CompleteSignupParams, t as ConfirmSignupLinkParams, C as ConfirmSignupLinkResult, D as DeviceNameSchema, E as EmailSchema, I as IssueOneTimeTokenResult, u as KEY_FINGERPRINT_PREFIX_LENGTH, K as KeySummary, v as LoginParams, L as LoginResult, w as LogoutParams, N as NativeVerifyOptions, x as NormalizedIdentity, y as OAuthCallbackParams, z as OAuthCallbackResult, B as OAuthCodeExchangeOptions, F as OAuthNativeParams, e as OAuthNativeResult, G as OAuthStartParams, O as OAuthStartResult, H as OAuthTokens, J as PasswordSchema, M as PhoneSchema, Q as PlatformSchema, T as RegisterParams, W as RegisterPublicKeyParams, a as RegisterResult, X as RequestSignupLinkParams, b as RequestSignupLinkResult, Y as RevokeAllKeysParams, d as RevokeAllKeysResult, Z as RevokeKeyParams, _ as RotateKeyParams, c as RotateKeyResult, $ as SendVerificationCodeParams, S as SendVerificationCodeResult, a0 as TargetTypeSchema, a1 as UnlinkNotification, a2 as UnlinkNotifyRejection, a3 as UnlinkNotifyRequest, a4 as UnlinkNotifyResult, V as VERIFICATION_PURPOSES, j as VERIFICATION_TARGET_TYPES, a5 as VerificationPurposeSchema, l as VerificationTargetType, a6 as VerifyCodeParams, a7 as VerifyCodeResult, m as authRouter, a8 as authenticate, a9 as buildOAuthErrorUrl, aa as changePasswordService, ab as completeSignupService, ac as confirmSignupLinkService, ad as getEnabledOAuthProviders, ae as getGoogleAccessToken, af as getOAuthProvider, ag as getRegisteredProviders, ah as isOAuthProviderEnabled, ai as isSafeReturnPath, aj as issueOneTimeTokenService, ak as listKeysService, al as loginService, am as logoutService, an as oauthCallbackService, ao as oauthNativeService, ap as oauthStartService, aq as oauthUnlinkNotifyService, ar as optionalAuth, as as registerAuthProfile, at as registerOAuthProvider, au as registerPublicKeyService, av as registerService, aw as requestSignupLinkService, ax as requireEnabledProvider, ay as resolveAuthenticatedUser, az as revokeAllKeysService, aA as revokeKeyService, aB as rotateKeyService, aC as runAuthProfile, aD as selectAuthProfile, aE as sendVerificationCodeService, aF as verifyCodeService, aG as verifyOneTimeTokenService } from './authenticate-Mg9D7Nys.js';
|
|
3
3
|
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
4
4
|
import { K as KeyAlgorithmType, d as InvitationStatus, j as SocialProvider, c as AccountDeletionRequestedBy, i as PurgeStrategy } from './types-DYyhze28.js';
|
|
5
5
|
export { A as ACCOUNT_DELETION_REQUESTED_BY, a as ACCOUNT_DELETION_REQUEST_STATUSES, b as AccountDeletionRequestStatus, I as INVITATION_STATUSES, e as KEY_ALGORITHM, f as KEY_DEVICE_NAME_MAX_LENGTH, g as KEY_PLATFORM, h as KeyPlatformType, P as PURGE_STRATEGIES, S as SOCIAL_PROVIDERS, U as USER_STATUSES, k as UserStatus } from './types-DYyhze28.js';
|
|
@@ -1355,7 +1355,7 @@ declare function getAuthSessionService(userId: string | number | bigint): Promis
|
|
|
1355
1355
|
id: number;
|
|
1356
1356
|
name: string;
|
|
1357
1357
|
displayName: string;
|
|
1358
|
-
category: "
|
|
1358
|
+
category: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
|
|
1359
1359
|
}[];
|
|
1360
1360
|
userId: number;
|
|
1361
1361
|
publicId: string;
|
|
@@ -1801,7 +1801,7 @@ declare const accountDeletionRequests: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
1801
1801
|
name: string;
|
|
1802
1802
|
tableName: "account_deletion_requests";
|
|
1803
1803
|
dataType: "string enum";
|
|
1804
|
-
data: "
|
|
1804
|
+
data: "self" | "admin";
|
|
1805
1805
|
driverParam: string;
|
|
1806
1806
|
notNull: true;
|
|
1807
1807
|
hasDefault: true;
|
|
@@ -3093,6 +3093,209 @@ declare const verificationCodes: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
3093
3093
|
type VerificationCode = typeof verificationCodes.$inferSelect;
|
|
3094
3094
|
type NewVerificationCode = typeof verificationCodes.$inferInsert;
|
|
3095
3095
|
|
|
3096
|
+
/**
|
|
3097
|
+
* @spfn/auth - Signup Link Tokens Entity
|
|
3098
|
+
*
|
|
3099
|
+
* Backs the verified-email signup flow: a one-time confirmation link is emailed,
|
|
3100
|
+
* opening it mints a short-lived setup session, and setting a password on that
|
|
3101
|
+
* session creates the account.
|
|
3102
|
+
*
|
|
3103
|
+
* A separate table from `verification_codes` on purpose. That table stores its
|
|
3104
|
+
* six-digit code in plaintext, which is acceptable for a short-lived numeric code
|
|
3105
|
+
* bounded by an attempt counter, but a link token is a bearer credential sitting
|
|
3106
|
+
* in someone's mailbox and must only ever be stored as a hash. Sharing one table
|
|
3107
|
+
* would make "plaintext or hash" a per-row property that nothing enforces.
|
|
3108
|
+
*/
|
|
3109
|
+
declare const signupLinkTokens: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
3110
|
+
name: "signup_link_tokens";
|
|
3111
|
+
schema: string;
|
|
3112
|
+
columns: {
|
|
3113
|
+
createdAt: drizzle_orm_pg_core.PgBuildColumn<"signup_link_tokens", drizzle_orm_pg_core.SetNotNull<drizzle_orm_pg_core.SetHasDefault<drizzle_orm_pg_core.PgTimestampBuilder>>, {
|
|
3114
|
+
name: string;
|
|
3115
|
+
tableName: "signup_link_tokens";
|
|
3116
|
+
dataType: "object date";
|
|
3117
|
+
data: Date;
|
|
3118
|
+
driverParam: string;
|
|
3119
|
+
notNull: true;
|
|
3120
|
+
hasDefault: true;
|
|
3121
|
+
isPrimaryKey: false;
|
|
3122
|
+
isAutoincrement: false;
|
|
3123
|
+
hasRuntimeDefault: false;
|
|
3124
|
+
enumValues: undefined;
|
|
3125
|
+
identity: undefined;
|
|
3126
|
+
generated: undefined;
|
|
3127
|
+
}>;
|
|
3128
|
+
updatedAt: drizzle_orm_pg_core.PgBuildColumn<"signup_link_tokens", drizzle_orm_pg_core.SetHasDefault<drizzle_orm_pg_core.SetNotNull<drizzle_orm_pg_core.SetHasDefault<drizzle_orm_pg_core.PgTimestampBuilder>>>, {
|
|
3129
|
+
name: string;
|
|
3130
|
+
tableName: "signup_link_tokens";
|
|
3131
|
+
dataType: "object date";
|
|
3132
|
+
data: Date;
|
|
3133
|
+
driverParam: string;
|
|
3134
|
+
notNull: true;
|
|
3135
|
+
hasDefault: true;
|
|
3136
|
+
isPrimaryKey: false;
|
|
3137
|
+
isAutoincrement: false;
|
|
3138
|
+
hasRuntimeDefault: false;
|
|
3139
|
+
enumValues: undefined;
|
|
3140
|
+
identity: undefined;
|
|
3141
|
+
generated: undefined;
|
|
3142
|
+
}>;
|
|
3143
|
+
id: drizzle_orm_pg_core.PgBuildColumn<"signup_link_tokens", drizzle_orm_pg_core.SetIsPrimaryKey<drizzle_orm_pg_core.PgBigSerial53Builder>, {
|
|
3144
|
+
name: string;
|
|
3145
|
+
tableName: "signup_link_tokens";
|
|
3146
|
+
dataType: "number int53";
|
|
3147
|
+
data: number;
|
|
3148
|
+
driverParam: number;
|
|
3149
|
+
notNull: true;
|
|
3150
|
+
hasDefault: true;
|
|
3151
|
+
isPrimaryKey: false;
|
|
3152
|
+
isAutoincrement: false;
|
|
3153
|
+
hasRuntimeDefault: false;
|
|
3154
|
+
enumValues: undefined;
|
|
3155
|
+
identity: undefined;
|
|
3156
|
+
generated: undefined;
|
|
3157
|
+
}>;
|
|
3158
|
+
email: drizzle_orm_pg_core.PgBuildColumn<"signup_link_tokens", drizzle_orm_pg_core.SetNotNull<drizzle_orm_pg_core.PgTextBuilder<[string, ...string[]]>>, {
|
|
3159
|
+
name: string;
|
|
3160
|
+
tableName: "signup_link_tokens";
|
|
3161
|
+
dataType: "string";
|
|
3162
|
+
data: string;
|
|
3163
|
+
driverParam: string;
|
|
3164
|
+
notNull: true;
|
|
3165
|
+
hasDefault: false;
|
|
3166
|
+
isPrimaryKey: false;
|
|
3167
|
+
isAutoincrement: false;
|
|
3168
|
+
hasRuntimeDefault: false;
|
|
3169
|
+
enumValues: undefined;
|
|
3170
|
+
identity: undefined;
|
|
3171
|
+
generated: undefined;
|
|
3172
|
+
}>;
|
|
3173
|
+
tokenHash: drizzle_orm_pg_core.PgBuildColumn<"signup_link_tokens", drizzle_orm_pg_core.SetNotNull<drizzle_orm_pg_core.PgTextBuilder<[string, ...string[]]>>, {
|
|
3174
|
+
name: string;
|
|
3175
|
+
tableName: "signup_link_tokens";
|
|
3176
|
+
dataType: "string";
|
|
3177
|
+
data: string;
|
|
3178
|
+
driverParam: string;
|
|
3179
|
+
notNull: true;
|
|
3180
|
+
hasDefault: false;
|
|
3181
|
+
isPrimaryKey: false;
|
|
3182
|
+
isAutoincrement: false;
|
|
3183
|
+
hasRuntimeDefault: false;
|
|
3184
|
+
enumValues: undefined;
|
|
3185
|
+
identity: undefined;
|
|
3186
|
+
generated: undefined;
|
|
3187
|
+
}>;
|
|
3188
|
+
returnPath: drizzle_orm_pg_core.PgBuildColumn<"signup_link_tokens", drizzle_orm_pg_core.PgTextBuilder<[string, ...string[]]>, {
|
|
3189
|
+
name: string;
|
|
3190
|
+
tableName: "signup_link_tokens";
|
|
3191
|
+
dataType: "string";
|
|
3192
|
+
data: string;
|
|
3193
|
+
driverParam: string;
|
|
3194
|
+
notNull: false;
|
|
3195
|
+
hasDefault: false;
|
|
3196
|
+
isPrimaryKey: false;
|
|
3197
|
+
isAutoincrement: false;
|
|
3198
|
+
hasRuntimeDefault: false;
|
|
3199
|
+
enumValues: undefined;
|
|
3200
|
+
identity: undefined;
|
|
3201
|
+
generated: undefined;
|
|
3202
|
+
}>;
|
|
3203
|
+
expiresAt: drizzle_orm_pg_core.PgBuildColumn<"signup_link_tokens", drizzle_orm_pg_core.SetNotNull<drizzle_orm_pg_core.PgTimestampBuilder>, {
|
|
3204
|
+
name: string;
|
|
3205
|
+
tableName: "signup_link_tokens";
|
|
3206
|
+
dataType: "object date";
|
|
3207
|
+
data: Date;
|
|
3208
|
+
driverParam: string;
|
|
3209
|
+
notNull: true;
|
|
3210
|
+
hasDefault: false;
|
|
3211
|
+
isPrimaryKey: false;
|
|
3212
|
+
isAutoincrement: false;
|
|
3213
|
+
hasRuntimeDefault: false;
|
|
3214
|
+
enumValues: undefined;
|
|
3215
|
+
identity: undefined;
|
|
3216
|
+
generated: undefined;
|
|
3217
|
+
}>;
|
|
3218
|
+
consumedAt: drizzle_orm_pg_core.PgBuildColumn<"signup_link_tokens", drizzle_orm_pg_core.PgTimestampBuilder, {
|
|
3219
|
+
name: string;
|
|
3220
|
+
tableName: "signup_link_tokens";
|
|
3221
|
+
dataType: "object date";
|
|
3222
|
+
data: Date;
|
|
3223
|
+
driverParam: string;
|
|
3224
|
+
notNull: false;
|
|
3225
|
+
hasDefault: false;
|
|
3226
|
+
isPrimaryKey: false;
|
|
3227
|
+
isAutoincrement: false;
|
|
3228
|
+
hasRuntimeDefault: false;
|
|
3229
|
+
enumValues: undefined;
|
|
3230
|
+
identity: undefined;
|
|
3231
|
+
generated: undefined;
|
|
3232
|
+
}>;
|
|
3233
|
+
supersededAt: drizzle_orm_pg_core.PgBuildColumn<"signup_link_tokens", drizzle_orm_pg_core.PgTimestampBuilder, {
|
|
3234
|
+
name: string;
|
|
3235
|
+
tableName: "signup_link_tokens";
|
|
3236
|
+
dataType: "object date";
|
|
3237
|
+
data: Date;
|
|
3238
|
+
driverParam: string;
|
|
3239
|
+
notNull: false;
|
|
3240
|
+
hasDefault: false;
|
|
3241
|
+
isPrimaryKey: false;
|
|
3242
|
+
isAutoincrement: false;
|
|
3243
|
+
hasRuntimeDefault: false;
|
|
3244
|
+
enumValues: undefined;
|
|
3245
|
+
identity: undefined;
|
|
3246
|
+
generated: undefined;
|
|
3247
|
+
}>;
|
|
3248
|
+
setupSecretHash: drizzle_orm_pg_core.PgBuildColumn<"signup_link_tokens", drizzle_orm_pg_core.PgTextBuilder<[string, ...string[]]>, {
|
|
3249
|
+
name: string;
|
|
3250
|
+
tableName: "signup_link_tokens";
|
|
3251
|
+
dataType: "string";
|
|
3252
|
+
data: string;
|
|
3253
|
+
driverParam: string;
|
|
3254
|
+
notNull: false;
|
|
3255
|
+
hasDefault: false;
|
|
3256
|
+
isPrimaryKey: false;
|
|
3257
|
+
isAutoincrement: false;
|
|
3258
|
+
hasRuntimeDefault: false;
|
|
3259
|
+
enumValues: undefined;
|
|
3260
|
+
identity: undefined;
|
|
3261
|
+
generated: undefined;
|
|
3262
|
+
}>;
|
|
3263
|
+
setupExpiresAt: drizzle_orm_pg_core.PgBuildColumn<"signup_link_tokens", drizzle_orm_pg_core.PgTimestampBuilder, {
|
|
3264
|
+
name: string;
|
|
3265
|
+
tableName: "signup_link_tokens";
|
|
3266
|
+
dataType: "object date";
|
|
3267
|
+
data: Date;
|
|
3268
|
+
driverParam: string;
|
|
3269
|
+
notNull: false;
|
|
3270
|
+
hasDefault: false;
|
|
3271
|
+
isPrimaryKey: false;
|
|
3272
|
+
isAutoincrement: false;
|
|
3273
|
+
hasRuntimeDefault: false;
|
|
3274
|
+
enumValues: undefined;
|
|
3275
|
+
identity: undefined;
|
|
3276
|
+
generated: undefined;
|
|
3277
|
+
}>;
|
|
3278
|
+
completedAt: drizzle_orm_pg_core.PgBuildColumn<"signup_link_tokens", drizzle_orm_pg_core.PgTimestampBuilder, {
|
|
3279
|
+
name: string;
|
|
3280
|
+
tableName: "signup_link_tokens";
|
|
3281
|
+
dataType: "object date";
|
|
3282
|
+
data: Date;
|
|
3283
|
+
driverParam: string;
|
|
3284
|
+
notNull: false;
|
|
3285
|
+
hasDefault: false;
|
|
3286
|
+
isPrimaryKey: false;
|
|
3287
|
+
isAutoincrement: false;
|
|
3288
|
+
hasRuntimeDefault: false;
|
|
3289
|
+
enumValues: undefined;
|
|
3290
|
+
identity: undefined;
|
|
3291
|
+
generated: undefined;
|
|
3292
|
+
}>;
|
|
3293
|
+
};
|
|
3294
|
+
dialect: "pg";
|
|
3295
|
+
}>;
|
|
3296
|
+
type SignupLinkToken = typeof signupLinkTokens.$inferSelect;
|
|
3297
|
+
type NewSignupLinkToken = typeof signupLinkTokens.$inferInsert;
|
|
3298
|
+
|
|
3096
3299
|
/**
|
|
3097
3300
|
* @spfn/auth - Permissions Entity
|
|
3098
3301
|
*
|
|
@@ -3202,7 +3405,7 @@ declare const permissions: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
3202
3405
|
name: string;
|
|
3203
3406
|
tableName: "permissions";
|
|
3204
3407
|
dataType: "string enum";
|
|
3205
|
-
data: "
|
|
3408
|
+
data: "custom" | "user" | "auth" | "rbac" | "system";
|
|
3206
3409
|
driverParam: string;
|
|
3207
3410
|
notNull: false;
|
|
3208
3411
|
hasDefault: false;
|
|
@@ -3823,15 +4026,15 @@ declare class UsersRepository extends BaseRepository {
|
|
|
3823
4026
|
create(data: NewUser): Promise<{
|
|
3824
4027
|
email: string | null;
|
|
3825
4028
|
phone: string | null;
|
|
4029
|
+
status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
|
|
4030
|
+
username: string | null;
|
|
3826
4031
|
id: number;
|
|
4032
|
+
createdAt: Date;
|
|
4033
|
+
updatedAt: Date;
|
|
3827
4034
|
publicId: string;
|
|
3828
|
-
username: string | null;
|
|
3829
4035
|
passwordHash: string | null;
|
|
3830
4036
|
passwordChangeRequired: boolean;
|
|
3831
4037
|
roleId: number;
|
|
3832
|
-
createdAt: Date;
|
|
3833
|
-
updatedAt: Date;
|
|
3834
|
-
status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
|
|
3835
4038
|
emailVerifiedAt: Date | null;
|
|
3836
4039
|
phoneVerifiedAt: Date | null;
|
|
3837
4040
|
lastLoginAt: Date | null;
|
|
@@ -3983,15 +4186,15 @@ declare class UsersRepository extends BaseRepository {
|
|
|
3983
4186
|
deleteById(id: number): Promise<{
|
|
3984
4187
|
email: string | null;
|
|
3985
4188
|
phone: string | null;
|
|
4189
|
+
status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
|
|
4190
|
+
username: string | null;
|
|
3986
4191
|
id: number;
|
|
4192
|
+
createdAt: Date;
|
|
4193
|
+
updatedAt: Date;
|
|
3987
4194
|
publicId: string;
|
|
3988
|
-
username: string | null;
|
|
3989
4195
|
passwordHash: string | null;
|
|
3990
4196
|
passwordChangeRequired: boolean;
|
|
3991
4197
|
roleId: number;
|
|
3992
|
-
createdAt: Date;
|
|
3993
|
-
updatedAt: Date;
|
|
3994
|
-
status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
|
|
3995
4198
|
emailVerifiedAt: Date | null;
|
|
3996
4199
|
phoneVerifiedAt: Date | null;
|
|
3997
4200
|
lastLoginAt: Date | null;
|
|
@@ -4016,7 +4219,7 @@ declare class UsersRepository extends BaseRepository {
|
|
|
4016
4219
|
id: number;
|
|
4017
4220
|
name: string;
|
|
4018
4221
|
displayName: string;
|
|
4019
|
-
category: "
|
|
4222
|
+
category: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
|
|
4020
4223
|
}[];
|
|
4021
4224
|
}>;
|
|
4022
4225
|
/**
|
|
@@ -4171,23 +4374,23 @@ declare class KeysRepository extends BaseRepository {
|
|
|
4171
4374
|
* Write primary 사용
|
|
4172
4375
|
*/
|
|
4173
4376
|
create(data: NewUserPublicKey): Promise<{
|
|
4174
|
-
publicKey: string;
|
|
4175
|
-
keyId: string;
|
|
4176
|
-
fingerprint: string;
|
|
4177
|
-
algorithm: "ES256" | "RS256";
|
|
4178
|
-
deviceName: string | null;
|
|
4179
|
-
platform: "ios" | "android" | "web" | "desktop" | null;
|
|
4180
4377
|
userId: number;
|
|
4378
|
+
keyId: string;
|
|
4181
4379
|
id: number;
|
|
4182
4380
|
isActive: boolean;
|
|
4183
4381
|
createdAt: Date;
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4382
|
+
publicKey: string;
|
|
4383
|
+
algorithm: "ES256" | "RS256";
|
|
4384
|
+
fingerprint: string;
|
|
4385
|
+
deviceName: string | null;
|
|
4386
|
+
platform: "ios" | "android" | "web" | "desktop" | null;
|
|
4187
4387
|
clientKind: "ios" | "android" | "web" | null;
|
|
4188
4388
|
clientVersion: string | null;
|
|
4189
4389
|
clientContractVersion: string | null;
|
|
4190
4390
|
clientSeenAt: Date | null;
|
|
4391
|
+
lastUsedAt: Date | null;
|
|
4392
|
+
expiresAt: Date | null;
|
|
4393
|
+
revokedAt: Date | null;
|
|
4191
4394
|
revokedReason: string | null;
|
|
4192
4395
|
}>;
|
|
4193
4396
|
/**
|
|
@@ -4273,23 +4476,23 @@ declare class KeysRepository extends BaseRepository {
|
|
|
4273
4476
|
* Write primary 사용
|
|
4274
4477
|
*/
|
|
4275
4478
|
deleteByKeyIdAndUserId(keyId: string, userId: number): Promise<{
|
|
4276
|
-
publicKey: string;
|
|
4277
|
-
keyId: string;
|
|
4278
|
-
fingerprint: string;
|
|
4279
|
-
algorithm: "ES256" | "RS256";
|
|
4280
|
-
deviceName: string | null;
|
|
4281
|
-
platform: "ios" | "android" | "web" | "desktop" | null;
|
|
4282
4479
|
userId: number;
|
|
4480
|
+
keyId: string;
|
|
4283
4481
|
id: number;
|
|
4284
4482
|
isActive: boolean;
|
|
4285
4483
|
createdAt: Date;
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4484
|
+
publicKey: string;
|
|
4485
|
+
algorithm: "ES256" | "RS256";
|
|
4486
|
+
fingerprint: string;
|
|
4487
|
+
deviceName: string | null;
|
|
4488
|
+
platform: "ios" | "android" | "web" | "desktop" | null;
|
|
4289
4489
|
clientKind: "ios" | "android" | "web" | null;
|
|
4290
4490
|
clientVersion: string | null;
|
|
4291
4491
|
clientContractVersion: string | null;
|
|
4292
4492
|
clientSeenAt: Date | null;
|
|
4493
|
+
lastUsedAt: Date | null;
|
|
4494
|
+
expiresAt: Date | null;
|
|
4495
|
+
revokedAt: Date | null;
|
|
4293
4496
|
revokedReason: string | null;
|
|
4294
4497
|
}>;
|
|
4295
4498
|
/**
|
|
@@ -4477,14 +4680,14 @@ declare class VerificationCodesRepository extends BaseRepository {
|
|
|
4477
4680
|
* Write primary 사용
|
|
4478
4681
|
*/
|
|
4479
4682
|
create(data: NewVerificationCode): Promise<{
|
|
4480
|
-
target: string;
|
|
4481
|
-
targetType: "email" | "phone";
|
|
4482
|
-
purpose: "registration" | "login" | "password_reset" | "email_change" | "phone_change" | "account_deletion";
|
|
4483
|
-
code: string;
|
|
4484
4683
|
id: number;
|
|
4485
4684
|
createdAt: Date;
|
|
4486
4685
|
updatedAt: Date;
|
|
4487
4686
|
expiresAt: Date;
|
|
4687
|
+
target: string;
|
|
4688
|
+
targetType: "email" | "phone";
|
|
4689
|
+
code: string;
|
|
4690
|
+
purpose: "registration" | "login" | "password_reset" | "email_change" | "phone_change" | "account_deletion";
|
|
4488
4691
|
usedAt: Date | null;
|
|
4489
4692
|
attempts: number;
|
|
4490
4693
|
}>;
|
|
@@ -4541,6 +4744,75 @@ declare class VerificationCodesRepository extends BaseRepository {
|
|
|
4541
4744
|
}
|
|
4542
4745
|
declare const verificationCodesRepository: VerificationCodesRepository;
|
|
4543
4746
|
|
|
4747
|
+
/**
|
|
4748
|
+
* Signup Link Tokens Repository
|
|
4749
|
+
*
|
|
4750
|
+
* Data access for the verified-email signup flow. Extends BaseRepository for
|
|
4751
|
+
* transaction-context detection and read/write splitting.
|
|
4752
|
+
*
|
|
4753
|
+
* The two claim methods (`claimLink`, `claimSetupSession`) update conditionally
|
|
4754
|
+
* and return the row only if THIS call was the one that moved it. Two concurrent
|
|
4755
|
+
* confirms — or two concurrent password submits — therefore produce one winner
|
|
4756
|
+
* and one refusal, rather than both proceeding on a row they each read as
|
|
4757
|
+
* unclaimed. Read-then-write would lose that race.
|
|
4758
|
+
*/
|
|
4759
|
+
|
|
4760
|
+
declare class SignupLinkTokensRepository extends BaseRepository {
|
|
4761
|
+
/**
|
|
4762
|
+
* Create a signup link row.
|
|
4763
|
+
* Write primary.
|
|
4764
|
+
*/
|
|
4765
|
+
create(data: NewSignupLinkToken): Promise<SignupLinkToken>;
|
|
4766
|
+
/**
|
|
4767
|
+
* Find a row by the hash of an emailed token, in any state.
|
|
4768
|
+
*
|
|
4769
|
+
* Deliberately unfiltered: the caller decides why a link is refused, and a
|
|
4770
|
+
* row filtered out here would be indistinguishable from an unknown token in
|
|
4771
|
+
* the logs.
|
|
4772
|
+
*
|
|
4773
|
+
* Read replica.
|
|
4774
|
+
*/
|
|
4775
|
+
findByTokenHash(tokenHash: string): Promise<SignupLinkToken | null>;
|
|
4776
|
+
/**
|
|
4777
|
+
* Find a row by the hash of a setup session secret, in any state.
|
|
4778
|
+
* Read replica.
|
|
4779
|
+
*/
|
|
4780
|
+
findBySetupSecretHash(setupSecretHash: string): Promise<SignupLinkToken | null>;
|
|
4781
|
+
/**
|
|
4782
|
+
* Consume a link and open a setup session on it, but only if it is still
|
|
4783
|
+
* unconsumed and not superseded.
|
|
4784
|
+
*
|
|
4785
|
+
* @returns the updated row, or null if another request claimed it first
|
|
4786
|
+
*/
|
|
4787
|
+
claimLink(id: number, setupSecretHash: string, setupExpiresAt: Date): Promise<SignupLinkToken | null>;
|
|
4788
|
+
/**
|
|
4789
|
+
* Mark a setup session as completed, but only if it has not completed
|
|
4790
|
+
* already.
|
|
4791
|
+
*
|
|
4792
|
+
* @returns the updated row, or null if another request completed it first
|
|
4793
|
+
*/
|
|
4794
|
+
claimSetupSession(id: number): Promise<SignupLinkToken | null>;
|
|
4795
|
+
/**
|
|
4796
|
+
* Supersede every live link for an address, so requesting a new one
|
|
4797
|
+
* invalidates the previous one and any setup session opened from it.
|
|
4798
|
+
*
|
|
4799
|
+
* Write primary.
|
|
4800
|
+
*
|
|
4801
|
+
* @returns number of rows superseded
|
|
4802
|
+
*/
|
|
4803
|
+
supersedeLiveForEmail(email: string): Promise<number>;
|
|
4804
|
+
/**
|
|
4805
|
+
* Delete every signup link row for an address (account destruction).
|
|
4806
|
+
*
|
|
4807
|
+
* Rows key on the email text and carry no user FK, so destruction has to
|
|
4808
|
+
* clean them up by address the way verification codes are cleaned up.
|
|
4809
|
+
*
|
|
4810
|
+
* Write primary.
|
|
4811
|
+
*/
|
|
4812
|
+
deleteByEmail(email: string): Promise<number>;
|
|
4813
|
+
}
|
|
4814
|
+
declare const signupLinkTokensRepository: SignupLinkTokensRepository;
|
|
4815
|
+
|
|
4544
4816
|
/**
|
|
4545
4817
|
* Roles Repository
|
|
4546
4818
|
*
|
|
@@ -4617,8 +4889,8 @@ declare class RolesRepository extends BaseRepository {
|
|
|
4617
4889
|
*/
|
|
4618
4890
|
create(data: NewRoleEntity): Promise<{
|
|
4619
4891
|
description: string | null;
|
|
4620
|
-
name: string;
|
|
4621
4892
|
id: number;
|
|
4893
|
+
name: string;
|
|
4622
4894
|
displayName: string;
|
|
4623
4895
|
isBuiltin: boolean;
|
|
4624
4896
|
isSystem: boolean;
|
|
@@ -4647,8 +4919,8 @@ declare class RolesRepository extends BaseRepository {
|
|
|
4647
4919
|
*/
|
|
4648
4920
|
deleteById(id: number): Promise<{
|
|
4649
4921
|
description: string | null;
|
|
4650
|
-
name: string;
|
|
4651
4922
|
id: number;
|
|
4923
|
+
name: string;
|
|
4652
4924
|
displayName: string;
|
|
4653
4925
|
isBuiltin: boolean;
|
|
4654
4926
|
isSystem: boolean;
|
|
@@ -4681,7 +4953,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
4681
4953
|
name: string;
|
|
4682
4954
|
displayName: string;
|
|
4683
4955
|
description: string | null;
|
|
4684
|
-
category: "
|
|
4956
|
+
category: "custom" | "user" | "auth" | "rbac" | "system" | null;
|
|
4685
4957
|
isBuiltin: boolean;
|
|
4686
4958
|
isSystem: boolean;
|
|
4687
4959
|
isActive: boolean;
|
|
@@ -4697,7 +4969,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
4697
4969
|
name: string;
|
|
4698
4970
|
displayName: string;
|
|
4699
4971
|
description: string | null;
|
|
4700
|
-
category: "
|
|
4972
|
+
category: "custom" | "user" | "auth" | "rbac" | "system" | null;
|
|
4701
4973
|
isBuiltin: boolean;
|
|
4702
4974
|
isSystem: boolean;
|
|
4703
4975
|
isActive: boolean;
|
|
@@ -4737,7 +5009,7 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
4737
5009
|
name: string;
|
|
4738
5010
|
displayName: string;
|
|
4739
5011
|
description: string | null;
|
|
4740
|
-
category: "
|
|
5012
|
+
category: "custom" | "user" | "auth" | "rbac" | "system" | null;
|
|
4741
5013
|
isBuiltin: boolean;
|
|
4742
5014
|
isSystem: boolean;
|
|
4743
5015
|
isActive: boolean;
|
|
@@ -4748,16 +5020,16 @@ declare class PermissionsRepository extends BaseRepository {
|
|
|
4748
5020
|
*/
|
|
4749
5021
|
deleteById(id: number): Promise<{
|
|
4750
5022
|
description: string | null;
|
|
4751
|
-
metadata: Record<string, any> | null;
|
|
4752
|
-
name: string;
|
|
4753
5023
|
id: number;
|
|
5024
|
+
name: string;
|
|
4754
5025
|
displayName: string;
|
|
4755
5026
|
isBuiltin: boolean;
|
|
4756
5027
|
isSystem: boolean;
|
|
4757
5028
|
isActive: boolean;
|
|
4758
5029
|
createdAt: Date;
|
|
4759
5030
|
updatedAt: Date;
|
|
4760
|
-
|
|
5031
|
+
metadata: Record<string, any> | null;
|
|
5032
|
+
category: "custom" | "user" | "auth" | "rbac" | "system" | null;
|
|
4761
5033
|
}>;
|
|
4762
5034
|
}
|
|
4763
5035
|
declare const permissionsRepository: PermissionsRepository;
|
|
@@ -4802,9 +5074,9 @@ declare class RolePermissionsRepository extends BaseRepository {
|
|
|
4802
5074
|
*/
|
|
4803
5075
|
createMany(data: NewRolePermission[]): Promise<{
|
|
4804
5076
|
id: number;
|
|
4805
|
-
roleId: number;
|
|
4806
5077
|
createdAt: Date;
|
|
4807
5078
|
updatedAt: Date;
|
|
5079
|
+
roleId: number;
|
|
4808
5080
|
permissionId: number;
|
|
4809
5081
|
}[]>;
|
|
4810
5082
|
/**
|
|
@@ -4820,9 +5092,9 @@ declare class RolePermissionsRepository extends BaseRepository {
|
|
|
4820
5092
|
*/
|
|
4821
5093
|
setPermissionsForRole(roleId: number, permissionIds: number[]): Promise<{
|
|
4822
5094
|
id: number;
|
|
4823
|
-
roleId: number;
|
|
4824
5095
|
createdAt: Date;
|
|
4825
5096
|
updatedAt: Date;
|
|
5097
|
+
roleId: number;
|
|
4826
5098
|
permissionId: number;
|
|
4827
5099
|
}[]>;
|
|
4828
5100
|
}
|
|
@@ -4887,9 +5159,9 @@ declare class UserPermissionsRepository extends BaseRepository {
|
|
|
4887
5159
|
id: number;
|
|
4888
5160
|
createdAt: Date;
|
|
4889
5161
|
updatedAt: Date;
|
|
4890
|
-
permissionId: number;
|
|
4891
|
-
reason: string | null;
|
|
4892
5162
|
expiresAt: Date | null;
|
|
5163
|
+
reason: string | null;
|
|
5164
|
+
permissionId: number;
|
|
4893
5165
|
granted: boolean;
|
|
4894
5166
|
}>;
|
|
4895
5167
|
/**
|
|
@@ -4913,9 +5185,9 @@ declare class UserPermissionsRepository extends BaseRepository {
|
|
|
4913
5185
|
id: number;
|
|
4914
5186
|
createdAt: Date;
|
|
4915
5187
|
updatedAt: Date;
|
|
4916
|
-
permissionId: number;
|
|
4917
|
-
reason: string | null;
|
|
4918
5188
|
expiresAt: Date | null;
|
|
5189
|
+
reason: string | null;
|
|
5190
|
+
permissionId: number;
|
|
4919
5191
|
granted: boolean;
|
|
4920
5192
|
}>;
|
|
4921
5193
|
/**
|
|
@@ -4994,7 +5266,6 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
4994
5266
|
* 프로필 생성
|
|
4995
5267
|
*/
|
|
4996
5268
|
create(data: NewUserProfile): Promise<{
|
|
4997
|
-
metadata: Record<string, any> | null;
|
|
4998
5269
|
userId: number;
|
|
4999
5270
|
id: number;
|
|
5000
5271
|
displayName: string | null;
|
|
@@ -5012,6 +5283,7 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
5012
5283
|
location: string | null;
|
|
5013
5284
|
company: string | null;
|
|
5014
5285
|
jobTitle: string | null;
|
|
5286
|
+
metadata: Record<string, any> | null;
|
|
5015
5287
|
}>;
|
|
5016
5288
|
/**
|
|
5017
5289
|
* 프로필 업데이트 (by ID)
|
|
@@ -5063,7 +5335,6 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
5063
5335
|
* 프로필 삭제 (by ID)
|
|
5064
5336
|
*/
|
|
5065
5337
|
deleteById(id: number): Promise<{
|
|
5066
|
-
metadata: Record<string, any> | null;
|
|
5067
5338
|
userId: number;
|
|
5068
5339
|
id: number;
|
|
5069
5340
|
displayName: string | null;
|
|
@@ -5081,12 +5352,12 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
5081
5352
|
location: string | null;
|
|
5082
5353
|
company: string | null;
|
|
5083
5354
|
jobTitle: string | null;
|
|
5355
|
+
metadata: Record<string, any> | null;
|
|
5084
5356
|
}>;
|
|
5085
5357
|
/**
|
|
5086
5358
|
* 프로필 삭제 (by User ID)
|
|
5087
5359
|
*/
|
|
5088
5360
|
deleteByUserId(userId: number): Promise<{
|
|
5089
|
-
metadata: Record<string, any> | null;
|
|
5090
5361
|
userId: number;
|
|
5091
5362
|
id: number;
|
|
5092
5363
|
displayName: string | null;
|
|
@@ -5104,6 +5375,7 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
5104
5375
|
location: string | null;
|
|
5105
5376
|
company: string | null;
|
|
5106
5377
|
jobTitle: string | null;
|
|
5378
|
+
metadata: Record<string, any> | null;
|
|
5107
5379
|
}>;
|
|
5108
5380
|
/**
|
|
5109
5381
|
* 프로필 Upsert (by User ID)
|
|
@@ -5112,7 +5384,6 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
5112
5384
|
* 새로 생성 시 displayName은 필수 (없으면 'User'로 설정)
|
|
5113
5385
|
*/
|
|
5114
5386
|
upsertByUserId(userId: number, data: Partial<Omit<NewUserProfile, 'userId'>>): Promise<{
|
|
5115
|
-
metadata: Record<string, any> | null;
|
|
5116
5387
|
userId: number;
|
|
5117
5388
|
id: number;
|
|
5118
5389
|
displayName: string | null;
|
|
@@ -5130,6 +5401,7 @@ declare class UserProfilesRepository extends BaseRepository {
|
|
|
5130
5401
|
location: string | null;
|
|
5131
5402
|
company: string | null;
|
|
5132
5403
|
jobTitle: string | null;
|
|
5404
|
+
metadata: Record<string, any> | null;
|
|
5133
5405
|
}>;
|
|
5134
5406
|
/**
|
|
5135
5407
|
* User ID로 프로필 데이터 조회 (formatted)
|
|
@@ -5257,15 +5529,15 @@ declare class InvitationsRepository extends BaseRepository {
|
|
|
5257
5529
|
*/
|
|
5258
5530
|
create(data: NewInvitation): Promise<{
|
|
5259
5531
|
email: string;
|
|
5260
|
-
|
|
5532
|
+
status: "pending" | "accepted" | "expired" | "cancelled";
|
|
5261
5533
|
id: number;
|
|
5262
|
-
roleId: number;
|
|
5263
5534
|
createdAt: Date;
|
|
5264
5535
|
updatedAt: Date;
|
|
5265
|
-
|
|
5536
|
+
roleId: number;
|
|
5537
|
+
metadata: Record<string, any> | null;
|
|
5538
|
+
expiresAt: Date;
|
|
5266
5539
|
token: string;
|
|
5267
5540
|
invitedBy: number;
|
|
5268
|
-
expiresAt: Date;
|
|
5269
5541
|
acceptedAt: Date | null;
|
|
5270
5542
|
cancelledAt: Date | null;
|
|
5271
5543
|
}>;
|
|
@@ -5291,15 +5563,15 @@ declare class InvitationsRepository extends BaseRepository {
|
|
|
5291
5563
|
*/
|
|
5292
5564
|
deleteById(id: number): Promise<{
|
|
5293
5565
|
email: string;
|
|
5294
|
-
|
|
5566
|
+
status: "pending" | "accepted" | "expired" | "cancelled";
|
|
5295
5567
|
id: number;
|
|
5296
|
-
roleId: number;
|
|
5297
5568
|
createdAt: Date;
|
|
5298
5569
|
updatedAt: Date;
|
|
5299
|
-
|
|
5570
|
+
roleId: number;
|
|
5571
|
+
metadata: Record<string, any> | null;
|
|
5572
|
+
expiresAt: Date;
|
|
5300
5573
|
token: string;
|
|
5301
5574
|
invitedBy: number;
|
|
5302
|
-
expiresAt: Date;
|
|
5303
5575
|
acceptedAt: Date | null;
|
|
5304
5576
|
cancelledAt: Date | null;
|
|
5305
5577
|
}>;
|
|
@@ -5537,9 +5809,9 @@ declare class SocialAccountsRepository extends BaseRepository {
|
|
|
5537
5809
|
createdAt: Date;
|
|
5538
5810
|
updatedAt: Date;
|
|
5539
5811
|
provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself";
|
|
5540
|
-
accessToken: string | null;
|
|
5541
5812
|
providerUserId: string;
|
|
5542
5813
|
providerEmail: string | null;
|
|
5814
|
+
accessToken: string | null;
|
|
5543
5815
|
refreshToken: string | null;
|
|
5544
5816
|
tokenExpiresAt: Date | null;
|
|
5545
5817
|
}>;
|
|
@@ -5553,9 +5825,9 @@ declare class SocialAccountsRepository extends BaseRepository {
|
|
|
5553
5825
|
createdAt: Date;
|
|
5554
5826
|
updatedAt: Date;
|
|
5555
5827
|
provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself";
|
|
5556
|
-
accessToken: string | null;
|
|
5557
5828
|
providerUserId: string;
|
|
5558
5829
|
providerEmail: string | null;
|
|
5830
|
+
accessToken: string | null;
|
|
5559
5831
|
refreshToken: string | null;
|
|
5560
5832
|
tokenExpiresAt: Date | null;
|
|
5561
5833
|
}>;
|
|
@@ -5615,7 +5887,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
|
|
|
5615
5887
|
requestedAt: Date;
|
|
5616
5888
|
purgeScheduledAt: Date;
|
|
5617
5889
|
status: "pending" | "cancelled" | "completed";
|
|
5618
|
-
requestedBy: "
|
|
5890
|
+
requestedBy: "self" | "admin";
|
|
5619
5891
|
reason: string | null;
|
|
5620
5892
|
cancelledAt: Date | null;
|
|
5621
5893
|
completedAt: Date | null;
|
|
@@ -5634,7 +5906,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
|
|
|
5634
5906
|
requestedAt: Date;
|
|
5635
5907
|
purgeScheduledAt: Date;
|
|
5636
5908
|
status: "pending" | "cancelled" | "completed";
|
|
5637
|
-
requestedBy: "
|
|
5909
|
+
requestedBy: "self" | "admin";
|
|
5638
5910
|
reason: string | null;
|
|
5639
5911
|
cancelledAt: Date | null;
|
|
5640
5912
|
completedAt: Date | null;
|
|
@@ -5656,7 +5928,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
|
|
|
5656
5928
|
requestedAt: Date;
|
|
5657
5929
|
purgeScheduledAt: Date;
|
|
5658
5930
|
status: "pending" | "cancelled" | "completed";
|
|
5659
|
-
requestedBy: "
|
|
5931
|
+
requestedBy: "self" | "admin";
|
|
5660
5932
|
reason: string | null;
|
|
5661
5933
|
cancelledAt: Date | null;
|
|
5662
5934
|
completedAt: Date | null;
|
|
@@ -5675,7 +5947,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
|
|
|
5675
5947
|
requestedAt: Date;
|
|
5676
5948
|
purgeScheduledAt: Date;
|
|
5677
5949
|
status: "pending" | "cancelled" | "completed";
|
|
5678
|
-
requestedBy: "
|
|
5950
|
+
requestedBy: "self" | "admin";
|
|
5679
5951
|
reason: string | null;
|
|
5680
5952
|
cancelledAt: Date | null;
|
|
5681
5953
|
completedAt: Date | null;
|
|
@@ -5687,17 +5959,17 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
|
|
|
5687
5959
|
*/
|
|
5688
5960
|
create(data: NewAccountDeletionRequest): Promise<{
|
|
5689
5961
|
userId: number | null;
|
|
5962
|
+
status: "pending" | "cancelled" | "completed";
|
|
5963
|
+
purgeScheduledAt: Date;
|
|
5690
5964
|
id: number;
|
|
5691
5965
|
createdAt: Date;
|
|
5692
5966
|
updatedAt: Date;
|
|
5693
|
-
|
|
5694
|
-
reason: string | null;
|
|
5695
|
-
purgeScheduledAt: Date;
|
|
5967
|
+
completedAt: Date | null;
|
|
5696
5968
|
cancelledAt: Date | null;
|
|
5697
5969
|
userPublicId: string;
|
|
5698
5970
|
requestedAt: Date;
|
|
5699
|
-
requestedBy: "
|
|
5700
|
-
|
|
5971
|
+
requestedBy: "self" | "admin";
|
|
5972
|
+
reason: string | null;
|
|
5701
5973
|
purgeStrategy: "anonymize" | "hard-delete" | null;
|
|
5702
5974
|
}>;
|
|
5703
5975
|
/**
|
|
@@ -5717,7 +5989,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
|
|
|
5717
5989
|
requestedAt: Date;
|
|
5718
5990
|
purgeScheduledAt: Date;
|
|
5719
5991
|
status: "pending" | "cancelled" | "completed";
|
|
5720
|
-
requestedBy: "
|
|
5992
|
+
requestedBy: "self" | "admin";
|
|
5721
5993
|
reason: string | null;
|
|
5722
5994
|
cancelledAt: Date | null;
|
|
5723
5995
|
completedAt: Date | null;
|
|
@@ -5742,7 +6014,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
|
|
|
5742
6014
|
requestedAt: Date;
|
|
5743
6015
|
purgeScheduledAt: Date;
|
|
5744
6016
|
status: "pending" | "cancelled" | "completed";
|
|
5745
|
-
requestedBy: "
|
|
6017
|
+
requestedBy: "self" | "admin";
|
|
5746
6018
|
reason: string | null;
|
|
5747
6019
|
cancelledAt: Date | null;
|
|
5748
6020
|
completedAt: Date | null;
|
|
@@ -6280,15 +6552,15 @@ declare function getUser(c: Context | {
|
|
|
6280
6552
|
}): {
|
|
6281
6553
|
email: string | null;
|
|
6282
6554
|
phone: string | null;
|
|
6555
|
+
status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
|
|
6556
|
+
username: string | null;
|
|
6283
6557
|
id: number;
|
|
6558
|
+
createdAt: Date;
|
|
6559
|
+
updatedAt: Date;
|
|
6284
6560
|
publicId: string;
|
|
6285
|
-
username: string | null;
|
|
6286
6561
|
passwordHash: string | null;
|
|
6287
6562
|
passwordChangeRequired: boolean;
|
|
6288
6563
|
roleId: number;
|
|
6289
|
-
createdAt: Date;
|
|
6290
|
-
updatedAt: Date;
|
|
6291
|
-
status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
|
|
6292
6564
|
emailVerifiedAt: Date | null;
|
|
6293
6565
|
phoneVerifiedAt: Date | null;
|
|
6294
6566
|
lastLoginAt: Date | null;
|
|
@@ -6377,6 +6649,8 @@ declare const COOKIE_NAMES: {
|
|
|
6377
6649
|
readonly OAUTH_PENDING: string;
|
|
6378
6650
|
/** OAuth CSRF nonce — double-submit against the (encrypted) state.nonce at callback */
|
|
6379
6651
|
readonly OAUTH_CSRF: string;
|
|
6652
|
+
/** Password-setup session for verified-email signup — temporary, single-purpose */
|
|
6653
|
+
readonly SIGNUP_SETUP: string;
|
|
6380
6654
|
};
|
|
6381
6655
|
/**
|
|
6382
6656
|
* OAuth CSRF 쿠키를 PORT 접미사와 무관하게 전부 수집한다.
|
|
@@ -6919,7 +7193,7 @@ declare const authLoginEvent: _spfn_core_event.EventDef<{
|
|
|
6919
7193
|
email?: string | undefined;
|
|
6920
7194
|
phone?: string | undefined;
|
|
6921
7195
|
userId: string;
|
|
6922
|
-
provider: "
|
|
7196
|
+
provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself" | "email" | "phone";
|
|
6923
7197
|
}>;
|
|
6924
7198
|
/**
|
|
6925
7199
|
* auth.register - 회원가입 성공 이벤트
|
|
@@ -6942,7 +7216,7 @@ declare const authRegisterEvent: _spfn_core_event.EventDef<{
|
|
|
6942
7216
|
[x: string]: unknown;
|
|
6943
7217
|
} | undefined;
|
|
6944
7218
|
userId: string;
|
|
6945
|
-
provider: "
|
|
7219
|
+
provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself" | "email" | "phone";
|
|
6946
7220
|
}>;
|
|
6947
7221
|
/**
|
|
6948
7222
|
* auth.invitation.created - 초대 생성 이벤트
|
|
@@ -6970,9 +7244,9 @@ declare const invitationCreatedEvent: _spfn_core_event.EventDef<{
|
|
|
6970
7244
|
} | undefined;
|
|
6971
7245
|
email: string;
|
|
6972
7246
|
roleId: number;
|
|
7247
|
+
expiresAt: string;
|
|
6973
7248
|
token: string;
|
|
6974
7249
|
invitedBy: string;
|
|
6975
|
-
expiresAt: string;
|
|
6976
7250
|
invitationId: string;
|
|
6977
7251
|
isResend: boolean;
|
|
6978
7252
|
}>;
|
|
@@ -7016,7 +7290,7 @@ declare const authDeletionRequestedEvent: _spfn_core_event.EventDef<{
|
|
|
7016
7290
|
userId: string;
|
|
7017
7291
|
purgeScheduledAt: string;
|
|
7018
7292
|
userPublicId: string;
|
|
7019
|
-
requestedBy: "
|
|
7293
|
+
requestedBy: "self" | "admin";
|
|
7020
7294
|
}>;
|
|
7021
7295
|
/**
|
|
7022
7296
|
* auth.deletion.cancelled - 계정 탈퇴 복구 이벤트
|
|
@@ -7061,7 +7335,7 @@ declare const authDeletionCompletedEvent: _spfn_core_event.EventDef<{
|
|
|
7061
7335
|
declare const oauthUnlinkedEvent: _spfn_core_event.EventDef<{
|
|
7062
7336
|
reason?: string | undefined;
|
|
7063
7337
|
userId: string;
|
|
7064
|
-
provider: "
|
|
7338
|
+
provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself" | "email" | "phone";
|
|
7065
7339
|
providerUserId: string;
|
|
7066
7340
|
}>;
|
|
7067
7341
|
/**
|
|
@@ -7076,4 +7350,4 @@ type AuthDeletionCancelledPayload = typeof authDeletionCancelledEvent._payload;
|
|
|
7076
7350
|
type AuthDeletionCompletedPayload = typeof authDeletionCompletedEvent._payload;
|
|
7077
7351
|
type OAuthUnlinkedPayload = typeof oauthUnlinkedEvent._payload;
|
|
7078
7352
|
|
|
7079
|
-
export { type AccountDeletionPurgeUser, type AccountDeletionRequest, AccountDeletionRequestedBy, AccountDeletionRequestsRepository, type AuthConfig, AuthContext, type AuthDeletionCancelledPayload, type AuthDeletionCompletedPayload, type AuthDeletionConfig, type AuthDeletionRequestedPayload, type AuthLifecycleConfig, type AuthLifecycleOptions, type AuthLoginPayload, type AuthMetadataEntity, AuthMetadataRepository, AuthProviderSchema, type AuthRegisterPayload, type BeforeRegisterContext, COOKIE_NAMES, type CancelAccountDeletionParams, type CancelAccountDeletionResult, type CreateOAuthStateParams, DEFAULT_DELETION_ALLOW_SELF_IMMEDIATE, DEFAULT_DELETION_GRACE_PERIOD_DAYS, DEFAULT_DELETION_PURGE_CRON, DEFAULT_DELETION_PURGE_STRATEGY, DEFAULT_DELETION_SEND_NOTIFICATIONS, type DecryptedOAuthToken, type EmailNormalizationResult, EnvironmentKeyringTokenCipher, type GoogleTokenResponse, type GoogleUserInfo, type Invitation, type InvitationAcceptedPayload, type InvitationCreatedPayload, InvitationStatus, InvitationsRepository, type IssuedOpsToken, KeyAlgorithmType, KeysRepository, type NewAccountDeletionRequest, type NewAuthMetadataEntity, type NewInvitation, type NewOpsToken, type NewPermission, type NewPermissionEntity, type NewRole, type NewRoleEntity, type NewRolePermission, type NewUser, type NewUserPermission, type NewUserProfile, type NewUserPublicKey, type NewUserSocialAccount, type NewVerificationCode, OAuthProvider, type OAuthState, type OAuthTokenCipher, type OAuthTokenContext, type OAuthTokenType, type OAuthUnlinkedPayload, type OpsToken, OpsTokensRepository, type PendingDeletionInfo, type Permission, type PermissionEntity, PermissionsRepository, PurgeStrategy, type PurgeUserResult, type RegisterChannel, type RequestAccountDeletionParams, type RequestAccountDeletionResult, type Role, type RoleEntity, type RoleGuardOptions, type RolePermission, RolePermissionsRepository, RolesRepository, type SessionPayload, SocialAccountsRepository, SocialProvider, type SweepDuePurgesResult, type TokenPayload, type UpdateProfileParams, type User, type UserPermission, UserPermissionsRepository, type UserProfile, UserProfilesRepository, type UserPublicKey, type UserSocialAccount, UsersRepository, type VerificationCode, VerificationCodesRepository, VerificationPurpose, type VerifiedOpsToken, type VerifyIdTokenParams, acceptInvitation, accountDeletionRequests, accountDeletionRequestsRepository, addPermissionToRole, appleProvider, assertCanAssignRole, authDeletionCancelledEvent, authDeletionCompletedEvent, authDeletionRequestedEvent, authJobRouter, authLogger, authLoginEvent, authMetadata, authMetadataRepository, authRegisterEvent, authSchema, cancelAccountDeletionService, cancelInvitation, checkUsernameAvailableService, configureAuth, configureDeletion, configureOAuthTokenCipher, createAuthDeletionJobRouter, createAuthDeletionPurgeJob, createAuthLifecycle, createInvitation, createOAuthState, createRole, decodeToken, decryptToken, deleteInvitation, deleteRole, encryptToken, exchangeCodeForTokens, expireOldInvitations, generateOAuthNonce, generateToken, getAllRoles, getAuth, getAuthConfig, getAuthSessionService, getDeletionConfig, getDummyPasswordHash, getGoogleAuthUrl, getGoogleOAuthConfig, getGoogleUserInfo, getInvitationByToken, getInvitationWithDetails, getKeyId, getLocale, getOneTimeTokenManager, getOpsToken, getOptionalAuth, getPendingDeletionInfo, getRole, getRoleByName, getRolePermissions, getSessionTtl, getUser, getUserByEmailService, getUserByIdService, getUserByPhoneService, getUserId, getUserPermissions, getUserProfileService, getUserRole, githubProvider, googleProvider, hasAllPermissions, hasAnyPermission, hasAnyRole, hasPermission, hasRole, hashPassword, initOneTimeTokenManager, initializeAuth, invitationAcceptedEvent, invitationCreatedEvent, invitationsRepository, isEncrypted, isGoogleOAuthEnabled, issueOpsTokenService, kakaoProvider, keysRepository, listInvitations, listOpsTokensService, matchOAuthCsrfCookies, naverProvider, normalizeEmail, normalizeOptionalEmail, normalizeStoredEmails, oauthUnlinkedEvent, oneTimeTokenAuth, opsTokenAuth, opsTokens, opsTokensRepository, parseDuration, permissions, permissionsRepository, purgeUserService, refreshAccessToken, removePermissionFromRole, requestAccountDeletionService, requireAnyPermission, requireOpsScope, requirePermissions, requireRole, resendInvitation, revokeOpsTokenService, roleGuard, rolePermissions, rolePermissionsRepository, roles, rolesRepository, runBeforeRegister, setRolePermissions, socialAccountsRepository, sweepDuePurges, updateLastLoginService, updateLocaleService, updateRole, updateUserProfileService, updateUserService, updateUsernameService, userInvitations, userPermissions, userPermissionsRepository, userProfiles, userProfilesRepository, userPublicKeys, userSocialAccounts, users, usersRepository, validateInvitation, validatePasswordStrength, verificationCodes, verificationCodesRepository, verifyClientToken, verifyIdToken, verifyKeyFingerprint, verifyOAuthState, verifyOpsTokenService, verifyPassword, verifyToken };
|
|
7353
|
+
export { type AccountDeletionPurgeUser, type AccountDeletionRequest, AccountDeletionRequestedBy, AccountDeletionRequestsRepository, type AuthConfig, AuthContext, type AuthDeletionCancelledPayload, type AuthDeletionCompletedPayload, type AuthDeletionConfig, type AuthDeletionRequestedPayload, type AuthLifecycleConfig, type AuthLifecycleOptions, type AuthLoginPayload, type AuthMetadataEntity, AuthMetadataRepository, AuthProviderSchema, type AuthRegisterPayload, type BeforeRegisterContext, COOKIE_NAMES, type CancelAccountDeletionParams, type CancelAccountDeletionResult, type CreateOAuthStateParams, DEFAULT_DELETION_ALLOW_SELF_IMMEDIATE, DEFAULT_DELETION_GRACE_PERIOD_DAYS, DEFAULT_DELETION_PURGE_CRON, DEFAULT_DELETION_PURGE_STRATEGY, DEFAULT_DELETION_SEND_NOTIFICATIONS, type DecryptedOAuthToken, type EmailNormalizationResult, EnvironmentKeyringTokenCipher, type GoogleTokenResponse, type GoogleUserInfo, type Invitation, type InvitationAcceptedPayload, type InvitationCreatedPayload, InvitationStatus, InvitationsRepository, type IssuedOpsToken, KeyAlgorithmType, KeysRepository, type NewAccountDeletionRequest, type NewAuthMetadataEntity, type NewInvitation, type NewOpsToken, type NewPermission, type NewPermissionEntity, type NewRole, type NewRoleEntity, type NewRolePermission, type NewSignupLinkToken, type NewUser, type NewUserPermission, type NewUserProfile, type NewUserPublicKey, type NewUserSocialAccount, type NewVerificationCode, OAuthProvider, type OAuthState, type OAuthTokenCipher, type OAuthTokenContext, type OAuthTokenType, type OAuthUnlinkedPayload, type OpsToken, OpsTokensRepository, type PendingDeletionInfo, type Permission, type PermissionEntity, PermissionsRepository, PurgeStrategy, type PurgeUserResult, type RegisterChannel, type RequestAccountDeletionParams, type RequestAccountDeletionResult, type Role, type RoleEntity, type RoleGuardOptions, type RolePermission, RolePermissionsRepository, RolesRepository, type SessionPayload, type SignupLinkToken, SignupLinkTokensRepository, SocialAccountsRepository, SocialProvider, type SweepDuePurgesResult, type TokenPayload, type UpdateProfileParams, type User, type UserPermission, UserPermissionsRepository, type UserProfile, UserProfilesRepository, type UserPublicKey, type UserSocialAccount, UsersRepository, type VerificationCode, VerificationCodesRepository, VerificationPurpose, type VerifiedOpsToken, type VerifyIdTokenParams, acceptInvitation, accountDeletionRequests, accountDeletionRequestsRepository, addPermissionToRole, appleProvider, assertCanAssignRole, authDeletionCancelledEvent, authDeletionCompletedEvent, authDeletionRequestedEvent, authJobRouter, authLogger, authLoginEvent, authMetadata, authMetadataRepository, authRegisterEvent, authSchema, cancelAccountDeletionService, cancelInvitation, checkUsernameAvailableService, configureAuth, configureDeletion, configureOAuthTokenCipher, createAuthDeletionJobRouter, createAuthDeletionPurgeJob, createAuthLifecycle, createInvitation, createOAuthState, createRole, decodeToken, decryptToken, deleteInvitation, deleteRole, encryptToken, exchangeCodeForTokens, expireOldInvitations, generateOAuthNonce, generateToken, getAllRoles, getAuth, getAuthConfig, getAuthSessionService, getDeletionConfig, getDummyPasswordHash, getGoogleAuthUrl, getGoogleOAuthConfig, getGoogleUserInfo, getInvitationByToken, getInvitationWithDetails, getKeyId, getLocale, getOneTimeTokenManager, getOpsToken, getOptionalAuth, getPendingDeletionInfo, getRole, getRoleByName, getRolePermissions, getSessionTtl, getUser, getUserByEmailService, getUserByIdService, getUserByPhoneService, getUserId, getUserPermissions, getUserProfileService, getUserRole, githubProvider, googleProvider, hasAllPermissions, hasAnyPermission, hasAnyRole, hasPermission, hasRole, hashPassword, initOneTimeTokenManager, initializeAuth, invitationAcceptedEvent, invitationCreatedEvent, invitationsRepository, isEncrypted, isGoogleOAuthEnabled, issueOpsTokenService, kakaoProvider, keysRepository, listInvitations, listOpsTokensService, matchOAuthCsrfCookies, naverProvider, normalizeEmail, normalizeOptionalEmail, normalizeStoredEmails, oauthUnlinkedEvent, oneTimeTokenAuth, opsTokenAuth, opsTokens, opsTokensRepository, parseDuration, permissions, permissionsRepository, purgeUserService, refreshAccessToken, removePermissionFromRole, requestAccountDeletionService, requireAnyPermission, requireOpsScope, requirePermissions, requireRole, resendInvitation, revokeOpsTokenService, roleGuard, rolePermissions, rolePermissionsRepository, roles, rolesRepository, runBeforeRegister, setRolePermissions, signupLinkTokens, signupLinkTokensRepository, socialAccountsRepository, sweepDuePurges, updateLastLoginService, updateLocaleService, updateRole, updateUserProfileService, updateUserService, updateUsernameService, userInvitations, userPermissions, userPermissionsRepository, userProfiles, userProfilesRepository, userPublicKeys, userSocialAccounts, users, usersRepository, validateInvitation, validatePasswordStrength, verificationCodes, verificationCodesRepository, verifyClientToken, verifyIdToken, verifyKeyFingerprint, verifyOAuthState, verifyOpsTokenService, verifyPassword, verifyToken };
|