@payloadcms/email-resend 3.0.0-alpha.66
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/LICENSE.md +22 -0
- package/README.md +30 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +98 -0
- package/dist/index.js.map +1 -0
- package/package.json +47 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018-2022 Payload CMS, LLC <info@payloadcms.com>
|
|
4
|
+
Portions Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Resend REST Email Adapter
|
|
2
|
+
|
|
3
|
+
This adapter allows you to send emails using the [Resend](https://resend.com) REST API.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add @payloadcms/email-resend`
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
- Sign up for a [Resend](https://resend.com) account
|
|
14
|
+
- Set up a domain
|
|
15
|
+
- Create an API key
|
|
16
|
+
- Set API key as RESEND_API_KEY environment variable
|
|
17
|
+
- Configure your Payload config
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
// payload.config.js
|
|
21
|
+
import { resendAdapter } from '@payloadcms/email-resend'
|
|
22
|
+
|
|
23
|
+
export default buildConfig({
|
|
24
|
+
email: resendAdapter({
|
|
25
|
+
defaultFromAddress: 'dev@payloadcms.com',
|
|
26
|
+
defaultFromName: 'Payload CMS',
|
|
27
|
+
apiKey: process.env.RESEND_API_KEY || '',
|
|
28
|
+
}),
|
|
29
|
+
})
|
|
30
|
+
```
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { EmailAdapter } from 'payload/config';
|
|
2
|
+
export type ResendAdapterArgs = {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
defaultFromAddress: string;
|
|
5
|
+
defaultFromName: string;
|
|
6
|
+
};
|
|
7
|
+
type ResendAdapter = EmailAdapter<ResendResponse>;
|
|
8
|
+
type ResendError = {
|
|
9
|
+
message: string;
|
|
10
|
+
name: string;
|
|
11
|
+
statusCode: number;
|
|
12
|
+
};
|
|
13
|
+
type ResendResponse = {
|
|
14
|
+
id: string;
|
|
15
|
+
} | ResendError;
|
|
16
|
+
/**
|
|
17
|
+
* Email adapter for [Resend](https://resend.com) REST API
|
|
18
|
+
*/
|
|
19
|
+
export declare const resendAdapter: (args: ResendAdapterArgs) => ResendAdapter;
|
|
20
|
+
export type Tag = {
|
|
21
|
+
/**
|
|
22
|
+
* The name of the email tag. It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-). It can contain no more than 256 characters.
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
/**
|
|
26
|
+
* The value of the email tag. It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-). It can contain no more than 256 characters.
|
|
27
|
+
*/
|
|
28
|
+
value: string;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAKlD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,kBAAkB,EAAE,MAAM,CAAA;IAC1B,eAAe,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,KAAK,aAAa,GAAG,YAAY,CAAC,cAAc,CAAC,CAAA;AAEjD,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,KAAK,cAAc,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,CAAA;AAElD;;GAEG;AACH,eAAO,MAAM,aAAa,SAAU,iBAAiB,KAAG,aAyCvD,CAAA;AAqKD,MAAM,MAAM,GAAG,GAAG;IAChB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { APIError } from 'payload/errors';
|
|
2
|
+
/**
|
|
3
|
+
* Email adapter for [Resend](https://resend.com) REST API
|
|
4
|
+
*/ export const resendAdapter = (args)=>{
|
|
5
|
+
const { apiKey, defaultFromAddress, defaultFromName } = args;
|
|
6
|
+
const adapter = ()=>({
|
|
7
|
+
name: 'resend-rest',
|
|
8
|
+
defaultFromAddress,
|
|
9
|
+
defaultFromName,
|
|
10
|
+
sendEmail: async (message)=>{
|
|
11
|
+
// Map the Payload email options to Resend email options
|
|
12
|
+
const sendEmailOptions = mapPayloadEmailToResendEmail(message, defaultFromAddress, defaultFromName);
|
|
13
|
+
const res = await fetch('https://api.resend.com/emails', {
|
|
14
|
+
body: JSON.stringify(sendEmailOptions),
|
|
15
|
+
headers: {
|
|
16
|
+
Authorization: `Bearer ${apiKey}`,
|
|
17
|
+
'Content-Type': 'application/json'
|
|
18
|
+
},
|
|
19
|
+
method: 'POST'
|
|
20
|
+
});
|
|
21
|
+
const data = await res.json();
|
|
22
|
+
if ('id' in data) {
|
|
23
|
+
return data;
|
|
24
|
+
} else {
|
|
25
|
+
const statusCode = data.statusCode || res.status;
|
|
26
|
+
let formattedError = `Error sending email: ${statusCode}`;
|
|
27
|
+
if (data.name && data.message) {
|
|
28
|
+
formattedError += ` ${data.name} - ${data.message}`;
|
|
29
|
+
}
|
|
30
|
+
throw new APIError(formattedError, statusCode);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return adapter;
|
|
35
|
+
};
|
|
36
|
+
function mapPayloadEmailToResendEmail(message, defaultFromAddress, defaultFromName) {
|
|
37
|
+
return {
|
|
38
|
+
// Required
|
|
39
|
+
from: mapFromAddress(message.from, defaultFromName, defaultFromAddress),
|
|
40
|
+
subject: message.subject ?? '',
|
|
41
|
+
to: mapAddresses(message.to),
|
|
42
|
+
// Other To fields
|
|
43
|
+
bcc: mapAddresses(message.bcc),
|
|
44
|
+
cc: mapAddresses(message.cc),
|
|
45
|
+
// Optional
|
|
46
|
+
attachments: mapAttachments(message.attachments),
|
|
47
|
+
html: message.html?.toString() || '',
|
|
48
|
+
text: message.text?.toString() || ''
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function mapFromAddress(address, defaultFromName, defaultFromAddress) {
|
|
52
|
+
if (!address) {
|
|
53
|
+
return `${defaultFromName} <${defaultFromAddress}>`;
|
|
54
|
+
}
|
|
55
|
+
if (typeof address === 'string') {
|
|
56
|
+
return address;
|
|
57
|
+
}
|
|
58
|
+
return `${address.name} <${address.address}>`;
|
|
59
|
+
}
|
|
60
|
+
function mapAddresses(addresses) {
|
|
61
|
+
if (!addresses) {
|
|
62
|
+
return '';
|
|
63
|
+
}
|
|
64
|
+
if (typeof addresses === 'string') {
|
|
65
|
+
return addresses;
|
|
66
|
+
}
|
|
67
|
+
if (Array.isArray(addresses)) {
|
|
68
|
+
return addresses.map((address)=>typeof address === 'string' ? address : address.address);
|
|
69
|
+
}
|
|
70
|
+
return [
|
|
71
|
+
addresses.address
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
function mapAttachments(attachments) {
|
|
75
|
+
if (!attachments) {
|
|
76
|
+
return [];
|
|
77
|
+
}
|
|
78
|
+
return attachments.map((attachment)=>{
|
|
79
|
+
if (!attachment.filename || !attachment.content) {
|
|
80
|
+
throw new APIError('Attachment is missing filename or content', 400);
|
|
81
|
+
}
|
|
82
|
+
if (typeof attachment.content === 'string') {
|
|
83
|
+
return {
|
|
84
|
+
content: Buffer.from(attachment.content),
|
|
85
|
+
filename: attachment.filename
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
if (attachment.content instanceof Buffer) {
|
|
89
|
+
return {
|
|
90
|
+
content: attachment.content,
|
|
91
|
+
filename: attachment.filename
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
throw new APIError('Attachment content must be a string or a buffer', 400);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { EmailAdapter } from 'payload/config'\nimport type { SendEmailOptions } from 'payload/types'\n\nimport { APIError } from 'payload/errors'\n\nexport type ResendAdapterArgs = {\n apiKey: string\n defaultFromAddress: string\n defaultFromName: string\n}\n\ntype ResendAdapter = EmailAdapter<ResendResponse>\n\ntype ResendError = {\n message: string\n name: string\n statusCode: number\n}\n\ntype ResendResponse = { id: string } | ResendError\n\n/**\n * Email adapter for [Resend](https://resend.com) REST API\n */\nexport const resendAdapter = (args: ResendAdapterArgs): ResendAdapter => {\n const { apiKey, defaultFromAddress, defaultFromName } = args\n\n const adapter: ResendAdapter = () => ({\n name: 'resend-rest',\n defaultFromAddress,\n defaultFromName,\n sendEmail: async (message) => {\n // Map the Payload email options to Resend email options\n const sendEmailOptions = mapPayloadEmailToResendEmail(\n message,\n defaultFromAddress,\n defaultFromName,\n )\n\n const res = await fetch('https://api.resend.com/emails', {\n body: JSON.stringify(sendEmailOptions),\n headers: {\n Authorization: `Bearer ${apiKey}`,\n 'Content-Type': 'application/json',\n },\n method: 'POST',\n })\n\n const data = (await res.json()) as ResendResponse\n\n if ('id' in data) {\n return data\n } else {\n const statusCode = data.statusCode || res.status\n let formattedError = `Error sending email: ${statusCode}`\n if (data.name && data.message) {\n formattedError += ` ${data.name} - ${data.message}`\n }\n\n throw new APIError(formattedError, statusCode)\n }\n },\n })\n\n return adapter\n}\n\nfunction mapPayloadEmailToResendEmail(\n message: SendEmailOptions,\n defaultFromAddress: string,\n defaultFromName: string,\n): ResendSendEmailOptions {\n return {\n // Required\n from: mapFromAddress(message.from, defaultFromName, defaultFromAddress),\n subject: message.subject ?? '',\n to: mapAddresses(message.to),\n\n // Other To fields\n bcc: mapAddresses(message.bcc),\n cc: mapAddresses(message.cc),\n\n // Optional\n attachments: mapAttachments(message.attachments),\n html: message.html?.toString() || '',\n text: message.text?.toString() || '',\n } as ResendSendEmailOptions\n}\n\nfunction mapFromAddress(\n address: SendEmailOptions['from'],\n defaultFromName: string,\n defaultFromAddress: string,\n): ResendSendEmailOptions['from'] {\n if (!address) {\n return `${defaultFromName} <${defaultFromAddress}>`\n }\n\n if (typeof address === 'string') {\n return address\n }\n\n return `${address.name} <${address.address}>`\n}\n\nfunction mapAddresses(addresses: SendEmailOptions['to']): ResendSendEmailOptions['to'] {\n if (!addresses) {\n return ''\n }\n\n if (typeof addresses === 'string') {\n return addresses\n }\n\n if (Array.isArray(addresses)) {\n return addresses.map((address) => (typeof address === 'string' ? address : address.address))\n }\n\n return [addresses.address]\n}\n\nfunction mapAttachments(\n attachments: SendEmailOptions['attachments'],\n): ResendSendEmailOptions['attachments'] {\n if (!attachments) {\n return []\n }\n\n return attachments.map((attachment) => {\n if (!attachment.filename || !attachment.content) {\n throw new APIError('Attachment is missing filename or content', 400)\n }\n\n if (typeof attachment.content === 'string') {\n return {\n content: Buffer.from(attachment.content),\n filename: attachment.filename,\n }\n }\n\n if (attachment.content instanceof Buffer) {\n return {\n content: attachment.content,\n filename: attachment.filename,\n }\n }\n\n throw new APIError('Attachment content must be a string or a buffer', 400)\n })\n}\n\ntype ResendSendEmailOptions = {\n /**\n * Filename and content of attachments (max 40mb per email)\n *\n * @link https://resend.com/docs/api-reference/emails/send-email#body-parameters\n */\n attachments?: Attachment[]\n /**\n * Blind carbon copy recipient email address. For multiple addresses, send as an array of strings.\n *\n * @link https://resend.com/docs/api-reference/emails/send-email#body-parameters\n */\n bcc?: string | string[]\n\n /**\n * Carbon copy recipient email address. For multiple addresses, send as an array of strings.\n *\n * @link https://resend.com/docs/api-reference/emails/send-email#body-parameters\n */\n cc?: string | string[]\n /**\n * Sender email address. To include a friendly name, use the format `\"Your Name <sender@domain.com>\"`\n *\n * @link https://resend.com/docs/api-reference/emails/send-email#body-parameters\n */\n from: string\n /**\n * Custom headers to add to the email.\n *\n * @link https://resend.com/docs/api-reference/emails/send-email#body-parameters\n */\n headers?: Record<string, string>\n /**\n * The HTML version of the message.\n *\n * @link https://resend.com/api-reference/emails/send-email#body-parameters\n */\n html?: string\n /**\n * Reply-to email address. For multiple addresses, send as an array of strings.\n *\n * @link https://resend.com/docs/api-reference/emails/send-email#body-parameters\n */\n reply_to?: string | string[]\n /**\n * Email subject.\n *\n * @link https://resend.com/docs/api-reference/emails/send-email#body-parameters\n */\n subject: string\n /**\n * Email tags\n *\n * @link https://resend.com/docs/api-reference/emails/send-email#body-parameters\n */\n tags?: Tag[]\n /**\n * The plain text version of the message.\n *\n * @link https://resend.com/api-reference/emails/send-email#body-parameters\n */\n text?: string\n /**\n * Recipient email address. For multiple addresses, send as an array of strings. Max 50.\n *\n * @link https://resend.com/docs/api-reference/emails/send-email#body-parameters\n */\n to: string | string[]\n}\n\ntype Attachment = {\n /** Content of an attached file. */\n content?: Buffer | string\n /** Name of attached file. */\n filename?: false | string | undefined\n /** Path where the attachment file is hosted */\n path?: string\n}\n\nexport type Tag = {\n /**\n * The name of the email tag. It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-). It can contain no more than 256 characters.\n */\n name: string\n /**\n * The value of the email tag. It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-). It can contain no more than 256 characters.\n */\n value: string\n}\n"],"names":["APIError","resendAdapter","args","apiKey","defaultFromAddress","defaultFromName","adapter","name","sendEmail","message","sendEmailOptions","mapPayloadEmailToResendEmail","res","fetch","body","JSON","stringify","headers","Authorization","method","data","json","statusCode","status","formattedError","from","mapFromAddress","subject","to","mapAddresses","bcc","cc","attachments","mapAttachments","html","toString","text","address","addresses","Array","isArray","map","attachment","filename","content","Buffer"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,QAAQ,QAAQ,iBAAgB;AAkBzC;;CAEC,GACD,OAAO,MAAMC,gBAAgB,CAACC;IAC5B,MAAM,EAAEC,MAAM,EAAEC,kBAAkB,EAAEC,eAAe,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": "3.0.0-alpha.66",
|
|
4
|
+
"description": "Payload Resend Email Adapter",
|
|
5
|
+
"homepage": "https://payloadcms.com",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/payloadcms/payload.git",
|
|
9
|
+
"directory": "packages/email-resend"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "Payload CMS, Inc.",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"require": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/jest": "29.5.12",
|
|
28
|
+
"jest": "^29.7.0",
|
|
29
|
+
"payload": "3.0.0-alpha.66"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"payload": "3.0.0-alpha.66"
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=18.20.2"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"registry": "https://registry.npmjs.org/"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "pnpm build:swc && pnpm build:types",
|
|
42
|
+
"build:swc": "swc ./src -d ./dist --config-file .swcrc-build",
|
|
43
|
+
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
|
44
|
+
"clean": "rimraf {dist,*.tsbuildinfo}",
|
|
45
|
+
"test": "jest"
|
|
46
|
+
}
|
|
47
|
+
}
|