@marvalt/wadapter 1.1.10

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 (45) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +190 -0
  3. package/dist/client/wordpress-client.d.ts +43 -0
  4. package/dist/client/wordpress-client.d.ts.map +1 -0
  5. package/dist/generators/form-protection/form-protection-generator.d.ts +46 -0
  6. package/dist/generators/form-protection/form-protection-generator.d.ts.map +1 -0
  7. package/dist/generators/gravity-forms/gravity-forms-generator.d.ts +36 -0
  8. package/dist/generators/gravity-forms/gravity-forms-generator.d.ts.map +1 -0
  9. package/dist/generators/wordpress/wordpress-generator.d.ts +53 -0
  10. package/dist/generators/wordpress/wordpress-generator.d.ts.map +1 -0
  11. package/dist/gravity-forms/gravity-forms-client.d.ts +33 -0
  12. package/dist/gravity-forms/gravity-forms-client.d.ts.map +1 -0
  13. package/dist/index.d.ts +1015 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.esm.js +2479 -0
  16. package/dist/index.esm.js.map +1 -0
  17. package/dist/index.js +2524 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/react/components/GravityForm.d.ts +28 -0
  20. package/dist/react/components/GravityForm.d.ts.map +1 -0
  21. package/dist/react/components/WordPressContent.d.ts +28 -0
  22. package/dist/react/components/WordPressContent.d.ts.map +1 -0
  23. package/dist/react/hooks/useGravityForms.d.ts +34 -0
  24. package/dist/react/hooks/useGravityForms.d.ts.map +1 -0
  25. package/dist/react/hooks/useWordPress.d.ts +32 -0
  26. package/dist/react/hooks/useWordPress.d.ts.map +1 -0
  27. package/dist/react/providers/GravityFormsProvider.d.ts +29 -0
  28. package/dist/react/providers/GravityFormsProvider.d.ts.map +1 -0
  29. package/dist/react/providers/WordPressProvider.d.ts +29 -0
  30. package/dist/react/providers/WordPressProvider.d.ts.map +1 -0
  31. package/dist/setupTests.d.ts +18 -0
  32. package/dist/setupTests.d.ts.map +1 -0
  33. package/dist/transformers/wordpress-transformers.d.ts +69 -0
  34. package/dist/transformers/wordpress-transformers.d.ts.map +1 -0
  35. package/dist/types/form-protection.d.ts +47 -0
  36. package/dist/types/form-protection.d.ts.map +1 -0
  37. package/dist/types/gravity-forms.d.ts +110 -0
  38. package/dist/types/gravity-forms.d.ts.map +1 -0
  39. package/dist/types/wordpress.d.ts +350 -0
  40. package/dist/types/wordpress.d.ts.map +1 -0
  41. package/dist/utils/config.d.ts +26 -0
  42. package/dist/utils/config.d.ts.map +1 -0
  43. package/dist/utils/validation.d.ts +28 -0
  44. package/dist/utils/validation.d.ts.map +1 -0
  45. package/package.json +84 -0
