better-auth 1.4.21 → 1.4.22
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/api/index.d.mts +407 -407
- package/dist/api/middlewares/origin-check.d.mts +4 -4
- package/dist/api/routes/account.d.mts +11 -11
- package/dist/api/routes/callback.d.mts +2 -2
- package/dist/api/routes/email-verification.d.mts +4 -4
- package/dist/api/routes/error.d.mts +2 -2
- package/dist/api/routes/ok.d.mts +2 -2
- package/dist/api/routes/password.d.mts +7 -7
- package/dist/api/routes/sign-in.d.mts +4 -4
- package/dist/api/routes/sign-out.d.mts +2 -2
- package/dist/api/routes/sign-up.d.mts +3 -3
- package/dist/api/routes/update-user.d.mts +13 -13
- package/dist/client/lynx/index.d.mts +15 -15
- package/dist/client/react/index.d.mts +15 -15
- package/dist/client/solid/index.d.mts +13 -13
- package/dist/client/svelte/index.d.mts +13 -13
- package/dist/client/vanilla.d.mts +15 -15
- package/dist/client/vue/index.d.mts +15 -15
- package/dist/db/field.d.mts +6 -6
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/svelte-kit.d.mts +2 -2
- package/dist/integrations/tanstack-start-solid.d.mts +4 -4
- package/dist/integrations/tanstack-start.d.mts +4 -4
- package/dist/plugins/admin/admin.d.mts +114 -114
- package/dist/plugins/anonymous/index.d.mts +5 -5
- package/dist/plugins/api-key/index.d.mts +79 -79
- package/dist/plugins/bearer/index.d.mts +6 -6
- package/dist/plugins/captcha/index.d.mts +2 -2
- package/dist/plugins/custom-session/index.d.mts +5 -5
- package/dist/plugins/device-authorization/index.d.mts +6 -6
- package/dist/plugins/email-otp/index.d.mts +52 -52
- package/dist/plugins/generic-oauth/index.d.mts +32 -32
- package/dist/plugins/haveibeenpwned/index.d.mts +3 -3
- package/dist/plugins/jwt/client.d.mts +2 -2
- package/dist/plugins/jwt/index.d.mts +7 -7
- package/dist/plugins/last-login-method/index.d.mts +4 -4
- package/dist/plugins/magic-link/index.d.mts +4 -4
- package/dist/plugins/mcp/index.d.mts +10 -10
- package/dist/plugins/multi-session/index.d.mts +9 -9
- package/dist/plugins/oauth-proxy/index.d.mts +8 -8
- package/dist/plugins/oidc-provider/index.d.mts +13 -13
- package/dist/plugins/one-tap/client.d.mts +4 -4
- package/dist/plugins/one-tap/index.d.mts +2 -2
- package/dist/plugins/one-time-token/index.d.mts +5 -5
- package/dist/plugins/open-api/index.d.mts +3 -3
- package/dist/plugins/organization/adapter.d.mts +24 -24
- package/dist/plugins/organization/client.d.mts +8 -8
- package/dist/plugins/organization/organization.d.mts +7 -7
- package/dist/plugins/organization/routes/crud-access-control.d.mts +22 -22
- package/dist/plugins/organization/routes/crud-invites.d.mts +69 -69
- package/dist/plugins/organization/routes/crud-members.d.mts +67 -67
- package/dist/plugins/organization/routes/crud-org.d.mts +59 -59
- package/dist/plugins/organization/routes/crud-team.d.mts +79 -79
- package/dist/plugins/phone-number/index.d.mts +33 -33
- package/dist/plugins/siwe/index.d.mts +3 -3
- package/dist/plugins/two-factor/backup-codes/index.d.mts +5 -5
- package/dist/plugins/two-factor/index.d.mts +16 -16
- package/dist/plugins/two-factor/otp/index.d.mts +3 -3
- package/dist/plugins/two-factor/totp/index.d.mts +5 -5
- package/dist/plugins/username/index.d.mts +9 -9
- package/dist/plugins/username/schema.d.mts +3 -3
- package/dist/test-utils/test-instance.d.mts +1225 -1225
- package/package.json +3 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AccessControl, Statements } from "../access/types.mjs";
|
|
2
2
|
import { AdminOptions, InferAdminRolesFromOption, SessionWithImpersonatedBy, UserWithRole } from "./types.mjs";
|
|
3
3
|
import "../index.mjs";
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
4
|
+
import * as _better_auth_core40 from "@better-auth/core";
|
|
5
|
+
import * as _better_auth_core_db23 from "@better-auth/core/db";
|
|
6
|
+
import * as better_call701 from "better-call";
|
|
7
|
+
import * as zod1930 from "zod";
|
|
8
|
+
import * as zod_v4_core269 from "zod/v4/core";
|
|
9
9
|
|
|
10
10
|
//#region src/plugins/admin/admin.d.ts
|
|
11
11
|
declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
@@ -48,7 +48,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
48
48
|
token: string;
|
|
49
49
|
ipAddress?: string | null | undefined;
|
|
50
50
|
userAgent?: string | null | undefined;
|
|
51
|
-
} & Record<string, unknown>, ctx:
|
|
51
|
+
} & Record<string, unknown>, ctx: _better_auth_core40.GenericEndpointContext | null): Promise<void>;
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
};
|
|
@@ -56,22 +56,22 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
56
56
|
};
|
|
57
57
|
hooks: {
|
|
58
58
|
after: {
|
|
59
|
-
matcher(context:
|
|
60
|
-
handler: (inputContext:
|
|
59
|
+
matcher(context: _better_auth_core40.HookEndpointContext): boolean;
|
|
60
|
+
handler: (inputContext: better_call701.MiddlewareInputContext<better_call701.MiddlewareOptions>) => Promise<SessionWithImpersonatedBy[] | undefined>;
|
|
61
61
|
}[];
|
|
62
62
|
};
|
|
63
63
|
endpoints: {
|
|
64
|
-
setRole:
|
|
64
|
+
setRole: better_call701.StrictEndpoint<"/admin/set-role", {
|
|
65
65
|
method: "POST";
|
|
66
|
-
body:
|
|
67
|
-
userId:
|
|
68
|
-
role:
|
|
69
|
-
},
|
|
66
|
+
body: zod1930.ZodObject<{
|
|
67
|
+
userId: zod1930.ZodCoercedString<unknown>;
|
|
68
|
+
role: zod1930.ZodUnion<readonly [zod1930.ZodString, zod1930.ZodArray<zod1930.ZodString>]>;
|
|
69
|
+
}, zod_v4_core269.$strip>;
|
|
70
70
|
requireHeaders: true;
|
|
71
|
-
use: ((inputContext:
|
|
71
|
+
use: ((inputContext: better_call701.MiddlewareInputContext<better_call701.MiddlewareOptions>) => Promise<{
|
|
72
72
|
session: {
|
|
73
73
|
user: UserWithRole;
|
|
74
|
-
session:
|
|
74
|
+
session: _better_auth_core_db23.Session;
|
|
75
75
|
};
|
|
76
76
|
}>)[];
|
|
77
77
|
metadata: {
|
|
@@ -107,15 +107,15 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
107
107
|
}, {
|
|
108
108
|
user: UserWithRole;
|
|
109
109
|
}>;
|
|
110
|
-
getUser:
|
|
110
|
+
getUser: better_call701.StrictEndpoint<"/admin/get-user", {
|
|
111
111
|
method: "GET";
|
|
112
|
-
query:
|
|
113
|
-
id:
|
|
114
|
-
},
|
|
115
|
-
use: ((inputContext:
|
|
112
|
+
query: zod1930.ZodObject<{
|
|
113
|
+
id: zod1930.ZodString;
|
|
114
|
+
}, zod_v4_core269.$strip>;
|
|
115
|
+
use: ((inputContext: better_call701.MiddlewareInputContext<better_call701.MiddlewareOptions>) => Promise<{
|
|
116
116
|
session: {
|
|
117
117
|
user: UserWithRole;
|
|
118
|
-
session:
|
|
118
|
+
session: _better_auth_core_db23.Session;
|
|
119
119
|
};
|
|
120
120
|
}>)[];
|
|
121
121
|
metadata: {
|
|
@@ -143,15 +143,15 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
143
143
|
};
|
|
144
144
|
};
|
|
145
145
|
}, UserWithRole>;
|
|
146
|
-
createUser:
|
|
146
|
+
createUser: better_call701.StrictEndpoint<"/admin/create-user", {
|
|
147
147
|
method: "POST";
|
|
148
|
-
body:
|
|
149
|
-
email:
|
|
150
|
-
password:
|
|
151
|
-
name:
|
|
152
|
-
role:
|
|
153
|
-
data:
|
|
154
|
-
},
|
|
148
|
+
body: zod1930.ZodObject<{
|
|
149
|
+
email: zod1930.ZodString;
|
|
150
|
+
password: zod1930.ZodOptional<zod1930.ZodString>;
|
|
151
|
+
name: zod1930.ZodString;
|
|
152
|
+
role: zod1930.ZodOptional<zod1930.ZodUnion<readonly [zod1930.ZodString, zod1930.ZodArray<zod1930.ZodString>]>>;
|
|
153
|
+
data: zod1930.ZodOptional<zod1930.ZodRecord<zod1930.ZodString, zod1930.ZodAny>>;
|
|
154
|
+
}, zod_v4_core269.$strip>;
|
|
155
155
|
metadata: {
|
|
156
156
|
openapi: {
|
|
157
157
|
operationId: string;
|
|
@@ -188,16 +188,16 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
188
188
|
}, {
|
|
189
189
|
user: UserWithRole;
|
|
190
190
|
}>;
|
|
191
|
-
adminUpdateUser:
|
|
191
|
+
adminUpdateUser: better_call701.StrictEndpoint<"/admin/update-user", {
|
|
192
192
|
method: "POST";
|
|
193
|
-
body:
|
|
194
|
-
userId:
|
|
195
|
-
data:
|
|
196
|
-
},
|
|
197
|
-
use: ((inputContext:
|
|
193
|
+
body: zod1930.ZodObject<{
|
|
194
|
+
userId: zod1930.ZodCoercedString<unknown>;
|
|
195
|
+
data: zod1930.ZodRecord<zod1930.ZodAny, zod1930.ZodAny>;
|
|
196
|
+
}, zod_v4_core269.$strip>;
|
|
197
|
+
use: ((inputContext: better_call701.MiddlewareInputContext<better_call701.MiddlewareOptions>) => Promise<{
|
|
198
198
|
session: {
|
|
199
199
|
user: UserWithRole;
|
|
200
|
-
session:
|
|
200
|
+
session: _better_auth_core_db23.Session;
|
|
201
201
|
};
|
|
202
202
|
}>)[];
|
|
203
203
|
metadata: {
|
|
@@ -225,35 +225,35 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
225
225
|
};
|
|
226
226
|
};
|
|
227
227
|
}, UserWithRole>;
|
|
228
|
-
listUsers:
|
|
228
|
+
listUsers: better_call701.StrictEndpoint<"/admin/list-users", {
|
|
229
229
|
method: "GET";
|
|
230
|
-
use: ((inputContext:
|
|
230
|
+
use: ((inputContext: better_call701.MiddlewareInputContext<better_call701.MiddlewareOptions>) => Promise<{
|
|
231
231
|
session: {
|
|
232
232
|
user: UserWithRole;
|
|
233
|
-
session:
|
|
233
|
+
session: _better_auth_core_db23.Session;
|
|
234
234
|
};
|
|
235
235
|
}>)[];
|
|
236
|
-
query:
|
|
237
|
-
searchValue:
|
|
238
|
-
searchField:
|
|
236
|
+
query: zod1930.ZodObject<{
|
|
237
|
+
searchValue: zod1930.ZodOptional<zod1930.ZodString>;
|
|
238
|
+
searchField: zod1930.ZodOptional<zod1930.ZodEnum<{
|
|
239
239
|
name: "name";
|
|
240
240
|
email: "email";
|
|
241
241
|
}>>;
|
|
242
|
-
searchOperator:
|
|
242
|
+
searchOperator: zod1930.ZodOptional<zod1930.ZodEnum<{
|
|
243
243
|
contains: "contains";
|
|
244
244
|
starts_with: "starts_with";
|
|
245
245
|
ends_with: "ends_with";
|
|
246
246
|
}>>;
|
|
247
|
-
limit:
|
|
248
|
-
offset:
|
|
249
|
-
sortBy:
|
|
250
|
-
sortDirection:
|
|
247
|
+
limit: zod1930.ZodOptional<zod1930.ZodUnion<[zod1930.ZodString, zod1930.ZodNumber]>>;
|
|
248
|
+
offset: zod1930.ZodOptional<zod1930.ZodUnion<[zod1930.ZodString, zod1930.ZodNumber]>>;
|
|
249
|
+
sortBy: zod1930.ZodOptional<zod1930.ZodString>;
|
|
250
|
+
sortDirection: zod1930.ZodOptional<zod1930.ZodEnum<{
|
|
251
251
|
asc: "asc";
|
|
252
252
|
desc: "desc";
|
|
253
253
|
}>>;
|
|
254
|
-
filterField:
|
|
255
|
-
filterValue:
|
|
256
|
-
filterOperator:
|
|
254
|
+
filterField: zod1930.ZodOptional<zod1930.ZodString>;
|
|
255
|
+
filterValue: zod1930.ZodOptional<zod1930.ZodUnion<[zod1930.ZodUnion<[zod1930.ZodString, zod1930.ZodNumber]>, zod1930.ZodBoolean]>>;
|
|
256
|
+
filterOperator: zod1930.ZodOptional<zod1930.ZodEnum<{
|
|
257
257
|
eq: "eq";
|
|
258
258
|
ne: "ne";
|
|
259
259
|
lt: "lt";
|
|
@@ -262,7 +262,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
262
262
|
gte: "gte";
|
|
263
263
|
contains: "contains";
|
|
264
264
|
}>>;
|
|
265
|
-
},
|
|
265
|
+
}, zod_v4_core269.$strip>;
|
|
266
266
|
metadata: {
|
|
267
267
|
openapi: {
|
|
268
268
|
operationId: string;
|
|
@@ -304,17 +304,17 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
304
304
|
users: UserWithRole[];
|
|
305
305
|
total: number;
|
|
306
306
|
}>;
|
|
307
|
-
listUserSessions:
|
|
307
|
+
listUserSessions: better_call701.StrictEndpoint<"/admin/list-user-sessions", {
|
|
308
308
|
method: "POST";
|
|
309
|
-
use: ((inputContext:
|
|
309
|
+
use: ((inputContext: better_call701.MiddlewareInputContext<better_call701.MiddlewareOptions>) => Promise<{
|
|
310
310
|
session: {
|
|
311
311
|
user: UserWithRole;
|
|
312
|
-
session:
|
|
312
|
+
session: _better_auth_core_db23.Session;
|
|
313
313
|
};
|
|
314
314
|
}>)[];
|
|
315
|
-
body:
|
|
316
|
-
userId:
|
|
317
|
-
},
|
|
315
|
+
body: zod1930.ZodObject<{
|
|
316
|
+
userId: zod1930.ZodCoercedString<unknown>;
|
|
317
|
+
}, zod_v4_core269.$strip>;
|
|
318
318
|
metadata: {
|
|
319
319
|
openapi: {
|
|
320
320
|
operationId: string;
|
|
@@ -345,15 +345,15 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
345
345
|
}, {
|
|
346
346
|
sessions: SessionWithImpersonatedBy[];
|
|
347
347
|
}>;
|
|
348
|
-
unbanUser:
|
|
348
|
+
unbanUser: better_call701.StrictEndpoint<"/admin/unban-user", {
|
|
349
349
|
method: "POST";
|
|
350
|
-
body:
|
|
351
|
-
userId:
|
|
352
|
-
},
|
|
353
|
-
use: ((inputContext:
|
|
350
|
+
body: zod1930.ZodObject<{
|
|
351
|
+
userId: zod1930.ZodCoercedString<unknown>;
|
|
352
|
+
}, zod_v4_core269.$strip>;
|
|
353
|
+
use: ((inputContext: better_call701.MiddlewareInputContext<better_call701.MiddlewareOptions>) => Promise<{
|
|
354
354
|
session: {
|
|
355
355
|
user: UserWithRole;
|
|
356
|
-
session:
|
|
356
|
+
session: _better_auth_core_db23.Session;
|
|
357
357
|
};
|
|
358
358
|
}>)[];
|
|
359
359
|
metadata: {
|
|
@@ -383,17 +383,17 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
383
383
|
}, {
|
|
384
384
|
user: UserWithRole;
|
|
385
385
|
}>;
|
|
386
|
-
banUser:
|
|
386
|
+
banUser: better_call701.StrictEndpoint<"/admin/ban-user", {
|
|
387
387
|
method: "POST";
|
|
388
|
-
body:
|
|
389
|
-
userId:
|
|
390
|
-
banReason:
|
|
391
|
-
banExpiresIn:
|
|
392
|
-
},
|
|
393
|
-
use: ((inputContext:
|
|
388
|
+
body: zod1930.ZodObject<{
|
|
389
|
+
userId: zod1930.ZodCoercedString<unknown>;
|
|
390
|
+
banReason: zod1930.ZodOptional<zod1930.ZodString>;
|
|
391
|
+
banExpiresIn: zod1930.ZodOptional<zod1930.ZodNumber>;
|
|
392
|
+
}, zod_v4_core269.$strip>;
|
|
393
|
+
use: ((inputContext: better_call701.MiddlewareInputContext<better_call701.MiddlewareOptions>) => Promise<{
|
|
394
394
|
session: {
|
|
395
395
|
user: UserWithRole;
|
|
396
|
-
session:
|
|
396
|
+
session: _better_auth_core_db23.Session;
|
|
397
397
|
};
|
|
398
398
|
}>)[];
|
|
399
399
|
metadata: {
|
|
@@ -423,15 +423,15 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
423
423
|
}, {
|
|
424
424
|
user: UserWithRole;
|
|
425
425
|
}>;
|
|
426
|
-
impersonateUser:
|
|
426
|
+
impersonateUser: better_call701.StrictEndpoint<"/admin/impersonate-user", {
|
|
427
427
|
method: "POST";
|
|
428
|
-
body:
|
|
429
|
-
userId:
|
|
430
|
-
},
|
|
431
|
-
use: ((inputContext:
|
|
428
|
+
body: zod1930.ZodObject<{
|
|
429
|
+
userId: zod1930.ZodCoercedString<unknown>;
|
|
430
|
+
}, zod_v4_core269.$strip>;
|
|
431
|
+
use: ((inputContext: better_call701.MiddlewareInputContext<better_call701.MiddlewareOptions>) => Promise<{
|
|
432
432
|
session: {
|
|
433
433
|
user: UserWithRole;
|
|
434
|
-
session:
|
|
434
|
+
session: _better_auth_core_db23.Session;
|
|
435
435
|
};
|
|
436
436
|
}>)[];
|
|
437
437
|
metadata: {
|
|
@@ -474,7 +474,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
474
474
|
};
|
|
475
475
|
user: UserWithRole;
|
|
476
476
|
}>;
|
|
477
|
-
stopImpersonating:
|
|
477
|
+
stopImpersonating: better_call701.StrictEndpoint<"/admin/stop-impersonating", {
|
|
478
478
|
method: "POST";
|
|
479
479
|
requireHeaders: true;
|
|
480
480
|
}, {
|
|
@@ -498,15 +498,15 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
498
498
|
image?: string | null | undefined;
|
|
499
499
|
} & Record<string, any>;
|
|
500
500
|
}>;
|
|
501
|
-
revokeUserSession:
|
|
501
|
+
revokeUserSession: better_call701.StrictEndpoint<"/admin/revoke-user-session", {
|
|
502
502
|
method: "POST";
|
|
503
|
-
body:
|
|
504
|
-
sessionToken:
|
|
505
|
-
},
|
|
506
|
-
use: ((inputContext:
|
|
503
|
+
body: zod1930.ZodObject<{
|
|
504
|
+
sessionToken: zod1930.ZodString;
|
|
505
|
+
}, zod_v4_core269.$strip>;
|
|
506
|
+
use: ((inputContext: better_call701.MiddlewareInputContext<better_call701.MiddlewareOptions>) => Promise<{
|
|
507
507
|
session: {
|
|
508
508
|
user: UserWithRole;
|
|
509
|
-
session:
|
|
509
|
+
session: _better_auth_core_db23.Session;
|
|
510
510
|
};
|
|
511
511
|
}>)[];
|
|
512
512
|
metadata: {
|
|
@@ -536,15 +536,15 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
536
536
|
}, {
|
|
537
537
|
success: boolean;
|
|
538
538
|
}>;
|
|
539
|
-
revokeUserSessions:
|
|
539
|
+
revokeUserSessions: better_call701.StrictEndpoint<"/admin/revoke-user-sessions", {
|
|
540
540
|
method: "POST";
|
|
541
|
-
body:
|
|
542
|
-
userId:
|
|
543
|
-
},
|
|
544
|
-
use: ((inputContext:
|
|
541
|
+
body: zod1930.ZodObject<{
|
|
542
|
+
userId: zod1930.ZodCoercedString<unknown>;
|
|
543
|
+
}, zod_v4_core269.$strip>;
|
|
544
|
+
use: ((inputContext: better_call701.MiddlewareInputContext<better_call701.MiddlewareOptions>) => Promise<{
|
|
545
545
|
session: {
|
|
546
546
|
user: UserWithRole;
|
|
547
|
-
session:
|
|
547
|
+
session: _better_auth_core_db23.Session;
|
|
548
548
|
};
|
|
549
549
|
}>)[];
|
|
550
550
|
metadata: {
|
|
@@ -574,15 +574,15 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
574
574
|
}, {
|
|
575
575
|
success: boolean;
|
|
576
576
|
}>;
|
|
577
|
-
removeUser:
|
|
577
|
+
removeUser: better_call701.StrictEndpoint<"/admin/remove-user", {
|
|
578
578
|
method: "POST";
|
|
579
|
-
body:
|
|
580
|
-
userId:
|
|
581
|
-
},
|
|
582
|
-
use: ((inputContext:
|
|
579
|
+
body: zod1930.ZodObject<{
|
|
580
|
+
userId: zod1930.ZodCoercedString<unknown>;
|
|
581
|
+
}, zod_v4_core269.$strip>;
|
|
582
|
+
use: ((inputContext: better_call701.MiddlewareInputContext<better_call701.MiddlewareOptions>) => Promise<{
|
|
583
583
|
session: {
|
|
584
584
|
user: UserWithRole;
|
|
585
|
-
session:
|
|
585
|
+
session: _better_auth_core_db23.Session;
|
|
586
586
|
};
|
|
587
587
|
}>)[];
|
|
588
588
|
metadata: {
|
|
@@ -612,16 +612,16 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
612
612
|
}, {
|
|
613
613
|
success: boolean;
|
|
614
614
|
}>;
|
|
615
|
-
setUserPassword:
|
|
615
|
+
setUserPassword: better_call701.StrictEndpoint<"/admin/set-user-password", {
|
|
616
616
|
method: "POST";
|
|
617
|
-
body:
|
|
618
|
-
newPassword:
|
|
619
|
-
userId:
|
|
620
|
-
},
|
|
621
|
-
use: ((inputContext:
|
|
617
|
+
body: zod1930.ZodObject<{
|
|
618
|
+
newPassword: zod1930.ZodString;
|
|
619
|
+
userId: zod1930.ZodCoercedString<unknown>;
|
|
620
|
+
}, zod_v4_core269.$strip>;
|
|
621
|
+
use: ((inputContext: better_call701.MiddlewareInputContext<better_call701.MiddlewareOptions>) => Promise<{
|
|
622
622
|
session: {
|
|
623
623
|
user: UserWithRole;
|
|
624
|
-
session:
|
|
624
|
+
session: _better_auth_core_db23.Session;
|
|
625
625
|
};
|
|
626
626
|
}>)[];
|
|
627
627
|
metadata: {
|
|
@@ -651,18 +651,18 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
651
651
|
}, {
|
|
652
652
|
status: boolean;
|
|
653
653
|
}>;
|
|
654
|
-
userHasPermission:
|
|
654
|
+
userHasPermission: better_call701.StrictEndpoint<"/admin/has-permission", {
|
|
655
655
|
method: "POST";
|
|
656
|
-
body:
|
|
657
|
-
userId:
|
|
658
|
-
role:
|
|
659
|
-
},
|
|
660
|
-
permission:
|
|
661
|
-
permissions:
|
|
662
|
-
},
|
|
663
|
-
permission:
|
|
664
|
-
permissions:
|
|
665
|
-
},
|
|
656
|
+
body: zod1930.ZodIntersection<zod1930.ZodObject<{
|
|
657
|
+
userId: zod1930.ZodOptional<zod1930.ZodCoercedString<unknown>>;
|
|
658
|
+
role: zod1930.ZodOptional<zod1930.ZodString>;
|
|
659
|
+
}, zod_v4_core269.$strip>, zod1930.ZodUnion<readonly [zod1930.ZodObject<{
|
|
660
|
+
permission: zod1930.ZodRecord<zod1930.ZodString, zod1930.ZodArray<zod1930.ZodString>>;
|
|
661
|
+
permissions: zod1930.ZodUndefined;
|
|
662
|
+
}, zod_v4_core269.$strip>, zod1930.ZodObject<{
|
|
663
|
+
permission: zod1930.ZodUndefined;
|
|
664
|
+
permissions: zod1930.ZodRecord<zod1930.ZodString, zod1930.ZodArray<zod1930.ZodString>>;
|
|
665
|
+
}, zod_v4_core269.$strip>]>>;
|
|
666
666
|
metadata: {
|
|
667
667
|
openapi: {
|
|
668
668
|
description: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AnonymousOptions, AnonymousSession, UserWithAnonymous } from "./types.mjs";
|
|
2
2
|
import * as _better_auth_core0 from "@better-auth/core";
|
|
3
|
-
import * as
|
|
3
|
+
import * as better_call1 from "better-call";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/anonymous/index.d.ts
|
|
6
6
|
declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
7
7
|
id: "anonymous";
|
|
8
8
|
endpoints: {
|
|
9
|
-
signInAnonymous:
|
|
9
|
+
signInAnonymous: better_call1.StrictEndpoint<"/sign-in/anonymous", {
|
|
10
10
|
method: "POST";
|
|
11
11
|
metadata: {
|
|
12
12
|
openapi: {
|
|
@@ -45,9 +45,9 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
45
45
|
image?: string | null | undefined;
|
|
46
46
|
};
|
|
47
47
|
} | null>;
|
|
48
|
-
deleteAnonymousUser:
|
|
48
|
+
deleteAnonymousUser: better_call1.StrictEndpoint<"/delete-anonymous-user", {
|
|
49
49
|
method: "POST";
|
|
50
|
-
use: ((inputContext:
|
|
50
|
+
use: ((inputContext: better_call1.MiddlewareInputContext<better_call1.MiddlewareOptions>) => Promise<{
|
|
51
51
|
session: {
|
|
52
52
|
session: Record<string, any> & {
|
|
53
53
|
id: string;
|
|
@@ -131,7 +131,7 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
131
131
|
hooks: {
|
|
132
132
|
after: {
|
|
133
133
|
matcher(ctx: _better_auth_core0.HookEndpointContext): boolean;
|
|
134
|
-
handler: (inputContext:
|
|
134
|
+
handler: (inputContext: better_call1.MiddlewareInputContext<better_call1.MiddlewareOptions>) => Promise<void>;
|
|
135
135
|
}[];
|
|
136
136
|
};
|
|
137
137
|
options: AnonymousOptions | undefined;
|