Skip to content

Commit

Permalink
v4.8.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjdhjd committed Mar 17, 2024
1 parent a536a5f commit 690c871
Show file tree
Hide file tree
Showing 49 changed files with 1,642 additions and 1,139 deletions.
23 changes: 14 additions & 9 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"ignorePatterns": [ "dist" ],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"project": "tsconfig.json",
"sourceType": "module"
},
"ignorePatterns": [ "dist" ],
"plugins": [ "@stylistic" ],
"rules": {
"brace-style": [ "warn" ],
"camelcase": [ "warn" ],
"comma-dangle": [ "error" ],
"curly": [ "warn", "all" ],
"dot-notation": "warn",
"eqeqeq": "warn",
"indent": [ "warn", 2, { "SwitchCase": 1 } ],
"linebreak-style": [ "warn", "unix" ],
"lines-between-class-members": [ "warn", "always", { "exceptAfterSingleLine": true } ],
"max-len": [ "warn", 175 ],
"no-await-in-loop": [ "warn" ],
"no-console": [ "warn" ],
"prefer-arrow-callback": [ "warn" ],
"quotes": [ "warn", "double", { "avoidEscape": true } ],
"semi": [ "warn", "always" ],
"sort-imports": [ "warn" ],
"sort-keys": [ "warn" ],
"sort-vars": [ "warn" ],
"@stylistic/brace-style": [ "error" ],
"@stylistic/comma-dangle": [ "error" ],
"@stylistic/indent": [ "warn", 2, { "SwitchCase": 1 } ],
"@stylistic/linebreak-style": [ "warn", "unix" ],
"@stylistic/lines-between-class-members": [ "warn", "always", { "exceptAfterSingleLine": true } ],
"@stylistic/max-len": [ "warn", 170 ],
"@stylistic/no-tabs": [ "error" ],
"@stylistic/no-trailing-spaces": [ "error" ],
"@stylistic/semi": [ "warn", "always" ],
"@stylistic/space-before-function-paren": ["error", { "anonymous": "never", "asyncArrow": "always", "named": "never" } ],
"@typescript-eslint/explicit-function-return-type": [ "warn" ],
"@typescript-eslint/explicit-module-boundary-types": [ "warn" ],
"@typescript-eslint/no-explicit-any": [ "warn" ],
"@typescript-eslint/no-floating-promises": [ "warn", { "ignoreIIFE": true }],
"@typescript-eslint/no-non-null-assertion": [ "warn" ],
"@typescript-eslint/no-this-alias": [ "warn" ]
}
Expand Down
3 changes: 3 additions & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

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

## 4.8.2 (2024-03-17)
* Housekeeping.

## 4.8.1 (2024-03-17)
* Housekeeping.

Expand Down
37 changes: 19 additions & 18 deletions docs/classes/ProtectApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ EventEmitter.constructor

#### Defined in

[src/protect-api.ts:78](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L78)
[src/protect-api.ts:78](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L78)

## Properties

