@coveo/relay-event-types 7.2.0 → 7.3.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.
- package/package.json +1 -1
- package/relay-event-types.d.ts +60 -58
package/package.json
CHANGED
package/relay-event-types.d.ts
CHANGED
|
@@ -23,64 +23,6 @@ interface DocumentSuggestion {
|
|
|
23
23
|
responseId: string;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
/**
|
|
27
|
-
* The ecCartAction event is emitted when a user adds or removes a product from the cart or changes a product's quantity.
|
|
28
|
-
*/
|
|
29
|
-
export interface EcCartAction extends Base {
|
|
30
|
-
/**
|
|
31
|
-
* Specifies the action. Use "add" to increase quantity and "remove" to decrease it.
|
|
32
|
-
*/
|
|
33
|
-
action: "add" | "remove";
|
|
34
|
-
currency: CurrencyCodeISO4217;
|
|
35
|
-
product: Product;
|
|
36
|
-
/**
|
|
37
|
-
* Represents the change in product quantity, not the total quantity. Can be decimal. Must be greater than 0.
|
|
38
|
-
*/
|
|
39
|
-
quantity: number;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* The ecProductClick event is emitted when a user clicks a product, be it on a search page, listing page, or recommendation carousel.
|
|
44
|
-
*/
|
|
45
|
-
export interface EcProductClick extends Base {
|
|
46
|
-
/**
|
|
47
|
-
* Indicates the product's position using a 1-based index. Maximum possible value is 32767.
|
|
48
|
-
*/
|
|
49
|
-
position: number;
|
|
50
|
-
/**
|
|
51
|
-
* Response ID linked to the commerce API request that returned the clicked item.
|
|
52
|
-
*/
|
|
53
|
-
responseId: UuidNotNull;
|
|
54
|
-
currency: CurrencyCodeISO4217;
|
|
55
|
-
product: Product;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* The ecProductView event is emitted when a user explores a product's details on a Product Detail Page (PDP) or previews the item in a modal from a Product Listing Page (PLP).
|
|
60
|
-
*/
|
|
61
|
-
export interface EcProductView extends Base {
|
|
62
|
-
currency: CurrencyCodeISO4217;
|
|
63
|
-
product: Product;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* The ecPurchase event is emitted when the user completes a purchase.
|
|
68
|
-
*/
|
|
69
|
-
export interface EcPurchase extends Base {
|
|
70
|
-
currency: CurrencyCodeISO4217;
|
|
71
|
-
products: ProductQuantity[];
|
|
72
|
-
transaction: {
|
|
73
|
-
/**
|
|
74
|
-
* The transaction ID. You can use it to cross-reference any orders you've exported from Coveo against records in your own system.
|
|
75
|
-
*/
|
|
76
|
-
id: string;
|
|
77
|
-
/**
|
|
78
|
-
* Total revenue from the transaction, including tax, shipping, and discounts.
|
|
79
|
-
*/
|
|
80
|
-
revenue: number;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
26
|
interface Feedback {
|
|
85
27
|
liked: boolean;
|
|
86
28
|
/**
|
|
@@ -315,4 +257,64 @@ export namespace CaseAssist {
|
|
|
315
257
|
*/
|
|
316
258
|
fieldValue: string;
|
|
317
259
|
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export namespace Ec {
|
|
263
|
+
/**
|
|
264
|
+
* The ec.cartAction event is emitted when a user adds or removes a product from the cart or changes a product's quantity.
|
|
265
|
+
*/
|
|
266
|
+
export interface CartAction extends Base {
|
|
267
|
+
/**
|
|
268
|
+
* Specifies the action. Use "add" to increase quantity and "remove" to decrease it.
|
|
269
|
+
*/
|
|
270
|
+
action: "add" | "remove";
|
|
271
|
+
currency: CurrencyCodeISO4217;
|
|
272
|
+
product: Product;
|
|
273
|
+
/**
|
|
274
|
+
* Represents the change in product quantity, not the total quantity. Can be decimal. Must be greater than 0.
|
|
275
|
+
*/
|
|
276
|
+
quantity: number;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* The ec.productClick event is emitted when a user clicks a product, be it on a search page, listing page, or recommendation carousel.
|
|
281
|
+
*/
|
|
282
|
+
export interface ProductClick extends Base {
|
|
283
|
+
/**
|
|
284
|
+
* Indicates the product's position using a 1-based index. Maximum possible value is 32767.
|
|
285
|
+
*/
|
|
286
|
+
position: number;
|
|
287
|
+
/**
|
|
288
|
+
* Response ID linked to the commerce API request that returned the clicked item.
|
|
289
|
+
*/
|
|
290
|
+
responseId: UuidNotNull;
|
|
291
|
+
currency: CurrencyCodeISO4217;
|
|
292
|
+
product: Product;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* The ec.productView event is emitted when a user explores a product's details on a Product Detail Page (PDP) or previews the item in a modal from a Product Listing Page (PLP).
|
|
297
|
+
*/
|
|
298
|
+
export interface ProductView extends Base {
|
|
299
|
+
currency: CurrencyCodeISO4217;
|
|
300
|
+
product: Product;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* The ec.purchase event is emitted when the user completes a purchase.
|
|
305
|
+
*/
|
|
306
|
+
export interface Purchase extends Base {
|
|
307
|
+
currency: CurrencyCodeISO4217;
|
|
308
|
+
products: ProductQuantity[];
|
|
309
|
+
transaction: {
|
|
310
|
+
/**
|
|
311
|
+
* The transaction ID. You can use it to cross-reference any orders you've exported from Coveo against records in your own system.
|
|
312
|
+
*/
|
|
313
|
+
id: string;
|
|
314
|
+
/**
|
|
315
|
+
* Total revenue from the transaction, including tax, shipping, and discounts.
|
|
316
|
+
*/
|
|
317
|
+
revenue: number;
|
|
318
|
+
};
|
|
319
|
+
}
|
|
318
320
|
}
|