@griddo/core 1.73.28 → 1.74.0
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 +1 -0
- package/dist/index.d.ts +23 -6
- package/dist/index.js +1 -1
- package/dist/src/functions/create-schemas/index.d.ts +69 -0
- package/dist/{utils.d.ts → src/functions/create-schemas/utils.d.ts} +2 -2
- package/dist/src/types/core.d.ts +419 -0
- package/dist/src/types/fields.d.ts +7 -0
- package/dist/src/types/schema-functions/fields/base.d.ts +272 -0
- package/dist/src/types/schema-functions/fields/page-data-fields.d.ts +36 -0
- package/dist/src/types/schema-functions/fields/props.d.ts +131 -0
- package/dist/src/types/schema-functions/fields/pure-data-fields.d.ts +34 -0
- package/dist/src/types/schema-functions/fields/ui-fields.d.ts +35 -0
- package/dist/src/types/schema-functions/schemas/CategoriesSchema.d.ts +13 -0
- package/dist/{types → src/types/schema-functions}/schemas/DamDefaultsSchema.d.ts +3 -1
- package/dist/{types → src/types/schema-functions}/schemas/DataPackCategoriesSchema.d.ts +1 -1
- package/dist/src/types/schema-functions/schemas/DataPackSchema.d.ts +13 -0
- package/dist/src/types/schema-functions/schemas/HeaderFooterSchema.d.ts +35 -0
- package/dist/{types → src/types/schema-functions}/schemas/LanguagesSchema.d.ts +2 -2
- package/dist/src/types/schema-functions/schemas/MenuSchema.d.ts +8 -0
- package/dist/{types → src/types/schema-functions}/schemas/ModuleCategoriesSchema.d.ts +1 -1
- package/dist/src/types/schema-functions/schemas/PageDataSchema.d.ts +20 -0
- package/dist/{types → src/types/schema-functions}/schemas/PureDataSchema.d.ts +4 -4
- package/dist/src/types/schema-functions/schemas/ThemesSchema.d.ts +11 -0
- package/dist/{types → src/types/schema-functions}/schemas/TranslationsSchema.d.ts +0 -0
- package/dist/src/types/schema-functions/schemas/UISchema.d.ts +47 -0
- package/dist/src/types/schema-functions/schemas/base.d.ts +71 -0
- package/dist/{types → src/types/schema-functions}/schemas/index.d.ts +1 -1
- package/dist/src/types/schema-functions/schemas/props.d.ts +33 -0
- package/dist/src/types/schema.d.ts +1 -0
- package/dist/src/types/theme.d.ts +57 -0
- package/package.json +2 -2
- package/dist/types/fields/base.d.ts +0 -257
- package/dist/types/fields/page-data-fields.d.ts +0 -36
- package/dist/types/fields/props.d.ts +0 -120
- package/dist/types/fields/pure-data-fields.d.ts +0 -34
- package/dist/types/fields/ui-fields.d.ts +0 -35
- package/dist/types/schemas/CategoriesSchema.d.ts +0 -13
- package/dist/types/schemas/DataPackSchema.d.ts +0 -12
- package/dist/types/schemas/HeaderFooterSchema.d.ts +0 -28
- package/dist/types/schemas/MenuSchema.d.ts +0 -8
- package/dist/types/schemas/PageDataSchema.d.ts +0 -20
- package/dist/types/schemas/ThemesSchema.d.ts +0 -9
- package/dist/types/schemas/UISchema.d.ts +0 -39
- package/dist/types/schemas/base.d.ts +0 -58
- package/dist/types/schemas/props.d.ts +0 -32
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type for a Griddo component which is an object with properties and values
|
|
3
|
+
* that at least includes the prop component.
|
|
4
|
+
*/
|
|
5
|
+
export declare module Core {
|
|
6
|
+
type GriddoComponent<T> = T & {
|
|
7
|
+
component: string;
|
|
8
|
+
};
|
|
9
|
+
type ArrayFieldGroup<FieldKeys> = Array<FieldKeys>;
|
|
10
|
+
type AsyncCheckGroup = Array<string>;
|
|
11
|
+
type CheckGroupField<Options> = Options;
|
|
12
|
+
type ColorPickerField = string;
|
|
13
|
+
type ColorPickerFixedField = {
|
|
14
|
+
name: string;
|
|
15
|
+
hex: string;
|
|
16
|
+
};
|
|
17
|
+
type ComponentArrayField<ComponentProps> = Array<ComponentProps>;
|
|
18
|
+
type ComponentContainerField<T> = GriddoComponent<T>;
|
|
19
|
+
type ConditionalField<T> = T;
|
|
20
|
+
type DateField = string;
|
|
21
|
+
type FileField = {
|
|
22
|
+
/** URL for the document */
|
|
23
|
+
url?: string;
|
|
24
|
+
/** Size for the document file in bytes */
|
|
25
|
+
sizeBytes?: number;
|
|
26
|
+
/** Upload date */
|
|
27
|
+
uploadDate?: string;
|
|
28
|
+
};
|
|
29
|
+
type HeadingField<HeadingTagsType = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span"> = {
|
|
30
|
+
/** Text content */
|
|
31
|
+
content?: string;
|
|
32
|
+
/** HTML tag used to render the content */
|
|
33
|
+
tag?: HeadingTagsType | null;
|
|
34
|
+
};
|
|
35
|
+
type ImageField = {
|
|
36
|
+
/** Image id */
|
|
37
|
+
id?: number;
|
|
38
|
+
/** Original image name */
|
|
39
|
+
name?: string;
|
|
40
|
+
/** Image name from the gallery */
|
|
41
|
+
title?: string;
|
|
42
|
+
/** Image description from the gallery */
|
|
43
|
+
description?: string;
|
|
44
|
+
/** Alternative text for the image */
|
|
45
|
+
alt?: string;
|
|
46
|
+
/** Image tags from the gallery */
|
|
47
|
+
tags?: Array<string>;
|
|
48
|
+
/** Griddo DAM image url */
|
|
49
|
+
url?: string;
|
|
50
|
+
/** Griddo DAM image url thumbnail */
|
|
51
|
+
thumb?: string;
|
|
52
|
+
/** Cloudinary `public-id`
|
|
53
|
+
* @deprecated
|
|
54
|
+
* Cloudinary will be deprecated in the future
|
|
55
|
+
* */
|
|
56
|
+
publicId?: string;
|
|
57
|
+
/** Griddo DAM image id
|
|
58
|
+
* @deprecated
|
|
59
|
+
* This id is internal and should not be used
|
|
60
|
+
*/
|
|
61
|
+
damId?: string;
|
|
62
|
+
/** Image publication date */
|
|
63
|
+
published?: string;
|
|
64
|
+
/** Original image size in bytes */
|
|
65
|
+
size?: number;
|
|
66
|
+
/** Original image width in pixels */
|
|
67
|
+
width?: number;
|
|
68
|
+
/** Original image height in pixels */
|
|
69
|
+
height?: number;
|
|
70
|
+
/** Original image orientation
|
|
71
|
+
* P: Portrait
|
|
72
|
+
* L: Landscape
|
|
73
|
+
* S: Square
|
|
74
|
+
*/
|
|
75
|
+
orientation?: "P" | "L" | "S";
|
|
76
|
+
/** Site to which image belongs */
|
|
77
|
+
site?: number;
|
|
78
|
+
};
|
|
79
|
+
interface LinkFieldCommon {
|
|
80
|
+
/** Link text */
|
|
81
|
+
text?: string;
|
|
82
|
+
}
|
|
83
|
+
interface LinkFieldUrl extends LinkFieldCommon {
|
|
84
|
+
linkType: "url";
|
|
85
|
+
url: UrlField;
|
|
86
|
+
}
|
|
87
|
+
interface LinkFieldModal<T> extends LinkFieldCommon {
|
|
88
|
+
linkType: "modal";
|
|
89
|
+
modal?: {
|
|
90
|
+
[key: string]: ComponentContainerField<T>;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/** Field of type link in which a whitelist of modules can be added, for example to open them in a modal. */
|
|
94
|
+
type LinkField<ModalComponents> = LinkFieldUrl | LinkFieldModal<ModalComponents>;
|
|
95
|
+
type SourceReturn = {
|
|
96
|
+
value?: number | string;
|
|
97
|
+
name?: number;
|
|
98
|
+
title?: string;
|
|
99
|
+
label?: string;
|
|
100
|
+
};
|
|
101
|
+
type MultiCheckSelectField = Array<SourceReturn>;
|
|
102
|
+
type MultiCheckSelectGroup<T extends string> = {
|
|
103
|
+
[K in T]: MultiCheckSelectField;
|
|
104
|
+
};
|
|
105
|
+
type NoteField = string;
|
|
106
|
+
type NumberField = number;
|
|
107
|
+
type RadioGroupField<OptionsValues> = OptionsValues;
|
|
108
|
+
type ReferenceField<ContentType> = {
|
|
109
|
+
mode: "auto" | "manual";
|
|
110
|
+
order: string;
|
|
111
|
+
source: ContentType extends {
|
|
112
|
+
contentTypeName: unknown;
|
|
113
|
+
} ? Array<ContentType["contentTypeName"]> : never;
|
|
114
|
+
/** 0 means all */
|
|
115
|
+
quantity: number;
|
|
116
|
+
filter: Array<{
|
|
117
|
+
id: number;
|
|
118
|
+
label: string;
|
|
119
|
+
source: string;
|
|
120
|
+
}>;
|
|
121
|
+
fullRelations: boolean;
|
|
122
|
+
};
|
|
123
|
+
type RichTextField = string;
|
|
124
|
+
type ScrollableUniqueSelectionField = string;
|
|
125
|
+
type SelectField<Values> = Values;
|
|
126
|
+
type SliderField = number;
|
|
127
|
+
type TextAreaField = string;
|
|
128
|
+
/** Return type of an TextField */
|
|
129
|
+
type TextField = string;
|
|
130
|
+
type TimeField = string;
|
|
131
|
+
type UrlField = {
|
|
132
|
+
href?: string;
|
|
133
|
+
title?: string;
|
|
134
|
+
linkToURL?: string;
|
|
135
|
+
newTab?: boolean;
|
|
136
|
+
noFollow?: boolean;
|
|
137
|
+
subSlug?: string;
|
|
138
|
+
};
|
|
139
|
+
type VisualUniqueSelectionField<Values> = Values;
|
|
140
|
+
type WysiwygField = string;
|
|
141
|
+
type Renderers = "gatsby" | "editor" | "preview";
|
|
142
|
+
type Breadcrumb = Array<{
|
|
143
|
+
path?: string;
|
|
144
|
+
label: string;
|
|
145
|
+
fullPath: string;
|
|
146
|
+
}>;
|
|
147
|
+
type ConfigBase = {
|
|
148
|
+
type?: "link" | "group";
|
|
149
|
+
headerStyle?: string;
|
|
150
|
+
footerStyle?: string;
|
|
151
|
+
};
|
|
152
|
+
type MenuItemBase = {
|
|
153
|
+
label?: string;
|
|
154
|
+
url?: UrlField;
|
|
155
|
+
auxText?: string;
|
|
156
|
+
image?: ImageField;
|
|
157
|
+
};
|
|
158
|
+
interface GroupLinkType extends ConfigBase {
|
|
159
|
+
type?: "group";
|
|
160
|
+
}
|
|
161
|
+
interface ConfigLinkType extends ConfigBase {
|
|
162
|
+
type?: "link";
|
|
163
|
+
}
|
|
164
|
+
interface MenuChildrenGroupType extends MenuItemBase {
|
|
165
|
+
url?: never;
|
|
166
|
+
config?: GroupLinkType;
|
|
167
|
+
children?: Array<MenuElement>;
|
|
168
|
+
}
|
|
169
|
+
interface MenuChildrenLinkType extends MenuItemBase {
|
|
170
|
+
config?: ConfigLinkType;
|
|
171
|
+
children?: Array<MenuElement>;
|
|
172
|
+
}
|
|
173
|
+
type MenuElement = MenuChildrenGroupType | MenuChildrenLinkType;
|
|
174
|
+
type Menu = {
|
|
175
|
+
elements: Array<MenuElement>;
|
|
176
|
+
};
|
|
177
|
+
type TemplateSection<GriddoModule> = {
|
|
178
|
+
modules: Array<GriddoModule>;
|
|
179
|
+
};
|
|
180
|
+
interface PageLanguage {
|
|
181
|
+
id: number;
|
|
182
|
+
locale: string;
|
|
183
|
+
}
|
|
184
|
+
interface SiteLanguage {
|
|
185
|
+
id: number;
|
|
186
|
+
locale: string;
|
|
187
|
+
language: string;
|
|
188
|
+
label: string;
|
|
189
|
+
isDefault: boolean;
|
|
190
|
+
}
|
|
191
|
+
interface Page {
|
|
192
|
+
language?: PageLanguage;
|
|
193
|
+
id?: number;
|
|
194
|
+
setAsHome?: boolean;
|
|
195
|
+
entity?: string;
|
|
196
|
+
site: number;
|
|
197
|
+
title: string;
|
|
198
|
+
slug: string;
|
|
199
|
+
author?: number;
|
|
200
|
+
readonly isHome?: boolean;
|
|
201
|
+
canonicalURL?: string;
|
|
202
|
+
parent?: unknown;
|
|
203
|
+
readonly component?: "Page";
|
|
204
|
+
deleted?: boolean;
|
|
205
|
+
follow?: boolean;
|
|
206
|
+
header?: unknown;
|
|
207
|
+
footer?: unknown;
|
|
208
|
+
isIndexed?: boolean;
|
|
209
|
+
liveStatus?: {
|
|
210
|
+
id: 1 | 2 | 3 | 4 | 5 | 6;
|
|
211
|
+
title: string;
|
|
212
|
+
status: "offline" | "upload-pending" | "active" | "offline-pending" | "modified" | "scheduled";
|
|
213
|
+
};
|
|
214
|
+
locale?: unknown;
|
|
215
|
+
metaDescription?: string;
|
|
216
|
+
metaTitle?: string;
|
|
217
|
+
metasAdvanced?: string;
|
|
218
|
+
socialTitle?: string;
|
|
219
|
+
socialDescription?: string;
|
|
220
|
+
socialImage?: unknown;
|
|
221
|
+
template: {
|
|
222
|
+
type?: string;
|
|
223
|
+
templateType: string;
|
|
224
|
+
[key: string]: unknown;
|
|
225
|
+
};
|
|
226
|
+
url?: string;
|
|
227
|
+
workflowStatus?: unknown;
|
|
228
|
+
modified?: string;
|
|
229
|
+
published?: string;
|
|
230
|
+
pageLanguages?: [
|
|
231
|
+
{
|
|
232
|
+
siteId: number;
|
|
233
|
+
languageId: number;
|
|
234
|
+
pageId: number;
|
|
235
|
+
title: string;
|
|
236
|
+
locale: string;
|
|
237
|
+
isLive: boolean;
|
|
238
|
+
draftFromPage: unknown;
|
|
239
|
+
url: string;
|
|
240
|
+
path: {
|
|
241
|
+
site: string;
|
|
242
|
+
domain: string;
|
|
243
|
+
domainUrl: string;
|
|
244
|
+
language: string;
|
|
245
|
+
page: string;
|
|
246
|
+
compose: string;
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
];
|
|
250
|
+
templateId?: string;
|
|
251
|
+
structuredData?: unknown;
|
|
252
|
+
readonly hash?: string;
|
|
253
|
+
origin?: string;
|
|
254
|
+
editable?: boolean;
|
|
255
|
+
manuallyImported?: boolean;
|
|
256
|
+
availableSites?: Array<{
|
|
257
|
+
id: number;
|
|
258
|
+
name: string;
|
|
259
|
+
}>;
|
|
260
|
+
canBeUnpublished?: boolean;
|
|
261
|
+
editing?: {
|
|
262
|
+
id: number;
|
|
263
|
+
name: string;
|
|
264
|
+
username: string;
|
|
265
|
+
email: string;
|
|
266
|
+
};
|
|
267
|
+
draftFromPage?: unknown;
|
|
268
|
+
haveDraftPage?: unknown;
|
|
269
|
+
liveChanged?: boolean;
|
|
270
|
+
noTranslate?: boolean;
|
|
271
|
+
dimensions?: {
|
|
272
|
+
values: unknown;
|
|
273
|
+
};
|
|
274
|
+
readonly breadcrumb?: Breadcrumb;
|
|
275
|
+
readonly path?: string;
|
|
276
|
+
readonly fullPath?: {
|
|
277
|
+
site: string;
|
|
278
|
+
domain: string;
|
|
279
|
+
domainUrl: string;
|
|
280
|
+
language: string;
|
|
281
|
+
page: string;
|
|
282
|
+
compose: string;
|
|
283
|
+
};
|
|
284
|
+
readonly fullUrl?: string;
|
|
285
|
+
templateConfig?: unknown;
|
|
286
|
+
}
|
|
287
|
+
type CloudinaryDefaults = {
|
|
288
|
+
domain: "https://res.cloudinary.com";
|
|
289
|
+
uploadFolder: "image/upload";
|
|
290
|
+
fallback404Image: "placeholders/fallback-404-image";
|
|
291
|
+
quality: "80";
|
|
292
|
+
crop: "fill";
|
|
293
|
+
gravity: "faces:center";
|
|
294
|
+
format: "auto";
|
|
295
|
+
loading: "lazy";
|
|
296
|
+
backgroundLazy: false;
|
|
297
|
+
decoding: "auto";
|
|
298
|
+
};
|
|
299
|
+
type GriddoDamDefaults = {
|
|
300
|
+
quality: number;
|
|
301
|
+
crop: ImageCropType;
|
|
302
|
+
loading: ImageLoading;
|
|
303
|
+
decoding: ImageDecoding;
|
|
304
|
+
blurSize: string;
|
|
305
|
+
blurCSSTransition: string;
|
|
306
|
+
formats: Array<ImageFormats>;
|
|
307
|
+
};
|
|
308
|
+
interface Site {
|
|
309
|
+
apiUrl?: string;
|
|
310
|
+
bigAvatar: string;
|
|
311
|
+
cloudinaryCloudName?: string;
|
|
312
|
+
cloudinaryDefaults?: CloudinaryDefaults;
|
|
313
|
+
defaultLanguage?: SiteLanguage;
|
|
314
|
+
domain: number;
|
|
315
|
+
favicon: string;
|
|
316
|
+
griddoDamDefaults?: GriddoDamDefaults;
|
|
317
|
+
name: string;
|
|
318
|
+
path: string;
|
|
319
|
+
publicApiUrl?: string;
|
|
320
|
+
renderer?: Renderers;
|
|
321
|
+
siteId?: number;
|
|
322
|
+
siteLangs?: Array<{
|
|
323
|
+
id: number;
|
|
324
|
+
locale: string;
|
|
325
|
+
language: string;
|
|
326
|
+
path: string;
|
|
327
|
+
label: string;
|
|
328
|
+
isDefault: boolean;
|
|
329
|
+
home: string;
|
|
330
|
+
domain: {
|
|
331
|
+
id: number;
|
|
332
|
+
url: string;
|
|
333
|
+
slug: string;
|
|
334
|
+
};
|
|
335
|
+
}>;
|
|
336
|
+
smallAvatar: string;
|
|
337
|
+
theme: string;
|
|
338
|
+
thumbnail: string;
|
|
339
|
+
timezone: TimeZone;
|
|
340
|
+
translations?: Record<string, unknown>;
|
|
341
|
+
}
|
|
342
|
+
type FetchPriority = "auto" | "high" | "low";
|
|
343
|
+
type ImageCropType = "cover" | "contain" | "fill" | "inside" | "outside";
|
|
344
|
+
type ImageDecoding = "auto" | "sync" | "async";
|
|
345
|
+
type ImageFormats = "avif" | "webp" | "jpeg" | "jpg" | "png" | "gif";
|
|
346
|
+
type ImageLoading = "lazy" | "eager";
|
|
347
|
+
type ImageTransform = "grayscale" | "flip" | "flop" | "blur";
|
|
348
|
+
type QueriedDataOf<ContentType> = Array<{
|
|
349
|
+
structuredData?: ContentType extends {
|
|
350
|
+
contentTypeName: unknown;
|
|
351
|
+
} ? ContentType["contentTypeName"] : never;
|
|
352
|
+
content?: Omit<ContentType, "contentTypeName">;
|
|
353
|
+
relatedPage?: {
|
|
354
|
+
pageId: number;
|
|
355
|
+
url?: string;
|
|
356
|
+
origin?: string;
|
|
357
|
+
availableSites?: Array<{
|
|
358
|
+
id?: number;
|
|
359
|
+
name?: string;
|
|
360
|
+
}>;
|
|
361
|
+
editable?: boolean;
|
|
362
|
+
manuallyImported?: boolean;
|
|
363
|
+
originalPageId?: number;
|
|
364
|
+
originalStructuredDataId?: number;
|
|
365
|
+
};
|
|
366
|
+
relatedSite?: number;
|
|
367
|
+
modified?: string;
|
|
368
|
+
published?: string;
|
|
369
|
+
}>;
|
|
370
|
+
type QueriedData<ContentType> = QueriedDataOf<ContentType>;
|
|
371
|
+
type BackgroundImageSizesProps = {
|
|
372
|
+
breakpoint: string;
|
|
373
|
+
width?: string;
|
|
374
|
+
height?: string;
|
|
375
|
+
quality?: number;
|
|
376
|
+
};
|
|
377
|
+
type ImagePosition = "top" | "right top" | "right" | "right bottom" | "bottom" | "left bottom" | "left" | "left top" | "entropy" | "attention";
|
|
378
|
+
interface GriddoCoreComponentProps {
|
|
379
|
+
component: string;
|
|
380
|
+
libComponents: {
|
|
381
|
+
[key: string]: unknown;
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
type TimeZone = "" | "Pacific/Pago_Pago" | "Pacific/Honolulu" | "America/Los_Angeles" | "America/Tijuana" | "America/Denver" | "America/Phoenix" | "America/Mazatlan" | "America/Chicago" | "America/Mexico_City" | "America/Regina" | "America/Guatemala" | "America/Bogota" | "America/New_York" | "America/Lima" | "America/Caracas" | "America/Halifax" | "America/Guyana" | "America/La_Paz" | "America/Argentina/Buenos_Aires" | "America/Godthab" | "America/Montevideo" | "America/St_Johns" | "America/Santiago" | "America/Sao_Paulo" | "Atlantic/South_Georgia" | "Atlantic/Azores" | "Atlantic/Cape_Verde" | "Africa/Casablanca" | "Europe/Dublin" | "Europe/Lisbon" | "Europe/London" | "Africa/Monrovia" | "Africa/Algiers" | "Europe/Amsterdam" | "Europe/Berlin" | "Europe/Brussels" | "Europe/Budapest" | "Europe/Belgrade" | "Europe/Prague" | "Europe/Copenhagen" | "Europe/Madrid" | "Europe/Paris" | "Europe/Rome" | "Europe/Stockholm" | "Europe/Vienna" | "Europe/Warsaw" | "Europe/Athens" | "Europe/Bucharest" | "Africa/Cairo" | "Asia/Jerusalem" | "Africa/Johannesburg" | "Europe/Helsinki" | "Europe/Kiev" | "Europe/Kaliningrad" | "Europe/Riga" | "Europe/Sofia" | "Europe/Tallinn" | "Europe/Vilnius" | "Europe/Istanbul" | "Asia/Baghdad" | "Africa/Nairobi" | "Europe/Minsk" | "Asia/Riyadh" | "Europe/Moscow" | "Asia/Tehran" | "Asia/Baku" | "Europe/Samara" | "Asia/Tbilisi" | "Asia/Yerevan" | "Asia/Kabul" | "Asia/Karachi" | "Asia/Yekaterinburg" | "Asia/Tashkent" | "Asia/Colombo" | "Asia/Almaty" | "Asia/Dhaka" | "Asia/Rangoon" | "Asia/Bangkok" | "Asia/Jakarta" | "Asia/Krasnoyarsk" | "Asia/Shanghai" | "Asia/Hong_Kong" | "Asia/Kuala_Lumpur" | "Asia/Irkutsk" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Ulaanbaatar" | "Australia/Perth" | "Asia/Yakutsk" | "Asia/Seoul" | "Asia/Tokyo" | "Australia/Darwin" | "Australia/Brisbane" | "Pacific/Guam" | "Asia/Magadan" | "Asia/Vladivostok" | "Pacific/Port_Moresby" | "Australia/Adelaide" | "Australia/Hobart" | "Australia/Sydney" | "Pacific/Guadalcanal" | "Pacific/Noumea" | "Pacific/Majuro" | "Asia/Kamchatka" | "Pacific/Auckland" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Tongatapu" | "Pacific/Apia";
|
|
385
|
+
interface Module {
|
|
386
|
+
component: string;
|
|
387
|
+
[key: string]: unknown;
|
|
388
|
+
}
|
|
389
|
+
type UseListItem<T> = Omit<T, "contentTypeName"> & {
|
|
390
|
+
id: number;
|
|
391
|
+
};
|
|
392
|
+
type UseListState<Item> = {
|
|
393
|
+
isError: {
|
|
394
|
+
code: number;
|
|
395
|
+
message: string;
|
|
396
|
+
};
|
|
397
|
+
isLoading: boolean;
|
|
398
|
+
msg: {
|
|
399
|
+
code: number;
|
|
400
|
+
msg: string;
|
|
401
|
+
};
|
|
402
|
+
query?: {
|
|
403
|
+
page: number;
|
|
404
|
+
totalItems: number;
|
|
405
|
+
items: Array<UseListItem<Item>>;
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
interface UseListSetStateAction<ContentType> {
|
|
409
|
+
data: ReferenceField<ContentType>;
|
|
410
|
+
items?: number;
|
|
411
|
+
page?: number;
|
|
412
|
+
filterIds?: Array<number>;
|
|
413
|
+
/** String array of the keys/properties you want the query restrict to.
|
|
414
|
+
* @example
|
|
415
|
+
* fields: ['title', 'image']
|
|
416
|
+
*/
|
|
417
|
+
fields?: Array<keyof Omit<ContentType, "contentTypeName">>;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * as UIFields from "./schema-functions/fields/ui-fields";
|
|
2
|
+
export * as PureDataFields from "./schema-functions/fields/pure-data-fields";
|
|
3
|
+
export * as SimpleContentTypeFields from "./schema-functions/fields/pure-data-fields";
|
|
4
|
+
export * as SimpleCTFields from "./schema-functions/fields/pure-data-fields";
|
|
5
|
+
export * as PageDataFields from "./schema-functions/fields/page-data-fields";
|
|
6
|
+
export * as PageContentTypeFields from "./schema-functions/fields/page-data-fields";
|
|
7
|
+
export * as PageCTFields from "./schema-functions/fields/page-data-fields";
|