@coveo/relay 0.1.2 → 0.2.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/lib/relay.cjs +2 -1
- package/lib/relay.js +2 -1
- package/lib/relay.mjs +2 -1
- package/lib/types/relay.d.ts +2 -0
- package/lib/types/relay.d.ts.map +1 -1
- package/package.json +3 -3
package/lib/relay.cjs
CHANGED
|
@@ -134,7 +134,7 @@ function isBrowser() {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
const version = "0.
|
|
137
|
+
const version = "0.2.0" ;
|
|
138
138
|
|
|
139
139
|
function getConfig(options) {
|
|
140
140
|
const { trackingId } = options;
|
|
@@ -187,6 +187,7 @@ function createRelay(options) {
|
|
|
187
187
|
environment,
|
|
188
188
|
event: createRelayEvent(type, payload, options, environment, clientIdManager),
|
|
189
189
|
}),
|
|
190
|
+
getMeta: (type) => createMeta(type, options, environment, clientIdManager),
|
|
190
191
|
version,
|
|
191
192
|
};
|
|
192
193
|
}
|
package/lib/relay.js
CHANGED
|
@@ -138,7 +138,7 @@ function isBrowser() {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
const version = "0.
|
|
141
|
+
const version = "0.2.0" ;
|
|
142
142
|
|
|
143
143
|
function getConfig(options) {
|
|
144
144
|
const { trackingId } = options;
|
|
@@ -191,6 +191,7 @@ function createRelay(options) {
|
|
|
191
191
|
environment,
|
|
192
192
|
event: createRelayEvent(type, payload, options, environment, clientIdManager),
|
|
193
193
|
}),
|
|
194
|
+
getMeta: (type) => createMeta(type, options, environment, clientIdManager),
|
|
194
195
|
version,
|
|
195
196
|
};
|
|
196
197
|
}
|
package/lib/relay.mjs
CHANGED
|
@@ -132,7 +132,7 @@ function isBrowser() {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
const version = "0.
|
|
135
|
+
const version = "0.2.0" ;
|
|
136
136
|
|
|
137
137
|
function getConfig(options) {
|
|
138
138
|
const { trackingId } = options;
|
|
@@ -185,6 +185,7 @@ function createRelay(options) {
|
|
|
185
185
|
environment,
|
|
186
186
|
event: createRelayEvent(type, payload, options, environment, clientIdManager),
|
|
187
187
|
}),
|
|
188
|
+
getMeta: (type) => createMeta(type, options, environment, clientIdManager),
|
|
188
189
|
version,
|
|
189
190
|
};
|
|
190
191
|
}
|
package/lib/types/relay.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ValidationError, ValidationResponse } from "./validate/validate";
|
|
2
|
+
import { Meta } from "./event/meta/meta";
|
|
2
3
|
type RelayPayload = Record<string, unknown>;
|
|
3
4
|
interface RelayOptions {
|
|
4
5
|
host: string;
|
|
@@ -9,6 +10,7 @@ interface RelayOptions {
|
|
|
9
10
|
interface Relay {
|
|
10
11
|
validate: (type: string, payload: RelayPayload) => Promise<ValidationResponse>;
|
|
11
12
|
emit: (type: string, payload: RelayPayload) => Promise<void>;
|
|
13
|
+
getMeta: (type: string) => Meta;
|
|
12
14
|
version: string;
|
|
13
15
|
}
|
|
14
16
|
export declare function createRelay(options: RelayOptions): Relay;
|
package/lib/types/relay.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relay.d.ts","sourceRoot":"","sources":["../../src/relay.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,eAAe,EACf,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"relay.d.ts","sourceRoot":"","sources":["../../src/relay.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,eAAe,EACf,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAc,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAErD,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5C,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,CACR,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,YAAY,KAClB,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACjC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,KAAK,CAiCxD;AAED,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveo/relay",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "A library for sending analytics events using Coveo's Event protocol.",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib/**/*"
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"rollup": "^3.28.0",
|
|
49
49
|
"ts-jest": "^29.1.1",
|
|
50
50
|
"typescript": "^5.1.6",
|
|
51
|
-
"
|
|
52
|
-
"
|
|
51
|
+
"tsconfig": "0.0.0",
|
|
52
|
+
"eslint-config-custom": "0.0.0"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"uuid": "^9.0.0"
|