@@ -120,11 +120,45 @@ export interface SDKECommerceAPI extends IECommerceShared {
120120 ) : void ;
121121}
122122
123+ interface ExtractedActionAttributes {
124+ "Affiliation" ?: string ;
125+ "Coupon Code" ?: string ;
126+ "Total Amount" ?: number ;
127+ "Shipping Amount" ?: string ;
128+ "Tax Amount" ?: string ;
129+ "Checkout Option" ?: string ;
130+ "Checkout Step" ?: number ;
131+ "Transaction ID" ?: string ;
132+ }
133+ interface ExtractedProductAttributes {
134+ "Coupon Code" ?: string ;
135+ "Brand" ?: string ;
136+ "Category" ?: string ;
137+ "Name" ?: string ;
138+ "Id" ?: string ;
139+ "Item Price" ?: string ;
140+ "Quantity" ?: string ;
141+ "Position" ?: number ;
142+ "Variant" ?: string ;
143+ "Total Product Amount" : string ;
144+ }
145+ interface ExtractedPromotionAttributes {
146+ "Id" ?: string ;
147+ "Creative" ?: string ;
148+ "Name" ?: string ;
149+ "Position" ?: number ;
150+ }
151+ interface ExtractedTransactionId {
152+ "Transaction ID" ?: string ;
153+ }
154+
123155// Used for the private `_Ecommerce` namespace
124156export interface IECommerce extends IECommerceShared {
125157 buildProductList ( event : SDKEvent , product : Product | Product [ ] ) : Product [ ] ;
126158 convertProductActionToEventType (
127159 productActionType : valueof < typeof ProductActionType >
160+
161+ // https://go.mparticle.com/work/SQDSDKS-4801
128162 ) : typeof CommerceEventType | typeof EventType | null ;
129163 convertPromotionActionToEventType (
130164 promotionActionType : valueof < typeof PromotionActionType >
@@ -141,19 +175,19 @@ export interface IECommerce extends IECommerceShared {
141175 expandProductImpression ( commerceEvent : CommerceEvent ) : SDKEvent [ ] ;
142176 expandPromotionAction ( commerceEvent : CommerceEvent ) : SDKEvent [ ] ;
143177 extractActionAttributes (
144- attributes : Record < string , string | number > ,
178+ attributes : ExtractedActionAttributes ,
145179 productAction : ProductAction
146180 ) : void ;
147181 extractProductAttributes (
148- attributes : Record < string , string | number > ,
182+ attributes : ExtractedProductAttributes ,
149183 product : Product
150184 ) : void ;
151185 extractPromotionAttributes (
152- attributes : Record < string , string | number > ,
186+ attributes : ExtractedPromotionAttributes ,
153187 promotion : Promotion
154188 ) : void ;
155189 extractTransactionId (
156- attributes : Record < string , string | number > ,
190+ attributes : ExtractedTransactionId ;
157191 productAction : ProductAction
158192 ) : void ;
159193 generateExpandedEcommerceName ( eventName : string , plusOne : boolean ) : string ;
0 commit comments