Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@huddle01/observer-client-sdk
Advanced tools
This is the client SDK for the Observer service. It is a library that can be used to connect to the Observer service and execute operations on it.
npm install observer-client-sdk
import { ObserverDashboardClient } from '@huddle01/observer-client-sdk';
const dashboardClient = new ObserverClient({
// configuration options for connection
connection: {
// url of the observer service
url: 'http://localhost:8080',
// access token for the observer service
getAccessToken: async () => {
// fetch my access Token
}
},
});
dashboardClient.connect();
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:
ObserverDashboardClient
.
connection
: Configuration for the WebSocket connection, using WebSocketConnectorConfig
.connect(accessToken?: string): Promise
accessToken
(optional): An access token to authenticate the connection.close(): void
findCalls(params: DashboardQueryOperations['findCalls']): Promise
params
: Object containing query filters such as producerId, consumerId, transportId, callId, roomId, clientId, and mediaTrackIdfetchOngoingCalls(): Promise
getSummaryStats(params: DashboardQueryOperations['getSummaryStats']): Promise
params
: Parameters to filter and aggregate the summary data.createDatabaseFrame(resourceId: K, conditions: DatabaseFrameConditions<DatabaseFrameSchema[K]>, updateOnCreate = true): Promise<DataFrame<DatabaseFrameSchema[K]>>
resourceId
: Identifier for the database resource.conditions
: Filter conditions for the data.updateOnCreate
(optional): Whether to fetch the initial data on creation.createCallSnapshotsFrame(callId: string): Promise<DataFrame>
callId
: Unique identifier of the call.createClientSnapshotsFrame(options: { callId: string, clientId: string }): Promise<DataFrame>
options
: An object containing:
callId
: Unique identifier of the call.clientId
: Unique identifier of the client.This API provides a structured way to access and interact with call and client data in real-time, making it suitable for applications that require live monitoring and data analysis.
The DataFrame
API provides a flexible and efficient interface for data extraction and real-time data updates. It allows users to either:
Batch Retrieval: Extract large volumes of data in chunks, such as comprehensive reports on calls or clients. This is useful for obtaining historical data or performing extensive data analysis.
Continuous Streaming: Subscribe to updates for a particular resource, receiving real-time data as it changes. This is ideal for monitoring ongoing events or tracking live updates, such as changes in call status or client activity.
constructor(
config: DataFrameConfig,
channel: WebSocketConnector,
sortFn?: (a: T, b: T) => number
)
dataFrameId
.
// Creating a new data frame instance
const myDataFrame = observerClient.createClientSnapshotsFrame({
callId: '12345',
clientId: '67890',
});
// Listen for new rows
myDataFrame.on('newrow', (row) => {
console.log('New data row received:', row);
});
// Listen for errors
myDataFrame.on('error', (error) => {
console.error('Data frame error:', error);
});
// Update the data frame
await myDataFrame.update();
// Iterate over the rows
for (const row of myDataFrame) {
console.log('Row:', row);
}
// Close the data frame when done
myDataFrame.close();
The ObserverAdminClient
is an extension of the ObserverClient
class designed to provide administrative control over the system. It offers additional methods to manage and monitor server and worker states, initiate and manage jobs, and clean up completed or failed tasks.
constructor(config: ObserverClientConfig)
ObserverClientConfig
.ConsumableJobMap
.jobId
of the started job.FAQs
ObserverDashboardClient SDK
The npm package @huddle01/observer-client-sdk receives a total of 55 weekly downloads. As such, @huddle01/observer-client-sdk popularity was classified as not popular.
We found that @huddle01/observer-client-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.