From 0c204624a5320b08bd8f957a9ece71bc3410e6b4 Mon Sep 17 00:00:00 2001 From: Francis Gyimah Date: Thu, 26 Feb 2026 08:23:40 +0000 Subject: [PATCH 1/3] [DEV-22531] Added `email_addresses` to Contact type & payload --- src/endpoints/Contacts/types.ts | 2 ++ src/types/Contact.ts | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/endpoints/Contacts/types.ts b/src/endpoints/Contacts/types.ts index 5e734e13..91499f03 100644 --- a/src/endpoints/Contacts/types.ts +++ b/src/endpoints/Contacts/types.ts @@ -30,6 +30,8 @@ interface BaseContactPayload { avatar_image?: string | null; languages?: string[]; emails?: string[]; + email_addresses?: (Pick & + Partial>)[]; phone_numbers?: Contact.PhoneNumber[]; urls?: string[]; social_accounts?: { type: Contact.SocialNetwork; username: string }[]; diff --git a/src/types/Contact.ts b/src/types/Contact.ts index deff5f8e..3c8cc5ed 100644 --- a/src/types/Contact.ts +++ b/src/types/Contact.ts @@ -46,7 +46,13 @@ export interface Contact { languages: Language[]; primary_email: string | null; + + /** + * @deprecated Please use `email_addresses` instead. + */ emails: string[]; + + email_addresses: Contact.EmailAddress[]; phone_numbers: Contact.PhoneNumber[]; social: { type: Contact.SocialNetwork; username: string }[]; function_name: string; @@ -202,6 +208,12 @@ export namespace Contact { type: PhoneNumber.Type; } + export interface EmailAddress { + email_address: string; + is_active: boolean; + is_primary: boolean; + } + export namespace PhoneNumber { export enum Type { TELEPHONE = 'tel', From 10711da3bdf420f189661e8b16dad9e4a5201efb Mon Sep 17 00:00:00 2001 From: Francis Gyimah Date: Thu, 26 Feb 2026 08:35:29 +0000 Subject: [PATCH 2/3] 26.3.0-0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 376029e4..d33eefad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@prezly/sdk", - "version": "26.2.1", + "version": "26.3.0-0", "description": "Prezly API SDK", "type": "module", "main": "dist/index.cjs", From af99cb389c6b152ccfc716015e2149a00181fa3c Mon Sep 17 00:00:00 2001 From: Francis Gyimah Date: Thu, 26 Feb 2026 12:20:55 +0000 Subject: [PATCH 3/3] [DEV-22531] Simplified email_addresses update type --- src/endpoints/Contacts/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/endpoints/Contacts/types.ts b/src/endpoints/Contacts/types.ts index 91499f03..9b725bfe 100644 --- a/src/endpoints/Contacts/types.ts +++ b/src/endpoints/Contacts/types.ts @@ -31,7 +31,7 @@ interface BaseContactPayload { languages?: string[]; emails?: string[]; email_addresses?: (Pick & - Partial>)[]; + Partial)[]; phone_numbers?: Contact.PhoneNumber[]; urls?: string[]; social_accounts?: { type: Contact.SocialNetwork; username: string }[];