@questpie/admin 1.0.2 → 1.0.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/dist/{client-COb2f2pl.d.mts → client-DCKQuHYi.d.mts} +913 -1096
- package/dist/client-DCKQuHYi.d.mts.map +1 -0
- package/dist/client-njX1rZmi.mjs.map +1 -1
- package/dist/client.d.mts +2 -2
- package/dist/{index-B9Xwk4hi.d.mts → index-2AfQaXoY.d.mts} +474 -231
- package/dist/index-2AfQaXoY.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/server.d.mts +2 -249
- package/package.json +8 -8
- package/dist/client-COb2f2pl.d.mts.map +0 -1
- package/dist/index-B9Xwk4hi.d.mts.map +0 -1
- package/dist/server.d.mts.map +0 -1
|
@@ -1,15 +1,143 @@
|
|
|
1
1
|
import { i as ViewConfiguration } from "./saved-views.types-BMsz5mCy.mjs";
|
|
2
2
|
import * as zod0 from "zod";
|
|
3
|
-
import * as
|
|
3
|
+
import * as questpie206 from "questpie";
|
|
4
4
|
import { Questpie } from "questpie";
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
5
|
+
import * as drizzle_orm_pg_core179 from "drizzle-orm/pg-core";
|
|
6
|
+
import * as drizzle_orm91 from "drizzle-orm";
|
|
7
7
|
import * as better_auth0 from "better-auth";
|
|
8
8
|
import * as better_call0 from "better-call";
|
|
9
9
|
import * as better_auth_plugins0 from "better-auth/plugins";
|
|
10
10
|
|
|
11
|
-
//#region src/server/
|
|
11
|
+
//#region src/server/adapters/tanstack.d.ts
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Options for TanStack auth guard
|
|
15
|
+
*/
|
|
16
|
+
interface TanStackAuthGuardOptions {
|
|
17
|
+
/**
|
|
18
|
+
* The CMS instance with auth configured
|
|
19
|
+
*/
|
|
20
|
+
cms: Questpie<any>;
|
|
21
|
+
/**
|
|
22
|
+
* Path to redirect to when not authenticated
|
|
23
|
+
* @default "/admin/login"
|
|
24
|
+
*/
|
|
25
|
+
loginPath?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Required role for access
|
|
28
|
+
* @default "admin"
|
|
29
|
+
*/
|
|
30
|
+
requiredRole?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Query parameter name for redirect URL
|
|
33
|
+
* @default "redirect"
|
|
34
|
+
*/
|
|
35
|
+
redirectParam?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Context passed to TanStack Router beforeLoad
|
|
39
|
+
*/
|
|
40
|
+
interface BeforeLoadContext {
|
|
41
|
+
context: {
|
|
42
|
+
request: Request;
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
};
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Create a TanStack Router beforeLoad guard for admin authentication.
|
|
49
|
+
*
|
|
50
|
+
* Returns a function that can be used as beforeLoad in route definitions.
|
|
51
|
+
* Throws a redirect Response when authentication fails.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* import { createFileRoute } from "@tanstack/react-router";
|
|
56
|
+
* import { createTanStackAuthGuard } from "@questpie/admin/server/adapters/tanstack";
|
|
57
|
+
* import { cms } from "~/questpie/server/cms";
|
|
58
|
+
*
|
|
59
|
+
* export const Route = createFileRoute("/admin")({
|
|
60
|
+
* beforeLoad: createTanStackAuthGuard({
|
|
61
|
+
* cms,
|
|
62
|
+
* loginPath: "/admin/login",
|
|
63
|
+
* requiredRole: "admin",
|
|
64
|
+
* }),
|
|
65
|
+
* component: AdminLayout,
|
|
66
|
+
* });
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @example With custom context
|
|
70
|
+
* ```ts
|
|
71
|
+
* export const Route = createFileRoute("/admin")({
|
|
72
|
+
* beforeLoad: async (ctx) => {
|
|
73
|
+
* // Run auth guard
|
|
74
|
+
* await createTanStackAuthGuard({ cms })(ctx);
|
|
75
|
+
*
|
|
76
|
+
* // Add additional context
|
|
77
|
+
* return { user: ctx.context.user };
|
|
78
|
+
* },
|
|
79
|
+
* });
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
declare function createTanStackAuthGuard({
|
|
83
|
+
cms,
|
|
84
|
+
loginPath,
|
|
85
|
+
requiredRole,
|
|
86
|
+
redirectParam
|
|
87
|
+
}: TanStackAuthGuardOptions): ({
|
|
88
|
+
context
|
|
89
|
+
}: BeforeLoadContext) => Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Create a TanStack Router loader that injects the admin session into context.
|
|
92
|
+
*
|
|
93
|
+
* Use this when you need access to the session in your components.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* import { createTanStackSessionLoader } from "@questpie/admin/server/adapters/tanstack";
|
|
98
|
+
*
|
|
99
|
+
* export const Route = createFileRoute("/admin")({
|
|
100
|
+
* loader: createTanStackSessionLoader({ cms }),
|
|
101
|
+
* component: AdminLayout,
|
|
102
|
+
* });
|
|
103
|
+
*
|
|
104
|
+
* function AdminLayout() {
|
|
105
|
+
* const { session } = Route.useLoaderData();
|
|
106
|
+
* return <div>Hello {session?.user?.name}</div>;
|
|
107
|
+
* }
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
declare function createTanStackSessionLoader({
|
|
111
|
+
cms
|
|
112
|
+
}: {
|
|
113
|
+
cms: Questpie<any>;
|
|
114
|
+
}): ({
|
|
115
|
+
context
|
|
116
|
+
}: BeforeLoadContext) => Promise<{
|
|
117
|
+
session: {
|
|
118
|
+
session: {
|
|
119
|
+
id: string;
|
|
120
|
+
createdAt: Date;
|
|
121
|
+
updatedAt: Date;
|
|
122
|
+
userId: string;
|
|
123
|
+
expiresAt: Date;
|
|
124
|
+
token: string;
|
|
125
|
+
ipAddress?: string | null | undefined | undefined;
|
|
126
|
+
userAgent?: string | null | undefined | undefined;
|
|
127
|
+
};
|
|
128
|
+
user: {
|
|
129
|
+
id: string;
|
|
130
|
+
createdAt: Date;
|
|
131
|
+
updatedAt: Date;
|
|
132
|
+
email: string;
|
|
133
|
+
emailVerified: boolean;
|
|
134
|
+
name: string;
|
|
135
|
+
image?: string | null | undefined | undefined;
|
|
136
|
+
};
|
|
137
|
+
} | null;
|
|
138
|
+
}>;
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/server/auth-helpers.d.ts
|
|
13
141
|
/**
|
|
14
142
|
* Session object from Better Auth
|
|
15
143
|
*/
|
|
@@ -147,6 +275,121 @@ declare function isAdminUser({
|
|
|
147
275
|
requiredRole?: string;
|
|
148
276
|
}): Promise<boolean>;
|
|
149
277
|
//#endregion
|
|
278
|
+
//#region src/server/adapters/nextjs.d.ts
|
|
279
|
+
/**
|
|
280
|
+
* Options for Next.js auth middleware
|
|
281
|
+
*/
|
|
282
|
+
interface NextAuthMiddlewareOptions {
|
|
283
|
+
/**
|
|
284
|
+
* The CMS instance with auth configured
|
|
285
|
+
*/
|
|
286
|
+
cms: Questpie<any>;
|
|
287
|
+
/**
|
|
288
|
+
* Path to redirect to when not authenticated
|
|
289
|
+
* @default "/admin/login"
|
|
290
|
+
*/
|
|
291
|
+
loginPath?: string;
|
|
292
|
+
/**
|
|
293
|
+
* Required role for access
|
|
294
|
+
* @default "admin"
|
|
295
|
+
*/
|
|
296
|
+
requiredRole?: string;
|
|
297
|
+
/**
|
|
298
|
+
* Paths that require authentication (uses startsWith matching)
|
|
299
|
+
* @default ["/admin"]
|
|
300
|
+
*/
|
|
301
|
+
protectedPaths?: string[];
|
|
302
|
+
/**
|
|
303
|
+
* Paths within protectedPaths that should be publicly accessible
|
|
304
|
+
* @default ["/admin/login", "/admin/forgot-password", "/admin/reset-password", "/admin/accept-invite"]
|
|
305
|
+
*/
|
|
306
|
+
publicPaths?: string[];
|
|
307
|
+
/**
|
|
308
|
+
* Query parameter name for redirect URL
|
|
309
|
+
* @default "redirect"
|
|
310
|
+
*/
|
|
311
|
+
redirectParam?: string;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Create a Next.js middleware for admin authentication.
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```ts
|
|
318
|
+
* // middleware.ts
|
|
319
|
+
* import { createNextAuthMiddleware } from "@questpie/admin/server/adapters/nextjs";
|
|
320
|
+
* import { cms } from "./questpie/server/cms";
|
|
321
|
+
*
|
|
322
|
+
* export default createNextAuthMiddleware({
|
|
323
|
+
* cms,
|
|
324
|
+
* loginPath: "/admin/login",
|
|
325
|
+
* });
|
|
326
|
+
*
|
|
327
|
+
* export const config = {
|
|
328
|
+
* matcher: ["/admin/:path*"],
|
|
329
|
+
* };
|
|
330
|
+
* ```
|
|
331
|
+
*/
|
|
332
|
+
declare function createNextAuthMiddleware({
|
|
333
|
+
cms,
|
|
334
|
+
loginPath,
|
|
335
|
+
requiredRole,
|
|
336
|
+
protectedPaths,
|
|
337
|
+
publicPaths,
|
|
338
|
+
redirectParam
|
|
339
|
+
}: NextAuthMiddlewareOptions): (request: Request) => Promise<Response>;
|
|
340
|
+
/**
|
|
341
|
+
* Get the admin session in a Next.js server component or API route.
|
|
342
|
+
*
|
|
343
|
+
* @example Server Component
|
|
344
|
+
* ```tsx
|
|
345
|
+
* // app/admin/layout.tsx
|
|
346
|
+
* import { getNextAdminSession } from "@questpie/admin/server/adapters/nextjs";
|
|
347
|
+
* import { headers } from "next/headers";
|
|
348
|
+
* import { cms } from "~/questpie/server/cms";
|
|
349
|
+
*
|
|
350
|
+
* export default async function AdminLayout({ children }) {
|
|
351
|
+
* const headersList = headers();
|
|
352
|
+
* const session = await getNextAdminSession({
|
|
353
|
+
* headers: headersList,
|
|
354
|
+
* cms,
|
|
355
|
+
* });
|
|
356
|
+
*
|
|
357
|
+
* if (!session) {
|
|
358
|
+
* redirect("/admin/login");
|
|
359
|
+
* }
|
|
360
|
+
*
|
|
361
|
+
* return <div>{children}</div>;
|
|
362
|
+
* }
|
|
363
|
+
* ```
|
|
364
|
+
*
|
|
365
|
+
* @example API Route
|
|
366
|
+
* ```ts
|
|
367
|
+
* // app/api/admin/users/route.ts
|
|
368
|
+
* import { getNextAdminSession } from "@questpie/admin/server/adapters/nextjs";
|
|
369
|
+
* import { cms } from "~/questpie/server/cms";
|
|
370
|
+
*
|
|
371
|
+
* export async function GET(request: Request) {
|
|
372
|
+
* const session = await getNextAdminSession({
|
|
373
|
+
* headers: request.headers,
|
|
374
|
+
* cms,
|
|
375
|
+
* });
|
|
376
|
+
*
|
|
377
|
+
* if (!session || session.user.role !== "admin") {
|
|
378
|
+
* return Response.json({ error: "Unauthorized" }, { status: 401 });
|
|
379
|
+
* }
|
|
380
|
+
*
|
|
381
|
+
* // ... handle request
|
|
382
|
+
* }
|
|
383
|
+
* ```
|
|
384
|
+
*/
|
|
385
|
+
declare function getNextAdminSession({
|
|
386
|
+
headers,
|
|
387
|
+
cms
|
|
388
|
+
}: {
|
|
389
|
+
headers: Headers;
|
|
390
|
+
cms: Questpie<any>;
|
|
391
|
+
}): Promise<AuthSession | null>;
|
|
392
|
+
//#endregion
|
|
150
393
|
//#region src/server/modules/admin-preferences/collections/saved-views.collection.d.ts
|
|
151
394
|
/**
|
|
152
395
|
* Admin Saved Views Collection
|
|
@@ -173,7 +416,7 @@ declare function isAdminUser({
|
|
|
173
416
|
* });
|
|
174
417
|
* ```
|
|
175
418
|
*/
|
|
176
|
-
declare const savedViewsCollection:
|
|
419
|
+
declare const savedViewsCollection: questpie206.CollectionBuilder<questpie206.SetProperty<questpie206.TypeMerge<questpie206.UnsetProperty<questpie206.CollectionBuilderState & {
|
|
177
420
|
name: "admin_saved_views";
|
|
178
421
|
fields: {};
|
|
179
422
|
localized: [];
|
|
@@ -182,7 +425,7 @@ declare const savedViewsCollection: questpie181.CollectionBuilder<questpie181.Se
|
|
|
182
425
|
indexes: {};
|
|
183
426
|
title: undefined;
|
|
184
427
|
options: {};
|
|
185
|
-
hooks:
|
|
428
|
+
hooks: questpie206.CollectionHooks<any, any, any>;
|
|
186
429
|
access: {};
|
|
187
430
|
functions: {};
|
|
188
431
|
searchable: undefined;
|
|
@@ -191,11 +434,11 @@ declare const savedViewsCollection: questpie181.CollectionBuilder<questpie181.Se
|
|
|
191
434
|
upload: undefined;
|
|
192
435
|
}, "localized" | "fields">, {
|
|
193
436
|
fields: {
|
|
194
|
-
userId:
|
|
195
|
-
collectionName:
|
|
196
|
-
name:
|
|
197
|
-
configuration:
|
|
198
|
-
isDefault:
|
|
437
|
+
userId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
438
|
+
collectionName: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
439
|
+
name: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
440
|
+
configuration: drizzle_orm91.$Type<drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgJsonbBuilder>, ViewConfiguration>;
|
|
441
|
+
isDefault: drizzle_orm91.NotNull<drizzle_orm91.HasDefault<drizzle_orm_pg_core179.PgBooleanBuilder>>;
|
|
199
442
|
};
|
|
200
443
|
localized: [];
|
|
201
444
|
}>, "options", {
|
|
@@ -222,14 +465,14 @@ interface PreviewTokenPayload {
|
|
|
222
465
|
* @returns Object with preview functions
|
|
223
466
|
*/
|
|
224
467
|
declare function createPreviewFunctions(secret: string): {
|
|
225
|
-
mintPreviewToken:
|
|
468
|
+
mintPreviewToken: questpie206.JsonFunctionDefinition<{
|
|
226
469
|
path: string;
|
|
227
470
|
ttlMs?: number | undefined;
|
|
228
471
|
}, {
|
|
229
472
|
token: string;
|
|
230
473
|
expiresAt: number;
|
|
231
474
|
}, any>;
|
|
232
|
-
verifyPreviewToken:
|
|
475
|
+
verifyPreviewToken: questpie206.JsonFunctionDefinition<{
|
|
233
476
|
token: string;
|
|
234
477
|
}, {
|
|
235
478
|
valid: boolean;
|
|
@@ -286,7 +529,7 @@ declare function createPreviewTokenVerifier(secret?: string): (token: string) =>
|
|
|
286
529
|
* }
|
|
287
530
|
* ```
|
|
288
531
|
*/
|
|
289
|
-
declare const isSetupRequired:
|
|
532
|
+
declare const isSetupRequired: questpie206.JsonFunctionDefinition<Record<string, never>, {
|
|
290
533
|
required: boolean;
|
|
291
534
|
}, any>;
|
|
292
535
|
/**
|
|
@@ -311,7 +554,7 @@ declare const isSetupRequired: questpie181.JsonFunctionDefinition<Record<string,
|
|
|
311
554
|
* }
|
|
312
555
|
* ```
|
|
313
556
|
*/
|
|
314
|
-
declare const createFirstAdmin:
|
|
557
|
+
declare const createFirstAdmin: questpie206.JsonFunctionDefinition<{
|
|
315
558
|
email: string;
|
|
316
559
|
password: string;
|
|
317
560
|
name: string;
|
|
@@ -328,10 +571,10 @@ declare const createFirstAdmin: questpie181.JsonFunctionDefinition<{
|
|
|
328
571
|
* Bundle of setup-related functions.
|
|
329
572
|
*/
|
|
330
573
|
declare const setupFunctions: {
|
|
331
|
-
readonly isSetupRequired:
|
|
574
|
+
readonly isSetupRequired: questpie206.JsonFunctionDefinition<Record<string, never>, {
|
|
332
575
|
required: boolean;
|
|
333
576
|
}, any>;
|
|
334
|
-
readonly createFirstAdmin:
|
|
577
|
+
readonly createFirstAdmin: questpie206.JsonFunctionDefinition<{
|
|
335
578
|
email: string;
|
|
336
579
|
password: string;
|
|
337
580
|
name: string;
|
|
@@ -392,36 +635,36 @@ declare const setupFunctions: {
|
|
|
392
635
|
* .build({ ... });
|
|
393
636
|
* ```
|
|
394
637
|
*/
|
|
395
|
-
declare const adminModule:
|
|
638
|
+
declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<questpie206.SetProperty<{
|
|
396
639
|
name: "questpie-admin";
|
|
397
|
-
collections:
|
|
398
|
-
assets:
|
|
640
|
+
collections: questpie206.TypeMerge<questpie206.UnsetProperty<{}, keyof TOtherCollections>, {
|
|
641
|
+
assets: questpie206.CollectionBuilder<{
|
|
399
642
|
options: {
|
|
400
643
|
timestamps: true;
|
|
401
644
|
};
|
|
402
645
|
name: "assets";
|
|
403
646
|
fields: {
|
|
404
|
-
width:
|
|
405
|
-
height:
|
|
406
|
-
alt:
|
|
407
|
-
caption:
|
|
647
|
+
width: drizzle_orm_pg_core179.PgIntegerBuilder;
|
|
648
|
+
height: drizzle_orm_pg_core179.PgIntegerBuilder;
|
|
649
|
+
alt: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
650
|
+
caption: drizzle_orm_pg_core179.PgTextBuilder<[string, ...string[]]>;
|
|
408
651
|
} & {
|
|
409
|
-
key:
|
|
410
|
-
filename:
|
|
411
|
-
mimeType:
|
|
412
|
-
size:
|
|
413
|
-
visibility:
|
|
652
|
+
key: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
653
|
+
filename: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
654
|
+
mimeType: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
655
|
+
size: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgIntegerBuilder>;
|
|
656
|
+
visibility: drizzle_orm91.HasDefault<drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<["public", "private"]>>>;
|
|
414
657
|
};
|
|
415
658
|
localized: [];
|
|
416
659
|
virtuals: undefined;
|
|
417
|
-
relations: Record<string,
|
|
660
|
+
relations: Record<string, questpie206.RelationConfig>;
|
|
418
661
|
indexes: Record<string, any>;
|
|
419
662
|
title: "filename";
|
|
420
663
|
hooks: {
|
|
421
664
|
afterDelete: ({
|
|
422
665
|
data,
|
|
423
666
|
app
|
|
424
|
-
}:
|
|
667
|
+
}: questpie206.HookContext<{
|
|
425
668
|
width: number | null;
|
|
426
669
|
height: number | null;
|
|
427
670
|
alt: string | null;
|
|
@@ -438,160 +681,160 @@ declare const adminModule: questpie181.QuestpieBuilder<questpie181.SetProperty<q
|
|
|
438
681
|
url: string;
|
|
439
682
|
}, never, "delete", any>) => Promise<void>;
|
|
440
683
|
};
|
|
441
|
-
access:
|
|
684
|
+
access: questpie206.CollectionAccess<any, any>;
|
|
442
685
|
functions: {
|
|
443
|
-
[x: string]:
|
|
686
|
+
[x: string]: questpie206.FunctionDefinition<any, any, any>;
|
|
444
687
|
};
|
|
445
688
|
searchable: undefined;
|
|
446
689
|
validation: undefined;
|
|
447
|
-
output:
|
|
690
|
+
output: questpie206.TypeMerge<{}, {
|
|
448
691
|
url: string;
|
|
449
692
|
}>;
|
|
450
|
-
upload:
|
|
693
|
+
upload: questpie206.UploadOptions;
|
|
451
694
|
}>;
|
|
452
|
-
user:
|
|
695
|
+
user: questpie206.CollectionBuilder<{
|
|
453
696
|
options: {
|
|
454
697
|
timestamps: true;
|
|
455
698
|
};
|
|
456
699
|
name: "user";
|
|
457
700
|
fields: {
|
|
458
|
-
name:
|
|
459
|
-
email:
|
|
460
|
-
emailVerified:
|
|
461
|
-
image:
|
|
462
|
-
role:
|
|
463
|
-
banned:
|
|
464
|
-
banReason:
|
|
465
|
-
banExpires:
|
|
701
|
+
name: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
702
|
+
email: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
703
|
+
emailVerified: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgBooleanBuilder>;
|
|
704
|
+
image: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
705
|
+
role: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
706
|
+
banned: drizzle_orm91.HasDefault<drizzle_orm_pg_core179.PgBooleanBuilder>;
|
|
707
|
+
banReason: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
708
|
+
banExpires: drizzle_orm_pg_core179.PgTimestampBuilder;
|
|
466
709
|
};
|
|
467
710
|
localized: [];
|
|
468
711
|
virtuals: undefined;
|
|
469
|
-
relations: Record<string,
|
|
712
|
+
relations: Record<string, questpie206.RelationConfig>;
|
|
470
713
|
indexes: Record<string, any>;
|
|
471
714
|
title: "name";
|
|
472
|
-
hooks:
|
|
473
|
-
access:
|
|
715
|
+
hooks: questpie206.CollectionHooks<any, any, any, any>;
|
|
716
|
+
access: questpie206.CollectionAccess<any, any>;
|
|
474
717
|
functions: {
|
|
475
|
-
[x: string]:
|
|
718
|
+
[x: string]: questpie206.FunctionDefinition<any, any, any>;
|
|
476
719
|
};
|
|
477
720
|
searchable: undefined;
|
|
478
721
|
validation: undefined;
|
|
479
722
|
output: undefined;
|
|
480
723
|
upload: undefined;
|
|
481
724
|
}>;
|
|
482
|
-
session:
|
|
483
|
-
options:
|
|
725
|
+
session: questpie206.CollectionBuilder<{
|
|
726
|
+
options: questpie206.CollectionOptions;
|
|
484
727
|
name: "session";
|
|
485
728
|
fields: {
|
|
486
|
-
userId:
|
|
487
|
-
token:
|
|
488
|
-
expiresAt:
|
|
489
|
-
ipAddress:
|
|
490
|
-
userAgent:
|
|
491
|
-
impersonatedBy:
|
|
729
|
+
userId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
730
|
+
token: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
731
|
+
expiresAt: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgTimestampBuilder>;
|
|
732
|
+
ipAddress: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
733
|
+
userAgent: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
734
|
+
impersonatedBy: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
492
735
|
};
|
|
493
736
|
localized: [];
|
|
494
737
|
virtuals: undefined;
|
|
495
|
-
relations: Record<string,
|
|
738
|
+
relations: Record<string, questpie206.RelationConfig>;
|
|
496
739
|
indexes: Record<string, any>;
|
|
497
740
|
title: "token";
|
|
498
|
-
hooks:
|
|
499
|
-
access:
|
|
741
|
+
hooks: questpie206.CollectionHooks<any, any, any, any>;
|
|
742
|
+
access: questpie206.CollectionAccess<any, any>;
|
|
500
743
|
functions: {
|
|
501
|
-
[x: string]:
|
|
744
|
+
[x: string]: questpie206.FunctionDefinition<any, any, any>;
|
|
502
745
|
};
|
|
503
746
|
searchable: undefined;
|
|
504
747
|
validation: undefined;
|
|
505
748
|
output: undefined;
|
|
506
749
|
upload: undefined;
|
|
507
750
|
}>;
|
|
508
|
-
account:
|
|
509
|
-
options:
|
|
751
|
+
account: questpie206.CollectionBuilder<{
|
|
752
|
+
options: questpie206.CollectionOptions;
|
|
510
753
|
name: "account";
|
|
511
754
|
fields: {
|
|
512
|
-
userId:
|
|
513
|
-
accountId:
|
|
514
|
-
providerId:
|
|
515
|
-
accessToken:
|
|
516
|
-
refreshToken:
|
|
517
|
-
accessTokenExpiresAt:
|
|
518
|
-
refreshTokenExpiresAt:
|
|
519
|
-
scope:
|
|
520
|
-
idToken:
|
|
521
|
-
password:
|
|
755
|
+
userId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
756
|
+
accountId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
757
|
+
providerId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
758
|
+
accessToken: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
759
|
+
refreshToken: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
760
|
+
accessTokenExpiresAt: drizzle_orm_pg_core179.PgTimestampBuilder;
|
|
761
|
+
refreshTokenExpiresAt: drizzle_orm_pg_core179.PgTimestampBuilder;
|
|
762
|
+
scope: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
763
|
+
idToken: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
764
|
+
password: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
522
765
|
};
|
|
523
766
|
localized: [];
|
|
524
767
|
virtuals: undefined;
|
|
525
|
-
relations: Record<string,
|
|
768
|
+
relations: Record<string, questpie206.RelationConfig>;
|
|
526
769
|
indexes: Record<string, any>;
|
|
527
770
|
title: "providerId";
|
|
528
|
-
hooks:
|
|
529
|
-
access:
|
|
771
|
+
hooks: questpie206.CollectionHooks<any, any, any, any>;
|
|
772
|
+
access: questpie206.CollectionAccess<any, any>;
|
|
530
773
|
functions: {
|
|
531
|
-
[x: string]:
|
|
774
|
+
[x: string]: questpie206.FunctionDefinition<any, any, any>;
|
|
532
775
|
};
|
|
533
776
|
searchable: undefined;
|
|
534
777
|
validation: undefined;
|
|
535
778
|
output: undefined;
|
|
536
779
|
upload: undefined;
|
|
537
780
|
}>;
|
|
538
|
-
verification:
|
|
539
|
-
options:
|
|
781
|
+
verification: questpie206.CollectionBuilder<{
|
|
782
|
+
options: questpie206.CollectionOptions;
|
|
540
783
|
name: "verification";
|
|
541
784
|
fields: {
|
|
542
|
-
identifier:
|
|
543
|
-
value:
|
|
544
|
-
expiresAt:
|
|
785
|
+
identifier: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
786
|
+
value: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
787
|
+
expiresAt: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgTimestampBuilder>;
|
|
545
788
|
};
|
|
546
789
|
localized: [];
|
|
547
790
|
virtuals: undefined;
|
|
548
|
-
relations: Record<string,
|
|
791
|
+
relations: Record<string, questpie206.RelationConfig>;
|
|
549
792
|
indexes: Record<string, any>;
|
|
550
793
|
title: "identifier";
|
|
551
|
-
hooks:
|
|
552
|
-
access:
|
|
794
|
+
hooks: questpie206.CollectionHooks<any, any, any, any>;
|
|
795
|
+
access: questpie206.CollectionAccess<any, any>;
|
|
553
796
|
functions: {
|
|
554
|
-
[x: string]:
|
|
797
|
+
[x: string]: questpie206.FunctionDefinition<any, any, any>;
|
|
555
798
|
};
|
|
556
799
|
searchable: undefined;
|
|
557
800
|
validation: undefined;
|
|
558
801
|
output: undefined;
|
|
559
802
|
upload: undefined;
|
|
560
803
|
}>;
|
|
561
|
-
apikey:
|
|
804
|
+
apikey: questpie206.CollectionBuilder<{
|
|
562
805
|
options: {
|
|
563
806
|
timestamps: true;
|
|
564
807
|
};
|
|
565
808
|
name: "apikey";
|
|
566
809
|
fields: {
|
|
567
|
-
name:
|
|
568
|
-
start:
|
|
569
|
-
prefix:
|
|
570
|
-
key:
|
|
571
|
-
userId:
|
|
572
|
-
refillInterval:
|
|
573
|
-
refillAmount:
|
|
574
|
-
lastRefillAt:
|
|
575
|
-
enabled:
|
|
576
|
-
rateLimitEnabled:
|
|
577
|
-
rateLimitTimeWindow:
|
|
578
|
-
rateLimitMax:
|
|
579
|
-
requestCount:
|
|
580
|
-
remaining:
|
|
581
|
-
lastRequest:
|
|
582
|
-
expiresAt:
|
|
583
|
-
permissions:
|
|
584
|
-
metadata:
|
|
810
|
+
name: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
811
|
+
start: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
812
|
+
prefix: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
813
|
+
key: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
814
|
+
userId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
815
|
+
refillInterval: drizzle_orm_pg_core179.PgIntegerBuilder;
|
|
816
|
+
refillAmount: drizzle_orm_pg_core179.PgIntegerBuilder;
|
|
817
|
+
lastRefillAt: drizzle_orm_pg_core179.PgTimestampBuilder;
|
|
818
|
+
enabled: drizzle_orm91.HasDefault<drizzle_orm_pg_core179.PgBooleanBuilder>;
|
|
819
|
+
rateLimitEnabled: drizzle_orm91.HasDefault<drizzle_orm_pg_core179.PgBooleanBuilder>;
|
|
820
|
+
rateLimitTimeWindow: drizzle_orm_pg_core179.PgIntegerBuilder;
|
|
821
|
+
rateLimitMax: drizzle_orm_pg_core179.PgIntegerBuilder;
|
|
822
|
+
requestCount: drizzle_orm91.HasDefault<drizzle_orm_pg_core179.PgIntegerBuilder>;
|
|
823
|
+
remaining: drizzle_orm_pg_core179.PgIntegerBuilder;
|
|
824
|
+
lastRequest: drizzle_orm_pg_core179.PgTimestampBuilder;
|
|
825
|
+
expiresAt: drizzle_orm_pg_core179.PgTimestampBuilder;
|
|
826
|
+
permissions: drizzle_orm_pg_core179.PgTextBuilder<[string, ...string[]]>;
|
|
827
|
+
metadata: drizzle_orm_pg_core179.PgTextBuilder<[string, ...string[]]>;
|
|
585
828
|
};
|
|
586
829
|
localized: [];
|
|
587
830
|
virtuals: undefined;
|
|
588
|
-
relations: Record<string,
|
|
831
|
+
relations: Record<string, questpie206.RelationConfig>;
|
|
589
832
|
indexes: Record<string, any>;
|
|
590
833
|
title: "key";
|
|
591
|
-
hooks:
|
|
592
|
-
access:
|
|
834
|
+
hooks: questpie206.CollectionHooks<any, any, any, any>;
|
|
835
|
+
access: questpie206.CollectionAccess<any, any>;
|
|
593
836
|
functions: {
|
|
594
|
-
[x: string]:
|
|
837
|
+
[x: string]: questpie206.FunctionDefinition<any, any, any>;
|
|
595
838
|
};
|
|
596
839
|
searchable: undefined;
|
|
597
840
|
validation: undefined;
|
|
@@ -599,11 +842,11 @@ declare const adminModule: questpie181.QuestpieBuilder<questpie181.SetProperty<q
|
|
|
599
842
|
upload: undefined;
|
|
600
843
|
}>;
|
|
601
844
|
}>;
|
|
602
|
-
globals:
|
|
603
|
-
jobs:
|
|
604
|
-
emailTemplates:
|
|
605
|
-
functions:
|
|
606
|
-
auth:
|
|
845
|
+
globals: questpie206.TypeMerge<questpie206.UnsetProperty<{}, keyof TOtherGlobals>, {}>;
|
|
846
|
+
jobs: questpie206.TypeMerge<questpie206.UnsetProperty<{}, keyof TOtherJobs>, {}>;
|
|
847
|
+
emailTemplates: questpie206.TypeMerge<questpie206.UnsetProperty<{}, keyof TOtherEmailTemplates>, {}>;
|
|
848
|
+
functions: questpie206.TypeMerge<questpie206.UnsetProperty<{}, keyof TOtherFunctions>, {}>;
|
|
849
|
+
auth: questpie206.MergeAuthOptions<{}, questpie206.MergeAuthOptions<{}, {
|
|
607
850
|
baseURL: string | undefined;
|
|
608
851
|
secret: string | undefined;
|
|
609
852
|
advanced: {
|
|
@@ -2446,147 +2689,147 @@ declare const adminModule: questpie181.QuestpieBuilder<questpie181.SetProperty<q
|
|
|
2446
2689
|
requireEmailVerification: true;
|
|
2447
2690
|
};
|
|
2448
2691
|
}>>;
|
|
2449
|
-
locale?:
|
|
2450
|
-
migrations?:
|
|
2451
|
-
translations?:
|
|
2692
|
+
locale?: questpie206.LocaleConfig | undefined;
|
|
2693
|
+
migrations?: questpie206.Migration[] | undefined;
|
|
2694
|
+
translations?: questpie206.TranslationsConfig | undefined;
|
|
2452
2695
|
"~messageKeys"?: "error.notFound" | "error.notFound.withId" | "error.forbidden" | "error.unauthorized" | "error.validation" | "error.internal" | "error.badRequest" | "error.conflict" | "error.notImplemented" | "error.timeout" | "crud.create.forbidden" | "crud.read.forbidden" | "crud.update.forbidden" | "crud.delete.forbidden" | "crud.notFound" | "validation.required" | "validation.invalidType" | "validation.string.tooSmall" | "validation.string.tooBig" | "validation.string.email" | "validation.string.url" | "validation.string.uuid" | "validation.string.regex" | "validation.number.tooSmall" | "validation.number.tooBig" | "validation.number.notInteger" | "validation.number.notPositive" | "validation.number.notNegative" | "validation.array.tooSmall" | "validation.array.tooBig" | "validation.date.invalid" | "validation.date.tooEarly" | "validation.date.tooLate" | "auth.invalidCredentials" | "auth.sessionExpired" | "auth.tokenInvalid" | "auth.tokenExpired" | "auth.accountLocked" | "auth.emailNotVerified" | "auth.userNotFound" | "auth.userAlreadyExists" | "upload.tooLarge" | "upload.invalidType" | "upload.failed" | "hook.beforeCreate.failed" | "hook.afterCreate.failed" | "hook.beforeUpdate.failed" | "hook.afterUpdate.failed" | "hook.beforeDelete.failed" | "hook.afterDelete.failed" | "hook.validate.failed" | "access.denied" | "access.fieldDenied" | "access.operationDenied" | "error.database.uniqueViolation" | "error.database.foreignKeyViolation" | "error.database.notNullViolation" | "error.database.checkViolation" | undefined;
|
|
2453
2696
|
}, "collections", {
|
|
2454
|
-
user:
|
|
2697
|
+
user: questpie206.CollectionBuilder<{
|
|
2455
2698
|
options: {
|
|
2456
2699
|
timestamps: true;
|
|
2457
2700
|
};
|
|
2458
2701
|
name: "user";
|
|
2459
2702
|
fields: {
|
|
2460
|
-
name:
|
|
2461
|
-
email:
|
|
2462
|
-
emailVerified:
|
|
2463
|
-
image:
|
|
2464
|
-
role:
|
|
2465
|
-
banned:
|
|
2466
|
-
banReason:
|
|
2467
|
-
banExpires:
|
|
2703
|
+
name: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2704
|
+
email: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2705
|
+
emailVerified: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgBooleanBuilder>;
|
|
2706
|
+
image: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2707
|
+
role: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2708
|
+
banned: drizzle_orm91.HasDefault<drizzle_orm_pg_core179.PgBooleanBuilder>;
|
|
2709
|
+
banReason: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2710
|
+
banExpires: drizzle_orm_pg_core179.PgTimestampBuilder;
|
|
2468
2711
|
};
|
|
2469
2712
|
localized: [];
|
|
2470
2713
|
virtuals: undefined;
|
|
2471
|
-
relations: Record<string,
|
|
2714
|
+
relations: Record<string, questpie206.RelationConfig>;
|
|
2472
2715
|
indexes: Record<string, any>;
|
|
2473
2716
|
title: "name";
|
|
2474
|
-
hooks:
|
|
2475
|
-
access:
|
|
2717
|
+
hooks: questpie206.CollectionHooks<any, any, any, any>;
|
|
2718
|
+
access: questpie206.CollectionAccess<any, any>;
|
|
2476
2719
|
functions: {
|
|
2477
|
-
[x: string]:
|
|
2720
|
+
[x: string]: questpie206.FunctionDefinition<any, any, any>;
|
|
2478
2721
|
};
|
|
2479
2722
|
searchable: undefined;
|
|
2480
2723
|
validation: undefined;
|
|
2481
2724
|
output: undefined;
|
|
2482
2725
|
upload: undefined;
|
|
2483
2726
|
}>;
|
|
2484
|
-
session:
|
|
2485
|
-
options:
|
|
2727
|
+
session: questpie206.CollectionBuilder<{
|
|
2728
|
+
options: questpie206.CollectionOptions;
|
|
2486
2729
|
name: "session";
|
|
2487
2730
|
fields: {
|
|
2488
|
-
userId:
|
|
2489
|
-
token:
|
|
2490
|
-
expiresAt:
|
|
2491
|
-
ipAddress:
|
|
2492
|
-
userAgent:
|
|
2493
|
-
impersonatedBy:
|
|
2731
|
+
userId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2732
|
+
token: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2733
|
+
expiresAt: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgTimestampBuilder>;
|
|
2734
|
+
ipAddress: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2735
|
+
userAgent: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2736
|
+
impersonatedBy: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2494
2737
|
};
|
|
2495
2738
|
localized: [];
|
|
2496
2739
|
virtuals: undefined;
|
|
2497
|
-
relations: Record<string,
|
|
2740
|
+
relations: Record<string, questpie206.RelationConfig>;
|
|
2498
2741
|
indexes: Record<string, any>;
|
|
2499
2742
|
title: "token";
|
|
2500
|
-
hooks:
|
|
2501
|
-
access:
|
|
2743
|
+
hooks: questpie206.CollectionHooks<any, any, any, any>;
|
|
2744
|
+
access: questpie206.CollectionAccess<any, any>;
|
|
2502
2745
|
functions: {
|
|
2503
|
-
[x: string]:
|
|
2746
|
+
[x: string]: questpie206.FunctionDefinition<any, any, any>;
|
|
2504
2747
|
};
|
|
2505
2748
|
searchable: undefined;
|
|
2506
2749
|
validation: undefined;
|
|
2507
2750
|
output: undefined;
|
|
2508
2751
|
upload: undefined;
|
|
2509
2752
|
}>;
|
|
2510
|
-
account:
|
|
2511
|
-
options:
|
|
2753
|
+
account: questpie206.CollectionBuilder<{
|
|
2754
|
+
options: questpie206.CollectionOptions;
|
|
2512
2755
|
name: "account";
|
|
2513
2756
|
fields: {
|
|
2514
|
-
userId:
|
|
2515
|
-
accountId:
|
|
2516
|
-
providerId:
|
|
2517
|
-
accessToken:
|
|
2518
|
-
refreshToken:
|
|
2519
|
-
accessTokenExpiresAt:
|
|
2520
|
-
refreshTokenExpiresAt:
|
|
2521
|
-
scope:
|
|
2522
|
-
idToken:
|
|
2523
|
-
password:
|
|
2757
|
+
userId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2758
|
+
accountId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2759
|
+
providerId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2760
|
+
accessToken: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2761
|
+
refreshToken: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2762
|
+
accessTokenExpiresAt: drizzle_orm_pg_core179.PgTimestampBuilder;
|
|
2763
|
+
refreshTokenExpiresAt: drizzle_orm_pg_core179.PgTimestampBuilder;
|
|
2764
|
+
scope: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2765
|
+
idToken: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2766
|
+
password: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2524
2767
|
};
|
|
2525
2768
|
localized: [];
|
|
2526
2769
|
virtuals: undefined;
|
|
2527
|
-
relations: Record<string,
|
|
2770
|
+
relations: Record<string, questpie206.RelationConfig>;
|
|
2528
2771
|
indexes: Record<string, any>;
|
|
2529
2772
|
title: "providerId";
|
|
2530
|
-
hooks:
|
|
2531
|
-
access:
|
|
2773
|
+
hooks: questpie206.CollectionHooks<any, any, any, any>;
|
|
2774
|
+
access: questpie206.CollectionAccess<any, any>;
|
|
2532
2775
|
functions: {
|
|
2533
|
-
[x: string]:
|
|
2776
|
+
[x: string]: questpie206.FunctionDefinition<any, any, any>;
|
|
2534
2777
|
};
|
|
2535
2778
|
searchable: undefined;
|
|
2536
2779
|
validation: undefined;
|
|
2537
2780
|
output: undefined;
|
|
2538
2781
|
upload: undefined;
|
|
2539
2782
|
}>;
|
|
2540
|
-
verification:
|
|
2541
|
-
options:
|
|
2783
|
+
verification: questpie206.CollectionBuilder<{
|
|
2784
|
+
options: questpie206.CollectionOptions;
|
|
2542
2785
|
name: "verification";
|
|
2543
2786
|
fields: {
|
|
2544
|
-
identifier:
|
|
2545
|
-
value:
|
|
2546
|
-
expiresAt:
|
|
2787
|
+
identifier: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2788
|
+
value: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2789
|
+
expiresAt: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgTimestampBuilder>;
|
|
2547
2790
|
};
|
|
2548
2791
|
localized: [];
|
|
2549
2792
|
virtuals: undefined;
|
|
2550
|
-
relations: Record<string,
|
|
2793
|
+
relations: Record<string, questpie206.RelationConfig>;
|
|
2551
2794
|
indexes: Record<string, any>;
|
|
2552
2795
|
title: "identifier";
|
|
2553
|
-
hooks:
|
|
2554
|
-
access:
|
|
2796
|
+
hooks: questpie206.CollectionHooks<any, any, any, any>;
|
|
2797
|
+
access: questpie206.CollectionAccess<any, any>;
|
|
2555
2798
|
functions: {
|
|
2556
|
-
[x: string]:
|
|
2799
|
+
[x: string]: questpie206.FunctionDefinition<any, any, any>;
|
|
2557
2800
|
};
|
|
2558
2801
|
searchable: undefined;
|
|
2559
2802
|
validation: undefined;
|
|
2560
2803
|
output: undefined;
|
|
2561
2804
|
upload: undefined;
|
|
2562
2805
|
}>;
|
|
2563
|
-
assets:
|
|
2806
|
+
assets: questpie206.CollectionBuilder<{
|
|
2564
2807
|
options: {
|
|
2565
2808
|
timestamps: true;
|
|
2566
2809
|
};
|
|
2567
2810
|
name: "assets";
|
|
2568
2811
|
fields: {
|
|
2569
|
-
width:
|
|
2570
|
-
height:
|
|
2571
|
-
alt:
|
|
2572
|
-
caption:
|
|
2812
|
+
width: drizzle_orm_pg_core179.PgIntegerBuilder;
|
|
2813
|
+
height: drizzle_orm_pg_core179.PgIntegerBuilder;
|
|
2814
|
+
alt: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2815
|
+
caption: drizzle_orm_pg_core179.PgTextBuilder<[string, ...string[]]>;
|
|
2573
2816
|
} & {
|
|
2574
|
-
key:
|
|
2575
|
-
filename:
|
|
2576
|
-
mimeType:
|
|
2577
|
-
size:
|
|
2578
|
-
visibility:
|
|
2817
|
+
key: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2818
|
+
filename: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2819
|
+
mimeType: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2820
|
+
size: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgIntegerBuilder>;
|
|
2821
|
+
visibility: drizzle_orm91.HasDefault<drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<["public", "private"]>>>;
|
|
2579
2822
|
};
|
|
2580
2823
|
localized: [];
|
|
2581
2824
|
virtuals: undefined;
|
|
2582
|
-
relations: Record<string,
|
|
2825
|
+
relations: Record<string, questpie206.RelationConfig>;
|
|
2583
2826
|
indexes: Record<string, any>;
|
|
2584
2827
|
title: "filename";
|
|
2585
2828
|
hooks: {
|
|
2586
2829
|
afterDelete: ({
|
|
2587
2830
|
data,
|
|
2588
2831
|
app
|
|
2589
|
-
}:
|
|
2832
|
+
}: questpie206.HookContext<{
|
|
2590
2833
|
width: number | null;
|
|
2591
2834
|
height: number | null;
|
|
2592
2835
|
alt: string | null;
|
|
@@ -2603,58 +2846,58 @@ declare const adminModule: questpie181.QuestpieBuilder<questpie181.SetProperty<q
|
|
|
2603
2846
|
url: string;
|
|
2604
2847
|
}, never, "delete", any>) => Promise<void>;
|
|
2605
2848
|
};
|
|
2606
|
-
access:
|
|
2849
|
+
access: questpie206.CollectionAccess<any, any>;
|
|
2607
2850
|
functions: {
|
|
2608
|
-
[x: string]:
|
|
2851
|
+
[x: string]: questpie206.FunctionDefinition<any, any, any>;
|
|
2609
2852
|
};
|
|
2610
2853
|
searchable: undefined;
|
|
2611
2854
|
validation: undefined;
|
|
2612
|
-
output:
|
|
2855
|
+
output: questpie206.TypeMerge<{}, {
|
|
2613
2856
|
url: string;
|
|
2614
2857
|
}>;
|
|
2615
|
-
upload:
|
|
2858
|
+
upload: questpie206.UploadOptions;
|
|
2616
2859
|
}>;
|
|
2617
|
-
apikey:
|
|
2860
|
+
apikey: questpie206.CollectionBuilder<{
|
|
2618
2861
|
options: {
|
|
2619
2862
|
timestamps: true;
|
|
2620
2863
|
};
|
|
2621
2864
|
name: "apikey";
|
|
2622
2865
|
fields: {
|
|
2623
|
-
name:
|
|
2624
|
-
start:
|
|
2625
|
-
prefix:
|
|
2626
|
-
key:
|
|
2627
|
-
userId:
|
|
2628
|
-
refillInterval:
|
|
2629
|
-
refillAmount:
|
|
2630
|
-
lastRefillAt:
|
|
2631
|
-
enabled:
|
|
2632
|
-
rateLimitEnabled:
|
|
2633
|
-
rateLimitTimeWindow:
|
|
2634
|
-
rateLimitMax:
|
|
2635
|
-
requestCount:
|
|
2636
|
-
remaining:
|
|
2637
|
-
lastRequest:
|
|
2638
|
-
expiresAt:
|
|
2639
|
-
permissions:
|
|
2640
|
-
metadata:
|
|
2866
|
+
name: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2867
|
+
start: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2868
|
+
prefix: drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>;
|
|
2869
|
+
key: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2870
|
+
userId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2871
|
+
refillInterval: drizzle_orm_pg_core179.PgIntegerBuilder;
|
|
2872
|
+
refillAmount: drizzle_orm_pg_core179.PgIntegerBuilder;
|
|
2873
|
+
lastRefillAt: drizzle_orm_pg_core179.PgTimestampBuilder;
|
|
2874
|
+
enabled: drizzle_orm91.HasDefault<drizzle_orm_pg_core179.PgBooleanBuilder>;
|
|
2875
|
+
rateLimitEnabled: drizzle_orm91.HasDefault<drizzle_orm_pg_core179.PgBooleanBuilder>;
|
|
2876
|
+
rateLimitTimeWindow: drizzle_orm_pg_core179.PgIntegerBuilder;
|
|
2877
|
+
rateLimitMax: drizzle_orm_pg_core179.PgIntegerBuilder;
|
|
2878
|
+
requestCount: drizzle_orm91.HasDefault<drizzle_orm_pg_core179.PgIntegerBuilder>;
|
|
2879
|
+
remaining: drizzle_orm_pg_core179.PgIntegerBuilder;
|
|
2880
|
+
lastRequest: drizzle_orm_pg_core179.PgTimestampBuilder;
|
|
2881
|
+
expiresAt: drizzle_orm_pg_core179.PgTimestampBuilder;
|
|
2882
|
+
permissions: drizzle_orm_pg_core179.PgTextBuilder<[string, ...string[]]>;
|
|
2883
|
+
metadata: drizzle_orm_pg_core179.PgTextBuilder<[string, ...string[]]>;
|
|
2641
2884
|
};
|
|
2642
2885
|
localized: [];
|
|
2643
2886
|
virtuals: undefined;
|
|
2644
|
-
relations: Record<string,
|
|
2887
|
+
relations: Record<string, questpie206.RelationConfig>;
|
|
2645
2888
|
indexes: Record<string, any>;
|
|
2646
2889
|
title: "key";
|
|
2647
|
-
hooks:
|
|
2648
|
-
access:
|
|
2890
|
+
hooks: questpie206.CollectionHooks<any, any, any, any>;
|
|
2891
|
+
access: questpie206.CollectionAccess<any, any>;
|
|
2649
2892
|
functions: {
|
|
2650
|
-
[x: string]:
|
|
2893
|
+
[x: string]: questpie206.FunctionDefinition<any, any, any>;
|
|
2651
2894
|
};
|
|
2652
2895
|
searchable: undefined;
|
|
2653
2896
|
validation: undefined;
|
|
2654
2897
|
output: undefined;
|
|
2655
2898
|
upload: undefined;
|
|
2656
2899
|
}>;
|
|
2657
|
-
admin_saved_views:
|
|
2900
|
+
admin_saved_views: questpie206.CollectionBuilder<{
|
|
2658
2901
|
name: "admin_saved_views";
|
|
2659
2902
|
localized: [];
|
|
2660
2903
|
output: undefined;
|
|
@@ -2663,25 +2906,25 @@ declare const adminModule: questpie181.QuestpieBuilder<questpie181.SetProperty<q
|
|
|
2663
2906
|
timestamps: true;
|
|
2664
2907
|
};
|
|
2665
2908
|
fields: {
|
|
2666
|
-
userId:
|
|
2667
|
-
collectionName:
|
|
2668
|
-
name:
|
|
2669
|
-
configuration:
|
|
2670
|
-
isDefault:
|
|
2909
|
+
userId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2910
|
+
collectionName: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2911
|
+
name: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2912
|
+
configuration: drizzle_orm91.$Type<drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgJsonbBuilder>, ViewConfiguration>;
|
|
2913
|
+
isDefault: drizzle_orm91.NotNull<drizzle_orm91.HasDefault<drizzle_orm_pg_core179.PgBooleanBuilder>>;
|
|
2671
2914
|
};
|
|
2672
2915
|
upload: undefined;
|
|
2673
2916
|
functions: {
|
|
2674
|
-
[x: string]:
|
|
2917
|
+
[x: string]: questpie206.FunctionDefinition<any, any, any>;
|
|
2675
2918
|
};
|
|
2676
|
-
hooks:
|
|
2919
|
+
hooks: questpie206.CollectionHooks<any, any, any, any>;
|
|
2677
2920
|
indexes: Record<string, any>;
|
|
2678
2921
|
searchable: undefined;
|
|
2679
2922
|
virtuals: undefined;
|
|
2680
|
-
relations: Record<string,
|
|
2681
|
-
access:
|
|
2923
|
+
relations: Record<string, questpie206.RelationConfig>;
|
|
2924
|
+
access: questpie206.CollectionAccess<any, any>;
|
|
2682
2925
|
validation: undefined;
|
|
2683
2926
|
}>;
|
|
2684
|
-
admin_preferences:
|
|
2927
|
+
admin_preferences: questpie206.CollectionBuilder<{
|
|
2685
2928
|
name: "admin_preferences";
|
|
2686
2929
|
localized: [];
|
|
2687
2930
|
output: undefined;
|
|
@@ -2690,38 +2933,38 @@ declare const adminModule: questpie181.QuestpieBuilder<questpie181.SetProperty<q
|
|
|
2690
2933
|
timestamps: true;
|
|
2691
2934
|
};
|
|
2692
2935
|
fields: {
|
|
2693
|
-
userId:
|
|
2694
|
-
key:
|
|
2695
|
-
value:
|
|
2936
|
+
userId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2937
|
+
key: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
2938
|
+
value: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgJsonbBuilder>;
|
|
2696
2939
|
};
|
|
2697
2940
|
upload: undefined;
|
|
2698
2941
|
functions: {
|
|
2699
|
-
[x: string]:
|
|
2942
|
+
[x: string]: questpie206.FunctionDefinition<any, any, any>;
|
|
2700
2943
|
};
|
|
2701
|
-
hooks:
|
|
2702
|
-
indexes:
|
|
2944
|
+
hooks: questpie206.CollectionHooks<any, any, any, any>;
|
|
2945
|
+
indexes: drizzle_orm_pg_core179.IndexBuilder[];
|
|
2703
2946
|
searchable: undefined;
|
|
2704
2947
|
virtuals: undefined;
|
|
2705
|
-
relations: Record<string,
|
|
2706
|
-
access:
|
|
2948
|
+
relations: Record<string, questpie206.RelationConfig>;
|
|
2949
|
+
access: questpie206.CollectionAccess<any, any>;
|
|
2707
2950
|
validation: undefined;
|
|
2708
2951
|
}>;
|
|
2709
2952
|
}>, "functions", {
|
|
2710
|
-
mintPreviewToken:
|
|
2953
|
+
mintPreviewToken: questpie206.JsonFunctionDefinition<{
|
|
2711
2954
|
path: string;
|
|
2712
2955
|
ttlMs?: number | undefined;
|
|
2713
2956
|
}, {
|
|
2714
2957
|
token: string;
|
|
2715
2958
|
expiresAt: number;
|
|
2716
2959
|
}, any>;
|
|
2717
|
-
verifyPreviewToken:
|
|
2960
|
+
verifyPreviewToken: questpie206.JsonFunctionDefinition<{
|
|
2718
2961
|
token: string;
|
|
2719
2962
|
}, {
|
|
2720
2963
|
valid: boolean;
|
|
2721
2964
|
path?: string | undefined;
|
|
2722
2965
|
error?: string | undefined;
|
|
2723
2966
|
}, any>;
|
|
2724
|
-
getContentLocales:
|
|
2967
|
+
getContentLocales: questpie206.JsonFunctionDefinition<Record<string, never> | undefined, {
|
|
2725
2968
|
locales: {
|
|
2726
2969
|
code: string;
|
|
2727
2970
|
label?: string | undefined;
|
|
@@ -2731,10 +2974,10 @@ declare const adminModule: questpie181.QuestpieBuilder<questpie181.SetProperty<q
|
|
|
2731
2974
|
defaultLocale: string;
|
|
2732
2975
|
fallbacks?: Record<string, string> | undefined;
|
|
2733
2976
|
}, any>;
|
|
2734
|
-
isSetupRequired:
|
|
2977
|
+
isSetupRequired: questpie206.JsonFunctionDefinition<Record<string, never>, {
|
|
2735
2978
|
required: boolean;
|
|
2736
2979
|
}, any>;
|
|
2737
|
-
createFirstAdmin:
|
|
2980
|
+
createFirstAdmin: questpie206.JsonFunctionDefinition<{
|
|
2738
2981
|
email: string;
|
|
2739
2982
|
password: string;
|
|
2740
2983
|
name: string;
|
|
@@ -2749,5 +2992,5 @@ declare const adminModule: questpie181.QuestpieBuilder<questpie181.SetProperty<q
|
|
|
2749
2992
|
}, any>;
|
|
2750
2993
|
}>>;
|
|
2751
2994
|
//#endregion
|
|
2752
|
-
export { PreviewTokenPayload as a, verifyPreviewTokenDirect as c,
|
|
2753
|
-
//# sourceMappingURL=index-
|
|
2995
|
+
export { createTanStackSessionLoader as S, isAdminUser as _, PreviewTokenPayload as a, TanStackAuthGuardOptions as b, verifyPreviewTokenDirect as c, createNextAuthMiddleware as d, getNextAdminSession as f, getAdminSession as g, RequireAdminAuthOptions as h, setupFunctions as i, savedViewsCollection as l, GetAdminSessionOptions as m, createFirstAdmin as n, createPreviewFunctions as o, AuthSession as p, isSetupRequired as r, createPreviewTokenVerifier as s, adminModule as t, NextAuthMiddlewareOptions as u, requireAdminAuth as v, createTanStackAuthGuard as x, BeforeLoadContext as y };
|
|
2996
|
+
//# sourceMappingURL=index-2AfQaXoY.d.mts.map
|