rimecms 0.31.3 → 0.31.4
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/README.md +6 -207
- package/dist/adapter-sqlite/auth.server.d.ts +1 -1
- package/dist/adapter-sqlite/generate-schema/templates.server.d.ts +2 -2
- package/dist/adapter-sqlite/generate-schema/templates.server.js +3 -1
- package/dist/adapter-sqlite/generate-schema/write.server.js +7 -3
- package/dist/core/config/auth/better-auth-hooks.server.d.ts +1 -1
- package/dist/core/config/auth/better-auth-hooks.server.js +1 -2
- package/dist/core/config/auth/better-auth-permissions.d.ts +27 -67
- package/dist/core/config/auth/better-auth.server.d.ts +649 -481
- package/dist/core/config/auth/better-auth.server.js +2 -1
- package/dist/core/config/server/write.server.js +5 -0
- package/dist/core/dev/cli/clear/index.server.js +5 -5
- package/dist/core/dev/cli/init/index.server.js +14 -28
- package/dist/core/dev/cli/init/templates.d.ts +12 -0
- package/dist/core/dev/cli/init/templates.js +47 -3
- package/dist/core/dev/constants.d.ts +15 -7
- package/dist/core/dev/constants.js +49 -10
- package/dist/core/dev/generate/routes/common.server.js +5 -2
- package/dist/core/dev/generate/sanitize/index.server.js +3 -3
- package/dist/core/dev/generate/types/index.server.js +3 -2
- package/dist/core/dev/vite/index.server.js +4 -8
- package/dist/core/ensure.server.d.ts +2 -2
- package/dist/core/ensure.server.js +17 -8
- package/dist/core/handlers/auth.server.js +2 -3
- package/dist/core/rime.server.d.ts +1302 -966
- package/dist/core/rime.server.js +6 -0
- package/dist/fields/number/component/number.css +0 -2
- package/dist/fields/relation/component/upload/upload.css +9 -0
- package/dist/fields/rich-text/component/drag-handle/drag-handle.css +0 -1
- package/dist/fields/rich-text/component/styles/rich-text.css +7 -0
- package/dist/fields/rich-text/core/extensions/drag-handle/helpers/findNextElementFromCursor.d.ts +1 -1
- package/dist/fields/rich-text/core/svelte/node-view-wrapper.svelte.d.ts +12 -5
- package/dist/panel/components/sections/collection/header/SelectUI.svelte.d.ts +3 -3
- package/dist/panel/components/sections/document/AuthAPIKeyDialog.svelte.d.ts +3 -3
- package/dist/panel/components/sections/live/Consumer.svelte.d.ts +11 -4
- package/dist/panel/components/sections/live/LiveEdit.svelte.d.ts +13 -6
- package/dist/panel/components/sections/live/LiveFloatingUI.svelte.d.ts +3 -3
- package/dist/panel/components/ui/calendar/calendar.css +0 -11
- package/dist/panel/components/ui/command/command-group.css +0 -1
- package/dist/panel/components/ui/label/label.css +1 -0
- package/dist/panel/components/ui/radio-group/radio-group.css +0 -2
- package/dist/panel/components/ui/scroll-area/scroll-area.css +4 -0
- package/dist/panel/components/ui/sheet/sheet.css +16 -0
- package/dist/panel/components/ui/tabs/tabs.css +0 -7
- package/dist/panel/style/index.css +0 -6
- package/dist/panel/util/auth.js +1 -1
- package/package.json +8 -6
- package/dist/panel/components/ui/dropdown-menu/index.d.ts +0 -23
|
@@ -8,37 +8,44 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
8
8
|
readonly baseURL: any;
|
|
9
9
|
readonly plugins: ({
|
|
10
10
|
id: "api-key";
|
|
11
|
+
version: string;
|
|
11
12
|
$ERROR_CODES: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
13
|
+
INVALID_METADATA_TYPE: import("better-auth").RawError<"INVALID_METADATA_TYPE">;
|
|
14
|
+
REFILL_AMOUNT_AND_INTERVAL_REQUIRED: import("better-auth").RawError<"REFILL_AMOUNT_AND_INTERVAL_REQUIRED">;
|
|
15
|
+
REFILL_INTERVAL_AND_AMOUNT_REQUIRED: import("better-auth").RawError<"REFILL_INTERVAL_AND_AMOUNT_REQUIRED">;
|
|
16
|
+
USER_BANNED: import("better-auth").RawError<"USER_BANNED">;
|
|
17
|
+
UNAUTHORIZED_SESSION: import("better-auth").RawError<"UNAUTHORIZED_SESSION">;
|
|
18
|
+
KEY_NOT_FOUND: import("better-auth").RawError<"KEY_NOT_FOUND">;
|
|
19
|
+
KEY_DISABLED: import("better-auth").RawError<"KEY_DISABLED">;
|
|
20
|
+
KEY_EXPIRED: import("better-auth").RawError<"KEY_EXPIRED">;
|
|
21
|
+
USAGE_EXCEEDED: import("better-auth").RawError<"USAGE_EXCEEDED">;
|
|
22
|
+
KEY_NOT_RECOVERABLE: import("better-auth").RawError<"KEY_NOT_RECOVERABLE">;
|
|
23
|
+
EXPIRES_IN_IS_TOO_SMALL: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_SMALL">;
|
|
24
|
+
EXPIRES_IN_IS_TOO_LARGE: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_LARGE">;
|
|
25
|
+
INVALID_REMAINING: import("better-auth").RawError<"INVALID_REMAINING">;
|
|
26
|
+
INVALID_PREFIX_LENGTH: import("better-auth").RawError<"INVALID_PREFIX_LENGTH">;
|
|
27
|
+
INVALID_NAME_LENGTH: import("better-auth").RawError<"INVALID_NAME_LENGTH">;
|
|
28
|
+
METADATA_DISABLED: import("better-auth").RawError<"METADATA_DISABLED">;
|
|
29
|
+
RATE_LIMIT_EXCEEDED: import("better-auth").RawError<"RATE_LIMIT_EXCEEDED">;
|
|
30
|
+
NO_VALUES_TO_UPDATE: import("better-auth").RawError<"NO_VALUES_TO_UPDATE">;
|
|
31
|
+
KEY_DISABLED_EXPIRATION: import("better-auth").RawError<"KEY_DISABLED_EXPIRATION">;
|
|
32
|
+
INVALID_API_KEY: import("better-auth").RawError<"INVALID_API_KEY">;
|
|
33
|
+
INVALID_USER_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_USER_ID_FROM_API_KEY">;
|
|
34
|
+
INVALID_REFERENCE_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_REFERENCE_ID_FROM_API_KEY">;
|
|
35
|
+
INVALID_API_KEY_GETTER_RETURN_TYPE: import("better-auth").RawError<"INVALID_API_KEY_GETTER_RETURN_TYPE">;
|
|
36
|
+
SERVER_ONLY_PROPERTY: import("better-auth").RawError<"SERVER_ONLY_PROPERTY">;
|
|
37
|
+
FAILED_TO_UPDATE_API_KEY: import("better-auth").RawError<"FAILED_TO_UPDATE_API_KEY">;
|
|
38
|
+
NAME_REQUIRED: import("better-auth").RawError<"NAME_REQUIRED">;
|
|
39
|
+
ORGANIZATION_ID_REQUIRED: import("better-auth").RawError<"ORGANIZATION_ID_REQUIRED">;
|
|
40
|
+
USER_NOT_MEMBER_OF_ORGANIZATION: import("better-auth").RawError<"USER_NOT_MEMBER_OF_ORGANIZATION">;
|
|
41
|
+
INSUFFICIENT_API_KEY_PERMISSIONS: import("better-auth").RawError<"INSUFFICIENT_API_KEY_PERMISSIONS">;
|
|
42
|
+
NO_DEFAULT_API_KEY_CONFIGURATION_FOUND: import("better-auth").RawError<"NO_DEFAULT_API_KEY_CONFIGURATION_FOUND">;
|
|
43
|
+
ORGANIZATION_PLUGIN_REQUIRED: import("better-auth").RawError<"ORGANIZATION_PLUGIN_REQUIRED">;
|
|
37
44
|
};
|
|
38
45
|
hooks: {
|
|
39
46
|
before: {
|
|
40
|
-
matcher: (ctx: import("better-auth
|
|
41
|
-
handler: (inputContext: import("better-
|
|
47
|
+
matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
|
|
48
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
42
49
|
user: {
|
|
43
50
|
id: string;
|
|
44
51
|
createdAt: Date;
|
|
@@ -59,14 +66,10 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
59
66
|
expiresAt: Date;
|
|
60
67
|
};
|
|
61
68
|
} | {
|
|
62
|
-
context: import("better-
|
|
63
|
-
|
|
64
|
-
responseHeaders?: Headers | undefined;
|
|
65
|
-
} & import("better-auth/*").PluginContext & import("better-auth/*").InfoContext & {
|
|
66
|
-
options: import("better-auth/types").BetterAuthOptions;
|
|
67
|
-
appName: string;
|
|
68
|
-
baseURL: string;
|
|
69
|
+
context: import("better-call").MiddlewareContext<import("better-call").MiddlewareOptions, import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
|
|
70
|
+
options: import("better-auth").BetterAuthOptions;
|
|
69
71
|
trustedOrigins: string[];
|
|
72
|
+
trustedProviders: string[];
|
|
70
73
|
isTrustedOrigin: (url: string, settings?: {
|
|
71
74
|
allowRelativePaths: boolean;
|
|
72
75
|
}) => boolean;
|
|
@@ -75,44 +78,97 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
75
78
|
storeStateStrategy: "database" | "cookie";
|
|
76
79
|
};
|
|
77
80
|
newSession: {
|
|
78
|
-
session:
|
|
79
|
-
|
|
81
|
+
session: {
|
|
82
|
+
id: string;
|
|
83
|
+
createdAt: Date;
|
|
84
|
+
updatedAt: Date;
|
|
85
|
+
userId: string;
|
|
86
|
+
expiresAt: Date;
|
|
87
|
+
token: string;
|
|
88
|
+
ipAddress?: string | null | undefined;
|
|
89
|
+
userAgent?: string | null | undefined;
|
|
90
|
+
} & Record<string, any>;
|
|
91
|
+
user: {
|
|
92
|
+
id: string;
|
|
93
|
+
createdAt: Date;
|
|
94
|
+
updatedAt: Date;
|
|
95
|
+
email: string;
|
|
96
|
+
emailVerified: boolean;
|
|
97
|
+
name: string;
|
|
98
|
+
image?: string | null | undefined;
|
|
99
|
+
} & Record<string, any>;
|
|
80
100
|
} | null;
|
|
81
101
|
session: {
|
|
82
|
-
session:
|
|
83
|
-
|
|
102
|
+
session: {
|
|
103
|
+
id: string;
|
|
104
|
+
createdAt: Date;
|
|
105
|
+
updatedAt: Date;
|
|
106
|
+
userId: string;
|
|
107
|
+
expiresAt: Date;
|
|
108
|
+
token: string;
|
|
109
|
+
ipAddress?: string | null | undefined;
|
|
110
|
+
userAgent?: string | null | undefined;
|
|
111
|
+
} & Record<string, any>;
|
|
112
|
+
user: {
|
|
113
|
+
id: string;
|
|
114
|
+
createdAt: Date;
|
|
115
|
+
updatedAt: Date;
|
|
116
|
+
email: string;
|
|
117
|
+
emailVerified: boolean;
|
|
118
|
+
name: string;
|
|
119
|
+
image?: string | null | undefined;
|
|
120
|
+
} & Record<string, any>;
|
|
84
121
|
} | null;
|
|
85
122
|
setNewSession: (session: {
|
|
86
|
-
session:
|
|
87
|
-
|
|
123
|
+
session: {
|
|
124
|
+
id: string;
|
|
125
|
+
createdAt: Date;
|
|
126
|
+
updatedAt: Date;
|
|
127
|
+
userId: string;
|
|
128
|
+
expiresAt: Date;
|
|
129
|
+
token: string;
|
|
130
|
+
ipAddress?: string | null | undefined;
|
|
131
|
+
userAgent?: string | null | undefined;
|
|
132
|
+
} & Record<string, any>;
|
|
133
|
+
user: {
|
|
134
|
+
id: string;
|
|
135
|
+
createdAt: Date;
|
|
136
|
+
updatedAt: Date;
|
|
137
|
+
email: string;
|
|
138
|
+
emailVerified: boolean;
|
|
139
|
+
name: string;
|
|
140
|
+
image?: string | null | undefined;
|
|
141
|
+
} & Record<string, any>;
|
|
88
142
|
} | null) => void;
|
|
89
|
-
socialProviders: import("better-auth
|
|
90
|
-
authCookies: import("better-auth
|
|
91
|
-
logger: ReturnType<(options?: import("better-auth
|
|
143
|
+
socialProviders: import("better-auth").OAuthProvider[];
|
|
144
|
+
authCookies: import("better-auth").BetterAuthCookies;
|
|
145
|
+
logger: ReturnType<(options?: import("better-auth").Logger | undefined) => import("better-auth").InternalLogger>;
|
|
92
146
|
rateLimit: {
|
|
93
147
|
enabled: boolean;
|
|
94
148
|
window: number;
|
|
95
149
|
max: number;
|
|
96
150
|
storage: "memory" | "database" | "secondary-storage";
|
|
97
|
-
} & Omit<import("better-auth
|
|
98
|
-
adapter: import("better-auth
|
|
99
|
-
internalAdapter: import("better-auth
|
|
100
|
-
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-
|
|
151
|
+
} & Omit<import("better-auth").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
|
|
152
|
+
adapter: import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
|
|
153
|
+
internalAdapter: import("better-auth").InternalAdapter<import("better-auth").BetterAuthOptions>;
|
|
154
|
+
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-call").CookieOptions> | undefined) => import("better-auth").BetterAuthCookie;
|
|
101
155
|
secret: string;
|
|
156
|
+
secretConfig: string | import("better-auth").SecretConfig;
|
|
102
157
|
sessionConfig: {
|
|
103
158
|
updateAge: number;
|
|
104
159
|
expiresIn: number;
|
|
105
160
|
freshAge: number;
|
|
161
|
+
cookieCacheSigner?: import("better-auth").CookieCacheSigner | undefined;
|
|
106
162
|
cookieRefreshCache: false | {
|
|
107
163
|
enabled: true;
|
|
108
164
|
updateAge: number;
|
|
109
165
|
};
|
|
110
166
|
};
|
|
111
167
|
generateId: (options: {
|
|
112
|
-
model: import("better-auth
|
|
168
|
+
model: import("better-auth").ModelNames;
|
|
113
169
|
size?: number | undefined;
|
|
114
170
|
}) => string | false;
|
|
115
|
-
secondaryStorage: import("better-auth
|
|
171
|
+
secondaryStorage: import("better-auth").SecondaryStorage | undefined;
|
|
116
172
|
password: {
|
|
117
173
|
hash: (password: string) => Promise<string>;
|
|
118
174
|
verify: (data: {
|
|
@@ -123,9 +179,9 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
123
179
|
minPasswordLength: number;
|
|
124
180
|
maxPasswordLength: number;
|
|
125
181
|
};
|
|
126
|
-
checkPassword: (userId: string, ctx: import("better-auth
|
|
182
|
+
checkPassword: (userId: string, ctx: import("better-auth").GenericEndpointContext<import("better-auth").BetterAuthOptions>) => Promise<boolean>;
|
|
127
183
|
};
|
|
128
|
-
tables: import("better-auth
|
|
184
|
+
tables: import("better-auth").BetterAuthDBSchema;
|
|
129
185
|
runMigrations: () => Promise<void>;
|
|
130
186
|
publishTelemetry: (event: {
|
|
131
187
|
type: string;
|
|
@@ -135,28 +191,33 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
135
191
|
skipOriginCheck: boolean | string[];
|
|
136
192
|
skipCSRFCheck: boolean;
|
|
137
193
|
runInBackground: (promise: Promise<unknown>) => void;
|
|
138
|
-
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth
|
|
194
|
+
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
|
|
195
|
+
} & {
|
|
196
|
+
returned?: unknown | undefined;
|
|
197
|
+
responseHeaders?: Headers | undefined;
|
|
139
198
|
}>;
|
|
140
|
-
}
|
|
199
|
+
}>>;
|
|
141
200
|
}[];
|
|
142
201
|
};
|
|
143
202
|
endpoints: {
|
|
144
|
-
createApiKey: import("better-
|
|
203
|
+
createApiKey: import("better-call").StrictEndpoint<"/api-key/create", {
|
|
145
204
|
method: "POST";
|
|
146
|
-
body: import("
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
prefix: import("
|
|
151
|
-
remaining: import("
|
|
152
|
-
metadata: import("
|
|
153
|
-
refillAmount: import("
|
|
154
|
-
refillInterval: import("
|
|
155
|
-
rateLimitTimeWindow: import("
|
|
156
|
-
rateLimitMax: import("
|
|
157
|
-
rateLimitEnabled: import("
|
|
158
|
-
permissions: import("
|
|
159
|
-
|
|
205
|
+
body: import("zod").ZodObject<{
|
|
206
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
207
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
208
|
+
expiresIn: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>>;
|
|
209
|
+
prefix: import("zod").ZodOptional<import("zod").ZodString>;
|
|
210
|
+
remaining: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>>;
|
|
211
|
+
metadata: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
212
|
+
refillAmount: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
213
|
+
refillInterval: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
214
|
+
rateLimitTimeWindow: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
215
|
+
rateLimitMax: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
216
|
+
rateLimitEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
217
|
+
permissions: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>;
|
|
218
|
+
userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
|
|
219
|
+
organizationId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
|
|
220
|
+
}, import("zod/v4/core").$strip>;
|
|
160
221
|
metadata: {
|
|
161
222
|
openapi: {
|
|
162
223
|
description: string;
|
|
@@ -211,7 +272,7 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
211
272
|
nullable: boolean;
|
|
212
273
|
description: string;
|
|
213
274
|
};
|
|
214
|
-
|
|
275
|
+
referenceId: {
|
|
215
276
|
type: string;
|
|
216
277
|
description: string;
|
|
217
278
|
};
|
|
@@ -291,10 +352,11 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
291
352
|
metadata: any;
|
|
292
353
|
permissions: any;
|
|
293
354
|
id: string;
|
|
355
|
+
configId: string;
|
|
294
356
|
name: string | null;
|
|
295
357
|
start: string | null;
|
|
296
358
|
prefix: string | null;
|
|
297
|
-
|
|
359
|
+
referenceId: string;
|
|
298
360
|
refillInterval: number | null;
|
|
299
361
|
refillAmount: number | null;
|
|
300
362
|
lastRefillAt: Date | null;
|
|
@@ -309,16 +371,17 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
309
371
|
createdAt: Date;
|
|
310
372
|
updatedAt: Date;
|
|
311
373
|
}>;
|
|
312
|
-
verifyApiKey: import("better-
|
|
374
|
+
verifyApiKey: import("better-call").StrictEndpoint<string, {
|
|
313
375
|
method: "POST";
|
|
314
|
-
body: import("
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
376
|
+
body: import("zod").ZodObject<{
|
|
377
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
378
|
+
key: import("zod").ZodString;
|
|
379
|
+
permissions: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>;
|
|
380
|
+
}, import("zod/v4/core").$strip>;
|
|
318
381
|
}, {
|
|
319
382
|
valid: boolean;
|
|
320
383
|
error: {
|
|
321
|
-
message: "
|
|
384
|
+
message: import("better-auth").RawError<"INVALID_API_KEY">;
|
|
322
385
|
code: "KEY_NOT_FOUND";
|
|
323
386
|
};
|
|
324
387
|
key: null;
|
|
@@ -333,21 +396,22 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
333
396
|
} | {
|
|
334
397
|
valid: boolean;
|
|
335
398
|
error: {
|
|
336
|
-
message: "
|
|
399
|
+
message: import("better-auth").RawError<"INVALID_API_KEY">;
|
|
337
400
|
code: "INVALID_API_KEY";
|
|
338
401
|
};
|
|
339
402
|
key: null;
|
|
340
403
|
} | {
|
|
341
404
|
valid: boolean;
|
|
342
405
|
error: null;
|
|
343
|
-
key: Omit<import("better-auth/
|
|
406
|
+
key: Omit<import("@better-auth/api-key").ApiKey, "key"> | null;
|
|
344
407
|
}>;
|
|
345
|
-
getApiKey: import("better-
|
|
408
|
+
getApiKey: import("better-call").StrictEndpoint<"/api-key/get", {
|
|
346
409
|
method: "GET";
|
|
347
|
-
query: import("
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
410
|
+
query: import("zod").ZodObject<{
|
|
411
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
412
|
+
id: import("zod").ZodString;
|
|
413
|
+
}, import("zod/v4/core").$strip>;
|
|
414
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
351
415
|
session: {
|
|
352
416
|
session: Record<string, any> & {
|
|
353
417
|
id: string;
|
|
@@ -369,7 +433,7 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
369
433
|
image?: string | null | undefined;
|
|
370
434
|
};
|
|
371
435
|
};
|
|
372
|
-
}
|
|
436
|
+
}>>[];
|
|
373
437
|
metadata: {
|
|
374
438
|
openapi: {
|
|
375
439
|
description: string;
|
|
@@ -496,10 +560,11 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
496
560
|
[key: string]: string[];
|
|
497
561
|
} | null;
|
|
498
562
|
id: string;
|
|
563
|
+
configId: string;
|
|
499
564
|
name: string | null;
|
|
500
565
|
start: string | null;
|
|
501
566
|
prefix: string | null;
|
|
502
|
-
|
|
567
|
+
referenceId: string;
|
|
503
568
|
refillInterval: number | null;
|
|
504
569
|
refillAmount: number | null;
|
|
505
570
|
lastRefillAt: Date | null;
|
|
@@ -514,23 +579,24 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
514
579
|
createdAt: Date;
|
|
515
580
|
updatedAt: Date;
|
|
516
581
|
}>;
|
|
517
|
-
updateApiKey: import("better-
|
|
582
|
+
updateApiKey: import("better-call").StrictEndpoint<"/api-key/update", {
|
|
518
583
|
method: "POST";
|
|
519
|
-
body: import("
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
584
|
+
body: import("zod").ZodObject<{
|
|
585
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
586
|
+
keyId: import("zod").ZodString;
|
|
587
|
+
userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
|
|
588
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
589
|
+
enabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
590
|
+
remaining: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
591
|
+
refillAmount: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
592
|
+
refillInterval: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
593
|
+
metadata: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
594
|
+
expiresIn: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
595
|
+
rateLimitEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
596
|
+
rateLimitTimeWindow: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
597
|
+
rateLimitMax: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
598
|
+
permissions: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>>;
|
|
599
|
+
}, import("zod/v4/core").$strip>;
|
|
534
600
|
metadata: {
|
|
535
601
|
openapi: {
|
|
536
602
|
description: string;
|
|
@@ -657,10 +723,11 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
657
723
|
[key: string]: string[];
|
|
658
724
|
} | null;
|
|
659
725
|
id: string;
|
|
726
|
+
configId: string;
|
|
660
727
|
name: string | null;
|
|
661
728
|
start: string | null;
|
|
662
729
|
prefix: string | null;
|
|
663
|
-
|
|
730
|
+
referenceId: string;
|
|
664
731
|
refillInterval: number | null;
|
|
665
732
|
refillAmount: number | null;
|
|
666
733
|
lastRefillAt: Date | null;
|
|
@@ -675,12 +742,13 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
675
742
|
createdAt: Date;
|
|
676
743
|
updatedAt: Date;
|
|
677
744
|
}>;
|
|
678
|
-
deleteApiKey: import("better-
|
|
745
|
+
deleteApiKey: import("better-call").StrictEndpoint<"/api-key/delete", {
|
|
679
746
|
method: "POST";
|
|
680
|
-
body: import("
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
747
|
+
body: import("zod").ZodObject<{
|
|
748
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
749
|
+
keyId: import("zod").ZodString;
|
|
750
|
+
}, import("zod/v4/core").$strip>;
|
|
751
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
684
752
|
session: {
|
|
685
753
|
session: Record<string, any> & {
|
|
686
754
|
id: string;
|
|
@@ -702,7 +770,7 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
702
770
|
image?: string | null | undefined;
|
|
703
771
|
};
|
|
704
772
|
};
|
|
705
|
-
}
|
|
773
|
+
}>>[];
|
|
706
774
|
metadata: {
|
|
707
775
|
openapi: {
|
|
708
776
|
description: string;
|
|
@@ -746,9 +814,9 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
746
814
|
}, {
|
|
747
815
|
success: boolean;
|
|
748
816
|
}>;
|
|
749
|
-
listApiKeys: import("better-
|
|
817
|
+
listApiKeys: import("better-call").StrictEndpoint<"/api-key/list", {
|
|
750
818
|
method: "GET";
|
|
751
|
-
use: ((inputContext: import("better-
|
|
819
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
752
820
|
session: {
|
|
753
821
|
session: Record<string, any> & {
|
|
754
822
|
id: string;
|
|
@@ -770,7 +838,18 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
770
838
|
image?: string | null | undefined;
|
|
771
839
|
};
|
|
772
840
|
};
|
|
773
|
-
}
|
|
841
|
+
}>>[];
|
|
842
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
843
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
844
|
+
organizationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
845
|
+
limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
|
|
846
|
+
offset: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
|
|
847
|
+
sortBy: import("zod").ZodOptional<import("zod").ZodString>;
|
|
848
|
+
sortDirection: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
849
|
+
asc: "asc";
|
|
850
|
+
desc: "desc";
|
|
851
|
+
}>>;
|
|
852
|
+
}, import("zod/v4/core").$strip>>;
|
|
774
853
|
metadata: {
|
|
775
854
|
openapi: {
|
|
776
855
|
description: string;
|
|
@@ -780,113 +859,133 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
780
859
|
content: {
|
|
781
860
|
"application/json": {
|
|
782
861
|
schema: {
|
|
783
|
-
type: "
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
type: string;
|
|
789
|
-
description: string;
|
|
790
|
-
};
|
|
791
|
-
name: {
|
|
792
|
-
type: string;
|
|
793
|
-
nullable: boolean;
|
|
794
|
-
description: string;
|
|
795
|
-
};
|
|
796
|
-
start: {
|
|
797
|
-
type: string;
|
|
798
|
-
nullable: boolean;
|
|
799
|
-
description: string;
|
|
800
|
-
};
|
|
801
|
-
prefix: {
|
|
802
|
-
type: string;
|
|
803
|
-
nullable: boolean;
|
|
804
|
-
description: string;
|
|
805
|
-
};
|
|
806
|
-
userId: {
|
|
807
|
-
type: string;
|
|
808
|
-
description: string;
|
|
809
|
-
};
|
|
810
|
-
refillInterval: {
|
|
811
|
-
type: string;
|
|
812
|
-
nullable: boolean;
|
|
813
|
-
description: string;
|
|
814
|
-
};
|
|
815
|
-
refillAmount: {
|
|
816
|
-
type: string;
|
|
817
|
-
nullable: boolean;
|
|
818
|
-
description: string;
|
|
819
|
-
};
|
|
820
|
-
lastRefillAt: {
|
|
821
|
-
type: string;
|
|
822
|
-
format: string;
|
|
823
|
-
nullable: boolean;
|
|
824
|
-
description: string;
|
|
825
|
-
};
|
|
826
|
-
enabled: {
|
|
827
|
-
type: string;
|
|
828
|
-
description: string;
|
|
829
|
-
default: boolean;
|
|
830
|
-
};
|
|
831
|
-
rateLimitEnabled: {
|
|
832
|
-
type: string;
|
|
833
|
-
description: string;
|
|
834
|
-
};
|
|
835
|
-
rateLimitTimeWindow: {
|
|
836
|
-
type: string;
|
|
837
|
-
nullable: boolean;
|
|
838
|
-
description: string;
|
|
839
|
-
};
|
|
840
|
-
rateLimitMax: {
|
|
841
|
-
type: string;
|
|
842
|
-
nullable: boolean;
|
|
843
|
-
description: string;
|
|
844
|
-
};
|
|
845
|
-
requestCount: {
|
|
846
|
-
type: string;
|
|
847
|
-
description: string;
|
|
848
|
-
};
|
|
849
|
-
remaining: {
|
|
850
|
-
type: string;
|
|
851
|
-
nullable: boolean;
|
|
852
|
-
description: string;
|
|
853
|
-
};
|
|
854
|
-
lastRequest: {
|
|
855
|
-
type: string;
|
|
856
|
-
format: string;
|
|
857
|
-
nullable: boolean;
|
|
858
|
-
description: string;
|
|
859
|
-
};
|
|
860
|
-
expiresAt: {
|
|
861
|
-
type: string;
|
|
862
|
-
format: string;
|
|
863
|
-
nullable: boolean;
|
|
864
|
-
description: string;
|
|
865
|
-
};
|
|
866
|
-
createdAt: {
|
|
867
|
-
type: string;
|
|
868
|
-
format: string;
|
|
869
|
-
description: string;
|
|
870
|
-
};
|
|
871
|
-
updatedAt: {
|
|
872
|
-
type: string;
|
|
873
|
-
format: string;
|
|
874
|
-
description: string;
|
|
875
|
-
};
|
|
876
|
-
metadata: {
|
|
877
|
-
type: string;
|
|
878
|
-
nullable: boolean;
|
|
879
|
-
additionalProperties: boolean;
|
|
880
|
-
description: string;
|
|
881
|
-
};
|
|
882
|
-
permissions: {
|
|
862
|
+
type: "object";
|
|
863
|
+
properties: {
|
|
864
|
+
apiKeys: {
|
|
865
|
+
type: string;
|
|
866
|
+
items: {
|
|
883
867
|
type: string;
|
|
884
|
-
|
|
885
|
-
|
|
868
|
+
properties: {
|
|
869
|
+
id: {
|
|
870
|
+
type: string;
|
|
871
|
+
description: string;
|
|
872
|
+
};
|
|
873
|
+
name: {
|
|
874
|
+
type: string;
|
|
875
|
+
nullable: boolean;
|
|
876
|
+
description: string;
|
|
877
|
+
};
|
|
878
|
+
start: {
|
|
879
|
+
type: string;
|
|
880
|
+
nullable: boolean;
|
|
881
|
+
description: string;
|
|
882
|
+
};
|
|
883
|
+
prefix: {
|
|
884
|
+
type: string;
|
|
885
|
+
nullable: boolean;
|
|
886
|
+
description: string;
|
|
887
|
+
};
|
|
888
|
+
userId: {
|
|
889
|
+
type: string;
|
|
890
|
+
description: string;
|
|
891
|
+
};
|
|
892
|
+
refillInterval: {
|
|
893
|
+
type: string;
|
|
894
|
+
nullable: boolean;
|
|
895
|
+
description: string;
|
|
896
|
+
};
|
|
897
|
+
refillAmount: {
|
|
898
|
+
type: string;
|
|
899
|
+
nullable: boolean;
|
|
900
|
+
description: string;
|
|
901
|
+
};
|
|
902
|
+
lastRefillAt: {
|
|
903
|
+
type: string;
|
|
904
|
+
format: string;
|
|
905
|
+
nullable: boolean;
|
|
906
|
+
description: string;
|
|
907
|
+
};
|
|
908
|
+
enabled: {
|
|
909
|
+
type: string;
|
|
910
|
+
description: string;
|
|
911
|
+
default: boolean;
|
|
912
|
+
};
|
|
913
|
+
rateLimitEnabled: {
|
|
914
|
+
type: string;
|
|
915
|
+
description: string;
|
|
916
|
+
};
|
|
917
|
+
rateLimitTimeWindow: {
|
|
918
|
+
type: string;
|
|
919
|
+
nullable: boolean;
|
|
920
|
+
description: string;
|
|
921
|
+
};
|
|
922
|
+
rateLimitMax: {
|
|
923
|
+
type: string;
|
|
924
|
+
nullable: boolean;
|
|
925
|
+
description: string;
|
|
926
|
+
};
|
|
927
|
+
requestCount: {
|
|
928
|
+
type: string;
|
|
929
|
+
description: string;
|
|
930
|
+
};
|
|
931
|
+
remaining: {
|
|
932
|
+
type: string;
|
|
933
|
+
nullable: boolean;
|
|
934
|
+
description: string;
|
|
935
|
+
};
|
|
936
|
+
lastRequest: {
|
|
937
|
+
type: string;
|
|
938
|
+
format: string;
|
|
939
|
+
nullable: boolean;
|
|
940
|
+
description: string;
|
|
941
|
+
};
|
|
942
|
+
expiresAt: {
|
|
943
|
+
type: string;
|
|
944
|
+
format: string;
|
|
945
|
+
nullable: boolean;
|
|
946
|
+
description: string;
|
|
947
|
+
};
|
|
948
|
+
createdAt: {
|
|
949
|
+
type: string;
|
|
950
|
+
format: string;
|
|
951
|
+
description: string;
|
|
952
|
+
};
|
|
953
|
+
updatedAt: {
|
|
954
|
+
type: string;
|
|
955
|
+
format: string;
|
|
956
|
+
description: string;
|
|
957
|
+
};
|
|
958
|
+
metadata: {
|
|
959
|
+
type: string;
|
|
960
|
+
nullable: boolean;
|
|
961
|
+
additionalProperties: boolean;
|
|
962
|
+
description: string;
|
|
963
|
+
};
|
|
964
|
+
permissions: {
|
|
965
|
+
type: string;
|
|
966
|
+
nullable: boolean;
|
|
967
|
+
description: string;
|
|
968
|
+
};
|
|
969
|
+
};
|
|
970
|
+
required: string[];
|
|
886
971
|
};
|
|
887
972
|
};
|
|
888
|
-
|
|
973
|
+
total: {
|
|
974
|
+
type: string;
|
|
975
|
+
description: string;
|
|
976
|
+
};
|
|
977
|
+
limit: {
|
|
978
|
+
type: string;
|
|
979
|
+
nullable: boolean;
|
|
980
|
+
description: string;
|
|
981
|
+
};
|
|
982
|
+
offset: {
|
|
983
|
+
type: string;
|
|
984
|
+
nullable: boolean;
|
|
985
|
+
description: string;
|
|
986
|
+
};
|
|
889
987
|
};
|
|
988
|
+
required: string[];
|
|
890
989
|
};
|
|
891
990
|
};
|
|
892
991
|
};
|
|
@@ -895,30 +994,36 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
895
994
|
};
|
|
896
995
|
};
|
|
897
996
|
}, {
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
997
|
+
apiKeys: {
|
|
998
|
+
metadata: Record<string, any> | null;
|
|
999
|
+
permissions: {
|
|
1000
|
+
[key: string]: string[];
|
|
1001
|
+
} | null;
|
|
1002
|
+
id: string;
|
|
1003
|
+
configId: string;
|
|
1004
|
+
name: string | null;
|
|
1005
|
+
start: string | null;
|
|
1006
|
+
prefix: string | null;
|
|
1007
|
+
referenceId: string;
|
|
1008
|
+
refillInterval: number | null;
|
|
1009
|
+
refillAmount: number | null;
|
|
1010
|
+
lastRefillAt: Date | null;
|
|
1011
|
+
enabled: boolean;
|
|
1012
|
+
rateLimitEnabled: boolean;
|
|
1013
|
+
rateLimitTimeWindow: number | null;
|
|
1014
|
+
rateLimitMax: number | null;
|
|
1015
|
+
requestCount: number;
|
|
1016
|
+
remaining: number | null;
|
|
1017
|
+
lastRequest: Date | null;
|
|
1018
|
+
expiresAt: Date | null;
|
|
1019
|
+
createdAt: Date;
|
|
1020
|
+
updatedAt: Date;
|
|
1021
|
+
}[];
|
|
1022
|
+
total: number;
|
|
1023
|
+
limit: number | undefined;
|
|
1024
|
+
offset: number | undefined;
|
|
1025
|
+
}>;
|
|
1026
|
+
deleteAllExpiredApiKeys: import("better-call").StrictEndpoint<string, {
|
|
922
1027
|
method: "POST";
|
|
923
1028
|
}, {
|
|
924
1029
|
success: boolean;
|
|
@@ -928,34 +1033,36 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
928
1033
|
schema: {
|
|
929
1034
|
apikey: {
|
|
930
1035
|
fields: {
|
|
931
|
-
|
|
1036
|
+
configId: {
|
|
932
1037
|
type: "string";
|
|
933
|
-
required:
|
|
1038
|
+
required: true;
|
|
1039
|
+
defaultValue: string;
|
|
934
1040
|
input: false;
|
|
1041
|
+
index: true;
|
|
935
1042
|
};
|
|
936
|
-
|
|
1043
|
+
name: {
|
|
937
1044
|
type: "string";
|
|
938
1045
|
required: false;
|
|
939
1046
|
input: false;
|
|
940
1047
|
};
|
|
941
|
-
|
|
1048
|
+
start: {
|
|
942
1049
|
type: "string";
|
|
943
1050
|
required: false;
|
|
944
1051
|
input: false;
|
|
945
1052
|
};
|
|
946
|
-
|
|
1053
|
+
referenceId: {
|
|
947
1054
|
type: "string";
|
|
948
1055
|
required: true;
|
|
949
1056
|
input: false;
|
|
950
1057
|
index: true;
|
|
951
1058
|
};
|
|
952
|
-
|
|
1059
|
+
prefix: {
|
|
1060
|
+
type: "string";
|
|
1061
|
+
required: false;
|
|
1062
|
+
input: false;
|
|
1063
|
+
};
|
|
1064
|
+
key: {
|
|
953
1065
|
type: "string";
|
|
954
|
-
references: {
|
|
955
|
-
model: string;
|
|
956
|
-
field: string;
|
|
957
|
-
onDelete: "cascade";
|
|
958
|
-
};
|
|
959
1066
|
required: true;
|
|
960
1067
|
input: false;
|
|
961
1068
|
index: true;
|
|
@@ -1040,16 +1147,16 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1040
1147
|
required: false;
|
|
1041
1148
|
input: true;
|
|
1042
1149
|
transform: {
|
|
1043
|
-
input(value: import("better-auth
|
|
1044
|
-
output(value: import("better-auth
|
|
1150
|
+
input(value: import("better-auth").DBPrimitive): string;
|
|
1151
|
+
output(value: import("better-auth").DBPrimitive): any;
|
|
1045
1152
|
};
|
|
1046
1153
|
};
|
|
1047
1154
|
};
|
|
1048
1155
|
};
|
|
1049
1156
|
};
|
|
1050
|
-
options: import("better-auth/plugins").ApiKeyOptions | undefined;
|
|
1051
1157
|
} | {
|
|
1052
1158
|
id: "admin";
|
|
1159
|
+
version: string;
|
|
1053
1160
|
init(): {
|
|
1054
1161
|
options: {
|
|
1055
1162
|
databaseHooks: {
|
|
@@ -1088,7 +1195,7 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1088
1195
|
token: string;
|
|
1089
1196
|
ipAddress?: string | null | undefined;
|
|
1090
1197
|
userAgent?: string | null | undefined;
|
|
1091
|
-
} & Record<string, unknown>, ctx: import("better-auth
|
|
1198
|
+
} & Record<string, unknown>, ctx: import("better-auth").GenericEndpointContext | null): Promise<void>;
|
|
1092
1199
|
};
|
|
1093
1200
|
};
|
|
1094
1201
|
};
|
|
@@ -1096,24 +1203,33 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1096
1203
|
};
|
|
1097
1204
|
hooks: {
|
|
1098
1205
|
after: {
|
|
1099
|
-
matcher(context: import("better-auth
|
|
1100
|
-
handler: (inputContext: import("better-
|
|
1206
|
+
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
1207
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<import("better-auth/plugins").SessionWithImpersonatedBy[] | undefined>>;
|
|
1101
1208
|
}[];
|
|
1102
1209
|
};
|
|
1103
1210
|
endpoints: {
|
|
1104
|
-
setRole: import("better-
|
|
1211
|
+
setRole: import("better-call").StrictEndpoint<"/admin/set-role", {
|
|
1105
1212
|
method: "POST";
|
|
1106
|
-
body: import("
|
|
1107
|
-
userId: import("
|
|
1108
|
-
role: import("
|
|
1109
|
-
}, import("
|
|
1213
|
+
body: import("zod").ZodObject<{
|
|
1214
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1215
|
+
role: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>;
|
|
1216
|
+
}, import("zod/v4/core").$strip>;
|
|
1110
1217
|
requireHeaders: true;
|
|
1111
|
-
use: ((inputContext: import("better-
|
|
1218
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1112
1219
|
session: {
|
|
1113
1220
|
user: import("better-auth/plugins").UserWithRole;
|
|
1114
|
-
session:
|
|
1221
|
+
session: {
|
|
1222
|
+
id: string;
|
|
1223
|
+
createdAt: Date;
|
|
1224
|
+
updatedAt: Date;
|
|
1225
|
+
userId: string;
|
|
1226
|
+
expiresAt: Date;
|
|
1227
|
+
token: string;
|
|
1228
|
+
ipAddress?: string | null | undefined;
|
|
1229
|
+
userAgent?: string | null | undefined;
|
|
1230
|
+
};
|
|
1115
1231
|
};
|
|
1116
|
-
}
|
|
1232
|
+
}>>[];
|
|
1117
1233
|
metadata: {
|
|
1118
1234
|
openapi: {
|
|
1119
1235
|
operationId: string;
|
|
@@ -1147,17 +1263,26 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1147
1263
|
}, {
|
|
1148
1264
|
user: import("better-auth/plugins").UserWithRole;
|
|
1149
1265
|
}>;
|
|
1150
|
-
getUser: import("better-
|
|
1266
|
+
getUser: import("better-call").StrictEndpoint<"/admin/get-user", {
|
|
1151
1267
|
method: "GET";
|
|
1152
|
-
query: import("
|
|
1153
|
-
id: import("
|
|
1154
|
-
}, import("
|
|
1155
|
-
use: ((inputContext: import("better-
|
|
1268
|
+
query: import("zod").ZodObject<{
|
|
1269
|
+
id: import("zod").ZodString;
|
|
1270
|
+
}, import("zod/v4/core").$strip>;
|
|
1271
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1156
1272
|
session: {
|
|
1157
1273
|
user: import("better-auth/plugins").UserWithRole;
|
|
1158
|
-
session:
|
|
1274
|
+
session: {
|
|
1275
|
+
id: string;
|
|
1276
|
+
createdAt: Date;
|
|
1277
|
+
updatedAt: Date;
|
|
1278
|
+
userId: string;
|
|
1279
|
+
expiresAt: Date;
|
|
1280
|
+
token: string;
|
|
1281
|
+
ipAddress?: string | null | undefined;
|
|
1282
|
+
userAgent?: string | null | undefined;
|
|
1283
|
+
};
|
|
1159
1284
|
};
|
|
1160
|
-
}
|
|
1285
|
+
}>>[];
|
|
1161
1286
|
metadata: {
|
|
1162
1287
|
openapi: {
|
|
1163
1288
|
operationId: string;
|
|
@@ -1183,15 +1308,15 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1183
1308
|
};
|
|
1184
1309
|
};
|
|
1185
1310
|
}, import("better-auth/plugins").UserWithRole>;
|
|
1186
|
-
createUser: import("better-
|
|
1311
|
+
createUser: import("better-call").StrictEndpoint<"/admin/create-user", {
|
|
1187
1312
|
method: "POST";
|
|
1188
|
-
body: import("
|
|
1189
|
-
email: import("
|
|
1190
|
-
password: import("
|
|
1191
|
-
name: import("
|
|
1192
|
-
role: import("
|
|
1193
|
-
data: import("
|
|
1194
|
-
}, import("
|
|
1313
|
+
body: import("zod").ZodObject<{
|
|
1314
|
+
email: import("zod").ZodString;
|
|
1315
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1316
|
+
name: import("zod").ZodString;
|
|
1317
|
+
role: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>>;
|
|
1318
|
+
data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
1319
|
+
}, import("zod/v4/core").$strip>;
|
|
1195
1320
|
metadata: {
|
|
1196
1321
|
openapi: {
|
|
1197
1322
|
operationId: string;
|
|
@@ -1228,18 +1353,27 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1228
1353
|
}, {
|
|
1229
1354
|
user: import("better-auth/plugins").UserWithRole;
|
|
1230
1355
|
}>;
|
|
1231
|
-
adminUpdateUser: import("better-
|
|
1356
|
+
adminUpdateUser: import("better-call").StrictEndpoint<"/admin/update-user", {
|
|
1232
1357
|
method: "POST";
|
|
1233
|
-
body: import("
|
|
1234
|
-
userId: import("
|
|
1235
|
-
data: import("
|
|
1236
|
-
}, import("
|
|
1237
|
-
use: ((inputContext: import("better-
|
|
1358
|
+
body: import("zod").ZodObject<{
|
|
1359
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1360
|
+
data: import("zod").ZodRecord<import("zod").ZodAny, import("zod").ZodAny>;
|
|
1361
|
+
}, import("zod/v4/core").$strip>;
|
|
1362
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1238
1363
|
session: {
|
|
1239
1364
|
user: import("better-auth/plugins").UserWithRole;
|
|
1240
|
-
session:
|
|
1365
|
+
session: {
|
|
1366
|
+
id: string;
|
|
1367
|
+
createdAt: Date;
|
|
1368
|
+
updatedAt: Date;
|
|
1369
|
+
userId: string;
|
|
1370
|
+
expiresAt: Date;
|
|
1371
|
+
token: string;
|
|
1372
|
+
ipAddress?: string | null | undefined;
|
|
1373
|
+
userAgent?: string | null | undefined;
|
|
1374
|
+
};
|
|
1241
1375
|
};
|
|
1242
|
-
}
|
|
1376
|
+
}>>[];
|
|
1243
1377
|
metadata: {
|
|
1244
1378
|
openapi: {
|
|
1245
1379
|
operationId: string;
|
|
@@ -1265,44 +1399,57 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1265
1399
|
};
|
|
1266
1400
|
};
|
|
1267
1401
|
}, import("better-auth/plugins").UserWithRole>;
|
|
1268
|
-
listUsers: import("better-
|
|
1402
|
+
listUsers: import("better-call").StrictEndpoint<"/admin/list-users", {
|
|
1269
1403
|
method: "GET";
|
|
1270
|
-
use: ((inputContext: import("better-
|
|
1404
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1271
1405
|
session: {
|
|
1272
1406
|
user: import("better-auth/plugins").UserWithRole;
|
|
1273
|
-
session:
|
|
1407
|
+
session: {
|
|
1408
|
+
id: string;
|
|
1409
|
+
createdAt: Date;
|
|
1410
|
+
updatedAt: Date;
|
|
1411
|
+
userId: string;
|
|
1412
|
+
expiresAt: Date;
|
|
1413
|
+
token: string;
|
|
1414
|
+
ipAddress?: string | null | undefined;
|
|
1415
|
+
userAgent?: string | null | undefined;
|
|
1416
|
+
};
|
|
1274
1417
|
};
|
|
1275
|
-
}
|
|
1276
|
-
query: import("
|
|
1277
|
-
searchValue: import("
|
|
1278
|
-
searchField: import("
|
|
1279
|
-
name: "name";
|
|
1418
|
+
}>>[];
|
|
1419
|
+
query: import("zod").ZodObject<{
|
|
1420
|
+
searchValue: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1421
|
+
searchField: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1280
1422
|
email: "email";
|
|
1423
|
+
name: "name";
|
|
1281
1424
|
}>>;
|
|
1282
|
-
searchOperator: import("
|
|
1425
|
+
searchOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1283
1426
|
contains: "contains";
|
|
1284
1427
|
starts_with: "starts_with";
|
|
1285
1428
|
ends_with: "ends_with";
|
|
1286
1429
|
}>>;
|
|
1287
|
-
limit: import("
|
|
1288
|
-
offset: import("
|
|
1289
|
-
sortBy: import("
|
|
1290
|
-
sortDirection: import("
|
|
1430
|
+
limit: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
|
|
1431
|
+
offset: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
|
|
1432
|
+
sortBy: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1433
|
+
sortDirection: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1291
1434
|
asc: "asc";
|
|
1292
1435
|
desc: "desc";
|
|
1293
1436
|
}>>;
|
|
1294
|
-
filterField: import("
|
|
1295
|
-
filterValue: import("
|
|
1296
|
-
filterOperator: import("
|
|
1437
|
+
filterField: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1438
|
+
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>]>>;
|
|
1439
|
+
filterOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1297
1440
|
eq: "eq";
|
|
1298
1441
|
ne: "ne";
|
|
1299
|
-
lt: "lt";
|
|
1300
|
-
lte: "lte";
|
|
1301
1442
|
gt: "gt";
|
|
1302
1443
|
gte: "gte";
|
|
1444
|
+
lt: "lt";
|
|
1445
|
+
lte: "lte";
|
|
1446
|
+
in: "in";
|
|
1447
|
+
not_in: "not_in";
|
|
1303
1448
|
contains: "contains";
|
|
1449
|
+
starts_with: "starts_with";
|
|
1450
|
+
ends_with: "ends_with";
|
|
1304
1451
|
}>>;
|
|
1305
|
-
}, import("
|
|
1452
|
+
}, import("zod/v4/core").$strip>;
|
|
1306
1453
|
metadata: {
|
|
1307
1454
|
openapi: {
|
|
1308
1455
|
operationId: string;
|
|
@@ -1344,17 +1491,26 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1344
1491
|
users: import("better-auth/plugins").UserWithRole[];
|
|
1345
1492
|
total: number;
|
|
1346
1493
|
}>;
|
|
1347
|
-
listUserSessions: import("better-
|
|
1494
|
+
listUserSessions: import("better-call").StrictEndpoint<"/admin/list-user-sessions", {
|
|
1348
1495
|
method: "POST";
|
|
1349
|
-
use: ((inputContext: import("better-
|
|
1496
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1350
1497
|
session: {
|
|
1351
1498
|
user: import("better-auth/plugins").UserWithRole;
|
|
1352
|
-
session:
|
|
1499
|
+
session: {
|
|
1500
|
+
id: string;
|
|
1501
|
+
createdAt: Date;
|
|
1502
|
+
updatedAt: Date;
|
|
1503
|
+
userId: string;
|
|
1504
|
+
expiresAt: Date;
|
|
1505
|
+
token: string;
|
|
1506
|
+
ipAddress?: string | null | undefined;
|
|
1507
|
+
userAgent?: string | null | undefined;
|
|
1508
|
+
};
|
|
1353
1509
|
};
|
|
1354
|
-
}
|
|
1355
|
-
body: import("
|
|
1356
|
-
userId: import("
|
|
1357
|
-
}, import("
|
|
1510
|
+
}>>[];
|
|
1511
|
+
body: import("zod").ZodObject<{
|
|
1512
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1513
|
+
}, import("zod/v4/core").$strip>;
|
|
1358
1514
|
metadata: {
|
|
1359
1515
|
openapi: {
|
|
1360
1516
|
operationId: string;
|
|
@@ -1385,17 +1541,26 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1385
1541
|
}, {
|
|
1386
1542
|
sessions: import("better-auth/plugins").SessionWithImpersonatedBy[];
|
|
1387
1543
|
}>;
|
|
1388
|
-
unbanUser: import("better-
|
|
1544
|
+
unbanUser: import("better-call").StrictEndpoint<"/admin/unban-user", {
|
|
1389
1545
|
method: "POST";
|
|
1390
|
-
body: import("
|
|
1391
|
-
userId: import("
|
|
1392
|
-
}, import("
|
|
1393
|
-
use: ((inputContext: import("better-
|
|
1546
|
+
body: import("zod").ZodObject<{
|
|
1547
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1548
|
+
}, import("zod/v4/core").$strip>;
|
|
1549
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1394
1550
|
session: {
|
|
1395
1551
|
user: import("better-auth/plugins").UserWithRole;
|
|
1396
|
-
session:
|
|
1552
|
+
session: {
|
|
1553
|
+
id: string;
|
|
1554
|
+
createdAt: Date;
|
|
1555
|
+
updatedAt: Date;
|
|
1556
|
+
userId: string;
|
|
1557
|
+
expiresAt: Date;
|
|
1558
|
+
token: string;
|
|
1559
|
+
ipAddress?: string | null | undefined;
|
|
1560
|
+
userAgent?: string | null | undefined;
|
|
1561
|
+
};
|
|
1397
1562
|
};
|
|
1398
|
-
}
|
|
1563
|
+
}>>[];
|
|
1399
1564
|
metadata: {
|
|
1400
1565
|
openapi: {
|
|
1401
1566
|
operationId: string;
|
|
@@ -1423,19 +1588,28 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1423
1588
|
}, {
|
|
1424
1589
|
user: import("better-auth/plugins").UserWithRole;
|
|
1425
1590
|
}>;
|
|
1426
|
-
banUser: import("better-
|
|
1591
|
+
banUser: import("better-call").StrictEndpoint<"/admin/ban-user", {
|
|
1427
1592
|
method: "POST";
|
|
1428
|
-
body: import("
|
|
1429
|
-
userId: import("
|
|
1430
|
-
banReason: import("
|
|
1431
|
-
banExpiresIn: import("
|
|
1432
|
-
}, import("
|
|
1433
|
-
use: ((inputContext: import("better-
|
|
1593
|
+
body: import("zod").ZodObject<{
|
|
1594
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1595
|
+
banReason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1596
|
+
banExpiresIn: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1597
|
+
}, import("zod/v4/core").$strip>;
|
|
1598
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1434
1599
|
session: {
|
|
1435
1600
|
user: import("better-auth/plugins").UserWithRole;
|
|
1436
|
-
session:
|
|
1601
|
+
session: {
|
|
1602
|
+
id: string;
|
|
1603
|
+
createdAt: Date;
|
|
1604
|
+
updatedAt: Date;
|
|
1605
|
+
userId: string;
|
|
1606
|
+
expiresAt: Date;
|
|
1607
|
+
token: string;
|
|
1608
|
+
ipAddress?: string | null | undefined;
|
|
1609
|
+
userAgent?: string | null | undefined;
|
|
1610
|
+
};
|
|
1437
1611
|
};
|
|
1438
|
-
}
|
|
1612
|
+
}>>[];
|
|
1439
1613
|
metadata: {
|
|
1440
1614
|
openapi: {
|
|
1441
1615
|
operationId: string;
|
|
@@ -1463,17 +1637,26 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1463
1637
|
}, {
|
|
1464
1638
|
user: import("better-auth/plugins").UserWithRole;
|
|
1465
1639
|
}>;
|
|
1466
|
-
impersonateUser: import("better-
|
|
1640
|
+
impersonateUser: import("better-call").StrictEndpoint<"/admin/impersonate-user", {
|
|
1467
1641
|
method: "POST";
|
|
1468
|
-
body: import("
|
|
1469
|
-
userId: import("
|
|
1470
|
-
}, import("
|
|
1471
|
-
use: ((inputContext: import("better-
|
|
1642
|
+
body: import("zod").ZodObject<{
|
|
1643
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1644
|
+
}, import("zod/v4/core").$strip>;
|
|
1645
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1472
1646
|
session: {
|
|
1473
1647
|
user: import("better-auth/plugins").UserWithRole;
|
|
1474
|
-
session:
|
|
1648
|
+
session: {
|
|
1649
|
+
id: string;
|
|
1650
|
+
createdAt: Date;
|
|
1651
|
+
updatedAt: Date;
|
|
1652
|
+
userId: string;
|
|
1653
|
+
expiresAt: Date;
|
|
1654
|
+
token: string;
|
|
1655
|
+
ipAddress?: string | null | undefined;
|
|
1656
|
+
userAgent?: string | null | undefined;
|
|
1657
|
+
};
|
|
1475
1658
|
};
|
|
1476
|
-
}
|
|
1659
|
+
}>>[];
|
|
1477
1660
|
metadata: {
|
|
1478
1661
|
openapi: {
|
|
1479
1662
|
operationId: string;
|
|
@@ -1514,7 +1697,7 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1514
1697
|
};
|
|
1515
1698
|
user: import("better-auth/plugins").UserWithRole;
|
|
1516
1699
|
}>;
|
|
1517
|
-
stopImpersonating: import("better-
|
|
1700
|
+
stopImpersonating: import("better-call").StrictEndpoint<"/admin/stop-impersonating", {
|
|
1518
1701
|
method: "POST";
|
|
1519
1702
|
requireHeaders: true;
|
|
1520
1703
|
}, {
|
|
@@ -1538,17 +1721,26 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1538
1721
|
image?: string | null | undefined;
|
|
1539
1722
|
} & Record<string, any>;
|
|
1540
1723
|
}>;
|
|
1541
|
-
revokeUserSession: import("better-
|
|
1724
|
+
revokeUserSession: import("better-call").StrictEndpoint<"/admin/revoke-user-session", {
|
|
1542
1725
|
method: "POST";
|
|
1543
|
-
body: import("
|
|
1544
|
-
sessionToken: import("
|
|
1545
|
-
}, import("
|
|
1546
|
-
use: ((inputContext: import("better-
|
|
1726
|
+
body: import("zod").ZodObject<{
|
|
1727
|
+
sessionToken: import("zod").ZodString;
|
|
1728
|
+
}, import("zod/v4/core").$strip>;
|
|
1729
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1547
1730
|
session: {
|
|
1548
1731
|
user: import("better-auth/plugins").UserWithRole;
|
|
1549
|
-
session:
|
|
1732
|
+
session: {
|
|
1733
|
+
id: string;
|
|
1734
|
+
createdAt: Date;
|
|
1735
|
+
updatedAt: Date;
|
|
1736
|
+
userId: string;
|
|
1737
|
+
expiresAt: Date;
|
|
1738
|
+
token: string;
|
|
1739
|
+
ipAddress?: string | null | undefined;
|
|
1740
|
+
userAgent?: string | null | undefined;
|
|
1741
|
+
};
|
|
1550
1742
|
};
|
|
1551
|
-
}
|
|
1743
|
+
}>>[];
|
|
1552
1744
|
metadata: {
|
|
1553
1745
|
openapi: {
|
|
1554
1746
|
operationId: string;
|
|
@@ -1576,17 +1768,26 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1576
1768
|
}, {
|
|
1577
1769
|
success: boolean;
|
|
1578
1770
|
}>;
|
|
1579
|
-
revokeUserSessions: import("better-
|
|
1771
|
+
revokeUserSessions: import("better-call").StrictEndpoint<"/admin/revoke-user-sessions", {
|
|
1580
1772
|
method: "POST";
|
|
1581
|
-
body: import("
|
|
1582
|
-
userId: import("
|
|
1583
|
-
}, import("
|
|
1584
|
-
use: ((inputContext: import("better-
|
|
1773
|
+
body: import("zod").ZodObject<{
|
|
1774
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1775
|
+
}, import("zod/v4/core").$strip>;
|
|
1776
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1585
1777
|
session: {
|
|
1586
1778
|
user: import("better-auth/plugins").UserWithRole;
|
|
1587
|
-
session:
|
|
1779
|
+
session: {
|
|
1780
|
+
id: string;
|
|
1781
|
+
createdAt: Date;
|
|
1782
|
+
updatedAt: Date;
|
|
1783
|
+
userId: string;
|
|
1784
|
+
expiresAt: Date;
|
|
1785
|
+
token: string;
|
|
1786
|
+
ipAddress?: string | null | undefined;
|
|
1787
|
+
userAgent?: string | null | undefined;
|
|
1788
|
+
};
|
|
1588
1789
|
};
|
|
1589
|
-
}
|
|
1790
|
+
}>>[];
|
|
1590
1791
|
metadata: {
|
|
1591
1792
|
openapi: {
|
|
1592
1793
|
operationId: string;
|
|
@@ -1614,17 +1815,26 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1614
1815
|
}, {
|
|
1615
1816
|
success: boolean;
|
|
1616
1817
|
}>;
|
|
1617
|
-
removeUser: import("better-
|
|
1818
|
+
removeUser: import("better-call").StrictEndpoint<"/admin/remove-user", {
|
|
1618
1819
|
method: "POST";
|
|
1619
|
-
body: import("
|
|
1620
|
-
userId: import("
|
|
1621
|
-
}, import("
|
|
1622
|
-
use: ((inputContext: import("better-
|
|
1820
|
+
body: import("zod").ZodObject<{
|
|
1821
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1822
|
+
}, import("zod/v4/core").$strip>;
|
|
1823
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1623
1824
|
session: {
|
|
1624
1825
|
user: import("better-auth/plugins").UserWithRole;
|
|
1625
|
-
session:
|
|
1826
|
+
session: {
|
|
1827
|
+
id: string;
|
|
1828
|
+
createdAt: Date;
|
|
1829
|
+
updatedAt: Date;
|
|
1830
|
+
userId: string;
|
|
1831
|
+
expiresAt: Date;
|
|
1832
|
+
token: string;
|
|
1833
|
+
ipAddress?: string | null | undefined;
|
|
1834
|
+
userAgent?: string | null | undefined;
|
|
1835
|
+
};
|
|
1626
1836
|
};
|
|
1627
|
-
}
|
|
1837
|
+
}>>[];
|
|
1628
1838
|
metadata: {
|
|
1629
1839
|
openapi: {
|
|
1630
1840
|
operationId: string;
|
|
@@ -1652,18 +1862,27 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1652
1862
|
}, {
|
|
1653
1863
|
success: boolean;
|
|
1654
1864
|
}>;
|
|
1655
|
-
setUserPassword: import("better-
|
|
1865
|
+
setUserPassword: import("better-call").StrictEndpoint<"/admin/set-user-password", {
|
|
1656
1866
|
method: "POST";
|
|
1657
|
-
body: import("
|
|
1658
|
-
newPassword: import("
|
|
1659
|
-
userId: import("
|
|
1660
|
-
}, import("
|
|
1661
|
-
use: ((inputContext: import("better-
|
|
1867
|
+
body: import("zod").ZodObject<{
|
|
1868
|
+
newPassword: import("zod").ZodString;
|
|
1869
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1870
|
+
}, import("zod/v4/core").$strip>;
|
|
1871
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1662
1872
|
session: {
|
|
1663
1873
|
user: import("better-auth/plugins").UserWithRole;
|
|
1664
|
-
session:
|
|
1874
|
+
session: {
|
|
1875
|
+
id: string;
|
|
1876
|
+
createdAt: Date;
|
|
1877
|
+
updatedAt: Date;
|
|
1878
|
+
userId: string;
|
|
1879
|
+
expiresAt: Date;
|
|
1880
|
+
token: string;
|
|
1881
|
+
ipAddress?: string | null | undefined;
|
|
1882
|
+
userAgent?: string | null | undefined;
|
|
1883
|
+
};
|
|
1665
1884
|
};
|
|
1666
|
-
}
|
|
1885
|
+
}>>[];
|
|
1667
1886
|
metadata: {
|
|
1668
1887
|
openapi: {
|
|
1669
1888
|
operationId: string;
|
|
@@ -1691,18 +1910,16 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1691
1910
|
}, {
|
|
1692
1911
|
status: boolean;
|
|
1693
1912
|
}>;
|
|
1694
|
-
userHasPermission: import("better-
|
|
1913
|
+
userHasPermission: import("better-call").StrictEndpoint<"/admin/has-permission", {
|
|
1695
1914
|
method: "POST";
|
|
1696
|
-
body: import("
|
|
1697
|
-
userId: import("
|
|
1698
|
-
role: import("
|
|
1699
|
-
}, import("
|
|
1700
|
-
permission: import("
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
permissions: import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>>;
|
|
1705
|
-
}, import("better-auth/*").$strip>]>>;
|
|
1915
|
+
body: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
1916
|
+
userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
|
|
1917
|
+
role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1918
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodXor<readonly [import("zod").ZodObject<{
|
|
1919
|
+
permission: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>;
|
|
1920
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1921
|
+
permissions: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>;
|
|
1922
|
+
}, import("zod/v4/core").$strip>]>>;
|
|
1706
1923
|
metadata: {
|
|
1707
1924
|
openapi: {
|
|
1708
1925
|
description: string;
|
|
@@ -1712,11 +1929,6 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1712
1929
|
schema: {
|
|
1713
1930
|
type: "object";
|
|
1714
1931
|
properties: {
|
|
1715
|
-
permission: {
|
|
1716
|
-
type: string;
|
|
1717
|
-
description: string;
|
|
1718
|
-
deprecated: boolean;
|
|
1719
|
-
};
|
|
1720
1932
|
permissions: {
|
|
1721
1933
|
type: string;
|
|
1722
1934
|
description: string;
|
|
@@ -1750,19 +1962,12 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1750
1962
|
};
|
|
1751
1963
|
};
|
|
1752
1964
|
$Infer: {
|
|
1753
|
-
body:
|
|
1754
|
-
permission: {
|
|
1755
|
-
readonly user?: ("create" | "update" | "delete" | "list" | "get" | "set-role" | "ban" | "impersonate" | "set-password")[] | undefined;
|
|
1756
|
-
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
1757
|
-
};
|
|
1758
|
-
permissions?: never | undefined;
|
|
1759
|
-
} | {
|
|
1965
|
+
body: {
|
|
1760
1966
|
permissions: {
|
|
1761
|
-
readonly user?: ("create" | "update" | "delete" | "list" | "get" | "set-role" | "ban" | "impersonate" | "set-password")[] | undefined;
|
|
1967
|
+
readonly user?: ("create" | "update" | "delete" | "list" | "get" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email")[] | undefined;
|
|
1762
1968
|
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
1763
1969
|
};
|
|
1764
|
-
|
|
1765
|
-
}) & {
|
|
1970
|
+
} & {
|
|
1766
1971
|
userId?: string | undefined;
|
|
1767
1972
|
role?: "user" | "admin" | "staff" | undefined;
|
|
1768
1973
|
};
|
|
@@ -1774,27 +1979,29 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1774
1979
|
}>;
|
|
1775
1980
|
};
|
|
1776
1981
|
$ERROR_CODES: {
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1982
|
+
USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
|
|
1983
|
+
FAILED_TO_CREATE_USER: import("better-auth").RawError<"FAILED_TO_CREATE_USER">;
|
|
1984
|
+
USER_ALREADY_EXISTS: import("better-auth").RawError<"USER_ALREADY_EXISTS">;
|
|
1985
|
+
YOU_CANNOT_BAN_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_BAN_YOURSELF">;
|
|
1986
|
+
YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE">;
|
|
1987
|
+
YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS">;
|
|
1988
|
+
YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS">;
|
|
1989
|
+
YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS">;
|
|
1990
|
+
YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_BAN_USERS">;
|
|
1991
|
+
YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS">;
|
|
1992
|
+
YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS">;
|
|
1993
|
+
YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS">;
|
|
1994
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD">;
|
|
1995
|
+
BANNED_USER: import("better-auth").RawError<"BANNED_USER">;
|
|
1996
|
+
YOU_ARE_NOT_ALLOWED_TO_GET_USER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_USER">;
|
|
1997
|
+
NO_DATA_TO_UPDATE: import("better-auth").RawError<"NO_DATA_TO_UPDATE">;
|
|
1998
|
+
YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS">;
|
|
1999
|
+
YOU_CANNOT_REMOVE_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_REMOVE_YOURSELF">;
|
|
2000
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE">;
|
|
2001
|
+
YOU_CANNOT_IMPERSONATE_ADMINS: import("better-auth").RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
|
|
2002
|
+
INVALID_ROLE_TYPE: import("better-auth").RawError<"INVALID_ROLE_TYPE">;
|
|
2003
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL">;
|
|
2004
|
+
PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER: import("better-auth").RawError<"PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER">;
|
|
1798
2005
|
};
|
|
1799
2006
|
schema: {
|
|
1800
2007
|
user: {
|
|
@@ -1827,85 +2034,46 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1827
2034
|
impersonatedBy: {
|
|
1828
2035
|
type: "string";
|
|
1829
2036
|
required: false;
|
|
2037
|
+
input: false;
|
|
1830
2038
|
};
|
|
1831
2039
|
};
|
|
1832
2040
|
};
|
|
1833
2041
|
};
|
|
1834
2042
|
options: NoInfer<{
|
|
1835
2043
|
accessControl: {
|
|
1836
|
-
newRole<
|
|
1837
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
2044
|
+
newRole<const TRoleStatements extends import("better-auth/plugins").Statements>(statements: import("better-auth/plugins").RoleInput<{
|
|
2045
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
1838
2046
|
readonly session: readonly ["list", "revoke", "delete"];
|
|
1839
|
-
}>): {
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
}>[key] | {
|
|
1844
|
-
actions: import("better-auth/plugins").Subset<K, {
|
|
1845
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1846
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
1847
|
-
}>[key];
|
|
1848
|
-
connector: "OR" | "AND";
|
|
1849
|
-
} | undefined; } : never, connector?: "OR" | "AND"): import("better-auth/plugins").AuthorizeResponse;
|
|
1850
|
-
statements: import("better-auth/plugins").Subset<K, {
|
|
1851
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1852
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
1853
|
-
}>;
|
|
1854
|
-
};
|
|
2047
|
+
}, TRoleStatements>): import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<TRoleStatements>, {
|
|
2048
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
2049
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
2050
|
+
}>;
|
|
1855
2051
|
statements: {
|
|
1856
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
2052
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
1857
2053
|
readonly session: readonly ["list", "revoke", "delete"];
|
|
1858
2054
|
};
|
|
1859
2055
|
};
|
|
1860
2056
|
roles: {
|
|
1861
|
-
admin: {
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
}>[key] | {
|
|
1882
|
-
actions: import("better-auth/plugins").Subset<"user" | "session", {
|
|
1883
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1884
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
1885
|
-
}>[key];
|
|
1886
|
-
connector: "OR" | "AND";
|
|
1887
|
-
} | undefined; } : never, connector?: "OR" | "AND"): import("better-auth/plugins").AuthorizeResponse;
|
|
1888
|
-
statements: import("better-auth/plugins").Subset<"user" | "session", {
|
|
1889
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1890
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
1891
|
-
}>;
|
|
1892
|
-
};
|
|
1893
|
-
staff: {
|
|
1894
|
-
authorize<K_1 extends "user">(request: K_1 extends infer T extends K ? { [key in T]?: import("better-auth/plugins").Subset<"user", {
|
|
1895
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1896
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
1897
|
-
}>[key] | {
|
|
1898
|
-
actions: import("better-auth/plugins").Subset<"user", {
|
|
1899
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1900
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
1901
|
-
}>[key];
|
|
1902
|
-
connector: "OR" | "AND";
|
|
1903
|
-
} | undefined; } : never, connector?: "OR" | "AND"): import("better-auth/plugins").AuthorizeResponse;
|
|
1904
|
-
statements: import("better-auth/plugins").Subset<"user", {
|
|
1905
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1906
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
1907
|
-
}>;
|
|
1908
|
-
};
|
|
2057
|
+
admin: import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<import("better-auth/plugins").ExactRoleStatements<{
|
|
2058
|
+
readonly user: ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "set-email", "get", "update"];
|
|
2059
|
+
readonly session: ["list", "revoke", "delete"];
|
|
2060
|
+
}>>, {
|
|
2061
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
2062
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
2063
|
+
}>;
|
|
2064
|
+
user: import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<import("better-auth/plugins").ExactRoleStatements<{
|
|
2065
|
+
readonly user: [];
|
|
2066
|
+
readonly session: [];
|
|
2067
|
+
}>>, {
|
|
2068
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
2069
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
2070
|
+
}>;
|
|
2071
|
+
staff: import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<{
|
|
2072
|
+
readonly user: ["create", "list", "delete"];
|
|
2073
|
+
}>, {
|
|
2074
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
2075
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
2076
|
+
}>;
|
|
1909
2077
|
};
|
|
1910
2078
|
}>;
|
|
1911
2079
|
})[];
|
|
@@ -1940,8 +2108,8 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1940
2108
|
};
|
|
1941
2109
|
};
|
|
1942
2110
|
readonly hooks: {
|
|
1943
|
-
readonly before:
|
|
1944
|
-
readonly after:
|
|
2111
|
+
readonly before: import("better-call").MiddlewareHandler;
|
|
2112
|
+
readonly after: import("better-call").MiddlewareHandler;
|
|
1945
2113
|
};
|
|
1946
2114
|
readonly emailAndPassword: {
|
|
1947
2115
|
readonly enabled: true;
|