@questpie/admin 3.3.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -6
- package/dist/client/blocks/block-renderer.d.mts +2 -2
- package/dist/client/builder/admin-types.d.mts +3 -3
- package/dist/client/builder/types/action-types.d.mts +1 -1
- package/dist/client/builder/types/collection-types.d.mts +59 -2
- package/dist/client/modules/admin.d.mts +3 -0
- package/dist/client/modules/admin.mjs +3 -0
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/preview-banner.d.mts +2 -2
- package/dist/client/preview/preview-field.d.mts +4 -4
- package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
- package/dist/client/views/auth/auth-layout.d.mts +3 -3
- package/dist/client/views/auth/reset-password-form.d.mts +2 -2
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- package/dist/client/views/collection/list-view.mjs +830 -0
- package/dist/client/views/collection/outline.mjs +363 -0
- package/dist/client/views/collection/table-view.mjs +6 -3
- package/dist/client/views/layout/admin-layout.d.mts +15 -1
- package/dist/client/views/layout/admin-layout.mjs +95 -31
- package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
- package/dist/client/views/pages/dashboard-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
- package/dist/client/views/pages/invite-page.d.mts +2 -2
- package/dist/client/views/pages/login-page.d.mts +2 -2
- package/dist/client.d.mts +6 -6
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/factories.d.mts +21 -0
- package/dist/factories.mjs +11 -0
- package/dist/fields.d.mts +4 -0
- package/dist/fields.mjs +5 -0
- package/dist/index.d.mts +6 -6
- package/dist/modules/admin.d.mts +10 -0
- package/dist/modules/admin.mjs +9 -0
- package/dist/modules/audit.d.mts +5 -0
- package/dist/modules/audit.mjs +5 -0
- package/dist/server/adapters/index.d.mts +2 -0
- package/dist/server/adapters/nextjs.d.mts +1 -0
- package/dist/server/augmentation/form-layout.d.mts +57 -2
- package/dist/server/augmentation/index.d.mts +3 -1
- package/dist/server/augmentation/shell.d.mts +48 -0
- package/dist/server/augmentation.d.mts +2 -1
- package/dist/server/auth-helpers.d.mts +1 -0
- package/dist/server/codegen/admin-client-template.mjs +11 -4
- package/dist/server/fields/blocks.d.mts +9 -2
- package/dist/server/fields/blocks.mjs +1 -1
- package/dist/server/fields/index.d.mts +2 -2
- package/dist/server/fields/index.mjs +2 -2
- package/dist/server/fields/rich-text.d.mts +9 -2
- package/dist/server/fields/rich-text.mjs +1 -1
- package/dist/server/modules/admin/.generated/module.d.mts +24 -19
- package/dist/server/modules/admin/.generated/module.mjs +5 -1
- package/dist/server/modules/admin/.generated/registries.d.mts +6 -4
- package/dist/server/modules/admin/client/.generated/module.d.mts +70 -70
- package/dist/server/modules/admin/client/.generated/module.mjs +3 -1
- package/dist/server/modules/admin/client/views/collection-form.d.mts +6 -0
- package/dist/server/modules/admin/client/views/collection-table.d.mts +6 -0
- package/dist/server/modules/admin/client/views/global-form.d.mts +6 -0
- package/dist/server/modules/admin/client/views/list-view.d.mts +6 -0
- package/dist/server/modules/admin/client/views/list-view.mjs +10 -0
- package/dist/server/modules/admin/collections/account.d.mts +50 -50
- package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
- package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +14 -14
- package/dist/server/modules/admin/collections/verification.d.mts +23 -23
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +17 -0
- package/dist/server/modules/admin/index.d.mts +30 -31
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -17
- package/dist/server/modules/admin/routes/admin-config.mjs +21 -5
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/execute-action.mjs +18 -12
- package/dist/server/modules/admin/routes/i18n-helpers.d.mts +4 -0
- package/dist/server/modules/admin/routes/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/route-helpers.mjs +36 -1
- package/dist/server/modules/admin/routes/setup.d.mts +7 -14
- package/dist/server/modules/admin/routes/setup.mjs +16 -3
- package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
- package/dist/server/modules/admin/views/list-view.d.mts +8 -0
- package/dist/server/modules/admin/views/list-view.mjs +7 -0
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +27 -27
- package/dist/server/modules/audit/collections/audit-log.d.mts +7 -2
- package/dist/server/modules/audit/index.d.mts +1 -1
- package/dist/server/plugin.d.mts +1 -1
- package/dist/server/plugin.mjs +28 -28
- package/dist/server.d.mts +7 -4
- package/dist/server.mjs +7 -7
- package/package.json +13 -3
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
1
|
+
import * as questpie_shared34 from "questpie/shared";
|
|
2
|
+
import * as questpie212 from "questpie";
|
|
3
|
+
import * as questpie_src_server_modules_core_fields_email_js5 from "questpie/src/server/modules/core/fields/email.js";
|
|
4
|
+
import * as questpie_src_server_modules_core_fields_json_js5 from "questpie/src/server/modules/core/fields/json.js";
|
|
5
|
+
import * as drizzle_orm_pg_core51 from "drizzle-orm/pg-core";
|
|
6
|
+
import * as drizzle_orm33 from "drizzle-orm";
|
|
7
7
|
|
|
8
8
|
//#region src/server/modules/admin/collections/session.d.ts
|
|
9
|
-
declare const _default:
|
|
10
|
-
readonly text: typeof
|
|
11
|
-
readonly textarea: typeof
|
|
12
|
-
readonly email: typeof
|
|
13
|
-
readonly url: typeof
|
|
14
|
-
readonly number: typeof
|
|
15
|
-
readonly boolean: typeof
|
|
16
|
-
readonly date: typeof
|
|
17
|
-
readonly datetime: typeof
|
|
18
|
-
readonly time: typeof
|
|
19
|
-
readonly select: typeof
|
|
20
|
-
readonly upload: typeof
|
|
21
|
-
readonly relation: typeof
|
|
22
|
-
readonly object: typeof
|
|
23
|
-
readonly json: typeof
|
|
24
|
-
readonly from: typeof
|
|
9
|
+
declare const _default: questpie212.CollectionBuilder<questpie_shared34.Override<questpie212.EmptyCollectionState<"session", undefined, {
|
|
10
|
+
readonly text: typeof questpie212.text;
|
|
11
|
+
readonly textarea: typeof questpie212.textarea;
|
|
12
|
+
readonly email: typeof questpie_src_server_modules_core_fields_email_js5.email;
|
|
13
|
+
readonly url: typeof questpie212.url;
|
|
14
|
+
readonly number: typeof questpie212.number;
|
|
15
|
+
readonly boolean: typeof questpie212.boolean;
|
|
16
|
+
readonly date: typeof questpie212.date;
|
|
17
|
+
readonly datetime: typeof questpie212.datetime;
|
|
18
|
+
readonly time: typeof questpie212.time;
|
|
19
|
+
readonly select: typeof questpie212.select;
|
|
20
|
+
readonly upload: typeof questpie212.upload;
|
|
21
|
+
readonly relation: typeof questpie212.relation;
|
|
22
|
+
readonly object: typeof questpie212.object;
|
|
23
|
+
readonly json: typeof questpie_src_server_modules_core_fields_json_js5.json;
|
|
24
|
+
readonly from: typeof questpie212.from;
|
|
25
25
|
}>, {
|
|
26
26
|
name: "session";
|
|
27
27
|
fields: Record<string, any> & {
|
|
28
|
-
readonly userId:
|
|
29
|
-
readonly token:
|
|
30
|
-
readonly expiresAt:
|
|
31
|
-
readonly ipAddress:
|
|
32
|
-
readonly userAgent:
|
|
33
|
-
readonly impersonatedBy:
|
|
28
|
+
readonly userId: drizzle_orm33.NotNull<drizzle_orm_pg_core51.PgVarcharBuilder<[string, ...string[]]>>;
|
|
29
|
+
readonly token: drizzle_orm33.NotNull<drizzle_orm_pg_core51.PgVarcharBuilder<[string, ...string[]]>>;
|
|
30
|
+
readonly expiresAt: drizzle_orm33.NotNull<drizzle_orm_pg_core51.PgTimestampBuilder>;
|
|
31
|
+
readonly ipAddress: drizzle_orm_pg_core51.PgVarcharBuilder<[string, ...string[]]>;
|
|
32
|
+
readonly userAgent: drizzle_orm_pg_core51.PgVarcharBuilder<[string, ...string[]]>;
|
|
33
|
+
readonly impersonatedBy: drizzle_orm_pg_core51.PgVarcharBuilder<[string, ...string[]]>;
|
|
34
34
|
};
|
|
35
35
|
virtuals: undefined;
|
|
36
|
-
relations: Record<string,
|
|
36
|
+
relations: Record<string, questpie212.RelationConfig>;
|
|
37
37
|
indexes: Record<string, any>;
|
|
38
38
|
title: "token";
|
|
39
|
-
options:
|
|
39
|
+
options: questpie212.CollectionOptions & {
|
|
40
40
|
timestamps: true;
|
|
41
41
|
};
|
|
42
42
|
hooks: Record<string, any>;
|
|
43
43
|
access: Record<string, any>;
|
|
44
44
|
searchable: undefined;
|
|
45
45
|
fieldDefinitions: {
|
|
46
|
-
readonly userId:
|
|
46
|
+
readonly userId: questpie212.FieldWithMethods<Omit<questpie212.TextFieldState, "notNull" | "column"> & {
|
|
47
47
|
notNull: true;
|
|
48
|
-
column:
|
|
49
|
-
},
|
|
50
|
-
readonly token:
|
|
48
|
+
column: drizzle_orm33.NotNull<drizzle_orm_pg_core51.PgVarcharBuilder<[string, ...string[]]>>;
|
|
49
|
+
}, questpie212.TextFieldMethods>;
|
|
50
|
+
readonly token: questpie212.FieldWithMethods<Omit<questpie212.TextFieldState, "notNull" | "column"> & {
|
|
51
51
|
notNull: true;
|
|
52
|
-
column:
|
|
53
|
-
},
|
|
54
|
-
readonly expiresAt:
|
|
52
|
+
column: drizzle_orm33.NotNull<drizzle_orm_pg_core51.PgVarcharBuilder<[string, ...string[]]>>;
|
|
53
|
+
}, questpie212.TextFieldMethods>;
|
|
54
|
+
readonly expiresAt: questpie212.FieldWithMethods<Omit<questpie212.DatetimeFieldState, "notNull" | "column"> & {
|
|
55
55
|
notNull: true;
|
|
56
|
-
column:
|
|
57
|
-
},
|
|
58
|
-
readonly ipAddress:
|
|
59
|
-
readonly userAgent:
|
|
60
|
-
readonly impersonatedBy:
|
|
56
|
+
column: drizzle_orm33.NotNull<drizzle_orm_pg_core51.PgTimestampBuilder>;
|
|
57
|
+
}, questpie212.DatetimeFieldMethods>;
|
|
58
|
+
readonly ipAddress: questpie212.FieldWithMethods<questpie212.TextFieldState, questpie212.TextFieldMethods>;
|
|
59
|
+
readonly userAgent: questpie212.FieldWithMethods<questpie212.TextFieldState, questpie212.TextFieldMethods>;
|
|
60
|
+
readonly impersonatedBy: questpie212.FieldWithMethods<questpie212.TextFieldState, questpie212.TextFieldMethods>;
|
|
61
61
|
};
|
|
62
62
|
upload: undefined;
|
|
63
63
|
output: {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as questpie_shared52 from "questpie/shared";
|
|
2
|
-
import * as
|
|
2
|
+
import * as questpie408 from "questpie";
|
|
3
3
|
import * as drizzle_orm_pg_core119 from "drizzle-orm/pg-core";
|
|
4
4
|
import * as drizzle_orm71 from "drizzle-orm";
|
|
5
5
|
import * as questpie_src_server_fields_operators_builtin_js11 from "questpie/src/server/fields/operators/builtin.js";
|
|
@@ -18,7 +18,7 @@ import * as questpie_src_server_fields_operators_builtin_js11 from "questpie/src
|
|
|
18
18
|
* @see account.ts for explanation of the collection().merge().set() pattern.
|
|
19
19
|
* stateKey mapping: admin=".admin()", adminList=".list()", adminForm=".form()", adminActions=".actions()"
|
|
20
20
|
*/
|
|
21
|
-
declare const adminUserCollection:
|
|
21
|
+
declare const adminUserCollection: questpie408.CollectionBuilder<questpie_shared52.Override<{
|
|
22
22
|
name: "user";
|
|
23
23
|
fields: Record<string, never>;
|
|
24
24
|
localized: [];
|
|
@@ -49,7 +49,7 @@ declare const adminUserCollection: questpie406.CollectionBuilder<questpie_shared
|
|
|
49
49
|
readonly banExpires: drizzle_orm_pg_core119.PgTimestampBuilder;
|
|
50
50
|
};
|
|
51
51
|
virtuals: undefined;
|
|
52
|
-
relations: Record<string, never> & Record<string,
|
|
52
|
+
relations: Record<string, never> & Record<string, questpie408.RelationConfig>;
|
|
53
53
|
indexes: Record<string, never> & Record<string, any>;
|
|
54
54
|
title: "name";
|
|
55
55
|
options: Record<string, never> & {
|
|
@@ -59,7 +59,7 @@ declare const adminUserCollection: questpie406.CollectionBuilder<questpie_shared
|
|
|
59
59
|
access: Record<string, any>;
|
|
60
60
|
searchable: undefined;
|
|
61
61
|
fieldDefinitions: {
|
|
62
|
-
readonly name:
|
|
62
|
+
readonly name: questpie408.Field<Omit<questpie408.DefaultFieldState & {
|
|
63
63
|
type: "text";
|
|
64
64
|
data: string;
|
|
65
65
|
column: drizzle_orm_pg_core119.PgVarcharBuilder<[string, ...string[]]>;
|
|
@@ -70,7 +70,7 @@ declare const adminUserCollection: questpie406.CollectionBuilder<questpie_shared
|
|
|
70
70
|
notNull: true;
|
|
71
71
|
column: drizzle_orm71.NotNull<drizzle_orm_pg_core119.PgVarcharBuilder<[string, ...string[]]>>;
|
|
72
72
|
}>;
|
|
73
|
-
readonly email:
|
|
73
|
+
readonly email: questpie408.Field<Omit<questpie408.DefaultFieldState & {
|
|
74
74
|
type: "email";
|
|
75
75
|
data: string;
|
|
76
76
|
column: drizzle_orm_pg_core119.PgVarcharBuilder<[string, ...string[]]>;
|
|
@@ -83,7 +83,7 @@ declare const adminUserCollection: questpie406.CollectionBuilder<questpie_shared
|
|
|
83
83
|
notNull: true;
|
|
84
84
|
column: drizzle_orm71.NotNull<drizzle_orm_pg_core119.PgVarcharBuilder<[string, ...string[]]>>;
|
|
85
85
|
}>;
|
|
86
|
-
readonly emailVerified:
|
|
86
|
+
readonly emailVerified: questpie408.Field<Omit<questpie408.DefaultFieldState & {
|
|
87
87
|
type: "boolean";
|
|
88
88
|
data: boolean;
|
|
89
89
|
column: drizzle_orm_pg_core119.PgBooleanBuilder;
|
|
@@ -96,15 +96,15 @@ declare const adminUserCollection: questpie406.CollectionBuilder<questpie_shared
|
|
|
96
96
|
notNull: true;
|
|
97
97
|
column: drizzle_orm71.NotNull<drizzle_orm_pg_core119.PgBooleanBuilder>;
|
|
98
98
|
}>;
|
|
99
|
-
readonly image:
|
|
99
|
+
readonly image: questpie408.FieldWithMethods<questpie408.DefaultFieldState & {
|
|
100
100
|
type: "url";
|
|
101
101
|
data: string;
|
|
102
102
|
column: drizzle_orm_pg_core119.PgVarcharBuilder<[string, ...string[]]>;
|
|
103
103
|
operators: typeof questpie_src_server_fields_operators_builtin_js11.urlOps;
|
|
104
104
|
} & {
|
|
105
105
|
label: questpie_shared52.I18nText;
|
|
106
|
-
},
|
|
107
|
-
readonly avatar:
|
|
106
|
+
}, questpie408.UrlFieldMethods>;
|
|
107
|
+
readonly avatar: questpie408.Field<questpie408.DefaultFieldState & {
|
|
108
108
|
type: "upload";
|
|
109
109
|
data: string;
|
|
110
110
|
column: drizzle_orm_pg_core119.PgVarcharBuilder<[string, ...string[]]>;
|
|
@@ -114,7 +114,7 @@ declare const adminUserCollection: questpie406.CollectionBuilder<questpie_shared
|
|
|
114
114
|
} & {
|
|
115
115
|
label: questpie_shared52.I18nText;
|
|
116
116
|
}>;
|
|
117
|
-
readonly role:
|
|
117
|
+
readonly role: questpie408.Field<questpie408.DefaultFieldState & {
|
|
118
118
|
type: "select";
|
|
119
119
|
data: string;
|
|
120
120
|
column: drizzle_orm_pg_core119.PgVarcharBuilder<[string, ...string[]]>;
|
|
@@ -124,7 +124,7 @@ declare const adminUserCollection: questpie406.CollectionBuilder<questpie_shared
|
|
|
124
124
|
} & {
|
|
125
125
|
description: questpie_shared52.I18nText;
|
|
126
126
|
}>;
|
|
127
|
-
readonly banned:
|
|
127
|
+
readonly banned: questpie408.Field<Omit<questpie408.DefaultFieldState & {
|
|
128
128
|
type: "boolean";
|
|
129
129
|
data: boolean;
|
|
130
130
|
column: drizzle_orm_pg_core119.PgBooleanBuilder;
|
|
@@ -137,7 +137,7 @@ declare const adminUserCollection: questpie406.CollectionBuilder<questpie_shared
|
|
|
137
137
|
hasDefault: true;
|
|
138
138
|
column: drizzle_orm71.HasDefault<drizzle_orm_pg_core119.PgBooleanBuilder>;
|
|
139
139
|
}>;
|
|
140
|
-
readonly banReason:
|
|
140
|
+
readonly banReason: questpie408.Field<questpie408.DefaultFieldState & {
|
|
141
141
|
type: "text";
|
|
142
142
|
data: string;
|
|
143
143
|
column: drizzle_orm_pg_core119.PgVarcharBuilder<[string, ...string[]]>;
|
|
@@ -145,7 +145,7 @@ declare const adminUserCollection: questpie406.CollectionBuilder<questpie_shared
|
|
|
145
145
|
} & {
|
|
146
146
|
label: questpie_shared52.I18nText;
|
|
147
147
|
}>;
|
|
148
|
-
readonly banExpires:
|
|
148
|
+
readonly banExpires: questpie408.FieldWithMethods<questpie408.DefaultFieldState & {
|
|
149
149
|
type: "datetime";
|
|
150
150
|
data: Date;
|
|
151
151
|
column: drizzle_orm_pg_core119.PgTimestampBuilder;
|
|
@@ -154,7 +154,7 @@ declare const adminUserCollection: questpie406.CollectionBuilder<questpie_shared
|
|
|
154
154
|
label: questpie_shared52.I18nText;
|
|
155
155
|
} & {
|
|
156
156
|
description: questpie_shared52.I18nText;
|
|
157
|
-
},
|
|
157
|
+
}, questpie408.DatetimeFieldMethods>;
|
|
158
158
|
};
|
|
159
159
|
upload: undefined;
|
|
160
160
|
output: {};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import * as questpie_shared67 from "questpie/shared";
|
|
2
|
-
import * as
|
|
2
|
+
import * as questpie430 from "questpie";
|
|
3
3
|
import * as questpie_src_server_modules_core_fields_email_js9 from "questpie/src/server/modules/core/fields/email.js";
|
|
4
4
|
import * as questpie_src_server_modules_core_fields_json_js9 from "questpie/src/server/modules/core/fields/json.js";
|
|
5
5
|
import * as drizzle_orm_pg_core141 from "drizzle-orm/pg-core";
|
|
6
6
|
import * as drizzle_orm79 from "drizzle-orm";
|
|
7
7
|
|
|
8
8
|
//#region src/server/modules/admin/collections/verification.d.ts
|
|
9
|
-
declare const _default:
|
|
10
|
-
readonly text: typeof
|
|
11
|
-
readonly textarea: typeof
|
|
9
|
+
declare const _default: questpie430.CollectionBuilder<questpie_shared67.Override<questpie430.EmptyCollectionState<"verification", undefined, {
|
|
10
|
+
readonly text: typeof questpie430.text;
|
|
11
|
+
readonly textarea: typeof questpie430.textarea;
|
|
12
12
|
readonly email: typeof questpie_src_server_modules_core_fields_email_js9.email;
|
|
13
|
-
readonly url: typeof
|
|
14
|
-
readonly number: typeof
|
|
15
|
-
readonly boolean: typeof
|
|
16
|
-
readonly date: typeof
|
|
17
|
-
readonly datetime: typeof
|
|
18
|
-
readonly time: typeof
|
|
19
|
-
readonly select: typeof
|
|
20
|
-
readonly upload: typeof
|
|
21
|
-
readonly relation: typeof
|
|
22
|
-
readonly object: typeof
|
|
13
|
+
readonly url: typeof questpie430.url;
|
|
14
|
+
readonly number: typeof questpie430.number;
|
|
15
|
+
readonly boolean: typeof questpie430.boolean;
|
|
16
|
+
readonly date: typeof questpie430.date;
|
|
17
|
+
readonly datetime: typeof questpie430.datetime;
|
|
18
|
+
readonly time: typeof questpie430.time;
|
|
19
|
+
readonly select: typeof questpie430.select;
|
|
20
|
+
readonly upload: typeof questpie430.upload;
|
|
21
|
+
readonly relation: typeof questpie430.relation;
|
|
22
|
+
readonly object: typeof questpie430.object;
|
|
23
23
|
readonly json: typeof questpie_src_server_modules_core_fields_json_js9.json;
|
|
24
|
-
readonly from: typeof
|
|
24
|
+
readonly from: typeof questpie430.from;
|
|
25
25
|
}>, {
|
|
26
26
|
name: "verification";
|
|
27
27
|
fields: Record<string, any> & {
|
|
@@ -30,28 +30,28 @@ declare const _default: questpie428.CollectionBuilder<questpie_shared67.Override
|
|
|
30
30
|
readonly expiresAt: drizzle_orm79.NotNull<drizzle_orm_pg_core141.PgTimestampBuilder>;
|
|
31
31
|
};
|
|
32
32
|
virtuals: undefined;
|
|
33
|
-
relations: Record<string,
|
|
33
|
+
relations: Record<string, questpie430.RelationConfig>;
|
|
34
34
|
indexes: Record<string, any>;
|
|
35
35
|
title: "identifier";
|
|
36
|
-
options:
|
|
36
|
+
options: questpie430.CollectionOptions & {
|
|
37
37
|
timestamps: true;
|
|
38
38
|
};
|
|
39
39
|
hooks: Record<string, any>;
|
|
40
40
|
access: Record<string, any>;
|
|
41
41
|
searchable: undefined;
|
|
42
42
|
fieldDefinitions: {
|
|
43
|
-
readonly identifier:
|
|
43
|
+
readonly identifier: questpie430.FieldWithMethods<Omit<questpie430.TextFieldState, "notNull" | "column"> & {
|
|
44
44
|
notNull: true;
|
|
45
45
|
column: drizzle_orm79.NotNull<drizzle_orm_pg_core141.PgVarcharBuilder<[string, ...string[]]>>;
|
|
46
|
-
},
|
|
47
|
-
readonly value:
|
|
46
|
+
}, questpie430.TextFieldMethods>;
|
|
47
|
+
readonly value: questpie430.FieldWithMethods<Omit<questpie430.TextFieldState, "notNull" | "column"> & {
|
|
48
48
|
notNull: true;
|
|
49
49
|
column: drizzle_orm79.NotNull<drizzle_orm_pg_core141.PgVarcharBuilder<[string, ...string[]]>>;
|
|
50
|
-
},
|
|
51
|
-
readonly expiresAt:
|
|
50
|
+
}, questpie430.TextFieldMethods>;
|
|
51
|
+
readonly expiresAt: questpie430.FieldWithMethods<Omit<questpie430.DatetimeFieldState, "notNull" | "column"> & {
|
|
52
52
|
notNull: true;
|
|
53
53
|
column: drizzle_orm79.NotNull<drizzle_orm_pg_core141.PgTimestampBuilder>;
|
|
54
|
-
},
|
|
54
|
+
}, questpie430.DatetimeFieldMethods>;
|
|
55
55
|
};
|
|
56
56
|
upload: undefined;
|
|
57
57
|
output: {};
|
|
@@ -53,6 +53,22 @@ const sidebarSectionSchema = z.lazy(() => z.object({
|
|
|
53
53
|
sections: z.array(sidebarSectionSchema).optional()
|
|
54
54
|
}));
|
|
55
55
|
const sidebarConfigSchema = z.object({ sections: z.array(sidebarSectionSchema) });
|
|
56
|
+
const adminShellRouteRulesSchema = z.object({
|
|
57
|
+
include: z.array(z.string()).optional(),
|
|
58
|
+
exclude: z.array(z.string()).optional(),
|
|
59
|
+
match: z.enum(["prefix", "exact"]).optional()
|
|
60
|
+
});
|
|
61
|
+
const adminShellRailSchema = z.object({
|
|
62
|
+
component: componentReferenceSchema,
|
|
63
|
+
placement: z.enum(["left", "right"]).optional(),
|
|
64
|
+
width: z.union([z.number(), z.string()]).optional(),
|
|
65
|
+
minWidth: z.union([z.number(), z.string()]).optional(),
|
|
66
|
+
maxWidth: z.union([z.number(), z.string()]).optional(),
|
|
67
|
+
hiddenOnMobile: z.boolean().optional(),
|
|
68
|
+
routes: adminShellRouteRulesSchema.optional(),
|
|
69
|
+
className: z.string().optional()
|
|
70
|
+
});
|
|
71
|
+
const adminShellConfigSchema = z.object({ secondaryRail: adminShellRailSchema.optional() });
|
|
56
72
|
const workflowMetaSchema = z.object({
|
|
57
73
|
enabled: z.boolean(),
|
|
58
74
|
initialStage: z.string(),
|
|
@@ -111,6 +127,7 @@ const brandingConfigSchema = z.object({
|
|
|
111
127
|
const adminConfigDTOSchema = z.object({
|
|
112
128
|
dashboard: dashboardConfigSchema.optional(),
|
|
113
129
|
sidebar: sidebarConfigSchema.optional(),
|
|
130
|
+
shell: adminShellConfigSchema.optional(),
|
|
114
131
|
branding: brandingConfigSchema.optional(),
|
|
115
132
|
blocks: z.record(z.string(), z.record(z.string(), z.any())).optional(),
|
|
116
133
|
collections: z.record(z.string(), collectionMetaSchema).optional(),
|
|
@@ -10,7 +10,6 @@ import "./index.mjs";
|
|
|
10
10
|
import * as zod0 from "zod";
|
|
11
11
|
import * as questpie0 from "questpie";
|
|
12
12
|
import * as better_auth0 from "better-auth";
|
|
13
|
-
import * as better_call0 from "better-call";
|
|
14
13
|
import * as better_auth_plugins0 from "better-auth/plugins";
|
|
15
14
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
16
15
|
import * as questpie_src_server_modules_core_fields_email_js0 from "questpie/src/server/modules/core/fields/email.js";
|
|
@@ -168,18 +167,18 @@ declare const adminModule: {
|
|
|
168
167
|
hooks: {
|
|
169
168
|
after: {
|
|
170
169
|
matcher(context: better_auth0.HookEndpointContext): boolean;
|
|
171
|
-
handler: (inputContext:
|
|
170
|
+
handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<better_auth_plugins0.SessionWithImpersonatedBy[] | undefined>;
|
|
172
171
|
}[];
|
|
173
172
|
};
|
|
174
173
|
endpoints: {
|
|
175
|
-
setRole:
|
|
174
|
+
setRole: better_auth0.StrictEndpoint<"/admin/set-role", {
|
|
176
175
|
method: "POST";
|
|
177
176
|
body: zod0.ZodObject<{
|
|
178
177
|
userId: zod0.ZodCoercedString<unknown>;
|
|
179
178
|
role: zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>;
|
|
180
179
|
}, zod_v4_core0.$strip>;
|
|
181
180
|
requireHeaders: true;
|
|
182
|
-
use: ((inputContext:
|
|
181
|
+
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
183
182
|
session: {
|
|
184
183
|
user: better_auth_plugins0.UserWithRole;
|
|
185
184
|
session: {
|
|
@@ -227,12 +226,12 @@ declare const adminModule: {
|
|
|
227
226
|
}, {
|
|
228
227
|
user: better_auth_plugins0.UserWithRole;
|
|
229
228
|
}>;
|
|
230
|
-
getUser:
|
|
229
|
+
getUser: better_auth0.StrictEndpoint<"/admin/get-user", {
|
|
231
230
|
method: "GET";
|
|
232
231
|
query: zod0.ZodObject<{
|
|
233
232
|
id: zod0.ZodString;
|
|
234
233
|
}, zod_v4_core0.$strip>;
|
|
235
|
-
use: ((inputContext:
|
|
234
|
+
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
236
235
|
session: {
|
|
237
236
|
user: better_auth_plugins0.UserWithRole;
|
|
238
237
|
session: {
|
|
@@ -272,7 +271,7 @@ declare const adminModule: {
|
|
|
272
271
|
};
|
|
273
272
|
};
|
|
274
273
|
}, better_auth_plugins0.UserWithRole>;
|
|
275
|
-
createUser:
|
|
274
|
+
createUser: better_auth0.StrictEndpoint<"/admin/create-user", {
|
|
276
275
|
method: "POST";
|
|
277
276
|
body: zod0.ZodObject<{
|
|
278
277
|
email: zod0.ZodString;
|
|
@@ -317,13 +316,13 @@ declare const adminModule: {
|
|
|
317
316
|
}, {
|
|
318
317
|
user: better_auth_plugins0.UserWithRole;
|
|
319
318
|
}>;
|
|
320
|
-
adminUpdateUser:
|
|
319
|
+
adminUpdateUser: better_auth0.StrictEndpoint<"/admin/update-user", {
|
|
321
320
|
method: "POST";
|
|
322
321
|
body: zod0.ZodObject<{
|
|
323
322
|
userId: zod0.ZodCoercedString<unknown>;
|
|
324
323
|
data: zod0.ZodRecord<zod0.ZodAny, zod0.ZodAny>;
|
|
325
324
|
}, zod_v4_core0.$strip>;
|
|
326
|
-
use: ((inputContext:
|
|
325
|
+
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
327
326
|
session: {
|
|
328
327
|
user: better_auth_plugins0.UserWithRole;
|
|
329
328
|
session: {
|
|
@@ -363,9 +362,9 @@ declare const adminModule: {
|
|
|
363
362
|
};
|
|
364
363
|
};
|
|
365
364
|
}, better_auth_plugins0.UserWithRole>;
|
|
366
|
-
listUsers:
|
|
365
|
+
listUsers: better_auth0.StrictEndpoint<"/admin/list-users", {
|
|
367
366
|
method: "GET";
|
|
368
|
-
use: ((inputContext:
|
|
367
|
+
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
369
368
|
session: {
|
|
370
369
|
user: better_auth_plugins0.UserWithRole;
|
|
371
370
|
session: {
|
|
@@ -455,9 +454,9 @@ declare const adminModule: {
|
|
|
455
454
|
users: better_auth_plugins0.UserWithRole[];
|
|
456
455
|
total: number;
|
|
457
456
|
}>;
|
|
458
|
-
listUserSessions:
|
|
457
|
+
listUserSessions: better_auth0.StrictEndpoint<"/admin/list-user-sessions", {
|
|
459
458
|
method: "POST";
|
|
460
|
-
use: ((inputContext:
|
|
459
|
+
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
461
460
|
session: {
|
|
462
461
|
user: better_auth_plugins0.UserWithRole;
|
|
463
462
|
session: {
|
|
@@ -505,12 +504,12 @@ declare const adminModule: {
|
|
|
505
504
|
}, {
|
|
506
505
|
sessions: better_auth_plugins0.SessionWithImpersonatedBy[];
|
|
507
506
|
}>;
|
|
508
|
-
unbanUser:
|
|
507
|
+
unbanUser: better_auth0.StrictEndpoint<"/admin/unban-user", {
|
|
509
508
|
method: "POST";
|
|
510
509
|
body: zod0.ZodObject<{
|
|
511
510
|
userId: zod0.ZodCoercedString<unknown>;
|
|
512
511
|
}, zod_v4_core0.$strip>;
|
|
513
|
-
use: ((inputContext:
|
|
512
|
+
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
514
513
|
session: {
|
|
515
514
|
user: better_auth_plugins0.UserWithRole;
|
|
516
515
|
session: {
|
|
@@ -552,14 +551,14 @@ declare const adminModule: {
|
|
|
552
551
|
}, {
|
|
553
552
|
user: better_auth_plugins0.UserWithRole;
|
|
554
553
|
}>;
|
|
555
|
-
banUser:
|
|
554
|
+
banUser: better_auth0.StrictEndpoint<"/admin/ban-user", {
|
|
556
555
|
method: "POST";
|
|
557
556
|
body: zod0.ZodObject<{
|
|
558
557
|
userId: zod0.ZodCoercedString<unknown>;
|
|
559
558
|
banReason: zod0.ZodOptional<zod0.ZodString>;
|
|
560
559
|
banExpiresIn: zod0.ZodOptional<zod0.ZodNumber>;
|
|
561
560
|
}, zod_v4_core0.$strip>;
|
|
562
|
-
use: ((inputContext:
|
|
561
|
+
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
563
562
|
session: {
|
|
564
563
|
user: better_auth_plugins0.UserWithRole;
|
|
565
564
|
session: {
|
|
@@ -601,12 +600,12 @@ declare const adminModule: {
|
|
|
601
600
|
}, {
|
|
602
601
|
user: better_auth_plugins0.UserWithRole;
|
|
603
602
|
}>;
|
|
604
|
-
impersonateUser:
|
|
603
|
+
impersonateUser: better_auth0.StrictEndpoint<"/admin/impersonate-user", {
|
|
605
604
|
method: "POST";
|
|
606
605
|
body: zod0.ZodObject<{
|
|
607
606
|
userId: zod0.ZodCoercedString<unknown>;
|
|
608
607
|
}, zod_v4_core0.$strip>;
|
|
609
|
-
use: ((inputContext:
|
|
608
|
+
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
610
609
|
session: {
|
|
611
610
|
user: better_auth_plugins0.UserWithRole;
|
|
612
611
|
session: {
|
|
@@ -661,7 +660,7 @@ declare const adminModule: {
|
|
|
661
660
|
};
|
|
662
661
|
user: better_auth_plugins0.UserWithRole;
|
|
663
662
|
}>;
|
|
664
|
-
stopImpersonating:
|
|
663
|
+
stopImpersonating: better_auth0.StrictEndpoint<"/admin/stop-impersonating", {
|
|
665
664
|
method: "POST";
|
|
666
665
|
requireHeaders: true;
|
|
667
666
|
}, {
|
|
@@ -685,12 +684,12 @@ declare const adminModule: {
|
|
|
685
684
|
image?: string | null | undefined;
|
|
686
685
|
} & Record<string, any>;
|
|
687
686
|
}>;
|
|
688
|
-
revokeUserSession:
|
|
687
|
+
revokeUserSession: better_auth0.StrictEndpoint<"/admin/revoke-user-session", {
|
|
689
688
|
method: "POST";
|
|
690
689
|
body: zod0.ZodObject<{
|
|
691
690
|
sessionToken: zod0.ZodString;
|
|
692
691
|
}, zod_v4_core0.$strip>;
|
|
693
|
-
use: ((inputContext:
|
|
692
|
+
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
694
693
|
session: {
|
|
695
694
|
user: better_auth_plugins0.UserWithRole;
|
|
696
695
|
session: {
|
|
@@ -732,12 +731,12 @@ declare const adminModule: {
|
|
|
732
731
|
}, {
|
|
733
732
|
success: boolean;
|
|
734
733
|
}>;
|
|
735
|
-
revokeUserSessions:
|
|
734
|
+
revokeUserSessions: better_auth0.StrictEndpoint<"/admin/revoke-user-sessions", {
|
|
736
735
|
method: "POST";
|
|
737
736
|
body: zod0.ZodObject<{
|
|
738
737
|
userId: zod0.ZodCoercedString<unknown>;
|
|
739
738
|
}, zod_v4_core0.$strip>;
|
|
740
|
-
use: ((inputContext:
|
|
739
|
+
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
741
740
|
session: {
|
|
742
741
|
user: better_auth_plugins0.UserWithRole;
|
|
743
742
|
session: {
|
|
@@ -779,12 +778,12 @@ declare const adminModule: {
|
|
|
779
778
|
}, {
|
|
780
779
|
success: boolean;
|
|
781
780
|
}>;
|
|
782
|
-
removeUser:
|
|
781
|
+
removeUser: better_auth0.StrictEndpoint<"/admin/remove-user", {
|
|
783
782
|
method: "POST";
|
|
784
783
|
body: zod0.ZodObject<{
|
|
785
784
|
userId: zod0.ZodCoercedString<unknown>;
|
|
786
785
|
}, zod_v4_core0.$strip>;
|
|
787
|
-
use: ((inputContext:
|
|
786
|
+
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
788
787
|
session: {
|
|
789
788
|
user: better_auth_plugins0.UserWithRole;
|
|
790
789
|
session: {
|
|
@@ -826,13 +825,13 @@ declare const adminModule: {
|
|
|
826
825
|
}, {
|
|
827
826
|
success: boolean;
|
|
828
827
|
}>;
|
|
829
|
-
setUserPassword:
|
|
828
|
+
setUserPassword: better_auth0.StrictEndpoint<"/admin/set-user-password", {
|
|
830
829
|
method: "POST";
|
|
831
830
|
body: zod0.ZodObject<{
|
|
832
831
|
newPassword: zod0.ZodString;
|
|
833
832
|
userId: zod0.ZodCoercedString<unknown>;
|
|
834
833
|
}, zod_v4_core0.$strip>;
|
|
835
|
-
use: ((inputContext:
|
|
834
|
+
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
836
835
|
session: {
|
|
837
836
|
user: better_auth_plugins0.UserWithRole;
|
|
838
837
|
session: {
|
|
@@ -874,7 +873,7 @@ declare const adminModule: {
|
|
|
874
873
|
}, {
|
|
875
874
|
status: boolean;
|
|
876
875
|
}>;
|
|
877
|
-
userHasPermission:
|
|
876
|
+
userHasPermission: better_auth0.StrictEndpoint<"/admin/has-permission", {
|
|
878
877
|
method: "POST";
|
|
879
878
|
body: zod0.ZodIntersection<zod0.ZodObject<{
|
|
880
879
|
userId: zod0.ZodOptional<zod0.ZodCoercedString<unknown>>;
|
|
@@ -1007,7 +1006,7 @@ declare const adminModule: {
|
|
|
1007
1006
|
hooks: {
|
|
1008
1007
|
before: {
|
|
1009
1008
|
matcher(context: better_auth0.HookEndpointContext): boolean;
|
|
1010
|
-
handler: (inputContext:
|
|
1009
|
+
handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
1011
1010
|
context: {
|
|
1012
1011
|
headers: Headers;
|
|
1013
1012
|
};
|
|
@@ -1015,7 +1014,7 @@ declare const adminModule: {
|
|
|
1015
1014
|
}[];
|
|
1016
1015
|
after: {
|
|
1017
1016
|
matcher(context: better_auth0.HookEndpointContext): true;
|
|
1018
|
-
handler: (inputContext:
|
|
1017
|
+
handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
|
|
1019
1018
|
}[];
|
|
1020
1019
|
};
|
|
1021
1020
|
options: better_auth_plugins0.BearerOptions | undefined;
|
|
@@ -1,28 +1,13 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as questpie406 from "questpie";
|
|
2
2
|
|
|
3
3
|
//#region src/server/modules/admin/routes/admin-config.d.ts
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* Admin Config Functions
|
|
7
|
-
*
|
|
8
|
-
* Provides server-defined admin configuration (dashboard, sidebar,
|
|
9
|
-
* collection/global metadata) to the client via RPC.
|
|
10
|
-
*
|
|
11
|
-
* Filters results by the current user's read access.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* // Client usage
|
|
16
|
-
* const config = await client.routes.getAdminConfig({});
|
|
17
|
-
* // { dashboard: {...}, sidebar: {...}, collections: {...}, globals: {...} }
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
5
|
/**
|
|
21
6
|
* Admin config route handlers.
|
|
22
7
|
* Registered via module routes and exposed through the fetch handler.
|
|
23
8
|
*/
|
|
24
9
|
declare const adminConfigFunctions: {
|
|
25
|
-
readonly getAdminConfig:
|
|
10
|
+
readonly getAdminConfig: questpie406.JsonRouteDefinition<Record<string, never> | undefined, any, questpie406.JsonRouteParams>;
|
|
26
11
|
};
|
|
27
12
|
//#endregion
|
|
28
13
|
export { adminConfigFunctions };
|