@matter/types 0.15.0-alpha.0-20250624-e8c89f458 → 0.15.0-alpha.0-20250625-4a4b1be1b

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 (28) hide show
  1. package/dist/cjs/protocol/definitions/general.d.ts +44 -0
  2. package/dist/cjs/protocol/definitions/general.d.ts.map +1 -0
  3. package/dist/cjs/protocol/definitions/general.js +50 -0
  4. package/dist/cjs/protocol/definitions/general.js.map +6 -0
  5. package/dist/cjs/protocol/definitions/index.d.ts +1 -0
  6. package/dist/cjs/protocol/definitions/index.d.ts.map +1 -1
  7. package/dist/cjs/protocol/definitions/index.js +1 -0
  8. package/dist/cjs/protocol/definitions/index.js.map +1 -1
  9. package/dist/cjs/protocol/definitions/secure-channel.d.ts +6 -40
  10. package/dist/cjs/protocol/definitions/secure-channel.d.ts.map +1 -1
  11. package/dist/cjs/protocol/definitions/secure-channel.js +10 -31
  12. package/dist/cjs/protocol/definitions/secure-channel.js.map +2 -2
  13. package/dist/esm/protocol/definitions/general.d.ts +44 -0
  14. package/dist/esm/protocol/definitions/general.d.ts.map +1 -0
  15. package/dist/esm/protocol/definitions/general.js +30 -0
  16. package/dist/esm/protocol/definitions/general.js.map +6 -0
  17. package/dist/esm/protocol/definitions/index.d.ts +1 -0
  18. package/dist/esm/protocol/definitions/index.d.ts.map +1 -1
  19. package/dist/esm/protocol/definitions/index.js +1 -0
  20. package/dist/esm/protocol/definitions/index.js.map +1 -1
  21. package/dist/esm/protocol/definitions/secure-channel.d.ts +6 -40
  22. package/dist/esm/protocol/definitions/secure-channel.d.ts.map +1 -1
  23. package/dist/esm/protocol/definitions/secure-channel.js +10 -31
  24. package/dist/esm/protocol/definitions/secure-channel.js.map +2 -2
  25. package/package.json +5 -5
  26. package/src/protocol/definitions/general.ts +61 -0
  27. package/src/protocol/definitions/index.ts +1 -0
  28. package/src/protocol/definitions/secure-channel.ts +5 -56
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export declare enum GeneralStatusCode {
7
+ /** Operation completed successfully. */
8
+ Success = 0,
9
+ /** Generic failure, additional details may be included in the protocol specific status. */
10
+ Failure = 1,
11
+ /** Operation was rejected by the system because the system is in an invalid state. */
12
+ BadPrecondition = 2,
13
+ /** A value was out of a required range */
14
+ OutOfRange = 3,
15
+ /** A request was unrecognized or malformed */
16
+ BadRequest = 4,
17
+ /** An unrecognized or unsupported request was received. */
18
+ Unsupported = 5,
19
+ /** A request was not expected at this time. */
20
+ Unexpected = 6,
21
+ /** Insufficient resources to process the given request. */
22
+ ResourceExhausted = 7,
23
+ /** Device is busy and cannot handle this request at this time. */
24
+ Busy = 8,
25
+ /** A timeout occurred. */
26
+ Timeout = 9,
27
+ /** Context-specific signal to proceed */
28
+ Continue = 10,
29
+ /** Failure, may be due to a concurrency error. */
30
+ Aborted = 11,
31
+ /** An invalid/unsupported argument was provided. */
32
+ InvalidArgument = 12,
33
+ /** Some requested entity was not found. */
34
+ NotFound = 13,
35
+ /** The sender attempted to create something that already exists. */
36
+ AlreadyExists = 14,
37
+ /** The sender does not have sufficient permissions to execute the requested operations. */
38
+ PermissionDenied = 15,
39
+ /** Unrecoverable data loss or corruption has occurred. */
40
+ DataLoss = 16,
41
+ /** Message size is larger than the recipient can handle. */
42
+ MessageTooLarge = 17
43
+ }
44
+ //# sourceMappingURL=general.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/general.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,oBAAY,iBAAiB;IACzB,wCAAwC;IACxC,OAAO,IAAI;IAEX,2FAA2F;IAC3F,OAAO,IAAI;IAEX,sFAAsF;IACtF,eAAe,IAAI;IAEnB,0CAA0C;IAC1C,UAAU,IAAI;IAEd,8CAA8C;IAC9C,UAAU,IAAI;IAEd,2DAA2D;IAC3D,WAAW,IAAI;IAEf,+CAA+C;IAC/C,UAAU,IAAI;IAEd,2DAA2D;IAC3D,iBAAiB,IAAI;IAErB,kEAAkE;IAClE,IAAI,IAAI;IAER,0BAA0B;IAC1B,OAAO,IAAI;IAEX,yCAAyC;IACzC,QAAQ,KAAK;IAEb,kDAAkD;IAClD,OAAO,KAAK;IAEZ,oDAAoD;IACpD,eAAe,KAAK;IAEpB,2CAA2C;IAC3C,QAAQ,KAAK;IAEb,oEAAoE;IACpE,aAAa,KAAK;IAElB,2FAA2F;IAC3F,gBAAgB,KAAK;IAErB,0DAA0D;IAC1D,QAAQ,KAAK;IAEb,4DAA4D;IAC5D,eAAe,KAAK;CACvB"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var general_exports = {};
20
+ __export(general_exports, {
21
+ GeneralStatusCode: () => GeneralStatusCode
22
+ });
23
+ module.exports = __toCommonJS(general_exports);
24
+ /**
25
+ * @license
26
+ * Copyright 2022-2025 Matter.js Authors
27
+ * SPDX-License-Identifier: Apache-2.0
28
+ */
29
+ var GeneralStatusCode = /* @__PURE__ */ ((GeneralStatusCode2) => {
30
+ GeneralStatusCode2[GeneralStatusCode2["Success"] = 0] = "Success";
31
+ GeneralStatusCode2[GeneralStatusCode2["Failure"] = 1] = "Failure";
32
+ GeneralStatusCode2[GeneralStatusCode2["BadPrecondition"] = 2] = "BadPrecondition";
33
+ GeneralStatusCode2[GeneralStatusCode2["OutOfRange"] = 3] = "OutOfRange";
34
+ GeneralStatusCode2[GeneralStatusCode2["BadRequest"] = 4] = "BadRequest";
35
+ GeneralStatusCode2[GeneralStatusCode2["Unsupported"] = 5] = "Unsupported";
36
+ GeneralStatusCode2[GeneralStatusCode2["Unexpected"] = 6] = "Unexpected";
37
+ GeneralStatusCode2[GeneralStatusCode2["ResourceExhausted"] = 7] = "ResourceExhausted";
38
+ GeneralStatusCode2[GeneralStatusCode2["Busy"] = 8] = "Busy";
39
+ GeneralStatusCode2[GeneralStatusCode2["Timeout"] = 9] = "Timeout";
40
+ GeneralStatusCode2[GeneralStatusCode2["Continue"] = 10] = "Continue";
41
+ GeneralStatusCode2[GeneralStatusCode2["Aborted"] = 11] = "Aborted";
42
+ GeneralStatusCode2[GeneralStatusCode2["InvalidArgument"] = 12] = "InvalidArgument";
43
+ GeneralStatusCode2[GeneralStatusCode2["NotFound"] = 13] = "NotFound";
44
+ GeneralStatusCode2[GeneralStatusCode2["AlreadyExists"] = 14] = "AlreadyExists";
45
+ GeneralStatusCode2[GeneralStatusCode2["PermissionDenied"] = 15] = "PermissionDenied";
46
+ GeneralStatusCode2[GeneralStatusCode2["DataLoss"] = 16] = "DataLoss";
47
+ GeneralStatusCode2[GeneralStatusCode2["MessageTooLarge"] = 17] = "MessageTooLarge";
48
+ return GeneralStatusCode2;
49
+ })(GeneralStatusCode || {});
50
+ //# sourceMappingURL=general.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/protocol/definitions/general.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAK,oBAAL,kBAAKA,uBAAL;AAEH,EAAAA,sCAAA,aAAU,KAAV;AAGA,EAAAA,sCAAA,aAAU,KAAV;AAGA,EAAAA,sCAAA,qBAAkB,KAAlB;AAGA,EAAAA,sCAAA,gBAAa,KAAb;AAGA,EAAAA,sCAAA,gBAAa,KAAb;AAGA,EAAAA,sCAAA,iBAAc,KAAd;AAGA,EAAAA,sCAAA,gBAAa,KAAb;AAGA,EAAAA,sCAAA,uBAAoB,KAApB;AAGA,EAAAA,sCAAA,UAAO,KAAP;AAGA,EAAAA,sCAAA,aAAU,KAAV;AAGA,EAAAA,sCAAA,cAAW,MAAX;AAGA,EAAAA,sCAAA,aAAU,MAAV;AAGA,EAAAA,sCAAA,qBAAkB,MAAlB;AAGA,EAAAA,sCAAA,cAAW,MAAX;AAGA,EAAAA,sCAAA,mBAAgB,MAAhB;AAGA,EAAAA,sCAAA,sBAAmB,MAAnB;AAGA,EAAAA,sCAAA,cAAW,MAAX;AAGA,EAAAA,sCAAA,qBAAkB,MAAlB;AArDQ,SAAAA;AAAA,GAAA;",
5
+ "names": ["GeneralStatusCode"]
6
+ }
@@ -3,6 +3,7 @@
3
3
  * Copyright 2022-2025 Matter.js Authors
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ export * from "./general.js";
6
7
  export * from "./interaction.js";
