coveo.analytics 2.30.53 → 2.30.54
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/dist/browser.mjs +1 -1
- package/dist/coveoua.browser.js +1 -1
- package/dist/coveoua.browser.js.map +1 -1
- package/dist/coveoua.debug.js +1 -1
- package/dist/coveoua.debug.js.map +1 -1
- package/dist/coveoua.js +1 -1
- package/dist/coveoua.js.map +1 -1
- package/dist/definitions/searchPage/searchPageEvents.d.ts +8 -1
- package/dist/definitions/version.d.ts +1 -1
- package/dist/library.cjs +1 -1
- package/dist/library.es.js +1 -1
- package/dist/library.js +1 -1
- package/dist/library.mjs +1 -1
- package/dist/react-native.es.js +1 -1
- package/package.json +1 -1
- package/src/searchPage/searchPageClient.spec.ts +87 -0
- package/src/searchPage/searchPageEvents.ts +12 -1
|
@@ -199,12 +199,19 @@ export type PartialDocumentInformation = Omit<DocumentInformation, 'actionCause'
|
|
|
199
199
|
interface AnswerGeneratedWithAnswerAPI {
|
|
200
200
|
answerAPIStreamId: string;
|
|
201
201
|
generativeQuestionAnsweringId?: never;
|
|
202
|
+
conversationId?: never;
|
|
202
203
|
}
|
|
203
204
|
interface AnswerGeneratedWithSearchAPI {
|
|
204
205
|
answerAPIStreamId?: never;
|
|
205
206
|
generativeQuestionAnsweringId: string;
|
|
207
|
+
conversationId?: never;
|
|
206
208
|
}
|
|
207
|
-
|
|
209
|
+
interface AnswerGeneratedWithAgent {
|
|
210
|
+
answerAPIStreamId?: never;
|
|
211
|
+
generativeQuestionAnsweringId: string;
|
|
212
|
+
conversationId: string;
|
|
213
|
+
}
|
|
214
|
+
export type GeneratedAnswerBaseMeta = AnswerGeneratedWithAnswerAPI | AnswerGeneratedWithSearchAPI | AnswerGeneratedWithAgent;
|
|
208
215
|
export type GeneratedAnswerStreamEndMeta = GeneratedAnswerBaseMeta & {
|
|
209
216
|
answerGenerated: boolean;
|
|
210
217
|
answerTextIsEmpty?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const libVersion = "2.30.
|
|
1
|
+
export declare const libVersion = "2.30.54";
|
package/dist/library.cjs
CHANGED
|
@@ -736,7 +736,7 @@ function sha1(bytes) {
|
|
|
736
736
|
const v5 = v35('v5', 0x50, sha1);
|
|
737
737
|
var uuidv5 = v5;
|
|
738
738
|
|
|
739
|
-
var libVersion = "2.30.
|
|
739
|
+
var libVersion = "2.30.54";
|
|
740
740
|
|
|
741
741
|
var getFormattedLocation = function (location) {
|
|
742
742
|
return "".concat(location.protocol, "//").concat(location.hostname).concat(location.pathname.indexOf('/') === 0 ? location.pathname : "/".concat(location.pathname)).concat(location.search);
|
package/dist/library.es.js
CHANGED
|
@@ -603,7 +603,7 @@ function sha1(bytes) {
|
|
|
603
603
|
const v5 = v35('v5', 0x50, sha1);
|
|
604
604
|
var uuidv5 = v5;
|
|
605
605
|
|
|
606
|
-
const libVersion = "2.30.
|
|
606
|
+
const libVersion = "2.30.54";
|
|
607
607
|
|
|
608
608
|
const getFormattedLocation = (location) => `${location.protocol}//${location.hostname}${location.pathname.indexOf('/') === 0 ? location.pathname : `/${location.pathname}`}${location.search}`;
|
|
609
609
|
|
package/dist/library.js
CHANGED
|
@@ -736,7 +736,7 @@ function sha1(bytes) {
|
|
|
736
736
|
const v5 = v35('v5', 0x50, sha1);
|
|
737
737
|
var uuidv5 = v5;
|
|
738
738
|
|
|
739
|
-
var libVersion = "2.30.
|
|
739
|
+
var libVersion = "2.30.54";
|
|
740
740
|
|
|
741
741
|
var getFormattedLocation = function (location) {
|
|
742
742
|
return "".concat(location.protocol, "//").concat(location.hostname).concat(location.pathname.indexOf('/') === 0 ? location.pathname : "/".concat(location.pathname)).concat(location.search);
|
package/dist/library.mjs
CHANGED
|
@@ -734,7 +734,7 @@ function sha1(bytes) {
|
|
|
734
734
|
const v5 = v35('v5', 0x50, sha1);
|
|
735
735
|
var uuidv5 = v5;
|
|
736
736
|
|
|
737
|
-
var libVersion = "2.30.
|
|
737
|
+
var libVersion = "2.30.54";
|
|
738
738
|
|
|
739
739
|
var getFormattedLocation = function (location) {
|
|
740
740
|
return "".concat(location.protocol, "//").concat(location.hostname).concat(location.pathname.indexOf('/') === 0 ? location.pathname : "/".concat(location.pathname)).concat(location.search);
|
package/dist/react-native.es.js
CHANGED
|
@@ -672,7 +672,7 @@ const addPageViewToHistory = (pageViewValue) => __awaiter(void 0, void 0, void 0
|
|
|
672
672
|
yield store.addElementAsync(historyElement);
|
|
673
673
|
});
|
|
674
674
|
|
|
675
|
-
const libVersion = "2.30.
|
|
675
|
+
const libVersion = "2.30.54";
|
|
676
676
|
|
|
677
677
|
const getFormattedLocation = (location) => `${location.protocol}//${location.hostname}${location.pathname.indexOf('/') === 0 ? location.pathname : `/${location.pathname}`}${location.search}`;
|
|
678
678
|
|
package/package.json
CHANGED
|
@@ -58,6 +58,7 @@ describe('SearchPageClient', () => {
|
|
|
58
58
|
];
|
|
59
59
|
|
|
60
60
|
const fakeStreamId = 'some-stream-id-123';
|
|
61
|
+
const fakeConversationId = 'some-conversation-id-123';
|
|
61
62
|
|
|
62
63
|
let client: CoveoSearchPageClient;
|
|
63
64
|
|
|
@@ -1451,6 +1452,12 @@ describe('SearchPageClient', () => {
|
|
|
1451
1452
|
expectMatchCustomEventPayload(SearchPageEvents.likeGeneratedAnswer, meta);
|
|
1452
1453
|
});
|
|
1453
1454
|
|
|
1455
|
+
it('should send proper payload for #logLikeGeneratedAnswer with agent metadata', async () => {
|
|
1456
|
+
const meta = {generativeQuestionAnsweringId: fakeStreamId, conversationId: fakeConversationId};
|
|
1457
|
+
await client.logLikeGeneratedAnswer(meta);
|
|
1458
|
+
expectMatchCustomEventPayload(SearchPageEvents.likeGeneratedAnswer, meta);
|
|
1459
|
+
});
|
|
1460
|
+
|
|
1454
1461
|
it('should send proper payload for #makeLikeGeneratedAnswer', async () => {
|
|
1455
1462
|
const meta = {generativeQuestionAnsweringId: fakeStreamId};
|
|
1456
1463
|
const built = await client.makeLikeGeneratedAnswer(meta);
|
|
@@ -1465,6 +1472,12 @@ describe('SearchPageClient', () => {
|
|
|
1465
1472
|
expectMatchCustomEventPayload(SearchPageEvents.dislikeGeneratedAnswer, meta);
|
|
1466
1473
|
});
|
|
1467
1474
|
|
|
1475
|
+
it('should send proper payload for #logDislikeGeneratedAnswer with agent metadata', async () => {
|
|
1476
|
+
const meta = {generativeQuestionAnsweringId: fakeStreamId, conversationId: fakeConversationId};
|
|
1477
|
+
await client.logDislikeGeneratedAnswer(meta);
|
|
1478
|
+
expectMatchCustomEventPayload(SearchPageEvents.dislikeGeneratedAnswer, meta);
|
|
1479
|
+
});
|
|
1480
|
+
|
|
1468
1481
|
it('should send proper payload for #makeDislikeGeneratedAnswer', async () => {
|
|
1469
1482
|
const meta = {generativeQuestionAnsweringId: fakeStreamId};
|
|
1470
1483
|
const built = await client.makeDislikeGeneratedAnswer(meta);
|
|
@@ -1483,6 +1496,17 @@ describe('SearchPageClient', () => {
|
|
|
1483
1496
|
expectMatchCustomEventPayload(SearchPageEvents.openGeneratedAnswerSource, meta);
|
|
1484
1497
|
});
|
|
1485
1498
|
|
|
1499
|
+
it('should send proper payload for #logOpenGeneratedAnswerSource with agent metadata', async () => {
|
|
1500
|
+
const meta = {
|
|
1501
|
+
generativeQuestionAnsweringId: fakeStreamId,
|
|
1502
|
+
conversationId: fakeConversationId,
|
|
1503
|
+
citationId: 'some-document-id',
|
|
1504
|
+
permanentId: 'perm-id',
|
|
1505
|
+
};
|
|
1506
|
+
await client.logOpenGeneratedAnswerSource(meta);
|
|
1507
|
+
expectMatchCustomEventPayload(SearchPageEvents.openGeneratedAnswerSource, meta);
|
|
1508
|
+
});
|
|
1509
|
+
|
|
1486
1510
|
it('should send proper payload for #makeOpenGeneratedAnswerSource', async () => {
|
|
1487
1511
|
const meta = {
|
|
1488
1512
|
generativeQuestionAnsweringId: fakeStreamId,
|
|
@@ -1510,6 +1534,22 @@ describe('SearchPageClient', () => {
|
|
|
1510
1534
|
});
|
|
1511
1535
|
});
|
|
1512
1536
|
|
|
1537
|
+
it('should send proper payload for #logGeneratedAnswerCitationClick with agent metadata', async () => {
|
|
1538
|
+
const meta = {
|
|
1539
|
+
generativeQuestionAnsweringId: fakeStreamId,
|
|
1540
|
+
conversationId: fakeConversationId,
|
|
1541
|
+
citationId: 'some-document-id',
|
|
1542
|
+
documentId: {contentIdKey: 'permanentid', contentIdValue: 'foo'},
|
|
1543
|
+
};
|
|
1544
|
+
|
|
1545
|
+
await client.logGeneratedAnswerCitationClick(fakeDocInfo, meta);
|
|
1546
|
+
expectMatchDocumentPayload(SearchPageEvents.generatedAnswerCitationClick, fakeDocInfo, {
|
|
1547
|
+
...meta,
|
|
1548
|
+
contentIDKey: meta.documentId.contentIdKey,
|
|
1549
|
+
contentIDValue: meta.documentId.contentIdValue,
|
|
1550
|
+
});
|
|
1551
|
+
});
|
|
1552
|
+
|
|
1513
1553
|
it('should send proper payload for #makeGeneratedAnswerCitationClick', async () => {
|
|
1514
1554
|
const meta = {
|
|
1515
1555
|
generativeQuestionAnsweringId: fakeStreamId,
|
|
@@ -1530,6 +1570,17 @@ describe('SearchPageClient', () => {
|
|
|
1530
1570
|
expectMatchCustomEventPayload(SearchPageEvents.generatedAnswerStreamEnd, meta);
|
|
1531
1571
|
});
|
|
1532
1572
|
|
|
1573
|
+
it('should send proper payload for #logGeneratedAnswerStreamEnd with agent metadata', async () => {
|
|
1574
|
+
const meta = {
|
|
1575
|
+
generativeQuestionAnsweringId: fakeStreamId,
|
|
1576
|
+
conversationId: fakeConversationId,
|
|
1577
|
+
answerGenerated: true,
|
|
1578
|
+
answerTextIsEmpty: false,
|
|
1579
|
+
};
|
|
1580
|
+
await client.logGeneratedAnswerStreamEnd(meta);
|
|
1581
|
+
expectMatchCustomEventPayload(SearchPageEvents.generatedAnswerStreamEnd, meta);
|
|
1582
|
+
});
|
|
1583
|
+
|
|
1533
1584
|
it('should send proper payload for #makeGeneratedAnswerStreamEnd', async () => {
|
|
1534
1585
|
const meta = {generativeQuestionAnsweringId: fakeStreamId, answerGenerated: true, answerTextIsEmpty: false};
|
|
1535
1586
|
const built = await client.makeGeneratedAnswerStreamEnd(meta);
|
|
@@ -1549,6 +1600,18 @@ describe('SearchPageClient', () => {
|
|
|
1549
1600
|
expectMatchCustomEventPayload(SearchPageEvents.generatedAnswerSourceHover, meta);
|
|
1550
1601
|
});
|
|
1551
1602
|
|
|
1603
|
+
it('should send proper payload for #logGeneratedAnswerSourceHover with agent metadata', async () => {
|
|
1604
|
+
const meta = {
|
|
1605
|
+
generativeQuestionAnsweringId: fakeStreamId,
|
|
1606
|
+
conversationId: fakeConversationId,
|
|
1607
|
+
citationId: 'some-document-id',
|
|
1608
|
+
permanentId: 'perm-id',
|
|
1609
|
+
citationHoverTimeMs: 100,
|
|
1610
|
+
};
|
|
1611
|
+
await client.logGeneratedAnswerSourceHover(meta);
|
|
1612
|
+
expectMatchCustomEventPayload(SearchPageEvents.generatedAnswerSourceHover, meta);
|
|
1613
|
+
});
|
|
1614
|
+
|
|
1552
1615
|
it('should send proper payload for #makeGeneratedAnswerSourceHover', async () => {
|
|
1553
1616
|
const meta = {
|
|
1554
1617
|
generativeQuestionAnsweringId: fakeStreamId,
|
|
@@ -1568,6 +1631,12 @@ describe('SearchPageClient', () => {
|
|
|
1568
1631
|
expectMatchCustomEventPayload(SearchPageEvents.generatedAnswerCopyToClipboard, meta);
|
|
1569
1632
|
});
|
|
1570
1633
|
|
|
1634
|
+
it('should send proper payload for #logGeneratedAnswerCopyToClipboard with agent metadata', async () => {
|
|
1635
|
+
const meta = {generativeQuestionAnsweringId: fakeStreamId, conversationId: fakeConversationId};
|
|
1636
|
+
await client.logGeneratedAnswerCopyToClipboard(meta);
|
|
1637
|
+
expectMatchCustomEventPayload(SearchPageEvents.generatedAnswerCopyToClipboard, meta);
|
|
1638
|
+
});
|
|
1639
|
+
|
|
1571
1640
|
it('should send proper payload for #makeGeneratedAnswerCopyToClipboard', async () => {
|
|
1572
1641
|
const meta = {generativeQuestionAnsweringId: fakeStreamId};
|
|
1573
1642
|
const built = await client.makeGeneratedAnswerCopyToClipboard(meta);
|
|
@@ -1582,6 +1651,12 @@ describe('SearchPageClient', () => {
|
|
|
1582
1651
|
expectMatchCustomEventPayload(SearchPageEvents.generatedAnswerHideAnswers, meta);
|
|
1583
1652
|
});
|
|
1584
1653
|
|
|
1654
|
+
it('should send proper payload for #logGeneratedAnswerHideAnswers with agent metadata', async () => {
|
|
1655
|
+
const meta = {generativeQuestionAnsweringId: fakeStreamId, conversationId: fakeConversationId};
|
|
1656
|
+
await client.logGeneratedAnswerHideAnswers(meta);
|
|
1657
|
+
expectMatchCustomEventPayload(SearchPageEvents.generatedAnswerHideAnswers, meta);
|
|
1658
|
+
});
|
|
1659
|
+
|
|
1585
1660
|
it('should send proper payload for #makeGeneratedAnswerHideAnswers', async () => {
|
|
1586
1661
|
const meta = {generativeQuestionAnsweringId: fakeStreamId};
|
|
1587
1662
|
const built = await client.makeGeneratedAnswerHideAnswers(meta);
|
|
@@ -1596,6 +1671,12 @@ describe('SearchPageClient', () => {
|
|
|
1596
1671
|
expectMatchCustomEventPayload(SearchPageEvents.generatedAnswerShowAnswers, meta);
|
|
1597
1672
|
});
|
|
1598
1673
|
|
|
1674
|
+
it('should send proper payload for #logGeneratedAnswerShowAnswers with agent metadata', async () => {
|
|
1675
|
+
const meta = {generativeQuestionAnsweringId: fakeStreamId, conversationId: fakeConversationId};
|
|
1676
|
+
await client.logGeneratedAnswerShowAnswers(meta);
|
|
1677
|
+
expectMatchCustomEventPayload(SearchPageEvents.generatedAnswerShowAnswers, meta);
|
|
1678
|
+
});
|
|
1679
|
+
|
|
1599
1680
|
it('should send proper payload for #makeGeneratedAnswerShowAnswers', async () => {
|
|
1600
1681
|
const meta = {generativeQuestionAnsweringId: fakeStreamId};
|
|
1601
1682
|
const built = await client.makeGeneratedAnswerShowAnswers(meta);
|
|
@@ -1610,6 +1691,12 @@ describe('SearchPageClient', () => {
|
|
|
1610
1691
|
expectMatchCustomEventPayload(SearchPageEvents.generatedAnswerExpand, meta);
|
|
1611
1692
|
});
|
|
1612
1693
|
|
|
1694
|
+
it('should send proper payload for #logGeneratedAnswerExpand with agent metadata', async () => {
|
|
1695
|
+
const meta = {generativeQuestionAnsweringId: fakeStreamId, conversationId: fakeConversationId};
|
|
1696
|
+
await client.logGeneratedAnswerExpand(meta);
|
|
1697
|
+
expectMatchCustomEventPayload(SearchPageEvents.generatedAnswerExpand, meta);
|
|
1698
|
+
});
|
|
1699
|
+
|
|
1613
1700
|
it('should send proper payload for #makeGeneratedAnswerExpand', async () => {
|
|
1614
1701
|
const meta = {generativeQuestionAnsweringId: fakeStreamId};
|
|
1615
1702
|
const built = await client.makeGeneratedAnswerExpand(meta);
|
|
@@ -551,14 +551,25 @@ export type PartialDocumentInformation = Omit<DocumentInformation, 'actionCause'
|
|
|
551
551
|
interface AnswerGeneratedWithAnswerAPI {
|
|
552
552
|
answerAPIStreamId: string;
|
|
553
553
|
generativeQuestionAnsweringId?: never;
|
|
554
|
+
conversationId?: never;
|
|
554
555
|
}
|
|
555
556
|
|
|
556
557
|
interface AnswerGeneratedWithSearchAPI {
|
|
557
558
|
answerAPIStreamId?: never;
|
|
558
559
|
generativeQuestionAnsweringId: string;
|
|
560
|
+
conversationId?: never;
|
|
559
561
|
}
|
|
560
562
|
|
|
561
|
-
|
|
563
|
+
interface AnswerGeneratedWithAgent {
|
|
564
|
+
answerAPIStreamId?: never;
|
|
565
|
+
generativeQuestionAnsweringId: string;
|
|
566
|
+
conversationId: string;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
export type GeneratedAnswerBaseMeta =
|
|
570
|
+
| AnswerGeneratedWithAnswerAPI
|
|
571
|
+
| AnswerGeneratedWithSearchAPI
|
|
572
|
+
| AnswerGeneratedWithAgent;
|
|
562
573
|
|
|
563
574
|
export type GeneratedAnswerStreamEndMeta = GeneratedAnswerBaseMeta & {
|
|
564
575
|
answerGenerated: boolean;
|