nextjs-cms 0.5.9 → 0.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/axios/axiosInstance.d.ts +1 -1
- package/dist/api/axios/axiosInstance.js +8 -8
- package/dist/api/index.d.ts +855 -855
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +12 -12
- package/dist/api/lib/serverActions.d.ts +239 -239
- package/dist/api/lib/serverActions.d.ts.map +1 -1
- package/dist/api/lib/serverActions.js +834 -834
- package/dist/api/root.d.ts +828 -828
- package/dist/api/root.js +30 -30
- package/dist/api/routers/accountSettings.d.ts +60 -60
- package/dist/api/routers/accountSettings.js +108 -108
- package/dist/api/routers/admins.d.ts +105 -105
- package/dist/api/routers/admins.js +219 -219
- package/dist/api/routers/auth.d.ts +47 -47
- package/dist/api/routers/auth.js +25 -25
- package/dist/api/routers/categorySection.d.ts +103 -103
- package/dist/api/routers/categorySection.js +38 -38
- package/dist/api/routers/cmsSettings.d.ts +48 -48
- package/dist/api/routers/cmsSettings.js +51 -51
- package/dist/api/routers/cpanel.d.ts +83 -83
- package/dist/api/routers/cpanel.js +216 -216
- package/dist/api/routers/files.d.ts +47 -47
- package/dist/api/routers/files.js +23 -23
- package/dist/api/routers/gallery.d.ts +35 -35
- package/dist/api/routers/gallery.js +62 -62
- package/dist/api/routers/googleAnalytics.d.ts +30 -30
- package/dist/api/routers/googleAnalytics.js +7 -7
- package/dist/api/routers/hasItemsSection.d.ts +139 -139
- package/dist/api/routers/hasItemsSection.js +34 -34
- package/dist/api/routers/navigation.d.ts +51 -51
- package/dist/api/routers/navigation.js +11 -11
- package/dist/api/routers/simpleSection.d.ts +57 -57
- package/dist/api/routers/simpleSection.js +12 -12
- package/dist/api/trpc.d.ts +106 -106
- package/dist/api/trpc.js +72 -72
- package/dist/auth/axios/axiosInstance.d.ts +1 -1
- package/dist/auth/axios/axiosInstance.js +8 -8
- package/dist/auth/csrf.d.ts +29 -29
- package/dist/auth/csrf.js +76 -76
- package/dist/auth/hooks/index.d.ts +3 -3
- package/dist/auth/hooks/index.d.ts.map +1 -1
- package/dist/auth/hooks/index.js +3 -3
- package/dist/auth/hooks/useAxiosPrivate.d.ts +4 -4
- package/dist/auth/hooks/useAxiosPrivate.js +74 -74
- package/dist/auth/hooks/useRefreshToken.d.ts +6 -6
- package/dist/auth/hooks/useRefreshToken.js +79 -79
- package/dist/auth/index.d.ts +22 -22
- package/dist/auth/index.js +44 -44
- package/dist/auth/jwt.d.ts +5 -5
- package/dist/auth/jwt.js +25 -25
- package/dist/auth/lib/actions.d.ts +32 -32
- package/dist/auth/lib/actions.d.ts.map +1 -1
- package/dist/auth/lib/actions.js +209 -209
- package/dist/auth/lib/client.d.ts +3 -3
- package/dist/auth/lib/client.js +46 -46
- package/dist/auth/lib/index.d.ts +2 -2
- package/dist/auth/lib/index.d.ts.map +1 -1
- package/dist/auth/lib/index.js +2 -2
- package/dist/auth/react.d.ts +105 -105
- package/dist/auth/react.d.ts.map +1 -1
- package/dist/auth/react.js +347 -347
- package/dist/auth/trpc.d.ts +5 -5
- package/dist/auth/trpc.d.ts.map +1 -1
- package/dist/auth/trpc.js +81 -81
- package/dist/core/config/config-loader.d.ts +91 -91
- package/dist/core/config/config-loader.js +230 -230
- package/dist/core/config/index.d.ts +2 -2
- package/dist/core/config/index.d.ts.map +1 -1
- package/dist/core/config/index.js +1 -1
- package/dist/core/config/loader.d.ts +1 -1
- package/dist/core/config/loader.js +42 -42
- package/dist/core/db/index.d.ts +1 -1
- package/dist/core/db/index.d.ts.map +1 -1
- package/dist/core/db/index.js +1 -1
- package/dist/core/db/table-checker/DbTable.d.ts +5 -5
- package/dist/core/db/table-checker/DbTable.js +5 -5
- package/dist/core/db/table-checker/MysqlTable.d.ts +33 -33
- package/dist/core/db/table-checker/MysqlTable.d.ts.map +1 -1
- package/dist/core/db/table-checker/MysqlTable.js +94 -94
- package/dist/core/db/table-checker/index.d.ts +1 -1
- package/dist/core/db/table-checker/index.d.ts.map +1 -1
- package/dist/core/db/table-checker/index.js +1 -1
- package/dist/core/factories/FieldFactory.d.ts +123 -123
- package/dist/core/factories/FieldFactory.d.ts.map +1 -1
- package/dist/core/factories/FieldFactory.js +411 -411
- package/dist/core/factories/SectionFactory.d.ts +109 -109
- package/dist/core/factories/SectionFactory.d.ts.map +1 -1
- package/dist/core/factories/SectionFactory.js +415 -415
- package/dist/core/factories/index.d.ts +2 -2
- package/dist/core/factories/index.d.ts.map +1 -1
- package/dist/core/factories/index.js +2 -2
- package/dist/core/fields/checkbox.d.ts +62 -62
- package/dist/core/fields/checkbox.d.ts.map +1 -1
- package/dist/core/fields/checkbox.js +62 -62
- package/dist/core/fields/color.d.ts +83 -83
- package/dist/core/fields/color.d.ts.map +1 -1
- package/dist/core/fields/color.js +91 -91
- package/dist/core/fields/date.d.ts +99 -99
- package/dist/core/fields/date.d.ts.map +1 -1
- package/dist/core/fields/date.js +108 -108
- package/dist/core/fields/document.d.ts +179 -179
- package/dist/core/fields/document.d.ts.map +1 -1
- package/dist/core/fields/document.js +277 -277
- package/dist/core/fields/field-group.d.ts +17 -17
- package/dist/core/fields/field-group.d.ts.map +1 -1
- package/dist/core/fields/field-group.js +6 -6
- package/dist/core/fields/field.d.ts +125 -125
- package/dist/core/fields/field.d.ts.map +1 -1
- package/dist/core/fields/field.js +148 -148
- package/dist/core/fields/fileField.d.ts +14 -14
- package/dist/core/fields/fileField.d.ts.map +1 -1
- package/dist/core/fields/fileField.js +5 -5
- package/dist/core/fields/index.d.ts +64 -64
- package/dist/core/fields/index.d.ts.map +1 -1
- package/dist/core/fields/index.js +18 -18
- package/dist/core/fields/map.d.ts +166 -166
- package/dist/core/fields/map.d.ts.map +1 -1
- package/dist/core/fields/map.js +152 -152
- package/dist/core/fields/number.d.ts +185 -185
- package/dist/core/fields/number.d.ts.map +1 -1
- package/dist/core/fields/number.js +241 -241
- package/dist/core/fields/password.d.ts +108 -108
- package/dist/core/fields/password.d.ts.map +1 -1
- package/dist/core/fields/password.js +133 -133
- package/dist/core/fields/photo.d.ts +288 -288
- package/dist/core/fields/photo.d.ts.map +1 -1
- package/dist/core/fields/photo.js +410 -410
- package/dist/core/fields/richText.d.ts +294 -294
- package/dist/core/fields/richText.d.ts.map +1 -1
- package/dist/core/fields/richText.js +338 -338
- package/dist/core/fields/select.d.ts +365 -365
- package/dist/core/fields/select.d.ts.map +1 -1
- package/dist/core/fields/select.js +499 -499
- package/dist/core/fields/selectMultiple.d.ts +235 -235
- package/dist/core/fields/selectMultiple.d.ts.map +1 -1
- package/dist/core/fields/selectMultiple.js +417 -417
- package/dist/core/fields/tags.d.ts +130 -130
- package/dist/core/fields/tags.d.ts.map +1 -1
- package/dist/core/fields/tags.js +105 -105
- package/dist/core/fields/text.d.ts +135 -135
- package/dist/core/fields/text.d.ts.map +1 -1
- package/dist/core/fields/text.js +157 -157
- package/dist/core/fields/textArea.d.ts +106 -106
- package/dist/core/fields/textArea.d.ts.map +1 -1
- package/dist/core/fields/textArea.js +126 -126
- package/dist/core/fields/video.d.ts +147 -147
- package/dist/core/fields/video.d.ts.map +1 -1
- package/dist/core/fields/video.js +248 -248
- package/dist/core/helpers/entity.d.ts +7 -7
- package/dist/core/helpers/entity.js +27 -27
- package/dist/core/helpers/index.d.ts +4 -4
- package/dist/core/helpers/index.d.ts.map +1 -1
- package/dist/core/helpers/index.js +3 -3
- package/dist/core/index.d.ts +7 -7
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +7 -7
- package/dist/core/sections/category.d.ts +282 -282
- package/dist/core/sections/category.d.ts.map +1 -1
- package/dist/core/sections/category.js +147 -147
- package/dist/core/sections/hasItems.d.ts +631 -631
- package/dist/core/sections/hasItems.d.ts.map +1 -1
- package/dist/core/sections/hasItems.js +144 -144
- package/dist/core/sections/index.d.ts +4 -4
- package/dist/core/sections/index.d.ts.map +1 -1
- package/dist/core/sections/index.js +4 -4
- package/dist/core/sections/section.d.ts +225 -225
- package/dist/core/sections/section.d.ts.map +1 -1
- package/dist/core/sections/section.js +341 -341
- package/dist/core/sections/simple.d.ts +98 -98
- package/dist/core/sections/simple.d.ts.map +1 -1
- package/dist/core/sections/simple.js +95 -95
- package/dist/core/security/dom.d.ts +10 -10
- package/dist/core/security/dom.js +92 -92
- package/dist/core/submit/ItemEditSubmit.d.ts +75 -75
- package/dist/core/submit/ItemEditSubmit.js +186 -186
- package/dist/core/submit/NewItemSubmit.d.ts +13 -13
- package/dist/core/submit/NewItemSubmit.js +93 -93
- package/dist/core/submit/SimpleSectionSubmit.d.ts +12 -12
- package/dist/core/submit/SimpleSectionSubmit.js +93 -93
- package/dist/core/submit/index.d.ts +4 -4
- package/dist/core/submit/index.js +4 -4
- package/dist/core/submit/submit.d.ts +115 -115
- package/dist/core/submit/submit.js +479 -479
- package/dist/core/types/index.d.ts +279 -279
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/types/index.js +1 -1
- package/dist/db/client.d.ts +8 -8
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +19 -19
- package/dist/db/config.d.ts +5 -5
- package/dist/db/config.js +22 -22
- package/dist/db/drizzle.config.d.ts +5 -5
- package/dist/db/drizzle.config.js +18 -18
- package/dist/db/index.d.ts +2 -2
- package/dist/db/index.js +3 -3
- package/dist/db/schema.d.ts +638 -638
- package/dist/db/schema.js +73 -73
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -7
- package/dist/translations/index.d.ts +2 -2
- package/dist/translations/index.js +15 -15
- package/dist/utils/CpanelApi.d.ts +24 -24
- package/dist/utils/CpanelApi.js +64 -64
- package/dist/utils/constants.d.ts +13 -13
- package/dist/utils/constants.js +61 -61
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +4 -4
- package/dist/utils/utils.d.ts +59 -59
- package/dist/utils/utils.js +132 -132
- package/dist/validators/checkbox.d.ts +3 -3
- package/dist/validators/checkbox.d.ts.map +1 -1
- package/dist/validators/checkbox.js +12 -12
- package/dist/validators/color.d.ts +3 -3
- package/dist/validators/color.d.ts.map +1 -1
- package/dist/validators/color.js +7 -7
- package/dist/validators/date.d.ts +3 -3
- package/dist/validators/date.d.ts.map +1 -1
- package/dist/validators/date.js +5 -5
- package/dist/validators/document.d.ts +3 -3
- package/dist/validators/document.d.ts.map +1 -1
- package/dist/validators/document.js +57 -57
- package/dist/validators/index.d.ts +14 -14
- package/dist/validators/index.d.ts.map +1 -1
- package/dist/validators/index.js +14 -14
- package/dist/validators/map.d.ts +3 -3
- package/dist/validators/map.d.ts.map +1 -1
- package/dist/validators/map.js +5 -5
- package/dist/validators/number.d.ts +3 -3
- package/dist/validators/number.d.ts.map +1 -1
- package/dist/validators/number.js +20 -20
- package/dist/validators/password.d.ts +3 -3
- package/dist/validators/password.d.ts.map +1 -1
- package/dist/validators/password.js +11 -11
- package/dist/validators/photo.d.ts +3 -3
- package/dist/validators/photo.d.ts.map +1 -1
- package/dist/validators/photo.js +100 -100
- package/dist/validators/richText.d.ts +3 -3
- package/dist/validators/richText.d.ts.map +1 -1
- package/dist/validators/richText.js +8 -8
- package/dist/validators/select-multiple.d.ts +9 -9
- package/dist/validators/select-multiple.d.ts.map +1 -1
- package/dist/validators/select-multiple.js +20 -20
- package/dist/validators/select.d.ts +3 -3
- package/dist/validators/select.d.ts.map +1 -1
- package/dist/validators/select.js +5 -5
- package/dist/validators/text.d.ts +3 -3
- package/dist/validators/text.d.ts.map +1 -1
- package/dist/validators/text.js +7 -7
- package/dist/validators/textarea.d.ts +3 -3
- package/dist/validators/textarea.d.ts.map +1 -1
- package/dist/validators/textarea.js +7 -7
- package/dist/validators/video.d.ts +3 -3
- package/dist/validators/video.d.ts.map +1 -1
- package/dist/validators/video.js +57 -57
- package/package.json +4 -5
|
@@ -1,283 +1,283 @@
|
|
|
1
|
-
import type { BaseSectionOptions } from
|
|
2
|
-
import type { FieldGroupConfig } from
|
|
3
|
-
import { Section } from
|
|
4
|
-
import type { TextFieldConfig } from
|
|
5
|
-
import { entityKind } from
|
|
6
|
-
import type { FieldConfig } from
|
|
7
|
-
import * as z from 'zod';
|
|
8
|
-
declare const configSchema: z.ZodObject<{
|
|
9
|
-
headingField: z.ZodCustom<{
|
|
10
|
-
type: "text";
|
|
11
|
-
build: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodCustom<import("
|
|
12
|
-
name: string;
|
|
13
|
-
placeholder?: string | undefined;
|
|
14
|
-
minLength?: number | undefined;
|
|
15
|
-
maxLength?: number | undefined;
|
|
16
|
-
defaultValue?: string | undefined;
|
|
17
|
-
sanitize?: boolean | undefined;
|
|
18
|
-
label?: string | undefined;
|
|
19
|
-
required?: boolean | undefined;
|
|
20
|
-
order?: number | undefined;
|
|
21
|
-
conditionalRules?: import("../types.js").ConditionalRule[] | undefined;
|
|
22
|
-
adminGenerated?: boolean | "readonly" | undefined;
|
|
23
|
-
}, {
|
|
24
|
-
type: "text";
|
|
25
|
-
build: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodCustom<import("
|
|
26
|
-
name: string;
|
|
27
|
-
placeholder?: string | undefined;
|
|
28
|
-
minLength?: number | undefined;
|
|
29
|
-
maxLength?: number | undefined;
|
|
30
|
-
defaultValue?: string | undefined;
|
|
31
|
-
sanitize?: boolean | undefined;
|
|
32
|
-
label?: string | undefined;
|
|
33
|
-
required?: boolean | undefined;
|
|
34
|
-
order?: number | undefined;
|
|
35
|
-
conditionalRules?: import("../types.js").ConditionalRule[] | undefined;
|
|
36
|
-
adminGenerated?: boolean | "readonly" | undefined;
|
|
37
|
-
}>;
|
|
38
|
-
title: z.ZodObject<{
|
|
39
|
-
section: z.ZodString;
|
|
40
|
-
singular: z.ZodString;
|
|
41
|
-
plural: z.ZodString;
|
|
42
|
-
}, z.core.$strict>;
|
|
43
|
-
/**
|
|
44
|
-
* The depth of the category section is the number of nested levels of categories that can be created.
|
|
45
|
-
* For example, if the depth is 2, each category can have one subcategory.
|
|
46
|
-
* Default value is 1. (No subcategories)
|
|
47
|
-
*/
|
|
48
|
-
depth: z.ZodOptional<z.ZodNumber>;
|
|
49
|
-
/**
|
|
50
|
-
* Allow recursive delete of categories children (depth > 1) when deleting the parent category.
|
|
51
|
-
* If true, all children categories will be deleted when the parent category is deleted.
|
|
52
|
-
* For this to take effect, `allowRecursiveDelete` in lz.config.ts must also be set to true.
|
|
53
|
-
* @default false
|
|
54
|
-
*/
|
|
55
|
-
allowRecursiveDelete: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
-
}, z.core.$strict>;
|
|
57
|
-
type Config = z.infer<typeof configSchema>;
|
|
58
|
-
export declare class CategorySection extends Section<Config> {
|
|
59
|
-
static readonly [entityKind] = "CategorySection";
|
|
60
|
-
readonly type = "category";
|
|
61
|
-
readonly title: {
|
|
62
|
-
section: string;
|
|
63
|
-
singular: string;
|
|
64
|
-
plural: string;
|
|
65
|
-
};
|
|
66
|
-
readonly headingField: TextFieldConfig;
|
|
67
|
-
readonly depth: number;
|
|
68
|
-
readonly allowRecursiveDelete: boolean;
|
|
69
|
-
constructor(config: BaseSectionOptions<Config>);
|
|
70
|
-
}
|
|
71
|
-
declare const optionsSchema: z.ZodObject<{
|
|
72
|
-
headingField: z.ZodCustom<{
|
|
73
|
-
type: "text";
|
|
74
|
-
build: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodCustom<import("
|
|
75
|
-
name: string;
|
|
76
|
-
placeholder?: string | undefined;
|
|
77
|
-
minLength?: number | undefined;
|
|
78
|
-
maxLength?: number | undefined;
|
|
79
|
-
defaultValue?: string | undefined;
|
|
80
|
-
sanitize?: boolean | undefined;
|
|
81
|
-
label?: string | undefined;
|
|
82
|
-
required?: boolean | undefined;
|
|
83
|
-
order?: number | undefined;
|
|
84
|
-
conditionalRules?: import("../types.js").ConditionalRule[] | undefined;
|
|
85
|
-
adminGenerated?: boolean | "readonly" | undefined;
|
|
86
|
-
}, {
|
|
87
|
-
type: "text";
|
|
88
|
-
build: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodCustom<import("
|
|
89
|
-
name: string;
|
|
90
|
-
placeholder?: string | undefined;
|
|
91
|
-
minLength?: number | undefined;
|
|
92
|
-
maxLength?: number | undefined;
|
|
93
|
-
defaultValue?: string | undefined;
|
|
94
|
-
sanitize?: boolean | undefined;
|
|
95
|
-
label?: string | undefined;
|
|
96
|
-
required?: boolean | undefined;
|
|
97
|
-
order?: number | undefined;
|
|
98
|
-
conditionalRules?: import("../types.js").ConditionalRule[] | undefined;
|
|
99
|
-
adminGenerated?: boolean | "readonly" | undefined;
|
|
100
|
-
}>;
|
|
101
|
-
title: z.ZodObject<{
|
|
102
|
-
section: z.ZodString;
|
|
103
|
-
singular: z.ZodString;
|
|
104
|
-
plural: z.ZodString;
|
|
105
|
-
}, z.core.$strict>;
|
|
106
|
-
/**
|
|
107
|
-
* The depth of the category section is the number of nested levels of categories that can be created.
|
|
108
|
-
* For example, if the depth is 2, each category can have one subcategory.
|
|
109
|
-
* Default value is 1. (No subcategories)
|
|
110
|
-
*/
|
|
111
|
-
depth: z.ZodOptional<z.ZodNumber>;
|
|
112
|
-
/**
|
|
113
|
-
* Allow recursive delete of categories children (depth > 1) when deleting the parent category.
|
|
114
|
-
* If true, all children categories will be deleted when the parent category is deleted.
|
|
115
|
-
* For this to take effect, `allowRecursiveDelete` in lz.config.ts must also be set to true.
|
|
116
|
-
* @default false
|
|
117
|
-
*/
|
|
118
|
-
allowRecursiveDelete: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
-
fields: z.ZodUnion<[z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>, z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>]>;
|
|
120
|
-
name: z.ZodString;
|
|
121
|
-
db: z.ZodObject<{
|
|
122
|
-
table: z.ZodString;
|
|
123
|
-
identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
124
|
-
orderByField: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
125
|
-
primaryKey: z.ZodOptional<z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>>;
|
|
126
|
-
foreignKeys: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
127
|
-
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
128
|
-
foreignColumns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
129
|
-
name: z.ZodString;
|
|
130
|
-
}, z.core.$strict>>>;
|
|
131
|
-
index: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
132
|
-
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
133
|
-
name: z.ZodOptional<z.ZodString>;
|
|
134
|
-
}, z.core.$strict>>>;
|
|
135
|
-
unique: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
136
|
-
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
137
|
-
name: z.ZodOptional<z.ZodString>;
|
|
138
|
-
}, z.core.$strict>>>;
|
|
139
|
-
fulltext: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
140
|
-
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
141
|
-
name: z.ZodOptional<z.ZodString>;
|
|
142
|
-
}, z.core.$strict>>>;
|
|
143
|
-
}, z.core.$strict>;
|
|
144
|
-
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types.js").Variant, import("../types.js").Variant>>>;
|
|
145
|
-
order: z.ZodNumber;
|
|
146
|
-
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
147
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
148
|
-
gallery: z.ZodOptional<z.ZodObject<{
|
|
149
|
-
db: z.ZodObject<{
|
|
150
|
-
tableName: z.ZodString;
|
|
151
|
-
identifierField: z.ZodOptional<z.ZodString>;
|
|
152
|
-
photoNameField: z.ZodOptional<z.ZodString>;
|
|
153
|
-
metaField: z.ZodOptional<z.ZodString>;
|
|
154
|
-
}, z.core.$strict>;
|
|
155
|
-
watermark: z.ZodOptional<z.ZodBoolean>;
|
|
156
|
-
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
157
|
-
width: z.ZodNumber;
|
|
158
|
-
height: z.ZodNumber;
|
|
159
|
-
crop: z.ZodBoolean;
|
|
160
|
-
quality: z.ZodNumber;
|
|
161
|
-
}, z.core.$strict>>;
|
|
162
|
-
}, z.core.$strict>>;
|
|
163
|
-
hooks: z.ZodOptional<z.ZodCustom<import("./section.js").Hooks, import("./section.js").Hooks>>;
|
|
164
|
-
}, z.core.$strict>;
|
|
165
|
-
export declare const categorySectionConfigSchema: z.ZodObject<{
|
|
166
|
-
type: z.ZodLiteral<"category">;
|
|
167
|
-
fields: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
168
|
-
build: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodCustom<CategorySection, CategorySection>>;
|
|
169
|
-
fieldGroups: z.ZodOptional<z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>>;
|
|
170
|
-
headingField: z.ZodCustom<{
|
|
171
|
-
type: "text";
|
|
172
|
-
build: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodCustom<import("
|
|
173
|
-
name: string;
|
|
174
|
-
placeholder?: string | undefined;
|
|
175
|
-
minLength?: number | undefined;
|
|
176
|
-
maxLength?: number | undefined;
|
|
177
|
-
defaultValue?: string | undefined;
|
|
178
|
-
sanitize?: boolean | undefined;
|
|
179
|
-
label?: string | undefined;
|
|
180
|
-
required?: boolean | undefined;
|
|
181
|
-
order?: number | undefined;
|
|
182
|
-
conditionalRules?: import("../types.js").ConditionalRule[] | undefined;
|
|
183
|
-
adminGenerated?: boolean | "readonly" | undefined;
|
|
184
|
-
}, {
|
|
185
|
-
type: "text";
|
|
186
|
-
build: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodCustom<import("
|
|
187
|
-
name: string;
|
|
188
|
-
placeholder?: string | undefined;
|
|
189
|
-
minLength?: number | undefined;
|
|
190
|
-
maxLength?: number | undefined;
|
|
191
|
-
defaultValue?: string | undefined;
|
|
192
|
-
sanitize?: boolean | undefined;
|
|
193
|
-
label?: string | undefined;
|
|
194
|
-
required?: boolean | undefined;
|
|
195
|
-
order?: number | undefined;
|
|
196
|
-
conditionalRules?: import("../types.js").ConditionalRule[] | undefined;
|
|
197
|
-
adminGenerated?: boolean | "readonly" | undefined;
|
|
198
|
-
}>;
|
|
199
|
-
title: z.ZodObject<{
|
|
200
|
-
section: z.ZodString;
|
|
201
|
-
singular: z.ZodString;
|
|
202
|
-
plural: z.ZodString;
|
|
203
|
-
}, z.core.$strict>;
|
|
204
|
-
/**
|
|
205
|
-
* The depth of the category section is the number of nested levels of categories that can be created.
|
|
206
|
-
* For example, if the depth is 2, each category can have one subcategory.
|
|
207
|
-
* Default value is 1. (No subcategories)
|
|
208
|
-
*/
|
|
209
|
-
depth: z.ZodOptional<z.ZodNumber>;
|
|
210
|
-
/**
|
|
211
|
-
* Allow recursive delete of categories children (depth > 1) when deleting the parent category.
|
|
212
|
-
* If true, all children categories will be deleted when the parent category is deleted.
|
|
213
|
-
* For this to take effect, `allowRecursiveDelete` in lz.config.ts must also be set to true.
|
|
214
|
-
* @default false
|
|
215
|
-
*/
|
|
216
|
-
allowRecursiveDelete: z.ZodOptional<z.ZodBoolean>;
|
|
217
|
-
name: z.ZodString;
|
|
218
|
-
db: z.ZodObject<{
|
|
219
|
-
table: z.ZodString;
|
|
220
|
-
identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
221
|
-
orderByField: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
222
|
-
primaryKey: z.ZodOptional<z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>>;
|
|
223
|
-
foreignKeys: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
224
|
-
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
225
|
-
foreignColumns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
226
|
-
name: z.ZodString;
|
|
227
|
-
}, z.core.$strict>>>;
|
|
228
|
-
index: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
229
|
-
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
230
|
-
name: z.ZodOptional<z.ZodString>;
|
|
231
|
-
}, z.core.$strict>>>;
|
|
232
|
-
unique: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
233
|
-
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
234
|
-
name: z.ZodOptional<z.ZodString>;
|
|
235
|
-
}, z.core.$strict>>>;
|
|
236
|
-
fulltext: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
237
|
-
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
238
|
-
name: z.ZodOptional<z.ZodString>;
|
|
239
|
-
}, z.core.$strict>>>;
|
|
240
|
-
}, z.core.$strict>;
|
|
241
|
-
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types.js").Variant, import("../types.js").Variant>>>;
|
|
242
|
-
order: z.ZodNumber;
|
|
243
|
-
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
244
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
245
|
-
gallery: z.ZodOptional<z.ZodObject<{
|
|
246
|
-
db: z.ZodObject<{
|
|
247
|
-
tableName: z.ZodString;
|
|
248
|
-
identifierField: z.ZodOptional<z.ZodString>;
|
|
249
|
-
photoNameField: z.ZodOptional<z.ZodString>;
|
|
250
|
-
metaField: z.ZodOptional<z.ZodString>;
|
|
251
|
-
}, z.core.$strict>;
|
|
252
|
-
watermark: z.ZodOptional<z.ZodBoolean>;
|
|
253
|
-
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
254
|
-
width: z.ZodNumber;
|
|
255
|
-
height: z.ZodNumber;
|
|
256
|
-
crop: z.ZodBoolean;
|
|
257
|
-
quality: z.ZodNumber;
|
|
258
|
-
}, z.core.$strict>>;
|
|
259
|
-
}, z.core.$strict>>;
|
|
260
|
-
hooks: z.ZodOptional<z.ZodCustom<import("./section.js").Hooks, import("./section.js").Hooks>>;
|
|
261
|
-
}, z.core.$strict>;
|
|
262
|
-
export type CategorySectionOptions = z.infer<typeof optionsSchema>;
|
|
263
|
-
/**
|
|
264
|
-
* Category section configuration
|
|
265
|
-
* This is the output of the categorySection() helper function, it that can be serialized and used anywhere
|
|
266
|
-
* The build() method allows creating a CategorySection instance when needed
|
|
267
|
-
*/
|
|
268
|
-
export type CategorySectionConfig = z.infer<typeof categorySectionConfigSchema>;
|
|
269
|
-
/**
|
|
270
|
-
* Helper function to create a category section configuration
|
|
271
|
-
* Returns a config object with a build() method that can be serialized and used anywhere
|
|
272
|
-
*
|
|
273
|
-
* @example
|
|
274
|
-
* ```typescript
|
|
275
|
-
* const sectionConfig = categorySection({ name: 'categories', ... })
|
|
276
|
-
* const sectionInstance = sectionConfig.build()
|
|
277
|
-
* ```
|
|
278
|
-
*
|
|
279
|
-
* @param section
|
|
280
|
-
*/
|
|
281
|
-
export declare function categorySection(section: CategorySectionOptions): CategorySectionConfig;
|
|
282
|
-
export {};
|
|
1
|
+
import type { BaseSectionOptions } from './section.js';
|
|
2
|
+
import type { FieldGroupConfig } from '../fields/field-group.js';
|
|
3
|
+
import { Section } from './section.js';
|
|
4
|
+
import type { TextFieldConfig } from '../fields/index.js';
|
|
5
|
+
import { entityKind } from '../helpers/index.js';
|
|
6
|
+
import type { FieldConfig } from '../fields/index.js';
|
|
7
|
+
import * as z from 'zod';
|
|
8
|
+
declare const configSchema: z.ZodObject<{
|
|
9
|
+
headingField: z.ZodCustom<{
|
|
10
|
+
type: "text";
|
|
11
|
+
build: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodCustom<import("../index.js").TextField, import("../index.js").TextField>>;
|
|
12
|
+
name: string;
|
|
13
|
+
placeholder?: string | undefined;
|
|
14
|
+
minLength?: number | undefined;
|
|
15
|
+
maxLength?: number | undefined;
|
|
16
|
+
defaultValue?: string | undefined;
|
|
17
|
+
sanitize?: boolean | undefined;
|
|
18
|
+
label?: string | undefined;
|
|
19
|
+
required?: boolean | undefined;
|
|
20
|
+
order?: number | undefined;
|
|
21
|
+
conditionalRules?: import("../types/index.js").ConditionalRule[] | undefined;
|
|
22
|
+
adminGenerated?: boolean | "readonly" | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
type: "text";
|
|
25
|
+
build: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodCustom<import("../index.js").TextField, import("../index.js").TextField>>;
|
|
26
|
+
name: string;
|
|
27
|
+
placeholder?: string | undefined;
|
|
28
|
+
minLength?: number | undefined;
|
|
29
|
+
maxLength?: number | undefined;
|
|
30
|
+
defaultValue?: string | undefined;
|
|
31
|
+
sanitize?: boolean | undefined;
|
|
32
|
+
label?: string | undefined;
|
|
33
|
+
required?: boolean | undefined;
|
|
34
|
+
order?: number | undefined;
|
|
35
|
+
conditionalRules?: import("../types/index.js").ConditionalRule[] | undefined;
|
|
36
|
+
adminGenerated?: boolean | "readonly" | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
title: z.ZodObject<{
|
|
39
|
+
section: z.ZodString;
|
|
40
|
+
singular: z.ZodString;
|
|
41
|
+
plural: z.ZodString;
|
|
42
|
+
}, z.core.$strict>;
|
|
43
|
+
/**
|
|
44
|
+
* The depth of the category section is the number of nested levels of categories that can be created.
|
|
45
|
+
* For example, if the depth is 2, each category can have one subcategory.
|
|
46
|
+
* Default value is 1. (No subcategories)
|
|
47
|
+
*/
|
|
48
|
+
depth: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
/**
|
|
50
|
+
* Allow recursive delete of categories children (depth > 1) when deleting the parent category.
|
|
51
|
+
* If true, all children categories will be deleted when the parent category is deleted.
|
|
52
|
+
* For this to take effect, `allowRecursiveDelete` in lz.config.ts must also be set to true.
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
allowRecursiveDelete: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
type Config = z.infer<typeof configSchema>;
|
|
58
|
+
export declare class CategorySection extends Section<Config> {
|
|
59
|
+
static readonly [entityKind] = "CategorySection";
|
|
60
|
+
readonly type = "category";
|
|
61
|
+
readonly title: {
|
|
62
|
+
section: string;
|
|
63
|
+
singular: string;
|
|
64
|
+
plural: string;
|
|
65
|
+
};
|
|
66
|
+
readonly headingField: TextFieldConfig;
|
|
67
|
+
readonly depth: number;
|
|
68
|
+
readonly allowRecursiveDelete: boolean;
|
|
69
|
+
constructor(config: BaseSectionOptions<Config>);
|
|
70
|
+
}
|
|
71
|
+
declare const optionsSchema: z.ZodObject<{
|
|
72
|
+
headingField: z.ZodCustom<{
|
|
73
|
+
type: "text";
|
|
74
|
+
build: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodCustom<import("../index.js").TextField, import("../index.js").TextField>>;
|
|
75
|
+
name: string;
|
|
76
|
+
placeholder?: string | undefined;
|
|
77
|
+
minLength?: number | undefined;
|
|
78
|
+
maxLength?: number | undefined;
|
|
79
|
+
defaultValue?: string | undefined;
|
|
80
|
+
sanitize?: boolean | undefined;
|
|
81
|
+
label?: string | undefined;
|
|
82
|
+
required?: boolean | undefined;
|
|
83
|
+
order?: number | undefined;
|
|
84
|
+
conditionalRules?: import("../types/index.js").ConditionalRule[] | undefined;
|
|
85
|
+
adminGenerated?: boolean | "readonly" | undefined;
|
|
86
|
+
}, {
|
|
87
|
+
type: "text";
|
|
88
|
+
build: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodCustom<import("../index.js").TextField, import("../index.js").TextField>>;
|
|
89
|
+
name: string;
|
|
90
|
+
placeholder?: string | undefined;
|
|
91
|
+
minLength?: number | undefined;
|
|
92
|
+
maxLength?: number | undefined;
|
|
93
|
+
defaultValue?: string | undefined;
|
|
94
|
+
sanitize?: boolean | undefined;
|
|
95
|
+
label?: string | undefined;
|
|
96
|
+
required?: boolean | undefined;
|
|
97
|
+
order?: number | undefined;
|
|
98
|
+
conditionalRules?: import("../types/index.js").ConditionalRule[] | undefined;
|
|
99
|
+
adminGenerated?: boolean | "readonly" | undefined;
|
|
100
|
+
}>;
|
|
101
|
+
title: z.ZodObject<{
|
|
102
|
+
section: z.ZodString;
|
|
103
|
+
singular: z.ZodString;
|
|
104
|
+
plural: z.ZodString;
|
|
105
|
+
}, z.core.$strict>;
|
|
106
|
+
/**
|
|
107
|
+
* The depth of the category section is the number of nested levels of categories that can be created.
|
|
108
|
+
* For example, if the depth is 2, each category can have one subcategory.
|
|
109
|
+
* Default value is 1. (No subcategories)
|
|
110
|
+
*/
|
|
111
|
+
depth: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
/**
|
|
113
|
+
* Allow recursive delete of categories children (depth > 1) when deleting the parent category.
|
|
114
|
+
* If true, all children categories will be deleted when the parent category is deleted.
|
|
115
|
+
* For this to take effect, `allowRecursiveDelete` in lz.config.ts must also be set to true.
|
|
116
|
+
* @default false
|
|
117
|
+
*/
|
|
118
|
+
allowRecursiveDelete: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
fields: z.ZodUnion<[z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>, z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>]>;
|
|
120
|
+
name: z.ZodString;
|
|
121
|
+
db: z.ZodObject<{
|
|
122
|
+
table: z.ZodString;
|
|
123
|
+
identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
124
|
+
orderByField: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
125
|
+
primaryKey: z.ZodOptional<z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>>;
|
|
126
|
+
foreignKeys: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
127
|
+
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
128
|
+
foreignColumns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
129
|
+
name: z.ZodString;
|
|
130
|
+
}, z.core.$strict>>>;
|
|
131
|
+
index: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
132
|
+
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
133
|
+
name: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, z.core.$strict>>>;
|
|
135
|
+
unique: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
136
|
+
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
137
|
+
name: z.ZodOptional<z.ZodString>;
|
|
138
|
+
}, z.core.$strict>>>;
|
|
139
|
+
fulltext: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
140
|
+
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
141
|
+
name: z.ZodOptional<z.ZodString>;
|
|
142
|
+
}, z.core.$strict>>>;
|
|
143
|
+
}, z.core.$strict>;
|
|
144
|
+
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
145
|
+
order: z.ZodNumber;
|
|
146
|
+
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
147
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
148
|
+
gallery: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
db: z.ZodObject<{
|
|
150
|
+
tableName: z.ZodString;
|
|
151
|
+
identifierField: z.ZodOptional<z.ZodString>;
|
|
152
|
+
photoNameField: z.ZodOptional<z.ZodString>;
|
|
153
|
+
metaField: z.ZodOptional<z.ZodString>;
|
|
154
|
+
}, z.core.$strict>;
|
|
155
|
+
watermark: z.ZodOptional<z.ZodBoolean>;
|
|
156
|
+
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
157
|
+
width: z.ZodNumber;
|
|
158
|
+
height: z.ZodNumber;
|
|
159
|
+
crop: z.ZodBoolean;
|
|
160
|
+
quality: z.ZodNumber;
|
|
161
|
+
}, z.core.$strict>>;
|
|
162
|
+
}, z.core.$strict>>;
|
|
163
|
+
hooks: z.ZodOptional<z.ZodCustom<import("./section.js").Hooks, import("./section.js").Hooks>>;
|
|
164
|
+
}, z.core.$strict>;
|
|
165
|
+
export declare const categorySectionConfigSchema: z.ZodObject<{
|
|
166
|
+
type: z.ZodLiteral<"category">;
|
|
167
|
+
fields: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
168
|
+
build: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodCustom<CategorySection, CategorySection>>;
|
|
169
|
+
fieldGroups: z.ZodOptional<z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>>;
|
|
170
|
+
headingField: z.ZodCustom<{
|
|
171
|
+
type: "text";
|
|
172
|
+
build: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodCustom<import("../index.js").TextField, import("../index.js").TextField>>;
|
|
173
|
+
name: string;
|
|
174
|
+
placeholder?: string | undefined;
|
|
175
|
+
minLength?: number | undefined;
|
|
176
|
+
maxLength?: number | undefined;
|
|
177
|
+
defaultValue?: string | undefined;
|
|
178
|
+
sanitize?: boolean | undefined;
|
|
179
|
+
label?: string | undefined;
|
|
180
|
+
required?: boolean | undefined;
|
|
181
|
+
order?: number | undefined;
|
|
182
|
+
conditionalRules?: import("../types/index.js").ConditionalRule[] | undefined;
|
|
183
|
+
adminGenerated?: boolean | "readonly" | undefined;
|
|
184
|
+
}, {
|
|
185
|
+
type: "text";
|
|
186
|
+
build: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodCustom<import("../index.js").TextField, import("../index.js").TextField>>;
|
|
187
|
+
name: string;
|
|
188
|
+
placeholder?: string | undefined;
|
|
189
|
+
minLength?: number | undefined;
|
|
190
|
+
maxLength?: number | undefined;
|
|
191
|
+
defaultValue?: string | undefined;
|
|
192
|
+
sanitize?: boolean | undefined;
|
|
193
|
+
label?: string | undefined;
|
|
194
|
+
required?: boolean | undefined;
|
|
195
|
+
order?: number | undefined;
|
|
196
|
+
conditionalRules?: import("../types/index.js").ConditionalRule[] | undefined;
|
|
197
|
+
adminGenerated?: boolean | "readonly" | undefined;
|
|
198
|
+
}>;
|
|
199
|
+
title: z.ZodObject<{
|
|
200
|
+
section: z.ZodString;
|
|
201
|
+
singular: z.ZodString;
|
|
202
|
+
plural: z.ZodString;
|
|
203
|
+
}, z.core.$strict>;
|
|
204
|
+
/**
|
|
205
|
+
* The depth of the category section is the number of nested levels of categories that can be created.
|
|
206
|
+
* For example, if the depth is 2, each category can have one subcategory.
|
|
207
|
+
* Default value is 1. (No subcategories)
|
|
208
|
+
*/
|
|
209
|
+
depth: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
/**
|
|
211
|
+
* Allow recursive delete of categories children (depth > 1) when deleting the parent category.
|
|
212
|
+
* If true, all children categories will be deleted when the parent category is deleted.
|
|
213
|
+
* For this to take effect, `allowRecursiveDelete` in lz.config.ts must also be set to true.
|
|
214
|
+
* @default false
|
|
215
|
+
*/
|
|
216
|
+
allowRecursiveDelete: z.ZodOptional<z.ZodBoolean>;
|
|
217
|
+
name: z.ZodString;
|
|
218
|
+
db: z.ZodObject<{
|
|
219
|
+
table: z.ZodString;
|
|
220
|
+
identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
221
|
+
orderByField: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
222
|
+
primaryKey: z.ZodOptional<z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>>;
|
|
223
|
+
foreignKeys: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
224
|
+
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
225
|
+
foreignColumns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
226
|
+
name: z.ZodString;
|
|
227
|
+
}, z.core.$strict>>>;
|
|
228
|
+
index: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
229
|
+
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
230
|
+
name: z.ZodOptional<z.ZodString>;
|
|
231
|
+
}, z.core.$strict>>>;
|
|
232
|
+
unique: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
233
|
+
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
234
|
+
name: z.ZodOptional<z.ZodString>;
|
|
235
|
+
}, z.core.$strict>>>;
|
|
236
|
+
fulltext: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
237
|
+
columns: z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
238
|
+
name: z.ZodOptional<z.ZodString>;
|
|
239
|
+
}, z.core.$strict>>>;
|
|
240
|
+
}, z.core.$strict>;
|
|
241
|
+
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
242
|
+
order: z.ZodNumber;
|
|
243
|
+
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
244
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
245
|
+
gallery: z.ZodOptional<z.ZodObject<{
|
|
246
|
+
db: z.ZodObject<{
|
|
247
|
+
tableName: z.ZodString;
|
|
248
|
+
identifierField: z.ZodOptional<z.ZodString>;
|
|
249
|
+
photoNameField: z.ZodOptional<z.ZodString>;
|
|
250
|
+
metaField: z.ZodOptional<z.ZodString>;
|
|
251
|
+
}, z.core.$strict>;
|
|
252
|
+
watermark: z.ZodOptional<z.ZodBoolean>;
|
|
253
|
+
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
254
|
+
width: z.ZodNumber;
|
|
255
|
+
height: z.ZodNumber;
|
|
256
|
+
crop: z.ZodBoolean;
|
|
257
|
+
quality: z.ZodNumber;
|
|
258
|
+
}, z.core.$strict>>;
|
|
259
|
+
}, z.core.$strict>>;
|
|
260
|
+
hooks: z.ZodOptional<z.ZodCustom<import("./section.js").Hooks, import("./section.js").Hooks>>;
|
|
261
|
+
}, z.core.$strict>;
|
|
262
|
+
export type CategorySectionOptions = z.infer<typeof optionsSchema>;
|
|
263
|
+
/**
|
|
264
|
+
* Category section configuration
|
|
265
|
+
* This is the output of the categorySection() helper function, it that can be serialized and used anywhere
|
|
266
|
+
* The build() method allows creating a CategorySection instance when needed
|
|
267
|
+
*/
|
|
268
|
+
export type CategorySectionConfig = z.infer<typeof categorySectionConfigSchema>;
|
|
269
|
+
/**
|
|
270
|
+
* Helper function to create a category section configuration
|
|
271
|
+
* Returns a config object with a build() method that can be serialized and used anywhere
|
|
272
|
+
*
|
|
273
|
+
* @example
|
|
274
|
+
* ```typescript
|
|
275
|
+
* const sectionConfig = categorySection({ name: 'categories', ... })
|
|
276
|
+
* const sectionInstance = sectionConfig.build()
|
|
277
|
+
* ```
|
|
278
|
+
*
|
|
279
|
+
* @param section
|
|
280
|
+
*/
|
|
281
|
+
export declare function categorySection(section: CategorySectionOptions): CategorySectionConfig;
|
|
282
|
+
export {};
|
|
283
283
|
//# sourceMappingURL=category.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../../src/core/sections/category.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../../src/core/sections/category.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,EAAE,OAAO,EAA8E,MAAM,cAAc,CAAA;AAClH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAErD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAExB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWd;;;;OAIG;;IAEH;;;;;OAKG;;kBAGL,CAAA;AAEF,KAAK,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAE1C,qBAAa,eAAgB,SAAQ,OAAO,CAAC,MAAM,CAAC;IAChD,gBAAyB,CAAC,UAAU,CAAC,qBAAoB;IACzD,SAAkB,IAAI,cAAa;IACnC,SAAkB,KAAK,EAAE;QACrB,OAAO,EAAE,MAAM,CAAA;QACf,QAAQ,EAAE,MAAM,CAAA;QAChB,MAAM,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,QAAQ,CAAC,YAAY,EAAE,eAAe,CAAA;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAI;IAC1B,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAA;gBAE1B,MAAM,EAAE,kBAAkB,CAAC,MAAM,CAAC;CA0CjD;AAED,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA1Ef;;;;OAIG;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkEL,CAAA;AAOF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IApFpC;;;;OAIG;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiFL,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAElE;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAE/E;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,qBAAqB,CA6CtF"}
|