7
8
  export * from "./secure-channel.js";
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
@@ -15,6 +15,7 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
15
15
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
16
  var definitions_exports = {};
17
17
  module.exports = __toCommonJS(definitions_exports);
18
+ __reExport(definitions_exports, require("./general.js"), module.exports);
18
19
  __reExport(definitions_exports, require("./interaction.js"), module.exports);
19
20
  __reExport(definitions_exports, require("./secure-channel.js"), module.exports);
20
21
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/protocol/definitions/index.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAMA,gCAAc,6BANd;AAOA,gCAAc,gCAPd;AAAA;AAAA;AAAA;AAAA;AAAA;",
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAMA,gCAAc,yBANd;AAOA,gCAAc,6BAPd;AAQA,gCAAc,gCARd;AAAA;AAAA;AAAA;AAAA;AAAA;",
5
5
  "names": []
6
6
  }
@@ -46,7 +46,7 @@ export declare enum SecureMessageType {
46
46
  /** The Check-in message notifies a client that the ICD is available for communication. */
47
47
  IcdCheckInMessage = 80
48
48
  }
49
- export declare enum ProtocolStatusCode {
49
+ export declare enum SecureChannelStatusCode {
50
50
  /** Indication that the last session establishment message was successfully processed. */
51
51
  Success = 0,
52
52
  /** Failure to find a common set of shared roots. */
@@ -56,44 +56,10 @@ export declare enum ProtocolStatusCode {
56
56
  /** Indication that the sender will close the current session. See Section “CloseSession” for more details. */
57
57
  CloseSession = 3,
58
58
  /** Indication that the sender cannot currently fulfill the request. See Section “Busy” for more details. */
59
- Busy = 4
60
- }
61
- export declare enum GeneralStatusCode {
62
- /** Operation completed successfully. */
63
- Success = 0,
64
- /** Generic failure, additional details may be included in the protocol specific status. */
65
- Failure = 1,
66
- /** Operation was rejected by the system because the system is in an invalid state. */
67
- BadPrecondition = 2,
68
- /** A value was out of a required range */
69
- OutOfRange = 3,
70
- /** A request was unrecognized or malformed */
71
- BadRequest = 4,
72
- /** An unrecognized or unsupported request was received. */
73
- Unsupported = 5,
74
- /** A request was not expected at this time. */
75
- Unexpected = 6,
76
- /** Insufficient resources to process the given request. */
77
- ResourceExhausted = 7,
78
- /** Device is busy and cannot handle this request at this time. */
79
- Busy = 8,
80
- /** A timeout occurred. */
81
- Timeout = 9,
82
- /** Context-specific signal to proceed */
83
- Continue = 10,
84
- /** Failure, may be due to a concurrency error. */
85
- Aborted = 11,
86
- /** An invalid/unsupported argument was provided. */
87
- InvalidArgument = 12,
88
- /** Some requested entity was not found. */
89
- NotFound = 13,
90
- /** The sender attempted to create something that already exists. */
91
- AlreadyExists = 14,
92
- /** The sender does not have sufficient permissions to execute the requested operations. */
93
- PermissionDenied = 15,
94
- /** Unrecoverable data loss or corruption has occurred. */
95
- DataLoss = 16,
96
- /** Message size is larger than the recipient can handle. */
97
- MessageTooLarge = 17
59
+ Busy = 4,
60
+ /**
61
+ * No additional error details available.
62
+ */
63
+ GeneralError = 65535
98
64
  }
99
65
  //# sourceMappingURL=secure-channel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"secure-channel.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/secure-channel.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,0BAA0B,IAAS,CAAC;AAEjD,oBAAY,iBAAiB;IACzB;;;OAGG;IACH,iBAAiB,IAAO;IAExB;;;OAGG;IACH,iBAAiB,IAAO;IAExB;;;OAGG;IACH,aAAa,KAAO;IAEpB,gFAAgF;IAChF,iBAAiB,KAAO;IAExB,2FAA2F;IAC3F,kBAAkB,KAAO;IAEzB,mDAAmD;IACnD,SAAS,KAAO;IAEhB,oDAAoD;IACpD,SAAS,KAAO;IAEhB,mDAAmD;IACnD,SAAS,KAAO;IAEhB,8CAA8C;IAC9C,MAAM,KAAO;IAEb,+CAA+C;IAC/C,MAAM,KAAO;IAEb,8CAA8C;IAC9C,MAAM,KAAO;IAEb,0DAA0D;IAC1D,YAAY,KAAO;IAEnB,qHAAqH;IACrH,YAAY,KAAO;IAEnB,0FAA0F;IAC1F,iBAAiB,KAAO;CAC3B;AAED,oBAAY,kBAAkB;IAC1B,yFAAyF;IACzF,OAAO,IAAS;IAEhB,oDAAoD;IACpD,kBAAkB,IAAS;IAE3B,oDAAoD;IACpD,YAAY,IAAS;IAErB,8GAA8G;IAC9G,YAAY,IAAS;IAErB,4GAA4G;IAC5G,IAAI,IAAS;CAChB;AAED,oBAAY,iBAAiB;IACzB,wCAAwC;IACxC,OAAO,IAAI;IAEX,2FAA2F;IAC3F,OAAO,IAAI;IAEX,sFAAsF;IACtF,eAAe,IAAI;IAEnB,0CAA0C;IAC1C,UAAU,IAAI;IAEd,8CAA8C;IAC9C,UAAU,IAAI;IAEd,2DAA2D;IAC3D,WAAW,IAAI;IAEf,+CAA+C;IAC/C,UAAU,IAAI;IAEd,2DAA2D;IAC3D,iBAAiB,IAAI;IAErB,kEAAkE;IAClE,IAAI,IAAI;IAER,0BAA0B;IAC1B,OAAO,IAAI;IAEX,yCAAyC;IACzC,QAAQ,KAAK;IAEb,kDAAkD;IAClD,OAAO,KAAK;IAEZ,oDAAoD;IACpD,eAAe,KAAK;IAEpB,2CAA2C;IAC3C,QAAQ,KAAK;IAEb,oEAAoE;IACpE,aAAa,KAAK;IAElB,2FAA2F;IAC3F,gBAAgB,KAAK;IAErB,0DAA0D;IAC1D,QAAQ,KAAK;IAEb,4DAA4D;IAC5D,eAAe,KAAK;CACvB"}
1
+ {"version":3,"file":"secure-channel.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/secure-channel.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,0BAA0B,IAAS,CAAC;AAEjD,oBAAY,iBAAiB;IACzB;;;OAGG;IACH,iBAAiB,IAAO;IAExB;;;OAGG;IACH,iBAAiB,IAAO;IAExB;;;OAGG;IACH,aAAa,KAAO;IAEpB,gFAAgF;IAChF,iBAAiB,KAAO;IAExB,2FAA2F;IAC3F,kBAAkB,KAAO;IAEzB,mDAAmD;IACnD,SAAS,KAAO;IAEhB,oDAAoD;IACpD,SAAS,KAAO;IAEhB,mDAAmD;IACnD,SAAS,KAAO;IAEhB,8CAA8C;IAC9C,MAAM,KAAO;IAEb,+CAA+C;IAC/C,MAAM,KAAO;IAEb,8CAA8C;IAC9C,MAAM,KAAO;IAEb,0DAA0D;IAC1D,YAAY,KAAO;IAEnB,qHAAqH;IACrH,YAAY,KAAO;IAEnB,0FAA0F;IAC1F,iBAAiB,KAAO;CAC3B;AAED,oBAAY,uBAAuB;IAC/B,yFAAyF;IACzF,OAAO,IAAS;IAEhB,oDAAoD;IACpD,kBAAkB,IAAS;IAE3B,oDAAoD;IACpD,YAAY,IAAS;IAErB,8GAA8G;IAC9G,YAAY,IAAS;IAErB,4GAA4G;IAC5G,IAAI,IAAS;IAEb;;OAEG;IACH,YAAY,QAAS;CACxB"}
@@ -18,9 +18,8 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var secure_channel_exports = {};
20
20
  __export(secure_channel_exports, {
21
- GeneralStatusCode: () => GeneralStatusCode,
22
- ProtocolStatusCode: () => ProtocolStatusCode,
23
21
  SECURE_CHANNEL_PROTOCOL_ID: () => SECURE_CHANNEL_PROTOCOL_ID,
22
+ SecureChannelStatusCode: () => SecureChannelStatusCode,
24
23
  SecureMessageType: () => SecureMessageType
25
24
  });
26
25
  module.exports = __toCommonJS(secure_channel_exports);
@@ -47,33 +46,13 @@ var SecureMessageType = /* @__PURE__ */ ((SecureMessageType2) => {
47
46
  SecureMessageType2[SecureMessageType2["IcdCheckInMessage"] = 80] = "IcdCheckInMessage";
48
47
  return SecureMessageType2;
49
48
  })(SecureMessageType || {});
50
- var ProtocolStatusCode = /* @__PURE__ */ ((ProtocolStatusCode2) => {
51
- ProtocolStatusCode2[ProtocolStatusCode2["Success"] = 0] = "Success";
52
- ProtocolStatusCode2[ProtocolStatusCode2["NoSharedTrustRoots"] = 1] = "NoSharedTrustRoots";
53
- ProtocolStatusCode2[ProtocolStatusCode2["InvalidParam"] = 2] = "InvalidParam";
54
- ProtocolStatusCode2[ProtocolStatusCode2["CloseSession"] = 3] = "CloseSession";
55
- ProtocolStatusCode2[ProtocolStatusCode2["Busy"] = 4] = "Busy";
56
- return ProtocolStatusCode2;
57
- })(ProtocolStatusCode || {});
58
- var GeneralStatusCode = /* @__PURE__ */ ((GeneralStatusCode2) => {
59
- GeneralStatusCode2[GeneralStatusCode2["Success"] = 0] = "Success";
60
- GeneralStatusCode2[GeneralStatusCode2["Failure"] = 1] = "Failure";
61
- GeneralStatusCode2[GeneralStatusCode2["BadPrecondition"] = 2] = "BadPrecondition";
62
- GeneralStatusCode2[GeneralStatusCode2["OutOfRange"] = 3] = "OutOfRange";
63
- GeneralStatusCode2[GeneralStatusCode2["BadRequest"] = 4] = "BadRequest";
64
- GeneralStatusCode2[GeneralStatusCode2["Unsupported"] = 5] = "Unsupported";
65
- GeneralStatusCode2[GeneralStatusCode2["Unexpected"] = 6] = "Unexpected";
66
- GeneralStatusCode2[GeneralStatusCode2["ResourceExhausted"] = 7] = "ResourceExhausted";
67
- GeneralStatusCode2[GeneralStatusCode2["Busy"] = 8] = "Busy";
68
- GeneralStatusCode2[GeneralStatusCode2["Timeout"] = 9] = "Timeout";
69
- GeneralStatusCode2[GeneralStatusCode2["Continue"] = 10] = "Continue";
70
- GeneralStatusCode2[GeneralStatusCode2["Aborted"] = 11] = "Aborted";
71
- GeneralStatusCode2[GeneralStatusCode2["InvalidArgument"] = 12] = "InvalidArgument";
72
- GeneralStatusCode2[GeneralStatusCode2["NotFound"] = 13] = "NotFound";
73
- GeneralStatusCode2[GeneralStatusCode2["AlreadyExists"] = 14] = "AlreadyExists";
74
- GeneralStatusCode2[GeneralStatusCode2["PermissionDenied"] = 15] = "PermissionDenied";
75
- GeneralStatusCode2[GeneralStatusCode2["DataLoss"] = 16] = "DataLoss";
76
- GeneralStatusCode2[GeneralStatusCode2["MessageTooLarge"] = 17] = "MessageTooLarge";
77
- return GeneralStatusCode2;
78
- })(GeneralStatusCode || {});
49
+ var SecureChannelStatusCode = /* @__PURE__ */ ((SecureChannelStatusCode2) => {
50
+ SecureChannelStatusCode2[SecureChannelStatusCode2["Success"] = 0] = "Success";
51
+ SecureChannelStatusCode2[SecureChannelStatusCode2["NoSharedTrustRoots"] = 1] = "NoSharedTrustRoots";
52
+ SecureChannelStatusCode2[SecureChannelStatusCode2["InvalidParam"] = 2] = "InvalidParam";
53
+ SecureChannelStatusCode2[SecureChannelStatusCode2["CloseSession"] = 3] = "CloseSession";
54
+ SecureChannelStatusCode2[SecureChannelStatusCode2["Busy"] = 4] = "Busy";
55
+ SecureChannelStatusCode2[SecureChannelStatusCode2["GeneralError"] = 65535] = "GeneralError";
56
+ return SecureChannelStatusCode2;
57
+ })(SecureChannelStatusCode || {});
79
58
  //# sourceMappingURL=secure-channel.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/protocol/definitions/secure-channel.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASO,MAAM,6BAA6B;AAEnC,IAAK,oBAAL,kBAAKA,uBAAL;AAKH,EAAAA,sCAAA,uBAAoB,KAApB;AAMA,EAAAA,sCAAA,uBAAoB,KAApB;AAMA,EAAAA,sCAAA,mBAAgB,MAAhB;AAGA,EAAAA,sCAAA,uBAAoB,MAApB;AAGA,EAAAA,sCAAA,wBAAqB,MAArB;AAGA,EAAAA,sCAAA,eAAY,MAAZ;AAGA,EAAAA,sCAAA,eAAY,MAAZ;AAGA,EAAAA,sCAAA,eAAY,MAAZ;AAGA,EAAAA,sCAAA,YAAS,MAAT;AAGA,EAAAA,sCAAA,YAAS,MAAT;AAGA,EAAAA,sCAAA,YAAS,MAAT;AAGA,EAAAA,sCAAA,kBAAe,MAAf;AAGA,EAAAA,sCAAA,kBAAe,MAAf;AAGA,EAAAA,sCAAA,uBAAoB,MAApB;AAlDQ,SAAAA;AAAA,GAAA;AAqDL,IAAK,qBAAL,kBAAKC,wBAAL;AAEH,EAAAA,wCAAA,aAAU,KAAV;AAGA,EAAAA,wCAAA,wBAAqB,KAArB;AAGA,EAAAA,wCAAA,kBAAe,KAAf;AAGA,EAAAA,wCAAA,kBAAe,KAAf;AAGA,EAAAA,wCAAA,UAAO,KAAP;AAdQ,SAAAA;AAAA,GAAA;AAiBL,IAAK,oBAAL,kBAAKC,uBAAL;AAEH,EAAAA,sCAAA,aAAU,KAAV;AAGA,EAAAA,sCAAA,aAAU,KAAV;AAGA,EAAAA,sCAAA,qBAAkB,KAAlB;AAGA,EAAAA,sCAAA,gBAAa,KAAb;AAGA,EAAAA,sCAAA,gBAAa,KAAb;AAGA,EAAAA,sCAAA,iBAAc,KAAd;AAGA,EAAAA,sCAAA,gBAAa,KAAb;AAGA,EAAAA,sCAAA,uBAAoB,KAApB;AAGA,EAAAA,sCAAA,UAAO,KAAP;AAGA,EAAAA,sCAAA,aAAU,KAAV;AAGA,EAAAA,sCAAA,cAAW,MAAX;AAGA,EAAAA,sCAAA,aAAU,MAAV;AAGA,EAAAA,sCAAA,qBAAkB,MAAlB;AAGA,EAAAA,sCAAA,cAAW,MAAX;AAGA,EAAAA,sCAAA,mBAAgB,MAAhB;AAGA,EAAAA,sCAAA,sBAAmB,MAAnB;AAGA,EAAAA,sCAAA,cAAW,MAAX;AAGA,EAAAA,sCAAA,qBAAkB,MAAlB;AArDQ,SAAAA;AAAA,GAAA;",
5
- "names": ["SecureMessageType", "ProtocolStatusCode", "GeneralStatusCode"]
4
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASO,MAAM,6BAA6B;AAEnC,IAAK,oBAAL,kBAAKA,uBAAL;AAKH,EAAAA,sCAAA,uBAAoB,KAApB;AAMA,EAAAA,sCAAA,uBAAoB,KAApB;AAMA,EAAAA,sCAAA,mBAAgB,MAAhB;AAGA,EAAAA,sCAAA,uBAAoB,MAApB;AAGA,EAAAA,sCAAA,wBAAqB,MAArB;AAGA,EAAAA,sCAAA,eAAY,MAAZ;AAGA,EAAAA,sCAAA,eAAY,MAAZ;AAGA,EAAAA,sCAAA,eAAY,MAAZ;AAGA,EAAAA,sCAAA,YAAS,MAAT;AAGA,EAAAA,sCAAA,YAAS,MAAT;AAGA,EAAAA,sCAAA,YAAS,MAAT;AAGA,EAAAA,sCAAA,kBAAe,MAAf;AAGA,EAAAA,sCAAA,kBAAe,MAAf;AAGA,EAAAA,sCAAA,uBAAoB,MAApB;AAlDQ,SAAAA;AAAA,GAAA;AAqDL,IAAK,0BAAL,kBAAKC,6BAAL;AAEH,EAAAA,kDAAA,aAAU,KAAV;AAGA,EAAAA,kDAAA,wBAAqB,KAArB;AAGA,EAAAA,kDAAA,kBAAe,KAAf;AAGA,EAAAA,kDAAA,kBAAe,KAAf;AAGA,EAAAA,kDAAA,UAAO,KAAP;AAKA,EAAAA,kDAAA,kBAAe,SAAf;AAnBQ,SAAAA;AAAA,GAAA;",
5
+ "names": ["SecureMessageType", "SecureChannelStatusCode"]
6
6
  }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export declare enum GeneralStatusCode {
7
+ /** Operation completed successfully. */
8
+ Success = 0,
9
+ /** Generic failure, additional details may be included in the protocol specific status. */
10
+ Failure = 1,
11
+ /** Operation was rejected by the system because the system is in an invalid state. */
12
+ BadPrecondition = 2,
13
+ /** A value was out of a required range */
14
+ OutOfRange = 3,
15
+ /** A request was unrecognized or malformed */
16
+ BadRequest = 4,
17
+ /** An unrecognized or unsupported request was received. */
18
+ Unsupported = 5,
19
+ /** A request was not expected at this time. */
20
+ Unexpected = 6,
21
+ /** Insufficient resources to process the given request. */
22
+ ResourceExhausted = 7,
23
+ /** Device is busy and cannot handle this request at this time. */
24
+ Busy = 8,
25
+ /** A timeout occurred. */
26
+ Timeout = 9,
27
+ /** Context-specific signal to proceed */
28
+ Continue = 10,
29
+ /** Failure, may be due to a concurrency error. */
30
+ Aborted = 11,
31
+ /** An invalid/unsupported argument was provided. */
32
+ InvalidArgument = 12,
33
+ /** Some requested entity was not found. */
34
+ NotFound = 13,
35
+ /** The sender attempted to create something that already exists. */
36
+ AlreadyExists = 14,
37
+ /** The sender does not have sufficient permissions to execute the requested operations. */
38
+ PermissionDenied = 15,
39
+ /** Unrecoverable data loss or corruption has occurred. */
40
+ DataLoss = 16,
41
+ /** Message size is larger than the recipient can handle. */
42
+ MessageTooLarge = 17
43
+ }
44
+ //# sourceMappingURL=general.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/general.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,oBAAY,iBAAiB;IACzB,wCAAwC;IACxC,OAAO,IAAI;IAEX,2FAA2F;IAC3F,OAAO,IAAI;IAEX,sFAAsF;IACtF,eAAe,IAAI;IAEnB,0CAA0C;IAC1C,UAAU,IAAI;IAEd,8CAA8C;IAC9C,UAAU,IAAI;IAEd,2DAA2D;IAC3D,WAAW,IAAI;IAEf,+CAA+C;IAC/C,UAAU,IAAI;IAEd,2DAA2D;IAC3D,iBAAiB,IAAI;IAErB,kEAAkE;IAClE,IAAI,IAAI;IAER,0BAA0B;IAC1B,OAAO,IAAI;IAEX,yCAAyC;IACzC,QAAQ,KAAK;IAEb,kDAAkD;IAClD,OAAO,KAAK;IAEZ,oDAAoD;IACpD,eAAe,KAAK;IAEpB,2CAA2C;IAC3C,QAAQ,KAAK;IAEb,oEAAoE;IACpE,aAAa,KAAK;IAElB,2FAA2F;IAC3F,gBAAgB,KAAK;IAErB,0DAA0D;IAC1D,QAAQ,KAAK;IAEb,4DAA4D;IAC5D,eAAe,KAAK;CACvB"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ var GeneralStatusCode = /* @__PURE__ */ ((GeneralStatusCode2) => {
7
+ GeneralStatusCode2[GeneralStatusCode2["Success"] = 0] = "Success";
8
+ GeneralStatusCode2[GeneralStatusCode2["Failure"] = 1] = "Failure";
9
+ GeneralStatusCode2[GeneralStatusCode2["BadPrecondition"] = 2] = "BadPrecondition";
10
+ GeneralStatusCode2[GeneralStatusCode2["OutOfRange"] = 3] = "OutOfRange";
11
+ GeneralStatusCode2[GeneralStatusCode2["BadRequest"] = 4] = "BadRequest";
12
+ GeneralStatusCode2[GeneralStatusCode2["Unsupported"] = 5] = "Unsupported";
13
+ GeneralStatusCode2[GeneralStatusCode2["Unexpected"] = 6] = "Unexpected";
14
+ GeneralStatusCode2[GeneralStatusCode2["ResourceExhausted"] = 7] = "ResourceExhausted";
15
+ GeneralStatusCode2[GeneralStatusCode2["Busy"] = 8] = "Busy";
16
+ GeneralStatusCode2[GeneralStatusCode2["Timeout"] = 9] = "Timeout";
17
+ GeneralStatusCode2[GeneralStatusCode2["Continue"] = 10] = "Continue";
18
+ GeneralStatusCode2[GeneralStatusCode2["Aborted"] = 11] = "Aborted";
19
+ GeneralStatusCode2[GeneralStatusCode2["InvalidArgument"] = 12] = "InvalidArgument";
20
+ GeneralStatusCode2[GeneralStatusCode2["NotFound"] = 13] = "NotFound";
21
+ GeneralStatusCode2[GeneralStatusCode2["AlreadyExists"] = 14] = "AlreadyExists";
22
+ GeneralStatusCode2[GeneralStatusCode2["PermissionDenied"] = 15] = "PermissionDenied";
23
+ GeneralStatusCode2[GeneralStatusCode2["DataLoss"] = 16] = "DataLoss";
24
+ GeneralStatusCode2[GeneralStatusCode2["MessageTooLarge"] = 17] = "MessageTooLarge";
25
+ return GeneralStatusCode2;
26
+ })(GeneralStatusCode || {});
27
+ export {
28
+ GeneralStatusCode
29
+ };
30
+ //# sourceMappingURL=general.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/protocol/definitions/general.ts"],
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAK,oBAAL,kBAAKA,uBAAL;AAEH,EAAAA,sCAAA,aAAU,KAAV;AAGA,EAAAA,sCAAA,aAAU,KAAV;AAGA,EAAAA,sCAAA,qBAAkB,KAAlB;AAGA,EAAAA,sCAAA,gBAAa,KAAb;AAGA,EAAAA,sCAAA,gBAAa,KAAb;AAGA,EAAAA,sCAAA,iBAAc,KAAd;AAGA,EAAAA,sCAAA,gBAAa,KAAb;AAGA,EAAAA,sCAAA,uBAAoB,KAApB;AAGA,EAAAA,sCAAA,UAAO,KAAP;AAGA,EAAAA,sCAAA,aAAU,KAAV;AAGA,EAAAA,sCAAA,cAAW,MAAX;AAGA,EAAAA,sCAAA,aAAU,MAAV;AAGA,EAAAA,sCAAA,qBAAkB,MAAlB;AAGA,EAAAA,sCAAA,cAAW,MAAX;AAGA,EAAAA,sCAAA,mBAAgB,MAAhB;AAGA,EAAAA,sCAAA,sBAAmB,MAAnB;AAGA,EAAAA,sCAAA,cAAW,MAAX;AAGA,EAAAA,sCAAA,qBAAkB,MAAlB;AArDQ,SAAAA;AAAA,GAAA;",
5
+ "names": ["GeneralStatusCode"]
6
+ }
@@ -3,6 +3,7 @@
3
3
  * Copyright 2022-2025 Matter.js Authors
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ export * from "./general.js";
6
7
  export * from "./interaction.js";
