Skip to content

Commit

Permalink
docs: update typed documentation and API report 🤖 (#6486)
Browse files Browse the repository at this point in the history
Co-authored-by: Al Calzone <[email protected]>
  • Loading branch information
zwave-js-bot and AlCalzone authored Nov 30, 2023
1 parent a58ec5d commit 2c5e226
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 17 deletions.
32 changes: 28 additions & 4 deletions packages/cc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1723,6 +1723,8 @@ export class BasicCC extends CommandClass {
// (undocumented)
ccCommand: BasicCommand;
// (undocumented)
getDefinedValueIDs(applHost: ZWaveApplicationHost_2): ValueID_2[];
// (undocumented)
interview(applHost: ZWaveApplicationHost_2): Promise<void>;
// (undocumented)
refreshValues(applHost: ZWaveApplicationHost_2): Promise<void>;
Expand Down Expand Up @@ -1811,7 +1813,7 @@ export const BasicCCValues: Readonly<{
readonly minVersion: 1;
readonly supportsEndpoints: true;
readonly stateful: false;
readonly autoCreate: (applHost: ZWaveApplicationHost_2, endpoint: IZWaveEndpoint_2) => boolean;
readonly autoCreate: false;
};
};
restorePrevious: {
Expand Down Expand Up @@ -12133,26 +12135,48 @@ export interface MultilevelSensorCCReportOptions extends CCCommandOptions {
//
// @public (undocumented)
export class MultilevelSensorCCSupportedScaleReport extends MultilevelSensorCC {
constructor(host: ZWaveHost_2, options: CommandClassDeserializationOptions);
constructor(host: ZWaveHost_2, options: CommandClassDeserializationOptions | MultilevelSensorCCSupportedScaleReportOptions);
// (undocumented)
readonly sensorType: number;
// (undocumented)
serialize(): Buffer;
// (undocumented)
readonly supportedScales: readonly number[];
// (undocumented)
toLogEntry(applHost: ZWaveApplicationHost_2): MessageOrCCLogEntry_2;
}

// Warning: (ae-missing-release-tag) "MultilevelSensorCCSupportedScaleReportOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface MultilevelSensorCCSupportedScaleReportOptions extends CCCommandOptions {
// (undocumented)
sensorType: number;
// (undocumented)
supportedScales: readonly number[];
}

// Warning: (ae-missing-release-tag) "MultilevelSensorCCSupportedSensorReport" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class MultilevelSensorCCSupportedSensorReport extends MultilevelSensorCC {
constructor(host: ZWaveHost_2, options: CommandClassDeserializationOptions);
constructor(host: ZWaveHost_2, options: CommandClassDeserializationOptions | MultilevelSensorCCSupportedSensorReportOptions);
// (undocumented)
serialize(): Buffer;
// (undocumented)
readonly supportedSensorTypes: readonly number[];
supportedSensorTypes: readonly number[];
// (undocumented)
toLogEntry(applHost: ZWaveApplicationHost_2): MessageOrCCLogEntry_2;
}

// Warning: (ae-missing-release-tag) "MultilevelSensorCCSupportedSensorReportOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface MultilevelSensorCCSupportedSensorReportOptions extends CCCommandOptions {
// (undocumented)
supportedSensorTypes: readonly number[];
}

// Warning: (ae-missing-release-tag) "MultilevelSensorCCValues" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
Expand Down
2 changes: 2 additions & 0 deletions packages/cc/src/cc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ export type {
MultilevelSensorCCGetOptions,
MultilevelSensorCCGetSupportedScaleOptions,
MultilevelSensorCCReportOptions,
MultilevelSensorCCSupportedScaleReportOptions,
MultilevelSensorCCSupportedSensorReportOptions,
} from "./MultilevelSensorCC";
export {
MultilevelSensorCC,
Expand Down
24 changes: 11 additions & 13 deletions packages/core/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3267,26 +3267,24 @@ export enum ZWaveErrorCodes {
ConfigurationCC_NoResetToDefaultOnLegacyDevices = 1002,
// (undocumented)
Controller_CallbackNOK = 204,
Controller_CommandError = 215,
Controller_EndpointNotFound = 211,
// (undocumented)
Controller_CommandAborted = 206,
Controller_CommandError = 216,
Controller_EndpointNotFound = 212,
Controller_ExclusionFailed = 207,
// (undocumented)
Controller_ExclusionFailed = 208,
// (undocumented)
Controller_InclusionFailed = 207,
Controller_InterviewRestarted = 210,
Controller_InclusionFailed = 206,
Controller_InterviewRestarted = 209,
// (undocumented)
Controller_Jammed = 205,
// (undocumented)
Controller_MessageDropped = 202,
Controller_MessageExpired = 215,
Controller_MessageTooLarge = 217,
Controller_NodeInsecureCommunication = 214,
Controller_NodeNotFound = 211,
Controller_NodeRemoved = 213,
Controller_MessageExpired = 214,
Controller_MessageTooLarge = 216,
Controller_NodeInsecureCommunication = 213,
Controller_NodeNotFound = 210,
Controller_NodeRemoved = 212,
Controller_NodeTimeout = 201,
Controller_NotSupported = 209,
Controller_NotSupported = 208,
// (undocumented)
Controller_ResponseNOK = 203,
Controller_Timeout = 200,
Expand Down
15 changes: 15 additions & 0 deletions packages/testing/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export type CCIdToCapabilities<T extends CommandClasses = CommandClasses> = T ex
export type CCSpecificCapabilities = {
[CommandClasses.Configuration]: ConfigurationCCCapabilities;
[CommandClasses.Notification]: NotificationCCCapabilities;
[49]: MultilevelSensorCCCapabilities;
[121]: SoundSwitchCCCapabilities;
[106]: WindowCoveringCCCapabilities;
[144]: EnergyProductionCCCapabilities;
Expand Down Expand Up @@ -170,6 +171,8 @@ export class MockController {
get nodes(): ReadonlyMap<number, MockNode>;
onNodeFrame(node: MockNode, frame: MockZWaveFrame): Promise<void>;
// (undocumented)
get receivedHostMessages(): readonly Readonly<Message>[];
// (undocumented)
removeNode(node: MockNode): void;
sendToHost(data: Buffer): Promise<void>;
sendToNode(node: MockNode, frame: LazyMockZWaveFrame): Promise<MockZWaveAckFrame | undefined>;
Expand Down Expand Up @@ -340,6 +343,18 @@ export interface MockZWaveRequestFrame {
type: MockZWaveFrameType.Request;
}

// Warning: (ae-missing-release-tag) "MultilevelSensorCCCapabilities" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface MultilevelSensorCCCapabilities {
// (undocumented)
getValue?: (sensorType: number | undefined, scale: number | undefined) => number | undefined;
// (undocumented)
sensors: Record<number, {
supportedScales: number[];
}>;
}

// Warning: (ae-missing-release-tag) "NotificationCCCapabilities" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
Expand Down
1 change: 1 addition & 0 deletions packages/zwave-js/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,7 @@ export class ZWaveController extends TypedEventEmitter<ControllerEventCallbacks>
get protocolVersion(): MaybeNotKnown<string>;
provisionSmartStartNode(entry: PlannedProvisioningEntry): void;
rebuildNodeRoutes(nodeId: number): Promise<boolean>;
get rebuildRoutesProgress(): ReadonlyMap<number, RebuildRoutesStatus> | undefined;
removeAssociations(source: AssociationAddress, group: number, destinations: AssociationAddress[]): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
removeFailedNode(nodeId: number): Promise<void>;
Expand Down

0 comments on commit 2c5e226

Please sign in to comment.