@observertc/observer-js
Advanced tools
Comparing version 0.40.22 to 0.40.23
@@ -130,4 +130,6 @@ /// <reference types="node" /> | ||
close(): void; | ||
addEventReport(params: PartialBy<Omit<CallEventReport, 'serviceId' | 'roomId' | 'callId' | 'clientId' | 'userId' | 'marker'>, 'timestamp'>): void; | ||
addExtensionStatsReport(extensionType: string, payload: Record<string, unknown>): void; | ||
addEventReport(params: PartialBy<Omit<CallEventReport, 'serviceId' | 'roomId' | 'callId' | 'clientId' | 'userId' | 'marker'>, 'timestamp'> & { | ||
attachments?: Record<string, unknown>; | ||
}): void; | ||
addExtensionStatsReport(extensionType: string, payload?: Record<string, unknown>): void; | ||
addIssue(issue: ClientIssue): void; | ||
@@ -134,0 +136,0 @@ accept(sample: ClientSample): void; |
@@ -139,3 +139,4 @@ "use strict"; | ||
var _a; | ||
this.reports.addCallEventReport(Object.assign(Object.assign({}, params), { serviceId: this.serviceId, mediaUnitId: this.mediaUnitId, roomId: this.roomId, callId: this.callId, clientId: this.clientId, userId: this.userId, timestamp: (_a = params.timestamp) !== null && _a !== void 0 ? _a : Date.now(), marker: this.marker })); | ||
const { attachments } = params, fields = __rest(params, ["attachments"]); | ||
this.reports.addCallEventReport(Object.assign(Object.assign({}, fields), { serviceId: this.serviceId, mediaUnitId: this.mediaUnitId, roomId: this.roomId, callId: this.callId, clientId: this.clientId, userId: this.userId, timestamp: (_a = params.timestamp) !== null && _a !== void 0 ? _a : Date.now(), marker: this.marker, attachments: attachments ? JSON.stringify(attachments) : undefined })); | ||
} | ||
@@ -142,0 +143,0 @@ addExtensionStatsReport(extensionType, payload) { |
@@ -53,5 +53,8 @@ /// <reference types="node" /> | ||
close(): void; | ||
addEventReport(params: PartialBy<Omit<SfuEventReport, 'serviceId' | 'sfuId' | 'marker'>, 'timestamp'>): void; | ||
addEventReport(params: PartialBy<Omit<SfuEventReport, 'serviceId' | 'sfuId' | 'marker' | 'attachments'>, 'timestamp'> & { | ||
attachments?: Record<string, unknown>; | ||
}): void; | ||
addExtensionStatsReport(extensionType: string, payload?: Record<string, unknown>): void; | ||
private _createTransport; | ||
} | ||
//# sourceMappingURL=ObservedSfu.d.ts.map |
"use strict"; | ||
var __rest = (this && this.__rest) || function (s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -57,4 +68,16 @@ exports.ObservedSfu = void 0; | ||
var _a; | ||
this.reports.addCallEventReport(Object.assign(Object.assign({}, params), { serviceId: this.serviceId, mediaUnitId: this.mediaUnitId, marker: this.marker, timestamp: (_a = params.timestamp) !== null && _a !== void 0 ? _a : Date.now() })); | ||
const { attachments } = params, fields = __rest(params, ["attachments"]); | ||
this.reports.addCallEventReport(Object.assign(Object.assign({}, fields), { serviceId: this.serviceId, mediaUnitId: this.mediaUnitId, marker: this.marker, timestamp: (_a = params.timestamp) !== null && _a !== void 0 ? _a : Date.now(), attachments: attachments ? JSON.stringify(attachments) : undefined })); | ||
} | ||
addExtensionStatsReport(extensionType, payload) { | ||
this.reports.addSfuExtensionReport({ | ||
serviceId: this.serviceId, | ||
mediaUnitId: this.mediaUnitId, | ||
timestamp: Date.now(), | ||
extensionType, | ||
payload: payload ? JSON.stringify(payload) : undefined, | ||
marker: this.marker, | ||
sfuId: this.sfuId, | ||
}); | ||
} | ||
update(sample) { | ||
@@ -61,0 +84,0 @@ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; |
{ | ||
"name": "@observertc/observer-js", | ||
"version": "0.40.22", | ||
"version": "0.40.23", | ||
"description": "Server Side NodeJS Library for processing ObserveRTC Samples", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -218,5 +218,10 @@ import { Browser, ClientSample, Engine, IceLocalCandidate, IceRemoteCandidate, OperationSystem, Platform } from '@observertc/sample-schemas-js'; | ||
public addEventReport(params: PartialBy<Omit<CallEventReport, 'serviceId' | 'roomId' | 'callId' | 'clientId' | 'userId' | 'marker'>, 'timestamp'>) { | ||
public addEventReport(params: PartialBy<Omit<CallEventReport, 'serviceId' | 'roomId' | 'callId' | 'clientId' | 'userId' | 'marker'>, 'timestamp'> & { attachments?: Record<string, unknown> }) { | ||
const { | ||
attachments, | ||
...fields | ||
} = params; | ||
this.reports.addCallEventReport({ | ||
...params, | ||
...fields, | ||
serviceId: this.serviceId, | ||
@@ -230,6 +235,7 @@ mediaUnitId: this.mediaUnitId, | ||
marker: this.marker, | ||
attachments: attachments ? JSON.stringify(attachments) : undefined, | ||
}); | ||
} | ||
public addExtensionStatsReport(extensionType: string, payload: Record<string, unknown>) { | ||
public addExtensionStatsReport(extensionType: string, payload?: Record<string, unknown>) { | ||
this.reports.addClientExtensionReport({ | ||
@@ -251,2 +257,3 @@ serviceId: this.serviceId, | ||
try { | ||
this.reports.addCallEventReport({ | ||
@@ -253,0 +260,0 @@ serviceId: this.serviceId, |
@@ -101,5 +101,10 @@ import { EventEmitter } from 'events'; | ||
public addEventReport(params: PartialBy<Omit<SfuEventReport, 'serviceId' | 'sfuId' | 'marker'>, 'timestamp'>) { | ||
public addEventReport(params: PartialBy<Omit<SfuEventReport, 'serviceId' | 'sfuId' | 'marker' | 'attachments'>, 'timestamp'> & { attachments?: Record<string, unknown> }) { | ||
const { | ||
attachments, | ||
...fields | ||
} = params; | ||
this.reports.addCallEventReport({ | ||
...params, | ||
...fields, | ||
serviceId: this.serviceId, | ||
@@ -109,5 +114,18 @@ mediaUnitId: this.mediaUnitId, | ||
timestamp: params.timestamp ?? Date.now(), | ||
attachments: attachments ? JSON.stringify(attachments) : undefined, | ||
}); | ||
} | ||
public addExtensionStatsReport(extensionType: string, payload?: Record<string, unknown>) { | ||
this.reports.addSfuExtensionReport({ | ||
serviceId: this.serviceId, | ||
mediaUnitId: this.mediaUnitId, | ||
timestamp: Date.now(), | ||
extensionType, | ||
payload: payload ? JSON.stringify(payload) : undefined, | ||
marker: this.marker, | ||
sfuId: this.sfuId, | ||
}); | ||
} | ||
public update(sample: SfuSample) { | ||
@@ -114,0 +132,0 @@ if (this._closed) throw new Error(`Sfu ${this.sfuId} is closed`); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
426695
8812