@marvalt/digivalt-core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/LICENSE +21 -0
  3. package/README.md +13 -0
  4. package/dist/components/WordPressFooter.d.ts +17 -0
  5. package/dist/components/index.d.ts +9 -0
  6. package/dist/components/integrations/chatwoot-widget.d.ts +51 -0
  7. package/dist/components/integrations/mautic-tracking.d.ts +9 -0
  8. package/dist/components/molecules/CaseStudyCard.d.ts +10 -0
  9. package/dist/components/molecules/DynamicHeroSection.d.ts +56 -0
  10. package/dist/components/molecules/MemberCard.d.ts +12 -0
  11. package/dist/components/molecules/NavMenu.d.ts +13 -0
  12. package/dist/components/molecules/ProjectCard.d.ts +10 -0
  13. package/dist/components/molecules/SearchForm.d.ts +7 -0
  14. package/dist/components/molecules/TestimonialCard/TestimonialCard.d.ts +7 -0
  15. package/dist/components/molecules/WordPressNavMenu.d.ts +25 -0
  16. package/dist/components/molecules/breadcrumbs.d.ts +17 -0
  17. package/dist/components/molecules/hero-section.d.ts +41 -0
  18. package/dist/components/organisms/GravityFormPopup/GravityFormPopup.d.ts +8 -0
  19. package/dist/components/organisms/GravityFormSubmissions/GravityFormSubmissionsComponent.d.ts +9 -0
  20. package/dist/components/organisms/GravityFormSubmissions/index.d.ts +1 -0
  21. package/dist/components/organisms/Header.d.ts +6 -0
  22. package/dist/components/organisms/Hero.d.ts +2 -0
  23. package/dist/components/organisms/MauticForm/MauticForm.d.ts +9 -0
  24. package/dist/components/organisms/MauticForm/ThemedMauticForm.d.ts +9 -0
  25. package/dist/components/organisms/MauticForm/index.d.ts +1 -0
  26. package/dist/components/organisms/MauticFormPopup/MauticFormPopup.d.ts +9 -0
  27. package/dist/components/organisms/MemberProfileDialog.d.ts +9 -0
  28. package/dist/components/organisms/StaticGravityForm/StaticGravityForm.d.ts +40 -0
  29. package/dist/components/organisms/StaticGravityForm/index.d.ts +2 -0
  30. package/dist/components/organisms/SuiteCRMLeadForm/SuiteCRMLeadForm.d.ts +12 -0
  31. package/dist/components/organisms/SuiteCRMLeadForm/index.d.ts +2 -0
  32. package/dist/config/app-customization.d.ts +92 -0
  33. package/dist/config/environment.d.ts +69 -0
  34. package/dist/config/index.d.ts +2 -0
  35. package/dist/config/integrations.d.ts +234 -0
  36. package/dist/config/themes.d.ts +30 -0
  37. package/dist/config/widths.d.ts +47 -0
  38. package/dist/data/gravityFormsDataStore.d.ts +83 -0
  39. package/dist/data/mauticDataStore.d.ts +17 -0
  40. package/dist/data/mauticDataStoreTest.d.ts +48 -0
  41. package/dist/data/staticDataStore.d.ts +280 -0
  42. package/dist/data/staticDataStore.local.d.ts +251 -0
  43. package/dist/data/staticDataStoreProduction.d.ts +3 -0
  44. package/dist/data/wordpressDataStore.d.ts +117 -0
  45. package/dist/generators/gf.d.ts +3 -0
  46. package/dist/generators/index.d.ts +5 -0
  47. package/dist/generators/mautic.d.ts +3 -0
  48. package/dist/generators/suitecrm.d.ts +3 -0
  49. package/dist/generators/wp.d.ts +3 -0
  50. package/dist/hooks/use-mobile.d.ts +1 -0
  51. package/dist/hooks/use-toast.d.ts +43 -0
  52. package/dist/hooks/useCaseStudies.d.ts +30 -0
  53. package/dist/hooks/useCfWpWebhook.d.ts +29 -0
  54. package/dist/hooks/useCustomization.d.ts +71 -0
  55. package/dist/hooks/useGravityForms.d.ts +50 -0
  56. package/dist/hooks/useGravityFormsNew.d.ts +27 -0
  57. package/dist/hooks/useGravityFormsSubmissions.d.ts +15 -0
  58. package/dist/hooks/useMautic.d.ts +36 -0
  59. package/dist/hooks/useMembers.d.ts +31 -0
  60. package/dist/hooks/useProjects.d.ts +30 -0
  61. package/dist/hooks/useSuiteCRM.d.ts +72 -0
  62. package/dist/hooks/useTestimonials.d.ts +12 -0
  63. package/dist/hooks/useWordPressData.d.ts +115 -0
  64. package/dist/hooks/useWordPressDataNew.d.ts +77 -0
  65. package/dist/index.cjs +10433 -0
  66. package/dist/index.cjs.map +1 -0
  67. package/dist/index.d.ts +1352 -0
  68. package/dist/index.esm.js +10404 -0
  69. package/dist/index.esm.js.map +1 -0
  70. package/dist/lib/structured-data.d.ts +49 -0
  71. package/dist/lib/utils.d.ts +42 -0
  72. package/dist/services/cf-wp-webhook.d.ts +79 -0
  73. package/dist/services/gravityForms.d.ts +26 -0
  74. package/dist/services/index.d.ts +5 -0
  75. package/dist/services/mautic.d.ts +82 -0
  76. package/dist/services/suitecrm.d.ts +98 -0
  77. package/dist/services/wordpress.d.ts +1 -0
  78. package/dist/static/wpStatic.d.ts +189 -0
  79. package/dist/types/caseStudies.d.ts +92 -0
  80. package/dist/types/index.d.ts +1 -0
  81. package/dist/types/members.d.ts +85 -0
  82. package/dist/types/projects.d.ts +90 -0
  83. package/dist/types/wordpress.d.ts +132 -0
  84. package/dist/utils/cfImages.d.ts +21 -0
  85. package/dist/utils/eventStaticData.d.ts +11 -0
  86. package/dist/utils/extractDescriptionFromContent.d.ts +12 -0
  87. package/dist/utils/index.d.ts +1 -0
  88. package/dist/utils/mauticTrackingUtils.d.ts +78 -0
  89. package/dist/utils/memberImageUtils.d.ts +4 -0
  90. package/dist/utils/memberStaticData.d.ts +11 -0
  91. package/dist/utils/normalizeMemberForProfile.d.ts +10 -0
  92. package/dist/utils/passwordUtils.d.ts +24 -0
  93. package/dist/utils/placeholderReplacer.d.ts +34 -0
  94. package/dist/utils/testimonialStaticData.d.ts +12 -0
  95. package/dist/utils/wpRegistry.d.ts +13 -0
  96. package/package.json +69 -0