Expand Down Expand Up @@ -246,7 +246,7 @@ Returns the bootstrap JSON if the Protect controller has been bootstrapped, `nul

#### Defined in

[src/protect-api.ts:1203](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L1203)
[src/protect-api.ts:1204](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L1204)

___

Expand All @@ -264,7 +264,7 @@ Returns `true` if the logged in user has administrative privileges, `false` othe

#### Defined in

[src/protect-api.ts:1214](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L1214)
[src/protect-api.ts:1215](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L1215)

___

Expand All @@ -283,7 +283,7 @@ Returns the Protect controller name in the following format:

#### Defined in

[src/protect-api.ts:1226](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L1226)
[src/protect-api.ts:1227](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L1227)

## Methods

Expand Down Expand Up @@ -375,7 +375,7 @@ This method should be used to create a new livestream API object. It allows you

#### Defined in

[src/protect-api.ts:1111](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L1111)
[src/protect-api.ts:1112](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L1112)

___

Expand Down Expand Up @@ -472,7 +472,7 @@ Returns a promise that will resolve to the updated [ProtectCameraConfig](../inte

#### Defined in

[src/protect-api.ts:684](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L684)
[src/protect-api.ts:684](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L684)

___

Expand Down Expand Up @@ -539,7 +539,7 @@ Valid API endpoints are `bootstrap`, `camera`, `chime`, `light`, `login`, `nvr`,

#### Defined in

[src/protect-api.ts:1126](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L1126)
[src/protect-api.ts:1127](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L1127)

___

Expand Down Expand Up @@ -621,7 +621,7 @@ process.stdout.write(util.inspect(ufp.bootstrap, { colors: true, depth: null, so

#### Defined in

[src/protect-api.ts:454](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L454)
[src/protect-api.ts:454](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L454)

___

Expand All @@ -643,15 +643,16 @@ Utility method that generates a nicely formatted device information string.

`string`

Returns the Protect device name in the following format: <code>*Protect device name* [*Protect device type*] (address: *IP address* mac: *MAC address*)</code>.
Returns the Protect device name in the following format: <code>*Protect device name* [*Protect device type*] (address: *IP address*
mac: *MAC address*)</code>.

**`Remarks`**

The example above assumed the `deviceInfo` parameter is set to `true`.

#### Defined in

[src/protect-api.ts:721](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L721)
[src/protect-api.ts:722](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L722)

___

Expand All @@ -676,7 +677,7 @@ Returns the Protect device name in the following format:

#### Defined in

[src/protect-api.ts:748](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L748)
[src/protect-api.ts:749](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L749)

___

Expand Down Expand Up @@ -729,7 +730,7 @@ Returns a promise that will resolve to a Buffer containing the JPEG image snapsh

#### Defined in

[src/protect-api.ts:529](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L529)
[src/protect-api.ts:529](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L529)

___

Expand Down Expand Up @@ -764,7 +765,7 @@ Valid API endpoints are `livestream` and `talkback`.

#### Defined in

[src/protect-api.ts:835](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L835)
[src/protect-api.ts:836](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L836)

___

Expand Down Expand Up @@ -906,7 +907,7 @@ if(!(await ufp.login("protect-controller.local", "username", "password"))) {

#### Defined in

[src/protect-api.ts:160](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L160)
[src/protect-api.ts:160](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L160)

___

Expand All @@ -922,7 +923,7 @@ Clear the login credentials and terminate any open connection to the UniFi Prote

#### Defined in

[src/protect-api.ts:772](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L772)
[src/protect-api.ts:773](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L773)

___

Expand Down Expand Up @@ -1404,7 +1405,7 @@ Terminate any open connection to the UniFi Protect API.

#### Defined in

[src/protect-api.ts:760](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L760)
[src/protect-api.ts:761](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L761)

___

Expand Down Expand Up @@ -1435,7 +1436,7 @@ This method should be used when direct access to the Protect controller is neede

#### Defined in

[src/protect-api.ts:923](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L923)
[src/protect-api.ts:924](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L924)

___

Expand Down Expand Up @@ -1506,7 +1507,7 @@ Use this method to change the configuration of a given Protect device or control

#### Defined in

[src/protect-api.ts:589](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api.ts#L589)
[src/protect-api.ts:589](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api.ts#L589)

___

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/ProtectApiEvents.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ A UniFi Protect event packet is an encoded representation of state updates that

#### Defined in

[src/protect-api-events.ts:187](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api-events.ts#L187)
[src/protect-api-events.ts:162](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api-events.ts#L162)
10 changes: 5 additions & 5 deletions docs/classes/ProtectLivestream.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ EventEmitter.constructor

#### Defined in

[src/protect-api-livestream.ts:70](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api-livestream.ts#L70)
[src/protect-api-livestream.ts:70](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api-livestream.ts#L70)

## Properties

Expand Down Expand Up @@ -210,7 +210,7 @@ node_modules/@types/node/events.d.ts:412

#### Defined in

[src/protect-api-livestream.ts:397](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api-livestream.ts#L397)
[src/protect-api-livestream.ts:397](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api-livestream.ts#L397)

## Methods

Expand Down Expand Up @@ -405,7 +405,7 @@ ___

#### Defined in

[src/protect-api-livestream.ts:383](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api-livestream.ts#L383)
[src/protect-api-livestream.ts:383](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api-livestream.ts#L383)

___

Expand Down Expand Up @@ -1038,7 +1038,7 @@ ___

#### Defined in

[src/protect-api-livestream.ts:84](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api-livestream.ts#L84)
[src/protect-api-livestream.ts:84](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api-livestream.ts#L84)

___

Expand All @@ -1052,7 +1052,7 @@ ___

#### Defined in

[src/protect-api-livestream.ts:97](https://github.com/hjdhjd/unifi-protect/blob/12bffbb/src/protect-api-livestream.ts#L97)
[src/protect-api-livestream.ts:97](https://github.com/hjdhjd/unifi-protect/blob/a536a5f/src/protect-api-livestream.ts#L97)

___

Expand Down
Loading

0 comments on commit 690c871

Please sign in to comment.