@spfn/auth 0.2.0-beta.88 → 0.2.0-beta.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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, S as SendVerificationCodeResult, a as RegisterResult, L as LoginResult, b as RotateKeyResult, K as KeySummary, c as RevokeAllKeysResult, I as IssueOneTimeTokenResult, O as OAuthStartResult, d as OAuthNativeResult, U as UserProfile, e as ProfileInfo, m as mainAuthRouter } from './authenticate-ZssfqJ7d.js';
3
- export { k as AuthInitOptions, A as AuthSession, i as PERMISSION_CATEGORIES, j as PermissionCategory, h as VERIFICATION_PURPOSES, g as VERIFICATION_TARGET_TYPES, f as VerificationPurpose, V as VerificationTargetType } from './authenticate-ZssfqJ7d.js';
2
+ import { R as RoleConfig, P as PermissionConfig, S as SendVerificationCodeResult, a as RegisterResult, L as LoginResult, b as RotateKeyResult, K as KeySummary, c as RevokeAllKeysResult, I as IssueOneTimeTokenResult, O as OAuthStartResult, d as OAuthNativeResult, U as UserProfile, e as ProfileInfo, m as mainAuthRouter } from './authenticate-DK-hLSOW.js';
3
+ export { k as AuthInitOptions, A as AuthSession, i as PERMISSION_CATEGORIES, j as PermissionCategory, h as VERIFICATION_PURPOSES, g as VERIFICATION_TARGET_TYPES, f as VerificationPurpose, V as VerificationTargetType } from './authenticate-DK-hLSOW.js';
4
4
  import * as _spfn_core_route from '@spfn/core/route';
5
5
  import { HttpMethod } from '@spfn/core/route';
6
6
  export { b as ACCOUNT_DELETION_REQUESTED_BY, A as ACCOUNT_DELETION_REQUEST_STATUSES, i as AccountDeletionRequestStatus, j as AccountDeletionRequestedBy, I as INVITATION_STATUSES, f as InvitationStatus, a as KEY_ALGORITHM, e as KEY_DEVICE_NAME_MAX_LENGTH, c as KEY_PLATFORM, K as KeyAlgorithmType, d as KeyPlatformType, P as PURGE_STRATEGIES, k as PurgeStrategy, S as SOCIAL_PROVIDERS, h as SocialProvider, U as USER_STATUSES, g as UserStatus } from './types-CD95yudz.js';
@@ -190,7 +190,7 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
190
190
  id: number;
191
191
  name: string;
192
192
  displayName: string;
193
- category: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
193
+ category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
194
194
  }[];
195
195
  userId: number;
196
196
  publicId: string;
