everything-dev 2.0.0-rc.7 → 2.0.0-rc.8

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.
Files changed (47) hide show
  1. package/dist/api/auth-middleware.cjs +14 -1
  2. package/dist/api/auth-middleware.cjs.map +1 -1
  3. package/dist/api/auth-middleware.d.cts +9 -0
  4. package/dist/api/auth-middleware.d.mts +9 -0
  5. package/dist/api/auth-middleware.mjs +14 -1
  6. package/dist/api/auth-middleware.mjs.map +1 -1
  7. package/dist/cli/init.cjs +22 -10
  8. package/dist/cli/init.cjs.map +1 -1
  9. package/dist/cli/init.mjs +22 -10
  10. package/dist/cli/init.mjs.map +1 -1
  11. package/dist/cli.cjs +4 -3
  12. package/dist/cli.cjs.map +1 -1
  13. package/dist/cli.mjs +4 -3
  14. package/dist/cli.mjs.map +1 -1
  15. package/dist/commands/keys.cjs +1 -1
  16. package/dist/commands/keys.cjs.map +1 -1
  17. package/dist/commands/keys.mjs +1 -1
  18. package/dist/commands/keys.mjs.map +1 -1
  19. package/dist/contract.meta.cjs +1 -1
  20. package/dist/contract.meta.cjs.map +1 -1
  21. package/dist/contract.meta.d.cts +1 -1
  22. package/dist/contract.meta.d.mts +1 -1
  23. package/dist/contract.meta.mjs +1 -1
  24. package/dist/contract.meta.mjs.map +1 -1
  25. package/dist/db/core.cjs +22 -4
  26. package/dist/db/core.cjs.map +1 -1
  27. package/dist/db/core.mjs +22 -4
  28. package/dist/db/core.mjs.map +1 -1
  29. package/dist/http-client.cjs +14 -4
  30. package/dist/http-client.cjs.map +1 -1
  31. package/dist/http-client.mjs +14 -4
  32. package/dist/http-client.mjs.map +1 -1
  33. package/dist/infra/planner.cjs +6 -2
  34. package/dist/infra/planner.cjs.map +1 -1
  35. package/dist/infra/planner.mjs +6 -2
  36. package/dist/infra/planner.mjs.map +1 -1
  37. package/dist/ui/auth.d.cts +217 -123
  38. package/dist/ui/auth.d.mts +217 -123
  39. package/dist/ui/router-client.cjs +2 -1
  40. package/dist/ui/router-client.cjs.map +1 -1
  41. package/dist/ui/router-client.mjs +2 -1
  42. package/dist/ui/router-client.mjs.map +1 -1
  43. package/package.json +10 -10
  44. package/skills/api-and-auth/SKILL.md +12 -9
  45. package/skills/api-and-auth/references/middleware.md +38 -0
  46. package/skills/cli-reference/SKILL.md +22 -6
  47. package/skills/talk-to-the-app/SKILL.md +32 -5
@@ -1,11 +1,15 @@
1
1
  import { ClientRuntimeConfig } from "../types.cjs";
2
2
  import { CookieOptions } from "../node_modules/better-call/dist/cookies.cjs";
3
+ import { StandardSchemaV1 } from "../node_modules/better-call/dist/standard-schema.cjs";
4
+ import { OpenAPIParameter } from "../node_modules/better-call/dist/openapi.cjs";
3
5
  import { StrictEndpoint } from "../node_modules/better-call/dist/endpoint.cjs";
4
- import { MiddlewareContext, MiddlewareInputContext, MiddlewareOptions } from "../node_modules/better-call/dist/middleware.cjs";
5
- import { AuthenticationExtensionsClientInputs, AuthenticationExtensionsClientOutputs } from "../node_modules/@simplewebauthn/server/esm/types/dom.cjs";
6
- import { AuthenticationResponseJSON, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialRequestOptionsJSON, RegistrationResponseJSON } from "../node_modules/@simplewebauthn/server/esm/types/index.cjs";
6
+ import { Middleware, MiddlewareContext, MiddlewareInputContext, MiddlewareOptions } from "../node_modules/better-call/dist/middleware.cjs";
7
+ import { SchemaCheck } from "../node_modules/@better-auth/core/dist/db/schema-check.cjs";
7
8
  import { BetterFetch } from "../node_modules/@better-fetch/fetch/dist/index.cjs";
8
9
  import { PreinitializedWritableAtom } from "../node_modules/nanostores/atom/index.cjs";
10
+ import "../node_modules/@better-auth/core/dist/db/internal.cjs";
11
+ import { AuthenticationExtensionsClientInputs, AuthenticationExtensionsClientOutputs } from "../node_modules/@simplewebauthn/server/esm/types/dom.cjs";
12
+ import { AuthenticationResponseJSON, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialRequestOptionsJSON, RegistrationResponseJSON } from "../node_modules/@simplewebauthn/server/esm/types/index.cjs";
9
13
  import { AuthContext, clearAuthenticatedQueries, requireAdmin, requireSession } from "./auth-guards.cjs";
10
14
  import { pluginHref, pluginPath, pluginSearch } from "./plugin-path.cjs";
11
15
  import { QueryClient } from "@tanstack/react-query";
