@matter/protocol 0.15.2-alpha.0-20250717-3607eeac6 → 0.15.2-alpha.0-20250719-e4aeb457c

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 (55) hide show
  1. package/dist/cjs/action/errors.d.ts +7 -7
  2. package/dist/cjs/action/errors.d.ts.map +1 -1
  3. package/dist/cjs/action/errors.js +9 -14
  4. package/dist/cjs/action/errors.js.map +1 -1
  5. package/dist/cjs/action/response/WriteResult.d.ts +4 -3
  6. package/dist/cjs/action/response/WriteResult.d.ts.map +1 -1
  7. package/dist/cjs/action/response/WriteResult.js +30 -0
  8. package/dist/cjs/action/response/WriteResult.js.map +2 -2
  9. package/dist/cjs/common/ExpandedPath.d.ts +25 -0
  10. package/dist/cjs/common/ExpandedPath.d.ts.map +1 -0
  11. package/dist/cjs/common/ExpandedPath.js +73 -0
  12. package/dist/cjs/common/ExpandedPath.js.map +6 -0
  13. package/dist/cjs/common/ExpandedStatus.d.ts +27 -0
  14. package/dist/cjs/common/ExpandedStatus.d.ts.map +1 -0
  15. package/dist/cjs/common/ExpandedStatus.js +73 -0
  16. package/dist/cjs/common/ExpandedStatus.js.map +6 -0
  17. package/dist/cjs/common/PathError.d.ts +28 -0
  18. package/dist/cjs/common/PathError.d.ts.map +1 -0
  19. package/dist/cjs/common/PathError.js +52 -0
  20. package/dist/cjs/common/PathError.js.map +6 -0
  21. package/dist/cjs/common/index.d.ts +1 -0
  22. package/dist/cjs/common/index.d.ts.map +1 -1
  23. package/dist/cjs/common/index.js +1 -0
  24. package/dist/cjs/common/index.js.map +1 -1
  25. package/dist/esm/action/errors.d.ts +7 -7
  26. package/dist/esm/action/errors.d.ts.map +1 -1
  27. package/dist/esm/action/errors.js +10 -15
  28. package/dist/esm/action/errors.js.map +1 -1
  29. package/dist/esm/action/response/WriteResult.d.ts +4 -3
  30. package/dist/esm/action/response/WriteResult.d.ts.map +1 -1
  31. package/dist/esm/action/response/WriteResult.js +26 -0
  32. package/dist/esm/action/response/WriteResult.js.map +2 -2
  33. package/dist/esm/common/ExpandedPath.d.ts +25 -0
  34. package/dist/esm/common/ExpandedPath.d.ts.map +1 -0
  35. package/dist/esm/common/ExpandedPath.js +60 -0
  36. package/dist/esm/common/ExpandedPath.js.map +6 -0
  37. package/dist/esm/common/ExpandedStatus.d.ts +27 -0
  38. package/dist/esm/common/ExpandedStatus.d.ts.map +1 -0
  39. package/dist/esm/common/ExpandedStatus.js +53 -0
  40. package/dist/esm/common/ExpandedStatus.js.map +6 -0
  41. package/dist/esm/common/PathError.d.ts +28 -0
  42. package/dist/esm/common/PathError.d.ts.map +1 -0
  43. package/dist/esm/common/PathError.js +32 -0
  44. package/dist/esm/common/PathError.js.map +6 -0
  45. package/dist/esm/common/index.d.ts +1 -0
  46. package/dist/esm/common/index.d.ts.map +1 -1
  47. package/dist/esm/common/index.js +1 -0
  48. package/dist/esm/common/index.js.map +1 -1
  49. package/package.json +6 -6
  50. package/src/action/errors.ts +16 -21
  51. package/src/action/response/WriteResult.ts +27 -3
  52. package/src/common/ExpandedPath.ts +87 -0
  53. package/src/common/ExpandedStatus.ts +71 -0
  54. package/src/common/PathError.ts +46 -0
  55. package/src/common/index.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/action/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,eAAe,EAAc,MAAM,QAAQ,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAEzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,QAAQ,CAAC;AAEnD;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,mBAAmB;gBAC7C,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU;CAOvF;AAED;;GAEG;AACH,qBAAa,SA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,eAAgB,SAAQ,aAAa;gBAClC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM;CAGrE;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,aAAa;gBACxC,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM;CAGrD;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,aAAa;gBACnC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;CAStF;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,gBAAgB;gBAC/C,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM;CAGrE;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,oBAAoB;gBAC/C,IAAI,EAAE,eAAe;CAGpC;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,oBAAoB;gBAC/C,IAAI,EAAE,eAAe;CAGpC"}
@@ -3,7 +3,7 @@
3
3
  * Copyright 2022-2025 Matter.js Authors
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { StatusCode, StatusResponseError } from "#types";
6
+ import { Status, StatusResponseError } from "#types";
7
7
  import { SchemaImplementationError } from "#model";
8
8
  class SchemaViolationError extends StatusResponseError {
9
9
  constructor(prefix, path, message, code) {
@@ -14,22 +14,22 @@ class SchemaViolationError extends StatusResponseError {
14
14
  }
15
15
  class ReadError extends SchemaViolationError {
16
16
  constructor(path, message, code) {
17
- super("Reading", path, message, code ?? StatusCode.UnsupportedRead);
17
+ super("Reading", path, message, code ?? Status.UnsupportedRead);
18
18
  }
19
19
  }
20
20
  class WriteError extends SchemaViolationError {
21
21
  constructor(path, message, code) {
22
- super("Writing", path, message, code ?? StatusCode.UnsupportedWrite);
22
+ super("Writing", path, message, code ?? Status.UnsupportedWrite);
23
23
  }
24
24
  }
25
25
  class InvokeError extends SchemaViolationError {
26
26
  constructor(path, message, code) {
27
- super("Invoking", path, message, code ?? StatusCode.UnsupportedAccess);
27
+ super("Invoking", path, message, code ?? Status.UnsupportedAccess);
28
28
  }
29
29
  }
30
30
  class ValidateError extends SchemaViolationError {
31
31
  constructor(path, message, code) {
32
- super("Validating", path, message, code ?? StatusCode.InvalidDataType);
32
+ super("Validating", path, message, code ?? Status.InvalidDataType);
33
33
  }
34
34
  }
35
35
  class DatatypeError extends ValidateError {
@@ -43,12 +43,12 @@ class DatatypeError extends ValidateError {
43
43
  }
44
44
  class ConstraintError extends ValidateError {
45
45
  constructor(schema, path, message) {
46
- super(path, `Constraint "${schema.constraint}": ${message}`, StatusCode.ConstraintError);
46
+ super(path, `Constraint "${schema.constraint}": ${message}`, Status.ConstraintError);
47
47
  }
48
48
  }
49
49
  class UnknownEnumValueError extends ValidateError {
50
50
  constructor(path, message) {
51
- super(path, message, StatusCode.ConstraintError);
51
+ super(path, message, Status.ConstraintError);
52
52
  }
53
53
  }
54
54
  class ConformanceError extends ValidateError {
@@ -59,7 +59,7 @@ class ConformanceError extends ValidateError {
59
59
  } else {
60
60
  prefix = `Conformance "${schema.conformance}"`;
61
61
  }
62
- super(path, `${prefix}: ${message}`, StatusCode.ConstraintError);
62
+ super(path, `${prefix}: ${message}`, Status.ConstraintError);
63
63
  }
64
64
  }
65
65
  class EnumValueConformanceError extends ConformanceError {
@@ -69,17 +69,12 @@ class EnumValueConformanceError extends ConformanceError {
69
69
  }
70
70
  class ExpiredReferenceError extends SchemaViolationError {
71
71
  constructor(path) {
72
- super(
73
- "Referencing",
74
- path,
75
- "This value is no longer available because its context has exited",
76
- StatusCode.Failure
77
- );
72
+ super("Referencing", path, "This value is no longer available because its context has exited", Status.Failure);
78
73
  }
79
74
  }
80
75
  class PhantomReferenceError extends SchemaViolationError {
81
76
  constructor(path) {
82
- super("Referencing", path, "Container was removed", StatusCode.Failure);
77
+ super("Referencing", path, "Container was removed", Status.Failure);
83
78
  }
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AAW;AAAA,IAC/D;AACA,UAAM,MAAM,GAAG,MAAM,KAAK,OAAO,IAAI,OAAO,eAAe;AAAA,EAC/D;AACJ;AAKO,MAAM,kCAAkC,iBAAiB;AAAA,EAC5D,YAAY,QAAgB,MAAuB,SAAiB;AAChE,UAAM,QAAQ,MAAM,OAAO;AAAA,EAC/B;AACJ;AAKO,MAAM,8BAA8B,qBAAqB;AAAA,EAC5D,YAAY,MAAuB;AAC/B,UAAM,eAAe,MAAM,oEAAoE,OAAO,OAAO;AAAA,EACjH;AACJ;AAKO,MAAM,8BAA8B,qBAAqB;AAAA,EAC5D,YAAY,MAAuB;AAC/B,UAAM,eAAe,MAAM,yBAAyB,OAAO,OAAO;AAAA,EACtE;AACJ;",
5
5
  "names": []
6
6
  }
@@ -4,8 +4,8 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { Write } from "#action/request/Write.js";
7
- import type { AttributeId, AttributePath, ClusterId, EndpointNumber, NodeId, StatusCode } from "#types";
8
- export type WriteResult<T extends Write> = Promise<T extends {
7
+ import { Status, type AttributeId, type AttributePath, type ClusterId, type EndpointNumber, type NodeId } from "#types";
8
+ export type WriteResult<T extends Write = Write> = Promise<T extends {
9
9
  suppressResponse: true;
10
10
  } ? void : WriteResult.AttributeStatus[]>;
11
11
  export declare namespace WriteResult {
@@ -19,8 +19,9 @@ export declare namespace WriteResult {
19
19
  interface AttributeStatus {
20
20
  kind: "attr-status";
21
21
  path: ConcreteAttributePath;
22
- status: StatusCode;
22
+ status: Status;
23
23
  clusterStatus?: number;
24
24
  }
25
+ function assertSuccess(result: AttributeStatus[]): void;
25
26
  }
26
27
  //# sourceMappingURL=WriteResult.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WriteResult.d.ts","sourceRoot":"","sources":["../../../../src/action/response/WriteResult.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,KAAK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C,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,cAAc,CAAC;QAC3B,SAAS,EAAE,SAAS,CAAC;QACrB,WAAW,EAAE,WAAW,CAAC;QACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B;IAED,UAAiB,eAAe;QAC5B,IAAI,EAAE,aAAa,CAAC;QACpB,IAAI,EAAE,qBAAqB,CAAC;QAC5B,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,CAAC,EAAE,MAAM,CAAC;KAC1B;IAED,SAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,EAAE,QAkBtD;CACJ"}
@@ -3,4 +3,30 @@
3
3
  * Copyright 2022-2025 Matter.js Authors
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ import { ExpandedPath } from "#common/ExpandedPath.js";
7
+ import { ExpandedStatus } from "#common/ExpandedStatus.js";
8
+ import { PathError } from "#common/PathError.js";
9
+ import { MatterAggregateError } from "#general";
10
+ import { Status } from "#types";
11
+ var WriteResult;
12
+ ((WriteResult2) => {
13
+ function assertSuccess(result) {
14
+ const errors = result.filter((attr) => attr.status !== Status.Success).map((attr) => {
15
+ const path = ExpandedPath({ ...attr, kind: "attribute" });
16
+ const status = new ExpandedStatus(attr);
17
+ return new PathError({ path, status });
18
+ });
19
+ if (!errors.length) {
20
+ return;
21
+ }
22
+ if (errors.length === 1) {
23
+ throw errors[0];
24
+ }
25
+ throw new MatterAggregateError(errors, "Multiple writes failed");
26
+ }
27
+ WriteResult2.assertSuccess = assertSuccess;
28
+ })(WriteResult || (WriteResult = {}));
29
+ export {
30
+ WriteResult
31
+ };
6
32
  //# sourceMappingURL=WriteResult.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/action/response/WriteResult.ts"],
4
- "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;",
5
- "names": []
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,4BAA4B;AACrC,SAAS,cAAsG;AAMxG,IAAU;AAAA,CAAV,CAAUA,iBAAV;AAgBI,WAAS,cAAc,QAA2B;AACrD,UAAM,SAAS,OACV,OAAO,UAAQ,KAAK,WAAW,OAAO,OAAO,EAC7C,IAAI,UAAQ;AACT,YAAM,OAAO,aAAa,EAAE,GAAG,MAAM,MAAM,YAAY,CAAC;AACxD,YAAM,SAAS,IAAI,eAAe,IAAI;AACtC,aAAO,IAAI,UAAU,EAAE,MAAM,OAAO,CAAC;AAAA,IACzC,CAAC;AAEL,QAAI,CAAC,OAAO,QAAQ;AAChB;AAAA,IACJ;AAEA,QAAI,OAAO,WAAW,GAAG;AACrB,YAAM,OAAO,CAAC;AAAA,IAClB;AAEA,UAAM,IAAI,qBAAqB,QAAQ,wBAAwB;AAAA,EACnE;AAlBO,EAAAA,aAAS;AAAA,GAhBH;",
5
+ "names": ["WriteResult"]
6
6
  }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { DataModelPath, MatterModel } from "#model";
7
+ import { AttributePath, CommandPath, EventPath } from "#types";
8
+ /**
9
+ * Creates a {@link DataModelPath} from a Matter wire-format {@link AttributePath}, {@link EventPath}, or
10
+ * {@link CommandPath}.
11
+ *
12
+ * This is useful for creating human-readable diagnostics.
13
+ */
14
+ export declare function ExpandedPath({ path, matter, base, kind }: ExpandedPath.Definition): DataModelPath;
15
+ export declare namespace ExpandedPath {
16
+ interface Definition {
17
+ path: AttributePath | EventPath | CommandPath;
18
+ matter?: MatterModel;
19
+ base?: DataModelPath | {
20
+ path: DataModelPath;
21
+ };
22
+ kind?: "attribute" | "command" | "event" | "entry";
23
+ }
24
+ }
25
+ //# sourceMappingURL=ExpandedPath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpandedPath.d.ts","sourceRoot":"","sources":["../../../src/common/ExpandedPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAIH,aAAa,EAGb,WAAW,EAEd,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAE/D;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,YAAY,CAAC,UAAU,GAAG,aAAa,CAoDjG;AAED,yBAAiB,YAAY,CAAC;IAC1B,UAAiB,UAAU;QACvB,IAAI,EAAE,aAAa,GAAG,SAAS,GAAG,WAAW,CAAC;QAC9C,MAAM,CAAC,EAAE,WAAW,CAAC;QACrB,IAAI,CAAC,EAAE,aAAa,GAAG;YAAE,IAAI,EAAE,aAAa,CAAA;SAAE,CAAC;QAC/C,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;KACtD;CACJ"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { camelize } from "#general";
7
+ import {
8
+ AttributeModel,
9
+ ClusterModel,
10
+ CommandModel,
11
+ DataModelPath,
12
+ EventModel,
13
+ Matter
14
+ } from "#model";
15
+ function ExpandedPath({ path, matter, base, kind }) {
16
+ if (matter === void 0) {
17
+ matter = Matter;
18
+ }
19
+ if (base && "path" in base) {
20
+ base = base.path;
21
+ }
22
+ const endpointIdent = path.endpointId ?? "*";
23
+ base = base ? base.at(endpointIdent, "endpoint") : DataModelPath(endpointIdent, "endpoint");
24
+ let cluster;
25
+ base = base.at(identityOf(matter, ClusterModel, path.clusterId), "cluster");
26
+ if ("attributeId" in path) {
27
+ base = base.at("state").at(identityOf(cluster, AttributeModel, path.attributeId));
28
+ if (path.listIndex) {
29
+ return base.at(path.listIndex, "entry");
30
+ }
31
+ return base;
32
+ }
33
+ if ("commandId" in path) {
34
+ return base.at(identityOf(cluster, CommandModel, path.commandId));
35
+ }
36
+ if ("eventId" in path) {
37
+ return base.at("events").at(identityOf(cluster, EventModel, path.eventId));
38
+ }
39
+ return base.at("*", kind ?? "element");
40
+ function identityOf(parent, type, id) {
41
+ if (id === void 0) {
42
+ return "*";
43
+ }
44
+ const instance = parent?.get(type, id);
45
+ if (instance === void 0) {
46
+ if (typeof id === "string") {
47
+ return camelize(id);
48
+ }
49
+ return id;
50
+ }
51
+ if (type === ClusterModel) {
52
+ cluster = instance;
53
+ }
54
+ return camelize(instance.name);
55
+ }
56
+ }
57
+ export {
58
+ ExpandedPath
59
+ };
60
+ //# sourceMappingURL=ExpandedPath.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/common/ExpandedPath.ts"],
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAS,gBAAgB;AACzB;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGG;AASA,SAAS,aAAa,EAAE,MAAM,QAAQ,MAAM,KAAK,GAA2C;AAC/F,MAAI,WAAW,QAAW;AACtB,aAAS;AAAA,EACb;AAEA,MAAI,QAAQ,UAAU,MAAM;AACxB,WAAO,KAAK;AAAA,EAChB;AAEA,QAAM,gBAAgB,KAAK,cAAc;AACzC,SAAO,OAAO,KAAK,GAAG,eAAe,UAAU,IAAI,cAAc,eAAe,UAAU;AAE1F,MAAI;AACJ,SAAO,KAAK,GAAG,WAAW,QAAQ,cAAc,KAAK,SAAS,GAAG,SAAS;AAE1E,MAAI,iBAAiB,MAAM;AACvB,WAAO,KAAK,GAAG,OAAO,EAAE,GAAG,WAAW,SAAS,gBAAgB,KAAK,WAAW,CAAC;AAChF,QAAI,KAAK,WAAW;AAChB,aAAO,KAAK,GAAG,KAAK,WAAW,OAAO;AAAA,IAC1C;AACA,WAAO;AAAA,EACX;AAEA,MAAI,eAAe,MAAM;AACrB,WAAO,KAAK,GAAG,WAAW,SAAS,cAAc,KAAK,SAAS,CAAC;AAAA,EACpE;AAEA,MAAI,aAAa,MAAM;AACnB,WAAO,KAAK,GAAG,QAAQ,EAAE,GAAG,WAAW,SAAS,YAAY,KAAK,OAAO,CAAC;AAAA,EAC7E;AAEA,SAAO,KAAK,GAAG,KAAK,QAAQ,SAAS;AAErC,WAAS,WAAW,QAA2B,MAAkB,IAAiC;AAC9F,QAAI,OAAO,QAAW;AAClB,aAAO;AAAA,IACX;AAEA,UAAM,WAAW,QAAQ,IAAI,MAAM,EAAE;AACrC,QAAI,aAAa,QAAW;AACxB,UAAI,OAAO,OAAO,UAAU;AACxB,eAAO,SAAS,EAAE;AAAA,MACtB;AACA,aAAO;AAAA,IACX;AAEA,QAAI,SAAS,cAAc;AACvB,gBAAU;AAAA,IACd;AAEA,WAAO,SAAS,SAAS,IAAI;AAAA,EACjC;AACJ;",
5
+ "names": []
6
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ClusterModel, MatterModel } from "#model";
7
+ import { ClusterId, Status } from "#types";
8
+ /**
9
+ * Detailed status information expanded from status codes.
10
+ *
11
+ * TODO - maybe update codegen to include description in operational models so we can use as detailed error message
12
+ */
13
+ export declare class ExpandedStatus {
14
+ id: string;
15
+ status: Status;
16
+ clusterStatus?: number;
17
+ constructor({ matter, status, cluster, clusterStatus }: ExpandedStatus.Definition);
18
+ }
19
+ export declare namespace ExpandedStatus {
20
+ interface Definition {
21
+ matter?: MatterModel;
22
+ status?: Status;
23
+ cluster?: ClusterModel | ClusterId;
24
+ clusterStatus?: number;
25
+ }
26
+ }
27
+ //# sourceMappingURL=ExpandedStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpandedStatus.d.ts","sourceRoot":"","sources":["../../../src/common/ExpandedStatus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,YAAY,EAAU,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE3C;;;;GAIG;AACH,qBAAa,cAAc;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;gBAEX,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,cAAc,CAAC,UAAU;CAyCpF;AAED,yBAAiB,cAAc,CAAC;IAC5B,UAAiB,UAAU;QACvB,MAAM,CAAC,EAAE,WAAW,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;QACnC,aAAa,CAAC,EAAE,MAAM,CAAC;KAC1B;CACJ"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { decamelize } from "#general";
7
+ import { ClusterModel, Matter } from "#model";
8
+ import { Status } from "#types";
9
+ class ExpandedStatus {
10
+ id;
11
+ status;
12
+ clusterStatus;
13
+ constructor({ matter, status, cluster, clusterStatus }) {
14
+ this.status = status ?? Status.Failure;
15
+ this.clusterStatus = clusterStatus;
16
+ let statusStr;
17
+ if (status !== Status.Failure) {
18
+ const name = Status[this.status];
19
+ if (name === void 0) {
20
+ statusStr = `unknown-${this.status}`;
21
+ } else {
22
+ statusStr = decamelize(name);
23
+ }
24
+ }
25
+ if (clusterStatus === void 0) {
26
+ this.id = statusStr ?? "failure";
27
+ return;
28
+ }
29
+ let clusterStr;
30
+ if (typeof cluster === "number") {
31
+ matter ??= Matter;
32
+ const model = matter.get(ClusterModel, cluster);
33
+ if (model === void 0) {
34
+ clusterStr = `cluster-${cluster}`;
35
+ } else {
36
+ clusterStr = decamelize(model.name);
37
+ }
38
+ } else if (cluster) {
39
+ clusterStr = decamelize(cluster.name);
40
+ } else {
41
+ clusterStr = "unknown-cluster";
42
+ }
43
+ if (statusStr === void 0) {
44
+ this.id = clusterStr;
45
+ return;
46
+ }
47
+ this.id = `${statusStr}+${clusterStr}`;
48
+ }
49
+ }
50
+ export {
51
+ ExpandedStatus
52
+ };
53
+ //# sourceMappingURL=ExpandedStatus.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/common/ExpandedStatus.ts"],
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAS,kBAAkB;AAC3B,SAAS,cAAc,cAA2B;AAClD,SAAoB,cAAc;AAO3B,MAAM,eAAe;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAY,EAAE,QAAQ,QAAQ,SAAS,cAAc,GAA8B;AAC/E,SAAK,SAAS,UAAU,OAAO;AAC/B,SAAK,gBAAgB;AAErB,QAAI;AACJ,QAAI,WAAW,OAAO,SAAS;AAC3B,YAAM,OAAO,OAAO,KAAK,MAAM;AAC/B,UAAI,SAAS,QAAW;AACpB,oBAAY,WAAW,KAAK,MAAM;AAAA,MACtC,OAAO;AACH,oBAAY,WAAW,IAAI;AAAA,MAC/B;AAAA,IACJ;AAEA,QAAI,kBAAkB,QAAW;AAC7B,WAAK,KAAK,aAAa;AACvB;AAAA,IACJ;AAEA,QAAI;AACJ,QAAI,OAAO,YAAY,UAAU;AAC7B,iBAAW;AACX,YAAM,QAAQ,OAAO,IAAI,cAAc,OAAO;AAC9C,UAAI,UAAU,QAAW;AACrB,qBAAa,WAAW,OAAO;AAAA,MACnC,OAAO;AACH,qBAAa,WAAW,MAAM,IAAI;AAAA,MACtC;AAAA,IACJ,WAAW,SAAS;AAChB,mBAAa,WAAW,QAAQ,IAAI;AAAA,IACxC,OAAO;AACH,mBAAa;AAAA,IACjB;AAEA,QAAI,cAAc,QAAW;AACzB,WAAK,KAAK;AACV;AAAA,IACJ;AAEA,SAAK,KAAK,GAAG,SAAS,IAAI,UAAU;AAAA,EACxC;AACJ;",
5
+ "names": []
6
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ExpandedStatus } from "#common/ExpandedStatus.js";
7
+ import { MatterAggregateError } from "#general";
8
+ import { DataModelPath } from "#model";
9
+ import { StatusResponseError } from "#types";
10
+ /**
11
+ * A protocol error associated with a specific data model path.
12
+ */
13
+ export declare class PathError extends StatusResponseError {
14
+ #private;
15
+ constructor({ path, status: { id, status, clusterStatus }, message }: PathError.Definition);
16
+ get id(): string;
17
+ get path(): DataModelPath;
18
+ }
19
+ export declare namespace PathError {
20
+ interface Definition {
21
+ path: DataModelPath;
22
+ status: ExpandedStatus;
23
+ message?: string;
24
+ }
25
+ }
26
+ export declare class AggregatePathError extends MatterAggregateError {
27
+ }
28
+ //# sourceMappingURL=PathError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PathError.d.ts","sourceRoot":"","sources":["../../../src/common/PathError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAoC,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAE7C;;GAEG;AACH,qBAAa,SAAU,SAAQ,mBAAmB;;gBAIlC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS,CAAC,UAAU;IAU1F,IAAa,EAAE,WAEd;IAED,IAAI,IAAI,kBAEP;CACJ;AAED,yBAAiB,SAAS,CAAC;IACvB,UAAiB,UAAU;QACvB,IAAI,EAAE,aAAa,CAAC;QACpB,MAAM,EAAE,cAAc,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB;CACJ;AAED,qBAAa,kBAAmB,SAAQ,oBAAoB;CAAG"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { camelize, capitalize, decamelize, MatterAggregateError } from "#general";
7
+ import { StatusResponseError } from "#types";
8
+ class PathError extends StatusResponseError {
9
+ #id;
10
+ #path;
11
+ constructor({ path, status: { id, status, clusterStatus }, message }) {
12
+ if (message === void 0) {
13
+ message = capitalize(decamelize(camelize(id), " "));
14
+ }
15
+ super(message, status, clusterStatus);
16
+ this.#id = id;
17
+ this.#path = path;
18
+ }
19
+ get id() {
20
+ return this.#id;
21
+ }
22
+ get path() {
23
+ return this.#path;
24
+ }
25
+ }
26
+ class AggregatePathError extends MatterAggregateError {
27
+ }
28
+ export {
29
+ AggregatePathError,
30
+ PathError
31
+ };
32
+ //# sourceMappingURL=PathError.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/common/PathError.ts"],
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,SAAS,UAAU,YAAY,YAAY,4BAA4B;AAEvE,SAAS,2BAA2B;AAK7B,MAAM,kBAAkB,oBAAoB;AAAA,EAC/C;AAAA,EACA;AAAA,EAEA,YAAY,EAAE,MAAM,QAAQ,EAAE,IAAI,QAAQ,cAAc,GAAG,QAAQ,GAAyB;AACxF,QAAI,YAAY,QAAW;AACvB,gBAAU,WAAW,WAAW,SAAS,EAAE,GAAG,GAAG,CAAC;AAAA,IACtD;AAEA,UAAM,SAAS,QAAQ,aAAa;AACpC,SAAK,MAAM;AACX,SAAK,QAAQ;AAAA,EACjB;AAAA,EAEA,IAAa,KAAK;AACd,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,OAAO;AACP,WAAO,KAAK;AAAA,EAChB;AACJ;AAUO,MAAM,2BAA2B,qBAAqB;AAAC;",
5
+ "names": []
6
+ }
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  export * from "../peer/PeerAddress.js";
7
+ export * from "./ExpandedPath.js";
7
8
  export * from "./FailsafeContext.js";
8
9
  export * from "./FailsafeTimer.js";
9
10
  export * from "./InstanceBroadcaster.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,cAAc,CAAC"}
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  export * from "../peer/PeerAddress.js";
7
+ export * from "./ExpandedPath.js";
7
8
  export * from "./FailsafeContext.js";
