@coveo/relay-event-types 7.1.6 → 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 +166 -54
package/package.json
CHANGED
package/relay-event-types.d.ts
CHANGED
|
@@ -16,61 +16,11 @@ interface Base {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* A document suggestion.
|
|
20
20
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*/
|
|
25
|
-
action: "add" | "remove";
|
|
26
|
-
currency: CurrencyCodeISO4217;
|
|
27
|
-
product: Product;
|
|
28
|
-
/**
|
|
29
|
-
* Represents the change in product quantity, not the total quantity. Can be decimal. Must be greater than 0.
|
|
30
|
-
*/
|
|
31
|
-
quantity: number;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* The ecProductClick event is emitted when a user clicks a product, be it on a search page, listing page, or recommendation carousel.
|
|
36
|
-
*/
|
|
37
|
-
export interface EcProductClick extends Base {
|
|
38
|
-
/**
|
|
39
|
-
* Indicates the product's position using a 1-based index. Maximum possible value is 32767.
|
|
40
|
-
*/
|
|
41
|
-
position: number;
|
|
42
|
-
/**
|
|
43
|
-
* Response ID linked to the commerce API request that returned the clicked item.
|
|
44
|
-
*/
|
|
45
|
-
responseId: UuidNotNull;
|
|
46
|
-
currency: CurrencyCodeISO4217;
|
|
47
|
-
product: Product;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* 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).
|
|
52
|
-
*/
|
|
53
|
-
export interface EcProductView extends Base {
|
|
54
|
-
currency: CurrencyCodeISO4217;
|
|
55
|
-
product: Product;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* The ecPurchase event is emitted when the user completes a purchase.
|
|
60
|
-
*/
|
|
61
|
-
export interface EcPurchase extends Base {
|
|
62
|
-
currency: CurrencyCodeISO4217;
|
|
63
|
-
products: ProductQuantity[];
|
|
64
|
-
transaction: {
|
|
65
|
-
/**
|
|
66
|
-
* The transaction ID. You can use it to cross-reference any orders you've exported from Coveo against records in your own system.
|
|
67
|
-
*/
|
|
68
|
-
id: string;
|
|
69
|
-
/**
|
|
70
|
-
* Total revenue from the transaction, including tax, shipping, and discounts.
|
|
71
|
-
*/
|
|
72
|
-
revenue: number;
|
|
73
|
-
};
|
|
21
|
+
interface DocumentSuggestion {
|
|
22
|
+
id: string;
|
|
23
|
+
responseId: string;
|
|
74
24
|
}
|
|
75
25
|
|
|
76
26
|
interface Feedback {
|
|
@@ -205,4 +155,166 @@ export interface Search extends Base {
|
|
|
205
155
|
queryText: string;
|
|
206
156
|
numberOfResults?: number;
|
|
207
157
|
responseTimeInMs?: number;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* A support ticket.
|
|
162
|
+
*/
|
|
163
|
+
interface Ticket {
|
|
164
|
+
/**
|
|
165
|
+
* The support ticket unique id as identified by the origin system.
|
|
166
|
+
*/
|
|
167
|
+
id: string;
|
|
168
|
+
/**
|
|
169
|
+
* The category of the support ticket.
|
|
170
|
+
*/
|
|
171
|
+
category?: string;
|
|
172
|
+
/**
|
|
173
|
+
* The description of the support ticket.
|
|
174
|
+
*/
|
|
175
|
+
description?: string;
|
|
176
|
+
/**
|
|
177
|
+
* The subject of the support ticket.
|
|
178
|
+
*/
|
|
179
|
+
subject?: string;
|
|
180
|
+
/**
|
|
181
|
+
* The origin system of the support ticket.
|
|
182
|
+
*/
|
|
183
|
+
system?: string;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export namespace CaseAssist {
|
|
187
|
+
/**
|
|
188
|
+
* The CaseAssist.Start event is emitted when Coveo Case Assist support ticket creation flow is initiated.
|
|
189
|
+
*/
|
|
190
|
+
export type Start = Base;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* The CaseAssist.Cancel event is emitted when Coveo Case Assist support ticket creation flow is canceled by the user.
|
|
194
|
+
*/
|
|
195
|
+
export interface Cancel extends Base {
|
|
196
|
+
/**
|
|
197
|
+
* The reason why the user canceled the ticket creation flow.
|
|
198
|
+
*/
|
|
199
|
+
reason: "solved" | "quit";
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* The CaseAssist.CreateTicket event is emitted when a support ticket is created in Coveo Case Assist.
|
|
204
|
+
*/
|
|
205
|
+
export interface CreateTicket extends Base {
|
|
206
|
+
ticket: Ticket;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* The CaseAssist.DocumentSuggestionClick event is emitted when a Coveo Case Assist document suggestion is clicked.
|
|
211
|
+
*/
|
|
212
|
+
export interface DocumentSuggestionClick extends Base {
|
|
213
|
+
documentSuggestion: DocumentSuggestion;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* The CaseAssist.DocumentSuggestionFeedback event is emitted when feedback is given on a Coveo Case Assist document suggestion.
|
|
218
|
+
*/
|
|
219
|
+
export interface DocumentSuggestionFeedback extends Base {
|
|
220
|
+
documentSuggestion: DocumentSuggestion;
|
|
221
|
+
/**
|
|
222
|
+
* Whether the user liked the document suggestion or not.
|
|
223
|
+
*/
|
|
224
|
+
liked: boolean;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* The CaseAssist.selectFieldClassification event is emitted when a support ticket field recommendation is selected in Coveo Case Assist.
|
|
229
|
+
*/
|
|
230
|
+
export interface SelectFieldClassification extends Base {
|
|
231
|
+
fieldClassification: {
|
|
232
|
+
/**
|
|
233
|
+
* The unique identifier of the field classification.
|
|
234
|
+
*/
|
|
235
|
+
id: string;
|
|
236
|
+
/**
|
|
237
|
+
* The unique identifier of the response that contains the field classification.
|
|
238
|
+
*/
|
|
239
|
+
responseId: string;
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* Whether the field classification was automatically selected by Coveo Case Assist.
|
|
243
|
+
*/
|
|
244
|
+
autoselected: boolean;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* The CaseAssist.UpdateField event is emitted when an end-user edits a Coveo Case Assist form field.
|
|
249
|
+
*/
|
|
250
|
+
export interface UpdateField extends Base {
|
|
251
|
+
/**
|
|
252
|
+
* The name of the field that was updated.
|
|
253
|
+
*/
|
|
254
|
+
fieldName: string;
|
|
255
|
+
/**
|
|
256
|
+
* The new value of the field.
|
|
257
|
+
*/
|
|
258
|
+
fieldValue: string;
|
|
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
|
+
}
|
|
208
320
|
}
|