@devwithbobby/loops 0.1.0 → 0.1.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 (72) hide show
  1. package/README.md +343 -375
  2. package/dist/client/index.d.ts +186 -0
  3. package/dist/client/index.d.ts.map +1 -0
  4. package/dist/client/index.js +396 -0
  5. package/dist/client/types.d.ts +24 -0
  6. package/dist/client/types.d.ts.map +1 -0
  7. package/dist/client/types.js +0 -0
  8. package/dist/component/convex.config.d.ts +3 -0
  9. package/dist/component/convex.config.d.ts.map +1 -0
  10. package/dist/component/convex.config.js +25 -0
  11. package/dist/component/lib.d.ts +103 -0
  12. package/dist/component/lib.d.ts.map +1 -0
  13. package/dist/component/lib.js +1000 -0
  14. package/dist/component/schema.d.ts +3 -0
  15. package/dist/component/schema.d.ts.map +1 -0
  16. package/dist/component/schema.js +16 -0
  17. package/dist/component/tables/contacts.d.ts +2 -0
  18. package/dist/component/tables/contacts.d.ts.map +1 -0
  19. package/dist/component/tables/contacts.js +14 -0
  20. package/dist/component/tables/emailOperations.d.ts +2 -0
  21. package/dist/component/tables/emailOperations.d.ts.map +1 -0
  22. package/dist/component/tables/emailOperations.js +20 -0
  23. package/dist/component/validators.d.ts +18 -0
  24. package/dist/component/validators.d.ts.map +1 -0
  25. package/dist/component/validators.js +34 -0
  26. package/dist/utils.d.ts +4 -0
  27. package/dist/utils.d.ts.map +1 -0
  28. package/dist/utils.js +5 -0
  29. package/package.json +11 -5
  30. package/.changeset/README.md +0 -8
  31. package/.changeset/config.json +0 -14
  32. package/.config/commitlint.config.ts +0 -11
  33. package/.config/lefthook.yml +0 -11
  34. package/.github/workflows/release.yml +0 -52
  35. package/.github/workflows/test-and-lint.yml +0 -39
  36. package/biome.json +0 -45
  37. package/bun.lock +0 -1166
  38. package/bunfig.toml +0 -7
  39. package/convex.json +0 -3
  40. package/example/CLAUDE.md +0 -106
  41. package/example/README.md +0 -21
  42. package/example/bun-env.d.ts +0 -17
  43. package/example/convex/_generated/api.d.ts +0 -53
  44. package/example/convex/_generated/api.js +0 -23
  45. package/example/convex/_generated/dataModel.d.ts +0 -60
  46. package/example/convex/_generated/server.d.ts +0 -149
  47. package/example/convex/_generated/server.js +0 -90
  48. package/example/convex/convex.config.ts +0 -7
  49. package/example/convex/example.ts +0 -76
  50. package/example/convex/schema.ts +0 -3
  51. package/example/convex/tsconfig.json +0 -34
  52. package/example/src/App.tsx +0 -185
  53. package/example/src/frontend.tsx +0 -39
  54. package/example/src/index.css +0 -15
  55. package/example/src/index.html +0 -12
  56. package/example/src/index.tsx +0 -19
  57. package/example/tsconfig.json +0 -28
  58. package/prds/CHANGELOG.md +0 -38
  59. package/prds/CLAUDE.md +0 -408
  60. package/prds/CONTRIBUTING.md +0 -274
  61. package/prds/ENV_SETUP.md +0 -222
  62. package/prds/MONITORING.md +0 -301
  63. package/prds/RATE_LIMITING.md +0 -412
  64. package/prds/SECURITY.md +0 -246
  65. package/renovate.json +0 -32
  66. package/test/client/_generated/_ignore.ts +0 -1
  67. package/test/client/index.test.ts +0 -65
  68. package/test/client/setup.test.ts +0 -54
  69. package/test/component/lib.test.ts +0 -225
  70. package/test/component/setup.test.ts +0 -21
  71. package/tsconfig.build.json +0 -20
  72. package/tsconfig.json +0 -22
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Internal mutation to store/update a contact in the database
3
+ */
4
+ export declare const storeContact: any;
5
+ /**
6
+ * Internal mutation to delete a contact from the database
7
+ */
8
+ export declare const removeContact: any;
9
+ /**
10
+ * Internal mutation to log an email operation for monitoring
11
+ */
12
+ export declare const logEmailOperation: any;
13
+ /**
14
+ * Count contacts in the database
15
+ * Can filter by audience criteria (userGroup, source, subscribed status)
16
+ */
17
+ export declare const countContacts: any;
18
+ /**
19
+ * Add or update a contact in Loops
20
+ */
21
+ export declare const addContact: any;
22
+ /**
23
+ * Update an existing contact in Loops
24
+ */
25
+ export declare const updateContact: any;
26
+ /**
27
+ * Send a transactional email using a transactional ID
28
+ */
29
+ export declare const sendTransactional: any;
30
+ /**
31
+ * Send an event to Loops to trigger email workflows
32
+ */
33
+ export declare const sendEvent: any;
34
+ /**
35
+ * Delete a contact from Loops
36
+ */
37
+ export declare const deleteContact: any;
38
+ /**
39
+ * Send a campaign to contacts
40
+ * Campaigns are one-time email sends to a segment or list of contacts
41
+ */
42
+ export declare const sendCampaign: any;
43
+ /**
44
+ * Trigger a loop for a contact
45
+ * Loops are automated email sequences that can be triggered by events
46
+ * This is similar to sendEvent but specifically for loops
47
+ */
48
+ export declare const triggerLoop: any;
49
+ /**
50
+ * Find a contact by email
51
+ * Retrieves contact information from Loops
52
+ */
53
+ export declare const findContact: any;
54
+ /**
55
+ * Batch create contacts
56
+ * Create multiple contacts in a single API call
57
+ */
58
+ export declare const batchCreateContacts: any;
59
+ /**
60
+ * Unsubscribe a contact
61
+ * Unsubscribes a contact from receiving emails (they remain in the system)
62
+ */
63
+ export declare const unsubscribeContact: any;
64
+ /**
65
+ * Resubscribe a contact
66
+ * Resubscribes a previously unsubscribed contact
67
+ */
68
+ export declare const resubscribeContact: any;
69
+ /**
70
+ * Check for spam patterns: too many emails to the same recipient in a time window
71
+ * Returns email addresses that received too many emails
72
+ */
73
+ export declare const detectRecipientSpam: any;
74
+ /**
75
+ * Check for spam patterns: too many emails from the same actor/user
76
+ * Returns actor IDs that sent too many emails
77
+ */
78
+ export declare const detectActorSpam: any;
79
+ /**
80
+ * Get recent email operation statistics for monitoring
81
+ */
82
+ export declare const getEmailStats: any;
83
+ /**
84
+ * Detect rapid-fire email sending patterns (multiple emails sent in quick succession)
85
+ * Returns suspicious patterns indicating potential spam
86
+ */
87
+ export declare const detectRapidFirePatterns: any;
88
+ /**
89
+ * Rate limiting: Check if an email can be sent to a recipient
90
+ * Based on recent email operations in the database
91
+ */
92
+ export declare const checkRecipientRateLimit: any;
93
+ /**
94
+ * Rate limiting: Check if an actor/user can send more emails
95
+ * Based on recent email operations in the database
96
+ */
97
+ export declare const checkActorRateLimit: any;
98
+ /**
99
+ * Rate limiting: Check global email sending rate
100
+ * Checks total email operations across all senders
101
+ */
102
+ export declare const checkGlobalRateLimit: any;
103
+ //# sourceMappingURL=lib.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/component/lib.ts"],"names":[],"mappings":"AA0BA;;GAEG;AACH,eAAO,MAAM,YAAY,KA6CvB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,KAexB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB,KAgC5B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,aAAa,KAwCxB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU,KA2CrB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,KAoDxB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB,KAqD5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,SAAS,KAgCpB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,KA8BxB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,YAAY,KAkFvB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,WAAW,KA+CtB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,WAAW,KAiDtB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,KA4C9B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,kBAAkB,KA+B7B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,kBAAkB,KA+B7B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,KAwC9B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,eAAe,KAwC1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,KAgDxB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,uBAAuB,KAsGlC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,uBAAuB,KA6ClC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,KA6C9B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,KA8B/B,CAAC"}