zigbee-clusters 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +24 -19
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,30 +1,35 @@
1
1
  type EndpointDescriptor = {
2
- endpointId: number;
3
- inputClusters: number[];
4
- outputClusters: number[];
2
+ endpointId: number;
3
+ inputClusters: number[];
4
+ outputClusters: number[];
5
5
  };
6
6
 
7
7
  type ConstructorOptions = {
8
- endpointDescriptors: EndpointDescriptor[];
9
- sendFrame: (endpointId: number, clusterId: number, frame: Buffer) => Promise<void>;
8
+ endpointDescriptors: EndpointDescriptor[];
9
+ sendFrame: (endpointId: number, clusterId: number, frame: Buffer) => Promise<void>;
10
10
  };
11
11
  type ZCLNodeCluster = {
12
- readAttributes: (...args: string[]) => Promise<void>;
12
+ readAttributes: (...args: string[]) => Promise<void>;
13
13
  };
14
14
  type ZCLNodeEndpoint = {
15
- clusters: { [clusterName: string]: ZCLNodeCluster };
15
+ clusters: { [clusterName: string]: ZCLNodeCluster };
16
16
  };
17
17
 
18
+ interface ZCLNode {
19
+ endpoints: { [endpointId: number]: ZCLNodeEndpoint };
20
+ handleFrame: (
21
+ endpointId: number,
22
+ clusterId: number,
23
+ frame: Buffer,
24
+ meta?: unknown
25
+ ) => Promise<void>;
26
+ }
27
+
18
28
  declare module "zigbee-clusters" {
19
- export class ZCLNode {
20
- constructor(options: ConstructorOptions);
21
- endpoints: { [endpointId: number]: ZCLNodeEndpoint };
22
- handleFrame: (
23
- endpointId: number,
24
- clusterId: number,
25
- frame: Buffer,
26
- meta?: unknown
27
- ) => Promise<void>;
28
- }
29
- export const CLUSTER: { [key: string]: {ID: number, NAME: string, ATTRIBUTES: any, COMMANDS: any} };
30
- }
29
+ export var ZCLNode: {
30
+ new (options: ConstructorOptions): ZCLNode;
31
+ };
32
+ export const CLUSTER: {
33
+ [key: string]: { ID: number; NAME: string; ATTRIBUTES: any; COMMANDS: any };
34
+ };
35
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-clusters",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Zigbee Cluster Library for Node.js",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",