@crayonscodetech/cms-sdk 1.0.7 → 1.0.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/constants/pageTypes.ts","../src/constants/index.ts","../src/core/client.ts","../src/components/Icon.tsx"],"sourcesContent":["export const pageTypes = [\"home\", \"about\", \"contact\"] as const;\n\nexport const defaultPageTypes = [\n ...pageTypes,\n \"services\",\n \"blog\",\n \"team\",\n \"gallery\",\n \"events\",\n] as const;\n\nexport const allPageTypes = [\n ...pageTypes,\n \"custom\",\n \"services\",\n \"blog\",\n \"team\",\n \"gallery\",\n \"events\",\n] as const;\n","export * from \"./pageTypes\";\n\nexport const PAGINATION = {\n DEFAULT_PAGE: 1,\n DEFAULT_LIMIT: 10,\n LIST_DEFAULT_LIMIT: 20,\n BLOGS_PER_PAGE: 9,\n EVENTS_PER_PAGE: 9,\n ALBUMS_PER_PAGE: 9,\n MAX_ITEMS_FOR_SSG: 200,\n} as const;\n\nexport const SEARCH = {\n DEBOUNCE_MS: 500,\n MIN_QUERY_LENGTH: 2,\n} as const;\n\nexport const CACHE = {\n NO_CACHE: 0,\n SHORT: 60, // 1 minute\n MEDIUM: 300, // 5 minutes\n LONG: 3600, // 1 hour\n STATIC: 86400, // 24 hours\n} as const;\n\nexport const ANIMATION = {\n FAST: 0.2,\n NORMAL: 0.3,\n SLOW: 0.6,\n} as const;\n\nexport const CONTACT_SUBJECTS = [\n \"General Inquiry\",\n \"Project Proposal\",\n \"Careers\",\n \"Other\",\n] as const;\n\nexport const HTTP_STATUS = {\n OK: 200,\n CREATED: 201,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n INTERNAL_ERROR: 500,\n} as const;\n\nexport const MEDIA = {\n IMAGE_EXTENSIONS: [\".jpg\", \".jpeg\", \".png\", \".gif\", \".webp\", \".svg\"],\n VIDEO_EXTENSIONS: [\".mp4\", \".webm\", \".ogg\"],\n MAX_IMAGE_SIZE: 5 * 1024 * 1024,\n} as const;\n","import { CACHE, PAGINATION } from \"../constants\";\nimport type { PaginatedResponse } from \"../types/pagination\";\nimport type { Header } from \"../types/header\";\nimport type { Footer } from \"../types/footer\";\nimport type { SiteConfig } from \"../types/site-config\";\nimport type { Page, PageListItem } from \"../types/page\";\nimport type { AboutUsData } from \"../types/about\";\nimport type { Service } from \"../types/service\";\nimport type { Blog } from \"../types/blog\";\nimport type { Category } from \"../types/category\";\nimport type { TeamMember } from \"../types/team-member\";\nimport type { Album, AlbumItem } from \"../types/album\";\nimport type { BrandGroup, Brand } from \"../types/brand\";\nimport type { Testimonial } from \"../types/testimonials\";\nimport type { Event } from \"../types/event\";\nimport type { Faq } from \"../types/faq\";\nimport type { FaqGroup } from \"../types/faq-group\";\nimport type { Redirect, Redirect404Log, ResolvedRedirect } from \"../types/redirect\";\nimport type { ContactPayload, Contact } from \"../types/contact\";\nimport type { Product, ProductListItem, ProductVariant } from \"../types/product\";\nimport type { ProductCategory } from \"../types/product-category\";\nimport type { ProductBrand } from \"../types/product-brand\";\nimport type { Collection, CollectionDetail } from \"../types/collection\";\nimport type { Order, PlaceOrderPayload } from \"../types/order\";\nimport type { StoreSettings } from \"../types/store-setting\";\nimport type {\n SitemapBlogItem,\n SitemapPageItem,\n SitemapProductItem,\n SitemapCollectionItem,\n} from \"../types/sitemap\";\n\nexport interface FetchOptions extends RequestInit {\n revalidate?: number;\n tags?: string[];\n}\n\nexport interface CmsClientConfig {\n baseUrl: string;\n defaultOptions?: FetchOptions;\n}\n\nexport class CmsError extends Error {\n constructor(\n public message: string,\n public status?: number,\n public url?: string,\n ) {\n super(message);\n this.name = \"CmsError\";\n }\n}\n\nconst sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));\n\nexport function createCmsClient(config: CmsClientConfig) {\n const { baseUrl, defaultOptions = {} } = config;\n\n async function cmsFetch<T>(\n endpoint: string,\n options: FetchOptions = {},\n retries = 2,\n ): Promise<T | null> {\n const url = `${baseUrl}${endpoint}`;\n const {\n revalidate = CACHE.NO_CACHE,\n tags,\n ...rest\n } = { ...defaultOptions, ...options };\n\n const fetchConfig: RequestInit & {\n next?: { revalidate?: number; tags?: string[] };\n } = {\n ...rest,\n next: {\n revalidate,\n ...(tags && { tags }),\n },\n };\n\n let lastError: Error | null = null;\n\n for (let attempt = 0; attempt <= retries; attempt++) {\n try {\n const response = await fetch(url, fetchConfig);\n\n if (!response.ok) {\n const errorMsg = `API request failed: ${response.status} ${url}`;\n console.error(errorMsg);\n\n // Retry on transient server errors (502, 503, 504)\n if (attempt < retries && [502, 503, 504].includes(response.status)) {\n await sleep(Math.pow(2, attempt) * 1000);\n continue;\n }\n\n return null;\n }\n\n const result = await response.json();\n return result.data ?? result;\n } catch (error) {\n lastError = error instanceof Error ? error : new Error(String(error));\n console.error(\n `API request error (attempt ${attempt + 1}/${retries + 1}): ${url}`,\n lastError,\n );\n\n if (attempt < retries) {\n await sleep(Math.pow(2, attempt) * 1000);\n continue;\n }\n }\n }\n\n return null;\n }\n\n async function cmsFetchPaginated<T>(\n endpoint: string,\n options: FetchOptions = {},\n retries = 2,\n ): Promise<PaginatedResponse<T>> {\n const emptyResponse: PaginatedResponse<T> = {\n data: [],\n pagination: {\n page: 1,\n limit: PAGINATION.DEFAULT_LIMIT,\n total: 0,\n },\n };\n\n const url = `${baseUrl}${endpoint}`;\n const {\n revalidate = CACHE.NO_CACHE,\n tags,\n ...rest\n } = { ...defaultOptions, ...options };\n\n const fetchConfig: RequestInit & {\n next?: { revalidate?: number; tags?: string[] };\n } = {\n ...rest,\n next: {\n revalidate,\n ...(tags && { tags }),\n },\n };\n\n for (let attempt = 0; attempt <= retries; attempt++) {\n try {\n const response = await fetch(url, fetchConfig);\n\n if (!response.ok) {\n console.error(`API request failed: ${response.status} ${url}`);\n\n if (attempt < retries && [502, 503, 504].includes(response.status)) {\n await sleep(Math.pow(2, attempt) * 1000);\n continue;\n }\n\n return emptyResponse;\n }\n\n return await response.json();\n } catch (error) {\n console.error(\n `API request error (attempt ${attempt + 1}/${retries + 1}): ${url}`,\n error,\n );\n\n if (attempt < retries) {\n await sleep(Math.pow(2, attempt) * 1000);\n continue;\n }\n }\n }\n\n return emptyResponse;\n }\n\n function buildQueryString(\n params: Record<string, string | number | string[] | number[] | undefined | null>,\n ): string {\n const query = new URLSearchParams();\n Object.entries(params).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n if (Array.isArray(value)) {\n value.forEach((v) => query.append(key, String(v)));\n } else {\n query.append(key, String(value));\n }\n }\n });\n return query.toString();\n }\n\n // Default page size for list endpoints (categories, team, brands, testimonials,\n // faq-groups, faqs, album-items). Matches the backend's getPaginationParamsWithoutLimit(c, 20).\n const LIST_DEFAULT_LIMIT = PAGINATION.LIST_DEFAULT_LIMIT;\n\n // ============================================================================\n // Header, Footer, Site Config\n // ============================================================================\n\n function fetchHeader(\n siteId: string,\n options?: FetchOptions,\n ): Promise<Header | null> {\n return cmsFetch<Header>(`/api/public/cms/${siteId}/header/`, {\n revalidate: CACHE.MEDIUM,\n tags: [\"header\"],\n ...options,\n });\n }\n\n function fetchFooter(\n siteId: string,\n options?: FetchOptions,\n ): Promise<Footer | null> {\n return cmsFetch<Footer>(`/api/public/cms/${siteId}/footer/`, {\n revalidate: CACHE.MEDIUM,\n tags: [\"footer\"],\n ...options,\n });\n }\n\n function fetchSiteConfig(\n siteId: string,\n options?: FetchOptions,\n ): Promise<SiteConfig | null> {\n return cmsFetch<SiteConfig>(`/api/public/cms/${siteId}/site-config/`, {\n revalidate: CACHE.MEDIUM,\n tags: [\"site-config\"],\n ...options,\n });\n }\n\n // ============================================================================\n // Pages\n // ============================================================================\n\n function fetchPages(\n siteId: string,\n params: { page?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<PageListItem>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<PageListItem>(\n `/api/public/cms/${siteId}/page/?${query}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"pages\"],\n ...options,\n },\n );\n }\n\n async function fetchPageByUrl(\n siteId: string,\n urlPath: string,\n options?: FetchOptions,\n ): Promise<Page | null> {\n try {\n const targetUrl =\n urlPath === \"/\" || urlPath === \"\"\n ? \"/\"\n : `/${urlPath.replace(/^\\/|\\/$/g, \"\")}`;\n\n return await cmsFetch<Page>(\n `/api/public/cms/${siteId}/page/by-url/?url=${encodeURIComponent(targetUrl)}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"pages\", `page-${targetUrl || \"root\"}`],\n ...options,\n },\n );\n } catch (error) {\n console.error(`Error in fetchPageByUrl for ${urlPath}:`, error);\n return null;\n }\n }\n\n // ============================================================================\n // About Us\n // ============================================================================\n\n function fetchAboutUs(\n siteId: string,\n options?: FetchOptions,\n ): Promise<AboutUsData | null> {\n return cmsFetch<AboutUsData>(`/api/public/cms/${siteId}/about-us/`, {\n revalidate: CACHE.MEDIUM,\n tags: [\"about\"],\n ...options,\n });\n }\n\n // ============================================================================\n // Services\n // ============================================================================\n\n async function fetchServices(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Service>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<Service>(\n `/api/public/cms/${siteId}/services/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"services\"],\n ...options,\n },\n );\n }\n\n function fetchServiceBySlug(\n siteId: string,\n slug: string,\n options?: FetchOptions,\n ): Promise<Service | null> {\n return cmsFetch<Service>(`/api/public/cms/${siteId}/services/${slug}`, {\n revalidate: CACHE.SHORT,\n tags: [\"services\", `service-${slug}`],\n ...options,\n });\n }\n\n // ============================================================================\n // Blogs\n // ============================================================================\n\n function fetchBlogs(\n siteId: string,\n params: { page?: number; limit?: number; search?: string } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Blog>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<Blog>(`/api/public/cms/${siteId}/blog/?${query}`, {\n revalidate: CACHE.SHORT,\n tags: [\"blogs\"],\n ...options,\n });\n }\n\n function fetchBlogBySlug(\n siteId: string,\n slug: string,\n options?: FetchOptions,\n ): Promise<Blog | null> {\n return cmsFetch<Blog>(`/api/public/cms/${siteId}/blog/${slug}`, {\n revalidate: CACHE.SHORT,\n tags: [\"blogs\", `blog-${slug}`],\n ...options,\n });\n }\n\n // Backwards-compatible alias. Backend route resolves by slug.\n function fetchBlogById(\n siteId: string,\n idOrSlug: number | string,\n options?: FetchOptions,\n ): Promise<Blog | null> {\n return fetchBlogBySlug(siteId, String(idOrSlug), options);\n }\n\n // ============================================================================\n // Categories\n // ============================================================================\n\n function fetchCategories(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Category>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<Category>(\n `/api/public/cms/${siteId}/categories/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"categories\"],\n ...options,\n },\n );\n }\n\n // ============================================================================\n // Team Members\n // ============================================================================\n\n function fetchTeamMembers(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<TeamMember>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<TeamMember>(\n `/api/public/cms/${siteId}/team-members/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"team\"],\n ...options,\n },\n );\n }\n\n function fetchTeamMembersByCategory(\n siteId: string,\n params: { categoryId: string; page?: number; limit?: number },\n options?: FetchOptions,\n ): Promise<PaginatedResponse<TeamMember>> {\n const query = buildQueryString({\n category_id: params.categoryId,\n page: params.page,\n limit: params.limit,\n });\n return cmsFetchPaginated<TeamMember>(\n `/api/public/cms/${siteId}/team-members/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"team\", `team-category-${params.categoryId}`],\n ...options,\n },\n );\n }\n\n // ============================================================================\n // Albums\n // ============================================================================\n\n function fetchAlbums(\n siteId: string,\n params: { page?: number; limit?: number; search?: string } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Album>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<Album>(\n `/api/public/cms/${siteId}/albums/?${query}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"albums\"],\n ...options,\n },\n );\n }\n\n function fetchAlbumItems(\n siteId: string,\n params: { album?: string; album_id?: string; page?: number; limit?: number },\n options?: FetchOptions,\n ): Promise<PaginatedResponse<AlbumItem>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<AlbumItem>(\n `/api/public/cms/${siteId}/albums/album-items/?${query}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"album-items\"],\n ...options,\n },\n );\n }\n\n // ============================================================================\n // Brands\n // ============================================================================\n\n function fetchBrandGroups(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<BrandGroup>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<BrandGroup>(\n `/api/public/cms/${siteId}/brand-groups/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"brand-groups\"],\n ...options,\n },\n );\n }\n\n function fetchBrands(\n siteId: string,\n params: { group?: string; group_id?: string; page?: number; limit?: number },\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Brand>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<Brand>(\n `/api/public/cms/${siteId}/brand-groups/brands/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"brands\"],\n ...options,\n },\n );\n }\n\n // ============================================================================\n // Testimonials\n // ============================================================================\n\n function fetchTestimonials(\n siteId: string,\n params?: { type?: \"testimonial\" | \"review\" | string; page?: number; limit?: number },\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Testimonial>> {\n const query = buildQueryString({\n type: params?.type,\n page: params?.page,\n limit: params?.limit,\n });\n return cmsFetchPaginated<Testimonial>(\n `/api/public/cms/${siteId}/testimonials/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"testimonials\"],\n ...options,\n },\n );\n }\n\n // ============================================================================\n // Events\n // ============================================================================\n\n function fetchEvents(\n siteId: string,\n params: { page?: number; limit?: number; search?: string } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Event>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<Event>(\n `/api/public/cms/${siteId}/events/?${query}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"events\"],\n ...options,\n },\n );\n }\n\n function fetchEventBySlug(\n siteId: string,\n slug: string,\n options?: FetchOptions,\n ): Promise<Event | null> {\n return cmsFetch<Event>(`/api/public/cms/${siteId}/events/${slug}`, {\n revalidate: CACHE.SHORT,\n tags: [\"events\", `event-${slug}`],\n ...options,\n });\n }\n\n // ============================================================================\n // FAQ Groups\n // ============================================================================\n\n function fetchFaqGroups(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<FaqGroup>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<FaqGroup>(\n `/api/public/cms/${siteId}/faq-groups/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"faq-groups\"],\n ...options,\n },\n );\n }\n\n async function submitContactForm(\n siteId: string,\n payload: ContactPayload,\n options?: FetchOptions,\n ): Promise<Contact | null> {\n return cmsFetch<Contact>(`/api/public/cms/${siteId}/contact/`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(payload),\n revalidate: CACHE.NO_CACHE, // Never cache form submissions\n ...options,\n });\n }\n\n function fetchFaqs(\n siteId: string,\n params?: { group_id?: string; page?: number; limit?: number },\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Faq>> {\n const query = buildQueryString({\n group_id: params?.group_id,\n page: params?.page,\n limit: params?.limit,\n });\n return cmsFetchPaginated<Faq>(\n `/api/public/cms/${siteId}/faqs/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"faqs\"],\n ...options,\n },\n );\n }\n\n // ============================================================================\n // Redirects\n // ============================================================================\n\n async function fetchRedirects(\n siteId: string,\n options?: FetchOptions,\n ): Promise<Redirect[]> {\n const result = await cmsFetch<Redirect[]>(\n `/api/public/cms/${siteId}/redirects/`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"redirects\"],\n ...options,\n },\n );\n return result ?? [];\n }\n\n function resolveRedirect(\n siteId: string,\n sourcePath: string,\n options?: FetchOptions,\n ): Promise<ResolvedRedirect | null> {\n return cmsFetch<ResolvedRedirect>(\n `/api/public/cms/${siteId}/redirects/resolve/?sourcePath=${encodeURIComponent(sourcePath)}`,\n {\n revalidate: CACHE.NO_CACHE,\n tags: [\"redirects\", `redirect-${sourcePath}`],\n ...options,\n },\n );\n }\n\n function reportRedirect404(\n siteId: string,\n sourcePath: string,\n referrer?: string,\n options?: FetchOptions,\n ): Promise<Redirect404Log | null> {\n const headers = {\n \"Content-Type\": \"application/json\",\n ...(options?.headers ?? {}),\n };\n\n return cmsFetch<Redirect404Log>(\n `/api/public/cms/${siteId}/redirects/404-logs/`,\n {\n method: \"POST\",\n ...options,\n headers,\n body: JSON.stringify({\n source_path: sourcePath,\n referrer,\n }),\n revalidate: CACHE.NO_CACHE,\n tags: [\"redirects\", \"redirect-404-logs\"],\n },\n 0,\n );\n }\n\n // ============================================================================\n // Store — Products, Categories, Brands, Collections, Orders\n // Note: Uses /api/public/store/ prefix (NOT /api/public/cms/)\n // ============================================================================\n\n function fetchStoreSettings(\n siteId: string,\n options?: FetchOptions,\n ): Promise<StoreSettings | null> {\n return cmsFetch<StoreSettings>(`/api/public/store/${siteId}/settings/`, {\n revalidate: CACHE.MEDIUM,\n tags: [\"store-settings\"],\n ...options,\n });\n }\n\n function fetchProductCategories(\n siteId: string,\n params: {\n page?: number;\n limit?: number;\n search?: string;\n ordering?: string;\n parent_id?: string | null;\n } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<ProductCategory>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<ProductCategory>(\n `/api/public/store/${siteId}/categories/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"product-categories\"],\n ...options,\n },\n );\n }\n\n function fetchProductBrands(\n siteId: string,\n params: {\n page?: number;\n limit?: number;\n search?: string;\n ordering?: string;\n } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<ProductBrand>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<ProductBrand>(\n `/api/public/store/${siteId}/brands/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"product-brands\"],\n ...options,\n },\n );\n }\n\n function fetchProducts(\n siteId: string,\n params: {\n page?: number;\n limit?: number;\n search?: string;\n category_id?: string;\n tag_id?: string;\n brand_id?: string;\n is_featured?: \"true\" | \"false\";\n sort?: \"price_asc\" | \"price_desc\";\n min_price?: number;\n max_price?: number;\n availability?: \"in_stock\" | \"out_of_stock\";\n } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<ProductListItem>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<ProductListItem>(\n `/api/public/store/${siteId}/products/?${query}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"products\"],\n ...options,\n },\n );\n }\n\n function fetchProductDetail(\n siteId: string,\n slug: string,\n options?: FetchOptions,\n ): Promise<Product | null> {\n return cmsFetch<Product>(`/api/public/store/${siteId}/products/${slug}/`, {\n revalidate: CACHE.SHORT,\n tags: [\"products\", `product-${slug}`],\n ...options,\n });\n }\n\n function fetchProductsByTag(\n siteId: string,\n tag: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<{ item: unknown; product: Product }> | null> {\n const query = buildQueryString({ tag, ...params });\n return cmsFetch<PaginatedResponse<{ item: unknown; product: Product }>>(\n `/api/public/store/${siteId}/products/by-tag/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"products\", `products-tag-${tag}`],\n ...options,\n },\n );\n }\n\n function fetchCollections(\n siteId: string,\n params: {\n page?: number;\n limit?: number;\n search?: string;\n /** Comma-separated list of collection IDs (e.g., \"id1,id2\") */\n id?: string;\n } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Collection>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<Collection>(\n `/api/public/store/${siteId}/collections/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"collections\"],\n ...options,\n },\n );\n }\n\n function fetchCollectionDetail(\n siteId: string,\n slug: string,\n params: {\n page?: number;\n limit?: number;\n category_id?: string;\n sort?: \"name_asc\" | \"name_desc\";\n availability?: \"in_stock\" | \"out_of_stock\";\n } = {},\n options?: FetchOptions,\n ): Promise<CollectionDetail | null> {\n const query = buildQueryString(params);\n return cmsFetch<CollectionDetail>(\n `/api/public/store/${siteId}/collections/${slug}/${\n query ? `?${query}` : \"\"\n }`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"collections\", `collection-${slug}`],\n ...options,\n },\n );\n }\n\n function fetchCollectionDetailById(\n siteId: string,\n id: string,\n params: {\n page?: number;\n limit?: number;\n category_id?: string;\n sort?: \"name_asc\" | \"name_desc\";\n availability?: \"in_stock\" | \"out_of_stock\";\n } = {},\n options?: FetchOptions,\n ): Promise<CollectionDetail | null> {\n const query = buildQueryString(params);\n return cmsFetch<CollectionDetail>(\n `/api/public/store/${siteId}/collections/id/${id}/${\n query ? `?${query}` : \"\"\n }`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"collections\", `collection-${id}`],\n ...options,\n },\n );\n }\n\n function placeOrder(\n siteId: string,\n payload: PlaceOrderPayload,\n options?: FetchOptions,\n ): Promise<Order | null> {\n return cmsFetch<Order>(`/api/public/store/${siteId}/orders/`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(payload),\n revalidate: CACHE.NO_CACHE,\n ...options,\n });\n }\n\n // ============================================================================\n // Sitemap — public endpoints for XML sitemap generation (fetch once per day)\n // ============================================================================\n\n function fetchSitemapBlogs(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<SitemapBlogItem>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<SitemapBlogItem>(\n `/api/public/cms/${siteId}/sitemap/blogs/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.STATIC,\n tags: [\"sitemap\", \"sitemap-blogs\"],\n ...options,\n },\n );\n }\n\n function fetchSitemapPages(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<SitemapPageItem>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<SitemapPageItem>(\n `/api/public/cms/${siteId}/sitemap/pages/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.STATIC,\n tags: [\"sitemap\", \"sitemap-pages\"],\n ...options,\n },\n );\n }\n\n function fetchSitemapProducts(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<SitemapProductItem>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<SitemapProductItem>(\n `/api/public/store/${siteId}/sitemap/products/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.STATIC,\n tags: [\"sitemap\", \"sitemap-products\"],\n ...options,\n },\n );\n }\n\n function fetchSitemapCollections(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<SitemapCollectionItem>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<SitemapCollectionItem>(\n `/api/public/store/${siteId}/sitemap/collections/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.STATIC,\n tags: [\"sitemap\", \"sitemap-collections\"],\n ...options,\n },\n );\n }\n\n return {\n // Default page size for list endpoints (categories, team, brands, testimonials, etc.)\n LIST_DEFAULT_LIMIT,\n // Header, Footer, Site Config\n fetchHeader,\n fetchFooter,\n fetchSiteConfig,\n // Pages\n fetchPages,\n fetchPageByUrl,\n // About\n fetchAboutUs,\n // Services\n fetchServices,\n fetchServiceBySlug,\n // Blogs\n fetchBlogs,\n fetchBlogBySlug,\n fetchBlogById,\n // Categories\n fetchCategories,\n // Team Members\n fetchTeamMembers,\n fetchTeamMembersByCategory,\n // Albums\n fetchAlbums,\n fetchAlbumItems,\n // Brands\n fetchBrandGroups,\n fetchBrands,\n // Testimonials\n fetchTestimonials,\n // Events\n fetchEvents,\n fetchEventBySlug,\n // FAQ Groups\n fetchFaqGroups,\n fetchFaqs,\n // Redirects\n fetchRedirects,\n resolveRedirect,\n reportRedirect404,\n // Contact\n submitContactForm,\n // Store\n fetchStoreSettings,\n fetchProductCategories,\n fetchProductBrands,\n fetchProducts,\n fetchProductDetail,\n fetchProductsByTag,\n fetchCollections,\n fetchCollectionDetail,\n fetchCollectionDetailById,\n placeOrder,\n // Sitemap\n fetchSitemapBlogs,\n fetchSitemapPages,\n fetchSitemapProducts,\n fetchSitemapCollections,\n // Generic fetch utilities\n fetch: cmsFetch,\n fetchPaginated: cmsFetchPaginated,\n utils: {\n buildQueryString,\n },\n };\n}\n","import React from \"react\";\nimport type { LucideProps } from \"lucide-react\";\nimport {\n Home,\n User,\n Settings,\n Mail,\n Bell,\n Calendar,\n Star,\n Heart,\n Bookmark,\n Search,\n Filter,\n Download,\n Upload,\n Trash,\n Edit,\n Plus,\n Minus,\n Check,\n X,\n ChevronRight,\n ChevronLeft,\n ChevronUp,\n ChevronDown,\n ChevronsUpDown,\n ArrowRight,\n ArrowLeft,\n ArrowUp,\n ArrowDown,\n File,\n Folder,\n Image,\n Video,\n Music,\n Lock,\n Unlock,\n Eye,\n EyeOff,\n Sun,\n Moon,\n Cloud,\n Zap,\n Activity,\n TrendingUp,\n TrendingDown,\n BarChart,\n PieChart,\n Database,\n Server,\n Wifi,\n Battery,\n Camera,\n Mic,\n Phone,\n MessageSquare,\n Send,\n Share,\n Link,\n ExternalLink,\n Globe,\n MapPin,\n Users,\n ShoppingCart,\n CreditCard,\n Package,\n Briefcase,\n Target,\n Flag,\n Clipboard,\n List,\n Grid,\n Layout,\n Layers,\n Copy,\n Save,\n RefreshCw,\n Maximize,\n Code,\n AlertCircle,\n Info,\n HelpCircle,\n CheckCircle,\n XCircle,\n Menu,\n MoreVertical,\n MoreHorizontal,\n PlayCircle,\n PauseCircle,\n LogIn,\n LogOut,\n UserPlus,\n UserMinus,\n Tag,\n Award,\n Gift,\n Truck,\n Clock,\n Handshake,\n Stethoscope,\n Microscope,\n GraduationCap,\n BookOpen,\n Building2,\n Trees,\n HeartHandshake,\n Brain,\n Lightbulb,\n} from \"lucide-react\";\n\n/**\n * A exhaustive map of Lucide icons commonly used in the CMS.\n */\nexport const ICON_MAP: Record<string, React.ComponentType<LucideProps>> = {\n Home,\n User,\n Settings,\n Mail,\n Bell,\n Calendar,\n Star,\n Heart,\n Bookmark,\n Search,\n Filter,\n Download,\n Upload,\n Trash,\n Edit,\n Plus,\n Minus,\n Check,\n X,\n ChevronRight,\n ChevronLeft,\n ChevronUp,\n ChevronDown,\n ChevronsUpDown,\n ArrowRight,\n ArrowLeft,\n ArrowUp,\n ArrowDown,\n File,\n Folder,\n Image,\n Video,\n Music,\n Lock,\n Unlock,\n Eye,\n EyeOff,\n Sun,\n Moon,\n Cloud,\n Zap,\n Activity,\n TrendingUp,\n TrendingDown,\n BarChart,\n PieChart,\n Database,\n Server,\n Wifi,\n Battery,\n Camera,\n Mic,\n Phone,\n MessageSquare,\n Send,\n Share,\n Link,\n ExternalLink,\n Globe,\n MapPin,\n Users,\n ShoppingCart,\n CreditCard,\n Package,\n Briefcase,\n Target,\n Flag,\n Clipboard,\n List,\n Grid,\n Layout,\n Layers,\n Copy,\n Save,\n RefreshCw,\n Maximize,\n Code,\n AlertCircle,\n Info,\n HelpCircle,\n CheckCircle,\n XCircle,\n Menu,\n MoreVertical,\n MoreHorizontal,\n PlayCircle,\n PauseCircle,\n LogIn,\n LogOut,\n UserPlus,\n UserMinus,\n Tag,\n Award,\n Gift,\n Truck,\n Clock,\n Handshake,\n Stethoscope,\n Microscope,\n GraduationCap,\n BookOpen,\n Building2,\n Trees,\n HeartHandshake,\n Brain,\n Lightbulb,\n};\n\nexport interface IconProps extends LucideProps {\n /** The name of the icon (from the ICON_MAP keys) */\n name: string;\n /** Fallback icon name if the provided name is not found */\n fallback?: string;\n}\n\n/**\n * Dynamic Icon component that renders Lucide icons by name.\n * Useful for CMS-driven icons where names are stored as strings.\n */\nexport function Icon({ name, fallback = \"HelpCircle\", ...props }: IconProps) {\n const IconComponent = ICON_MAP[name] ?? ICON_MAP[fallback] ?? HelpCircle;\n return React.createElement(IconComponent, props);\n}\n"],"mappings":";;;AAAA,MAAa,YAAY;CAAC;CAAQ;CAAS;CAAU;AAErD,MAAa,mBAAmB;CAC9B,GAAG;CACH;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,eAAe;CAC1B,GAAG;CACH;CACA;CACA;CACA;CACA;CACA;CACD;;;ACjBD,MAAa,aAAa;CACxB,cAAc;CACd,eAAe;CACf,oBAAoB;CACpB,gBAAgB;CAChB,iBAAiB;CACjB,iBAAiB;CACjB,mBAAmB;CACpB;AAED,MAAa,SAAS;CACpB,aAAa;CACb,kBAAkB;CACnB;AAED,MAAa,QAAQ;CACnB,UAAU;CACV,OAAO;CACP,QAAQ;CACR,MAAM;CACN,QAAQ;CACT;AAED,MAAa,YAAY;CACvB,MAAM;CACN,QAAQ;CACR,MAAM;CACP;AAED,MAAa,mBAAmB;CAC9B;CACA;CACA;CACA;CACD;AAED,MAAa,cAAc;CACzB,IAAI;CACJ,SAAS;CACT,aAAa;CACb,cAAc;CACd,WAAW;CACX,WAAW;CACX,gBAAgB;CACjB;AAED,MAAa,QAAQ;CACnB,kBAAkB;EAAC;EAAQ;EAAS;EAAQ;EAAQ;EAAS;EAAO;CACpE,kBAAkB;EAAC;EAAQ;EAAS;EAAO;CAC3C,gBAAgB,IAAI,OAAO;CA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ClB,MAAM,CAAC,WAAW,gBAAgB;GAClC,GAAG;GACJ,CACF;;CAGH,SAAS,qBACP,QACA,SAA4C,EAAE,EAC9C,SACgD;EAChD,MAAM,QAAQ,iBAAiB,OAAO;EACtC,OAAO,kBACL,qBAAqB,OAAO,oBAAoB,QAAQ,IAAI,UAAU,MACtE;GACE,YAAY,MAAM;GAClB,MAAM,CAAC,WAAW,mBAAmB;GACrC,GAAG;GACJ,CACF;;CAGH,SAAS,wBACP,QACA,SAA4C,EAAE,EAC9C,SACmD;EACnD,MAAM,QAAQ,iBAAiB,OAAO;EACtC,OAAO,kBACL,qBAAqB,OAAO,uBAAuB,QAAQ,IAAI,UAAU,MACzE;GACE,YAAY,MAAM;GAClB,MAAM,CAAC,WAAW,sBAAsB;GACxC,GAAG;GACJ,CACF;;CAGH,OAAO;EAEL;EAEA;EACA;EACA;EAEA;EACA;EAEA;EAEA;EACA;EAEA;EACA;EACA;EAEA;EAEA;EACA;EAEA;EACA;EAEA;EACA;EAEA;EAEA;EACA;EAEA;EACA;EAEA;EACA;EACA;EAEA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA,OAAO;EACP,gBAAgB;EAChB,OAAO,EACL,kBACD;EACF;;;;;;;ACh4BH,MAAa,WAA6D;CACxE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;;AAaD,SAAgB,KAAK,EAAE,MAAM,WAAW,cAAc,GAAG,SAAoB;CAC3E,MAAM,gBAAgB,SAAS,SAAS,SAAS,aAAa;CAC9D,OAAO,MAAM,cAAc,eAAe,MAAM"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/constants/pageTypes.ts","../src/constants/index.ts","../src/types/contact.ts","../src/core/client.ts","../src/types/icon.ts"],"sourcesContent":["export const pageTypes = [\"home\", \"about\", \"contact\"] as const;\n\nexport const defaultPageTypes = [\n ...pageTypes,\n \"services\",\n \"blog\",\n \"team\",\n \"gallery\",\n \"events\",\n] as const;\n\nexport const allPageTypes = [\n ...pageTypes,\n \"custom\",\n \"services\",\n \"blog\",\n \"team\",\n \"gallery\",\n \"events\",\n] as const;\n\nexport type PageType = typeof allPageTypes[number];\n","export * from \"./pageTypes\";\n\nexport const PAGINATION = {\n DEFAULT_PAGE: 1,\n DEFAULT_LIMIT: 10,\n LIST_DEFAULT_LIMIT: 20,\n BLOGS_PER_PAGE: 9,\n EVENTS_PER_PAGE: 9,\n ALBUMS_PER_PAGE: 9,\n MAX_ITEMS_FOR_SSG: 200,\n} as const;\n\nexport const SEARCH = {\n DEBOUNCE_MS: 500,\n MIN_QUERY_LENGTH: 2,\n} as const;\n\nexport const CACHE = {\n NO_CACHE: 0,\n SHORT: 60, // 1 minute\n MEDIUM: 300, // 5 minutes\n LONG: 3600, // 1 hour\n STATIC: 86400, // 24 hours\n} as const;\n\nexport const ANIMATION = {\n FAST: 0.2,\n NORMAL: 0.3,\n SLOW: 0.6,\n} as const;\n\nexport const CONTACT_SUBJECTS = [\n \"General Inquiry\",\n \"Project Proposal\",\n \"Careers\",\n \"Other\",\n] as const;\n\nexport const HTTP_STATUS = {\n OK: 200,\n CREATED: 201,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n INTERNAL_ERROR: 500,\n} as const;\n\nexport const MEDIA = {\n IMAGE_EXTENSIONS: [\".jpg\", \".jpeg\", \".png\", \".gif\", \".webp\", \".svg\"],\n VIDEO_EXTENSIONS: [\".mp4\", \".webm\", \".ogg\"],\n MAX_IMAGE_SIZE: 5 * 1024 * 1024,\n} as const;\n","export interface ContactPayload {\n name: string;\n email?: string | null;\n subject?: string | null;\n message: string;\n type?: string;\n /**\n * Cloudflare Turnstile token from the widget on your form.\n *\n * Required whenever the site has Turnstile enabled — check with\n * `fetchContactConfig(siteId)`. Submitting without one is rejected with 403\n * (`CmsError`), and the token is single-use: on a failed submit, reset the\n * widget before retrying rather than resending the same value.\n */\n turnstile_token?: string;\n}\n\nexport interface Contact extends ContactPayload {\n id: string;\n site_id: string;\n is_read: boolean;\n created_at: string;\n updated_at: string;\n}\n\n/**\n * Public Turnstile settings for a site's contact form, from\n * GET /:site_id/contact-config/.\n *\n * Named to avoid colliding with `ContactConfig` in ./site-config, which is the\n * site's displayed contact details (phone, email, socials) and unrelated.\n *\n * `enabled` with a null `site_key` means the site is misconfigured: the widget\n * cannot render and submissions will be rejected. Treat it as \"do not show the\n * form\" rather than \"no captcha needed\".\n */\nexport interface PublicContactConfig {\n turnstile: {\n enabled: boolean;\n site_key: string | null;\n };\n}\n\n/** Attachment caps enforced by the API; mirrored here to fail fast client-side. */\nexport const MAX_CONTACT_ATTACHMENTS = 3;\nexport const MAX_CONTACT_ATTACHMENTS_TOTAL_BYTES = 4 * 1024 * 1024;\nexport const CONTACT_ATTACHMENT_MIME_ALLOWLIST: readonly string[] = [\n \"application/pdf\",\n \"image/png\",\n \"image/jpeg\",\n \"image/webp\",\n \"image/gif\",\n \"text/plain\",\n \"application/msword\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n];\n","import { CACHE, PAGINATION } from \"../constants\";\nimport type { PaginatedResponse } from \"../types/pagination\";\nimport type { Header } from \"../types/header\";\nimport type { Footer } from \"../types/footer\";\nimport type { SiteConfig } from \"../types/site-config\";\nimport type { Page, PageListItem } from \"../types/cms-page\";\nimport type { AboutUsData } from \"../types/about\";\nimport type { Service } from \"../types/service\";\nimport type { Blog } from \"../types/blog\";\nimport type { Category } from \"../types/category\";\nimport type { TeamMember } from \"../types/team-member\";\nimport type { Album, AlbumItem } from \"../types/album\";\nimport type { BrandGroup, Brand } from \"../types/brand\";\nimport type { Testimonial } from \"../types/testimonials\";\nimport type { Event } from \"../types/event\";\nimport type { Faq } from \"../types/faq\";\nimport type { FaqGroup } from \"../types/faq-group\";\nimport type { Redirect, Redirect404Log, ResolvedRedirect } from \"../types/redirect\";\nimport type {\n ContactPayload,\n Contact,\n PublicContactConfig,\n} from \"../types/contact\";\nimport {\n MAX_CONTACT_ATTACHMENTS,\n MAX_CONTACT_ATTACHMENTS_TOTAL_BYTES,\n CONTACT_ATTACHMENT_MIME_ALLOWLIST,\n} from \"../types/contact\";\nimport type { Product, ProductListItem, ProductVariant } from \"../types/product\";\nimport type { ProductCategory } from \"../types/product-category\";\nimport type { ProductBrand } from \"../types/product-brand\";\nimport type { Collection, CollectionDetail } from \"../types/collection\";\nimport type { Order, PlaceOrderPayload } from \"../types/order\";\nimport type { StoreSettings } from \"../types/store-setting\";\nimport type {\n SitemapBlogItem,\n SitemapPageItem,\n SitemapProductItem,\n SitemapCollectionItem,\n SitemapResource,\n SitemapResourceMap,\n} from \"../types/sitemap\";\n\nexport interface FetchOptions extends RequestInit {\n revalidate?: number;\n tags?: string[];\n retries?: number;\n}\n\nexport interface CmsClientConfig {\n baseUrl: string;\n defaultOptions?: FetchOptions;\n}\n\nexport class CmsError extends Error {\n constructor(\n public message: string,\n public status?: number,\n public url?: string,\n ) {\n super(message);\n this.name = \"CmsError\";\n }\n}\n\nconst sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));\n\nexport function createCmsClient(config: CmsClientConfig) {\n const { baseUrl, defaultOptions = {} } = config;\n\n async function cmsFetch<T>(\n endpoint: string,\n options: FetchOptions = {},\n ): Promise<T | null> {\n const url = `${baseUrl}${endpoint}`;\n const {\n revalidate = CACHE.NO_CACHE,\n tags,\n retries = 1,\n ...rest\n } = { ...defaultOptions, ...options };\n\n const fetchConfig: RequestInit & {\n next?: { revalidate?: number; tags?: string[] };\n } = {\n ...rest,\n next: {\n revalidate,\n ...(tags && { tags }),\n },\n };\n\n for (let attempt = 0; attempt <= retries; attempt++) {\n try {\n const response = await fetch(url, fetchConfig);\n\n if (!response.ok) {\n // Retry on transient server errors (502, 503, 504)\n if (attempt < retries && [502, 503, 504].includes(response.status)) {\n await sleep(Math.pow(2, attempt) * 1000);\n continue;\n }\n\n let errorMsg = `API request failed: ${response.status} ${url}`;\n try {\n const body = await response.json();\n if (body?.message) errorMsg = body.message;\n } catch {\n // body not JSON, keep fallback\n }\n throw new CmsError(errorMsg, response.status, url);\n }\n\n // 204 / empty body — nothing to parse\n if (response.status === 204) {\n return null;\n }\n\n const result = await response.json();\n return result.data ?? result;\n } catch (error) {\n if (error instanceof CmsError) throw error;\n\n if (attempt < retries) {\n await sleep(Math.pow(2, attempt) * 1000);\n continue;\n }\n\n const msg =\n error instanceof Error ? error.message : String(error);\n throw new CmsError(`Request failed: ${msg}`, undefined, url);\n }\n }\n\n throw new CmsError(`Request failed after ${retries + 1} attempts`, undefined, url);\n }\n\n async function cmsFetchPaginated<T>(\n endpoint: string,\n options: FetchOptions = {},\n ): Promise<PaginatedResponse<T>> {\n const url = `${baseUrl}${endpoint}`;\n const {\n revalidate = CACHE.NO_CACHE,\n tags,\n retries = 1,\n ...rest\n } = { ...defaultOptions, ...options };\n\n const fetchConfig: RequestInit & {\n next?: { revalidate?: number; tags?: string[] };\n } = {\n ...rest,\n next: {\n revalidate,\n ...(tags && { tags }),\n },\n };\n\n for (let attempt = 0; attempt <= retries; attempt++) {\n try {\n const response = await fetch(url, fetchConfig);\n\n if (!response.ok) {\n if (attempt < retries && [502, 503, 504].includes(response.status)) {\n await sleep(Math.pow(2, attempt) * 1000);\n continue;\n }\n\n let errorMsg = `API request failed: ${response.status} ${url}`;\n try {\n const body = await response.json();\n if (body?.message) errorMsg = body.message;\n } catch {\n // body not JSON, keep fallback\n }\n throw new CmsError(errorMsg, response.status, url);\n }\n\n return await response.json();\n } catch (error) {\n if (error instanceof CmsError) throw error;\n\n if (attempt < retries) {\n await sleep(Math.pow(2, attempt) * 1000);\n continue;\n }\n\n const msg =\n error instanceof Error ? error.message : String(error);\n throw new CmsError(`Request failed: ${msg}`, undefined, url);\n }\n }\n\n throw new CmsError(`Request failed after ${retries + 1} attempts`, undefined, url);\n }\n\n function buildQueryString(\n params: Record<string, string | number | string[] | number[] | undefined | null>,\n ): string {\n const query = new URLSearchParams();\n Object.entries(params).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n if (Array.isArray(value)) {\n value.forEach((v) => query.append(key, String(v)));\n } else {\n query.append(key, String(value));\n }\n }\n });\n return query.toString();\n }\n\n // Default page size for list endpoints (categories, team, brands, testimonials,\n // faq-groups, faqs). Matches the backend's getPaginationParamsWithoutLimit(c, 20).\n // Album-items is NOT one of these: it uses getPaginationParams(c, 100), so its\n // server-side default is 10 and callers should pass an explicit `limit`.\n const LIST_DEFAULT_LIMIT = PAGINATION.LIST_DEFAULT_LIMIT;\n\n // ============================================================================\n // Header, Footer, Site Config\n // ============================================================================\n\n function fetchHeader(\n siteId: string,\n options?: FetchOptions,\n ): Promise<Header | null> {\n return cmsFetch<Header>(`/api/public/cms/${siteId}/header/`, {\n revalidate: CACHE.MEDIUM,\n tags: [\"header\"],\n ...options,\n });\n }\n\n function fetchFooter(\n siteId: string,\n options?: FetchOptions,\n ): Promise<Footer | null> {\n return cmsFetch<Footer>(`/api/public/cms/${siteId}/footer/`, {\n revalidate: CACHE.MEDIUM,\n tags: [\"footer\"],\n ...options,\n });\n }\n\n function fetchSiteConfig(\n siteId: string,\n options?: FetchOptions,\n ): Promise<SiteConfig | null> {\n return cmsFetch<SiteConfig>(`/api/public/cms/${siteId}/site-config/`, {\n revalidate: CACHE.MEDIUM,\n tags: [\"site-config\"],\n ...options,\n });\n }\n\n // ============================================================================\n // Pages\n // ============================================================================\n\n function fetchPages(\n siteId: string,\n params: { page?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<PageListItem>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<PageListItem>(\n `/api/public/cms/${siteId}/page/?${query}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"pages\"],\n ...options,\n },\n );\n }\n\n async function fetchPageByUrl(\n siteId: string,\n urlPath: string,\n options?: FetchOptions,\n ): Promise<Page | null> {\n const targetUrl =\n urlPath === \"/\" || urlPath === \"\"\n ? \"/\"\n : `/${urlPath.replace(/^\\/|\\/$/g, \"\")}`;\n\n return cmsFetch<Page>(\n `/api/public/cms/${siteId}/page/by-url/?url=${encodeURIComponent(targetUrl)}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"pages\", `page-${targetUrl || \"root\"}`],\n ...options,\n },\n );\n }\n\n // ============================================================================\n // About Us\n // ============================================================================\n\n function fetchAboutUs(\n siteId: string,\n options?: FetchOptions,\n ): Promise<AboutUsData | null> {\n return cmsFetch<AboutUsData>(`/api/public/cms/${siteId}/about-us/`, {\n revalidate: CACHE.MEDIUM,\n tags: [\"about\"],\n ...options,\n });\n }\n\n // ============================================================================\n // Services\n // ============================================================================\n\n async function fetchServices(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Service>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<Service>(\n `/api/public/cms/${siteId}/services/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"services\"],\n ...options,\n },\n );\n }\n\n function fetchServiceBySlug(\n siteId: string,\n slug: string,\n options?: FetchOptions,\n ): Promise<Service | null> {\n return cmsFetch<Service>(`/api/public/cms/${siteId}/services/${slug}`, {\n revalidate: CACHE.SHORT,\n tags: [\"services\", `service-${slug}`],\n ...options,\n });\n }\n\n // ============================================================================\n // Blogs\n // ============================================================================\n\n function fetchBlogs(\n siteId: string,\n params: { page?: number; limit?: number; search?: string } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Blog>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<Blog>(`/api/public/cms/${siteId}/blog/?${query}`, {\n revalidate: CACHE.SHORT,\n tags: [\"blogs\"],\n ...options,\n });\n }\n\n function fetchBlogBySlug(\n siteId: string,\n slug: string,\n options?: FetchOptions,\n ): Promise<Blog | null> {\n return cmsFetch<Blog>(`/api/public/cms/${siteId}/blog/${slug}`, {\n revalidate: CACHE.SHORT,\n tags: [\"blogs\", `blog-${slug}`],\n ...options,\n });\n }\n\n // Backwards-compatible alias. Backend route resolves by slug.\n function fetchBlogById(\n siteId: string,\n idOrSlug: number | string,\n options?: FetchOptions,\n ): Promise<Blog | null> {\n return fetchBlogBySlug(siteId, String(idOrSlug), options);\n }\n\n // ============================================================================\n // Categories\n // ============================================================================\n\n function fetchCategories(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Category>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<Category>(\n `/api/public/cms/${siteId}/categories/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"categories\"],\n ...options,\n },\n );\n }\n\n // ============================================================================\n // Team Members\n // ============================================================================\n\n function fetchTeamMembers(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<TeamMember>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<TeamMember>(\n `/api/public/cms/${siteId}/team-members/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"team\"],\n ...options,\n },\n );\n }\n\n function fetchTeamMembersByCategory(\n siteId: string,\n params: { categoryId: string; page?: number; limit?: number },\n options?: FetchOptions,\n ): Promise<PaginatedResponse<TeamMember>> {\n const query = buildQueryString({\n category_id: params.categoryId,\n page: params.page,\n limit: params.limit,\n });\n return cmsFetchPaginated<TeamMember>(\n `/api/public/cms/${siteId}/team-members/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"team\", `team-category-${params.categoryId}`],\n ...options,\n },\n );\n }\n\n // ============================================================================\n // Albums\n // ============================================================================\n\n function fetchAlbums(\n siteId: string,\n params: { page?: number; limit?: number; search?: string } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Album>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<Album>(\n `/api/public/cms/${siteId}/albums/?${query}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"albums\"],\n ...options,\n },\n );\n }\n\n function fetchAlbumItems(\n siteId: string,\n params: {\n /** Album slug. */\n album?: string;\n /** Comma-separated list of album IDs (e.g., \"id1,id2\") */\n album_id?: string;\n page?: number;\n /**\n * Defaults to 10 server-side (max 100) — pass an explicit value to get a\n * whole album, or several albums' worth for an album-group section.\n */\n limit?: number;\n },\n options?: FetchOptions,\n ): Promise<PaginatedResponse<AlbumItem>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<AlbumItem>(\n `/api/public/cms/${siteId}/albums/album-items/?${query}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"album-items\"],\n ...options,\n },\n );\n }\n\n // ============================================================================\n // Brands\n // ============================================================================\n\n function fetchBrandGroups(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<BrandGroup>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<BrandGroup>(\n `/api/public/cms/${siteId}/brand-groups/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"brand-groups\"],\n ...options,\n },\n );\n }\n\n function fetchBrands(\n siteId: string,\n params: { group?: string; group_id?: string; page?: number; limit?: number },\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Brand>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<Brand>(\n `/api/public/cms/${siteId}/brand-groups/brands/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"brands\"],\n ...options,\n },\n );\n }\n\n // ============================================================================\n // Testimonials\n // ============================================================================\n\n function fetchTestimonials(\n siteId: string,\n params?: { type?: \"testimonial\" | \"review\" | string; page?: number; limit?: number },\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Testimonial>> {\n const query = buildQueryString({\n type: params?.type,\n page: params?.page,\n limit: params?.limit,\n });\n return cmsFetchPaginated<Testimonial>(\n `/api/public/cms/${siteId}/testimonials/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"testimonials\"],\n ...options,\n },\n );\n }\n\n // ============================================================================\n // Events\n // ============================================================================\n\n function fetchEvents(\n siteId: string,\n params: { page?: number; limit?: number; search?: string } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Event>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<Event>(\n `/api/public/cms/${siteId}/events/?${query}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"events\"],\n ...options,\n },\n );\n }\n\n function fetchEventBySlug(\n siteId: string,\n slug: string,\n options?: FetchOptions,\n ): Promise<Event | null> {\n return cmsFetch<Event>(`/api/public/cms/${siteId}/events/${slug}`, {\n revalidate: CACHE.SHORT,\n tags: [\"events\", `event-${slug}`],\n ...options,\n });\n }\n\n // ============================================================================\n // FAQ Groups\n // ============================================================================\n\n function fetchFaqGroups(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<FaqGroup>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<FaqGroup>(\n `/api/public/cms/${siteId}/faq-groups/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"faq-groups\"],\n ...options,\n },\n );\n }\n\n /**\n * Public Turnstile settings for the site's contact form.\n *\n * Call this before rendering the form: when `turnstile.enabled` is true the\n * widget must be rendered with `turnstile.site_key` and its token passed to\n * `submitContactForm`, or every submission is rejected.\n */\n function fetchContactConfig(\n siteId: string,\n options?: FetchOptions,\n ): Promise<PublicContactConfig | null> {\n return cmsFetch<PublicContactConfig>(\n `/api/public/cms/${siteId}/contact-config/`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"contact-config\"],\n ...options,\n },\n );\n }\n\n /**\n * Submit the contact form.\n *\n * Unlike the read methods, this THROWS `CmsError` on a rejection rather than\n * returning null — a form needs to tell \"captcha failed, reset the widget\"\n * (403) apart from \"rate limited\" (429) and a network blip, and a single\n * `null` cannot carry that. `error.status` holds the HTTP status.\n *\n * Pass `attachments` to send files; the request then goes out as multipart\n * instead of JSON. Caps are enforced server-side and pre-checked here.\n */\n async function submitContactForm(\n siteId: string,\n payload: ContactPayload,\n attachments?: File[],\n options?: FetchOptions,\n ): Promise<Contact> {\n const url = `${baseUrl}/api/public/cms/${siteId}/contact/`;\n\n if (attachments?.length) {\n if (attachments.length > MAX_CONTACT_ATTACHMENTS) {\n throw new CmsError(\n `At most ${MAX_CONTACT_ATTACHMENTS} attachments are allowed`,\n 400,\n url,\n );\n }\n const totalBytes = attachments.reduce((sum, f) => sum + f.size, 0);\n if (totalBytes > MAX_CONTACT_ATTACHMENTS_TOTAL_BYTES) {\n throw new CmsError(\n \"Attachments exceed the 4 MiB total size limit\",\n 400,\n url,\n );\n }\n for (const f of attachments) {\n if (!CONTACT_ATTACHMENT_MIME_ALLOWLIST.includes(f.type)) {\n throw new CmsError(\n `Attachment type not allowed: ${f.type || \"unknown\"}`,\n 400,\n url,\n );\n }\n }\n }\n\n let body: BodyInit;\n const headers: Record<string, string> = {};\n if (attachments?.length) {\n // multipart — the runtime must set Content-Type so the boundary is right,\n // so no Content-Type header is set here.\n const form = new FormData();\n for (const [key, value] of Object.entries(payload)) {\n if (value !== undefined && value !== null) form.append(key, String(value));\n }\n for (const file of attachments) form.append(\"attachments\", file, file.name);\n body = form;\n } else {\n headers[\"Content-Type\"] = \"application/json\";\n body = JSON.stringify(payload);\n }\n\n // No retries: the body may be a consumed stream, a resend would duplicate\n // the submission, and the one retryable-looking status here (503, a\n // misconfigured Turnstile) is a deployment fault that will not self-heal —\n // retrying it just burns the 1-per-60s write budget.\n let response: Response;\n try {\n response = await fetch(url, {\n ...options,\n method: \"POST\",\n headers: { ...headers, ...(options?.headers as Record<string, string>) },\n body,\n });\n } catch (error) {\n throw new CmsError(\n error instanceof Error ? error.message : \"Network request failed\",\n undefined,\n url,\n );\n }\n\n if (!response.ok) {\n // The API answers errors as { message }; fall back to the status text\n // when the body is not JSON (a proxy error page, say).\n let message = `Request failed with status ${response.status}`;\n try {\n const parsed = (await response.json()) as { message?: string };\n if (parsed?.message) message = parsed.message;\n } catch {\n // keep the fallback\n }\n throw new CmsError(message, response.status, url);\n }\n\n const result = await response.json();\n return (result.data ?? result) as Contact;\n }\n\n function fetchFaqs(\n siteId: string,\n params?: { group_id?: string; page?: number; limit?: number },\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Faq>> {\n const query = buildQueryString({\n group_id: params?.group_id,\n page: params?.page,\n limit: params?.limit,\n });\n return cmsFetchPaginated<Faq>(\n `/api/public/cms/${siteId}/faqs/?${query}`,\n {\n revalidate: CACHE.MEDIUM,\n tags: [\"faqs\"],\n ...options,\n },\n );\n }\n\n // ============================================================================\n // Redirects\n // ============================================================================\n\n async function fetchRedirects(\n siteId: string,\n options?: FetchOptions,\n ): Promise<Redirect[]> {\n const result = await cmsFetch<Redirect[]>(\n `/api/public/cms/${siteId}/redirects/`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"redirects\"],\n ...options,\n },\n );\n return result ?? [];\n }\n\n function resolveRedirect(\n siteId: string,\n sourcePath: string,\n options?: FetchOptions,\n ): Promise<ResolvedRedirect | null> {\n return cmsFetch<ResolvedRedirect>(\n `/api/public/cms/${siteId}/redirects/resolve/?sourcePath=${encodeURIComponent(sourcePath)}`,\n {\n revalidate: CACHE.NO_CACHE,\n tags: [\"redirects\", `redirect-${sourcePath}`],\n ...options,\n },\n );\n }\n\n function reportRedirect404(\n siteId: string,\n sourcePath: string,\n referrer?: string,\n options?: FetchOptions,\n ): Promise<Redirect404Log | null> {\n const headers = {\n \"Content-Type\": \"application/json\",\n ...(options?.headers ?? {}),\n };\n\n return cmsFetch<Redirect404Log>(\n `/api/public/cms/${siteId}/redirects/404-logs/`,\n {\n method: \"POST\",\n ...options,\n headers,\n body: JSON.stringify({\n source_path: sourcePath,\n referrer,\n }),\n revalidate: CACHE.NO_CACHE,\n tags: [\"redirects\", \"redirect-404-logs\"],\n retries: 0,\n },\n );\n }\n\n // ============================================================================\n // Store — Products, Categories, Brands, Collections, Orders\n // Note: Uses /api/public/store/ prefix (NOT /api/public/cms/)\n // ============================================================================\n\n function fetchStoreSettings(\n siteId: string,\n options?: FetchOptions,\n ): Promise<StoreSettings | null> {\n return cmsFetch<StoreSettings>(`/api/public/store/${siteId}/settings/`, {\n revalidate: CACHE.MEDIUM,\n tags: [\"store-settings\"],\n ...options,\n });\n }\n\n function fetchProductCategories(\n siteId: string,\n params: {\n page?: number;\n limit?: number;\n search?: string;\n ordering?: string;\n parent_id?: string | null;\n } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<ProductCategory>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<ProductCategory>(\n `/api/public/store/${siteId}/categories/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"product-categories\"],\n ...options,\n },\n );\n }\n\n function fetchProductBrands(\n siteId: string,\n params: {\n page?: number;\n limit?: number;\n search?: string;\n ordering?: string;\n } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<ProductBrand>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<ProductBrand>(\n `/api/public/store/${siteId}/brands/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"product-brands\"],\n ...options,\n },\n );\n }\n\n function fetchProducts(\n siteId: string,\n params: {\n page?: number;\n limit?: number;\n search?: string;\n category_id?: string;\n tag_id?: string;\n brand_id?: string;\n is_featured?: \"true\" | \"false\";\n sort?: \"price_asc\" | \"price_desc\";\n min_price?: number;\n max_price?: number;\n availability?: \"in_stock\" | \"out_of_stock\";\n } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<ProductListItem>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<ProductListItem>(\n `/api/public/store/${siteId}/products/?${query}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"products\"],\n ...options,\n },\n );\n }\n\n function fetchProductDetail(\n siteId: string,\n slug: string,\n options?: FetchOptions,\n ): Promise<Product | null> {\n return cmsFetch<Product>(`/api/public/store/${siteId}/products/${slug}/`, {\n revalidate: CACHE.SHORT,\n tags: [\"products\", `product-${slug}`],\n ...options,\n });\n }\n\n function fetchProductsByTag(\n siteId: string,\n tag: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<{ item: unknown; product: Product }> | null> {\n const query = buildQueryString({ tag, ...params });\n return cmsFetch<PaginatedResponse<{ item: unknown; product: Product }>>(\n `/api/public/store/${siteId}/products/by-tag/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"products\", `products-tag-${tag}`],\n ...options,\n },\n );\n }\n\n function fetchCollections(\n siteId: string,\n params: {\n page?: number;\n limit?: number;\n search?: string;\n /** Comma-separated list of collection IDs (e.g., \"id1,id2\") */\n id?: string;\n } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<Collection>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<Collection>(\n `/api/public/store/${siteId}/collections/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"collections\"],\n ...options,\n },\n );\n }\n\n function fetchCollectionDetail(\n siteId: string,\n slug: string,\n params: {\n page?: number;\n limit?: number;\n category_id?: string;\n sort?: \"name_asc\" | \"name_desc\";\n availability?: \"in_stock\" | \"out_of_stock\";\n } = {},\n options?: FetchOptions,\n ): Promise<CollectionDetail | null> {\n const query = buildQueryString(params);\n return cmsFetch<CollectionDetail>(\n `/api/public/store/${siteId}/collections/${slug}/${\n query ? `?${query}` : \"\"\n }`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"collections\", `collection-${slug}`],\n ...options,\n },\n );\n }\n\n function fetchCollectionDetailById(\n siteId: string,\n id: string,\n params: {\n page?: number;\n limit?: number;\n category_id?: string;\n sort?: \"name_asc\" | \"name_desc\";\n availability?: \"in_stock\" | \"out_of_stock\";\n } = {},\n options?: FetchOptions,\n ): Promise<CollectionDetail | null> {\n const query = buildQueryString(params);\n return cmsFetch<CollectionDetail>(\n `/api/public/store/${siteId}/collections/id/${id}/${\n query ? `?${query}` : \"\"\n }`,\n {\n revalidate: CACHE.SHORT,\n tags: [\"collections\", `collection-${id}`],\n ...options,\n },\n );\n }\n\n function placeOrder(\n siteId: string,\n payload: PlaceOrderPayload,\n options?: FetchOptions,\n ): Promise<Order | null> {\n return cmsFetch<Order>(`/api/public/store/${siteId}/orders/`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(payload),\n revalidate: CACHE.NO_CACHE,\n retries: 0,\n ...options,\n });\n }\n\n // ============================================================================\n // Sitemap — public endpoints for XML sitemap generation (fetch once per day)\n // ============================================================================\n\n function fetchSitemapBlogs(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<SitemapBlogItem>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<SitemapBlogItem>(\n `/api/public/cms/${siteId}/sitemap/blogs/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.STATIC,\n tags: [\"sitemap\", \"sitemap-blogs\"],\n ...options,\n },\n );\n }\n\n function fetchSitemapPages(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<SitemapPageItem>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<SitemapPageItem>(\n `/api/public/cms/${siteId}/sitemap/pages/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.STATIC,\n tags: [\"sitemap\", \"sitemap-pages\"],\n ...options,\n },\n );\n }\n\n function fetchSitemapProducts(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<SitemapProductItem>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<SitemapProductItem>(\n `/api/public/store/${siteId}/sitemap/products/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.STATIC,\n tags: [\"sitemap\", \"sitemap-products\"],\n ...options,\n },\n );\n }\n\n function fetchSitemapCollections(\n siteId: string,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<SitemapCollectionItem>> {\n const query = buildQueryString(params);\n return cmsFetchPaginated<SitemapCollectionItem>(\n `/api/public/store/${siteId}/sitemap/collections/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.STATIC,\n tags: [\"sitemap\", \"sitemap-collections\"],\n ...options,\n },\n );\n }\n\n // Resource key -> backend path. Store resources are namespaced under\n // /store/ and their keys are prefixed to avoid colliding with the CMS\n // `categories` route, which is a different resource entirely.\n const SITEMAP_ROUTES: Record<\n SitemapResource,\n { segment: string; store: boolean }\n > = {\n blogs: { segment: \"blogs\", store: false },\n pages: { segment: \"pages\", store: false },\n services: { segment: \"services\", store: false },\n events: { segment: \"events\", store: false },\n albums: { segment: \"albums\", store: false },\n \"team-members\": { segment: \"team-members\", store: false },\n \"team-categories\": { segment: \"team-categories\", store: false },\n \"brand-groups\": { segment: \"brand-groups\", store: false },\n products: { segment: \"products\", store: true },\n collections: { segment: \"collections\", store: true },\n \"product-categories\": { segment: \"categories\", store: true },\n \"product-brands\": { segment: \"brands\", store: true },\n };\n\n /**\n * Fetch any sitemap resource. Returns slug/url, title/name, image (where\n * the content type has one) and `updatedAt` for `lastModified`.\n */\n function fetchSitemap<R extends SitemapResource>(\n siteId: string,\n resource: R,\n params: { page?: number; limit?: number } = {},\n options?: FetchOptions,\n ): Promise<PaginatedResponse<SitemapResourceMap[R]>> {\n const { segment, store } = SITEMAP_ROUTES[resource];\n const namespace = store ? \"store\" : \"cms\";\n const query = buildQueryString(params);\n return cmsFetchPaginated<SitemapResourceMap[R]>(\n `/api/public/${namespace}/${siteId}/sitemap/${segment}/${query ? `?${query}` : \"\"}`,\n {\n revalidate: CACHE.STATIC,\n tags: [\"sitemap\", `sitemap-${resource}`],\n ...options,\n },\n );\n }\n\n return {\n // Default page size for list endpoints (categories, team, brands, testimonials, etc.)\n LIST_DEFAULT_LIMIT,\n // Header, Footer, Site Config\n fetchHeader,\n fetchFooter,\n fetchSiteConfig,\n // Pages\n fetchPages,\n fetchPageByUrl,\n // About\n fetchAboutUs,\n // Services\n fetchServices,\n fetchServiceBySlug,\n // Blogs\n fetchBlogs,\n fetchBlogBySlug,\n fetchBlogById,\n // Categories\n fetchCategories,\n // Team Members\n fetchTeamMembers,\n fetchTeamMembersByCategory,\n // Albums\n fetchAlbums,\n fetchAlbumItems,\n // Brands\n fetchBrandGroups,\n fetchBrands,\n // Testimonials\n fetchTestimonials,\n // Events\n fetchEvents,\n fetchEventBySlug,\n // FAQ Groups\n fetchFaqGroups,\n fetchFaqs,\n // Redirects\n fetchRedirects,\n resolveRedirect,\n reportRedirect404,\n // Contact\n submitContactForm,\n fetchContactConfig,\n // Store\n fetchStoreSettings,\n fetchProductCategories,\n fetchProductBrands,\n fetchProducts,\n fetchProductDetail,\n fetchProductsByTag,\n fetchCollections,\n fetchCollectionDetail,\n fetchCollectionDetailById,\n placeOrder,\n // Sitemap\n fetchSitemap,\n fetchSitemapBlogs,\n fetchSitemapPages,\n fetchSitemapProducts,\n fetchSitemapCollections,\n // Generic fetch utilities\n fetch: cmsFetch,\n fetchPaginated: cmsFetchPaginated,\n utils: {\n buildQueryString,\n },\n };\n}\n","export const ICON_NAMES = [\n \"Home\",\n \"User\",\n \"Settings\",\n \"Mail\",\n \"Bell\",\n \"Calendar\",\n \"Star\",\n \"Heart\",\n \"Bookmark\",\n \"Search\",\n \"Filter\",\n \"Download\",\n \"Upload\",\n \"Trash\",\n \"Edit\",\n \"Plus\",\n \"Minus\",\n \"Check\",\n \"X\",\n \"ChevronRight\",\n \"ChevronLeft\",\n \"ChevronUp\",\n \"ChevronDown\",\n \"ChevronsUpDown\",\n \"ArrowRight\",\n \"ArrowLeft\",\n \"ArrowUp\",\n \"ArrowDown\",\n \"File\",\n \"Folder\",\n \"Image\",\n \"Video\",\n \"Music\",\n \"Lock\",\n \"Unlock\",\n \"Eye\",\n \"EyeOff\",\n \"Sun\",\n \"Moon\",\n \"Cloud\",\n \"Zap\",\n \"Activity\",\n \"TrendingUp\",\n \"TrendingDown\",\n \"BarChart\",\n \"PieChart\",\n \"Database\",\n \"Server\",\n \"Wifi\",\n \"Battery\",\n \"Camera\",\n \"Mic\",\n \"Phone\",\n \"MessageSquare\",\n \"Send\",\n \"Share\",\n \"Link\",\n \"ExternalLink\",\n \"Globe\",\n \"MapPin\",\n \"Users\",\n \"ShoppingCart\",\n \"CreditCard\",\n \"Package\",\n \"Briefcase\",\n \"Target\",\n \"Flag\",\n \"Clipboard\",\n \"List\",\n \"Grid\",\n \"Layout\",\n \"Layers\",\n \"Copy\",\n \"Save\",\n \"RefreshCw\",\n \"Maximize\",\n \"Code\",\n \"AlertCircle\",\n \"Info\",\n \"HelpCircle\",\n \"CheckCircle\",\n \"XCircle\",\n \"Menu\",\n \"MoreVertical\",\n \"MoreHorizontal\",\n \"PlayCircle\",\n \"PauseCircle\",\n \"LogIn\",\n \"LogOut\",\n \"UserPlus\",\n \"UserMinus\",\n \"Tag\",\n \"Award\",\n \"Gift\",\n \"Truck\",\n \"Clock\",\n \"Handshake\",\n \"Stethoscope\",\n \"Microscope\",\n \"GraduationCap\",\n \"BookOpen\",\n \"Building2\",\n \"Trees\",\n \"HeartHandshake\",\n \"Brain\",\n \"Lightbulb\",\n] as const;\n\nexport type IconName = (typeof ICON_NAMES)[number];\n"],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,SACmD;EACnD,MAAM,EAAE,SAAS,UAAU,eAAe;EAC1C,MAAM,YAAY,QAAQ,UAAU;EACpC,MAAM,QAAQ,iBAAiB,MAAM;EACrC,OAAO,kBACL,eAAe,UAAU,GAAG,OAAO,WAAW,QAAQ,GAAG,QAAQ,IAAI,UAAU,MAC/E;GACE,YAAY,MAAM;GAClB,MAAM,CAAC,WAAW,WAAW,UAAU;GACvC,GAAG;EACL,CACF;CACF;CAEA,OAAO;EAEL;EAEA;EACA;EACA;EAEA;EACA;EAEA;EAEA;EACA;EAEA;EACA;EACA;EAEA;EAEA;EACA;EAEA;EACA;EAEA;EACA;EAEA;EAEA;EACA;EAEA;EACA;EAEA;EACA;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EAEA,OAAO;EACP,gBAAgB;EAChB,OAAO,EACL,iBACF;CACF;AACF;;;AClqCA,MAAa,aAAa;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@crayonscodetech/cms-sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "CMS SDK for fetching data and shared types",
5
5
  "keywords": [
6
6
  "cms",
7
7
  "sdk",
8
- "nextjs",
9
8
  "crayons"
10
9
  ],
11
10
  "homepage": "https://github.com/CrayonsCodeTech/cms-sdk#readme",
@@ -37,24 +36,9 @@
37
36
  "prepare": "pnpm build",
38
37
  "lint": "eslint src/**/*.ts"
39
38
  },
40
- "dependencies": {
41
- "lucide-react": "^1.14.0"
42
- },
43
39
  "devDependencies": {
44
- "@types/react": "^19.2.14",
45
40
  "tsdown": "latest",
46
41
  "typescript": "^6.0.3"
47
42
  },
48
- "peerDependencies": {
49
- "lucide-react": "^1.14.0",
50
- "next": ">=13.0.0",
51
- "react": ">=18.0.0",
52
- "react-dom": ">=18.0.0"
53
- },
54
- "peerDependenciesMeta": {
55
- "next": {
56
- "optional": true
57
- }
58
- },
59
43
  "module": "dist/index.mjs"
60
44
  }