@crayonscodetech/cms-sdk 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2689 -0
- package/dist/index.cjs +680 -0
- package/dist/index.d.cts +1112 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +1112 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +645 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +60 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,1112 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { LucideProps } from "lucide-react";
|
|
3
|
+
|
|
4
|
+
//#region src/types/pagination.d.ts
|
|
5
|
+
interface PaginationMeta {
|
|
6
|
+
page: number;
|
|
7
|
+
limit: number;
|
|
8
|
+
total: number;
|
|
9
|
+
}
|
|
10
|
+
type PaginationInfo = PaginationMeta;
|
|
11
|
+
interface PaginatedResponse<T> {
|
|
12
|
+
data: T[];
|
|
13
|
+
pagination: PaginationMeta;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/types/header.d.ts
|
|
17
|
+
interface NavGrandChild {
|
|
18
|
+
title: string;
|
|
19
|
+
url: string;
|
|
20
|
+
}
|
|
21
|
+
interface NavChild {
|
|
22
|
+
title: string;
|
|
23
|
+
url: string;
|
|
24
|
+
children?: NavGrandChild[];
|
|
25
|
+
}
|
|
26
|
+
interface NavLink {
|
|
27
|
+
title: string;
|
|
28
|
+
url: string;
|
|
29
|
+
children?: NavChild[];
|
|
30
|
+
}
|
|
31
|
+
interface Cta {
|
|
32
|
+
title: string;
|
|
33
|
+
title_url: string;
|
|
34
|
+
}
|
|
35
|
+
interface Header {
|
|
36
|
+
id: number;
|
|
37
|
+
site_id: number;
|
|
38
|
+
nav_links: NavLink[];
|
|
39
|
+
ctas: Cta[];
|
|
40
|
+
extra: Record<string, any>;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/types/footer.d.ts
|
|
44
|
+
interface FooterNavChild {
|
|
45
|
+
title: string;
|
|
46
|
+
url: string;
|
|
47
|
+
}
|
|
48
|
+
interface FooterNavGroupLink {
|
|
49
|
+
title: string;
|
|
50
|
+
url: string;
|
|
51
|
+
children: FooterNavChild[];
|
|
52
|
+
}
|
|
53
|
+
interface FooterNavGroup {
|
|
54
|
+
name: string;
|
|
55
|
+
links: FooterNavGroupLink[];
|
|
56
|
+
}
|
|
57
|
+
interface Footer {
|
|
58
|
+
id: number;
|
|
59
|
+
site_id: number;
|
|
60
|
+
nav_groups: FooterNavGroup[];
|
|
61
|
+
extra: Record<string, any>;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/types/site-config.d.ts
|
|
65
|
+
interface Branding {
|
|
66
|
+
logo_primary?: string;
|
|
67
|
+
logo_dark?: string;
|
|
68
|
+
logo_secondary?: string;
|
|
69
|
+
favicon?: string;
|
|
70
|
+
}
|
|
71
|
+
interface SocialLink {
|
|
72
|
+
site_name: string;
|
|
73
|
+
link: string;
|
|
74
|
+
}
|
|
75
|
+
interface LocationConfig {
|
|
76
|
+
location: string[];
|
|
77
|
+
google_maps_url?: string;
|
|
78
|
+
embed_map_url?: string;
|
|
79
|
+
}
|
|
80
|
+
interface WorkingHours {
|
|
81
|
+
start_time: string;
|
|
82
|
+
end_time: string;
|
|
83
|
+
active_days: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
|
|
84
|
+
}
|
|
85
|
+
interface ContactConfig {
|
|
86
|
+
phone_number: string[];
|
|
87
|
+
email: string[];
|
|
88
|
+
socials: SocialLink[];
|
|
89
|
+
location?: LocationConfig;
|
|
90
|
+
working_hours?: WorkingHours | null;
|
|
91
|
+
}
|
|
92
|
+
interface SiteConfig {
|
|
93
|
+
id: number;
|
|
94
|
+
site_id: number;
|
|
95
|
+
site_name: string;
|
|
96
|
+
site_description: string;
|
|
97
|
+
logo: Branding;
|
|
98
|
+
contact: ContactConfig;
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/types/page.d.ts
|
|
102
|
+
interface CTA {
|
|
103
|
+
type: string;
|
|
104
|
+
text: string;
|
|
105
|
+
path: string;
|
|
106
|
+
}
|
|
107
|
+
interface Image {
|
|
108
|
+
image_url: string;
|
|
109
|
+
image_alt: string;
|
|
110
|
+
}
|
|
111
|
+
interface HeroContent {
|
|
112
|
+
section_heading: string;
|
|
113
|
+
title: string;
|
|
114
|
+
subtitle: string;
|
|
115
|
+
description: string;
|
|
116
|
+
cta: CTA[];
|
|
117
|
+
video_url: string;
|
|
118
|
+
image: {
|
|
119
|
+
image_url?: string;
|
|
120
|
+
image_alt?: string;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
interface CustomContent {
|
|
124
|
+
tag: string | null;
|
|
125
|
+
logo: string | null;
|
|
126
|
+
section_title: string | null;
|
|
127
|
+
card_title: string;
|
|
128
|
+
card_content: string;
|
|
129
|
+
card_content_bold?: boolean | null;
|
|
130
|
+
cta?: CTA;
|
|
131
|
+
image_src: string;
|
|
132
|
+
image_src_two?: string | null;
|
|
133
|
+
signature: string | null;
|
|
134
|
+
reverse: boolean | null;
|
|
135
|
+
image_style: string | null;
|
|
136
|
+
small_image: boolean | null;
|
|
137
|
+
subtitle?: string | null;
|
|
138
|
+
external_link: boolean;
|
|
139
|
+
stats?: Array<{
|
|
140
|
+
value: string;
|
|
141
|
+
label: string;
|
|
142
|
+
prefix?: string | null;
|
|
143
|
+
suffix?: string | null;
|
|
144
|
+
icon?: string | null;
|
|
145
|
+
}>;
|
|
146
|
+
}
|
|
147
|
+
interface CTAContent {
|
|
148
|
+
section_heading: string;
|
|
149
|
+
title: string;
|
|
150
|
+
subtitle?: string;
|
|
151
|
+
description: string;
|
|
152
|
+
cta: CTA[];
|
|
153
|
+
image: Image[];
|
|
154
|
+
footer_text?: string;
|
|
155
|
+
}
|
|
156
|
+
interface TestimonialsSection {
|
|
157
|
+
section_heading: string;
|
|
158
|
+
title: string;
|
|
159
|
+
subtitle: string;
|
|
160
|
+
type: string;
|
|
161
|
+
}
|
|
162
|
+
interface ServicesSection {
|
|
163
|
+
section_heading: string;
|
|
164
|
+
title: string;
|
|
165
|
+
subtitle: string;
|
|
166
|
+
}
|
|
167
|
+
interface GenericSection {
|
|
168
|
+
section_heading: string | null;
|
|
169
|
+
title: string;
|
|
170
|
+
subtitle: string | null;
|
|
171
|
+
}
|
|
172
|
+
interface BlogSection extends GenericSection {
|
|
173
|
+
link?: string | null;
|
|
174
|
+
is_external?: boolean | null;
|
|
175
|
+
}
|
|
176
|
+
interface ClientsSection extends GenericSection {
|
|
177
|
+
brand_group_id: string;
|
|
178
|
+
}
|
|
179
|
+
interface FaqSection extends GenericSection {
|
|
180
|
+
group_id: string;
|
|
181
|
+
}
|
|
182
|
+
interface TeamSection extends GenericSection {
|
|
183
|
+
team_category_id: string;
|
|
184
|
+
}
|
|
185
|
+
interface GallerySection extends GenericSection {
|
|
186
|
+
album_id: string;
|
|
187
|
+
}
|
|
188
|
+
interface RichContentSection {
|
|
189
|
+
section_heading: string;
|
|
190
|
+
title: string;
|
|
191
|
+
subtitle: string;
|
|
192
|
+
content: string;
|
|
193
|
+
}
|
|
194
|
+
interface AboutSection {
|
|
195
|
+
section_heading: string;
|
|
196
|
+
title: string;
|
|
197
|
+
cta: CTA[];
|
|
198
|
+
}
|
|
199
|
+
interface MultiValueItem {
|
|
200
|
+
title: string;
|
|
201
|
+
description: string;
|
|
202
|
+
image: Image;
|
|
203
|
+
cta?: Partial<CTA>;
|
|
204
|
+
badge?: string | null;
|
|
205
|
+
icon?: string | null;
|
|
206
|
+
}
|
|
207
|
+
interface MultiValueSection {
|
|
208
|
+
section_heading: string;
|
|
209
|
+
title: string;
|
|
210
|
+
subtitle?: string;
|
|
211
|
+
description: string;
|
|
212
|
+
image?: Image | null;
|
|
213
|
+
values: MultiValueItem[];
|
|
214
|
+
}
|
|
215
|
+
interface MarqueeItem {
|
|
216
|
+
text?: string | null;
|
|
217
|
+
image?: string | null;
|
|
218
|
+
link?: string | null;
|
|
219
|
+
is_external?: boolean | null;
|
|
220
|
+
}
|
|
221
|
+
interface MarqueeSection {
|
|
222
|
+
section_heading: string;
|
|
223
|
+
title: string;
|
|
224
|
+
subtitle?: string;
|
|
225
|
+
items: MarqueeItem[];
|
|
226
|
+
}
|
|
227
|
+
interface HistoryItem {
|
|
228
|
+
year: string;
|
|
229
|
+
title: string;
|
|
230
|
+
badge?: string | null;
|
|
231
|
+
description?: string | null;
|
|
232
|
+
image?: string | null;
|
|
233
|
+
link?: string | null;
|
|
234
|
+
is_external?: boolean | null;
|
|
235
|
+
}
|
|
236
|
+
interface HistorySection {
|
|
237
|
+
section_heading: string;
|
|
238
|
+
title: string;
|
|
239
|
+
subtitle?: string;
|
|
240
|
+
items: HistoryItem[];
|
|
241
|
+
}
|
|
242
|
+
type ProductSectionFilter = "collection" | "tag" | "category";
|
|
243
|
+
interface ProductsSection {
|
|
244
|
+
section_heading?: string | null;
|
|
245
|
+
title: string;
|
|
246
|
+
subtitle?: string | null;
|
|
247
|
+
filter?: ProductSectionFilter;
|
|
248
|
+
collection_id?: string | null;
|
|
249
|
+
category_id?: string | null;
|
|
250
|
+
tag_id?: string | null;
|
|
251
|
+
limit: number;
|
|
252
|
+
}
|
|
253
|
+
interface CollectionGroupSection {
|
|
254
|
+
section_heading?: string | null;
|
|
255
|
+
title: string;
|
|
256
|
+
subtitle?: string | null;
|
|
257
|
+
collection_groups: string[];
|
|
258
|
+
}
|
|
259
|
+
type Section = {
|
|
260
|
+
id: string;
|
|
261
|
+
variant?: string | null;
|
|
262
|
+
type: "hero";
|
|
263
|
+
content: HeroContent[];
|
|
264
|
+
} | {
|
|
265
|
+
id: string;
|
|
266
|
+
variant?: string | null;
|
|
267
|
+
type: "custom";
|
|
268
|
+
content: CustomContent;
|
|
269
|
+
} | {
|
|
270
|
+
id: string;
|
|
271
|
+
variant?: string | null;
|
|
272
|
+
type: "cta";
|
|
273
|
+
content: CTAContent;
|
|
274
|
+
} | {
|
|
275
|
+
id: string;
|
|
276
|
+
variant?: string | null;
|
|
277
|
+
type: "testimonial";
|
|
278
|
+
content: TestimonialsSection;
|
|
279
|
+
} | {
|
|
280
|
+
id: string;
|
|
281
|
+
variant?: string | null;
|
|
282
|
+
type: "service";
|
|
283
|
+
content: ServicesSection;
|
|
284
|
+
} | {
|
|
285
|
+
id: string;
|
|
286
|
+
variant?: string | null;
|
|
287
|
+
type: "multi-value";
|
|
288
|
+
content: MultiValueSection;
|
|
289
|
+
} | {
|
|
290
|
+
id: string;
|
|
291
|
+
variant?: string | null;
|
|
292
|
+
type: "team";
|
|
293
|
+
content: TeamSection;
|
|
294
|
+
} | {
|
|
295
|
+
id: string;
|
|
296
|
+
variant?: string | null;
|
|
297
|
+
type: "clients";
|
|
298
|
+
content: ClientsSection;
|
|
299
|
+
} | {
|
|
300
|
+
id: string;
|
|
301
|
+
variant?: string | null;
|
|
302
|
+
type: "gallery";
|
|
303
|
+
content: GallerySection;
|
|
304
|
+
} | {
|
|
305
|
+
id: string;
|
|
306
|
+
variant?: string | null;
|
|
307
|
+
type: "event";
|
|
308
|
+
content: GenericSection;
|
|
309
|
+
} | {
|
|
310
|
+
id: string;
|
|
311
|
+
variant?: string | null;
|
|
312
|
+
type: "blog";
|
|
313
|
+
content: BlogSection;
|
|
314
|
+
} | {
|
|
315
|
+
id: string;
|
|
316
|
+
variant?: string | null;
|
|
317
|
+
type: "rich-content";
|
|
318
|
+
content: RichContentSection;
|
|
319
|
+
} | {
|
|
320
|
+
id: string;
|
|
321
|
+
variant?: string | null;
|
|
322
|
+
type: "about";
|
|
323
|
+
content: AboutSection;
|
|
324
|
+
} | {
|
|
325
|
+
id: string;
|
|
326
|
+
variant?: string | null;
|
|
327
|
+
type: "faq";
|
|
328
|
+
content: FaqSection;
|
|
329
|
+
} | {
|
|
330
|
+
id: string;
|
|
331
|
+
variant?: string | null;
|
|
332
|
+
type: "marquee";
|
|
333
|
+
content: MarqueeSection;
|
|
334
|
+
} | {
|
|
335
|
+
id: string;
|
|
336
|
+
variant?: string | null;
|
|
337
|
+
type: "history";
|
|
338
|
+
content: HistorySection;
|
|
339
|
+
} | {
|
|
340
|
+
id: string;
|
|
341
|
+
variant?: string | null;
|
|
342
|
+
type: "products";
|
|
343
|
+
content: ProductsSection;
|
|
344
|
+
} | {
|
|
345
|
+
id: string;
|
|
346
|
+
variant?: string | null;
|
|
347
|
+
type: "collection-group";
|
|
348
|
+
content: CollectionGroupSection;
|
|
349
|
+
};
|
|
350
|
+
interface SEO {
|
|
351
|
+
title: string;
|
|
352
|
+
description: string;
|
|
353
|
+
tags: string[];
|
|
354
|
+
image?: string | null;
|
|
355
|
+
}
|
|
356
|
+
interface Page {
|
|
357
|
+
id: string;
|
|
358
|
+
site_id: string;
|
|
359
|
+
url: string;
|
|
360
|
+
title: string;
|
|
361
|
+
subtitle: string | null;
|
|
362
|
+
sections: Section[];
|
|
363
|
+
page_type: string;
|
|
364
|
+
status: "draft" | "published" | "archived";
|
|
365
|
+
seo: SEO | null;
|
|
366
|
+
settings: Record<string, any> | null;
|
|
367
|
+
created_at: string;
|
|
368
|
+
updated_at: string;
|
|
369
|
+
}
|
|
370
|
+
type PageListItem = Omit<Page, "sections">;
|
|
371
|
+
//#endregion
|
|
372
|
+
//#region src/types/about.d.ts
|
|
373
|
+
interface AboutValue {
|
|
374
|
+
image: any;
|
|
375
|
+
icon: string;
|
|
376
|
+
title: string;
|
|
377
|
+
description: string;
|
|
378
|
+
}
|
|
379
|
+
interface AboutStat {
|
|
380
|
+
label: string;
|
|
381
|
+
value: string;
|
|
382
|
+
}
|
|
383
|
+
interface AboutUsData {
|
|
384
|
+
id: string;
|
|
385
|
+
site_id: string;
|
|
386
|
+
company_profile_summary?: string | null;
|
|
387
|
+
company_profile: string;
|
|
388
|
+
vision?: string | null;
|
|
389
|
+
mission?: string | null;
|
|
390
|
+
image_url: string;
|
|
391
|
+
image_alt: string;
|
|
392
|
+
video_url?: string | null;
|
|
393
|
+
founding_year?: string | null;
|
|
394
|
+
values: AboutValue[];
|
|
395
|
+
stats?: AboutStat[] | null;
|
|
396
|
+
extra?: Record<string, unknown> | null;
|
|
397
|
+
}
|
|
398
|
+
//#endregion
|
|
399
|
+
//#region src/types/service.d.ts
|
|
400
|
+
interface Service {
|
|
401
|
+
id: string;
|
|
402
|
+
site_id: string;
|
|
403
|
+
title: string;
|
|
404
|
+
slug: string;
|
|
405
|
+
excerpt?: string | null;
|
|
406
|
+
description: string;
|
|
407
|
+
image_url?: string | null;
|
|
408
|
+
image_alt?: string | null;
|
|
409
|
+
icon?: string | null;
|
|
410
|
+
features: string[];
|
|
411
|
+
link_text?: string | null;
|
|
412
|
+
link_url?: string | null;
|
|
413
|
+
order: number;
|
|
414
|
+
created_at: string;
|
|
415
|
+
updated_at: string;
|
|
416
|
+
extra?: {
|
|
417
|
+
sections: Section[];
|
|
418
|
+
} | null;
|
|
419
|
+
}
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region src/types/blog.d.ts
|
|
422
|
+
interface Blog {
|
|
423
|
+
id: string;
|
|
424
|
+
site_id: string;
|
|
425
|
+
slug: string;
|
|
426
|
+
title: string;
|
|
427
|
+
image_url?: string | null;
|
|
428
|
+
image_alt?: string | null;
|
|
429
|
+
author: string;
|
|
430
|
+
description?: string | null;
|
|
431
|
+
excerpt?: string | null;
|
|
432
|
+
is_published: boolean;
|
|
433
|
+
published_at?: string | null;
|
|
434
|
+
created_at: string;
|
|
435
|
+
updated_at: string;
|
|
436
|
+
order: number;
|
|
437
|
+
seo_title?: string | null;
|
|
438
|
+
seo_description?: string | null;
|
|
439
|
+
seo_keywords?: any | null;
|
|
440
|
+
seo_image?: string | null;
|
|
441
|
+
extra?: {
|
|
442
|
+
sections: Section[];
|
|
443
|
+
cta?: {
|
|
444
|
+
text: string | null;
|
|
445
|
+
url: string | null;
|
|
446
|
+
is_external: boolean | null;
|
|
447
|
+
} | null;
|
|
448
|
+
} | null;
|
|
449
|
+
}
|
|
450
|
+
//#endregion
|
|
451
|
+
//#region src/types/category.d.ts
|
|
452
|
+
interface Category {
|
|
453
|
+
id: string;
|
|
454
|
+
site_id: string;
|
|
455
|
+
name: string;
|
|
456
|
+
slug: string;
|
|
457
|
+
description?: string;
|
|
458
|
+
order: number;
|
|
459
|
+
extra?: Record<string, unknown>;
|
|
460
|
+
created_at: string;
|
|
461
|
+
updated_at: string;
|
|
462
|
+
}
|
|
463
|
+
//#endregion
|
|
464
|
+
//#region src/types/team-member.d.ts
|
|
465
|
+
interface Social {
|
|
466
|
+
platform?: string;
|
|
467
|
+
url?: string;
|
|
468
|
+
}
|
|
469
|
+
interface TeamMember {
|
|
470
|
+
id: string;
|
|
471
|
+
site_id: string;
|
|
472
|
+
category_id: string;
|
|
473
|
+
name: string;
|
|
474
|
+
slug: string;
|
|
475
|
+
position?: string;
|
|
476
|
+
description?: string;
|
|
477
|
+
profile_image?: string;
|
|
478
|
+
email?: string;
|
|
479
|
+
location?: string;
|
|
480
|
+
socials?: Social[];
|
|
481
|
+
is_published: boolean;
|
|
482
|
+
order: number;
|
|
483
|
+
extra?: Record<string, unknown>;
|
|
484
|
+
created_at: string;
|
|
485
|
+
updated_at: string;
|
|
486
|
+
}
|
|
487
|
+
//#endregion
|
|
488
|
+
//#region src/types/album.d.ts
|
|
489
|
+
interface Album {
|
|
490
|
+
id: string;
|
|
491
|
+
site_id: string;
|
|
492
|
+
title: string;
|
|
493
|
+
slug: string;
|
|
494
|
+
description: string | null;
|
|
495
|
+
cover_image_url: string | null;
|
|
496
|
+
cover_image_alt: string | null;
|
|
497
|
+
is_published: boolean;
|
|
498
|
+
order: number;
|
|
499
|
+
seo_title: string | null;
|
|
500
|
+
seo_description: string | null;
|
|
501
|
+
seo_keywords: any | null;
|
|
502
|
+
created_at: string;
|
|
503
|
+
updated_at: string;
|
|
504
|
+
items?: AlbumItem[];
|
|
505
|
+
extra?: any;
|
|
506
|
+
}
|
|
507
|
+
interface AlbumItem {
|
|
508
|
+
id: string;
|
|
509
|
+
album_id: string;
|
|
510
|
+
image_url: string;
|
|
511
|
+
image_alt: string | null;
|
|
512
|
+
caption: string | null;
|
|
513
|
+
order: number;
|
|
514
|
+
created_at: string;
|
|
515
|
+
updated_at: string;
|
|
516
|
+
}
|
|
517
|
+
//#endregion
|
|
518
|
+
//#region src/types/brand.d.ts
|
|
519
|
+
interface BrandGroup {
|
|
520
|
+
id: string;
|
|
521
|
+
site_id: string;
|
|
522
|
+
title: string;
|
|
523
|
+
slug: string;
|
|
524
|
+
description: string | null;
|
|
525
|
+
is_published: boolean;
|
|
526
|
+
order: number;
|
|
527
|
+
created_at: string;
|
|
528
|
+
updated_at: string;
|
|
529
|
+
extra?: any;
|
|
530
|
+
brands?: Brand[];
|
|
531
|
+
}
|
|
532
|
+
interface Brand {
|
|
533
|
+
id: string;
|
|
534
|
+
brand_group_id: string;
|
|
535
|
+
name: string;
|
|
536
|
+
description: string | null;
|
|
537
|
+
website_url: string | null;
|
|
538
|
+
logo_url: string;
|
|
539
|
+
logo_alt: string | null;
|
|
540
|
+
order: number;
|
|
541
|
+
created_at: string;
|
|
542
|
+
updated_at: string;
|
|
543
|
+
}
|
|
544
|
+
//#endregion
|
|
545
|
+
//#region src/types/testimonials.d.ts
|
|
546
|
+
interface Testimonial {
|
|
547
|
+
id: string;
|
|
548
|
+
site_id: string;
|
|
549
|
+
quote: string;
|
|
550
|
+
sub_text: string | null;
|
|
551
|
+
name: string;
|
|
552
|
+
position: string | null;
|
|
553
|
+
company: string | null;
|
|
554
|
+
rating: number | null;
|
|
555
|
+
type: string;
|
|
556
|
+
image_url: string | null;
|
|
557
|
+
image_alt: string | null;
|
|
558
|
+
order: number;
|
|
559
|
+
is_published: boolean;
|
|
560
|
+
created_at: string;
|
|
561
|
+
updated_at: string;
|
|
562
|
+
extra: any | null;
|
|
563
|
+
}
|
|
564
|
+
//#endregion
|
|
565
|
+
//#region src/types/event.d.ts
|
|
566
|
+
interface Event {
|
|
567
|
+
id: string;
|
|
568
|
+
site_id: string;
|
|
569
|
+
slug: string;
|
|
570
|
+
title: string;
|
|
571
|
+
organizer_name?: string | null;
|
|
572
|
+
organizer_email?: string | null;
|
|
573
|
+
start_date: string;
|
|
574
|
+
end_date?: string | null;
|
|
575
|
+
time?: string | null;
|
|
576
|
+
location_name?: string | null;
|
|
577
|
+
address?: string | null;
|
|
578
|
+
link?: string | null;
|
|
579
|
+
image_url?: string | null;
|
|
580
|
+
image_alt?: string | null;
|
|
581
|
+
description?: string | null;
|
|
582
|
+
excerpt?: string | null;
|
|
583
|
+
status?: string | null;
|
|
584
|
+
is_published: boolean;
|
|
585
|
+
published_at?: string | null;
|
|
586
|
+
created_at: string;
|
|
587
|
+
updated_at: string;
|
|
588
|
+
order: number;
|
|
589
|
+
seo_title?: string | null;
|
|
590
|
+
seo_description?: string | null;
|
|
591
|
+
seo_keywords?: any | null;
|
|
592
|
+
seo_image?: string | null;
|
|
593
|
+
extra?: {
|
|
594
|
+
sections: Section[];
|
|
595
|
+
} | null;
|
|
596
|
+
}
|
|
597
|
+
//#endregion
|
|
598
|
+
//#region src/types/faq.d.ts
|
|
599
|
+
interface Faq {
|
|
600
|
+
id: string;
|
|
601
|
+
group_id: string;
|
|
602
|
+
question: string;
|
|
603
|
+
answer: string;
|
|
604
|
+
order: number;
|
|
605
|
+
is_published: boolean;
|
|
606
|
+
created_at: string;
|
|
607
|
+
updated_at: string;
|
|
608
|
+
}
|
|
609
|
+
//#endregion
|
|
610
|
+
//#region src/types/faq-group.d.ts
|
|
611
|
+
interface FaqGroup {
|
|
612
|
+
id: string;
|
|
613
|
+
site_id: string;
|
|
614
|
+
title: string;
|
|
615
|
+
description: string | null;
|
|
616
|
+
order: number;
|
|
617
|
+
faqs: Faq[];
|
|
618
|
+
created_at: string;
|
|
619
|
+
updated_at: string;
|
|
620
|
+
}
|
|
621
|
+
//#endregion
|
|
622
|
+
//#region src/types/redirect.d.ts
|
|
623
|
+
type RedirectStatusCode = 301 | 302 | 307 | 308;
|
|
624
|
+
interface Redirect {
|
|
625
|
+
id: string;
|
|
626
|
+
site_id: string;
|
|
627
|
+
source_path: string;
|
|
628
|
+
destination_path: string;
|
|
629
|
+
status_code: RedirectStatusCode;
|
|
630
|
+
group?: string | null;
|
|
631
|
+
enabled: boolean;
|
|
632
|
+
created_at: string;
|
|
633
|
+
updated_at: string;
|
|
634
|
+
}
|
|
635
|
+
interface ResolvedRedirect {
|
|
636
|
+
redirect: Redirect;
|
|
637
|
+
destinationPath: string;
|
|
638
|
+
params: Record<string, string>;
|
|
639
|
+
type: "manual" | "pattern";
|
|
640
|
+
}
|
|
641
|
+
interface Redirect404Log {
|
|
642
|
+
id: string;
|
|
643
|
+
site_id: string;
|
|
644
|
+
source_path: string;
|
|
645
|
+
hit_count: number;
|
|
646
|
+
last_referrer?: string | null;
|
|
647
|
+
last_user_agent?: string | null;
|
|
648
|
+
first_seen_at: string;
|
|
649
|
+
last_seen_at: string;
|
|
650
|
+
}
|
|
651
|
+
//#endregion
|
|
652
|
+
//#region src/types/contact.d.ts
|
|
653
|
+
interface ContactPayload {
|
|
654
|
+
name: string;
|
|
655
|
+
email?: string | null;
|
|
656
|
+
subject?: string | null;
|
|
657
|
+
message: string;
|
|
658
|
+
type?: string;
|
|
659
|
+
}
|
|
660
|
+
interface Contact extends ContactPayload {
|
|
661
|
+
id: string;
|
|
662
|
+
site_id: string;
|
|
663
|
+
is_read: boolean;
|
|
664
|
+
created_at: string;
|
|
665
|
+
updated_at: string;
|
|
666
|
+
}
|
|
667
|
+
//#endregion
|
|
668
|
+
//#region src/types/seo.d.ts
|
|
669
|
+
interface ProductSEO {
|
|
670
|
+
title?: string | null;
|
|
671
|
+
description?: string | null;
|
|
672
|
+
tags?: string[] | null;
|
|
673
|
+
}
|
|
674
|
+
interface ProductExtraData extends Record<string, unknown> {}
|
|
675
|
+
//#endregion
|
|
676
|
+
//#region src/types/product.d.ts
|
|
677
|
+
type ProductStatus = "draft" | "published" | "archived" | "out_of_stock";
|
|
678
|
+
interface ProductImage {
|
|
679
|
+
id: string;
|
|
680
|
+
variant_id: string;
|
|
681
|
+
url: string;
|
|
682
|
+
alt_text: string | null;
|
|
683
|
+
order: number;
|
|
684
|
+
created_at: string;
|
|
685
|
+
updated_at: string;
|
|
686
|
+
}
|
|
687
|
+
interface ProductVariant {
|
|
688
|
+
id: string;
|
|
689
|
+
product_id: string;
|
|
690
|
+
site_id: string;
|
|
691
|
+
sku: string;
|
|
692
|
+
name: string | null;
|
|
693
|
+
model_number: string | null;
|
|
694
|
+
order: number;
|
|
695
|
+
price: number;
|
|
696
|
+
sale_price?: number | null;
|
|
697
|
+
cost_price?: number | null;
|
|
698
|
+
inventory: number;
|
|
699
|
+
weight: number | null;
|
|
700
|
+
attributes?: Record<string, string>;
|
|
701
|
+
features?: string[];
|
|
702
|
+
specifications?: Record<string, Record<string, string>>;
|
|
703
|
+
included_items?: string[];
|
|
704
|
+
created_at: string;
|
|
705
|
+
updated_at: string;
|
|
706
|
+
deleted_at?: string | null;
|
|
707
|
+
images: ProductImage[];
|
|
708
|
+
}
|
|
709
|
+
type PublicProductVariant = Omit<ProductVariant, "inventory"> & {
|
|
710
|
+
inventory: boolean;
|
|
711
|
+
low_stock: boolean;
|
|
712
|
+
};
|
|
713
|
+
type ProductVariantListItem = Pick<PublicProductVariant, "id" | "sku" | "name" | "price" | "sale_price" | "inventory" | "low_stock" | "order">;
|
|
714
|
+
interface ProductListItem {
|
|
715
|
+
id: string;
|
|
716
|
+
site_id: string;
|
|
717
|
+
category_id: string;
|
|
718
|
+
brand_id: string | null;
|
|
719
|
+
name: string;
|
|
720
|
+
slug: string;
|
|
721
|
+
subtitle: string | null;
|
|
722
|
+
status: ProductStatus;
|
|
723
|
+
is_featured: boolean;
|
|
724
|
+
thumbnail_url: string | null;
|
|
725
|
+
seo: ProductSEO | null;
|
|
726
|
+
extra: ProductExtraData | null;
|
|
727
|
+
created_at: string;
|
|
728
|
+
variants?: ProductVariantListItem[];
|
|
729
|
+
}
|
|
730
|
+
interface Product extends Omit<ProductListItem, "variants"> {
|
|
731
|
+
description: string;
|
|
732
|
+
needs_shipping: boolean;
|
|
733
|
+
metadata: unknown;
|
|
734
|
+
deleted_at: string | null;
|
|
735
|
+
updated_at: string;
|
|
736
|
+
variants?: PublicProductVariant[];
|
|
737
|
+
}
|
|
738
|
+
//#endregion
|
|
739
|
+
//#region src/types/product-category.d.ts
|
|
740
|
+
interface ProductCategory {
|
|
741
|
+
id: string;
|
|
742
|
+
site_id: string;
|
|
743
|
+
parent_id: string | null;
|
|
744
|
+
name: string;
|
|
745
|
+
slug: string;
|
|
746
|
+
description: string | null;
|
|
747
|
+
image_url: string | null;
|
|
748
|
+
seo: ProductSEO | null;
|
|
749
|
+
extra: ProductExtraData | null;
|
|
750
|
+
order: number;
|
|
751
|
+
created_at: string;
|
|
752
|
+
updated_at: string;
|
|
753
|
+
}
|
|
754
|
+
//#endregion
|
|
755
|
+
//#region src/types/product-brand.d.ts
|
|
756
|
+
interface ProductBrand {
|
|
757
|
+
id: string;
|
|
758
|
+
site_id: string;
|
|
759
|
+
name: string;
|
|
760
|
+
slug: string;
|
|
761
|
+
description: string | null;
|
|
762
|
+
logo_url: string | null;
|
|
763
|
+
seo: ProductSEO | null;
|
|
764
|
+
extra: ProductExtraData | null;
|
|
765
|
+
created_at: string;
|
|
766
|
+
updated_at: string;
|
|
767
|
+
}
|
|
768
|
+
//#endregion
|
|
769
|
+
//#region src/types/collection.d.ts
|
|
770
|
+
interface CollectionItem {
|
|
771
|
+
id: string;
|
|
772
|
+
collection_id: string;
|
|
773
|
+
product_id: string;
|
|
774
|
+
order: number;
|
|
775
|
+
product: Product;
|
|
776
|
+
}
|
|
777
|
+
interface CollectionListItem {
|
|
778
|
+
id: string;
|
|
779
|
+
site_id: string;
|
|
780
|
+
name: string;
|
|
781
|
+
slug: string;
|
|
782
|
+
description: string | null;
|
|
783
|
+
image_url?: string | null;
|
|
784
|
+
is_published: boolean;
|
|
785
|
+
collection_type: "manual" | "smart";
|
|
786
|
+
seo: ProductSEO | null;
|
|
787
|
+
extra: ProductExtraData | null;
|
|
788
|
+
order: number;
|
|
789
|
+
created_at: string;
|
|
790
|
+
updated_at: string;
|
|
791
|
+
_count?: {
|
|
792
|
+
items: number;
|
|
793
|
+
};
|
|
794
|
+
}
|
|
795
|
+
interface CollectionDetail extends Omit<CollectionListItem, "_count"> {
|
|
796
|
+
items: CollectionItem[];
|
|
797
|
+
pagination?: PaginatedResponse<never>["pagination"];
|
|
798
|
+
}
|
|
799
|
+
type Collection = CollectionListItem;
|
|
800
|
+
//#endregion
|
|
801
|
+
//#region src/types/order.d.ts
|
|
802
|
+
type OrderStatus = "pending" | "processing" | "shipped" | "delivered" | "canceled" | "returned";
|
|
803
|
+
interface ShippingAddress {
|
|
804
|
+
line1: string;
|
|
805
|
+
city: string;
|
|
806
|
+
zip: string;
|
|
807
|
+
country: string;
|
|
808
|
+
}
|
|
809
|
+
interface OrderItem {
|
|
810
|
+
id: string;
|
|
811
|
+
order_id: string;
|
|
812
|
+
product_variant_id: string;
|
|
813
|
+
product_name: string;
|
|
814
|
+
variant_name: string | null;
|
|
815
|
+
thumbnail_url: string | null;
|
|
816
|
+
quantity: number;
|
|
817
|
+
unit_price: number;
|
|
818
|
+
total_price: number;
|
|
819
|
+
discount: number | null;
|
|
820
|
+
created_at: string;
|
|
821
|
+
updated_at: string;
|
|
822
|
+
}
|
|
823
|
+
interface Order {
|
|
824
|
+
id: string;
|
|
825
|
+
site_id: string;
|
|
826
|
+
customer_name: string;
|
|
827
|
+
customer_email: string;
|
|
828
|
+
customer_phone: string | null;
|
|
829
|
+
shipping_address: ShippingAddress;
|
|
830
|
+
status: OrderStatus;
|
|
831
|
+
total_amount: number;
|
|
832
|
+
discount: number | null;
|
|
833
|
+
notes: string | null;
|
|
834
|
+
metadata: unknown;
|
|
835
|
+
deleted_at: string | null;
|
|
836
|
+
created_at: string;
|
|
837
|
+
updated_at: string;
|
|
838
|
+
items: OrderItem[];
|
|
839
|
+
}
|
|
840
|
+
interface PlaceOrderPayload {
|
|
841
|
+
customer_name: string;
|
|
842
|
+
customer_email: string;
|
|
843
|
+
shipping_address: ShippingAddress;
|
|
844
|
+
items: Array<{
|
|
845
|
+
product_variant_id: string;
|
|
846
|
+
quantity: number;
|
|
847
|
+
}>;
|
|
848
|
+
customer_phone?: string | null;
|
|
849
|
+
notes?: string | null;
|
|
850
|
+
discount?: number | null;
|
|
851
|
+
metadata?: unknown;
|
|
852
|
+
}
|
|
853
|
+
interface CartItem {
|
|
854
|
+
variant: ProductVariant;
|
|
855
|
+
product: Product;
|
|
856
|
+
quantity: number;
|
|
857
|
+
}
|
|
858
|
+
//#endregion
|
|
859
|
+
//#region src/types/store-setting.d.ts
|
|
860
|
+
interface StoreSettings {
|
|
861
|
+
currency: string;
|
|
862
|
+
price_visibility: boolean;
|
|
863
|
+
}
|
|
864
|
+
//#endregion
|
|
865
|
+
//#region src/core/client.d.ts
|
|
866
|
+
interface FetchOptions extends RequestInit {
|
|
867
|
+
revalidate?: number;
|
|
868
|
+
tags?: string[];
|
|
869
|
+
}
|
|
870
|
+
interface CmsClientConfig {
|
|
871
|
+
baseUrl: string;
|
|
872
|
+
defaultOptions?: FetchOptions;
|
|
873
|
+
}
|
|
874
|
+
declare class CmsError extends Error {
|
|
875
|
+
message: string;
|
|
876
|
+
status?: number | undefined;
|
|
877
|
+
url?: string | undefined;
|
|
878
|
+
constructor(message: string, status?: number | undefined, url?: string | undefined);
|
|
879
|
+
}
|
|
880
|
+
declare function createCmsClient(config: CmsClientConfig): {
|
|
881
|
+
fetchHeader: (siteId: string, options?: FetchOptions) => Promise<Header | null>;
|
|
882
|
+
fetchFooter: (siteId: string, options?: FetchOptions) => Promise<Footer | null>;
|
|
883
|
+
fetchSiteConfig: (siteId: string, options?: FetchOptions) => Promise<SiteConfig | null>;
|
|
884
|
+
fetchPages: (siteId: string, params?: {
|
|
885
|
+
page?: number;
|
|
886
|
+
}, options?: FetchOptions) => Promise<PaginatedResponse<PageListItem>>;
|
|
887
|
+
fetchPageByUrl: (siteId: string, urlPath: string, options?: FetchOptions) => Promise<Page | null>;
|
|
888
|
+
fetchAboutUs: (siteId: string, options?: FetchOptions) => Promise<AboutUsData | null>;
|
|
889
|
+
fetchServices: (siteId: string, options?: FetchOptions) => Promise<Service[]>;
|
|
890
|
+
fetchServiceById: (siteId: string, id: string, options?: FetchOptions) => Promise<Service | null>;
|
|
891
|
+
fetchBlogs: (siteId: string, params?: {
|
|
892
|
+
page?: number;
|
|
893
|
+
limit?: number;
|
|
894
|
+
search?: string;
|
|
895
|
+
}, options?: FetchOptions) => Promise<PaginatedResponse<Blog>>;
|
|
896
|
+
fetchBlogBySlug: (siteId: string, slug: string, options?: FetchOptions) => Promise<Blog | null>;
|
|
897
|
+
fetchBlogById: (siteId: string, idOrSlug: number | string, options?: FetchOptions) => Promise<Blog | null>;
|
|
898
|
+
fetchCategories: (siteId: string, options?: FetchOptions) => Promise<Category[]>;
|
|
899
|
+
fetchTeamMembers: (siteId: string, options?: FetchOptions) => Promise<TeamMember[]>;
|
|
900
|
+
fetchTeamMembersByCategory: (siteId: string, categoryId: string, options?: FetchOptions) => Promise<TeamMember[]>;
|
|
901
|
+
fetchAlbums: (siteId: string, params?: {
|
|
902
|
+
page?: number;
|
|
903
|
+
limit?: number;
|
|
904
|
+
search?: string;
|
|
905
|
+
}, options?: FetchOptions) => Promise<PaginatedResponse<Album>>;
|
|
906
|
+
fetchAlbumItems: (siteId: string, params: {
|
|
907
|
+
album?: string;
|
|
908
|
+
album_id?: string;
|
|
909
|
+
}, options?: FetchOptions) => Promise<AlbumItem[]>;
|
|
910
|
+
fetchBrandGroups: (siteId: string, options?: FetchOptions) => Promise<BrandGroup[]>;
|
|
911
|
+
fetchBrands: (siteId: string, params: {
|
|
912
|
+
group?: string;
|
|
913
|
+
group_id?: string;
|
|
914
|
+
}, options?: FetchOptions) => Promise<Brand[]>;
|
|
915
|
+
fetchTestimonials: (siteId: string, params?: {
|
|
916
|
+
type?: "testimonial" | "review" | string;
|
|
917
|
+
}, options?: FetchOptions) => Promise<Testimonial[]>;
|
|
918
|
+
fetchEvents: (siteId: string, params?: {
|
|
919
|
+
page?: number;
|
|
920
|
+
limit?: number;
|
|
921
|
+
search?: string;
|
|
922
|
+
}, options?: FetchOptions) => Promise<PaginatedResponse<Event>>;
|
|
923
|
+
fetchEventBySlug: (siteId: string, slug: string, options?: FetchOptions) => Promise<Event | null>;
|
|
924
|
+
fetchFaqGroups: (siteId: string, options?: FetchOptions) => Promise<FaqGroup[]>;
|
|
925
|
+
fetchFaqs: (siteId: string, params?: {
|
|
926
|
+
group_id?: string;
|
|
927
|
+
}, options?: FetchOptions) => Promise<Faq[]>;
|
|
928
|
+
fetchRedirects: (siteId: string, options?: FetchOptions) => Promise<Redirect[]>;
|
|
929
|
+
resolveRedirect: (siteId: string, sourcePath: string, options?: FetchOptions) => Promise<ResolvedRedirect | null>;
|
|
930
|
+
reportRedirect404: (siteId: string, sourcePath: string, referrer?: string, options?: FetchOptions) => Promise<Redirect404Log | null>;
|
|
931
|
+
submitContactForm: (siteId: string, payload: ContactPayload, options?: FetchOptions) => Promise<Contact | null>;
|
|
932
|
+
fetchStoreSettings: (siteId: string, options?: FetchOptions) => Promise<StoreSettings | null>;
|
|
933
|
+
fetchProductCategories: (siteId: string, params?: {
|
|
934
|
+
page?: number;
|
|
935
|
+
limit?: number;
|
|
936
|
+
search?: string;
|
|
937
|
+
ordering?: string;
|
|
938
|
+
parent_id?: string | null;
|
|
939
|
+
}, options?: FetchOptions) => Promise<PaginatedResponse<ProductCategory>>;
|
|
940
|
+
fetchProductBrands: (siteId: string, params?: {
|
|
941
|
+
page?: number;
|
|
942
|
+
limit?: number;
|
|
943
|
+
search?: string;
|
|
944
|
+
ordering?: string;
|
|
945
|
+
}, options?: FetchOptions) => Promise<PaginatedResponse<ProductBrand>>;
|
|
946
|
+
fetchProducts: (siteId: string, params?: {
|
|
947
|
+
page?: number;
|
|
948
|
+
limit?: number;
|
|
949
|
+
search?: string;
|
|
950
|
+
category_id?: string;
|
|
951
|
+
tag_id?: string;
|
|
952
|
+
brand_id?: string;
|
|
953
|
+
is_featured?: "true" | "false";
|
|
954
|
+
sort?: "price_asc" | "price_desc";
|
|
955
|
+
min_price?: number;
|
|
956
|
+
max_price?: number;
|
|
957
|
+
availability?: "in_stock" | "out_of_stock";
|
|
958
|
+
}, options?: FetchOptions) => Promise<PaginatedResponse<ProductListItem>>;
|
|
959
|
+
fetchProductDetail: (siteId: string, slug: string, options?: FetchOptions) => Promise<Product | null>;
|
|
960
|
+
fetchProductsByTag: (siteId: string, tag: string, params?: {
|
|
961
|
+
page?: number;
|
|
962
|
+
limit?: number;
|
|
963
|
+
}, options?: FetchOptions) => Promise<{
|
|
964
|
+
products: Array<{
|
|
965
|
+
item: unknown;
|
|
966
|
+
product: Product;
|
|
967
|
+
}>;
|
|
968
|
+
pagination: PaginationMeta;
|
|
969
|
+
} | null>;
|
|
970
|
+
fetchCollections: (siteId: string, params?: {
|
|
971
|
+
page?: number;
|
|
972
|
+
limit?: number;
|
|
973
|
+
search?: string; /** Comma-separated list of collection IDs (e.g., "id1,id2") */
|
|
974
|
+
id?: string;
|
|
975
|
+
}, options?: FetchOptions) => Promise<PaginatedResponse<Collection>>;
|
|
976
|
+
fetchCollectionDetail: (siteId: string, slug: string, params?: {
|
|
977
|
+
page?: number;
|
|
978
|
+
limit?: number;
|
|
979
|
+
category_id?: string;
|
|
980
|
+
}, options?: FetchOptions) => Promise<CollectionDetail | null>;
|
|
981
|
+
fetchCollectionDetailById: (siteId: string, id: string, params?: {
|
|
982
|
+
page?: number;
|
|
983
|
+
limit?: number;
|
|
984
|
+
category_id?: string;
|
|
985
|
+
}, options?: FetchOptions) => Promise<CollectionDetail | null>;
|
|
986
|
+
placeOrder: (siteId: string, payload: PlaceOrderPayload, options?: FetchOptions) => Promise<Order | null>;
|
|
987
|
+
fetch: <T>(endpoint: string, options?: FetchOptions, retries?: number) => Promise<T | null>;
|
|
988
|
+
fetchPaginated: <T>(endpoint: string, options?: FetchOptions, retries?: number) => Promise<PaginatedResponse<T>>;
|
|
989
|
+
utils: {
|
|
990
|
+
buildQueryString: (params: Record<string, string | number | string[] | number[] | undefined | null>) => string;
|
|
991
|
+
};
|
|
992
|
+
};
|
|
993
|
+
//#endregion
|
|
994
|
+
//#region src/constants/pageTypes.d.ts
|
|
995
|
+
declare const pageTypes: readonly ["home", "about", "contact"];
|
|
996
|
+
declare const defaultPageTypes: readonly ["home", "about", "contact", "services", "blog", "team", "gallery", "events"];
|
|
997
|
+
declare const allPageTypes: readonly ["home", "about", "contact", "custom", "services", "blog", "team", "gallery", "events"];
|
|
998
|
+
//#endregion
|
|
999
|
+
//#region src/constants/index.d.ts
|
|
1000
|
+
declare const PAGINATION: {
|
|
1001
|
+
readonly DEFAULT_PAGE: 1;
|
|
1002
|
+
readonly DEFAULT_LIMIT: 10;
|
|
1003
|
+
readonly BLOGS_PER_PAGE: 9;
|
|
1004
|
+
readonly EVENTS_PER_PAGE: 9;
|
|
1005
|
+
readonly ALBUMS_PER_PAGE: 9;
|
|
1006
|
+
readonly MAX_ITEMS_FOR_SSG: 200;
|
|
1007
|
+
};
|
|
1008
|
+
declare const SEARCH: {
|
|
1009
|
+
readonly DEBOUNCE_MS: 500;
|
|
1010
|
+
readonly MIN_QUERY_LENGTH: 2;
|
|
1011
|
+
};
|
|
1012
|
+
declare const CACHE: {
|
|
1013
|
+
readonly NO_CACHE: 0;
|
|
1014
|
+
readonly SHORT: 60;
|
|
1015
|
+
readonly MEDIUM: 300;
|
|
1016
|
+
readonly LONG: 3600;
|
|
1017
|
+
readonly STATIC: 86400;
|
|
1018
|
+
};
|
|
1019
|
+
declare const ANIMATION: {
|
|
1020
|
+
readonly FAST: 0.2;
|
|
1021
|
+
readonly NORMAL: 0.3;
|
|
1022
|
+
readonly SLOW: 0.6;
|
|
1023
|
+
};
|
|
1024
|
+
declare const CONTACT_SUBJECTS: readonly ["General Inquiry", "Project Proposal", "Careers", "Other"];
|
|
1025
|
+
declare const HTTP_STATUS: {
|
|
1026
|
+
readonly OK: 200;
|
|
1027
|
+
readonly CREATED: 201;
|
|
1028
|
+
readonly BAD_REQUEST: 400;
|
|
1029
|
+
readonly UNAUTHORIZED: 401;
|
|
1030
|
+
readonly FORBIDDEN: 403;
|
|
1031
|
+
readonly NOT_FOUND: 404;
|
|
1032
|
+
readonly INTERNAL_ERROR: 500;
|
|
1033
|
+
};
|
|
1034
|
+
declare const MEDIA: {
|
|
1035
|
+
readonly IMAGE_EXTENSIONS: readonly [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"];
|
|
1036
|
+
readonly VIDEO_EXTENSIONS: readonly [".mp4", ".webm", ".ogg"];
|
|
1037
|
+
readonly MAX_IMAGE_SIZE: number;
|
|
1038
|
+
};
|
|
1039
|
+
//#endregion
|
|
1040
|
+
//#region src/types/api-response.d.ts
|
|
1041
|
+
interface APIResponse<T> {
|
|
1042
|
+
message: string;
|
|
1043
|
+
data: T[];
|
|
1044
|
+
}
|
|
1045
|
+
interface SingleDataAPIResponse<T> {
|
|
1046
|
+
message: string;
|
|
1047
|
+
data: T;
|
|
1048
|
+
}
|
|
1049
|
+
//#endregion
|
|
1050
|
+
//#region src/types/company-info.d.ts
|
|
1051
|
+
interface CompanyInfo {
|
|
1052
|
+
companyName: string;
|
|
1053
|
+
tagline: string;
|
|
1054
|
+
slogan?: string;
|
|
1055
|
+
locations: string[];
|
|
1056
|
+
google_maps_url?: string;
|
|
1057
|
+
embed_map_url?: string;
|
|
1058
|
+
phone_numbers: string[];
|
|
1059
|
+
emails: string[];
|
|
1060
|
+
branding: Branding;
|
|
1061
|
+
socials?: SocialLink[];
|
|
1062
|
+
websiteUrl?: string;
|
|
1063
|
+
establishedDate?: string;
|
|
1064
|
+
}
|
|
1065
|
+
//#endregion
|
|
1066
|
+
//#region src/types/site.d.ts
|
|
1067
|
+
interface UserSiteRole {
|
|
1068
|
+
id: string;
|
|
1069
|
+
site_id: string;
|
|
1070
|
+
user_id: string;
|
|
1071
|
+
role: string;
|
|
1072
|
+
}
|
|
1073
|
+
interface Site {
|
|
1074
|
+
id: string;
|
|
1075
|
+
domain: string;
|
|
1076
|
+
is_published: boolean;
|
|
1077
|
+
is_store_enabled: boolean;
|
|
1078
|
+
is_deleted: boolean;
|
|
1079
|
+
created_at: string;
|
|
1080
|
+
updated_at: string;
|
|
1081
|
+
userSiteRoles?: UserSiteRole[];
|
|
1082
|
+
}
|
|
1083
|
+
interface CreateSitePayload {
|
|
1084
|
+
domain: string;
|
|
1085
|
+
}
|
|
1086
|
+
interface UpdateSitePayload {
|
|
1087
|
+
domain?: string;
|
|
1088
|
+
}
|
|
1089
|
+
//#endregion
|
|
1090
|
+
//#region src/components/Icon.d.ts
|
|
1091
|
+
/**
|
|
1092
|
+
* A exhaustive map of Lucide icons commonly used in the CMS.
|
|
1093
|
+
*/
|
|
1094
|
+
declare const ICON_MAP: Record<string, React.ComponentType<LucideProps>>;
|
|
1095
|
+
interface IconProps extends LucideProps {
|
|
1096
|
+
/** The name of the icon (from the ICON_MAP keys) */
|
|
1097
|
+
name: string;
|
|
1098
|
+
/** Fallback icon name if the provided name is not found */
|
|
1099
|
+
fallback?: string;
|
|
1100
|
+
}
|
|
1101
|
+
/**
|
|
1102
|
+
* Dynamic Icon component that renders Lucide icons by name.
|
|
1103
|
+
* Useful for CMS-driven icons where names are stored as strings.
|
|
1104
|
+
*/
|
|
1105
|
+
declare function Icon({
|
|
1106
|
+
name,
|
|
1107
|
+
fallback,
|
|
1108
|
+
...props
|
|
1109
|
+
}: IconProps): React.ReactElement<LucideProps, string | React.JSXElementConstructor<any>>;
|
|
1110
|
+
//#endregion
|
|
1111
|
+
export { ANIMATION, APIResponse, AboutSection, AboutStat, AboutUsData, AboutValue, Album, AlbumItem, Blog, BlogSection, Brand, BrandGroup, Branding, CACHE, CONTACT_SUBJECTS, CTA, CTAContent, CartItem, Category, ClientsSection, CmsClientConfig, CmsError, Collection, CollectionDetail, CollectionGroupSection, CollectionItem, CollectionListItem, CompanyInfo, Contact, ContactConfig, ContactPayload, CreateSitePayload, Cta, CustomContent, Event, Faq, FaqGroup, FaqSection, FetchOptions, Footer, FooterNavChild, FooterNavGroup, FooterNavGroupLink, GallerySection, GenericSection, HTTP_STATUS, Header, HeroContent, HistoryItem, HistorySection, ICON_MAP, Icon, IconProps, Image, LocationConfig, MEDIA, MarqueeItem, MarqueeSection, MultiValueItem, MultiValueSection, NavChild, NavGrandChild, NavLink, Order, OrderItem, OrderStatus, PAGINATION, Page, PageListItem, PaginatedResponse, PaginationInfo, PaginationMeta, PlaceOrderPayload, Product, ProductBrand, ProductCategory, ProductExtraData, ProductImage, ProductListItem, ProductSEO, ProductSectionFilter, ProductStatus, ProductVariant, ProductVariantListItem, ProductsSection, PublicProductVariant, Redirect, Redirect404Log, RedirectStatusCode, ResolvedRedirect, RichContentSection, SEARCH, SEO, Section, Service, ServicesSection, ShippingAddress, SingleDataAPIResponse, Site, SiteConfig, Social, SocialLink, StoreSettings, TeamMember, TeamSection, Testimonial, TestimonialsSection, UpdateSitePayload, UserSiteRole, WorkingHours, allPageTypes, createCmsClient, defaultPageTypes, pageTypes };
|
|
1112
|
+
//# sourceMappingURL=index.d.cts.map
|