@spfn/auth 0.2.0-beta.33 → 0.2.0-beta.34

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;
@@ -740,6 +740,13 @@ declare const mainAuthRouter: _spfn_core_route.Router<{
740
740
  phoneVerifiedAt: Date | null;
741
741
  lastLoginAt: Date | null;
742
742
  }>;
743
+ updateLocale: _spfn_core_route.RouteDef<{
744
+ body: _sinclair_typebox.TObject<{
745
+ locale: _sinclair_typebox.TString;
746
+ }>;
747
+ }, {}, {
748
+ locale: string;
749
+ }>;
743
750
  listRoles: _spfn_core_route.RouteDef<{
744
751
  query: _sinclair_typebox.TObject<{
745
752
  includeInactive: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
@@ -827,6 +834,7 @@ interface AuthContext {
827
834
  userId: string;
828
835
  keyId: string;
829
836
  role: string | null;
837
+ locale: string;
830
838
  }
831
839
  declare module 'hono' {
832
840
  interface ContextVariableMap {
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-CGslXjZb.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-CGslXjZb.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-vcXIhj1J.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-vcXIhj1J.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;
@@ -366,6 +366,13 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
366
366
  phoneVerifiedAt: Date | null;
367
367
  lastLoginAt: Date | null;
368
368
  }>;
369
+ updateLocale: _spfn_core_route.RouteDef<{
370
+ body: _sinclair_typebox.TObject<{
371
+ locale: _sinclair_typebox.TString;
372
+ }>;
373
+ }, {}, {
374
+ locale: string;
375
+ }>;
369
376
  listRoles: _spfn_core_route.RouteDef<{
370
377
  query: _sinclair_typebox.TObject<{
371
378
  includeInactive: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
package/dist/index.js CHANGED
@@ -183,6 +183,7 @@ var routeMap = {
183
183
  updateUserProfile: { method: "PATCH", path: "/_auth/users/profile" },
184
184
  checkUsername: { method: "GET", path: "/_auth/users/username/check" },
185
185
  updateUsername: { method: "PATCH", path: "/_auth/users/username" },
186
+ updateLocale: { method: "PATCH", path: "/_auth/users/locale" },
186
187
  oauthGoogleStart: { method: "GET", path: "/_auth/oauth/google" },
187
188
  oauthGoogleCallback: { method: "GET", path: "/_auth/oauth/google/callback" },
188
189
  oauthStart: { method: "POST", path: "/_auth/oauth/start" },