@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.
- package/CHANGELOG.md +17 -0
- package/LICENSE +21 -0
- package/README.md +13 -0
- package/dist/components/WordPressFooter.d.ts +17 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/integrations/chatwoot-widget.d.ts +51 -0
- package/dist/components/integrations/mautic-tracking.d.ts +9 -0
- package/dist/components/molecules/CaseStudyCard.d.ts +10 -0
- package/dist/components/molecules/DynamicHeroSection.d.ts +56 -0
- package/dist/components/molecules/MemberCard.d.ts +12 -0
- package/dist/components/molecules/NavMenu.d.ts +13 -0
- package/dist/components/molecules/ProjectCard.d.ts +10 -0
- package/dist/components/molecules/SearchForm.d.ts +7 -0
- package/dist/components/molecules/TestimonialCard/TestimonialCard.d.ts +7 -0
- package/dist/components/molecules/WordPressNavMenu.d.ts +25 -0
- package/dist/components/molecules/breadcrumbs.d.ts +17 -0
- package/dist/components/molecules/hero-section.d.ts +41 -0
- package/dist/components/organisms/GravityFormPopup/GravityFormPopup.d.ts +8 -0
- package/dist/components/organisms/GravityFormSubmissions/GravityFormSubmissionsComponent.d.ts +9 -0
- package/dist/components/organisms/GravityFormSubmissions/index.d.ts +1 -0
- package/dist/components/organisms/Header.d.ts +6 -0
- package/dist/components/organisms/Hero.d.ts +2 -0
- package/dist/components/organisms/MauticForm/MauticForm.d.ts +9 -0
- package/dist/components/organisms/MauticForm/ThemedMauticForm.d.ts +9 -0
- package/dist/components/organisms/MauticForm/index.d.ts +1 -0
- package/dist/components/organisms/MauticFormPopup/MauticFormPopup.d.ts +9 -0
- package/dist/components/organisms/MemberProfileDialog.d.ts +9 -0
- package/dist/components/organisms/StaticGravityForm/StaticGravityForm.d.ts +40 -0
- package/dist/components/organisms/StaticGravityForm/index.d.ts +2 -0
- package/dist/components/organisms/SuiteCRMLeadForm/SuiteCRMLeadForm.d.ts +12 -0
- package/dist/components/organisms/SuiteCRMLeadForm/index.d.ts +2 -0
- package/dist/config/app-customization.d.ts +92 -0
- package/dist/config/environment.d.ts +69 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/integrations.d.ts +234 -0
- package/dist/config/themes.d.ts +30 -0
- package/dist/config/widths.d.ts +47 -0
- package/dist/data/gravityFormsDataStore.d.ts +83 -0
- package/dist/data/mauticDataStore.d.ts +17 -0
- package/dist/data/mauticDataStoreTest.d.ts +48 -0
- package/dist/data/staticDataStore.d.ts +280 -0
- package/dist/data/staticDataStore.local.d.ts +251 -0
- package/dist/data/staticDataStoreProduction.d.ts +3 -0
- package/dist/data/wordpressDataStore.d.ts +117 -0
- package/dist/generators/gf.d.ts +3 -0
- package/dist/generators/index.d.ts +5 -0
- package/dist/generators/mautic.d.ts +3 -0
- package/dist/generators/suitecrm.d.ts +3 -0
- package/dist/generators/wp.d.ts +3 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-toast.d.ts +43 -0
- package/dist/hooks/useCaseStudies.d.ts +30 -0
- package/dist/hooks/useCfWpWebhook.d.ts +29 -0
- package/dist/hooks/useCustomization.d.ts +71 -0
- package/dist/hooks/useGravityForms.d.ts +50 -0
- package/dist/hooks/useGravityFormsNew.d.ts +27 -0
- package/dist/hooks/useGravityFormsSubmissions.d.ts +15 -0
- package/dist/hooks/useMautic.d.ts +36 -0
- package/dist/hooks/useMembers.d.ts +31 -0
- package/dist/hooks/useProjects.d.ts +30 -0
- package/dist/hooks/useSuiteCRM.d.ts +72 -0
- package/dist/hooks/useTestimonials.d.ts +12 -0
- package/dist/hooks/useWordPressData.d.ts +115 -0
- package/dist/hooks/useWordPressDataNew.d.ts +77 -0
- package/dist/index.cjs +10433 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +1352 -0
- package/dist/index.esm.js +10404 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/lib/structured-data.d.ts +49 -0
- package/dist/lib/utils.d.ts +42 -0
- package/dist/services/cf-wp-webhook.d.ts +79 -0
- package/dist/services/gravityForms.d.ts +26 -0
- package/dist/services/index.d.ts +5 -0
- package/dist/services/mautic.d.ts +82 -0
- package/dist/services/suitecrm.d.ts +98 -0
- package/dist/services/wordpress.d.ts +1 -0
- package/dist/static/wpStatic.d.ts +189 -0
- package/dist/types/caseStudies.d.ts +92 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/members.d.ts +85 -0
- package/dist/types/projects.d.ts +90 -0
- package/dist/types/wordpress.d.ts +132 -0
- package/dist/utils/cfImages.d.ts +21 -0
- package/dist/utils/eventStaticData.d.ts +11 -0
- package/dist/utils/extractDescriptionFromContent.d.ts +12 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/mauticTrackingUtils.d.ts +78 -0
- package/dist/utils/memberImageUtils.d.ts +4 -0
- package/dist/utils/memberStaticData.d.ts +11 -0
- package/dist/utils/normalizeMemberForProfile.d.ts +10 -0
- package/dist/utils/passwordUtils.d.ts +24 -0
- package/dist/utils/placeholderReplacer.d.ts +34 -0
- package/dist/utils/testimonialStaticData.d.ts +12 -0
- package/dist/utils/wpRegistry.d.ts +13 -0
- package/package.json +69 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare const createOrganizationSchema: (data: {
|
|
2
|
+
name: string;
|
|
3
|
+
url: string;
|
|
4
|
+
logo?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
address?: {
|
|
7
|
+
streetAddress: string;
|
|
8
|
+
addressLocality: string;
|
|
9
|
+
addressRegion: string;
|
|
10
|
+
postalCode: string;
|
|
11
|
+
addressCountry: string;
|
|
12
|
+
};
|
|
13
|
+
contactPoint?: {
|
|
14
|
+
telephone: string;
|
|
15
|
+
contactType: string;
|
|
16
|
+
};
|
|
17
|
+
}) => StructuredData;
|
|
18
|
+
export declare const createWebSiteSchema: (data: {
|
|
19
|
+
name: string;
|
|
20
|
+
url: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
publisher?: string;
|
|
23
|
+
}) => StructuredData;
|
|
24
|
+
export declare const createArticleSchema: (data: {
|
|
25
|
+
headline: string;
|
|
26
|
+
description: string;
|
|
27
|
+
image?: string;
|
|
28
|
+
author: string;
|
|
29
|
+
publisher: string;
|
|
30
|
+
datePublished: string;
|
|
31
|
+
dateModified?: string;
|
|
32
|
+
url: string;
|
|
33
|
+
}) => StructuredData;
|
|
34
|
+
export declare const createServiceSchema: (data: {
|
|
35
|
+
name: string;
|
|
36
|
+
description: string;
|
|
37
|
+
provider: string;
|
|
38
|
+
url: string;
|
|
39
|
+
areaServed?: string;
|
|
40
|
+
serviceType?: string;
|
|
41
|
+
}) => StructuredData;
|
|
42
|
+
export declare const createBreadcrumbSchema: (breadcrumbs: Array<{
|
|
43
|
+
name: string;
|
|
44
|
+
url: string;
|
|
45
|
+
}>) => StructuredData;
|
|
46
|
+
export declare const createFAQSchema: (faqs: Array<{
|
|
47
|
+
question: string;
|
|
48
|
+
answer: string;
|
|
49
|
+
}>) => StructuredData;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type ClassValue } from "clsx";
|
|
2
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
3
|
+
/**
|
|
4
|
+
* Decodes HTML entities in a string
|
|
5
|
+
* Handles both named entities (&, ") and numeric entities (', ’)
|
|
6
|
+
* @param text - The text string with HTML entities
|
|
7
|
+
* @returns Decoded text string
|
|
8
|
+
*/
|
|
9
|
+
export declare function decodeHtmlEntities(text: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Replaces common WordPress HTML entities so they display as expected (e.g. en dash as hyphen, &/& as &).
|
|
12
|
+
* Use on block innerHTML or other WP-rendered HTML before passing to dangerouslySetInnerHTML.
|
|
13
|
+
*/
|
|
14
|
+
export declare function normalizeWordPressHtmlEntities(html: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Sanitizes HTML content to prevent XSS attacks
|
|
17
|
+
* @param html - The HTML string to sanitize
|
|
18
|
+
* @returns Sanitized HTML string
|
|
19
|
+
*/
|
|
20
|
+
export declare function sanitizeHtml(html: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Safely renders HTML content with sanitization
|
|
23
|
+
* @param html - The HTML string to render
|
|
24
|
+
* @returns Object for dangerouslySetInnerHTML with sanitized content
|
|
25
|
+
*/
|
|
26
|
+
export declare function safeHtml(html: string): {
|
|
27
|
+
__html: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Validates if a URL is safe for redirects
|
|
31
|
+
* @param url - The URL to validate
|
|
32
|
+
* @param allowedDomains - Array of allowed domains (optional)
|
|
33
|
+
* @returns boolean indicating if the URL is safe
|
|
34
|
+
*/
|
|
35
|
+
export declare function isValidRedirectUrl(url: string, allowedDomains?: string[]): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Safely redirects to a URL after validation
|
|
38
|
+
* @param url - The URL to redirect to
|
|
39
|
+
* @param allowedDomains - Array of allowed domains (optional)
|
|
40
|
+
* @param fallbackUrl - Fallback URL if validation fails (optional)
|
|
41
|
+
*/
|
|
42
|
+
export declare function safeRedirect(url: string, allowedDomains?: string[], fallbackUrl?: string): void;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloudflare WordPress Webhook Service
|
|
3
|
+
* Handles webhook status and data regeneration monitoring
|
|
4
|
+
*/
|
|
5
|
+
export interface WebhookStatus {
|
|
6
|
+
last_triggered: string | null;
|
|
7
|
+
last_success: string | null;
|
|
8
|
+
last_error: string | null;
|
|
9
|
+
total_triggers: number;
|
|
10
|
+
success_rate: number;
|
|
11
|
+
status: 'healthy' | 'warning' | 'error' | 'unknown';
|
|
12
|
+
}
|
|
13
|
+
export interface WebhookResponse {
|
|
14
|
+
success: boolean;
|
|
15
|
+
message: string;
|
|
16
|
+
timestamp: string;
|
|
17
|
+
data_generated?: {
|
|
18
|
+
static_data: boolean;
|
|
19
|
+
gravity_forms: boolean;
|
|
20
|
+
mautic_data: boolean;
|
|
21
|
+
};
|
|
22
|
+
errors?: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface WebhookConfig {
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
refresh_secret: string;
|
|
27
|
+
frontends: Array<{
|
|
28
|
+
frontend_id: string;
|
|
29
|
+
webhook_url: string;
|
|
30
|
+
enabled: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
post_types: string[];
|
|
33
|
+
rate_limit_minutes: number;
|
|
34
|
+
}
|
|
35
|
+
declare class CfWpWebhookService {
|
|
36
|
+
private baseUrl;
|
|
37
|
+
private refreshSecret;
|
|
38
|
+
constructor();
|
|
39
|
+
/**
|
|
40
|
+
* Get webhook status from WordPress
|
|
41
|
+
*/
|
|
42
|
+
getWebhookStatus(): Promise<WebhookStatus>;
|
|
43
|
+
/**
|
|
44
|
+
* Get webhook configuration from WordPress
|
|
45
|
+
*/
|
|
46
|
+
getWebhookConfig(): Promise<WebhookConfig | null>;
|
|
47
|
+
/**
|
|
48
|
+
* Test webhook endpoint
|
|
49
|
+
*/
|
|
50
|
+
testWebhook(): Promise<{
|
|
51
|
+
success: boolean;
|
|
52
|
+
message: string;
|
|
53
|
+
}>;
|
|
54
|
+
/**
|
|
55
|
+
* Get last webhook response
|
|
56
|
+
*/
|
|
57
|
+
getLastWebhookResponse(): Promise<WebhookResponse | null>;
|
|
58
|
+
/**
|
|
59
|
+
* Manually trigger data regeneration
|
|
60
|
+
*/
|
|
61
|
+
triggerDataRegeneration(): Promise<{
|
|
62
|
+
success: boolean;
|
|
63
|
+
message: string;
|
|
64
|
+
}>;
|
|
65
|
+
/**
|
|
66
|
+
* Check if webhook is properly configured
|
|
67
|
+
*/
|
|
68
|
+
isConfigured(): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Get configuration status
|
|
71
|
+
*/
|
|
72
|
+
getConfigurationStatus(): {
|
|
73
|
+
wordpress_url: boolean;
|
|
74
|
+
refresh_secret: boolean;
|
|
75
|
+
fully_configured: boolean;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export declare const cfWpWebhookService: CfWpWebhookService;
|
|
79
|
+
export default cfWpWebhookService;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gravity Forms Integration Service
|
|
3
|
+
* Uses @marvalt/wadapter package for secure form submissions
|
|
4
|
+
*/
|
|
5
|
+
import { GravityFormsClient } from '@marvalt/wadapter';
|
|
6
|
+
export type { GravityForm, GravityFormField, GravityFormSubmission, GravityFormSubmissionResult, GravityFormsConfig, } from '@marvalt/wadapter';
|
|
7
|
+
export declare const gravityFormsClient: GravityFormsClient;
|
|
8
|
+
export interface GravityFormEntry {
|
|
9
|
+
[fieldId: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const gravityFormsService: {
|
|
12
|
+
/**
|
|
13
|
+
* Submit a Gravity Form (legacy interface)
|
|
14
|
+
* @param formId - Form ID as string or number
|
|
15
|
+
* @param entry - Entry data with field IDs as keys
|
|
16
|
+
* @param files - Optional files (not yet supported)
|
|
17
|
+
* @param useBasicApi - Ignored (always uses proxy)
|
|
18
|
+
*/
|
|
19
|
+
submitForm(formId: string | number, entry: GravityFormEntry, files?: {
|
|
20
|
+
[fieldId: string]: File[];
|
|
21
|
+
}, useBasicApi?: boolean): Promise<import("@marvalt/wadapter").GravityFormSubmissionResult>;
|
|
22
|
+
getForm: (id: number) => Promise<any>;
|
|
23
|
+
getForms: () => Promise<any>;
|
|
24
|
+
getFormConfig: (id: number) => Promise<any>;
|
|
25
|
+
getHealth: () => Promise<any>;
|
|
26
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mautic Integration Service (via @marvalt/madapter)
|
|
3
|
+
*/
|
|
4
|
+
export interface MauticContact {
|
|
5
|
+
id?: number;
|
|
6
|
+
email: string;
|
|
7
|
+
firstname?: string;
|
|
8
|
+
lastname?: string;
|
|
9
|
+
company?: string;
|
|
10
|
+
phone?: string;
|
|
11
|
+
tags?: string[];
|
|
12
|
+
customFields?: {
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface MauticFormSubmission {
|
|
17
|
+
formId: number;
|
|
18
|
+
fields: {
|
|
19
|
+
[fieldName: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
contact?: MauticContact;
|
|
22
|
+
formName?: string;
|
|
23
|
+
returnUrl?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface MauticFormField {
|
|
26
|
+
id: number;
|
|
27
|
+
label: string;
|
|
28
|
+
alias: string;
|
|
29
|
+
type: string;
|
|
30
|
+
isRequired: boolean;
|
|
31
|
+
validationMessage?: string;
|
|
32
|
+
defaultValue?: string;
|
|
33
|
+
properties?: {
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
cssClass?: string;
|
|
36
|
+
validation?: string[];
|
|
37
|
+
options?: string[];
|
|
38
|
+
helpText?: string;
|
|
39
|
+
size?: string;
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface MauticFormAction {
|
|
44
|
+
id: number;
|
|
45
|
+
name: string;
|
|
46
|
+
type: 'email' | 'notification' | 'tag' | 'segment';
|
|
47
|
+
properties: {
|
|
48
|
+
email?: string;
|
|
49
|
+
subject?: string;
|
|
50
|
+
message?: string;
|
|
51
|
+
tags?: string[];
|
|
52
|
+
segmentId?: number;
|
|
53
|
+
[key: string]: unknown;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface MauticForm {
|
|
57
|
+
id: number;
|
|
58
|
+
name: string;
|
|
59
|
+
description?: string;
|
|
60
|
+
fields: MauticFormField[];
|
|
61
|
+
actions: MauticFormAction[];
|
|
62
|
+
cssClass?: string;
|
|
63
|
+
submitAction?: string;
|
|
64
|
+
postAction?: string;
|
|
65
|
+
postActionProperty?: string;
|
|
66
|
+
formType?: string;
|
|
67
|
+
isPublished?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface MauticFormConfig {
|
|
70
|
+
id: number;
|
|
71
|
+
name: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
fields: MauticFormField[];
|
|
74
|
+
actions: MauticFormAction[];
|
|
75
|
+
cssClass?: string;
|
|
76
|
+
submitAction?: string;
|
|
77
|
+
postAction?: string;
|
|
78
|
+
postActionProperty?: string;
|
|
79
|
+
formType?: string;
|
|
80
|
+
isPublished?: boolean;
|
|
81
|
+
}
|
|
82
|
+
export declare const mauticService: any;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export interface SuiteCRMLead {
|
|
2
|
+
first_name: string;
|
|
3
|
+
last_name: string;
|
|
4
|
+
email1: string;
|
|
5
|
+
phone_work?: string;
|
|
6
|
+
lead_source?: string;
|
|
7
|
+
status?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
campaign_id?: string;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
export interface SuiteCRMContact {
|
|
13
|
+
first_name: string;
|
|
14
|
+
last_name: string;
|
|
15
|
+
email1: string;
|
|
16
|
+
phone_work?: string;
|
|
17
|
+
title?: string;
|
|
18
|
+
department?: string;
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}
|
|
21
|
+
export interface SuiteCRMAccount {
|
|
22
|
+
name: string;
|
|
23
|
+
billing_address_city?: string;
|
|
24
|
+
billing_address_country?: string;
|
|
25
|
+
phone_office?: string;
|
|
26
|
+
website?: string;
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}
|
|
29
|
+
export interface SuiteCRMOpportunity {
|
|
30
|
+
name: string;
|
|
31
|
+
amount?: number;
|
|
32
|
+
sales_stage?: string;
|
|
33
|
+
probability?: number;
|
|
34
|
+
expected_close_date?: string;
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}
|
|
37
|
+
export interface SuiteCRMAPIResponse<T = any> {
|
|
38
|
+
data?: T;
|
|
39
|
+
errors?: Array<{
|
|
40
|
+
status: string;
|
|
41
|
+
code: string;
|
|
42
|
+
title: string;
|
|
43
|
+
detail: string;
|
|
44
|
+
}>;
|
|
45
|
+
meta?: {
|
|
46
|
+
total_count?: number;
|
|
47
|
+
page?: number;
|
|
48
|
+
per_page?: number;
|
|
49
|
+
action?: string;
|
|
50
|
+
recordId?: string;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
declare class SuiteCRMService {
|
|
54
|
+
private baseUrl;
|
|
55
|
+
private proxyUrl?;
|
|
56
|
+
private appId?;
|
|
57
|
+
private workerSecret?;
|
|
58
|
+
private useProxy;
|
|
59
|
+
private isConfigured;
|
|
60
|
+
private oauth2Config?;
|
|
61
|
+
private accessToken?;
|
|
62
|
+
private tokenExpiresAt?;
|
|
63
|
+
private sessionId?;
|
|
64
|
+
private csrfToken?;
|
|
65
|
+
constructor();
|
|
66
|
+
private validateConfiguration;
|
|
67
|
+
private getSessionAndCSRFToken;
|
|
68
|
+
private getAccessToken;
|
|
69
|
+
private getAuthHeaders;
|
|
70
|
+
private makeRequest;
|
|
71
|
+
isServiceConfigured(): boolean;
|
|
72
|
+
createLead(lead: SuiteCRMLead): Promise<SuiteCRMAPIResponse>;
|
|
73
|
+
createLeadREST(lead: SuiteCRMLead): Promise<SuiteCRMAPIResponse>;
|
|
74
|
+
verifyLeadCreation(email: string, firstName: string, lastName: string): Promise<boolean>;
|
|
75
|
+
getLead(leadId: string): Promise<SuiteCRMAPIResponse>;
|
|
76
|
+
updateLead(leadId: string, lead: Partial<SuiteCRMLead>): Promise<SuiteCRMAPIResponse>;
|
|
77
|
+
getLeads(params?: {
|
|
78
|
+
page?: number;
|
|
79
|
+
per_page?: number;
|
|
80
|
+
filter?: string;
|
|
81
|
+
sort?: string;
|
|
82
|
+
}): Promise<SuiteCRMAPIResponse>;
|
|
83
|
+
createContact(contact: SuiteCRMContact): Promise<SuiteCRMAPIResponse>;
|
|
84
|
+
getContact(contactId: string): Promise<SuiteCRMAPIResponse>;
|
|
85
|
+
updateContact(contactId: string, contact: Partial<SuiteCRMContact>): Promise<SuiteCRMAPIResponse>;
|
|
86
|
+
createAccount(account: SuiteCRMAccount): Promise<SuiteCRMAPIResponse>;
|
|
87
|
+
getAccount(accountId: string): Promise<SuiteCRMAPIResponse>;
|
|
88
|
+
createOpportunity(opportunity: SuiteCRMOpportunity): Promise<SuiteCRMAPIResponse>;
|
|
89
|
+
getOpportunity(opportunityId: string): Promise<SuiteCRMAPIResponse>;
|
|
90
|
+
searchLeads(query: string): Promise<SuiteCRMAPIResponse>;
|
|
91
|
+
getLeadSources(): Promise<SuiteCRMAPIResponse>;
|
|
92
|
+
getLeadStatuses(): Promise<SuiteCRMAPIResponse>;
|
|
93
|
+
graphqlRequest<T = any>(query: string, variables?: Record<string, any>): Promise<T>;
|
|
94
|
+
testConnection(): Promise<boolean>;
|
|
95
|
+
createLeadSimple(leadData: SuiteCRMLead): Promise<SuiteCRMAPIResponse>;
|
|
96
|
+
}
|
|
97
|
+
export declare const suitecrmService: SuiteCRMService;
|
|
98
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../types/wordpress';
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
export interface WordPressPost {
|
|
2
|
+
id: number;
|
|
3
|
+
title?: {
|
|
4
|
+
rendered: string;
|
|
5
|
+
};
|
|
6
|
+
content?: {
|
|
7
|
+
rendered: string;
|
|
8
|
+
};
|
|
9
|
+
excerpt?: {
|
|
10
|
+
rendered: string;
|
|
11
|
+
};
|
|
12
|
+
date?: string;
|
|
13
|
+
slug?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface WordPressPage {
|
|
16
|
+
id: number;
|
|
17
|
+
slug?: string;
|
|
18
|
+
title?: {
|
|
19
|
+
rendered: string;
|
|
20
|
+
};
|
|
21
|
+
excerpt?: {
|
|
22
|
+
rendered: string;
|
|
23
|
+
};
|
|
24
|
+
content?: {
|
|
25
|
+
rendered: string;
|
|
26
|
+
};
|
|
27
|
+
/** Rendered content with Cloudflare image URLs (string when present in static data) */
|
|
28
|
+
content_cloudflare?: string;
|
|
29
|
+
blocks?: any[];
|
|
30
|
+
parent?: number;
|
|
31
|
+
menu_order?: number;
|
|
32
|
+
status?: string;
|
|
33
|
+
_embedded?: {
|
|
34
|
+
'wp:featuredmedia'?: Array<{
|
|
35
|
+
source_url?: string;
|
|
36
|
+
alt_text?: string;
|
|
37
|
+
}>;
|
|
38
|
+
};
|
|
39
|
+
featured_media_url?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface WordPressMemberRaw {
|
|
42
|
+
id: number;
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}
|
|
45
|
+
type WPStatic = {
|
|
46
|
+
posts?: WordPressPost[];
|
|
47
|
+
pages?: WordPressPage[];
|
|
48
|
+
media?: any[];
|
|
49
|
+
categories?: any[];
|
|
50
|
+
tags?: any[];
|
|
51
|
+
chapter_member?: WordPressMemberRaw[];
|
|
52
|
+
members?: WordPressMemberRaw[];
|
|
53
|
+
eventbrite_event?: any[];
|
|
54
|
+
testimonial?: any[];
|
|
55
|
+
'member-role'?: any[];
|
|
56
|
+
memberRoles?: any[];
|
|
57
|
+
theme_styles?: any;
|
|
58
|
+
site_settings?: any;
|
|
59
|
+
header?: {
|
|
60
|
+
slug: string;
|
|
61
|
+
area: string;
|
|
62
|
+
blocks: any[];
|
|
63
|
+
blocks_count: number;
|
|
64
|
+
};
|
|
65
|
+
navigation_menu?: {
|
|
66
|
+
id: number;
|
|
67
|
+
name: string;
|
|
68
|
+
slug: string;
|
|
69
|
+
items: Array<{
|
|
70
|
+
id: number;
|
|
71
|
+
title: string;
|
|
72
|
+
url: string;
|
|
73
|
+
type: string;
|
|
74
|
+
object_id: number;
|
|
75
|
+
object: string;
|
|
76
|
+
parent: number;
|
|
77
|
+
menu_order: number;
|
|
78
|
+
children?: Array<any>;
|
|
79
|
+
}>;
|
|
80
|
+
};
|
|
81
|
+
menus?: Record<string | number, {
|
|
82
|
+
id: number;
|
|
83
|
+
name: string;
|
|
84
|
+
slug: string;
|
|
85
|
+
items: Array<{
|
|
86
|
+
id: number;
|
|
87
|
+
title: string;
|
|
88
|
+
url: string;
|
|
89
|
+
type: string;
|
|
90
|
+
object_id: number;
|
|
91
|
+
object: string;
|
|
92
|
+
parent: number;
|
|
93
|
+
menu_order: number;
|
|
94
|
+
children?: Array<any>;
|
|
95
|
+
}>;
|
|
96
|
+
}>;
|
|
97
|
+
footer?: {
|
|
98
|
+
slug: string;
|
|
99
|
+
area: string;
|
|
100
|
+
blocks: any[];
|
|
101
|
+
blocks_count: number;
|
|
102
|
+
};
|
|
103
|
+
config?: any;
|
|
104
|
+
front_page?: any;
|
|
105
|
+
frontend_id?: string;
|
|
106
|
+
frontend_name?: string;
|
|
107
|
+
generated_at?: string;
|
|
108
|
+
};
|
|
109
|
+
export declare const loadWordPressData: (path?: string) => Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* Get WordPress static data (includes theme_styles)
|
|
112
|
+
*/
|
|
113
|
+
export declare const getWordPressData: () => WPStatic | null;
|
|
114
|
+
export declare const getWordPressPosts: () => WordPressPost[];
|
|
115
|
+
export declare const getWordPressPages: () => WordPressPage[];
|
|
116
|
+
export declare const getWordPressPageBySlug: (slug: string) => WordPressPage | undefined;
|
|
117
|
+
export declare const getWordPressPageById: (id: number) => WordPressPage | undefined;
|
|
118
|
+
export declare const getWordPressMedia: () => any[];
|
|
119
|
+
export declare const getWordPressCategories: () => any[];
|
|
120
|
+
export declare const getWordPressTags: () => any[];
|
|
121
|
+
export declare const getWordPressMembers: () => WordPressMemberRaw[];
|
|
122
|
+
export declare const getWordPressEvents: () => any[];
|
|
123
|
+
export declare const getWordPressTestimonials: () => any[];
|
|
124
|
+
/** Returns a member by slug from the same list the grid uses. Call after loadWordPressData(). */
|
|
125
|
+
export declare const getWordPressMemberBySlug: (slug: string) => WordPressMemberRaw | undefined;
|
|
126
|
+
export declare const getWordPressMemberRoles: () => any[];
|
|
127
|
+
export interface SiteSettings {
|
|
128
|
+
logo?: {
|
|
129
|
+
id: number;
|
|
130
|
+
url: string;
|
|
131
|
+
cloudflare_url?: string;
|
|
132
|
+
};
|
|
133
|
+
site_icon?: {
|
|
134
|
+
id: number;
|
|
135
|
+
url: string;
|
|
136
|
+
cloudflare_url?: string;
|
|
137
|
+
};
|
|
138
|
+
site_name?: string;
|
|
139
|
+
site_description?: string;
|
|
140
|
+
}
|
|
141
|
+
export declare const getSiteSettings: () => SiteSettings | undefined;
|
|
142
|
+
export interface FooterData {
|
|
143
|
+
slug: string;
|
|
144
|
+
area: string;
|
|
145
|
+
blocks: any[];
|
|
146
|
+
blocks_count: number;
|
|
147
|
+
}
|
|
148
|
+
export interface HeaderData {
|
|
149
|
+
slug: string;
|
|
150
|
+
area: string;
|
|
151
|
+
blocks: any[];
|
|
152
|
+
blocks_count: number;
|
|
153
|
+
}
|
|
154
|
+
export declare const getHeader: () => HeaderData | undefined;
|
|
155
|
+
export declare const getHeaderMenuId: () => number | undefined;
|
|
156
|
+
/** Parsed header data for app-owned header layout (no WP block tree render). */
|
|
157
|
+
export interface ParsedHeader {
|
|
158
|
+
hasHeader: boolean;
|
|
159
|
+
menuId: number | undefined;
|
|
160
|
+
}
|
|
161
|
+
export declare const getParsedHeader: () => ParsedHeader;
|
|
162
|
+
export interface NavigationMenuData {
|
|
163
|
+
id: number;
|
|
164
|
+
name: string;
|
|
165
|
+
slug: string;
|
|
166
|
+
items: Array<{
|
|
167
|
+
id: number;
|
|
168
|
+
title: string;
|
|
169
|
+
url: string;
|
|
170
|
+
type: string;
|
|
171
|
+
object_id: number;
|
|
172
|
+
object: string;
|
|
173
|
+
parent: number;
|
|
174
|
+
menu_order: number;
|
|
175
|
+
children?: Array<any>;
|
|
176
|
+
}>;
|
|
177
|
+
}
|
|
178
|
+
export declare const getNavigationMenu: () => NavigationMenuData | undefined;
|
|
179
|
+
/**
|
|
180
|
+
* Get a menu by ID from static data
|
|
181
|
+
* @param menuId Menu ID to retrieve
|
|
182
|
+
* @returns Menu data if found, undefined otherwise
|
|
183
|
+
*/
|
|
184
|
+
export declare const getMenuById: (menuId: number) => NavigationMenuData | undefined;
|
|
185
|
+
export declare const getFooter: () => FooterData | undefined;
|
|
186
|
+
export declare const getLogoUrl: () => string | null;
|
|
187
|
+
export declare const getSiteIconUrl: () => string | null;
|
|
188
|
+
export declare const getSiteName: () => string;
|
|
189
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export interface CaseStudyPublicProfile {
|
|
2
|
+
title: string;
|
|
3
|
+
client_name?: string;
|
|
4
|
+
industry?: string;
|
|
5
|
+
project_duration?: string;
|
|
6
|
+
challenge?: string;
|
|
7
|
+
solution?: string;
|
|
8
|
+
results?: string;
|
|
9
|
+
technologies_used?: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface WordPressCaseStudy {
|
|
12
|
+
id: number;
|
|
13
|
+
date: string;
|
|
14
|
+
date_gmt: string;
|
|
15
|
+
guid: {
|
|
16
|
+
rendered: string;
|
|
17
|
+
};
|
|
18
|
+
modified: string;
|
|
19
|
+
modified_gmt: string;
|
|
20
|
+
slug: string;
|
|
21
|
+
status: string;
|
|
22
|
+
type: string;
|
|
23
|
+
link: string;
|
|
24
|
+
title: {
|
|
25
|
+
rendered: string;
|
|
26
|
+
};
|
|
27
|
+
content: {
|
|
28
|
+
rendered: string;
|
|
29
|
+
protected: boolean;
|
|
30
|
+
};
|
|
31
|
+
excerpt: {
|
|
32
|
+
rendered: string;
|
|
33
|
+
protected: boolean;
|
|
34
|
+
};
|
|
35
|
+
featured_media: number;
|
|
36
|
+
template: string;
|
|
37
|
+
meta: {
|
|
38
|
+
_acf_changed: boolean;
|
|
39
|
+
};
|
|
40
|
+
"case-study-category": any[];
|
|
41
|
+
class_list: string[];
|
|
42
|
+
acf: any[];
|
|
43
|
+
public_profile: CaseStudyPublicProfile;
|
|
44
|
+
default_image: string | null;
|
|
45
|
+
cloudflare_image?: string;
|
|
46
|
+
_embedded?: {
|
|
47
|
+
'wp:featuredmedia'?: Array<{
|
|
48
|
+
source_url: string;
|
|
49
|
+
alt_text?: string;
|
|
50
|
+
}>;
|
|
51
|
+
};
|
|
52
|
+
_links: {
|
|
53
|
+
self: Array<{
|
|
54
|
+
href: string;
|
|
55
|
+
targetHints?: {
|
|
56
|
+
allow: string[];
|
|
57
|
+
};
|
|
58
|
+
}>;
|
|
59
|
+
collection: Array<{
|
|
60
|
+
href: string;
|
|
61
|
+
}>;
|
|
62
|
+
about: Array<{
|
|
63
|
+
href: string;
|
|
64
|
+
}>;
|
|
65
|
+
"wp:featuredmedia"?: Array<{
|
|
66
|
+
embeddable: boolean;
|
|
67
|
+
href: string;
|
|
68
|
+
}>;
|
|
69
|
+
"wp:attachment": Array<{
|
|
70
|
+
href: string;
|
|
71
|
+
}>;
|
|
72
|
+
"wp:term": Array<{
|
|
73
|
+
taxonomy: string;
|
|
74
|
+
embeddable: boolean;
|
|
75
|
+
href: string;
|
|
76
|
+
}>;
|
|
77
|
+
curies: Array<{
|
|
78
|
+
name: string;
|
|
79
|
+
href: string;
|
|
80
|
+
templated: boolean;
|
|
81
|
+
}>;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export interface CaseStudyQueryParams {
|
|
85
|
+
page?: number;
|
|
86
|
+
per_page?: number;
|
|
87
|
+
search?: string;
|
|
88
|
+
slug?: string;
|
|
89
|
+
orderby?: string;
|
|
90
|
+
order?: 'asc' | 'desc';
|
|
91
|
+
category?: string;
|
|
92
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './wordpress';
|