@@ -65,7 +69,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
65
69
  hooks: {
66
70
  before: {
67
71
  matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
68
- handler: (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
72
+ handler: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
69
73
  user: {
70
74
  id: string;
71
75
  createdAt: Date;
@@ -86,10 +90,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
86
90
  expiresAt: Date;
87
91
  };
88
92
  } | {
89
- context: MiddlewareContext<MiddlewareOptions, {
90
- returned?: unknown | undefined;
91
- responseHeaders?: Headers | undefined;
92
- } & import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
93
+ context: MiddlewareContext<MiddlewareOptions, import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
93
94
  options: import("better-auth").BetterAuthOptions;
94
95
  trustedOrigins: string[];
95
96
  trustedProviders: string[];
@@ -165,7 +166,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
165
166
  } | null) => void;
166
167
  socialProviders: import("better-auth").OAuthProvider[];
167
168
  authCookies: import("better-auth").BetterAuthCookies;
168
- logger: ReturnType<typeof import("better-auth").createLogger>;
169
+ logger: ReturnType<(options?: import("better-auth").Logger | undefined) => import("better-auth").InternalLogger>;
169
170
  rateLimit: {
170
171
  enabled: boolean;
171
172
  window: number;
@@ -173,6 +174,8 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
173
174
  storage: "memory" | "database" | "secondary-storage";
174
175
  } & Omit<import("better-auth").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
175
176
  adapter: import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
177
+ checkSchema?: SchemaCheck | undefined;
178
+ explicitSchemaCheck?: SchemaCheck | undefined;
176
179
  internalAdapter: import("better-auth").InternalAdapter<import("better-auth").BetterAuthOptions>;
177
180
  createAuthCookie: (cookieName: string, overrideAttributes?: Partial<CookieOptions> | undefined) => import("better-auth").BetterAuthCookie;
178
181
  secret: string;
@@ -181,6 +184,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
181
184
  updateAge: number;
182
185
  expiresIn: number;
183
186
  freshAge: number;
187
+ cookieCacheSigner?: import("better-auth").CookieCacheSigner | undefined;
184
188
  cookieRefreshCache: false | {
185
189
  enabled: true;
186
190
  updateAge: number;
@@ -214,8 +218,11 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
214
218
  skipCSRFCheck: boolean;
215
219
  runInBackground: (promise: Promise<unknown>) => void;
216
220
  runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
221
+ } & {
222
+ returned?: unknown | undefined;
223
+ responseHeaders?: Headers | undefined;
217
224
  }>;
218
- }>;
225
+ }>>;
219
226
  }[];
220
227
  };
221
228
  endpoints: {
@@ -430,7 +437,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
430
437
  configId: import("zod").ZodOptional<import("zod").ZodString>;
431
438
  id: import("zod").ZodString;
432
439
  }, import("zod/v4/core").$strip>;
433
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
440
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
434
441
  session: {
435
442
  session: Record<string, any> & {
436
443
  id: string;
@@ -452,7 +459,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
452
459
  image?: string | null | undefined;
453
460
  };
454
461
  };
