@mailoo/forms 0.0.0-stage → 1.32.2

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 +16 -0
  2. package/README.md +205 -2
  3. package/dist/chunk-4B377BWO.js +147 -0
  4. package/dist/chunk-4B377BWO.js.map +1 -0
  5. package/dist/chunk-LD246ORB.js +86 -0
  6. package/dist/chunk-LD246ORB.js.map +1 -0
  7. package/dist/chunk-QBZAYHBD.js +36 -0
  8. package/dist/chunk-QBZAYHBD.js.map +1 -0
  9. package/dist/events/index.cjs +176 -0
  10. package/dist/events/index.cjs.map +1 -0
  11. package/dist/events/index.d.cts +107 -0
  12. package/dist/events/index.d.ts +107 -0
  13. package/dist/events/index.js +17 -0
  14. package/dist/events/index.js.map +1 -0
  15. package/dist/hooks/index.cjs +301 -0
  16. package/dist/hooks/index.cjs.map +1 -0
  17. package/dist/hooks/index.d.cts +130 -0
  18. package/dist/hooks/index.d.ts +130 -0
  19. package/dist/hooks/index.js +221 -0
  20. package/dist/hooks/index.js.map +1 -0
  21. package/dist/index.cjs +66 -0
  22. package/dist/index.cjs.map +1 -0
  23. package/dist/index.d.cts +35 -0
  24. package/dist/index.d.ts +35 -0
  25. package/dist/index.js +19 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/routes/index.cjs +544 -0
  28. package/dist/routes/index.cjs.map +1 -0
  29. package/dist/routes/index.d.cts +59 -0
  30. package/dist/routes/index.d.ts +59 -0
  31. package/dist/routes/index.js +351 -0
  32. package/dist/routes/index.js.map +1 -0
  33. package/dist/server/index.cjs +270 -0
  34. package/dist/server/index.cjs.map +1 -0
  35. package/dist/server/index.d.cts +44 -0
  36. package/dist/server/index.d.ts +44 -0
  37. package/dist/server/index.js +112 -0
  38. package/dist/server/index.js.map +1 -0
  39. package/dist/webhooks/index.cjs +111 -0
  40. package/dist/webhooks/index.cjs.map +1 -0
  41. package/dist/webhooks/index.d.cts +37 -0
  42. package/dist/webhooks/index.d.ts +37 -0
  43. package/dist/webhooks/index.js +9 -0
  44. package/dist/webhooks/index.js.map +1 -0
  45. package/package.json +77 -3
