Skip to content

Instantly share code, notes, and snippets.

@elephantsneverforget
Created August 17, 2023 13:05
Show Gist options
  • Save elephantsneverforget/5f2e3883e9a66168416650e6d5c45b7a to your computer and use it in GitHub Desktop.
Save elephantsneverforget/5f2e3883e9a66168416650e6d5c45b7a to your computer and use it in GitHub Desktop.
export type SendlaneEventPayload = {
token: string;
custom_event: string;
email?: string;
phone?: string;
user: {
firstName?: string;
lastName?: string;
city?: string;
country?: string;
regionCode?: string;
zip?: string;
region?: string;
countryCode?: string;
};
data: {
eventItems?: Array<SendlaneItem>;
preEventCartContents?: {
products?: Array<SendlaneCartItem>;
};
};
};
export type SendlaneItem = {
variantTitle?: string;
productTitle?: string;
productId?: string;
variantId?: string;
price?: number;
sku?: string;
quantity?: number;
imageUrl?: string;
category?: string;
brand?: string;
productURL?: string;
list?: string;
listId?: string;
currency?: string;
currencySymbol?: string;
compareAtPrice?: number;
url?: string;
};
type SendlaneCartItem = Omit<
SendlaneItem,
| "url"
| "productURL"
| "listId"
| "compareAtPrice"
| "currencySymbol"
| "currency"
>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment