Skip to content

Commit

Permalink
Add typing for selectedItem
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoleone committed Apr 16, 2024
1 parent 45f3e06 commit 7e5c671
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions react/typings/events.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,47 @@ export interface AddToWishlistData extends EventData {
eventType: 'vtex:addToWishlist'
eventName: 'vtex:addToWishlist'
items: {
selectedItem: any
selectedItem: SelectedItem
product: ProductSummary
}
list: string
}

export interface SelectedItem {
attachments?: any[]
complementName?: String
ean?: String
estimatedDateArrival?: any
images?: Image[]
itemId?: String
kitItems?: any[]
measurementUnit?: String
name?: String
nameComplete?: String
referenceId?: any
sellers?: Seller[]
unitMultiplier?: number
variations?: any[]
videos?: any[]
}

export interface Seller {
addToCartLink: String
commercialOffer: any
sellerDefault: boolean
sellerId: String
sellerName: String
}

export interface Image {
cacheId: String
imageId: String
imageLabel: String
imageTag: String
imageText: String
imageUrl: String
}

export interface RefundData extends EventData {
event: 'refund'
eventType: 'vtex:refund'
Expand Down Expand Up @@ -486,7 +521,7 @@ export interface ProductSummary {
productId: string
productName: string
productReference: string
selectedItem: any
selectedItem: SelectedItem
sku: ItemSummary
}

Expand Down

0 comments on commit 7e5c671

Please sign in to comment.