@questpie/admin 1.0.4 → 1.0.5
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-DCKQuHYi.d.mts → client-BcHj40mZ.d.mts} +72 -72
- package/dist/client-BcHj40mZ.d.mts.map +1 -0
- package/dist/client.d.mts +2 -2
- package/dist/{index-2AfQaXoY.d.mts → index-CSdBA36M.d.mts} +107 -350
- package/dist/index-CSdBA36M.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/server.d.mts +249 -2
- package/dist/server.d.mts.map +1 -0
- package/package.json +3 -3
- package/dist/client-DCKQuHYi.d.mts.map +0 -1
- package/dist/index-2AfQaXoY.d.mts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
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 questpie202 from "questpie";
|
|
4
4
|
import { Questpie } from "questpie";
|
|
5
5
|
import * as drizzle_orm_pg_core179 from "drizzle-orm/pg-core";
|
|
6
6
|
import * as drizzle_orm91 from "drizzle-orm";
|
|
@@ -8,136 +8,8 @@ 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/adapters/tanstack.d.ts
|
|
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
11
|
//#region src/server/auth-helpers.d.ts
|
|
12
|
+
|
|
141
13
|
/**
|
|
142
14
|
* Session object from Better Auth
|
|
143
15
|
*/
|
|
@@ -275,121 +147,6 @@ declare function isAdminUser({
|
|
|
275
147
|
requiredRole?: string;
|
|
276
148
|
}): Promise<boolean>;
|
|
277
149
|
//#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
|
|
393
150
|
//#region src/server/modules/admin-preferences/collections/saved-views.collection.d.ts
|
|
394
151
|
/**
|
|
395
152
|
* Admin Saved Views Collection
|
|
@@ -416,7 +173,7 @@ declare function getNextAdminSession({
|
|
|
416
173
|
* });
|
|
417
174
|
* ```
|
|
418
175
|
*/
|
|
419
|
-
declare const savedViewsCollection:
|
|
176
|
+
declare const savedViewsCollection: questpie202.CollectionBuilder<questpie202.SetProperty<questpie202.TypeMerge<questpie202.UnsetProperty<questpie202.CollectionBuilderState & {
|
|
420
177
|
name: "admin_saved_views";
|
|
421
178
|
fields: {};
|
|
422
179
|
localized: [];
|
|
@@ -425,7 +182,7 @@ declare const savedViewsCollection: questpie206.CollectionBuilder<questpie206.Se
|
|
|
425
182
|
indexes: {};
|
|
426
183
|
title: undefined;
|
|
427
184
|
options: {};
|
|
428
|
-
hooks:
|
|
185
|
+
hooks: questpie202.CollectionHooks<any, any, any>;
|
|
429
186
|
access: {};
|
|
430
187
|
functions: {};
|
|
431
188
|
searchable: undefined;
|
|
@@ -465,14 +222,14 @@ interface PreviewTokenPayload {
|
|
|
465
222
|
* @returns Object with preview functions
|
|
466
223
|
*/
|
|
467
224
|
declare function createPreviewFunctions(secret: string): {
|
|
468
|
-
mintPreviewToken:
|
|
225
|
+
mintPreviewToken: questpie202.JsonFunctionDefinition<{
|
|
469
226
|
path: string;
|
|
470
227
|
ttlMs?: number | undefined;
|
|
471
228
|
}, {
|
|
472
229
|
token: string;
|
|
473
230
|
expiresAt: number;
|
|
474
231
|
}, any>;
|
|
475
|
-
verifyPreviewToken:
|
|
232
|
+
verifyPreviewToken: questpie202.JsonFunctionDefinition<{
|
|
476
233
|
token: string;
|
|
477
234
|
}, {
|
|
478
235
|
valid: boolean;
|
|
@@ -529,7 +286,7 @@ declare function createPreviewTokenVerifier(secret?: string): (token: string) =>
|
|
|
529
286
|
* }
|
|
530
287
|
* ```
|
|
531
288
|
*/
|
|
532
|
-
declare const isSetupRequired:
|
|
289
|
+
declare const isSetupRequired: questpie202.JsonFunctionDefinition<Record<string, never>, {
|
|
533
290
|
required: boolean;
|
|
534
291
|
}, any>;
|
|
535
292
|
/**
|
|
@@ -554,7 +311,7 @@ declare const isSetupRequired: questpie206.JsonFunctionDefinition<Record<string,
|
|
|
554
311
|
* }
|
|
555
312
|
* ```
|
|
556
313
|
*/
|
|
557
|
-
declare const createFirstAdmin:
|
|
314
|
+
declare const createFirstAdmin: questpie202.JsonFunctionDefinition<{
|
|
558
315
|
email: string;
|
|
559
316
|
password: string;
|
|
560
317
|
name: string;
|
|
@@ -571,10 +328,10 @@ declare const createFirstAdmin: questpie206.JsonFunctionDefinition<{
|
|
|
571
328
|
* Bundle of setup-related functions.
|
|
572
329
|
*/
|
|
573
330
|
declare const setupFunctions: {
|
|
574
|
-
readonly isSetupRequired:
|
|
331
|
+
readonly isSetupRequired: questpie202.JsonFunctionDefinition<Record<string, never>, {
|
|
575
332
|
required: boolean;
|
|
576
333
|
}, any>;
|
|
577
|
-
readonly createFirstAdmin:
|
|
334
|
+
readonly createFirstAdmin: questpie202.JsonFunctionDefinition<{
|
|
578
335
|
email: string;
|
|
579
336
|
password: string;
|
|
580
337
|
name: string;
|
|
@@ -635,10 +392,10 @@ declare const setupFunctions: {
|
|
|
635
392
|
* .build({ ... });
|
|
636
393
|
* ```
|
|
637
394
|
*/
|
|
638
|
-
declare const adminModule:
|
|
395
|
+
declare const adminModule: questpie202.QuestpieBuilder<questpie202.SetProperty<questpie202.SetProperty<{
|
|
639
396
|
name: "questpie-admin";
|
|
640
|
-
collections:
|
|
641
|
-
assets:
|
|
397
|
+
collections: questpie202.TypeMerge<questpie202.UnsetProperty<{}, keyof TOtherCollections>, {
|
|
398
|
+
assets: questpie202.CollectionBuilder<{
|
|
642
399
|
options: {
|
|
643
400
|
timestamps: true;
|
|
644
401
|
};
|
|
@@ -657,14 +414,14 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
657
414
|
};
|
|
658
415
|
localized: [];
|
|
659
416
|
virtuals: undefined;
|
|
660
|
-
relations: Record<string,
|
|
417
|
+
relations: Record<string, questpie202.RelationConfig>;
|
|
661
418
|
indexes: Record<string, any>;
|
|
662
419
|
title: "filename";
|
|
663
420
|
hooks: {
|
|
664
421
|
afterDelete: ({
|
|
665
422
|
data,
|
|
666
423
|
app
|
|
667
|
-
}:
|
|
424
|
+
}: questpie202.HookContext<{
|
|
668
425
|
width: number | null;
|
|
669
426
|
height: number | null;
|
|
670
427
|
alt: string | null;
|
|
@@ -681,18 +438,18 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
681
438
|
url: string;
|
|
682
439
|
}, never, "delete", any>) => Promise<void>;
|
|
683
440
|
};
|
|
684
|
-
access:
|
|
441
|
+
access: questpie202.CollectionAccess<any, any>;
|
|
685
442
|
functions: {
|
|
686
|
-
[x: string]:
|
|
443
|
+
[x: string]: questpie202.FunctionDefinition<any, any, any>;
|
|
687
444
|
};
|
|
688
445
|
searchable: undefined;
|
|
689
446
|
validation: undefined;
|
|
690
|
-
output:
|
|
447
|
+
output: questpie202.TypeMerge<{}, {
|
|
691
448
|
url: string;
|
|
692
449
|
}>;
|
|
693
|
-
upload:
|
|
450
|
+
upload: questpie202.UploadOptions;
|
|
694
451
|
}>;
|
|
695
|
-
user:
|
|
452
|
+
user: questpie202.CollectionBuilder<{
|
|
696
453
|
options: {
|
|
697
454
|
timestamps: true;
|
|
698
455
|
};
|
|
@@ -709,21 +466,21 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
709
466
|
};
|
|
710
467
|
localized: [];
|
|
711
468
|
virtuals: undefined;
|
|
712
|
-
relations: Record<string,
|
|
469
|
+
relations: Record<string, questpie202.RelationConfig>;
|
|
713
470
|
indexes: Record<string, any>;
|
|
714
471
|
title: "name";
|
|
715
|
-
hooks:
|
|
716
|
-
access:
|
|
472
|
+
hooks: questpie202.CollectionHooks<any, any, any, any>;
|
|
473
|
+
access: questpie202.CollectionAccess<any, any>;
|
|
717
474
|
functions: {
|
|
718
|
-
[x: string]:
|
|
475
|
+
[x: string]: questpie202.FunctionDefinition<any, any, any>;
|
|
719
476
|
};
|
|
720
477
|
searchable: undefined;
|
|
721
478
|
validation: undefined;
|
|
722
479
|
output: undefined;
|
|
723
480
|
upload: undefined;
|
|
724
481
|
}>;
|
|
725
|
-
session:
|
|
726
|
-
options:
|
|
482
|
+
session: questpie202.CollectionBuilder<{
|
|
483
|
+
options: questpie202.CollectionOptions;
|
|
727
484
|
name: "session";
|
|
728
485
|
fields: {
|
|
729
486
|
userId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
@@ -735,21 +492,21 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
735
492
|
};
|
|
736
493
|
localized: [];
|
|
737
494
|
virtuals: undefined;
|
|
738
|
-
relations: Record<string,
|
|
495
|
+
relations: Record<string, questpie202.RelationConfig>;
|
|
739
496
|
indexes: Record<string, any>;
|
|
740
497
|
title: "token";
|
|
741
|
-
hooks:
|
|
742
|
-
access:
|
|
498
|
+
hooks: questpie202.CollectionHooks<any, any, any, any>;
|
|
499
|
+
access: questpie202.CollectionAccess<any, any>;
|
|
743
500
|
functions: {
|
|
744
|
-
[x: string]:
|
|
501
|
+
[x: string]: questpie202.FunctionDefinition<any, any, any>;
|
|
745
502
|
};
|
|
746
503
|
searchable: undefined;
|
|
747
504
|
validation: undefined;
|
|
748
505
|
output: undefined;
|
|
749
506
|
upload: undefined;
|
|
750
507
|
}>;
|
|
751
|
-
account:
|
|
752
|
-
options:
|
|
508
|
+
account: questpie202.CollectionBuilder<{
|
|
509
|
+
options: questpie202.CollectionOptions;
|
|
753
510
|
name: "account";
|
|
754
511
|
fields: {
|
|
755
512
|
userId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
@@ -765,21 +522,21 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
765
522
|
};
|
|
766
523
|
localized: [];
|
|
767
524
|
virtuals: undefined;
|
|
768
|
-
relations: Record<string,
|
|
525
|
+
relations: Record<string, questpie202.RelationConfig>;
|
|
769
526
|
indexes: Record<string, any>;
|
|
770
527
|
title: "providerId";
|
|
771
|
-
hooks:
|
|
772
|
-
access:
|
|
528
|
+
hooks: questpie202.CollectionHooks<any, any, any, any>;
|
|
529
|
+
access: questpie202.CollectionAccess<any, any>;
|
|
773
530
|
functions: {
|
|
774
|
-
[x: string]:
|
|
531
|
+
[x: string]: questpie202.FunctionDefinition<any, any, any>;
|
|
775
532
|
};
|
|
776
533
|
searchable: undefined;
|
|
777
534
|
validation: undefined;
|
|
778
535
|
output: undefined;
|
|
779
536
|
upload: undefined;
|
|
780
537
|
}>;
|
|
781
|
-
verification:
|
|
782
|
-
options:
|
|
538
|
+
verification: questpie202.CollectionBuilder<{
|
|
539
|
+
options: questpie202.CollectionOptions;
|
|
783
540
|
name: "verification";
|
|
784
541
|
fields: {
|
|
785
542
|
identifier: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
@@ -788,20 +545,20 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
788
545
|
};
|
|
789
546
|
localized: [];
|
|
790
547
|
virtuals: undefined;
|
|
791
|
-
relations: Record<string,
|
|
548
|
+
relations: Record<string, questpie202.RelationConfig>;
|
|
792
549
|
indexes: Record<string, any>;
|
|
793
550
|
title: "identifier";
|
|
794
|
-
hooks:
|
|
795
|
-
access:
|
|
551
|
+
hooks: questpie202.CollectionHooks<any, any, any, any>;
|
|
552
|
+
access: questpie202.CollectionAccess<any, any>;
|
|
796
553
|
functions: {
|
|
797
|
-
[x: string]:
|
|
554
|
+
[x: string]: questpie202.FunctionDefinition<any, any, any>;
|
|
798
555
|
};
|
|
799
556
|
searchable: undefined;
|
|
800
557
|
validation: undefined;
|
|
801
558
|
output: undefined;
|
|
802
559
|
upload: undefined;
|
|
803
560
|
}>;
|
|
804
|
-
apikey:
|
|
561
|
+
apikey: questpie202.CollectionBuilder<{
|
|
805
562
|
options: {
|
|
806
563
|
timestamps: true;
|
|
807
564
|
};
|
|
@@ -828,13 +585,13 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
828
585
|
};
|
|
829
586
|
localized: [];
|
|
830
587
|
virtuals: undefined;
|
|
831
|
-
relations: Record<string,
|
|
588
|
+
relations: Record<string, questpie202.RelationConfig>;
|
|
832
589
|
indexes: Record<string, any>;
|
|
833
590
|
title: "key";
|
|
834
|
-
hooks:
|
|
835
|
-
access:
|
|
591
|
+
hooks: questpie202.CollectionHooks<any, any, any, any>;
|
|
592
|
+
access: questpie202.CollectionAccess<any, any>;
|
|
836
593
|
functions: {
|
|
837
|
-
[x: string]:
|
|
594
|
+
[x: string]: questpie202.FunctionDefinition<any, any, any>;
|
|
838
595
|
};
|
|
839
596
|
searchable: undefined;
|
|
840
597
|
validation: undefined;
|
|
@@ -842,11 +599,11 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
842
599
|
upload: undefined;
|
|
843
600
|
}>;
|
|
844
601
|
}>;
|
|
845
|
-
globals:
|
|
846
|
-
jobs:
|
|
847
|
-
emailTemplates:
|
|
848
|
-
functions:
|
|
849
|
-
auth:
|
|
602
|
+
globals: questpie202.TypeMerge<questpie202.UnsetProperty<{}, keyof TOtherGlobals>, {}>;
|
|
603
|
+
jobs: questpie202.TypeMerge<questpie202.UnsetProperty<{}, keyof TOtherJobs>, {}>;
|
|
604
|
+
emailTemplates: questpie202.TypeMerge<questpie202.UnsetProperty<{}, keyof TOtherEmailTemplates>, {}>;
|
|
605
|
+
functions: questpie202.TypeMerge<questpie202.UnsetProperty<{}, keyof TOtherFunctions>, {}>;
|
|
606
|
+
auth: questpie202.MergeAuthOptions<{}, questpie202.MergeAuthOptions<{}, {
|
|
850
607
|
baseURL: string | undefined;
|
|
851
608
|
secret: string | undefined;
|
|
852
609
|
advanced: {
|
|
@@ -2689,12 +2446,12 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
2689
2446
|
requireEmailVerification: true;
|
|
2690
2447
|
};
|
|
2691
2448
|
}>>;
|
|
2692
|
-
locale?:
|
|
2693
|
-
migrations?:
|
|
2694
|
-
translations?:
|
|
2449
|
+
locale?: questpie202.LocaleConfig | undefined;
|
|
2450
|
+
migrations?: questpie202.Migration[] | undefined;
|
|
2451
|
+
translations?: questpie202.TranslationsConfig | undefined;
|
|
2695
2452
|
"~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;
|
|
2696
2453
|
}, "collections", {
|
|
2697
|
-
user:
|
|
2454
|
+
user: questpie202.CollectionBuilder<{
|
|
2698
2455
|
options: {
|
|
2699
2456
|
timestamps: true;
|
|
2700
2457
|
};
|
|
@@ -2711,21 +2468,21 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
2711
2468
|
};
|
|
2712
2469
|
localized: [];
|
|
2713
2470
|
virtuals: undefined;
|
|
2714
|
-
relations: Record<string,
|
|
2471
|
+
relations: Record<string, questpie202.RelationConfig>;
|
|
2715
2472
|
indexes: Record<string, any>;
|
|
2716
2473
|
title: "name";
|
|
2717
|
-
hooks:
|
|
2718
|
-
access:
|
|
2474
|
+
hooks: questpie202.CollectionHooks<any, any, any, any>;
|
|
2475
|
+
access: questpie202.CollectionAccess<any, any>;
|
|
2719
2476
|
functions: {
|
|
2720
|
-
[x: string]:
|
|
2477
|
+
[x: string]: questpie202.FunctionDefinition<any, any, any>;
|
|
2721
2478
|
};
|
|
2722
2479
|
searchable: undefined;
|
|
2723
2480
|
validation: undefined;
|
|
2724
2481
|
output: undefined;
|
|
2725
2482
|
upload: undefined;
|
|
2726
2483
|
}>;
|
|
2727
|
-
session:
|
|
2728
|
-
options:
|
|
2484
|
+
session: questpie202.CollectionBuilder<{
|
|
2485
|
+
options: questpie202.CollectionOptions;
|
|
2729
2486
|
name: "session";
|
|
2730
2487
|
fields: {
|
|
2731
2488
|
userId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
@@ -2737,21 +2494,21 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
2737
2494
|
};
|
|
2738
2495
|
localized: [];
|
|
2739
2496
|
virtuals: undefined;
|
|
2740
|
-
relations: Record<string,
|
|
2497
|
+
relations: Record<string, questpie202.RelationConfig>;
|
|
2741
2498
|
indexes: Record<string, any>;
|
|
2742
2499
|
title: "token";
|
|
2743
|
-
hooks:
|
|
2744
|
-
access:
|
|
2500
|
+
hooks: questpie202.CollectionHooks<any, any, any, any>;
|
|
2501
|
+
access: questpie202.CollectionAccess<any, any>;
|
|
2745
2502
|
functions: {
|
|
2746
|
-
[x: string]:
|
|
2503
|
+
[x: string]: questpie202.FunctionDefinition<any, any, any>;
|
|
2747
2504
|
};
|
|
2748
2505
|
searchable: undefined;
|
|
2749
2506
|
validation: undefined;
|
|
2750
2507
|
output: undefined;
|
|
2751
2508
|
upload: undefined;
|
|
2752
2509
|
}>;
|
|
2753
|
-
account:
|
|
2754
|
-
options:
|
|
2510
|
+
account: questpie202.CollectionBuilder<{
|
|
2511
|
+
options: questpie202.CollectionOptions;
|
|
2755
2512
|
name: "account";
|
|
2756
2513
|
fields: {
|
|
2757
2514
|
userId: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
@@ -2767,21 +2524,21 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
2767
2524
|
};
|
|
2768
2525
|
localized: [];
|
|
2769
2526
|
virtuals: undefined;
|
|
2770
|
-
relations: Record<string,
|
|
2527
|
+
relations: Record<string, questpie202.RelationConfig>;
|
|
2771
2528
|
indexes: Record<string, any>;
|
|
2772
2529
|
title: "providerId";
|
|
2773
|
-
hooks:
|
|
2774
|
-
access:
|
|
2530
|
+
hooks: questpie202.CollectionHooks<any, any, any, any>;
|
|
2531
|
+
access: questpie202.CollectionAccess<any, any>;
|
|
2775
2532
|
functions: {
|
|
2776
|
-
[x: string]:
|
|
2533
|
+
[x: string]: questpie202.FunctionDefinition<any, any, any>;
|
|
2777
2534
|
};
|
|
2778
2535
|
searchable: undefined;
|
|
2779
2536
|
validation: undefined;
|
|
2780
2537
|
output: undefined;
|
|
2781
2538
|
upload: undefined;
|
|
2782
2539
|
}>;
|
|
2783
|
-
verification:
|
|
2784
|
-
options:
|
|
2540
|
+
verification: questpie202.CollectionBuilder<{
|
|
2541
|
+
options: questpie202.CollectionOptions;
|
|
2785
2542
|
name: "verification";
|
|
2786
2543
|
fields: {
|
|
2787
2544
|
identifier: drizzle_orm91.NotNull<drizzle_orm_pg_core179.PgVarcharBuilder<[string, ...string[]]>>;
|
|
@@ -2790,20 +2547,20 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
2790
2547
|
};
|
|
2791
2548
|
localized: [];
|
|
2792
2549
|
virtuals: undefined;
|
|
2793
|
-
relations: Record<string,
|
|
2550
|
+
relations: Record<string, questpie202.RelationConfig>;
|
|
2794
2551
|
indexes: Record<string, any>;
|
|
2795
2552
|
title: "identifier";
|
|
2796
|
-
hooks:
|
|
2797
|
-
access:
|
|
2553
|
+
hooks: questpie202.CollectionHooks<any, any, any, any>;
|
|
2554
|
+
access: questpie202.CollectionAccess<any, any>;
|
|
2798
2555
|
functions: {
|
|
2799
|
-
[x: string]:
|
|
2556
|
+
[x: string]: questpie202.FunctionDefinition<any, any, any>;
|
|
2800
2557
|
};
|
|
2801
2558
|
searchable: undefined;
|
|
2802
2559
|
validation: undefined;
|
|
2803
2560
|
output: undefined;
|
|
2804
2561
|
upload: undefined;
|
|
2805
2562
|
}>;
|
|
2806
|
-
assets:
|
|
2563
|
+
assets: questpie202.CollectionBuilder<{
|
|
2807
2564
|
options: {
|
|
2808
2565
|
timestamps: true;
|
|
2809
2566
|
};
|
|
@@ -2822,14 +2579,14 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
2822
2579
|
};
|
|
2823
2580
|
localized: [];
|
|
2824
2581
|
virtuals: undefined;
|
|
2825
|
-
relations: Record<string,
|
|
2582
|
+
relations: Record<string, questpie202.RelationConfig>;
|
|
2826
2583
|
indexes: Record<string, any>;
|
|
2827
2584
|
title: "filename";
|
|
2828
2585
|
hooks: {
|
|
2829
2586
|
afterDelete: ({
|
|
2830
2587
|
data,
|
|
2831
2588
|
app
|
|
2832
|
-
}:
|
|
2589
|
+
}: questpie202.HookContext<{
|
|
2833
2590
|
width: number | null;
|
|
2834
2591
|
height: number | null;
|
|
2835
2592
|
alt: string | null;
|
|
@@ -2846,18 +2603,18 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
2846
2603
|
url: string;
|
|
2847
2604
|
}, never, "delete", any>) => Promise<void>;
|
|
2848
2605
|
};
|
|
2849
|
-
access:
|
|
2606
|
+
access: questpie202.CollectionAccess<any, any>;
|
|
2850
2607
|
functions: {
|
|
2851
|
-
[x: string]:
|
|
2608
|
+
[x: string]: questpie202.FunctionDefinition<any, any, any>;
|
|
2852
2609
|
};
|
|
2853
2610
|
searchable: undefined;
|
|
2854
2611
|
validation: undefined;
|
|
2855
|
-
output:
|
|
2612
|
+
output: questpie202.TypeMerge<{}, {
|
|
2856
2613
|
url: string;
|
|
2857
2614
|
}>;
|
|
2858
|
-
upload:
|
|
2615
|
+
upload: questpie202.UploadOptions;
|
|
2859
2616
|
}>;
|
|
2860
|
-
apikey:
|
|
2617
|
+
apikey: questpie202.CollectionBuilder<{
|
|
2861
2618
|
options: {
|
|
2862
2619
|
timestamps: true;
|
|
2863
2620
|
};
|
|
@@ -2884,20 +2641,20 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
2884
2641
|
};
|
|
2885
2642
|
localized: [];
|
|
2886
2643
|
virtuals: undefined;
|
|
2887
|
-
relations: Record<string,
|
|
2644
|
+
relations: Record<string, questpie202.RelationConfig>;
|
|
2888
2645
|
indexes: Record<string, any>;
|
|
2889
2646
|
title: "key";
|
|
2890
|
-
hooks:
|
|
2891
|
-
access:
|
|
2647
|
+
hooks: questpie202.CollectionHooks<any, any, any, any>;
|
|
2648
|
+
access: questpie202.CollectionAccess<any, any>;
|
|
2892
2649
|
functions: {
|
|
2893
|
-
[x: string]:
|
|
2650
|
+
[x: string]: questpie202.FunctionDefinition<any, any, any>;
|
|
2894
2651
|
};
|
|
2895
2652
|
searchable: undefined;
|
|
2896
2653
|
validation: undefined;
|
|
2897
2654
|
output: undefined;
|
|
2898
2655
|
upload: undefined;
|
|
2899
2656
|
}>;
|
|
2900
|
-
admin_saved_views:
|
|
2657
|
+
admin_saved_views: questpie202.CollectionBuilder<{
|
|
2901
2658
|
name: "admin_saved_views";
|
|
2902
2659
|
localized: [];
|
|
2903
2660
|
output: undefined;
|
|
@@ -2914,17 +2671,17 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
2914
2671
|
};
|
|
2915
2672
|
upload: undefined;
|
|
2916
2673
|
functions: {
|
|
2917
|
-
[x: string]:
|
|
2674
|
+
[x: string]: questpie202.FunctionDefinition<any, any, any>;
|
|
2918
2675
|
};
|
|
2919
|
-
hooks:
|
|
2676
|
+
hooks: questpie202.CollectionHooks<any, any, any, any>;
|
|
2920
2677
|
indexes: Record<string, any>;
|
|
2921
2678
|
searchable: undefined;
|
|
2922
2679
|
virtuals: undefined;
|
|
2923
|
-
relations: Record<string,
|
|
2924
|
-
access:
|
|
2680
|
+
relations: Record<string, questpie202.RelationConfig>;
|
|
2681
|
+
access: questpie202.CollectionAccess<any, any>;
|
|
2925
2682
|
validation: undefined;
|
|
2926
2683
|
}>;
|
|
2927
|
-
admin_preferences:
|
|
2684
|
+
admin_preferences: questpie202.CollectionBuilder<{
|
|
2928
2685
|
name: "admin_preferences";
|
|
2929
2686
|
localized: [];
|
|
2930
2687
|
output: undefined;
|
|
@@ -2939,32 +2696,32 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
2939
2696
|
};
|
|
2940
2697
|
upload: undefined;
|
|
2941
2698
|
functions: {
|
|
2942
|
-
[x: string]:
|
|
2699
|
+
[x: string]: questpie202.FunctionDefinition<any, any, any>;
|
|
2943
2700
|
};
|
|
2944
|
-
hooks:
|
|
2701
|
+
hooks: questpie202.CollectionHooks<any, any, any, any>;
|
|
2945
2702
|
indexes: drizzle_orm_pg_core179.IndexBuilder[];
|
|
2946
2703
|
searchable: undefined;
|
|
2947
2704
|
virtuals: undefined;
|
|
2948
|
-
relations: Record<string,
|
|
2949
|
-
access:
|
|
2705
|
+
relations: Record<string, questpie202.RelationConfig>;
|
|
2706
|
+
access: questpie202.CollectionAccess<any, any>;
|
|
2950
2707
|
validation: undefined;
|
|
2951
2708
|
}>;
|
|
2952
2709
|
}>, "functions", {
|
|
2953
|
-
mintPreviewToken:
|
|
2710
|
+
mintPreviewToken: questpie202.JsonFunctionDefinition<{
|
|
2954
2711
|
path: string;
|
|
2955
2712
|
ttlMs?: number | undefined;
|
|
2956
2713
|
}, {
|
|
2957
2714
|
token: string;
|
|
2958
2715
|
expiresAt: number;
|
|
2959
2716
|
}, any>;
|
|
2960
|
-
verifyPreviewToken:
|
|
2717
|
+
verifyPreviewToken: questpie202.JsonFunctionDefinition<{
|
|
2961
2718
|
token: string;
|
|
2962
2719
|
}, {
|
|
2963
2720
|
valid: boolean;
|
|
2964
2721
|
path?: string | undefined;
|
|
2965
2722
|
error?: string | undefined;
|
|
2966
2723
|
}, any>;
|
|
2967
|
-
getContentLocales:
|
|
2724
|
+
getContentLocales: questpie202.JsonFunctionDefinition<Record<string, never> | undefined, {
|
|
2968
2725
|
locales: {
|
|
2969
2726
|
code: string;
|
|
2970
2727
|
label?: string | undefined;
|
|
@@ -2974,10 +2731,10 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
2974
2731
|
defaultLocale: string;
|
|
2975
2732
|
fallbacks?: Record<string, string> | undefined;
|
|
2976
2733
|
}, any>;
|
|
2977
|
-
isSetupRequired:
|
|
2734
|
+
isSetupRequired: questpie202.JsonFunctionDefinition<Record<string, never>, {
|
|
2978
2735
|
required: boolean;
|
|
2979
2736
|
}, any>;
|
|
2980
|
-
createFirstAdmin:
|
|
2737
|
+
createFirstAdmin: questpie202.JsonFunctionDefinition<{
|
|
2981
2738
|
email: string;
|
|
2982
2739
|
password: string;
|
|
2983
2740
|
name: string;
|
|
@@ -2992,5 +2749,5 @@ declare const adminModule: questpie206.QuestpieBuilder<questpie206.SetProperty<q
|
|
|
2992
2749
|
}, any>;
|
|
2993
2750
|
}>>;
|
|
2994
2751
|
//#endregion
|
|
2995
|
-
export {
|
|
2996
|
-
//# sourceMappingURL=index-
|
|
2752
|
+
export { PreviewTokenPayload as a, verifyPreviewTokenDirect as c, GetAdminSessionOptions as d, RequireAdminAuthOptions as f, requireAdminAuth as h, setupFunctions as i, savedViewsCollection as l, isAdminUser as m, createFirstAdmin as n, createPreviewFunctions as o, getAdminSession as p, isSetupRequired as r, createPreviewTokenVerifier as s, adminModule as t, AuthSession as u };
|
|
2753
|
+
//# sourceMappingURL=index-CSdBA36M.d.mts.map
|