{"_id":"@adamkac/nestjs-mailjet","_rev":"3-9cab587487f43a7840f9908febc0a015","name":"@adamkac/nestjs-mailjet","dist-tags":{"latest":"2.2.9"},"versions":{"2.2.5":{"name":"@adamkac/nestjs-mailjet","version":"2.2.5","repository":{"type":"git","url":"git+https://github.com/adamkac/nestjs-mailjet.git"},"type":"commonjs","dependencies":{"node-mailjet":"^6.0.2"},"devDependencies":{},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"description":"The nestjs-mailjet module provides a simple wrapper for the Mailjet API, allowing NestJS applications to easily send transactional emails using the Mailjet email delivery service.","bugs":{"url":"https://github.com/adamkac/nestjs-mailjet/issues"},"homepage":"https://github.com/adamkac/nestjs-mailjet#readme","_id":"@adamkac/nestjs-mailjet@2.2.5","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-QudJqmB8XXzlh2Hx3YoFM9HfdvvoNRyfvxnXond+4KXz/JTXPWk1SRm00GQQ16+XwWAmjTXIly/eFT2yPbv5Ow==","shasum":"7ae8351d5496322a5701d7cac74fe8038b21b7b3","tarball":"https://registry.npmjs.org/@adamkac/nestjs-mailjet/-/nestjs-mailjet-2.2.5.tgz","fileCount":20,"unpackedSize":17304,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDe981Ce89yYG+JT6UGUaoJEtlH4K5NsVl8wkUJW3nQTAIhAPuiBNSaNoEC8Ldbur+iwYkBDik6Q0CzRUi0mXgoXiQ1"}]},"_npmUser":{"name":"adamkac","email":"adaskaczmarzyk@gmail.com"},"directories":{},"maintainers":[{"name":"adamkac","email":"adaskaczmarzyk@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-mailjet_2.2.5_1688554368316_0.6129524880840382"},"_hasShrinkwrap":false},"2.2.6":{"name":"@adamkac/nestjs-mailjet","version":"2.2.6","repository":{"type":"git","url":"git+https://github.com/adamkac/nestjs-mailjet.git"},"type":"commonjs","scripts":{"build":"tsc -p tsconfig.json"},"peerDependencies":{"@nestjs/common":">=8.x.x","@nestjs/core":">=8.x.x","node-mailjet":">=5.x.x"},"dependencies":{"@nestjs/common":"9.3.9","@nestjs/core":"9.3.9","node-mailjet":">=5.x.x"},"devDependencies":{"typescript":"^5.1.6"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"description":"The nestjs-mailjet module provides a simple wrapper for the Mailjet API, allowing NestJS applications to easily send transactional emails using the Mailjet email delivery service.","bugs":{"url":"https://github.com/adamkac/nestjs-mailjet/issues"},"homepage":"https://github.com/adamkac/nestjs-mailjet#readme","_id":"@adamkac/nestjs-mailjet@2.2.6","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-TbtpxFHOxcF1X1CR7bXri+7WWyVJxRTHXHWjyw9oMmMst0VHVohDL0M5OJyg3LzTUeHiY6m3TzejwFBj/GWhTA==","shasum":"6df7a09fff6cdb12e665f648ddb261e66d1ecd40","tarball":"https://registry.npmjs.org/@adamkac/nestjs-mailjet/-/nestjs-mailjet-2.2.6.tgz","fileCount":40,"unpackedSize":27404,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC5b/EY9Mv4+G5XNPBp1WSqUpe/QbOkGOCAmUKXJ3djmAiAtbr1pNzDbsY6EOYn+hjUPI6f97T2g9fiblakYYghpOw=="}]},"_npmUser":{"name":"adamkac","email":"adaskaczmarzyk@gmail.com"},"directories":{},"maintainers":[{"name":"adamkac","email":"adaskaczmarzyk@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-mailjet_2.2.6_1688555208215_0.4690740072029955"},"_hasShrinkwrap":false},"2.2.7":{"name":"@adamkac/nestjs-mailjet","version":"2.2.7","repository":{"type":"git","url":"git+https://github.com/adamkac/nestjs-mailjet.git"},"description":"Mailjet module for NestJS Framework","license":"MIT","main":"./dist/index.js","scripts":{"clean":"rimraf dist","prebuild":"rimraf dist","build":"nest build","prepare":"husky install","version":"changeset version","release":"changeset publish","lint":"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix","size":"size-limit","size:why":"size-limit --why","format":"prettier --write \"{src,test}/**/*.ts\"","format:staged":"pretty-quick --staged"},"peerDependencies":{"@nestjs/axios":">=1.x.x","@nestjs/common":">=8.x.x","@nestjs/core":">=8.x.x","@nestjs/platform-express":">=8.x.x","@tonightpass/shared-types":">=0.x.x","node-mailjet":">=5.x.x"},"dependencies":{"@nestjs/common":"9.3.9","@nestjs/core":"9.3.9"},"devDependencies":{"@changesets/cli":"^2.26.0","@nestjs/axios":"^2.0.0","@nestjs/platform-express":"9.3.9","@size-limit/preset-small-lib":"^8.1.0","@types/node":"16.10.3","@typescript-eslint/eslint-plugin":"5.0.0","@typescript-eslint/parser":"5.0.0","axios":"^1.3.4","eslint":"8.0.0","eslint-config-prettier":"8.3.0","eslint-plugin-import":"2.25.1","eslint-plugin-prettier":"^4.2.1","husky":"7.0.2","jest":"27.2.5","lint-staged":"11.2.3","markdownlint-cli":"0.29.0","node-mailjet":"6.0.2","prettier":"2.4.1","pretty-quick":"3.1.1","reflect-metadata":"0.1.13","rimraf":"3.0.2","rxjs":"^7.8.0","size-limit":"^8.1.0","tslint":"6.1.3","typescript":"4.4.3"},"engines":{"node":">=10.0.0","npm":">=6.0.0"},"size-limit":[{"path":"dist/index.js","limit":"5 kB"}],"bugs":{"url":"https://github.com/adamkac/nestjs-mailjet/issues"},"homepage":"https://github.com/adamkac/nestjs-mailjet#readme","keywords":["Mailjet","NestJS","Typescript"],"gitHead":"e206fc2b8936142c745f43c85019c613fb72f3a2","_id":"@adamkac/nestjs-mailjet@2.2.7","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-viQ0R1DZ2MbHog730bAhO5/mMK0OEQie/NtqyXb3WAudoLjR2TougSTPKvvqPmUeKQw1afbI2xVAhCNLnP7dVQ==","shasum":"688768deb41267b16413f9429287d844c9a79a8f","tarball":"https://registry.npmjs.org/@adamkac/nestjs-mailjet/-/nestjs-mailjet-2.2.7.tgz","fileCount":24,"unpackedSize":14691,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDh+zUQRF7Mj525iJ27WGPCiSxZo91HrFHrRPlBHSVvgwIhAKAgwg9pYRkb6ATQ+uBojHj8gZ5eW0fChyFw8MCqouEv"}]},"_npmUser":{"name":"adamkac","email":"adaskaczmarzyk@gmail.com"},"directories":{},"maintainers":[{"name":"adamkac","email":"adaskaczmarzyk@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-mailjet_2.2.7_1688556172296_0.6283787259050837"},"_hasShrinkwrap":false},"2.2.9":{"name":"@adamkac/nestjs-mailjet","version":"2.2.9","repository":{"type":"git","url":"https://github.com/adamkac/nestjs-mailjet"},"description":"Mailjet module for NestJS Framework","license":"MIT","main":"./dist/index.js","scripts":{"clean":"rimraf dist","prebuild":"rimraf dist","build":"npx @nestjs/cli build","prepare":"husky install","version":"changeset version","release":"changeset publish","lint":"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix","size":"size-limit","size:why":"size-limit --why","format":"prettier --write \"{src,test}/**/*.ts\"","format:staged":"pretty-quick --staged"},"peerDependencies":{"@nestjs/axios":">=1.x.x","@nestjs/common":">=8.x.x","@nestjs/core":">=8.x.x","@nestjs/platform-express":">=8.x.x","node-mailjet":">=5.x.x"},"dependencies":{"@nestjs/common":"9.3.9","@nestjs/core":"9.3.9"},"devDependencies":{"@changesets/cli":"^2.26.0","@nestjs/axios":"^2.0.0","@nestjs/platform-express":"9.3.9","@size-limit/preset-small-lib":"^8.1.0","@types/node":"16.10.3","@typescript-eslint/eslint-plugin":"5.0.0","@typescript-eslint/parser":"5.0.0","axios":"^1.3.4","eslint":"8.0.0","eslint-config-prettier":"8.3.0","eslint-plugin-import":"2.25.1","eslint-plugin-prettier":"^4.2.1","husky":"7.0.2","jest":"27.2.5","lint-staged":"11.2.3","markdownlint-cli":"0.29.0","node-mailjet":"6.0.2","prettier":"2.4.1","pretty-quick":"3.1.1","reflect-metadata":"0.1.13","rimraf":"3.0.2","rxjs":"^7.8.0","size-limit":"^8.1.0","tslint":"6.1.3","typescript":"4.4.3"},"engines":{"node":">=10.0.0","npm":">=6.0.0"},"size-limit":[{"path":"dist/index.js","limit":"5 kB"}],"bugs":{"url":"https://github.com/adamkac/nestjs-mailjet/issues"},"homepage":"https://github.com/adamkac/nestjs-mailjet#readme","keywords":["Mailjet","NestJS","Typescript"],"_id":"@adamkac/nestjs-mailjet@2.2.9","dist":{"shasum":"9532d8f0f5bbf69f0b32def4cf715d83cf145dc2","integrity":"sha512-icfBMCrJpnACqx40EcYT9fzJ5z4xmcDNG+7NnKITKxg12qMRL0TUEpwHBZbSgfjaQiUVs71X74Cr7hkV9w0dfw==","tarball":"https://registry.npmjs.org/@adamkac/nestjs-mailjet/-/nestjs-mailjet-2.2.9.tgz","fileCount":56,"unpackedSize":23819,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFdmCUpLAbJL5XFRJKpx/DkNwcUQAbOaHTroRf9r58YqAiEAhyS9L3878CqlDtKajAW8AlEg1ls/b4dG3I3T0H6C6Nc="}]},"_npmUser":{"name":"adamkac","email":"adaskaczmarzyk@gmail.com"},"directories":{},"maintainers":[{"name":"adamkac","email":"adaskaczmarzyk@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-mailjet_2.2.9_1688556420090_0.37698244994085495"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-05T10:52:48.246Z","2.2.5":"2023-07-05T10:52:48.490Z","modified":"2023-07-05T11:27:00.444Z","2.2.6":"2023-07-05T11:06:48.408Z","2.2.7":"2023-07-05T11:22:52.479Z","2.2.9":"2023-07-05T11:27:00.284Z"},"maintainers":[{"name":"adamkac","email":"adaskaczmarzyk@gmail.com"}],"description":"Mailjet module for NestJS Framework","homepage":"https://github.com/adamkac/nestjs-mailjet#readme","repository":{"type":"git","url":"https://github.com/adamkac/nestjs-mailjet"},"bugs":{"url":"https://github.com/adamkac/nestjs-mailjet/issues"},"readme":"# Mailjet Module\n\nThe nestjs-mailjet module provides a simple wrapper for the Mailjet API,\nallowing NestJS applications to easily send transactional emails using the\nMailjet email delivery service.\n\n## Installation\n\nYou can install the nestjs-mailjet module using npm:\n\n```bash\nnpm install --save @adamkac/nestjs-mailjet\n````\n\n## Getting Started\n\nTo use the nestjs-mailjet module, you first need to import it into your NestJS\napplication. You can do this by adding the MailjetModule to your app's imports array:\n\n```ts\nimport { MailjetModule } from '@adamkac/nestjs-mailjet';\n\n@Module({\n  imports: [\n    MailjetModule.forRoot({\n      apiKey: 'your_api_key',\n      apiSecret: 'your_api_secret',\n    }),\n  ],\n})\nexport class AppModule {}\n```\n\nThe forRoot method takes an options object with the following properties:\n\n- `apiKey`: The Mailjet API key.\n- `apiSecret`: The Mailjet API secret.\n- `sandboxMode` (optional): A boolean value indicating whether to enable sandbox mode. Default is `false`.\n\nThis module options extends the mailjet `ClientParams` options. You can find more [here](https://www.npmjs.com/package/node-mailjet).\n\n## Injecting the MailjetService\n\nOnce the MailjetModule is imported, you can inject the MailjetService into your controllers or services:\n\n```ts\nimport { Injectable } from '@nestjs/common';\nimport { MailjetService } from '@adamkac/nestjs-mailjet';\n\n@Injectable()\nexport class EmailsService {\n  constructor(private readonly mailjetService: MailjetService) {}\n\n  async sendEmail(data: any) {\n    const { from, to, subject, html, text } = data;\n\n    await this.mailjetService.send({\n      from,\n      to,\n      subject,\n      html,\n      text,\n    });\n  }\n}\n```\n\n\n```ts\nimport { Injectable } from '@nestjs/common';\nimport { MailjetService } from '@adamkac/nestjs-mailjet';\n\n@Injectable()\nexport class EmailsService {\n  constructor(@Inject('MAILER_CLIENT') private readonly mailjetService: MailjetService) {}\n\n  async sendEmail(data: any) {\n    const { from, to, subject, html, text } = data;\n\n    await this.mailjetService.send({\n      from,\n      to,\n      subject,\n      html,\n      text,\n    });\n  }\n}\n```\n\n## Using Templates\n\nYou can also use email templates with the MailjetService by passing a templateId and context:\n\n```ts\nawait this.mailjetService.send({\n  from,\n  to,\n  subject,\n  context: {\n    templateId: 12345,\n    name: 'John Doe',\n    orderNumber: 12345,\n  },\n});\n```\n\n## API\n\nThe MailjetService provides a single method for sending email:\n\n### send\n\n```ts\nsend(params: SendEmailParams): Promise<any>\n````\n\nSends an email using the Mailjet API.\n\n| Property | Type | Description |\n| --- | --- | --- |\n| `params` | `SendEmailParams` | The email parameters. |\n\nThe SendEmailParams interface has the following properties:\n\n```ts\ninterface SendEmailParams {\n  from: string;\n  to: string | string[];\n  subject?: string;\n  html?: string;\n  text?: string;\n  context?: Record<string, any> & {\n    templateId?: number;\n  };\n}\n```\n","readmeFilename":"README.md","keywords":["Mailjet","NestJS","Typescript"],"license":"MIT"}