package/README.md ADDED
@@ -0,0 +1,190 @@
1
+ # marvalt-wadapter
2
+
3
+ A comprehensive WordPress and Gravity Forms integration package for React applications, designed for static data generation and seamless content management.
4
+
5
+ ## Overview
6
+
7
+ This package provides a complete solution for integrating WordPress and Gravity Forms into React applications, focusing on static data generation and form handling. It includes support for the Albert Bruckmann form protection plugin and is designed to work with Cloudflare Pages webhook-based rebuilds.
8
+
9
+ ## Features
10
+
11
+ ### WordPress Integration
12
+ - **Static Data Fetching**: Retrieve WordPress content (posts, pages, media, categories, tags)
13
+ - **Data Transformation**: Convert WordPress API responses to optimized formats
14
+ - **Static Data Generation**: Generate static data files for build-time consumption
15
+ - **React Hooks**: Custom hooks for WordPress data management
16
+ - **React Components**: Pre-built components for WordPress content display
17
+
18
+ ### Gravity Forms Integration
19
+ - **Form Submission**: Handle form submissions via REST API
20
+ - **Static Data Generation**: Generate form configurations and field definitions
21
+ - **Form Protection**: Integration with Albert Bruckmann form protection plugin
22
+ - **Email Verification**: Handle email verification workflows
23
+ - **React Hooks**: Custom hooks for form handling and submission
24
+ - **React Components**: Pre-built form components with validation
25
+
26
+ ### Static Data Generation
27
+ - **WordPress Content**: Generate static data for posts, pages, media, etc.
28
+ - **Gravity Forms**: Generate form configurations, fields, notifications, confirmations
29
+ - **Form Protection**: Include Albert Bruckmann plugin behavior in static data
30
+ - **Validation**: Comprehensive data validation and error handling
31
+
32
+ ## Installation
33
+
34
+ ```bash
35
+ npm install @marvalt/wadapter
36
+ ```
37
+
38
+ ## Quick Start
39
+
40
+ ### WordPress Content
41
+
42
+ ```typescript
43
+ import { useWordPress } from '@marvalt/wadapter';
44
+
45
+ function BlogPost({ postId }: { postId: number }) {
46
+ const { data: post, loading, error } = useWordPress('posts', postId);
47
+
48
+ if (loading) return <div>Loading...</div>;
49
+ if (error) return <div>Error: {error.message}</div>;
50
+
51
+ return (
52
+ <article>
53
+ <h1>{post.title.rendered}</h1>
54
+ <div dangerouslySetInnerHTML={{ __html: post.content.rendered }} />
55
+ </article>
56
+ );
57
+ }
58
+ ```
59
+
60
+ ### Gravity Forms
61
+
62
+ ```typescript
63
+ import { useGravityForms } from '@marvalt/wadapter';
64
+
65
+ function ContactForm({ formId }: { formId: number }) {
66
+ const { submitForm, loading, result } = useGravityForms(formId);
67
+
68
+ const handleSubmit = async (formData: Record<string, any>) => {
69
+ await submitForm(formData);
70
+ };
71
+
72
+ return (
73
+ <form onSubmit={handleSubmit}>
74
+ {/* Form fields */}
75
+ <button type="submit" disabled={loading}>
76
+ {loading ? 'Submitting...' : 'Submit'}
77
+ </button>
78
+ {result && (
79
+ <div className={result.success ? 'success' : 'error'}>
80
+ {result.message}
81
+ </div>
82
+ )}
83
+ </form>
84
+ );
85
+ }
86
+ ```
87
+
88
+ ### Static Data Generation
89
+
90
+ ```typescript
91
+ import { generateWordPressData, generateGravityFormsData } from '@marvalt/wadapter';
92
+
93
+ // Generate WordPress static data
94
+ await generateWordPressData({
95
+ apiUrl: 'https://your-wordpress-site.com',
96
+ endpoints: ['posts', 'pages', 'media'],
97
+ outputPath: './public/static-data.json'
98
+ });
99
+
100
+ // Generate Gravity Forms static data
101
+ await generateGravityFormsData({
102
+ apiUrl: 'https://your-wordpress-site.com',
103
+ outputPath: './public/gravity-forms.json'
104
+ });
105
+ ```
106
+
107
+ ## Configuration
108
+
109
+ ### Environment Variables
110
+
111
+ ```env
112
+ # WordPress API Configuration
113
+ VITE_WORDPRESS_API_URL=https://your-wordpress-site.com
114
+ VITE_WP_AUTH_MODE=cloudflare_proxy
115
+ VITE_CLOUDFLARE_WORKER_URL=https://your-worker.your-subdomain.workers.dev
116
+
117
+ # Gravity Forms Configuration
118
+ VITE_GRAVITY_FORMS_API_URL=https://your-wordpress-site.com/wp-json/gf-api/v1
119
+ VITE_GRAVITY_FORMS_USERNAME=your-username
120
+ VITE_GRAVITY_FORMS_PASSWORD=your-app-password
121
+
122
+ # Form Protection (Albert Bruckmann Plugin)
123
+ VITE_FORM_PROTECTION_ENABLED=true
124
+ VITE_FORM_PROTECTION_SECRET=your-protection-secret
125
+ ```
126
+
127
+ ## API Reference
128
+
129
+ ### WordPress Hooks
130
+
131
+ - `useWordPress(endpoint, id?)` - Fetch WordPress content
132
+ - `useWordPressMedia(mediaId)` - Fetch WordPress media
133
+ - `useWordPressCategories()` - Fetch WordPress categories
134
+ - `useWordPressTags()` - Fetch WordPress tags
135
+
136
+ ### Gravity Forms Hooks
137
+
138
+ - `useGravityForms(formId)` - Handle form submission
139
+ - `useGravityFormsConfig(formId)` - Fetch form configuration
140
+ - `useGravityFormsFields(formId)` - Fetch form fields
141
+
142
+ ### Static Data Generation
143
+
144
+ - `generateWordPressData(config)` - Generate WordPress static data
145
+ - `generateGravityFormsData(config)` - Generate Gravity Forms static data
146
+ - `generateFormProtectionData(config)` - Generate form protection data
147
+
148
+ ## Form Protection Integration
149
+
150
+ This package includes integration with the Albert Bruckmann form protection plugin, providing:
151
+
152
+ - **Email Verification**: Handle email verification workflows
153
+ - **Form Validation**: Enhanced form validation with protection rules
154
+ - **Spam Protection**: Built-in spam protection mechanisms
155
+ - **Rate Limiting**: Prevent form abuse with rate limiting
156
+
157
+ ## License
158
+
159
+ Licensed under the [GNU General Public License v3.0 or later (GPLv3+)](LICENSE).
160
+
161
+ This adapter is part of the **MarVAlt Open SDK**, designed for use with DigiVAlt and MarVAlt-based deployments.
162
+ Commercial orchestration, automation, and AI components are licensed separately via [marvalt.cloud](https://marvalt.cloud).
163
+
164
+
165
+ ## Support
166
+
167
+ For support and documentation, please contact the development team.
168
+
169
+ ## Changelog
170
+
171
+ ### 1.0.0 (Initial Release)
172
+ - WordPress static data generation
173
+ - Gravity Forms integration
174
+ - Albert Bruckmann form protection integration
175
+ - React hooks and components
176
+ - Comprehensive TypeScript support
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @license GPL-3.0-or-later
3
+ *
4
+ * This file is part of the MarVAlt Open SDK.
5
+ * Copyright (c) 2025 Vibune Pty Ltd.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
+ * See the GNU General Public License for more details.
16
+ */
17
+ import { WordPressConfig, WordPressQueryParams, WordPressPost, WordPressPage, WordPressMedia, WordPressCategory, WordPressTag } from '../types/wordpress';
18
+ export declare class WordPressClient {
19
+ private config;
20
+ constructor(config: WordPressConfig);
21
+ private makeRequest;
22
+ private getBaseUrl;
23
+ getPosts(params?: WordPressQueryParams): Promise<WordPressPost[]>;
24
+ getPost(id: number): Promise<WordPressPost>;
25
+ getPages(params?: WordPressQueryParams): Promise<WordPressPage[]>;
26
+ getPage(id: number): Promise<WordPressPage>;
27
+ getMedia(params?: WordPressQueryParams): Promise<WordPressMedia[]>;
28
+ getMediaItem(id: number): Promise<WordPressMedia>;
29
+ getCategories(params?: WordPressQueryParams): Promise<WordPressCategory[]>;
30
+ getTags(params?: WordPressQueryParams): Promise<WordPressTag[]>;
31
+ getGravityForms(): Promise<any[]>;
32
+ getGravityForm(formId: string): Promise<any>;
33
+ submitGravityForm(formId: string, entry: Record<string, any>): Promise<any>;
34
+ getStaticDataNonce(): Promise<any>;
35
+ getAllData(params?: WordPressQueryParams): Promise<{
36
+ posts: WordPressPost[];
37
+ pages: WordPressPage[];
38
+ media: WordPressMedia[];
39
+ categories: WordPressCategory[];
40
+ tags: WordPressTag[];
41
+ }>;
42
+ }
43
+ //# sourceMappingURL=wordpress-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wordpress-client.d.ts","sourceRoot":"","sources":["../../src/client/wordpress-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE1J,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAkB;gBAEpB,MAAM,EAAE,eAAe;YAIrB,WAAW;IAwGzB,OAAO,CAAC,UAAU;IAWZ,QAAQ,CAAC,MAAM,GAAE,oBAAyB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAIrE,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAI3C,QAAQ,CAAC,MAAM,GAAE,oBAAyB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAIrE,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAI3C,QAAQ,CAAC,MAAM,GAAE,oBAAyB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAItE,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAIjD,aAAa,CAAC,MAAM,GAAE,oBAAyB,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAI9E,OAAO,CAAC,MAAM,GAAE,oBAAyB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAKnE,eAAe,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAIjC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAI5C,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IAQ3E,kBAAkB,IAAI,OAAO,CAAC,GAAG,CAAC;IAIlC,UAAU,CAAC,MAAM,GAAE,oBAAyB,GAAG,OAAO,CAAC;QAC3D,KAAK,EAAE,aAAa,EAAE,CAAC;QACvB,KAAK,EAAE,aAAa,EAAE,CAAC;QACvB,KAAK,EAAE,cAAc,EAAE,CAAC;QACxB,UAAU,EAAE,iBAAiB,EAAE,CAAC;QAChC,IAAI,EAAE,YAAY,EAAE,CAAC;KACtB,CAAC;CAWH"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @license GPL-3.0-or-later
3
+ *
4
+ * This file is part of the MarVAlt Open SDK.
5
+ * Copyright (c) 2025 Vibune Pty Ltd.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
+ * See the GNU General Public License for more details.
16
+ */
17
+ import { FormProtectionConfig, FormProtectionResult } from '../../types/form-protection';
18
+ export interface FormProtectionGeneratorConfig extends FormProtectionConfig {
19
+ outputPath: string;
20
+ forms: Array<{
21
+ id: number;
22
+ name: string;
23
+ protectionLevel: 'low' | 'medium' | 'high';
24
+ }>;
25
+ }
26
+ export interface FormProtectionStaticData {
27
+ config: FormProtectionConfig;
28
+ forms: Array<{
29
+ id: number;
30
+ name: string;
31
+ protectionLevel: 'low' | 'medium' | 'high';
32
+ emailVerification: boolean;
33
+ spamProtection: boolean;
34
+ rateLimiting: boolean;
35
+ }>;
36
+ generatedAt: string;
37
+ }
38
+ export declare class FormProtectionGenerator {
39
+ private config;
40
+ constructor(config: FormProtectionGeneratorConfig);
41
+ generateStaticData(): Promise<FormProtectionStaticData>;
42
+ private writeStaticData;
43
+ validateFormProtection(formData: Record<string, any>): FormProtectionResult;
44
+ }
45
+ export declare function generateFormProtectionData(config: FormProtectionGeneratorConfig): Promise<FormProtectionStaticData>;
46
+ //# sourceMappingURL=form-protection-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-protection-generator.d.ts","sourceRoot":"","sources":["../../../src/generators/form-protection/form-protection-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAyB,MAAM,6BAA6B,CAAC;AAIhH,MAAM,WAAW,6BAA8B,SAAQ,oBAAoB;IACzE,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,eAAe,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;KAC5C,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,eAAe,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;QAC3C,iBAAiB,EAAE,OAAO,CAAC;QAC3B,cAAc,EAAE,OAAO,CAAC;QACxB,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC,CAAC;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,uBAAuB;IAClC,OAAO,CAAC,MAAM,CAAgC;gBAElC,MAAM,EAAE,6BAA6B;IAI3C,kBAAkB,IAAI,OAAO,CAAC,wBAAwB,CAAC;IAmC7D,OAAO,CAAC,eAAe;IAWvB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,oBAAoB;CAuB5E;AAGD,wBAAsB,0BAA0B,CAAC,MAAM,EAAE,6BAA6B,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAGzH"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @license GPL-3.0-or-later
3
+ *
4
+ * This file is part of the MarVAlt Open SDK.
5
+ * Copyright (c) 2025 Vibune Pty Ltd.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
+ * See the GNU General Public License for more details.
16
+ */
17
+ import { GravityFormsConfig, GravityForm } from '../../types/gravity-forms';
18
+ export interface GravityFormsGeneratorConfig extends GravityFormsConfig {
19
+ outputPath: string;
20
+ formIds?: number[];
21
+ includeInactive?: boolean;
22
+ }
23
+ export interface GravityFormsStaticData {
24
+ generated_at: string;
25
+ total_forms: number;
26
+ forms: GravityForm[];
27
+ }
28
+ export declare class GravityFormsGenerator {
29
+ private config;
30
+ constructor(config: GravityFormsGeneratorConfig);
31
+ generateStaticData(): Promise<GravityFormsStaticData>;
32
+ private writeStaticData;
33
+ generateFormConfig(formId: number): Promise<GravityForm>;
34
+ }
35
+ export declare function generateGravityFormsData(config: GravityFormsGeneratorConfig): Promise<GravityFormsStaticData>;
36
+ //# sourceMappingURL=gravity-forms-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gravity-forms-generator.d.ts","sourceRoot":"","sources":["../../../src/generators/gravity-forms/gravity-forms-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAI5E,MAAM,WAAW,2BAA4B,SAAQ,kBAAkB;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED,qBAAa,qBAAqB;IAChC,OAAO,CAAC,MAAM,CAA8B;gBAEhC,MAAM,EAAE,2BAA2B;IAIzC,kBAAkB,IAAI,OAAO,CAAC,sBAAsB,CAAC;IAyE3D,OAAO,CAAC,eAAe;IAWjB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAI/D;AAGD,wBAAsB,wBAAwB,CAAC,MAAM,EAAE,2BAA2B,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAGnH"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @license GPL-3.0-or-later
3
+ *
4
+ * This file is part of the MarVAlt Open SDK.
5
+ * Copyright (c) 2025 Vibune Pty Ltd.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
+ * See the GNU General Public License for more details.
16
+ */
17
+ import { WordPressConfig, WordPressPost, WordPressPage, WordPressMedia } from '../../types/wordpress';
18
+ export interface WordPressGeneratorConfig extends WordPressConfig {
19
+ outputPath: string;
20
+ frontendId?: string;
21
+ frontendName?: string;
22
+ postTypes?: string[];
23
+ includeEmbedded?: boolean;
24
+ maxItems?: number;
25
+ }
26
+ export interface StaticDataStore {
27
+ generated_at: string;
28
+ frontend_id: string;
29
+ frontend_name: string;
30
+ config: {
31
+ frontend_id: string;
32
+ frontend_name: string;
33
+ post_types: Record<string, {
34
+ max_items: number;
35
+ include_embedded: boolean;
36
+ orderby?: string;
37
+ order?: 'asc' | 'desc';
38
+ categories?: string[];
39
+ }>;
40
+ };
41
+ [key: string]: any;
42
+ }
43
+ export declare class WordPressGenerator {
44
+ private config;
45
+ constructor(config: WordPressGeneratorConfig);
46
+ generateStaticData(): Promise<StaticDataStore>;
47
+ private writeStaticData;
48
+ generatePostsOnly(): Promise<WordPressPost[]>;
49
+ generatePagesOnly(): Promise<WordPressPage[]>;
50
+ generateMediaOnly(): Promise<WordPressMedia[]>;
51
+ }
52
+ export declare function generateWordPressData(config: WordPressGeneratorConfig): Promise<StaticDataStore>;
53
+ //# sourceMappingURL=wordpress-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wordpress-generator.d.ts","sourceRoot":"","sources":["../../../src/generators/wordpress/wordpress-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAmC,MAAM,uBAAuB,CAAC;AAIvI,MAAM,WAAW,wBAAyB,SAAQ,eAAe;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE;QACN,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;YACzB,SAAS,EAAE,MAAM,CAAC;YAClB,gBAAgB,EAAE,OAAO,CAAC;YAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;YACvB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;SACvB,CAAC,CAAC;KACJ,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAA2B;gBAE7B,MAAM,EAAE,wBAAwB;IAItC,kBAAkB,IAAI,OAAO,CAAC,eAAe,CAAC;IAiDpD,OAAO,CAAC,eAAe;IAWjB,iBAAiB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAK7C,iBAAiB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAK7C,iBAAiB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;CAIrD;AAGD,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,eAAe,CAAC,CAGtG"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @license GPL-3.0-or-later
3
+ *
4
+ * This file is part of the MarVAlt Open SDK.
5
+ * Copyright (c) 2025 Vibune Pty Ltd.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
+ * See the GNU General Public License for more details.
16
+ */
17
+ import { GravityFormsConfig, GravityForm, GravityFormSubmission, GravityFormSubmissionResult } from '../types/gravity-forms';
18
+ export declare class GravityFormsClient {
19
+ private config;
20
+ constructor(config: GravityFormsConfig);
21
+ private makeRequest;
22
+ private getBaseUrl;
23
+ getForm(id: number): Promise<GravityForm>;
24
+ getForms(): Promise<GravityForm[]>;
25
+ getFormConfig(id: number): Promise<GravityForm>;
26
+ submitForm(formId: number, submission: GravityFormSubmission): Promise<GravityFormSubmissionResult>;
27
+ getHealth(): Promise<{
28
+ status: string;
29
+ timestamp: string;
30
+ plugin_version: string;
31
+ }>;
32
+ }
33
+ //# sourceMappingURL=gravity-forms-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gravity-forms-client.d.ts","sourceRoot":"","sources":["../../src/gravity-forms/gravity-forms-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAE7H,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAqB;gBAEvB,MAAM,EAAE,kBAAkB;YAIxB,WAAW;IAsEzB,OAAO,CAAC,UAAU;IAWZ,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIzC,QAAQ,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAIlC,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAI/C,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,qBAAqB,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAOnG,SAAS,IAAI,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC;CAG1F"}