@questpie/admin 3.0.5 → 3.0.7
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 +99 -1
- package/dist/client/builder/types/field-types.d.mts +11 -0
- package/dist/client/components/brand-logo.d.mts +25 -0
- package/dist/client/components/brand-logo.mjs +174 -0
- package/dist/client/create-admin-client.d.mts +7 -0
- package/dist/client/create-admin-client.mjs +25 -0
- package/dist/client/hooks/use-brand.d.mts +22 -0
- package/dist/client/hooks/use-brand.mjs +52 -0
- package/dist/client/runtime/index.mjs +1 -1
- package/dist/client/runtime/provider.d.mts +4 -0
- package/dist/client/runtime/provider.mjs +38 -8
- package/dist/client/styles/base.css +4 -0
- package/dist/client/types/admin-config.d.mts +24 -0
- package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
- package/dist/client/views/auth/auth-layout.d.mts +8 -3
- package/dist/client/views/auth/auth-layout.mjs +116 -102
- package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
- package/dist/client/views/auth/login-form.d.mts +2 -2
- 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/auto-form-fields.mjs +2 -0
- package/dist/client/views/collection/field-renderer.mjs +3 -2
- package/dist/client/views/globals/global-form-view.mjs +908 -863
- package/dist/client/views/layout/admin-sidebar.mjs +153 -141
- package/dist/client/views/pages/accept-invite-page.mjs +122 -144
- package/dist/client/views/pages/forgot-password-page.mjs +22 -30
- package/dist/client/views/pages/invite-page.mjs +24 -33
- package/dist/client/views/pages/login-page.d.mts +2 -2
- package/dist/client/views/pages/login-page.mjs +24 -32
- package/dist/client/views/pages/reset-password-page.d.mts +2 -2
- package/dist/client/views/pages/reset-password-page.mjs +77 -92
- package/dist/client/views/pages/setup-page.mjs +31 -39
- package/dist/client.d.mts +6 -2
- package/dist/client.mjs +5 -2
- package/dist/index.d.mts +6 -2
- package/dist/index.mjs +5 -2
- package/dist/server/augmentation/dashboard.d.mts +23 -5
- package/dist/server/augmentation/form-layout.d.mts +10 -0
- package/dist/server/augmentation/index.d.mts +1 -1
- package/dist/server/augmentation.d.mts +1 -1
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +32 -32
- package/dist/server/modules/admin/collections/verification.d.mts +36 -36
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +19 -1
- package/dist/server/modules/admin/index.d.mts +1 -1
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/preview.mjs +1 -1
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/setup.d.mts +7 -7
- package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +23 -23
- package/dist/server.d.mts +4 -4
- package/dist/shared/preview-utils.d.mts +34 -1
- package/dist/shared/preview-utils.mjs +79 -1
- package/dist/shared.d.mts +2 -2
- package/dist/shared.mjs +2 -2
- package/package.json +3 -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_shared42 from "questpie/shared";
|
|
2
|
+
import * as questpie375 from "questpie";
|
|
3
|
+
import * as questpie_src_server_modules_core_fields_email_js8 from "questpie/src/server/modules/core/fields/email.js";
|
|
4
|
+
import * as questpie_src_server_modules_core_fields_json_js8 from "questpie/src/server/modules/core/fields/json.js";
|
|
5
|
+
import * as drizzle_orm_pg_core106 from "drizzle-orm/pg-core";
|
|
6
|
+
import * as drizzle_orm65 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: questpie375.CollectionBuilder<questpie_shared42.Override<questpie375.EmptyCollectionState<"session", undefined, {
|
|
10
|
+
readonly text: typeof questpie375.text;
|
|
11
|
+
readonly textarea: typeof questpie375.textarea;
|
|
12
|
+
readonly email: typeof questpie_src_server_modules_core_fields_email_js8.email;
|
|
13
|
+
readonly url: typeof questpie375.url;
|
|
14
|
+
readonly number: typeof questpie375.number;
|
|
15
|
+
readonly boolean: typeof questpie375.boolean;
|
|
16
|
+
readonly date: typeof questpie375.date;
|
|
17
|
+
readonly datetime: typeof questpie375.datetime;
|
|
18
|
+
readonly time: typeof questpie375.time;
|
|
19
|
+
readonly select: typeof questpie375.select;
|
|
20
|
+
readonly upload: typeof questpie375.upload;
|
|
21
|
+
readonly relation: typeof questpie375.relation;
|
|
22
|
+
readonly object: typeof questpie375.object;
|
|
23
|
+
readonly json: typeof questpie_src_server_modules_core_fields_json_js8.json;
|
|
24
|
+
readonly from: typeof questpie375.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_orm65.NotNull<drizzle_orm_pg_core106.PgVarcharBuilder<[string, ...string[]]>>;
|
|
29
|
+
readonly token: drizzle_orm65.NotNull<drizzle_orm_pg_core106.PgVarcharBuilder<[string, ...string[]]>>;
|
|
30
|
+
readonly expiresAt: drizzle_orm65.NotNull<drizzle_orm_pg_core106.PgTimestampBuilder>;
|
|
31
|
+
readonly ipAddress: drizzle_orm_pg_core106.PgVarcharBuilder<[string, ...string[]]>;
|
|
32
|
+
readonly userAgent: drizzle_orm_pg_core106.PgVarcharBuilder<[string, ...string[]]>;
|
|
33
|
+
readonly impersonatedBy: drizzle_orm_pg_core106.PgVarcharBuilder<[string, ...string[]]>;
|
|
34
34
|
};
|
|
35
35
|
virtuals: undefined;
|
|
36
|
-
relations: Record<string,
|
|
36
|
+
relations: Record<string, questpie375.RelationConfig>;
|
|
37
37
|
indexes: Record<string, any>;
|
|
38
38
|
title: "token";
|
|
39
|
-
options:
|
|
39
|
+
options: questpie375.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: questpie375.FieldWithMethods<Omit<questpie375.TextFieldState, "notNull" | "column"> & {
|
|
47
47
|
notNull: true;
|
|
48
|
-
column:
|
|
49
|
-
},
|
|
50
|
-
readonly token:
|
|
48
|
+
column: drizzle_orm65.NotNull<drizzle_orm_pg_core106.PgVarcharBuilder<[string, ...string[]]>>;
|
|
49
|
+
}, questpie375.TextFieldMethods>;
|
|
50
|
+
readonly token: questpie375.FieldWithMethods<Omit<questpie375.TextFieldState, "notNull" | "column"> & {
|
|
51
51
|
notNull: true;
|
|
52
|
-
column:
|
|
53
|
-
},
|
|
54
|
-
readonly expiresAt:
|
|
52
|
+
column: drizzle_orm65.NotNull<drizzle_orm_pg_core106.PgVarcharBuilder<[string, ...string[]]>>;
|
|
53
|
+
}, questpie375.TextFieldMethods>;
|
|
54
|
+
readonly expiresAt: questpie375.FieldWithMethods<Omit<questpie375.DatetimeFieldState, "notNull" | "column"> & {
|
|
55
55
|
notNull: true;
|
|
56
|
-
column:
|
|
57
|
-
},
|
|
58
|
-
readonly ipAddress:
|
|
59
|
-
readonly userAgent:
|
|
60
|
-
readonly impersonatedBy:
|
|
56
|
+
column: drizzle_orm65.NotNull<drizzle_orm_pg_core106.PgTimestampBuilder>;
|
|
57
|
+
}, questpie375.DatetimeFieldMethods>;
|
|
58
|
+
readonly ipAddress: questpie375.FieldWithMethods<questpie375.TextFieldState, questpie375.TextFieldMethods>;
|
|
59
|
+
readonly userAgent: questpie375.FieldWithMethods<questpie375.TextFieldState, questpie375.TextFieldMethods>;
|
|
60
|
+
readonly impersonatedBy: questpie375.FieldWithMethods<questpie375.TextFieldState, questpie375.TextFieldMethods>;
|
|
61
61
|
};
|
|
62
62
|
upload: undefined;
|
|
63
63
|
output: {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
1
|
+
import * as questpie_shared43 from "questpie/shared";
|
|
2
|
+
import * as questpie410 from "questpie";
|
|
3
|
+
import * as drizzle_orm_pg_core115 from "drizzle-orm/pg-core";
|
|
4
|
+
import * as drizzle_orm71 from "drizzle-orm";
|
|
5
5
|
import * as questpie_src_server_fields_operators_builtin_js7 from "questpie/src/server/fields/operators/builtin.js";
|
|
6
6
|
|
|
7
7
|
//#region src/server/modules/admin/collections/user.d.ts
|
|
@@ -18,7 +18,7 @@ import * as questpie_src_server_fields_operators_builtin_js7 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: questpie410.CollectionBuilder<questpie_shared43.Override<{
|
|
22
22
|
name: "user";
|
|
23
23
|
fields: Record<string, never>;
|
|
24
24
|
localized: [];
|
|
@@ -38,18 +38,18 @@ declare const adminUserCollection: questpie373.CollectionBuilder<questpie_shared
|
|
|
38
38
|
}, {
|
|
39
39
|
name: "user";
|
|
40
40
|
fields: Record<string, never> & {
|
|
41
|
-
readonly name:
|
|
42
|
-
readonly email:
|
|
43
|
-
readonly emailVerified:
|
|
44
|
-
readonly image:
|
|
45
|
-
readonly avatar:
|
|
46
|
-
readonly role:
|
|
47
|
-
readonly banned:
|
|
48
|
-
readonly banReason:
|
|
49
|
-
readonly banExpires:
|
|
41
|
+
readonly name: drizzle_orm71.NotNull<drizzle_orm_pg_core115.PgVarcharBuilder<[string, ...string[]]>>;
|
|
42
|
+
readonly email: drizzle_orm71.NotNull<drizzle_orm_pg_core115.PgVarcharBuilder<[string, ...string[]]>>;
|
|
43
|
+
readonly emailVerified: drizzle_orm71.NotNull<drizzle_orm_pg_core115.PgBooleanBuilder>;
|
|
44
|
+
readonly image: drizzle_orm_pg_core115.PgVarcharBuilder<[string, ...string[]]>;
|
|
45
|
+
readonly avatar: drizzle_orm_pg_core115.PgVarcharBuilder<[string, ...string[]]>;
|
|
46
|
+
readonly role: drizzle_orm_pg_core115.PgVarcharBuilder<[string, ...string[]]>;
|
|
47
|
+
readonly banned: drizzle_orm71.HasDefault<drizzle_orm_pg_core115.PgBooleanBuilder>;
|
|
48
|
+
readonly banReason: drizzle_orm_pg_core115.PgVarcharBuilder<[string, ...string[]]>;
|
|
49
|
+
readonly banExpires: drizzle_orm_pg_core115.PgTimestampBuilder;
|
|
50
50
|
};
|
|
51
51
|
virtuals: undefined;
|
|
52
|
-
relations: Record<string, never> & Record<string,
|
|
52
|
+
relations: Record<string, never> & Record<string, questpie410.RelationConfig>;
|
|
53
53
|
indexes: Record<string, never> & Record<string, any>;
|
|
54
54
|
title: "name";
|
|
55
55
|
options: Record<string, never> & {
|
|
@@ -59,36 +59,36 @@ declare const adminUserCollection: questpie373.CollectionBuilder<questpie_shared
|
|
|
59
59
|
access: Record<string, any>;
|
|
60
60
|
searchable: undefined;
|
|
61
61
|
fieldDefinitions: {
|
|
62
|
-
readonly name:
|
|
62
|
+
readonly name: questpie410.FieldWithMethods<Omit<questpie410.TextFieldState, "notNull" | "column"> & {
|
|
63
63
|
notNull: true;
|
|
64
|
-
column:
|
|
65
|
-
},
|
|
66
|
-
readonly email:
|
|
64
|
+
column: drizzle_orm71.NotNull<drizzle_orm_pg_core115.PgVarcharBuilder<[string, ...string[]]>>;
|
|
65
|
+
}, questpie410.TextFieldMethods>;
|
|
66
|
+
readonly email: questpie410.FieldWithMethods<Omit<questpie410.EmailFieldState, "notNull" | "column"> & {
|
|
67
67
|
notNull: true;
|
|
68
|
-
column:
|
|
69
|
-
},
|
|
70
|
-
readonly emailVerified:
|
|
68
|
+
column: drizzle_orm71.NotNull<drizzle_orm_pg_core115.PgVarcharBuilder<[string, ...string[]]>>;
|
|
69
|
+
}, questpie410.EmailFieldMethods>;
|
|
70
|
+
readonly emailVerified: questpie410.Field<Omit<questpie410.BooleanFieldState, "notNull" | "column"> & {
|
|
71
71
|
notNull: true;
|
|
72
|
-
column:
|
|
72
|
+
column: drizzle_orm71.NotNull<drizzle_orm_pg_core115.PgBooleanBuilder>;
|
|
73
73
|
}>;
|
|
74
|
-
readonly image:
|
|
75
|
-
readonly avatar:
|
|
74
|
+
readonly image: questpie410.FieldWithMethods<questpie410.UrlFieldState, questpie410.UrlFieldMethods>;
|
|
75
|
+
readonly avatar: questpie410.Field<questpie410.DefaultFieldState & {
|
|
76
76
|
type: "upload";
|
|
77
77
|
data: string;
|
|
78
|
-
column:
|
|
78
|
+
column: drizzle_orm_pg_core115.PgVarcharBuilder<[string, ...string[]]>;
|
|
79
79
|
operators: typeof questpie_src_server_fields_operators_builtin_js7.belongsToOps;
|
|
80
80
|
relationTo: "assets";
|
|
81
81
|
relationKind: "one";
|
|
82
82
|
} & {
|
|
83
|
-
label:
|
|
83
|
+
label: questpie_shared43.I18nText;
|
|
84
84
|
}>;
|
|
85
|
-
readonly role:
|
|
86
|
-
readonly banned:
|
|
85
|
+
readonly role: questpie410.FieldWithMethods<questpie410.TextFieldState, questpie410.TextFieldMethods>;
|
|
86
|
+
readonly banned: questpie410.Field<Omit<questpie410.BooleanFieldState, "column" | "hasDefault"> & {
|
|
87
87
|
hasDefault: true;
|
|
88
|
-
column:
|
|
88
|
+
column: drizzle_orm71.HasDefault<drizzle_orm_pg_core115.PgBooleanBuilder>;
|
|
89
89
|
}>;
|
|
90
|
-
readonly banReason:
|
|
91
|
-
readonly banExpires:
|
|
90
|
+
readonly banReason: questpie410.FieldWithMethods<questpie410.TextFieldState, questpie410.TextFieldMethods>;
|
|
91
|
+
readonly banExpires: questpie410.FieldWithMethods<questpie410.DatetimeFieldState, questpie410.DatetimeFieldMethods>;
|
|
92
92
|
};
|
|
93
93
|
upload: undefined;
|
|
94
94
|
output: {};
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
1
|
+
import * as questpie_shared45 from "questpie/shared";
|
|
2
|
+
import * as questpie436 from "questpie";
|
|
3
|
+
import * as questpie_src_server_modules_core_fields_email_js9 from "questpie/src/server/modules/core/fields/email.js";
|
|
4
|
+
import * as questpie_src_server_modules_core_fields_json_js9 from "questpie/src/server/modules/core/fields/json.js";
|
|
5
|
+
import * as drizzle_orm_pg_core129 from "drizzle-orm/pg-core";
|
|
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
|
|
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: questpie436.CollectionBuilder<questpie_shared45.Override<questpie436.EmptyCollectionState<"verification", undefined, {
|
|
10
|
+
readonly text: typeof questpie436.text;
|
|
11
|
+
readonly textarea: typeof questpie436.textarea;
|
|
12
|
+
readonly email: typeof questpie_src_server_modules_core_fields_email_js9.email;
|
|
13
|
+
readonly url: typeof questpie436.url;
|
|
14
|
+
readonly number: typeof questpie436.number;
|
|
15
|
+
readonly boolean: typeof questpie436.boolean;
|
|
16
|
+
readonly date: typeof questpie436.date;
|
|
17
|
+
readonly datetime: typeof questpie436.datetime;
|
|
18
|
+
readonly time: typeof questpie436.time;
|
|
19
|
+
readonly select: typeof questpie436.select;
|
|
20
|
+
readonly upload: typeof questpie436.upload;
|
|
21
|
+
readonly relation: typeof questpie436.relation;
|
|
22
|
+
readonly object: typeof questpie436.object;
|
|
23
|
+
readonly json: typeof questpie_src_server_modules_core_fields_json_js9.json;
|
|
24
|
+
readonly from: typeof questpie436.from;
|
|
25
25
|
}>, {
|
|
26
26
|
name: "verification";
|
|
27
27
|
fields: Record<string, any> & {
|
|
28
|
-
readonly identifier:
|
|
29
|
-
readonly value:
|
|
30
|
-
readonly expiresAt:
|
|
28
|
+
readonly identifier: drizzle_orm79.NotNull<drizzle_orm_pg_core129.PgVarcharBuilder<[string, ...string[]]>>;
|
|
29
|
+
readonly value: drizzle_orm79.NotNull<drizzle_orm_pg_core129.PgVarcharBuilder<[string, ...string[]]>>;
|
|
30
|
+
readonly expiresAt: drizzle_orm79.NotNull<drizzle_orm_pg_core129.PgTimestampBuilder>;
|
|
31
31
|
};
|
|
32
32
|
virtuals: undefined;
|
|
33
|
-
relations: Record<string,
|
|
33
|
+
relations: Record<string, questpie436.RelationConfig>;
|
|
34
34
|
indexes: Record<string, any>;
|
|
35
35
|
title: "identifier";
|
|
36
|
-
options:
|
|
36
|
+
options: questpie436.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: questpie436.FieldWithMethods<Omit<questpie436.TextFieldState, "notNull" | "column"> & {
|
|
44
44
|
notNull: true;
|
|
45
|
-
column:
|
|
46
|
-
},
|
|
47
|
-
readonly value:
|
|
45
|
+
column: drizzle_orm79.NotNull<drizzle_orm_pg_core129.PgVarcharBuilder<[string, ...string[]]>>;
|
|
46
|
+
}, questpie436.TextFieldMethods>;
|
|
47
|
+
readonly value: questpie436.FieldWithMethods<Omit<questpie436.TextFieldState, "notNull" | "column"> & {
|
|
48
48
|
notNull: true;
|
|
49
|
-
column:
|
|
50
|
-
},
|
|
51
|
-
readonly expiresAt:
|
|
49
|
+
column: drizzle_orm79.NotNull<drizzle_orm_pg_core129.PgVarcharBuilder<[string, ...string[]]>>;
|
|
50
|
+
}, questpie436.TextFieldMethods>;
|
|
51
|
+
readonly expiresAt: questpie436.FieldWithMethods<Omit<questpie436.DatetimeFieldState, "notNull" | "column"> & {
|
|
52
52
|
notNull: true;
|
|
53
|
-
column:
|
|
54
|
-
},
|
|
53
|
+
column: drizzle_orm79.NotNull<drizzle_orm_pg_core129.PgTimestampBuilder>;
|
|
54
|
+
}, questpie436.DatetimeFieldMethods>;
|
|
55
55
|
};
|
|
56
56
|
upload: undefined;
|
|
57
57
|
output: {};
|
|
@@ -86,6 +86,24 @@ const dashboardConfigSchema = z.object({
|
|
|
86
86
|
actions: z.array(z.any()).optional(),
|
|
87
87
|
items: z.array(z.record(z.string(), z.any())).optional()
|
|
88
88
|
});
|
|
89
|
+
const brandLogoSchema = z.union([
|
|
90
|
+
z.string(),
|
|
91
|
+
z.object({
|
|
92
|
+
src: z.string(),
|
|
93
|
+
srcDark: z.string().optional(),
|
|
94
|
+
alt: z.string().optional(),
|
|
95
|
+
width: z.number().optional(),
|
|
96
|
+
height: z.number().optional()
|
|
97
|
+
}),
|
|
98
|
+
componentReferenceSchema
|
|
99
|
+
]);
|
|
100
|
+
const i18nTextSchema = z.union([z.string(), z.record(z.string(), z.string())]);
|
|
101
|
+
const brandingConfigSchema = z.object({
|
|
102
|
+
name: i18nTextSchema.optional(),
|
|
103
|
+
logo: brandLogoSchema.optional(),
|
|
104
|
+
tagline: i18nTextSchema.optional(),
|
|
105
|
+
favicon: z.string().optional()
|
|
106
|
+
});
|
|
89
107
|
/**
|
|
90
108
|
* Zod schema for the complete AdminConfigDTO.
|
|
91
109
|
* Can be used as the outputSchema for the getAdminConfig route.
|
|
@@ -93,7 +111,7 @@ const dashboardConfigSchema = z.object({
|
|
|
93
111
|
const adminConfigDTOSchema = z.object({
|
|
94
112
|
dashboard: dashboardConfigSchema.optional(),
|
|
95
113
|
sidebar: sidebarConfigSchema.optional(),
|
|
96
|
-
branding:
|
|
114
|
+
branding: brandingConfigSchema.optional(),
|
|
97
115
|
blocks: z.record(z.string(), z.record(z.string(), z.any())).optional(),
|
|
98
116
|
collections: z.record(z.string(), collectionMetaSchema).optional(),
|
|
99
117
|
globals: z.record(z.string(), collectionMetaSchema).optional(),
|
|
@@ -928,7 +928,7 @@ declare const adminModule: {
|
|
|
928
928
|
$Infer: {
|
|
929
929
|
body: {
|
|
930
930
|
permissions: {
|
|
931
|
-
readonly user?: ("
|
|
931
|
+
readonly user?: ("create" | "delete" | "update" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "get")[] | undefined;
|
|
932
932
|
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
933
933
|
};
|
|
934
934
|
} & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as questpie373 from "questpie";
|
|
2
2
|
|
|
3
3
|
//#region src/server/modules/admin/routes/admin-config.d.ts
|
|
4
4
|
|
|
@@ -22,7 +22,7 @@ import * as questpie425 from "questpie";
|
|
|
22
22
|
* Registered via module routes and exposed through the fetch handler.
|
|
23
23
|
*/
|
|
24
24
|
declare const adminConfigFunctions: {
|
|
25
|
-
readonly getAdminConfig:
|
|
25
|
+
readonly getAdminConfig: questpie373.JsonRouteDefinition<Record<string, never> | undefined, any, questpie373.JsonRouteParams>;
|
|
26
26
|
};
|
|
27
27
|
//#endregion
|
|
28
28
|
export { adminConfigFunctions };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ServerActionDefinition, ServerActionResult } from "../../../augmentation/actions.mjs";
|
|
2
2
|
import "../../../augmentation.mjs";
|
|
3
3
|
import { App } from "./route-helpers.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as questpie133 from "questpie";
|
|
5
5
|
|
|
6
6
|
//#region src/server/modules/admin/routes/execute-action.d.ts
|
|
7
7
|
|
|
@@ -56,37 +56,37 @@ declare function executeAction(app: App, request: ExecuteActionRequest, session?
|
|
|
56
56
|
* });
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
|
-
declare const executeActionFn:
|
|
59
|
+
declare const executeActionFn: questpie133.JsonRouteDefinition<{
|
|
60
60
|
collection: string;
|
|
61
61
|
actionId: string;
|
|
62
62
|
itemId?: string | undefined;
|
|
63
63
|
itemIds?: string[] | undefined;
|
|
64
64
|
data?: Record<string, unknown> | undefined;
|
|
65
65
|
locale?: string | undefined;
|
|
66
|
-
}, any,
|
|
66
|
+
}, any, questpie133.JsonRouteParams>;
|
|
67
67
|
/**
|
|
68
68
|
* Get actions configuration for a collection.
|
|
69
69
|
* Returns action definitions without handlers for client rendering.
|
|
70
70
|
*/
|
|
71
|
-
declare const getActionsConfigFn:
|
|
71
|
+
declare const getActionsConfigFn: questpie133.JsonRouteDefinition<{
|
|
72
72
|
collection: string;
|
|
73
|
-
}, any,
|
|
73
|
+
}, any, questpie133.JsonRouteParams>;
|
|
74
74
|
/**
|
|
75
75
|
* QUESTPIE functions for action execution.
|
|
76
76
|
* These are registered on the `adminModule`.
|
|
77
77
|
*/
|
|
78
78
|
declare const actionFunctions: {
|
|
79
|
-
executeAction:
|
|
79
|
+
executeAction: questpie133.JsonRouteDefinition<{
|
|
80
80
|
collection: string;
|
|
81
81
|
actionId: string;
|
|
82
82
|
itemId?: string | undefined;
|
|
83
83
|
itemIds?: string[] | undefined;
|
|
84
84
|
data?: Record<string, unknown> | undefined;
|
|
85
85
|
locale?: string | undefined;
|
|
86
|
-
}, any,
|
|
87
|
-
getActionsConfig:
|
|
86
|
+
}, any, questpie133.JsonRouteParams>;
|
|
87
|
+
getActionsConfig: questpie133.JsonRouteDefinition<{
|
|
88
88
|
collection: string;
|
|
89
|
-
}, any,
|
|
89
|
+
}, any, questpie133.JsonRouteParams>;
|
|
90
90
|
};
|
|
91
91
|
//#endregion
|
|
92
92
|
export { ExecuteActionRequest, ExecuteActionResponse, actionFunctions, executeAction, executeActionFn, getActionsConfig, getActionsConfigFn };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as questpie141 from "questpie";
|
|
2
2
|
|
|
3
3
|
//#region src/server/modules/admin/routes/preview.d.ts
|
|
4
4
|
|
|
@@ -21,13 +21,13 @@ interface PreviewTokenPayload {
|
|
|
21
21
|
* @returns Object with preview functions
|
|
22
22
|
*/
|
|
23
23
|
declare function createPreviewFunctions(secret: string): {
|
|
24
|
-
mintPreviewToken:
|
|
24
|
+
mintPreviewToken: questpie141.JsonRouteDefinition<{
|
|
25
25
|
path: string;
|
|
26
26
|
ttlMs?: number | undefined;
|
|
27
|
-
}, any,
|
|
28
|
-
verifyPreviewToken:
|
|
27
|
+
}, any, questpie141.JsonRouteParams>;
|
|
28
|
+
verifyPreviewToken: questpie141.JsonRouteDefinition<{
|
|
29
29
|
token: string;
|
|
30
|
-
}, any,
|
|
30
|
+
}, any, questpie141.JsonRouteParams>;
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
33
|
* Verify a preview token without RPC.
|
|
@@ -63,18 +63,18 @@ declare function createPreviewTokenVerifier(secret?: string): (token: string) =>
|
|
|
63
63
|
* Used by the `adminModule` to register preview RPC functions.
|
|
64
64
|
*/
|
|
65
65
|
declare const previewFunctions: {
|
|
66
|
-
getPreviewUrl:
|
|
66
|
+
getPreviewUrl: questpie141.JsonRouteDefinition<{
|
|
67
67
|
collection: string;
|
|
68
68
|
record: Record<string, unknown>;
|
|
69
69
|
locale?: string | undefined;
|
|
70
|
-
}, any,
|
|
71
|
-
mintPreviewToken:
|
|
70
|
+
}, any, questpie141.JsonRouteParams>;
|
|
71
|
+
mintPreviewToken: questpie141.JsonRouteDefinition<{
|
|
72
72
|
path: string;
|
|
73
73
|
ttlMs?: number | undefined;
|
|
74
|
-
}, any,
|
|
75
|
-
verifyPreviewToken:
|
|
74
|
+
}, any, questpie141.JsonRouteParams>;
|
|
75
|
+
verifyPreviewToken: questpie141.JsonRouteDefinition<{
|
|
76
76
|
token: string;
|
|
77
|
-
}, any,
|
|
77
|
+
}, any, questpie141.JsonRouteParams>;
|
|
78
78
|
};
|
|
79
79
|
//#endregion
|
|
80
80
|
export { PreviewTokenPayload, createPreviewFunctions, createPreviewTokenVerifier, previewFunctions, verifyPreviewTokenDirect };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { getPreviewSecret } from "../../../../shared/preview-utils.mjs";
|
|
1
2
|
import { getApp, getCollectionState, getLocale, getSession } from "./route-helpers.mjs";
|
|
2
3
|
import { translateAdminMessage } from "./i18n-helpers.mjs";
|
|
3
|
-
import { getPreviewSecret } from "../../../../shared/preview-utils.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { ApiError, route } from "questpie";
|
|
6
6
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as questpie101 from "questpie";
|
|
2
2
|
|
|
3
3
|
//#region src/server/modules/admin/routes/reactive.d.ts
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ import * as questpie135 from "questpie";
|
|
|
13
13
|
* Batch reactive endpoint.
|
|
14
14
|
* Executes multiple reactive handlers in a single request.
|
|
15
15
|
*/
|
|
16
|
-
declare const batchReactive:
|
|
16
|
+
declare const batchReactive: questpie101.JsonRouteDefinition<{
|
|
17
17
|
collection: string;
|
|
18
18
|
type: "collection" | "global";
|
|
19
19
|
requests: {
|
|
@@ -26,12 +26,12 @@ declare const batchReactive: questpie135.JsonRouteDefinition<{
|
|
|
26
26
|
}[];
|
|
27
27
|
formData?: Record<string, unknown> | undefined;
|
|
28
28
|
prevData?: Record<string, unknown> | null | undefined;
|
|
29
|
-
}, any,
|
|
29
|
+
}, any, questpie101.JsonRouteParams>;
|
|
30
30
|
/**
|
|
31
31
|
* Dynamic options endpoint.
|
|
32
32
|
* Fetches options for select/relation fields with search and pagination.
|
|
33
33
|
*/
|
|
34
|
-
declare const fieldOptions:
|
|
34
|
+
declare const fieldOptions: questpie101.JsonRouteDefinition<{
|
|
35
35
|
collection: string;
|
|
36
36
|
type: "collection" | "global";
|
|
37
37
|
field: string;
|
|
@@ -40,12 +40,12 @@ declare const fieldOptions: questpie135.JsonRouteDefinition<{
|
|
|
40
40
|
page: number;
|
|
41
41
|
limit: number;
|
|
42
42
|
siblingData?: Record<string, unknown> | null | undefined;
|
|
43
|
-
}, any,
|
|
43
|
+
}, any, questpie101.JsonRouteParams>;
|
|
44
44
|
/**
|
|
45
45
|
* Reactive functions bundle.
|
|
46
46
|
*/
|
|
47
47
|
declare const reactiveFunctions: {
|
|
48
|
-
readonly batchReactive:
|
|
48
|
+
readonly batchReactive: questpie101.JsonRouteDefinition<{
|
|
49
49
|
collection: string;
|
|
50
50
|
type: "collection" | "global";
|
|
51
51
|
requests: {
|
|
@@ -58,8 +58,8 @@ declare const reactiveFunctions: {
|
|
|
58
58
|
}[];
|
|
59
59
|
formData?: Record<string, unknown> | undefined;
|
|
60
60
|
prevData?: Record<string, unknown> | null | undefined;
|
|
61
|
-
}, any,
|
|
62
|
-
readonly fieldOptions:
|
|
61
|
+
}, any, questpie101.JsonRouteParams>;
|
|
62
|
+
readonly fieldOptions: questpie101.JsonRouteDefinition<{
|
|
63
63
|
collection: string;
|
|
64
64
|
type: "collection" | "global";
|
|
65
65
|
field: string;
|
|
@@ -68,7 +68,7 @@ declare const reactiveFunctions: {
|
|
|
68
68
|
page: number;
|
|
69
69
|
limit: number;
|
|
70
70
|
siblingData?: Record<string, unknown> | null | undefined;
|
|
71
|
-
}, any,
|
|
71
|
+
}, any, questpie101.JsonRouteParams>;
|
|
72
72
|
};
|
|
73
73
|
//#endregion
|
|
74
74
|
export { batchReactive, fieldOptions, reactiveFunctions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as questpie109 from "questpie";
|
|
2
2
|
|
|
3
3
|
//#region src/server/modules/admin/routes/setup.d.ts
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@ import * as questpie143 from "questpie";
|
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
declare const isSetupRequired:
|
|
23
|
+
declare const isSetupRequired: questpie109.JsonRouteDefinition<Record<string, never>, any, questpie109.JsonRouteParams>;
|
|
24
24
|
/**
|
|
25
25
|
* Create the first admin user in the system.
|
|
26
26
|
* This function only works when no admin users exist (setup mode).
|
|
@@ -43,21 +43,21 @@ declare const isSetupRequired: questpie143.JsonRouteDefinition<Record<string, ne
|
|
|
43
43
|
* }
|
|
44
44
|
* ```
|
|
45
45
|
*/
|
|
46
|
-
declare const createFirstAdmin:
|
|
46
|
+
declare const createFirstAdmin: questpie109.JsonRouteDefinition<{
|
|
47
47
|
email: string;
|
|
48
48
|
password: string;
|
|
49
49
|
name: string;
|
|
50
|
-
}, any,
|
|
50
|
+
}, any, questpie109.JsonRouteParams>;
|
|
51
51
|
/**
|
|
52
52
|
* Bundle of setup-related functions.
|
|
53
53
|
*/
|
|
54
54
|
declare const setupFunctions: {
|
|
55
|
-
readonly isSetupRequired:
|
|
56
|
-
readonly createFirstAdmin:
|
|
55
|
+
readonly isSetupRequired: questpie109.JsonRouteDefinition<Record<string, never>, any, questpie109.JsonRouteParams>;
|
|
56
|
+
readonly createFirstAdmin: questpie109.JsonRouteDefinition<{
|
|
57
57
|
email: string;
|
|
58
58
|
password: string;
|
|
59
59
|
name: string;
|
|
60
|
-
}, any,
|
|
60
|
+
}, any, questpie109.JsonRouteParams>;
|
|
61
61
|
};
|
|
62
62
|
//#endregion
|
|
63
63
|
export { createFirstAdmin, isSetupRequired, setupFunctions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as questpie97 from "questpie";
|
|
2
2
|
|
|
3
3
|
//#region src/server/modules/admin/routes/widget-data.d.ts
|
|
4
4
|
|
|
@@ -20,13 +20,13 @@ import * as questpie69 from "questpie";
|
|
|
20
20
|
* const data = await client.routes.fetchWidgetData({ widgetId: "my-widget" });
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
declare const fetchWidgetData:
|
|
23
|
+
declare const fetchWidgetData: questpie97.JsonRouteDefinition<{
|
|
24
24
|
widgetId: string;
|
|
25
|
-
}, any,
|
|
25
|
+
}, any, questpie97.JsonRouteParams>;
|
|
26
26
|
declare const widgetDataFunctions: {
|
|
27
|
-
readonly fetchWidgetData:
|
|
27
|
+
readonly fetchWidgetData: questpie97.JsonRouteDefinition<{
|
|
28
28
|
widgetId: string;
|
|
29
|
-
}, any,
|
|
29
|
+
}, any, questpie97.JsonRouteParams>;
|
|
30
30
|
};
|
|
31
31
|
//#endregion
|
|
32
32
|
export { fetchWidgetData, widgetDataFunctions };
|