@availity/analytics-core 4.1.0 → 4.1.2
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/CHANGELOG.md +14 -0
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +2 -2
- package/project.json +2 -1
- package/src/telemetry.d.ts +8 -1
- package/src/telemetry.js +5 -1
- package/src/tests/{telmetry.test.ts → telemetry.test.ts} +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [4.1.2](https://github.com/Availity/sdk-js/compare/@availity/analytics-core@4.1.1...@availity/analytics-core@4.1.2) (2024-05-30)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [4.1.1](https://github.com/Availity/sdk-js/compare/@availity/analytics-core@4.1.0...@availity/analytics-core@4.1.1) (2024-05-30)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **analytics-core:** add owner to request ([833aecc](https://github.com/Availity/sdk-js/commit/833aecc3096a69f24f17e207964209f6a103586e))
|
|
15
|
+
* **analytics-core:** update tests and types ([16e8f74](https://github.com/Availity/sdk-js/commit/16e8f74a32d497f466f88d9457114d939529c3d5))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
5
19
|
# [4.1.0](https://github.com/Availity/sdk-js/compare/@availity/analytics-core@4.0.5...@availity/analytics-core@4.1.0) (2024-03-07)
|
|
6
20
|
|
|
7
21
|
|
package/dist/index.d.mts
CHANGED
|
@@ -72,7 +72,14 @@ declare class AvSplunkAnalytics extends AvAnalyticsPlugin {
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
declare class AvTelemetryAnalytics extends AvAnalyticsPlugin {
|
|
75
|
-
constructor(
|
|
75
|
+
constructor(
|
|
76
|
+
AvLogMessages: any,
|
|
77
|
+
enabled?: boolean,
|
|
78
|
+
source_system: string,
|
|
79
|
+
contact: string,
|
|
80
|
+
owner: string,
|
|
81
|
+
sessionId?: string
|
|
82
|
+
);
|
|
76
83
|
|
|
77
84
|
trackEvent(properties: any): any;
|
|
78
85
|
|
package/dist/index.d.ts
CHANGED
|
@@ -72,7 +72,14 @@ declare class AvSplunkAnalytics extends AvAnalyticsPlugin {
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
declare class AvTelemetryAnalytics extends AvAnalyticsPlugin {
|
|
75
|
-
constructor(
|
|
75
|
+
constructor(
|
|
76
|
+
AvLogMessages: any,
|
|
77
|
+
enabled?: boolean,
|
|
78
|
+
source_system: string,
|
|
79
|
+
contact: string,
|
|
80
|
+
owner: string,
|
|
81
|
+
sessionId?: string
|
|
82
|
+
);
|
|
76
83
|
|
|
77
84
|
trackEvent(properties: any): any;
|
|
78
85
|
|
package/dist/index.js
CHANGED
|
@@ -272,15 +272,18 @@ var AvSplunkAnalytics = class extends AvAnalyticsPlugin {
|
|
|
272
272
|
// src/telemetry.js
|
|
273
273
|
var import_uuid = require("uuid");
|
|
274
274
|
var AvTelemetryAnalytics = class extends AvAnalyticsPlugin {
|
|
275
|
-
constructor(AvLogMessages, enabled, source_system, contact, sessionId) {
|
|
275
|
+
constructor(AvLogMessages, enabled, source_system, contact, owner, sessionId) {
|
|
276
276
|
super(enabled);
|
|
277
277
|
this.AvLogMessages = AvLogMessages;
|
|
278
278
|
if (!source_system)
|
|
279
279
|
throw new Error("source_system is required");
|
|
280
280
|
if (!contact)
|
|
281
281
|
throw new Error("contact is required");
|
|
282
|
+
if (!owner)
|
|
283
|
+
throw new Error("owner is required");
|
|
282
284
|
this.source_system = source_system;
|
|
283
285
|
this.contact = contact;
|
|
286
|
+
this.owner = owner;
|
|
284
287
|
this.sessionId = sessionId || (0, import_uuid.v4)();
|
|
285
288
|
}
|
|
286
289
|
trackEvent(_a) {
|
|
@@ -291,6 +294,7 @@ var AvTelemetryAnalytics = class extends AvAnalyticsPlugin {
|
|
|
291
294
|
source_system: this.source_system,
|
|
292
295
|
version: "v1",
|
|
293
296
|
sessionId: this.sessionId,
|
|
297
|
+
owner: this.owner,
|
|
294
298
|
telemetryBody: {
|
|
295
299
|
level: level || "info",
|
|
296
300
|
entries: __spreadValues({}, properties)
|
package/dist/index.mjs
CHANGED
|
@@ -235,15 +235,18 @@ var AvSplunkAnalytics = class extends AvAnalyticsPlugin {
|
|
|
235
235
|
// src/telemetry.js
|
|
236
236
|
import { v4 as uuidv4 } from "uuid";
|
|
237
237
|
var AvTelemetryAnalytics = class extends AvAnalyticsPlugin {
|
|
238
|
-
constructor(AvLogMessages, enabled, source_system, contact, sessionId) {
|
|
238
|
+
constructor(AvLogMessages, enabled, source_system, contact, owner, sessionId) {
|
|
239
239
|
super(enabled);
|
|
240
240
|
this.AvLogMessages = AvLogMessages;
|
|
241
241
|
if (!source_system)
|
|
242
242
|
throw new Error("source_system is required");
|
|
243
243
|
if (!contact)
|
|
244
244
|
throw new Error("contact is required");
|
|
245
|
+
if (!owner)
|
|
246
|
+
throw new Error("owner is required");
|
|
245
247
|
this.source_system = source_system;
|
|
246
248
|
this.contact = contact;
|
|
249
|
+
this.owner = owner;
|
|
247
250
|
this.sessionId = sessionId || uuidv4();
|
|
248
251
|
}
|
|
249
252
|
trackEvent(_a) {
|
|
@@ -254,6 +257,7 @@ var AvTelemetryAnalytics = class extends AvAnalyticsPlugin {
|
|
|
254
257
|
source_system: this.source_system,
|
|
255
258
|
version: "v1",
|
|
256
259
|
sessionId: this.sessionId,
|
|
260
|
+
owner: this.owner,
|
|
257
261
|
telemetryBody: {
|
|
258
262
|
level: level || "info",
|
|
259
263
|
entries: __spreadValues({}, properties)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/analytics-core",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.2",
|
|
4
4
|
"description": "Analytics base configuration for sdk-js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"availity",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"yup": "^0.32.11"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@availity/api-axios": "8.0.
|
|
35
|
+
"@availity/api-axios": "8.0.8",
|
|
36
36
|
"tsup": "^7.2.0",
|
|
37
37
|
"typescript": "^5.1.6"
|
|
38
38
|
},
|
package/project.json
CHANGED
package/src/telemetry.d.ts
CHANGED
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
import AvAnalyticsPlugin from './plugin';
|
|
4
4
|
|
|
5
5
|
declare class AvTelemetryAnalytics extends AvAnalyticsPlugin {
|
|
6
|
-
constructor(
|
|
6
|
+
constructor(
|
|
7
|
+
AvLogMessages: any,
|
|
8
|
+
enabled?: boolean,
|
|
9
|
+
source_system: string,
|
|
10
|
+
contact: string,
|
|
11
|
+
owner: string,
|
|
12
|
+
sessionId?: string
|
|
13
|
+
);
|
|
7
14
|
|
|
8
15
|
trackEvent(properties: any): any;
|
|
9
16
|
|
package/src/telemetry.js
CHANGED
|
@@ -2,14 +2,17 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
2
2
|
import AvAnalyticsPlugin from './plugin';
|
|
3
3
|
|
|
4
4
|
export default class AvTelemetryAnalytics extends AvAnalyticsPlugin {
|
|
5
|
-
constructor(AvLogMessages, enabled, source_system, contact, sessionId) {
|
|
5
|
+
constructor(AvLogMessages, enabled, source_system, contact, owner, sessionId) {
|
|
6
6
|
super(enabled);
|
|
7
7
|
this.AvLogMessages = AvLogMessages;
|
|
8
8
|
|
|
9
9
|
if (!source_system) throw new Error('source_system is required');
|
|
10
10
|
if (!contact) throw new Error('contact is required');
|
|
11
|
+
if (!owner) throw new Error('owner is required');
|
|
12
|
+
|
|
11
13
|
this.source_system = source_system;
|
|
12
14
|
this.contact = contact;
|
|
15
|
+
this.owner = owner;
|
|
13
16
|
this.sessionId = sessionId || uuidv4();
|
|
14
17
|
}
|
|
15
18
|
|
|
@@ -20,6 +23,7 @@ export default class AvTelemetryAnalytics extends AvAnalyticsPlugin {
|
|
|
20
23
|
source_system: this.source_system,
|
|
21
24
|
version: 'v1',
|
|
22
25
|
sessionId: this.sessionId,
|
|
26
|
+
owner: this.owner,
|
|
23
27
|
telemetryBody: {
|
|
24
28
|
level: level || 'info',
|
|
25
29
|
entries: {
|
|
@@ -10,7 +10,7 @@ describe('AvTelemetryAnalytics', () => {
|
|
|
10
10
|
test: jest.fn(),
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
mockAvTelemetryAnalytics = new AvTelemetryAnalytics(mockLog, false, 'testApp', 'AVOSS@availity.com', '1234');
|
|
13
|
+
mockAvTelemetryAnalytics = new AvTelemetryAnalytics(mockLog, false, 'testApp', 'AVOSS@availity.com', '555', '1234');
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
test('AvTelemetryAnalytics should be defined', () => {
|
|
@@ -43,6 +43,7 @@ describe('AvTelemetryAnalytics', () => {
|
|
|
43
43
|
let expectedCall = {
|
|
44
44
|
contact: 'AVOSS@availity.com',
|
|
45
45
|
customerId: '0000',
|
|
46
|
+
owner: '555',
|
|
46
47
|
sessionId: '1234',
|
|
47
48
|
source_system: 'testApp',
|
|
48
49
|
telemetryBody: {
|
|
@@ -67,6 +68,7 @@ describe('AvTelemetryAnalytics', () => {
|
|
|
67
68
|
expectedCall = {
|
|
68
69
|
contact: 'AVOSS@availity.com',
|
|
69
70
|
customerId: '0000',
|
|
71
|
+
owner: '555',
|
|
70
72
|
sessionId: '1234',
|
|
71
73
|
source_system: 'testApp',
|
|
72
74
|
telemetryBody: {
|