8
9
  export * from "./FailsafeTimer.js";
9
10
  export * from "./InstanceBroadcaster.js";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/common/index.ts"],
4
- "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
5
5
  "names": []
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matter/protocol",
3
- "version": "0.15.2-alpha.0-20250717-3607eeac6",
3
+ "version": "0.15.2-alpha.0-20250719-e4aeb457c",
4
4
  "description": "Low-level APIs for Matter interaction",
5
5
  "keywords": [
6
6
  "iot",
@@ -40,13 +40,13 @@
40
40
  "#*": "./src/*"
41
41
  },
42
42
  "dependencies": {
43
- "@matter/general": "0.15.2-alpha.0-20250717-3607eeac6",
44
- "@matter/model": "0.15.2-alpha.0-20250717-3607eeac6",
45
- "@matter/types": "0.15.2-alpha.0-20250717-3607eeac6"
43
+ "@matter/general": "0.15.2-alpha.0-20250719-e4aeb457c",
44
+ "@matter/model": "0.15.2-alpha.0-20250719-e4aeb457c",
45
+ "@matter/types": "0.15.2-alpha.0-20250719-e4aeb457c"
46
46
  },
47
47
  "devDependencies": {
48
- "@matter/tools": "0.15.2-alpha.0-20250717-3607eeac6",
49
- "@matter/testing": "0.15.2-alpha.0-20250717-3607eeac6"
48
+ "@matter/tools": "0.15.2-alpha.0-20250719-e4aeb457c",
49
+ "@matter/testing": "0.15.2-alpha.0-20250719-e4aeb457c"
50
50
  },
