Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update typed documentation and API report 🤖 #7371

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/api/controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,16 @@ interface GetFirmwareUpdatesOptions {
additionalUserAgentComponents?: Record<string, string>;
/** Whether the returned firmware upgrades should include prereleases from the `"beta"` channel. Default: `false`. */
includePrereleases?: boolean;
/**
* Can be used to specify the RF region if the Z-Wave controller
* does not support querying this information.
*
* **WARNING:** Specifying the wrong region may result in bricking the device!
*
* For this reason, the specified value is only used as a fallback
* if the RF region of the controller is not already known.
*/
rfRegion?: RFRegion;
}
```

Expand Down
30 changes: 22 additions & 8 deletions docs/api/driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,7 @@ interface FileSystem {
file: string,
data: string | Uint8Array,
options?:
| {
encoding: BufferEncoding;
}
| { encoding: BufferEncoding }
| BufferEncoding,
): Promise<void>;
readFile(file: string, encoding: BufferEncoding): Promise<string>;
Expand Down Expand Up @@ -695,7 +693,7 @@ This interface specifies the optional options object that is passed to the `Driv
<!-- #import ZWaveOptions from "zwave-js" with comments -->

````ts
interface ZWaveOptions extends ZWaveHostOptions {
interface ZWaveOptions {
/** Specify timeouts in milliseconds */
timeouts: {
/** how long to wait for an ACK */
Expand Down Expand Up @@ -802,9 +800,26 @@ interface ZWaveOptions extends ZWaveHostOptions {
disableOnNodeAdded?: boolean;
};

/** Host abstractions allowing Z-Wave JS to run on different platforms */
host?: {
/**
* Specifies which bindings are used to access the file system when
* reading or writing the cache, or loading device configuration files.
*/
fs?: FileSystem;

/**
* Specifies which bindings are used interact with serial ports.
*/
serial?: Serial;

/**
* Specifies which bindings are used to interact with the database used to store the cache.
*/
db?: DatabaseFactory;
};

storage: {
/** Allows you to replace the default file system driver used to store and read the cache */
driver: FileSystem;
/** Allows you to specify a different cache directory */
cacheDir: string;
/**
Expand Down Expand Up @@ -1036,12 +1051,11 @@ interface ZWaveOptions extends ZWaveHostOptions {

/** DO NOT USE! Used for testing internally */
testingHooks?: {
serialPortBinding?: typeof SerialPort;
/**
* A hook that allows accessing the serial port instance after opening
* and before interacting with it.
*/
onSerialPortOpen?: (port: ZWaveSerialPortBase) => Promise<void>;
onSerialPortOpen?: (port: ZWaveSerialStream) => Promise<void>;

/**
* Set this to true to skip the controller identification sequence.
Expand Down
2 changes: 2 additions & 0 deletions docs/api/zniffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ interface ZnifferOptions {
/** Security keys for decrypting Z-Wave Long Range traffic */
securityKeysLongRange?: ZWaveOptions["securityKeysLongRange"];

host?: ZWaveOptions["host"];

/**
* The RSSI values reported by the Zniffer are not actual RSSI values.
* They can be converted to dBm, but the conversion is chip dependent and not documented for 700/800 series Zniffers.
Expand Down
1,835 changes: 1,026 additions & 809 deletions packages/cc/cc.api.md

Large diffs are not rendered by default.

31 changes: 26 additions & 5 deletions packages/config/config.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@

import { CommandClasses } from '@zwave-js/core/safe';
import { CommandClassInfo } from '@zwave-js/core/safe';
import { FileSystem } from '@zwave-js/shared/bindings';
import { JSONObject } from '@zwave-js/shared';
import { JSONObject as JSONObject_2 } from '@zwave-js/shared/safe';
import type { LogContext } from '@zwave-js/core/safe';
import { ReadFile } from '@zwave-js/shared/bindings';
import { ReadFileSystemInfo } from '@zwave-js/shared/bindings';
import { ReadonlyObjectKeyMap } from '@zwave-js/shared/safe';
import { ValueID } from '@zwave-js/core/safe';
import { WriteFile } from '@zwave-js/shared/bindings';
import { ZWaveLogContainer } from '@zwave-js/core';

// Warning: (ae-missing-release-tag) "AssociationConfig" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Expand Down Expand Up @@ -248,7 +252,7 @@ export class ConditionalDeviceConfig {
// (undocumented)
readonly firmwareVersion: FirmwareVersionRange;
// (undocumented)
static from(filename: string, isEmbedded: boolean, options: {
static from(fs: ReadFileSystemInfo & ReadFile, filename: string, isEmbedded: boolean, options: {
rootDir: string;
fallbackDirs?: string[];
relative?: boolean;
Expand Down Expand Up @@ -415,6 +419,8 @@ export class ConfigManager {
//
// @public (undocumented)
export interface ConfigManagerOptions {
// (undocumented)
bindings?: FileSystem;
// (undocumented)
deviceConfigExternalDir?: string;
// (undocumented)
Expand Down Expand Up @@ -468,14 +474,14 @@ export class DeviceConfig {
// (undocumented)
readonly firmwareVersion: FirmwareVersionRange;
// (undocumented)
static from(filename: string, isEmbedded: boolean, options: {
static from(fs: ReadFileSystemInfo & ReadFile, filename: string, isEmbedded: boolean, options: {
rootDir: string;
fallbackDirs?: string[];
relative?: boolean;
deviceId?: DeviceID;
}): Promise<DeviceConfig>;
getAssociationConfigForEndpoint(endpointIndex: number, group: number): AssociationConfig | undefined;
getHash(): Uint8Array;
getHash(algorithm?: "md5" | "sha-256"): Promise<Uint8Array>;
readonly isEmbedded: boolean;
// (undocumented)
readonly label: string;
Expand Down Expand Up @@ -601,6 +607,14 @@ export interface FulltextDeviceConfigIndexEntry {
rootDir?: string;
}

// Warning: (ae-missing-release-tag) "GetDeviceConfig" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface GetDeviceConfig {
// (undocumented)
getDeviceConfig(nodeId: number): DeviceConfig | undefined;
}

// Warning: (ae-missing-release-tag) "getDevicesPaths" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
Expand All @@ -609,6 +623,13 @@ export function getDevicesPaths(configDir: string): {
indexPath: string;
};

// Warning: (ae-missing-release-tag) "LookupManufacturer" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface LookupManufacturer {
lookupManufacturer(manufacturerId: number): string | undefined;
}

// Warning: (ae-missing-release-tag) "ManufacturersMap" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
Expand All @@ -617,7 +638,7 @@ export type ManufacturersMap = Map<number, string>;
// Warning: (ae-missing-release-tag) "PACKAGE_VERSION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const PACKAGE_VERSION = "14.0.0";
export const PACKAGE_VERSION = "14.3.7";

// Warning: (ae-missing-release-tag) "ParamInfoMap" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
Expand All @@ -644,7 +665,7 @@ export function parseConditionalParamInformationMap(definition: JSONObject_2, pa
// Warning: (ae-missing-release-tag) "saveManufacturersInternal" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function saveManufacturersInternal(manufacturers: ManufacturersMap): Promise<void>;
export function saveManufacturersInternal(fs: WriteFile, manufacturers: ManufacturersMap): Promise<void>;

// (No @packageDocumentation comment for this package)

Expand Down
Loading