@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
@@ -0,0 +1,1015 @@
1
+ import React, { ReactNode } from 'react';
2
+
3
+ /**
4
+ * @license GPL-3.0-or-later
5
+ *
6
+ * This file is part of the MarVAlt Open SDK.
7
+ * Copyright (c) 2025 Vibune Pty Ltd.
8
+ *
9
+ * This program is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
+ * See the GNU General Public License for more details.
18
+ */
19
+ interface WordPressPost {
20
+ id: number;
21
+ date: string;
22
+ date_gmt: string;
23
+ guid: {
24
+ rendered: string;
25
+ };
26
+ modified: string;
27
+ modified_gmt: string;
28
+ slug: string;
29
+ status: string;
30
+ type: string;
31
+ link: string;
32
+ title: {
33
+ rendered: string;
34
+ };
35
+ content: {
36
+ rendered: string;
37
+ protected: boolean;
38
+ };
39
+ excerpt: {
40
+ rendered: string;
41
+ protected: boolean;
42
+ };
43
+ author: number;
44
+ featured_media: number;
45
+ comment_status: string;
46
+ ping_status: string;
47
+ sticky: boolean;
48
+ template: string;
49
+ format: string;
50
+ meta: Record<string, any>;
51
+ categories: number[];
52
+ tags: number[];
53
+ _links: {
54
+ self: Array<{
55
+ href: string;
56
+ }>;
57
+ collection: Array<{
58
+ href: string;
59
+ }>;
60
+ about: Array<{
61
+ href: string;
62
+ }>;
63
+ author: Array<{
64
+ embeddable: boolean;
65
+ href: string;
66
+ }>;
67
+ replies: Array<{
68
+ embeddable: boolean;
69
+ href: string;
70
+ }>;
71
+ 'version-history': Array<{
72
+ count: number;
73
+ href: string;
74
+ }>;
75
+ 'predecessor-version': Array<{
76
+ id: number;
77
+ href: string;
78
+ }>;
79
+ 'wp:attachment': Array<{
80
+ href: string;
81
+ }>;
82
+ 'wp:term': Array<{
83
+ taxonomy: string;
84
+ embeddable: boolean;
85
+ href: string;
86
+ }>;
87
+ curies: Array<{
88
+ name: string;
89
+ href: string;
90
+ templated: boolean;
91
+ }>;
92
+ };
93
+ }
94
+ interface WordPressPage {
95
+ id: number;
96
+ date: string;
97
+ date_gmt: string;
98
+ guid: {
99
+ rendered: string;
100
+ };
101
+ modified: string;
102
+ modified_gmt: string;
103
+ slug: string;
104
+ status: string;
105
+ type: string;
106
+ link: string;
107
+ title: {
108
+ rendered: string;
109
+ };
110
+ content: {
111
+ rendered: string;
112
+ protected: boolean;
113
+ };
114
+ excerpt: {
115
+ rendered: string;
116
+ protected: boolean;
117
+ };
118
+ author: number;
119
+ featured_media: number;
120
+ parent: number;
121
+ menu_order: number;
122
+ comment_status: string;
123
+ ping_status: string;
124
+ template: string;
125
+ meta: Record<string, any>;
126
+ _links: {
127
+ self: Array<{
128
+ href: string;
129
+ }>;
130
+ collection: Array<{
131
+ href: string;
132
+ }>;
133
+ about: Array<{
134
+ href: string;
135
+ }>;
136
+ author: Array<{
137
+ embeddable: boolean;
138
+ href: string;
139
+ }>;
140
+ replies: Array<{
141
+ embeddable: boolean;
142
+ href: string;
143
+ }>;
144
+ 'version-history': Array<{
145
+ count: number;
146
+ href: string;
147
+ }>;
148
+ 'predecessor-version': Array<{
149
+ id: number;
150
+ href: string;
151
+ }>;
152
+ 'wp:attachment': Array<{
153
+ href: string;
154
+ }>;
155
+ 'wp:term': Array<{
156
+ taxonomy: string;
157
+ embeddable: boolean;
158
+ href: string;
159
+ }>;
160
+ curies: Array<{
161
+ name: string;
162
+ href: string;
163
+ templated: boolean;
164
+ }>;
165
+ };
166
+ }
167
+ interface WordPressMedia {
168
+ id: number;
169
+ date: string;
170
+ date_gmt: string;
171
+ guid: {
172
+ rendered: string;
173
+ };
174
+ modified: string;
175
+ modified_gmt: string;
176
+ slug: string;
177
+ status: string;
178
+ type: string;
179
+ link: string;
180
+ title: {
181
+ rendered: string;
182
+ };
183
+ author: number;
184
+ comment_status: string;
185
+ ping_status: string;
186
+ template: string;
187
+ meta: Record<string, any>;
188
+ description: {
189
+ rendered: string;
190
+ };
191
+ caption: {
192
+ rendered: string;
193
+ };
194
+ alt_text: string;
195
+ media_type: string;
196
+ mime_type: string;
197
+ media_details: {
198
+ width: number;
199
+ height: number;
200
+ file: string;
201
+ sizes: Record<string, {
202
+ file: string;
203
+ width: number;
204
+ height: number;
205
+ mime_type: string;
206
+ source_url: string;
207
+ }>;
208
+ image_meta: Record<string, any>;
209
+ };
210
+ source_url: string;
211
+ _links: {
212
+ self: Array<{
213
+ href: string;
214
+ }>;
215
+ collection: Array<{
216
+ href: string;
217
+ }>;
218
+ about: Array<{
219
+ href: string;
220
+ }>;
221
+ author: Array<{
222
+ embeddable: boolean;
223
+ href: string;
224
+ }>;
225
+ replies: Array<{
226
+ embeddable: boolean;
227
+ href: string;
228
+ }>;
229
+ };
230
+ }
231
+ interface WordPressCategory {
232
+ id: number;
233
+ count: number;
234
+ description: string;
235
+ link: string;
236
+ name: string;
237
+ slug: string;
238
+ taxonomy: string;
239
+ parent: number;
240
+ meta: Record<string, any>;
241
+ _links: {
242
+ self: Array<{
243
+ href: string;
244
+ }>;
245
+ collection: Array<{
246
+ href: string;
247
+ }>;
248
+ about: Array<{
249
+ href: string;
250
+ }>;
251
+ 'wp:post_type': Array<{
252
+ href: string;
253
+ }>;
254
+ curies: Array<{
255
+ name: string;
256
+ href: string;
257
+ templated: boolean;
258
+ }>;
259
+ };
260
+ }
261
+ interface WordPressTag {
262
+ id: number;
263
+ count: number;
264
+ description: string;
265
+ link: string;
266
+ name: string;
267
+ slug: string;
268
+ taxonomy: string;
269
+ meta: Record<string, any>;
270
+ _links: {
271
+ self: Array<{
272
+ href: string;
273
+ }>;
274
+ collection: Array<{
275
+ href: string;
276
+ }>;
277
+ about: Array<{
278
+ href: string;
279
+ }>;
280
+ 'wp:post_type': Array<{
281
+ href: string;
282
+ }>;
283
+ curies: Array<{
284
+ name: string;
285
+ href: string;
286
+ templated: boolean;
287
+ }>;
288
+ };
289
+ }
290
+ interface WordPressAuthor {
291
+ id: number;
292
+ name: string;
293
+ url: string;
294
+ description: string;
295
+ link: string;
296
+ slug: string;
297
+ avatar_urls: {
298
+ '24': string;
299
+ '48': string;
300
+ '96': string;
301
+ };
302
+ meta: Record<string, any>;
303
+ _links: {
304
+ self: Array<{
305
+ href: string;
306
+ }>;
307
+ collection: Array<{
308
+ href: string;
309
+ }>;
310
+ };
311
+ }
312
+ interface WordPressConfig {
313
+ apiUrl?: string;
314
+ authMode: 'direct' | 'cloudflare_proxy' | 'supabase_proxy';
315
+ cloudflareWorkerUrl?: string;
316
+ supabaseUrl?: string;
317
+ supabaseAnonKey?: string;
318
+ username?: string;
319
+ password?: string;
320
+ appId?: string;
321
+ workerSecret?: string;
322
+ cfAccessClientId?: string;
323
+ cfAccessClientSecret?: string;
324
+ timeout?: number;
325
+ retries?: number;
326
+ }
327
+ interface WordPressQueryParams {
328
+ page?: number;
329
+ per_page?: number;
330
+ search?: string;
331
+ after?: string;
332
+ before?: string;
333
+ author?: number;
334
+ author_exclude?: number[];
335
+ categories?: number[];
336
+ categories_exclude?: number[];
337
+ tags?: number[];
338
+ tags_exclude?: number[];
339
+ sticky?: boolean;
340
+ order?: 'asc' | 'desc';
341
+ orderby?: 'date' | 'id' | 'include' | 'relevance' | 'slug' | 'title';
342
+ slug?: string;
343
+ status?: 'publish' | 'future' | 'draft' | 'pending' | 'private';
344
+ type?: string;
345
+ parent?: number;
346
+ parent_exclude?: number[];
347
+ exclude?: number[];
348
+ include?: number[];
349
+ offset?: number;
350
+ _embed?: boolean;
351
+ }
352
+
353
+ /**
354
+ * @license GPL-3.0-or-later
355
+ *
356
+ * This file is part of the MarVAlt Open SDK.
357
+ * Copyright (c) 2025 Vibune Pty Ltd.
358
+ *
359
+ * This program is free software: you can redistribute it and/or modify
360
+ * it under the terms of the GNU General Public License as published by
361
+ * the Free Software Foundation, either version 3 of the License, or
362
+ * (at your option) any later version.
363
+ *
364
+ * This program is distributed in the hope that it will be useful,
365
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
366
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
367
+ * See the GNU General Public License for more details.
368
+ */
369
+
370
+ declare class WordPressClient {
371
+ private config;
372
+ constructor(config: WordPressConfig);
373
+ private makeRequest;
374
+ private getBaseUrl;
375
+ getPosts(params?: WordPressQueryParams): Promise<WordPressPost[]>;
376
+ getPost(id: number): Promise<WordPressPost>;
377
+ getPages(params?: WordPressQueryParams): Promise<WordPressPage[]>;
378
+ getPage(id: number): Promise<WordPressPage>;
379
+ getMedia(params?: WordPressQueryParams): Promise<WordPressMedia[]>;
380
+ getMediaItem(id: number): Promise<WordPressMedia>;
381
+ getCategories(params?: WordPressQueryParams): Promise<WordPressCategory[]>;
382
+ getTags(params?: WordPressQueryParams): Promise<WordPressTag[]>;
383
+ getGravityForms(): Promise<any[]>;
384
+ getGravityForm(formId: string): Promise<any>;
385
+ submitGravityForm(formId: string, entry: Record<string, any>): Promise<any>;
386
+ getStaticDataNonce(): Promise<any>;
387
+ getAllData(params?: WordPressQueryParams): Promise<{
388
+ posts: WordPressPost[];
389
+ pages: WordPressPage[];
390
+ media: WordPressMedia[];
391
+ categories: WordPressCategory[];
392
+ tags: WordPressTag[];
393
+ }>;
394
+ }
395
+
396
+ /**
397
+ * @license GPL-3.0-or-later
398
+ *
399
+ * This file is part of the MarVAlt Open SDK.
400
+ * Copyright (c) 2025 Vibune Pty Ltd.
401
+ *
402
+ * This program is free software: you can redistribute it and/or modify
403
+ * it under the terms of the GNU General Public License as published by
404
+ * the Free Software Foundation, either version 3 of the License, or
405
+ * (at your option) any later version.
406
+ *
407
+ * This program is distributed in the hope that it will be useful,
408
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
409
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
410
+ * See the GNU General Public License for more details.
411
+ */
412
+
413
+ interface TransformedWordPressPost {
414
+ id: number;
415
+ title: string;
416
+ content: string;
417
+ excerpt: string;
418
+ slug: string;
419
+ date: string;
420
+ modified: string;
421
+ author: number;
422
+ featuredMedia: number | null;
423
+ categories: number[];
424
+ tags: number[];
425
+ link: string;
426
+ }
427
+ interface TransformedWordPressPage {
428
+ id: number;
429
+ title: string;
430
+ content: string;
431
+ excerpt: string;
432
+ slug: string;
433
+ date: string;
434
+ modified: string;
435
+ author: number;
436
+ featuredMedia: number | null;
437
+ parent: number;
438
+ menuOrder: number;
439
+ link: string;
440
+ }
441
+ interface TransformedWordPressMedia {
442
+ id: number;
443
+ title: string;
444
+ description: string;
445
+ caption: string;
446
+ altText: string;
447
+ sourceUrl: string;
448
+ mimeType: string;
449
+ mediaType: string;
450
+ sizes: Record<string, {
451
+ file: string;
452
+ width: number;
453
+ height: number;
454
+ mimeType: string;
455
+ sourceUrl: string;
456
+ }>;
457
+ }
458
+ declare function transformWordPressPost(post: WordPressPost): TransformedWordPressPost;
459
+ declare function transformWordPressPage(page: WordPressPage): TransformedWordPressPage;
460
+ declare function transformWordPressMedia(media: WordPressMedia): TransformedWordPressMedia;
461
+ declare function transformWordPressPosts(posts: WordPressPost[]): TransformedWordPressPost[];
462
+ declare function transformWordPressPages(pages: WordPressPage[]): TransformedWordPressPage[];
463
+ declare function transformWordPressMediaItems(media: WordPressMedia[]): TransformedWordPressMedia[];
464
+
465
+ /**
466
+ * @license GPL-3.0-or-later
467
+ *
468
+ * This file is part of the MarVAlt Open SDK.
469
+ * Copyright (c) 2025 Vibune Pty Ltd.
470
+ *
471
+ * This program is free software: you can redistribute it and/or modify
472
+ * it under the terms of the GNU General Public License as published by
473
+ * the Free Software Foundation, either version 3 of the License, or
474
+ * (at your option) any later version.
475
+ *
476
+ * This program is distributed in the hope that it will be useful,
477
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
478
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
479
+ * See the GNU General Public License for more details.
480
+ */
481
+ interface GravityForm$1 {
482
+ id: number;
483
+ title: string;
484
+ description: string;
485
+ is_active: boolean;
486
+ date_created: string;
487
+ date_updated: string;
488
+ is_trash: boolean;
489
+ fields: GravityFormField[];
490
+ notifications: GravityFormNotification[];
491
+ confirmations: GravityFormConfirmation[];
492
+ settings: Record<string, any>;
493
+ }
494
+ interface GravityFormField {
495
+ id: number;
496
+ type: string;
497
+ label: string;
498
+ description?: string;
499
+ required: boolean;
500
+ choices?: Array<{
501
+ text: string;
502
+ value: string;
503
+ isSelected?: boolean;
504
+ }>;
505
+ inputs?: Array<{
506
+ id: string;
507
+ label: string;
508
+ name: string;
509
+ }>;
510
+ conditionalLogic?: any;
511
+ cssClass?: string;
512
+ placeholder?: string;
513
+ defaultValue?: string;
514
+ validation?: any;
515
+ }
516
+ interface GravityFormNotification {
517
+ id: string;
518
+ name: string;
519
+ event: string;
520
+ to: string;
521
+ subject: string;
522
+ message: string;
523
+ from?: string;
524
+ replyTo?: string;
525
+ bcc?: string;
526
+ routing?: any;
527
+ conditionalLogic?: any;
528
+ isActive: boolean;
529
+ }
530
+ interface GravityFormConfirmation {
531
+ id: string;
532
+ name: string;
533
+ type: 'message' | 'redirect' | 'page';
534
+ message?: string;
535
+ url?: string;
536
+ pageId?: number;
537
+ queryString?: string;
538
+ conditionalLogic?: any;
539
+ isDefault: boolean;
540
+ }
541
+ interface GravityFormSubmission {
542
+ form_id: number;
543
+ field_values: Record<string, any>;
544
+ source_page_number?: number;
545
+ source_page_confirmations?: any;
546
+ target_page_number?: number;
547
+ target_page_confirmations?: any;
548
+ }
549
+ interface GravityFormSubmissionResult {
550
+ success: boolean;
551
+ entry_id?: number;
552
+ message?: string;
553
+ confirmation?: GravityFormConfirmation;
554
+ errors?: Array<{
555
+ field_id: number;
556
+ message: string;
557
+ }>;
558
+ }
559
+ interface GravityFormsConfig {
560
+ apiUrl?: string;
561
+ authMode: 'direct' | 'cloudflare_proxy' | 'supabase_proxy';
562
+ cloudflareWorkerUrl?: string;
563
+ supabaseUrl?: string;
564
+ supabaseAnonKey?: string;
565
+ username?: string;
566
+ password?: string;
567
+ appId?: string;
568
+ workerSecret?: string;
569
+ cfAccessClientId?: string;
570
+ cfAccessClientSecret?: string;
571
+ timeout?: number;
572
+ retries?: number;
573
+ }
574
+
575
+ /**
576
+ * @license GPL-3.0-or-later
577
+ *
578
+ * This file is part of the MarVAlt Open SDK.
579
+ * Copyright (c) 2025 Vibune Pty Ltd.
580
+ *
581
+ * This program is free software: you can redistribute it and/or modify
582
+ * it under the terms of the GNU General Public License as published by
583
+ * the Free Software Foundation, either version 3 of the License, or
584
+ * (at your option) any later version.
585
+ *
586
+ * This program is distributed in the hope that it will be useful,
587
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
588
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
589
+ * See the GNU General Public License for more details.
590
+ */
591
+
592
+ declare class GravityFormsClient {
593
+ private config;
594
+ constructor(config: GravityFormsConfig);
595
+ private makeRequest;
596
+ private getBaseUrl;
597
+ getForm(id: number): Promise<GravityForm$1>;
598
+ getForms(): Promise<GravityForm$1[]>;
599
+ getFormConfig(id: number): Promise<GravityForm$1>;
600
+ submitForm(formId: number, submission: GravityFormSubmission): Promise<GravityFormSubmissionResult>;
601
+ getHealth(): Promise<{
602
+ status: string;
603
+ timestamp: string;
604
+ plugin_version: string;
605
+ }>;
606
+ }
607
+
608
+ /**
609
+ * @license GPL-3.0-or-later
610
+ *
611
+ * This file is part of the MarVAlt Open SDK.
612
+ * Copyright (c) 2025 Vibune Pty Ltd.
613
+ *
614
+ * This program is free software: you can redistribute it and/or modify
615
+ * it under the terms of the GNU General Public License as published by
616
+ * the Free Software Foundation, either version 3 of the License, or
617
+ * (at your option) any later version.
618
+ *
619
+ * This program is distributed in the hope that it will be useful,
620
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
621
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
622
+ * See the GNU General Public License for more details.
623
+ */
624
+
625
+ interface UseWordPressResult<T> {
626
+ data: T | null;
627
+ loading: boolean;
628
+ error: Error | null;
629
+ refetch: () => Promise<void>;
630
+ }
631
+ declare function useWordPress<T>(endpoint: string, id?: number, config?: WordPressConfig): UseWordPressResult<T>;
632
+ declare function useWordPressPosts(config?: WordPressConfig): UseWordPressResult<WordPressPost[]>;
633
+ declare function useWordPressPost(id: number, config?: WordPressConfig): UseWordPressResult<WordPressPost>;
634
+ declare function useWordPressPages(config?: WordPressConfig): UseWordPressResult<WordPressPage[]>;
635
+ declare function useWordPressPage(id: number, config?: WordPressConfig): UseWordPressResult<WordPressPage>;
636
+ declare function useWordPressMedia(config?: WordPressConfig): UseWordPressResult<WordPressMedia[]>;
637
+ declare function useWordPressCategories(config?: WordPressConfig): UseWordPressResult<WordPressCategory[]>;
638
+ declare function useWordPressTags(config?: WordPressConfig): UseWordPressResult<WordPressTag[]>;
639
+
640
+ /**
641
+ * @license GPL-3.0-or-later
642
+ *
643
+ * This file is part of the MarVAlt Open SDK.
644
+ * Copyright (c) 2025 Vibune Pty Ltd.
645
+ *
646
+ * This program is free software: you can redistribute it and/or modify
647
+ * it under the terms of the GNU General Public License as published by
648
+ * the Free Software Foundation, either version 3 of the License, or
649
+ * (at your option) any later version.
650
+ *
651
+ * This program is distributed in the hope that it will be useful,
652
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
653
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
654
+ * See the GNU General Public License for more details.
655
+ */
656
+
657
+ interface UseGravityFormsResult {
658
+ form: GravityForm$1 | null;
659
+ loading: boolean;
660
+ error: Error | null;
661
+ submitting: boolean;
662
+ result: GravityFormSubmissionResult | null;
663
+ submitForm: (submission: GravityFormSubmission) => Promise<void>;
664
+ refetch: () => Promise<void>;
665
+ }
666
+ declare function useGravityForms(formId: number, config?: GravityFormsConfig): UseGravityFormsResult;
667
+ declare function useGravityFormsConfig(formId: number, config?: GravityFormsConfig): {
668
+ formConfig: GravityForm$1 | null;
669
+ loading: boolean;
670
+ error: Error | null;
671
+ refetch: () => Promise<void>;
672
+ };
673
+
674
+ /**
675
+ * @license GPL-3.0-or-later
676
+ *
677
+ * This file is part of the MarVAlt Open SDK.
678
+ * Copyright (c) 2025 Vibune Pty Ltd.
679
+ *
680
+ * This program is free software: you can redistribute it and/or modify
681
+ * it under the terms of the GNU General Public License as published by
682
+ * the Free Software Foundation, either version 3 of the License, or
683
+ * (at your option) any later version.
684
+ *
685
+ * This program is distributed in the hope that it will be useful,
686
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
687
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
688
+ * See the GNU General Public License for more details.
689
+ */
690
+
691
+ interface WordPressContentProps {
692
+ content: WordPressPost | WordPressPage;
693
+ className?: string;
694
+ showExcerpt?: boolean;
695
+ showDate?: boolean;
696
+ showAuthor?: boolean;
697
+ }
698
+ declare const WordPressContent: React.FC<WordPressContentProps>;
699
+
700
+ /**
701
+ * @license GPL-3.0-or-later
702
+ *
703
+ * This file is part of the MarVAlt Open SDK.
704
+ * Copyright (c) 2025 Vibune Pty Ltd.
705
+ *
706
+ * This program is free software: you can redistribute it and/or modify
707
+ * it under the terms of the GNU General Public License as published by
708
+ * the Free Software Foundation, either version 3 of the License, or
709
+ * (at your option) any later version.
710
+ *
711
+ * This program is distributed in the hope that it will be useful,
712
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
713
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
714
+ * See the GNU General Public License for more details.
715
+ */
716
+
717
+ interface GravityFormProps {
718
+ formId: number;
719
+ config: GravityFormsConfig;
720
+ className?: string;
721
+ onSubmit?: (result: any) => void;
722
+ onError?: (error: Error) => void;
723
+ }
724
+ declare const GravityForm: React.FC<GravityFormProps>;
725
+
726
+ /**
727
+ * @license GPL-3.0-or-later
728
+ *
729
+ * This file is part of the MarVAlt Open SDK.
730
+ * Copyright (c) 2025 Vibune Pty Ltd.
731
+ *
732
+ * This program is free software: you can redistribute it and/or modify
733
+ * it under the terms of the GNU General Public License as published by
734
+ * the Free Software Foundation, either version 3 of the License, or
735
+ * (at your option) any later version.
736
+ *
737
+ * This program is distributed in the hope that it will be useful,
738
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
739
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
740
+ * See the GNU General Public License for more details.
741
+ */
742
+
743
+ interface WordPressContextType {
744
+ config: WordPressConfig;
745
+ }
746
+ interface WordPressProviderProps {
747
+ config: WordPressConfig;
748
+ children: ReactNode;
749
+ }
750
+ declare const WordPressProvider: React.FC<WordPressProviderProps>;
751
+ declare function useWordPressContext(): WordPressContextType;
752
+
753
+ /**
754
+ * @license GPL-3.0-or-later
755
+ *
756
+ * This file is part of the MarVAlt Open SDK.
757
+ * Copyright (c) 2025 Vibune Pty Ltd.
758
+ *
759
+ * This program is free software: you can redistribute it and/or modify
760
+ * it under the terms of the GNU General Public License as published by
761
+ * the Free Software Foundation, either version 3 of the License, or
762
+ * (at your option) any later version.
763
+ *
764
+ * This program is distributed in the hope that it will be useful,
765
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
766
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
767
+ * See the GNU General Public License for more details.
768
+ */
769
+
770
+ interface GravityFormsContextType {
771
+ config: GravityFormsConfig;
772
+ }
773
+ interface GravityFormsProviderProps {
774
+ config: GravityFormsConfig;
775
+ children: ReactNode;
776
+ }
777
+ declare const GravityFormsProvider: React.FC<GravityFormsProviderProps>;
778
+ declare function useGravityFormsContext(): GravityFormsContextType;
779
+
780
+ /**
781
+ * @license GPL-3.0-or-later
782
+ *
783
+ * This file is part of the MarVAlt Open SDK.
784
+ * Copyright (c) 2025 Vibune Pty Ltd.
785
+ *
786
+ * This program is free software: you can redistribute it and/or modify
787
+ * it under the terms of the GNU General Public License as published by
788
+ * the Free Software Foundation, either version 3 of the License, or
789
+ * (at your option) any later version.
790
+ *
791
+ * This program is distributed in the hope that it will be useful,
792
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
793
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
794
+ * See the GNU General Public License for more details.
795
+ */
796
+
797
+ interface WordPressGeneratorConfig extends WordPressConfig {
798
+ outputPath: string;
799
+ frontendId?: string;
800
+ frontendName?: string;
801
+ postTypes?: string[];
802
+ includeEmbedded?: boolean;
803
+ maxItems?: number;
804
+ }
805
+ interface StaticDataStore {
806
+ generated_at: string;
807
+ frontend_id: string;
808
+ frontend_name: string;
809
+ config: {
810
+ frontend_id: string;
811
+ frontend_name: string;
812
+ post_types: Record<string, {
813
+ max_items: number;
814
+ include_embedded: boolean;
815
+ orderby?: string;
816
+ order?: 'asc' | 'desc';
817
+ categories?: string[];
818
+ }>;
819
+ };
820
+ [key: string]: any;
821
+ }
822
+ declare class WordPressGenerator {
823
+ private config;
824
+ constructor(config: WordPressGeneratorConfig);
825
+ generateStaticData(): Promise<StaticDataStore>;
826
+ private writeStaticData;
827
+ generatePostsOnly(): Promise<WordPressPost[]>;
828
+ generatePagesOnly(): Promise<WordPressPage[]>;
829
+ generateMediaOnly(): Promise<WordPressMedia[]>;
830
+ }
831
+ declare function generateWordPressData(config: WordPressGeneratorConfig): Promise<StaticDataStore>;
832
+
833
+ /**
834
+ * @license GPL-3.0-or-later
835
+ *
836
+ * This file is part of the MarVAlt Open SDK.
837
+ * Copyright (c) 2025 Vibune Pty Ltd.
838
+ *
839
+ * This program is free software: you can redistribute it and/or modify
840
+ * it under the terms of the GNU General Public License as published by
841
+ * the Free Software Foundation, either version 3 of the License, or
842
+ * (at your option) any later version.
843
+ *
844
+ * This program is distributed in the hope that it will be useful,
845
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
846
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
847
+ * See the GNU General Public License for more details.
848
+ */
849
+
850
+ interface GravityFormsGeneratorConfig extends GravityFormsConfig {
851
+ outputPath: string;
852
+ formIds?: number[];
853
+ includeInactive?: boolean;
854
+ }
855
+ interface GravityFormsStaticData {
856
+ generated_at: string;
857
+ total_forms: number;
858
+ forms: GravityForm$1[];
859
+ }
860
+ declare class GravityFormsGenerator {
861
+ private config;
862
+ constructor(config: GravityFormsGeneratorConfig);
863
+ generateStaticData(): Promise<GravityFormsStaticData>;
864
+ private writeStaticData;
865
+ generateFormConfig(formId: number): Promise<GravityForm$1>;
866
+ }
867
+ declare function generateGravityFormsData(config: GravityFormsGeneratorConfig): Promise<GravityFormsStaticData>;
868
+
869
+ /**
870
+ * @license GPL-3.0-or-later
871
+ *
872
+ * This file is part of the MarVAlt Open SDK.
873
+ * Copyright (c) 2025 Vibune Pty Ltd.
874
+ *
875
+ * This program is free software: you can redistribute it and/or modify
876
+ * it under the terms of the GNU General Public License as published by
877
+ * the Free Software Foundation, either version 3 of the License, or
878
+ * (at your option) any later version.
879
+ *
880
+ * This program is distributed in the hope that it will be useful,
881
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
882
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
883
+ * See the GNU General Public License for more details.
884
+ */
885
+ interface FormProtectionConfig {
886
+ enabled: boolean;
887
+ secret: string;
888
+ emailVerification: boolean;
889
+ spamProtection: boolean;
890
+ rateLimiting: boolean;
891
+ maxSubmissionsPerHour?: number;
892
+ maxSubmissionsPerDay?: number;
893
+ }
894
+ interface FormProtectionResult {
895
+ success: boolean;
896
+ protected: boolean;
897
+ message?: string;
898
+ verificationRequired?: boolean;
899
+ verificationToken?: string;
900
+ rateLimitExceeded?: boolean;
901
+ spamDetected?: boolean;
902
+ }
903
+ interface EmailVerificationData {
904
+ email: string;
905
+ token: string;
906
+ expiresAt: string;
907
+ verified: boolean;
908
+ }
909
+ interface FormProtectionValidation {
910
+ isValid: boolean;
911
+ errors: string[];
912
+ warnings: string[];
913
+ protectionLevel: 'low' | 'medium' | 'high';
914
+ }
915
+
916
+ /**
917
+ * @license GPL-3.0-or-later
918
+ *
919
+ * This file is part of the MarVAlt Open SDK.
920
+ * Copyright (c) 2025 Vibune Pty Ltd.
921
+ *
922
+ * This program is free software: you can redistribute it and/or modify
923
+ * it under the terms of the GNU General Public License as published by
924
+ * the Free Software Foundation, either version 3 of the License, or
925
+ * (at your option) any later version.
926
+ *
927
+ * This program is distributed in the hope that it will be useful,
928
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
929
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
930
+ * See the GNU General Public License for more details.
931
+ */
932
+
933
+ interface FormProtectionGeneratorConfig extends FormProtectionConfig {
934
+ outputPath: string;
935
+ forms: Array<{
936
+ id: number;
937
+ name: string;
938
+ protectionLevel: 'low' | 'medium' | 'high';
939
+ }>;
940
+ }
941
+ interface FormProtectionStaticData {
942
+ config: FormProtectionConfig;
943
+ forms: Array<{
944
+ id: number;
945
+ name: string;
946
+ protectionLevel: 'low' | 'medium' | 'high';
947
+ emailVerification: boolean;
948
+ spamProtection: boolean;
949
+ rateLimiting: boolean;
950
+ }>;
951
+ generatedAt: string;
952
+ }
953
+ declare class FormProtectionGenerator {
954
+ private config;
955
+ constructor(config: FormProtectionGeneratorConfig);
956
+ generateStaticData(): Promise<FormProtectionStaticData>;
957
+ private writeStaticData;
958
+ validateFormProtection(formData: Record<string, any>): FormProtectionResult;
959
+ }
960
+ declare function generateFormProtectionData(config: FormProtectionGeneratorConfig): Promise<FormProtectionStaticData>;
961
+
962
+ /**
963
+ * @license GPL-3.0-or-later
964
+ *
965
+ * This file is part of the MarVAlt Open SDK.
966
+ * Copyright (c) 2025 Vibune Pty Ltd.
967
+ *
968
+ * This program is free software: you can redistribute it and/or modify
969
+ * it under the terms of the GNU General Public License as published by
970
+ * the Free Software Foundation, either version 3 of the License, or
971
+ * (at your option) any later version.
972
+ *
973
+ * This program is distributed in the hope that it will be useful,
974
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
975
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
976
+ * See the GNU General Public License for more details.
977
+ */
978
+
979
+ declare function createWordPressConfig(overrides?: Partial<WordPressConfig>): WordPressConfig;
980
+ declare function createGravityFormsConfig(overrides?: Partial<GravityFormsConfig>): GravityFormsConfig;
981
+ declare function createFormProtectionConfig(overrides?: Partial<FormProtectionConfig>): FormProtectionConfig;
982
+ declare function validateWordPressConfig(config: WordPressConfig): string[];
983
+ declare function validateGravityFormsConfig(config: GravityFormsConfig): string[];
984
+ declare function validateFormProtectionConfig(config: FormProtectionConfig): string[];
985
+
986
+ /**
987
+ * @license GPL-3.0-or-later
988
+ *
989
+ * This file is part of the MarVAlt Open SDK.
990
+ * Copyright (c) 2025 Vibune Pty Ltd.
991
+ *
992
+ * This program is free software: you can redistribute it and/or modify
993
+ * it under the terms of the GNU General Public License as published by
994
+ * the Free Software Foundation, either version 3 of the License, or
995
+ * (at your option) any later version.
996
+ *
997
+ * This program is distributed in the hope that it will be useful,
998
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
999
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1000
+ * See the GNU General Public License for more details.
1001
+ */
1002
+ declare function validateEmail(email: string): boolean;
1003
+ declare function validateRequired(value: any): boolean;
1004
+ declare function validateMinLength(value: string, minLength: number): boolean;
1005
+ declare function validateMaxLength(value: string, maxLength: number): boolean;
1006
+ declare function validatePhoneNumber(phone: string): boolean;
1007
+ declare function validateUrl(url: string): boolean;
1008
+ declare function sanitizeHtml(html: string): string;
1009
+ declare function validateFormData(formData: Record<string, any>, rules: Record<string, any>): {
1010
+ isValid: boolean;
1011
+ errors: Record<string, string[]>;
1012
+ };
1013
+
1014
+ export { FormProtectionGenerator, GravityForm, GravityFormsClient, GravityFormsGenerator, GravityFormsProvider, WordPressClient, WordPressContent, WordPressGenerator, WordPressProvider, createFormProtectionConfig, createGravityFormsConfig, createWordPressConfig, generateFormProtectionData, generateGravityFormsData, generateWordPressData, sanitizeHtml, transformWordPressMedia, transformWordPressMediaItems, transformWordPressPage, transformWordPressPages, transformWordPressPost, transformWordPressPosts, useGravityForms, useGravityFormsConfig, useGravityFormsContext, useWordPress, useWordPressCategories, useWordPressContext, useWordPressMedia, useWordPressPage, useWordPressPages, useWordPressPost, useWordPressPosts, useWordPressTags, validateEmail, validateFormData, validateFormProtectionConfig, validateGravityFormsConfig, validateMaxLength, validateMinLength, validatePhoneNumber, validateRequired, validateUrl, validateWordPressConfig };
1015
+ export type { EmailVerificationData, FormProtectionConfig, FormProtectionGeneratorConfig, FormProtectionResult, FormProtectionStaticData, FormProtectionValidation, GravityFormConfirmation, GravityFormField, GravityFormNotification, GravityFormSubmission, GravityFormSubmissionResult, GravityFormsConfig, GravityFormsGeneratorConfig, GravityFormsStaticData, StaticDataStore, TransformedWordPressMedia, TransformedWordPressPage, TransformedWordPressPost, UseGravityFormsResult, UseWordPressResult, WordPressAuthor, WordPressCategory, WordPressConfig, WordPressGeneratorConfig, WordPressMedia, WordPressPage, WordPressPost, WordPressQueryParams, WordPressTag };