51
51
  "files": [
52
52
  "dist/**/*",
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import { Schema, SchemaErrorPath, ValueModel } from "#model";
8
- import { StatusCode, StatusResponseError } from "#types";
8
+ import { Status, StatusResponseError } from "#types";
9
9
 
10
10
  export { SchemaImplementationError } from "#model";
11
11
 
@@ -13,7 +13,7 @@ export { SchemaImplementationError } from "#model";
13
13
  * Thrown due operational schema violations.
14
14
  */
15
15
  export class SchemaViolationError extends StatusResponseError {
16
- constructor(prefix: string, path: SchemaErrorPath, message: string, code: StatusCode) {
16
+ constructor(prefix: string, path: SchemaErrorPath, message: string, code: Status) {
17
17
  const text = `${prefix} ${path.path ?? path}: ${message} (${code})`;
18
18
  super(text, code);
19
19
 
@@ -26,8 +26,8 @@ export class SchemaViolationError extends StatusResponseError {
26
26
  * Thrown for invalid reads.
27
27
  */
28
28
  export class ReadError extends SchemaViolationError {
29
- constructor(path: SchemaErrorPath, message: string, code?: StatusCode) {
30
- super("Reading", path, message, code ?? StatusCode.UnsupportedRead);
29
+ constructor(path: SchemaErrorPath, message: string, code?: Status) {
30
+ super("Reading", path, message, code ?? Status.UnsupportedRead);
31
31
  }
32
32
  }
33
33
 
@@ -35,8 +35,8 @@ export class ReadError extends SchemaViolationError {
35
35
  * Thrown for invalid writes.
36
36
  */
37
37
  export class WriteError extends SchemaViolationError {
38
- constructor(path: SchemaErrorPath, message: string, code?: StatusCode) {
39
- super("Writing", path, message, code ?? StatusCode.UnsupportedWrite);
38
+ constructor(path: SchemaErrorPath, message: string, code?: Status) {
39
+ super("Writing", path, message, code ?? Status.UnsupportedWrite);
40
40
  }
41
41
  }
42
42
 
@@ -44,8 +44,8 @@ export class WriteError extends SchemaViolationError {
44
44
  * Thrown for invalid invokes.
45
45
  */
46
46
  export class InvokeError extends SchemaViolationError {
47
- constructor(path: SchemaErrorPath, message: string, code?: StatusCode) {
48
- super("Invoking", path, message, code ?? StatusCode.UnsupportedAccess);
47
+ constructor(path: SchemaErrorPath, message: string, code?: Status) {
48
+ super("Invoking", path, message, code ?? Status.UnsupportedAccess);
49
49
  }
50
50
  }
51
51
 
@@ -53,8 +53,8 @@ export class InvokeError extends SchemaViolationError {
53
53
  * Thrown when validation fails.
54
54
  */
55
55
  export class ValidateError extends SchemaViolationError {
56
- constructor(path: SchemaErrorPath, message: string, code?: StatusCode) {
57
- super("Validating", path, message, code ?? StatusCode.InvalidDataType);
56
+ constructor(path: SchemaErrorPath, message: string, code?: Status) {
57
+ super("Validating", path, message, code ?? Status.InvalidDataType);
58
58
  }
59
59
  }
60
60
 
@@ -62,7 +62,7 @@ export class ValidateError extends SchemaViolationError {
62
62
  * Thrown when a value is of the wrong datatype.
63
63
  */
64
64
  export class DatatypeError extends ValidateError {
65
- constructor(path: SchemaErrorPath, type: string, value: unknown, code?: StatusCode) {
65
+ constructor(path: SchemaErrorPath, type: string, value: unknown, code?: Status) {
66
66
  let str = `${value}`;
67
67
  if (str.length > 60) {
68
68
  str = `${str.substring(60)}…`;
@@ -76,7 +76,7 @@ export class DatatypeError extends ValidateError {
76
76
  */
77
77
  export class ConstraintError extends ValidateError {
78
78
  constructor(schema: Schema, path: SchemaErrorPath, message: string) {
79
- super(path, `Constraint "${(schema as ValueModel).constraint}": ${message}`, StatusCode.ConstraintError);
79
+ super(path, `Constraint "${(schema as ValueModel).constraint}": ${message}`, Status.ConstraintError);
80
80
  }
81
81
  }
82
82
 
@@ -85,7 +85,7 @@ export class ConstraintError extends ValidateError {
85
85
  */
86
86
  export class UnknownEnumValueError extends ValidateError {
87
87
  constructor(path: SchemaErrorPath, message: string) {
88
- super(path, message, StatusCode.ConstraintError);
88
+ super(path, message, Status.ConstraintError);
89
89
  }
90
90
  }
91
91
 
@@ -100,7 +100,7 @@ export class ConformanceError extends ValidateError {
100
100
  } else {
101
101
  prefix = `Conformance "${(schema as ValueModel).conformance}"`;
102
102
  }
103
- super(path, `${prefix}: ${message}`, StatusCode.ConstraintError);
103
+ super(path, `${prefix}: ${message}`, Status.ConstraintError);
104
104
  }
105
105
  }
106
106
 
@@ -118,12 +118,7 @@ export class EnumValueConformanceError extends ConformanceError {
118
118
  */
119
119
  export class ExpiredReferenceError extends SchemaViolationError {
120
120
  constructor(path: SchemaErrorPath) {
121
- super(
122
- "Referencing",
123
- path,
124
- "This value is no longer available because its context has exited",
125
- StatusCode.Failure,
126
- );
121
+ super("Referencing", path, "This value is no longer available because its context has exited", Status.Failure);
127
122
  }
128
123
  }
129
124
 
@@ -132,6 +127,6 @@ export class ExpiredReferenceError extends SchemaViolationError {
132
127
  */
133
128
  export class PhantomReferenceError extends SchemaViolationError {
134
129
  constructor(path: SchemaErrorPath) {
135
- super("Referencing", path, "Container was removed", StatusCode.Failure);
130
+ super("Referencing", path, "Container was removed", Status.Failure);
136
131
  }
137
132
  }