@coveo/relay 0.7.6 → 0.7.7
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/lib/cdn/relay.min.js +1 -1
- package/lib/cdn/relay.min.js.map +1 -1
- package/lib/cdn/types/config/config.d.ts +0 -15
- package/lib/cdn/types/config/config.d.ts.map +1 -1
- package/lib/cdn/types/event/meta/meta.d.ts +1 -5
- package/lib/cdn/types/event/meta/meta.d.ts.map +1 -1
- package/lib/cdn/types/relay.d.ts +2 -2
- package/lib/cdn/types/relay.d.ts.map +1 -1
- package/lib/docs/relay-docs.json +99 -247
- package/lib/relay.cjs +3 -4
- package/lib/relay.js +3 -4
- package/lib/relay.mjs +3 -4
- package/lib/types/config/config.d.ts +0 -15
- package/lib/types/config/config.d.ts.map +1 -1
- package/lib/types/event/meta/meta.d.ts +1 -5
- package/lib/types/event/meta/meta.d.ts.map +1 -1
- package/lib/types/relay.d.ts +2 -2
- package/lib/types/relay.d.ts.map +1 -1
- package/package.json +1 -1
package/lib/relay.cjs
CHANGED
|
@@ -34,11 +34,11 @@ function createClientIdManager(environmentManager) {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
const version = "0.7.
|
|
37
|
+
const version = "0.7.7";
|
|
38
38
|
|
|
39
39
|
function getEventConfig(config) {
|
|
40
|
-
const { trackingId
|
|
41
|
-
return { trackingId
|
|
40
|
+
const { trackingId } = config;
|
|
41
|
+
return { trackingId };
|
|
42
42
|
}
|
|
43
43
|
function getSource(config) {
|
|
44
44
|
return (config.source || []).concat([`relay@${version}`]);
|
|
@@ -126,7 +126,6 @@ function pick({ url, token, trackingId, ...rest }) {
|
|
|
126
126
|
url,
|
|
127
127
|
token,
|
|
128
128
|
trackingId,
|
|
129
|
-
...(!!rest.user && { user: rest.user }),
|
|
130
129
|
...(!!rest.mode && { mode: rest.mode }),
|
|
131
130
|
...(!!rest.source && { source: rest.source }),
|
|
132
131
|
});
|
package/lib/relay.js
CHANGED
|
@@ -32,11 +32,11 @@ function createClientIdManager(environmentManager) {
|
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
const version = "0.7.
|
|
35
|
+
const version = "0.7.7";
|
|
36
36
|
|
|
37
37
|
function getEventConfig(config) {
|
|
38
|
-
const { trackingId
|
|
39
|
-
return { trackingId
|
|
38
|
+
const { trackingId } = config;
|
|
39
|
+
return { trackingId };
|
|
40
40
|
}
|
|
41
41
|
function getSource(config) {
|
|
42
42
|
return (config.source || []).concat([`relay@${version}`]);
|
|
@@ -124,7 +124,6 @@ function pick({ url, token, trackingId, ...rest }) {
|
|
|
124
124
|
url,
|
|
125
125
|
token,
|
|
126
126
|
trackingId,
|
|
127
|
-
...(!!rest.user && { user: rest.user }),
|
|
128
127
|
...(!!rest.mode && { mode: rest.mode }),
|
|
129
128
|
...(!!rest.source && { source: rest.source }),
|
|
130
129
|
});
|
package/lib/relay.mjs
CHANGED
|
@@ -32,11 +32,11 @@ function createClientIdManager(environmentManager) {
|
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
const version = "0.7.
|
|
35
|
+
const version = "0.7.7";
|
|
36
36
|
|
|
37
37
|
function getEventConfig(config) {
|
|
38
|
-
const { trackingId
|
|
39
|
-
return { trackingId
|
|
38
|
+
const { trackingId } = config;
|
|
39
|
+
return { trackingId };
|
|
40
40
|
}
|
|
41
41
|
function getSource(config) {
|
|
42
42
|
return (config.source || []).concat([`relay@${version}`]);
|
|
@@ -124,7 +124,6 @@ function pick({ url, token, trackingId, ...rest }) {
|
|
|
124
124
|
url,
|
|
125
125
|
token,
|
|
126
126
|
trackingId,
|
|
127
|
-
...(!!rest.user && { user: rest.user }),
|
|
128
127
|
...(!!rest.mode && { mode: rest.mode }),
|
|
129
128
|
...(!!rest.source && { source: rest.source }),
|
|
130
129
|
});
|
|
@@ -14,11 +14,6 @@ export interface RelayConfig {
|
|
|
14
14
|
* The unique identifier of a web property. See [Tracking ID](https://docs.coveo.com/en/n8tg0567/).
|
|
15
15
|
*/
|
|
16
16
|
trackingId: string;
|
|
17
|
-
/**
|
|
18
|
-
* The application's user identity. If not set in the config, Relay will assume the identity matches
|
|
19
|
-
* the identity in the authentication or anonymous otherwise.
|
|
20
|
-
*/
|
|
21
|
-
user?: User;
|
|
22
17
|
/**
|
|
23
18
|
* Defines the library mode. The available modes are `emit` and `disabled`.
|
|
24
19
|
* `emit` sends analytics events to Coveo to be stored.
|
|
@@ -33,16 +28,6 @@ export interface RelayConfig {
|
|
|
33
28
|
*/
|
|
34
29
|
source?: string[];
|
|
35
30
|
}
|
|
36
|
-
/**
|
|
37
|
-
* User which logged the event.
|
|
38
|
-
*/
|
|
39
|
-
export interface User {
|
|
40
|
-
/**
|
|
41
|
-
* The application's user identifier. An id of 'anonymous' assumes the user is explicitly anonymous. An id of null indicates
|
|
42
|
-
* the identity is equal to the identity in the authentication or anonymous.
|
|
43
|
-
*/
|
|
44
|
-
id: string | null;
|
|
45
|
-
}
|
|
46
31
|
export interface ConfigManager {
|
|
47
32
|
get: () => Readonly<RelayConfig>;
|
|
48
33
|
update: (updatedConfig: Partial<RelayConfig>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAE3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,QAAQ,CAAC,WAAW,CAAC,CAAC;IACjC,MAAM,EAAE,CAAC,aAAa,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CACvD;AAiBD,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,WAAW,GACzB,QAAQ,CAAC,aAAa,CAAC,CASzB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClientIdManager } from "../../client-id/client-id";
|
|
2
2
|
import { Environment } from "../../environment/environment";
|
|
3
|
-
import { RelayConfig
|
|
3
|
+
import { RelayConfig } from "../../config/config";
|
|
4
4
|
/**
|
|
5
5
|
* The `EventConfig` object provides additonal information for the configuration associated with the event.
|
|
6
6
|
*/
|
|
@@ -9,10 +9,6 @@ export interface EventConfig {
|
|
|
9
9
|
* The unique identifier of a web property. See [Tracking ID](https://docs.coveo.com/en/n8tg0567/).
|
|
10
10
|
*/
|
|
11
11
|
trackingId: string;
|
|
12
|
-
/**
|
|
13
|
-
* Named user identity which logged this event.
|
|
14
|
-
*/
|
|
15
|
-
user: User;
|
|
16
12
|
}
|
|
17
13
|
/**
|
|
18
14
|
* The `Meta` object provides a structured representation of metadata associated with an emitted event.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../../src/event/meta/meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../../src/event/meta/meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,IAAI;IACnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,WAAW,CAAC;IAEpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAWD,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,WAAW,EACnB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,GAC/B,QAAQ,CAAC,IAAI,CAAC,CAehB"}
|
package/lib/types/relay.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RelayEvent } from "./event/relay-event";
|
|
2
2
|
import { Meta, EventConfig } from "./event/meta/meta";
|
|
3
3
|
import { EventCallback } from "./listener/listener";
|
|
4
|
-
import { RelayConfig
|
|
4
|
+
import { RelayConfig } from "./config/config";
|
|
5
5
|
import { RelayPayload } from "./relay-payload";
|
|
6
6
|
/**
|
|
7
7
|
* Function that detaches an event callback.
|
|
@@ -68,5 +68,5 @@ interface Relay {
|
|
|
68
68
|
* @returns {Relay}
|
|
69
69
|
*/
|
|
70
70
|
export declare function createRelay(initialConfig: RelayConfig): Relay;
|
|
71
|
-
export type { Relay, Meta, EventConfig, EventCallback, RelayConfig,
|
|
71
|
+
export type { Relay, Meta, EventConfig, EventCallback, RelayConfig, RelayPayload, RelayEvent, };
|
|
72
72
|
//# sourceMappingURL=relay.d.ts.map
|
package/lib/types/relay.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relay.d.ts","sourceRoot":"","sources":["../../src/relay.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EAAc,IAAI,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAyB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAuB,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"relay.d.ts","sourceRoot":"","sources":["../../src/relay.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EAAc,IAAI,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAyB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAuB,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;GAIG;AACH,MAAM,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC;AAE7B;;;GAGG;AACH,UAAU,KAAK;IACb;;;;;OAKG;IACH,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IAE3D;;;;OAIG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEhC;;;;;;;;;OASG;IACH,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,KAAK,GAAG,CAAC;IAEnD;;;;;;OAMG;IACH,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IAEtD;;;;OAIG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAErD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,aAAa,EAAE,WAAW,GAAG,KAAK,CA4C7D;AAED,YAAY,EACV,KAAK,EACL,IAAI,EACJ,WAAW,EACX,aAAa,EACb,WAAW,EACX,YAAY,EACZ,UAAU,GACX,CAAC"}
|