@@ -490,8 +490,8 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
490
490
  }, {}, {
491
491
  roles: {
492
492
  description: string | null;
493
- id: number;
494
493
  name: string;
494
+ id: number;
495
495
  displayName: string;
496
496
  isBuiltin: boolean;
497
497
  isSystem: boolean;
@@ -512,8 +512,8 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
512
512
  }, {}, {
513
513
  role: {
514
514
  description: string | null;
515
- id: number;
516
515
  name: string;
516
+ id: number;
517
517
  displayName: string;
518
518
  isBuiltin: boolean;
519
519
  isSystem: boolean;
@@ -536,8 +536,8 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
536
536
  }, {}, {
537
537
  role: {
538
538
  description: string | null;
539
- id: number;
540
539
  name: string;
540
+ id: number;
541
541
  displayName: string;
542
542
  isBuiltin: boolean;
543
543
  isSystem: boolean;
package/dist/server.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { k as AuthInitOptions, l as OAuthProvider, f as VerificationPurpose, j as PermissionCategory, n as AuthContext } from './authenticate-ZssfqJ7d.js';
2
- export { ab as AuthProfileVerifier, C as ChangePasswordParams, ag as DeviceNameSchema, ae as EmailSchema, I as IssueOneTimeTokenResult, H as KEY_FINGERPRINT_PREFIX_LENGTH, K as KeySummary, t as LoginParams, L as LoginResult, u as LogoutParams, an as NativeVerifyOptions, al as NormalizedIdentity, a4 as OAuthCallbackParams, a5 as OAuthCallbackResult, ao as OAuthCodeExchangeOptions, a8 as OAuthNativeParams, d as OAuthNativeResult, a3 as OAuthStartParams, O as OAuthStartResult, am as OAuthTokens, ai as PasswordSchema, af as PhoneSchema, ah as PlatformSchema, s as RegisterParams, J as RegisterPublicKeyParams, a as RegisterResult, Q as RevokeAllKeysParams, c as RevokeAllKeysResult, N as RevokeKeyParams, M as RotateKeyParams, b as RotateKeyResult, x as SendVerificationCodeParams, S as SendVerificationCodeResult, aj as TargetTypeSchema, aq as UnlinkNotification, ar as UnlinkNotifyRejection, ap as UnlinkNotifyRequest, a6 as UnlinkNotifyResult, h as VERIFICATION_PURPOSES, g as VERIFICATION_TARGET_TYPES, ak as VerificationPurposeSchema, V as VerificationTargetType, y as VerifyCodeParams, z as VerifyCodeResult, m as authRouter, ac as authenticate, Z as buildOAuthErrorUrl, q as changePasswordService, a0 as getEnabledOAuthProviders, a1 as getGoogleAccessToken, at as getOAuthProvider, au as getRegisteredProviders, _ as isOAuthProviderEnabled, T as issueOneTimeTokenService, F as listKeysService, o as loginService, p as logoutService, Y as oauthCallbackService, a7 as oauthNativeService, X as oauthStartService, a2 as oauthUnlinkNotifyService, ad as optionalAuth, as as registerOAuthProvider, B as registerPublicKeyService, r as registerService, $ as requireEnabledProvider, aa as resolveAuthenticatedUser, G as revokeAllKeysService, E as revokeKeyService, D as rotateKeyService, a9 as selectAuthProfile, v as sendVerificationCodeService, w as verifyCodeService, W as verifyOneTimeTokenService } from './authenticate-ZssfqJ7d.js';
1
+ import { k as AuthInitOptions, l as OAuthProvider, f as VerificationPurpose, j as PermissionCategory, n as AuthContext } from './authenticate-DK-hLSOW.js';
2
+ export { ab as AuthProfileVerifier, C as ChangePasswordParams, ag as DeviceNameSchema, ae as EmailSchema, I as IssueOneTimeTokenResult, H as KEY_FINGERPRINT_PREFIX_LENGTH, K as KeySummary, t as LoginParams, L as LoginResult, u as LogoutParams, an as NativeVerifyOptions, al as NormalizedIdentity, a4 as OAuthCallbackParams, a5 as OAuthCallbackResult, ao as OAuthCodeExchangeOptions, a8 as OAuthNativeParams, d as OAuthNativeResult, a3 as OAuthStartParams, O as OAuthStartResult, am as OAuthTokens, ai as PasswordSchema, af as PhoneSchema, ah as PlatformSchema, s as RegisterParams, J as RegisterPublicKeyParams, a as RegisterResult, Q as RevokeAllKeysParams, c as RevokeAllKeysResult, N as RevokeKeyParams, M as RotateKeyParams, b as RotateKeyResult, x as SendVerificationCodeParams, S as SendVerificationCodeResult, aj as TargetTypeSchema, aq as UnlinkNotification, ar as UnlinkNotifyRejection, ap as UnlinkNotifyRequest, a6 as UnlinkNotifyResult, h as VERIFICATION_PURPOSES, g as VERIFICATION_TARGET_TYPES, ak as VerificationPurposeSchema, V as VerificationTargetType, y as VerifyCodeParams, z as VerifyCodeResult, m as authRouter, ac as authenticate, Z as buildOAuthErrorUrl, q as changePasswordService, a0 as getEnabledOAuthProviders, a1 as getGoogleAccessToken, at as getOAuthProvider, au as getRegisteredProviders, _ as isOAuthProviderEnabled, T as issueOneTimeTokenService, F as listKeysService, o as loginService, p as logoutService, Y as oauthCallbackService, a7 as oauthNativeService, X as oauthStartService, a2 as oauthUnlinkNotifyService, ad as optionalAuth, as as registerOAuthProvider, B as registerPublicKeyService, r as registerService, $ as requireEnabledProvider, aa as resolveAuthenticatedUser, G as revokeAllKeysService, E as revokeKeyService, D as rotateKeyService, a9 as selectAuthProfile, v as sendVerificationCodeService, w as verifyCodeService, W as verifyOneTimeTokenService } from './authenticate-DK-hLSOW.js';
3
3
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
4
4
  import { K as KeyAlgorithmType, f as InvitationStatus, h as SocialProvider, j as AccountDeletionRequestedBy, k as PurgeStrategy } from './types-CD95yudz.js';
5
5
  export { b as ACCOUNT_DELETION_REQUESTED_BY, A as ACCOUNT_DELETION_REQUEST_STATUSES, i as AccountDeletionRequestStatus, I as INVITATION_STATUSES, a as KEY_ALGORITHM, e as KEY_DEVICE_NAME_MAX_LENGTH, c as KEY_PLATFORM, d as KeyPlatformType, P as PURGE_STRATEGIES, S as SOCIAL_PROVIDERS, U as USER_STATUSES, g as UserStatus } from './types-CD95yudz.js';
@@ -1317,7 +1317,7 @@ declare function getAuthSessionService(userId: string | number | bigint): Promis
1317
1317
  id: number;
1318
1318
  name: string;
1319
1319
  displayName: string;
1320
- category: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
1320
+ category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
1321
1321
  }[];
1322
1322
  userId: number;
1323
1323
  publicId: string;
@@ -1763,7 +1763,7 @@ declare const accountDeletionRequests: drizzle_orm_pg_core.PgTableWithColumns<{
1763
1763
  name: string;
1764
1764
  tableName: "account_deletion_requests";
1765
1765
  dataType: "string enum";
1766
- data: "self" | "admin";
1766
+ data: "admin" | "self";
1767
1767
  driverParam: string;
1768
1768
  notNull: true;
1769
1769
  hasDefault: true;
@@ -2907,7 +2907,7 @@ declare const permissions: drizzle_orm_pg_core.PgTableWithColumns<{
2907
2907
  name: string;
2908
2908
  tableName: "permissions";
2909
2909
  dataType: "string enum";
2910
- data: "custom" | "user" | "auth" | "rbac" | "system";
2910
+ data: "auth" | "custom" | "user" | "rbac" | "system";
2911
2911
  driverParam: string;
2912
2912
  notNull: false;
2913
2913
  hasDefault: false;
@@ -3496,15 +3496,15 @@ declare class UsersRepository extends BaseRepository {
3496
3496
  create(data: NewUser): Promise<{
3497
3497
  email: string | null;
3498
3498
  phone: string | null;
3499
- status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
3500
- username: string | null;
3501
3499
  id: number;
3502
- createdAt: Date;
3503
- updatedAt: Date;
3504
3500
  publicId: string;
3501
+ username: string | null;
3505
3502
  passwordHash: string | null;
3506
3503
  passwordChangeRequired: boolean;
3507
3504
  roleId: number;
3505
+ createdAt: Date;
3506
+ updatedAt: Date;
3507
+ status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
3508
3508
  emailVerifiedAt: Date | null;
3509
3509
  phoneVerifiedAt: Date | null;
3510
3510
  lastLoginAt: Date | null;
@@ -3611,15 +3611,15 @@ declare class UsersRepository extends BaseRepository {
3611
3611
  deleteById(id: number): Promise<{
3612
3612
  email: string | null;
3613
3613
  phone: string | null;
3614
- status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
3615
- username: string | null;
3616
3614
  id: number;
3617
- createdAt: Date;
3618
- updatedAt: Date;
3619
3615
  publicId: string;
3616
+ username: string | null;
3620
3617
  passwordHash: string | null;
3621
3618
  passwordChangeRequired: boolean;
3622
3619
  roleId: number;
3620
+ createdAt: Date;
3621
+ updatedAt: Date;
3622
+ status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
3623
3623
  emailVerifiedAt: Date | null;
3624
3624
  phoneVerifiedAt: Date | null;
3625
3625
  lastLoginAt: Date | null;
@@ -3644,7 +3644,7 @@ declare class UsersRepository extends BaseRepository {
3644
3644
  id: number;
3645
3645
  name: string;
3646
3646
  displayName: string;
3647
- category: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
3647
+ category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
3648
3648
  }[];
3649
3649
  }>;
3650
3650
  /**
@@ -3787,18 +3787,18 @@ declare class KeysRepository extends BaseRepository {
3787
3787
  * Write primary 사용
3788
3788
  */
3789
3789
  create(data: NewUserPublicKey): Promise<{
3790
- userId: number;
3791
- keyId: string;
3792
- id: number;
3793
- isActive: boolean;
3794
- createdAt: Date;
3795
3790
  publicKey: string;
3796
- algorithm: "ES256" | "RS256";
3791
+ keyId: string;
3797
3792
  fingerprint: string;
3793
+ algorithm: "ES256" | "RS256";
3798
3794
  deviceName: string | null;
3799
3795
  platform: "ios" | "android" | "web" | "desktop" | null;
3800
- lastUsedAt: Date | null;
3796
+ userId: number;
3797
+ id: number;
3798
+ isActive: boolean;
3799
+ createdAt: Date;
3801
3800
  expiresAt: Date | null;
3801
+ lastUsedAt: Date | null;
3802
3802
  revokedAt: Date | null;
3803
3803
  revokedReason: string | null;
3804
3804
  }>;
@@ -3873,18 +3873,18 @@ declare class KeysRepository extends BaseRepository {
3873
3873
  * Write primary 사용
3874
3874
  */
3875
3875
  deleteByKeyIdAndUserId(keyId: string, userId: number): Promise<{
3876
- userId: number;
3877
- keyId: string;
3878
- id: number;
3879
- isActive: boolean;
3880
- createdAt: Date;
3881
3876
  publicKey: string;
3882
- algorithm: "ES256" | "RS256";
3877
+ keyId: string;
3883
3878
  fingerprint: string;
3879
+ algorithm: "ES256" | "RS256";
3884
3880
  deviceName: string | null;
3885
3881
  platform: "ios" | "android" | "web" | "desktop" | null;
3886
- lastUsedAt: Date | null;
3882
+ userId: number;
3883
+ id: number;
3884
+ isActive: boolean;
3885
+ createdAt: Date;
3887
3886
  expiresAt: Date | null;
3887
+ lastUsedAt: Date | null;
3888
3888
  revokedAt: Date | null;
3889
3889
  revokedReason: string | null;
3890
3890
  }>;
@@ -4046,14 +4046,14 @@ declare class VerificationCodesRepository extends BaseRepository {
4046
4046
  * Write primary 사용
4047
4047
  */
4048
4048
  create(data: NewVerificationCode): Promise<{
4049
+ target: string;
4050
+ targetType: "email" | "phone";
4051
+ purpose: "registration" | "login" | "password_reset" | "email_change" | "phone_change" | "account_deletion";
4052
+ code: string;
4049
4053
  id: number;
4050
4054
  createdAt: Date;
4051
4055
  updatedAt: Date;
4052
4056
  expiresAt: Date;
4053
- target: string;
4054
- targetType: "email" | "phone";
4055
- code: string;
4056
- purpose: "registration" | "login" | "password_reset" | "email_change" | "phone_change" | "account_deletion";
4057
4057
  usedAt: Date | null;
4058
4058
  attempts: number;
4059
4059
  }>;
@@ -4186,8 +4186,8 @@ declare class RolesRepository extends BaseRepository {
4186
4186
  */
4187
4187
  create(data: NewRoleEntity): Promise<{
4188
4188
  description: string | null;
4189
- id: number;
4190
4189
  name: string;
4190
+ id: number;
4191
4191
  displayName: string;
4192
4192
  isBuiltin: boolean;
4193
4193
  isSystem: boolean;
@@ -4216,8 +4216,8 @@ declare class RolesRepository extends BaseRepository {
4216
4216
  */
4217
4217
  deleteById(id: number): Promise<{
4218
4218
  description: string | null;
4219
- id: number;
4220
4219
  name: string;
4220
+ id: number;
4221
4221
  displayName: string;
4222
4222
  isBuiltin: boolean;
4223
4223
  isSystem: boolean;
@@ -4250,7 +4250,7 @@ declare class PermissionsRepository extends BaseRepository {
4250
4250
  name: string;
4251
4251
  displayName: string;
4252
4252
  description: string | null;
4253
- category: "custom" | "user" | "auth" | "rbac" | "system" | null;
4253
+ category: "auth" | "custom" | "user" | "rbac" | "system" | null;
4254
4254
  isBuiltin: boolean;
4255
4255
  isSystem: boolean;
4256
4256
  isActive: boolean;
@@ -4266,7 +4266,7 @@ declare class PermissionsRepository extends BaseRepository {
4266
4266
  name: string;
4267
4267
  displayName: string;
4268
4268
  description: string | null;
4269
- category: "custom" | "user" | "auth" | "rbac" | "system" | null;
4269
+ category: "auth" | "custom" | "user" | "rbac" | "system" | null;
4270
4270
  isBuiltin: boolean;
4271
4271
  isSystem: boolean;
4272
4272
  isActive: boolean;
@@ -4306,7 +4306,7 @@ declare class PermissionsRepository extends BaseRepository {
4306
4306
  name: string;
4307
4307
  displayName: string;
4308
4308
  description: string | null;
4309
- category: "custom" | "user" | "auth" | "rbac" | "system" | null;
4309
+ category: "auth" | "custom" | "user" | "rbac" | "system" | null;
4310
4310
  isBuiltin: boolean;
4311
4311
  isSystem: boolean;
4312
4312
  isActive: boolean;
@@ -4317,16 +4317,16 @@ declare class PermissionsRepository extends BaseRepository {
4317
4317
  */
4318
4318
  deleteById(id: number): Promise<{
4319
4319
  description: string | null;
4320
- id: number;
4320
+ metadata: Record<string, any> | null;
4321
4321
  name: string;
4322
+ id: number;
4322
4323
  displayName: string;
4323
4324
  isBuiltin: boolean;
4324
4325
  isSystem: boolean;
4325
4326
  isActive: boolean;
4326
4327
  createdAt: Date;
4327
4328
  updatedAt: Date;
4328
- metadata: Record<string, any> | null;
4329
- category: "custom" | "user" | "auth" | "rbac" | "system" | null;
4329
+ category: "auth" | "custom" | "user" | "rbac" | "system" | null;
4330
4330
  }>;
4331
4331
  }
4332
4332
  declare const permissionsRepository: PermissionsRepository;
@@ -4371,9 +4371,9 @@ declare class RolePermissionsRepository extends BaseRepository {
4371
4371
  */
4372
4372
  createMany(data: NewRolePermission[]): Promise<{
4373
4373
  id: number;
4374
+ roleId: number;
4374
4375
  createdAt: Date;
4375
4376
  updatedAt: Date;
4376
- roleId: number;
4377
4377
  permissionId: number;
4378
4378
  }[]>;
4379
4379
  /**
@@ -4389,9 +4389,9 @@ declare class RolePermissionsRepository extends BaseRepository {
4389
4389
  */
4390
4390
  setPermissionsForRole(roleId: number, permissionIds: number[]): Promise<{
4391
4391
  id: number;
4392
+ roleId: number;
4392
4393
  createdAt: Date;
4393
4394
  updatedAt: Date;
4394
- roleId: number;
4395
4395
  permissionId: number;
4396
4396
  }[]>;
4397
4397
  }
@@ -4456,9 +4456,9 @@ declare class UserPermissionsRepository extends BaseRepository {
4456
4456
  id: number;
4457
4457
  createdAt: Date;
4458
4458
  updatedAt: Date;
4459
- expiresAt: Date | null;
4460
- reason: string | null;
4461
4459
  permissionId: number;
4460
+ reason: string | null;
4461
+ expiresAt: Date | null;
4462
4462
  granted: boolean;
4463
4463
  }>;
4464
4464
  /**
@@ -4482,9 +4482,9 @@ declare class UserPermissionsRepository extends BaseRepository {
4482
4482
  id: number;
4483
4483
  createdAt: Date;
4484
4484
  updatedAt: Date;
4485
- expiresAt: Date | null;
4486
- reason: string | null;
4487
4485
  permissionId: number;
4486
+ reason: string | null;
4487
+ expiresAt: Date | null;
4488
4488
  granted: boolean;
4489
4489
  }>;
4490
4490
  /**
@@ -4563,6 +4563,7 @@ declare class UserProfilesRepository extends BaseRepository {
4563
4563
  * 프로필 생성
4564
4564
  */
4565
4565
  create(data: NewUserProfile): Promise<{
4566
+ metadata: Record<string, any> | null;
4566
4567
  userId: number;
4567
4568
  id: number;
4568
4569
  displayName: string | null;
@@ -4580,7 +4581,6 @@ declare class UserProfilesRepository extends BaseRepository {
4580
4581
  location: string | null;
4581
4582
  company: string | null;
4582
4583
  jobTitle: string | null;
4583
- metadata: Record<string, any> | null;
4584
4584
  }>;
4585
4585
  /**
4586
4586
  * 프로필 업데이트 (by ID)
@@ -4632,6 +4632,7 @@ declare class UserProfilesRepository extends BaseRepository {
4632
4632
  * 프로필 삭제 (by ID)
4633
4633
  */
4634
4634
  deleteById(id: number): Promise<{
4635
+ metadata: Record<string, any> | null;
4635
4636
  userId: number;
4636
4637
  id: number;
4637
4638
  displayName: string | null;
@@ -4649,12 +4650,12 @@ declare class UserProfilesRepository extends BaseRepository {
4649
4650
  location: string | null;
4650
4651
  company: string | null;
4651
4652
  jobTitle: string | null;
4652
- metadata: Record<string, any> | null;
4653
4653
  }>;
4654
4654
  /**
4655
4655
  * 프로필 삭제 (by User ID)
4656
4656
  */
4657
4657
  deleteByUserId(userId: number): Promise<{
4658
+ metadata: Record<string, any> | null;
4658
4659
  userId: number;
4659
4660
  id: number;
4660
4661
  displayName: string | null;
@@ -4672,7 +4673,6 @@ declare class UserProfilesRepository extends BaseRepository {
4672
4673
  location: string | null;
4673
4674
  company: string | null;
4674
4675
  jobTitle: string | null;
4675
- metadata: Record<string, any> | null;
4676
4676
  }>;
4677
4677
  /**
4678
4678
  * 프로필 Upsert (by User ID)
@@ -4681,6 +4681,7 @@ declare class UserProfilesRepository extends BaseRepository {
4681
4681
  * 새로 생성 시 displayName은 필수 (없으면 'User'로 설정)
4682
4682
  */
4683
4683
  upsertByUserId(userId: number, data: Partial<Omit<NewUserProfile, 'userId'>>): Promise<{
4684
+ metadata: Record<string, any> | null;
4684
4685
  userId: number;
4685
4686
  id: number;
4686
4687
  displayName: string | null;
@@ -4698,7 +4699,6 @@ declare class UserProfilesRepository extends BaseRepository {
4698
4699
  location: string | null;
4699
4700
  company: string | null;
4700
4701
  jobTitle: string | null;
4701
- metadata: Record<string, any> | null;
4702
4702
  }>;
4703
4703
  /**
4704
4704
  * User ID로 프로필 데이터 조회 (formatted)
@@ -4826,15 +4826,15 @@ declare class InvitationsRepository extends BaseRepository {
4826
4826
  */
4827
4827
  create(data: NewInvitation): Promise<{
4828
4828
  email: string;
4829
- status: "pending" | "accepted" | "expired" | "cancelled";
4829
+ metadata: Record<string, any> | null;
4830
4830
  id: number;
4831
+ roleId: number;
4831
4832
  createdAt: Date;
4832
4833
  updatedAt: Date;
4833
- roleId: number;
4834
- metadata: Record<string, any> | null;
4835
- expiresAt: Date;
4834
+ status: "pending" | "accepted" | "expired" | "cancelled";
4836
4835
  token: string;
4837
4836
  invitedBy: number;
4837
+ expiresAt: Date;
4838
4838
  acceptedAt: Date | null;
4839
4839
  cancelledAt: Date | null;
4840
4840
  }>;
@@ -4860,15 +4860,15 @@ declare class InvitationsRepository extends BaseRepository {
4860
4860
  */
4861
4861
  deleteById(id: number): Promise<{
4862
4862
  email: string;
4863
- status: "pending" | "accepted" | "expired" | "cancelled";
4863
+ metadata: Record<string, any> | null;
4864
4864
  id: number;
4865
+ roleId: number;
4865
4866
  createdAt: Date;
4866
4867
  updatedAt: Date;
4867
- roleId: number;
4868
- metadata: Record<string, any> | null;
4869
- expiresAt: Date;
4868
+ status: "pending" | "accepted" | "expired" | "cancelled";
4870
4869
  token: string;
4871
4870
  invitedBy: number;
4871
+ expiresAt: Date;
4872
4872
  acceptedAt: Date | null;
4873
4873
  cancelledAt: Date | null;
4874
4874
  }>;
@@ -5106,9 +5106,9 @@ declare class SocialAccountsRepository extends BaseRepository {
5106
5106
  createdAt: Date;
5107
5107
  updatedAt: Date;
5108
5108
  provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself";
5109
+ accessToken: string | null;
5109
5110
  providerUserId: string;
5110
5111
  providerEmail: string | null;
5111
- accessToken: string | null;
5112
5112
  refreshToken: string | null;
5113
5113
  tokenExpiresAt: Date | null;
5114
5114
  }>;
@@ -5122,9 +5122,9 @@ declare class SocialAccountsRepository extends BaseRepository {
5122
5122
  createdAt: Date;
5123
5123
  updatedAt: Date;
5124
5124
  provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself";
5125
+ accessToken: string | null;
5125
5126
  providerUserId: string;
5126
5127
  providerEmail: string | null;
5127
- accessToken: string | null;
5128
5128
  refreshToken: string | null;
5129
5129
  tokenExpiresAt: Date | null;
5130
5130
  }>;
@@ -5184,7 +5184,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5184
5184
  requestedAt: Date;
5185
5185
  purgeScheduledAt: Date;
5186
5186
  status: "pending" | "cancelled" | "completed";
5187
- requestedBy: "self" | "admin";
5187
+ requestedBy: "admin" | "self";
5188
5188
  reason: string | null;
5189
5189
  cancelledAt: Date | null;
5190
5190
  completedAt: Date | null;
@@ -5203,7 +5203,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5203
5203
  requestedAt: Date;
5204
5204
  purgeScheduledAt: Date;
5205
5205
  status: "pending" | "cancelled" | "completed";
5206
- requestedBy: "self" | "admin";
5206
+ requestedBy: "admin" | "self";
5207
5207
  reason: string | null;
5208
5208
  cancelledAt: Date | null;
5209
5209
  completedAt: Date | null;
@@ -5225,7 +5225,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5225
5225
  requestedAt: Date;
5226
5226
  purgeScheduledAt: Date;
5227
5227
  status: "pending" | "cancelled" | "completed";
5228
- requestedBy: "self" | "admin";
5228
+ requestedBy: "admin" | "self";
5229
5229
  reason: string | null;
5230
5230
  cancelledAt: Date | null;
5231
5231
  completedAt: Date | null;
@@ -5244,7 +5244,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5244
5244
  requestedAt: Date;
5245
5245
  purgeScheduledAt: Date;
5246
5246
  status: "pending" | "cancelled" | "completed";
5247
- requestedBy: "self" | "admin";
5247
+ requestedBy: "admin" | "self";
5248
5248
  reason: string | null;
5249
5249
  cancelledAt: Date | null;
5250
5250
  completedAt: Date | null;
@@ -5256,16 +5256,16 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5256
5256
  */
5257
5257
  create(data: NewAccountDeletionRequest): Promise<{
5258
5258
  userId: number | null;
5259
- status: "pending" | "cancelled" | "completed";
5260
- purgeScheduledAt: Date;
5261
5259
  id: number;
5262
5260
  createdAt: Date;
5263
5261
  updatedAt: Date;
5262
+ status: "pending" | "cancelled" | "completed";
5263
+ reason: string | null;
5264
+ purgeScheduledAt: Date;
5264
5265
  cancelledAt: Date | null;
5265
5266
  userPublicId: string;
5266
5267
  requestedAt: Date;
5267
- requestedBy: "self" | "admin";
5268
- reason: string | null;
5268
+ requestedBy: "admin" | "self";
5269
5269
  completedAt: Date | null;
5270
5270
  purgeStrategy: "anonymize" | "hard-delete" | null;
5271
5271
  }>;
@@ -5286,7 +5286,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5286
5286
  requestedAt: Date;
5287
5287
  purgeScheduledAt: Date;
5288
5288
  status: "pending" | "cancelled" | "completed";
5289
- requestedBy: "self" | "admin";
5289
+ requestedBy: "admin" | "self";
5290
5290
  reason: string | null;
5291
5291
  cancelledAt: Date | null;
5292
5292
  completedAt: Date | null;
@@ -5311,7 +5311,7 @@ declare class AccountDeletionRequestsRepository extends BaseRepository {
5311
5311
  requestedAt: Date;
5312
5312
  purgeScheduledAt: Date;
5313
5313
  status: "pending" | "cancelled" | "completed";
5314
- requestedBy: "self" | "admin";
5314
+ requestedBy: "admin" | "self";
5315
5315
  reason: string | null;
5316
5316
  cancelledAt: Date | null;
5317
5317
  completedAt: Date | null;
@@ -5763,15 +5763,15 @@ declare function getUser(c: Context | {
5763
5763
  }): {
5764
5764
  email: string | null;
5765
5765
  phone: string | null;
5766
- status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
5767
- username: string | null;
5768
5766
  id: number;
5769
- createdAt: Date;
5770
- updatedAt: Date;
5771
5767
  publicId: string;
5768
+ username: string | null;
5772
5769
  passwordHash: string | null;
5773
5770
  passwordChangeRequired: boolean;
5774
5771
  roleId: number;
5772
+ createdAt: Date;
5773
+ updatedAt: Date;
5774
+ status: "active" | "inactive" | "suspended" | "pending_deletion" | "deleted";
5775
5775
  emailVerifiedAt: Date | null;
5776
5776
  phoneVerifiedAt: Date | null;
5777
5777
  lastLoginAt: Date | null;
@@ -6448,7 +6448,7 @@ declare const authLoginEvent: _spfn_core_event.EventDef<{
6448
6448
  email?: string | undefined;
6449
6449
  phone?: string | undefined;
6450
6450
  userId: string;
6451
- provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself" | "email" | "phone";
6451
+ provider: "email" | "phone" | "google" | "apple" | "github" | "kakao" | "naver" | "superself";
6452
6452
  }>;
6453
6453
  /**
6454
6454
  * auth.register - 회원가입 성공 이벤트
@@ -6471,7 +6471,7 @@ declare const authRegisterEvent: _spfn_core_event.EventDef<{
6471
6471
  [x: string]: unknown;
6472
6472
  } | undefined;
6473
6473
  userId: string;
6474
- provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself" | "email" | "phone";
6474
+ provider: "email" | "phone" | "google" | "apple" | "github" | "kakao" | "naver" | "superself";
6475
6475
  }>;
6476
6476
  /**
6477
6477
  * auth.invitation.created - 초대 생성 이벤트
@@ -6499,9 +6499,9 @@ declare const invitationCreatedEvent: _spfn_core_event.EventDef<{
6499
6499
  } | undefined;
6500
6500
  email: string;
6501
6501
  roleId: number;
6502
- expiresAt: string;
6503
6502
  token: string;
6504
6503
  invitedBy: string;
6504
+ expiresAt: string;
6505
6505
  invitationId: string;
6506
6506
  isResend: boolean;
6507
6507
  }>;
@@ -6545,7 +6545,7 @@ declare const authDeletionRequestedEvent: _spfn_core_event.EventDef<{
6545
6545
  userId: string;
6546
6546
  purgeScheduledAt: string;
6547
6547
  userPublicId: string;
6548
- requestedBy: "self" | "admin";
6548
+ requestedBy: "admin" | "self";
6549
6549
  }>;
6550
6550
  /**
6551
6551
  * auth.deletion.cancelled - 계정 탈퇴 복구 이벤트
@@ -6590,7 +6590,7 @@ declare const authDeletionCompletedEvent: _spfn_core_event.EventDef<{
6590
6590
  declare const oauthUnlinkedEvent: _spfn_core_event.EventDef<{
6591
6591
  reason?: string | undefined;
6592
6592
  userId: string;
6593
- provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself" | "email" | "phone";
6593
+ provider: "email" | "phone" | "google" | "apple" | "github" | "kakao" | "naver" | "superself";
6594
6594
  providerUserId: string;
6595
6595
  }>;
6596
6596
  /**
package/dist/server.js CHANGED
@@ -8356,12 +8356,12 @@ async function listKeysService(params) {
8356
8356
  platform: row.platform ?? void 0,
8357
8357
  algorithm: row.algorithm,
8358
8358
  fingerprintPrefix: row.fingerprint.slice(0, KEY_FINGERPRINT_PREFIX_LENGTH),
8359
- createdAt: row.createdAt.toISOString(),
8360
- lastUsedAt: row.lastUsedAt?.toISOString(),
8361
- expiresAt: row.expiresAt?.toISOString(),
8359
+ createdAtMillis: row.createdAt.getTime(),
8360
+ lastUsedAtMillis: row.lastUsedAt?.getTime(),
8361
+ expiresAtMillis: row.expiresAt?.getTime(),
8362
8362
  isExpired: isExpired(row.expiresAt),
8363
8363
  isActive: row.isActive,
8364
- revokedAt: row.revokedAt?.toISOString()
8364
+ revokedAtMillis: row.revokedAt?.getTime()
8365
8365
  }));
8366
8366
  }
8367
8367
  async function revokeAllKeysService(params) {
@@ -11593,6 +11593,18 @@ var ClientProofRefusal = class _ClientProofRefusal {
11593
11593
  static unprocessable() {
11594
11594
  return contractViolation("the request could not be processed");
11595
11595
  }
11596
+ /**
11597
+ * A client that ships separately from the server said nothing about which
11598
+ * contract it was built against. Without it the server cannot tell whether
11599
+ * the two ends agree, and answering as though they do is what produces the
11600
+ * undecodable body this check exists to replace.
11601
+ */
11602
+ static contractVersionMissing() {
11603
+ return contractViolation("a client of this kind must state the contract version it was generated from");
11604
+ }
11605
+ static contractVersionUnsupported() {
11606
+ return contractViolation("the stated contract version is outside the range this server serves");
11607
+ }
11596
11608
  // ---- the profile allowlist ----------------------------------------------
11597
11609
  static profileRejected() {
11598
11610
  return new _ClientProofRefusal("PROFILE_REJECTED", "the named auth profile is not on this contract's allowlist");