455
- }>)[];
462
+ }>>[];
456
463
  metadata: {
457
464
  openapi: {
458
465
  description: string;
@@ -767,7 +774,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
767
774
  configId: import("zod").ZodOptional<import("zod").ZodString>;
768
775
  keyId: import("zod").ZodString;
769
776
  }, import("zod/v4/core").$strip>;
770
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
777
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
771
778
  session: {
772
779
  session: Record<string, any> & {
773
780
  id: string;
@@ -789,7 +796,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
789
796
  image?: string | null | undefined;
790
797
  };
791
798
  };
792
- }>)[];
799
+ }>>[];
793
800
  metadata: {
794
801
  openapi: {
795
802
  description: string;
@@ -835,7 +842,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
835
842
  }>;
836
843
  listApiKeys: StrictEndpoint<"/api-key/list", {
837
844
  method: "GET";
838
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
845
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
839
846
  session: {
840
847
  session: Record<string, any> & {
841
848
  id: string;
@@ -857,7 +864,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
857
864
  image?: string | null | undefined;
858
865
  };
859
866
  };
860
- }>)[];
867
+ }>>[];
861
868
  query: import("zod").ZodOptional<import("zod").ZodObject<{
862
869
  configId: import("zod").ZodOptional<import("zod").ZodString>;
863
870
  organizationId: import("zod").ZodOptional<import("zod").ZodString>;
@@ -1221,7 +1228,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1221
1228
  endpoints: {
1222
1229
  generatePasskeyRegistrationOptions: StrictEndpoint<"/passkey/generate-register-options", {
1223
1230
  method: "GET";
1224
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
1231
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
1225
1232
  session: {
1226
1233
  session: Record<string, any> & {
1227
1234
  id: string;
@@ -1243,7 +1250,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1243
1250
  image?: string | null | undefined;
1244
1251
  };
1245
1252
  };
1246
- }>)[];
1253
+ }>>[];
1247
1254
  query: import("zod").ZodOptional<import("zod").ZodObject<{
1248
1255
  authenticatorAttachment: import("zod").ZodOptional<import("zod").ZodEnum<{
1249
1256
  platform: "platform";
@@ -1256,15 +1263,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1256
1263
  openapi: {
1257
1264
  operationId: string;
1258
1265
  description: string;
1259
- parameters: {
1260
- name: string;
1261
- in: "query";
1262
- required: false;
1263
- description: string;
1264
- schema: {
1265
- type: "string";
1266
- };
1267
- }[];
1266
+ parameters: OpenAPIParameter[];
1268
1267
  responses: {
1269
1268
  200: {
1270
1269
  description: string;
@@ -1466,8 +1465,9 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1466
1465
  body: import("zod").ZodObject<{
1467
1466
  response: import("zod").ZodAny;
1468
1467
  name: import("zod").ZodOptional<import("zod").ZodString>;
1468
+ createSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
1469
1469
  }, import("zod/v4/core").$strip>;
1470
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
1470
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
1471
1471
  session: {
1472
1472
  session: Record<string, any> & {
1473
1473
  id: string;
@@ -1489,7 +1489,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1489
1489
  image?: string | null | undefined;
1490
1490
  };
1491
1491
  };
1492
- }>)[];
1492
+ }>>[];
1493
1493
  metadata: {
1494
1494
  openapi: {
1495
1495
  operationId: string;
@@ -1500,7 +1500,20 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1500
1500
  content: {
1501
1501
  "application/json": {
1502
1502
  schema: {
1503
- $ref: string;
1503
+ readonly type: "object";
1504
+ readonly allOf: readonly [{
1505
+ readonly $ref: "#/components/schemas/Passkey";
1506
+ }, {
1507
+ readonly type: "object";
1508
+ readonly properties: {
1509
+ readonly session: {
1510
+ readonly $ref: "#/components/schemas/Session";
1511
+ };
1512
+ readonly user: {
1513
+ readonly $ref: "#/components/schemas/User";
1514
+ };
1515
+ };
1516
+ }];
1504
1517
  };
1505
1518
  };
1506
1519
  };
@@ -1571,7 +1584,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1571
1584
  }>;
1572
1585
  listPasskeys: StrictEndpoint<"/passkey/list-user-passkeys", {
1573
1586
  method: "GET";
1574
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
1587
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
1575
1588
  session: {
1576
1589
  session: Record<string, any> & {
1577
1590
  id: string;
@@ -1593,7 +1606,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1593
1606
  image?: string | null | undefined;
1594
1607
  };
1595
1608
  };
1596
- }>)[];
1609
+ }>>[];
1597
1610
  metadata: {
1598
1611
  openapi: {
1599
1612
  description: string;
@@ -1622,7 +1635,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1622
1635
  body: import("zod").ZodObject<{
1623
1636
  id: import("zod").ZodString;
1624
1637
  }, import("zod/v4/core").$strip>;
1625
- use: (((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
1638
+ use: (Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
1626
1639
  session: {
1627
1640
  session: Record<string, any> & {
1628
1641
  id: string;
@@ -1644,9 +1657,9 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1644
1657
  image?: string | null | undefined;
1645
1658
  };
1646
1659
  };
1647
- }>) | ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
1660
+ }>> | Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
1648
1661
  verifiedResource: {};
1649
- }>))[];
1662
+ }>>)[];
1650
1663
  metadata: {
1651
1664
  openapi: {
1652
1665
  description: string;
@@ -1680,7 +1693,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1680
1693
  id: import("zod").ZodString;
1681
1694
  name: import("zod").ZodString;
1682
1695
  }, import("zod/v4/core").$strip>;
1683
- use: (((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
1696
+ use: (Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
1684
1697
  session: {
1685
1698
  session: Record<string, any> & {
1686
1699
  id: string;
@@ -1702,9 +1715,9 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1702
1715
  image?: string | null | undefined;
1703
1716
  };
1704
1717
  };
1705
- }>) | ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
1718
+ }>> | Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
1706
1719
  verifiedResource: {};
1707
- }>))[];
1720
+ }>>)[];
1708
1721
  metadata: {
1709
1722
  openapi: {
1710
1723
  description: string;
@@ -1791,6 +1804,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1791
1804
  PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
1792
1805
  AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
1793
1806
  UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
1807
+ USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
1794
1808
  FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
1795
1809
  PREVIOUSLY_REGISTERED: import("better-auth").RawError<"PREVIOUSLY_REGISTERED">;
1796
1810
  REGISTRATION_CANCELLED: import("better-auth").RawError<"REGISTRATION_CANCELLED">;
@@ -1859,6 +1873,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1859
1873
  name?: string;
1860
1874
  authenticatorAttachment?: "platform" | "cross-platform";
1861
1875
  context?: string | null;
1876
+ createSession?: boolean;
1862
1877
  extensions?: AuthenticationExtensionsClientInputs;
1863
1878
  useAutoRegister?: boolean;
1864
1879
  returnWebAuthnResponse?: boolean;
@@ -1870,14 +1885,20 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1870
1885
  statusText: string;
1871
1886
  };
1872
1887
  } | {
1873
- data: import("@better-auth/passkey/client").Passkey;
1888
+ data: import("@better-auth/passkey/client").Passkey & {
1889
+ session?: import("better-auth").Session;
1890
+ user?: import("better-auth").User;
1891
+ };
1874
1892
  error: null;
1875
1893
  } | {
1876
1894
  webauthn: {
1877
1895
  response: RegistrationResponseJSON;
1878
1896
  clientExtensionResults: AuthenticationExtensionsClientOutputs;
1879
1897
  };
1880
- data: import("@better-auth/passkey/client").Passkey;
1898
+ data: import("@better-auth/passkey/client").Passkey & {
1899
+ session?: import("better-auth").Session;
1900
+ user?: import("better-auth").User;
1901
+ };
1881
1902
  error: null;
1882
1903
  } | {
1883
1904
  data: null;
@@ -1915,6 +1936,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1915
1936
  PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
1916
1937
  AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
1917
1938
  UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
1939
+ USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
1918
1940
  FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
1919
1941
  PREVIOUSLY_REGISTERED: import("better-auth").RawError<"PREVIOUSLY_REGISTERED">;
1920
1942
  REGISTRATION_CANCELLED: import("better-auth").RawError<"REGISTRATION_CANCELLED">;
@@ -1998,7 +2020,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
1998
2020
  hooks: {
1999
2021
  after: {
2000
2022
  matcher(context: import("better-auth").HookEndpointContext): boolean;
2001
- handler: (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<import("better-auth/plugins").SessionWithImpersonatedBy[] | undefined>;
2023
+ handler: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<import("better-auth/client/plugins").SessionWithImpersonatedBy[] | undefined>>;
2002
2024
  }[];
2003
2025
  };
2004
2026
  endpoints: {
@@ -2009,9 +2031,9 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2009
2031
  role: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>;
2010
2032
  }, import("zod/v4/core").$strip>;
2011
2033
  requireHeaders: true;
2012
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2034
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2013
2035
  session: {
2014
- user: import("better-auth/plugins").UserWithRole;
2036
+ user: import("better-auth/client/plugins").UserWithRole;
2015
2037
  session: {
2016
2038
  id: string;
2017
2039
  createdAt: Date;
@@ -2023,7 +2045,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2023
2045
  userAgent?: string | null | undefined;
2024
2046
  };
2025
2047
  };
2026
- }>)[];
2048
+ }>>[];
2027
2049
  metadata: {
2028
2050
  openapi: {
2029
2051
  operationId: string;
@@ -2055,16 +2077,16 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2055
2077
  };
2056
2078
  };
