@observertc/observer-js 0.9.19-beta → 0.9.20-beta

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.
@@ -38,7 +38,7 @@ function createDetachClientProcess(storageProvider, reports) {
38
38
  if (!deletedClient) {
39
39
  continue;
40
40
  }
41
- const { roomId, serviceId, mediaUnitId, marker, callId } = deletedClient;
41
+ const { roomId, serviceId, mediaUnitId, marker, callId, userId } = deletedClient;
42
42
  if (!roomId || !serviceId || !mediaUnitId || !callId) {
43
43
  continue;
44
44
  }
@@ -48,7 +48,7 @@ function createDetachClientProcess(storageProvider, reports) {
48
48
  closed: detached,
49
49
  });
50
50
  }
51
- reports.addCallEventReport((0, callEventReports_1.createClientLeftEventReport)(serviceId, mediaUnitId, roomId, callId, clientId, detached, marker));
51
+ reports.addCallEventReport((0, callEventReports_1.createClientLeftEventReport)(serviceId, mediaUnitId, roomId, callId, clientId, detached, userId, marker));
52
52
  evaluatorContext === null || evaluatorContext === void 0 ? void 0 : evaluatorContext.detachedClients.push({
53
53
  ...deletedClient,
54
54
  detached: Number(detached),
@@ -1 +1 @@
1
- {"version":3,"file":"joinClientProcess.d.ts","sourceRoot":"","sources":["../../src/processes/joinClientProcess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAI3C,MAAM,MAAM,sBAAsB,GAAG;IACpC,OAAO,EAAE,0BAA0B,EAAE,CAAC;IAEtC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;CAC9C,CAAC;AAEF,wBAAgB,uBAAuB,CACtC,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,gBAAgB,GACvB,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,CAAC,CAyGlD"}
1
+ {"version":3,"file":"joinClientProcess.d.ts","sourceRoot":"","sources":["../../src/processes/joinClientProcess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAI3C,MAAM,MAAM,sBAAsB,GAAG;IACpC,OAAO,EAAE,0BAA0B,EAAE,CAAC;IAEtC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;CAC9C,CAAC;AAEF,wBAAgB,uBAAuB,CACtC,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,gBAAgB,GACvB,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,CAAC,CA2GlD"}
@@ -91,13 +91,13 @@ function createJoinClientProcess(storageProvider, reports) {
91
91
  await clientStorage.setAll(newClients);
92
92
  }
93
93
  for (const [clientId, client] of newClients) {
94
- const { serviceId, mediaUnitId, roomId, callId, clientId: savedClientId,
94
+ const { serviceId, mediaUnitId, roomId, callId, clientId: savedClientId, userId,
95
95
  // timeZoneId,
96
96
  marker, joined, } = client;
97
97
  if (!serviceId || !mediaUnitId || !roomId || !callId || !savedClientId) {
98
98
  continue;
99
99
  }
100
- const callEvent = (0, callEventReports_1.createClientJoinedEventReport)(serviceId, mediaUnitId, roomId, callId, clientId, Number(joined), marker);
100
+ const callEvent = (0, callEventReports_1.createClientJoinedEventReport)(serviceId, mediaUnitId, roomId, callId, clientId, Number(joined), userId, marker);
101
101
  reports.addCallEventReport(callEvent);
102
102
  evaluatorContext === null || evaluatorContext === void 0 ? void 0 : evaluatorContext.joinedClientIds.push(clientId);
103
103
  }
@@ -11,8 +11,8 @@ export declare enum CallEventType {
11
11
  }
12
12
  export declare function createCallStartedEventReport(serviceId: string, roomId: string, callId: string, timestamp: number, marker?: string): CallEventReport;
13
13
  export declare function createCallEndedEventReport(serviceId: string, roomId: string, callId: string, timestamp: number, marker?: string): CallEventReport;
14
- export declare function createClientJoinedEventReport(serviceId: string, mediaUnitId: string, roomId: string, callId: string, clientId: string, timestamp: number, marker?: string): CallEventReport;
15
- export declare function createClientLeftEventReport(serviceId: string, mediaUnitId: string, roomId: string, callId: string, clientId: string, timestamp: number, marker?: string): CallEventReport;
14
+ export declare function createClientJoinedEventReport(serviceId: string, mediaUnitId: string, roomId: string, callId: string, clientId: string, timestamp: number, userId?: string, marker?: string): CallEventReport;
15
+ export declare function createClientLeftEventReport(serviceId: string, mediaUnitId: string, roomId: string, callId: string, clientId: string, timestamp: number, userId?: string, marker?: string): CallEventReport;
16
16
  export declare function createPeerConnectionOpenedEventReport(serviceId: string, mediaUnitId: string, roomId: string, callId: string, clientId: string, peerConnectionId: string, timestamp: number, marker?: string): CallEventReport;
17
17
  export declare function createPeerConnectionClosedEventReport(serviceId: string, mediaUnitId: string, roomId: string, callId: string, clientId: string, peerConnectionId: string, timestamp: number, marker?: string): CallEventReport;
18
18
  export declare function createMediaTrackAddedEventReport(serviceId: string, mediaUnitId: string, roomId: string, callId: string, clientId: string, peerConnectionId: string, mediaTrackId: string, timestamp: number, marker?: string): CallEventReport;
@@ -1 +1 @@
1
- {"version":3,"file":"callEventReports.d.ts","sourceRoot":"","sources":["../../src/sinks/callEventReports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,oBAAY,aAAa;IACxB,YAAY,iBAAiB;IAC7B,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAC/B,WAAW,gBAAg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AAM,EAChB,gBAAgB,EAAE,MAAM,EACxB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GACb,eAAe,CAYjB;AAED,wBAAgB,gCAAgC,CAC/C,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,EACxB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GACb,eAAe,CAajB;AAED,wBAAgB,kCAAkC,CACjD,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,EACxB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GACb,eAAe,CAajB"}
1
+ {"version":3,"file":"callEventReports.d.ts","sourceRoot":"","sources":["../../src/sinks/callEventReports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,oBAAY,aAAa;IACxB,YAAY,iBAAiB;IAC7B,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAC/B,WAAW,gBAAgB;IAC3B,sBAAsB,2BAA2B;IACjD,sBAAsB,2BAA2B;IACjD,iBAAiB,sBAAsB;IACvC,mBAAmB,wBAAwB;CAC3C;AACD,wBAAgB,4BAA4B,CAC3C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GACb,eAAe,CASjB;AAED,wBAAgB,0BAA0B,CACzC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,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E,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GACb,eAAe,CAajB;AAED,wBAAgB,kCAAkC,CACjD,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,EACxB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GACb,eAAe,CAajB"}
@@ -34,7 +34,7 @@ function createCallEndedEventReport(serviceId, roomId, callId, timestamp, marker
34
34
  };
35
35
  }
36
36
  exports.createCallEndedEventReport = createCallEndedEventReport;
37
- function createClientJoinedEventReport(serviceId, mediaUnitId, roomId, callId, clientId, timestamp, marker) {
37
+ function createClientJoinedEventReport(serviceId, mediaUnitId, roomId, callId, clientId, timestamp, userId, marker) {
38
38
  return {
39
39
  name: CallEventType.CLIENT_JOINED,
40
40
  serviceId,
@@ -43,11 +43,12 @@ function createClientJoinedEventReport(serviceId, mediaUnitId, roomId, callId, c
43
43
  callId,
44
44
  clientId,
45
45
  timestamp,
46
+ userId,
46
47
  marker,
47
48
  };
48
49
  }
49
50
  exports.createClientJoinedEventReport = createClientJoinedEventReport;
50
- function createClientLeftEventReport(serviceId, mediaUnitId, roomId, callId, clientId, timestamp, marker) {
51
+ function createClientLeftEventReport(serviceId, mediaUnitId, roomId, callId, clientId, timestamp, userId, marker) {
51
52
  return {
52
53
  name: CallEventType.CLIENT_LEFT,
53
54
  serviceId,
@@ -56,6 +57,7 @@ function createClientLeftEventReport(serviceId, mediaUnitId, roomId, callId, cli
56
57
  callId,
57
58
  clientId,
58
59
  timestamp,
60
+ userId,
59
61
  marker,
60
62
  };
61
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@observertc/observer-js",
3
- "version": "0.9.19-beta",
3
+ "version": "0.9.20-beta",
4
4
  "description": "Server Side NodeJS Library for processing ObserveRTC Samples",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -58,7 +58,7 @@ export function createDetachClientProcess(
58
58
  if (!deletedClient) {
59
59
  continue;
60
60
  }
61
- const { roomId, serviceId, mediaUnitId, marker, callId } = deletedClient;
61
+ const { roomId, serviceId, mediaUnitId, marker, callId, userId } = deletedClient;
62
62
  if (!roomId || !serviceId || !mediaUnitId || !callId) {
63
63
  continue;
64
64
  }
@@ -71,7 +71,7 @@ export function createDetachClientProcess(
71
71
  }
72
72
 
73
73
  reports.addCallEventReport(
74
- createClientLeftEventReport(serviceId, mediaUnitId, roomId, callId, clientId, detached, marker)
74
+ createClientLeftEventReport(serviceId, mediaUnitId, roomId, callId, clientId, detached, userId, marker)
75
75
  );
76
76
  evaluatorContext?.detachedClients.push({
77
77
  ...deletedClient,
@@ -10,12 +10,12 @@ function groupToMap<T>(input: ReadonlyMap<string, T>, getGroupKey: (value: T) =>
10
10
  const groupKey = getGroupKey(value);
11
11
  if (!groupKey) continue;
12
12
 
13
- let group = result.get(groupKey);
13
+ let group = result.get(groupKey);
14
14
  if (group === undefined) {
15
15
  group = [];
16
16
  result.set(groupKey, group);
17
17
  }
18
- group.push(value);
18
+ group.push(value);
19
19
  }
20
20
  return result;
21
21
  }
@@ -100,6 +100,7 @@ export function createJoinClientProcess(
100
100
  roomId,
101
101
  callId,
102
102
  clientId: savedClientId,
103
+ userId,
103
104
  // timeZoneId,
104
105
  marker,
105
106
  joined,
@@ -116,6 +117,7 @@ export function createJoinClientProcess(
116
117
  callId,
117
118
  clientId,
118
119
  Number(joined),
120
+ userId,
119
121
  marker
120
122
  );
121
123
  reports.addCallEventReport(callEvent);
@@ -52,6 +52,7 @@ export function createClientJoinedEventReport(
52
52
  callId: string,
53
53
  clientId: string,
54
54
  timestamp: number,
55
+ userId?: string,
55
56
  marker?: string
56
57
  ): CallEventReport {
57
58
  return {
@@ -62,6 +63,7 @@ export function createClientJoinedEventReport(
62
63
  callId,
63
64
  clientId,
64
65
  timestamp,
66
+ userId,
65
67
  marker,
66
68
  };
67
69
  }
@@ -73,6 +75,7 @@ export function createClientLeftEventReport(
73
75
  callId: string,
74
76
  clientId: string,
75
77
  timestamp: number,
78
+ userId?: string,
76
79
  marker?: string
77
80
  ): CallEventReport {
78
81
  return {
@@ -83,6 +86,7 @@ export function createClientLeftEventReport(
83
86
  callId,
84
87
  clientId,
85
88
  timestamp,
89
+ userId,
86
90
  marker,
87
91
  };
88
92
  }