Skip to content

Commit f800a2e

Browse files
authored
fix(contacts): types for first_name and last_name in update and get (#757)
1 parent 49cffa7 commit f800a2e

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "resend",
3-
"version": "6.5.1",
3+
"version": "6.5.2",
44
"description": "Node.js library for the Resend API",
55
"main": "./dist/index.cjs",
66
"module": "./dist/index.mjs",

src/contacts/interfaces/contact.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ export interface Contact {
22
created_at: string;
33
id: string;
44
email: string;
5-
first_name?: string;
6-
last_name?: string;
5+
first_name: string | null;
6+
last_name: string | null;
77
unsubscribed: boolean;
88
}
99

src/contacts/interfaces/update-contact.interface.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@ interface UpdateContactPropertiesOptions {
88
export type UpdateContactOptions = {
99
audienceId?: string;
1010
unsubscribed?: boolean;
11-
firstName?: string;
12-
lastName?: string;
11+
/**
12+
* Use `null` to clear the `firstName`
13+
*/
14+
firstName?: string | null;
15+
/**
16+
* Use `null` to clear the `lastName`
17+
*/
18+
lastName?: string | null;
1319
properties?: UpdateContactPropertiesOptions;
1420
} & SelectingField;
1521

0 commit comments

Comments
 (0)