Skip to content

Commit

Permalink
v4.13.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjdhjd committed Sep 15, 2024
1 parent a784d24 commit 753bc8c
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 5 deletions.
4 changes: 4 additions & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file. This project uses [semantic versioning](https://semver.org/).

## 4.13.0 (2024-09-15)
* Updates to the Protect JSON descriptions.
* Housekeeping.

## 4.12.0 (2024-09-14)
* Change: API has been updated to reflect the recent changes to the Protect API by Ubiquiti to snapshots. Specifically, you can no longer specify a timestamp.
* Minor updates to the Protect JSON descriptions.
Expand Down
40 changes: 39 additions & 1 deletion docs/ProtectTypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,10 @@ A semi-complete description of the UniFi Protect chime JSON.
| `connectedSince` | `number` |
| `connectionHost` | `string` |
| `elementInfo` | `string` |
| `featureFlags` | \{ `hasWifi`: `boolean`; \} |
| `featureFlags` | \{ `hasHttpsClientOTA`: `boolean`; `hasWifi`: `boolean`; `supportCustomRingtone`: `boolean`; \} |
| `featureFlags.hasHttpsClientOTA` | `boolean` |
| `featureFlags.hasWifi` | `boolean` |
| `featureFlags.supportCustomRingtone` | `boolean` |
| `firmwareBuild` | `string` |
| `firmwareVersion` | `string` |
| `fwUpdateState` | `string` |
Expand All @@ -351,10 +353,16 @@ A semi-complete description of the UniFi Protect chime JSON.
| `marketName` | `string` |
| `modelKey` | `string` |
| `name` | `string` |
| `platform` | `string` |
| `repeatTimes` | `number` |
| `ringSettings` | \{ `cameraId`: `string`; `repeatTimes`: `number`; `ringtoneId`: `string`; `volume`: `number`; \}[] |
| `speakerTrackList` | \{ `md5`: `string`; `name`: `string`; `size`: `number`; `state`: `string`; `track_no`: `number`; `volume`: `number`; \}[] |
| `state` | `string` |
| `sysId` | `string` |
| `type` | `string` |
| `upSince` | `number` |
| `uptime` | `number` |
| `userConfiguredAp` | `boolean` |
| `volume` | `number` |
| `wifiConnectionState` | \{ `apName`: `null` \| `string`; `bssid`: `null` \| `string`; `channel`: `null` \| `string`; `connectivity`: `string`; `experience`: `null`; `frequency`: `null`; `phyRate`: `number`; `signalQuality`: `number`; `signalStrength`: `number`; `ssid`: `null` \| `string`; `txRate`: `null`; \} |
| `wifiConnectionState.apName` | `null` \| `string` |
Expand Down Expand Up @@ -512,6 +520,7 @@ An semi-complete description of the UniFi Protect NVR bootstrap JSON.
| `lights` | [`ProtectLightConfigInterface`](ProtectTypes.md#protectlightconfiginterface)[] |
| `liveviews` | [`ProtectNvrLiveviewConfigInterface`](ProtectTypes.md#protectnvrliveviewconfiginterface)[] |
| `nvr` | [`ProtectNvrConfigInterface`](ProtectTypes.md#protectnvrconfiginterface) |
| `ringtones` | [`ProtectRingtoneConfigInterface`](ProtectTypes.md#protectringtoneconfiginterface)[] |
| `sensors` | [`ProtectSensorConfigInterface`](ProtectTypes.md#protectsensorconfiginterface)[] |
| `users` | [`ProtectNvrUserConfigInterface`](ProtectTypes.md#protectnvruserconfiginterface)[] |
| `viewers` | [`ProtectViewerConfigInterface`](ProtectTypes.md#protectviewerconfiginterface)[] |
Expand Down Expand Up @@ -830,6 +839,23 @@ A semi-complete description of the UniFi Protect NVR user JSON.

***

### ProtectRingtoneConfigInterface

A semi-complete description of the UniFi Protect ringtone JSON.

#### Properties

| Property | Type |
| ------ | ------ |
| `id` | `string` |
| `isDefault` | `boolean` |
| `modelKey` | `string` |
| `name` | `string` |
| `nvrMac` | `string` |
| `size` | `number` |

***

### ProtectSensorConfigInterface

A semi-complete description of the UniFi Protect sensor JSON.
Expand Down Expand Up @@ -1189,6 +1215,18 @@ type ProtectNvrUserConfig: ProtectNvrUserConfigInterface;

***

### ProtectRingtoneConfig

```ts
type ProtectRingtoneConfig: ProtectRingtoneConfigInterface;
```

#### See

[ProtectRingtoneConfigInterface](ProtectTypes.md#protectringtoneconfiginterface)

***

### ProtectSensorConfig

```ts
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "unifi-protect",
"type": "module",
"version": "4.12.0",
"version": "4.13.0",
"displayName": "UniFi Protect API",
"description": "A complete implementation of the UniFi Protect API.",
"author": {
Expand Down
41 changes: 40 additions & 1 deletion src/protect-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface ProtectNvrBootstrapInterface {
lights: ProtectLightConfig[],
liveviews: ProtectNvrLiveviewConfig[],
nvr: ProtectNvrConfig,
ringtones: ProtectRingtoneConfigInterface[],
sensors: ProtectSensorConfig[],
users: ProtectNvrUserConfig[],
viewers: ProtectViewerConfig[],
Expand Down Expand Up @@ -613,7 +614,9 @@ export interface ProtectChimeConfigInterface {
elementInfo: string,
featureFlags: {

hasWifi: boolean
hasHttpsClientOTA: boolean,
hasWifi: boolean,
supportCustomRingtone: boolean
},
firmwareBuild: string,
firmwareVersion: string,
Expand All @@ -640,10 +643,30 @@ export interface ProtectChimeConfigInterface {
marketName: string,
modelKey: string,
name: string,
platform: string,
repeatTimes: number,
ringSettings: {

cameraId: string,
repeatTimes: number,
ringtoneId: string,
volume: number
}[],
speakerTrackList: {

md5: string,
name: string,
size: number,
state: string,
track_no: number,
volume: number
}[],
state: string,
sysId: string,
type: string,
upSince: number,
uptime: number,
userConfiguredAp: boolean,
volume: number,
wifiConnectionState: {

Expand Down Expand Up @@ -856,6 +879,19 @@ export interface ProtectNvrSystemEventControllerInterface {
version: string
}

/**
* A semi-complete description of the UniFi Protect ringtone JSON.
*/
export interface ProtectRingtoneConfigInterface {

id: string,
isDefault: boolean,
modelKey: string,
name: string,
nvrMac: string,
size: number
}

/**
* A semi-complete description of the UniFi Protect sensor JSON.
*/
Expand Down Expand Up @@ -1110,6 +1146,9 @@ export type ProtectNvrSystemEventController = ProtectNvrSystemEventControllerInt
/** @see {@link ProtectNvrUserConfigInterface} */
export type ProtectNvrUserConfig = ProtectNvrUserConfigInterface;

/** @see {@link ProtectRingtoneConfigInterface} */
export type ProtectRingtoneConfig = ProtectRingtoneConfigInterface;

/** @see {@link ProtectSensorConfigInterface} */
export type ProtectSensorConfig = ProtectSensorConfigInterface;

Expand Down

0 comments on commit 753bc8c

Please sign in to comment.