zigbee-clusters 1.5.2 → 1.6.0
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.
- package/index.d.ts +30 -0
- package/package.json +4 -3
package/index.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type EndpointDescriptor = {
|
|
2
|
+
endpointId: number;
|
|
3
|
+
inputClusters: number[];
|
|
4
|
+
outputClusters: number[];
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
type ConstructorOptions = {
|
|
8
|
+
endpointDescriptors: EndpointDescriptor[];
|
|
9
|
+
sendFrame: (endpointId: number, clusterId: number, frame: Buffer) => Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
type ZCLNodeCluster = {
|
|
12
|
+
readAttributes: (...args: string[]) => Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
type ZCLNodeEndpoint = {
|
|
15
|
+
clusters: { [clusterName: string]: ZCLNodeCluster };
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zigbee-clusters",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Zigbee Cluster Library for Node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"test": "mocha --reporter list",
|
|
8
9
|
"lint": "eslint .",
|
|
@@ -36,8 +37,8 @@
|
|
|
36
37
|
"eslint-config-athom": "^2.1.0",
|
|
37
38
|
"jsdoc": "^3.6.7",
|
|
38
39
|
"jsdoc-ts-utils": "^2.0.0",
|
|
39
|
-
"mocha": "^
|
|
40
|
-
"serve": "^
|
|
40
|
+
"mocha": "^10.1.0",
|
|
41
|
+
"serve": "^14.0.1",
|
|
41
42
|
"watch": "^1.0.2"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|