@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.
@@ -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 questpie206 from "questpie";
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: questpie206.CollectionBuilder<questpie206.SetProperty<questpie206.TypeMerge<questpie206.UnsetProperty<questpie206.CollectionBuilderState & {
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: questpie206.CollectionHooks<any, any, any>;
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: questpie206.JsonFunctionDefinition<{
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: questpie206.JsonFunctionDefinition<{
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: questpie206.JsonFunctionDefinition<Record<string, never>, {
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: questpie206.JsonFunctionDefinition<{
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: questpie206.JsonFunctionDefinition<Record<string, never>, {
331
+ readonly isSetupRequired: questpie202.JsonFunctionDefinition<Record<string, never>, {
575
332
  required: boolean;
576
333
  }, any>;
577
- readonly createFirstAdmin: questpie206.JsonFunctionDefinition<{
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: questpie206.QuestpieBuilder<questpie206.SetProperty<questpie206.SetProperty<{
395
+ declare const adminModule: questpie202.QuestpieBuilder<questpie202.SetProperty<questpie202.SetProperty<{
639
396
  name: "questpie-admin";
640
- collections: questpie206.TypeMerge<questpie206.UnsetProperty<{}, keyof TOtherCollections>, {
641
- assets: questpie206.CollectionBuilder<{
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, questpie206.RelationConfig>;
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
- }: questpie206.HookContext<{
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: questpie206.CollectionAccess<any, any>;
441
+ access: questpie202.CollectionAccess<any, any>;
685
442
  functions: {
686
- [x: string]: questpie206.FunctionDefinition<any, any, any>;
443
+ [x: string]: questpie202.FunctionDefinition<any, any, any>;
687
444
  };
688
445
  searchable: undefined;
689
446
  validation: undefined;
690
- output: questpie206.TypeMerge<{}, {
447
+ output: questpie202.TypeMerge<{}, {
691
448
  url: string;
692
449
  }>;
693
- upload: questpie206.UploadOptions;
450
+ upload: questpie202.UploadOptions;
694
451
  }>;
695
- user: questpie206.CollectionBuilder<{
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, questpie206.RelationConfig>;
469
+ relations: Record<string, questpie202.RelationConfig>;
713
470
  indexes: Record<string, any>;
714
471
  title: "name";
715
- hooks: questpie206.CollectionHooks<any, any, any, any>;
716
- access: questpie206.CollectionAccess<any, any>;
472
+ hooks: questpie202.CollectionHooks<any, any, any, any>;
473
+ access: questpie202.CollectionAccess<any, any>;
717
474
  functions: {
718
- [x: string]: questpie206.FunctionDefinition<any, any, any>;
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: questpie206.CollectionBuilder<{
726
- options: questpie206.CollectionOptions;
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, questpie206.RelationConfig>;
495
+ relations: Record<string, questpie202.RelationConfig>;
739
496
  indexes: Record<string, any>;
740
497
  title: "token";
741
- hooks: questpie206.CollectionHooks<any, any, any, any>;
742
- access: questpie206.CollectionAccess<any, any>;
498
+ hooks: questpie202.CollectionHooks<any, any, any, any>;
499
+ access: questpie202.CollectionAccess<any, any>;
743
500
  functions: {
744
- [x: string]: questpie206.FunctionDefinition<any, any, any>;
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: questpie206.CollectionBuilder<{
752
- options: questpie206.CollectionOptions;
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, questpie206.RelationConfig>;
525
+ relations: Record<string, questpie202.RelationConfig>;
769
526
  indexes: Record<string, any>;
770
527
  title: "providerId";
771
- hooks: questpie206.CollectionHooks<any, any, any, any>;
772
- access: questpie206.CollectionAccess<any, any>;
528
+ hooks: questpie202.CollectionHooks<any, any, any, any>;
529
+ access: questpie202.CollectionAccess<any, any>;
773
530
  functions: {
774
- [x: string]: questpie206.FunctionDefinition<any, any, any>;
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: questpie206.CollectionBuilder<{
782
- options: questpie206.CollectionOptions;
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, questpie206.RelationConfig>;
548
+ relations: Record<string, questpie202.RelationConfig>;
792
549
  indexes: Record<string, any>;
793
550
  title: "identifier";
794
- hooks: questpie206.CollectionHooks<any, any, any, any>;
795
- access: questpie206.CollectionAccess<any, any>;
551
+ hooks: questpie202.CollectionHooks<any, any, any, any>;
552
+ access: questpie202.CollectionAccess<any, any>;
796
553
  functions: {
797
- [x: string]: questpie206.FunctionDefinition<any, any, any>;
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: questpie206.CollectionBuilder<{
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, questpie206.RelationConfig>;
588
+ relations: Record<string, questpie202.RelationConfig>;
832
589
  indexes: Record<string, any>;
833
590
  title: "key";
834
- hooks: questpie206.CollectionHooks<any, any, any, any>;
835
- access: questpie206.CollectionAccess<any, any>;
591
+ hooks: questpie202.CollectionHooks<any, any, any, any>;
592
+ access: questpie202.CollectionAccess<any, any>;
836
593
  functions: {
837
- [x: string]: questpie206.FunctionDefinition<any, any, any>;
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: 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<{}, {
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?: questpie206.LocaleConfig | undefined;
2693
- migrations?: questpie206.Migration[] | undefined;
2694
- translations?: questpie206.TranslationsConfig | undefined;
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: questpie206.CollectionBuilder<{
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, questpie206.RelationConfig>;
2471
+ relations: Record<string, questpie202.RelationConfig>;
2715
2472
  indexes: Record<string, any>;
2716
2473
  title: "name";
2717
- hooks: questpie206.CollectionHooks<any, any, any, any>;
2718
- access: questpie206.CollectionAccess<any, any>;
2474
+ hooks: questpie202.CollectionHooks<any, any, any, any>;
2475
+ access: questpie202.CollectionAccess<any, any>;
2719
2476
  functions: {
2720
- [x: string]: questpie206.FunctionDefinition<any, any, any>;
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: questpie206.CollectionBuilder<{
2728
- options: questpie206.CollectionOptions;
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, questpie206.RelationConfig>;
2497
+ relations: Record<string, questpie202.RelationConfig>;
2741
2498
  indexes: Record<string, any>;
2742
2499
  title: "token";
2743
- hooks: questpie206.CollectionHooks<any, any, any, any>;
2744
- access: questpie206.CollectionAccess<any, any>;
2500
+ hooks: questpie202.CollectionHooks<any, any, any, any>;
2501
+ access: questpie202.CollectionAccess<any, any>;
2745
2502
  functions: {
2746
- [x: string]: questpie206.FunctionDefinition<any, any, any>;
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: questpie206.CollectionBuilder<{
2754
- options: questpie206.CollectionOptions;
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, questpie206.RelationConfig>;
2527
+ relations: Record<string, questpie202.RelationConfig>;
2771
2528
  indexes: Record<string, any>;
2772
2529
  title: "providerId";
2773
- hooks: questpie206.CollectionHooks<any, any, any, any>;
2774
- access: questpie206.CollectionAccess<any, any>;
2530
+ hooks: questpie202.CollectionHooks<any, any, any, any>;
2531
+ access: questpie202.CollectionAccess<any, any>;
2775
2532
  functions: {
2776
- [x: string]: questpie206.FunctionDefinition<any, any, any>;
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: questpie206.CollectionBuilder<{
2784
- options: questpie206.CollectionOptions;
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, questpie206.RelationConfig>;
2550
+ relations: Record<string, questpie202.RelationConfig>;
2794
2551
  indexes: Record<string, any>;
2795
2552
  title: "identifier";
2796
- hooks: questpie206.CollectionHooks<any, any, any, any>;
2797
- access: questpie206.CollectionAccess<any, any>;
2553
+ hooks: questpie202.CollectionHooks<any, any, any, any>;
2554
+ access: questpie202.CollectionAccess<any, any>;
2798
2555
  functions: {
2799
- [x: string]: questpie206.FunctionDefinition<any, any, any>;
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: questpie206.CollectionBuilder<{
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, questpie206.RelationConfig>;
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
- }: questpie206.HookContext<{
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: questpie206.CollectionAccess<any, any>;
2606
+ access: questpie202.CollectionAccess<any, any>;
2850
2607
  functions: {
2851
- [x: string]: questpie206.FunctionDefinition<any, any, any>;
2608
+ [x: string]: questpie202.FunctionDefinition<any, any, any>;
2852
2609
  };
2853
2610
  searchable: undefined;
2854
2611
  validation: undefined;
2855
- output: questpie206.TypeMerge<{}, {
2612
+ output: questpie202.TypeMerge<{}, {
2856
2613
  url: string;
2857
2614
  }>;
2858
- upload: questpie206.UploadOptions;
2615
+ upload: questpie202.UploadOptions;
2859
2616
  }>;
2860
- apikey: questpie206.CollectionBuilder<{
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, questpie206.RelationConfig>;
2644
+ relations: Record<string, questpie202.RelationConfig>;
2888
2645
  indexes: Record<string, any>;
2889
2646
  title: "key";
2890
- hooks: questpie206.CollectionHooks<any, any, any, any>;
2891
- access: questpie206.CollectionAccess<any, any>;
2647
+ hooks: questpie202.CollectionHooks<any, any, any, any>;
2648
+ access: questpie202.CollectionAccess<any, any>;
2892
2649
  functions: {
2893
- [x: string]: questpie206.FunctionDefinition<any, any, any>;
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: questpie206.CollectionBuilder<{
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]: questpie206.FunctionDefinition<any, any, any>;
2674
+ [x: string]: questpie202.FunctionDefinition<any, any, any>;
2918
2675
  };
2919
- hooks: questpie206.CollectionHooks<any, any, any, any>;
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, questpie206.RelationConfig>;
2924
- access: questpie206.CollectionAccess<any, any>;
2680
+ relations: Record<string, questpie202.RelationConfig>;
2681
+ access: questpie202.CollectionAccess<any, any>;
2925
2682
  validation: undefined;
2926
2683
  }>;
2927
- admin_preferences: questpie206.CollectionBuilder<{
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]: questpie206.FunctionDefinition<any, any, any>;
2699
+ [x: string]: questpie202.FunctionDefinition<any, any, any>;
2943
2700
  };
2944
- hooks: questpie206.CollectionHooks<any, any, any, any>;
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, questpie206.RelationConfig>;
2949
- access: questpie206.CollectionAccess<any, any>;
2705
+ relations: Record<string, questpie202.RelationConfig>;
2706
+ access: questpie202.CollectionAccess<any, any>;
2950
2707
  validation: undefined;
2951
2708
  }>;
2952
2709
  }>, "functions", {
2953
- mintPreviewToken: questpie206.JsonFunctionDefinition<{
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: questpie206.JsonFunctionDefinition<{
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: questpie206.JsonFunctionDefinition<Record<string, never> | undefined, {
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: questpie206.JsonFunctionDefinition<Record<string, never>, {
2734
+ isSetupRequired: questpie202.JsonFunctionDefinition<Record<string, never>, {
2978
2735
  required: boolean;
2979
2736
  }, any>;
2980
- createFirstAdmin: questpie206.JsonFunctionDefinition<{
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 { 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
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