@prezly/sdk 26.2.1 → 26.3.0-0

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.
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DEFAULT_USER_AGENT = void 0;
7
- const VERSION = "26.2.0";
7
+ const VERSION = "26.2.1";
8
8
  const URL = 'https://github.com/prezly/javascript-sdk';
9
9
  const DEFAULT_USER_AGENT = exports.DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -1,3 +1,3 @@
1
- const VERSION = "26.2.0";
1
+ const VERSION = "26.2.1";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -22,6 +22,7 @@ interface BaseContactPayload {
22
22
  avatar_image?: string | null;
23
23
  languages?: string[];
24
24
  emails?: string[];
25
+ email_addresses?: (Pick<Contact.EmailAddress, 'email_address'> & Partial<Omit<Contact.EmailAddress, 'email_address'>>)[];
25
26
  phone_numbers?: Contact.PhoneNumber[];
26
27
  urls?: string[];
27
28
  social_accounts?: {
@@ -39,7 +39,11 @@ export interface Contact {
39
39
  bio: string;
40
40
  languages: Language[];
41
41
  primary_email: string | null;
42
+ /**
43
+ * @deprecated Please use `email_addresses` instead.
44
+ */
42
45
  emails: string[];
46
+ email_addresses: Contact.EmailAddress[];
43
47
  phone_numbers: Contact.PhoneNumber[];
44
48
  social: {
45
49
  type: Contact.SocialNetwork;
@@ -183,6 +187,11 @@ export declare namespace Contact {
183
187
  number: string;
184
188
  type: PhoneNumber.Type;
185
189
  }
190
+ interface EmailAddress {
191
+ email_address: string;
192
+ is_active: boolean;
193
+ is_primary: boolean;
194
+ }
186
195
  namespace PhoneNumber {
187
196
  enum Type {
188
197
  TELEPHONE = "tel",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/sdk",
3
- "version": "26.2.1",
3
+ "version": "26.3.0-0",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",