@matter/types 0.15.0-alpha.0-20250620-16e218ed3 → 0.15.0-alpha.0-20250624-e8c89f458

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 (82) hide show
  1. package/dist/cjs/dcl/attestation-certificate.d.ts +99 -0
  2. package/dist/cjs/dcl/attestation-certificate.d.ts.map +1 -0
  3. package/dist/cjs/dcl/attestation-certificate.js +22 -0
  4. package/dist/cjs/dcl/attestation-certificate.js.map +6 -0
  5. package/dist/cjs/dcl/device-attestation-revocation.d.ts +135 -0
  6. package/dist/cjs/dcl/device-attestation-revocation.d.ts.map +1 -0
  7. package/dist/cjs/dcl/device-attestation-revocation.js +33 -0
  8. package/dist/cjs/dcl/device-attestation-revocation.js.map +6 -0
  9. package/dist/cjs/dcl/device-software-compliance.d.ts +96 -0
  10. package/dist/cjs/dcl/device-software-compliance.d.ts.map +1 -0
  11. package/dist/cjs/dcl/device-software-compliance.js +36 -0
  12. package/dist/cjs/dcl/device-software-compliance.js.map +6 -0
  13. package/dist/cjs/dcl/device-software-version.d.ts +127 -0
  14. package/dist/cjs/dcl/device-software-version.d.ts.map +1 -0
  15. package/dist/cjs/dcl/device-software-version.js +22 -0
  16. package/dist/cjs/dcl/device-software-version.js.map +6 -0
  17. package/dist/cjs/dcl/device.d.ts +217 -0
  18. package/dist/cjs/dcl/device.d.ts.map +1 -0
  19. package/dist/cjs/dcl/device.js +22 -0
  20. package/dist/cjs/dcl/device.js.map +6 -0
  21. package/dist/cjs/dcl/index.d.ts +13 -0
  22. package/dist/cjs/dcl/index.d.ts.map +1 -0
  23. package/dist/cjs/dcl/index.js +30 -0
  24. package/dist/cjs/dcl/index.js.map +6 -0
  25. package/dist/cjs/dcl/operational-certificate.d.ts +79 -0
  26. package/dist/cjs/dcl/operational-certificate.d.ts.map +1 -0
  27. package/dist/cjs/dcl/operational-certificate.js +22 -0
  28. package/dist/cjs/dcl/operational-certificate.js.map +6 -0
  29. package/dist/cjs/dcl/vendor.d.ts +47 -0
  30. package/dist/cjs/dcl/vendor.d.ts.map +1 -0
  31. package/dist/cjs/dcl/vendor.js +22 -0
  32. package/dist/cjs/dcl/vendor.js.map +6 -0
  33. package/dist/cjs/index.d.ts +1 -0
  34. package/dist/cjs/index.d.ts.map +1 -1
  35. package/dist/cjs/index.js +1 -0
  36. package/dist/cjs/index.js.map +1 -1
  37. package/dist/esm/dcl/attestation-certificate.d.ts +99 -0
  38. package/dist/esm/dcl/attestation-certificate.d.ts.map +1 -0
  39. package/dist/esm/dcl/attestation-certificate.js +6 -0
  40. package/dist/esm/dcl/attestation-certificate.js.map +6 -0
  41. package/dist/esm/dcl/device-attestation-revocation.d.ts +135 -0
  42. package/dist/esm/dcl/device-attestation-revocation.d.ts.map +1 -0
  43. package/dist/esm/dcl/device-attestation-revocation.js +13 -0
  44. package/dist/esm/dcl/device-attestation-revocation.js.map +6 -0
  45. package/dist/esm/dcl/device-software-compliance.d.ts +96 -0
  46. package/dist/esm/dcl/device-software-compliance.d.ts.map +1 -0
  47. package/dist/esm/dcl/device-software-compliance.js +16 -0
  48. package/dist/esm/dcl/device-software-compliance.js.map +6 -0
  49. package/dist/esm/dcl/device-software-version.d.ts +127 -0
  50. package/dist/esm/dcl/device-software-version.d.ts.map +1 -0
  51. package/dist/esm/dcl/device-software-version.js +6 -0
  52. package/dist/esm/dcl/device-software-version.js.map +6 -0
  53. package/dist/esm/dcl/device.d.ts +217 -0
  54. package/dist/esm/dcl/device.d.ts.map +1 -0
  55. package/dist/esm/dcl/device.js +6 -0
  56. package/dist/esm/dcl/device.js.map +6 -0
  57. package/dist/esm/dcl/index.d.ts +13 -0
  58. package/dist/esm/dcl/index.d.ts.map +1 -0
  59. package/dist/esm/dcl/index.js +13 -0
  60. package/dist/esm/dcl/index.js.map +6 -0
  61. package/dist/esm/dcl/operational-certificate.d.ts +79 -0
  62. package/dist/esm/dcl/operational-certificate.d.ts.map +1 -0
  63. package/dist/esm/dcl/operational-certificate.js +6 -0
  64. package/dist/esm/dcl/operational-certificate.js.map +6 -0
  65. package/dist/esm/dcl/vendor.d.ts +47 -0
  66. package/dist/esm/dcl/vendor.d.ts.map +1 -0
  67. package/dist/esm/dcl/vendor.js +6 -0
  68. package/dist/esm/dcl/vendor.js.map +6 -0
  69. package/dist/esm/index.d.ts +1 -0
  70. package/dist/esm/index.d.ts.map +1 -1
  71. package/dist/esm/index.js +1 -0
  72. package/dist/esm/index.js.map +1 -1
  73. package/package.json +5 -5
  74. package/src/dcl/attestation-certificate.ts +114 -0
  75. package/src/dcl/device-attestation-revocation.ts +149 -0
  76. package/src/dcl/device-software-compliance.ts +108 -0
  77. package/src/dcl/device-software-version.ts +143 -0
  78. package/src/dcl/device.ts +243 -0
  79. package/src/dcl/index.ts +13 -0
  80. package/src/dcl/operational-certificate.ts +90 -0
  81. package/src/dcl/vendor.ts +53 -0
  82. package/src/index.ts +1 -0
