resend 6.5.0 → 6.5.2
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 +1 -1
- package/dist/index.d.cts +11 -24
- package/dist/index.d.mts +11 -24
- package/dist/index.mjs +1 -1
- package/package.json +14 -18
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -66,26 +66,7 @@ interface DomainApiOptions {
|
|
|
66
66
|
}
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/interfaces.d.ts
|
|
69
|
-
|
|
70
|
-
readonly missing_required_field: 422;
|
|
71
|
-
readonly invalid_idempotency_key: 400;
|
|
72
|
-
readonly invalid_idempotent_request: 409;
|
|
73
|
-
readonly concurrent_idempotent_requests: 409;
|
|
74
|
-
readonly invalid_access: 422;
|
|
75
|
-
readonly invalid_parameter: 422;
|
|
76
|
-
readonly invalid_region: 422;
|
|
77
|
-
readonly rate_limit_exceeded: 429;
|
|
78
|
-
readonly missing_api_key: 401;
|
|
79
|
-
readonly invalid_api_key: 403;
|
|
80
|
-
readonly suspended_api_key: 403;
|
|
81
|
-
readonly invalid_from_address: 403;
|
|
82
|
-
readonly validation_error: 403;
|
|
83
|
-
readonly not_found: 404;
|
|
84
|
-
readonly method_not_allowed: 405;
|
|
85
|
-
readonly application_error: 500;
|
|
86
|
-
readonly internal_server_error: 500;
|
|
87
|
-
};
|
|
88
|
-
type RESEND_ERROR_CODE_KEY = keyof typeof RESEND_ERROR_CODES_BY_KEY;
|
|
69
|
+
type RESEND_ERROR_CODE_KEY = 'missing_required_field' | 'invalid_idempotency_key' | 'invalid_idempotent_request' | 'concurrent_idempotent_requests' | 'invalid_access' | 'invalid_parameter' | 'invalid_region' | 'rate_limit_exceeded' | 'missing_api_key' | 'invalid_api_key' | 'suspended_api_key' | 'invalid_from_address' | 'validation_error' | 'not_found' | 'method_not_allowed' | 'application_error' | 'internal_server_error';
|
|
89
70
|
type Response<T> = ({
|
|
90
71
|
data: T;
|
|
91
72
|
error: null;
|
|
@@ -563,8 +544,8 @@ interface Contact {
|
|
|
563
544
|
created_at: string;
|
|
564
545
|
id: string;
|
|
565
546
|
email: string;
|
|
566
|
-
first_name
|
|
567
|
-
last_name
|
|
547
|
+
first_name: string | null;
|
|
548
|
+
last_name: string | null;
|
|
568
549
|
unsubscribed: boolean;
|
|
569
550
|
}
|
|
570
551
|
type SelectingField = {
|
|
@@ -666,8 +647,14 @@ interface UpdateContactPropertiesOptions {
|
|
|
666
647
|
type UpdateContactOptions = {
|
|
667
648
|
audienceId?: string;
|
|
668
649
|
unsubscribed?: boolean;
|
|
669
|
-
|
|
670
|
-
|
|
650
|
+
/**
|
|
651
|
+
* Use `null` to clear the `firstName`
|
|
652
|
+
*/
|
|
653
|
+
firstName?: string | null;
|
|
654
|
+
/**
|
|
655
|
+
* Use `null` to clear the `lastName`
|
|
656
|
+
*/
|
|
657
|
+
lastName?: string | null;
|
|
671
658
|
properties?: UpdateContactPropertiesOptions;
|
|
672
659
|
} & SelectingField;
|
|
673
660
|
type UpdateContactResponseSuccess = Pick<Contact, 'id'> & {
|
package/dist/index.d.mts
CHANGED
|
@@ -66,26 +66,7 @@ interface DomainApiOptions {
|
|
|
66
66
|
}
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/interfaces.d.ts
|
|
69
|
-
|
|
70
|
-
readonly missing_required_field: 422;
|
|
71
|
-
readonly invalid_idempotency_key: 400;
|
|
72
|
-
readonly invalid_idempotent_request: 409;
|
|
73
|
-
readonly concurrent_idempotent_requests: 409;
|
|
74
|
-
readonly invalid_access: 422;
|
|
75
|
-
readonly invalid_parameter: 422;
|
|
76
|
-
readonly invalid_region: 422;
|
|
77
|
-
readonly rate_limit_exceeded: 429;
|
|
78
|
-
readonly missing_api_key: 401;
|
|
79
|
-
readonly invalid_api_key: 403;
|
|
80
|
-
readonly suspended_api_key: 403;
|
|
81
|
-
readonly invalid_from_address: 403;
|
|
82
|
-
readonly validation_error: 403;
|
|
83
|
-
readonly not_found: 404;
|
|
84
|
-
readonly method_not_allowed: 405;
|
|
85
|
-
readonly application_error: 500;
|
|
86
|
-
readonly internal_server_error: 500;
|
|
87
|
-
};
|
|
88
|
-
type RESEND_ERROR_CODE_KEY = keyof typeof RESEND_ERROR_CODES_BY_KEY;
|
|
69
|
+
type RESEND_ERROR_CODE_KEY = 'missing_required_field' | 'invalid_idempotency_key' | 'invalid_idempotent_request' | 'concurrent_idempotent_requests' | 'invalid_access' | 'invalid_parameter' | 'invalid_region' | 'rate_limit_exceeded' | 'missing_api_key' | 'invalid_api_key' | 'suspended_api_key' | 'invalid_from_address' | 'validation_error' | 'not_found' | 'method_not_allowed' | 'application_error' | 'internal_server_error';
|
|
89
70
|
type Response<T> = ({
|
|
90
71
|
data: T;
|
|
91
72
|
error: null;
|
|
@@ -563,8 +544,8 @@ interface Contact {
|
|
|
563
544
|
created_at: string;
|
|
564
545
|
id: string;
|
|
565
546
|
email: string;
|
|
566
|
-
first_name
|
|
567
|
-
last_name
|
|
547
|
+
first_name: string | null;
|
|
548
|
+
last_name: string | null;
|
|
568
549
|
unsubscribed: boolean;
|
|
569
550
|
}
|
|
570
551
|
type SelectingField = {
|
|
@@ -666,8 +647,14 @@ interface UpdateContactPropertiesOptions {
|
|
|
666
647
|
type UpdateContactOptions = {
|
|
667
648
|
audienceId?: string;
|
|
668
649
|
unsubscribed?: boolean;
|
|
669
|
-
|
|
670
|
-
|
|
650
|
+
/**
|
|
651
|
+
* Use `null` to clear the `firstName`
|
|
652
|
+
*/
|
|
653
|
+
firstName?: string | null;
|
|
654
|
+
/**
|
|
655
|
+
* Use `null` to clear the `lastName`
|
|
656
|
+
*/
|
|
657
|
+
lastName?: string | null;
|
|
671
658
|
properties?: UpdateContactPropertiesOptions;
|
|
672
659
|
} & SelectingField;
|
|
673
660
|
type UpdateContactResponseSuccess = Pick<Contact, 'id'> & {
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resend",
|
|
3
|
-
"version": "6.5.
|
|
3
|
+
"version": "6.5.2",
|
|
4
4
|
"description": "Node.js library for the Resend API",
|
|
5
|
-
"main": "./dist/index.
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
|
-
"types": "./dist/index.d.
|
|
7
|
+
"types": "./dist/index.d.mts",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist/**"
|
|
10
10
|
],
|
|
@@ -29,19 +29,6 @@
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
"scripts": {
|
|
33
|
-
"build": "tsdown src/index.ts --format esm,cjs --dts",
|
|
34
|
-
"format": "biome format --write .",
|
|
35
|
-
"format:apply": "biome check --write .",
|
|
36
|
-
"format:check": "biome format .",
|
|
37
|
-
"lint": "biome check .",
|
|
38
|
-
"prepublishOnly": "pnpm run build",
|
|
39
|
-
"test": "vitest run",
|
|
40
|
-
"test:watch": "vitest",
|
|
41
|
-
"typecheck": "tsc --noEmit",
|
|
42
|
-
"test:record": "rimraf --glob \"**/__recordings__\" && cross-env TEST_MODE=record vitest run",
|
|
43
|
-
"test:dev": "cross-env TEST_MODE=dev vitest run"
|
|
44
|
-
},
|
|
45
32
|
"repository": {
|
|
46
33
|
"type": "git",
|
|
47
34
|
"url": "git+https://github.com/resend/resend-node.git"
|
|
@@ -79,5 +66,14 @@
|
|
|
79
66
|
"vitest": "3.2.4",
|
|
80
67
|
"vitest-fetch-mock": "0.4.5"
|
|
81
68
|
},
|
|
82
|
-
"
|
|
83
|
-
|
|
69
|
+
"scripts": {
|
|
70
|
+
"build": "tsdown src/index.ts --format esm,cjs --dts",
|
|
71
|
+
"lint": "biome check .",
|
|
72
|
+
"lint:fix": "biome check . --write",
|
|
73
|
+
"test": "vitest run",
|
|
74
|
+
"test:dev": "cross-env TEST_MODE=dev vitest run",
|
|
75
|
+
"test:record": "rimraf --glob \"**/__recordings__\" && cross-env TEST_MODE=record vitest run",
|
|
76
|
+
"test:watch": "vitest",
|
|
77
|
+
"typecheck": "tsc --noEmit"
|
|
78
|
+
}
|
|
79
|
+
}
|