467 lines
16 KiB
TypeScript
467 lines
16 KiB
TypeScript
import { z } from "zod";
|
|
/**
|
|
* Editable website sections. Each key is one row in the `SiteSection` table whose `data`
|
|
* column must match the schema below — validated by the API on write and by the admin forms.
|
|
*
|
|
* Multi-line titles use "\n" for line breaks.
|
|
*/
|
|
export declare const WEEK_DAYS: readonly ["Saturday", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday"];
|
|
export declare const SOCIAL_TYPES: readonly ["website", "telegram", "instagram", "linkedin", "whatsapp", "bale", "eitaa", "aparat", "youtube", "email", "phone"];
|
|
export type SocialType = (typeof SOCIAL_TYPES)[number];
|
|
export declare const sectionHeadSchema: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
export type SectionHeadData = z.infer<typeof sectionHeadSchema>;
|
|
export declare const settingsSectionSchema: z.ZodObject<{
|
|
name: z.ZodString;
|
|
nameEn: z.ZodString;
|
|
title: z.ZodString;
|
|
description: z.ZodString;
|
|
phone: z.ZodString;
|
|
phoneDisplay: z.ZodString;
|
|
email: z.ZodEmail;
|
|
address: z.ZodObject<{
|
|
street: z.ZodString;
|
|
locality: z.ZodString;
|
|
country: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
workingHours: z.ZodString;
|
|
openingHours: z.ZodObject<{
|
|
days: z.ZodArray<z.ZodEnum<{
|
|
Saturday: "Saturday";
|
|
Sunday: "Sunday";
|
|
Monday: "Monday";
|
|
Tuesday: "Tuesday";
|
|
Wednesday: "Wednesday";
|
|
Thursday: "Thursday";
|
|
Friday: "Friday";
|
|
}>>;
|
|
opens: z.ZodString;
|
|
closes: z.ZodString;
|
|
}, z.core.$strip>;
|
|
foundingDate: z.ZodString;
|
|
socials: z.ZodArray<z.ZodObject<{
|
|
type: z.ZodEnum<{
|
|
instagram: "instagram";
|
|
phone: "phone";
|
|
website: "website";
|
|
telegram: "telegram";
|
|
linkedin: "linkedin";
|
|
whatsapp: "whatsapp";
|
|
bale: "bale";
|
|
eitaa: "eitaa";
|
|
aparat: "aparat";
|
|
youtube: "youtube";
|
|
email: "email";
|
|
}>;
|
|
url: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
ogImage: z.ZodObject<{
|
|
url: z.ZodString;
|
|
alt: z.ZodDefault<z.ZodString>;
|
|
width: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
height: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
export declare const heroSectionSchema: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
badge: z.ZodString;
|
|
title: z.ZodString;
|
|
titleHighlight: z.ZodString;
|
|
intro: z.ZodString;
|
|
primaryCta: z.ZodObject<{
|
|
label: z.ZodString;
|
|
href: z.ZodString;
|
|
}, z.core.$strip>;
|
|
secondaryCta: z.ZodObject<{
|
|
label: z.ZodString;
|
|
href: z.ZodString;
|
|
}, z.core.$strip>;
|
|
chips: z.ZodArray<z.ZodObject<{
|
|
icon: z.ZodString;
|
|
label: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
miniStats: z.ZodArray<z.ZodObject<{
|
|
value: z.ZodString;
|
|
label: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
image: z.ZodObject<{
|
|
url: z.ZodString;
|
|
alt: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
lastInspection: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
export declare const tapeSectionSchema: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
export declare const statsSectionSchema: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
end: z.ZodNumber;
|
|
suffix: z.ZodDefault<z.ZodString>;
|
|
label: z.ZodString;
|
|
note: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
export declare const productsIntroSectionSchema: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
head: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
ctaLabel: z.ZodString;
|
|
trust: z.ZodArray<z.ZodObject<{
|
|
icon: z.ZodString;
|
|
title: z.ZodString;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
export declare const aboutSectionSchema: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
head: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
body: z.ZodString;
|
|
image: z.ZodObject<{
|
|
url: z.ZodString;
|
|
alt: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
badge: z.ZodObject<{
|
|
value: z.ZodString;
|
|
label: z.ZodString;
|
|
}, z.core.$strip>;
|
|
timeline: z.ZodArray<z.ZodObject<{
|
|
year: z.ZodString;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
features: z.ZodArray<z.ZodObject<{
|
|
icon: z.ZodString;
|
|
label: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
export declare const servicesSectionSchema: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
head: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
icon: z.ZodString;
|
|
title: z.ZodString;
|
|
desc: z.ZodString;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
export declare const standardsSectionSchema: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
head: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
note: z.ZodDefault<z.ZodString>;
|
|
ctaLabel: z.ZodString;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
code: z.ZodString;
|
|
label: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
export declare const industriesSectionSchema: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
head: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
nameEn: z.ZodDefault<z.ZodString>;
|
|
count: z.ZodDefault<z.ZodString>;
|
|
image: z.ZodObject<{
|
|
url: z.ZodString;
|
|
alt: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
export declare const testimonialsSectionSchema: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
head: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
text: z.ZodString;
|
|
name: z.ZodString;
|
|
role: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
export declare const contactSectionSchema: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
head: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
emergencyTitle: z.ZodString;
|
|
emergencyText: z.ZodString;
|
|
formTag: z.ZodDefault<z.ZodString>;
|
|
formTitle: z.ZodString;
|
|
successTitle: z.ZodString;
|
|
successText: z.ZodString;
|
|
}, z.core.$strip>;
|
|
export declare const footerSectionSchema: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
about: z.ZodString;
|
|
copyright: z.ZodString;
|
|
certLine: z.ZodDefault<z.ZodString>;
|
|
emergencyNote: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
export declare const sectionSchemas: {
|
|
readonly settings: z.ZodObject<{
|
|
name: z.ZodString;
|
|
nameEn: z.ZodString;
|
|
title: z.ZodString;
|
|
description: z.ZodString;
|
|
phone: z.ZodString;
|
|
phoneDisplay: z.ZodString;
|
|
email: z.ZodEmail;
|
|
address: z.ZodObject<{
|
|
street: z.ZodString;
|
|
locality: z.ZodString;
|
|
country: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
workingHours: z.ZodString;
|
|
openingHours: z.ZodObject<{
|
|
days: z.ZodArray<z.ZodEnum<{
|
|
Saturday: "Saturday";
|
|
Sunday: "Sunday";
|
|
Monday: "Monday";
|
|
Tuesday: "Tuesday";
|
|
Wednesday: "Wednesday";
|
|
Thursday: "Thursday";
|
|
Friday: "Friday";
|
|
}>>;
|
|
opens: z.ZodString;
|
|
closes: z.ZodString;
|
|
}, z.core.$strip>;
|
|
foundingDate: z.ZodString;
|
|
socials: z.ZodArray<z.ZodObject<{
|
|
type: z.ZodEnum<{
|
|
instagram: "instagram";
|
|
phone: "phone";
|
|
website: "website";
|
|
telegram: "telegram";
|
|
linkedin: "linkedin";
|
|
whatsapp: "whatsapp";
|
|
bale: "bale";
|
|
eitaa: "eitaa";
|
|
aparat: "aparat";
|
|
youtube: "youtube";
|
|
email: "email";
|
|
}>;
|
|
url: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
ogImage: z.ZodObject<{
|
|
url: z.ZodString;
|
|
alt: z.ZodDefault<z.ZodString>;
|
|
width: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
height: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
readonly hero: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
badge: z.ZodString;
|
|
title: z.ZodString;
|
|
titleHighlight: z.ZodString;
|
|
intro: z.ZodString;
|
|
primaryCta: z.ZodObject<{
|
|
label: z.ZodString;
|
|
href: z.ZodString;
|
|
}, z.core.$strip>;
|
|
secondaryCta: z.ZodObject<{
|
|
label: z.ZodString;
|
|
href: z.ZodString;
|
|
}, z.core.$strip>;
|
|
chips: z.ZodArray<z.ZodObject<{
|
|
icon: z.ZodString;
|
|
label: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
miniStats: z.ZodArray<z.ZodObject<{
|
|
value: z.ZodString;
|
|
label: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
image: z.ZodObject<{
|
|
url: z.ZodString;
|
|
alt: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
lastInspection: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
readonly tape: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
readonly stats: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
end: z.ZodNumber;
|
|
suffix: z.ZodDefault<z.ZodString>;
|
|
label: z.ZodString;
|
|
note: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
readonly productsIntro: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
head: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
ctaLabel: z.ZodString;
|
|
trust: z.ZodArray<z.ZodObject<{
|
|
icon: z.ZodString;
|
|
title: z.ZodString;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
readonly about: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
head: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
body: z.ZodString;
|
|
image: z.ZodObject<{
|
|
url: z.ZodString;
|
|
alt: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
badge: z.ZodObject<{
|
|
value: z.ZodString;
|
|
label: z.ZodString;
|
|
}, z.core.$strip>;
|
|
timeline: z.ZodArray<z.ZodObject<{
|
|
year: z.ZodString;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
features: z.ZodArray<z.ZodObject<{
|
|
icon: z.ZodString;
|
|
label: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
readonly services: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
head: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
icon: z.ZodString;
|
|
title: z.ZodString;
|
|
desc: z.ZodString;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
readonly standards: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
head: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
note: z.ZodDefault<z.ZodString>;
|
|
ctaLabel: z.ZodString;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
code: z.ZodString;
|
|
label: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
readonly industries: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
head: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
nameEn: z.ZodDefault<z.ZodString>;
|
|
count: z.ZodDefault<z.ZodString>;
|
|
image: z.ZodObject<{
|
|
url: z.ZodString;
|
|
alt: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
readonly testimonials: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
head: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
text: z.ZodString;
|
|
name: z.ZodString;
|
|
role: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
readonly contact: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
head: z.ZodObject<{
|
|
tag: z.ZodString;
|
|
title: z.ZodString;
|
|
highlight: z.ZodDefault<z.ZodString>;
|
|
desc: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
emergencyTitle: z.ZodString;
|
|
emergencyText: z.ZodString;
|
|
formTag: z.ZodDefault<z.ZodString>;
|
|
formTitle: z.ZodString;
|
|
successTitle: z.ZodString;
|
|
successText: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly footer: z.ZodObject<{
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
about: z.ZodString;
|
|
copyright: z.ZodString;
|
|
certLine: z.ZodDefault<z.ZodString>;
|
|
emergencyNote: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export type SectionKey = keyof typeof sectionSchemas;
|
|
export declare const SECTION_KEYS: SectionKey[];
|
|
export type SectionData<K extends SectionKey> = z.infer<(typeof sectionSchemas)[K]>;
|
|
export type SiteSections = {
|
|
[K in SectionKey]: SectionData<K>;
|
|
};
|
|
export type SiteSettings = SectionData<"settings">;
|
|
export declare const isSectionKey: (key: string) => key is SectionKey;
|
|
/** Persian labels for the admin panel */
|
|
export declare const SECTION_LABELS: Record<SectionKey, {
|
|
title: string;
|
|
desc: string;
|
|
}>;
|
|
//# sourceMappingURL=sections.d.ts.map
|