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
80
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.0 to 0.11.1-0

2

package.json
{
"name": "@huddle01/observer-client-sdk",
"version": "0.11.0",
"version": "0.11.1-0",
"description": "ObserverClient SDK",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -12,2 +12,3 @@ Observer Client SDK

- [DataFrame](#dataframe)
- [ObserverAdminClient](#observerclient)

@@ -156,1 +157,42 @@

```
### ObserverAdminClient
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
```typescript
constructor(config: ObserverClientConfig)
```
- **config**: Configuration object for the ObserverAdminClient, inheriting from `ObserverClientConfig`.
#### Methods
* **getWorkerState(): Promise<GetWorkerStatesResponsePayload>**
- Retrieves the current state of all workers in the system.
- Returns a promise that resolves to the worker states payload.
* **getServerState(): Promise<GetWorkerStatesResponsePayload>**
- Retrieves the current state of all servers in the system.
- Returns a promise that resolves to the server states payload.
* **startJob<J extends keyof ConsumableJobMap>(type: J, parameters: ConsumableJobMap[J]['input']): Promise<{ jobId?: string }>**
- Starts a new job of a specified type with the given parameters.
- **type**: The type of job to be started, as defined in `ConsumableJobMap`.
- **parameters**: The input parameters required for the specified job type.
- Returns a promise that resolves to an object containing the `jobId` of the started job.
* **cleanFailedJobs(...jobIds: string[]): Promise<void>**
- Cleans up failed jobs from the system. If no job IDs are provided, it cleans up all failed jobs.
- **jobIds** (optional): An array of job IDs to clean. If omitted, all failed jobs will be cleaned.
- Returns a promise that resolves when the operation is complete.
* **cleanCompletedJobs(...jobIds: string[]): Promise<void>**
- Cleans up completed jobs from the system. If no job IDs are provided, it cleans up all completed jobs.
- **jobIds** (optional): An array of job IDs to clean. If omitted, all completed jobs will be cleaned.
- Returns a promise that resolves when the operation is complete.
* **cancelJob<J extends keyof ConsumableJobMap>(type: J, jobId: string): Promise<boolean>**
- Cancels a running job of a specified type and ID.
- **type**: The type of job to be canceled.
- **jobId**: The unique identifier of the job to be canceled.
- Returns a promise that resolves to a boolean indicating whether the cancellation was successful.
* **listJobs(): Promise<DashboardListConsumableJobsResponsePayload>**
- Lists all jobs currently present in the system, including their status and details.
- Returns a promise that resolves to the list of jobs.
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