zwave-js 15.23.4 → 15.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,6 @@ export { VirtualNode } from "./lib/node/VirtualNode.js";
10
10
  export type { VirtualValueID } from "./lib/node/VirtualNode.js";
11
11
  export * from "./lib/node/_Types.js";
12
12
  export { AccessControlAPI, AssignCredentialResult, SetCredentialResult, SetUserResult, } from "./lib/node/feature-apis/AccessControl.js";
13
- export type { CredentialCapabilities, CredentialData, SetUserOptions, UserCapabilities, UserData, } from "./lib/node/feature-apis/AccessControl.js";
13
+ export type { CredentialCapabilities, CredentialData, DeleteCredentialsOptions, SetUserOptions, UserCapabilities, UserData, } from "./lib/node/feature-apis/AccessControl.js";
14
14
  export { FeatureAPI } from "./lib/node/feature-apis/FeatureAPI.js";
15
15
  //# sourceMappingURL=Node.d.ts.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Node.ts"],
4
- "sourcesContent": ["export {\n\tNODE_ID_BROADCAST,\n\tNODE_ID_BROADCAST_LR,\n\tNODE_ID_MAX,\n\tNodeType,\n\tProtocolDataRate,\n\tProtocolVersion,\n} from \"@zwave-js/core\";\nexport type { DataRate, FLiRS } from \"@zwave-js/core\";\nexport { DeviceClass } from \"./lib/node/DeviceClass.js\";\nexport type { NodeDump } from \"./lib/node/Dump.js\";\nexport { Endpoint } from \"./lib/node/Endpoint.js\";\nexport { ZWaveNode } from \"./lib/node/Node.js\";\nexport type {\n\tNodeStatistics,\n\tRouteStatistics,\n} from \"./lib/node/NodeStatistics.js\";\nexport { VirtualEndpoint } from \"./lib/node/VirtualEndpoint.js\";\nexport { VirtualNode } from \"./lib/node/VirtualNode.js\";\nexport type { VirtualValueID } from \"./lib/node/VirtualNode.js\";\nexport * from \"./lib/node/_Types.js\";\nexport {\n\tAccessControlAPI,\n\tAssignCredentialResult,\n\tSetCredentialResult,\n\tSetUserResult,\n} from \"./lib/node/feature-apis/AccessControl.js\";\nexport type {\n\tCredentialCapabilities,\n\tCredentialData,\n\tSetUserOptions,\n\tUserCapabilities,\n\tUserData,\n} from \"./lib/node/feature-apis/AccessControl.js\";\nexport { FeatureAPI } from \"./lib/node/feature-apis/FeatureAPI.js\";\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;AAAA,kBAOO;AAEP,yBAA4B;AAE5B,sBAAyB;AACzB,kBAA0B;AAK1B,6BAAgC;AAChC,yBAA4B;AAE5B,yBAAc,iCApBd;AAqBA,2BAKO;AAQP,wBAA2B;",
4
+ "sourcesContent": ["export {\n\tNODE_ID_BROADCAST,\n\tNODE_ID_BROADCAST_LR,\n\tNODE_ID_MAX,\n\tNodeType,\n\tProtocolDataRate,\n\tProtocolVersion,\n} from \"@zwave-js/core\";\nexport type { DataRate, FLiRS } from \"@zwave-js/core\";\nexport { DeviceClass } from \"./lib/node/DeviceClass.js\";\nexport type { NodeDump } from \"./lib/node/Dump.js\";\nexport { Endpoint } from \"./lib/node/Endpoint.js\";\nexport { ZWaveNode } from \"./lib/node/Node.js\";\nexport type {\n\tNodeStatistics,\n\tRouteStatistics,\n} from \"./lib/node/NodeStatistics.js\";\nexport { VirtualEndpoint } from \"./lib/node/VirtualEndpoint.js\";\nexport { VirtualNode } from \"./lib/node/VirtualNode.js\";\nexport type { VirtualValueID } from \"./lib/node/VirtualNode.js\";\nexport * from \"./lib/node/_Types.js\";\nexport {\n\tAccessControlAPI,\n\tAssignCredentialResult,\n\tSetCredentialResult,\n\tSetUserResult,\n} from \"./lib/node/feature-apis/AccessControl.js\";\nexport type {\n\tCredentialCapabilities,\n\tCredentialData,\n\tDeleteCredentialsOptions,\n\tSetUserOptions,\n\tUserCapabilities,\n\tUserData,\n} from \"./lib/node/feature-apis/AccessControl.js\";\nexport { FeatureAPI } from \"./lib/node/feature-apis/FeatureAPI.js\";\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;AAAA,kBAOO;AAEP,yBAA4B;AAE5B,sBAAyB;AACzB,kBAA0B;AAK1B,6BAAgC;AAChC,yBAA4B;AAE5B,yBAAc,iCApBd;AAqBA,2BAKO;AASP,wBAA2B;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,3 @@
1
- export declare const PACKAGE_VERSION = "15.23.4";
1
+ export declare const PACKAGE_VERSION = "15.24.0";
2
2
  export declare const PACKAGE_NAME = "zwave-js";
3
3
  //# sourceMappingURL=_version.d.ts.map
@@ -22,7 +22,7 @@ __export(version_exports, {
22
22
  PACKAGE_VERSION: () => PACKAGE_VERSION
23
23
  });
24
24
  module.exports = __toCommonJS(version_exports);
25
- const PACKAGE_VERSION = "15.23.4";
25
+ const PACKAGE_VERSION = "15.24.0";
26
26
  const PACKAGE_NAME = "zwave-js";
27
27
  // Annotate the CommonJS export names for ESM import in node:
28
28
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/_version.ts"],
4
- "sourcesContent": ["// This file is auto-generated by the codegen maintenance script\nexport const PACKAGE_VERSION = \"15.23.4\";\nexport const PACKAGE_NAME = \"zwave-js\";\n"],
4
+ "sourcesContent": ["// This file is auto-generated by the codegen maintenance script\nexport const PACKAGE_VERSION = \"15.24.0\";\nexport const PACKAGE_NAME = \"zwave-js\";\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;;;;;;AACO,MAAM,kBAAkB;AACxB,MAAM,eAAe;",
6
6
  "names": []
7
7
  }
@@ -38,6 +38,20 @@ export interface SetUserOptions {
38
38
  credentialRule?: UserCredentialRule;
39
39
  expiringTimeoutMinutes?: number;
40
40
  }
41
+ export interface DeleteCredentialsOptions {
42
+ /**
43
+ * Only delete credentials owned by this user. When omitted or `0`, the
44
+ * filter is treated as a wildcard and credentials for all users are
45
+ * deleted.
46
+ */
47
+ userId?: number;
48
+ /**
49
+ * Only delete credentials of this type. When omitted or
50
+ * {@link UserCredentialType.None}, the filter is treated as a wildcard and
51
+ * credentials of all types are deleted.
52
+ */
53
+ credentialType?: UserCredentialType;
54
+ }
41
55
  /** Result of a setUser / deleteUser / deleteAllUsers call */
42
56
  export declare enum SetUserResult {
43
57
  OK = 0,
@@ -162,7 +176,12 @@ export declare class AccessControlAPI extends FeatureAPI {
162
176
  * Deletes the given credential.
163
177
  * This communicates with the node.
164
178
  */
165
- deleteCredential(userId: number, type: UserCredentialType, slot: number): Promise<SetCredentialResult>;
179
+ deleteCredential(type: UserCredentialType, slot: number): Promise<SetCredentialResult>;
180
+ deleteCredential(userId: number | undefined, type: UserCredentialType, slot: number): Promise<SetCredentialResult>;
181
+ /**
182
+ * Deletes credentials matching the given filters.
183
+ */
184
+ deleteCredentials(options?: DeleteCredentialsOptions): Promise<SetCredentialResult>;
166
185
  /**
167
186
  * Assigns an existing credential to a different user, without re-enrolling
168
187
  * it. Useful for credentials that were added locally on the device (e.g. a
@@ -418,11 +418,14 @@ class AccessControlAPI extends import_FeatureAPI.FeatureAPI {
418
418
  let succeeded;
419
419
  if (result == void 0) {
420
420
  const verified = await api.get(userId);
421
- succeeded = existed && verified?.userIdStatus === import_cc.UserIDStatus.Available;
421
+ succeeded = verified?.userIdStatus === import_cc.UserIDStatus.Available;
422
422
  } else {
423
- succeeded = (0, import_core.supervisedCommandSucceeded)(result) && existed;
423
+ succeeded = (0, import_core.supervisedCommandSucceeded)(result);
424
424
  }
425
425
  if (succeeded) {
426
+ this.#purgeCachedUserCodes(userId);
427
+ }
428
+ if (succeeded && existed) {
426
429
  const node = this.endpoint.tryGetNode();
427
430
  if (node) {
428
431
  node.emit("user deleted", this.endpoint, { userId });
@@ -460,7 +463,7 @@ class AccessControlAPI extends import_FeatureAPI.FeatureAPI {
460
463
  const result = await api.clear(0);
461
464
  const succeeded = result == void 0 || (0, import_core.supervisedCommandSucceeded)(result);
462
465
  if (succeeded) {
463
- this.#purgeAllCachedUserCodes();
466
+ this.#purgeCachedUserCodes();
464
467
  }
465
468
  return succeeded ? SetUserResult.OK : SetUserResult.Error_Unknown;
466
469
  }
@@ -642,11 +645,12 @@ class AccessControlAPI extends import_FeatureAPI.FeatureAPI {
642
645
  return succeeded ? SetCredentialResult.OK : SetCredentialResult.Error_Unknown;
643
646
  }
644
647
  }
645
- /**
646
- * Deletes the given credential.
647
- * This communicates with the node.
648
- */
649
- async deleteCredential(userId, type, slot) {
648
+ async deleteCredential(userIdOrType, typeOrSlot, slot) {
649
+ if (slot == void 0) {
650
+ return this.deleteCredential(0, userIdOrType, typeOrSlot);
651
+ }
652
+ const userId = userIdOrType ?? 0;
653
+ const type = typeOrSlot;
650
654
  if (this.#usesUserCredentialCC) {
651
655
  this.#assertValidSlot(type, slot);
652
656
  const api = this.#u3cAPI();
@@ -660,23 +664,80 @@ class AccessControlAPI extends import_FeatureAPI.FeatureAPI {
660
664
  await this.endpoint.tryGetNode()?.handleCommand(raw);
661
665
  return u3cCredentialReportTypeToSetCredentialResult(raw?.reportType);
662
666
  } else {
663
- this.#assertValidSlot(type, userId);
664
- const existed = this.#getCredentialCached_UC(type, userId) != void 0;
667
+ if (userId !== 0 && userId !== slot) {
668
+ return SetCredentialResult.Error_ModifyRejectedLocationEmpty;
669
+ }
670
+ const targetUserId = userId === 0 ? slot : userId;
671
+ this.#assertValidSlot(type, targetUserId);
672
+ const existed = this.#getCredentialCached_UC(type, targetUserId) != void 0;
665
673
  const api = this.#ucAPI();
666
- const result = await api.clear(userId);
674
+ const result = await api.clear(targetUserId);
667
675
  let succeeded;
668
676
  if (result == void 0) {
677
+ const verified = await api.get(targetUserId);
678
+ succeeded = verified?.userIdStatus === import_cc.UserIDStatus.Available;
679
+ } else {
680
+ succeeded = (0, import_core.supervisedCommandSucceeded)(result);
681
+ }
682
+ if (succeeded) {
683
+ this.#purgeCachedUserCodes(targetUserId);
684
+ }
685
+ if (succeeded && existed) {
686
+ const node = this.endpoint.tryGetNode();
687
+ if (node) {
688
+ node.emit("credential deleted", this.endpoint, {
689
+ userId: targetUserId,
690
+ credentialType: type,
691
+ credentialSlot: targetUserId
692
+ });
693
+ node.emit("user deleted", this.endpoint, {
694
+ userId: targetUserId
695
+ });
696
+ }
697
+ }
698
+ return succeeded ? SetCredentialResult.OK : SetCredentialResult.Error_Unknown;
699
+ }
700
+ }
701
+ /**
702
+ * Deletes credentials matching the given filters.
703
+ */
704
+ async deleteCredentials(options = {}) {
705
+ const userId = options.userId ?? 0;
706
+ const credentialType = options.credentialType ?? import_cc.UserCredentialType.None;
707
+ if (this.#usesUserCredentialCC) {
708
+ const api = this.#u3cAPI();
709
+ const raw = await api.setCredential({
710
+ operationType: import_cc.UserCredentialOperationType.Delete,
711
+ userId,
712
+ credentialType,
713
+ credentialSlot: 0
714
+ });
715
+ if (raw)
716
+ await this.endpoint.tryGetNode()?.handleCommand(raw);
717
+ return u3cCredentialReportTypeToSetCredentialResult(raw?.reportType);
718
+ } else {
719
+ if (credentialType !== import_cc.UserCredentialType.None && credentialType !== this.#ucCredentialType) {
720
+ throw new import_core.ZWaveError(`Credential type ${(0, import_shared.getEnumMemberName)(import_cc.UserCredentialType, credentialType)} is not supported by this node`, import_core.ZWaveErrorCodes.Argument_Invalid);
721
+ }
722
+ const existed = userId !== 0 ? this.#getUserCached_UC(userId) != void 0 : true;
723
+ const api = this.#ucAPI();
724
+ const result = await api.clear(userId);
725
+ let succeeded;
726
+ if (userId !== 0 && result == void 0) {
669
727
  const verified = await api.get(userId);
670
- succeeded = existed && verified?.userIdStatus === import_cc.UserIDStatus.Available;
728
+ succeeded = verified?.userIdStatus === import_cc.UserIDStatus.Available;
671
729
  } else {
672
- succeeded = (0, import_core.supervisedCommandSucceeded)(result) && existed;
730
+ succeeded = result == void 0 || (0, import_core.supervisedCommandSucceeded)(result);
673
731
  }
674
732
  if (succeeded) {
733
+ this.#purgeCachedUserCodes(userId);
734
+ }
735
+ if (succeeded && existed) {
675
736
  const node = this.endpoint.tryGetNode();
676
737
  if (node) {
677
738
  node.emit("credential deleted", this.endpoint, {
678
739
  userId,
679
- credentialType: type,
740
+ credentialType: this.#ucCredentialType,
680
741
  credentialSlot: userId
681
742
  });
682
743
  node.emit("user deleted", this.endpoint, { userId });
@@ -866,12 +927,19 @@ class AccessControlAPI extends import_FeatureAPI.FeatureAPI {
866
927
  valueDB.removeValue(vid);
867
928
  }
868
929
  }
869
- /** Removes all cached user code status and code values from the value DB */
870
- #purgeAllCachedUserCodes() {
930
+ /**
931
+ * Removes cached user code status and code values from the value DB.
932
+ * If `userId` is given, only values for that user are removed. Otherwise, all
933
+ * cached user codes are purged.
934
+ */
935
+ #purgeCachedUserCodes(userId) {
871
936
  const valueDB = this.endpoint.tryGetNode()?.valueDB;
872
937
  if (!valueDB)
873
938
  return;
874
- const values = valueDB.findValues((vid) => import_UserCodeCC.UserCodeCCValues.userIdStatus.is(vid) || import_UserCodeCC.UserCodeCCValues.userCode.is(vid));
939
+ let values = valueDB.findValues((vid) => vid.endpoint === this.endpoint.index && (import_UserCodeCC.UserCodeCCValues.userIdStatus.is(vid) || import_UserCodeCC.UserCodeCCValues.userCode.is(vid)));
940
+ if (userId) {
941
+ values = values.filter((vid) => vid.propertyKey === userId);
942
+ }
875
943
  for (const vid of values) {
876
944
  valueDB.removeValue(vid);
877
945
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/lib/node/feature-apis/AccessControl.ts"],
4
- "sourcesContent": ["import {\n\ttype UserCredentialCapability,\n\tUserCredentialCommand,\n\tUserCredentialCredentialReportType,\n\tUserCredentialOperationType,\n\tUserCredentialRule,\n\tUserCredentialType,\n\tUserCredentialUserReportType,\n\tUserCredentialUserType,\n\tUserIDStatus,\n} from \"@zwave-js/cc\";\nimport { type UserCodeCCAPI, UserCodeCCValues } from \"@zwave-js/cc/UserCodeCC\";\nimport {\n\ttype UserCredentialCCAPI,\n\ttype UserCredentialCCAssociationReport,\n\ttype UserCredentialCCUserReport,\n\tUserCredentialCCValues,\n\tnormalizeCredentialData,\n} from \"@zwave-js/cc/UserCredentialCC\";\nimport {\n\tCommandClasses,\n\ttype SupervisionResult,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tsupervisedCommandSucceeded,\n} from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName } from \"@zwave-js/shared\";\nimport { FeatureAPI } from \"./FeatureAPI.js\";\n\nexport interface UserCapabilities {\n\tmaxUsers: number;\n\tsupportedUserTypes: readonly UserCredentialUserType[];\n\tmaxUserNameLength: number | undefined;\n\tsupportedCredentialRules: readonly UserCredentialRule[];\n}\n\nexport interface CredentialCapabilities {\n\tsupportedCredentialTypes: ReadonlyMap<\n\t\tUserCredentialType,\n\t\tUserCredentialCapability\n\t>;\n\tsupportsAdminCode: boolean;\n\tsupportsAdminCodeDeactivation: boolean;\n\t/**\n\t * Whether existing credentials can be reassigned between users via\n\t * {@link AccessControlAPI.assignCredential} without re-enrolling them.\n\t */\n\tsupportsCredentialAssignment: boolean;\n}\n\nexport interface UserData {\n\tuserId: number;\n\tactive: boolean;\n\tuserType: UserCredentialUserType;\n\tuserName?: string;\n\tcredentialRule?: UserCredentialRule;\n\texpiringTimeoutMinutes?: number;\n}\n\nexport interface CredentialData {\n\tuserId: number;\n\ttype: UserCredentialType;\n\tslot: number;\n\tdata?: string | Uint8Array;\n}\n\nexport interface SetUserOptions {\n\tactive?: boolean;\n\tuserType?: UserCredentialUserType;\n\tuserName?: string;\n\tcredentialRule?: UserCredentialRule;\n\texpiringTimeoutMinutes?: number;\n}\n\ntype UserCredentialGetResult = Awaited<\n\tReturnType<UserCredentialCCAPI[\"getCredential\"]>\n>;\n\n/** Result of a setUser / deleteUser / deleteAllUsers call */\nexport enum SetUserResult {\n\tOK = 0,\n\tError_AddRejectedLocationOccupied = 1,\n\tError_ModifyRejectedLocationEmpty = 2,\n\tError_Unknown = 0xff,\n}\n\n/** Result of a setCredential / deleteCredential call */\nexport enum SetCredentialResult {\n\tOK = 0,\n\tError_AddRejectedLocationOccupied = 1,\n\tError_ModifyRejectedLocationEmpty = 2,\n\tError_DuplicateCredential = 3,\n\tError_ManufacturerSecurityRules = 4,\n\tError_DuplicateAdminPINCode = 5,\n\tError_WrongUserUniqueIdentifier = 6,\n\tError_Unknown = 0xff,\n}\n\n/** Result of an assignCredential call */\nexport enum AssignCredentialResult {\n\tOK = 0,\n\t/** Spec statuses 0x01 / 0x02 / 0x03 \u2014 credential type / slot invalid or empty */\n\tError_InvalidCredential = 1,\n\t/** Spec statuses 0x04 / 0x05 \u2014 destination user invalid or nonexistent */\n\tError_InvalidUser = 2,\n\tError_Unknown = 0xff,\n}\n\nfunction u3cUserReportTypeToSetUserResult(\n\treportType: UserCredentialUserReportType | undefined,\n): SetUserResult {\n\tif (reportType == undefined) return SetUserResult.Error_Unknown;\n\tswitch (reportType) {\n\t\tcase UserCredentialUserReportType.UserAdded:\n\t\tcase UserCredentialUserReportType.UserModified:\n\t\tcase UserCredentialUserReportType.UserDeleted:\n\t\tcase UserCredentialUserReportType.UserUnchanged:\n\t\t\treturn SetUserResult.OK;\n\t\tcase UserCredentialUserReportType.UserAddRejectedLocationOccupied:\n\t\t\treturn SetUserResult.Error_AddRejectedLocationOccupied;\n\t\tcase UserCredentialUserReportType.UserModifyRejectedLocationEmpty:\n\t\t\treturn SetUserResult.Error_ModifyRejectedLocationEmpty;\n\t\tdefault:\n\t\t\treturn SetUserResult.Error_Unknown;\n\t}\n}\n\nfunction u3cCredentialReportTypeToSetCredentialResult(\n\treportType: UserCredentialCredentialReportType | undefined,\n): SetCredentialResult {\n\tif (reportType == undefined) return SetCredentialResult.Error_Unknown;\n\tswitch (reportType) {\n\t\tcase UserCredentialCredentialReportType.CredentialAdded:\n\t\tcase UserCredentialCredentialReportType.CredentialModified:\n\t\tcase UserCredentialCredentialReportType.CredentialDeleted:\n\t\tcase UserCredentialCredentialReportType.CredentialUnchanged:\n\t\t\treturn SetCredentialResult.OK;\n\t\tcase UserCredentialCredentialReportType\n\t\t\t.CredentialAddRejectedLocationOccupied:\n\t\t\treturn SetCredentialResult.Error_AddRejectedLocationOccupied;\n\t\tcase UserCredentialCredentialReportType\n\t\t\t.CredentialModifyRejectedLocationEmpty:\n\t\t\treturn SetCredentialResult.Error_ModifyRejectedLocationEmpty;\n\t\tcase UserCredentialCredentialReportType.DuplicateCredential:\n\t\t\treturn SetCredentialResult.Error_DuplicateCredential;\n\t\tcase UserCredentialCredentialReportType.ManufacturerSecurityRules:\n\t\t\treturn SetCredentialResult.Error_ManufacturerSecurityRules;\n\t\tcase UserCredentialCredentialReportType.DuplicateAdminPINCode:\n\t\t\treturn SetCredentialResult.Error_DuplicateAdminPINCode;\n\t\tcase UserCredentialCredentialReportType.WrongUserUniqueIdentifier:\n\t\t\treturn SetCredentialResult.Error_WrongUserUniqueIdentifier;\n\t\tdefault:\n\t\t\treturn SetCredentialResult.Error_Unknown;\n\t}\n}\n\nfunction u3cAssociationStatusToAssignCredentialResult(\n\tstatus: UserCredentialCCAssociationReport[\"status\"] | undefined,\n): AssignCredentialResult {\n\tif (status == undefined) return AssignCredentialResult.Error_Unknown;\n\tswitch (status) {\n\t\tcase 0x00:\n\t\t\treturn AssignCredentialResult.OK;\n\t\tcase 0x01:\n\t\tcase 0x02:\n\t\tcase 0x03:\n\t\t\treturn AssignCredentialResult.Error_InvalidCredential;\n\t\tcase 0x04:\n\t\tcase 0x05:\n\t\t\treturn AssignCredentialResult.Error_InvalidUser;\n\t\tdefault:\n\t\t\treturn AssignCredentialResult.Error_Unknown;\n\t}\n}\n\nconst NON_PIN_CHARS = /[^0-9]/;\n\n/**\n * Whether the supported ASCII characters indicate a non-PIN device.\n * When unknown (V1 nodes), defaults to PIN-only per the spec.\n */\nfunction supportsNonPINChars(supportedASCIIChars: string | undefined): boolean {\n\treturn supportedASCIIChars != undefined\n\t\t&& NON_PIN_CHARS.test(supportedASCIIChars);\n}\n\n/** High-level API for managing users and credentials on access control devices */\nexport class AccessControlAPI extends FeatureAPI {\n\t// FIXME: This is technically not correct. A node could support both CCs,\n\t// and we may have to decide which one to use, or switch between them on\n\t// the fly using Version CC / migration.\n\t// This is not implemented yet, so checking for U3C first is fine for now.\n\tget #usesUserCredentialCC(): boolean {\n\t\treturn this.endpoint.supportsCC(CommandClasses[\"User Credential\"]);\n\t}\n\n\t/**\n\t * Returns the user-related capabilities of this endpoint.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getUserCapabilitiesCached(): UserCapabilities {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\treturn {\n\t\t\t\tmaxUsers: this.getValue<number>(\n\t\t\t\t\tUserCredentialCCValues.supportedUsers.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? 0,\n\t\t\t\tsupportedUserTypes: this.getValue<UserCredentialUserType[]>(\n\t\t\t\t\tUserCredentialCCValues.supportedUserTypes.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? [],\n\t\t\t\tmaxUserNameLength: this.getValue<number>(\n\t\t\t\t\tUserCredentialCCValues.maxUserNameLength.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? undefined,\n\t\t\t\tsupportedCredentialRules: this.getValue<UserCredentialRule[]>(\n\t\t\t\t\tUserCredentialCCValues.supportedCredentialRules.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? [],\n\t\t\t};\n\t\t} else {\n\t\t\tconst supportedStatuses = this.getValue<UserIDStatus[]>(\n\t\t\t\tUserCodeCCValues.supportedUserIDStatuses.endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) ?? [];\n\t\t\tconst supportedUserTypes: UserCredentialUserType[] = [\n\t\t\t\tUserCredentialUserType.General,\n\t\t\t];\n\t\t\t// User Code CC has no concept of user types, but the Messaging\n\t\t\t// status is the closest equivalent to a NonAccess user\n\t\t\tif (supportedStatuses.includes(UserIDStatus.Messaging)) {\n\t\t\t\tsupportedUserTypes.push(UserCredentialUserType.NonAccess);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tmaxUsers: this.getValue<number>(\n\t\t\t\t\tUserCodeCCValues.supportedUsers.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? 0,\n\t\t\t\tsupportedUserTypes,\n\t\t\t\t// User Code CC does not support user names or credential rules\n\t\t\t\tmaxUserNameLength: undefined,\n\t\t\t\tsupportedCredentialRules: [UserCredentialRule.Single],\n\t\t\t};\n\t\t}\n\t}\n\n\t/**\n\t * Returns the credential-related capabilities of this endpoint.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getCredentialCapabilitiesCached(): CredentialCapabilities {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst supportedTypes = this.getValue<UserCredentialType[]>(\n\t\t\t\tUserCredentialCCValues.supportedCredentialTypes.endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) ?? [];\n\n\t\t\tconst credentialTypes = new Map<\n\t\t\t\tUserCredentialType,\n\t\t\t\tUserCredentialCapability\n\t\t\t>();\n\t\t\tfor (const type of supportedTypes) {\n\t\t\t\tconst cap = this.getValue<UserCredentialCapability>(\n\t\t\t\t\tUserCredentialCCValues.credentialCapabilities(type)\n\t\t\t\t\t\t.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tif (cap) credentialTypes.set(type, cap);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tsupportedCredentialTypes: credentialTypes,\n\t\t\t\tsupportsAdminCode: this.getValue<boolean>(\n\t\t\t\t\tUserCredentialCCValues.supportsAdminCode.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? false,\n\t\t\t\tsupportsAdminCodeDeactivation: this.getValue<boolean>(\n\t\t\t\t\tUserCredentialCCValues.supportsAdminCodeDeactivation\n\t\t\t\t\t\t.endpoint(this.endpoint.index),\n\t\t\t\t) ?? false,\n\t\t\t\tsupportsCredentialAssignment: this.#u3cAPI().supportsCommand(\n\t\t\t\t\tUserCredentialCommand.UserCredentialAssociationSet,\n\t\t\t\t) === true,\n\t\t\t};\n\t\t} else {\n\t\t\tconst maxUsers = this.getValue<number>(\n\t\t\t\tUserCodeCCValues.supportedUsers.endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) ?? 0;\n\n\t\t\t// User Code CC only supports a single credential per user\n\t\t\t// with a length of 4-10 characters (CC:0063.01.01.11.006).\n\t\t\t// Despite the spec calling them \"PIN codes\", v1 devices often\n\t\t\t// accept arbitrary characters. Use the widest matching type.\n\t\t\tconst credentialTypes = new Map<\n\t\t\t\tUserCredentialType,\n\t\t\t\tUserCredentialCapability\n\t\t\t>();\n\t\t\tcredentialTypes.set(this.#ucCredentialType, {\n\t\t\t\t// For User Code CC, credential slots and users are identical\n\t\t\t\tnumberOfCredentialSlots: maxUsers,\n\t\t\t\tminCredentialLength: 4,\n\t\t\t\tmaxCredentialLength: 10,\n\t\t\t\tmaxCredentialHashLength: 0,\n\t\t\t\tsupportsCredentialLearn: false,\n\t\t\t});\n\n\t\t\treturn {\n\t\t\t\tsupportedCredentialTypes: credentialTypes,\n\t\t\t\tsupportsAdminCode: this.getValue<boolean>(\n\t\t\t\t\tUserCodeCCValues.supportsAdminCode.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? false,\n\t\t\t\tsupportsAdminCodeDeactivation: this.getValue<boolean>(\n\t\t\t\t\tUserCodeCCValues.supportsAdminCodeDeactivation.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? false,\n\t\t\t\t// User Code CC has no equivalent to credential reassignment\n\t\t\t\tsupportsCredentialAssignment: false,\n\t\t\t};\n\t\t}\n\t}\n\n\t/**\n\t * Returns the data for the user with the given ID.\n\t * This communicates with the node to retrieve fresh information.\n\t */\n\tpublic async getUser(userId: number): Promise<UserData | undefined> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst result = await api.getUser(userId);\n\t\t\tif (result) await this.endpoint.tryGetNode()?.handleCommand(result);\n\t\t\tif (!result?.userId) return undefined;\n\t\t\treturn {\n\t\t\t\tuserId: result.userId,\n\t\t\t\tactive: result.active ?? false,\n\t\t\t\tuserType: result.userType ?? UserCredentialUserType.General,\n\t\t\t\tuserName: result.userName ?? undefined,\n\t\t\t\tcredentialRule: result.credentialRule ?? undefined,\n\t\t\t\texpiringTimeoutMinutes: result.expiringTimeoutMinutes\n\t\t\t\t\t|| undefined,\n\t\t\t};\n\t\t} else {\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst result = await api.get(userId);\n\t\t\tif (!result) return undefined;\n\t\t\treturn this.#mapUserCodeStatusToUserData(\n\t\t\t\tuserId,\n\t\t\t\tresult.userIdStatus,\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the data for the user with the given ID.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getUserCached(userId: number): UserData | undefined {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\treturn this.#getUserCached_U3C(userId);\n\t\t} else {\n\t\t\treturn this.#getUserCached_UC(userId);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the data for all configured users.\n\t * This communicates with the node to retrieve fresh information.\n\t */\n\tpublic async getUsers(): Promise<UserData[]> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst users: UserData[] = [];\n\t\t\t// Requesting userId 0 gives us the first user\n\t\t\tlet nextUserId = 0;\n\t\t\tdo {\n\t\t\t\tconst result = await api.getUser(nextUserId);\n\t\t\t\tif (result) {\n\t\t\t\t\tawait this.endpoint.tryGetNode()?.handleCommand(result);\n\t\t\t\t}\n\t\t\t\tif (!result?.userId) break;\n\t\t\t\tusers.push({\n\t\t\t\t\tuserId: result.userId,\n\t\t\t\t\tactive: result.active ?? false,\n\t\t\t\t\tuserType: result.userType\n\t\t\t\t\t\t?? UserCredentialUserType.General,\n\t\t\t\t\tuserName: result.userName ?? undefined,\n\t\t\t\t\tcredentialRule: result.credentialRule ?? undefined,\n\t\t\t\t\texpiringTimeoutMinutes: result.expiringTimeoutMinutes\n\t\t\t\t\t\t|| undefined,\n\t\t\t\t});\n\t\t\t\tnextUserId = result.nextUserId ?? 0;\n\t\t\t} while (nextUserId > 0);\n\t\t\treturn users;\n\t\t} else {\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst maxUsers = await api.getUsersCount();\n\t\t\tif (!maxUsers) return [];\n\n\t\t\tconst users: UserData[] = [];\n\t\t\tconst supportsBulk = !!this.getValue<boolean>(\n\t\t\t\tUserCodeCCValues.supportsMultipleUserCodeReport.endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t);\n\n\t\t\tif (supportsBulk) {\n\t\t\t\tlet nextUserId = 1;\n\t\t\t\twhile (nextUserId > 0 && nextUserId <= maxUsers) {\n\t\t\t\t\tconst response = await api.get(nextUserId, true);\n\t\t\t\t\tif (!response) break;\n\t\t\t\t\tusers.push(\n\t\t\t\t\t\t...response.userCodes\n\t\t\t\t\t\t\t.map((entry) =>\n\t\t\t\t\t\t\t\tthis.#mapUserCodeStatusToUserData(\n\t\t\t\t\t\t\t\t\tentry.userId,\n\t\t\t\t\t\t\t\t\tentry.userIdStatus,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.filter((u) => u != undefined),\n\t\t\t\t\t);\n\t\t\t\t\tnextUserId = response.nextUserId;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (let userId = 1; userId <= maxUsers; userId++) {\n\t\t\t\t\tconst result = await api.get(userId);\n\t\t\t\t\tif (!result) continue;\n\t\t\t\t\tconst user = this.#mapUserCodeStatusToUserData(\n\t\t\t\t\t\tuserId,\n\t\t\t\t\t\tresult.userIdStatus,\n\t\t\t\t\t);\n\t\t\t\t\tif (user) users.push(user);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn users;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the data for all configured users.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getUsersCached(): UserData[] {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst maxUsers = this.getValue<number>(\n\t\t\t\tUserCredentialCCValues.supportedUsers.endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) ?? 0;\n\t\t\tconst users: UserData[] = [];\n\t\t\tfor (let userId = 1; userId <= maxUsers; userId++) {\n\t\t\t\tconst user = this.#getUserCached_U3C(userId);\n\t\t\t\tif (user) users.push(user);\n\t\t\t}\n\t\t\treturn users;\n\t\t} else {\n\t\t\tconst maxUsers = this.getValue<number>(\n\t\t\t\tUserCodeCCValues.supportedUsers.endpoint(this.endpoint.index),\n\t\t\t) ?? 0;\n\t\t\tconst users: UserData[] = [];\n\t\t\tfor (let userId = 1; userId <= maxUsers; userId++) {\n\t\t\t\tconst user = this.#getUserCached_UC(userId);\n\t\t\t\tif (user) users.push(user);\n\t\t\t}\n\t\t\treturn users;\n\t\t}\n\t}\n\n\t/**\n\t * Creates or updates the user with the given ID.\n\t * This communicates with the node.\n\t */\n\tpublic async setUser(\n\t\tuserId: number,\n\t\toptions: SetUserOptions,\n\t): Promise<SetUserResult> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst existing = this.#getUserCached_U3C(userId);\n\t\t\tconst operationType = existing\n\t\t\t\t? UserCredentialOperationType.Modify\n\t\t\t\t: UserCredentialOperationType.Add;\n\n\t\t\tconst userType = options.userType\n\t\t\t\t?? existing?.userType\n\t\t\t\t?? UserCredentialUserType.General;\n\n\t\t\tlet result: UserCredentialCCUserReport | undefined;\n\t\t\tif (userType === UserCredentialUserType.Expiring) {\n\t\t\t\tresult = await api.setUser({\n\t\t\t\t\toperationType,\n\t\t\t\t\tuserId,\n\t\t\t\t\tactive: options.active ?? existing?.active ?? true,\n\t\t\t\t\tuserType,\n\t\t\t\t\texpiringTimeoutMinutes: options.expiringTimeoutMinutes\n\t\t\t\t\t\t?? existing?.expiringTimeoutMinutes\n\t\t\t\t\t\t?? 0,\n\t\t\t\t\tcredentialRule: options.credentialRule\n\t\t\t\t\t\t?? existing?.credentialRule,\n\t\t\t\t\tuserName: options.userName ?? existing?.userName,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tresult = await api.setUser({\n\t\t\t\t\toperationType,\n\t\t\t\t\tuserId,\n\t\t\t\t\tactive: options.active ?? existing?.active ?? true,\n\t\t\t\t\tuserType,\n\t\t\t\t\tcredentialRule: options.credentialRule\n\t\t\t\t\t\t?? existing?.credentialRule,\n\t\t\t\t\tuserName: options.userName ?? existing?.userName,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (result) await this.endpoint.tryGetNode()?.handleCommand(result);\n\t\t\treturn u3cUserReportTypeToSetUserResult(result?.reportType);\n\t\t} else {\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst existing = this.#getUserCached_UC(userId);\n\t\t\tconst existingStatus = this.getValue<UserIDStatus>(\n\t\t\t\tUserCodeCCValues.userIdStatus(userId).endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t);\n\n\t\t\tconst active = options.active ?? existing?.active ?? true;\n\t\t\tconst userType = options.userType\n\t\t\t\t?? existing?.userType\n\t\t\t\t?? UserCredentialUserType.General;\n\n\t\t\t// Reverse the unified active/userType model back to UserIDStatus\n\t\t\tlet status: UserIDStatus;\n\t\t\tif (!active) {\n\t\t\t\tstatus = UserIDStatus.Disabled;\n\t\t\t} else if (userType === UserCredentialUserType.NonAccess) {\n\t\t\t\tstatus = UserIDStatus.Messaging;\n\t\t\t} else {\n\t\t\t\tstatus = UserIDStatus.Enabled;\n\t\t\t}\n\n\t\t\t// User Code CC requires sending the code along with every status\n\t\t\t// change, so we re-send the existing code to preserve it\n\t\t\tconst existingCode = this.getValue<string>(\n\t\t\t\tUserCodeCCValues.userCode(userId).endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t);\n\t\t\tif (!existingCode) {\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\"User Code CC requires a credential to be set before modifying the user. Use setCredential() first.\",\n\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst result = await api.set(\n\t\t\t\tuserId,\n\t\t\t\tstatus,\n\t\t\t\texistingCode,\n\t\t\t);\n\t\t\tlet succeeded: boolean;\n\t\t\tif (result == undefined) {\n\t\t\t\t// Unsupervised - verify the change\n\t\t\t\tconst verified = await api.get(userId);\n\t\t\t\tconst verifiedStatus = verified?.userIdStatus;\n\t\t\t\tsucceeded = verifiedStatus != undefined\n\t\t\t\t\t&& verifiedStatus !== existingStatus\n\t\t\t\t\t&& verifiedStatus !== UserIDStatus.Available;\n\t\t\t} else {\n\t\t\t\tsucceeded = supervisedCommandSucceeded(result);\n\t\t\t}\n\t\t\tif (succeeded) {\n\t\t\t\tconst node = this.endpoint.tryGetNode();\n\t\t\t\tif (node) {\n\t\t\t\t\tconst userData: UserData = { userId, active, userType };\n\t\t\t\t\tnode.emit(\n\t\t\t\t\t\texisting ? \"user modified\" : \"user added\",\n\t\t\t\t\t\tthis.endpoint as any,\n\t\t\t\t\t\tuserData,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn succeeded ? SetUserResult.OK : SetUserResult.Error_Unknown;\n\t\t}\n\t}\n\n\t/**\n\t * Deletes the user with the given ID and all of their credentials.\n\t * This communicates with the node.\n\t */\n\tpublic async deleteUser(\n\t\tuserId: number,\n\t): Promise<SetUserResult> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst raw = await api.setUser({\n\t\t\t\toperationType: UserCredentialOperationType.Delete,\n\t\t\t\tuserId,\n\t\t\t});\n\t\t\tif (raw) await this.endpoint.tryGetNode()?.handleCommand(raw);\n\t\t\tconst status = u3cUserReportTypeToSetUserResult(raw?.reportType);\n\t\t\tif (status === SetUserResult.OK) {\n\t\t\t\tthis.#purgeCachedCredentials(userId);\n\t\t\t}\n\t\t\treturn status;\n\t\t} else {\n\t\t\t// User Code CC ties each user to their code, so clearing\n\t\t\t// the code implicitly deletes the user and vice versa\n\t\t\tconst existed = this.#getUserCached_UC(userId) != undefined;\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst result = await api.clear(userId);\n\t\t\tlet succeeded: boolean;\n\t\t\tif (result == undefined) {\n\t\t\t\t// Unsupervised - verify the change\n\t\t\t\tconst verified = await api.get(userId);\n\t\t\t\tsucceeded = existed\n\t\t\t\t\t&& verified?.userIdStatus === UserIDStatus.Available;\n\t\t\t} else {\n\t\t\t\tsucceeded = supervisedCommandSucceeded(result) && existed;\n\t\t\t}\n\t\t\tif (succeeded) {\n\t\t\t\tconst node = this.endpoint.tryGetNode();\n\t\t\t\tif (node) {\n\t\t\t\t\tnode.emit(\"user deleted\", this.endpoint as any, { userId });\n\t\t\t\t\tnode.emit(\"credential deleted\", this.endpoint as any, {\n\t\t\t\t\t\tuserId,\n\t\t\t\t\t\tcredentialType: this.#ucCredentialType,\n\t\t\t\t\t\t// For User Code CC, credential slots and users are identical\n\t\t\t\t\t\tcredentialSlot: userId,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn succeeded ? SetUserResult.OK : SetUserResult.Error_Unknown;\n\t\t}\n\t}\n\n\t/**\n\t * Deletes all users and their credentials.\n\t * This communicates with the node.\n\t */\n\tpublic async deleteAllUsers(): Promise<SetUserResult> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst raw = await api.setUser({\n\t\t\t\toperationType: UserCredentialOperationType.Delete,\n\t\t\t\tuserId: 0,\n\t\t\t});\n\t\t\tif (raw) await this.endpoint.tryGetNode()?.handleCommand(raw);\n\t\t\tconst status = u3cUserReportTypeToSetUserResult(raw?.reportType);\n\t\t\tif (status === SetUserResult.OK) {\n\t\t\t\tthis.#purgeAllCachedUsersAndCredentials();\n\t\t\t}\n\t\t\treturn status;\n\t\t} else {\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst result = await api.clear(0);\n\t\t\t// Verifying all users being deleted is unrealistic\n\t\t\t// since there can be up to 65535 users. So we just\n\t\t\t// assume it worked when the command was not supervised.\n\t\t\tconst succeeded = result == undefined\n\t\t\t\t|| supervisedCommandSucceeded(result);\n\t\t\tif (succeeded) {\n\t\t\t\tthis.#purgeAllCachedUserCodes();\n\t\t\t}\n\t\t\treturn succeeded ? SetUserResult.OK : SetUserResult.Error_Unknown;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the data for a specific credential type and slot.\n\t * This communicates with the node to retrieve fresh information.\n\t */\n\tpublic async getCredential(\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): Promise<CredentialData | undefined> {\n\t\tthis.#assertValidSlot(type, slot);\n\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst result = await this.#u3cAPI().getCredential(0, type, slot);\n\t\t\tif (result) await this.endpoint.tryGetNode()?.handleCommand(result);\n\t\t\treturn this.#mapCredentialData(result);\n\t\t} else {\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst result = await api.get(slot);\n\t\t\tif (!result) return undefined;\n\t\t\tif (\n\t\t\t\tresult.userIdStatus === UserIDStatus.Available\n\t\t\t\t|| result.userIdStatus === UserIDStatus.StatusNotAvailable\n\t\t\t) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\t// For User Code CC, credential slots and users are identical\n\t\t\treturn { userId: slot, type, slot, data: result.userCode };\n\t\t}\n\t}\n\n\t/**\n\t * Returns the data for a specific credential type and slot.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getCredentialCached(\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): CredentialData | undefined {\n\t\tthis.#assertValidSlot(type, slot);\n\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\treturn this.#getCredentialCached_U3C(type, slot);\n\t\t} else {\n\t\t\treturn this.#getCredentialCached_UC(type, slot);\n\t\t}\n\t}\n\n\t/**\n\t * Returns all credentials for the given user and optional type.\n\t * This communicates with the node to retrieve fresh information.\n\t */\n\tpublic async getCredentialsForUser(\n\t\tuserId: number,\n\t\ttype?: UserCredentialType,\n\t): Promise<CredentialData[]> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tif (type != undefined && !this.#supportsCredentialType(type)) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\treturn this.#queryCredentials_U3C(\n\t\t\t\tuserId,\n\t\t\t\ttype ?? UserCredentialType.None,\n\t\t\t\t0,\n\t\t\t\ttype,\n\t\t\t);\n\t\t} else {\n\t\t\tif (type != undefined && type !== this.#ucCredentialType) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tconst cred = await this.getCredential(\n\t\t\t\tthis.#ucCredentialType,\n\t\t\t\t// For User Code CC, credential slots and users are identical\n\t\t\t\tuserId,\n\t\t\t);\n\t\t\t// ...and there is at most one credential per user.\n\t\t\treturn cred ? [cred] : [];\n\t\t}\n\t}\n\n\t/**\n\t * Returns all credentials for the given user and optional type.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getCredentialsForUserCached(\n\t\tuserId: number,\n\t\ttype?: UserCredentialType,\n\t): CredentialData[] {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tif (type != undefined && !this.#supportsCredentialType(type)) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\treturn this.#getAllCredentialsCached_U3C().filter(\n\t\t\t\t(credential) =>\n\t\t\t\t\tcredential.userId === userId\n\t\t\t\t\t&& (type == undefined || credential.type === type),\n\t\t\t);\n\t\t} else {\n\t\t\tif (type != undefined && type !== this.#ucCredentialType) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tconst cred = this.#getCredentialCached_UC(\n\t\t\t\tthis.#ucCredentialType,\n\t\t\t\t// For User Code CC, credential slots and users are identical\n\t\t\t\tuserId,\n\t\t\t);\n\t\t\t// ...and there is at most one credential per user.\n\t\t\treturn cred ? [cred] : [];\n\t\t}\n\t}\n\n\t/**\n\t * Returns all credentials of the given type, regardless of ownership.\n\t * This communicates with the node to retrieve fresh information.\n\t */\n\tpublic async getCredentialsByType(\n\t\ttype: UserCredentialType,\n\t): Promise<CredentialData[]> {\n\t\tif (!this.#supportsCredentialType(type)) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\treturn this.#queryCredentials_U3C(0, type, 0, type);\n\t\t} else {\n\t\t\treturn this.#getAllCredentials_UC();\n\t\t}\n\t}\n\n\t/**\n\t * Returns all credentials of the given type, regardless of ownership.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getCredentialsByTypeCached(\n\t\ttype: UserCredentialType,\n\t): CredentialData[] {\n\t\tif (!this.#supportsCredentialType(type)) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\treturn this.#getAllCredentialsCached_U3C().filter(\n\t\t\t\t(credential) => credential.type === type,\n\t\t\t);\n\t\t} else {\n\t\t\treturn this.#getAllCredentialsCached_UC();\n\t\t}\n\t}\n\n\t/**\n\t * Returns all credentials, regardless of ownership or type.\n\t * This communicates with the node to retrieve fresh information.\n\t */\n\tpublic async getAllCredentials(): Promise<CredentialData[]> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\treturn this.#queryCredentials_U3C(\n\t\t\t\t0,\n\t\t\t\tUserCredentialType.None,\n\t\t\t\t0,\n\t\t\t);\n\t\t} else {\n\t\t\treturn this.#getAllCredentials_UC();\n\t\t}\n\t}\n\n\t/**\n\t * Returns all credentials, regardless of ownership or type.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getAllCredentialsCached(): CredentialData[] {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\treturn this.#getAllCredentialsCached_U3C();\n\t\t} else {\n\t\t\treturn this.#getAllCredentialsCached_UC();\n\t\t}\n\t}\n\n\t/**\n\t * Creates or updates a credential for the given user.\n\t * This communicates with the node.\n\t */\n\tpublic async setCredential(\n\t\tuserId: number,\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t\tdata: string | Uint8Array,\n\t): Promise<SetCredentialResult> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tthis.#assertValidSlot(type, slot);\n\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst existing = this.#getCredentialCachedForUser_U3C(\n\t\t\t\tuserId,\n\t\t\t\ttype,\n\t\t\t\tslot,\n\t\t\t);\n\t\t\tconst credentialData = typeof data === \"string\"\n\t\t\t\t? Bytes.from(data, \"utf-8\")\n\t\t\t\t: Bytes.from(data);\n\t\t\tconst raw = await api.setCredential({\n\t\t\t\toperationType: existing\n\t\t\t\t\t? UserCredentialOperationType.Modify\n\t\t\t\t\t: UserCredentialOperationType.Add,\n\t\t\t\tuserId,\n\t\t\t\tcredentialType: type,\n\t\t\t\tcredentialSlot: slot,\n\t\t\t\tcredentialData,\n\t\t\t});\n\t\t\tif (raw) await this.endpoint.tryGetNode()?.handleCommand(raw);\n\t\t\treturn u3cCredentialReportTypeToSetCredentialResult(\n\t\t\t\traw?.reportType,\n\t\t\t);\n\t\t} else {\n\t\t\t// User Code CC stores exactly one credential per user slot. Ignore the\n\t\t\t// caller-provided unified slot and write back to the owning user's slot\n\t\t\t// so events and cached state stay internally consistent.\n\t\t\tthis.#assertValidSlot(type, userId);\n\t\t\tconst api = this.#ucAPI();\n\n\t\t\t// Determine the current status; default to Enabled for new users\n\t\t\tconst existingStatus = this.getValue<UserIDStatus>(\n\t\t\t\tUserCodeCCValues.userIdStatus(userId).endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t);\n\t\t\tconst status = (\n\t\t\t\t\texistingStatus == undefined\n\t\t\t\t\t|| existingStatus === UserIDStatus.Available\n\t\t\t\t)\n\t\t\t\t? UserIDStatus.Enabled\n\t\t\t\t: existingStatus;\n\n\t\t\tconst existingCred = this.#getCredentialCached_UC(\n\t\t\t\ttype,\n\t\t\t\tuserId,\n\t\t\t);\n\n\t\t\tconst codeData = typeof data === \"string\"\n\t\t\t\t? data\n\t\t\t\t: Bytes.from(data);\n\t\t\tconst result = await api.set(\n\t\t\t\tuserId,\n\t\t\t\tstatus as number,\n\t\t\t\tcodeData,\n\t\t\t);\n\t\t\tlet succeeded: boolean;\n\t\t\tif (result == undefined) {\n\t\t\t\tconst verified = await api.get(userId);\n\t\t\t\tsucceeded = verified?.userCode === codeData;\n\t\t\t} else {\n\t\t\t\tsucceeded = supervisedCommandSucceeded(result);\n\t\t\t}\n\t\t\tif (succeeded) {\n\t\t\t\tconst node = this.endpoint.tryGetNode();\n\t\t\t\tif (node) {\n\t\t\t\t\tnode.emit(\n\t\t\t\t\t\texistingCred\n\t\t\t\t\t\t\t? \"credential modified\"\n\t\t\t\t\t\t\t: \"credential added\",\n\t\t\t\t\t\tthis.endpoint as any,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tuserId,\n\t\t\t\t\t\t\tcredentialType: type,\n\t\t\t\t\t\t\tcredentialSlot: userId,\n\t\t\t\t\t\t\tdata,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn succeeded\n\t\t\t\t? SetCredentialResult.OK\n\t\t\t\t: SetCredentialResult.Error_Unknown;\n\t\t}\n\t}\n\n\t/**\n\t * Deletes the given credential.\n\t * This communicates with the node.\n\t */\n\tpublic async deleteCredential(\n\t\tuserId: number,\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): Promise<SetCredentialResult> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tthis.#assertValidSlot(type, slot);\n\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst raw = await api.setCredential({\n\t\t\t\toperationType: UserCredentialOperationType.Delete,\n\t\t\t\tuserId,\n\t\t\t\tcredentialType: type,\n\t\t\t\tcredentialSlot: slot,\n\t\t\t});\n\t\t\tif (raw) await this.endpoint.tryGetNode()?.handleCommand(raw);\n\t\t\treturn u3cCredentialReportTypeToSetCredentialResult(\n\t\t\t\traw?.reportType,\n\t\t\t);\n\t\t} else {\n\t\t\t// User Code CC stores exactly one credential per user slot. Ignore the\n\t\t\t// caller-provided unified slot and write back to the owning user's slot\n\t\t\t// so events and cached state stay internally consistent.\n\t\t\tthis.#assertValidSlot(type, userId);\n\t\t\tconst existed = this.#getCredentialCached_UC(\n\t\t\t\ttype,\n\t\t\t\tuserId,\n\t\t\t) != undefined;\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst result = await api.clear(userId);\n\t\t\tlet succeeded: boolean;\n\t\t\tif (result == undefined) {\n\t\t\t\tconst verified = await api.get(userId);\n\t\t\t\tsucceeded = existed\n\t\t\t\t\t&& verified?.userIdStatus === UserIDStatus.Available;\n\t\t\t} else {\n\t\t\t\tsucceeded = supervisedCommandSucceeded(result) && existed;\n\t\t\t}\n\t\t\tif (succeeded) {\n\t\t\t\tconst node = this.endpoint.tryGetNode();\n\t\t\t\tif (node) {\n\t\t\t\t\tnode.emit(\"credential deleted\", this.endpoint as any, {\n\t\t\t\t\t\tuserId,\n\t\t\t\t\t\tcredentialType: type,\n\t\t\t\t\t\tcredentialSlot: userId,\n\t\t\t\t\t});\n\t\t\t\t\tnode.emit(\"user deleted\", this.endpoint as any, { userId });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn succeeded\n\t\t\t\t? SetCredentialResult.OK\n\t\t\t\t: SetCredentialResult.Error_Unknown;\n\t\t}\n\t}\n\n\t/**\n\t * Assigns an existing credential to a different user, without re-enrolling\n\t * it. Useful for credentials that were added locally on the device (e.g. a\n\t * biometric auto-assigned to a fresh user) that need to be attached to an\n\t * existing user which already has other credentials.\n\t *\n\t * Only supported on nodes using the User Credential CC. Use\n\t * {@link getCredentialCapabilitiesCached} to check for support via the\n\t * `supportsCredentialAssignment` property.\n\t *\n\t * This communicates with the node.\n\t */\n\tpublic async assignCredential(\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t\tdestinationUserId: number,\n\t): Promise<AssignCredentialResult> {\n\t\tif (!this.#usesUserCredentialCC) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"This node does not support assigning a credential to a different user\",\n\t\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t\t);\n\t\t}\n\n\t\tthis.#assertValidSlot(type, slot);\n\n\t\tconst api = this.#u3cAPI();\n\t\tconst response = await api.setUserCredentialAssociation({\n\t\t\tcredentialType: type,\n\t\t\tcredentialSlot: slot,\n\t\t\tdestinationUserId,\n\t\t});\n\t\tif (response) {\n\t\t\tawait this.endpoint.tryGetNode()?.handleCommand(response);\n\t\t}\n\t\treturn u3cAssociationStatusToAssignCredentialResult(response?.status);\n\t}\n\n\t/**\n\t * Starts a learn process for the given credential slot, allowing a user\n\t * to input a credential directly on the device.\n\t * Only supported on nodes using the User Credential CC.\n\t * This communicates with the node.\n\t */\n\tpublic async startCredentialLearn(\n\t\tuserId: number,\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t\ttimeout?: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tif (!this.#usesUserCredentialCC) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"This node does not support learning credentials\",\n\t\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t\t);\n\t\t}\n\n\t\tthis.#assertValidSlot(type, slot);\n\n\t\tconst existing = this.#getCredentialCachedForUser_U3C(\n\t\t\tuserId,\n\t\t\ttype,\n\t\t\tslot,\n\t\t);\n\t\tconst operationType = existing\n\t\t\t? UserCredentialOperationType.Modify\n\t\t\t: UserCredentialOperationType.Add;\n\n\t\ttimeout ??= this.getCredentialCapabilitiesCached()\n\t\t\t.supportedCredentialTypes\n\t\t\t.get(type)?.credentialLearnRecommendedTimeout;\n\n\t\tif (timeout == undefined) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`Credential learning is not supported for credential type ${\n\t\t\t\t\tgetEnumMemberName(UserCredentialType, type)\n\t\t\t\t}`,\n\t\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t\t);\n\t\t}\n\n\t\tconst api = this.#u3cAPI();\n\t\treturn api.startCredentialLearn({\n\t\t\tuserId,\n\t\t\tcredentialType: type,\n\t\t\tcredentialSlot: slot,\n\t\t\toperationType,\n\t\t\tlearnTimeout: timeout,\n\t\t});\n\t}\n\n\t/**\n\t * Cancels an ongoing credential learn process.\n\t * Only supported on nodes using the User Credential CC.\n\t * This communicates with the node.\n\t */\n\tpublic async cancelCredentialLearn(): Promise<\n\t\tSupervisionResult | undefined\n\t> {\n\t\tif (!this.#usesUserCredentialCC) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"This node does not support learning credentials\",\n\t\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t\t);\n\t\t}\n\t\tconst api = this.#u3cAPI();\n\t\treturn api.cancelCredentialLearn();\n\t}\n\n\t/**\n\t * Retrieves the admin code from the node.\n\t * This communicates with the node to retrieve fresh information.\n\t */\n\tpublic async getAdminCode(): Promise<string | undefined> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\treturn api.getAdminPinCode();\n\t\t} else {\n\t\t\tconst api = this.#ucAPI();\n\t\t\treturn api.getAdminCode();\n\t\t}\n\t}\n\n\t/**\n\t * Sets the admin code on the node.\n\t * This communicates with the node.\n\t */\n\tpublic async setAdminCode(\n\t\tcode: string,\n\t): Promise<SupervisionResult | undefined> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\treturn api.setAdminPinCode({ pinCode: code });\n\t\t} else {\n\t\t\tconst api = this.#ucAPI();\n\t\t\treturn api.setAdminCode(code);\n\t\t}\n\t}\n\n\t#ucAPI(): UserCodeCCAPI {\n\t\treturn this.endpoint\n\t\t\t.commandClasses[\"User Code\"] as unknown as UserCodeCCAPI;\n\t}\n\n\t#u3cAPI(): UserCredentialCCAPI {\n\t\treturn this.endpoint.commandClasses[\n\t\t\t\"User Credential\"\n\t\t] as unknown as UserCredentialCCAPI;\n\t}\n\n\t#supportsCredentialType(type: UserCredentialType): boolean {\n\t\treturn this.getCredentialCapabilitiesCached()\n\t\t\t.supportedCredentialTypes\n\t\t\t.has(type);\n\t}\n\n\t/** Returns the credential type to use for User Code CC based on supported characters */\n\tget #ucCredentialType(): UserCredentialType {\n\t\tconst supportedASCIIChars = this.getValue<string>(\n\t\t\tUserCodeCCValues.supportedASCIIChars.endpoint(this.endpoint.index),\n\t\t);\n\t\treturn supportsNonPINChars(supportedASCIIChars)\n\t\t\t? UserCredentialType.Password\n\t\t\t: UserCredentialType.PINCode;\n\t}\n\n\t/** Maps User Code CC's UserIDStatus to the unified active/userType model */\n\t#mapUserCodeStatusToUserData(\n\t\tuserId: number,\n\t\tstatus: UserIDStatus,\n\t): UserData | undefined {\n\t\t// These statuses indicate no user is configured for this slot\n\t\tif (\n\t\t\tstatus === UserIDStatus.Available\n\t\t\t|| status === UserIDStatus.StatusNotAvailable\n\t\t\t|| status === UserIDStatus.PassageMode\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tlet active: boolean;\n\t\tlet userType: UserCredentialUserType;\n\t\tswitch (status) {\n\t\t\tcase UserIDStatus.Enabled:\n\t\t\t\tactive = true;\n\t\t\t\tuserType = UserCredentialUserType.General;\n\t\t\t\tbreak;\n\t\t\tcase UserIDStatus.Disabled:\n\t\t\t\tactive = false;\n\t\t\t\tuserType = UserCredentialUserType.General;\n\t\t\t\tbreak;\n\t\t\t// Messaging is the closest User Code CC equivalent to NonAccess\n\t\t\tcase UserIDStatus.Messaging:\n\t\t\t\tactive = true;\n\t\t\t\tuserType = UserCredentialUserType.NonAccess;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tactive = true;\n\t\t\t\tuserType = UserCredentialUserType.General;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn { userId, active, userType };\n\t}\n\n\t/** Removes cached credential values for a given user from the value DB */\n\t#purgeCachedCredentials(userId: number): void {\n\t\tconst valueDB = this.endpoint.tryGetNode()?.valueDB;\n\t\tif (!valueDB) return;\n\t\tconst credentialOwners = valueDB.findValues(\n\t\t\t(vid) =>\n\t\t\t\tUserCredentialCCValues.credentialOwner.is(vid)\n\t\t\t\t&& vid.endpoint === this.endpoint.index,\n\t\t);\n\t\tfor (const { endpoint, propertyKey, value } of credentialOwners) {\n\t\t\tif (value !== userId) continue;\n\n\t\t\tconst key = propertyKey as number;\n\t\t\tconst type = key >>> 16;\n\t\t\tconst slot = key & 0xffff;\n\n\t\t\tfor (\n\t\t\t\tconst valueId of [\n\t\t\t\t\tUserCredentialCCValues.credential(type, slot),\n\t\t\t\t\tUserCredentialCCValues.credentialOwner(type, slot),\n\t\t\t\t\tUserCredentialCCValues.credentialModifierType(type, slot),\n\t\t\t\t\tUserCredentialCCValues.credentialModifierNodeId(type, slot),\n\t\t\t\t]\n\t\t\t) {\n\t\t\t\tvalueDB.removeValue(valueId.endpoint(endpoint));\n\t\t\t}\n\t\t}\n\t}\n\n\t/** Removes all cached user and credential values from the value DB */\n\t#purgeAllCachedUsersAndCredentials(): void {\n\t\tconst valueDB = this.endpoint.tryGetNode()?.valueDB;\n\t\tif (!valueDB) return;\n\n\t\tconst maxUsers = this.getValue<number>(\n\t\t\tUserCredentialCCValues.supportedUsers.endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t),\n\t\t) ?? 0;\n\t\tfor (let userId = 1; userId <= maxUsers; userId++) {\n\t\t\tfor (\n\t\t\t\tconst value of [\n\t\t\t\t\tUserCredentialCCValues.userType(userId),\n\t\t\t\t\tUserCredentialCCValues.userActive(userId),\n\t\t\t\t\tUserCredentialCCValues.credentialRule(userId),\n\t\t\t\t\tUserCredentialCCValues.expiringTimeoutMinutes(userId),\n\t\t\t\t\tUserCredentialCCValues.userName(userId),\n\t\t\t\t\tUserCredentialCCValues.userModifierType(userId),\n\t\t\t\t\tUserCredentialCCValues.userModifierNodeId(userId),\n\t\t\t\t\tUserCredentialCCValues.userChecksum(userId),\n\t\t\t\t]\n\t\t\t) {\n\t\t\t\tvalueDB.removeValue(value.endpoint(this.endpoint.index));\n\t\t\t}\n\t\t}\n\n\t\t// Remove all credential values\n\t\tconst credentialValues = valueDB.findValues(\n\t\t\t(vid) =>\n\t\t\t\tUserCredentialCCValues.credential.is(vid)\n\t\t\t\t|| UserCredentialCCValues.credentialOwner.is(vid)\n\t\t\t\t|| UserCredentialCCValues.credentialModifierType.is(vid)\n\t\t\t\t|| UserCredentialCCValues.credentialModifierNodeId.is(vid),\n\t\t);\n\t\tfor (const vid of credentialValues) {\n\t\t\tvalueDB.removeValue(vid);\n\t\t}\n\t}\n\n\t/** Removes all cached user code status and code values from the value DB */\n\t#purgeAllCachedUserCodes(): void {\n\t\tconst valueDB = this.endpoint.tryGetNode()?.valueDB;\n\t\tif (!valueDB) return;\n\n\t\tconst values = valueDB.findValues(\n\t\t\t(vid) =>\n\t\t\t\tUserCodeCCValues.userIdStatus.is(vid)\n\t\t\t\t|| UserCodeCCValues.userCode.is(vid),\n\t\t);\n\t\tfor (const vid of values) {\n\t\t\tvalueDB.removeValue(vid);\n\t\t}\n\t}\n\n\t#mapCredentialData(\n\t\tresult: UserCredentialGetResult,\n\t): CredentialData | undefined {\n\t\tif (!result?.credentialSlot) return undefined;\n\t\treturn {\n\t\t\tuserId: result.userId,\n\t\t\ttype: result.credentialType,\n\t\t\tslot: result.credentialSlot,\n\t\t\tdata: result.credentialData != undefined\n\t\t\t\t? normalizeCredentialData(\n\t\t\t\t\tresult.credentialType,\n\t\t\t\t\tresult.credentialData,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t};\n\t}\n\n\tasync #queryCredentials_U3C(\n\t\tuserId: number,\n\t\tstartType: UserCredentialType,\n\t\tstartSlot: number,\n\t\tfilterType?: UserCredentialType,\n\t): Promise<CredentialData[]> {\n\t\tconst api = this.#u3cAPI();\n\t\tconst credentials: CredentialData[] = [];\n\t\tlet queryType = startType;\n\t\tlet querySlot = startSlot;\n\n\t\t// U3C credential enumeration behaves like a cursor walk.\n\t\t// The initial (userId, type, slot) triple may be exact or wildcarded,\n\t\t// and each report returns both the matching credential and a pointer to\n\t\t// the next credential that should be requested.\n\t\twhile (true) {\n\t\t\tconst result = await api.getCredential(\n\t\t\t\tuserId,\n\t\t\t\tqueryType,\n\t\t\t\tquerySlot,\n\t\t\t);\n\t\t\tif (result) await this.endpoint.tryGetNode()?.handleCommand(result);\n\t\t\tconst credential = this.#mapCredentialData(result);\n\t\t\t// No credential means the walk is exhausted or the current selector did\n\t\t\t// not resolve to a valid entry on this node.\n\t\t\tif (!result || !credential) break;\n\t\t\t// When iterating a single type, stop as soon as the node answers with a\n\t\t\t// credential of another type instead of leaking unrelated results.\n\t\t\tif (filterType != undefined && credential.type !== filterType) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcredentials.push(credential);\n\n\t\t\tconst nextType = result.nextCredentialType\n\t\t\t\t?? UserCredentialType.None;\n\t\t\tconst nextSlot = result.nextCredentialSlot ?? 0;\n\t\t\t// A zero next pointer marks the end of the node's credential sequence.\n\t\t\tif (\n\t\t\t\tnextType === UserCredentialType.None\n\t\t\t\t&& nextSlot === 0\n\t\t\t) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Per CC:0083.01.0C.11.024/.025, the next pointer advances to the next\n\t\t\t// existing credential for the user, across credential types. For\n\t\t\t// type-filtered walks, stop before following that pointer into a\n\t\t\t// different type.\n\t\t\tif (filterType != undefined && nextType !== filterType) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Guard against buggy nodes that repeat the same cursor forever.\n\t\t\tif (nextType === queryType && nextSlot === querySlot) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tqueryType = nextType;\n\t\t\tquerySlot = nextSlot;\n\t\t}\n\n\t\treturn credentials;\n\t}\n\n\tasync #getAllCredentials_UC(): Promise<CredentialData[]> {\n\t\tconst api = this.#ucAPI();\n\t\tconst maxUsers = await api.getUsersCount();\n\t\tif (!maxUsers) return [];\n\n\t\tconst credentials: CredentialData[] = [];\n\t\tconst supportsBulk = !!this.getValue<boolean>(\n\t\t\tUserCodeCCValues.supportsMultipleUserCodeReport.endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t),\n\t\t);\n\n\t\tif (supportsBulk) {\n\t\t\tlet nextUserId = 1;\n\t\t\twhile (nextUserId > 0 && nextUserId <= maxUsers) {\n\t\t\t\tconst response = await api.get(nextUserId, true);\n\t\t\t\tif (!response) break;\n\n\t\t\t\tfor (const entry of response.userCodes) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tentry.userIdStatus === UserIDStatus.Available\n\t\t\t\t\t\t|| entry.userIdStatus\n\t\t\t\t\t\t\t=== UserIDStatus.StatusNotAvailable\n\t\t\t\t\t) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// Bulk User Code reports enumerate user slots, which become the\n\t\t\t\t\t// unified credential slots for the returned credentials.\n\t\t\t\t\tcredentials.push({\n\t\t\t\t\t\tuserId: entry.userId,\n\t\t\t\t\t\ttype: this.#ucCredentialType,\n\t\t\t\t\t\tslot: entry.userId,\n\t\t\t\t\t\tdata: entry.userCode,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tnextUserId = response.nextUserId;\n\t\t\t}\n\t\t} else {\n\t\t\tfor (let userId = 1; userId <= maxUsers; userId++) {\n\t\t\t\tconst credential = await this.getCredential(\n\t\t\t\t\tthis.#ucCredentialType,\n\t\t\t\t\tuserId,\n\t\t\t\t);\n\t\t\t\tif (credential) credentials.push(credential);\n\t\t\t}\n\t\t}\n\n\t\treturn credentials;\n\t}\n\n\t#getAllCredentialsCached_U3C(): CredentialData[] {\n\t\tconst valueDB = this.endpoint.tryGetNode()?.valueDB;\n\t\tif (!valueDB) return [];\n\n\t\treturn valueDB\n\t\t\t.findValues(\n\t\t\t\t(vid) =>\n\t\t\t\t\tUserCredentialCCValues.credentialOwner.is(vid)\n\t\t\t\t\t&& vid.endpoint === this.endpoint.index,\n\t\t\t)\n\t\t\t.filter(\n\t\t\t\t({ propertyKey }) => typeof propertyKey === \"number\",\n\t\t\t)\n\t\t\t.toSorted(\n\t\t\t\t(a, b) => (a.propertyKey as number) - (b.propertyKey as number),\n\t\t\t)\n\t\t\t.flatMap(({ propertyKey }) => {\n\t\t\t\tconst key = propertyKey as number;\n\t\t\t\tconst type = key >>> 16;\n\t\t\t\tconst slot = key & 0xffff;\n\t\t\t\tconst credential = this.#getCredentialCached_U3C(type, slot);\n\t\t\t\treturn credential ? [credential] : [];\n\t\t\t});\n\t}\n\n\t#getAllCredentialsCached_UC(): CredentialData[] {\n\t\tconst maxUsers = this.getValue<number>(\n\t\t\tUserCodeCCValues.supportedUsers.endpoint(this.endpoint.index),\n\t\t) ?? 0;\n\t\tconst credentials: CredentialData[] = [];\n\t\t// Cached User Code values are keyed by user slot, and the unified\n\t\t// abstraction reuses that slot number as the credential slot.\n\t\tfor (let userId = 1; userId <= maxUsers; userId++) {\n\t\t\tconst credential = this.#getCredentialCached_UC(\n\t\t\t\tthis.#ucCredentialType,\n\t\t\t\tuserId,\n\t\t\t);\n\t\t\tif (credential) credentials.push(credential);\n\t\t}\n\t\treturn credentials;\n\t}\n\n\t#assertValidSlot(type: UserCredentialType, slot: number): void {\n\t\tconst caps = this.getCredentialCapabilitiesCached()\n\t\t\t.supportedCredentialTypes.get(type);\n\t\tif (!caps || slot < 1 || slot > caps.numberOfCredentialSlots) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`Credential slot ${slot} is out of range for credential type ${\n\t\t\t\t\tgetEnumMemberName(UserCredentialType, type)\n\t\t\t\t}`,\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\t}\n\n\t#getUserCached_U3C(userId: number): UserData | undefined {\n\t\tconst userType = this.getValue<UserCredentialUserType>(\n\t\t\tUserCredentialCCValues.userType(userId).endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t),\n\t\t);\n\t\tif (userType == undefined) return undefined;\n\n\t\treturn {\n\t\t\tuserId,\n\t\t\tactive: this.getValue<boolean>(\n\t\t\t\tUserCredentialCCValues.userActive(userId).endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) ?? false,\n\t\t\tuserType,\n\t\t\tuserName: this.getValue<string>(\n\t\t\t\tUserCredentialCCValues.userName(userId).endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) ?? undefined,\n\t\t\tcredentialRule: this.getValue<UserCredentialRule>(\n\t\t\t\tUserCredentialCCValues.credentialRule(userId).endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) ?? undefined,\n\t\t\texpiringTimeoutMinutes: this.getValue<number>(\n\t\t\t\tUserCredentialCCValues.expiringTimeoutMinutes(userId).endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) || undefined,\n\t\t};\n\t}\n\n\t#getCredentialOwner_U3C(\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): number | undefined {\n\t\treturn this.getValue<number>(\n\t\t\tUserCredentialCCValues.credentialOwner(type, slot).endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t),\n\t\t);\n\t}\n\n\t#getCredentialCached_U3C(\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): CredentialData | undefined {\n\t\tconst owner = this.#getCredentialOwner_U3C(type, slot);\n\t\tif (owner == undefined) return undefined;\n\n\t\t// When credentialReadBack is false, the node never returns credential\n\t\t// data. In that case, we still know the slot is occupied and to which\n\t\t// user it belongs, and return the credential without data.\n\t\tconst data = this.getValue<string | Uint8Array>(\n\t\t\tUserCredentialCCValues.credential(type, slot).endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t),\n\t\t);\n\t\treturn { userId: owner, type, slot, data };\n\t}\n\n\t#getCredentialCachedForUser_U3C(\n\t\tuserId: number,\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): CredentialData | undefined {\n\t\tconst credential = this.#getCredentialCached_U3C(type, slot);\n\t\tif (credential?.userId !== userId) return undefined;\n\t\treturn credential;\n\t}\n\n\t#getUserCached_UC(userId: number): UserData | undefined {\n\t\tconst status = this.getValue<UserIDStatus>(\n\t\t\tUserCodeCCValues.userIdStatus(userId).endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t),\n\t\t);\n\t\tif (status == undefined) return undefined;\n\t\treturn this.#mapUserCodeStatusToUserData(userId, status);\n\t}\n\n\t#getCredentialCached_UC(\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): CredentialData | undefined {\n\t\tif (type !== this.#ucCredentialType) return undefined;\n\t\t// For User Code CC, credential slots and users are identical\n\t\tconst status = this.getValue<UserIDStatus>(\n\t\t\tUserCodeCCValues.userIdStatus(slot).endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t),\n\t\t);\n\t\tif (\n\t\t\tstatus == undefined\n\t\t\t|| status === UserIDStatus.Available\n\t\t\t|| status === UserIDStatus.StatusNotAvailable\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst data = this.getValue<string>(\n\t\t\tUserCodeCCValues.userCode(slot).endpoint(this.endpoint.index),\n\t\t);\n\t\tif (data == undefined) return undefined;\n\t\treturn { userId: slot, type, slot, data };\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;AAAA,gBAUO;AACP,wBAAqD;AACrD,8BAMO;AACP,kBAMO;AACP,oBAAyC;AACzC,wBAA2B;AAoD3B,IAAY;C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,MAAM;EACxD;EAEA,wBACC,MACA,MAAY;AAEZ,QAAI,SAAS,KAAK;AAAmB,aAAO;AAE5C,UAAM,SAAS,KAAK,SACnB,mCAAiB,aAAa,IAAI,EAAE,SACnC,KAAK,SAAS,KAAK,CACnB;AAEF,QACC,UAAU,UACP,WAAW,uBAAa,aACxB,WAAW,uBAAa,oBAC1B;AACD,aAAO;IACR;AACA,UAAM,OAAO,KAAK,SACjB,mCAAiB,SAAS,IAAI,EAAE,SAAS,KAAK,SAAS,KAAK,CAAC;AAE9D,QAAI,QAAQ;AAAW,aAAO;AAC9B,WAAO,EAAE,QAAQ,MAAM,MAAM,MAAM,KAAI;EACxC;;",
4
+ "sourcesContent": ["import {\n\ttype UserCredentialCapability,\n\tUserCredentialCommand,\n\tUserCredentialCredentialReportType,\n\tUserCredentialOperationType,\n\tUserCredentialRule,\n\tUserCredentialType,\n\tUserCredentialUserReportType,\n\tUserCredentialUserType,\n\tUserIDStatus,\n} from \"@zwave-js/cc\";\nimport { type UserCodeCCAPI, UserCodeCCValues } from \"@zwave-js/cc/UserCodeCC\";\nimport {\n\ttype UserCredentialCCAPI,\n\ttype UserCredentialCCAssociationReport,\n\ttype UserCredentialCCUserReport,\n\tUserCredentialCCValues,\n\tnormalizeCredentialData,\n} from \"@zwave-js/cc/UserCredentialCC\";\nimport {\n\tCommandClasses,\n\ttype SupervisionResult,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tsupervisedCommandSucceeded,\n} from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName } from \"@zwave-js/shared\";\nimport { FeatureAPI } from \"./FeatureAPI.js\";\n\nexport interface UserCapabilities {\n\tmaxUsers: number;\n\tsupportedUserTypes: readonly UserCredentialUserType[];\n\tmaxUserNameLength: number | undefined;\n\tsupportedCredentialRules: readonly UserCredentialRule[];\n}\n\nexport interface CredentialCapabilities {\n\tsupportedCredentialTypes: ReadonlyMap<\n\t\tUserCredentialType,\n\t\tUserCredentialCapability\n\t>;\n\tsupportsAdminCode: boolean;\n\tsupportsAdminCodeDeactivation: boolean;\n\t/**\n\t * Whether existing credentials can be reassigned between users via\n\t * {@link AccessControlAPI.assignCredential} without re-enrolling them.\n\t */\n\tsupportsCredentialAssignment: boolean;\n}\n\nexport interface UserData {\n\tuserId: number;\n\tactive: boolean;\n\tuserType: UserCredentialUserType;\n\tuserName?: string;\n\tcredentialRule?: UserCredentialRule;\n\texpiringTimeoutMinutes?: number;\n}\n\nexport interface CredentialData {\n\tuserId: number;\n\ttype: UserCredentialType;\n\tslot: number;\n\tdata?: string | Uint8Array;\n}\n\nexport interface SetUserOptions {\n\tactive?: boolean;\n\tuserType?: UserCredentialUserType;\n\tuserName?: string;\n\tcredentialRule?: UserCredentialRule;\n\texpiringTimeoutMinutes?: number;\n}\n\nexport interface DeleteCredentialsOptions {\n\t/**\n\t * Only delete credentials owned by this user. When omitted or `0`, the\n\t * filter is treated as a wildcard and credentials for all users are\n\t * deleted.\n\t */\n\tuserId?: number;\n\t/**\n\t * Only delete credentials of this type. When omitted or\n\t * {@link UserCredentialType.None}, the filter is treated as a wildcard and\n\t * credentials of all types are deleted.\n\t */\n\tcredentialType?: UserCredentialType;\n}\n\ntype UserCredentialGetResult = Awaited<\n\tReturnType<UserCredentialCCAPI[\"getCredential\"]>\n>;\n\n/** Result of a setUser / deleteUser / deleteAllUsers call */\nexport enum SetUserResult {\n\tOK = 0,\n\tError_AddRejectedLocationOccupied = 1,\n\tError_ModifyRejectedLocationEmpty = 2,\n\tError_Unknown = 0xff,\n}\n\n/** Result of a setCredential / deleteCredential call */\nexport enum SetCredentialResult {\n\tOK = 0,\n\tError_AddRejectedLocationOccupied = 1,\n\tError_ModifyRejectedLocationEmpty = 2,\n\tError_DuplicateCredential = 3,\n\tError_ManufacturerSecurityRules = 4,\n\tError_DuplicateAdminPINCode = 5,\n\tError_WrongUserUniqueIdentifier = 6,\n\tError_Unknown = 0xff,\n}\n\n/** Result of an assignCredential call */\nexport enum AssignCredentialResult {\n\tOK = 0,\n\t/** Spec statuses 0x01 / 0x02 / 0x03 \u2014 credential type / slot invalid or empty */\n\tError_InvalidCredential = 1,\n\t/** Spec statuses 0x04 / 0x05 \u2014 destination user invalid or nonexistent */\n\tError_InvalidUser = 2,\n\tError_Unknown = 0xff,\n}\n\nfunction u3cUserReportTypeToSetUserResult(\n\treportType: UserCredentialUserReportType | undefined,\n): SetUserResult {\n\tif (reportType == undefined) return SetUserResult.Error_Unknown;\n\tswitch (reportType) {\n\t\tcase UserCredentialUserReportType.UserAdded:\n\t\tcase UserCredentialUserReportType.UserModified:\n\t\tcase UserCredentialUserReportType.UserDeleted:\n\t\tcase UserCredentialUserReportType.UserUnchanged:\n\t\t\treturn SetUserResult.OK;\n\t\tcase UserCredentialUserReportType.UserAddRejectedLocationOccupied:\n\t\t\treturn SetUserResult.Error_AddRejectedLocationOccupied;\n\t\tcase UserCredentialUserReportType.UserModifyRejectedLocationEmpty:\n\t\t\treturn SetUserResult.Error_ModifyRejectedLocationEmpty;\n\t\tdefault:\n\t\t\treturn SetUserResult.Error_Unknown;\n\t}\n}\n\nfunction u3cCredentialReportTypeToSetCredentialResult(\n\treportType: UserCredentialCredentialReportType | undefined,\n): SetCredentialResult {\n\tif (reportType == undefined) return SetCredentialResult.Error_Unknown;\n\tswitch (reportType) {\n\t\tcase UserCredentialCredentialReportType.CredentialAdded:\n\t\tcase UserCredentialCredentialReportType.CredentialModified:\n\t\tcase UserCredentialCredentialReportType.CredentialDeleted:\n\t\tcase UserCredentialCredentialReportType.CredentialUnchanged:\n\t\t\treturn SetCredentialResult.OK;\n\t\tcase UserCredentialCredentialReportType\n\t\t\t.CredentialAddRejectedLocationOccupied:\n\t\t\treturn SetCredentialResult.Error_AddRejectedLocationOccupied;\n\t\tcase UserCredentialCredentialReportType\n\t\t\t.CredentialModifyRejectedLocationEmpty:\n\t\t\treturn SetCredentialResult.Error_ModifyRejectedLocationEmpty;\n\t\tcase UserCredentialCredentialReportType.DuplicateCredential:\n\t\t\treturn SetCredentialResult.Error_DuplicateCredential;\n\t\tcase UserCredentialCredentialReportType.ManufacturerSecurityRules:\n\t\t\treturn SetCredentialResult.Error_ManufacturerSecurityRules;\n\t\tcase UserCredentialCredentialReportType.DuplicateAdminPINCode:\n\t\t\treturn SetCredentialResult.Error_DuplicateAdminPINCode;\n\t\tcase UserCredentialCredentialReportType.WrongUserUniqueIdentifier:\n\t\t\treturn SetCredentialResult.Error_WrongUserUniqueIdentifier;\n\t\tdefault:\n\t\t\treturn SetCredentialResult.Error_Unknown;\n\t}\n}\n\nfunction u3cAssociationStatusToAssignCredentialResult(\n\tstatus: UserCredentialCCAssociationReport[\"status\"] | undefined,\n): AssignCredentialResult {\n\tif (status == undefined) return AssignCredentialResult.Error_Unknown;\n\tswitch (status) {\n\t\tcase 0x00:\n\t\t\treturn AssignCredentialResult.OK;\n\t\tcase 0x01:\n\t\tcase 0x02:\n\t\tcase 0x03:\n\t\t\treturn AssignCredentialResult.Error_InvalidCredential;\n\t\tcase 0x04:\n\t\tcase 0x05:\n\t\t\treturn AssignCredentialResult.Error_InvalidUser;\n\t\tdefault:\n\t\t\treturn AssignCredentialResult.Error_Unknown;\n\t}\n}\n\nconst NON_PIN_CHARS = /[^0-9]/;\n\n/**\n * Whether the supported ASCII characters indicate a non-PIN device.\n * When unknown (V1 nodes), defaults to PIN-only per the spec.\n */\nfunction supportsNonPINChars(supportedASCIIChars: string | undefined): boolean {\n\treturn supportedASCIIChars != undefined\n\t\t&& NON_PIN_CHARS.test(supportedASCIIChars);\n}\n\n/** High-level API for managing users and credentials on access control devices */\nexport class AccessControlAPI extends FeatureAPI {\n\t// FIXME: This is technically not correct. A node could support both CCs,\n\t// and we may have to decide which one to use, or switch between them on\n\t// the fly using Version CC / migration.\n\t// This is not implemented yet, so checking for U3C first is fine for now.\n\tget #usesUserCredentialCC(): boolean {\n\t\treturn this.endpoint.supportsCC(CommandClasses[\"User Credential\"]);\n\t}\n\n\t/**\n\t * Returns the user-related capabilities of this endpoint.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getUserCapabilitiesCached(): UserCapabilities {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\treturn {\n\t\t\t\tmaxUsers: this.getValue<number>(\n\t\t\t\t\tUserCredentialCCValues.supportedUsers.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? 0,\n\t\t\t\tsupportedUserTypes: this.getValue<UserCredentialUserType[]>(\n\t\t\t\t\tUserCredentialCCValues.supportedUserTypes.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? [],\n\t\t\t\tmaxUserNameLength: this.getValue<number>(\n\t\t\t\t\tUserCredentialCCValues.maxUserNameLength.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? undefined,\n\t\t\t\tsupportedCredentialRules: this.getValue<UserCredentialRule[]>(\n\t\t\t\t\tUserCredentialCCValues.supportedCredentialRules.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? [],\n\t\t\t};\n\t\t} else {\n\t\t\tconst supportedStatuses = this.getValue<UserIDStatus[]>(\n\t\t\t\tUserCodeCCValues.supportedUserIDStatuses.endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) ?? [];\n\t\t\tconst supportedUserTypes: UserCredentialUserType[] = [\n\t\t\t\tUserCredentialUserType.General,\n\t\t\t];\n\t\t\t// User Code CC has no concept of user types, but the Messaging\n\t\t\t// status is the closest equivalent to a NonAccess user\n\t\t\tif (supportedStatuses.includes(UserIDStatus.Messaging)) {\n\t\t\t\tsupportedUserTypes.push(UserCredentialUserType.NonAccess);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tmaxUsers: this.getValue<number>(\n\t\t\t\t\tUserCodeCCValues.supportedUsers.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? 0,\n\t\t\t\tsupportedUserTypes,\n\t\t\t\t// User Code CC does not support user names or credential rules\n\t\t\t\tmaxUserNameLength: undefined,\n\t\t\t\tsupportedCredentialRules: [UserCredentialRule.Single],\n\t\t\t};\n\t\t}\n\t}\n\n\t/**\n\t * Returns the credential-related capabilities of this endpoint.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getCredentialCapabilitiesCached(): CredentialCapabilities {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst supportedTypes = this.getValue<UserCredentialType[]>(\n\t\t\t\tUserCredentialCCValues.supportedCredentialTypes.endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) ?? [];\n\n\t\t\tconst credentialTypes = new Map<\n\t\t\t\tUserCredentialType,\n\t\t\t\tUserCredentialCapability\n\t\t\t>();\n\t\t\tfor (const type of supportedTypes) {\n\t\t\t\tconst cap = this.getValue<UserCredentialCapability>(\n\t\t\t\t\tUserCredentialCCValues.credentialCapabilities(type)\n\t\t\t\t\t\t.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tif (cap) credentialTypes.set(type, cap);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tsupportedCredentialTypes: credentialTypes,\n\t\t\t\tsupportsAdminCode: this.getValue<boolean>(\n\t\t\t\t\tUserCredentialCCValues.supportsAdminCode.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? false,\n\t\t\t\tsupportsAdminCodeDeactivation: this.getValue<boolean>(\n\t\t\t\t\tUserCredentialCCValues.supportsAdminCodeDeactivation\n\t\t\t\t\t\t.endpoint(this.endpoint.index),\n\t\t\t\t) ?? false,\n\t\t\t\tsupportsCredentialAssignment: this.#u3cAPI().supportsCommand(\n\t\t\t\t\tUserCredentialCommand.UserCredentialAssociationSet,\n\t\t\t\t) === true,\n\t\t\t};\n\t\t} else {\n\t\t\tconst maxUsers = this.getValue<number>(\n\t\t\t\tUserCodeCCValues.supportedUsers.endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) ?? 0;\n\n\t\t\t// User Code CC only supports a single credential per user\n\t\t\t// with a length of 4-10 characters (CC:0063.01.01.11.006).\n\t\t\t// Despite the spec calling them \"PIN codes\", v1 devices often\n\t\t\t// accept arbitrary characters. Use the widest matching type.\n\t\t\tconst credentialTypes = new Map<\n\t\t\t\tUserCredentialType,\n\t\t\t\tUserCredentialCapability\n\t\t\t>();\n\t\t\tcredentialTypes.set(this.#ucCredentialType, {\n\t\t\t\t// For User Code CC, credential slots and users are identical\n\t\t\t\tnumberOfCredentialSlots: maxUsers,\n\t\t\t\tminCredentialLength: 4,\n\t\t\t\tmaxCredentialLength: 10,\n\t\t\t\tmaxCredentialHashLength: 0,\n\t\t\t\tsupportsCredentialLearn: false,\n\t\t\t});\n\n\t\t\treturn {\n\t\t\t\tsupportedCredentialTypes: credentialTypes,\n\t\t\t\tsupportsAdminCode: this.getValue<boolean>(\n\t\t\t\t\tUserCodeCCValues.supportsAdminCode.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? false,\n\t\t\t\tsupportsAdminCodeDeactivation: this.getValue<boolean>(\n\t\t\t\t\tUserCodeCCValues.supportsAdminCodeDeactivation.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t) ?? false,\n\t\t\t\t// User Code CC has no equivalent to credential reassignment\n\t\t\t\tsupportsCredentialAssignment: false,\n\t\t\t};\n\t\t}\n\t}\n\n\t/**\n\t * Returns the data for the user with the given ID.\n\t * This communicates with the node to retrieve fresh information.\n\t */\n\tpublic async getUser(userId: number): Promise<UserData | undefined> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst result = await api.getUser(userId);\n\t\t\tif (result) await this.endpoint.tryGetNode()?.handleCommand(result);\n\t\t\tif (!result?.userId) return undefined;\n\t\t\treturn {\n\t\t\t\tuserId: result.userId,\n\t\t\t\tactive: result.active ?? false,\n\t\t\t\tuserType: result.userType ?? UserCredentialUserType.General,\n\t\t\t\tuserName: result.userName ?? undefined,\n\t\t\t\tcredentialRule: result.credentialRule ?? undefined,\n\t\t\t\texpiringTimeoutMinutes: result.expiringTimeoutMinutes\n\t\t\t\t\t|| undefined,\n\t\t\t};\n\t\t} else {\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst result = await api.get(userId);\n\t\t\tif (!result) return undefined;\n\t\t\treturn this.#mapUserCodeStatusToUserData(\n\t\t\t\tuserId,\n\t\t\t\tresult.userIdStatus,\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the data for the user with the given ID.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getUserCached(userId: number): UserData | undefined {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\treturn this.#getUserCached_U3C(userId);\n\t\t} else {\n\t\t\treturn this.#getUserCached_UC(userId);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the data for all configured users.\n\t * This communicates with the node to retrieve fresh information.\n\t */\n\tpublic async getUsers(): Promise<UserData[]> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst users: UserData[] = [];\n\t\t\t// Requesting userId 0 gives us the first user\n\t\t\tlet nextUserId = 0;\n\t\t\tdo {\n\t\t\t\tconst result = await api.getUser(nextUserId);\n\t\t\t\tif (result) {\n\t\t\t\t\tawait this.endpoint.tryGetNode()?.handleCommand(result);\n\t\t\t\t}\n\t\t\t\tif (!result?.userId) break;\n\t\t\t\tusers.push({\n\t\t\t\t\tuserId: result.userId,\n\t\t\t\t\tactive: result.active ?? false,\n\t\t\t\t\tuserType: result.userType\n\t\t\t\t\t\t?? UserCredentialUserType.General,\n\t\t\t\t\tuserName: result.userName ?? undefined,\n\t\t\t\t\tcredentialRule: result.credentialRule ?? undefined,\n\t\t\t\t\texpiringTimeoutMinutes: result.expiringTimeoutMinutes\n\t\t\t\t\t\t|| undefined,\n\t\t\t\t});\n\t\t\t\tnextUserId = result.nextUserId ?? 0;\n\t\t\t} while (nextUserId > 0);\n\t\t\treturn users;\n\t\t} else {\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst maxUsers = await api.getUsersCount();\n\t\t\tif (!maxUsers) return [];\n\n\t\t\tconst users: UserData[] = [];\n\t\t\tconst supportsBulk = !!this.getValue<boolean>(\n\t\t\t\tUserCodeCCValues.supportsMultipleUserCodeReport.endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t);\n\n\t\t\tif (supportsBulk) {\n\t\t\t\tlet nextUserId = 1;\n\t\t\t\twhile (nextUserId > 0 && nextUserId <= maxUsers) {\n\t\t\t\t\tconst response = await api.get(nextUserId, true);\n\t\t\t\t\tif (!response) break;\n\t\t\t\t\tusers.push(\n\t\t\t\t\t\t...response.userCodes\n\t\t\t\t\t\t\t.map((entry) =>\n\t\t\t\t\t\t\t\tthis.#mapUserCodeStatusToUserData(\n\t\t\t\t\t\t\t\t\tentry.userId,\n\t\t\t\t\t\t\t\t\tentry.userIdStatus,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.filter((u) => u != undefined),\n\t\t\t\t\t);\n\t\t\t\t\tnextUserId = response.nextUserId;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (let userId = 1; userId <= maxUsers; userId++) {\n\t\t\t\t\tconst result = await api.get(userId);\n\t\t\t\t\tif (!result) continue;\n\t\t\t\t\tconst user = this.#mapUserCodeStatusToUserData(\n\t\t\t\t\t\tuserId,\n\t\t\t\t\t\tresult.userIdStatus,\n\t\t\t\t\t);\n\t\t\t\t\tif (user) users.push(user);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn users;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the data for all configured users.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getUsersCached(): UserData[] {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst maxUsers = this.getValue<number>(\n\t\t\t\tUserCredentialCCValues.supportedUsers.endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) ?? 0;\n\t\t\tconst users: UserData[] = [];\n\t\t\tfor (let userId = 1; userId <= maxUsers; userId++) {\n\t\t\t\tconst user = this.#getUserCached_U3C(userId);\n\t\t\t\tif (user) users.push(user);\n\t\t\t}\n\t\t\treturn users;\n\t\t} else {\n\t\t\tconst maxUsers = this.getValue<number>(\n\t\t\t\tUserCodeCCValues.supportedUsers.endpoint(this.endpoint.index),\n\t\t\t) ?? 0;\n\t\t\tconst users: UserData[] = [];\n\t\t\tfor (let userId = 1; userId <= maxUsers; userId++) {\n\t\t\t\tconst user = this.#getUserCached_UC(userId);\n\t\t\t\tif (user) users.push(user);\n\t\t\t}\n\t\t\treturn users;\n\t\t}\n\t}\n\n\t/**\n\t * Creates or updates the user with the given ID.\n\t * This communicates with the node.\n\t */\n\tpublic async setUser(\n\t\tuserId: number,\n\t\toptions: SetUserOptions,\n\t): Promise<SetUserResult> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst existing = this.#getUserCached_U3C(userId);\n\t\t\tconst operationType = existing\n\t\t\t\t? UserCredentialOperationType.Modify\n\t\t\t\t: UserCredentialOperationType.Add;\n\n\t\t\tconst userType = options.userType\n\t\t\t\t?? existing?.userType\n\t\t\t\t?? UserCredentialUserType.General;\n\n\t\t\tlet result: UserCredentialCCUserReport | undefined;\n\t\t\tif (userType === UserCredentialUserType.Expiring) {\n\t\t\t\tresult = await api.setUser({\n\t\t\t\t\toperationType,\n\t\t\t\t\tuserId,\n\t\t\t\t\tactive: options.active ?? existing?.active ?? true,\n\t\t\t\t\tuserType,\n\t\t\t\t\texpiringTimeoutMinutes: options.expiringTimeoutMinutes\n\t\t\t\t\t\t?? existing?.expiringTimeoutMinutes\n\t\t\t\t\t\t?? 0,\n\t\t\t\t\tcredentialRule: options.credentialRule\n\t\t\t\t\t\t?? existing?.credentialRule,\n\t\t\t\t\tuserName: options.userName ?? existing?.userName,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tresult = await api.setUser({\n\t\t\t\t\toperationType,\n\t\t\t\t\tuserId,\n\t\t\t\t\tactive: options.active ?? existing?.active ?? true,\n\t\t\t\t\tuserType,\n\t\t\t\t\tcredentialRule: options.credentialRule\n\t\t\t\t\t\t?? existing?.credentialRule,\n\t\t\t\t\tuserName: options.userName ?? existing?.userName,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (result) await this.endpoint.tryGetNode()?.handleCommand(result);\n\t\t\treturn u3cUserReportTypeToSetUserResult(result?.reportType);\n\t\t} else {\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst existing = this.#getUserCached_UC(userId);\n\t\t\tconst existingStatus = this.getValue<UserIDStatus>(\n\t\t\t\tUserCodeCCValues.userIdStatus(userId).endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t);\n\n\t\t\tconst active = options.active ?? existing?.active ?? true;\n\t\t\tconst userType = options.userType\n\t\t\t\t?? existing?.userType\n\t\t\t\t?? UserCredentialUserType.General;\n\n\t\t\t// Reverse the unified active/userType model back to UserIDStatus\n\t\t\tlet status: UserIDStatus;\n\t\t\tif (!active) {\n\t\t\t\tstatus = UserIDStatus.Disabled;\n\t\t\t} else if (userType === UserCredentialUserType.NonAccess) {\n\t\t\t\tstatus = UserIDStatus.Messaging;\n\t\t\t} else {\n\t\t\t\tstatus = UserIDStatus.Enabled;\n\t\t\t}\n\n\t\t\t// User Code CC requires sending the code along with every status\n\t\t\t// change, so we re-send the existing code to preserve it\n\t\t\tconst existingCode = this.getValue<string>(\n\t\t\t\tUserCodeCCValues.userCode(userId).endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t);\n\t\t\tif (!existingCode) {\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\"User Code CC requires a credential to be set before modifying the user. Use setCredential() first.\",\n\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst result = await api.set(\n\t\t\t\tuserId,\n\t\t\t\tstatus,\n\t\t\t\texistingCode,\n\t\t\t);\n\t\t\tlet succeeded: boolean;\n\t\t\tif (result == undefined) {\n\t\t\t\t// Unsupervised - verify the change\n\t\t\t\tconst verified = await api.get(userId);\n\t\t\t\tconst verifiedStatus = verified?.userIdStatus;\n\t\t\t\tsucceeded = verifiedStatus != undefined\n\t\t\t\t\t&& verifiedStatus !== existingStatus\n\t\t\t\t\t&& verifiedStatus !== UserIDStatus.Available;\n\t\t\t} else {\n\t\t\t\tsucceeded = supervisedCommandSucceeded(result);\n\t\t\t}\n\t\t\tif (succeeded) {\n\t\t\t\tconst node = this.endpoint.tryGetNode();\n\t\t\t\tif (node) {\n\t\t\t\t\tconst userData: UserData = { userId, active, userType };\n\t\t\t\t\tnode.emit(\n\t\t\t\t\t\texisting ? \"user modified\" : \"user added\",\n\t\t\t\t\t\tthis.endpoint as any,\n\t\t\t\t\t\tuserData,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn succeeded ? SetUserResult.OK : SetUserResult.Error_Unknown;\n\t\t}\n\t}\n\n\t/**\n\t * Deletes the user with the given ID and all of their credentials.\n\t * This communicates with the node.\n\t */\n\tpublic async deleteUser(\n\t\tuserId: number,\n\t): Promise<SetUserResult> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst raw = await api.setUser({\n\t\t\t\toperationType: UserCredentialOperationType.Delete,\n\t\t\t\tuserId,\n\t\t\t});\n\t\t\tif (raw) await this.endpoint.tryGetNode()?.handleCommand(raw);\n\t\t\tconst status = u3cUserReportTypeToSetUserResult(raw?.reportType);\n\t\t\tif (status === SetUserResult.OK) {\n\t\t\t\tthis.#purgeCachedCredentials(userId);\n\t\t\t}\n\t\t\treturn status;\n\t\t} else {\n\t\t\t// User Code CC ties each user to their code, so clearing\n\t\t\t// the code implicitly deletes the user and vice versa.\n\t\t\t// The cache entry only gates event emission - the node may have\n\t\t\t// a user we never observed, so a missing entry must not gate the\n\t\t\t// success of the API call itself.\n\t\t\tconst existed = this.#getUserCached_UC(userId) != undefined;\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst result = await api.clear(userId);\n\t\t\tlet succeeded: boolean;\n\t\t\tif (result == undefined) {\n\t\t\t\t// Unsupervised - verify the change\n\t\t\t\tconst verified = await api.get(userId);\n\t\t\t\tsucceeded = verified?.userIdStatus === UserIDStatus.Available;\n\t\t\t} else {\n\t\t\t\tsucceeded = supervisedCommandSucceeded(result);\n\t\t\t}\n\t\t\tif (succeeded) {\n\t\t\t\tthis.#purgeCachedUserCodes(userId);\n\t\t\t}\n\t\t\tif (succeeded && existed) {\n\t\t\t\tconst node = this.endpoint.tryGetNode();\n\t\t\t\tif (node) {\n\t\t\t\t\tnode.emit(\"user deleted\", this.endpoint as any, { userId });\n\t\t\t\t\tnode.emit(\"credential deleted\", this.endpoint as any, {\n\t\t\t\t\t\tuserId,\n\t\t\t\t\t\tcredentialType: this.#ucCredentialType,\n\t\t\t\t\t\t// For User Code CC, credential slots and users are identical\n\t\t\t\t\t\tcredentialSlot: userId,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn succeeded ? SetUserResult.OK : SetUserResult.Error_Unknown;\n\t\t}\n\t}\n\n\t/**\n\t * Deletes all users and their credentials.\n\t * This communicates with the node.\n\t */\n\tpublic async deleteAllUsers(): Promise<SetUserResult> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst raw = await api.setUser({\n\t\t\t\toperationType: UserCredentialOperationType.Delete,\n\t\t\t\tuserId: 0,\n\t\t\t});\n\t\t\tif (raw) await this.endpoint.tryGetNode()?.handleCommand(raw);\n\t\t\tconst status = u3cUserReportTypeToSetUserResult(raw?.reportType);\n\t\t\tif (status === SetUserResult.OK) {\n\t\t\t\tthis.#purgeAllCachedUsersAndCredentials();\n\t\t\t}\n\t\t\treturn status;\n\t\t} else {\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst result = await api.clear(0);\n\t\t\t// Verifying all users being deleted is unrealistic\n\t\t\t// since there can be up to 65535 users. So we just\n\t\t\t// assume it worked when the command was not supervised.\n\t\t\tconst succeeded = result == undefined\n\t\t\t\t|| supervisedCommandSucceeded(result);\n\t\t\tif (succeeded) {\n\t\t\t\tthis.#purgeCachedUserCodes();\n\t\t\t}\n\t\t\treturn succeeded ? SetUserResult.OK : SetUserResult.Error_Unknown;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the data for a specific credential type and slot.\n\t * This communicates with the node to retrieve fresh information.\n\t */\n\tpublic async getCredential(\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): Promise<CredentialData | undefined> {\n\t\tthis.#assertValidSlot(type, slot);\n\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst result = await this.#u3cAPI().getCredential(0, type, slot);\n\t\t\tif (result) await this.endpoint.tryGetNode()?.handleCommand(result);\n\t\t\treturn this.#mapCredentialData(result);\n\t\t} else {\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst result = await api.get(slot);\n\t\t\tif (!result) return undefined;\n\t\t\tif (\n\t\t\t\tresult.userIdStatus === UserIDStatus.Available\n\t\t\t\t|| result.userIdStatus === UserIDStatus.StatusNotAvailable\n\t\t\t) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\t// For User Code CC, credential slots and users are identical\n\t\t\treturn { userId: slot, type, slot, data: result.userCode };\n\t\t}\n\t}\n\n\t/**\n\t * Returns the data for a specific credential type and slot.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getCredentialCached(\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): CredentialData | undefined {\n\t\tthis.#assertValidSlot(type, slot);\n\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\treturn this.#getCredentialCached_U3C(type, slot);\n\t\t} else {\n\t\t\treturn this.#getCredentialCached_UC(type, slot);\n\t\t}\n\t}\n\n\t/**\n\t * Returns all credentials for the given user and optional type.\n\t * This communicates with the node to retrieve fresh information.\n\t */\n\tpublic async getCredentialsForUser(\n\t\tuserId: number,\n\t\ttype?: UserCredentialType,\n\t): Promise<CredentialData[]> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tif (type != undefined && !this.#supportsCredentialType(type)) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\treturn this.#queryCredentials_U3C(\n\t\t\t\tuserId,\n\t\t\t\ttype ?? UserCredentialType.None,\n\t\t\t\t0,\n\t\t\t\ttype,\n\t\t\t);\n\t\t} else {\n\t\t\tif (type != undefined && type !== this.#ucCredentialType) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tconst cred = await this.getCredential(\n\t\t\t\tthis.#ucCredentialType,\n\t\t\t\t// For User Code CC, credential slots and users are identical\n\t\t\t\tuserId,\n\t\t\t);\n\t\t\t// ...and there is at most one credential per user.\n\t\t\treturn cred ? [cred] : [];\n\t\t}\n\t}\n\n\t/**\n\t * Returns all credentials for the given user and optional type.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getCredentialsForUserCached(\n\t\tuserId: number,\n\t\ttype?: UserCredentialType,\n\t): CredentialData[] {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tif (type != undefined && !this.#supportsCredentialType(type)) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\treturn this.#getAllCredentialsCached_U3C().filter(\n\t\t\t\t(credential) =>\n\t\t\t\t\tcredential.userId === userId\n\t\t\t\t\t&& (type == undefined || credential.type === type),\n\t\t\t);\n\t\t} else {\n\t\t\tif (type != undefined && type !== this.#ucCredentialType) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tconst cred = this.#getCredentialCached_UC(\n\t\t\t\tthis.#ucCredentialType,\n\t\t\t\t// For User Code CC, credential slots and users are identical\n\t\t\t\tuserId,\n\t\t\t);\n\t\t\t// ...and there is at most one credential per user.\n\t\t\treturn cred ? [cred] : [];\n\t\t}\n\t}\n\n\t/**\n\t * Returns all credentials of the given type, regardless of ownership.\n\t * This communicates with the node to retrieve fresh information.\n\t */\n\tpublic async getCredentialsByType(\n\t\ttype: UserCredentialType,\n\t): Promise<CredentialData[]> {\n\t\tif (!this.#supportsCredentialType(type)) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\treturn this.#queryCredentials_U3C(0, type, 0, type);\n\t\t} else {\n\t\t\treturn this.#getAllCredentials_UC();\n\t\t}\n\t}\n\n\t/**\n\t * Returns all credentials of the given type, regardless of ownership.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getCredentialsByTypeCached(\n\t\ttype: UserCredentialType,\n\t): CredentialData[] {\n\t\tif (!this.#supportsCredentialType(type)) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\treturn this.#getAllCredentialsCached_U3C().filter(\n\t\t\t\t(credential) => credential.type === type,\n\t\t\t);\n\t\t} else {\n\t\t\treturn this.#getAllCredentialsCached_UC();\n\t\t}\n\t}\n\n\t/**\n\t * Returns all credentials, regardless of ownership or type.\n\t * This communicates with the node to retrieve fresh information.\n\t */\n\tpublic async getAllCredentials(): Promise<CredentialData[]> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\treturn this.#queryCredentials_U3C(\n\t\t\t\t0,\n\t\t\t\tUserCredentialType.None,\n\t\t\t\t0,\n\t\t\t);\n\t\t} else {\n\t\t\treturn this.#getAllCredentials_UC();\n\t\t}\n\t}\n\n\t/**\n\t * Returns all credentials, regardless of ownership or type.\n\t * This method uses cached information from the most recent interview.\n\t */\n\tpublic getAllCredentialsCached(): CredentialData[] {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\treturn this.#getAllCredentialsCached_U3C();\n\t\t} else {\n\t\t\treturn this.#getAllCredentialsCached_UC();\n\t\t}\n\t}\n\n\t/**\n\t * Creates or updates a credential for the given user.\n\t * This communicates with the node.\n\t */\n\tpublic async setCredential(\n\t\tuserId: number,\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t\tdata: string | Uint8Array,\n\t): Promise<SetCredentialResult> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tthis.#assertValidSlot(type, slot);\n\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst existing = this.#getCredentialCachedForUser_U3C(\n\t\t\t\tuserId,\n\t\t\t\ttype,\n\t\t\t\tslot,\n\t\t\t);\n\t\t\tconst credentialData = typeof data === \"string\"\n\t\t\t\t? Bytes.from(data, \"utf-8\")\n\t\t\t\t: Bytes.from(data);\n\t\t\tconst raw = await api.setCredential({\n\t\t\t\toperationType: existing\n\t\t\t\t\t? UserCredentialOperationType.Modify\n\t\t\t\t\t: UserCredentialOperationType.Add,\n\t\t\t\tuserId,\n\t\t\t\tcredentialType: type,\n\t\t\t\tcredentialSlot: slot,\n\t\t\t\tcredentialData,\n\t\t\t});\n\t\t\tif (raw) await this.endpoint.tryGetNode()?.handleCommand(raw);\n\t\t\treturn u3cCredentialReportTypeToSetCredentialResult(\n\t\t\t\traw?.reportType,\n\t\t\t);\n\t\t} else {\n\t\t\t// User Code CC stores exactly one credential per user slot. Ignore the\n\t\t\t// caller-provided unified slot and write back to the owning user's slot\n\t\t\t// so events and cached state stay internally consistent.\n\t\t\tthis.#assertValidSlot(type, userId);\n\t\t\tconst api = this.#ucAPI();\n\n\t\t\t// Determine the current status; default to Enabled for new users\n\t\t\tconst existingStatus = this.getValue<UserIDStatus>(\n\t\t\t\tUserCodeCCValues.userIdStatus(userId).endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t);\n\t\t\tconst status = (\n\t\t\t\t\texistingStatus == undefined\n\t\t\t\t\t|| existingStatus === UserIDStatus.Available\n\t\t\t\t)\n\t\t\t\t? UserIDStatus.Enabled\n\t\t\t\t: existingStatus;\n\n\t\t\tconst existingCred = this.#getCredentialCached_UC(\n\t\t\t\ttype,\n\t\t\t\tuserId,\n\t\t\t);\n\n\t\t\tconst codeData = typeof data === \"string\"\n\t\t\t\t? data\n\t\t\t\t: Bytes.from(data);\n\t\t\tconst result = await api.set(\n\t\t\t\tuserId,\n\t\t\t\tstatus as number,\n\t\t\t\tcodeData,\n\t\t\t);\n\t\t\tlet succeeded: boolean;\n\t\t\tif (result == undefined) {\n\t\t\t\tconst verified = await api.get(userId);\n\t\t\t\tsucceeded = verified?.userCode === codeData;\n\t\t\t} else {\n\t\t\t\tsucceeded = supervisedCommandSucceeded(result);\n\t\t\t}\n\t\t\tif (succeeded) {\n\t\t\t\tconst node = this.endpoint.tryGetNode();\n\t\t\t\tif (node) {\n\t\t\t\t\tnode.emit(\n\t\t\t\t\t\texistingCred\n\t\t\t\t\t\t\t? \"credential modified\"\n\t\t\t\t\t\t\t: \"credential added\",\n\t\t\t\t\t\tthis.endpoint as any,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tuserId,\n\t\t\t\t\t\t\tcredentialType: type,\n\t\t\t\t\t\t\tcredentialSlot: userId,\n\t\t\t\t\t\t\tdata,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn succeeded\n\t\t\t\t? SetCredentialResult.OK\n\t\t\t\t: SetCredentialResult.Error_Unknown;\n\t\t}\n\t}\n\n\t/**\n\t * Deletes the given credential.\n\t * This communicates with the node.\n\t */\n\tpublic async deleteCredential(\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): Promise<SetCredentialResult>;\n\tpublic async deleteCredential(\n\t\tuserId: number | undefined,\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): Promise<SetCredentialResult>;\n\n\tpublic async deleteCredential(\n\t\tuserIdOrType: number | undefined,\n\t\ttypeOrSlot: UserCredentialType | number,\n\t\tslot?: number,\n\t): Promise<SetCredentialResult> {\n\t\t// 2-arg overload: (type, slot) \u2014 normalize to the 3-arg form\n\t\tif (slot == undefined) {\n\t\t\treturn this.deleteCredential(\n\t\t\t\t0,\n\t\t\t\tuserIdOrType as UserCredentialType,\n\t\t\t\ttypeOrSlot,\n\t\t\t);\n\t\t}\n\t\tconst userId = userIdOrType ?? 0;\n\t\tconst type = typeOrSlot as UserCredentialType;\n\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tthis.#assertValidSlot(type, slot);\n\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst raw = await api.setCredential({\n\t\t\t\toperationType: UserCredentialOperationType.Delete,\n\t\t\t\tuserId,\n\t\t\t\tcredentialType: type,\n\t\t\t\tcredentialSlot: slot,\n\t\t\t});\n\t\t\tif (raw) await this.endpoint.tryGetNode()?.handleCommand(raw);\n\t\t\treturn u3cCredentialReportTypeToSetCredentialResult(\n\t\t\t\traw?.reportType,\n\t\t\t);\n\t\t} else {\n\t\t\t// User Code CC stores exactly one credential per user slot, with the\n\t\t\t// user identifier being the slot number. When the caller omits the\n\t\t\t// user (2-arg form), fall back to the slot. When both are given but\n\t\t\t// disagree, no credential can exist at that (user, slot) pair.\n\t\t\tif (userId !== 0 && userId !== slot) {\n\t\t\t\treturn SetCredentialResult.Error_ModifyRejectedLocationEmpty;\n\t\t\t}\n\n\t\t\t// Make sure the addressed slot is valid\n\t\t\tconst targetUserId = userId === 0 ? slot : userId;\n\t\t\tthis.#assertValidSlot(type, targetUserId);\n\n\t\t\t// Only emit deleted events if we knew about the credential beforehand.\n\t\t\tconst existed = this.#getCredentialCached_UC(\n\t\t\t\ttype,\n\t\t\t\ttargetUserId,\n\t\t\t) != undefined;\n\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst result = await api.clear(targetUserId);\n\t\t\tlet succeeded: boolean;\n\t\t\tif (result == undefined) {\n\t\t\t\tconst verified = await api.get(targetUserId);\n\t\t\t\tsucceeded = verified?.userIdStatus === UserIDStatus.Available;\n\t\t\t} else {\n\t\t\t\tsucceeded = supervisedCommandSucceeded(result);\n\t\t\t}\n\t\t\tif (succeeded) {\n\t\t\t\tthis.#purgeCachedUserCodes(targetUserId);\n\t\t\t}\n\t\t\tif (succeeded && existed) {\n\t\t\t\tconst node = this.endpoint.tryGetNode();\n\t\t\t\tif (node) {\n\t\t\t\t\tnode.emit(\"credential deleted\", this.endpoint as any, {\n\t\t\t\t\t\tuserId: targetUserId,\n\t\t\t\t\t\tcredentialType: type,\n\t\t\t\t\t\tcredentialSlot: targetUserId,\n\t\t\t\t\t});\n\t\t\t\t\tnode.emit(\"user deleted\", this.endpoint as any, {\n\t\t\t\t\t\tuserId: targetUserId,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn succeeded\n\t\t\t\t? SetCredentialResult.OK\n\t\t\t\t: SetCredentialResult.Error_Unknown;\n\t\t}\n\t}\n\n\t/**\n\t * Deletes credentials matching the given filters.\n\t */\n\tpublic async deleteCredentials(\n\t\toptions: DeleteCredentialsOptions = {},\n\t): Promise<SetCredentialResult> {\n\t\tconst userId = options.userId ?? 0;\n\t\tconst credentialType = options.credentialType\n\t\t\t?? UserCredentialType.None;\n\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\tconst raw = await api.setCredential({\n\t\t\t\toperationType: UserCredentialOperationType.Delete,\n\t\t\t\tuserId,\n\t\t\t\tcredentialType,\n\t\t\t\tcredentialSlot: 0,\n\t\t\t});\n\t\t\tif (raw) await this.endpoint.tryGetNode()?.handleCommand(raw);\n\t\t\treturn u3cCredentialReportTypeToSetCredentialResult(\n\t\t\t\traw?.reportType,\n\t\t\t);\n\t\t} else {\n\t\t\t// User Code CC\n\t\t\tif (\n\t\t\t\tcredentialType !== UserCredentialType.None\n\t\t\t\t&& credentialType !== this.#ucCredentialType\n\t\t\t) {\n\t\t\t\t// Returning OK here would falsely imply the User Code CC user\n\t\t\t\t// was deleted (cascade), which only happens when the type\n\t\t\t\t// matches. Reject loudly so callers do not act on a fictional\n\t\t\t\t// success.\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t`Credential type ${\n\t\t\t\t\t\tgetEnumMemberName(UserCredentialType, credentialType)\n\t\t\t\t\t} is not supported by this node`,\n\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Only emit deleted events if we knew about the credential beforehand.\n\t\t\t// The wildcard branch (userId === 0) always emits, since verifying\n\t\t\t// the prior state across all users is unrealistic.\n\t\t\tconst existed = userId !== 0\n\t\t\t\t? this.#getUserCached_UC(userId) != undefined\n\t\t\t\t: true;\n\n\t\t\tconst api = this.#ucAPI();\n\t\t\tconst result = await api.clear(userId);\n\t\t\tlet succeeded: boolean;\n\t\t\tif (userId !== 0 && result == undefined) {\n\t\t\t\tconst verified = await api.get(userId);\n\t\t\t\tsucceeded = verified?.userIdStatus === UserIDStatus.Available;\n\t\t\t} else {\n\t\t\t\t// Verifying all users being deleted is unrealistic\n\t\t\t\t// since there can be up to 65535 users. So we just\n\t\t\t\t// assume it worked when the command was not supervised.\n\t\t\t\tsucceeded = result == undefined\n\t\t\t\t\t|| supervisedCommandSucceeded(result);\n\t\t\t}\n\t\t\tif (succeeded) {\n\t\t\t\tthis.#purgeCachedUserCodes(userId);\n\t\t\t}\n\t\t\tif (succeeded && existed) {\n\t\t\t\tconst node = this.endpoint.tryGetNode();\n\t\t\t\tif (node) {\n\t\t\t\t\tnode.emit(\"credential deleted\", this.endpoint as any, {\n\t\t\t\t\t\tuserId,\n\t\t\t\t\t\tcredentialType: this.#ucCredentialType,\n\t\t\t\t\t\tcredentialSlot: userId,\n\t\t\t\t\t});\n\t\t\t\t\tnode.emit(\"user deleted\", this.endpoint as any, { userId });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn succeeded\n\t\t\t\t? SetCredentialResult.OK\n\t\t\t\t: SetCredentialResult.Error_Unknown;\n\t\t}\n\t}\n\n\t/**\n\t * Assigns an existing credential to a different user, without re-enrolling\n\t * it. Useful for credentials that were added locally on the device (e.g. a\n\t * biometric auto-assigned to a fresh user) that need to be attached to an\n\t * existing user which already has other credentials.\n\t *\n\t * Only supported on nodes using the User Credential CC. Use\n\t * {@link getCredentialCapabilitiesCached} to check for support via the\n\t * `supportsCredentialAssignment` property.\n\t *\n\t * This communicates with the node.\n\t */\n\tpublic async assignCredential(\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t\tdestinationUserId: number,\n\t): Promise<AssignCredentialResult> {\n\t\tif (!this.#usesUserCredentialCC) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"This node does not support assigning a credential to a different user\",\n\t\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t\t);\n\t\t}\n\n\t\tthis.#assertValidSlot(type, slot);\n\n\t\tconst api = this.#u3cAPI();\n\t\tconst response = await api.setUserCredentialAssociation({\n\t\t\tcredentialType: type,\n\t\t\tcredentialSlot: slot,\n\t\t\tdestinationUserId,\n\t\t});\n\t\tif (response) {\n\t\t\tawait this.endpoint.tryGetNode()?.handleCommand(response);\n\t\t}\n\t\treturn u3cAssociationStatusToAssignCredentialResult(response?.status);\n\t}\n\n\t/**\n\t * Starts a learn process for the given credential slot, allowing a user\n\t * to input a credential directly on the device.\n\t * Only supported on nodes using the User Credential CC.\n\t * This communicates with the node.\n\t */\n\tpublic async startCredentialLearn(\n\t\tuserId: number,\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t\ttimeout?: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tif (!this.#usesUserCredentialCC) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"This node does not support learning credentials\",\n\t\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t\t);\n\t\t}\n\n\t\tthis.#assertValidSlot(type, slot);\n\n\t\tconst existing = this.#getCredentialCachedForUser_U3C(\n\t\t\tuserId,\n\t\t\ttype,\n\t\t\tslot,\n\t\t);\n\t\tconst operationType = existing\n\t\t\t? UserCredentialOperationType.Modify\n\t\t\t: UserCredentialOperationType.Add;\n\n\t\ttimeout ??= this.getCredentialCapabilitiesCached()\n\t\t\t.supportedCredentialTypes\n\t\t\t.get(type)?.credentialLearnRecommendedTimeout;\n\n\t\tif (timeout == undefined) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`Credential learning is not supported for credential type ${\n\t\t\t\t\tgetEnumMemberName(UserCredentialType, type)\n\t\t\t\t}`,\n\t\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t\t);\n\t\t}\n\n\t\tconst api = this.#u3cAPI();\n\t\treturn api.startCredentialLearn({\n\t\t\tuserId,\n\t\t\tcredentialType: type,\n\t\t\tcredentialSlot: slot,\n\t\t\toperationType,\n\t\t\tlearnTimeout: timeout,\n\t\t});\n\t}\n\n\t/**\n\t * Cancels an ongoing credential learn process.\n\t * Only supported on nodes using the User Credential CC.\n\t * This communicates with the node.\n\t */\n\tpublic async cancelCredentialLearn(): Promise<\n\t\tSupervisionResult | undefined\n\t> {\n\t\tif (!this.#usesUserCredentialCC) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"This node does not support learning credentials\",\n\t\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t\t);\n\t\t}\n\t\tconst api = this.#u3cAPI();\n\t\treturn api.cancelCredentialLearn();\n\t}\n\n\t/**\n\t * Retrieves the admin code from the node.\n\t * This communicates with the node to retrieve fresh information.\n\t */\n\tpublic async getAdminCode(): Promise<string | undefined> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\treturn api.getAdminPinCode();\n\t\t} else {\n\t\t\tconst api = this.#ucAPI();\n\t\t\treturn api.getAdminCode();\n\t\t}\n\t}\n\n\t/**\n\t * Sets the admin code on the node.\n\t * This communicates with the node.\n\t */\n\tpublic async setAdminCode(\n\t\tcode: string,\n\t): Promise<SupervisionResult | undefined> {\n\t\tif (this.#usesUserCredentialCC) {\n\t\t\tconst api = this.#u3cAPI();\n\t\t\treturn api.setAdminPinCode({ pinCode: code });\n\t\t} else {\n\t\t\tconst api = this.#ucAPI();\n\t\t\treturn api.setAdminCode(code);\n\t\t}\n\t}\n\n\t#ucAPI(): UserCodeCCAPI {\n\t\treturn this.endpoint\n\t\t\t.commandClasses[\"User Code\"] as unknown as UserCodeCCAPI;\n\t}\n\n\t#u3cAPI(): UserCredentialCCAPI {\n\t\treturn this.endpoint.commandClasses[\n\t\t\t\"User Credential\"\n\t\t] as unknown as UserCredentialCCAPI;\n\t}\n\n\t#supportsCredentialType(type: UserCredentialType): boolean {\n\t\treturn this.getCredentialCapabilitiesCached()\n\t\t\t.supportedCredentialTypes\n\t\t\t.has(type);\n\t}\n\n\t/** Returns the credential type to use for User Code CC based on supported characters */\n\tget #ucCredentialType(): UserCredentialType {\n\t\tconst supportedASCIIChars = this.getValue<string>(\n\t\t\tUserCodeCCValues.supportedASCIIChars.endpoint(this.endpoint.index),\n\t\t);\n\t\treturn supportsNonPINChars(supportedASCIIChars)\n\t\t\t? UserCredentialType.Password\n\t\t\t: UserCredentialType.PINCode;\n\t}\n\n\t/** Maps User Code CC's UserIDStatus to the unified active/userType model */\n\t#mapUserCodeStatusToUserData(\n\t\tuserId: number,\n\t\tstatus: UserIDStatus,\n\t): UserData | undefined {\n\t\t// These statuses indicate no user is configured for this slot\n\t\tif (\n\t\t\tstatus === UserIDStatus.Available\n\t\t\t|| status === UserIDStatus.StatusNotAvailable\n\t\t\t|| status === UserIDStatus.PassageMode\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tlet active: boolean;\n\t\tlet userType: UserCredentialUserType;\n\t\tswitch (status) {\n\t\t\tcase UserIDStatus.Enabled:\n\t\t\t\tactive = true;\n\t\t\t\tuserType = UserCredentialUserType.General;\n\t\t\t\tbreak;\n\t\t\tcase UserIDStatus.Disabled:\n\t\t\t\tactive = false;\n\t\t\t\tuserType = UserCredentialUserType.General;\n\t\t\t\tbreak;\n\t\t\t// Messaging is the closest User Code CC equivalent to NonAccess\n\t\t\tcase UserIDStatus.Messaging:\n\t\t\t\tactive = true;\n\t\t\t\tuserType = UserCredentialUserType.NonAccess;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tactive = true;\n\t\t\t\tuserType = UserCredentialUserType.General;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn { userId, active, userType };\n\t}\n\n\t/** Removes cached credential values for a given user from the value DB */\n\t#purgeCachedCredentials(userId: number): void {\n\t\tconst valueDB = this.endpoint.tryGetNode()?.valueDB;\n\t\tif (!valueDB) return;\n\t\tconst credentialOwners = valueDB.findValues(\n\t\t\t(vid) =>\n\t\t\t\tUserCredentialCCValues.credentialOwner.is(vid)\n\t\t\t\t&& vid.endpoint === this.endpoint.index,\n\t\t);\n\t\tfor (const { endpoint, propertyKey, value } of credentialOwners) {\n\t\t\tif (value !== userId) continue;\n\n\t\t\tconst key = propertyKey as number;\n\t\t\tconst type = key >>> 16;\n\t\t\tconst slot = key & 0xffff;\n\n\t\t\tfor (\n\t\t\t\tconst valueId of [\n\t\t\t\t\tUserCredentialCCValues.credential(type, slot),\n\t\t\t\t\tUserCredentialCCValues.credentialOwner(type, slot),\n\t\t\t\t\tUserCredentialCCValues.credentialModifierType(type, slot),\n\t\t\t\t\tUserCredentialCCValues.credentialModifierNodeId(type, slot),\n\t\t\t\t]\n\t\t\t) {\n\t\t\t\tvalueDB.removeValue(valueId.endpoint(endpoint));\n\t\t\t}\n\t\t}\n\t}\n\n\t/** Removes all cached user and credential values from the value DB */\n\t#purgeAllCachedUsersAndCredentials(): void {\n\t\tconst valueDB = this.endpoint.tryGetNode()?.valueDB;\n\t\tif (!valueDB) return;\n\n\t\tconst maxUsers = this.getValue<number>(\n\t\t\tUserCredentialCCValues.supportedUsers.endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t),\n\t\t) ?? 0;\n\t\tfor (let userId = 1; userId <= maxUsers; userId++) {\n\t\t\tfor (\n\t\t\t\tconst value of [\n\t\t\t\t\tUserCredentialCCValues.userType(userId),\n\t\t\t\t\tUserCredentialCCValues.userActive(userId),\n\t\t\t\t\tUserCredentialCCValues.credentialRule(userId),\n\t\t\t\t\tUserCredentialCCValues.expiringTimeoutMinutes(userId),\n\t\t\t\t\tUserCredentialCCValues.userName(userId),\n\t\t\t\t\tUserCredentialCCValues.userModifierType(userId),\n\t\t\t\t\tUserCredentialCCValues.userModifierNodeId(userId),\n\t\t\t\t\tUserCredentialCCValues.userChecksum(userId),\n\t\t\t\t]\n\t\t\t) {\n\t\t\t\tvalueDB.removeValue(value.endpoint(this.endpoint.index));\n\t\t\t}\n\t\t}\n\n\t\t// Remove all credential values\n\t\tconst credentialValues = valueDB.findValues(\n\t\t\t(vid) =>\n\t\t\t\tUserCredentialCCValues.credential.is(vid)\n\t\t\t\t|| UserCredentialCCValues.credentialOwner.is(vid)\n\t\t\t\t|| UserCredentialCCValues.credentialModifierType.is(vid)\n\t\t\t\t|| UserCredentialCCValues.credentialModifierNodeId.is(vid),\n\t\t);\n\t\tfor (const vid of credentialValues) {\n\t\t\tvalueDB.removeValue(vid);\n\t\t}\n\t}\n\n\t/**\n\t * Removes cached user code status and code values from the value DB.\n\t * If `userId` is given, only values for that user are removed. Otherwise, all\n\t * cached user codes are purged.\n\t */\n\t#purgeCachedUserCodes(userId?: number): void {\n\t\tconst valueDB = this.endpoint.tryGetNode()?.valueDB;\n\t\tif (!valueDB) return;\n\n\t\tlet values = valueDB.findValues(\n\t\t\t(vid) =>\n\t\t\t\tvid.endpoint === this.endpoint.index\n\t\t\t\t&& (UserCodeCCValues.userIdStatus.is(vid)\n\t\t\t\t\t|| UserCodeCCValues.userCode.is(vid)),\n\t\t);\n\t\tif (userId) {\n\t\t\tvalues = values.filter(\n\t\t\t\t(vid) => vid.propertyKey === userId,\n\t\t\t);\n\t\t}\n\n\t\tfor (const vid of values) {\n\t\t\tvalueDB.removeValue(vid);\n\t\t}\n\t}\n\n\t#mapCredentialData(\n\t\tresult: UserCredentialGetResult,\n\t): CredentialData | undefined {\n\t\tif (!result?.credentialSlot) return undefined;\n\t\treturn {\n\t\t\tuserId: result.userId,\n\t\t\ttype: result.credentialType,\n\t\t\tslot: result.credentialSlot,\n\t\t\tdata: result.credentialData != undefined\n\t\t\t\t? normalizeCredentialData(\n\t\t\t\t\tresult.credentialType,\n\t\t\t\t\tresult.credentialData,\n\t\t\t\t)\n\t\t\t\t: undefined,\n\t\t};\n\t}\n\n\tasync #queryCredentials_U3C(\n\t\tuserId: number,\n\t\tstartType: UserCredentialType,\n\t\tstartSlot: number,\n\t\tfilterType?: UserCredentialType,\n\t): Promise<CredentialData[]> {\n\t\tconst api = this.#u3cAPI();\n\t\tconst credentials: CredentialData[] = [];\n\t\tlet queryType = startType;\n\t\tlet querySlot = startSlot;\n\n\t\t// U3C credential enumeration behaves like a cursor walk.\n\t\t// The initial (userId, type, slot) triple may be exact or wildcarded,\n\t\t// and each report returns both the matching credential and a pointer to\n\t\t// the next credential that should be requested.\n\t\twhile (true) {\n\t\t\tconst result = await api.getCredential(\n\t\t\t\tuserId,\n\t\t\t\tqueryType,\n\t\t\t\tquerySlot,\n\t\t\t);\n\t\t\tif (result) await this.endpoint.tryGetNode()?.handleCommand(result);\n\t\t\tconst credential = this.#mapCredentialData(result);\n\t\t\t// No credential means the walk is exhausted or the current selector did\n\t\t\t// not resolve to a valid entry on this node.\n\t\t\tif (!result || !credential) break;\n\t\t\t// When iterating a single type, stop as soon as the node answers with a\n\t\t\t// credential of another type instead of leaking unrelated results.\n\t\t\tif (filterType != undefined && credential.type !== filterType) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcredentials.push(credential);\n\n\t\t\tconst nextType = result.nextCredentialType\n\t\t\t\t?? UserCredentialType.None;\n\t\t\tconst nextSlot = result.nextCredentialSlot ?? 0;\n\t\t\t// A zero next pointer marks the end of the node's credential sequence.\n\t\t\tif (\n\t\t\t\tnextType === UserCredentialType.None\n\t\t\t\t&& nextSlot === 0\n\t\t\t) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Per CC:0083.01.0C.11.024/.025, the next pointer advances to the next\n\t\t\t// existing credential for the user, across credential types. For\n\t\t\t// type-filtered walks, stop before following that pointer into a\n\t\t\t// different type.\n\t\t\tif (filterType != undefined && nextType !== filterType) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Guard against buggy nodes that repeat the same cursor forever.\n\t\t\tif (nextType === queryType && nextSlot === querySlot) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tqueryType = nextType;\n\t\t\tquerySlot = nextSlot;\n\t\t}\n\n\t\treturn credentials;\n\t}\n\n\tasync #getAllCredentials_UC(): Promise<CredentialData[]> {\n\t\tconst api = this.#ucAPI();\n\t\tconst maxUsers = await api.getUsersCount();\n\t\tif (!maxUsers) return [];\n\n\t\tconst credentials: CredentialData[] = [];\n\t\tconst supportsBulk = !!this.getValue<boolean>(\n\t\t\tUserCodeCCValues.supportsMultipleUserCodeReport.endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t),\n\t\t);\n\n\t\tif (supportsBulk) {\n\t\t\tlet nextUserId = 1;\n\t\t\twhile (nextUserId > 0 && nextUserId <= maxUsers) {\n\t\t\t\tconst response = await api.get(nextUserId, true);\n\t\t\t\tif (!response) break;\n\n\t\t\t\tfor (const entry of response.userCodes) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tentry.userIdStatus === UserIDStatus.Available\n\t\t\t\t\t\t|| entry.userIdStatus\n\t\t\t\t\t\t\t=== UserIDStatus.StatusNotAvailable\n\t\t\t\t\t) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// Bulk User Code reports enumerate user slots, which become the\n\t\t\t\t\t// unified credential slots for the returned credentials.\n\t\t\t\t\tcredentials.push({\n\t\t\t\t\t\tuserId: entry.userId,\n\t\t\t\t\t\ttype: this.#ucCredentialType,\n\t\t\t\t\t\tslot: entry.userId,\n\t\t\t\t\t\tdata: entry.userCode,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tnextUserId = response.nextUserId;\n\t\t\t}\n\t\t} else {\n\t\t\tfor (let userId = 1; userId <= maxUsers; userId++) {\n\t\t\t\tconst credential = await this.getCredential(\n\t\t\t\t\tthis.#ucCredentialType,\n\t\t\t\t\tuserId,\n\t\t\t\t);\n\t\t\t\tif (credential) credentials.push(credential);\n\t\t\t}\n\t\t}\n\n\t\treturn credentials;\n\t}\n\n\t#getAllCredentialsCached_U3C(): CredentialData[] {\n\t\tconst valueDB = this.endpoint.tryGetNode()?.valueDB;\n\t\tif (!valueDB) return [];\n\n\t\treturn valueDB\n\t\t\t.findValues(\n\t\t\t\t(vid) =>\n\t\t\t\t\tUserCredentialCCValues.credentialOwner.is(vid)\n\t\t\t\t\t&& vid.endpoint === this.endpoint.index,\n\t\t\t)\n\t\t\t.filter(\n\t\t\t\t({ propertyKey }) => typeof propertyKey === \"number\",\n\t\t\t)\n\t\t\t.toSorted(\n\t\t\t\t(a, b) => (a.propertyKey as number) - (b.propertyKey as number),\n\t\t\t)\n\t\t\t.flatMap(({ propertyKey }) => {\n\t\t\t\tconst key = propertyKey as number;\n\t\t\t\tconst type = key >>> 16;\n\t\t\t\tconst slot = key & 0xffff;\n\t\t\t\tconst credential = this.#getCredentialCached_U3C(type, slot);\n\t\t\t\treturn credential ? [credential] : [];\n\t\t\t});\n\t}\n\n\t#getAllCredentialsCached_UC(): CredentialData[] {\n\t\tconst maxUsers = this.getValue<number>(\n\t\t\tUserCodeCCValues.supportedUsers.endpoint(this.endpoint.index),\n\t\t) ?? 0;\n\t\tconst credentials: CredentialData[] = [];\n\t\t// Cached User Code values are keyed by user slot, and the unified\n\t\t// abstraction reuses that slot number as the credential slot.\n\t\tfor (let userId = 1; userId <= maxUsers; userId++) {\n\t\t\tconst credential = this.#getCredentialCached_UC(\n\t\t\t\tthis.#ucCredentialType,\n\t\t\t\tuserId,\n\t\t\t);\n\t\t\tif (credential) credentials.push(credential);\n\t\t}\n\t\treturn credentials;\n\t}\n\n\t#assertValidSlot(type: UserCredentialType, slot: number): void {\n\t\tconst caps = this.getCredentialCapabilitiesCached()\n\t\t\t.supportedCredentialTypes.get(type);\n\t\tif (!caps || slot < 1 || slot > caps.numberOfCredentialSlots) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`Credential slot ${slot} is out of range for credential type ${\n\t\t\t\t\tgetEnumMemberName(UserCredentialType, type)\n\t\t\t\t}`,\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\t}\n\n\t#getUserCached_U3C(userId: number): UserData | undefined {\n\t\tconst userType = this.getValue<UserCredentialUserType>(\n\t\t\tUserCredentialCCValues.userType(userId).endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t),\n\t\t);\n\t\tif (userType == undefined) return undefined;\n\n\t\treturn {\n\t\t\tuserId,\n\t\t\tactive: this.getValue<boolean>(\n\t\t\t\tUserCredentialCCValues.userActive(userId).endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) ?? false,\n\t\t\tuserType,\n\t\t\tuserName: this.getValue<string>(\n\t\t\t\tUserCredentialCCValues.userName(userId).endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) ?? undefined,\n\t\t\tcredentialRule: this.getValue<UserCredentialRule>(\n\t\t\t\tUserCredentialCCValues.credentialRule(userId).endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) ?? undefined,\n\t\t\texpiringTimeoutMinutes: this.getValue<number>(\n\t\t\t\tUserCredentialCCValues.expiringTimeoutMinutes(userId).endpoint(\n\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t),\n\t\t\t) || undefined,\n\t\t};\n\t}\n\n\t#getCredentialOwner_U3C(\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): number | undefined {\n\t\treturn this.getValue<number>(\n\t\t\tUserCredentialCCValues.credentialOwner(type, slot).endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t),\n\t\t);\n\t}\n\n\t#getCredentialCached_U3C(\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): CredentialData | undefined {\n\t\tconst owner = this.#getCredentialOwner_U3C(type, slot);\n\t\tif (owner == undefined) return undefined;\n\n\t\t// When credentialReadBack is false, the node never returns credential\n\t\t// data. In that case, we still know the slot is occupied and to which\n\t\t// user it belongs, and return the credential without data.\n\t\tconst data = this.getValue<string | Uint8Array>(\n\t\t\tUserCredentialCCValues.credential(type, slot).endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t),\n\t\t);\n\t\treturn { userId: owner, type, slot, data };\n\t}\n\n\t#getCredentialCachedForUser_U3C(\n\t\tuserId: number,\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): CredentialData | undefined {\n\t\tconst credential = this.#getCredentialCached_U3C(type, slot);\n\t\tif (credential?.userId !== userId) return undefined;\n\t\treturn credential;\n\t}\n\n\t#getUserCached_UC(userId: number): UserData | undefined {\n\t\tconst status = this.getValue<UserIDStatus>(\n\t\t\tUserCodeCCValues.userIdStatus(userId).endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t),\n\t\t);\n\t\tif (status == undefined) return undefined;\n\t\treturn this.#mapUserCodeStatusToUserData(userId, status);\n\t}\n\n\t#getCredentialCached_UC(\n\t\ttype: UserCredentialType,\n\t\tslot: number,\n\t): CredentialData | undefined {\n\t\tif (type !== this.#ucCredentialType) return undefined;\n\t\t// For User Code CC, credential slots and users are identical\n\t\tconst status = this.getValue<UserIDStatus>(\n\t\t\tUserCodeCCValues.userIdStatus(slot).endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t),\n\t\t);\n\t\tif (\n\t\t\tstatus == undefined\n\t\t\t|| status === UserIDStatus.Available\n\t\t\t|| status === UserIDStatus.StatusNotAvailable\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst data = this.getValue<string>(\n\t\t\tUserCodeCCValues.userCode(slot).endpoint(this.endpoint.index),\n\t\t);\n\t\tif (data == undefined) return undefined;\n\t\treturn { userId: slot, type, slot, data };\n\t}\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;AAAA,gBAUO;AACP,wBAAqD;AACrD,8BAMO;AACP,kBAMO;AACP,oBAAyC;AACzC,wBAA2B;AAmE3B,IAAY;CAAZ,SAAYA,gBAAa;AACxB,EAAAA,eAAAA,eAAA,IAAA,IAAA,CAAA,IAAA;AACA,EAAAA,eAAAA,eAAA,mCAAA,IAAA,CAAA,IAAA;AACA,EAAAA,eAAAA,eAAA,mCAAA,IAAA,CAAA,IAAA;AACA,EAAAA,eAAAA,eAAA,eAAA,IAAA,GAAA,IAAA;AACD,GALY,kBAAA,gBAAa,CAAA,EAAA;AAQzB,IAAY;CAAZ,SAAYC,sBAAmB;AAC9B,EAAAA,qBAAAA,qBAAA,IAAA,IAAA,CAAA,IAAA;AACA,EAAAA,qBAAAA,qBAAA,mCAAA,IAAA,CAAA,IAAA;AACA,EAAAA,qBAAAA,qBAAA,mCAAA,IAAA,CAAA,IAAA;AACA,EAAAA,qBAAAA,qBAAA,2BAAA,IAAA,CAAA,IAAA;AACA,EAAAA,qBAAAA,qBAAA,iCAAA,IAAA,CAAA,IAAA;AACA,EAAAA,qBAAAA,qBAAA,6BAAA,IAAA,CAAA,IAAA;AACA,EAAAA,qBAAAA,qBAAA,iCAAA,IAAA,CAAA,IAAA;AACA,EAAAA,qBAAAA,qBAAA,eAAA,IAAA,GAAA,IAAA;AACD,GATY,wBAAA,sBAAmB,CAAA,EAAA;AAY/B,IAAY;CAAZ,SAAYC,yBAAsB;AACjC,EAAAA,wBAAAA,wBAAA,IAAA,IAAA,CAAA,IAAA;AAEA,EAAAA,wBAAAA,wBAAA,yBAAA,IAAA,CAAA,IAAA;AAEA,EAAAA,wBAAAA,wBAAA,mBAAA,I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C,MACA,MAAY;AAEZ,WAAO,KAAK,SACX,+CAAuB,gBAAgB,MAAM,IAAI,EAAE,SAClD,KAAK,SAAS,KAAK,CACnB;EAEH;EAEA,yBACC,MACA,MAAY;AAEZ,UAAM,QAAQ,KAAK,wBAAwB,MAAM,IAAI;AACrD,QAAI,SAAS;AAAW,aAAO;AAK/B,UAAM,OAAO,KAAK,SACjB,+CAAuB,WAAW,MAAM,IAAI,EAAE,SAC7C,KAAK,SAAS,KAAK,CACnB;AAEF,WAAO,EAAE,QAAQ,OAAO,MAAM,MAAM,KAAI;EACzC;EAEA,gCACC,QACA,MACA,MAAY;AAEZ,UAAM,aAAa,KAAK,yBAAyB,MAAM,IAAI;AAC3D,QAAI,YAAY,WAAW;AAAQ,aAAO;AAC1C,WAAO;EACR;EAEA,kBAAkB,QAAc;AAC/B,UAAM,SAAS,KAAK,SACnB,mCAAiB,aAAa,MAAM,EAAE,SACrC,KAAK,SAAS,KAAK,CACnB;AAEF,QAAI,UAAU;AAAW,aAAO;AAChC,WAAO,KAAK,6BAA6B,QAAQ,MAAM;EACxD;EAEA,wBACC,MACA,MAAY;AAEZ,QAAI,SAAS,KAAK;AAAmB,aAAO;AAE5C,UAAM,SAAS,KAAK,SACnB,mCAAiB,aAAa,IAAI,EAAE,SACnC,KAAK,SAAS,KAAK,CACnB;AAEF,QACC,UAAU,UACP,WAAW,uBAAa,aACxB,WAAW,uBAAa,oBAC1B;AACD,aAAO;IACR;AACA,UAAM,OAAO,KAAK,SACjB,mCAAiB,SAAS,IAAI,EAAE,SAAS,KAAK,SAAS,KAAK,CAAC;AAE9D,QAAI,QAAQ;AAAW,aAAO;AAC9B,WAAO,EAAE,QAAQ,MAAM,MAAM,MAAM,KAAI;EACxC;;",
6
6
  "names": ["SetUserResult", "SetCredentialResult", "AssignCredentialResult"]
7
7
  }
@@ -10,6 +10,6 @@ export { VirtualNode } from "./lib/node/VirtualNode.js";
10
10
  export type { VirtualValueID } from "./lib/node/VirtualNode.js";
11
11
  export * from "./lib/node/_Types.js";
12
12
  export { AccessControlAPI, AssignCredentialResult, SetCredentialResult, SetUserResult, } from "./lib/node/feature-apis/AccessControl.js";
13
- export type { CredentialCapabilities, CredentialData, SetUserOptions, UserCapabilities, UserData, } from "./lib/node/feature-apis/AccessControl.js";
13
+ export type { CredentialCapabilities, CredentialData, DeleteCredentialsOptions, SetUserOptions, UserCapabilities, UserData, } from "./lib/node/feature-apis/AccessControl.js";
14
14
  export { FeatureAPI } from "./lib/node/feature-apis/FeatureAPI.js";
15
15
  //# sourceMappingURL=Node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../src/Node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,eAAe,GACf,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,YAAY,EACX,cAAc,EACd,eAAe,GACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACN,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,aAAa,GACb,MAAM,0CAA0C,CAAC;AAClD,YAAY,EACX,sBAAsB,EACtB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,QAAQ,GACR,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC"}
1
+ {"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../src/Node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,eAAe,GACf,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,YAAY,EACX,cAAc,EACd,eAAe,GACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACN,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,aAAa,GACb,MAAM,0CAA0C,CAAC;AAClD,YAAY,EACX,sBAAsB,EACtB,cAAc,EACd,wBAAwB,EACxB,cAAc,EACd,gBAAgB,EAChB,QAAQ,GACR,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Node.js","sourceRoot":"","sources":["../../src/Node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,eAAe,GACf,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAK/C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACN,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,aAAa,GACb,MAAM,0CAA0C,CAAC;AAQlD,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC"}
1
+ {"version":3,"file":"Node.js","sourceRoot":"","sources":["../../src/Node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,eAAe,GACf,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAK/C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACN,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,aAAa,GACb,MAAM,0CAA0C,CAAC;AASlD,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC"}
@@ -1,3 +1,3 @@
1
- export declare const PACKAGE_VERSION = "15.23.4";
1
+ export declare const PACKAGE_VERSION = "15.24.0";
2
2
  export declare const PACKAGE_NAME = "zwave-js";
3
3
  //# sourceMappingURL=_version.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // This file is auto-generated by the codegen maintenance script
2
- export const PACKAGE_VERSION = "15.23.4";
2
+ export const PACKAGE_VERSION = "15.24.0";
3
3
  export const PACKAGE_NAME = "zwave-js";
4
4
  //# sourceMappingURL=_version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NetworkCache.d.ts","sourceRoot":"","sources":["../../../../src/lib/driver/NetworkCache.ts"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,cAAc,EAGnB,aAAa,EAMb,MAAM,gBAAgB,CAAC;AAQxB,OAAO,KAAK,EACX,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,MAAM,2BAA2B,CAAC;AAUnC;;GAEG;AACH,eAAO,MAAM,SAAS;aACrB,UAAU;iBACT,gBAAgB,EAAE,6BAA6B;iBAC/C,YAAY,YAAY,MAAM;iBAC9B,YAAY,aAAa,aAAa;iBAOtC,qBAAqB,aAAa,aAAa;iBAO/C,UAAU,EAAE,uBAAuB;;aAGpC,IAAI,WAAW,MAAM;;;;;;;;;;;;;;;kCAiBO,aAAa;;;0BASrB,MAAM;;;iCAMD,cAAc;;;iDAOI,MAAM;;gDAGP,MAAM;;;;;;;CAUvC,CAAC;AAEX,eAAO,MAAM,aAAa;aACzB,aAAa,QAAQ,MAAM,KAAG,MAAM,GAAG,SAAS;aAMhD,mBAAmB,QAAQ,MAAM,KAAG,MAAM,GAAG,SAAS;aAItD,aAAa,QAAQ,MAAM,KAAG,OAAO;aAGrC,oBAAoB,QAAQ,MAAM,KAAG,MAAM,GAAG,SAAS;aAMvD,qCAAqC,QAC/B,MAAM,KACT,MAAM,GAAG,SAAS;CAMZ,CAAC;AAkQX,wBAAgB,4BAA4B,CAC3C,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,GACZ,OAAO,CA2IT;AAED,wBAAgB,0BAA0B,CACzC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,GACZ,OAAO,CAqGT;AA+BD,wBAAsB,yBAAyB,CAC9C,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,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,EAAE;;;IAInB;;;OAGG;;iBAEF,QAAQ;qBACP,8BAA8B;;;IAIhC;;;;OAIG;;iBAEF,QAAQ;qBACP,QAAQ;;;IAIV;;OAEG;;iBAEF,QAAQ;qBACP,WAAW,EAAE,GAAG;;;IAIlB;;;OAGG;;iBAEF,QAAQ;qBACP,WAAW,EAAE,IAAI;;;EAIpB,CAAC"}
@@ -38,6 +38,20 @@ export interface SetUserOptions {
38
38
  credentialRule?: UserCredentialRule;
39
39
  expiringTimeoutMinutes?: number;
40
40
  }
41
+ export interface DeleteCredentialsOptions {
42
+ /**
43
+ * Only delete credentials owned by this user. When omitted or `0`, the
44
+ * filter is treated as a wildcard and credentials for all users are
45
+ * deleted.
46
+ */
47
+ userId?: number;
48
+ /**
49
+ * Only delete credentials of this type. When omitted or
50
+ * {@link UserCredentialType.None}, the filter is treated as a wildcard and
51
+ * credentials of all types are deleted.
52
+ */
53
+ credentialType?: UserCredentialType;
54
+ }
41
55
  /** Result of a setUser / deleteUser / deleteAllUsers call */
42
56
  export declare enum SetUserResult {
43
57
  OK = 0,
@@ -162,7 +176,12 @@ export declare class AccessControlAPI extends FeatureAPI {
162
176
  * Deletes the given credential.
163
177
  * This communicates with the node.
164
178
  */
165
- deleteCredential(userId: number, type: UserCredentialType, slot: number): Promise<SetCredentialResult>;
179
+ deleteCredential(type: UserCredentialType, slot: number): Promise<SetCredentialResult>;
180
+ deleteCredential(userId: number | undefined, type: UserCredentialType, slot: number): Promise<SetCredentialResult>;
181
+ /**
182
+ * Deletes credentials matching the given filters.
183
+ */
184
+ deleteCredentials(options?: DeleteCredentialsOptions): Promise<SetCredentialResult>;
166
185
  /**
167
186
  * Assigns an existing credential to a different user, without re-enrolling
168
187
  * it. Useful for credentials that were added locally on the device (e.g. a
@@ -1 +1 @@
1
- {"version":3,"file":"AccessControl.d.ts","sourceRoot":"","sources":["../../../../../src/lib/node/feature-apis/AccessControl.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wBAAwB,E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EAAE,kBAAkB,EACxB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAwCxC;IAED;;;;OAIG;IACU,qBAAqB,IAAI,OAAO,CAC5C,iBAAiB,GAAG,SAAS,CAC7B,CASA;IAED;;;OAGG;IACU,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAQvD;IAED;;;OAGG;IACU,YAAY,CACxB,IAAI,EAAE,MAAM,GACV,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAQxC;CA6bD"}
1
+ {"version":3,"file":"AccessControl.d.ts","sourceRoot":"","sources":["../../../../../src/lib/node/feature-apis/AccessControl.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wBAAwB,EAI7B,kBAAkB,EAClB,kBAAkB,EAElB,sBAAsB,EAEtB,MAAM,cAAc,CAAC;AAStB,OAAO,EAEN,KAAK,iBAAiB,EAItB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACtD,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,wBAAwB,EAAE,SAAS,kBAAkB,EAAE,CAAC;CACxD;AAED,MAAM,WAAW,sBAAsB;IACtC,wBAAwB,EAAE,WAAW,CACpC,kBAAkB,EAClB,wBAAwB,CACxB,CAAC;IACF,iBAAiB,EAAE,OAAO,CAAC;IAC3B,6BAA6B,EAAE,OAAO,CAAC;IACvC;;;OAGG;IACH,4BAA4B,EAAE,OAAO,CAAC;CACtC;AAED,MAAM,WAAW,QAAQ;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,sBAAsB,CAAC;IACjC,QAAQ,CAAC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"}
@@ -435,7 +435,10 @@ export class AccessControlAPI extends FeatureAPI {
435
435
  }
436
436
  else {
437
437
  // User Code CC ties each user to their code, so clearing
438
- // the code implicitly deletes the user and vice versa
438
+ // the code implicitly deletes the user and vice versa.
439
+ // The cache entry only gates event emission - the node may have
440
+ // a user we never observed, so a missing entry must not gate the
441
+ // success of the API call itself.
439
442
  const existed = this.#getUserCached_UC(userId) != undefined;
440
443
  const api = this.#ucAPI();
441
444
  const result = await api.clear(userId);
@@ -443,13 +446,15 @@ export class AccessControlAPI extends FeatureAPI {
443
446
  if (result == undefined) {
444
447
  // Unsupervised - verify the change
445
448
  const verified = await api.get(userId);
446
- succeeded = existed
447
- && verified?.userIdStatus === UserIDStatus.Available;
449
+ succeeded = verified?.userIdStatus === UserIDStatus.Available;
448
450
  }
449
451
  else {
450
- succeeded = supervisedCommandSucceeded(result) && existed;
452
+ succeeded = supervisedCommandSucceeded(result);
451
453
  }
452
454
  if (succeeded) {
455
+ this.#purgeCachedUserCodes(userId);
456
+ }
457
+ if (succeeded && existed) {
453
458
  const node = this.endpoint.tryGetNode();
454
459
  if (node) {
455
460
  node.emit("user deleted", this.endpoint, { userId });
@@ -492,7 +497,7 @@ export class AccessControlAPI extends FeatureAPI {
492
497
  const succeeded = result == undefined
493
498
  || supervisedCommandSucceeded(result);
494
499
  if (succeeded) {
495
- this.#purgeAllCachedUserCodes();
500
+ this.#purgeCachedUserCodes();
496
501
  }
497
502
  return succeeded ? SetUserResult.OK : SetUserResult.Error_Unknown;
498
503
  }
@@ -702,11 +707,13 @@ export class AccessControlAPI extends FeatureAPI {
702
707
  : SetCredentialResult.Error_Unknown;
703
708
  }
704
709
  }
705
- /**
706
- * Deletes the given credential.
707
- * This communicates with the node.
708
- */
709
- async deleteCredential(userId, type, slot) {
710
+ async deleteCredential(userIdOrType, typeOrSlot, slot) {
711
+ // 2-arg overload: (type, slot) — normalize to the 3-arg form
712
+ if (slot == undefined) {
713
+ return this.deleteCredential(0, userIdOrType, typeOrSlot);
714
+ }
715
+ const userId = userIdOrType ?? 0;
716
+ const type = typeOrSlot;
710
717
  if (this.#usesUserCredentialCC) {
711
718
  this.#assertValidSlot(type, slot);
712
719
  const api = this.#u3cAPI();
@@ -721,28 +728,107 @@ export class AccessControlAPI extends FeatureAPI {
721
728
  return u3cCredentialReportTypeToSetCredentialResult(raw?.reportType);
722
729
  }
723
730
  else {
724
- // User Code CC stores exactly one credential per user slot. Ignore the
725
- // caller-provided unified slot and write back to the owning user's slot
726
- // so events and cached state stay internally consistent.
727
- this.#assertValidSlot(type, userId);
728
- const existed = this.#getCredentialCached_UC(type, userId) != undefined;
731
+ // User Code CC stores exactly one credential per user slot, with the
732
+ // user identifier being the slot number. When the caller omits the
733
+ // user (2-arg form), fall back to the slot. When both are given but
734
+ // disagree, no credential can exist at that (user, slot) pair.
735
+ if (userId !== 0 && userId !== slot) {
736
+ return SetCredentialResult.Error_ModifyRejectedLocationEmpty;
737
+ }
738
+ // Make sure the addressed slot is valid
739
+ const targetUserId = userId === 0 ? slot : userId;
740
+ this.#assertValidSlot(type, targetUserId);
741
+ // Only emit deleted events if we knew about the credential beforehand.
742
+ const existed = this.#getCredentialCached_UC(type, targetUserId) != undefined;
729
743
  const api = this.#ucAPI();
730
- const result = await api.clear(userId);
744
+ const result = await api.clear(targetUserId);
731
745
  let succeeded;
732
746
  if (result == undefined) {
747
+ const verified = await api.get(targetUserId);
748
+ succeeded = verified?.userIdStatus === UserIDStatus.Available;
749
+ }
750
+ else {
751
+ succeeded = supervisedCommandSucceeded(result);
752
+ }
753
+ if (succeeded) {
754
+ this.#purgeCachedUserCodes(targetUserId);
755
+ }
756
+ if (succeeded && existed) {
757
+ const node = this.endpoint.tryGetNode();
758
+ if (node) {
759
+ node.emit("credential deleted", this.endpoint, {
760
+ userId: targetUserId,
761
+ credentialType: type,
762
+ credentialSlot: targetUserId,
763
+ });
764
+ node.emit("user deleted", this.endpoint, {
765
+ userId: targetUserId,
766
+ });
767
+ }
768
+ }
769
+ return succeeded
770
+ ? SetCredentialResult.OK
771
+ : SetCredentialResult.Error_Unknown;
772
+ }
773
+ }
774
+ /**
775
+ * Deletes credentials matching the given filters.
776
+ */
777
+ async deleteCredentials(options = {}) {
778
+ const userId = options.userId ?? 0;
779
+ const credentialType = options.credentialType
780
+ ?? UserCredentialType.None;
781
+ if (this.#usesUserCredentialCC) {
782
+ const api = this.#u3cAPI();
783
+ const raw = await api.setCredential({
784
+ operationType: UserCredentialOperationType.Delete,
785
+ userId,
786
+ credentialType,
787
+ credentialSlot: 0,
788
+ });
789
+ if (raw)
790
+ await this.endpoint.tryGetNode()?.handleCommand(raw);
791
+ return u3cCredentialReportTypeToSetCredentialResult(raw?.reportType);
792
+ }
793
+ else {
794
+ // User Code CC
795
+ if (credentialType !== UserCredentialType.None
796
+ && credentialType !== this.#ucCredentialType) {
797
+ // Returning OK here would falsely imply the User Code CC user
798
+ // was deleted (cascade), which only happens when the type
799
+ // matches. Reject loudly so callers do not act on a fictional
800
+ // success.
801
+ throw new ZWaveError(`Credential type ${getEnumMemberName(UserCredentialType, credentialType)} is not supported by this node`, ZWaveErrorCodes.Argument_Invalid);
802
+ }
803
+ // Only emit deleted events if we knew about the credential beforehand.
804
+ // The wildcard branch (userId === 0) always emits, since verifying
805
+ // the prior state across all users is unrealistic.
806
+ const existed = userId !== 0
807
+ ? this.#getUserCached_UC(userId) != undefined
808
+ : true;
809
+ const api = this.#ucAPI();
810
+ const result = await api.clear(userId);
811
+ let succeeded;
812
+ if (userId !== 0 && result == undefined) {
733
813
  const verified = await api.get(userId);
734
- succeeded = existed
735
- && verified?.userIdStatus === UserIDStatus.Available;
814
+ succeeded = verified?.userIdStatus === UserIDStatus.Available;
736
815
  }
737
816
  else {
738
- succeeded = supervisedCommandSucceeded(result) && existed;
817
+ // Verifying all users being deleted is unrealistic
818
+ // since there can be up to 65535 users. So we just
819
+ // assume it worked when the command was not supervised.
820
+ succeeded = result == undefined
821
+ || supervisedCommandSucceeded(result);
739
822
  }
740
823
  if (succeeded) {
824
+ this.#purgeCachedUserCodes(userId);
825
+ }
826
+ if (succeeded && existed) {
741
827
  const node = this.endpoint.tryGetNode();
742
828
  if (node) {
743
829
  node.emit("credential deleted", this.endpoint, {
744
830
  userId,
745
- credentialType: type,
831
+ credentialType: this.#ucCredentialType,
746
832
  credentialSlot: userId,
747
833
  });
748
834
  node.emit("user deleted", this.endpoint, { userId });
@@ -953,13 +1039,21 @@ export class AccessControlAPI extends FeatureAPI {
953
1039
  valueDB.removeValue(vid);
954
1040
  }
955
1041
  }
956
- /** Removes all cached user code status and code values from the value DB */
957
- #purgeAllCachedUserCodes() {
1042
+ /**
1043
+ * Removes cached user code status and code values from the value DB.
1044
+ * If `userId` is given, only values for that user are removed. Otherwise, all
1045
+ * cached user codes are purged.
1046
+ */
1047
+ #purgeCachedUserCodes(userId) {
958
1048
  const valueDB = this.endpoint.tryGetNode()?.valueDB;
959
1049
  if (!valueDB)
960
1050
  return;
961
- const values = valueDB.findValues((vid) => UserCodeCCValues.userIdStatus.is(vid)
962
- || UserCodeCCValues.userCode.is(vid));
1051
+ let values = valueDB.findValues((vid) => vid.endpoint === this.endpoint.index
1052
+ && (UserCodeCCValues.userIdStatus.is(vid)
1053
+ || UserCodeCCValues.userCode.is(vid)));
1054
+ if (userId) {
1055
+ values = values.filter((vid) => vid.propertyKey === userId);
1056
+ }
963
1057
  for (const vid of values) {
964
1058
  valueDB.removeValue(vid);
965
1059
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AccessControl.js","sourceRoot":"","sources":["../../../../../src/lib/node/feature-apis/AccessControl.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,qBAAqB,EACrB,kCAAkC,EAClC,2BAA2B,EAC3B,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,EAC5B,sBAAsB,EACtB,YAAY,GACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAsB,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAIN,sBA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AAI,SAAS;eAChB,MAAM,KAAK,YAAY,CAAC,SAAS;eACjC,MAAM,KAAK,YAAY,CAAC,kBAAkB,EAC5C,CAAC;YACF,OAAO,SAAS,CAAC;QAClB,CAAC;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CACzB,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC7D,CAAC;QACF,IAAI,IAAI,IAAI,SAAS;YAAE,OAAO,SAAS,CAAC;QACxC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC3C,CAAC;CACD"}
1
+ {"version":3,"file":"AccessControl.js","sourceRoot":"","sources":["../../../../../src/lib/node/feature-apis/AccessControl.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,qBAAqB,EACrB,kCAAkC,EAClC,2BAA2B,EAC3B,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,EAC5B,sBAAsB,EACtB,YAAY,GACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAsB,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAIN,sBAAsB,EACtB,uBAAuB,GACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,cAAc,EAEd,UAAU,EACV,eAAe,EACf,0BAA0B,GAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAkE7C,6DAA6D;AAC7D,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACxB,6CAAM,CAAA;IACN,2GAAqC,CAAA;IACrC,2GAAqC,CAAA;IACrC,qEAAoB,CAAA;AACrB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED,wDAAwD;AACxD,MAAM,CAAN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AC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC;IAED,uBAAuB,CACtB,IAAwB,EACxB,IAAY;QAEZ,IAAI,IAAI,KAAK,IAAI,CAAC,iBAAiB;YAAE,OAAO,SAAS,CAAC;QACtD,6DAA6D;QAC7D,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAC3B,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ,CAC3C,IAAI,CAAC,QAAQ,CAAC,KAAK,CACnB,CACD,CAAC;QACF,IACC,MAAM,IAAI,SAAS;eAChB,MAAM,KAAK,YAAY,CAAC,SAAS;eACjC,MAAM,KAAK,YAAY,CAAC,kBAAkB,EAC5C,CAAC;YACF,OAAO,SAAS,CAAC;QAClB,CAAC;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CACzB,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC7D,CAAC;QACF,IAAI,IAAI,IAAI,SAAS;YAAE,OAAO,SAAS,CAAC;QACxC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC3C,CAAC;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zwave-js",
3
- "version": "15.23.4",
3
+ "version": "15.24.0",
4
4
  "description": "Z-Wave driver written entirely in JavaScript/TypeScript",
5
5
  "keywords": [],
6
6
  "type": "module",
@@ -129,14 +129,14 @@
129
129
  "@alcalzone/jsonl-db": "^4.0.2",
130
130
  "@andrewbranch/untar.js": "^1.0.3",
131
131
  "@homebridge/ciao": "^1.3.5",
132
- "@zwave-js/cc": "15.23.3",
133
- "@zwave-js/config": "15.23.3",
134
- "@zwave-js/core": "15.23.1",
135
- "@zwave-js/host": "15.23.3",
136
- "@zwave-js/nvmedit": "15.23.1",
137
- "@zwave-js/serial": "15.23.3",
138
- "@zwave-js/shared": "15.23.0",
139
- "@zwave-js/testing": "15.23.3",
132
+ "@zwave-js/cc": "15.24.0",
133
+ "@zwave-js/config": "15.24.0",
134
+ "@zwave-js/core": "15.24.0",
135
+ "@zwave-js/host": "15.24.0",
136
+ "@zwave-js/nvmedit": "15.24.0",
137
+ "@zwave-js/serial": "15.24.0",
138
+ "@zwave-js/shared": "15.24.0",
139
+ "@zwave-js/testing": "15.24.0",
140
140
  "@zwave-js/waddle": "^1.2.1",
141
141
  "alcalzone-shared": "^5.0.0",
142
142
  "ansi-colors": "^4.1.3",
@@ -158,8 +158,8 @@
158
158
  "@types/semver": "^7.7.1",
159
159
  "@types/sinon": "^21.0.0",
160
160
  "@types/source-map-support": "^0.5.10",
161
- "@typescript/native-preview": "7.0.0-dev.20260324.1",
162
- "@zwave-js/maintenance": "15.23.1",
161
+ "@typescript/native-preview": "7.0.0-dev.20260423.1",
162
+ "@zwave-js/maintenance": "15.24.0",
163
163
  "del-cli": "^7.0.0",
164
164
  "mockdate": "^3.0.5",
165
165
  "sinon": "^21.0.3",