2057
2079
  }, {
2058
- user: import("better-auth/plugins").UserWithRole;
2080
+ user: import("better-auth/client/plugins").UserWithRole;
2059
2081
  }>;
2060
2082
  getUser: StrictEndpoint<"/admin/get-user", {
2061
2083
  method: "GET";
2062
2084
  query: import("zod").ZodObject<{
2063
2085
  id: import("zod").ZodString;
2064
2086
  }, import("zod/v4/core").$strip>;
2065
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2087
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2066
2088
  session: {
2067
- user: import("better-auth/plugins").UserWithRole;
2089
+ user: import("better-auth/client/plugins").UserWithRole;
2068
2090
  session: {
2069
2091
  id: string;
2070
2092
  createdAt: Date;
@@ -2076,7 +2098,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2076
2098
  userAgent?: string | null | undefined;
2077
2099
  };
2078
2100
  };
2079
- }>)[];
2101
+ }>>[];
2080
2102
  metadata: {
2081
2103
  openapi: {
2082
2104
  operationId: string;
@@ -2101,7 +2123,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2101
2123
  };
2102
2124
  };
2103
2125
  };
2104
- }, import("better-auth/plugins").UserWithRole>;
2126
+ }, import("better-auth/client/plugins").UserWithRole>;
2105
2127
  createUser: StrictEndpoint<"/admin/create-user", {
2106
2128
  method: "POST";
2107
2129
  body: import("zod").ZodObject<{
@@ -2145,7 +2167,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2145
2167
  };
2146
2168
  };
2147
2169
  }, {
2148
- user: import("better-auth/plugins").UserWithRole;
2170
+ user: import("better-auth/client/plugins").UserWithRole;
2149
2171
  }>;
2150
2172
  adminUpdateUser: StrictEndpoint<"/admin/update-user", {
2151
2173
  method: "POST";
@@ -2153,9 +2175,9 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2153
2175
  userId: import("zod").ZodCoercedString<unknown>;
2154
2176
  data: import("zod").ZodRecord<import("zod").ZodAny, import("zod").ZodAny>;
2155
2177
  }, import("zod/v4/core").$strip>;
2156
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2178
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2157
2179
  session: {
2158
- user: import("better-auth/plugins").UserWithRole;
2180
+ user: import("better-auth/client/plugins").UserWithRole;
2159
2181
  session: {
2160
2182
  id: string;
2161
2183
  createdAt: Date;
@@ -2167,7 +2189,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2167
2189
  userAgent?: string | null | undefined;
2168
2190
  };
2169
2191
  };
2170
- }>)[];
2192
+ }>>[];
2171
2193
  metadata: {
2172
2194
  openapi: {
2173
2195
  operationId: string;
@@ -2192,12 +2214,12 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2192
2214
  };
2193
2215
  };
2194
2216
  };
2195
- }, import("better-auth/plugins").UserWithRole>;
2217
+ }, import("better-auth/client/plugins").UserWithRole>;
2196
2218
  listUsers: StrictEndpoint<"/admin/list-users", {
2197
2219
  method: "GET";
2198
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2220
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2199
2221
  session: {
2200
- user: import("better-auth/plugins").UserWithRole;
2222
+ user: import("better-auth/client/plugins").UserWithRole;
2201
2223
  session: {
2202
2224
  id: string;
2203
2225
  createdAt: Date;
@@ -2209,7 +2231,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2209
2231
  userAgent?: string | null | undefined;
2210
2232
  };
2211
2233
  };
2212
- }>)[];
2234
+ }>>[];
2213
2235
  query: import("zod").ZodObject<{
2214
2236
  searchValue: import("zod").ZodOptional<import("zod").ZodString>;
2215
2237
  searchField: import("zod").ZodOptional<import("zod").ZodEnum<{
@@ -2231,13 +2253,13 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2231
2253
  filterField: import("zod").ZodOptional<import("zod").ZodString>;
2232
2254
  filterValue: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, import("zod").ZodBoolean]>, import("zod").ZodArray<import("zod").ZodString>]>, import("zod").ZodArray<import("zod").ZodNumber>]>>;
2233
2255
  filterOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
2256
+ in: "in";
2257
+ lte: "lte";
2234
2258
  eq: "eq";
2235
2259
  ne: "ne";
2260
+ lt: "lt";
2236
2261
  gt: "gt";
2237
2262
  gte: "gte";
2238
- lt: "lt";
2239
- lte: "lte";
2240
- in: "in";
2241
2263
  not_in: "not_in";
2242
2264
  contains: "contains";
2243
2265
  starts_with: "starts_with";
@@ -2282,14 +2304,14 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2282
2304
  };
2283
2305
  };
2284
2306
  }, {
2285
- users: import("better-auth/plugins").UserWithRole[];
2307
+ users: import("better-auth/client/plugins").UserWithRole[];
2286
2308
  total: number;
2287
2309
  }>;
2288
2310
  listUserSessions: StrictEndpoint<"/admin/list-user-sessions", {
2289
2311
  method: "POST";
2290
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2312
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2291
2313
  session: {
2292
- user: import("better-auth/plugins").UserWithRole;
2314
+ user: import("better-auth/client/plugins").UserWithRole;
2293
2315
  session: {
2294
2316
  id: string;
2295
2317
  createdAt: Date;
@@ -2301,7 +2323,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2301
2323
  userAgent?: string | null | undefined;
2302
2324
  };
2303
2325
  };
2304
- }>)[];
2326
+ }>>[];
2305
2327
  body: import("zod").ZodObject<{
2306
2328
  userId: import("zod").ZodCoercedString<unknown>;
2307
2329
  }, import("zod/v4/core").$strip>;
