-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add bulk processing support for email sending #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aec63a3 to
ef61551
Compare
d586dc1 to
56de9f0
Compare
25175be to
f1311bd
Compare
- Move @iexec/dataprotector to dependencies - Update @iexec/dataprotector to beta version with bulk processing support - Update iexec SDK to version with bulk processing support
- Add GrantedAccess type for detailed dataset order information - Update Contact type to include grantedAccess field - Update SendEmailParams to support grantedAccess array - Add ProcessBulkRequestResponse and SendEmailBulkResponse types - Add bulkOnly parameter to contact fetching params
- Add dataProtector instance to IExecWeb3mail class - Update sendEmail return type to ProcessBulkRequestResponse | SendEmailSingleResponse - Initialize dataProtector with proper configuration matching web3telegram pattern - Update resolveConfig to create dataProtector instance with subgraphUrl, ipfsGateway, and ipfsNode
- Refactor sendEmail to support both single and bulk processing modes - Add bulk processing logic using dataProtector.prepareBulkRequest and processBulkRequest - Update single processing to use dataProtector.processProtectedData - Add validation for grantedAccess parameter - Support grantedAccess array for bulk email sending
- Add bulkOnly parameter to fetchMyContacts and fetchUserContacts - Update fetchUserContacts to populate grantedAccess field with full dataset order details - Pass bulkOnly as allowBulk to fetchDatasetOrderbook - Update subgraphQuery.getValidContact to include grantedAccess in returned contacts - Filter null/undefined contacts matching web3telegram pattern
- Add unit tests for grantedAccess parameter in sendEmail - Add unit tests for bulkOnly parameter in fetchMyContacts - Add test for grantedAccess property in returned contacts - Update sendEmail unit tests to match web3telegram pattern - Add comprehensive bulk processing test coverage
- Add bulkOnly parameter tests to fetchMyContacts e2e suite - Add bulkOnly parameter tests to fetchUserContacts e2e suite - Test bulk access filtering and default behavior - Match web3telegram e2e test patterns
- Fix sendEmail e2e test type guards for ProcessBulkRequestResponse | SendEmailSingleResponse - Add sendEmailBulk e2e test file for bulk processing - Update error message expectations for processProtectedData errors - Test bulk email sending with grantedAccess array
- Fix constructor test error message expectation (remove dappAddress from missing config) - Update test utilities for bulk processing support
- Fix voucher error test to check error message in cause chain - Update error message expectations to handle wrapped errors from processProtectedData - Fix timeout issue in beforeEach hook for workerpool order test
- Add defaultWorkerpool parameter - Add workerpoolMaxPrice, dataMaxPrice, appMaxPrice parameters - Add useVoucher parameter - Add dataMaxPrice validation
- Format fetchMyContacts validation to single line - Format beforeAll hook in fetchUserContacts test
- Add grantedAccess mock data to all test contact objects - Update test expectations to include grantedAccess property - Fix TypeScript errors in subgraphQuery.test.ts
… processing - Add prepareEmailCampaign to prepare bulk email campaigns with encryption and IPFS upload - Add sendEmailCampaign to process prepared bulk campaigns - Support for bulk email processing using @iexec/dataprotector SDK
- Add PrepareEmailCampaignParams and PrepareEmailCampaignResponse types - Add SendEmailCampaignParams and ProcessBulkRequestResponse types - Add GrantedAccess type for detailed access grant information - Update Contact type to include grantedAccess field
- Add prepareEmailCampaign method to IExecWeb3mail class - Add sendEmailCampaign method to IExecWeb3mail class - Initialize IExecDataProtectorCore instance for bulk processing support
- Add prepareEmailCampaign e2e tests - Add sendEmailCampaign e2e tests with comprehensive coverage - Test error handling, validation, and integration scenarios
- Add script to disable checkImplementedOnChain in iexec config module - Required for testing on experimental networks
…ontact filtering - Set isUserStrict: true in fetchUserContacts test to only get user-specific orders - Fix test expecting empty array for random wallet with no grants
- Remove sendEmailBulk.test.ts as bulk processing is now handled by prepareEmailCampaign and sendEmailCampaign
…tation - Remove bulk processing logic from sendEmail - Restore orderbook-based single email sending - Bulk processing now handled by prepareEmailCampaign and sendEmailCampaign methods
…entStake - Add error handling for parallel test execution in CI - Handle 'transaction already imported' error (-32003) gracefully - Wait and re-check balance after transaction submission - Make deposit operation idempotent for parallel test execution - Prevents nonce conflicts when multiple tests run simultaneously
Co-authored-by: pjt <[email protected]>
Co-authored-by: pjt <[email protected]>
Co-authored-by: pjt <[email protected]>
Co-authored-by: pjt <[email protected]>
- Update sendEmailCampaign tests to accept ValidationError and TypeError where appropriate - Fix workerpool matching in tests by passing correct workerpoolAddressOrEns - Increase prepareEmailCampaign beforeEach timeout
- Add strict mode to prevent undefined coercion to empty object - Add custom test to check for undefined/null/empty object before field validation - Fix error message to show 'campaignRequest is required' instead of 'sign is a required field' when campaignRequest is undefined
f1311bd to
8c4efcb
Compare
PierreJeanjacquot
approved these changes
Nov 17, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds bulk processing support to web3mail-sdk, allowing users to send multiple emails in a single iExec app call.
The implementation follows the same pattern as web3telegram-sdk, using the @iexec/dataprotector SDK for bulk operations. Key features include support for grantedAccess parameter, bulkOnly filtering in contact fetching, and comprehensive test coverage.