Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@huddle01/observer-client-sdk

Package Overview
Dependencies
Maintainers
0
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@huddle01/observer-client-sdk - npm Package Compare versions

Comparing version 0.11.1-331ffd9.0 to 0.11.1-33704a4.0

lib/datastreams/ReportSchemas.d.ts

9

lib/index.d.ts

@@ -1,10 +0,9 @@

export { ObserverClient, ObserverClientConfig, ObserverClientEventMap, } from './ObserverClient';
export { ObserverDashboardClient, ObserverDashboardClientConfig, ObserverDashboardClientEventMap, } from './ObserverDashboardClient';
export { WebSocketConnector, WebSocketConnectorConfig, WebSocketConnectorEventMap, WebSocketConnectorState, } from './WebSocketConnector';
export { CallEventReport, CallMetaReport, ClientDataChannelReport, ClientExtensionReport, IceCandidatePairReport, InboundAudioTrackReport, InboundVideoTrackReport, OutboundAudioTrackReport, OutboundVideoTrackReport, PeerConnectionTransportReport, } from './protocols/ReportTypes';
export { DatabaseFrameSchema, DatabaseFrameConditions, } from './datastreams/DatabaseFrame';
export { DataFrame, DataFrameConfig, DataFrameEvents, } from './datastreams/DataFrame';
export { ObserverAdminClient } from './ObserverAdminClient';
export * as DashboardProtocol from './protocols/DashboardMessageProtocol';
export { ObserverDashboardDataStream, ObserverDashboardDataStreamConfig as DataFrameConfig, ObserverDashboardDataStreamEventsMap, } from './ObservedDashboardDataStream';
export { ObserverDashboardAdminClient } from './ObserverDashboardAdminClient';
export { DashboardQueryRequest, DashboardNotification, DashboardMessage, } from './protocols/DashboardMessageProtocol';
export * as CallSnapshotSchema from './protocols/CallSnapshotSchema';
export { DataStream } from './datastreams/DataStream';
//# sourceMappingURL=index.d.ts.map

@@ -26,12 +26,13 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CallSnapshotSchema = exports.DashboardProtocol = exports.ObserverAdminClient = exports.DataFrame = exports.WebSocketConnector = exports.ObserverClient = void 0;
var ObserverClient_1 = require("./ObserverClient");
Object.defineProperty(exports, "ObserverClient", { enumerable: true, get: function () { return ObserverClient_1.ObserverClient; } });
exports.CallSnapshotSchema = exports.DashboardQueryRequest = exports.ObserverDashboardAdminClient = exports.ObserverDashboardDataStream = exports.WebSocketConnector = exports.ObserverDashboardClient = void 0;
var ObserverDashboardClient_1 = require("./ObserverDashboardClient");
Object.defineProperty(exports, "ObserverDashboardClient", { enumerable: true, get: function () { return ObserverDashboardClient_1.ObserverDashboardClient; } });
var WebSocketConnector_1 = require("./WebSocketConnector");
Object.defineProperty(exports, "WebSocketConnector", { enumerable: true, get: function () { return WebSocketConnector_1.WebSocketConnector; } });
var DataFrame_1 = require("./datastreams/DataFrame");
Object.defineProperty(exports, "DataFrame", { enumerable: true, get: function () { return DataFrame_1.DataFrame; } });
var ObserverAdminClient_1 = require("./ObserverAdminClient");
Object.defineProperty(exports, "ObserverAdminClient", { enumerable: true, get: function () { return ObserverAdminClient_1.ObserverAdminClient; } });
exports.DashboardProtocol = __importStar(require("./protocols/DashboardMessageProtocol"));
var ObservedDashboardDataStream_1 = require("./ObservedDashboardDataStream");
Object.defineProperty(exports, "ObserverDashboardDataStream", { enumerable: true, get: function () { return ObservedDashboardDataStream_1.ObserverDashboardDataStream; } });
var ObserverDashboardAdminClient_1 = require("./ObserverDashboardAdminClient");
Object.defineProperty(exports, "ObserverDashboardAdminClient", { enumerable: true, get: function () { return ObserverDashboardAdminClient_1.ObserverDashboardAdminClient; } });
var DashboardMessageProtocol_1 = require("./protocols/DashboardMessageProtocol");
Object.defineProperty(exports, "DashboardQueryRequest", { enumerable: true, get: function () { return DashboardMessageProtocol_1.DashboardQueryRequest; } });
exports.CallSnapshotSchema = __importStar(require("./protocols/CallSnapshotSchema"));

@@ -9,2 +9,3 @@ import { CallSnapshot } from "./CallSnapshotSchema";

clientSnapshotResourceId: string;
reportsResourceId: string;
};

@@ -49,8 +50,53 @@ }>;