@@ -0,0 +1,37 @@
1
+ type MailooDeliveryWebhookEventName = 'accepted' | 'deferred' | 'delivered' | 'opened' | 'clicked' | 'unsubscribed' | 'bounced' | 'consent.changed';
2
+ type MailooDeliveryWebhookPayload = {
3
+ event: MailooDeliveryWebhookEventName | string;
4
+ integrationId: string;
5
+ messageId?: string;
6
+ idempotencyKey?: string;
7
+ recipientEmail?: string;
8
+ externalUserId?: string | null;
9
+ marketingConsentGranted?: boolean;
10
+ unsubscribedAt?: string | null;
11
+ timestamp: string;
12
+ metadata?: Record<string, unknown>;
13
+ };
14
+ type MailooConsentChangedPayload = {
15
+ event: 'consent.changed';
16
+ integrationId: string;
17
+ externalUserId: string | null;
18
+ recipientEmail: string;
19
+ marketingConsentGranted: boolean;
20
+ unsubscribedAt: string | null;
21
+ timestamp: string;
22
+ };
23
+ type VerifyMailooDeliveryWebhookResult = {
24
+ ok: true;
25
+ timestamp: number;
26
+ payload: MailooDeliveryWebhookPayload;
27
+ } | {
28
+ ok: false;
29
+ message: string;
30
+ };
31
+ /**
32
+ * Verify `X-Mailoo-Signature: t={unix},v1={hex}` over `"{timestamp}.{rawBody}"`.
33
+ */
34
+ declare function verifyMailooDeliveryWebhook(rawBody: string, headers: Headers | Record<string, string | null | undefined>, secret: string): VerifyMailooDeliveryWebhookResult;
35
+ declare function asMailooConsentChanged(payload: MailooDeliveryWebhookPayload): MailooConsentChangedPayload | null;
36
+
37
+ export { type MailooConsentChangedPayload, type MailooDeliveryWebhookEventName, type MailooDeliveryWebhookPayload, type VerifyMailooDeliveryWebhookResult, asMailooConsentChanged, verifyMailooDeliveryWebhook };
@@ -0,0 +1,37 @@
1
+ type MailooDeliveryWebhookEventName = 'accepted' | 'deferred' | 'delivered' | 'opened' | 'clicked' | 'unsubscribed' | 'bounced' | 'consent.changed';
2
+ type MailooDeliveryWebhookPayload = {
3
+ event: MailooDeliveryWebhookEventName | string;
4
+ integrationId: string;
5
+ messageId?: string;
6
+ idempotencyKey?: string;
7
+ recipientEmail?: string;
8
+ externalUserId?: string | null;
9
+ marketingConsentGranted?: boolean;
10
+ unsubscribedAt?: string | null;
11
+ timestamp: string;
12
+ metadata?: Record<string, unknown>;
13
+ };
14
+ type MailooConsentChangedPayload = {
15
+ event: 'consent.changed';
16
+ integrationId: string;
17
+ externalUserId: string | null;
18
+ recipientEmail: string;
19
+ marketingConsentGranted: boolean;
20
+ unsubscribedAt: string | null;
21
+ timestamp: string;
22
+ };
23
+ type VerifyMailooDeliveryWebhookResult = {
24
+ ok: true;
25
+ timestamp: number;
26
+ payload: MailooDeliveryWebhookPayload;
27
+ } | {
28
+ ok: false;
29
+ message: string;
30
+ };
31
+ /**
32
+ * Verify `X-Mailoo-Signature: t={unix},v1={hex}` over `"{timestamp}.{rawBody}"`.
33
+ */
34
+ declare function verifyMailooDeliveryWebhook(rawBody: string, headers: Headers | Record<string, string | null | undefined>, secret: string): VerifyMailooDeliveryWebhookResult;
35
+ declare function asMailooConsentChanged(payload: MailooDeliveryWebhookPayload): MailooConsentChangedPayload | null;
36
+
37
+ export { type MailooConsentChangedPayload, type MailooDeliveryWebhookEventName, type MailooDeliveryWebhookPayload, type VerifyMailooDeliveryWebhookResult, asMailooConsentChanged, verifyMailooDeliveryWebhook };
@@ -0,0 +1,9 @@
1
+ import {
2
+ asMailooConsentChanged,
3
+ verifyMailooDeliveryWebhook
4
+ } from "../chunk-LD246ORB.js";
5
+ export {
6
+ asMailooConsentChanged,
7
+ verifyMailooDeliveryWebhook
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,6 +1,80 @@
1
1
  {
2
2
  "name": "@mailoo/forms",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.32.2",
4
+ "description": "Mailoo FORM and CONTACT_FORM (feedback) Next.js BFF helpers, hooks, and lifecycle events",
5
+ "license": "LicenseRef-Mailoo-NoModification",
6
+ "homepage": "https://mailoo.app/en/support/docs/integrations/nextjs-packages",
7
+ "keywords": [
8
+ "mailoo",
9
+ "nextjs",
10
+ "forms"
11
+ ],
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "type": "module",
16
+ "main": "./dist/index.cjs",
17
+ "module": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js",
23
+ "require": "./dist/index.cjs"
24
+ },
25
+ "./routes": {
26
+ "types": "./dist/routes/index.d.ts",
27
+ "import": "./dist/routes/index.js",
28
+ "require": "./dist/routes/index.cjs"
29
+ },
30
+ "./hooks": {
31
+ "types": "./dist/hooks/index.d.ts",
32
+ "import": "./dist/hooks/index.js",
33
+ "require": "./dist/hooks/index.cjs"
34
+ },
35
+ "./events": {
36
+ "types": "./dist/events/index.d.ts",
37
+ "import": "./dist/events/index.js",
38
+ "require": "./dist/events/index.cjs"
39
+ },
40
+ "./server": {
41
+ "types": "./dist/server/index.d.ts",
42
+ "import": "./dist/server/index.js",
43
+ "require": "./dist/server/index.cjs"
44
+ },
45
+ "./webhooks": {
46
+ "types": "./dist/webhooks/index.d.ts",
47
+ "import": "./dist/webhooks/index.js",
48
+ "require": "./dist/webhooks/index.cjs"
49
+ }
50
+ },
51
+ "files": [
52
+ "dist",
53
+ "README.md",
54
+ "LICENSE"
55
+ ],
56
+ "peerDependencies": {
57
+ "@mailoo/next-core": "^1.18.4",
58
+ "next": ">=16.3.4",
59
+ "react": ">=18.3.1"
60
+ },
61
+ "devDependencies": {
62
+ "@mailoo/next-core": "1.32.2",
63
+ "@types/node": "^25.9.5",
64
+ "@types/react": "^19.2.18",
65
+ "next": "^16.3.4",
66
+ "react": "^19.2.8",
67
+ "tsup": "^8.5.1",
68
+ "typescript": "^5.9.3",
69
+ "vitest": "^4.1.11"
70
+ },
71
+ "engines": {
72
+ "node": ">=20.20.2"
73
+ },
74
+ "scripts": {
75
+ "build": "tsup",
76
+ "clean": "rm -rf dist .turbo",
77
+ "test": "vitest run",
78
+ "type-check": "tsc --noEmit"
79
+ }
6
80
  }