From 835bae94d4e3792c25bb6e506f57912b51932f04 Mon Sep 17 00:00:00 2001 From: git Date: Wed, 7 Feb 2024 16:41:24 +0800 Subject: [PATCH] Add missing customer field in type definition --- types/index.d.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index 92f81a18..9d5e7ad6 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1387,8 +1387,15 @@ declare namespace Shopify { type CustomerState = 'declined' | 'disabled' | 'enabled' | 'invited'; + interface IEmailMarketingConsent { + state: string; + opt_in_level: string | null; + consent_updated_at: string; + } + interface ICustomer { - accepts_marketing: boolean; + accepts_marketing?: boolean; + email_marketing_consent?: IEmailMarketingConsent, addresses?: ICustomerAddress[]; created_at: string; currency: string; @@ -2186,7 +2193,8 @@ declare namespace Shopify { } interface IOrderCustomer { - accepts_marketing: boolean; + accepts_marketing?: boolean; + email_marketing_consent?: IEmailMarketingConsent, created_at: string; default_address: ICustomerAddress; email: string;