resend 6.2.0 → 6.2.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.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +7 -1
- package/dist/index.mjs +7 -1
- package/package.json +11 -13
package/dist/index.d.mts
CHANGED
|
@@ -32,10 +32,11 @@ declare const RESEND_ERROR_CODES_BY_KEY: {
|
|
|
32
32
|
readonly internal_server_error: 500;
|
|
33
33
|
};
|
|
34
34
|
type RESEND_ERROR_CODE_KEY = keyof typeof RESEND_ERROR_CODES_BY_KEY;
|
|
35
|
-
|
|
35
|
+
type ErrorResponse = {
|
|
36
36
|
message: string;
|
|
37
|
+
statusCode: number | null;
|
|
37
38
|
name: RESEND_ERROR_CODE_KEY;
|
|
38
|
-
}
|
|
39
|
+
};
|
|
39
40
|
type Tag$1 = {
|
|
40
41
|
name: string;
|
|
41
42
|
value: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -32,10 +32,11 @@ declare const RESEND_ERROR_CODES_BY_KEY: {
|
|
|
32
32
|
readonly internal_server_error: 500;
|
|
33
33
|
};
|
|
34
34
|
type RESEND_ERROR_CODE_KEY = keyof typeof RESEND_ERROR_CODES_BY_KEY;
|
|
35
|
-
|
|
35
|
+
type ErrorResponse = {
|
|
36
36
|
message: string;
|
|
37
|
+
statusCode: number | null;
|
|
37
38
|
name: RESEND_ERROR_CODE_KEY;
|
|
38
|
-
}
|
|
39
|
+
};
|
|
39
40
|
type Tag$1 = {
|
|
40
41
|
name: string;
|
|
41
42
|
value: string;
|
package/dist/index.js
CHANGED
|
@@ -84,7 +84,7 @@ __export(index_exports, {
|
|
|
84
84
|
module.exports = __toCommonJS(index_exports);
|
|
85
85
|
|
|
86
86
|
// package.json
|
|
87
|
-
var version = "6.2.
|
|
87
|
+
var version = "6.2.1";
|
|
88
88
|
|
|
89
89
|
// src/common/utils/build-pagination-query.ts
|
|
90
90
|
function buildPaginationQuery(options) {
|
|
@@ -371,6 +371,7 @@ var Contacts = class {
|
|
|
371
371
|
data: null,
|
|
372
372
|
error: {
|
|
373
373
|
message: "Missing `id` or `email` field.",
|
|
374
|
+
statusCode: null,
|
|
374
375
|
name: "missing_required_field"
|
|
375
376
|
}
|
|
376
377
|
};
|
|
@@ -388,6 +389,7 @@ var Contacts = class {
|
|
|
388
389
|
data: null,
|
|
389
390
|
error: {
|
|
390
391
|
message: "Missing `id` or `email` field.",
|
|
392
|
+
statusCode: null,
|
|
391
393
|
name: "missing_required_field"
|
|
392
394
|
}
|
|
393
395
|
};
|
|
@@ -410,6 +412,7 @@ var Contacts = class {
|
|
|
410
412
|
data: null,
|
|
411
413
|
error: {
|
|
412
414
|
message: "Missing `id` or `email` field.",
|
|
415
|
+
statusCode: null,
|
|
413
416
|
name: "missing_required_field"
|
|
414
417
|
}
|
|
415
418
|
};
|
|
@@ -612,12 +615,14 @@ var Resend = class {
|
|
|
612
615
|
data: null,
|
|
613
616
|
error: {
|
|
614
617
|
name: "application_error",
|
|
618
|
+
statusCode: response.status,
|
|
615
619
|
message: "Internal server error. We are unable to process your request right now, please try again later."
|
|
616
620
|
}
|
|
617
621
|
};
|
|
618
622
|
}
|
|
619
623
|
const error = {
|
|
620
624
|
message: response.statusText,
|
|
625
|
+
statusCode: response.status,
|
|
621
626
|
name: "application_error"
|
|
622
627
|
};
|
|
623
628
|
if (err instanceof Error) {
|
|
@@ -633,6 +638,7 @@ var Resend = class {
|
|
|
633
638
|
data: null,
|
|
634
639
|
error: {
|
|
635
640
|
name: "application_error",
|
|
641
|
+
statusCode: null,
|
|
636
642
|
message: "Unable to fetch data. The request could not be resolved."
|
|
637
643
|
}
|
|
638
644
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -51,7 +51,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
// package.json
|
|
54
|
-
var version = "6.2.
|
|
54
|
+
var version = "6.2.1";
|
|
55
55
|
|
|
56
56
|
// src/common/utils/build-pagination-query.ts
|
|
57
57
|
function buildPaginationQuery(options) {
|
|
@@ -338,6 +338,7 @@ var Contacts = class {
|
|
|
338
338
|
data: null,
|
|
339
339
|
error: {
|
|
340
340
|
message: "Missing `id` or `email` field.",
|
|
341
|
+
statusCode: null,
|
|
341
342
|
name: "missing_required_field"
|
|
342
343
|
}
|
|
343
344
|
};
|
|
@@ -355,6 +356,7 @@ var Contacts = class {
|
|
|
355
356
|
data: null,
|
|
356
357
|
error: {
|
|
357
358
|
message: "Missing `id` or `email` field.",
|
|
359
|
+
statusCode: null,
|
|
358
360
|
name: "missing_required_field"
|
|
359
361
|
}
|
|
360
362
|
};
|
|
@@ -377,6 +379,7 @@ var Contacts = class {
|
|
|
377
379
|
data: null,
|
|
378
380
|
error: {
|
|
379
381
|
message: "Missing `id` or `email` field.",
|
|
382
|
+
statusCode: null,
|
|
380
383
|
name: "missing_required_field"
|
|
381
384
|
}
|
|
382
385
|
};
|
|
@@ -579,12 +582,14 @@ var Resend = class {
|
|
|
579
582
|
data: null,
|
|
580
583
|
error: {
|
|
581
584
|
name: "application_error",
|
|
585
|
+
statusCode: response.status,
|
|
582
586
|
message: "Internal server error. We are unable to process your request right now, please try again later."
|
|
583
587
|
}
|
|
584
588
|
};
|
|
585
589
|
}
|
|
586
590
|
const error = {
|
|
587
591
|
message: response.statusText,
|
|
592
|
+
statusCode: response.status,
|
|
588
593
|
name: "application_error"
|
|
589
594
|
};
|
|
590
595
|
if (err instanceof Error) {
|
|
@@ -600,6 +605,7 @@ var Resend = class {
|
|
|
600
605
|
data: null,
|
|
601
606
|
error: {
|
|
602
607
|
name: "application_error",
|
|
608
|
+
statusCode: null,
|
|
603
609
|
message: "Unable to fetch data. The request could not be resolved."
|
|
604
610
|
}
|
|
605
611
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resend",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.1",
|
|
4
4
|
"description": "Node.js library for the Resend API",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -23,16 +23,6 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
"scripts": {
|
|
27
|
-
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
28
|
-
"format": "biome format --write .",
|
|
29
|
-
"format:apply": "biome check --write .",
|
|
30
|
-
"format:check": "biome format .",
|
|
31
|
-
"lint": "biome check .",
|
|
32
|
-
"prepublishOnly": "pnpm run build",
|
|
33
|
-
"test": "vitest run",
|
|
34
|
-
"test:watch": "vitest"
|
|
35
|
-
},
|
|
36
26
|
"repository": {
|
|
37
27
|
"type": "git",
|
|
38
28
|
"url": "git+https://github.com/resendlabs/resend-node.git"
|
|
@@ -64,5 +54,13 @@
|
|
|
64
54
|
"vitest": "3.2.4",
|
|
65
55
|
"vitest-fetch-mock": "0.4.5"
|
|
66
56
|
},
|
|
67
|
-
"
|
|
68
|
-
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
59
|
+
"format": "biome format --write .",
|
|
60
|
+
"format:apply": "biome check --write .",
|
|
61
|
+
"format:check": "biome format .",
|
|
62
|
+
"lint": "biome check .",
|
|
63
|
+
"test": "vitest run",
|
|
64
|
+
"test:watch": "vitest"
|
|
65
|
+
}
|
|
66
|
+
}
|