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

home-assistant-js-websocket

Package Overview
Dependencies
Maintainers
2
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

home-assistant-js-websocket - npm Package Compare versions

Comparing version 8.0.0 to 8.0.1

8

dist/auth.d.ts

@@ -1,2 +0,2 @@

export declare type AuthData = {
export type AuthData = {
hassUrl: string;

@@ -9,5 +9,5 @@ clientId: string | null;

};
export declare type SaveTokensFunc = (data: AuthData | null) => void;
export declare type LoadTokensFunc = () => Promise<AuthData | null | undefined>;
export declare type getAuthOptions = {
export type SaveTokensFunc = (data: AuthData | null) => void;
export type LoadTokensFunc = () => Promise<AuthData | null | undefined>;
export type getAuthOptions = {
hassUrl?: string;

@@ -14,0 +14,0 @@ clientId?: string | null;

import { Store } from "./store.js";
import { Connection } from "./connection.js";
import { UnsubscribeFunc } from "./types.js";
export declare type Collection<State> = {
export type Collection<State> = {
state: State;

@@ -6,0 +6,0 @@ refresh(): Promise<void>;

@@ -5,3 +5,3 @@ import { ERR_CONNECTION_LOST } from "./errors.js";

import type { Auth } from "./auth.js";
export declare type ConnectionOptions = {
export type ConnectionOptions = {
setupRetry: number;

@@ -11,5 +11,5 @@ auth?: Auth;

};
export declare type ConnectionEventListener = (conn: Connection, eventData?: any) => void;
declare type Events = "ready" | "disconnected" | "reconnect-error";
declare type SubscriptionUnsubscribe = () => Promise<void>;
export type ConnectionEventListener = (conn: Connection, eventData?: any) => void;
type Events = "ready" | "disconnected" | "reconnect-error";
type SubscriptionUnsubscribe = () => Promise<void>;
interface SubscribeEventCommmandInFlight<T> {

@@ -22,7 +22,7 @@ resolve: (result?: any) => void;

}
declare type CommandWithAnswerInFlight = {
type CommandWithAnswerInFlight = {
resolve: (result?: any) => void;
reject: (err: any) => void;
};
declare type CommandInFlight = SubscribeEventCommmandInFlight<any> | CommandWithAnswerInFlight;
type CommandInFlight = SubscribeEventCommmandInFlight<any> | CommandWithAnswerInFlight;
export declare class Connection {

@@ -29,0 +29,0 @@ options: ConnectionOptions;

@@ -1102,4 +1102,2 @@ (function (global, factory) {

Object.defineProperty(exports, '__esModule', { value: true });
}));

@@ -25,3 +25,3 @@ import { Error, HassServiceTarget } from "./types.js";

};
declare type ServiceCallMessage = {
type ServiceCallMessage = {
type: "call_service";

@@ -34,3 +34,3 @@ domain: string;

export declare function callService(domain: string, service: string, serviceData?: object, target?: HassServiceTarget): ServiceCallMessage;
declare type SubscribeEventMessage = {
type SubscribeEventMessage = {
type: "subscribe_events";

@@ -37,0 +37,0 @@ event_type?: string;

import { UnsubscribeFunc } from "./types.js";
declare type Listener<State> = (state: State) => void;
declare type Action<State> = (state: State, ...args: any[]) => Partial<State> | Promise<Partial<State>> | null;
declare type BoundAction<State> = (...args: any[]) => void;
export declare type Store<State> = {
type Listener<State> = (state: State) => void;
type Action<State> = (state: State, ...args: any[]) => Partial<State> | Promise<Partial<State>> | null;
type BoundAction<State> = (...args: any[]) => void;
export type Store<State> = {
state: State | undefined;

@@ -7,0 +7,0 @@ action(action: Action<State>): BoundAction<State>;

@@ -1,4 +0,4 @@

export declare type Error = 1 | 2 | 3 | 4;
export declare type UnsubscribeFunc = () => void;
export declare type MessageBase = {
export type Error = 1 | 2 | 3 | 4;
export type UnsubscribeFunc = () => void;
export type MessageBase = {
id?: number;

@@ -8,3 +8,3 @@ type: string;

};
export declare type Context = {
export type Context = {
id: string;

@@ -14,3 +14,3 @@ user_id: string | null;

};
export declare type HassEventBase = {
export type HassEventBase = {
origin: string;

@@ -20,3 +20,3 @@ time_fired: string;

};
export declare type HassEvent = HassEventBase & {
export type HassEvent = HassEventBase & {
event_type: string;

@@ -27,3 +27,3 @@ data: {

};
export declare type StateChangedEvent = HassEventBase & {
export type StateChangedEvent = HassEventBase & {
event_type: "state_changed";

@@ -36,3 +36,3 @@ data: {

};
export declare type HassConfig = {
export type HassConfig = {
latitude: number;

@@ -63,4 +63,6 @@ longitude: number;

currency: string;
country: string | null;
language: string;
};
export declare type HassEntityBase = {
export type HassEntityBase = {
entity_id: string;

@@ -73,3 +75,3 @@ state: string;

};
export declare type HassEntityAttributeBase = {
export type HassEntityAttributeBase = {
friendly_name?: string;

@@ -86,3 +88,3 @@ unit_of_measurement?: string;

};
export declare type HassEntity = HassEntityBase & {
export type HassEntity = HassEntityBase & {
attributes: {

@@ -92,6 +94,6 @@ [key: string]: any;

};
export declare type HassEntities = {
export type HassEntities = {
[entity_id: string]: HassEntity;
};
export declare type HassService = {
export type HassService = {
name?: string;

@@ -109,9 +111,9 @@ description: string;

};
export declare type HassDomainServices = {
export type HassDomainServices = {
[service_name: string]: HassService;
};
export declare type HassServices = {
export type HassServices = {
[domain: string]: HassDomainServices;
};
export declare type HassUser = {
export type HassUser = {
id: string;

@@ -122,3 +124,3 @@ is_admin: boolean;

};
export declare type HassServiceTarget = {
export type HassServiceTarget = {
entity_id?: string | string[];

@@ -125,0 +127,0 @@ device_id?: string | string[];

@@ -5,3 +5,3 @@ {

"sideEffects": false,
"version": "8.0.0",
"version": "8.0.1",
"description": "Home Assistant websocket client",

@@ -44,3 +44,3 @@ "source": "lib/index.ts",

"reify": "^0.20.12",
"rollup": "^2.16.1",
"rollup": "^3.5.0",
"ts-node": "^9.0.0",

@@ -47,0 +47,0 @@ "typescript": "^4.0.2"

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