@spfn/auth 0.2.0-beta.30 → 0.2.0-beta.31

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.
@@ -542,7 +542,7 @@ declare const mainAuthRouter: _spfn_core_route.Router<{
542
542
  id: number;
543
543
  name: string;
544
544
  displayName: string;
545
- category: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
545
+ category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
546
546
  }[];
547
547
  userId: number;
548
548
  email: string | null;
@@ -714,6 +714,32 @@ declare const mainAuthRouter: _spfn_core_route.Router<{
714
714
  metadata: _sinclair_typebox.TOptional<_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TAny>>;
715
715
  }>;
716
716
  }, {}, ProfileInfo>;
717
+ checkUsername: _spfn_core_route.RouteDef<{
718
+ query: _sinclair_typebox.TObject<{
719
+ username: _sinclair_typebox.TString;
720
+ }>;
721
+ }, {}, {
722
+ available: boolean;
723
+ }>;
724
+ updateUsername: _spfn_core_route.RouteDef<{
725
+ body: _sinclair_typebox.TObject<{
726
+ username: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
727
+ }>;
728
+ }, {}, {
729
+ createdAt: Date;
730
+ updatedAt: Date;
731
+ id: number;
732
+ email: string | null;
733
+ phone: string | null;
734
+ username: string | null;
735
+ passwordHash: string | null;
736
+ passwordChangeRequired: boolean;
737
+ roleId: number;
738
+ status: "active" | "inactive" | "suspended";
739
+ emailVerifiedAt: Date | null;
740
+ phoneVerifiedAt: Date | null;
741
+ lastLoginAt: Date | null;
742
+ }>;
717
743
  listRoles: _spfn_core_route.RouteDef<{
718
744
  query: _sinclair_typebox.TObject<{
719
745
  includeInactive: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _spfn_core_nextjs from '@spfn/core/nextjs';
2
- import { R as RoleConfig, P as PermissionConfig, C as CheckAccountExistsResult, S as SendVerificationCodeResult, a as RegisterResult, L as LoginResult, b as RotateKeyResult, O as OAuthStartResult, U as UserProfile, c as ProfileInfo, m as mainAuthRouter } from './authenticate-CT2Xy98P.js';
3
- export { k as AuthInitOptions, A as AuthSession, I as INVITATION_STATUSES, n as InvitationStatus, K as KEY_ALGORITHM, l as KeyAlgorithmType, i as PERMISSION_CATEGORIES, j as PermissionCategory, e as SOCIAL_PROVIDERS, p as SocialProvider, d as USER_STATUSES, o as UserStatus, h as VERIFICATION_PURPOSES, g as VERIFICATION_TARGET_TYPES, f as VerificationPurpose, V as VerificationTargetType } from './authenticate-CT2Xy98P.js';
2
+ import { R as RoleConfig, P as PermissionConfig, C as CheckAccountExistsResult, S as SendVerificationCodeResult, a as RegisterResult, L as LoginResult, b as RotateKeyResult, O as OAuthStartResult, U as UserProfile, c as ProfileInfo, m as mainAuthRouter } from './authenticate-Brx2N-Ip.js';
3
+ export { k as AuthInitOptions, A as AuthSession, I as INVITATION_STATUSES, n as InvitationStatus, K as KEY_ALGORITHM, l as KeyAlgorithmType, i as PERMISSION_CATEGORIES, j as PermissionCategory, e as SOCIAL_PROVIDERS, p as SocialProvider, d as USER_STATUSES, o as UserStatus, h as VERIFICATION_PURPOSES, g as VERIFICATION_TARGET_TYPES, f as VerificationPurpose, V as VerificationTargetType } from './authenticate-Brx2N-Ip.js';
4
4
  import * as _spfn_core_route from '@spfn/core/route';
5
5
  import { HttpMethod } from '@spfn/core/route';
6
6
  import * as _sinclair_typebox from '@sinclair/typebox';
@@ -168,7 +168,7 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
168
168
  id: number;
169
169
  name: string;
170
170
  displayName: string;
171
- category: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
171
+ category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
172
172
  }[];
173
173
  userId: number;
174
174
  email: string | null;
@@ -340,6 +340,32 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
340
340
  metadata: _sinclair_typebox.TOptional<_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TAny>>;
341
341
  }>;
342
342
  }, {}, ProfileInfo>;
343
+ checkUsername: _spfn_core_route.RouteDef<{
344
+ query: _sinclair_typebox.TObject<{
345
+ username: _sinclair_typebox.TString;
346
+ }>;
347
+ }, {}, {
348
+ available: boolean;
349
+ }>;
350
+ updateUsername: _spfn_core_route.RouteDef<{
351
+ body: _sinclair_typebox.TObject<{
352
+ username: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
353
+ }>;
354
+ }, {}, {
355
+ createdAt: Date;
356
+ updatedAt: Date;
357
+ id: number;
358
+ email: string | null;
359
+ phone: string | null;
360
+ username: string | null;
361
+ passwordHash: string | null;
362
+ passwordChangeRequired: boolean;
363
+ roleId: number;
364
+ status: "active" | "inactive" | "suspended";
365
+ emailVerifiedAt: Date | null;
366
+ phoneVerifiedAt: Date | null;
367
+ lastLoginAt: Date | null;
368
+ }>;
343
369
  listRoles: _spfn_core_route.RouteDef<{
344
370
  query: _sinclair_typebox.TObject<{
345
371
  includeInactive: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
package/dist/index.js CHANGED
@@ -171,6 +171,8 @@ var routeMap = {
171
171
  deleteInvitation: { method: "POST", path: "/_auth/invitations/delete" },
172
172
  getUserProfile: { method: "GET", path: "/_auth/users/profile" },
173
173
  updateUserProfile: { method: "PATCH", path: "/_auth/users/profile" },
174
+ checkUsername: { method: "GET", path: "/_auth/users/username/check" },
175
+ updateUsername: { method: "PATCH", path: "/_auth/users/username" },
174
176
  oauthGoogleStart: { method: "GET", path: "/_auth/oauth/google" },
175
177
  oauthGoogleCallback: { method: "GET", path: "/_auth/oauth/google/callback" },
176
178
  oauthStart: { method: "POST", path: "/_auth/oauth/start" },