@@ -0,0 +1,30 @@
1
+ export interface CaseStudyQueryParams {
2
+ project_type?: string;
3
+ search?: string;
4
+ orderby?: string;
5
+ order?: 'asc' | 'desc';
6
+ }
7
+ export declare const useCaseStudies: (params?: CaseStudyQueryParams) => {
8
+ data: any[];
9
+ isLoading: boolean;
10
+ error: any;
11
+ isSuccess: boolean;
12
+ isError: boolean;
13
+ dataUpdatedAt: number;
14
+ };
15
+ export declare const useCaseStudy: (id: number) => {
16
+ data: any;
17
+ isLoading: boolean;
18
+ error: Error;
19
+ isSuccess: boolean;
20
+ isError: boolean;
21
+ dataUpdatedAt: number;
22
+ };
23
+ export declare const useCaseStudyBySlug: (slug: string) => {
24
+ data: any;
25
+ isLoading: boolean;
26
+ error: Error;
27
+ isSuccess: boolean;
28
+ isError: boolean;
29
+ dataUpdatedAt: number;
30
+ };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * React hook for Cloudflare WordPress Webhook functionality
3
+ */
4
+ import { type WebhookStatus, type WebhookConfig, type WebhookResponse } from '../services/cf-wp-webhook';
5
+ export interface UseCfWpWebhookReturn {
6
+ webhookStatus: WebhookStatus | null;
7
+ webhookConfig: WebhookConfig | null;
8
+ lastResponse: WebhookResponse | null;
9
+ isLoading: boolean;
10
+ error: string | null;
11
+ isConfigured: boolean;
12
+ configStatus: {
13
+ wordpress_url: boolean;
14
+ refresh_secret: boolean;
15
+ fully_configured: boolean;
16
+ };
17
+ refreshStatus: () => Promise<void>;
18
+ testWebhook: () => Promise<{
19
+ success: boolean;
20
+ message: string;
21
+ }>;
22
+ triggerRegeneration: () => Promise<{
23
+ success: boolean;
24
+ message: string;
25
+ }>;
26
+ refreshLastResponse: () => Promise<void>;
27
+ }
28
+ export declare function useCfWpWebhook(): UseCfWpWebhookReturn;
29
+ export default useCfWpWebhook;
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Customization hooks for accessing app customization configuration
3
+ *
4
+ * These hooks provide easy access to customization settings throughout the app.
5
+ * Fork developers can customize via CSS variables or customization.json file.
6
+ */
7
+ import { type AppCustomizationConfig, type ComponentCustomization } from '../config/app-customization';
8
+ /**
9
+ * Get the complete customization configuration
10
+ *
11
+ * @returns AppCustomizationConfig - The complete customization config
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const config = useCustomization();
16
+ * const menuFontSize = config.typography.menu.fontSize;
17
+ * ```
18
+ */
19
+ export declare function useCustomization(): AppCustomizationConfig;
20
+ /**
21
+ * Get customization for a specific component
22
+ *
23
+ * @param componentName - Name of the component to get customization for
24
+ * @returns ComponentCustomization | undefined
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * const menuConfig = useComponentStyles('WordPressNavMenu');
29
+ * const fontSize = menuConfig?.fontSize || '1rem';
30
+ * ```
31
+ */
32
+ export declare function useComponentStyles(componentName: keyof AppCustomizationConfig['components']): ComponentCustomization | undefined;
33
+ /**
34
+ * Get a specific typography token
35
+ *
36
+ * @param category - Typography category (menu, card, hero)
37
+ * @param property - Property name (fontSize, fontWeight, etc.)
38
+ * @returns The token value or undefined
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * const menuFontSize = useTypographyToken('menu', 'fontSize');
43
+ * ```
44
+ */
45
+ export declare function useTypographyToken(category: 'menu' | 'card' | 'hero', property: keyof AppCustomizationConfig['typography'][typeof category]): string | undefined;
46
+ /**
47
+ * Get a specific color token
48
+ *
49
+ * @param category - Color category (menu, card)
50
+ * @param property - Property name (text, textHover, etc.)
51
+ * @returns The token value or undefined
52
+ *
53
+ * @example
54
+ * ```tsx
55
+ * const menuTextColor = useColorToken('menu', 'text');
56
+ * ```
57
+ */
58
+ export declare function useColorToken(category: 'menu' | 'card', property: keyof AppCustomizationConfig['colors'][typeof category]): string | undefined;
59
+ /**
60
+ * Get a specific spacing token
61
+ *
62
+ * @param category - Spacing category (menu, card)
63
+ * @param property - Property name (itemGap, padding, etc.)
64
+ * @returns The token value or undefined
65
+ *
66
+ * @example
67
+ * ```tsx
68
+ * const menuGap = useSpacingToken('menu', 'itemGap');
69
+ * ```
70
+ */
71
+ export declare function useSpacingToken(category: 'menu' | 'card', property: keyof AppCustomizationConfig['spacing'][typeof category]): string | undefined;
@@ -0,0 +1,50 @@
1
+ import { GravityFormEntry } from '../services/gravityForms';
2
+ import { GravityFormField } from '../services/gravityForms';
3
+ /**
4
+ * Custom hook for fetching all Gravity Forms
5
+ */
6
+ export declare const useGravityForms: () => import("@tanstack/react-query").UseQueryResult<any, Error>;
7
+ /**
8
+ * Custom hook for fetching a specific Gravity Form
9
+ */
10
+ export declare const useGravityForm: (formId: string) => import("@tanstack/react-query").UseQueryResult<any, Error>;
11
+ /**
12
+ * Custom hook for fetching a Gravity Form schema for rendering
13
+ */
14
+ export declare const useGravityFormSchema: (formId: string) => import("@tanstack/react-query").UseQueryResult<any, Error>;
15
+ /**
16
+ * Custom hook for submitting Gravity Forms
17
+ */
18
+ export declare const useGravityFormSubmission: () => import("@tanstack/react-query").UseMutationResult<import("@marvalt/wadapter").GravityFormSubmissionResult, Error, {
19
+ formId: string;
20
+ entry: GravityFormEntry;
21
+ files?: {
22
+ [fieldId: string]: File[];
23
+ };
24
+ }, unknown>;
25
+ /**
26
+ * Custom hook for fetching Gravity Form entries
27
+ */
28
+ export declare const useGravityFormEntries: (formId: string, params?: {
29
+ page?: number;
30
+ per_page?: number;
31
+ search?: string;
32
+ start_date?: string;
33
+ end_date?: string;
34
+ }) => import("@tanstack/react-query").UseQueryResult<any, Error>;
35
+ /**
36
+ * Custom hook for fetching a specific Gravity Form entry
37
+ */
38
+ export declare const useGravityFormEntry: (entryId: string) => import("@tanstack/react-query").UseQueryResult<any, Error>;
39
+ /**
40
+ * Custom hook for form validation
41
+ */
42
+ export declare const useGravityFormValidation: () => {
43
+ validateField: (field: GravityFormField, value: unknown) => any;
44
+ validateForm: (form: GravityForm, formData: GravityFormEntry) => {
45
+ isValid: boolean;
46
+ errors: {
47
+ [fieldId: string]: string;
48
+ };
49
+ };
50
+ };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Custom hook for fetching all Gravity Forms using static data
3
+ */
4
+ export declare const useGravityForms: () => import("@tanstack/react-query").UseQueryResult<import("../data/gravityFormsDataStore").GravityForm[], Error>;
5
+ /**
6
+ * Custom hook for fetching a specific Gravity Form using static data
7
+ */
8
+ export declare const useGravityForm: (formId: string) => import("@tanstack/react-query").UseQueryResult<import("../data/gravityFormsDataStore").GravityForm, Error>;
9
+ /**
10
+ * Custom hook for fetching a Gravity Form schema for rendering using static data
11
+ */
12
+ export declare const useGravityFormSchema: (formId: string) => import("@tanstack/react-query").UseQueryResult<import("../data/gravityFormsDataStore").GravityForm, Error>;
13
+ /**
14
+ * Custom hook for submitting Gravity Forms using the npm package
15
+ */
16
+ export declare const useGravityFormSubmission: () => import("@tanstack/react-query").UseMutationResult<any, Error, {
17
+ formId: string;
18
+ values: Record<string, any>;
19
+ }, unknown>;
20
+ /**
21
+ * Custom hook for Gravity Form submissions using the npm package
22
+ */
23
+ export declare const useGravityFormSubmissions: (formId: string) => import("@tanstack/react-query").UseQueryResult<any[], Error>;
24
+ /**
25
+ * Custom hook for Gravity Form entries using the npm package
26
+ */
27
+ export declare const useGravityFormEntries: (formId: string, page?: number, perPage?: number) => import("@tanstack/react-query").UseQueryResult<any[], Error>;
@@ -0,0 +1,15 @@
1
+ import { GravityFormEntry, GravityFormSubmissionResponse } from '../services/gravityForms';
2
+ export declare const useGravityFormsSubmissions: () => {
3
+ forms: GravityForm[];
4
+ loading: boolean;
5
+ error: string;
6
+ submitForm: (formId: string, entry: GravityFormEntry) => Promise<GravityFormSubmissionResponse>;
7
+ reloadForms: () => Promise<void>;
8
+ };
9
+ export declare const useGravityFormSubmissions: (formId: string) => {
10
+ form: any;
11
+ loading: boolean;
12
+ error: string;
13
+ submitForm: (entry: GravityFormEntry) => Promise<GravityFormSubmissionResponse>;
14
+ reloadForm: () => Promise<void>;
15
+ };
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Custom hook for submitting forms to Mautic
3
+ */
4
+ export declare const useMauticFormSubmission: () => any;
5
+ /**
6
+ * Custom hook for creating Mautic contacts
7
+ */
8
+ export declare const useMauticCreateContact: () => any;
9
+ /**
10
+ * Custom hook for updating Mautic contacts
11
+ */
12
+ export declare const useMauticUpdateContact: () => any;
13
+ /**
14
+ * Custom hook for fetching Mautic contact by email
15
+ */
16
+ export declare const useMauticContactByEmail: (email: string) => any;
17
+ /**
18
+ * Custom hook for fetching Mautic forms
19
+ */
20
+ export declare const useMauticForms: () => any;
21
+ /**
22
+ * Custom hook for fetching a specific Mautic form
23
+ */
24
+ export declare const useMauticForm: (formId: number) => any;
25
+ /**
26
+ * Custom hook for tracking Mautic events
27
+ */
28
+ export declare const useMauticEventTracking: () => any;
29
+ /**
30
+ * Custom hook for adding tags to contacts
31
+ */
32
+ export declare const useMauticAddTags: () => any;
33
+ /**
34
+ * Custom hook for removing tags from contacts
35
+ */
36
+ export declare const useMauticRemoveTags: () => any;
@@ -0,0 +1,31 @@
1
+ export interface MemberQueryParams {
2
+ department?: string;
3
+ search?: string;
4
+ orderby?: string;
5
+ order?: 'asc' | 'desc';
6
+ }
7
+ export declare const useMembers: (params?: MemberQueryParams) => {
8
+ data: any[];
9
+ isLoading: boolean;
10
+ error: any;
11
+ isSuccess: boolean;
12
+ isError: boolean;
13
+ dataUpdatedAt: number;
14
+ };
15
+ export declare const useMember: (id: number) => {
16
+ data: any;
17
+ isLoading: boolean;
18
+ error: Error;
19
+ isSuccess: boolean;
20
+ isError: boolean;
21
+ dataUpdatedAt: number;
22
+ };
23
+ /** Resolves member by slug from WordPress static data (wordpress-data.json). Same source as the grid. */
24
+ export declare const useMemberBySlug: (slug: string) => {
25
+ data: any;
26
+ isLoading: boolean;
27
+ error: Error;
28
+ isSuccess: boolean;
29
+ isError: boolean;
30
+ dataUpdatedAt: number;
31
+ };
@@ -0,0 +1,30 @@
1
+ export interface ProjectQueryParams {
2
+ project_type?: string;
3
+ search?: string;
4
+ orderby?: string;
5
+ order?: 'asc' | 'desc';
6
+ }
7
+ export declare const useProjects: (params?: ProjectQueryParams) => {
8
+ data: any[];
9
+ isLoading: boolean;
10
+ error: any;
11
+ isSuccess: boolean;
12
+ isError: boolean;
13
+ dataUpdatedAt: number;
14
+ };
15
+ export declare const useProject: (id: number) => {
16
+ data: any;
17
+ isLoading: boolean;
18
+ error: Error;
19
+ isSuccess: boolean;
20
+ isError: boolean;
21
+ dataUpdatedAt: number;
22
+ };
23
+ export declare const useProjectBySlug: (slug: string) => {
24
+ data: any;
25
+ isLoading: boolean;
26
+ error: Error;
27
+ isSuccess: boolean;
28
+ isError: boolean;
29
+ dataUpdatedAt: number;
30
+ };
@@ -0,0 +1,72 @@
1
+ import { SuiteCRMLead, SuiteCRMContact, SuiteCRMAccount, SuiteCRMOpportunity } from '../services/suitecrm';
2
+ /**
3
+ * Custom hook for creating SuiteCRM leads
4
+ */
5
+ export declare const useSuiteCRMCreateLead: () => import("@tanstack/react-query").UseMutationResult<import("../services").SuiteCRMAPIResponse<any>, Error, SuiteCRMLead, unknown>;
6
+ /**
7
+ * Custom hook for updating SuiteCRM leads
8
+ */
9
+ export declare const useSuiteCRMUpdateLead: () => import("@tanstack/react-query").UseMutationResult<import("../services").SuiteCRMAPIResponse<any>, Error, {
10
+ leadId: string;
11
+ lead: Partial<SuiteCRMLead>;
12
+ }, unknown>;
13
+ /**
14
+ * Custom hook for fetching SuiteCRM leads
15
+ */
16
+ export declare const useSuiteCRMLeads: (params?: {
17
+ page?: number;
18
+ per_page?: number;
19
+ filter?: string;
20
+ sort?: string;
21
+ }) => import("@tanstack/react-query").UseQueryResult<import("../services").SuiteCRMAPIResponse<any>, Error>;
22
+ /**
23
+ * Custom hook for fetching a specific SuiteCRM lead
24
+ */
25
+ export declare const useSuiteCRMLead: (leadId: string) => import("@tanstack/react-query").UseQueryResult<import("../services").SuiteCRMAPIResponse<any>, Error>;
26
+ /**
27
+ * Custom hook for searching SuiteCRM leads
28
+ */
29
+ export declare const useSuiteCRMSearchLeads: (query: string) => import("@tanstack/react-query").UseQueryResult<import("../services").SuiteCRMAPIResponse<any>, Error>;
30
+ /**
31
+ * Custom hook for creating SuiteCRM contacts
32
+ */
33
+ export declare const useSuiteCRMCreateContact: () => import("@tanstack/react-query").UseMutationResult<import("../services").SuiteCRMAPIResponse<any>, Error, SuiteCRMContact, unknown>;
34
+ /**
35
+ * Custom hook for updating SuiteCRM contacts
36
+ */
37
+ export declare const useSuiteCRMUpdateContact: () => import("@tanstack/react-query").UseMutationResult<import("../services").SuiteCRMAPIResponse<any>, Error, {
38
+ contactId: string;
39
+ contact: Partial<SuiteCRMContact>;
40
+ }, unknown>;
41
+ /**
42
+ * Custom hook for fetching a specific SuiteCRM contact
43
+ */
44
+ export declare const useSuiteCRMContact: (contactId: string) => import("@tanstack/react-query").UseQueryResult<import("../services").SuiteCRMAPIResponse<any>, Error>;
45
+ /**
46
+ * Custom hook for creating SuiteCRM accounts
47
+ */
48
+ export declare const useSuiteCRMCreateAccount: () => import("@tanstack/react-query").UseMutationResult<import("../services").SuiteCRMAPIResponse<any>, Error, SuiteCRMAccount, unknown>;
49
+ /**
50
+ * Custom hook for fetching a specific SuiteCRM account
51
+ */
52
+ export declare const useSuiteCRMAccount: (accountId: string) => import("@tanstack/react-query").UseQueryResult<import("../services").SuiteCRMAPIResponse<any>, Error>;
53
+ /**
54
+ * Custom hook for creating SuiteCRM opportunities
55
+ */
56
+ export declare const useSuiteCRMCreateOpportunity: () => import("@tanstack/react-query").UseMutationResult<import("../services").SuiteCRMAPIResponse<any>, Error, SuiteCRMOpportunity, unknown>;
57
+ /**
58
+ * Custom hook for fetching a specific SuiteCRM opportunity
59
+ */
60
+ export declare const useSuiteCRMOpportunity: (opportunityId: string) => import("@tanstack/react-query").UseQueryResult<import("../services").SuiteCRMAPIResponse<any>, Error>;
61
+ /**
62
+ * Custom hook for fetching SuiteCRM lead sources
63
+ */
64
+ export declare const useSuiteCRMLeadSources: () => import("@tanstack/react-query").UseQueryResult<import("../services").SuiteCRMAPIResponse<any>, Error>;
65
+ /**
66
+ * Custom hook for fetching SuiteCRM lead statuses
67
+ */
68
+ export declare const useSuiteCRMLeadStatuses: () => import("@tanstack/react-query").UseQueryResult<import("../services").SuiteCRMAPIResponse<any>, Error>;
69
+ /**
70
+ * Custom hook for testing SuiteCRM connection
71
+ */
72
+ export declare const useSuiteCRMConnectionTest: () => import("@tanstack/react-query").UseQueryResult<boolean, Error>;
@@ -0,0 +1,12 @@
1
+ import { UseQueryResult } from '@tanstack/react-query';
2
+ import { Testimonial } from '../types/wordpress';
3
+ interface TestimonialQueryParams {
4
+ per_page?: number;
5
+ page?: number;
6
+ orderby?: string;
7
+ order?: 'asc' | 'desc';
8
+ search?: string;
9
+ }
10
+ export declare const useTestimonials: (params?: TestimonialQueryParams) => UseQueryResult<Testimonial[], Error>;
11
+ export declare const useTestimonial: (id: number) => UseQueryResult<Testimonial, Error>;
12
+ export {};
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Custom hook for fetching WordPress posts from static data
3
+ */
4
+ export declare const useWordPressPosts: (params?: {
5
+ page?: number;
6
+ per_page?: number;
7
+ categories?: string;
8
+ tags?: string;
9
+ search?: string;
10
+ orderby?: string;
11
+ order?: "asc" | "desc";
12
+ }) => {
13
+ data: any[];
14
+ isLoading: boolean;
15
+ error: any;
16
+ isSuccess: boolean;
17
+ isError: boolean;
18
+ dataUpdatedAt: number;
19
+ hasNextPage: boolean;
20
+ hasPreviousPage: boolean;
21
+ totalCount: number;
22
+ totalPages: number;
23
+ };
24
+ /**
25
+ * Custom hook for fetching a single WordPress post from static data
26
+ */
27
+ export declare const useWordPressPost: (id: number) => {
28
+ data: any;
29
+ isLoading: boolean;
30
+ error: Error;
31
+ isSuccess: boolean;
32
+ isError: boolean;
33
+ dataUpdatedAt: number;
34
+ };
35
+ /**
36
+ * Custom hook for fetching a WordPress post by slug from static data
37
+ */
38
+ export declare const useWordPressPostBySlug: (slug: string) => {
39
+ data: any;
40
+ isLoading: boolean;
41
+ error: Error;
42
+ isSuccess: boolean;
43
+ isError: boolean;
44
+ dataUpdatedAt: number;
45
+ };
46
+ /**
47
+ * Custom hook for fetching WordPress pages from static data
48
+ */
49
+ export declare const useWordPressPages: (params?: {
50
+ page?: number;
51
+ per_page?: number;
52
+ parent?: number;
53
+ orderby?: string;
54
+ order?: "asc" | "desc";
55
+ }) => {
56
+ data: any[];
57
+ isLoading: boolean;
58
+ error: any;
59
+ isSuccess: boolean;
60
+ isError: boolean;
61
+ dataUpdatedAt: number;
62
+ hasNextPage: boolean;
63
+ hasPreviousPage: boolean;
64
+ totalCount: number;
65
+ totalPages: number;
66
+ };
67
+ /**
68
+ * Custom hook for fetching a single WordPress page from static data
69
+ */
70
+ export declare const useWordPressPage: (id: number) => {
71
+ data: any;
72
+ isLoading: boolean;
73
+ error: Error;
74
+ isSuccess: boolean;
75
+ isError: boolean;
76
+ dataUpdatedAt: number;
77
+ };
78
+ /**
79
+ * Custom hook for fetching a WordPress page by slug from static data
80
+ */
81
+ export declare const useWordPressPageBySlug: (slug: string) => {
82
+ data: any;
83
+ isLoading: boolean;
84
+ error: Error;
85
+ isSuccess: boolean;
86
+ isError: boolean;
87
+ dataUpdatedAt: number;
88
+ };
89
+ /**
90
+ * Custom hook for WordPress search from static data
91
+ */
92
+ export declare const useWordPressSearch: (query: string, type?: "posts" | "pages" | "all") => {
93
+ data: any[];
94
+ isLoading: boolean;
95
+ error: any;
96
+ isSuccess: boolean;
97
+ isError: boolean;
98
+ dataUpdatedAt: number;
99
+ };
100
+ /**
101
+ * Custom hook for getting static data info
102
+ */
103
+ export declare const useStaticDataInfo: () => {
104
+ generatedAt: string;
105
+ frontendId: string;
106
+ frontendName: string;
107
+ config: import("../data/staticDataStore").StaticDataConfig;
108
+ stats: {
109
+ posts: any;
110
+ pages: any;
111
+ caseStudies: any;
112
+ projects: any;
113
+ members: any;
114
+ };
115
+ };
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Custom hook for fetching WordPress posts using the npm package
3
+ */
4
+ export declare const useWordPressPosts: (params?: {
5
+ page?: number;
6
+ per_page?: number;
7
+ categories?: string;
8
+ tags?: string;
9
+ search?: string;
10
+ orderby?: string;
11
+ order?: "asc" | "desc";
12
+ }) => {
13
+ data: any[];
14
+ totalCount: number;
15
+ isLoading: any;
16
+ error: any;
17
+ };
18
+ /**
19
+ * Custom hook for fetching WordPress pages using the npm package
20
+ */
21
+ export declare const useWordPressPages: (params?: {
22
+ page?: number;
23
+ per_page?: number;
24
+ search?: string;
25
+ orderby?: string;
26
+ order?: "asc" | "desc";
27
+ }) => {
28
+ data: any[];
29
+ totalCount: number;
30
+ isLoading: any;
31
+ error: any;
32
+ };
33
+ /**
34
+ * Custom hook for WordPress search using the npm package
35
+ */
36
+ export declare const useWordPressSearch: (query: string, type?: "posts" | "pages" | "all") => {
37
+ data: any[];
38
+ isLoading: any;
39
+ };
40
+ /**
41
+ * Custom hook for WordPress media using the npm package
42
+ */
43
+ export declare const useWordPressMedia: (params?: {
44
+ page?: number;
45
+ per_page?: number;
46
+ search?: string;
47
+ }) => {
48
+ data: any[];
49
+ totalCount: number;
50
+ isLoading: any;
51
+ error: any;
52
+ };
53
+ /**
54
+ * Custom hook for WordPress categories using the npm package
55
+ */
56
+ export declare const useWordPressCategories: () => {
57
+ data: any;
58
+ isLoading: any;
59
+ error: any;
60
+ };
61
+ /**
62
+ * Custom hook for WordPress tags using the npm package
63
+ */
64
+ export declare const useWordPressTags: () => {
65
+ data: any;
66
+ isLoading: any;
67
+ error: any;
68
+ };
69
+ /**
70
+ * Custom hook for static data info
71
+ */
72
+ export declare const useStaticDataInfo: () => {
73
+ generated_at: string;
74
+ frontend_id: string;
75
+ frontend_name: string;
76
+ data_source: string;
77
+ };