@@ -2333,16 +2355,16 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2333
2355
  };
2334
2356
  };
2335
2357
  }, {
2336
- sessions: import("better-auth/plugins").SessionWithImpersonatedBy[];
2358
+ sessions: import("better-auth/client/plugins").SessionWithImpersonatedBy[];
2337
2359
  }>;
2338
2360
  unbanUser: StrictEndpoint<"/admin/unban-user", {
2339
2361
  method: "POST";
2340
2362
  body: import("zod").ZodObject<{
2341
2363
  userId: import("zod").ZodCoercedString<unknown>;
2342
2364
  }, import("zod/v4/core").$strip>;
2343
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2365
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2344
2366
  session: {
2345
- user: import("better-auth/plugins").UserWithRole;
2367
+ user: import("better-auth/client/plugins").UserWithRole;
2346
2368
  session: {
2347
2369
  id: string;
2348
2370
  createdAt: Date;
@@ -2354,7 +2376,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2354
2376
  userAgent?: string | null | undefined;
2355
2377
  };
2356
2378
  };
2357
- }>)[];
2379
+ }>>[];
2358
2380
  metadata: {
2359
2381
  openapi: {
2360
2382
  operationId: string;
@@ -2380,7 +2402,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2380
2402
  };
2381
2403
  };
2382
2404
  }, {
2383
- user: import("better-auth/plugins").UserWithRole;
2405
+ user: import("better-auth/client/plugins").UserWithRole;
2384
2406
  }>;
2385
2407
  banUser: StrictEndpoint<"/admin/ban-user", {
2386
2408
  method: "POST";
@@ -2389,9 +2411,9 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2389
2411
  banReason: import("zod").ZodOptional<import("zod").ZodString>;
2390
2412
  banExpiresIn: import("zod").ZodOptional<import("zod").ZodNumber>;
2391
2413
  }, import("zod/v4/core").$strip>;
2392
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2414
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2393
2415
  session: {
2394
- user: import("better-auth/plugins").UserWithRole;
2416
+ user: import("better-auth/client/plugins").UserWithRole;
2395
2417
  session: {
2396
2418
  id: string;
2397
2419
  createdAt: Date;
@@ -2403,7 +2425,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2403
2425
  userAgent?: string | null | undefined;
2404
2426
  };
2405
2427
  };
2406
- }>)[];
2428
+ }>>[];
2407
2429
  metadata: {
2408
2430
  openapi: {
2409
2431
  operationId: string;
@@ -2429,16 +2451,16 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2429
2451
  };
2430
2452
  };
2431
2453
  }, {
2432
- user: import("better-auth/plugins").UserWithRole;
2454
+ user: import("better-auth/client/plugins").UserWithRole;
2433
2455
  }>;
2434
2456
  impersonateUser: StrictEndpoint<"/admin/impersonate-user", {
2435
2457
  method: "POST";
2436
2458
  body: import("zod").ZodObject<{
2437
2459
  userId: import("zod").ZodCoercedString<unknown>;
2438
2460
  }, import("zod/v4/core").$strip>;
2439
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2461
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2440
2462
  session: {
2441
- user: import("better-auth/plugins").UserWithRole;
2463
+ user: import("better-auth/client/plugins").UserWithRole;
2442
2464
  session: {
2443
2465
  id: string;
2444
2466
  createdAt: Date;
@@ -2450,7 +2472,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2450
2472
  userAgent?: string | null | undefined;
2451
2473
  };
2452
2474
  };
2453
- }>)[];
2475
+ }>>[];
2454
2476
  metadata: {
2455
2477
  openapi: {
2456
2478
  operationId: string;
@@ -2489,7 +2511,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2489
2511
  ipAddress?: string | null | undefined;
2490
2512
  userAgent?: string | null | undefined;
2491
2513
  };
2492
- user: import("better-auth/plugins").UserWithRole;
2514
+ user: import("better-auth/client/plugins").UserWithRole;
2493
2515
  }>;
2494
2516
  stopImpersonating: StrictEndpoint<"/admin/stop-impersonating", {
2495
2517
  method: "POST";
@@ -2520,9 +2542,9 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2520
2542
  body: import("zod").ZodObject<{
2521
2543
  sessionToken: import("zod").ZodString;
2522
2544
  }, import("zod/v4/core").$strip>;
2523
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2545
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2524
2546
  session: {
2525
- user: import("better-auth/plugins").UserWithRole;
2547
+ user: import("better-auth/client/plugins").UserWithRole;
2526
2548
  session: {
2527
2549
  id: string;
2528
2550
  createdAt: Date;
@@ -2534,7 +2556,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2534
2556
  userAgent?: string | null | undefined;
2535
2557
  };
2536
2558
  };
2537
- }>)[];
2559
+ }>>[];
2538
2560
  metadata: {
2539
2561
  openapi: {
2540
2562
  operationId: string;
@@ -2567,9 +2589,9 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2567
2589
  body: import("zod").ZodObject<{
2568
2590
  userId: import("zod").ZodCoercedString<unknown>;
2569
2591
  }, import("zod/v4/core").$strip>;
2570
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2592
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2571
2593
  session: {
2572
- user: import("better-auth/plugins").UserWithRole;
2594
+ user: import("better-auth/client/plugins").UserWithRole;
2573
2595
  session: {
2574
2596
  id: string;
2575
2597
  createdAt: Date;
@@ -2581,7 +2603,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2581
2603
  userAgent?: string | null | undefined;
2582
2604
  };
2583
2605
  };
2584
- }>)[];
2606
+ }>>[];
2585
2607
  metadata: {
2586
2608
  openapi: {
2587
2609
  operationId: string;
@@ -2614,9 +2636,9 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2614
2636
  body: import("zod").ZodObject<{
2615
2637
  userId: import("zod").ZodCoercedString<unknown>;
2616
2638
  }, import("zod/v4/core").$strip>;
2617
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2639
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2618
2640
  session: {
2619
- user: import("better-auth/plugins").UserWithRole;
2641
+ user: import("better-auth/client/plugins").UserWithRole;
2620
2642
  session: {
2621
2643
  id: string;
2622
2644
  createdAt: Date;
@@ -2628,7 +2650,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2628
2650
  userAgent?: string | null | undefined;
2629
2651
  };
2630
2652
  };
2631
- }>)[];
2653
+ }>>[];
2632
2654
  metadata: {
2633
2655
  openapi: {
2634
2656
  operationId: string;
@@ -2662,9 +2684,9 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2662
2684
  newPassword: import("zod").ZodString;
2663
2685
  userId: import("zod").ZodCoercedString<unknown>;
2664
2686
  }, import("zod/v4/core").$strip>;
2665
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2687
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2666
2688
  session: {
2667
- user: import("better-auth/plugins").UserWithRole;
2689
+ user: import("better-auth/client/plugins").UserWithRole;
2668
2690
  session: {
2669
2691
  id: string;
2670
2692
  createdAt: Date;
@@ -2676,7 +2698,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2676
2698
  userAgent?: string | null | undefined;
2677
2699
  };
2678
2700
  };
2679
- }>)[];
2701
+ }>>[];
2680
2702
  metadata: {
2681
2703
  openapi: {
2682
2704
  operationId: string;
@@ -2834,21 +2856,21 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2834
2856
  };
2835
2857
  };
