rimecms 0.31.2 → 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/collections/local-api.server.d.ts +4 -3
- package/dist/core/collections/local-api.server.js +4 -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/augment-panel-access.server.d.ts +3 -1
- package/dist/core/config/server/build-config.server.d.ts +3 -1
- package/dist/core/config/server/write.server.js +5 -0
- package/dist/core/config/types.d.ts +9 -3
- 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/pages/collection/Collection.svelte +1 -1
- 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
|
@@ -14,40 +14,47 @@ export type ConfigContext<C extends Config = Config> = ReturnType<typeof createC
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function createRime<const C extends Config>(config: BuildConfig<C>): Promise<{
|
|
16
16
|
readonly defineLocale: (event: RequestEvent) => string | undefined;
|
|
17
|
-
readonly auth: import("better-auth
|
|
17
|
+
readonly auth: import("better-auth").Auth<{
|
|
18
18
|
plugins: ({
|
|
19
19
|
id: "api-key";
|
|
20
|
+
version: string;
|
|
20
21
|
$ERROR_CODES: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
22
|
+
INVALID_METADATA_TYPE: import("better-auth").RawError<"INVALID_METADATA_TYPE">;
|
|
23
|
+
REFILL_AMOUNT_AND_INTERVAL_REQUIRED: import("better-auth").RawError<"REFILL_AMOUNT_AND_INTERVAL_REQUIRED">;
|
|
24
|
+
REFILL_INTERVAL_AND_AMOUNT_REQUIRED: import("better-auth").RawError<"REFILL_INTERVAL_AND_AMOUNT_REQUIRED">;
|
|
25
|
+
USER_BANNED: import("better-auth").RawError<"USER_BANNED">;
|
|
26
|
+
UNAUTHORIZED_SESSION: import("better-auth").RawError<"UNAUTHORIZED_SESSION">;
|
|
27
|
+
KEY_NOT_FOUND: import("better-auth").RawError<"KEY_NOT_FOUND">;
|
|
28
|
+
KEY_DISABLED: import("better-auth").RawError<"KEY_DISABLED">;
|
|
29
|
+
KEY_EXPIRED: import("better-auth").RawError<"KEY_EXPIRED">;
|
|
30
|
+
USAGE_EXCEEDED: import("better-auth").RawError<"USAGE_EXCEEDED">;
|
|
31
|
+
KEY_NOT_RECOVERABLE: import("better-auth").RawError<"KEY_NOT_RECOVERABLE">;
|
|
32
|
+
EXPIRES_IN_IS_TOO_SMALL: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_SMALL">;
|
|
33
|
+
EXPIRES_IN_IS_TOO_LARGE: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_LARGE">;
|
|
34
|
+
INVALID_REMAINING: import("better-auth").RawError<"INVALID_REMAINING">;
|
|
35
|
+
INVALID_PREFIX_LENGTH: import("better-auth").RawError<"INVALID_PREFIX_LENGTH">;
|
|
36
|
+
INVALID_NAME_LENGTH: import("better-auth").RawError<"INVALID_NAME_LENGTH">;
|
|
37
|
+
METADATA_DISABLED: import("better-auth").RawError<"METADATA_DISABLED">;
|
|
38
|
+
RATE_LIMIT_EXCEEDED: import("better-auth").RawError<"RATE_LIMIT_EXCEEDED">;
|
|
39
|
+
NO_VALUES_TO_UPDATE: import("better-auth").RawError<"NO_VALUES_TO_UPDATE">;
|
|
40
|
+
KEY_DISABLED_EXPIRATION: import("better-auth").RawError<"KEY_DISABLED_EXPIRATION">;
|
|
41
|
+
INVALID_API_KEY: import("better-auth").RawError<"INVALID_API_KEY">;
|
|
42
|
+
INVALID_USER_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_USER_ID_FROM_API_KEY">;
|
|
43
|
+
INVALID_REFERENCE_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_REFERENCE_ID_FROM_API_KEY">;
|
|
44
|
+
INVALID_API_KEY_GETTER_RETURN_TYPE: import("better-auth").RawError<"INVALID_API_KEY_GETTER_RETURN_TYPE">;
|
|
45
|
+
SERVER_ONLY_PROPERTY: import("better-auth").RawError<"SERVER_ONLY_PROPERTY">;
|
|
46
|
+
FAILED_TO_UPDATE_API_KEY: import("better-auth").RawError<"FAILED_TO_UPDATE_API_KEY">;
|
|
47
|
+
NAME_REQUIRED: import("better-auth").RawError<"NAME_REQUIRED">;
|
|
48
|
+
ORGANIZATION_ID_REQUIRED: import("better-auth").RawError<"ORGANIZATION_ID_REQUIRED">;
|
|
49
|
+
USER_NOT_MEMBER_OF_ORGANIZATION: import("better-auth").RawError<"USER_NOT_MEMBER_OF_ORGANIZATION">;
|
|
50
|
+
INSUFFICIENT_API_KEY_PERMISSIONS: import("better-auth").RawError<"INSUFFICIENT_API_KEY_PERMISSIONS">;
|
|
51
|
+
NO_DEFAULT_API_KEY_CONFIGURATION_FOUND: import("better-auth").RawError<"NO_DEFAULT_API_KEY_CONFIGURATION_FOUND">;
|
|
52
|
+
ORGANIZATION_PLUGIN_REQUIRED: import("better-auth").RawError<"ORGANIZATION_PLUGIN_REQUIRED">;
|
|
46
53
|
};
|
|
47
54
|
hooks: {
|
|
48
55
|
before: {
|
|
49
|
-
matcher: (ctx: import("better-auth
|
|
50
|
-
handler: (inputContext: import("better-
|
|
56
|
+
matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
|
|
57
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
51
58
|
user: {
|
|
52
59
|
id: string;
|
|
53
60
|
createdAt: Date;
|
|
@@ -68,14 +75,10 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
68
75
|
expiresAt: Date;
|
|
69
76
|
};
|
|
70
77
|
} | {
|
|
71
|
-
context: import("better-
|
|
72
|
-
|
|
73
|
-
responseHeaders?: Headers | undefined;
|
|
74
|
-
} & import("better-auth/*").PluginContext & import("better-auth/*").InfoContext & {
|
|
75
|
-
options: import("better-auth/*").BetterAuthOptions;
|
|
76
|
-
appName: string;
|
|
77
|
-
baseURL: string;
|
|
78
|
+
context: import("better-call").MiddlewareContext<import("better-call").MiddlewareOptions, import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
|
|
79
|
+
options: import("better-auth").BetterAuthOptions;
|
|
78
80
|
trustedOrigins: string[];
|
|
81
|
+
trustedProviders: string[];
|
|
79
82
|
isTrustedOrigin: (url: string, settings?: {
|
|
80
83
|
allowRelativePaths: boolean;
|
|
81
84
|
}) => boolean;
|
|
@@ -84,44 +87,97 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
84
87
|
storeStateStrategy: "database" | "cookie";
|
|
85
88
|
};
|
|
86
89
|
newSession: {
|
|
87
|
-
session:
|
|
88
|
-
|
|
90
|
+
session: {
|
|
91
|
+
id: string;
|
|
92
|
+
createdAt: Date;
|
|
93
|
+
updatedAt: Date;
|
|
94
|
+
userId: string;
|
|
95
|
+
expiresAt: Date;
|
|
96
|
+
token: string;
|
|
97
|
+
ipAddress?: string | null | undefined;
|
|
98
|
+
userAgent?: string | null | undefined;
|
|
99
|
+
} & Record<string, any>;
|
|
100
|
+
user: {
|
|
101
|
+
id: string;
|
|
102
|
+
createdAt: Date;
|
|
103
|
+
updatedAt: Date;
|
|
104
|
+
email: string;
|
|
105
|
+
emailVerified: boolean;
|
|
106
|
+
name: string;
|
|
107
|
+
image?: string | null | undefined;
|
|
108
|
+
} & Record<string, any>;
|
|
89
109
|
} | null;
|
|
90
110
|
session: {
|
|
91
|
-
session:
|
|
92
|
-
|
|
111
|
+
session: {
|
|
112
|
+
id: string;
|
|
113
|
+
createdAt: Date;
|
|
114
|
+
updatedAt: Date;
|
|
115
|
+
userId: string;
|
|
116
|
+
expiresAt: Date;
|
|
117
|
+
token: string;
|
|
118
|
+
ipAddress?: string | null | undefined;
|
|
119
|
+
userAgent?: string | null | undefined;
|
|
120
|
+
} & Record<string, any>;
|
|
121
|
+
user: {
|
|
122
|
+
id: string;
|
|
123
|
+
createdAt: Date;
|
|
124
|
+
updatedAt: Date;
|
|
125
|
+
email: string;
|
|
126
|
+
emailVerified: boolean;
|
|
127
|
+
name: string;
|
|
128
|
+
image?: string | null | undefined;
|
|
129
|
+
} & Record<string, any>;
|
|
93
130
|
} | null;
|
|
94
131
|
setNewSession: (session: {
|
|
95
|
-
session:
|
|
96
|
-
|
|
132
|
+
session: {
|
|
133
|
+
id: string;
|
|
134
|
+
createdAt: Date;
|
|
135
|
+
updatedAt: Date;
|
|
136
|
+
userId: string;
|
|
137
|
+
expiresAt: Date;
|
|
138
|
+
token: string;
|
|
139
|
+
ipAddress?: string | null | undefined;
|
|
140
|
+
userAgent?: string | null | undefined;
|
|
141
|
+
} & Record<string, any>;
|
|
142
|
+
user: {
|
|
143
|
+
id: string;
|
|
144
|
+
createdAt: Date;
|
|
145
|
+
updatedAt: Date;
|
|
146
|
+
email: string;
|
|
147
|
+
emailVerified: boolean;
|
|
148
|
+
name: string;
|
|
149
|
+
image?: string | null | undefined;
|
|
150
|
+
} & Record<string, any>;
|
|
97
151
|
} | null) => void;
|
|
98
|
-
socialProviders: import("better-auth
|
|
99
|
-
authCookies: import("better-auth
|
|
100
|
-
logger: ReturnType<(options?: import("better-auth
|
|
152
|
+
socialProviders: import("better-auth").OAuthProvider[];
|
|
153
|
+
authCookies: import("better-auth").BetterAuthCookies;
|
|
154
|
+
logger: ReturnType<(options?: import("better-auth").Logger | undefined) => import("better-auth").InternalLogger>;
|
|
101
155
|
rateLimit: {
|
|
102
156
|
enabled: boolean;
|
|
103
157
|
window: number;
|
|
104
158
|
max: number;
|
|
105
159
|
storage: "memory" | "database" | "secondary-storage";
|
|
106
|
-
} & Omit<import("better-auth
|
|
107
|
-
adapter: import("better-auth
|
|
108
|
-
internalAdapter: import("better-auth
|
|
109
|
-
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-
|
|
160
|
+
} & Omit<import("better-auth").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
|
|
161
|
+
adapter: import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
|
|
162
|
+
internalAdapter: import("better-auth").InternalAdapter<import("better-auth").BetterAuthOptions>;
|
|
163
|
+
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-call").CookieOptions> | undefined) => import("better-auth").BetterAuthCookie;
|
|
110
164
|
secret: string;
|
|
165
|
+
secretConfig: string | import("better-auth").SecretConfig;
|
|
111
166
|
sessionConfig: {
|
|
112
167
|
updateAge: number;
|
|
113
168
|
expiresIn: number;
|
|
114
169
|
freshAge: number;
|
|
170
|
+
cookieCacheSigner?: import("better-auth").CookieCacheSigner | undefined;
|
|
115
171
|
cookieRefreshCache: false | {
|
|
116
172
|
enabled: true;
|
|
117
173
|
updateAge: number;
|
|
118
174
|
};
|
|
119
175
|
};
|
|
120
176
|
generateId: (options: {
|
|
121
|
-
model: import("better-auth
|
|
177
|
+
model: import("better-auth").ModelNames;
|
|
122
178
|
size?: number | undefined;
|
|
123
179
|
}) => string | false;
|
|
124
|
-
secondaryStorage: import("better-auth
|
|
180
|
+
secondaryStorage: import("better-auth").SecondaryStorage | undefined;
|
|
125
181
|
password: {
|
|
126
182
|
hash: (password: string) => Promise<string>;
|
|
127
183
|
verify: (data: {
|
|
@@ -132,9 +188,9 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
132
188
|
minPasswordLength: number;
|
|
133
189
|
maxPasswordLength: number;
|
|
134
190
|
};
|
|
135
|
-
checkPassword: (userId: string, ctx: import("better-auth
|
|
191
|
+
checkPassword: (userId: string, ctx: import("better-auth").GenericEndpointContext<import("better-auth").BetterAuthOptions>) => Promise<boolean>;
|
|
136
192
|
};
|
|
137
|
-
tables: import("better-auth
|
|
193
|
+
tables: import("better-auth").BetterAuthDBSchema;
|
|
138
194
|
runMigrations: () => Promise<void>;
|
|
139
195
|
publishTelemetry: (event: {
|
|
140
196
|
type: string;
|
|
@@ -144,28 +200,33 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
144
200
|
skipOriginCheck: boolean | string[];
|
|
145
201
|
skipCSRFCheck: boolean;
|
|
146
202
|
runInBackground: (promise: Promise<unknown>) => void;
|
|
147
|
-
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth
|
|
203
|
+
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
|
|
204
|
+
} & {
|
|
205
|
+
returned?: unknown | undefined;
|
|
206
|
+
responseHeaders?: Headers | undefined;
|
|
148
207
|
}>;
|
|
149
|
-
}
|
|
208
|
+
}>>;
|
|
150
209
|
}[];
|
|
151
210
|
};
|
|
152
211
|
endpoints: {
|
|
153
|
-
createApiKey: import("better-
|
|
212
|
+
createApiKey: import("better-call").StrictEndpoint<"/api-key/create", {
|
|
154
213
|
method: "POST";
|
|
155
|
-
body: import("
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
prefix: import("
|
|
160
|
-
remaining: import("
|
|
161
|
-
metadata: import("
|
|
162
|
-
refillAmount: import("
|
|
163
|
-
refillInterval: import("
|
|
164
|
-
rateLimitTimeWindow: import("
|
|
165
|
-
rateLimitMax: import("
|
|
166
|
-
rateLimitEnabled: import("
|
|
167
|
-
permissions: import("
|
|
168
|
-
|
|
214
|
+
body: import("zod").ZodObject<{
|
|
215
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
216
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
217
|
+
expiresIn: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>>;
|
|
218
|
+
prefix: import("zod").ZodOptional<import("zod").ZodString>;
|
|
219
|
+
remaining: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>>;
|
|
220
|
+
metadata: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
221
|
+
refillAmount: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
222
|
+
refillInterval: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
223
|
+
rateLimitTimeWindow: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
224
|
+
rateLimitMax: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
225
|
+
rateLimitEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
226
|
+
permissions: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>;
|
|
227
|
+
userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
|
|
228
|
+
organizationId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
|
|
229
|
+
}, import("zod/v4/core").$strip>;
|
|
169
230
|
metadata: {
|
|
170
231
|
openapi: {
|
|
171
232
|
description: string;
|
|
@@ -220,7 +281,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
220
281
|
nullable: boolean;
|
|
221
282
|
description: string;
|
|
222
283
|
};
|
|
223
|
-
|
|
284
|
+
referenceId: {
|
|
224
285
|
type: string;
|
|
225
286
|
description: string;
|
|
226
287
|
};
|
|
@@ -300,10 +361,11 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
300
361
|
metadata: any;
|
|
301
362
|
permissions: any;
|
|
302
363
|
id: string;
|
|
364
|
+
configId: string;
|
|
303
365
|
name: string | null;
|
|
304
366
|
start: string | null;
|
|
305
367
|
prefix: string | null;
|
|
306
|
-
|
|
368
|
+
referenceId: string;
|
|
307
369
|
refillInterval: number | null;
|
|
308
370
|
refillAmount: number | null;
|
|
309
371
|
lastRefillAt: Date | null;
|
|
@@ -318,16 +380,17 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
318
380
|
createdAt: Date;
|
|
319
381
|
updatedAt: Date;
|
|
320
382
|
}>;
|
|
321
|
-
verifyApiKey: import("better-
|
|
383
|
+
verifyApiKey: import("better-call").StrictEndpoint<string, {
|
|
322
384
|
method: "POST";
|
|
323
|
-
body: import("
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
385
|
+
body: import("zod").ZodObject<{
|
|
386
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
387
|
+
key: import("zod").ZodString;
|
|
388
|
+
permissions: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>;
|
|
389
|
+
}, import("zod/v4/core").$strip>;
|
|
327
390
|
}, {
|
|
328
391
|
valid: boolean;
|
|
329
392
|
error: {
|
|
330
|
-
message: "
|
|
393
|
+
message: import("better-auth").RawError<"INVALID_API_KEY">;
|
|
331
394
|
code: "KEY_NOT_FOUND";
|
|
332
395
|
};
|
|
333
396
|
key: null;
|
|
@@ -342,21 +405,22 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
342
405
|
} | {
|
|
343
406
|
valid: boolean;
|
|
344
407
|
error: {
|
|
345
|
-
message: "
|
|
408
|
+
message: import("better-auth").RawError<"INVALID_API_KEY">;
|
|
346
409
|
code: "INVALID_API_KEY";
|
|
347
410
|
};
|
|
348
411
|
key: null;
|
|
349
412
|
} | {
|
|
350
413
|
valid: boolean;
|
|
351
414
|
error: null;
|
|
352
|
-
key: Omit<import("better-auth/
|
|
415
|
+
key: Omit<import("@better-auth/api-key").ApiKey, "key"> | null;
|
|
353
416
|
}>;
|
|
354
|
-
getApiKey: import("better-
|
|
417
|
+
getApiKey: import("better-call").StrictEndpoint<"/api-key/get", {
|
|
355
418
|
method: "GET";
|
|
356
|
-
query: import("
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
419
|
+
query: import("zod").ZodObject<{
|
|
420
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
421
|
+
id: import("zod").ZodString;
|
|
422
|
+
}, import("zod/v4/core").$strip>;
|
|
423
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
360
424
|
session: {
|
|
361
425
|
session: Record<string, any> & {
|
|
362
426
|
id: string;
|
|
@@ -378,7 +442,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
378
442
|
image?: string | null | undefined;
|
|
379
443
|
};
|
|
380
444
|
};
|
|
381
|
-
}
|
|
445
|
+
}>>[];
|
|
382
446
|
metadata: {
|
|
383
447
|
openapi: {
|
|
384
448
|
description: string;
|
|
@@ -505,10 +569,11 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
505
569
|
[key: string]: string[];
|
|
506
570
|
} | null;
|
|
507
571
|
id: string;
|
|
572
|
+
configId: string;
|
|
508
573
|
name: string | null;
|
|
509
574
|
start: string | null;
|
|
510
575
|
prefix: string | null;
|
|
511
|
-
|
|
576
|
+
referenceId: string;
|
|
512
577
|
refillInterval: number | null;
|
|
513
578
|
refillAmount: number | null;
|
|
514
579
|
lastRefillAt: Date | null;
|
|
@@ -523,23 +588,24 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
523
588
|
createdAt: Date;
|
|
524
589
|
updatedAt: Date;
|
|
525
590
|
}>;
|
|
526
|
-
updateApiKey: import("better-
|
|
591
|
+
updateApiKey: import("better-call").StrictEndpoint<"/api-key/update", {
|
|
527
592
|
method: "POST";
|
|
528
|
-
body: import("
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
593
|
+
body: import("zod").ZodObject<{
|
|
594
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
595
|
+
keyId: import("zod").ZodString;
|
|
596
|
+
userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
|
|
597
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
598
|
+
enabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
599
|
+
remaining: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
600
|
+
refillAmount: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
601
|
+
refillInterval: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
602
|
+
metadata: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
603
|
+
expiresIn: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
604
|
+
rateLimitEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
605
|
+
rateLimitTimeWindow: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
606
|
+
rateLimitMax: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
607
|
+
permissions: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>>;
|
|
608
|
+
}, import("zod/v4/core").$strip>;
|
|
543
609
|
metadata: {
|
|
544
610
|
openapi: {
|
|
545
611
|
description: string;
|
|
@@ -666,10 +732,11 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
666
732
|
[key: string]: string[];
|
|
667
733
|
} | null;
|
|
668
734
|
id: string;
|
|
735
|
+
configId: string;
|
|
669
736
|
name: string | null;
|
|
670
737
|
start: string | null;
|
|
671
738
|
prefix: string | null;
|
|
672
|
-
|
|
739
|
+
referenceId: string;
|
|
673
740
|
refillInterval: number | null;
|
|
674
741
|
refillAmount: number | null;
|
|
675
742
|
lastRefillAt: Date | null;
|
|
@@ -684,12 +751,13 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
684
751
|
createdAt: Date;
|
|
685
752
|
updatedAt: Date;
|
|
686
753
|
}>;
|
|
687
|
-
deleteApiKey: import("better-
|
|
754
|
+
deleteApiKey: import("better-call").StrictEndpoint<"/api-key/delete", {
|
|
688
755
|
method: "POST";
|
|
689
|
-
body: import("
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
756
|
+
body: import("zod").ZodObject<{
|
|
757
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
758
|
+
keyId: import("zod").ZodString;
|
|
759
|
+
}, import("zod/v4/core").$strip>;
|
|
760
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
693
761
|
session: {
|
|
694
762
|
session: Record<string, any> & {
|
|
695
763
|
id: string;
|
|
@@ -711,7 +779,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
711
779
|
image?: string | null | undefined;
|
|
712
780
|
};
|
|
713
781
|
};
|
|
714
|
-
}
|
|
782
|
+
}>>[];
|
|
715
783
|
metadata: {
|
|
716
784
|
openapi: {
|
|
717
785
|
description: string;
|
|
@@ -755,9 +823,9 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
755
823
|
}, {
|
|
756
824
|
success: boolean;
|
|
757
825
|
}>;
|
|
758
|
-
listApiKeys: import("better-
|
|
826
|
+
listApiKeys: import("better-call").StrictEndpoint<"/api-key/list", {
|
|
759
827
|
method: "GET";
|
|
760
|
-
use: ((inputContext: import("better-
|
|
828
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
761
829
|
session: {
|
|
762
830
|
session: Record<string, any> & {
|
|
763
831
|
id: string;
|
|
@@ -779,7 +847,18 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
779
847
|
image?: string | null | undefined;
|
|
780
848
|
};
|
|
781
849
|
};
|
|
782
|
-
}
|
|
850
|
+
}>>[];
|
|
851
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
852
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
853
|
+
organizationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
854
|
+
limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
|
|
855
|
+
offset: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
|
|
856
|
+
sortBy: import("zod").ZodOptional<import("zod").ZodString>;
|
|
857
|
+
sortDirection: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
858
|
+
asc: "asc";
|
|
859
|
+
desc: "desc";
|
|
860
|
+
}>>;
|
|
861
|
+
}, import("zod/v4/core").$strip>>;
|
|
783
862
|
metadata: {
|
|
784
863
|
openapi: {
|
|
785
864
|
description: string;
|
|
@@ -789,113 +868,133 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
789
868
|
content: {
|
|
790
869
|
"application/json": {
|
|
791
870
|
schema: {
|
|
792
|
-
type: "
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
type: string;
|
|
798
|
-
description: string;
|
|
799
|
-
};
|
|
800
|
-
name: {
|
|
801
|
-
type: string;
|
|
802
|
-
nullable: boolean;
|
|
803
|
-
description: string;
|
|
804
|
-
};
|
|
805
|
-
start: {
|
|
806
|
-
type: string;
|
|
807
|
-
nullable: boolean;
|
|
808
|
-
description: string;
|
|
809
|
-
};
|
|
810
|
-
prefix: {
|
|
811
|
-
type: string;
|
|
812
|
-
nullable: boolean;
|
|
813
|
-
description: string;
|
|
814
|
-
};
|
|
815
|
-
userId: {
|
|
816
|
-
type: string;
|
|
817
|
-
description: string;
|
|
818
|
-
};
|
|
819
|
-
refillInterval: {
|
|
820
|
-
type: string;
|
|
821
|
-
nullable: boolean;
|
|
822
|
-
description: string;
|
|
823
|
-
};
|
|
824
|
-
refillAmount: {
|
|
825
|
-
type: string;
|
|
826
|
-
nullable: boolean;
|
|
827
|
-
description: string;
|
|
828
|
-
};
|
|
829
|
-
lastRefillAt: {
|
|
830
|
-
type: string;
|
|
831
|
-
format: string;
|
|
832
|
-
nullable: boolean;
|
|
833
|
-
description: string;
|
|
834
|
-
};
|
|
835
|
-
enabled: {
|
|
836
|
-
type: string;
|
|
837
|
-
description: string;
|
|
838
|
-
default: boolean;
|
|
839
|
-
};
|
|
840
|
-
rateLimitEnabled: {
|
|
841
|
-
type: string;
|
|
842
|
-
description: string;
|
|
843
|
-
};
|
|
844
|
-
rateLimitTimeWindow: {
|
|
845
|
-
type: string;
|
|
846
|
-
nullable: boolean;
|
|
847
|
-
description: string;
|
|
848
|
-
};
|
|
849
|
-
rateLimitMax: {
|
|
850
|
-
type: string;
|
|
851
|
-
nullable: boolean;
|
|
852
|
-
description: string;
|
|
853
|
-
};
|
|
854
|
-
requestCount: {
|
|
855
|
-
type: string;
|
|
856
|
-
description: string;
|
|
857
|
-
};
|
|
858
|
-
remaining: {
|
|
859
|
-
type: string;
|
|
860
|
-
nullable: boolean;
|
|
861
|
-
description: string;
|
|
862
|
-
};
|
|
863
|
-
lastRequest: {
|
|
864
|
-
type: string;
|
|
865
|
-
format: string;
|
|
866
|
-
nullable: boolean;
|
|
867
|
-
description: string;
|
|
868
|
-
};
|
|
869
|
-
expiresAt: {
|
|
870
|
-
type: string;
|
|
871
|
-
format: string;
|
|
872
|
-
nullable: boolean;
|
|
873
|
-
description: string;
|
|
874
|
-
};
|
|
875
|
-
createdAt: {
|
|
876
|
-
type: string;
|
|
877
|
-
format: string;
|
|
878
|
-
description: string;
|
|
879
|
-
};
|
|
880
|
-
updatedAt: {
|
|
881
|
-
type: string;
|
|
882
|
-
format: string;
|
|
883
|
-
description: string;
|
|
884
|
-
};
|
|
885
|
-
metadata: {
|
|
886
|
-
type: string;
|
|
887
|
-
nullable: boolean;
|
|
888
|
-
additionalProperties: boolean;
|
|
889
|
-
description: string;
|
|
890
|
-
};
|
|
891
|
-
permissions: {
|
|
871
|
+
type: "object";
|
|
872
|
+
properties: {
|
|
873
|
+
apiKeys: {
|
|
874
|
+
type: string;
|
|
875
|
+
items: {
|
|
892
876
|
type: string;
|
|
893
|
-
|
|
894
|
-
|
|
877
|
+
properties: {
|
|
878
|
+
id: {
|
|
879
|
+
type: string;
|
|
880
|
+
description: string;
|
|
881
|
+
};
|
|
882
|
+
name: {
|
|
883
|
+
type: string;
|
|
884
|
+
nullable: boolean;
|
|
885
|
+
description: string;
|
|
886
|
+
};
|
|
887
|
+
start: {
|
|
888
|
+
type: string;
|
|
889
|
+
nullable: boolean;
|
|
890
|
+
description: string;
|
|
891
|
+
};
|
|
892
|
+
prefix: {
|
|
893
|
+
type: string;
|
|
894
|
+
nullable: boolean;
|
|
895
|
+
description: string;
|
|
896
|
+
};
|
|
897
|
+
userId: {
|
|
898
|
+
type: string;
|
|
899
|
+
description: string;
|
|
900
|
+
};
|
|
901
|
+
refillInterval: {
|
|
902
|
+
type: string;
|
|
903
|
+
nullable: boolean;
|
|
904
|
+
description: string;
|
|
905
|
+
};
|
|
906
|
+
refillAmount: {
|
|
907
|
+
type: string;
|
|
908
|
+
nullable: boolean;
|
|
909
|
+
description: string;
|
|
910
|
+
};
|
|
911
|
+
lastRefillAt: {
|
|
912
|
+
type: string;
|
|
913
|
+
format: string;
|
|
914
|
+
nullable: boolean;
|
|
915
|
+
description: string;
|
|
916
|
+
};
|
|
917
|
+
enabled: {
|
|
918
|
+
type: string;
|
|
919
|
+
description: string;
|
|
920
|
+
default: boolean;
|
|
921
|
+
};
|
|
922
|
+
rateLimitEnabled: {
|
|
923
|
+
type: string;
|
|
924
|
+
description: string;
|
|
925
|
+
};
|
|
926
|
+
rateLimitTimeWindow: {
|
|
927
|
+
type: string;
|
|
928
|
+
nullable: boolean;
|
|
929
|
+
description: string;
|
|
930
|
+
};
|
|
931
|
+
rateLimitMax: {
|
|
932
|
+
type: string;
|
|
933
|
+
nullable: boolean;
|
|
934
|
+
description: string;
|
|
935
|
+
};
|
|
936
|
+
requestCount: {
|
|
937
|
+
type: string;
|
|
938
|
+
description: string;
|
|
939
|
+
};
|
|
940
|
+
remaining: {
|
|
941
|
+
type: string;
|
|
942
|
+
nullable: boolean;
|
|
943
|
+
description: string;
|
|
944
|
+
};
|
|
945
|
+
lastRequest: {
|
|
946
|
+
type: string;
|
|
947
|
+
format: string;
|
|
948
|
+
nullable: boolean;
|
|
949
|
+
description: string;
|
|
950
|
+
};
|
|
951
|
+
expiresAt: {
|
|
952
|
+
type: string;
|
|
953
|
+
format: string;
|
|
954
|
+
nullable: boolean;
|
|
955
|
+
description: string;
|
|
956
|
+
};
|
|
957
|
+
createdAt: {
|
|
958
|
+
type: string;
|
|
959
|
+
format: string;
|
|
960
|
+
description: string;
|
|
961
|
+
};
|
|
962
|
+
updatedAt: {
|
|
963
|
+
type: string;
|
|
964
|
+
format: string;
|
|
965
|
+
description: string;
|
|
966
|
+
};
|
|
967
|
+
metadata: {
|
|
968
|
+
type: string;
|
|
969
|
+
nullable: boolean;
|
|
970
|
+
additionalProperties: boolean;
|
|
971
|
+
description: string;
|
|
972
|
+
};
|
|
973
|
+
permissions: {
|
|
974
|
+
type: string;
|
|
975
|
+
nullable: boolean;
|
|
976
|
+
description: string;
|
|
977
|
+
};
|
|
978
|
+
};
|
|
979
|
+
required: string[];
|
|
895
980
|
};
|
|
896
981
|
};
|
|
897
|
-
|
|
982
|
+
total: {
|
|
983
|
+
type: string;
|
|
984
|
+
description: string;
|
|
985
|
+
};
|
|
986
|
+
limit: {
|
|
987
|
+
type: string;
|
|
988
|
+
nullable: boolean;
|
|
989
|
+
description: string;
|
|
990
|
+
};
|
|
991
|
+
offset: {
|
|
992
|
+
type: string;
|
|
993
|
+
nullable: boolean;
|
|
994
|
+
description: string;
|
|
995
|
+
};
|
|
898
996
|
};
|
|
997
|
+
required: string[];
|
|
899
998
|
};
|
|
900
999
|
};
|
|
901
1000
|
};
|
|
@@ -904,30 +1003,36 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
904
1003
|
};
|
|
905
1004
|
};
|
|
906
1005
|
}, {
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
1006
|
+
apiKeys: {
|
|
1007
|
+
metadata: Record<string, any> | null;
|
|
1008
|
+
permissions: {
|
|
1009
|
+
[key: string]: string[];
|
|
1010
|
+
} | null;
|
|
1011
|
+
id: string;
|
|
1012
|
+
configId: string;
|
|
1013
|
+
name: string | null;
|
|
1014
|
+
start: string | null;
|
|
1015
|
+
prefix: string | null;
|
|
1016
|
+
referenceId: string;
|
|
1017
|
+
refillInterval: number | null;
|
|
1018
|
+
refillAmount: number | null;
|
|
1019
|
+
lastRefillAt: Date | null;
|
|
1020
|
+
enabled: boolean;
|
|
1021
|
+
rateLimitEnabled: boolean;
|
|
1022
|
+
rateLimitTimeWindow: number | null;
|
|
1023
|
+
rateLimitMax: number | null;
|
|
1024
|
+
requestCount: number;
|
|
1025
|
+
remaining: number | null;
|
|
1026
|
+
lastRequest: Date | null;
|
|
1027
|
+
expiresAt: Date | null;
|
|
1028
|
+
createdAt: Date;
|
|
1029
|
+
updatedAt: Date;
|
|
1030
|
+
}[];
|
|
1031
|
+
total: number;
|
|
1032
|
+
limit: number | undefined;
|
|
1033
|
+
offset: number | undefined;
|
|
1034
|
+
}>;
|
|
1035
|
+
deleteAllExpiredApiKeys: import("better-call").StrictEndpoint<string, {
|
|
931
1036
|
method: "POST";
|
|
932
1037
|
}, {
|
|
933
1038
|
success: boolean;
|
|
@@ -937,34 +1042,36 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
937
1042
|
schema: {
|
|
938
1043
|
apikey: {
|
|
939
1044
|
fields: {
|
|
940
|
-
|
|
1045
|
+
configId: {
|
|
941
1046
|
type: "string";
|
|
942
|
-
required:
|
|
1047
|
+
required: true;
|
|
1048
|
+
defaultValue: string;
|
|
943
1049
|
input: false;
|
|
1050
|
+
index: true;
|
|
944
1051
|
};
|
|
945
|
-
|
|
1052
|
+
name: {
|
|
946
1053
|
type: "string";
|
|
947
1054
|
required: false;
|
|
948
1055
|
input: false;
|
|
949
1056
|
};
|
|
950
|
-
|
|
1057
|
+
start: {
|
|
951
1058
|
type: "string";
|
|
952
1059
|
required: false;
|
|
953
1060
|
input: false;
|
|
954
1061
|
};
|
|
955
|
-
|
|
1062
|
+
referenceId: {
|
|
956
1063
|
type: "string";
|
|
957
1064
|
required: true;
|
|
958
1065
|
input: false;
|
|
959
1066
|
index: true;
|
|
960
1067
|
};
|
|
961
|
-
|
|
1068
|
+
prefix: {
|
|
1069
|
+
type: "string";
|
|
1070
|
+
required: false;
|
|
1071
|
+
input: false;
|
|
1072
|
+
};
|
|
1073
|
+
key: {
|
|
962
1074
|
type: "string";
|
|
963
|
-
references: {
|
|
964
|
-
model: string;
|
|
965
|
-
field: string;
|
|
966
|
-
onDelete: "cascade";
|
|
967
|
-
};
|
|
968
1075
|
required: true;
|
|
969
1076
|
input: false;
|
|
970
1077
|
index: true;
|
|
@@ -1049,16 +1156,16 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1049
1156
|
required: false;
|
|
1050
1157
|
input: true;
|
|
1051
1158
|
transform: {
|
|
1052
|
-
input(value: import("better-auth
|
|
1053
|
-
output(value: import("better-auth
|
|
1159
|
+
input(value: import("better-auth").DBPrimitive): string;
|
|
1160
|
+
output(value: import("better-auth").DBPrimitive): any;
|
|
1054
1161
|
};
|
|
1055
1162
|
};
|
|
1056
1163
|
};
|
|
1057
1164
|
};
|
|
1058
1165
|
};
|
|
1059
|
-
options: import("better-auth/plugins").ApiKeyOptions | undefined;
|
|
1060
1166
|
} | {
|
|
1061
1167
|
id: "admin";
|
|
1168
|
+
version: string;
|
|
1062
1169
|
init(): {
|
|
1063
1170
|
options: {
|
|
1064
1171
|
databaseHooks: {
|
|
@@ -1097,7 +1204,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1097
1204
|
token: string;
|
|
1098
1205
|
ipAddress?: string | null | undefined;
|
|
1099
1206
|
userAgent?: string | null | undefined;
|
|
1100
|
-
} & Record<string, unknown>, ctx: import("better-auth
|
|
1207
|
+
} & Record<string, unknown>, ctx: import("better-auth").GenericEndpointContext | null): Promise<void>;
|
|
1101
1208
|
};
|
|
1102
1209
|
};
|
|
1103
1210
|
};
|
|
@@ -1105,24 +1212,33 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1105
1212
|
};
|
|
1106
1213
|
hooks: {
|
|
1107
1214
|
after: {
|
|
1108
|
-
matcher(context: import("better-auth
|
|
1109
|
-
handler: (inputContext: import("better-
|
|
1215
|
+
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
1216
|
+
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>>;
|
|
1110
1217
|
}[];
|
|
1111
1218
|
};
|
|
1112
1219
|
endpoints: {
|
|
1113
|
-
setRole: import("better-
|
|
1220
|
+
setRole: import("better-call").StrictEndpoint<"/admin/set-role", {
|
|
1114
1221
|
method: "POST";
|
|
1115
|
-
body: import("
|
|
1116
|
-
userId: import("
|
|
1117
|
-
role: import("
|
|
1118
|
-
}, import("
|
|
1222
|
+
body: import("zod").ZodObject<{
|
|
1223
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1224
|
+
role: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>;
|
|
1225
|
+
}, import("zod/v4/core").$strip>;
|
|
1119
1226
|
requireHeaders: true;
|
|
1120
|
-
use: ((inputContext: import("better-
|
|
1227
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1121
1228
|
session: {
|
|
1122
1229
|
user: import("better-auth/plugins").UserWithRole;
|
|
1123
|
-
session:
|
|
1230
|
+
session: {
|
|
1231
|
+
id: string;
|
|
1232
|
+
createdAt: Date;
|
|
1233
|
+
updatedAt: Date;
|
|
1234
|
+
userId: string;
|
|
1235
|
+
expiresAt: Date;
|
|
1236
|
+
token: string;
|
|
1237
|
+
ipAddress?: string | null | undefined;
|
|
1238
|
+
userAgent?: string | null | undefined;
|
|
1239
|
+
};
|
|
1124
1240
|
};
|
|
1125
|
-
}
|
|
1241
|
+
}>>[];
|
|
1126
1242
|
metadata: {
|
|
1127
1243
|
openapi: {
|
|
1128
1244
|
operationId: string;
|
|
@@ -1156,17 +1272,26 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1156
1272
|
}, {
|
|
1157
1273
|
user: import("better-auth/plugins").UserWithRole;
|
|
1158
1274
|
}>;
|
|
1159
|
-
getUser: import("better-
|
|
1275
|
+
getUser: import("better-call").StrictEndpoint<"/admin/get-user", {
|
|
1160
1276
|
method: "GET";
|
|
1161
|
-
query: import("
|
|
1162
|
-
id: import("
|
|
1163
|
-
}, import("
|
|
1164
|
-
use: ((inputContext: import("better-
|
|
1277
|
+
query: import("zod").ZodObject<{
|
|
1278
|
+
id: import("zod").ZodString;
|
|
1279
|
+
}, import("zod/v4/core").$strip>;
|
|
1280
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1165
1281
|
session: {
|
|
1166
1282
|
user: import("better-auth/plugins").UserWithRole;
|
|
1167
|
-
session:
|
|
1283
|
+
session: {
|
|
1284
|
+
id: string;
|
|
1285
|
+
createdAt: Date;
|
|
1286
|
+
updatedAt: Date;
|
|
1287
|
+
userId: string;
|
|
1288
|
+
expiresAt: Date;
|
|
1289
|
+
token: string;
|
|
1290
|
+
ipAddress?: string | null | undefined;
|
|
1291
|
+
userAgent?: string | null | undefined;
|
|
1292
|
+
};
|
|
1168
1293
|
};
|
|
1169
|
-
}
|
|
1294
|
+
}>>[];
|
|
1170
1295
|
metadata: {
|
|
1171
1296
|
openapi: {
|
|
1172
1297
|
operationId: string;
|
|
@@ -1192,15 +1317,15 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1192
1317
|
};
|
|
1193
1318
|
};
|
|
1194
1319
|
}, import("better-auth/plugins").UserWithRole>;
|
|
1195
|
-
createUser: import("better-
|
|
1320
|
+
createUser: import("better-call").StrictEndpoint<"/admin/create-user", {
|
|
1196
1321
|
method: "POST";
|
|
1197
|
-
body: import("
|
|
1198
|
-
email: import("
|
|
1199
|
-
password: import("
|
|
1200
|
-
name: import("
|
|
1201
|
-
role: import("
|
|
1202
|
-
data: import("
|
|
1203
|
-
}, import("
|
|
1322
|
+
body: import("zod").ZodObject<{
|
|
1323
|
+
email: import("zod").ZodString;
|
|
1324
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1325
|
+
name: import("zod").ZodString;
|
|
1326
|
+
role: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>>;
|
|
1327
|
+
data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
1328
|
+
}, import("zod/v4/core").$strip>;
|
|
1204
1329
|
metadata: {
|
|
1205
1330
|
openapi: {
|
|
1206
1331
|
operationId: string;
|
|
@@ -1237,18 +1362,27 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1237
1362
|
}, {
|
|
1238
1363
|
user: import("better-auth/plugins").UserWithRole;
|
|
1239
1364
|
}>;
|
|
1240
|
-
adminUpdateUser: import("better-
|
|
1365
|
+
adminUpdateUser: import("better-call").StrictEndpoint<"/admin/update-user", {
|
|
1241
1366
|
method: "POST";
|
|
1242
|
-
body: import("
|
|
1243
|
-
userId: import("
|
|
1244
|
-
data: import("
|
|
1245
|
-
}, import("
|
|
1246
|
-
use: ((inputContext: import("better-
|
|
1367
|
+
body: import("zod").ZodObject<{
|
|
1368
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1369
|
+
data: import("zod").ZodRecord<import("zod").ZodAny, import("zod").ZodAny>;
|
|
1370
|
+
}, import("zod/v4/core").$strip>;
|
|
1371
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1247
1372
|
session: {
|
|
1248
1373
|
user: import("better-auth/plugins").UserWithRole;
|
|
1249
|
-
session:
|
|
1374
|
+
session: {
|
|
1375
|
+
id: string;
|
|
1376
|
+
createdAt: Date;
|
|
1377
|
+
updatedAt: Date;
|
|
1378
|
+
userId: string;
|
|
1379
|
+
expiresAt: Date;
|
|
1380
|
+
token: string;
|
|
1381
|
+
ipAddress?: string | null | undefined;
|
|
1382
|
+
userAgent?: string | null | undefined;
|
|
1383
|
+
};
|
|
1250
1384
|
};
|
|
1251
|
-
}
|
|
1385
|
+
}>>[];
|
|
1252
1386
|
metadata: {
|
|
1253
1387
|
openapi: {
|
|
1254
1388
|
operationId: string;
|
|
@@ -1274,44 +1408,57 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1274
1408
|
};
|
|
1275
1409
|
};
|
|
1276
1410
|
}, import("better-auth/plugins").UserWithRole>;
|
|
1277
|
-
listUsers: import("better-
|
|
1411
|
+
listUsers: import("better-call").StrictEndpoint<"/admin/list-users", {
|
|
1278
1412
|
method: "GET";
|
|
1279
|
-
use: ((inputContext: import("better-
|
|
1413
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1280
1414
|
session: {
|
|
1281
1415
|
user: import("better-auth/plugins").UserWithRole;
|
|
1282
|
-
session:
|
|
1416
|
+
session: {
|
|
1417
|
+
id: string;
|
|
1418
|
+
createdAt: Date;
|
|
1419
|
+
updatedAt: Date;
|
|
1420
|
+
userId: string;
|
|
1421
|
+
expiresAt: Date;
|
|
1422
|
+
token: string;
|
|
1423
|
+
ipAddress?: string | null | undefined;
|
|
1424
|
+
userAgent?: string | null | undefined;
|
|
1425
|
+
};
|
|
1283
1426
|
};
|
|
1284
|
-
}
|
|
1285
|
-
query: import("
|
|
1286
|
-
searchValue: import("
|
|
1287
|
-
searchField: import("
|
|
1288
|
-
name: "name";
|
|
1427
|
+
}>>[];
|
|
1428
|
+
query: import("zod").ZodObject<{
|
|
1429
|
+
searchValue: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1430
|
+
searchField: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1289
1431
|
email: "email";
|
|
1432
|
+
name: "name";
|
|
1290
1433
|
}>>;
|
|
1291
|
-
searchOperator: import("
|
|
1434
|
+
searchOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1292
1435
|
contains: "contains";
|
|
1293
1436
|
starts_with: "starts_with";
|
|
1294
1437
|
ends_with: "ends_with";
|
|
1295
1438
|
}>>;
|
|
1296
|
-
limit: import("
|
|
1297
|
-
offset: import("
|
|
1298
|
-
sortBy: import("
|
|
1299
|
-
sortDirection: import("
|
|
1439
|
+
limit: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
|
|
1440
|
+
offset: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
|
|
1441
|
+
sortBy: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1442
|
+
sortDirection: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1300
1443
|
asc: "asc";
|
|
1301
1444
|
desc: "desc";
|
|
1302
1445
|
}>>;
|
|
1303
|
-
filterField: import("
|
|
1304
|
-
filterValue: import("
|
|
1305
|
-
filterOperator: import("
|
|
1446
|
+
filterField: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1447
|
+
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>]>>;
|
|
1448
|
+
filterOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1306
1449
|
eq: "eq";
|
|
1307
1450
|
ne: "ne";
|
|
1308
|
-
lt: "lt";
|
|
1309
|
-
lte: "lte";
|
|
1310
1451
|
gt: "gt";
|
|
1311
1452
|
gte: "gte";
|
|
1453
|
+
lt: "lt";
|
|
1454
|
+
lte: "lte";
|
|
1455
|
+
in: "in";
|
|
1456
|
+
not_in: "not_in";
|
|
1312
1457
|
contains: "contains";
|
|
1458
|
+
starts_with: "starts_with";
|
|
1459
|
+
ends_with: "ends_with";
|
|
1313
1460
|
}>>;
|
|
1314
|
-
}, import("
|
|
1461
|
+
}, import("zod/v4/core").$strip>;
|
|
1315
1462
|
metadata: {
|
|
1316
1463
|
openapi: {
|
|
1317
1464
|
operationId: string;
|
|
@@ -1353,17 +1500,26 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1353
1500
|
users: import("better-auth/plugins").UserWithRole[];
|
|
1354
1501
|
total: number;
|
|
1355
1502
|
}>;
|
|
1356
|
-
listUserSessions: import("better-
|
|
1503
|
+
listUserSessions: import("better-call").StrictEndpoint<"/admin/list-user-sessions", {
|
|
1357
1504
|
method: "POST";
|
|
1358
|
-
use: ((inputContext: import("better-
|
|
1505
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1359
1506
|
session: {
|
|
1360
1507
|
user: import("better-auth/plugins").UserWithRole;
|
|
1361
|
-
session:
|
|
1508
|
+
session: {
|
|
1509
|
+
id: string;
|
|
1510
|
+
createdAt: Date;
|
|
1511
|
+
updatedAt: Date;
|
|
1512
|
+
userId: string;
|
|
1513
|
+
expiresAt: Date;
|
|
1514
|
+
token: string;
|
|
1515
|
+
ipAddress?: string | null | undefined;
|
|
1516
|
+
userAgent?: string | null | undefined;
|
|
1517
|
+
};
|
|
1362
1518
|
};
|
|
1363
|
-
}
|
|
1364
|
-
body: import("
|
|
1365
|
-
userId: import("
|
|
1366
|
-
}, import("
|
|
1519
|
+
}>>[];
|
|
1520
|
+
body: import("zod").ZodObject<{
|
|
1521
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1522
|
+
}, import("zod/v4/core").$strip>;
|
|
1367
1523
|
metadata: {
|
|
1368
1524
|
openapi: {
|
|
1369
1525
|
operationId: string;
|
|
@@ -1394,17 +1550,26 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1394
1550
|
}, {
|
|
1395
1551
|
sessions: import("better-auth/plugins").SessionWithImpersonatedBy[];
|
|
1396
1552
|
}>;
|
|
1397
|
-
unbanUser: import("better-
|
|
1553
|
+
unbanUser: import("better-call").StrictEndpoint<"/admin/unban-user", {
|
|
1398
1554
|
method: "POST";
|
|
1399
|
-
body: import("
|
|
1400
|
-
userId: import("
|
|
1401
|
-
}, import("
|
|
1402
|
-
use: ((inputContext: import("better-
|
|
1555
|
+
body: import("zod").ZodObject<{
|
|
1556
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1557
|
+
}, import("zod/v4/core").$strip>;
|
|
1558
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1403
1559
|
session: {
|
|
1404
1560
|
user: import("better-auth/plugins").UserWithRole;
|
|
1405
|
-
session:
|
|
1561
|
+
session: {
|
|
1562
|
+
id: string;
|
|
1563
|
+
createdAt: Date;
|
|
1564
|
+
updatedAt: Date;
|
|
1565
|
+
userId: string;
|
|
1566
|
+
expiresAt: Date;
|
|
1567
|
+
token: string;
|
|
1568
|
+
ipAddress?: string | null | undefined;
|
|
1569
|
+
userAgent?: string | null | undefined;
|
|
1570
|
+
};
|
|
1406
1571
|
};
|
|
1407
|
-
}
|
|
1572
|
+
}>>[];
|
|
1408
1573
|
metadata: {
|
|
1409
1574
|
openapi: {
|
|
1410
1575
|
operationId: string;
|
|
@@ -1432,19 +1597,28 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1432
1597
|
}, {
|
|
1433
1598
|
user: import("better-auth/plugins").UserWithRole;
|
|
1434
1599
|
}>;
|
|
1435
|
-
banUser: import("better-
|
|
1600
|
+
banUser: import("better-call").StrictEndpoint<"/admin/ban-user", {
|
|
1436
1601
|
method: "POST";
|
|
1437
|
-
body: import("
|
|
1438
|
-
userId: import("
|
|
1439
|
-
banReason: import("
|
|
1440
|
-
banExpiresIn: import("
|
|
1441
|
-
}, import("
|
|
1442
|
-
use: ((inputContext: import("better-
|
|
1602
|
+
body: import("zod").ZodObject<{
|
|
1603
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1604
|
+
banReason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1605
|
+
banExpiresIn: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1606
|
+
}, import("zod/v4/core").$strip>;
|
|
1607
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1443
1608
|
session: {
|
|
1444
1609
|
user: import("better-auth/plugins").UserWithRole;
|
|
1445
|
-
session:
|
|
1610
|
+
session: {
|
|
1611
|
+
id: string;
|
|
1612
|
+
createdAt: Date;
|
|
1613
|
+
updatedAt: Date;
|
|
1614
|
+
userId: string;
|
|
1615
|
+
expiresAt: Date;
|
|
1616
|
+
token: string;
|
|
1617
|
+
ipAddress?: string | null | undefined;
|
|
1618
|
+
userAgent?: string | null | undefined;
|
|
1619
|
+
};
|
|
1446
1620
|
};
|
|
1447
|
-
}
|
|
1621
|
+
}>>[];
|
|
1448
1622
|
metadata: {
|
|
1449
1623
|
openapi: {
|
|
1450
1624
|
operationId: string;
|
|
@@ -1472,17 +1646,26 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1472
1646
|
}, {
|
|
1473
1647
|
user: import("better-auth/plugins").UserWithRole;
|
|
1474
1648
|
}>;
|
|
1475
|
-
impersonateUser: import("better-
|
|
1649
|
+
impersonateUser: import("better-call").StrictEndpoint<"/admin/impersonate-user", {
|
|
1476
1650
|
method: "POST";
|
|
1477
|
-
body: import("
|
|
1478
|
-
userId: import("
|
|
1479
|
-
}, import("
|
|
1480
|
-
use: ((inputContext: import("better-
|
|
1651
|
+
body: import("zod").ZodObject<{
|
|
1652
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1653
|
+
}, import("zod/v4/core").$strip>;
|
|
1654
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1481
1655
|
session: {
|
|
1482
1656
|
user: import("better-auth/plugins").UserWithRole;
|
|
1483
|
-
session:
|
|
1657
|
+
session: {
|
|
1658
|
+
id: string;
|
|
1659
|
+
createdAt: Date;
|
|
1660
|
+
updatedAt: Date;
|
|
1661
|
+
userId: string;
|
|
1662
|
+
expiresAt: Date;
|
|
1663
|
+
token: string;
|
|
1664
|
+
ipAddress?: string | null | undefined;
|
|
1665
|
+
userAgent?: string | null | undefined;
|
|
1666
|
+
};
|
|
1484
1667
|
};
|
|
1485
|
-
}
|
|
1668
|
+
}>>[];
|
|
1486
1669
|
metadata: {
|
|
1487
1670
|
openapi: {
|
|
1488
1671
|
operationId: string;
|
|
@@ -1523,7 +1706,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1523
1706
|
};
|
|
1524
1707
|
user: import("better-auth/plugins").UserWithRole;
|
|
1525
1708
|
}>;
|
|
1526
|
-
stopImpersonating: import("better-
|
|
1709
|
+
stopImpersonating: import("better-call").StrictEndpoint<"/admin/stop-impersonating", {
|
|
1527
1710
|
method: "POST";
|
|
1528
1711
|
requireHeaders: true;
|
|
1529
1712
|
}, {
|
|
@@ -1547,17 +1730,26 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1547
1730
|
image?: string | null | undefined;
|
|
1548
1731
|
} & Record<string, any>;
|
|
1549
1732
|
}>;
|
|
1550
|
-
revokeUserSession: import("better-
|
|
1733
|
+
revokeUserSession: import("better-call").StrictEndpoint<"/admin/revoke-user-session", {
|
|
1551
1734
|
method: "POST";
|
|
1552
|
-
body: import("
|
|
1553
|
-
sessionToken: import("
|
|
1554
|
-
}, import("
|
|
1555
|
-
use: ((inputContext: import("better-
|
|
1735
|
+
body: import("zod").ZodObject<{
|
|
1736
|
+
sessionToken: import("zod").ZodString;
|
|
1737
|
+
}, import("zod/v4/core").$strip>;
|
|
1738
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1556
1739
|
session: {
|
|
1557
1740
|
user: import("better-auth/plugins").UserWithRole;
|
|
1558
|
-
session:
|
|
1741
|
+
session: {
|
|
1742
|
+
id: string;
|
|
1743
|
+
createdAt: Date;
|
|
1744
|
+
updatedAt: Date;
|
|
1745
|
+
userId: string;
|
|
1746
|
+
expiresAt: Date;
|
|
1747
|
+
token: string;
|
|
1748
|
+
ipAddress?: string | null | undefined;
|
|
1749
|
+
userAgent?: string | null | undefined;
|
|
1750
|
+
};
|
|
1559
1751
|
};
|
|
1560
|
-
}
|
|
1752
|
+
}>>[];
|
|
1561
1753
|
metadata: {
|
|
1562
1754
|
openapi: {
|
|
1563
1755
|
operationId: string;
|
|
@@ -1585,17 +1777,26 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1585
1777
|
}, {
|
|
1586
1778
|
success: boolean;
|
|
1587
1779
|
}>;
|
|
1588
|
-
revokeUserSessions: import("better-
|
|
1780
|
+
revokeUserSessions: import("better-call").StrictEndpoint<"/admin/revoke-user-sessions", {
|
|
1589
1781
|
method: "POST";
|
|
1590
|
-
body: import("
|
|
1591
|
-
userId: import("
|
|
1592
|
-
}, import("
|
|
1593
|
-
use: ((inputContext: import("better-
|
|
1782
|
+
body: import("zod").ZodObject<{
|
|
1783
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1784
|
+
}, import("zod/v4/core").$strip>;
|
|
1785
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1594
1786
|
session: {
|
|
1595
1787
|
user: import("better-auth/plugins").UserWithRole;
|
|
1596
|
-
session:
|
|
1788
|
+
session: {
|
|
1789
|
+
id: string;
|
|
1790
|
+
createdAt: Date;
|
|
1791
|
+
updatedAt: Date;
|
|
1792
|
+
userId: string;
|
|
1793
|
+
expiresAt: Date;
|
|
1794
|
+
token: string;
|
|
1795
|
+
ipAddress?: string | null | undefined;
|
|
1796
|
+
userAgent?: string | null | undefined;
|
|
1797
|
+
};
|
|
1597
1798
|
};
|
|
1598
|
-
}
|
|
1799
|
+
}>>[];
|
|
1599
1800
|
metadata: {
|
|
1600
1801
|
openapi: {
|
|
1601
1802
|
operationId: string;
|
|
@@ -1623,17 +1824,26 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1623
1824
|
}, {
|
|
1624
1825
|
success: boolean;
|
|
1625
1826
|
}>;
|
|
1626
|
-
removeUser: import("better-
|
|
1827
|
+
removeUser: import("better-call").StrictEndpoint<"/admin/remove-user", {
|
|
1627
1828
|
method: "POST";
|
|
1628
|
-
body: import("
|
|
1629
|
-
userId: import("
|
|
1630
|
-
}, import("
|
|
1631
|
-
use: ((inputContext: import("better-
|
|
1829
|
+
body: import("zod").ZodObject<{
|
|
1830
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1831
|
+
}, import("zod/v4/core").$strip>;
|
|
1832
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1632
1833
|
session: {
|
|
1633
1834
|
user: import("better-auth/plugins").UserWithRole;
|
|
1634
|
-
session:
|
|
1835
|
+
session: {
|
|
1836
|
+
id: string;
|
|
1837
|
+
createdAt: Date;
|
|
1838
|
+
updatedAt: Date;
|
|
1839
|
+
userId: string;
|
|
1840
|
+
expiresAt: Date;
|
|
1841
|
+
token: string;
|
|
1842
|
+
ipAddress?: string | null | undefined;
|
|
1843
|
+
userAgent?: string | null | undefined;
|
|
1844
|
+
};
|
|
1635
1845
|
};
|
|
1636
|
-
}
|
|
1846
|
+
}>>[];
|
|
1637
1847
|
metadata: {
|
|
1638
1848
|
openapi: {
|
|
1639
1849
|
operationId: string;
|
|
@@ -1661,18 +1871,27 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1661
1871
|
}, {
|
|
1662
1872
|
success: boolean;
|
|
1663
1873
|
}>;
|
|
1664
|
-
setUserPassword: import("better-
|
|
1874
|
+
setUserPassword: import("better-call").StrictEndpoint<"/admin/set-user-password", {
|
|
1665
1875
|
method: "POST";
|
|
1666
|
-
body: import("
|
|
1667
|
-
newPassword: import("
|
|
1668
|
-
userId: import("
|
|
1669
|
-
}, import("
|
|
1670
|
-
use: ((inputContext: import("better-
|
|
1876
|
+
body: import("zod").ZodObject<{
|
|
1877
|
+
newPassword: import("zod").ZodString;
|
|
1878
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1879
|
+
}, import("zod/v4/core").$strip>;
|
|
1880
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1671
1881
|
session: {
|
|
1672
1882
|
user: import("better-auth/plugins").UserWithRole;
|
|
1673
|
-
session:
|
|
1883
|
+
session: {
|
|
1884
|
+
id: string;
|
|
1885
|
+
createdAt: Date;
|
|
1886
|
+
updatedAt: Date;
|
|
1887
|
+
userId: string;
|
|
1888
|
+
expiresAt: Date;
|
|
1889
|
+
token: string;
|
|
1890
|
+
ipAddress?: string | null | undefined;
|
|
1891
|
+
userAgent?: string | null | undefined;
|
|
1892
|
+
};
|
|
1674
1893
|
};
|
|
1675
|
-
}
|
|
1894
|
+
}>>[];
|
|
1676
1895
|
metadata: {
|
|
1677
1896
|
openapi: {
|
|
1678
1897
|
operationId: string;
|
|
@@ -1700,18 +1919,16 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1700
1919
|
}, {
|
|
1701
1920
|
status: boolean;
|
|
1702
1921
|
}>;
|
|
1703
|
-
userHasPermission: import("better-
|
|
1922
|
+
userHasPermission: import("better-call").StrictEndpoint<"/admin/has-permission", {
|
|
1704
1923
|
method: "POST";
|
|
1705
|
-
body: import("
|
|
1706
|
-
userId: import("
|
|
1707
|
-
role: import("
|
|
1708
|
-
}, import("
|
|
1709
|
-
permission: import("
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
permissions: import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>>;
|
|
1714
|
-
}, import("better-auth/*").$strip>]>>;
|
|
1924
|
+
body: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
1925
|
+
userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
|
|
1926
|
+
role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1927
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodXor<readonly [import("zod").ZodObject<{
|
|
1928
|
+
permission: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>;
|
|
1929
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1930
|
+
permissions: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>;
|
|
1931
|
+
}, import("zod/v4/core").$strip>]>>;
|
|
1715
1932
|
metadata: {
|
|
1716
1933
|
openapi: {
|
|
1717
1934
|
description: string;
|
|
@@ -1721,11 +1938,6 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1721
1938
|
schema: {
|
|
1722
1939
|
type: "object";
|
|
1723
1940
|
properties: {
|
|
1724
|
-
permission: {
|
|
1725
|
-
type: string;
|
|
1726
|
-
description: string;
|
|
1727
|
-
deprecated: boolean;
|
|
1728
|
-
};
|
|
1729
1941
|
permissions: {
|
|
1730
1942
|
type: string;
|
|
1731
1943
|
description: string;
|
|
@@ -1759,19 +1971,12 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1759
1971
|
};
|
|
1760
1972
|
};
|
|
1761
1973
|
$Infer: {
|
|
1762
|
-
body:
|
|
1763
|
-
permission: {
|
|
1764
|
-
readonly user?: ("create" | "update" | "delete" | "list" | "get" | "set-role" | "ban" | "impersonate" | "set-password")[] | undefined;
|
|
1765
|
-
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
1766
|
-
};
|
|
1767
|
-
permissions?: never | undefined;
|
|
1768
|
-
} | {
|
|
1974
|
+
body: {
|
|
1769
1975
|
permissions: {
|
|
1770
|
-
readonly user?: ("create" | "update" | "delete" | "list" | "get" | "set-role" | "ban" | "impersonate" | "set-password")[] | undefined;
|
|
1976
|
+
readonly user?: ("create" | "update" | "delete" | "list" | "get" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email")[] | undefined;
|
|
1771
1977
|
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
1772
1978
|
};
|
|
1773
|
-
|
|
1774
|
-
}) & {
|
|
1979
|
+
} & {
|
|
1775
1980
|
userId?: string | undefined;
|
|
1776
1981
|
role?: "user" | "admin" | "staff" | undefined;
|
|
1777
1982
|
};
|
|
@@ -1783,27 +1988,29 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1783
1988
|
}>;
|
|
1784
1989
|
};
|
|
1785
1990
|
$ERROR_CODES: {
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1991
|
+
USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
|
|
1992
|
+
FAILED_TO_CREATE_USER: import("better-auth").RawError<"FAILED_TO_CREATE_USER">;
|
|
1993
|
+
USER_ALREADY_EXISTS: import("better-auth").RawError<"USER_ALREADY_EXISTS">;
|
|
1994
|
+
YOU_CANNOT_BAN_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_BAN_YOURSELF">;
|
|
1995
|
+
YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE">;
|
|
1996
|
+
YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS">;
|
|
1997
|
+
YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS">;
|
|
1998
|
+
YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS">;
|
|
1999
|
+
YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_BAN_USERS">;
|
|
2000
|
+
YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS">;
|
|
2001
|
+
YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS">;
|
|
2002
|
+
YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS">;
|
|
2003
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD">;
|
|
2004
|
+
BANNED_USER: import("better-auth").RawError<"BANNED_USER">;
|
|
2005
|
+
YOU_ARE_NOT_ALLOWED_TO_GET_USER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_USER">;
|
|
2006
|
+
NO_DATA_TO_UPDATE: import("better-auth").RawError<"NO_DATA_TO_UPDATE">;
|
|
2007
|
+
YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS">;
|
|
2008
|
+
YOU_CANNOT_REMOVE_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_REMOVE_YOURSELF">;
|
|
2009
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE">;
|
|
2010
|
+
YOU_CANNOT_IMPERSONATE_ADMINS: import("better-auth").RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
|
|
2011
|
+
INVALID_ROLE_TYPE: import("better-auth").RawError<"INVALID_ROLE_TYPE">;
|
|
2012
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL">;
|
|
2013
|
+
PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER: import("better-auth").RawError<"PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER">;
|
|
1807
2014
|
};
|
|
1808
2015
|
schema: {
|
|
1809
2016
|
user: {
|
|
@@ -1836,91 +2043,52 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1836
2043
|
impersonatedBy: {
|
|
1837
2044
|
type: "string";
|
|
1838
2045
|
required: false;
|
|
2046
|
+
input: false;
|
|
1839
2047
|
};
|
|
1840
2048
|
};
|
|
1841
2049
|
};
|
|
1842
2050
|
};
|
|
1843
2051
|
options: NoInfer<{
|
|
1844
2052
|
accessControl: {
|
|
1845
|
-
newRole<
|
|
1846
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
2053
|
+
newRole<const TRoleStatements extends import("better-auth/plugins").Statements>(statements: import("better-auth/plugins").RoleInput<{
|
|
2054
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
1847
2055
|
readonly session: readonly ["list", "revoke", "delete"];
|
|
1848
|
-
}>): {
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
}>[key] | {
|
|
1853
|
-
actions: import("better-auth/plugins").Subset<K, {
|
|
1854
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1855
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
1856
|
-
}>[key];
|
|
1857
|
-
connector: "OR" | "AND";
|
|
1858
|
-
} | undefined; } : never, connector?: "OR" | "AND"): import("better-auth/plugins").AuthorizeResponse;
|
|
1859
|
-
statements: import("better-auth/plugins").Subset<K, {
|
|
1860
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1861
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
1862
|
-
}>;
|
|
1863
|
-
};
|
|
2056
|
+
}, TRoleStatements>): import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<TRoleStatements>, {
|
|
2057
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
2058
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
2059
|
+
}>;
|
|
1864
2060
|
statements: {
|
|
1865
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
2061
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
1866
2062
|
readonly session: readonly ["list", "revoke", "delete"];
|
|
1867
2063
|
};
|
|
1868
2064
|
};
|
|
1869
2065
|
roles: {
|
|
1870
|
-
admin: {
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
}>[key] | {
|
|
1891
|
-
actions: import("better-auth/plugins").Subset<"user" | "session", {
|
|
1892
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1893
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
1894
|
-
}>[key];
|
|
1895
|
-
connector: "OR" | "AND";
|
|
1896
|
-
} | undefined; } : never, connector?: "OR" | "AND"): import("better-auth/plugins").AuthorizeResponse;
|
|
1897
|
-
statements: import("better-auth/plugins").Subset<"user" | "session", {
|
|
1898
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1899
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
1900
|
-
}>;
|
|
1901
|
-
};
|
|
1902
|
-
staff: {
|
|
1903
|
-
authorize<K_1 extends "user">(request: K_1 extends infer T extends K ? { [key in T]?: import("better-auth/plugins").Subset<"user", {
|
|
1904
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1905
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
1906
|
-
}>[key] | {
|
|
1907
|
-
actions: import("better-auth/plugins").Subset<"user", {
|
|
1908
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1909
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
1910
|
-
}>[key];
|
|
1911
|
-
connector: "OR" | "AND";
|
|
1912
|
-
} | undefined; } : never, connector?: "OR" | "AND"): import("better-auth/plugins").AuthorizeResponse;
|
|
1913
|
-
statements: import("better-auth/plugins").Subset<"user", {
|
|
1914
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1915
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
1916
|
-
}>;
|
|
1917
|
-
};
|
|
2066
|
+
admin: import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<import("better-auth/plugins").ExactRoleStatements<{
|
|
2067
|
+
readonly user: ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "set-email", "get", "update"];
|
|
2068
|
+
readonly session: ["list", "revoke", "delete"];
|
|
2069
|
+
}>>, {
|
|
2070
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
2071
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
2072
|
+
}>;
|
|
2073
|
+
user: import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<import("better-auth/plugins").ExactRoleStatements<{
|
|
2074
|
+
readonly user: [];
|
|
2075
|
+
readonly session: [];
|
|
2076
|
+
}>>, {
|
|
2077
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
2078
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
2079
|
+
}>;
|
|
2080
|
+
staff: import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<{
|
|
2081
|
+
readonly user: ["create", "list", "delete"];
|
|
2082
|
+
}>, {
|
|
2083
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
2084
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
2085
|
+
}>;
|
|
1918
2086
|
};
|
|
1919
2087
|
}>;
|
|
1920
2088
|
} | (C["$auth"] extends {
|
|
1921
2089
|
plugins: any;
|
|
1922
2090
|
} ? C["$auth"]["plugins"] : [])[number])[];
|
|
1923
|
-
database: (options: import("better-auth
|
|
2091
|
+
database: (options: import("better-auth").BetterAuthOptions) => import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
|
|
1924
2092
|
baseURL: any;
|
|
1925
2093
|
rateLimit: {
|
|
1926
2094
|
readonly enabled: boolean;
|
|
@@ -1953,8 +2121,8 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
1953
2121
|
};
|
|
1954
2122
|
};
|
|
1955
2123
|
hooks: {
|
|
1956
|
-
readonly before:
|
|
1957
|
-
readonly after:
|
|
2124
|
+
readonly before: import("better-call").MiddlewareHandler;
|
|
2125
|
+
readonly after: import("better-call").MiddlewareHandler;
|
|
1958
2126
|
};
|
|
1959
2127
|
emailAndPassword: {
|
|
1960
2128
|
readonly enabled: true;
|
|
@@ -2020,40 +2188,47 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2020
2188
|
actions?: infer A;
|
|
2021
2189
|
} ? N extends string ? Record<N, NonNullable<A>> : never : never : Record<string, never>) & {
|
|
2022
2190
|
/** The Better-auth instance */
|
|
2023
|
-
readonly auth: import("better-auth
|
|
2191
|
+
readonly auth: import("better-auth").Auth<{
|
|
2024
2192
|
plugins: ({
|
|
2025
2193
|
id: "api-key";
|
|
2194
|
+
version: string;
|
|
2026
2195
|
$ERROR_CODES: {
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2196
|
+
INVALID_METADATA_TYPE: import("better-auth").RawError<"INVALID_METADATA_TYPE">;
|
|
2197
|
+
REFILL_AMOUNT_AND_INTERVAL_REQUIRED: import("better-auth").RawError<"REFILL_AMOUNT_AND_INTERVAL_REQUIRED">;
|
|
2198
|
+
REFILL_INTERVAL_AND_AMOUNT_REQUIRED: import("better-auth").RawError<"REFILL_INTERVAL_AND_AMOUNT_REQUIRED">;
|
|
2199
|
+
USER_BANNED: import("better-auth").RawError<"USER_BANNED">;
|
|
2200
|
+
UNAUTHORIZED_SESSION: import("better-auth").RawError<"UNAUTHORIZED_SESSION">;
|
|
2201
|
+
KEY_NOT_FOUND: import("better-auth").RawError<"KEY_NOT_FOUND">;
|
|
2202
|
+
KEY_DISABLED: import("better-auth").RawError<"KEY_DISABLED">;
|
|
2203
|
+
KEY_EXPIRED: import("better-auth").RawError<"KEY_EXPIRED">;
|
|
2204
|
+
USAGE_EXCEEDED: import("better-auth").RawError<"USAGE_EXCEEDED">;
|
|
2205
|
+
KEY_NOT_RECOVERABLE: import("better-auth").RawError<"KEY_NOT_RECOVERABLE">;
|
|
2206
|
+
EXPIRES_IN_IS_TOO_SMALL: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_SMALL">;
|
|
2207
|
+
EXPIRES_IN_IS_TOO_LARGE: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_LARGE">;
|
|
2208
|
+
INVALID_REMAINING: import("better-auth").RawError<"INVALID_REMAINING">;
|
|
2209
|
+
INVALID_PREFIX_LENGTH: import("better-auth").RawError<"INVALID_PREFIX_LENGTH">;
|
|
2210
|
+
INVALID_NAME_LENGTH: import("better-auth").RawError<"INVALID_NAME_LENGTH">;
|
|
2211
|
+
METADATA_DISABLED: import("better-auth").RawError<"METADATA_DISABLED">;
|
|
2212
|
+
RATE_LIMIT_EXCEEDED: import("better-auth").RawError<"RATE_LIMIT_EXCEEDED">;
|
|
2213
|
+
NO_VALUES_TO_UPDATE: import("better-auth").RawError<"NO_VALUES_TO_UPDATE">;
|
|
2214
|
+
KEY_DISABLED_EXPIRATION: import("better-auth").RawError<"KEY_DISABLED_EXPIRATION">;
|
|
2215
|
+
INVALID_API_KEY: import("better-auth").RawError<"INVALID_API_KEY">;
|
|
2216
|
+
INVALID_USER_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_USER_ID_FROM_API_KEY">;
|
|
2217
|
+
INVALID_REFERENCE_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_REFERENCE_ID_FROM_API_KEY">;
|
|
2218
|
+
INVALID_API_KEY_GETTER_RETURN_TYPE: import("better-auth").RawError<"INVALID_API_KEY_GETTER_RETURN_TYPE">;
|
|
2219
|
+
SERVER_ONLY_PROPERTY: import("better-auth").RawError<"SERVER_ONLY_PROPERTY">;
|
|
2220
|
+
FAILED_TO_UPDATE_API_KEY: import("better-auth").RawError<"FAILED_TO_UPDATE_API_KEY">;
|
|
2221
|
+
NAME_REQUIRED: import("better-auth").RawError<"NAME_REQUIRED">;
|
|
2222
|
+
ORGANIZATION_ID_REQUIRED: import("better-auth").RawError<"ORGANIZATION_ID_REQUIRED">;
|
|
2223
|
+
USER_NOT_MEMBER_OF_ORGANIZATION: import("better-auth").RawError<"USER_NOT_MEMBER_OF_ORGANIZATION">;
|
|
2224
|
+
INSUFFICIENT_API_KEY_PERMISSIONS: import("better-auth").RawError<"INSUFFICIENT_API_KEY_PERMISSIONS">;
|
|
2225
|
+
NO_DEFAULT_API_KEY_CONFIGURATION_FOUND: import("better-auth").RawError<"NO_DEFAULT_API_KEY_CONFIGURATION_FOUND">;
|
|
2226
|
+
ORGANIZATION_PLUGIN_REQUIRED: import("better-auth").RawError<"ORGANIZATION_PLUGIN_REQUIRED">;
|
|
2052
2227
|
};
|
|
2053
2228
|
hooks: {
|
|
2054
2229
|
before: {
|
|
2055
|
-
matcher: (ctx: import("better-auth
|
|
2056
|
-
handler: (inputContext: import("better-
|
|
2230
|
+
matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
|
|
2231
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2057
2232
|
user: {
|
|
2058
2233
|
id: string;
|
|
2059
2234
|
createdAt: Date;
|
|
@@ -2074,14 +2249,10 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2074
2249
|
expiresAt: Date;
|
|
2075
2250
|
};
|
|
2076
2251
|
} | {
|
|
2077
|
-
context: import("better-
|
|
2078
|
-
|
|
2079
|
-
responseHeaders?: Headers | undefined;
|
|
2080
|
-
} & import("better-auth/*").PluginContext & import("better-auth/*").InfoContext & {
|
|
2081
|
-
options: import("better-auth/*").BetterAuthOptions;
|
|
2082
|
-
appName: string;
|
|
2083
|
-
baseURL: string;
|
|
2252
|
+
context: import("better-call").MiddlewareContext<import("better-call").MiddlewareOptions, import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
|
|
2253
|
+
options: import("better-auth").BetterAuthOptions;
|
|
2084
2254
|
trustedOrigins: string[];
|
|
2255
|
+
trustedProviders: string[];
|
|
2085
2256
|
isTrustedOrigin: (url: string, settings?: {
|
|
2086
2257
|
allowRelativePaths: boolean;
|
|
2087
2258
|
}) => boolean;
|
|
@@ -2090,44 +2261,97 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2090
2261
|
storeStateStrategy: "database" | "cookie";
|
|
2091
2262
|
};
|
|
2092
2263
|
newSession: {
|
|
2093
|
-
session:
|
|
2094
|
-
|
|
2264
|
+
session: {
|
|
2265
|
+
id: string;
|
|
2266
|
+
createdAt: Date;
|
|
2267
|
+
updatedAt: Date;
|
|
2268
|
+
userId: string;
|
|
2269
|
+
expiresAt: Date;
|
|
2270
|
+
token: string;
|
|
2271
|
+
ipAddress?: string | null | undefined;
|
|
2272
|
+
userAgent?: string | null | undefined;
|
|
2273
|
+
} & Record<string, any>;
|
|
2274
|
+
user: {
|
|
2275
|
+
id: string;
|
|
2276
|
+
createdAt: Date;
|
|
2277
|
+
updatedAt: Date;
|
|
2278
|
+
email: string;
|
|
2279
|
+
emailVerified: boolean;
|
|
2280
|
+
name: string;
|
|
2281
|
+
image?: string | null | undefined;
|
|
2282
|
+
} & Record<string, any>;
|
|
2095
2283
|
} | null;
|
|
2096
2284
|
session: {
|
|
2097
|
-
session:
|
|
2098
|
-
|
|
2285
|
+
session: {
|
|
2286
|
+
id: string;
|
|
2287
|
+
createdAt: Date;
|
|
2288
|
+
updatedAt: Date;
|
|
2289
|
+
userId: string;
|
|
2290
|
+
expiresAt: Date;
|
|
2291
|
+
token: string;
|
|
2292
|
+
ipAddress?: string | null | undefined;
|
|
2293
|
+
userAgent?: string | null | undefined;
|
|
2294
|
+
} & Record<string, any>;
|
|
2295
|
+
user: {
|
|
2296
|
+
id: string;
|
|
2297
|
+
createdAt: Date;
|
|
2298
|
+
updatedAt: Date;
|
|
2299
|
+
email: string;
|
|
2300
|
+
emailVerified: boolean;
|
|
2301
|
+
name: string;
|
|
2302
|
+
image?: string | null | undefined;
|
|
2303
|
+
} & Record<string, any>;
|
|
2099
2304
|
} | null;
|
|
2100
2305
|
setNewSession: (session: {
|
|
2101
|
-
session:
|
|
2102
|
-
|
|
2306
|
+
session: {
|
|
2307
|
+
id: string;
|
|
2308
|
+
createdAt: Date;
|
|
2309
|
+
updatedAt: Date;
|
|
2310
|
+
userId: string;
|
|
2311
|
+
expiresAt: Date;
|
|
2312
|
+
token: string;
|
|
2313
|
+
ipAddress?: string | null | undefined;
|
|
2314
|
+
userAgent?: string | null | undefined;
|
|
2315
|
+
} & Record<string, any>;
|
|
2316
|
+
user: {
|
|
2317
|
+
id: string;
|
|
2318
|
+
createdAt: Date;
|
|
2319
|
+
updatedAt: Date;
|
|
2320
|
+
email: string;
|
|
2321
|
+
emailVerified: boolean;
|
|
2322
|
+
name: string;
|
|
2323
|
+
image?: string | null | undefined;
|
|
2324
|
+
} & Record<string, any>;
|
|
2103
2325
|
} | null) => void;
|
|
2104
|
-
socialProviders: import("better-auth
|
|
2105
|
-
authCookies: import("better-auth
|
|
2106
|
-
logger: ReturnType<(options?: import("better-auth
|
|
2326
|
+
socialProviders: import("better-auth").OAuthProvider[];
|
|
2327
|
+
authCookies: import("better-auth").BetterAuthCookies;
|
|
2328
|
+
logger: ReturnType<(options?: import("better-auth").Logger | undefined) => import("better-auth").InternalLogger>;
|
|
2107
2329
|
rateLimit: {
|
|
2108
2330
|
enabled: boolean;
|
|
2109
2331
|
window: number;
|
|
2110
2332
|
max: number;
|
|
2111
2333
|
storage: "memory" | "database" | "secondary-storage";
|
|
2112
|
-
} & Omit<import("better-auth
|
|
2113
|
-
adapter: import("better-auth
|
|
2114
|
-
internalAdapter: import("better-auth
|
|
2115
|
-
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-
|
|
2334
|
+
} & Omit<import("better-auth").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
|
|
2335
|
+
adapter: import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
|
|
2336
|
+
internalAdapter: import("better-auth").InternalAdapter<import("better-auth").BetterAuthOptions>;
|
|
2337
|
+
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-call").CookieOptions> | undefined) => import("better-auth").BetterAuthCookie;
|
|
2116
2338
|
secret: string;
|
|
2339
|
+
secretConfig: string | import("better-auth").SecretConfig;
|
|
2117
2340
|
sessionConfig: {
|
|
2118
2341
|
updateAge: number;
|
|
2119
2342
|
expiresIn: number;
|
|
2120
2343
|
freshAge: number;
|
|
2344
|
+
cookieCacheSigner?: import("better-auth").CookieCacheSigner | undefined;
|
|
2121
2345
|
cookieRefreshCache: false | {
|
|
2122
2346
|
enabled: true;
|
|
2123
2347
|
updateAge: number;
|
|
2124
2348
|
};
|
|
2125
2349
|
};
|
|
2126
2350
|
generateId: (options: {
|
|
2127
|
-
model: import("better-auth
|
|
2351
|
+
model: import("better-auth").ModelNames;
|
|
2128
2352
|
size?: number | undefined;
|
|
2129
2353
|
}) => string | false;
|
|
2130
|
-
secondaryStorage: import("better-auth
|
|
2354
|
+
secondaryStorage: import("better-auth").SecondaryStorage | undefined;
|
|
2131
2355
|
password: {
|
|
2132
2356
|
hash: (password: string) => Promise<string>;
|
|
2133
2357
|
verify: (data: {
|
|
@@ -2138,9 +2362,9 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2138
2362
|
minPasswordLength: number;
|
|
2139
2363
|
maxPasswordLength: number;
|
|
2140
2364
|
};
|
|
2141
|
-
checkPassword: (userId: string, ctx: import("better-auth
|
|
2365
|
+
checkPassword: (userId: string, ctx: import("better-auth").GenericEndpointContext<import("better-auth").BetterAuthOptions>) => Promise<boolean>;
|
|
2142
2366
|
};
|
|
2143
|
-
tables: import("better-auth
|
|
2367
|
+
tables: import("better-auth").BetterAuthDBSchema;
|
|
2144
2368
|
runMigrations: () => Promise<void>;
|
|
2145
2369
|
publishTelemetry: (event: {
|
|
2146
2370
|
type: string;
|
|
@@ -2150,28 +2374,33 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2150
2374
|
skipOriginCheck: boolean | string[];
|
|
2151
2375
|
skipCSRFCheck: boolean;
|
|
2152
2376
|
runInBackground: (promise: Promise<unknown>) => void;
|
|
2153
|
-
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth
|
|
2377
|
+
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
|
|
2378
|
+
} & {
|
|
2379
|
+
returned?: unknown | undefined;
|
|
2380
|
+
responseHeaders?: Headers | undefined;
|
|
2154
2381
|
}>;
|
|
2155
|
-
}
|
|
2382
|
+
}>>;
|
|
2156
2383
|
}[];
|
|
2157
2384
|
};
|
|
2158
2385
|
endpoints: {
|
|
2159
|
-
createApiKey: import("better-
|
|
2386
|
+
createApiKey: import("better-call").StrictEndpoint<"/api-key/create", {
|
|
2160
2387
|
method: "POST";
|
|
2161
|
-
body: import("
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
prefix: import("
|
|
2166
|
-
remaining: import("
|
|
2167
|
-
metadata: import("
|
|
2168
|
-
refillAmount: import("
|
|
2169
|
-
refillInterval: import("
|
|
2170
|
-
rateLimitTimeWindow: import("
|
|
2171
|
-
rateLimitMax: import("
|
|
2172
|
-
rateLimitEnabled: import("
|
|
2173
|
-
permissions: import("
|
|
2174
|
-
|
|
2388
|
+
body: import("zod").ZodObject<{
|
|
2389
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2390
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2391
|
+
expiresIn: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>>;
|
|
2392
|
+
prefix: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2393
|
+
remaining: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>>;
|
|
2394
|
+
metadata: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
2395
|
+
refillAmount: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2396
|
+
refillInterval: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2397
|
+
rateLimitTimeWindow: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2398
|
+
rateLimitMax: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2399
|
+
rateLimitEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2400
|
+
permissions: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>;
|
|
2401
|
+
userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
|
|
2402
|
+
organizationId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
|
|
2403
|
+
}, import("zod/v4/core").$strip>;
|
|
2175
2404
|
metadata: {
|
|
2176
2405
|
openapi: {
|
|
2177
2406
|
description: string;
|
|
@@ -2226,7 +2455,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2226
2455
|
nullable: boolean;
|
|
2227
2456
|
description: string;
|
|
2228
2457
|
};
|
|
2229
|
-
|
|
2458
|
+
referenceId: {
|
|
2230
2459
|
type: string;
|
|
2231
2460
|
description: string;
|
|
2232
2461
|
};
|
|
@@ -2306,10 +2535,11 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2306
2535
|
metadata: any;
|
|
2307
2536
|
permissions: any;
|
|
2308
2537
|
id: string;
|
|
2538
|
+
configId: string;
|
|
2309
2539
|
name: string | null;
|
|
2310
2540
|
start: string | null;
|
|
2311
2541
|
prefix: string | null;
|
|
2312
|
-
|
|
2542
|
+
referenceId: string;
|
|
2313
2543
|
refillInterval: number | null;
|
|
2314
2544
|
refillAmount: number | null;
|
|
2315
2545
|
lastRefillAt: Date | null;
|
|
@@ -2324,16 +2554,17 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2324
2554
|
createdAt: Date;
|
|
2325
2555
|
updatedAt: Date;
|
|
2326
2556
|
}>;
|
|
2327
|
-
verifyApiKey: import("better-
|
|
2557
|
+
verifyApiKey: import("better-call").StrictEndpoint<string, {
|
|
2328
2558
|
method: "POST";
|
|
2329
|
-
body: import("
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2559
|
+
body: import("zod").ZodObject<{
|
|
2560
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2561
|
+
key: import("zod").ZodString;
|
|
2562
|
+
permissions: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>;
|
|
2563
|
+
}, import("zod/v4/core").$strip>;
|
|
2333
2564
|
}, {
|
|
2334
2565
|
valid: boolean;
|
|
2335
2566
|
error: {
|
|
2336
|
-
message: "
|
|
2567
|
+
message: import("better-auth").RawError<"INVALID_API_KEY">;
|
|
2337
2568
|
code: "KEY_NOT_FOUND";
|
|
2338
2569
|
};
|
|
2339
2570
|
key: null;
|
|
@@ -2348,21 +2579,22 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2348
2579
|
} | {
|
|
2349
2580
|
valid: boolean;
|
|
2350
2581
|
error: {
|
|
2351
|
-
message: "
|
|
2582
|
+
message: import("better-auth").RawError<"INVALID_API_KEY">;
|
|
2352
2583
|
code: "INVALID_API_KEY";
|
|
2353
2584
|
};
|
|
2354
2585
|
key: null;
|
|
2355
2586
|
} | {
|
|
2356
2587
|
valid: boolean;
|
|
2357
2588
|
error: null;
|
|
2358
|
-
key: Omit<import("better-auth/
|
|
2589
|
+
key: Omit<import("@better-auth/api-key").ApiKey, "key"> | null;
|
|
2359
2590
|
}>;
|
|
2360
|
-
getApiKey: import("better-
|
|
2591
|
+
getApiKey: import("better-call").StrictEndpoint<"/api-key/get", {
|
|
2361
2592
|
method: "GET";
|
|
2362
|
-
query: import("
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2593
|
+
query: import("zod").ZodObject<{
|
|
2594
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2595
|
+
id: import("zod").ZodString;
|
|
2596
|
+
}, import("zod/v4/core").$strip>;
|
|
2597
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2366
2598
|
session: {
|
|
2367
2599
|
session: Record<string, any> & {
|
|
2368
2600
|
id: string;
|
|
@@ -2384,7 +2616,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2384
2616
|
image?: string | null | undefined;
|
|
2385
2617
|
};
|
|
2386
2618
|
};
|
|
2387
|
-
}
|
|
2619
|
+
}>>[];
|
|
2388
2620
|
metadata: {
|
|
2389
2621
|
openapi: {
|
|
2390
2622
|
description: string;
|
|
@@ -2511,10 +2743,11 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2511
2743
|
[key: string]: string[];
|
|
2512
2744
|
} | null;
|
|
2513
2745
|
id: string;
|
|
2746
|
+
configId: string;
|
|
2514
2747
|
name: string | null;
|
|
2515
2748
|
start: string | null;
|
|
2516
2749
|
prefix: string | null;
|
|
2517
|
-
|
|
2750
|
+
referenceId: string;
|
|
2518
2751
|
refillInterval: number | null;
|
|
2519
2752
|
refillAmount: number | null;
|
|
2520
2753
|
lastRefillAt: Date | null;
|
|
@@ -2529,23 +2762,24 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2529
2762
|
createdAt: Date;
|
|
2530
2763
|
updatedAt: Date;
|
|
2531
2764
|
}>;
|
|
2532
|
-
updateApiKey: import("better-
|
|
2765
|
+
updateApiKey: import("better-call").StrictEndpoint<"/api-key/update", {
|
|
2533
2766
|
method: "POST";
|
|
2534
|
-
body: import("
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2767
|
+
body: import("zod").ZodObject<{
|
|
2768
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2769
|
+
keyId: import("zod").ZodString;
|
|
2770
|
+
userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
|
|
2771
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2772
|
+
enabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2773
|
+
remaining: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2774
|
+
refillAmount: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2775
|
+
refillInterval: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2776
|
+
metadata: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
2777
|
+
expiresIn: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
2778
|
+
rateLimitEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2779
|
+
rateLimitTimeWindow: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2780
|
+
rateLimitMax: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2781
|
+
permissions: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>>;
|
|
2782
|
+
}, import("zod/v4/core").$strip>;
|
|
2549
2783
|
metadata: {
|
|
2550
2784
|
openapi: {
|
|
2551
2785
|
description: string;
|
|
@@ -2672,10 +2906,11 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2672
2906
|
[key: string]: string[];
|
|
2673
2907
|
} | null;
|
|
2674
2908
|
id: string;
|
|
2909
|
+
configId: string;
|
|
2675
2910
|
name: string | null;
|
|
2676
2911
|
start: string | null;
|
|
2677
2912
|
prefix: string | null;
|
|
2678
|
-
|
|
2913
|
+
referenceId: string;
|
|
2679
2914
|
refillInterval: number | null;
|
|
2680
2915
|
refillAmount: number | null;
|
|
2681
2916
|
lastRefillAt: Date | null;
|
|
@@ -2690,12 +2925,13 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2690
2925
|
createdAt: Date;
|
|
2691
2926
|
updatedAt: Date;
|
|
2692
2927
|
}>;
|
|
2693
|
-
deleteApiKey: import("better-
|
|
2928
|
+
deleteApiKey: import("better-call").StrictEndpoint<"/api-key/delete", {
|
|
2694
2929
|
method: "POST";
|
|
2695
|
-
body: import("
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2930
|
+
body: import("zod").ZodObject<{
|
|
2931
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2932
|
+
keyId: import("zod").ZodString;
|
|
2933
|
+
}, import("zod/v4/core").$strip>;
|
|
2934
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2699
2935
|
session: {
|
|
2700
2936
|
session: Record<string, any> & {
|
|
2701
2937
|
id: string;
|
|
@@ -2717,7 +2953,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2717
2953
|
image?: string | null | undefined;
|
|
2718
2954
|
};
|
|
2719
2955
|
};
|
|
2720
|
-
}
|
|
2956
|
+
}>>[];
|
|
2721
2957
|
metadata: {
|
|
2722
2958
|
openapi: {
|
|
2723
2959
|
description: string;
|
|
@@ -2761,9 +2997,9 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2761
2997
|
}, {
|
|
2762
2998
|
success: boolean;
|
|
2763
2999
|
}>;
|
|
2764
|
-
listApiKeys: import("better-
|
|
3000
|
+
listApiKeys: import("better-call").StrictEndpoint<"/api-key/list", {
|
|
2765
3001
|
method: "GET";
|
|
2766
|
-
use: ((inputContext: import("better-
|
|
3002
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2767
3003
|
session: {
|
|
2768
3004
|
session: Record<string, any> & {
|
|
2769
3005
|
id: string;
|
|
@@ -2785,7 +3021,18 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2785
3021
|
image?: string | null | undefined;
|
|
2786
3022
|
};
|
|
2787
3023
|
};
|
|
2788
|
-
}
|
|
3024
|
+
}>>[];
|
|
3025
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
3026
|
+
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3027
|
+
organizationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3028
|
+
limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
|
|
3029
|
+
offset: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
|
|
3030
|
+
sortBy: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3031
|
+
sortDirection: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
3032
|
+
asc: "asc";
|
|
3033
|
+
desc: "desc";
|
|
3034
|
+
}>>;
|
|
3035
|
+
}, import("zod/v4/core").$strip>>;
|
|
2789
3036
|
metadata: {
|
|
2790
3037
|
openapi: {
|
|
2791
3038
|
description: string;
|
|
@@ -2795,113 +3042,133 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2795
3042
|
content: {
|
|
2796
3043
|
"application/json": {
|
|
2797
3044
|
schema: {
|
|
2798
|
-
type: "
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
type: string;
|
|
2804
|
-
description: string;
|
|
2805
|
-
};
|
|
2806
|
-
name: {
|
|
2807
|
-
type: string;
|
|
2808
|
-
nullable: boolean;
|
|
2809
|
-
description: string;
|
|
2810
|
-
};
|
|
2811
|
-
start: {
|
|
2812
|
-
type: string;
|
|
2813
|
-
nullable: boolean;
|
|
2814
|
-
description: string;
|
|
2815
|
-
};
|
|
2816
|
-
prefix: {
|
|
2817
|
-
type: string;
|
|
2818
|
-
nullable: boolean;
|
|
2819
|
-
description: string;
|
|
2820
|
-
};
|
|
2821
|
-
userId: {
|
|
2822
|
-
type: string;
|
|
2823
|
-
description: string;
|
|
2824
|
-
};
|
|
2825
|
-
refillInterval: {
|
|
2826
|
-
type: string;
|
|
2827
|
-
nullable: boolean;
|
|
2828
|
-
description: string;
|
|
2829
|
-
};
|
|
2830
|
-
refillAmount: {
|
|
2831
|
-
type: string;
|
|
2832
|
-
nullable: boolean;
|
|
2833
|
-
description: string;
|
|
2834
|
-
};
|
|
2835
|
-
lastRefillAt: {
|
|
2836
|
-
type: string;
|
|
2837
|
-
format: string;
|
|
2838
|
-
nullable: boolean;
|
|
2839
|
-
description: string;
|
|
2840
|
-
};
|
|
2841
|
-
enabled: {
|
|
2842
|
-
type: string;
|
|
2843
|
-
description: string;
|
|
2844
|
-
default: boolean;
|
|
2845
|
-
};
|
|
2846
|
-
rateLimitEnabled: {
|
|
2847
|
-
type: string;
|
|
2848
|
-
description: string;
|
|
2849
|
-
};
|
|
2850
|
-
rateLimitTimeWindow: {
|
|
2851
|
-
type: string;
|
|
2852
|
-
nullable: boolean;
|
|
2853
|
-
description: string;
|
|
2854
|
-
};
|
|
2855
|
-
rateLimitMax: {
|
|
2856
|
-
type: string;
|
|
2857
|
-
nullable: boolean;
|
|
2858
|
-
description: string;
|
|
2859
|
-
};
|
|
2860
|
-
requestCount: {
|
|
2861
|
-
type: string;
|
|
2862
|
-
description: string;
|
|
2863
|
-
};
|
|
2864
|
-
remaining: {
|
|
2865
|
-
type: string;
|
|
2866
|
-
nullable: boolean;
|
|
2867
|
-
description: string;
|
|
2868
|
-
};
|
|
2869
|
-
lastRequest: {
|
|
2870
|
-
type: string;
|
|
2871
|
-
format: string;
|
|
2872
|
-
nullable: boolean;
|
|
2873
|
-
description: string;
|
|
2874
|
-
};
|
|
2875
|
-
expiresAt: {
|
|
2876
|
-
type: string;
|
|
2877
|
-
format: string;
|
|
2878
|
-
nullable: boolean;
|
|
2879
|
-
description: string;
|
|
2880
|
-
};
|
|
2881
|
-
createdAt: {
|
|
2882
|
-
type: string;
|
|
2883
|
-
format: string;
|
|
2884
|
-
description: string;
|
|
2885
|
-
};
|
|
2886
|
-
updatedAt: {
|
|
2887
|
-
type: string;
|
|
2888
|
-
format: string;
|
|
2889
|
-
description: string;
|
|
2890
|
-
};
|
|
2891
|
-
metadata: {
|
|
2892
|
-
type: string;
|
|
2893
|
-
nullable: boolean;
|
|
2894
|
-
additionalProperties: boolean;
|
|
2895
|
-
description: string;
|
|
2896
|
-
};
|
|
2897
|
-
permissions: {
|
|
3045
|
+
type: "object";
|
|
3046
|
+
properties: {
|
|
3047
|
+
apiKeys: {
|
|
3048
|
+
type: string;
|
|
3049
|
+
items: {
|
|
2898
3050
|
type: string;
|
|
2899
|
-
|
|
2900
|
-
|
|
3051
|
+
properties: {
|
|
3052
|
+
id: {
|
|
3053
|
+
type: string;
|
|
3054
|
+
description: string;
|
|
3055
|
+
};
|
|
3056
|
+
name: {
|
|
3057
|
+
type: string;
|
|
3058
|
+
nullable: boolean;
|
|
3059
|
+
description: string;
|
|
3060
|
+
};
|
|
3061
|
+
start: {
|
|
3062
|
+
type: string;
|
|
3063
|
+
nullable: boolean;
|
|
3064
|
+
description: string;
|
|
3065
|
+
};
|
|
3066
|
+
prefix: {
|
|
3067
|
+
type: string;
|
|
3068
|
+
nullable: boolean;
|
|
3069
|
+
description: string;
|
|
3070
|
+
};
|
|
3071
|
+
userId: {
|
|
3072
|
+
type: string;
|
|
3073
|
+
description: string;
|
|
3074
|
+
};
|
|
3075
|
+
refillInterval: {
|
|
3076
|
+
type: string;
|
|
3077
|
+
nullable: boolean;
|
|
3078
|
+
description: string;
|
|
3079
|
+
};
|
|
3080
|
+
refillAmount: {
|
|
3081
|
+
type: string;
|
|
3082
|
+
nullable: boolean;
|
|
3083
|
+
description: string;
|
|
3084
|
+
};
|
|
3085
|
+
lastRefillAt: {
|
|
3086
|
+
type: string;
|
|
3087
|
+
format: string;
|
|
3088
|
+
nullable: boolean;
|
|
3089
|
+
description: string;
|
|
3090
|
+
};
|
|
3091
|
+
enabled: {
|
|
3092
|
+
type: string;
|
|
3093
|
+
description: string;
|
|
3094
|
+
default: boolean;
|
|
3095
|
+
};
|
|
3096
|
+
rateLimitEnabled: {
|
|
3097
|
+
type: string;
|
|
3098
|
+
description: string;
|
|
3099
|
+
};
|
|
3100
|
+
rateLimitTimeWindow: {
|
|
3101
|
+
type: string;
|
|
3102
|
+
nullable: boolean;
|
|
3103
|
+
description: string;
|
|
3104
|
+
};
|
|
3105
|
+
rateLimitMax: {
|
|
3106
|
+
type: string;
|
|
3107
|
+
nullable: boolean;
|
|
3108
|
+
description: string;
|
|
3109
|
+
};
|
|
3110
|
+
requestCount: {
|
|
3111
|
+
type: string;
|
|
3112
|
+
description: string;
|
|
3113
|
+
};
|
|
3114
|
+
remaining: {
|
|
3115
|
+
type: string;
|
|
3116
|
+
nullable: boolean;
|
|
3117
|
+
description: string;
|
|
3118
|
+
};
|
|
3119
|
+
lastRequest: {
|
|
3120
|
+
type: string;
|
|
3121
|
+
format: string;
|
|
3122
|
+
nullable: boolean;
|
|
3123
|
+
description: string;
|
|
3124
|
+
};
|
|
3125
|
+
expiresAt: {
|
|
3126
|
+
type: string;
|
|
3127
|
+
format: string;
|
|
3128
|
+
nullable: boolean;
|
|
3129
|
+
description: string;
|
|
3130
|
+
};
|
|
3131
|
+
createdAt: {
|
|
3132
|
+
type: string;
|
|
3133
|
+
format: string;
|
|
3134
|
+
description: string;
|
|
3135
|
+
};
|
|
3136
|
+
updatedAt: {
|
|
3137
|
+
type: string;
|
|
3138
|
+
format: string;
|
|
3139
|
+
description: string;
|
|
3140
|
+
};
|
|
3141
|
+
metadata: {
|
|
3142
|
+
type: string;
|
|
3143
|
+
nullable: boolean;
|
|
3144
|
+
additionalProperties: boolean;
|
|
3145
|
+
description: string;
|
|
3146
|
+
};
|
|
3147
|
+
permissions: {
|
|
3148
|
+
type: string;
|
|
3149
|
+
nullable: boolean;
|
|
3150
|
+
description: string;
|
|
3151
|
+
};
|
|
3152
|
+
};
|
|
3153
|
+
required: string[];
|
|
2901
3154
|
};
|
|
2902
3155
|
};
|
|
2903
|
-
|
|
3156
|
+
total: {
|
|
3157
|
+
type: string;
|
|
3158
|
+
description: string;
|
|
3159
|
+
};
|
|
3160
|
+
limit: {
|
|
3161
|
+
type: string;
|
|
3162
|
+
nullable: boolean;
|
|
3163
|
+
description: string;
|
|
3164
|
+
};
|
|
3165
|
+
offset: {
|
|
3166
|
+
type: string;
|
|
3167
|
+
nullable: boolean;
|
|
3168
|
+
description: string;
|
|
3169
|
+
};
|
|
2904
3170
|
};
|
|
3171
|
+
required: string[];
|
|
2905
3172
|
};
|
|
2906
3173
|
};
|
|
2907
3174
|
};
|
|
@@ -2910,30 +3177,36 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2910
3177
|
};
|
|
2911
3178
|
};
|
|
2912
3179
|
}, {
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
3180
|
+
apiKeys: {
|
|
3181
|
+
metadata: Record<string, any> | null;
|
|
3182
|
+
permissions: {
|
|
3183
|
+
[key: string]: string[];
|
|
3184
|
+
} | null;
|
|
3185
|
+
id: string;
|
|
3186
|
+
configId: string;
|
|
3187
|
+
name: string | null;
|
|
3188
|
+
start: string | null;
|
|
3189
|
+
prefix: string | null;
|
|
3190
|
+
referenceId: string;
|
|
3191
|
+
refillInterval: number | null;
|
|
3192
|
+
refillAmount: number | null;
|
|
3193
|
+
lastRefillAt: Date | null;
|
|
3194
|
+
enabled: boolean;
|
|
3195
|
+
rateLimitEnabled: boolean;
|
|
3196
|
+
rateLimitTimeWindow: number | null;
|
|
3197
|
+
rateLimitMax: number | null;
|
|
3198
|
+
requestCount: number;
|
|
3199
|
+
remaining: number | null;
|
|
3200
|
+
lastRequest: Date | null;
|
|
3201
|
+
expiresAt: Date | null;
|
|
3202
|
+
createdAt: Date;
|
|
3203
|
+
updatedAt: Date;
|
|
3204
|
+
}[];
|
|
3205
|
+
total: number;
|
|
3206
|
+
limit: number | undefined;
|
|
3207
|
+
offset: number | undefined;
|
|
3208
|
+
}>;
|
|
3209
|
+
deleteAllExpiredApiKeys: import("better-call").StrictEndpoint<string, {
|
|
2937
3210
|
method: "POST";
|
|
2938
3211
|
}, {
|
|
2939
3212
|
success: boolean;
|
|
@@ -2943,34 +3216,36 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2943
3216
|
schema: {
|
|
2944
3217
|
apikey: {
|
|
2945
3218
|
fields: {
|
|
2946
|
-
|
|
3219
|
+
configId: {
|
|
2947
3220
|
type: "string";
|
|
2948
|
-
required:
|
|
3221
|
+
required: true;
|
|
3222
|
+
defaultValue: string;
|
|
2949
3223
|
input: false;
|
|
3224
|
+
index: true;
|
|
2950
3225
|
};
|
|
2951
|
-
|
|
3226
|
+
name: {
|
|
2952
3227
|
type: "string";
|
|
2953
3228
|
required: false;
|
|
2954
3229
|
input: false;
|
|
2955
3230
|
};
|
|
2956
|
-
|
|
3231
|
+
start: {
|
|
2957
3232
|
type: "string";
|
|
2958
3233
|
required: false;
|
|
2959
3234
|
input: false;
|
|
2960
3235
|
};
|
|
2961
|
-
|
|
3236
|
+
referenceId: {
|
|
2962
3237
|
type: "string";
|
|
2963
3238
|
required: true;
|
|
2964
3239
|
input: false;
|
|
2965
3240
|
index: true;
|
|
2966
3241
|
};
|
|
2967
|
-
|
|
3242
|
+
prefix: {
|
|
3243
|
+
type: "string";
|
|
3244
|
+
required: false;
|
|
3245
|
+
input: false;
|
|
3246
|
+
};
|
|
3247
|
+
key: {
|
|
2968
3248
|
type: "string";
|
|
2969
|
-
references: {
|
|
2970
|
-
model: string;
|
|
2971
|
-
field: string;
|
|
2972
|
-
onDelete: "cascade";
|
|
2973
|
-
};
|
|
2974
3249
|
required: true;
|
|
2975
3250
|
input: false;
|
|
2976
3251
|
index: true;
|
|
@@ -3055,16 +3330,16 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3055
3330
|
required: false;
|
|
3056
3331
|
input: true;
|
|
3057
3332
|
transform: {
|
|
3058
|
-
input(value: import("better-auth
|
|
3059
|
-
output(value: import("better-auth
|
|
3333
|
+
input(value: import("better-auth").DBPrimitive): string;
|
|
3334
|
+
output(value: import("better-auth").DBPrimitive): any;
|
|
3060
3335
|
};
|
|
3061
3336
|
};
|
|
3062
3337
|
};
|
|
3063
3338
|
};
|
|
3064
3339
|
};
|
|
3065
|
-
options: import("better-auth/plugins").ApiKeyOptions | undefined;
|
|
3066
3340
|
} | {
|
|
3067
3341
|
id: "admin";
|
|
3342
|
+
version: string;
|
|
3068
3343
|
init(): {
|
|
3069
3344
|
options: {
|
|
3070
3345
|
databaseHooks: {
|
|
@@ -3103,7 +3378,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3103
3378
|
token: string;
|
|
3104
3379
|
ipAddress?: string | null | undefined;
|
|
3105
3380
|
userAgent?: string | null | undefined;
|
|
3106
|
-
} & Record<string, unknown>, ctx: import("better-auth
|
|
3381
|
+
} & Record<string, unknown>, ctx: import("better-auth").GenericEndpointContext | null): Promise<void>;
|
|
3107
3382
|
};
|
|
3108
3383
|
};
|
|
3109
3384
|
};
|
|
@@ -3111,24 +3386,33 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3111
3386
|
};
|
|
3112
3387
|
hooks: {
|
|
3113
3388
|
after: {
|
|
3114
|
-
matcher(context: import("better-auth
|
|
3115
|
-
handler: (inputContext: import("better-
|
|
3389
|
+
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
3390
|
+
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>>;
|
|
3116
3391
|
}[];
|
|
3117
3392
|
};
|
|
3118
3393
|
endpoints: {
|
|
3119
|
-
setRole: import("better-
|
|
3394
|
+
setRole: import("better-call").StrictEndpoint<"/admin/set-role", {
|
|
3120
3395
|
method: "POST";
|
|
3121
|
-
body: import("
|
|
3122
|
-
userId: import("
|
|
3123
|
-
role: import("
|
|
3124
|
-
}, import("
|
|
3396
|
+
body: import("zod").ZodObject<{
|
|
3397
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
3398
|
+
role: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>;
|
|
3399
|
+
}, import("zod/v4/core").$strip>;
|
|
3125
3400
|
requireHeaders: true;
|
|
3126
|
-
use: ((inputContext: import("better-
|
|
3401
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3127
3402
|
session: {
|
|
3128
3403
|
user: import("better-auth/plugins").UserWithRole;
|
|
3129
|
-
session:
|
|
3404
|
+
session: {
|
|
3405
|
+
id: string;
|
|
3406
|
+
createdAt: Date;
|
|
3407
|
+
updatedAt: Date;
|
|
3408
|
+
userId: string;
|
|
3409
|
+
expiresAt: Date;
|
|
3410
|
+
token: string;
|
|
3411
|
+
ipAddress?: string | null | undefined;
|
|
3412
|
+
userAgent?: string | null | undefined;
|
|
3413
|
+
};
|
|
3130
3414
|
};
|
|
3131
|
-
}
|
|
3415
|
+
}>>[];
|
|
3132
3416
|
metadata: {
|
|
3133
3417
|
openapi: {
|
|
3134
3418
|
operationId: string;
|
|
@@ -3162,17 +3446,26 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3162
3446
|
}, {
|
|
3163
3447
|
user: import("better-auth/plugins").UserWithRole;
|
|
3164
3448
|
}>;
|
|
3165
|
-
getUser: import("better-
|
|
3449
|
+
getUser: import("better-call").StrictEndpoint<"/admin/get-user", {
|
|
3166
3450
|
method: "GET";
|
|
3167
|
-
query: import("
|
|
3168
|
-
id: import("
|
|
3169
|
-
}, import("
|
|
3170
|
-
use: ((inputContext: import("better-
|
|
3451
|
+
query: import("zod").ZodObject<{
|
|
3452
|
+
id: import("zod").ZodString;
|
|
3453
|
+
}, import("zod/v4/core").$strip>;
|
|
3454
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3171
3455
|
session: {
|
|
3172
3456
|
user: import("better-auth/plugins").UserWithRole;
|
|
3173
|
-
session:
|
|
3457
|
+
session: {
|
|
3458
|
+
id: string;
|
|
3459
|
+
createdAt: Date;
|
|
3460
|
+
updatedAt: Date;
|
|
3461
|
+
userId: string;
|
|
3462
|
+
expiresAt: Date;
|
|
3463
|
+
token: string;
|
|
3464
|
+
ipAddress?: string | null | undefined;
|
|
3465
|
+
userAgent?: string | null | undefined;
|
|
3466
|
+
};
|
|
3174
3467
|
};
|
|
3175
|
-
}
|
|
3468
|
+
}>>[];
|
|
3176
3469
|
metadata: {
|
|
3177
3470
|
openapi: {
|
|
3178
3471
|
operationId: string;
|
|
@@ -3198,15 +3491,15 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3198
3491
|
};
|
|
3199
3492
|
};
|
|
3200
3493
|
}, import("better-auth/plugins").UserWithRole>;
|
|
3201
|
-
createUser: import("better-
|
|
3494
|
+
createUser: import("better-call").StrictEndpoint<"/admin/create-user", {
|
|
3202
3495
|
method: "POST";
|
|
3203
|
-
body: import("
|
|
3204
|
-
email: import("
|
|
3205
|
-
password: import("
|
|
3206
|
-
name: import("
|
|
3207
|
-
role: import("
|
|
3208
|
-
data: import("
|
|
3209
|
-
}, import("
|
|
3496
|
+
body: import("zod").ZodObject<{
|
|
3497
|
+
email: import("zod").ZodString;
|
|
3498
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3499
|
+
name: import("zod").ZodString;
|
|
3500
|
+
role: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>>;
|
|
3501
|
+
data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
3502
|
+
}, import("zod/v4/core").$strip>;
|
|
3210
3503
|
metadata: {
|
|
3211
3504
|
openapi: {
|
|
3212
3505
|
operationId: string;
|
|
@@ -3243,18 +3536,27 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3243
3536
|
}, {
|
|
3244
3537
|
user: import("better-auth/plugins").UserWithRole;
|
|
3245
3538
|
}>;
|
|
3246
|
-
adminUpdateUser: import("better-
|
|
3539
|
+
adminUpdateUser: import("better-call").StrictEndpoint<"/admin/update-user", {
|
|
3247
3540
|
method: "POST";
|
|
3248
|
-
body: import("
|
|
3249
|
-
userId: import("
|
|
3250
|
-
data: import("
|
|
3251
|
-
}, import("
|
|
3252
|
-
use: ((inputContext: import("better-
|
|
3541
|
+
body: import("zod").ZodObject<{
|
|
3542
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
3543
|
+
data: import("zod").ZodRecord<import("zod").ZodAny, import("zod").ZodAny>;
|
|
3544
|
+
}, import("zod/v4/core").$strip>;
|
|
3545
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3253
3546
|
session: {
|
|
3254
3547
|
user: import("better-auth/plugins").UserWithRole;
|
|
3255
|
-
session:
|
|
3548
|
+
session: {
|
|
3549
|
+
id: string;
|
|
3550
|
+
createdAt: Date;
|
|
3551
|
+
updatedAt: Date;
|
|
3552
|
+
userId: string;
|
|
3553
|
+
expiresAt: Date;
|
|
3554
|
+
token: string;
|
|
3555
|
+
ipAddress?: string | null | undefined;
|
|
3556
|
+
userAgent?: string | null | undefined;
|
|
3557
|
+
};
|
|
3256
3558
|
};
|
|
3257
|
-
}
|
|
3559
|
+
}>>[];
|
|
3258
3560
|
metadata: {
|
|
3259
3561
|
openapi: {
|
|
3260
3562
|
operationId: string;
|
|
@@ -3280,44 +3582,57 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3280
3582
|
};
|
|
3281
3583
|
};
|
|
3282
3584
|
}, import("better-auth/plugins").UserWithRole>;
|
|
3283
|
-
listUsers: import("better-
|
|
3585
|
+
listUsers: import("better-call").StrictEndpoint<"/admin/list-users", {
|
|
3284
3586
|
method: "GET";
|
|
3285
|
-
use: ((inputContext: import("better-
|
|
3587
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3286
3588
|
session: {
|
|
3287
3589
|
user: import("better-auth/plugins").UserWithRole;
|
|
3288
|
-
session:
|
|
3590
|
+
session: {
|
|
3591
|
+
id: string;
|
|
3592
|
+
createdAt: Date;
|
|
3593
|
+
updatedAt: Date;
|
|
3594
|
+
userId: string;
|
|
3595
|
+
expiresAt: Date;
|
|
3596
|
+
token: string;
|
|
3597
|
+
ipAddress?: string | null | undefined;
|
|
3598
|
+
userAgent?: string | null | undefined;
|
|
3599
|
+
};
|
|
3289
3600
|
};
|
|
3290
|
-
}
|
|
3291
|
-
query: import("
|
|
3292
|
-
searchValue: import("
|
|
3293
|
-
searchField: import("
|
|
3294
|
-
name: "name";
|
|
3601
|
+
}>>[];
|
|
3602
|
+
query: import("zod").ZodObject<{
|
|
3603
|
+
searchValue: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3604
|
+
searchField: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
3295
3605
|
email: "email";
|
|
3606
|
+
name: "name";
|
|
3296
3607
|
}>>;
|
|
3297
|
-
searchOperator: import("
|
|
3608
|
+
searchOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
3298
3609
|
contains: "contains";
|
|
3299
3610
|
starts_with: "starts_with";
|
|
3300
3611
|
ends_with: "ends_with";
|
|
3301
3612
|
}>>;
|
|
3302
|
-
limit: import("
|
|
3303
|
-
offset: import("
|
|
3304
|
-
sortBy: import("
|
|
3305
|
-
sortDirection: import("
|
|
3613
|
+
limit: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
|
|
3614
|
+
offset: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
|
|
3615
|
+
sortBy: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3616
|
+
sortDirection: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
3306
3617
|
asc: "asc";
|
|
3307
3618
|
desc: "desc";
|
|
3308
3619
|
}>>;
|
|
3309
|
-
filterField: import("
|
|
3310
|
-
filterValue: import("
|
|
3311
|
-
filterOperator: import("
|
|
3620
|
+
filterField: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3621
|
+
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>]>>;
|
|
3622
|
+
filterOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
3312
3623
|
eq: "eq";
|
|
3313
3624
|
ne: "ne";
|
|
3314
|
-
lt: "lt";
|
|
3315
|
-
lte: "lte";
|
|
3316
3625
|
gt: "gt";
|
|
3317
3626
|
gte: "gte";
|
|
3627
|
+
lt: "lt";
|
|
3628
|
+
lte: "lte";
|
|
3629
|
+
in: "in";
|
|
3630
|
+
not_in: "not_in";
|
|
3318
3631
|
contains: "contains";
|
|
3632
|
+
starts_with: "starts_with";
|
|
3633
|
+
ends_with: "ends_with";
|
|
3319
3634
|
}>>;
|
|
3320
|
-
}, import("
|
|
3635
|
+
}, import("zod/v4/core").$strip>;
|
|
3321
3636
|
metadata: {
|
|
3322
3637
|
openapi: {
|
|
3323
3638
|
operationId: string;
|
|
@@ -3359,17 +3674,26 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3359
3674
|
users: import("better-auth/plugins").UserWithRole[];
|
|
3360
3675
|
total: number;
|
|
3361
3676
|
}>;
|
|
3362
|
-
listUserSessions: import("better-
|
|
3677
|
+
listUserSessions: import("better-call").StrictEndpoint<"/admin/list-user-sessions", {
|
|
3363
3678
|
method: "POST";
|
|
3364
|
-
use: ((inputContext: import("better-
|
|
3679
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3365
3680
|
session: {
|
|
3366
3681
|
user: import("better-auth/plugins").UserWithRole;
|
|
3367
|
-
session:
|
|
3682
|
+
session: {
|
|
3683
|
+
id: string;
|
|
3684
|
+
createdAt: Date;
|
|
3685
|
+
updatedAt: Date;
|
|
3686
|
+
userId: string;
|
|
3687
|
+
expiresAt: Date;
|
|
3688
|
+
token: string;
|
|
3689
|
+
ipAddress?: string | null | undefined;
|
|
3690
|
+
userAgent?: string | null | undefined;
|
|
3691
|
+
};
|
|
3368
3692
|
};
|
|
3369
|
-
}
|
|
3370
|
-
body: import("
|
|
3371
|
-
userId: import("
|
|
3372
|
-
}, import("
|
|
3693
|
+
}>>[];
|
|
3694
|
+
body: import("zod").ZodObject<{
|
|
3695
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
3696
|
+
}, import("zod/v4/core").$strip>;
|
|
3373
3697
|
metadata: {
|
|
3374
3698
|
openapi: {
|
|
3375
3699
|
operationId: string;
|
|
@@ -3400,17 +3724,26 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3400
3724
|
}, {
|
|
3401
3725
|
sessions: import("better-auth/plugins").SessionWithImpersonatedBy[];
|
|
3402
3726
|
}>;
|
|
3403
|
-
unbanUser: import("better-
|
|
3727
|
+
unbanUser: import("better-call").StrictEndpoint<"/admin/unban-user", {
|
|
3404
3728
|
method: "POST";
|
|
3405
|
-
body: import("
|
|
3406
|
-
userId: import("
|
|
3407
|
-
}, import("
|
|
3408
|
-
use: ((inputContext: import("better-
|
|
3729
|
+
body: import("zod").ZodObject<{
|
|
3730
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
3731
|
+
}, import("zod/v4/core").$strip>;
|
|
3732
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3409
3733
|
session: {
|
|
3410
3734
|
user: import("better-auth/plugins").UserWithRole;
|
|
3411
|
-
session:
|
|
3735
|
+
session: {
|
|
3736
|
+
id: string;
|
|
3737
|
+
createdAt: Date;
|
|
3738
|
+
updatedAt: Date;
|
|
3739
|
+
userId: string;
|
|
3740
|
+
expiresAt: Date;
|
|
3741
|
+
token: string;
|
|
3742
|
+
ipAddress?: string | null | undefined;
|
|
3743
|
+
userAgent?: string | null | undefined;
|
|
3744
|
+
};
|
|
3412
3745
|
};
|
|
3413
|
-
}
|
|
3746
|
+
}>>[];
|
|
3414
3747
|
metadata: {
|
|
3415
3748
|
openapi: {
|
|
3416
3749
|
operationId: string;
|
|
@@ -3438,19 +3771,28 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3438
3771
|
}, {
|
|
3439
3772
|
user: import("better-auth/plugins").UserWithRole;
|
|
3440
3773
|
}>;
|
|
3441
|
-
banUser: import("better-
|
|
3774
|
+
banUser: import("better-call").StrictEndpoint<"/admin/ban-user", {
|
|
3442
3775
|
method: "POST";
|
|
3443
|
-
body: import("
|
|
3444
|
-
userId: import("
|
|
3445
|
-
banReason: import("
|
|
3446
|
-
banExpiresIn: import("
|
|
3447
|
-
}, import("
|
|
3448
|
-
use: ((inputContext: import("better-
|
|
3776
|
+
body: import("zod").ZodObject<{
|
|
3777
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
3778
|
+
banReason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3779
|
+
banExpiresIn: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
3780
|
+
}, import("zod/v4/core").$strip>;
|
|
3781
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3449
3782
|
session: {
|
|
3450
3783
|
user: import("better-auth/plugins").UserWithRole;
|
|
3451
|
-
session:
|
|
3784
|
+
session: {
|
|
3785
|
+
id: string;
|
|
3786
|
+
createdAt: Date;
|
|
3787
|
+
updatedAt: Date;
|
|
3788
|
+
userId: string;
|
|
3789
|
+
expiresAt: Date;
|
|
3790
|
+
token: string;
|
|
3791
|
+
ipAddress?: string | null | undefined;
|
|
3792
|
+
userAgent?: string | null | undefined;
|
|
3793
|
+
};
|
|
3452
3794
|
};
|
|
3453
|
-
}
|
|
3795
|
+
}>>[];
|
|
3454
3796
|
metadata: {
|
|
3455
3797
|
openapi: {
|
|
3456
3798
|
operationId: string;
|
|
@@ -3478,17 +3820,26 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3478
3820
|
}, {
|
|
3479
3821
|
user: import("better-auth/plugins").UserWithRole;
|
|
3480
3822
|
}>;
|
|
3481
|
-
impersonateUser: import("better-
|
|
3823
|
+
impersonateUser: import("better-call").StrictEndpoint<"/admin/impersonate-user", {
|
|
3482
3824
|
method: "POST";
|
|
3483
|
-
body: import("
|
|
3484
|
-
userId: import("
|
|
3485
|
-
}, import("
|
|
3486
|
-
use: ((inputContext: import("better-
|
|
3825
|
+
body: import("zod").ZodObject<{
|
|
3826
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
3827
|
+
}, import("zod/v4/core").$strip>;
|
|
3828
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3487
3829
|
session: {
|
|
3488
3830
|
user: import("better-auth/plugins").UserWithRole;
|
|
3489
|
-
session:
|
|
3831
|
+
session: {
|
|
3832
|
+
id: string;
|
|
3833
|
+
createdAt: Date;
|
|
3834
|
+
updatedAt: Date;
|
|
3835
|
+
userId: string;
|
|
3836
|
+
expiresAt: Date;
|
|
3837
|
+
token: string;
|
|
3838
|
+
ipAddress?: string | null | undefined;
|
|
3839
|
+
userAgent?: string | null | undefined;
|
|
3840
|
+
};
|
|
3490
3841
|
};
|
|
3491
|
-
}
|
|
3842
|
+
}>>[];
|
|
3492
3843
|
metadata: {
|
|
3493
3844
|
openapi: {
|
|
3494
3845
|
operationId: string;
|
|
@@ -3529,7 +3880,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3529
3880
|
};
|
|
3530
3881
|
user: import("better-auth/plugins").UserWithRole;
|
|
3531
3882
|
}>;
|
|
3532
|
-
stopImpersonating: import("better-
|
|
3883
|
+
stopImpersonating: import("better-call").StrictEndpoint<"/admin/stop-impersonating", {
|
|
3533
3884
|
method: "POST";
|
|
3534
3885
|
requireHeaders: true;
|
|
3535
3886
|
}, {
|
|
@@ -3553,17 +3904,26 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3553
3904
|
image?: string | null | undefined;
|
|
3554
3905
|
} & Record<string, any>;
|
|
3555
3906
|
}>;
|
|
3556
|
-
revokeUserSession: import("better-
|
|
3907
|
+
revokeUserSession: import("better-call").StrictEndpoint<"/admin/revoke-user-session", {
|
|
3557
3908
|
method: "POST";
|
|
3558
|
-
body: import("
|
|
3559
|
-
sessionToken: import("
|
|
3560
|
-
}, import("
|
|
3561
|
-
use: ((inputContext: import("better-
|
|
3909
|
+
body: import("zod").ZodObject<{
|
|
3910
|
+
sessionToken: import("zod").ZodString;
|
|
3911
|
+
}, import("zod/v4/core").$strip>;
|
|
3912
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3562
3913
|
session: {
|
|
3563
3914
|
user: import("better-auth/plugins").UserWithRole;
|
|
3564
|
-
session:
|
|
3915
|
+
session: {
|
|
3916
|
+
id: string;
|
|
3917
|
+
createdAt: Date;
|
|
3918
|
+
updatedAt: Date;
|
|
3919
|
+
userId: string;
|
|
3920
|
+
expiresAt: Date;
|
|
3921
|
+
token: string;
|
|
3922
|
+
ipAddress?: string | null | undefined;
|
|
3923
|
+
userAgent?: string | null | undefined;
|
|
3924
|
+
};
|
|
3565
3925
|
};
|
|
3566
|
-
}
|
|
3926
|
+
}>>[];
|
|
3567
3927
|
metadata: {
|
|
3568
3928
|
openapi: {
|
|
3569
3929
|
operationId: string;
|
|
@@ -3591,17 +3951,26 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3591
3951
|
}, {
|
|
3592
3952
|
success: boolean;
|
|
3593
3953
|
}>;
|
|
3594
|
-
revokeUserSessions: import("better-
|
|
3954
|
+
revokeUserSessions: import("better-call").StrictEndpoint<"/admin/revoke-user-sessions", {
|
|
3595
3955
|
method: "POST";
|
|
3596
|
-
body: import("
|
|
3597
|
-
userId: import("
|
|
3598
|
-
}, import("
|
|
3599
|
-
use: ((inputContext: import("better-
|
|
3956
|
+
body: import("zod").ZodObject<{
|
|
3957
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
3958
|
+
}, import("zod/v4/core").$strip>;
|
|
3959
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3600
3960
|
session: {
|
|
3601
3961
|
user: import("better-auth/plugins").UserWithRole;
|
|
3602
|
-
session:
|
|
3962
|
+
session: {
|
|
3963
|
+
id: string;
|
|
3964
|
+
createdAt: Date;
|
|
3965
|
+
updatedAt: Date;
|
|
3966
|
+
userId: string;
|
|
3967
|
+
expiresAt: Date;
|
|
3968
|
+
token: string;
|
|
3969
|
+
ipAddress?: string | null | undefined;
|
|
3970
|
+
userAgent?: string | null | undefined;
|
|
3971
|
+
};
|
|
3603
3972
|
};
|
|
3604
|
-
}
|
|
3973
|
+
}>>[];
|
|
3605
3974
|
metadata: {
|
|
3606
3975
|
openapi: {
|
|
3607
3976
|
operationId: string;
|
|
@@ -3629,17 +3998,26 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3629
3998
|
}, {
|
|
3630
3999
|
success: boolean;
|
|
3631
4000
|
}>;
|
|
3632
|
-
removeUser: import("better-
|
|
4001
|
+
removeUser: import("better-call").StrictEndpoint<"/admin/remove-user", {
|
|
3633
4002
|
method: "POST";
|
|
3634
|
-
body: import("
|
|
3635
|
-
userId: import("
|
|
3636
|
-
}, import("
|
|
3637
|
-
use: ((inputContext: import("better-
|
|
4003
|
+
body: import("zod").ZodObject<{
|
|
4004
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
4005
|
+
}, import("zod/v4/core").$strip>;
|
|
4006
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3638
4007
|
session: {
|
|
3639
4008
|
user: import("better-auth/plugins").UserWithRole;
|
|
3640
|
-
session:
|
|
4009
|
+
session: {
|
|
4010
|
+
id: string;
|
|
4011
|
+
createdAt: Date;
|
|
4012
|
+
updatedAt: Date;
|
|
4013
|
+
userId: string;
|
|
4014
|
+
expiresAt: Date;
|
|
4015
|
+
token: string;
|
|
4016
|
+
ipAddress?: string | null | undefined;
|
|
4017
|
+
userAgent?: string | null | undefined;
|
|
4018
|
+
};
|
|
3641
4019
|
};
|
|
3642
|
-
}
|
|
4020
|
+
}>>[];
|
|
3643
4021
|
metadata: {
|
|
3644
4022
|
openapi: {
|
|
3645
4023
|
operationId: string;
|
|
@@ -3667,18 +4045,27 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3667
4045
|
}, {
|
|
3668
4046
|
success: boolean;
|
|
3669
4047
|
}>;
|
|
3670
|
-
setUserPassword: import("better-
|
|
4048
|
+
setUserPassword: import("better-call").StrictEndpoint<"/admin/set-user-password", {
|
|
3671
4049
|
method: "POST";
|
|
3672
|
-
body: import("
|
|
3673
|
-
newPassword: import("
|
|
3674
|
-
userId: import("
|
|
3675
|
-
}, import("
|
|
3676
|
-
use: ((inputContext: import("better-
|
|
4050
|
+
body: import("zod").ZodObject<{
|
|
4051
|
+
newPassword: import("zod").ZodString;
|
|
4052
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
4053
|
+
}, import("zod/v4/core").$strip>;
|
|
4054
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3677
4055
|
session: {
|
|
3678
4056
|
user: import("better-auth/plugins").UserWithRole;
|
|
3679
|
-
session:
|
|
4057
|
+
session: {
|
|
4058
|
+
id: string;
|
|
4059
|
+
createdAt: Date;
|
|
4060
|
+
updatedAt: Date;
|
|
4061
|
+
userId: string;
|
|
4062
|
+
expiresAt: Date;
|
|
4063
|
+
token: string;
|
|
4064
|
+
ipAddress?: string | null | undefined;
|
|
4065
|
+
userAgent?: string | null | undefined;
|
|
4066
|
+
};
|
|
3680
4067
|
};
|
|
3681
|
-
}
|
|
4068
|
+
}>>[];
|
|
3682
4069
|
metadata: {
|
|
3683
4070
|
openapi: {
|
|
3684
4071
|
operationId: string;
|
|
@@ -3706,18 +4093,16 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3706
4093
|
}, {
|
|
3707
4094
|
status: boolean;
|
|
3708
4095
|
}>;
|
|
3709
|
-
userHasPermission: import("better-
|
|
4096
|
+
userHasPermission: import("better-call").StrictEndpoint<"/admin/has-permission", {
|
|
3710
4097
|
method: "POST";
|
|
3711
|
-
body: import("
|
|
3712
|
-
userId: import("
|
|
3713
|
-
role: import("
|
|
3714
|
-
}, import("
|
|
3715
|
-
permission: import("
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
permissions: import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>>;
|
|
3720
|
-
}, import("better-auth/*").$strip>]>>;
|
|
4098
|
+
body: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
4099
|
+
userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
|
|
4100
|
+
role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4101
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodXor<readonly [import("zod").ZodObject<{
|
|
4102
|
+
permission: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>;
|
|
4103
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
4104
|
+
permissions: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>;
|
|
4105
|
+
}, import("zod/v4/core").$strip>]>>;
|
|
3721
4106
|
metadata: {
|
|
3722
4107
|
openapi: {
|
|
3723
4108
|
description: string;
|
|
@@ -3727,11 +4112,6 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3727
4112
|
schema: {
|
|
3728
4113
|
type: "object";
|
|
3729
4114
|
properties: {
|
|
3730
|
-
permission: {
|
|
3731
|
-
type: string;
|
|
3732
|
-
description: string;
|
|
3733
|
-
deprecated: boolean;
|
|
3734
|
-
};
|
|
3735
4115
|
permissions: {
|
|
3736
4116
|
type: string;
|
|
3737
4117
|
description: string;
|
|
@@ -3765,19 +4145,12 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3765
4145
|
};
|
|
3766
4146
|
};
|
|
3767
4147
|
$Infer: {
|
|
3768
|
-
body:
|
|
3769
|
-
permission: {
|
|
3770
|
-
readonly user?: ("create" | "update" | "delete" | "list" | "get" | "set-role" | "ban" | "impersonate" | "set-password")[] | undefined;
|
|
3771
|
-
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
3772
|
-
};
|
|
3773
|
-
permissions?: never | undefined;
|
|
3774
|
-
} | {
|
|
4148
|
+
body: {
|
|
3775
4149
|
permissions: {
|
|
3776
|
-
readonly user?: ("create" | "update" | "delete" | "list" | "get" | "set-role" | "ban" | "impersonate" | "set-password")[] | undefined;
|
|
4150
|
+
readonly user?: ("create" | "update" | "delete" | "list" | "get" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email")[] | undefined;
|
|
3777
4151
|
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
3778
4152
|
};
|
|
3779
|
-
|
|
3780
|
-
}) & {
|
|
4153
|
+
} & {
|
|
3781
4154
|
userId?: string | undefined;
|
|
3782
4155
|
role?: "user" | "admin" | "staff" | undefined;
|
|
3783
4156
|
};
|
|
@@ -3789,27 +4162,29 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3789
4162
|
}>;
|
|
3790
4163
|
};
|
|
3791
4164
|
$ERROR_CODES: {
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
4165
|
+
USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
|
|
4166
|
+
FAILED_TO_CREATE_USER: import("better-auth").RawError<"FAILED_TO_CREATE_USER">;
|
|
4167
|
+
USER_ALREADY_EXISTS: import("better-auth").RawError<"USER_ALREADY_EXISTS">;
|
|
4168
|
+
YOU_CANNOT_BAN_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_BAN_YOURSELF">;
|
|
4169
|
+
YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE">;
|
|
4170
|
+
YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS">;
|
|
4171
|
+
YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS">;
|
|
4172
|
+
YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS">;
|
|
4173
|
+
YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_BAN_USERS">;
|
|
4174
|
+
YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS">;
|
|
4175
|
+
YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS">;
|
|
4176
|
+
YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS">;
|
|
4177
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD">;
|
|
4178
|
+
BANNED_USER: import("better-auth").RawError<"BANNED_USER">;
|
|
4179
|
+
YOU_ARE_NOT_ALLOWED_TO_GET_USER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_USER">;
|
|
4180
|
+
NO_DATA_TO_UPDATE: import("better-auth").RawError<"NO_DATA_TO_UPDATE">;
|
|
4181
|
+
YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS">;
|
|
4182
|
+
YOU_CANNOT_REMOVE_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_REMOVE_YOURSELF">;
|
|
4183
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE">;
|
|
4184
|
+
YOU_CANNOT_IMPERSONATE_ADMINS: import("better-auth").RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
|
|
4185
|
+
INVALID_ROLE_TYPE: import("better-auth").RawError<"INVALID_ROLE_TYPE">;
|
|
4186
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL">;
|
|
4187
|
+
PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER: import("better-auth").RawError<"PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER">;
|
|
3813
4188
|
};
|
|
3814
4189
|
schema: {
|
|
3815
4190
|
user: {
|
|
@@ -3842,91 +4217,52 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3842
4217
|
impersonatedBy: {
|
|
3843
4218
|
type: "string";
|
|
3844
4219
|
required: false;
|
|
4220
|
+
input: false;
|
|
3845
4221
|
};
|
|
3846
4222
|
};
|
|
3847
4223
|
};
|
|
3848
4224
|
};
|
|
3849
4225
|
options: NoInfer<{
|
|
3850
4226
|
accessControl: {
|
|
3851
|
-
newRole<
|
|
3852
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
4227
|
+
newRole<const TRoleStatements extends import("better-auth/plugins").Statements>(statements: import("better-auth/plugins").RoleInput<{
|
|
4228
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
3853
4229
|
readonly session: readonly ["list", "revoke", "delete"];
|
|
3854
|
-
}>): {
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
}>[key] | {
|
|
3859
|
-
actions: import("better-auth/plugins").Subset<K, {
|
|
3860
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
3861
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
3862
|
-
}>[key];
|
|
3863
|
-
connector: "OR" | "AND";
|
|
3864
|
-
} | undefined; } : never, connector?: "OR" | "AND"): import("better-auth/plugins").AuthorizeResponse;
|
|
3865
|
-
statements: import("better-auth/plugins").Subset<K, {
|
|
3866
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
3867
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
3868
|
-
}>;
|
|
3869
|
-
};
|
|
4230
|
+
}, TRoleStatements>): import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<TRoleStatements>, {
|
|
4231
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
4232
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
4233
|
+
}>;
|
|
3870
4234
|
statements: {
|
|
3871
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
4235
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
3872
4236
|
readonly session: readonly ["list", "revoke", "delete"];
|
|
3873
4237
|
};
|
|
3874
4238
|
};
|
|
3875
4239
|
roles: {
|
|
3876
|
-
admin: {
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
}>[key] | {
|
|
3897
|
-
actions: import("better-auth/plugins").Subset<"user" | "session", {
|
|
3898
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
3899
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
3900
|
-
}>[key];
|
|
3901
|
-
connector: "OR" | "AND";
|
|
3902
|
-
} | undefined; } : never, connector?: "OR" | "AND"): import("better-auth/plugins").AuthorizeResponse;
|
|
3903
|
-
statements: import("better-auth/plugins").Subset<"user" | "session", {
|
|
3904
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
3905
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
3906
|
-
}>;
|
|
3907
|
-
};
|
|
3908
|
-
staff: {
|
|
3909
|
-
authorize<K_1 extends "user">(request: K_1 extends infer T extends K ? { [key in T]?: import("better-auth/plugins").Subset<"user", {
|
|
3910
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
3911
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
3912
|
-
}>[key] | {
|
|
3913
|
-
actions: import("better-auth/plugins").Subset<"user", {
|
|
3914
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
3915
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
3916
|
-
}>[key];
|
|
3917
|
-
connector: "OR" | "AND";
|
|
3918
|
-
} | undefined; } : never, connector?: "OR" | "AND"): import("better-auth/plugins").AuthorizeResponse;
|
|
3919
|
-
statements: import("better-auth/plugins").Subset<"user", {
|
|
3920
|
-
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
3921
|
-
readonly session: readonly ["list", "revoke", "delete"];
|
|
3922
|
-
}>;
|
|
3923
|
-
};
|
|
4240
|
+
admin: import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<import("better-auth/plugins").ExactRoleStatements<{
|
|
4241
|
+
readonly user: ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "set-email", "get", "update"];
|
|
4242
|
+
readonly session: ["list", "revoke", "delete"];
|
|
4243
|
+
}>>, {
|
|
4244
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
4245
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
4246
|
+
}>;
|
|
4247
|
+
user: import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<import("better-auth/plugins").ExactRoleStatements<{
|
|
4248
|
+
readonly user: [];
|
|
4249
|
+
readonly session: [];
|
|
4250
|
+
}>>, {
|
|
4251
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
4252
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
4253
|
+
}>;
|
|
4254
|
+
staff: import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<{
|
|
4255
|
+
readonly user: ["create", "list", "delete"];
|
|
4256
|
+
}>, {
|
|
4257
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
4258
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
4259
|
+
}>;
|
|
3924
4260
|
};
|
|
3925
4261
|
}>;
|
|
3926
4262
|
} | (C["$auth"] extends {
|
|
3927
4263
|
plugins: any;
|
|
3928
4264
|
} ? C["$auth"]["plugins"] : [])[number])[];
|
|
3929
|
-
database: (options: import("better-auth
|
|
4265
|
+
database: (options: import("better-auth").BetterAuthOptions) => import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
|
|
3930
4266
|
baseURL: any;
|
|
3931
4267
|
rateLimit: {
|
|
3932
4268
|
readonly enabled: boolean;
|
|
@@ -3959,8 +4295,8 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3959
4295
|
};
|
|
3960
4296
|
};
|
|
3961
4297
|
hooks: {
|
|
3962
|
-
readonly before:
|
|
3963
|
-
readonly after:
|
|
4298
|
+
readonly before: import("better-call").MiddlewareHandler;
|
|
4299
|
+
readonly after: import("better-call").MiddlewareHandler;
|
|
3964
4300
|
};
|
|
3965
4301
|
emailAndPassword: {
|
|
3966
4302
|
readonly enabled: true;
|