7
8
  export * from "./secure-channel.js";
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
@@ -3,6 +3,7 @@
3
3
  * Copyright 2022-2025 Matter.js Authors
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ export * from "./general.js";
6
7
  export * from "./interaction.js";
7
8
  export * from "./secure-channel.js";
8
9
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/protocol/definitions/index.ts"],
4
- "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,cAAc;AACd,cAAc;",
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,cAAc;AACd,cAAc;AACd,cAAc;",
5
5
  "names": []
6
6
  }
@@ -46,7 +46,7 @@ export declare enum SecureMessageType {
46
46
  /** The Check-in message notifies a client that the ICD is available for communication. */
47
47
  IcdCheckInMessage = 80
48
48
  }
49
- export declare enum ProtocolStatusCode {
49
+ export declare enum SecureChannelStatusCode {
50
50
  /** Indication that the last session establishment message was successfully processed. */
51
51
  Success = 0,
52
52
  /** Failure to find a common set of shared roots. */
@@ -56,44 +56,10 @@ export declare enum ProtocolStatusCode {
56
56
  /** Indication that the sender will close the current session. See Section “CloseSession” for more details. */
57
57
  CloseSession = 3,
58
58
  /** Indication that the sender cannot currently fulfill the request. See Section “Busy” for more details. */
59
- Busy = 4
60
- }
61
- export declare enum GeneralStatusCode {
62
- /** Operation completed successfully. */
63
- Success = 0,
64
- /** Generic failure, additional details may be included in the protocol specific status. */
65
- Failure = 1,
66
- /** Operation was rejected by the system because the system is in an invalid state. */
67
- BadPrecondition = 2,
68
- /** A value was out of a required range */
69
- OutOfRange = 3,
70
- /** A request was unrecognized or malformed */
71
- BadRequest = 4,
72
- /** An unrecognized or unsupported request was received. */
73
- Unsupported = 5,
74
- /** A request was not expected at this time. */
75
- Unexpected = 6,
76
- /** Insufficient resources to process the given request. */
77
- ResourceExhausted = 7,
78
- /** Device is busy and cannot handle this request at this time. */
79
- Busy = 8,
80
- /** A timeout occurred. */
81
- Timeout = 9,
82
- /** Context-specific signal to proceed */
83
- Continue = 10,
84
- /** Failure, may be due to a concurrency error. */
85
- Aborted = 11,
86
- /** An invalid/unsupported argument was provided. */
87
- InvalidArgument = 12,
88
- /** Some requested entity was not found. */
89
- NotFound = 13,
90
- /** The sender attempted to create something that already exists. */
91
- AlreadyExists = 14,
92
- /** The sender does not have sufficient permissions to execute the requested operations. */
93
- PermissionDenied = 15,
94
- /** Unrecoverable data loss or corruption has occurred. */
95
- DataLoss = 16,
96
- /** Message size is larger than the recipient can handle. */
97
- MessageTooLarge = 17
59
+ Busy = 4,
60
+ /**
61
+ * No additional error details available.
62
+ */
63
+ GeneralError = 65535
98
64
  }
99
65
  //# sourceMappingURL=secure-channel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"secure-channel.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/secure-channel.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,0BAA0B,IAAS,CAAC;AAEjD,oBAAY,iBAAiB;IACzB;;;OAGG;IACH,iBAAiB,IAAO;IAExB;;;OAGG;IACH,iBAAiB,IAAO;IAExB;;;OAGG;IACH,aAAa,KAAO;IAEpB,gFAAgF;IAChF,iBAAiB,KAAO;IAExB,2FAA2F;IAC3F,kBAAkB,KAAO;IAEzB,mDAAmD;IACnD,SAAS,KAAO;IAEhB,oDAAoD;IACpD,SAAS,KAAO;IAEhB,mDAAmD;IACnD,SAAS,KAAO;IAEhB,8CAA8C;IAC9C,MAAM,KAAO;IAEb,+CAA+C;IAC/C,MAAM,KAAO;IAEb,8CAA8C;IAC9C,MAAM,KAAO;IAEb,0DAA0D;IAC1D,YAAY,KAAO;IAEnB,qHAAqH;IACrH,YAAY,KAAO;IAEnB,0FAA0F;IAC1F,iBAAiB,KAAO;CAC3B;AAED,oBAAY,kBAAkB;IAC1B,yFAAyF;IACzF,OAAO,IAAS;IAEhB,oDAAoD;IACpD,kBAAkB,IAAS;IAE3B,oDAAoD;IACpD,YAAY,IAAS;IAErB,8GAA8G;IAC9G,YAAY,IAAS;IAErB,4GAA4G;IAC5G,IAAI,IAAS;CAChB;AAED,oBAAY,iBAAiB;IACzB,wCAAwC;IACxC,OAAO,IAAI;IAEX,2FAA2F;IAC3F,OAAO,IAAI;IAEX,sFAAsF;IACtF,eAAe,IAAI;IAEnB,0CAA0C;IAC1C,UAAU,IAAI;IAEd,8CAA8C;IAC9C,UAAU,IAAI;IAEd,2DAA2D;IAC3D,WAAW,IAAI;IAEf,+CAA+C;IAC/C,UAAU,IAAI;IAEd,2DAA2D;IAC3D,iBAAiB,IAAI;IAErB,kEAAkE;IAClE,IAAI,IAAI;IAER,0BAA0B;IAC1B,OAAO,IAAI;IAEX,yCAAyC;IACzC,QAAQ,KAAK;IAEb,kDAAkD;IAClD,OAAO,KAAK;IAEZ,oDAAoD;IACpD,eAAe,KAAK;IAEpB,2CAA2C;IAC3C,QAAQ,KAAK;IAEb,oEAAoE;IACpE,aAAa,KAAK;IAElB,2FAA2F;IAC3F,gBAAgB,KAAK;IAErB,0DAA0D;IAC1D,QAAQ,KAAK;IAEb,4DAA4D;IAC5D,eAAe,KAAK;CACvB"}
1
+ {"version":3,"file":"secure-channel.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/secure-channel.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,0BAA0B,IAAS,CAAC;AAEjD,oBAAY,iBAAiB;IACzB;;;OAGG;IACH,iBAAiB,IAAO;IAExB;;;OAGG;IACH,iBAAiB,IAAO;IAExB;;;OAGG;IACH,aAAa,KAAO;IAEpB,gFAAgF;IAChF,iBAAiB,KAAO;IAExB,2FAA2F;IAC3F,kBAAkB,KAAO;IAEzB,mDAAmD;IACnD,SAAS,KAAO;IAEhB,oDAAoD;IACpD,SAAS,KAAO;IAEhB,mDAAmD;IACnD,SAAS,KAAO;IAEhB,8CAA8C;IAC9C,MAAM,KAAO;IAEb,+CAA+C;IAC/C,MAAM,KAAO;IAEb,8CAA8C;IAC9C,MAAM,KAAO;IAEb,0DAA0D;IAC1D,YAAY,KAAO;IAEnB,qHAAqH;IACrH,YAAY,KAAO;IAEnB,0FAA0F;IAC1F,iBAAiB,KAAO;CAC3B;AAED,oBAAY,uBAAuB;IAC/B,yFAAyF;IACzF,OAAO,IAAS;IAEhB,oDAAoD;IACpD,kBAAkB,IAAS;IAE3B,oDAAoD;IACpD,YAAY,IAAS;IAErB,8GAA8G;IAC9G,YAAY,IAAS;IAErB,4GAA4G;IAC5G,IAAI,IAAS;IAEb;;OAEG;IACH,YAAY,QAAS;CACxB"}
@@ -21,39 +21,18 @@ var SecureMessageType = /* @__PURE__ */ ((SecureMessageType2) => {
21
21
  SecureMessageType2[SecureMessageType2["IcdCheckInMessage"] = 80] = "IcdCheckInMessage";
22
22
  return SecureMessageType2;
23
23
  })(SecureMessageType || {});
24
- var ProtocolStatusCode = /* @__PURE__ */ ((ProtocolStatusCode2) => {
25
- ProtocolStatusCode2[ProtocolStatusCode2["Success"] = 0] = "Success";
26
- ProtocolStatusCode2[ProtocolStatusCode2["NoSharedTrustRoots"] = 1] = "NoSharedTrustRoots";
27
- ProtocolStatusCode2[ProtocolStatusCode2["InvalidParam"] = 2] = "InvalidParam";
28
- ProtocolStatusCode2[ProtocolStatusCode2["CloseSession"] = 3] = "CloseSession";
29
- ProtocolStatusCode2[ProtocolStatusCode2["Busy"] = 4] = "Busy";
30
- return ProtocolStatusCode2;
31
- })(ProtocolStatusCode || {});
32
- var GeneralStatusCode = /* @__PURE__ */ ((GeneralStatusCode2) => {
33
- GeneralStatusCode2[GeneralStatusCode2["Success"] = 0] = "Success";
34
- GeneralStatusCode2[GeneralStatusCode2["Failure"] = 1] = "Failure";
35
- GeneralStatusCode2[GeneralStatusCode2["BadPrecondition"] = 2] = "BadPrecondition";
36
- GeneralStatusCode2[GeneralStatusCode2["OutOfRange"] = 3] = "OutOfRange";
37
- GeneralStatusCode2[GeneralStatusCode2["BadRequest"] = 4] = "BadRequest";
38
- GeneralStatusCode2[GeneralStatusCode2["Unsupported"] = 5] = "Unsupported";
39
- GeneralStatusCode2[GeneralStatusCode2["Unexpected"] = 6] = "Unexpected";
40
- GeneralStatusCode2[GeneralStatusCode2["ResourceExhausted"] = 7] = "ResourceExhausted";
41
- GeneralStatusCode2[GeneralStatusCode2["Busy"] = 8] = "Busy";
42
- GeneralStatusCode2[GeneralStatusCode2["Timeout"] = 9] = "Timeout";
43
- GeneralStatusCode2[GeneralStatusCode2["Continue"] = 10] = "Continue";
44
- GeneralStatusCode2[GeneralStatusCode2["Aborted"] = 11] = "Aborted";
45
- GeneralStatusCode2[GeneralStatusCode2["InvalidArgument"] = 12] = "InvalidArgument";
46
- GeneralStatusCode2[GeneralStatusCode2["NotFound"] = 13] = "NotFound";
47
- GeneralStatusCode2[GeneralStatusCode2["AlreadyExists"] = 14] = "AlreadyExists";
48
- GeneralStatusCode2[GeneralStatusCode2["PermissionDenied"] = 15] = "PermissionDenied";
49
- GeneralStatusCode2[GeneralStatusCode2["DataLoss"] = 16] = "DataLoss";
50
- GeneralStatusCode2[GeneralStatusCode2["MessageTooLarge"] = 17] = "MessageTooLarge";
51
- return GeneralStatusCode2;
52
- })(GeneralStatusCode || {});
24
+ var SecureChannelStatusCode = /* @__PURE__ */ ((SecureChannelStatusCode2) => {
25
+ SecureChannelStatusCode2[SecureChannelStatusCode2["Success"] = 0] = "Success";
26
+ SecureChannelStatusCode2[SecureChannelStatusCode2["NoSharedTrustRoots"] = 1] = "NoSharedTrustRoots";
27
+ SecureChannelStatusCode2[SecureChannelStatusCode2["InvalidParam"] = 2] = "InvalidParam";
28
+ SecureChannelStatusCode2[SecureChannelStatusCode2["CloseSession"] = 3] = "CloseSession";
29
+ SecureChannelStatusCode2[SecureChannelStatusCode2["Busy"] = 4] = "Busy";
30
+ SecureChannelStatusCode2[SecureChannelStatusCode2["GeneralError"] = 65535] = "GeneralError";
31
+ return SecureChannelStatusCode2;
32
+ })(SecureChannelStatusCode || {});
53
33
  export {
54
- GeneralStatusCode,
55
- ProtocolStatusCode,
56
34
  SECURE_CHANNEL_PROTOCOL_ID,
35
+ SecureChannelStatusCode,
57
36
  SecureMessageType
58
37
  };
59
38
  //# sourceMappingURL=secure-channel.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/protocol/definitions/secure-channel.ts"],
4
- "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AASO,MAAM,6BAA6B;AAEnC,IAAK,oBAAL,kBAAKA,uBAAL;AAKH,EAAAA,sCAAA,uBAAoB,KAApB;AAMA,EAAAA,sCAAA,uBAAoB,KAApB;AAMA,EAAAA,sCAAA,mBAAgB,MAAhB;AAGA,EAAAA,sCAAA,uBAAoB,MAApB;AAGA,EAAAA,sCAAA,wBAAqB,MAArB;AAGA,EAAAA,sCAAA,eAAY,MAAZ;AAGA,EAAAA,sCAAA,eAAY,MAAZ;AAGA,EAAAA,sCAAA,eAAY,MAAZ;AAGA,EAAAA,sCAAA,YAAS,MAAT;AAGA,EAAAA,sCAAA,YAAS,MAAT;AAGA,EAAAA,sCAAA,YAAS,MAAT;AAGA,EAAAA,sCAAA,kBAAe,MAAf;AAGA,EAAAA,sCAAA,kBAAe,MAAf;AAGA,EAAAA,sCAAA,uBAAoB,MAApB;AAlDQ,SAAAA;AAAA,GAAA;AAqDL,IAAK,qBAAL,kBAAKC,wBAAL;AAEH,EAAAA,wCAAA,aAAU,KAAV;AAGA,EAAAA,wCAAA,wBAAqB,KAArB;AAGA,EAAAA,wCAAA,kBAAe,KAAf;AAGA,EAAAA,wCAAA,kBAAe,KAAf;AAGA,EAAAA,wCAAA,UAAO,KAAP;AAdQ,SAAAA;AAAA,GAAA;AAiBL,IAAK,oBAAL,kBAAKC,uBAAL;AAEH,EAAAA,sCAAA,aAAU,KAAV;AAGA,EAAAA,sCAAA,aAAU,KAAV;AAGA,EAAAA,sCAAA,qBAAkB,KAAlB;AAGA,EAAAA,sCAAA,gBAAa,KAAb;AAGA,EAAAA,sCAAA,gBAAa,KAAb;AAGA,EAAAA,sCAAA,iBAAc,KAAd;AAGA,EAAAA,sCAAA,gBAAa,KAAb;AAGA,EAAAA,sCAAA,uBAAoB,KAApB;AAGA,EAAAA,sCAAA,UAAO,KAAP;AAGA,EAAAA,sCAAA,aAAU,KAAV;AAGA,EAAAA,sCAAA,cAAW,MAAX;AAGA,EAAAA,sCAAA,aAAU,MAAV;AAGA,EAAAA,sCAAA,qBAAkB,MAAlB;AAGA,EAAAA,sCAAA,cAAW,MAAX;AAGA,EAAAA,sCAAA,mBAAgB,MAAhB;AAGA,EAAAA,sCAAA,sBAAmB,MAAnB;AAGA,EAAAA,sCAAA,cAAW,MAAX;AAGA,EAAAA,sCAAA,qBAAkB,MAAlB;AArDQ,SAAAA;AAAA,GAAA;",
5
- "names": ["SecureMessageType", "ProtocolStatusCode", "GeneralStatusCode"]
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AASO,MAAM,6BAA6B;AAEnC,IAAK,oBAAL,kBAAKA,uBAAL;AAKH,EAAAA,sCAAA,uBAAoB,KAApB;AAMA,EAAAA,sCAAA,uBAAoB,KAApB;AAMA,EAAAA,sCAAA,mBAAgB,MAAhB;AAGA,EAAAA,sCAAA,uBAAoB,MAApB;AAGA,EAAAA,sCAAA,wBAAqB,MAArB;AAGA,EAAAA,sCAAA,eAAY,MAAZ;AAGA,EAAAA,sCAAA,eAAY,MAAZ;AAGA,EAAAA,sCAAA,eAAY,MAAZ;AAGA,EAAAA,sCAAA,YAAS,MAAT;AAGA,EAAAA,sCAAA,YAAS,MAAT;AAGA,EAAAA,sCAAA,YAAS,MAAT;AAGA,EAAAA,sCAAA,kBAAe,MAAf;AAGA,EAAAA,sCAAA,kBAAe,MAAf;AAGA,EAAAA,sCAAA,uBAAoB,MAApB;AAlDQ,SAAAA;AAAA,GAAA;AAqDL,IAAK,0BAAL,kBAAKC,6BAAL;AAEH,EAAAA,kDAAA,aAAU,KAAV;AAGA,EAAAA,kDAAA,wBAAqB,KAArB;AAGA,EAAAA,kDAAA,kBAAe,KAAf;AAGA,EAAAA,kDAAA,kBAAe,KAAf;AAGA,EAAAA,kDAAA,UAAO,KAAP;AAKA,EAAAA,kDAAA,kBAAe,SAAf;AAnBQ,SAAAA;AAAA,GAAA;",
5
+ "names": ["SecureMessageType", "SecureChannelStatusCode"]
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matter/types",
3
- "version": "0.15.0-alpha.0-20250624-e8c89f458",
3
+ "version": "0.15.0-alpha.0-20250625-4a4b1be1b",
4
4
  "description": "Definitions for Matter application",
5
5
  "keywords": [
6
6
  "iot",
@@ -33,12 +33,12 @@
33
33
  "embed-examples": "embedme **/README.md"
34
34
  },
35
35
  "dependencies": {
36
- "@matter/general": "0.15.0-alpha.0-20250624-e8c89f458",
37
- "@matter/model": "0.15.0-alpha.0-20250624-e8c89f458"
36
+ "@matter/general": "0.15.0-alpha.0-20250625-4a4b1be1b",
37
+ "@matter/model": "0.15.0-alpha.0-20250625-4a4b1be1b"
38
38
  },
39
39
  "devDependencies": {
40
- "@matter/tools": "0.15.0-alpha.0-20250624-e8c89f458",
41
- "@matter/testing": "0.15.0-alpha.0-20250624-e8c89f458"
40
+ "@matter/tools": "0.15.0-alpha.0-20250625-4a4b1be1b",
41
+ "@matter/testing": "0.15.0-alpha.0-20250625-4a4b1be1b"
42
42
  },
43
43
  "files": [
44
44
  "dist/**/*",
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ export enum GeneralStatusCode {
8
+ /** Operation completed successfully. */
9
+ Success = 0,
10
+
11
+ /** Generic failure, additional details may be included in the protocol specific status. */
12
+ Failure = 1,
13
+
14
+ /** Operation was rejected by the system because the system is in an invalid state. */
15
+ BadPrecondition = 2,
16
+
17
+ /** A value was out of a required range */
18
+ OutOfRange = 3,
19
+
20
+ /** A request was unrecognized or malformed */
21
+ BadRequest = 4,
22
+
23
+ /** An unrecognized or unsupported request was received. */
24
+ Unsupported = 5,
25
+
26
+ /** A request was not expected at this time. */
27
+ Unexpected = 6,
28
+
29
+ /** Insufficient resources to process the given request. */
30
+ ResourceExhausted = 7,
31
+
32
+ /** Device is busy and cannot handle this request at this time. */
33
+ Busy = 8,
34
+
35
+ /** A timeout occurred. */
36
+ Timeout = 9,
37
+
38
+ /** Context-specific signal to proceed */
39
+ Continue = 10,
40
+
41
+ /** Failure, may be due to a concurrency error. */
42
+ Aborted = 11,
43
+
44
+ /** An invalid/unsupported argument was provided. */
45
+ InvalidArgument = 12,
46
+
47
+ /** Some requested entity was not found. */
48
+ NotFound = 13,
49
+
50
+ /** The sender attempted to create something that already exists. */
51
+ AlreadyExists = 14,
52
+
53
+ /** The sender does not have sufficient permissions to execute the requested operations. */
54
+ PermissionDenied = 15,
55
+
56
+ /** Unrecoverable data loss or corruption has occurred. */
57
+ DataLoss = 16,
58
+
59
+ /** Message size is larger than the recipient can handle. */
60
+ MessageTooLarge = 17,
61
+ }
@@ -4,5 +4,6 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ export * from "./general.js";
7
8
  export * from "./interaction.js";
8
9
  export * from "./secure-channel.js";
@@ -62,7 +62,7 @@ export enum SecureMessageType {
62
62
  IcdCheckInMessage = 0x50,
63
63
  }
64
64
 
65
- export enum ProtocolStatusCode {
65
+ export enum SecureChannelStatusCode {
66
66
  /** Indication that the last session establishment message was successfully processed. */
67
67
  Success = 0x0000,
68
68
 
@@ -77,60 +77,9 @@ export enum ProtocolStatusCode {
77
77
 
78
78
  /** Indication that the sender cannot currently fulfill the request. See Section “Busy” for more details. */
79
79
  Busy = 0x0004,
80
- }
81
-
82
- export enum GeneralStatusCode {
83
- /** Operation completed successfully. */
84
- Success = 0,
85
-
86
- /** Generic failure, additional details may be included in the protocol specific status. */
87
- Failure = 1,
88
-
89
- /** Operation was rejected by the system because the system is in an invalid state. */
90
- BadPrecondition = 2,
91
-
92
- /** A value was out of a required range */
93
- OutOfRange = 3,
94
-
95
- /** A request was unrecognized or malformed */
96
- BadRequest = 4,
97
-
98
- /** An unrecognized or unsupported request was received. */
99
- Unsupported = 5,
100
-
101
- /** A request was not expected at this time. */
102
- Unexpected = 6,
103
-
104
- /** Insufficient resources to process the given request. */
105
- ResourceExhausted = 7,
106
-
107
- /** Device is busy and cannot handle this request at this time. */
108
- Busy = 8,
109
80
 
110
- /** A timeout occurred. */
111
- Timeout = 9,
112
-
113
- /** Context-specific signal to proceed */
114
- Continue = 10,
115
-
116
- /** Failure, may be due to a concurrency error. */
117
- Aborted = 11,
118
-
119
- /** An invalid/unsupported argument was provided. */
120
- InvalidArgument = 12,
121
-
122
- /** Some requested entity was not found. */
123
- NotFound = 13,
124
-
125
- /** The sender attempted to create something that already exists. */
126
- AlreadyExists = 14,
127
-
128
- /** The sender does not have sufficient permissions to execute the requested operations. */
129
- PermissionDenied = 15,
130
-
131
- /** Unrecoverable data loss or corruption has occurred. */
132
- DataLoss = 16,
133
-
134
- /** Message size is larger than the recipient can handle. */
135
- MessageTooLarge = 17,
81
+ /**
82
+ * No additional error details available.
83
+ */
84
+ GeneralError = 0xffff,
136
85
  }