2836
2858
  options: NoInfer<{
2837
- ac: import("better-auth/plugins").AccessControl<{
2859
+ ac: import("better-auth/client").AccessControl<{
2838
2860
  readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
2839
2861
  readonly session: readonly ["list", "revoke", "delete"];
2840
2862
  }>;
2841
2863
  roles: {
2842
- admin: import("better-auth/plugins").Role;
2843
- user: import("better-auth/plugins").Role;
2864
+ admin: import("better-auth/client").Role;
2865
+ user: import("better-auth/client").Role;
2844
2866
  };
2845
2867
  }>;
2846
2868
  };
2847
2869
  getActions: () => {
2848
2870
  admin: {
2849
- checkRolePermission: <R extends import("better-auth/client/plugins").AdminClientOptions extends {
2871
+ checkRolePermission: <R extends (import("better-auth/client/plugins").AdminClientOptions extends {
2850
2872
  roles: any;
2851
- } ? string | number | symbol : "admin" | "user">(data: {
2873
+ } ? string | number | symbol : "admin" | "user")>(data: {
2852
2874
  permissions: {
2853
2875
  readonly user?: ("ban" | "create" | "delete" | "get" | "impersonate" | "impersonate-admins" | "list" | "set-email" | "set-password" | "set-role" | "update")[] | undefined;
2854
2876
  readonly session?: ("delete" | "list" | "revoke")[] | undefined;
@@ -2895,7 +2917,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2895
2917
  } | {
2896
2918
  id: "anonymous";
2897
2919
  version: string;
2898
- $InferServerPlugin: ReturnType<(options?: import("better-auth/plugins").AnonymousOptions | undefined) => {
2920
+ $InferServerPlugin: ReturnType<(options?: import("better-auth/plugins/anonymous").AnonymousOptions | undefined) => {
2899
2921
  id: "anonymous";
2900
2922
  version: string;
2901
2923
  endpoints: {
@@ -2940,7 +2962,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2940
2962
  }>;
2941
2963
  deleteAnonymousUser: StrictEndpoint<"/delete-anonymous-user", {
2942
2964
  method: "POST";
2943
- use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2965
+ use: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
2944
2966
  session: {
2945
2967
  session: Record<string, any> & {
2946
2968
  id: string;
@@ -2962,7 +2984,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
2962
2984
  image?: string | null | undefined;
2963
2985
  };
2964
2986
  };
2965
- }>)[];
2987
+ }>>[];
2966
2988
  metadata: {
2967
2989
  openapi: {
2968
2990
  description: string;
@@ -3022,12 +3044,16 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3022
3044
  }>;
3023
3045
  };
3024
3046
  hooks: {
3047
+ before: {
3048
+ matcher(ctx: import("better-auth").HookEndpointContext): boolean;
3049
+ handler: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>>;
3050
+ }[];
3025
3051
  after: {
3026
3052
  matcher(ctx: import("better-auth").HookEndpointContext): boolean;
3027
- handler: (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>;
3053
+ handler: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>>;
3028
3054
  }[];
3029
3055
  };
3030
- options: import("better-auth/plugins").AnonymousOptions | undefined;
3056
+ options: import("better-auth/plugins/anonymous").AnonymousOptions | undefined;
3031
3057
  schema: {
3032
3058
  user: {
3033
3059
  fields: {
@@ -3072,7 +3098,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3072
3098
  } | {
3073
3099
  id: "device-authorization";
3074
3100
  version: string;
3075
- $InferServerPlugin: ReturnType<(options?: Partial<import("better-auth/plugins").DeviceAuthorizationOptions>) => {
3101
+ $InferServerPlugin: {
3076
3102
  id: "device-authorization";
3077
3103
  version: string;
3078
3104
  schema: {
@@ -3115,24 +3141,42 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3115
3141
  required: false;
3116
3142
  };
3117
3143
  };
3144
+ indexes: {
3145
+ fields: [string];
3146
+ unique: true;
3147
+ }[];
3118
3148
  };
3119
3149
  };
3120
3150
  endpoints: {
3121
3151
  deviceCode: StrictEndpoint<"/device/code", {
3122
3152
  method: "POST";
3153
+ cloneRequest: true;
3123
3154
  body: import("zod").ZodObject<{
3124
3155
  client_id: import("zod").ZodString;
3125
3156
  user_id: import("zod").ZodOptional<import("zod").ZodString>;
3126
3157
  scope: import("zod").ZodOptional<import("zod").ZodString>;
3158
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
3159
+ user_id: import("zod").ZodOptional<import("zod").ZodString>;
3160
+ scope: import("zod").ZodOptional<import("zod").ZodString>;
3161
+ client_id: import("zod").ZodOptional<import("zod").ZodString>;
3127
3162
  }, import("zod/v4/core").$strip>;
3128
3163
  error: import("zod").ZodObject<{
3129
3164
  error: import("zod").ZodEnum<{
3130
- invalid_request: "invalid_request";
3131
3165
  invalid_client: "invalid_client";
3166
+ invalid_request: "invalid_request";
3167
+ invalid_scope: "invalid_scope";
3168
+ server_error: "server_error";
3169
+ unauthorized_client: "unauthorized_client";
3132
3170
  }>;
3133
3171
  error_description: import("zod").ZodString;
3134
3172
  }, import("zod/v4/core").$strip>;
3173
+ onValidationError: ({ issues, message }: {
3174
+ message: string;
3175
+ issues: readonly StandardSchemaV1.Issue[];
3176
+ }) => never;
3135
3177
  metadata: {
3178
+ noStore: boolean;
3179
+ allowedMediaTypes: string[];
3136
3180
  openapi: {
3137
3181
  description: string;
3138
3182
  responses: {
@@ -3175,6 +3219,25 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3175
3219
  };
3176
3220
  };
3177
3221
  400: {
3222
+ description: string;
3223
+ content: {
3224
+ "application/json": {
3225
+ schema: {
3226
+ type: "object";
3227
+ properties: {
3228
+ error: {
3229
+ type: string;
3230
+ enum: ["invalid_request", "invalid_client", "unauthorized_client", "invalid_scope"];
3231
+ };
3232
+ error_description: {
3233
+ type: string;
3234
+ };
3235
+ };
3236
+ };
3237
+ };
3238
+ };
3239
+ };
3240
+ 500: {
3178
3241
  description: string;
3179
3242
  content: {
3180
3243
  "application/json": {
@@ -3223,6 +3286,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3223
3286
  error_description: import("zod").ZodString;
3224
3287
  }, import("zod/v4/core").$strip>;
3225
3288
  metadata: {
3289
+ noStore: boolean;
3226
3290
  openapi: {
3227
3291
  description: string;
3228
3292
  responses: {
@@ -3303,6 +3367,14 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3303
3367
  enum: string[];
3304
3368
  description: string;
3305
3369
  };
3370
+ client_id: {
3371
+ type: string;
3372
+ description: string;
3373
+ };
3374
+ scope: {
3375
+ type: string;
3376
+ description: string;
3377
+ };
3306
3378
  };
3307
3379
  };
3308
3380
  };
@@ -3314,7 +3386,9 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3314
3386
  }, {
3315
3387
  user_code: string;
3316
3388
  status: string;
3317
- }>;
3389
+ client_id?: string | undefined;
3390
+ scope?: string | undefined;
3391
+ } & Partial<Record<never, never>>>;
3318
3392
  deviceApprove: StrictEndpoint<"/device/approve", {
3319
3393
  method: "POST";
3320
3394
  body: import("zod").ZodObject<{
@@ -3397,6 +3471,11 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3397
3471
  success: boolean;
3398
3472
  }>;
3399
3473
  };
3474
+ rateLimit: {
3475
+ pathMatcher(path: string): path is "/device";
3476
+ window: number;
3477
+ max: number;
3478
+ }[];
3400
3479
  $ERROR_CODES: {
3401
3480
  USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
3402
3481
  FAILED_TO_CREATE_SESSION: import("better-auth").RawError<"FAILED_TO_CREATE_SESSION">;
@@ -3412,9 +3491,12 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3412
3491
  INVALID_DEVICE_CODE_STATUS: import("better-auth").RawError<"INVALID_DEVICE_CODE_STATUS">;
3413
3492
  AUTHENTICATION_REQUIRED: import("better-auth").RawError<"AUTHENTICATION_REQUIRED">;
3414
3493
  };
3415
- options: Partial<{
3416
- expiresIn: import("better-auth/plugins").TimeString;
3417
- interval: import("better-auth/plugins").TimeString;
3494
+ options: {
3495
+ grant: import("better-auth/plugins/device-authorization").DeviceAuthorizationGrant<Readonly<{
3496
+ [k: string]: import("zod/v4/core").$ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
3497
+ }>, Record<string, unknown>> | undefined;
3498
+ expiresIn: import("better-auth/plugins/device-authorization").TimeString;
3499
+ interval: import("better-auth/plugins/device-authorization").TimeString;
3418
3500
  deviceCodeLength: number;
3419
3501
  userCodeLength: number;
3420
3502
  generateDeviceCode?: (() => string | Promise<string>) | undefined;
@@ -3438,8 +3520,8 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3438
3520
  } | undefined;
3439
3521
  } | undefined;
3440
3522
  } | undefined;
3441
- }>;
3442
- }>;
3523
+ };
3524
+ };
3443
3525
  pathMethods: {
3444
3526
  "/device/code": "POST";
3445
3527
  "/device/token": "POST";
@@ -3450,8 +3532,8 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3450
3532
  } | {
3451
3533
  id: "organization";
3452
3534
  version: string;
3453
- $InferServerPlugin: import("better-auth/plugins").OrganizationPlugin<{
3454
- ac: import("better-auth/plugins").AccessControl<{
3535
+ $InferServerPlugin: import("better-auth/client").OrganizationPlugin<{
3536
+ ac: import("better-auth/client").AccessControl<{
3455
3537
  readonly organization: readonly ["update", "delete"];
3456
3538
  readonly member: readonly ["create", "update", "delete"];
3457
3539
  readonly invitation: readonly ["create", "cancel"];
@@ -3459,9 +3541,9 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3459
3541
  readonly ac: readonly ["create", "read", "update", "delete"];
3460
3542
  }>;
3461
3543
  roles: {
3462
- admin: import("better-auth/plugins").Role;
3463
- member: import("better-auth/plugins").Role;
3464
- owner: import("better-auth/plugins").Role;
3544
+ admin: import("better-auth/client").Role;
3545
+ member: import("better-auth/client").Role;
3546
+ owner: import("better-auth/client").Role;
3465
3547
  };
3466
3548
  teams: {
3467
3549
  enabled: true;
@@ -3493,7 +3575,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3493
3575
  organizationId: string;
3494
3576
  email: string;
3495
3577
  role: "admin" | "member" | "owner";
3496
- status: import("better-auth/plugins").InvitationStatus;
3578
+ status: import("better-auth/client").InvitationStatus;
3497
3579
  inviterId: string;
3498
3580
  expiresAt: Date;
3499
3581
  createdAt: Date;
@@ -3527,7 +3609,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3527
3609
  organizationId: string;
3528
3610
  email: string;
3529
3611
  role: "admin" | "member" | "owner";
3530
- status: import("better-auth/plugins").InvitationStatus;
3612
+ status: import("better-auth/client").InvitationStatus;
3531
3613
  inviterId: string;
3532
3614
  expiresAt: Date;
3533
3615
  createdAt: Date;
@@ -3556,13 +3638,13 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3556
3638
  };
3557
3639
  };
3558
3640
  organization: {
3559
- checkRolePermission: <R extends {
3641
+ checkRolePermission: <R extends ({
3560
3642
  teams: {
3561
3643
  enabled: true;
3562
3644
  };
3563
3645
  } extends {
3564
3646
  roles: any;
3565
- } ? string | number | symbol : "admin" | "member" | "owner">(data: {
3647
+ } ? string | number | symbol : "admin" | "member" | "owner")>(data: {
3566
3648
  permissions: {
3567
3649
  readonly organization?: ("delete" | "update")[] | undefined;
3568
3650
  readonly member?: ("create" | "delete" | "update")[] | undefined;
@@ -3607,7 +3689,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3607
3689
  organizationId: string;
3608
3690
  email: string;
3609
3691
  role: "admin" | "member" | "owner";
3610
- status: import("better-auth/plugins").InvitationStatus;
3692
+ status: import("better-auth/client").InvitationStatus;
3611
3693
  inviterId: string;
3612
3694
  expiresAt: Date;
3613
3695
  createdAt: Date;
@@ -3717,7 +3799,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3717
3799
  } | {
3718
3800
  id: "phoneNumber";
3719
3801
  version: string;
3720
- $InferServerPlugin: ReturnType<(options?: import("better-auth/plugins").PhoneNumberOptions | undefined) => {
3802
+ $InferServerPlugin: ReturnType<(options?: import("better-auth/plugins/phone-number").PhoneNumberOptions | undefined) => {
3721
3803
  id: "phone-number";
3722
3804
  version: string;
3723
3805
  init(): {
@@ -3753,7 +3835,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3753
3835
  hooks: {
3754
3836
  before: {
3755
3837
  matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
3756
- handler: (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<never>;
3838
+ handler: Middleware<MiddlewareOptions, (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<never>>;
3757
3839
  }[];
3758
3840
  };
3759
3841
  endpoints: {
@@ -3795,7 +3877,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3795
3877
  };
3796
3878
  }, {
3797
3879
  token: string;
3798
- user: import("better-auth/plugins").UserWithPhoneNumber;
3880
+ user: import("better-auth/plugins/phone-number").UserWithPhoneNumber;
3799
3881
  }>;
3800
3882
  sendPhoneNumberOTP: StrictEndpoint<"/phone-number/send-otp", {
3801
3883
  method: "POST";
@@ -3828,6 +3910,18 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3828
3910
  }, {
3829
3911
  message: string;
3830
3912
  }>;
3913
+ consumePhoneNumberOTP: StrictEndpoint<string, {
3914
+ method: "POST";
3915
+ body: import("zod").ZodObject<{
3916
+ phoneNumber: import("zod").ZodString;
3917
+ code: import("zod").ZodString;
3918
+ }, import("zod/v4/core").$strip>;
3919
+ metadata: {
3920
+ readonly scope: "server";
3921
+ };
3922
+ }, {
3923
+ status: boolean;
3924
+ }>;
3831
3925
  verifyPhoneNumber: StrictEndpoint<"/phone-number/verify", {
3832
3926
  method: "POST";
3833
3927
  body: import("zod").ZodIntersection<import("zod").ZodObject<{
@@ -3933,11 +4027,11 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
3933
4027
  emailVerified: boolean;
3934
4028
  name: string;
3935
4029
  image?: string | null | undefined;
3936
- } & import("better-auth/plugins").UserWithPhoneNumber;
4030
+ } & import("better-auth/plugins/phone-number").UserWithPhoneNumber;
3937
4031
  } | {
3938
4032
  status: boolean;
3939
4033
  token: null;
3940
- user: import("better-auth/plugins").UserWithPhoneNumber;
4034
+ user: import("better-auth/plugins/phone-number").UserWithPhoneNumber;
3941
4035
  }>;
3942
4036
  requestPasswordResetPhoneNumber: StrictEndpoint<"/phone-number/request-password-reset", {
3943
4037
  method: "POST";
@@ -4032,7 +4126,7 @@ declare function createAuthClient(options?: CreateAuthClientOptions): import("be
4032
4126
  window: number;
4033
4127
  max: number;
4034
4128
  }[];
4035
- options: import("better-auth/plugins").PhoneNumberOptions | undefined;
4129
+ options: import("better-auth/plugins/phone-number").PhoneNumberOptions | undefined;
4036
4130
  $ERROR_CODES: {
4037
4131
  OTP_EXPIRED: import("better-auth").RawError<"OTP_EXPIRED">;
4038
4132
  INVALID_OTP: import("better-auth").RawError<"INVALID_OTP">;