{"_id":"@codepunter-labs/mock-zeptomail","_rev":"2-381eae1f55b523cdd3c298a9d59818f7","name":"@codepunter-labs/mock-zeptomail","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@codepunter-labs/mock-zeptomail","version":"0.1.0","keywords":["mock","zeptomail","zoho","email","testing","transactional-email"],"author":{"name":"CodePunter Labs"},"license":"MIT","_id":"@codepunter-labs/mock-zeptomail@0.1.0","maintainers":[{"name":"codepunter","email":"derrickmensahtorkornoo@gmail.com"}],"homepage":"https://github.com/DERRICK-TORKORNOO/mock-sdks#readme","bugs":{"url":"https://github.com/DERRICK-TORKORNOO/mock-sdks/issues"},"dist":{"shasum":"bb95c6c294f93d6f5513516f0e98bc88626f68f1","tarball":"https://registry.npmjs.org/@codepunter-labs/mock-zeptomail/-/mock-zeptomail-0.1.0.tgz","fileCount":7,"integrity":"sha512-p8kLyykiNnNOn4Nd95HGpyeYisxuSNW8ogG7op14glapwKjGnITDVudBAsWQdcVKvpyHhq7kPMXIEXqL8gsV5w==","signatures":[{"sig":"MEUCICrZUdh59k6CSibQRCdihQEiSbGLRBIM+2WIZES3Y2hBAiEAjPsme6hemJ/oSFqJgTjF4w9lFwQWCwgD7FZGNRoyfiY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30756},"main":"./dist/index.cjs","type":"module","_from":"file:codepunter-labs-mock-zeptomail-0.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"scripts":{"dev":"tsup --watch","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"codepunter","email":"derrickmensahtorkornoo@gmail.com"},"_resolved":"/tmp/79081d6bf983b0d9fd560bec970628f0/codepunter-labs-mock-zeptomail-0.1.0.tgz","_integrity":"sha512-p8kLyykiNnNOn4Nd95HGpyeYisxuSNW8ogG7op14glapwKjGnITDVudBAsWQdcVKvpyHhq7kPMXIEXqL8gsV5w==","repository":{"url":"git+https://github.com/DERRICK-TORKORNOO/mock-sdks.git","type":"git","directory":"packages/mock-zeptomail"},"_npmVersion":"10.8.2","description":"Mock SDK for Zoho ZeptoMail API","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@codepunter-labs/mock-core":"0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","typescript":"^5.9.3","@codepunter-labs/mock-core":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/mock-zeptomail_0.1.0_1783371658501_0.7879991152213068","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@codepunter-labs/mock-zeptomail","version":"0.2.0","description":"Mock SDK for Zoho ZeptoMail API","repository":{"type":"git","url":"git+https://github.com/DERRICK-TORKORNOO/mock-sdks.git","directory":"packages/mock-zeptomail"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"keywords":["mock","zeptomail","zoho","email","testing","transactional-email"],"author":{"name":"CodePunter Labs"},"license":"MIT","devDependencies":{"tsup":"^8.5.1","typescript":"^5.9.3","@codepunter-labs/mock-core":"0.2.0"},"dependencies":{"@codepunter-labs/mock-core":"0.2.0"},"scripts":{"build":"tsup","dev":"tsup --watch","typecheck":"tsc --noEmit"},"_id":"@codepunter-labs/mock-zeptomail@0.2.0","bugs":{"url":"https://github.com/DERRICK-TORKORNOO/mock-sdks/issues"},"homepage":"https://github.com/DERRICK-TORKORNOO/mock-sdks#readme","_integrity":"sha512-dOkUyoBN1fLPMH4txrpV32axUQQip64YLL66egYiUe8fVY7LUZEXuT4CYWKEX//K3Do48tB8UN8atzL4Tmro3A==","_resolved":"/tmp/0ac1d9af3e64be93ac01b31514d8b885/codepunter-labs-mock-zeptomail-0.2.0.tgz","_from":"file:codepunter-labs-mock-zeptomail-0.2.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-dOkUyoBN1fLPMH4txrpV32axUQQip64YLL66egYiUe8fVY7LUZEXuT4CYWKEX//K3Do48tB8UN8atzL4Tmro3A==","shasum":"7eec824f1b700513e3435fb3053588962074c504","tarball":"https://registry.npmjs.org/@codepunter-labs/mock-zeptomail/-/mock-zeptomail-0.2.0.tgz","fileCount":7,"unpackedSize":31687,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIH+Mo3nWjJ8cX4UDjVQjNKLNQAie3Mm1n2ivJkr/irmzAiAoUeF3FaTQlgHMYvVWbut2dLX/JOAn6O4PzVlsWn6T8Q=="}]},"_npmUser":{"name":"codepunter","email":"derrickmensahtorkornoo@gmail.com"},"directories":{},"maintainers":[{"name":"codepunter","email":"derrickmensahtorkornoo@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mock-zeptomail_0.2.0_1783446219414_0.44655814976215136"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-06T21:00:58.215Z","modified":"2026-07-07T17:43:39.654Z","0.1.0":"2026-07-06T21:00:58.631Z","0.2.0":"2026-07-07T17:43:39.547Z"},"bugs":{"url":"https://github.com/DERRICK-TORKORNOO/mock-sdks/issues"},"author":{"name":"CodePunter Labs"},"license":"MIT","homepage":"https://github.com/DERRICK-TORKORNOO/mock-sdks#readme","keywords":["mock","zeptomail","zoho","email","testing","transactional-email"],"repository":{"type":"git","url":"git+https://github.com/DERRICK-TORKORNOO/mock-sdks.git","directory":"packages/mock-zeptomail"},"description":"Mock SDK for Zoho ZeptoMail API","maintainers":[{"name":"codepunter","email":"derrickmensahtorkornoo@gmail.com"}],"readme":"# @codepunter-labs/mock-zeptomail\n\nMock SDK for Zoho ZeptoMail API. Provides fully-typed mock implementations for testing transactional email sending, templates, domains, and email logs without making real API calls.\n\n[![npm version](https://badge.fury.io/js/@codepunter-labs/mock-zeptomail.svg)](https://www.npmjs.com/package/@codepunter-labs/mock-zeptomail)\n[![GitHub](https://img.shields.io/badge/GitHub-Repository-blue)](https://github.com/DERRICK-TORKORNOO/mock-sdks/tree/main/packages/mock-zeptomail)\n\n## Installation\n\n```bash\nnpm install @codepunter-labs/mock-zeptomail\n```\n\n## Features\n\n- **Email Sending**: Send single and batch transactional emails\n- **Templates**: Create, update, list, and delete email templates\n- **Domains**: Manage sending domains with verification\n- **Email Logs**: Track email delivery status and logs\n- **Type-safe**: Full TypeScript support with accurate API types\n- **Test Framework Agnostic**: Works with Jest, Vitest, and other spy-based frameworks\n\n## Repository\n\n- **GitHub**: https://github.com/DERRICK-TORKORNOO/mock-sdks/tree/main/packages/mock-zeptomail\n- **Source Code**: [src/](https://github.com/DERRICK-TORKORNOO/mock-sdks/tree/main/packages/mock-zeptomail/src)\n- **Tests**: [tests/](https://github.com/DERRICK-TORKORNOO/mock-sdks/tree/main/packages/mock-zeptomail/tests)\n\n## Usage\n\n### Basic Setup\n\n```typescript\nimport { vi } from 'vitest';\nimport { createMockZeptoMail } from '@codepunter-labs/mock-zeptomail';\n\nconst zeptoMail = createMockZeptoMail({ spy: vi.fn });\n```\n\n### Using with Jest\n\n```typescript\nimport { createMockZeptoMail } from '@codepunter-labs/mock-zeptomail';\n\nconst zeptoMail = createMockZeptoMail({ spy: jest.fn });\n```\n\n### Example: Send Email\n\n```typescript\n// Default behavior - returns realistic mock data\nconst result = await zeptoMail.sendEmail({\n  from: { address: 'sender@example.com', name: 'Sender' },\n  to: [{ address: 'recipient@example.com', name: 'Recipient' }],\n  subject: 'Test Email',\n  html: '<p>Hello World</p>'\n});\n```\n\n### Example: Send Batch Email\n\n```typescript\nconst result = await zeptoMail.sendBatchEmail({\n  from: { address: 'sender@example.com' },\n  to: [\n    [{ address: 'recipient1@example.com' }],\n    [{ address: 'recipient2@example.com' }]\n  ],\n  subject: 'Batch Email',\n  text: 'Hello World'\n});\n```\n\n### Example: Create Template\n\n```typescript\nconst result = await zeptoMail.createTemplate({\n  templateName: 'Welcome Email',\n  subject: 'Welcome',\n  htmlContent: '<h1>Welcome {{name}}</h1>'\n});\n```\n\n### Example: Override Mock Response\n\n```typescript\nimport { makeSendEmailResponse } from '@codepunter-labs/mock-zeptomail';\n\nzeptoMail.sendEmail.mockResolvedValue({\n  message: 'Email sent successfully',\n  data: makeSendEmailResponse({ messageId: 'custom_msg_123' })\n});\n```\n\n### Example: Error Simulation\n\n```typescript\nimport { MockErrors } from '@codepunter-labs/mock-core';\n\nzeptoMail.sendEmail.mockRejectedValue(\n  MockErrors.badRequest('Invalid email address')\n);\n```\n\n## API Reference\n\n### MockZeptoMail\n\n- `sendEmail(request)` - Send single email\n- `sendBatchEmail(request)` - Send batch email\n- `createTemplate(request)` - Create email template\n- `updateTemplate(request)` - Update email template\n- `getTemplate(templateId)` - Get template details\n- `listTemplates()` - List all templates\n- `deleteTemplate(templateId)` - Delete template\n- `createDomain(request)` - Create domain\n- `updateDomain(request)` - Update domain\n- `getDomain(domainId)` - Get domain details\n- `listDomains()` - List all domains\n- `verifyDomain(domainId)` - Verify domain\n- `deleteDomain(domainId)` - Delete domain\n- `getEmailLogs(options?)` - Get email logs\n- `getEmailLog(messageId)` - Get specific email log\n\n### Fixture Factories\n\n- `makeEmailAddress(address, name?)` - Create email address\n- `makeSendEmailResponse(options?)` - Create send email response\n- `makeBatchEmailResponse(options?)` - Create batch email response\n- `makeTemplate(options?)` - Create template\n- `makeDomain(options?)` - Create domain\n- `makeEmailLog(options?)` - Create email log\n\n## Testing Patterns\n\n### Test Success Path\n\n```typescript\ntest('should send email successfully', async () => {\n  const zeptoMail = createMockZeptoMail({ spy: vi.fn });\n  \n  const result = await zeptoMail.sendEmail(request);\n  \n  expect(result.message).toBe('Email sent successfully');\n  expect(result.data.messageId).toBeDefined();\n});\n```\n\n### Test Error Handling\n\n```typescript\ntest('should handle invalid email address error', async () => {\n  const zeptoMail = createMockZeptoMail({ spy: vi.fn });\n  \n  zeptoMail.sendEmail.mockRejectedValue(\n    ZeptoMailErrors.invalidEmail()\n  );\n  \n  await expect(zeptoMail.sendEmail(request)).rejects.toMatchObject({ message: /Invalid email/ });\n});\n```\n\n### Test with Custom Data\n\n```typescript\ntest('should use custom message ID', async () => {\n  const zeptoMail = createMockZeptoMail({ spy: vi.fn });\n  \n  zeptoMail.sendEmail.mockResolvedValue({\n    message: 'Email sent successfully',\n    data: makeSendEmailResponse({ messageId: 'custom_msg_123' })\n  });\n  \n  const result = await zeptoMail.sendEmail(request);\n  expect(result.data.messageId).toBe('custom_msg_123');\n});\n```\n\n## License\n\nMIT\n  zeptoMail.sendEmail.mockResolvedValue({\n    message: 'Email sent successfully',\n    data: makeSendEmailResponse({ messageId: 'custom_msg_123' })\n  });\n  \n  const result = await zeptoMail.sendEmail(request);\n  expect(result.data.messageId).toBe('custom_msg_123');\n});\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}