@devwithbobby/loops 0.1.1 → 0.1.3
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/dist/client/index.d.ts +186 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +396 -0
- package/dist/client/types.d.ts +24 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/types.js +0 -0
- package/dist/component/convex.config.d.ts +3 -0
- package/dist/component/convex.config.d.ts.map +1 -0
- package/dist/component/convex.config.js +25 -0
- package/dist/component/lib.d.ts +103 -0
- package/dist/component/lib.d.ts.map +1 -0
- package/dist/component/lib.js +1000 -0
- package/dist/component/schema.d.ts +3 -0
- package/dist/component/schema.d.ts.map +1 -0
- package/dist/component/schema.js +16 -0
- package/dist/component/tables/contacts.d.ts +2 -0
- package/dist/component/tables/contacts.d.ts.map +1 -0
- package/dist/component/tables/contacts.js +14 -0
- package/dist/component/tables/emailOperations.d.ts +2 -0
- package/dist/component/tables/emailOperations.d.ts.map +1 -0
- package/dist/component/tables/emailOperations.js +20 -0
- package/dist/component/validators.d.ts +18 -0
- package/dist/component/validators.d.ts.map +1 -0
- package/dist/component/validators.js +34 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +5 -0
- package/package.json +11 -5
- package/.config/commitlint.config.ts +0 -11
- package/.config/lefthook.yml +0 -11
- package/.github/workflows/release.yml +0 -52
- package/.github/workflows/test-and-lint.yml +0 -39
- package/biome.json +0 -45
- package/bun.lock +0 -1166
- package/bunfig.toml +0 -7
- package/convex.json +0 -3
- package/example/CLAUDE.md +0 -106
- package/example/README.md +0 -21
- package/example/bun-env.d.ts +0 -17
- package/example/convex/_generated/api.d.ts +0 -53
- package/example/convex/_generated/api.js +0 -23
- package/example/convex/_generated/dataModel.d.ts +0 -60
- package/example/convex/_generated/server.d.ts +0 -149
- package/example/convex/_generated/server.js +0 -90
- package/example/convex/convex.config.ts +0 -7
- package/example/convex/example.ts +0 -76
- package/example/convex/schema.ts +0 -3
- package/example/convex/tsconfig.json +0 -34
- package/example/src/App.tsx +0 -185
- package/example/src/frontend.tsx +0 -39
- package/example/src/index.css +0 -15
- package/example/src/index.html +0 -12
- package/example/src/index.tsx +0 -19
- package/example/tsconfig.json +0 -28
- package/renovate.json +0 -32
- package/test/client/_generated/_ignore.ts +0 -1
- package/test/client/index.test.ts +0 -65
- package/test/client/setup.test.ts +0 -54
- package/test/component/lib.test.ts +0 -225
- package/test/component/setup.test.ts +0 -21
- package/tsconfig.build.json +0 -20
- 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"}
|