uptimeInSec: number;
ongoingCallIds: string[];
ongoingJobIds: string[];
consumerGroupId: string;
maxParallelJobs: number;
jobRouterDescription: string;
consumers: string[];
observedCalls: {
callId: string;
clientIds: string[];
}[];
jobRouter: {
createdAt: number;
maxParallelJobs: number;
ongoingJobs: Record<string, unknown>[];
consumers: Record<string, unknown>[];
description?: string;
};
streamRouter: {
emitter: {
numberOfSubscriptions: number;
numberOfSentEventInvocations: number;
numberOfReceivedEventInvocations: number;
};
sinks: {
sinkId: string;
streamId: string;
state: string;
streamProviderPeerId?: string;
}[];
streamProviders: {
streamType: string;
bytesHighWaterMark: number;
bytesLowWaterMark: number;
totalBytes: number;
collectors: {
createdAt: number;
streamId: string;
numberOfFilesUploaded: number;
numberOfSinks: number;
collectedBytes: number;
}[];
sources: {
createdAt: number;
streamId: string;
numberOfFilesDownloaded: number;
numberOfSinks: number;
activeClosingTimer: boolean;
collectedBytes: number;
}[];
}[];
};
stats: {
consumedSamples: number;
numberOfClientSamplesCollector: number;
numberOfCallSnapshotsCollector: number;
numberOfClientSnapshotsCollector: number;
};
};

@@ -65,2 +111,7 @@ export type ObserverServerState = {

activeDashboardClientIds: string[];
stats: {
dashboardClientConnections: number;
observedClientConnections: number;
producedSamples: number;
};
};

@@ -96,2 +147,12 @@ export type DashboardClientConnectionContext = {

export type GetServerStatesResponsePayload = ObserverServerState[];
export type GetTurnStatsResponsePayload = {
[K in string]: {
totalBytesSent: number;
totalBytesReceived: number;
totalPacketsSent: number;
totalPacketsReceived: number;
inboundBitrate: number;
outboundBitrate: number;
};
};
export type DashboardQueryOperations = {

@@ -105,5 +166,11 @@ findCalls: {

transportId?: string;
producerId?: string;
consumerId?: string;
};
ongoingCals: undefined;
ongoingCalls: undefined;
getTurnStats: {
startDate: number;
endDate?: number;
};
getSummaryStats: {

@@ -147,3 +214,3 @@ startDate: number;

data: unknown;
error: string;
streamerror: string;
close: undefined;

@@ -150,0 +217,0 @@ };

@@ -10,2 +10,3 @@ "use strict";

clientSnapshotResourceId: 'client-snapshot',
reportsResourceId: 'reports',
}

@@ -12,0 +13,0 @@ });

@@ -20,2 +20,3 @@ import EventEmitter from 'events';

export type WebSocketConnectorConfig = {
id?: string;
url: string;

@@ -35,2 +36,3 @@ getAccessToken?: () => Promise<string | undefined>;

constructor(config: WebSocketConnectorConfig);
get id(): string | undefined;
get accessToken(): string | undefined;

@@ -37,0 +39,0 @@ get state(): WebSocketConnectorState;

@@ -12,2 +12,3 @@ "use strict";

const logger_1 = require("./common/logger");
const uuid_1 = require("uuid");
const logger = (0, logger_1.createLogger)('WebSocketConnector');

@@ -29,3 +30,9 @@ const MAX_CONNECTION_TIMEOUT_IN_SEC = 15;

this.config = config;
if (!this.config.id) {
this.config.id = (0, uuid_1.v4)();
}
}
get id() {
return this.config.id;
}
get accessToken() {

@@ -156,3 +163,3 @@ return this._accessToken;

}
console.warn('sending request', pendingRequest.request);
// console.warn('sending request', pendingRequest.request);
this._pendingRequests.set(pendingRequest.request.requestId, pendingRequest);

@@ -159,0 +166,0 @@ this._socket?.send(this._codec.encode(pendingRequest.request));

{
"name": "@huddle01/observer-client-sdk",
"version": "0.11.1-331ffd9.0",
"description": "ObserverClient SDK",
"version": "0.11.1-33704a4.0",
"description": "ObserverDashboardClient SDK",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "types": "lib/index.d.ts",

@@ -22,5 +22,5 @@ Observer Client SDK

```javascript
import { ObserverClient } from '@huddle01/observer-client-sdk';
import { ObserverDashboardClient } from '@huddle01/observer-client-sdk';
const observerClient = new ObserverClient({
const dashboardClient = new ObserverClient({
// configuration options for connection

@@ -38,8 +38,8 @@ connection: {

observerClient.connect();
dashboardClient.connect();
```
### ObserverClient
### ObserverDashboardClient
The `ObserverClient` API provides an interface for interacting with data streams and real-time data updates via WebSocket connections. This client enables users to access call data, ongoing call information, client snapshots, and other related data through the following methods and events:
The `ObserverDashboardClient` API provides an interface for interacting with data streams and real-time data updates via WebSocket connections. This client enables users to access call data, ongoing call information, client snapshots, and other related data through the following methods and events:

@@ -50,3 +50,3 @@ #### Events

#### Configuration
- **ObserverClientConfig**: Configuration object used to initialize the `ObserverClient`.
- **ObserverDashboardClientConfig**: Configuration object used to initialize the `ObserverDashboardClient`.
- `connection`: Configuration for the WebSocket connection, using `WebSocketConnectorConfig`.

@@ -53,0 +53,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc