Skip to content

Commit

Permalink
docs: update typed documentation and API report
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone committed Jul 29, 2024
1 parent 18659e5 commit d467098
Show file tree
Hide file tree
Showing 4 changed files with 176 additions and 22 deletions.
4 changes: 2 additions & 2 deletions packages/cc/cc.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import { MultiCommandCCAPI } from '../cc/MultiCommandCC';
import { MultilevelSensorCCAPI } from '../cc/MultilevelSensorCC';
import { MultilevelSwitchCCAPI } from '../cc/MultilevelSwitchCC';
import { NODE_ID_BROADCAST } from '@zwave-js/core';
import { NODE_ID_BROADCAST_LR } from '@zwave-js/core';
import { NodeInformationFrame } from '@zwave-js/core';
import { NodeNamingAndLocationCCAPI } from '../cc/NodeNamingCC';
import { NodeProtocolInfoAndDeviceClass } from '@zwave-js/core';
Expand Down Expand Up @@ -2915,7 +2916,7 @@ export class CCAPI {
// (undocumented)
protected isBroadcast(): this is this & {
endpoint: IVirtualEndpoint & {
nodeId: typeof NODE_ID_BROADCAST;
nodeId: typeof NODE_ID_BROADCAST | typeof NODE_ID_BROADCAST_LR;
};
};
// (undocumented)
Expand Down Expand Up @@ -22016,7 +22017,6 @@ export enum ZWaveProtocolCommand {
//
// src/cc/TransportServiceCC.ts:47:2 - (ae-unresolved-link) The @link reference could not be resolved: The package "@zwave-js/cc" does not have an export "RELAXED_TIMING_THRESHOLD"
// src/cc/TransportServiceCC.ts:49:2 - (ae-unresolved-link) The @link reference could not be resolved: The package "@zwave-js/cc" does not have an export "RELAXED_TIMING_THRESHOLD"
// /home/runner/work/node-zwave-js/node-zwave-js/packages/serial/src/message/ZnifferMessages.ts:268:18 - (TS2564) Property 'checksumOK' has no initializer and is not definitely assigned in the constructor.

// (No @packageDocumentation comment for this package)

Expand Down
59 changes: 56 additions & 3 deletions packages/core/core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export enum BeamingInfo {
//
// @public (undocumented)
export type BroadcastCC<T extends ICommandClass = ICommandClass> = T & {
nodeId: typeof NODE_ID_BROADCAST;
nodeId: typeof NODE_ID_BROADCAST | typeof NODE_ID_BROADCAST_LR;
};

// Warning: (ae-missing-release-tag) "CacheBackedMap" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Expand Down Expand Up @@ -4126,6 +4126,58 @@ export enum ZnifferRegion {
"USA" = 1
}

// Warning: (ae-missing-release-tag) "ZnifferRegionLegacy" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export enum ZnifferRegionLegacy {
// (undocumented)
ANZ = 2,
// (undocumented)
CN = 29,
// (undocumented)
EU = 0,
// (undocumented)
HK = 3,
// (undocumented)
IL = 27,
// (undocumented)
IN = 9,
// (undocumented)
JP = 10,
// (undocumented)
KR = 28,
// (undocumented)
MY = 8,
// (undocumented)
RU = 26,
// (undocumented)
TF_835_3CH = 24,
// (undocumented)
TF_840_3CH = 16,
// (undocumented)
TF_850_3CH = 17,
// (undocumented)
TF_866 = 4,
// (undocumented)
TF_870 = 5,
// (undocumented)
TF_878 = 11,
// (undocumented)
TF_882 = 12,
// (undocumented)
TF_886 = 13,
// (undocumented)
TF_906 = 6,
// (undocumented)
TF_910 = 7,
// (undocumented)
TF_932_3CH = 14,
// (undocumented)
TF_940_3CH = 15,
// (undocumented)
US = 1
}

// Warning: (ae-missing-release-tag) "ZWaveApiVersion" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
Expand Down Expand Up @@ -4262,6 +4314,7 @@ export enum ZWaveErrorCodes {
FWUpdateService_RequestError = 261,
HealthCheck_Busy = 400,
Invalid_Firmware_File = 1506,
LinkReliabilityCheck_Busy = 401,
ManufacturerProprietaryCC_NoManufacturerId = 1200,
NVM_InvalidFormat = 283,
NVM_InvalidJSON = 281,
Expand Down Expand Up @@ -4386,8 +4439,8 @@ export interface ZWaveLogInfo<TContext extends LogContext = LogContext> extends

// Warnings were encountered during analysis:
//
// src/security/Manager2.ts:116:79 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
// src/security/Manager2.ts:116:98 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
// src/security/Manager2.ts:117:79 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
// src/security/Manager2.ts:117:98 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
// src/security/QR.ts:99:3 - (ae-unresolved-link) The @link reference could not be resolved: The package "@zwave-js/core" does not have an export "requestedSecurityClasses"

// (No @packageDocumentation comment for this package)
Expand Down
44 changes: 39 additions & 5 deletions packages/testing/testing.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

```ts

import { CommandClass } from '@zwave-js/cc';
import { CommandClasses } from '@zwave-js/core';
import { CommandClassInfo } from '@zwave-js/core';
import { ConfigValue } from '@zwave-js/core';
Expand Down Expand Up @@ -85,7 +86,7 @@ export function createMockZWaveAckFrame(options?: Partial<Omit<MockZWaveAckFrame
// Warning: (ae-missing-release-tag) "createMockZWaveRequestFrame" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function createMockZWaveRequestFrame(payload: ICommandClass | (() => ICommandClass), options?: Partial<Omit<MockZWaveRequestFrame, "direction" | "payload">>): LazyMockZWaveRequestFrame;
export function createMockZWaveRequestFrame(payload: CommandClass | (() => CommandClass), options?: Partial<Omit<MockZWaveRequestFrame, "direction" | "payload">>): LazyMockZWaveRequestFrame;

// Warning: (ae-missing-release-tag) "EnergyProductionCCCapabilities" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
Expand Down Expand Up @@ -142,7 +143,7 @@ export type LazyMockZWaveFrame = LazyMockZWaveRequestFrame | MockZWaveAckFrame;
// @public (undocumented)
export interface LazyMockZWaveRequestFrame {
ackRequested: boolean;
payload: ICommandClass | (() => ICommandClass);
payload: CommandClass | (() => CommandClass);
repeaters: number[];
// (undocumented)
type: MockZWaveFrameType.Request;
Expand Down Expand Up @@ -333,7 +334,9 @@ export class MockNode {
//
// @public (undocumented)
export interface MockNodeBehavior {
onControllerFrame?: (controller: MockController, self: MockNode, frame: MockZWaveFrame) => Promise<boolean | undefined> | boolean | undefined;
handleCC?: (controller: MockController, self: MockNode, receivedCC: CommandClass) => Promise<MockNodeResponse | undefined> | MockNodeResponse | undefined;
transformIncomingCC?: (controller: MockController, self: MockNode, cc: CommandClass) => Promise<CommandClass> | CommandClass;
transformResponse?: (controller: MockController, self: MockNode, receivedCC: CommandClass, response: MockNodeResponse) => Promise<MockNodeResponse> | MockNodeResponse;
}

// Warning: (ae-missing-release-tag) "MockNodeOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Expand All @@ -353,6 +356,23 @@ export interface MockNodeOptions {
id: number;
}

// Warning: (ae-missing-release-tag) "MockNodeResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type MockNodeResponse = {
action: "sendCC";
cc: CommandClass;
ackRequested?: boolean;
} | {
action: "ack";
} | {
action: "stop";
} | {
action: "ok";
} | {
action: "fail";
};

// Warning: (ae-missing-release-tag) "MockZWaveAckFrame" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
Expand Down Expand Up @@ -384,7 +404,7 @@ export enum MockZWaveFrameType {
// @public (undocumented)
export interface MockZWaveRequestFrame {
ackRequested: boolean;
payload: ICommandClass;
payload: CommandClass;
repeaters: number[];
// (undocumented)
type: MockZWaveFrameType.Request;
Expand Down Expand Up @@ -502,7 +522,21 @@ export interface WindowCoveringCCCapabilities {

// Warnings were encountered during analysis:
//
// /home/runner/work/node-zwave-js/node-zwave-js/packages/serial/src/message/ZnifferMessages.ts:268:18 - (TS2564) Property 'checksumOK' has no initializer and is not definitely assigned in the constructor.
// /home/runner/work/node-zwave-js/node-zwave-js/packages/cc/src/cc/ColorSwitchCC.ts:477:9 - (TS2345) Argument of type '("index" | "warmWhite" | "coldWhite" | "red" | "green" | "blue" | "amber" | "cyan" | "purple" | undefined)[]' is not assignable to parameter of type 'readonly (string | number | symbol)[]'.
// Type 'string | undefined' is not assignable to type 'string | number | symbol'.
// Type 'undefined' is not assignable to type 'string | number | symbol'.
// /home/runner/work/node-zwave-js/node-zwave-js/packages/cc/src/cc/ConfigurationCC.ts:1273:41 - (TS2345) Argument of type 'string | number' is not assignable to parameter of type 'number'.
// Type 'string' is not assignable to type 'number'.
// /home/runner/work/node-zwave-js/node-zwave-js/packages/cc/src/cc/ConfigurationCC.ts:1280:20 - (TS2345) Argument of type 'string | number' is not assignable to parameter of type 'number'.
// Type 'string' is not assignable to type 'number'.
// /home/runner/work/node-zwave-js/node-zwave-js/packages/cc/src/cc/ConfigurationCC.ts:1398:40 - (TS2345) Argument of type 'string | number' is not assignable to parameter of type 'number'.
// Type 'string' is not assignable to type 'number'.
// /home/runner/work/node-zwave-js/node-zwave-js/packages/cc/src/cc/Security2CC.ts:1355:3 - (TS2322) Type 'Security2Extension | undefined' is not assignable to type 'MGRPExtension | undefined'.
// Property 'groupId' is missing in type 'Security2Extension' but required in type 'MGRPExtension'.
// /home/runner/work/node-zwave-js/node-zwave-js/packages/cc/src/cc/Security2CC.ts:1366:3 - (TS2322) Type 'Security2Extension | undefined' is not assignable to type 'MPANExtension | undefined'.
// Type 'Security2Extension' is missing the following properties from type 'MPANExtension': groupId, innerMPANState
// /home/runner/work/node-zwave-js/node-zwave-js/packages/cc/src/cc/Security2CC.ts:1380:25 - (TS2339) Property 'senderEI' does not exist on type 'Security2Extension'.
// /home/runner/work/node-zwave-js/node-zwave-js/packages/cc/src/cc/Security2CC.ts:1438:19 - (TS2339) Property 'senderEI' does not exist on type 'Security2Extension'.

// (No @packageDocumentation comment for this package)

Expand Down
Loading

0 comments on commit d467098

Please sign in to comment.