resend 4.7.0 → 4.8.0
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/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +11 -2
- package/dist/index.mjs +11 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -276,6 +276,11 @@ interface Attachment {
|
|
|
276
276
|
path?: string;
|
|
277
277
|
/** Optional content type for the attachment, if not set will be derived from the filename property */
|
|
278
278
|
contentType?: string;
|
|
279
|
+
/**
|
|
280
|
+
* Optional content ID for the attachment, to be used as a reference in the HTML content.
|
|
281
|
+
* If set, this attachment will be sent as an inline attachment and you can reference it in the HTML content using the `cid:` prefix.
|
|
282
|
+
*/
|
|
283
|
+
inlineContentId?: string;
|
|
279
284
|
}
|
|
280
285
|
type Tag = {
|
|
281
286
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -276,6 +276,11 @@ interface Attachment {
|
|
|
276
276
|
path?: string;
|
|
277
277
|
/** Optional content type for the attachment, if not set will be derived from the filename property */
|
|
278
278
|
contentType?: string;
|
|
279
|
+
/**
|
|
280
|
+
* Optional content ID for the attachment, to be used as a reference in the HTML content.
|
|
281
|
+
* If set, this attachment will be sent as an inline attachment and you can reference it in the HTML content using the `cid:` prefix.
|
|
282
|
+
*/
|
|
283
|
+
inlineContentId?: string;
|
|
279
284
|
}
|
|
280
285
|
type Tag = {
|
|
281
286
|
/**
|
package/dist/index.js
CHANGED
|
@@ -72,7 +72,7 @@ __export(src_exports, {
|
|
|
72
72
|
module.exports = __toCommonJS(src_exports);
|
|
73
73
|
|
|
74
74
|
// package.json
|
|
75
|
-
var version = "4.
|
|
75
|
+
var version = "4.8.0";
|
|
76
76
|
|
|
77
77
|
// src/api-keys/api-keys.ts
|
|
78
78
|
var ApiKeys = class {
|
|
@@ -145,9 +145,18 @@ var Audiences = class {
|
|
|
145
145
|
};
|
|
146
146
|
|
|
147
147
|
// src/common/utils/parse-email-to-api-options.ts
|
|
148
|
+
function parseAttachments(attachments) {
|
|
149
|
+
return attachments == null ? void 0 : attachments.map((attachment) => ({
|
|
150
|
+
content: attachment.content,
|
|
151
|
+
filename: attachment.filename,
|
|
152
|
+
path: attachment.path,
|
|
153
|
+
content_type: attachment.contentType,
|
|
154
|
+
inline_content_id: attachment.inlineContentId
|
|
155
|
+
}));
|
|
156
|
+
}
|
|
148
157
|
function parseEmailToApiOptions(email) {
|
|
149
158
|
return {
|
|
150
|
-
attachments: email.attachments,
|
|
159
|
+
attachments: parseAttachments(email.attachments),
|
|
151
160
|
bcc: email.bcc,
|
|
152
161
|
cc: email.cc,
|
|
153
162
|
from: email.from,
|
package/dist/index.mjs
CHANGED
|
@@ -39,7 +39,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
// package.json
|
|
42
|
-
var version = "4.
|
|
42
|
+
var version = "4.8.0";
|
|
43
43
|
|
|
44
44
|
// src/api-keys/api-keys.ts
|
|
45
45
|
var ApiKeys = class {
|
|
@@ -112,9 +112,18 @@ var Audiences = class {
|
|
|
112
112
|
};
|
|
113
113
|
|
|
114
114
|
// src/common/utils/parse-email-to-api-options.ts
|
|
115
|
+
function parseAttachments(attachments) {
|
|
116
|
+
return attachments == null ? void 0 : attachments.map((attachment) => ({
|
|
117
|
+
content: attachment.content,
|
|
118
|
+
filename: attachment.filename,
|
|
119
|
+
path: attachment.path,
|
|
120
|
+
content_type: attachment.contentType,
|
|
121
|
+
inline_content_id: attachment.inlineContentId
|
|
122
|
+
}));
|
|
123
|
+
}
|
|
115
124
|
function parseEmailToApiOptions(email) {
|
|
116
125
|
return {
|
|
117
|
-
attachments: email.attachments,
|
|
126
|
+
attachments: parseAttachments(email.attachments),
|
|
118
127
|
bcc: email.bcc,
|
|
119
128
|
cc: email.cc,
|
|
120
129
|
from: email.from,
|