resend 6.38.0 → 6.38.1
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.cjs +5 -2
- package/dist/index.mjs +5 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -57,7 +57,7 @@ const MOVE_THREAD_FOLDERS = [
|
|
|
57
57
|
];
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region package.json
|
|
60
|
-
var version = "6.38.
|
|
60
|
+
var version = "6.38.1";
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region src/common/utils/build-pagination-query.ts
|
|
63
63
|
function buildPaginationUrl(base, options) {
|
|
@@ -643,6 +643,9 @@ var ContactTopics = class {
|
|
|
643
643
|
};
|
|
644
644
|
//#endregion
|
|
645
645
|
//#region src/contacts/contacts.ts
|
|
646
|
+
function isLegacyCreateContactOptions(payload) {
|
|
647
|
+
return "audienceId" in payload && Boolean(payload.audienceId);
|
|
648
|
+
}
|
|
646
649
|
var Contacts = class {
|
|
647
650
|
constructor(resend) {
|
|
648
651
|
this.resend = resend;
|
|
@@ -651,7 +654,7 @@ var Contacts = class {
|
|
|
651
654
|
this.segments = new ContactSegments(this.resend);
|
|
652
655
|
}
|
|
653
656
|
async create(payload, requestOptions = {}) {
|
|
654
|
-
if (
|
|
657
|
+
if (isLegacyCreateContactOptions(payload)) {
|
|
655
658
|
if ("segments" in payload || "topics" in payload) return {
|
|
656
659
|
data: null,
|
|
657
660
|
headers: null,
|
package/dist/index.mjs
CHANGED
|
@@ -33,7 +33,7 @@ const MOVE_THREAD_FOLDERS = [
|
|
|
33
33
|
];
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region package.json
|
|
36
|
-
var version = "6.38.
|
|
36
|
+
var version = "6.38.1";
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/common/utils/build-pagination-query.ts
|
|
39
39
|
function buildPaginationUrl(base, options) {
|
|
@@ -619,6 +619,9 @@ var ContactTopics = class {
|
|
|
619
619
|
};
|
|
620
620
|
//#endregion
|
|
621
621
|
//#region src/contacts/contacts.ts
|
|
622
|
+
function isLegacyCreateContactOptions(payload) {
|
|
623
|
+
return "audienceId" in payload && Boolean(payload.audienceId);
|
|
624
|
+
}
|
|
622
625
|
var Contacts = class {
|
|
623
626
|
constructor(resend) {
|
|
624
627
|
this.resend = resend;
|
|
@@ -627,7 +630,7 @@ var Contacts = class {
|
|
|
627
630
|
this.segments = new ContactSegments(this.resend);
|
|
628
631
|
}
|
|
629
632
|
async create(payload, requestOptions = {}) {
|
|
630
|
-
if (
|
|
633
|
+
if (isLegacyCreateContactOptions(payload)) {
|
|
631
634
|
if ("segments" in payload || "topics" in payload) return {
|
|
632
635
|
data: null,
|
|
633
636
|
headers: null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resend",
|
|
3
|
-
"version": "6.38.
|
|
3
|
+
"version": "6.38.1",
|
|
4
4
|
"description": "Node.js library for the Resend API",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"vitest": "4.1.12",
|
|
84
84
|
"vitest-fetch-mock": "0.4.5"
|
|
85
85
|
},
|
|
86
|
-
"packageManager": "pnpm@
|
|
86
|
+
"packageManager": "pnpm@12.18.0"
|
|
87
87
|
}
|