@@ -0,0 +1,149 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ import { VendorId } from "../datatype/VendorId.js";
8
+
9
+ export enum RevocationTypeEnum {
10
+ /**
11
+ * RFC 5280 Certificate Revocation List (CRL)
12
+ */
13
+ Crl = 1,
14
+ }
15
+
16
+ /**
17
+ * Device Attestation PKI Revocation Distribution Points Schema
18
+ * @see {@link MatterSpecification.v141.Core} § 11.23.9.
19
+ * DCL endpoints:
20
+ * * /dcl/pki/revocation-points
21
+ * * /dcl/pki/revocation-points/{issuerSubjectKeyID}
22
+ * * /dcl/pki/revocation-points/{issuerSubjectKeyID}/{vid}/{label}
23
+ */
24
+ export interface DeviceAttestationPkiRevocationDclSchema {
25
+ /**
26
+ * This field SHALL indicate the VendorID associated with the PAA or PAI whose revocation information
27
+ * is provided. For a non-vendor-scoped PAA, this SHALL be the VendorID associated with the
28
+ * organization operating the PAA. For vendor-scoped PAA and for PAIs, this field SHALL contain the
29
+ * VendorID as found in the CRLSignerCertificate (see Section 6.2.2.2, “Encoding of Vendor ID and
30
+ * Product ID in subject and issuer fields” for encoding).
31
+ */
32
+ vid: VendorId; // Spec: vendorId
33
+
34
+ /**
35
+ * This field is only required when a PAI is making the distribution point available. This field SHALL
36
+ * only be provided if the IsPAA field is false and if the CRLSignerCertificate field has a ProductID in
37
+ * its subject (see Section 6.2.2.2, “Encoding of Vendor ID and Product ID in subject and issuer fields”
38
+ * for encoding).
39
+ */
40
+ pid?: number; // Spec: productId
41
+
42
+ /**
43
+ * This field SHALL be set to true if the revocation information distribution point relates to a PAA, otherwise
44
+ * it SHALL be set to false (i.e. it relates to a PAI, not a PAA)."
45
+ */
46
+ isPAA: boolean;
47
+
48
+ /**
49
+ * This field contains a label to disambiguate multiple revocation information partitions of a particular
50
+ * issuer. Uniqueness within the Device Attestation PKI Revocation Distribution Points schema
51
+ * SHALL be enforced against the tuple containing all of:
52
+ * • VendorID
53
+ * • Label
54
+ * • IssuerSubjectKeyID
55
+ * Therefore, there MAY be multiple entries for the same VendorID and IssuerSubjectKeyID in case
56
+ * partitioning is done, which are disambiguated by the Label.
57
+ * Enforcement of uniqueness constraints SHALL be done by the Distributed Compliance Ledger’s
58
+ * block transaction processing and SHALL also be done by clients making use of the information
59
+ * from this schema.
60
+ */
61
+ label: string;
62
+
63
+ /**
64
+ * This field SHALL be present and non-empty if all of the following are true:
65
+ * • Certificate in CRLSignerCertificate field is not self-signed.
66
+ * • IsPAA is false.
67
+ * • CRLSignerCertificate is not a PAI.
68
+ * When present, this field SHALL contain the issuer certificate which signed the CRLSignerCertificate,
69
+ * encoded in X.509v3 PEM format.
70
+ * Additional constraints related to the value of this field are specified in Section 11.23.9.6, “CRLSignerCertificate”.
71
+ */
72
+ crlSignerDelegator?: string;
73
+
74
+ /**
75
+ * This field SHALL contain the issuer certificate who signed the revocation information that is provided
76
+ * in the distribution point entry, encoded in X.509v3 PEM format.
77
+ * Additional constraints related to the value of this field are specified in
78
+ * @see {@link MatterSpecification.v141.Core} §11.23.9.6.
79
+ */
80
+ crlSignerCertificate: string;
81
+
82
+ /**
83
+ * This field SHALL uniquely identify the PAA or PAI for which this revocation distribution point is
84
+ * provided, via the certificate’s SubjectKeyIdentifier mandatory extension. This field is provided to
85
+ * assist queries without requiring additional certificate parsing. This field SHALL provide the subject
86
+ * key identifier as an even number of uppercase hexadecimal characters ([0-9A-F]), with no whitespace
87
+ * and no non-hexadecimal characters.
88
+ * For example, subject key ID A3:03:13:6D:54:A8:4B:E2:4C:48:87:B3:41:06:6D:C2:70:96:2F:99 (as it
89
+ * would appear in openssl x509 output, for human consumption) would be recorded as
90
+ * A303136D54A84BE24C4887B341066DC270962F99.
91
+ * When processing revocation information during the device Device Attestation Procedure, clients
92
+ * SHALL only use entries whose IssuerSubjectKeyID matches a candidate certificate’s Authority Key
93
+ * Identifier extension.
94
+ */
95
+ issuerSubjectKeyID: string;
96
+
97
+ /**
98
+ * This field SHALL indicate the URL where to obtain the information in the format indicated by the
99
+ * RevocationType field. The syntax of this field SHALL follow the syntax as specified in RFC 1738. The
100
+ * maximum length of this field is 256 ASCII characters. All URLs SHALL use either the http or https
101
+ * scheme.
102
+ * Additional details of the content by revocation type are specified in
103
+ * @see {@link MatterSpecification.v141.Core} §11.23.9.8
104
+ */
105
+ dataUrl: string;
106
+
107
+ /**
108
+ * This field, if present, SHALL indicate the total size in bytes of the file found at the DataUrl. This field
109
+ * SHALL be omitted if the RevocationType is 1, which refers to a type having built-in signatures.
110
+ */
111
+ dataFileSize?: number | bigint; // TODO
112
+
113
+ /**
114
+ * This field, if present, SHALL contain the digest of the entire contents of the associated file downloaded
115
+ * from the DataUrl field, encoded in base64 string representation. The digest SHALL have been
116
+ * computed using the algorithm specified in DataDigestType. This field SHALL be present if and only if
117
+ * the DataFileSize field is present.
118
+ */
119
+ dataDigest?: string;
120
+
121
+ /**
122
+ * This field, if present, SHALL indicate the type of digest used in the DataDigest field. This field SHALL
123
+ * be provided if and only if the DataDigest field is present.
124
+ * The value of this field SHALL be a supported numerical identifier value from the IANA Named
125
+ * Information Hash Algorithm Registry [https://www.iana.org/assignments/named-information/named-information.xhtml#hash-alg]
126
+ * established as part of RFC 6920. For example, a value of 1 would match the sha-
127
+ * 256 identifier, which maps to the SHA-256 digest algorithm per Section 6.2 of FIPS 180-4.
128
+ * The digest algorithm chosen SHALL have a minimum digest length of 256 bits, such as sha-256 (ID 1
129
+ * in the registry).
130
+ * To increase interoperability, DataDigestType, if present, SHALL be within the list of [1, 7, 8, 10, 11,
131
+ * 12].
132
+ */
133
+ dataDigestType?: number; // TODO: Define enum for digest types
134
+
135
+ /**
136
+ * This field SHALL indicate the type of revocation information provided in the DataUrl field. The
137
+ * following values are defined:
138
+ * • 0: CRL (Certificate Revocation List) in PEM format.
139
+ * • 1: Signed JSON object containing a list of revoked certificates.
140
+ * • 2: Signed JSON object containing a list of revoked certificates, with additional metadata.
141
+ */
142
+ revocationType: RevocationTypeEnum;
143
+
144
+ /**
145
+ * The SchemaVersion field value history for this schema is provided below:
146
+ * * 0: Initial Release
147
+ */
148
+ schemaVersion: number;
149
+ }
@@ -0,0 +1,108 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ import { VendorId } from "../datatype/VendorId.js";
8
+
9
+ export enum SoftwareVersionCertificationStatusEnum {
10
+ /**
11
+ * Used for development and test purposes
12
+ * (These will typically not be placed in DCL)
13
+ */
14
+ DevTest = 0,
15
+
16
+ /**
17
+ * Used for a SoftwareVersion when going into certification testing
18
+ * (These might or might not be placed in DCL, depending on CSA policy and procedures)
19
+ */
20
+ Provisional = 1,
21
+
22
+ /**
23
+ * Used for a SoftwareVersion which has been certified
24
+ */
25
+ Certified = 2,
26
+
27
+ /**
28
+ * Used for a SoftwareVersion which has been revoked
29
+ */
30
+ Revoked = 3,
31
+ }
32
+
33
+ /**
34
+ * DeviceSoftwareCompliance / Compliance test result Schema
35
+ * @see {@link MatterSpecification.v141.Core} § 11.23.8.
36
+ * DCL endpoint:
37
+ * * /dcl/compliance/device-software-compliance
38
+ * * /dcl/compliance/device-software-compliance/{cDCertificateId}
39
+ *
40
+ * * /dcl/compliance/compliance-info
41
+ * * /dcl/compliance/compliance-info/{vid}/{pid}/{softwareVersion}/{certificationType}
42
+ * * /dcl/compliance/certified-models
43
+ * * /dcl/compliance/certified-models/{vid}/{pid}/{softwareVersion}/{certificationType}
44
+ *
45
+ */
46
+ export interface DeviceSoftwareComplianceDclSchema {
47
+ /**
48
+ * This field SHALL identify the vendor of the product by its Vendor ID and SHALL match the VendorID
49
+ * field in the Basic Information Cluster of a device running the software referenced by this
50
+ * DeviceModel/DeviceSoftwareVersionModel record.
51
+ */
52
+ vid: VendorId; // Spec: VendorId
53
+
54
+ /**
55
+ * This field SHALL identify the Product ID of the product instance to which a certification declaration,
56
+ * and thus a DCL entry, applies. This field SHALL match the ProductID field in the Basic Information
57
+ * Cluster of a device running the software referenced by this DeviceModel/DeviceSoftwareVersionModel
58
+ * record.
59
+ */
60
+ pid: number; // Spec: ProductId
61
+
62
+ /**
63
+ * SoftwareVersion SHALL identify the software version number for the device model consistent with
64
+ * the value found in Section 11.21.2.4.3, “SoftwareVersion field”. The SoftwareVersionNumber value
65
+ * SHOULD NOT be displayed to an end-user. SoftwareVersion is not editable, but it would be possible
66
+ * to create a new device model for the same VendorID/ProductID for different versions. Both SoftwareVersion
67
+ * and SoftwareVersionString SHALL be included. This field SHALL match the SoftwareVersion
68
+ * field in the Basic Information Cluster of a device running the software certified by this
69
+ * DeviceModel record.
70
+ */
71
+ softwareVersion: number;
72
+
73
+ /**
74
+ * This field SHALL match the Software Version String field in the Basic Information Cluster of a
75
+ * device running the software referenced by this DeviceModel record, including format constraints
76
+ * on that field.
77
+ */
78
+ softwareVersionString: string;
79
+
80
+ /**
81
+ * CDVersionNumber SHALL identify the CD Version Number of the Certification that applies to this
82
+ * Software Image. The CDVersionNumber maps to version_number defined in Certification Elements TLV
83
+ * structure.
84
+ */
85
+ cdVersionNumber: number;
86
+
87
+ /**
88
+ * The FirmwareInformation field, if present, SHALL match the firmware_information field in attestation-elements
89
+ * field included in the Device Attestation response when this Software Image boots on
90
+ * the device. It is an OPTIONAL field that MAY be present only for devices that meet the requirements
91
+ * listed in Section 6.3.2, “Firmware Information”.
92
+ */
93
+ softwareVersionCertificationStatus?: SoftwareVersionCertificationStatusEnum;
94
+
95
+ /**
96
+ * This field SHALL have the CSA certification’s certificate ID for the Certification that applies to this
97
+ * record. The value of this field is used in the Certification Declaration's certificate_id field (see Certification
98
+ * Elements TLV structure) for products using the VendorID, ProductID and SoftwareVersion
99
+ * in this schema entry.
100
+ */
101
+ cdCertificateId: string;
102
+
103
+ /**
104
+ * The SchemaVersion field value history for this schema is provided below:
105
+ * * 0: Initial Release
106
+ */
107
+ schemaVersion: number;
108
+ }
@@ -0,0 +1,143 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ import { VendorId } from "../datatype/VendorId.js";
8
+
9
+ /**
10
+ * DeviceSoftwareVersionModel Schema
11
+ * @see {@link MatterSpecification.v141.Core} § 11.23.7.
12
+ * DCL endpoints:
13
+ * * check with https://on.dcl.csa-iot.org/dcl/model/versions/{vid}/{pid} to get a list of software versions, check for newer ones
14
+ * * check with https://on.dcl.csa-iot.org/dcl/model/versions/{vid}/{pid}/{softwareVersion} for these details
15
+ * see also https://github.com/home-assistant-libs/python-matter-server/blob/main/matter_server/server/ota/dcl.py#L35
16
+ */
17
+ export interface DeviceSoftwareVersionModelDclSchema {
18
+ /**
19
+ * This field SHALL identify the vendor of the product by its Vendor ID and SHALL match the VendorID
20
+ * field in the Basic Information Cluster of a device running the software referenced by this
21
+ * DeviceModel/DeviceSoftwareVersionModel record.
22
+ */
23
+ vid: VendorId; // Spec vendorId
24
+
25
+ /**
26
+ * This field SHALL identify the Product ID of the product instance to which a certification declaration,
27
+ * and thus a DCL entry, applies. This field SHALL match the ProductID field in the Basic Information
28
+ * Cluster of a device running the software referenced by this DeviceModel/DeviceSoftwareVersionModel
29
+ * record.
30
+ */
31
+ pid: number; // Spec productId
32
+
33
+ /**
34
+ * SoftwareVersion SHALL identify the software version number for the device model consistent with
35
+ * the value found in Section 11.21.2.4.3, “SoftwareVersion field”. The SoftwareVersionNumber value
36
+ * SHOULD NOT be displayed to an end-user. SoftwareVersion is not editable, but it would be possible
37
+ * to create a new device model for the same VendorID/ProductID for different versions. Both SoftwareVersion
38
+ * and SoftwareVersionString SHALL be included. This field SHALL match the SoftwareVersion
39
+ * field in the Basic Information Cluster of a device running the software certified by this
40
+ * DeviceModel record.
41
+ */
42
+ softwareVersion: number;
43
+
44
+ /**
45
+ * This field SHALL match the Software Version String field in the Basic Information Cluster of a
46
+ * device running the software referenced by this DeviceModel record, including format constraints
47
+ * on that field.
48
+ */
49
+ softwareVersionString: string;
50
+
51
+ /**
52
+ * CDVersionNumber SHALL identify the CD Version Number of the Certification that applies to this
53
+ * Software Image. The CDVersionNumber maps to version_number defined in Certification Elements TLV
54
+ * structure.
55
+ */
56
+ cdVersionNumber: number;
57
+
58
+ /**
59
+ * The FirmwareInformation field, if present, SHALL match the firmware_information field in attestation-elements
60
+ * field included in the Device Attestation response when this Software Image boots on
61
+ * the device. It is an OPTIONAL field that MAY be present only for devices that meet the requirements
62
+ * listed in Section 6.3.2, “Firmware Information”.
63
+ */
64
+ firmwareInformation?: string;
65
+
66
+ /**
67
+ * This field SHALL indicate whether this SoftwareVersion is valid. When creating an entry for a new
68
+ * SoftwareVersion, this typically is set to True. When the manufacturer later finds out there is some
69
+ * reason that this version should no longer be used (e.g. due to some bugs), the field SHALL be
70
+ * updated to False.
71
+ */
72
+ softwareVersionValid: boolean;
73
+
74
+ /**
75
+ * OtaUrl SHALL identify the URL where to obtain the OTA image. The OtaUrl field SHALL be populated
76
+ * unless the device manufacturer provides alternative means to update the product’s firmware.
77
+ * The specified URL SHOULD be available for the relevant lifetime of the corresponding software.
78
+ * The syntax of this field SHALL follow the syntax as specified in RFC 1738 and SHALL use the https
79
+ * scheme. The maximum length of this field is 256 ASCII characters.
80
+ */
81
+ otaUrl?: string;
82
+
83
+ /**
84
+ * OtaFileSize is the total size of the OTA software image in bytes. This field SHALL be provided if the
85
+ * OtaUrl field is populated.
86
+ */
87
+ otaFileSize?: number | bigint; // TODO
88
+
89
+ /**
90
+ * OtaChecksum SHALL contain the digest of the entire contents of the associated OTA Software
91
+ * Update Image under the OtaUrl field, encoded in base64 string representation. The digest SHALL
92
+ * have been computed using the algorithm specified in OtaChecksumType. This field SHALL be provided
93
+ * if the OtaUrl field is populated.
94
+ */
95
+ otaChecksum?: string;
96
+
97
+ /**
98
+ * OtaChecksumType SHALL identify the type of OtaChecksum. This field SHALL be provided if the
99
+ * OtaUrl field is populated.
100
+ * The value of this field SHALL be a supported numerical identifier value from the IANA Named
101
+ * Information Hash Algorithm Registry [https://www.iana.org/assignments/named-information/named-information.xhtml#hash-alg]
102
+ * established as part of RFC 6920. For example, a value of 1 would match the sha-
103
+ * 256 identifier, which maps to the SHA-256 digest algorithm per Section 6.2 of FIPS 180-4.
104
+ * The digest algorithm chosen SHALL have a minimum digest length of 256 bits, such as sha-256 (ID 1
105
+ * in the registry).
106
+ * To increase interoperability, OtaChecksumType SHALL be within the list of [1, 7, 8, 10, 11, 12].
107
+ */
108
+ otaChecksumType?: number; // TODO: Define enum for checksum types
109
+
110
+ /**
111
+ * MinApplicableSoftwareVersion SHALL be equal to the lowest SoftwareVersion for which this image
112
+ * can be applied. Also see Section 11.21.2.4.6, “MinApplicableSoftwareVersion field”.
113
+ */
114
+ minApplicableSoftwareVersion: number;
115
+
116
+ /**
117
+ * MaxApplicableSoftwareVersion SHALL be equal to the highest SoftwareVersion for which this
118
+ * image can be applied. Also see Section 11.21.2.4.7, “MaxApplicableSoftwareVersion field”.
119
+ */
120
+ maxApplicableSoftwareVersion: number;
121
+
122
+ /**
123
+ * ReleaseNotesUrl SHALL identify a product specific web page that contains release notes for the
124
+ * device model software. The specified URL SHOULD resolve to a maintained web page available for
125
+ * the lifetime of the corresponding software being relevant. The syntax of this field SHALL follow the
126
+ * syntax as specified in RFC 1738 and SHALL use the https scheme. The maximum length of this field
127
+ * is 256 ASCII characters.
128
+ */
129
+ releaseNotesUrl?: string;
130
+
131
+ /**
132
+ * SpecificationVersion SHALL identify the specification version applicable to the device model. This
133
+ * field SHALL match the SpecificationVersion field in the Basic Information Cluster of a device running
134
+ * the software certified by this DeviceModel record.
135
+ */
136
+ specificationVersion?: number;
137
+
138
+ /**
139
+ * The SchemaVersion field value history for this schema is provided below:
140
+ * * 0: Initial Release
141
+ */
142
+ schemaVersion: number;
143
+ }
@@ -0,0 +1,243 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ import { DeviceTypeId } from "../datatype/DeviceTypeId.js";
8
+ import { VendorId } from "../datatype/VendorId.js";
9
+
10
+ /**
11
+ * DeviceModel Schema
12
+ * @see {@link MatterSpecification.v141.Core} § 11.23.6.
13
+ * DCL endpoint:
14
+ * * /dcl/model/models
15
+ * * /dcl/model/models/{vid}
16
+ * * /dcl/model/models/{vid}/{pid}
17
+ */
18
+ export interface DeviceModelDclSchema {
19
+ /**
20
+ * This field SHALL identify the vendor of the product by its Vendor ID and SHALL match the VendorID
21
+ * field in the Basic Information Cluster of a device running the software referenced by this
22
+ * DeviceModel/DeviceSoftwareVersionModel record.
23
+ */
24
+ vid: VendorId; // Spec: vendorId
25
+
26
+ /**
27
+ * This field SHALL identify the Product ID of the product instance to which a certification declaration,
28
+ * and thus a DCL entry, applies. This field SHALL match the ProductID field in the Basic Information
29
+ * Cluster of a device running the software referenced by this DeviceModel/DeviceSoftwareVersionModel
30
+ * record.
31
+ */
32
+ pid: number; // Spec: productId
33
+
34
+ /**
35
+ * DeviceTypeID is the Primary Device Type identifier for the device. For example, DeviceTypeID is 10
36
+ * (0x000A), which is the device type identifier for a Door Lock.
37
+ */
38
+ deviceTypeID: DeviceTypeId;
39
+
40
+ /**
41
+ * This field SHOULD match the ProductName field in the Basic Information Cluster of a device running
42
+ * the software referenced by this DeviceModel record.
43
+ */
44
+ productName: string;
45
+
46
+ /**
47
+ * This field SHOULD match the ProductLabel field in the Basic Information Cluster of a device running
48
+ * the software referenced by this DeviceModel record.
49
+ */
50
+ productLabel: string;
51
+
52
+ /**
53
+ * This field SHALL match the PartNumber field in the Basic Information Cluster of a device running the
54
+ * software referenced by this DeviceModel record.
55
+ * Multiple products (and hence PartNumbers) can share a ProductID. For instance, there may be different
56
+ * packaging (with different PartNumbers) for different regions; also different colors of a product
57
+ * might share the ProductID but may have a different PartNumber. In such cases, the choice of a
58
+ * single PartNumber out of the available set of PartNumbers using this ProductID SHALL be used to
59
+ * populate this field.
60
+ */
61
+ partNumber: string;
62
+
63
+ /**
64
+ * This field SHALL identify the device’s available technologies for device discovery which SHALL be
65
+ * encoded as defined in Table 40, “Discovery Capabilities Bitmask”. This field SHALL match the Table
66
+ * 40, “Discovery Capabilities Bitmask” provided in the Section 5.1.3, “QR Code” (if a QR-code is provided
67
+ * on or with the product). This field SHALL be populated if the CommissioningFallbackUrl is
68
+ * populated, and SHOULD be populated for all other products.
69
+ */
70
+ discoveryCapabilitiesBitmask: number; // TODO
71
+
72
+ /**
73
+ * This field SHALL identify the device’s commissioning flow with encoding as described in Custom
74
+ * Flow.
75
+ */
76
+ commissioningCustomFlow: number;
77
+
78
+ /**
79
+ * This field SHALL identify a vendor-specific commissioning URL for the device model when the
80
+ * CommissioningCustomFlow field is set to '2', and MAY be set for other values of CommissioningCustomFlow.
81
+ * See Custom Commissioning Flow section for how this URL is used. During the lifetime of
82
+ * the product, the specified URL SHOULD resolve to a maintained web page. The syntax of this field
83
+ * SHALL follow the syntax as specified in RFC 1738 and SHALL use the https scheme. The maximum
84
+ * length of this field is 256 ASCII characters.
85
+ */
86
+ commissioningCustomFlowUrl?: string;
87
+
88
+ /**
89
+ * This field SHALL identify a hint for the steps that MAY be used to put a device that has not yet been
90
+ * commissioned into commissioning mode. This field is a bitmap with values defined in the Pairing
91
+ * Hint Table. For example, a value of 1 (bit 0 is set) indicates that a device that has not yet been commissioned
92
+ * will enter Commissioning Mode upon a power cycle.
93
+ * Devices that implement Extended Discovery SHALL reflect this value in the Pairing Hint field of
94
+ * Commissionable Node Discovery when they have not yet been commissioned.
95
+ */
96
+ commissioningModeInitialStepsHint: number; // TODO
97
+
98
+ /**
99
+ * This field SHALL be populated with the appropriate Pairing Instruction for those values of
100
+ * CommissioningModeInitialStepsHint, for which the Pairing Hint Table indicates a Pairing Instruction (PI)
101
+ * dependency.
102
+ * Devices that implement Extended Discovery SHALL reflect this value in the Pairing Instruction field
103
+ * of Commissionable Node Discovery when they have not yet been commissioned.
104
+ */
105
+ commissioningModeInitialStepsInstruction?: string;
106
+
107
+ /**
108
+ * This field SHALL identify a hint for the steps that MAY be used to put a device that has already been
109
+ * commissioned into commissioning mode. This field is a bitmap with values defined in the Pairing
110
+ * Hint Table. At least bit 2 SHALL be set, to indicate that a current Administrator can be used to put a
111
+ * device that has already been commissioned into commissioning mode (see Section 5.6.3, “Enhanced
112
+ * Commissioning Method (ECM)”). Devices which implement additional mechanisms to put a device
113
+ * that has already been commissioned into commissioning mode SHALL reflect these mechanism by
114
+ * setting the corresponding bits in this field.
115
+ * Devices that implement Extended Discovery SHALL reflect this value in the Pairing Hint field of
116
+ * Commissionable Node Discovery when they have already been commissioned.
117
+ */
118
+ commissioningModeSecondaryStepsHint: number; // TODO
119
+
120
+ /**
121
+ * This field SHALL be populated with the appropriate Pairing Instruction for those values of
122
+ * CommissioningModeSecondaryStepsHint, for which the Pairing Hint Table indicates a Pairing Instruction
123
+ * (PI) dependency.
124
+ * Devices that implement Extended Discovery SHALL reflect this value in the Pairing Instruction field
125
+ * of Commissionable Node Discovery when they have already been commissioned.
126
+ */
127
+ commissioningModeSecondaryStepsInstruction?: string;
128
+
129
+ /**
130
+ * This field SHALL identify a vendor-specific commissioning-fallback URL for the device model,
131
+ * which can be used by a Commissioner in case commissioning fails to direct the user to a manufacturer-provided
132
+ * mechanism to provide resolution to commissioning issues. See Commissioning Fallback
133
+ * section for how this URL is used.
134
+ * During the lifetime of the product, the specified URL SHOULD resolve to a maintained web page.
135
+ * The syntax of this field SHALL follow the syntax as specified in RFC 1738 and SHALL use the https
136
+ * scheme. The maximum length of this field is 256 ASCII characters.
137
+ */
138
+ commissioningFallbackUrl?: string;
139
+
140
+ /**
141
+ * This field (when provided) SHALL identify a product-specific web page containing a user manual
142
+ * for the device model. During the lifetime of the product, the specified URL SHOULD resolve to a
143
+ * maintained web page. The syntax of this field SHALL follow the syntax as specified in RFC 1738 and
144
+ * SHALL use the https scheme. The maximum length of this field is 256 ASCII characters.
145
+ */
146
+ userManualUrl?: string;
147
+
148
+ /**
149
+ * This field (when provided) SHALL identify a product specific support web page. During the lifetime
150
+ * of the product, the specified URL SHOULD resolve to a maintained web page. The syntax of this
151
+ * field SHALL follow the syntax as specified in RFC 1738 and SHALL use the https scheme. The maximum
152
+ * length of this field is 256 ASCII characters.
153
+ */
154
+ supportUrl?: string;
155
+
156
+ /**
157
+ * This field (when provided) SHALL identify a link to a product specific web page. This field SHALL
158
+ * match the ProductURL field in the Basic Information Cluster of a device running the software referenced
159
+ * by this DeviceModel record. During the lifetime of the product, the specified URL SHOULD resolve to a
160
+ * maintained web page. The syntax of this field SHALL follow the syntax as specified in
161
+ * RFC 1738 and SHALL use the https scheme. The maximum length of this field is 256 ASCII characters.
162
+ */
163
+ productUrl?: string;
164
+
165
+ /**
166
+ * This field (when provided) SHALL identify a link to the Localized String File of this product. This
167
+ * field SHALL NOT have a localized string identifier. During the lifetime of the product, the specified
168
+ * URL SHOULD resolve to a maintained Localized String File. The syntax of this field SHALL follow
169
+ * the syntax as specified in RFC 1738 and SHALL use the https scheme. The maximum length of this
170
+ * field is 256 ASCII characters.
171
+ */
172
+ lsfUrl?: string;
173
+
174
+ /**
175
+ * LsfRevision is a monotonically increasing positive integer indicating the latest available version of
176
+ * Localized String File. Any client can use this field to check whether it has the latest version of the
177
+ * Localized String File cached. When the first version of the Localized String File is published, the
178
+ * value of this field SHOULD be 1. When a new revision of the Localized String File is published, this
179
+ * value SHALL monotonically increase by 1. When a client of this information finds this to be greater
180
+ * than its currently stored LSF revision number, it SHOULD download the latest version of the LSF
181
+ * from the LsfUrl, and update its local value of this field.
182
+ * This field SHALL be provided if and only if when LsfUrl is provided.
183
+ */
184
+ lsfRevision?: number;
185
+
186
+ /**
187
+ * This field SHALL identify the configuration options for the Enhanced Setup Flow. This field is a
188
+ * bitmap with values defined in Enhanced Setup Flow Options Table.
189
+ */
190
+ enhancedSetupFlowOptions?: number; // TODO
191
+
192
+ /**
193
+ * This field (when provided) SHALL identify a link to the Enhanced Setup Flow Terms and Condition
194
+ * File for this product. During the lifetime of the product, the specified URL SHOULD resolve to a
195
+ * maintained Terms and Conditions File. The syntax of this field SHALL follow the syntax as specified
196
+ * in RFC 1738. The maximum length of this field is 256 ASCII characters. All URLs SHALL use the
197
+ * https scheme. This field SHALL be present if and only if the EnhancedSetupFlowOptions field has
198
+ * bit 0 set.
199
+ */
200
+ enhancedSetupFlowTCUrl?: string;
201
+
202
+ /**
203
+ * This field (when provided) is an increasing positive integer indicating the latest available version of
204
+ * the Enhanced Setup Flow Terms and Conditions file. When a new revision of the File is published,
205
+ * this value SHALL increase (and SHOULD increase by 1). This field SHALL be present if and only if
206
+ * the EnhancedSetupFlowOptions field has bit 0 set.
207
+ */
208
+ enhancedSetupFlowTCRevision?: number;
209
+
210
+ /**
211
+ * This field (when provided) SHALL contain the digest of the entire contents of the associated file
212
+ * downloaded from the EnhancedSetupFlowTCUrl field, encoded in base64 string representation and
213
+ * SHALL be used to ensure the contents of the downloaded file are authentic. The digest SHALL have
214
+ * been computed using the SHA-256 digest algorithm. This field SHALL be present if and only if the
215
+ * EnhancedSetupFlowOptions field has bit 0 set.
216
+ */
217
+ enhancedSetupFlowTCDigest?: string;
218
+
219
+ /**
220
+ * This field (when provided) SHALL indicate the total size of the Enhanced Setup Flow Terms and
221
+ * Conditions file in bytes, and SHALL be used to ensure the downloaded file size is within the bounds
222
+ * of EnhancedSetupFlowTCFileSize. This field SHALL be provided if and only if the EnhancedSetupFlowTCUrl
223
+ * field is present.
224
+ */
225
+ enhancedSetupFlowTCFileSize?: number;
226
+
227
+ /**
228
+ * This field (when provided) SHALL identify a link to a vendor-specific URL which SHALL provide a
229
+ * manufacturer specific means to resolve any functionality limitations indicated by the
230
+ * TERMS_AND_CONDITIONS_CHANGED status code. This field SHALL be present if the EnhancedSetupFlowOptions
231
+ * field has bit 0 set. During the lifetime of the product, the specified URL SHOULD
232
+ * resolve to a maintained web page. The syntax of this field SHALL follow the syntax as specified in
233
+ * RFC 1738. The maximum length of this field is 256 ASCII characters. All URLs SHALL use the https
234
+ * scheme.
235
+ */
236
+ enhancedSetupFlowMaintenanceUrl?: string;
237
+
238
+ /**
239
+ * The SchemaVersion field value history for this schema is provided below:
240
+ * * 0: Initial Release
241
+ */
242
+ schemaVersion: number;
243
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ export * from "./attestation-certificate.js";
8
+ export * from "./device-attestation-revocation.js";
9
+ export * from "./device-software-compliance.js";
10
+ export * from "./device-software-version.js";
11
+ export * from "./device.js";
12
+ export * from "./operational-certificate.js";
13
+ export * from "./vendor.js";