diff --git a/docs/Changelog.md b/docs/Changelog.md index 76df769..d01d0b6 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -2,5 +2,11 @@ All notable changes to this project will be documented in this file. This project uses [semantic versioning](https://semver.org/). +## 0.2.0 (2024-03-06) + * New feature: unlock support. + * New feature: better device enumeration. + * New feature: access to the realtime events API for UniFi Access. + * Housekeeping. + ## 0.1.0 (2024-03-02) * Initial release. Support for device enumeration and some foundational capabilities. diff --git a/docs/classes/AccessApi.md b/docs/classes/AccessApi.md index 6e5e783..cc67ece 100644 --- a/docs/classes/AccessApi.md +++ b/docs/classes/AccessApi.md @@ -12,7 +12,7 @@ Here's how the UniFi Access API works: 2. Enumerate the list of UniFi Access devices by calling the [bootstrap](AccessApi.md#bootstrap) endpoint. This contains everything you would want to know about this particular UniFi Access controller, including enumerating all the devices it knows about. -3. Listen for `message` events emitted by [AccessApi](AccessApi.md) containing all Access controller events, in realtime. They are delivered as AccessEventPacket +3. Listen for `message` events emitted by [AccessApi](AccessApi.md) containing all Access controller events, in realtime. They are delivered as [AccessEventPacket](../modules.md#accesseventpacket) packets, containing the event-specific details. Those are the basics that gets us up and running. @@ -39,6 +39,9 @@ Those are the basics that gets us up and running. ### Accessors - [bootstrap](AccessApi.md#bootstrap) +- [devices](AccessApi.md#devices) +- [doors](AccessApi.md#doors) +- [floors](AccessApi.md#floors) - [isAdminUser](AccessApi.md#isadminuser) - [name](AccessApi.md#name) @@ -68,6 +71,7 @@ Those are the basics that gets us up and running. - [reset](AccessApi.md#reset) - [retrieve](AccessApi.md#retrieve) - [setMaxListeners](AccessApi.md#setmaxlisteners) +- [unlock](AccessApi.md#unlock) - [updateDevice](AccessApi.md#updatedevice) - [addAbortListener](AccessApi.md#addabortlistener) - [getEventListeners](AccessApi.md#geteventlisteners) @@ -105,7 +109,7 @@ EventEmitter.constructor #### Defined in -src/access-api.ts:55 +[src/access-api.ts:62](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L62) ## Properties @@ -230,19 +234,73 @@ node_modules/@types/node/events.d.ts:412 ### bootstrap -• `get` **bootstrap**(): ``null`` \| `Readonly`\<[`AccessDeviceConfigInterface`](../interfaces/AccessDeviceConfigInterface.md)\>[][] +• `get` **bootstrap**(): ``null`` \| `Readonly`\<[`AccessTopologyConfigInterface`](../interfaces/AccessTopologyConfigInterface.md)\> Access the Access controller bootstrap JSON. #### Returns -``null`` \| `Readonly`\<[`AccessDeviceConfigInterface`](../interfaces/AccessDeviceConfigInterface.md)\>[][] +``null`` \| `Readonly`\<[`AccessTopologyConfigInterface`](../interfaces/AccessTopologyConfigInterface.md)\> Returns the bootstrap JSON if the Access controller has been bootstrapped, `null` otherwise. #### Defined in -src/access-api.ts:737 +[src/access-api.ts:957](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L957) + +___ + +### devices + +• `get` **devices**(): ``null`` \| `Readonly`\<[`AccessDeviceConfigInterface`](../interfaces/AccessDeviceConfigInterface.md)\>[] + +Access the Access controller list of devices. + +#### Returns + +``null`` \| `Readonly`\<[`AccessDeviceConfigInterface`](../interfaces/AccessDeviceConfigInterface.md)\>[] + +Returns an array of all the devices from all the UniFi Access hubs associated with this controller, `null` otherwise. + +#### Defined in + +[src/access-api.ts:968](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L968) + +___ + +### doors + +• `get` **doors**(): ``null`` \| `Readonly`\<[`AccessDoorConfigInterface`](../interfaces/AccessDoorConfigInterface.md)\>[] + +Access the Access controller list of doors. + +#### Returns + +``null`` \| `Readonly`\<[`AccessDoorConfigInterface`](../interfaces/AccessDoorConfigInterface.md)\>[] + +Returns an array of all the doors from all the UniFi Access hubs associated with this controller, `null` otherwise. + +#### Defined in + +[src/access-api.ts:979](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L979) + +___ + +### floors + +• `get` **floors**(): ``null`` \| `Readonly`\<[`AccessFloorConfigInterface`](../interfaces/AccessFloorConfigInterface.md)\>[] + +Access the Access controller list of floors. + +#### Returns + +``null`` \| `Readonly`\<[`AccessFloorConfigInterface`](../interfaces/AccessFloorConfigInterface.md)\>[] + +Returns an array of all the floors from all the UniFi Access hubs associated with this controller, `null` otherwise. + +#### Defined in + +[src/access-api.ts:990](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L990) ___ @@ -260,7 +318,7 @@ Returns `true` if the logged in user has administrative privileges, `false` othe #### Defined in -src/access-api.ts:748 +[src/access-api.ts:1001](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L1001) ___ @@ -279,7 +337,7 @@ Returns the Access controller name in the following format: #### Defined in -src/access-api.ts:760 +[src/access-api.ts:1013](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L1013) ## Methods @@ -488,7 +546,7 @@ Valid API endpoints are `bootstrap`, `device`, `login`, `self`, and `websocket`. #### Defined in -src/access-api.ts:685 +[src/access-api.ts:905](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L905) ___ @@ -506,7 +564,8 @@ Returns a promise that will resolve to `true` if successful and `false` otherwis **`Remarks`** -A `bootstrap` event will be emitted each time this method is successfully called, with the [AccessDeviceConfig](../interfaces/AccessDeviceConfig.md) JSON as an argument. +A `bootstrap` event will be emitted each time this method is successfully called, with the AccessToplogyConfig JSON as an argument. As a +convenience, the [devices](AccessApi.md#devices), [doors](AccessApi.md#doors), and [floors](AccessApi.md#floors) properties will be populated as well. **`Example`** @@ -570,7 +629,7 @@ process.stdout.write(util.inspect(ufa.bootstrap, { colors: true, depth: null, so #### Defined in -src/access-api.ts:337 +[src/access-api.ts:499](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L499) ___ @@ -600,7 +659,7 @@ The example above assumed the `deviceInfo` parameter is set to `true`. #### Defined in -src/access-api.ts:408 +[src/access-api.ts:620](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L620) ___ @@ -625,7 +684,7 @@ Returns the Access device name in the following format: #### Defined in -src/access-api.ts:435 +[src/access-api.ts:646](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L646) ___ @@ -792,7 +851,7 @@ if(!(await ufa.login("access-controller.local", "username", "password"))) { #### Defined in -src/access-api.ts:137 +[src/access-api.ts:148](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L148) ___ @@ -808,7 +867,7 @@ Clear the login credentials and terminate any open connection to the UniFi Acces #### Defined in -src/access-api.ts:459 +[src/access-api.ts:679](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L679) ___ @@ -1290,7 +1349,7 @@ Terminate any open connection to the UniFi Access API. #### Defined in -src/access-api.ts:447 +[src/access-api.ts:658](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L658) ___ @@ -1321,7 +1380,7 @@ This method should be used when direct access to the Access controller is needed #### Defined in -src/access-api.ts:494 +[src/access-api.ts:714](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L714) ___ @@ -1360,6 +1419,30 @@ node_modules/@types/node/events.d.ts:733 ___ +### unlock + +▸ **unlock**(`device`): `Promise`\<`boolean`\> + +Send an unlock command to the Access controller. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `device` | `Readonly`\<[`AccessDeviceConfigInterface`](../interfaces/AccessDeviceConfigInterface.md)\> | Access device. | + +#### Returns + +`Promise`\<`boolean`\> + +Returns `true` if successful, `false` otherwise. + +#### Defined in + +[src/access-api.ts:513](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L513) + +___ + ### updateDevice ▸ **updateDevice**\<`DeviceType`\>(`device`, `payload`): `Promise`\<``null`` \| `DeviceType`\> @@ -1392,7 +1475,7 @@ Use this method to change the configuration of a given Access device or controll #### Defined in -src/access-api.ts:357 +[src/access-api.ts:569](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-api.ts#L569) ___ diff --git a/docs/classes/FetchError.md b/docs/classes/FetchError.md index 82f83b7..85ee71e 100644 --- a/docs/classes/FetchError.md +++ b/docs/classes/FetchError.md @@ -192,8 +192,6 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces ▸ (`err`, `stackTraces`): `any` -Optional override for formatting stack traces - ##### Parameters | Name | Type | @@ -205,10 +203,6 @@ Optional override for formatting stack traces `any` -**`See`** - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Inherited from FetchBaseError.prepareStackTrace diff --git a/docs/interfaces/AccessDeviceConfig.md b/docs/interfaces/AccessDeviceConfig.md index 2491a3c..ec991df 100644 --- a/docs/interfaces/AccessDeviceConfig.md +++ b/docs/interfaces/AccessDeviceConfig.md @@ -7,25 +7,30 @@ ### Properties - [adopt\_time](AccessDeviceConfig.md#adopt_time) +- [adopting](AccessDeviceConfig.md#adopting) - [alias](AccessDeviceConfig.md#alias) - [bom\_rev](AccessDeviceConfig.md#bom_rev) - [capabilities](AccessDeviceConfig.md#capabilities) - [configs](AccessDeviceConfig.md#configs) - [connected\_uah\_id](AccessDeviceConfig.md#connected_uah_id) - [device\_type](AccessDeviceConfig.md#device_type) +- [display\_model](AccessDeviceConfig.md#display_model) +- [door](AccessDeviceConfig.md#door) - [firmware](AccessDeviceConfig.md#firmware) - [firmware\_update\_time](AccessDeviceConfig.md#firmware_update_time) +- [floor](AccessDeviceConfig.md#floor) - [guid](AccessDeviceConfig.md#guid) - [hw\_type](AccessDeviceConfig.md#hw_type) +- [images](AccessDeviceConfig.md#images) - [ip](AccessDeviceConfig.md#ip) - [is\_adopted](AccessDeviceConfig.md#is_adopted) - [is\_connected](AccessDeviceConfig.md#is_connected) - [is\_managed](AccessDeviceConfig.md#is_managed) - [is\_online](AccessDeviceConfig.md#is_online) -- [is\_revision\_up\_to\_date](AccessDeviceConfig.md#is_revision_up_to_date) - [location](AccessDeviceConfig.md#location) - [location\_id](AccessDeviceConfig.md#location_id) - [mac](AccessDeviceConfig.md#mac) +- [model](AccessDeviceConfig.md#model) - [name](AccessDeviceConfig.md#name) - [need\_advisory](AccessDeviceConfig.md#need_advisory) - [resource\_name](AccessDeviceConfig.md#resource_name) @@ -36,6 +41,7 @@ - [start\_time](AccessDeviceConfig.md#start_time) - [unique\_id](AccessDeviceConfig.md#unique_id) - [update](AccessDeviceConfig.md#update) +- [update\_manual](AccessDeviceConfig.md#update_manual) - [version](AccessDeviceConfig.md#version) - [version\_update\_time](AccessDeviceConfig.md#version_update_time) @@ -47,7 +53,17 @@ #### Defined in -src/access-types.ts:18 +[src/access-types.ts:40](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L40) + +___ + +### adopting + +• `Readonly` **adopting**: `boolean` + +#### Defined in + +[src/access-types.ts:41](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L41) ___ @@ -57,7 +73,7 @@ ___ #### Defined in -src/access-types.ts:19 +[src/access-types.ts:42](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L42) ___ @@ -67,7 +83,7 @@ ___ #### Defined in -src/access-types.ts:20 +[src/access-types.ts:43](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L43) ___ @@ -77,17 +93,17 @@ ___ #### Defined in -src/access-types.ts:21 +[src/access-types.ts:44](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L44) ___ ### configs -• `Readonly` **configs**: [`AccessDeviceConfigEntryInterface`](AccessDeviceConfigEntryInterface.md)[] +• `Readonly` **configs**: [`AccessDeviceEntryConfigInterface`](AccessDeviceEntryConfigInterface.md)[] #### Defined in -src/access-types.ts:22 +[src/access-types.ts:48](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L48) ___ @@ -97,7 +113,7 @@ ___ #### Defined in -src/access-types.ts:23 +[src/access-types.ts:45](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L45) ___ @@ -107,7 +123,43 @@ ___ #### Defined in -src/access-types.ts:24 +[src/access-types.ts:46](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L46) + +___ + +### display\_model + +• `Readonly` **display\_model**: `string` + +#### Defined in + +[src/access-types.ts:47](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L47) + +___ + +### door + +• `Readonly` **door**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `extra_type` | `string` | +| `extras` | [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) | +| `full_name` | `string` | +| `level` | `number` | +| `location_type` | `string` | +| `name` | `string` | +| `timezone` | `string` | +| `unique_id` | `string` | +| `up_id` | `string` | +| `work_time` | `string`[] | +| `work_time_id` | `string` | + +#### Defined in + +[src/access-types.ts:49](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L49) ___ @@ -117,7 +169,7 @@ ___ #### Defined in -src/access-types.ts:25 +[src/access-types.ts:64](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L64) ___ @@ -127,7 +179,33 @@ ___ #### Defined in -src/access-types.ts:26 +[src/access-types.ts:63](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L63) + +___ + +### floor + +• `Readonly` **floor**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `extra_type` | `string` | +| `extras` | [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) | +| `full_name` | `string` | +| `level` | `number` | +| `location_type` | `string` | +| `name` | `string` | +| `timezone` | `string` | +| `unique_id` | `string` | +| `up_id` | `string` | +| `work_time` | `string`[] | +| `work_time_id` | `string` | + +#### Defined in + +[src/access-types.ts:65](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L65) ___ @@ -137,7 +215,7 @@ ___ #### Defined in -src/access-types.ts:27 +[src/access-types.ts:79](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L79) ___ @@ -147,7 +225,27 @@ ___ #### Defined in -src/access-types.ts:28 +[src/access-types.ts:80](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L80) + +___ + +### images + +• `Readonly` **images**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `l` | `string` | +| `m` | `string` | +| `s` | `string` | +| `xl` | `string` | +| `xs` | `string` | + +#### Defined in + +[src/access-types.ts:81](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L81) ___ @@ -157,7 +255,7 @@ ___ #### Defined in -src/access-types.ts:29 +[src/access-types.ts:89](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L89) ___ @@ -167,7 +265,7 @@ ___ #### Defined in -src/access-types.ts:30 +[src/access-types.ts:90](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L90) ___ @@ -177,7 +275,7 @@ ___ #### Defined in -src/access-types.ts:31 +[src/access-types.ts:91](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L91) ___ @@ -187,7 +285,7 @@ ___ #### Defined in -src/access-types.ts:32 +[src/access-types.ts:92](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L92) ___ @@ -197,17 +295,7 @@ ___ #### Defined in -src/access-types.ts:33 - -___ - -### is\_revision\_up\_to\_date - -• `Readonly` **is\_revision\_up\_to\_date**: `boolean` - -#### Defined in - -src/access-types.ts:34 +[src/access-types.ts:93](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L93) ___ @@ -220,12 +308,7 @@ ___ | Name | Type | | :------ | :------ | | `extra_type` | `string` | -| `extras` | \{ `door_thumbnail`: `string` ; `door_thumbnail_last_update`: `number` ; `uah-input_state_dps`: `string` ; `uah-wiring_state_dps-neg`: `string` ; `uah-wiring_state_dps-pos`: `string` } | -| `extras.door_thumbnail` | `string` | -| `extras.door_thumbnail_last_update` | `number` | -| `extras.uah-input_state_dps` | `string` | -| `extras.uah-wiring_state_dps-neg` | `string` | -| `extras.uah-wiring_state_dps-pos` | `string` | +| `extras` | [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) | | `full_name` | `string` | | `level` | `number` | | `location_type` | `string` | @@ -233,12 +316,12 @@ ___ | `timezone` | `string` | | `unique_id` | `string` | | `up_id` | `string` | -| `work_time` | `string` | +| `work_time` | `string`[] | | `work_time_id` | `string` | #### Defined in -src/access-types.ts:35 +[src/access-types.ts:94](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L94) ___ @@ -248,7 +331,7 @@ ___ #### Defined in -src/access-types.ts:54 +[src/access-types.ts:108](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L108) ___ @@ -258,7 +341,17 @@ ___ #### Defined in -src/access-types.ts:55 +[src/access-types.ts:109](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L109) + +___ + +### model + +• `Readonly` **model**: `string` + +#### Defined in + +[src/access-types.ts:110](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L110) ___ @@ -268,7 +361,7 @@ ___ #### Defined in -src/access-types.ts:56 +[src/access-types.ts:111](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L111) ___ @@ -278,7 +371,7 @@ ___ #### Defined in -src/access-types.ts:57 +[src/access-types.ts:112](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L112) ___ @@ -288,17 +381,17 @@ ___ #### Defined in -src/access-types.ts:58 +[src/access-types.ts:113](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L113) ___ ### revision -• `Readonly` **revision**: `string` +• `Readonly` **revision**: `number` #### Defined in -src/access-types.ts:59 +[src/access-types.ts:115](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L115) ___ @@ -308,7 +401,7 @@ ___ #### Defined in -src/access-types.ts:60 +[src/access-types.ts:114](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L114) ___ @@ -318,7 +411,7 @@ ___ #### Defined in -src/access-types.ts:61 +[src/access-types.ts:116](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L116) ___ @@ -328,7 +421,7 @@ ___ #### Defined in -src/access-types.ts:62 +[src/access-types.ts:117](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L117) ___ @@ -338,7 +431,7 @@ ___ #### Defined in -src/access-types.ts:63 +[src/access-types.ts:118](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L118) ___ @@ -348,7 +441,7 @@ ___ #### Defined in -src/access-types.ts:64 +[src/access-types.ts:119](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L119) ___ @@ -358,7 +451,35 @@ ___ #### Defined in -src/access-types.ts:65 +[src/access-types.ts:120](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L120) + +___ + +### update\_manual + +• `Readonly` **update\_manual**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `device_version_upgrade_status` | \{ `completed`: `boolean` ; `failed`: `boolean` ; `failure_reason`: `string` ; `is_downloading`: `boolean` ; `is_upgrading`: `boolean` ; `is_waiting`: `boolean` ; `timed_out`: `boolean` ; `upgrade_seconds`: `number` } | +| `device_version_upgrade_status.completed` | `boolean` | +| `device_version_upgrade_status.failed` | `boolean` | +| `device_version_upgrade_status.failure_reason` | `string` | +| `device_version_upgrade_status.is_downloading` | `boolean` | +| `device_version_upgrade_status.is_upgrading` | `boolean` | +| `device_version_upgrade_status.is_waiting` | `boolean` | +| `device_version_upgrade_status.timed_out` | `boolean` | +| `device_version_upgrade_status.upgrade_seconds` | `number` | +| `from_version` | `string` | +| `last_upgrade_failure_reason` | `string` | +| `last_upgrade_start_time` | `string` | +| `last_upgrade_success` | `string` | + +#### Defined in + +[src/access-types.ts:121](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L121) ___ @@ -368,7 +489,7 @@ ___ #### Defined in -src/access-types.ts:66 +[src/access-types.ts:141](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L141) ___ @@ -378,4 +499,4 @@ ___ #### Defined in -src/access-types.ts:67 +[src/access-types.ts:140](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L140) diff --git a/docs/interfaces/AccessDeviceConfigEntryInterface.md b/docs/interfaces/AccessDeviceConfigEntryInterface.md deleted file mode 100644 index 23daf3f..0000000 --- a/docs/interfaces/AccessDeviceConfigEntryInterface.md +++ /dev/null @@ -1,63 +0,0 @@ -[unifi-access](../README.md) / [Exports](../modules.md) / AccessDeviceConfigEntryInterface - -# Interface: AccessDeviceConfigEntryInterface - -## Table of contents - -### Properties - -- [device\_id](AccessDeviceConfigEntryInterface.md#device_id) -- [key](AccessDeviceConfigEntryInterface.md#key) -- [source](AccessDeviceConfigEntryInterface.md#source) -- [tag](AccessDeviceConfigEntryInterface.md#tag) -- [value](AccessDeviceConfigEntryInterface.md#value) - -## Properties - -### device\_id - -• **device\_id**: `string` - -#### Defined in - -src/access-types.ts:8 - -___ - -### key - -• **key**: `string` - -#### Defined in - -src/access-types.ts:9 - -___ - -### source - -• **source**: `string` - -#### Defined in - -src/access-types.ts:10 - -___ - -### tag - -• **tag**: `string` - -#### Defined in - -src/access-types.ts:11 - -___ - -### value - -• **value**: `string` - -#### Defined in - -src/access-types.ts:12 diff --git a/docs/interfaces/AccessDeviceConfigInterface.md b/docs/interfaces/AccessDeviceConfigInterface.md index 38a9ec0..01b7527 100644 --- a/docs/interfaces/AccessDeviceConfigInterface.md +++ b/docs/interfaces/AccessDeviceConfigInterface.md @@ -7,25 +7,30 @@ ### Properties - [adopt\_time](AccessDeviceConfigInterface.md#adopt_time) +- [adopting](AccessDeviceConfigInterface.md#adopting) - [alias](AccessDeviceConfigInterface.md#alias) - [bom\_rev](AccessDeviceConfigInterface.md#bom_rev) - [capabilities](AccessDeviceConfigInterface.md#capabilities) - [configs](AccessDeviceConfigInterface.md#configs) - [connected\_uah\_id](AccessDeviceConfigInterface.md#connected_uah_id) - [device\_type](AccessDeviceConfigInterface.md#device_type) +- [display\_model](AccessDeviceConfigInterface.md#display_model) +- [door](AccessDeviceConfigInterface.md#door) - [firmware](AccessDeviceConfigInterface.md#firmware) - [firmware\_update\_time](AccessDeviceConfigInterface.md#firmware_update_time) +- [floor](AccessDeviceConfigInterface.md#floor) - [guid](AccessDeviceConfigInterface.md#guid) - [hw\_type](AccessDeviceConfigInterface.md#hw_type) +- [images](AccessDeviceConfigInterface.md#images) - [ip](AccessDeviceConfigInterface.md#ip) - [is\_adopted](AccessDeviceConfigInterface.md#is_adopted) - [is\_connected](AccessDeviceConfigInterface.md#is_connected) - [is\_managed](AccessDeviceConfigInterface.md#is_managed) - [is\_online](AccessDeviceConfigInterface.md#is_online) -- [is\_revision\_up\_to\_date](AccessDeviceConfigInterface.md#is_revision_up_to_date) - [location](AccessDeviceConfigInterface.md#location) - [location\_id](AccessDeviceConfigInterface.md#location_id) - [mac](AccessDeviceConfigInterface.md#mac) +- [model](AccessDeviceConfigInterface.md#model) - [name](AccessDeviceConfigInterface.md#name) - [need\_advisory](AccessDeviceConfigInterface.md#need_advisory) - [resource\_name](AccessDeviceConfigInterface.md#resource_name) @@ -36,6 +41,7 @@ - [start\_time](AccessDeviceConfigInterface.md#start_time) - [unique\_id](AccessDeviceConfigInterface.md#unique_id) - [update](AccessDeviceConfigInterface.md#update) +- [update\_manual](AccessDeviceConfigInterface.md#update_manual) - [version](AccessDeviceConfigInterface.md#version) - [version\_update\_time](AccessDeviceConfigInterface.md#version_update_time) @@ -47,7 +53,17 @@ #### Defined in -src/access-types.ts:18 +[src/access-types.ts:40](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L40) + +___ + +### adopting + +• **adopting**: `boolean` + +#### Defined in + +[src/access-types.ts:41](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L41) ___ @@ -57,7 +73,7 @@ ___ #### Defined in -src/access-types.ts:19 +[src/access-types.ts:42](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L42) ___ @@ -67,7 +83,7 @@ ___ #### Defined in -src/access-types.ts:20 +[src/access-types.ts:43](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L43) ___ @@ -77,17 +93,17 @@ ___ #### Defined in -src/access-types.ts:21 +[src/access-types.ts:44](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L44) ___ ### configs -• **configs**: [`AccessDeviceConfigEntryInterface`](AccessDeviceConfigEntryInterface.md)[] +• **configs**: [`AccessDeviceEntryConfigInterface`](AccessDeviceEntryConfigInterface.md)[] #### Defined in -src/access-types.ts:22 +[src/access-types.ts:48](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L48) ___ @@ -97,7 +113,7 @@ ___ #### Defined in -src/access-types.ts:23 +[src/access-types.ts:45](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L45) ___ @@ -107,7 +123,43 @@ ___ #### Defined in -src/access-types.ts:24 +[src/access-types.ts:46](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L46) + +___ + +### display\_model + +• **display\_model**: `string` + +#### Defined in + +[src/access-types.ts:47](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L47) + +___ + +### door + +• **door**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `extra_type` | `string` | +| `extras` | [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) | +| `full_name` | `string` | +| `level` | `number` | +| `location_type` | `string` | +| `name` | `string` | +| `timezone` | `string` | +| `unique_id` | `string` | +| `up_id` | `string` | +| `work_time` | `string`[] | +| `work_time_id` | `string` | + +#### Defined in + +[src/access-types.ts:49](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L49) ___ @@ -117,7 +169,7 @@ ___ #### Defined in -src/access-types.ts:25 +[src/access-types.ts:64](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L64) ___ @@ -127,7 +179,33 @@ ___ #### Defined in -src/access-types.ts:26 +[src/access-types.ts:63](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L63) + +___ + +### floor + +• **floor**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `extra_type` | `string` | +| `extras` | [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) | +| `full_name` | `string` | +| `level` | `number` | +| `location_type` | `string` | +| `name` | `string` | +| `timezone` | `string` | +| `unique_id` | `string` | +| `up_id` | `string` | +| `work_time` | `string`[] | +| `work_time_id` | `string` | + +#### Defined in + +[src/access-types.ts:65](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L65) ___ @@ -137,7 +215,7 @@ ___ #### Defined in -src/access-types.ts:27 +[src/access-types.ts:79](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L79) ___ @@ -147,7 +225,27 @@ ___ #### Defined in -src/access-types.ts:28 +[src/access-types.ts:80](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L80) + +___ + +### images + +• **images**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `l` | `string` | +| `m` | `string` | +| `s` | `string` | +| `xl` | `string` | +| `xs` | `string` | + +#### Defined in + +[src/access-types.ts:81](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L81) ___ @@ -157,7 +255,7 @@ ___ #### Defined in -src/access-types.ts:29 +[src/access-types.ts:89](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L89) ___ @@ -167,7 +265,7 @@ ___ #### Defined in -src/access-types.ts:30 +[src/access-types.ts:90](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L90) ___ @@ -177,7 +275,7 @@ ___ #### Defined in -src/access-types.ts:31 +[src/access-types.ts:91](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L91) ___ @@ -187,7 +285,7 @@ ___ #### Defined in -src/access-types.ts:32 +[src/access-types.ts:92](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L92) ___ @@ -197,17 +295,7 @@ ___ #### Defined in -src/access-types.ts:33 - -___ - -### is\_revision\_up\_to\_date - -• **is\_revision\_up\_to\_date**: `boolean` - -#### Defined in - -src/access-types.ts:34 +[src/access-types.ts:93](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L93) ___ @@ -220,12 +308,7 @@ ___ | Name | Type | | :------ | :------ | | `extra_type` | `string` | -| `extras` | \{ `door_thumbnail`: `string` ; `door_thumbnail_last_update`: `number` ; `uah-input_state_dps`: `string` ; `uah-wiring_state_dps-neg`: `string` ; `uah-wiring_state_dps-pos`: `string` } | -| `extras.door_thumbnail` | `string` | -| `extras.door_thumbnail_last_update` | `number` | -| `extras.uah-input_state_dps` | `string` | -| `extras.uah-wiring_state_dps-neg` | `string` | -| `extras.uah-wiring_state_dps-pos` | `string` | +| `extras` | [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) | | `full_name` | `string` | | `level` | `number` | | `location_type` | `string` | @@ -233,12 +316,12 @@ ___ | `timezone` | `string` | | `unique_id` | `string` | | `up_id` | `string` | -| `work_time` | `string` | +| `work_time` | `string`[] | | `work_time_id` | `string` | #### Defined in -src/access-types.ts:35 +[src/access-types.ts:94](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L94) ___ @@ -248,7 +331,7 @@ ___ #### Defined in -src/access-types.ts:54 +[src/access-types.ts:108](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L108) ___ @@ -258,7 +341,17 @@ ___ #### Defined in -src/access-types.ts:55 +[src/access-types.ts:109](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L109) + +___ + +### model + +• **model**: `string` + +#### Defined in + +[src/access-types.ts:110](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L110) ___ @@ -268,7 +361,7 @@ ___ #### Defined in -src/access-types.ts:56 +[src/access-types.ts:111](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L111) ___ @@ -278,7 +371,7 @@ ___ #### Defined in -src/access-types.ts:57 +[src/access-types.ts:112](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L112) ___ @@ -288,17 +381,17 @@ ___ #### Defined in -src/access-types.ts:58 +[src/access-types.ts:113](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L113) ___ ### revision -• **revision**: `string` +• **revision**: `number` #### Defined in -src/access-types.ts:59 +[src/access-types.ts:115](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L115) ___ @@ -308,7 +401,7 @@ ___ #### Defined in -src/access-types.ts:60 +[src/access-types.ts:114](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L114) ___ @@ -318,7 +411,7 @@ ___ #### Defined in -src/access-types.ts:61 +[src/access-types.ts:116](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L116) ___ @@ -328,7 +421,7 @@ ___ #### Defined in -src/access-types.ts:62 +[src/access-types.ts:117](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L117) ___ @@ -338,7 +431,7 @@ ___ #### Defined in -src/access-types.ts:63 +[src/access-types.ts:118](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L118) ___ @@ -348,7 +441,7 @@ ___ #### Defined in -src/access-types.ts:64 +[src/access-types.ts:119](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L119) ___ @@ -358,7 +451,35 @@ ___ #### Defined in -src/access-types.ts:65 +[src/access-types.ts:120](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L120) + +___ + +### update\_manual + +• **update\_manual**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `device_version_upgrade_status` | \{ `completed`: `boolean` ; `failed`: `boolean` ; `failure_reason`: `string` ; `is_downloading`: `boolean` ; `is_upgrading`: `boolean` ; `is_waiting`: `boolean` ; `timed_out`: `boolean` ; `upgrade_seconds`: `number` } | +| `device_version_upgrade_status.completed` | `boolean` | +| `device_version_upgrade_status.failed` | `boolean` | +| `device_version_upgrade_status.failure_reason` | `string` | +| `device_version_upgrade_status.is_downloading` | `boolean` | +| `device_version_upgrade_status.is_upgrading` | `boolean` | +| `device_version_upgrade_status.is_waiting` | `boolean` | +| `device_version_upgrade_status.timed_out` | `boolean` | +| `device_version_upgrade_status.upgrade_seconds` | `number` | +| `from_version` | `string` | +| `last_upgrade_failure_reason` | `string` | +| `last_upgrade_start_time` | `string` | +| `last_upgrade_success` | `string` | + +#### Defined in + +[src/access-types.ts:121](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L121) ___ @@ -368,7 +489,7 @@ ___ #### Defined in -src/access-types.ts:66 +[src/access-types.ts:141](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L141) ___ @@ -378,4 +499,4 @@ ___ #### Defined in -src/access-types.ts:67 +[src/access-types.ts:140](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L140) diff --git a/docs/interfaces/AccessDeviceConfigPayload.md b/docs/interfaces/AccessDeviceConfigPayload.md index b4f11a0..4845ea7 100644 --- a/docs/interfaces/AccessDeviceConfigPayload.md +++ b/docs/interfaces/AccessDeviceConfigPayload.md @@ -7,25 +7,30 @@ ### Properties - [adopt\_time](AccessDeviceConfigPayload.md#adopt_time) +- [adopting](AccessDeviceConfigPayload.md#adopting) - [alias](AccessDeviceConfigPayload.md#alias) - [bom\_rev](AccessDeviceConfigPayload.md#bom_rev) - [capabilities](AccessDeviceConfigPayload.md#capabilities) - [configs](AccessDeviceConfigPayload.md#configs) - [connected\_uah\_id](AccessDeviceConfigPayload.md#connected_uah_id) - [device\_type](AccessDeviceConfigPayload.md#device_type) +- [display\_model](AccessDeviceConfigPayload.md#display_model) +- [door](AccessDeviceConfigPayload.md#door) - [firmware](AccessDeviceConfigPayload.md#firmware) - [firmware\_update\_time](AccessDeviceConfigPayload.md#firmware_update_time) +- [floor](AccessDeviceConfigPayload.md#floor) - [guid](AccessDeviceConfigPayload.md#guid) - [hw\_type](AccessDeviceConfigPayload.md#hw_type) +- [images](AccessDeviceConfigPayload.md#images) - [ip](AccessDeviceConfigPayload.md#ip) - [is\_adopted](AccessDeviceConfigPayload.md#is_adopted) - [is\_connected](AccessDeviceConfigPayload.md#is_connected) - [is\_managed](AccessDeviceConfigPayload.md#is_managed) - [is\_online](AccessDeviceConfigPayload.md#is_online) -- [is\_revision\_up\_to\_date](AccessDeviceConfigPayload.md#is_revision_up_to_date) - [location](AccessDeviceConfigPayload.md#location) - [location\_id](AccessDeviceConfigPayload.md#location_id) - [mac](AccessDeviceConfigPayload.md#mac) +- [model](AccessDeviceConfigPayload.md#model) - [name](AccessDeviceConfigPayload.md#name) - [need\_advisory](AccessDeviceConfigPayload.md#need_advisory) - [resource\_name](AccessDeviceConfigPayload.md#resource_name) @@ -36,6 +41,7 @@ - [start\_time](AccessDeviceConfigPayload.md#start_time) - [unique\_id](AccessDeviceConfigPayload.md#unique_id) - [update](AccessDeviceConfigPayload.md#update) +- [update\_manual](AccessDeviceConfigPayload.md#update_manual) - [version](AccessDeviceConfigPayload.md#version) - [version\_update\_time](AccessDeviceConfigPayload.md#version_update_time) @@ -47,7 +53,17 @@ #### Defined in -src/access-types.ts:18 +[src/access-types.ts:40](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L40) + +___ + +### adopting + +• `Optional` **adopting**: `DeepPartial`\<`boolean`\> + +#### Defined in + +[src/access-types.ts:41](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L41) ___ @@ -57,7 +73,7 @@ ___ #### Defined in -src/access-types.ts:19 +[src/access-types.ts:42](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L42) ___ @@ -67,7 +83,7 @@ ___ #### Defined in -src/access-types.ts:20 +[src/access-types.ts:43](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L43) ___ @@ -77,17 +93,17 @@ ___ #### Defined in -src/access-types.ts:21 +[src/access-types.ts:44](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L44) ___ ### configs -• `Optional` **configs**: `DeepPartial`\<[`AccessDeviceConfigEntryInterface`](AccessDeviceConfigEntryInterface.md)\>[] +• `Optional` **configs**: `DeepPartial`\<[`AccessDeviceEntryConfigInterface`](AccessDeviceEntryConfigInterface.md)\>[] #### Defined in -src/access-types.ts:22 +[src/access-types.ts:48](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L48) ___ @@ -97,7 +113,7 @@ ___ #### Defined in -src/access-types.ts:23 +[src/access-types.ts:45](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L45) ___ @@ -107,7 +123,27 @@ ___ #### Defined in -src/access-types.ts:24 +[src/access-types.ts:46](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L46) + +___ + +### display\_model + +• `Optional` **display\_model**: `string` + +#### Defined in + +[src/access-types.ts:47](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L47) + +___ + +### door + +• `Optional` **door**: `DeepPartial`\<\{ `extra_type`: `string` ; `extras`: [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) ; `full_name`: `string` ; `level`: `number` ; `location_type`: `string` ; `name`: `string` ; `timezone`: `string` ; `unique_id`: `string` ; `up_id`: `string` ; `work_time`: `string`[] ; `work_time_id`: `string` }\> + +#### Defined in + +[src/access-types.ts:49](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L49) ___ @@ -117,7 +153,7 @@ ___ #### Defined in -src/access-types.ts:25 +[src/access-types.ts:64](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L64) ___ @@ -127,7 +163,17 @@ ___ #### Defined in -src/access-types.ts:26 +[src/access-types.ts:63](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L63) + +___ + +### floor + +• `Optional` **floor**: `DeepPartial`\<\{ `extra_type`: `string` ; `extras`: [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) ; `full_name`: `string` ; `level`: `number` ; `location_type`: `string` ; `name`: `string` ; `timezone`: `string` ; `unique_id`: `string` ; `up_id`: `string` ; `work_time`: `string`[] ; `work_time_id`: `string` }\> + +#### Defined in + +[src/access-types.ts:65](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L65) ___ @@ -137,7 +183,7 @@ ___ #### Defined in -src/access-types.ts:27 +[src/access-types.ts:79](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L79) ___ @@ -147,7 +193,17 @@ ___ #### Defined in -src/access-types.ts:28 +[src/access-types.ts:80](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L80) + +___ + +### images + +• `Optional` **images**: `DeepPartial`\<\{ `l`: `string` ; `m`: `string` ; `s`: `string` ; `xl`: `string` ; `xs`: `string` }\> + +#### Defined in + +[src/access-types.ts:81](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L81) ___ @@ -157,7 +213,7 @@ ___ #### Defined in -src/access-types.ts:29 +[src/access-types.ts:89](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L89) ___ @@ -167,7 +223,7 @@ ___ #### Defined in -src/access-types.ts:30 +[src/access-types.ts:90](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L90) ___ @@ -177,7 +233,7 @@ ___ #### Defined in -src/access-types.ts:31 +[src/access-types.ts:91](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L91) ___ @@ -187,7 +243,7 @@ ___ #### Defined in -src/access-types.ts:32 +[src/access-types.ts:92](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L92) ___ @@ -197,47 +253,47 @@ ___ #### Defined in -src/access-types.ts:33 +[src/access-types.ts:93](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L93) ___ -### is\_revision\_up\_to\_date +### location -• `Optional` **is\_revision\_up\_to\_date**: `DeepPartial`\<`boolean`\> +• `Optional` **location**: `DeepPartial`\<\{ `extra_type`: `string` ; `extras`: [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) ; `full_name`: `string` ; `level`: `number` ; `location_type`: `string` ; `name`: `string` ; `timezone`: `string` ; `unique_id`: `string` ; `up_id`: `string` ; `work_time`: `string`[] ; `work_time_id`: `string` }\> #### Defined in -src/access-types.ts:34 +[src/access-types.ts:94](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L94) ___ -### location +### location\_id -• `Optional` **location**: `DeepPartial`\<\{ `extra_type`: `string` ; `extras`: \{ `door_thumbnail`: `string` ; `door_thumbnail_last_update`: `number` ; `uah-input_state_dps`: `string` ; `uah-wiring_state_dps-neg`: `string` ; `uah-wiring_state_dps-pos`: `string` } ; `full_name`: `string` ; `level`: `number` ; `location_type`: `string` ; `name`: `string` ; `timezone`: `string` ; `unique_id`: `string` ; `up_id`: `string` ; `work_time`: `string` ; `work_time_id`: `string` }\> +• `Optional` **location\_id**: `string` #### Defined in -src/access-types.ts:35 +[src/access-types.ts:108](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L108) ___ -### location\_id +### mac -• `Optional` **location\_id**: `string` +• `Optional` **mac**: `string` #### Defined in -src/access-types.ts:54 +[src/access-types.ts:109](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L109) ___ -### mac +### model -• `Optional` **mac**: `string` +• `Optional` **model**: `string` #### Defined in -src/access-types.ts:55 +[src/access-types.ts:110](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L110) ___ @@ -247,7 +303,7 @@ ___ #### Defined in -src/access-types.ts:56 +[src/access-types.ts:111](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L111) ___ @@ -257,7 +313,7 @@ ___ #### Defined in -src/access-types.ts:57 +[src/access-types.ts:112](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L112) ___ @@ -267,17 +323,17 @@ ___ #### Defined in -src/access-types.ts:58 +[src/access-types.ts:113](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L113) ___ ### revision -• `Optional` **revision**: `string` +• `Optional` **revision**: `number` #### Defined in -src/access-types.ts:59 +[src/access-types.ts:115](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L115) ___ @@ -287,7 +343,7 @@ ___ #### Defined in -src/access-types.ts:60 +[src/access-types.ts:114](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L114) ___ @@ -297,7 +353,7 @@ ___ #### Defined in -src/access-types.ts:61 +[src/access-types.ts:116](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L116) ___ @@ -307,7 +363,7 @@ ___ #### Defined in -src/access-types.ts:62 +[src/access-types.ts:117](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L117) ___ @@ -317,7 +373,7 @@ ___ #### Defined in -src/access-types.ts:63 +[src/access-types.ts:118](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L118) ___ @@ -327,7 +383,7 @@ ___ #### Defined in -src/access-types.ts:64 +[src/access-types.ts:119](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L119) ___ @@ -337,7 +393,17 @@ ___ #### Defined in -src/access-types.ts:65 +[src/access-types.ts:120](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L120) + +___ + +### update\_manual + +• `Optional` **update\_manual**: `DeepPartial`\<\{ `device_version_upgrade_status`: \{ `completed`: `boolean` ; `failed`: `boolean` ; `failure_reason`: `string` ; `is_downloading`: `boolean` ; `is_upgrading`: `boolean` ; `is_waiting`: `boolean` ; `timed_out`: `boolean` ; `upgrade_seconds`: `number` } ; `from_version`: `string` ; `last_upgrade_failure_reason`: `string` ; `last_upgrade_start_time`: `string` ; `last_upgrade_success`: `string` }\> + +#### Defined in + +[src/access-types.ts:121](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L121) ___ @@ -347,7 +413,7 @@ ___ #### Defined in -src/access-types.ts:66 +[src/access-types.ts:141](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L141) ___ @@ -357,4 +423,4 @@ ___ #### Defined in -src/access-types.ts:67 +[src/access-types.ts:140](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L140) diff --git a/docs/interfaces/AccessDeviceEntryConfig.md b/docs/interfaces/AccessDeviceEntryConfig.md new file mode 100644 index 0000000..61ecf5b --- /dev/null +++ b/docs/interfaces/AccessDeviceEntryConfig.md @@ -0,0 +1,63 @@ +[unifi-access](../README.md) / [Exports](../modules.md) / AccessDeviceEntryConfig + +# Interface: AccessDeviceEntryConfig + +## Table of contents + +### Properties + +- [device\_id](AccessDeviceEntryConfig.md#device_id) +- [key](AccessDeviceEntryConfig.md#key) +- [source](AccessDeviceEntryConfig.md#source) +- [tag](AccessDeviceEntryConfig.md#tag) +- [value](AccessDeviceEntryConfig.md#value) + +## Properties + +### device\_id + +• `Readonly` **device\_id**: `string` + +#### Defined in + +[src/access-types.ts:147](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L147) + +___ + +### key + +• `Readonly` **key**: `string` + +#### Defined in + +[src/access-types.ts:148](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L148) + +___ + +### source + +• `Readonly` **source**: `string` + +#### Defined in + +[src/access-types.ts:149](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L149) + +___ + +### tag + +• `Readonly` **tag**: `string` + +#### Defined in + +[src/access-types.ts:150](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L150) + +___ + +### value + +• `Readonly` **value**: `string` + +#### Defined in + +[src/access-types.ts:151](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L151) diff --git a/docs/interfaces/AccessDeviceEntryConfigInterface.md b/docs/interfaces/AccessDeviceEntryConfigInterface.md new file mode 100644 index 0000000..aa47fe9 --- /dev/null +++ b/docs/interfaces/AccessDeviceEntryConfigInterface.md @@ -0,0 +1,63 @@ +[unifi-access](../README.md) / [Exports](../modules.md) / AccessDeviceEntryConfigInterface + +# Interface: AccessDeviceEntryConfigInterface + +## Table of contents + +### Properties + +- [device\_id](AccessDeviceEntryConfigInterface.md#device_id) +- [key](AccessDeviceEntryConfigInterface.md#key) +- [source](AccessDeviceEntryConfigInterface.md#source) +- [tag](AccessDeviceEntryConfigInterface.md#tag) +- [value](AccessDeviceEntryConfigInterface.md#value) + +## Properties + +### device\_id + +• **device\_id**: `string` + +#### Defined in + +[src/access-types.ts:147](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L147) + +___ + +### key + +• **key**: `string` + +#### Defined in + +[src/access-types.ts:148](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L148) + +___ + +### source + +• **source**: `string` + +#### Defined in + +[src/access-types.ts:149](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L149) + +___ + +### tag + +• **tag**: `string` + +#### Defined in + +[src/access-types.ts:150](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L150) + +___ + +### value + +• **value**: `string` + +#### Defined in + +[src/access-types.ts:151](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L151) diff --git a/docs/interfaces/AccessDeviceEntryConfigPayload.md b/docs/interfaces/AccessDeviceEntryConfigPayload.md new file mode 100644 index 0000000..67d4cca --- /dev/null +++ b/docs/interfaces/AccessDeviceEntryConfigPayload.md @@ -0,0 +1,63 @@ +[unifi-access](../README.md) / [Exports](../modules.md) / AccessDeviceEntryConfigPayload + +# Interface: AccessDeviceEntryConfigPayload + +## Table of contents + +### Properties + +- [device\_id](AccessDeviceEntryConfigPayload.md#device_id) +- [key](AccessDeviceEntryConfigPayload.md#key) +- [source](AccessDeviceEntryConfigPayload.md#source) +- [tag](AccessDeviceEntryConfigPayload.md#tag) +- [value](AccessDeviceEntryConfigPayload.md#value) + +## Properties + +### device\_id + +• `Optional` **device\_id**: `string` + +#### Defined in + +[src/access-types.ts:147](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L147) + +___ + +### key + +• `Optional` **key**: `string` + +#### Defined in + +[src/access-types.ts:148](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L148) + +___ + +### source + +• `Optional` **source**: `string` + +#### Defined in + +[src/access-types.ts:149](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L149) + +___ + +### tag + +• `Optional` **tag**: `string` + +#### Defined in + +[src/access-types.ts:150](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L150) + +___ + +### value + +• `Optional` **value**: `string` + +#### Defined in + +[src/access-types.ts:151](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L151) diff --git a/docs/interfaces/AccessDeviceExtrasConfigInterface.md b/docs/interfaces/AccessDeviceExtrasConfigInterface.md new file mode 100644 index 0000000..a6ab8ad --- /dev/null +++ b/docs/interfaces/AccessDeviceExtrasConfigInterface.md @@ -0,0 +1,63 @@ +[unifi-access](../README.md) / [Exports](../modules.md) / AccessDeviceExtrasConfigInterface + +# Interface: AccessDeviceExtrasConfigInterface + +## Table of contents + +### Properties + +- [door\_thumbnail](AccessDeviceExtrasConfigInterface.md#door_thumbnail) +- [door\_thumbnail\_last\_update](AccessDeviceExtrasConfigInterface.md#door_thumbnail_last_update) +- [uah-input\_state\_dps](AccessDeviceExtrasConfigInterface.md#uah-input_state_dps) +- [uah-wiring\_state\_dps-neg](AccessDeviceExtrasConfigInterface.md#uah-wiring_state_dps-neg) +- [uah-wiring\_state\_dps-pos](AccessDeviceExtrasConfigInterface.md#uah-wiring_state_dps-pos) + +## Properties + +### door\_thumbnail + +• **door\_thumbnail**: `string` + +#### Defined in + +[src/access-types.ts:157](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L157) + +___ + +### door\_thumbnail\_last\_update + +• **door\_thumbnail\_last\_update**: `number` + +#### Defined in + +[src/access-types.ts:158](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L158) + +___ + +### uah-input\_state\_dps + +• **uah-input\_state\_dps**: `boolean` + +#### Defined in + +[src/access-types.ts:159](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L159) + +___ + +### uah-wiring\_state\_dps-neg + +• **uah-wiring\_state\_dps-neg**: `boolean` + +#### Defined in + +[src/access-types.ts:160](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L160) + +___ + +### uah-wiring\_state\_dps-pos + +• **uah-wiring\_state\_dps-pos**: `boolean` + +#### Defined in + +[src/access-types.ts:161](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L161) diff --git a/docs/interfaces/AccessDoorConfig.md b/docs/interfaces/AccessDoorConfig.md new file mode 100644 index 0000000..e58ce99 --- /dev/null +++ b/docs/interfaces/AccessDoorConfig.md @@ -0,0 +1,173 @@ +[unifi-access](../README.md) / [Exports](../modules.md) / AccessDoorConfig + +# Interface: AccessDoorConfig + +## Table of contents + +### Properties + +- [camera\_resource\_ids](AccessDoorConfig.md#camera_resource_ids) +- [device\_groups](AccessDoorConfig.md#device_groups) +- [door\_guard](AccessDoorConfig.md#door_guard) +- [extra\_type](AccessDoorConfig.md#extra_type) +- [extras](AccessDoorConfig.md#extras) +- [full\_name](AccessDoorConfig.md#full_name) +- [hotel\_devices](AccessDoorConfig.md#hotel_devices) +- [level](AccessDoorConfig.md#level) +- [location\_type](AccessDoorConfig.md#location_type) +- [name](AccessDoorConfig.md#name) +- [timezone](AccessDoorConfig.md#timezone) +- [unique\_id](AccessDoorConfig.md#unique_id) +- [up\_id](AccessDoorConfig.md#up_id) +- [work\_time](AccessDoorConfig.md#work_time) +- [work\_time\_id](AccessDoorConfig.md#work_time_id) + +## Properties + +### camera\_resource\_ids + +• `Readonly` **camera\_resource\_ids**: `string`[] + +#### Defined in + +[src/access-types.ts:167](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L167) + +___ + +### device\_groups + +• `Readonly` **device\_groups**: [`AccessDeviceConfigInterface`](AccessDeviceConfigInterface.md)[] + +#### Defined in + +[src/access-types.ts:168](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L168) + +___ + +### door\_guard + +• `Readonly` **door\_guard**: `string`[] + +#### Defined in + +[src/access-types.ts:169](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L169) + +___ + +### extra\_type + +• `Readonly` **extra\_type**: `string` + +#### Defined in + +[src/access-types.ts:170](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L170) + +___ + +### extras + +• `Readonly` **extras**: [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) + +#### Defined in + +[src/access-types.ts:171](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L171) + +___ + +### full\_name + +• `Readonly` **full\_name**: `string` + +#### Defined in + +[src/access-types.ts:172](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L172) + +___ + +### hotel\_devices + +• `Readonly` **hotel\_devices**: `string`[] + +#### Defined in + +[src/access-types.ts:173](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L173) + +___ + +### level + +• `Readonly` **level**: `number` + +#### Defined in + +[src/access-types.ts:174](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L174) + +___ + +### location\_type + +• `Readonly` **location\_type**: `string` + +#### Defined in + +[src/access-types.ts:175](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L175) + +___ + +### name + +• `Readonly` **name**: `string` + +#### Defined in + +[src/access-types.ts:176](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L176) + +___ + +### timezone + +• `Readonly` **timezone**: `string` + +#### Defined in + +[src/access-types.ts:177](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L177) + +___ + +### unique\_id + +• `Readonly` **unique\_id**: `string` + +#### Defined in + +[src/access-types.ts:178](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L178) + +___ + +### up\_id + +• `Readonly` **up\_id**: `string` + +#### Defined in + +[src/access-types.ts:179](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L179) + +___ + +### work\_time + +• `Readonly` **work\_time**: `string`[] + +#### Defined in + +[src/access-types.ts:181](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L181) + +___ + +### work\_time\_id + +• `Readonly` **work\_time\_id**: `string` + +#### Defined in + +[src/access-types.ts:180](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L180) diff --git a/docs/interfaces/AccessDoorConfigInterface.md b/docs/interfaces/AccessDoorConfigInterface.md new file mode 100644 index 0000000..ba2ef0a --- /dev/null +++ b/docs/interfaces/AccessDoorConfigInterface.md @@ -0,0 +1,173 @@ +[unifi-access](../README.md) / [Exports](../modules.md) / AccessDoorConfigInterface + +# Interface: AccessDoorConfigInterface + +## Table of contents + +### Properties + +- [camera\_resource\_ids](AccessDoorConfigInterface.md#camera_resource_ids) +- [device\_groups](AccessDoorConfigInterface.md#device_groups) +- [door\_guard](AccessDoorConfigInterface.md#door_guard) +- [extra\_type](AccessDoorConfigInterface.md#extra_type) +- [extras](AccessDoorConfigInterface.md#extras) +- [full\_name](AccessDoorConfigInterface.md#full_name) +- [hotel\_devices](AccessDoorConfigInterface.md#hotel_devices) +- [level](AccessDoorConfigInterface.md#level) +- [location\_type](AccessDoorConfigInterface.md#location_type) +- [name](AccessDoorConfigInterface.md#name) +- [timezone](AccessDoorConfigInterface.md#timezone) +- [unique\_id](AccessDoorConfigInterface.md#unique_id) +- [up\_id](AccessDoorConfigInterface.md#up_id) +- [work\_time](AccessDoorConfigInterface.md#work_time) +- [work\_time\_id](AccessDoorConfigInterface.md#work_time_id) + +## Properties + +### camera\_resource\_ids + +• **camera\_resource\_ids**: `string`[] + +#### Defined in + +[src/access-types.ts:167](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L167) + +___ + +### device\_groups + +• **device\_groups**: [`AccessDeviceConfigInterface`](AccessDeviceConfigInterface.md)[] + +#### Defined in + +[src/access-types.ts:168](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L168) + +___ + +### door\_guard + +• **door\_guard**: `string`[] + +#### Defined in + +[src/access-types.ts:169](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L169) + +___ + +### extra\_type + +• **extra\_type**: `string` + +#### Defined in + +[src/access-types.ts:170](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L170) + +___ + +### extras + +• **extras**: [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) + +#### Defined in + +[src/access-types.ts:171](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L171) + +___ + +### full\_name + +• **full\_name**: `string` + +#### Defined in + +[src/access-types.ts:172](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L172) + +___ + +### hotel\_devices + +• **hotel\_devices**: `string`[] + +#### Defined in + +[src/access-types.ts:173](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L173) + +___ + +### level + +• **level**: `number` + +#### Defined in + +[src/access-types.ts:174](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L174) + +___ + +### location\_type + +• **location\_type**: `string` + +#### Defined in + +[src/access-types.ts:175](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L175) + +___ + +### name + +• **name**: `string` + +#### Defined in + +[src/access-types.ts:176](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L176) + +___ + +### timezone + +• **timezone**: `string` + +#### Defined in + +[src/access-types.ts:177](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L177) + +___ + +### unique\_id + +• **unique\_id**: `string` + +#### Defined in + +[src/access-types.ts:178](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L178) + +___ + +### up\_id + +• **up\_id**: `string` + +#### Defined in + +[src/access-types.ts:179](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L179) + +___ + +### work\_time + +• **work\_time**: `string`[] + +#### Defined in + +[src/access-types.ts:181](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L181) + +___ + +### work\_time\_id + +• **work\_time\_id**: `string` + +#### Defined in + +[src/access-types.ts:180](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L180) diff --git a/docs/interfaces/AccessDoorConfigPayload.md b/docs/interfaces/AccessDoorConfigPayload.md new file mode 100644 index 0000000..ae39300 --- /dev/null +++ b/docs/interfaces/AccessDoorConfigPayload.md @@ -0,0 +1,173 @@ +[unifi-access](../README.md) / [Exports](../modules.md) / AccessDoorConfigPayload + +# Interface: AccessDoorConfigPayload + +## Table of contents + +### Properties + +- [camera\_resource\_ids](AccessDoorConfigPayload.md#camera_resource_ids) +- [device\_groups](AccessDoorConfigPayload.md#device_groups) +- [door\_guard](AccessDoorConfigPayload.md#door_guard) +- [extra\_type](AccessDoorConfigPayload.md#extra_type) +- [extras](AccessDoorConfigPayload.md#extras) +- [full\_name](AccessDoorConfigPayload.md#full_name) +- [hotel\_devices](AccessDoorConfigPayload.md#hotel_devices) +- [level](AccessDoorConfigPayload.md#level) +- [location\_type](AccessDoorConfigPayload.md#location_type) +- [name](AccessDoorConfigPayload.md#name) +- [timezone](AccessDoorConfigPayload.md#timezone) +- [unique\_id](AccessDoorConfigPayload.md#unique_id) +- [up\_id](AccessDoorConfigPayload.md#up_id) +- [work\_time](AccessDoorConfigPayload.md#work_time) +- [work\_time\_id](AccessDoorConfigPayload.md#work_time_id) + +## Properties + +### camera\_resource\_ids + +• `Optional` **camera\_resource\_ids**: `string`[] + +#### Defined in + +[src/access-types.ts:167](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L167) + +___ + +### device\_groups + +• `Optional` **device\_groups**: `DeepPartial`\<[`AccessDeviceConfigInterface`](AccessDeviceConfigInterface.md)\>[] + +#### Defined in + +[src/access-types.ts:168](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L168) + +___ + +### door\_guard + +• `Optional` **door\_guard**: `string`[] + +#### Defined in + +[src/access-types.ts:169](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L169) + +___ + +### extra\_type + +• `Optional` **extra\_type**: `string` + +#### Defined in + +[src/access-types.ts:170](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L170) + +___ + +### extras + +• `Optional` **extras**: `DeepPartial`\<[`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md)\> + +#### Defined in + +[src/access-types.ts:171](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L171) + +___ + +### full\_name + +• `Optional` **full\_name**: `string` + +#### Defined in + +[src/access-types.ts:172](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L172) + +___ + +### hotel\_devices + +• `Optional` **hotel\_devices**: `string`[] + +#### Defined in + +[src/access-types.ts:173](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L173) + +___ + +### level + +• `Optional` **level**: `number` + +#### Defined in + +[src/access-types.ts:174](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L174) + +___ + +### location\_type + +• `Optional` **location\_type**: `string` + +#### Defined in + +[src/access-types.ts:175](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L175) + +___ + +### name + +• `Optional` **name**: `string` + +#### Defined in + +[src/access-types.ts:176](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L176) + +___ + +### timezone + +• `Optional` **timezone**: `string` + +#### Defined in + +[src/access-types.ts:177](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L177) + +___ + +### unique\_id + +• `Optional` **unique\_id**: `string` + +#### Defined in + +[src/access-types.ts:178](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L178) + +___ + +### up\_id + +• `Optional` **up\_id**: `string` + +#### Defined in + +[src/access-types.ts:179](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L179) + +___ + +### work\_time + +• `Optional` **work\_time**: `string`[] + +#### Defined in + +[src/access-types.ts:181](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L181) + +___ + +### work\_time\_id + +• `Optional` **work\_time\_id**: `string` + +#### Defined in + +[src/access-types.ts:180](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L180) diff --git a/docs/interfaces/AccessFloorConfig.md b/docs/interfaces/AccessFloorConfig.md new file mode 100644 index 0000000..3fa3643 --- /dev/null +++ b/docs/interfaces/AccessFloorConfig.md @@ -0,0 +1,140 @@ +[unifi-access](../README.md) / [Exports](../modules.md) / AccessFloorConfig + +# Interface: AccessFloorConfig + +## Table of contents + +### Properties + +- [doors](AccessFloorConfig.md#doors) +- [extra\_type](AccessFloorConfig.md#extra_type) +- [extras](AccessFloorConfig.md#extras) +- [full\_name](AccessFloorConfig.md#full_name) +- [level](AccessFloorConfig.md#level) +- [location\_type](AccessFloorConfig.md#location_type) +- [name](AccessFloorConfig.md#name) +- [timezone](AccessFloorConfig.md#timezone) +- [unique\_id](AccessFloorConfig.md#unique_id) +- [up\_id](AccessFloorConfig.md#up_id) +- [work\_time](AccessFloorConfig.md#work_time) +- [work\_time\_id](AccessFloorConfig.md#work_time_id) + +## Properties + +### doors + +• `Readonly` **doors**: [`AccessDoorConfigInterface`](AccessDoorConfigInterface.md)[] + +#### Defined in + +[src/access-types.ts:188](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L188) + +___ + +### extra\_type + +• `Readonly` **extra\_type**: `string` + +#### Defined in + +[src/access-types.ts:189](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L189) + +___ + +### extras + +• `Readonly` **extras**: [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) + +#### Defined in + +[src/access-types.ts:190](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L190) + +___ + +### full\_name + +• `Readonly` **full\_name**: `string` + +#### Defined in + +[src/access-types.ts:191](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L191) + +___ + +### level + +• `Readonly` **level**: `number` + +#### Defined in + +[src/access-types.ts:192](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L192) + +___ + +### location\_type + +• `Readonly` **location\_type**: `string` + +#### Defined in + +[src/access-types.ts:193](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L193) + +___ + +### name + +• `Readonly` **name**: `string` + +#### Defined in + +[src/access-types.ts:194](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L194) + +___ + +### timezone + +• `Readonly` **timezone**: `string` + +#### Defined in + +[src/access-types.ts:195](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L195) + +___ + +### unique\_id + +• `Readonly` **unique\_id**: `string` + +#### Defined in + +[src/access-types.ts:196](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L196) + +___ + +### up\_id + +• `Readonly` **up\_id**: `string` + +#### Defined in + +[src/access-types.ts:197](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L197) + +___ + +### work\_time + +• `Readonly` **work\_time**: `string`[] + +#### Defined in + +[src/access-types.ts:198](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L198) + +___ + +### work\_time\_id + +• `Readonly` **work\_time\_id**: `string` + +#### Defined in + +[src/access-types.ts:199](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L199) diff --git a/docs/interfaces/AccessFloorConfigInterface.md b/docs/interfaces/AccessFloorConfigInterface.md new file mode 100644 index 0000000..5778483 --- /dev/null +++ b/docs/interfaces/AccessFloorConfigInterface.md @@ -0,0 +1,140 @@ +[unifi-access](../README.md) / [Exports](../modules.md) / AccessFloorConfigInterface + +# Interface: AccessFloorConfigInterface + +## Table of contents + +### Properties + +- [doors](AccessFloorConfigInterface.md#doors) +- [extra\_type](AccessFloorConfigInterface.md#extra_type) +- [extras](AccessFloorConfigInterface.md#extras) +- [full\_name](AccessFloorConfigInterface.md#full_name) +- [level](AccessFloorConfigInterface.md#level) +- [location\_type](AccessFloorConfigInterface.md#location_type) +- [name](AccessFloorConfigInterface.md#name) +- [timezone](AccessFloorConfigInterface.md#timezone) +- [unique\_id](AccessFloorConfigInterface.md#unique_id) +- [up\_id](AccessFloorConfigInterface.md#up_id) +- [work\_time](AccessFloorConfigInterface.md#work_time) +- [work\_time\_id](AccessFloorConfigInterface.md#work_time_id) + +## Properties + +### doors + +• **doors**: [`AccessDoorConfigInterface`](AccessDoorConfigInterface.md)[] + +#### Defined in + +[src/access-types.ts:188](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L188) + +___ + +### extra\_type + +• **extra\_type**: `string` + +#### Defined in + +[src/access-types.ts:189](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L189) + +___ + +### extras + +• **extras**: [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) + +#### Defined in + +[src/access-types.ts:190](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L190) + +___ + +### full\_name + +• **full\_name**: `string` + +#### Defined in + +[src/access-types.ts:191](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L191) + +___ + +### level + +• **level**: `number` + +#### Defined in + +[src/access-types.ts:192](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L192) + +___ + +### location\_type + +• **location\_type**: `string` + +#### Defined in + +[src/access-types.ts:193](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L193) + +___ + +### name + +• **name**: `string` + +#### Defined in + +[src/access-types.ts:194](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L194) + +___ + +### timezone + +• **timezone**: `string` + +#### Defined in + +[src/access-types.ts:195](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L195) + +___ + +### unique\_id + +• **unique\_id**: `string` + +#### Defined in + +[src/access-types.ts:196](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L196) + +___ + +### up\_id + +• **up\_id**: `string` + +#### Defined in + +[src/access-types.ts:197](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L197) + +___ + +### work\_time + +• **work\_time**: `string`[] + +#### Defined in + +[src/access-types.ts:198](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L198) + +___ + +### work\_time\_id + +• **work\_time\_id**: `string` + +#### Defined in + +[src/access-types.ts:199](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L199) diff --git a/docs/interfaces/AccessFloorConfigPayload.md b/docs/interfaces/AccessFloorConfigPayload.md new file mode 100644 index 0000000..ab711f9 --- /dev/null +++ b/docs/interfaces/AccessFloorConfigPayload.md @@ -0,0 +1,140 @@ +[unifi-access](../README.md) / [Exports](../modules.md) / AccessFloorConfigPayload + +# Interface: AccessFloorConfigPayload + +## Table of contents + +### Properties + +- [doors](AccessFloorConfigPayload.md#doors) +- [extra\_type](AccessFloorConfigPayload.md#extra_type) +- [extras](AccessFloorConfigPayload.md#extras) +- [full\_name](AccessFloorConfigPayload.md#full_name) +- [level](AccessFloorConfigPayload.md#level) +- [location\_type](AccessFloorConfigPayload.md#location_type) +- [name](AccessFloorConfigPayload.md#name) +- [timezone](AccessFloorConfigPayload.md#timezone) +- [unique\_id](AccessFloorConfigPayload.md#unique_id) +- [up\_id](AccessFloorConfigPayload.md#up_id) +- [work\_time](AccessFloorConfigPayload.md#work_time) +- [work\_time\_id](AccessFloorConfigPayload.md#work_time_id) + +## Properties + +### doors + +• `Optional` **doors**: `DeepPartial`\<[`AccessDoorConfigInterface`](AccessDoorConfigInterface.md)\>[] + +#### Defined in + +[src/access-types.ts:188](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L188) + +___ + +### extra\_type + +• `Optional` **extra\_type**: `string` + +#### Defined in + +[src/access-types.ts:189](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L189) + +___ + +### extras + +• `Optional` **extras**: `DeepPartial`\<[`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md)\> + +#### Defined in + +[src/access-types.ts:190](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L190) + +___ + +### full\_name + +• `Optional` **full\_name**: `string` + +#### Defined in + +[src/access-types.ts:191](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L191) + +___ + +### level + +• `Optional` **level**: `number` + +#### Defined in + +[src/access-types.ts:192](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L192) + +___ + +### location\_type + +• `Optional` **location\_type**: `string` + +#### Defined in + +[src/access-types.ts:193](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L193) + +___ + +### name + +• `Optional` **name**: `string` + +#### Defined in + +[src/access-types.ts:194](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L194) + +___ + +### timezone + +• `Optional` **timezone**: `string` + +#### Defined in + +[src/access-types.ts:195](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L195) + +___ + +### unique\_id + +• `Optional` **unique\_id**: `string` + +#### Defined in + +[src/access-types.ts:196](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L196) + +___ + +### up\_id + +• `Optional` **up\_id**: `string` + +#### Defined in + +[src/access-types.ts:197](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L197) + +___ + +### work\_time + +• `Optional` **work\_time**: `string`[] + +#### Defined in + +[src/access-types.ts:198](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L198) + +___ + +### work\_time\_id + +• `Optional` **work\_time\_id**: `string` + +#### Defined in + +[src/access-types.ts:199](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L199) diff --git a/docs/interfaces/AccessLogging.md b/docs/interfaces/AccessLogging.md index 7d552bd..8fb1877 100644 --- a/docs/interfaces/AccessLogging.md +++ b/docs/interfaces/AccessLogging.md @@ -30,7 +30,7 @@ #### Defined in -src/access-logging.ts:9 +[src/access-logging.ts:9](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-logging.ts#L9) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -src/access-logging.ts:10 +[src/access-logging.ts:10](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-logging.ts#L10) ___ @@ -72,7 +72,7 @@ ___ #### Defined in -src/access-logging.ts:11 +[src/access-logging.ts:11](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-logging.ts#L11) ___ @@ -93,4 +93,4 @@ ___ #### Defined in -src/access-logging.ts:12 +[src/access-logging.ts:12](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-logging.ts#L12) diff --git a/docs/interfaces/AccessTopologyConfig.md b/docs/interfaces/AccessTopologyConfig.md new file mode 100644 index 0000000..8a42afa --- /dev/null +++ b/docs/interfaces/AccessTopologyConfig.md @@ -0,0 +1,140 @@ +[unifi-access](../README.md) / [Exports](../modules.md) / AccessTopologyConfig + +# Interface: AccessTopologyConfig + +## Table of contents + +### Properties + +- [extra\_type](AccessTopologyConfig.md#extra_type) +- [extras](AccessTopologyConfig.md#extras) +- [floors](AccessTopologyConfig.md#floors) +- [full\_name](AccessTopologyConfig.md#full_name) +- [level](AccessTopologyConfig.md#level) +- [location\_type](AccessTopologyConfig.md#location_type) +- [name](AccessTopologyConfig.md#name) +- [timezone](AccessTopologyConfig.md#timezone) +- [unique\_id](AccessTopologyConfig.md#unique_id) +- [up\_id](AccessTopologyConfig.md#up_id) +- [work\_time](AccessTopologyConfig.md#work_time) +- [work\_time\_id](AccessTopologyConfig.md#work_time_id) + +## Properties + +### extra\_type + +• `Readonly` **extra\_type**: `string` + +#### Defined in + +[src/access-types.ts:205](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L205) + +___ + +### extras + +• `Readonly` **extras**: [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) + +#### Defined in + +[src/access-types.ts:206](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L206) + +___ + +### floors + +• `Readonly` **floors**: [`AccessFloorConfigInterface`](AccessFloorConfigInterface.md)[] + +#### Defined in + +[src/access-types.ts:207](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L207) + +___ + +### full\_name + +• `Readonly` **full\_name**: `string` + +#### Defined in + +[src/access-types.ts:208](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L208) + +___ + +### level + +• `Readonly` **level**: `number` + +#### Defined in + +[src/access-types.ts:209](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L209) + +___ + +### location\_type + +• `Readonly` **location\_type**: `string` + +#### Defined in + +[src/access-types.ts:210](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L210) + +___ + +### name + +• `Readonly` **name**: `string` + +#### Defined in + +[src/access-types.ts:211](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L211) + +___ + +### timezone + +• `Readonly` **timezone**: `string` + +#### Defined in + +[src/access-types.ts:212](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L212) + +___ + +### unique\_id + +• `Readonly` **unique\_id**: `string` + +#### Defined in + +[src/access-types.ts:213](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L213) + +___ + +### up\_id + +• `Readonly` **up\_id**: `string` + +#### Defined in + +[src/access-types.ts:214](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L214) + +___ + +### work\_time + +• `Readonly` **work\_time**: `string`[] + +#### Defined in + +[src/access-types.ts:216](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L216) + +___ + +### work\_time\_id + +• `Readonly` **work\_time\_id**: `string` + +#### Defined in + +[src/access-types.ts:215](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L215) diff --git a/docs/interfaces/AccessTopologyConfigInterface.md b/docs/interfaces/AccessTopologyConfigInterface.md new file mode 100644 index 0000000..de35a63 --- /dev/null +++ b/docs/interfaces/AccessTopologyConfigInterface.md @@ -0,0 +1,140 @@ +[unifi-access](../README.md) / [Exports](../modules.md) / AccessTopologyConfigInterface + +# Interface: AccessTopologyConfigInterface + +## Table of contents + +### Properties + +- [extra\_type](AccessTopologyConfigInterface.md#extra_type) +- [extras](AccessTopologyConfigInterface.md#extras) +- [floors](AccessTopologyConfigInterface.md#floors) +- [full\_name](AccessTopologyConfigInterface.md#full_name) +- [level](AccessTopologyConfigInterface.md#level) +- [location\_type](AccessTopologyConfigInterface.md#location_type) +- [name](AccessTopologyConfigInterface.md#name) +- [timezone](AccessTopologyConfigInterface.md#timezone) +- [unique\_id](AccessTopologyConfigInterface.md#unique_id) +- [up\_id](AccessTopologyConfigInterface.md#up_id) +- [work\_time](AccessTopologyConfigInterface.md#work_time) +- [work\_time\_id](AccessTopologyConfigInterface.md#work_time_id) + +## Properties + +### extra\_type + +• **extra\_type**: `string` + +#### Defined in + +[src/access-types.ts:205](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L205) + +___ + +### extras + +• **extras**: [`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md) + +#### Defined in + +[src/access-types.ts:206](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L206) + +___ + +### floors + +• **floors**: [`AccessFloorConfigInterface`](AccessFloorConfigInterface.md)[] + +#### Defined in + +[src/access-types.ts:207](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L207) + +___ + +### full\_name + +• **full\_name**: `string` + +#### Defined in + +[src/access-types.ts:208](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L208) + +___ + +### level + +• **level**: `number` + +#### Defined in + +[src/access-types.ts:209](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L209) + +___ + +### location\_type + +• **location\_type**: `string` + +#### Defined in + +[src/access-types.ts:210](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L210) + +___ + +### name + +• **name**: `string` + +#### Defined in + +[src/access-types.ts:211](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L211) + +___ + +### timezone + +• **timezone**: `string` + +#### Defined in + +[src/access-types.ts:212](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L212) + +___ + +### unique\_id + +• **unique\_id**: `string` + +#### Defined in + +[src/access-types.ts:213](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L213) + +___ + +### up\_id + +• **up\_id**: `string` + +#### Defined in + +[src/access-types.ts:214](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L214) + +___ + +### work\_time + +• **work\_time**: `string`[] + +#### Defined in + +[src/access-types.ts:216](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L216) + +___ + +### work\_time\_id + +• **work\_time\_id**: `string` + +#### Defined in + +[src/access-types.ts:215](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L215) diff --git a/docs/interfaces/AccessTopologyConfigPayload.md b/docs/interfaces/AccessTopologyConfigPayload.md new file mode 100644 index 0000000..20da69b --- /dev/null +++ b/docs/interfaces/AccessTopologyConfigPayload.md @@ -0,0 +1,140 @@ +[unifi-access](../README.md) / [Exports](../modules.md) / AccessTopologyConfigPayload + +# Interface: AccessTopologyConfigPayload + +## Table of contents + +### Properties + +- [extra\_type](AccessTopologyConfigPayload.md#extra_type) +- [extras](AccessTopologyConfigPayload.md#extras) +- [floors](AccessTopologyConfigPayload.md#floors) +- [full\_name](AccessTopologyConfigPayload.md#full_name) +- [level](AccessTopologyConfigPayload.md#level) +- [location\_type](AccessTopologyConfigPayload.md#location_type) +- [name](AccessTopologyConfigPayload.md#name) +- [timezone](AccessTopologyConfigPayload.md#timezone) +- [unique\_id](AccessTopologyConfigPayload.md#unique_id) +- [up\_id](AccessTopologyConfigPayload.md#up_id) +- [work\_time](AccessTopologyConfigPayload.md#work_time) +- [work\_time\_id](AccessTopologyConfigPayload.md#work_time_id) + +## Properties + +### extra\_type + +• `Optional` **extra\_type**: `string` + +#### Defined in + +[src/access-types.ts:205](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L205) + +___ + +### extras + +• `Optional` **extras**: `DeepPartial`\<[`AccessDeviceExtrasConfigInterface`](AccessDeviceExtrasConfigInterface.md)\> + +#### Defined in + +[src/access-types.ts:206](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L206) + +___ + +### floors + +• `Optional` **floors**: `DeepPartial`\<[`AccessFloorConfigInterface`](AccessFloorConfigInterface.md)\>[] + +#### Defined in + +[src/access-types.ts:207](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L207) + +___ + +### full\_name + +• `Optional` **full\_name**: `string` + +#### Defined in + +[src/access-types.ts:208](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L208) + +___ + +### level + +• `Optional` **level**: `number` + +#### Defined in + +[src/access-types.ts:209](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L209) + +___ + +### location\_type + +• `Optional` **location\_type**: `string` + +#### Defined in + +[src/access-types.ts:210](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L210) + +___ + +### name + +• `Optional` **name**: `string` + +#### Defined in + +[src/access-types.ts:211](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L211) + +___ + +### timezone + +• `Optional` **timezone**: `string` + +#### Defined in + +[src/access-types.ts:212](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L212) + +___ + +### unique\_id + +• `Optional` **unique\_id**: `string` + +#### Defined in + +[src/access-types.ts:213](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L213) + +___ + +### up\_id + +• `Optional` **up\_id**: `string` + +#### Defined in + +[src/access-types.ts:214](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L214) + +___ + +### work\_time + +• `Optional` **work\_time**: `string`[] + +#### Defined in + +[src/access-types.ts:216](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L216) + +___ + +### work\_time\_id + +• `Optional` **work\_time\_id**: `string` + +#### Defined in + +[src/access-types.ts:215](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L215) diff --git a/docs/modules.md b/docs/modules.md index 582ba47..c1c0318 100644 --- a/docs/modules.md +++ b/docs/modules.md @@ -12,7 +12,82 @@ ### Interfaces - [AccessDeviceConfig](interfaces/AccessDeviceConfig.md) -- [AccessDeviceConfigEntryInterface](interfaces/AccessDeviceConfigEntryInterface.md) - [AccessDeviceConfigInterface](interfaces/AccessDeviceConfigInterface.md) - [AccessDeviceConfigPayload](interfaces/AccessDeviceConfigPayload.md) +- [AccessDeviceEntryConfig](interfaces/AccessDeviceEntryConfig.md) +- [AccessDeviceEntryConfigInterface](interfaces/AccessDeviceEntryConfigInterface.md) +- [AccessDeviceEntryConfigPayload](interfaces/AccessDeviceEntryConfigPayload.md) +- [AccessDeviceExtrasConfigInterface](interfaces/AccessDeviceExtrasConfigInterface.md) +- [AccessDoorConfig](interfaces/AccessDoorConfig.md) +- [AccessDoorConfigInterface](interfaces/AccessDoorConfigInterface.md) +- [AccessDoorConfigPayload](interfaces/AccessDoorConfigPayload.md) +- [AccessFloorConfig](interfaces/AccessFloorConfig.md) +- [AccessFloorConfigInterface](interfaces/AccessFloorConfigInterface.md) +- [AccessFloorConfigPayload](interfaces/AccessFloorConfigPayload.md) - [AccessLogging](interfaces/AccessLogging.md) +- [AccessTopologyConfig](interfaces/AccessTopologyConfig.md) +- [AccessTopologyConfigInterface](interfaces/AccessTopologyConfigInterface.md) +- [AccessTopologyConfigPayload](interfaces/AccessTopologyConfigPayload.md) + +### Type Aliases + +- [AccessApiResponse](modules.md#accessapiresponse) +- [AccessEventPacket](modules.md#accesseventpacket) + +## Type Aliases + +### AccessApiResponse + +Ƭ **AccessApiResponse**: `Object` + +UniFi Access API response JSON. + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `code` | `number` | +| `codeS` | `string` | +| `data` | `string` | +| `error` | `string` | +| `msg` | `string` | + +#### Defined in + +[src/access-types.ts:9](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L9) + +___ + +### AccessEventPacket + +Ƭ **AccessEventPacket**: `Object` + +UniFi Access event packet. + +**`Param`** + +Access event topic. + +**`Param`** + +Access event payload. + +**`Remarks`** + +A UniFi Access event packet is the representation of a notification event from a UniFi Access controller. The Access `event` property informs us of the +notification type, such as `access.data.device.remote_unlock`, for door unlock events. The details of the event are delivered as a JSON payload in the `data` +property. + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `data` | `Record`\<`string`, `string`\> | +| `event` | `string` | +| `event_object_id` | `string` | +| `receiver_id` | `string` | +| `save_to_history` | `boolean` | + +#### Defined in + +[src/access-types.ts:28](https://github.com/hjdhjd/unifi-access/blob/870bfaa/src/access-types.ts#L28) diff --git a/package-lock.json b/package-lock.json index 4abd10c..f6b4681 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "unifi-access", - "version": "0.1.0", + "version": "0.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "unifi-access", - "version": "0.1.0", + "version": "0.2.0", "license": "ISC", "dependencies": { "@adobe/fetch": "4.1.1", @@ -14,13 +14,13 @@ }, "devDependencies": { "@stylistic/eslint-plugin": "1.6.3", - "@types/node": "20.11.24", + "@types/node": "20.11.25", "@types/ws": "8.5.10", - "@typescript-eslint/eslint-plugin": "7.1.0", - "@typescript-eslint/parser": "7.1.0", + "@typescript-eslint/eslint-plugin": "7.1.1", + "@typescript-eslint/parser": "7.1.1", "eslint": "8.57.0", "rimraf": "5.0.5", - "typedoc": "0.25.9", + "typedoc": "0.25.11", "typedoc-plugin-markdown": "3.17.1", "typescript": "5.3.3" }, @@ -593,9 +593,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.24", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", - "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", + "version": "20.11.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", + "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -617,16 +617,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.0.tgz", - "integrity": "sha512-j6vT/kCulhG5wBmGtstKeiVr1rdXE4nk+DT1k6trYkwlrvW9eOF5ZbgKnd/YR6PcM4uTEXa0h6Fcvf6X7Dxl0w==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.1.tgz", + "integrity": "sha512-zioDz623d0RHNhvx0eesUmGfIjzrk18nSBC8xewepKXbBvN/7c1qImV7Hg8TI1URTxKax7/zxfxj3Uph8Chcuw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.1.0", - "@typescript-eslint/type-utils": "7.1.0", - "@typescript-eslint/utils": "7.1.0", - "@typescript-eslint/visitor-keys": "7.1.0", + "@typescript-eslint/scope-manager": "7.1.1", + "@typescript-eslint/type-utils": "7.1.1", + "@typescript-eslint/utils": "7.1.1", + "@typescript-eslint/visitor-keys": "7.1.1", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -652,15 +652,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.0.tgz", - "integrity": "sha512-V1EknKUubZ1gWFjiOZhDSNToOjs63/9O0puCgGS8aDOgpZY326fzFu15QAUjwaXzRZjf/qdsdBrckYdv9YxB8w==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.1.tgz", + "integrity": "sha512-ZWUFyL0z04R1nAEgr9e79YtV5LbafdOtN7yapNbn1ansMyaegl2D4bL7vHoJ4HPSc4CaLwuCVas8CVuneKzplQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.1.0", - "@typescript-eslint/types": "7.1.0", - "@typescript-eslint/typescript-estree": "7.1.0", - "@typescript-eslint/visitor-keys": "7.1.0", + "@typescript-eslint/scope-manager": "7.1.1", + "@typescript-eslint/types": "7.1.1", + "@typescript-eslint/typescript-estree": "7.1.1", + "@typescript-eslint/visitor-keys": "7.1.1", "debug": "^4.3.4" }, "engines": { @@ -680,13 +680,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.0.tgz", - "integrity": "sha512-6TmN4OJiohHfoOdGZ3huuLhpiUgOGTpgXNUPJgeZOZR3DnIpdSgtt83RS35OYNNXxM4TScVlpVKC9jyQSETR1A==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.1.tgz", + "integrity": "sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.1.0", - "@typescript-eslint/visitor-keys": "7.1.0" + "@typescript-eslint/types": "7.1.1", + "@typescript-eslint/visitor-keys": "7.1.1" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -697,13 +697,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.0.tgz", - "integrity": "sha512-UZIhv8G+5b5skkcuhgvxYWHjk7FW7/JP5lPASMEUoliAPwIH/rxoUSQPia2cuOj9AmDZmwUl1usKm85t5VUMew==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.1.tgz", + "integrity": "sha512-5r4RKze6XHEEhlZnJtR3GYeCh1IueUHdbrukV2KSlLXaTjuSfeVF8mZUVPLovidCuZfbVjfhi4c0DNSa/Rdg5g==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.1.0", - "@typescript-eslint/utils": "7.1.0", + "@typescript-eslint/typescript-estree": "7.1.1", + "@typescript-eslint/utils": "7.1.1", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -724,9 +724,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.0.tgz", - "integrity": "sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.1.tgz", + "integrity": "sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -737,13 +737,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.0.tgz", - "integrity": "sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.1.tgz", + "integrity": "sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.1.0", - "@typescript-eslint/visitor-keys": "7.1.0", + "@typescript-eslint/types": "7.1.1", + "@typescript-eslint/visitor-keys": "7.1.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -765,17 +765,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.0.tgz", - "integrity": "sha512-WUFba6PZC5OCGEmbweGpnNJytJiLG7ZvDBJJoUcX4qZYf1mGZ97mO2Mps6O2efxJcJdRNpqweCistDbZMwIVHw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.1.tgz", + "integrity": "sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.1.0", - "@typescript-eslint/types": "7.1.0", - "@typescript-eslint/typescript-estree": "7.1.0", + "@typescript-eslint/scope-manager": "7.1.1", + "@typescript-eslint/types": "7.1.1", + "@typescript-eslint/typescript-estree": "7.1.1", "semver": "^7.5.4" }, "engines": { @@ -790,12 +790,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.0.tgz", - "integrity": "sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.1.tgz", + "integrity": "sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/types": "7.1.1", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2319,9 +2319,9 @@ } }, "node_modules/typedoc": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.9.tgz", - "integrity": "sha512-jVoGmfNw848iW0L313+jqHbsknepwDV6F9nzk1H30oWhKXkw65uaENgR6QtTw9a5KqRWEb6nwNd54KxffBJyWw==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.11.tgz", + "integrity": "sha512-5MbI1W/FOG6oXsd8bdssQidSTeKh8Kt3xA5uKVzI+K99uzP8EGN45uPnPvQesyaWdD+89s4wCQdtWEd8QUbiRg==", "dev": true, "dependencies": { "lunr": "^2.3.9", @@ -2956,9 +2956,9 @@ "dev": true }, "@types/node": { - "version": "20.11.24", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", - "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", + "version": "20.11.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", + "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", "dev": true, "requires": { "undici-types": "~5.26.4" @@ -2980,16 +2980,16 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.0.tgz", - "integrity": "sha512-j6vT/kCulhG5wBmGtstKeiVr1rdXE4nk+DT1k6trYkwlrvW9eOF5ZbgKnd/YR6PcM4uTEXa0h6Fcvf6X7Dxl0w==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.1.tgz", + "integrity": "sha512-zioDz623d0RHNhvx0eesUmGfIjzrk18nSBC8xewepKXbBvN/7c1qImV7Hg8TI1URTxKax7/zxfxj3Uph8Chcuw==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.1.0", - "@typescript-eslint/type-utils": "7.1.0", - "@typescript-eslint/utils": "7.1.0", - "@typescript-eslint/visitor-keys": "7.1.0", + "@typescript-eslint/scope-manager": "7.1.1", + "@typescript-eslint/type-utils": "7.1.1", + "@typescript-eslint/utils": "7.1.1", + "@typescript-eslint/visitor-keys": "7.1.1", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -2999,54 +2999,54 @@ } }, "@typescript-eslint/parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.0.tgz", - "integrity": "sha512-V1EknKUubZ1gWFjiOZhDSNToOjs63/9O0puCgGS8aDOgpZY326fzFu15QAUjwaXzRZjf/qdsdBrckYdv9YxB8w==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.1.tgz", + "integrity": "sha512-ZWUFyL0z04R1nAEgr9e79YtV5LbafdOtN7yapNbn1ansMyaegl2D4bL7vHoJ4HPSc4CaLwuCVas8CVuneKzplQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "7.1.0", - "@typescript-eslint/types": "7.1.0", - "@typescript-eslint/typescript-estree": "7.1.0", - "@typescript-eslint/visitor-keys": "7.1.0", + "@typescript-eslint/scope-manager": "7.1.1", + "@typescript-eslint/types": "7.1.1", + "@typescript-eslint/typescript-estree": "7.1.1", + "@typescript-eslint/visitor-keys": "7.1.1", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.0.tgz", - "integrity": "sha512-6TmN4OJiohHfoOdGZ3huuLhpiUgOGTpgXNUPJgeZOZR3DnIpdSgtt83RS35OYNNXxM4TScVlpVKC9jyQSETR1A==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.1.tgz", + "integrity": "sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA==", "dev": true, "requires": { - "@typescript-eslint/types": "7.1.0", - "@typescript-eslint/visitor-keys": "7.1.0" + "@typescript-eslint/types": "7.1.1", + "@typescript-eslint/visitor-keys": "7.1.1" } }, "@typescript-eslint/type-utils": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.0.tgz", - "integrity": "sha512-UZIhv8G+5b5skkcuhgvxYWHjk7FW7/JP5lPASMEUoliAPwIH/rxoUSQPia2cuOj9AmDZmwUl1usKm85t5VUMew==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.1.tgz", + "integrity": "sha512-5r4RKze6XHEEhlZnJtR3GYeCh1IueUHdbrukV2KSlLXaTjuSfeVF8mZUVPLovidCuZfbVjfhi4c0DNSa/Rdg5g==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "7.1.0", - "@typescript-eslint/utils": "7.1.0", + "@typescript-eslint/typescript-estree": "7.1.1", + "@typescript-eslint/utils": "7.1.1", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" } }, "@typescript-eslint/types": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.0.tgz", - "integrity": "sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.1.tgz", + "integrity": "sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.0.tgz", - "integrity": "sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.1.tgz", + "integrity": "sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw==", "dev": true, "requires": { - "@typescript-eslint/types": "7.1.0", - "@typescript-eslint/visitor-keys": "7.1.0", + "@typescript-eslint/types": "7.1.1", + "@typescript-eslint/visitor-keys": "7.1.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3056,27 +3056,27 @@ } }, "@typescript-eslint/utils": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.0.tgz", - "integrity": "sha512-WUFba6PZC5OCGEmbweGpnNJytJiLG7ZvDBJJoUcX4qZYf1mGZ97mO2Mps6O2efxJcJdRNpqweCistDbZMwIVHw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.1.tgz", + "integrity": "sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.1.0", - "@typescript-eslint/types": "7.1.0", - "@typescript-eslint/typescript-estree": "7.1.0", + "@typescript-eslint/scope-manager": "7.1.1", + "@typescript-eslint/types": "7.1.1", + "@typescript-eslint/typescript-estree": "7.1.1", "semver": "^7.5.4" } }, "@typescript-eslint/visitor-keys": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.0.tgz", - "integrity": "sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.1.tgz", + "integrity": "sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ==", "dev": true, "requires": { - "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/types": "7.1.1", "eslint-visitor-keys": "^3.4.1" } }, @@ -4175,9 +4175,9 @@ "dev": true }, "typedoc": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.9.tgz", - "integrity": "sha512-jVoGmfNw848iW0L313+jqHbsknepwDV6F9nzk1H30oWhKXkw65uaENgR6QtTw9a5KqRWEb6nwNd54KxffBJyWw==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.11.tgz", + "integrity": "sha512-5MbI1W/FOG6oXsd8bdssQidSTeKh8Kt3xA5uKVzI+K99uzP8EGN45uPnPvQesyaWdD+89s4wCQdtWEd8QUbiRg==", "dev": true, "requires": { "lunr": "^2.3.9", diff --git a/package.json b/package.json index 0fb15dc..7da406b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "unifi-access", "type": "module", - "version": "0.1.0", + "version": "0.2.0", "displayName": "UniFi Access API", "description": "A soon-to-be-almost-complete implementation of the UniFi Access API.", "author": { @@ -54,13 +54,13 @@ }, "devDependencies": { "@stylistic/eslint-plugin": "1.6.3", - "@types/node": "20.11.24", + "@types/node": "20.11.25", "@types/ws": "8.5.10", - "@typescript-eslint/eslint-plugin": "7.1.0", - "@typescript-eslint/parser": "7.1.0", + "@typescript-eslint/eslint-plugin": "7.1.1", + "@typescript-eslint/parser": "7.1.1", "eslint": "8.57.0", "rimraf": "5.0.5", - "typedoc": "0.25.9", + "typedoc": "0.25.11", "typedoc-plugin-markdown": "3.17.1", "typescript": "5.3.3" }, diff --git a/src/access-api.ts b/src/access-api.ts index 8f6d03e..866b98a 100644 --- a/src/access-api.ts +++ b/src/access-api.ts @@ -5,8 +5,12 @@ import { ACCESS_API_ERROR_LIMIT, ACCESS_API_RETRY_INTERVAL, ACCESS_API_TIMEOUT } from "./settings.js"; import { ALPNProtocol, AbortError, FetchError, Headers, Request, RequestOptions, Response, context, timeoutSignal } from "@adobe/fetch"; import { + AccessApiResponse, AccessDeviceConfig, - AccessDeviceConfigPayload + AccessDeviceConfigPayload, + AccessDoorConfig, + AccessFloorConfig, + AccessTopologyConfig } from "./access-types.js"; import { AccessLogging } from "./access-logging.js"; import { EventEmitter } from "node:events"; @@ -31,12 +35,15 @@ import util from "node:util"; */ export class AccessApi extends EventEmitter { - private _bootstrap: AccessDeviceConfig[][] | null; - private _eventsWs: WebSocket | null; - + private _bootstrap: AccessTopologyConfig | null; + private _devices: AccessDeviceConfig[] | null; + private _doors: AccessDoorConfig[] | null; + private _floors: AccessFloorConfig[] | null; private address: string; private apiErrorCount: number; private apiLastSuccess: number; + private events: WebSocket | null; + private eventsTimer: NodeJS.Timeout | null; private fetch: (url: string|Request, options?: RequestOptions) => Promise; private headers: Headers; private _isAdminUser: boolean; @@ -73,7 +80,11 @@ export class AccessApi extends EventEmitter { } this._bootstrap = null; - this._eventsWs = null; + this._devices = null; + this._doors = null; + this._floors = null; + this.events = null; + this.eventsTimer = null; this.log = { @@ -239,7 +250,7 @@ export class AccessApi extends EventEmitter { code: number, codeS: string, - data: AccessDeviceConfig[][], + data: AccessTopologyConfig[], error: string, msg: string } @@ -257,7 +268,22 @@ export class AccessApi extends EventEmitter { } // Set the new bootstrap. - this._bootstrap = data?.data ?? null; + this._bootstrap = data?.data[0] ?? null; + + // Retrieve the list of doors from all the floors the user has configured. + this._doors = this._bootstrap?.floors.flatMap(x => x.doors) ?? null; + + // Retrieve the list of devices from all the doors the user has configured. + this._devices = this._doors?.map(x => x.device_groups).flat(2) ?? null; + + // Set the list of floors as a convenience. + this._floors = this._bootstrap?.floors ?? null; + + // We're good. Now connect to the event listener API. + if(!(await this.launchEventsWs())) { + + return retry ? this.bootstrapController(false) : false; + } // Notify our users. this.emit("bootstrap", this._bootstrap); @@ -266,12 +292,148 @@ export class AccessApi extends EventEmitter { return true; } + // Connect to the realtime events API. + private async launchEventsWs(): Promise { + + // Log us in if needed. + if(!(await this.loginController())) { + + return false; + } + + // If we already have a listener, we're already all set. + if(this.events) { + + return true; + } + + try { + + const ws = new WebSocket("wss://" + this.address + "/proxy/access/api/v2/ws/notification", { + + headers: { + + Cookie: this.headers.get("Cookie") ?? "" + }, + + rejectUnauthorized: false + }); + + if(!ws) { + + this.log.error("Unable to connect to the realtime events API. Will retry again later."); + + if(this.eventsTimer) { + + clearTimeout(this.eventsTimer); + this.eventsTimer = null; + } + + this.events = null; + + return false; + } + + let messageHandler: ((event: Buffer) => void) | null; + + // Cleanup after ourselves if our websocket closes for some resaon. + ws.once("close", (): void => { + + if(this.eventsTimer) { + + clearTimeout(this.eventsTimer); + this.eventsTimer = null; + } + + this.events = null; + + if(messageHandler) { + + ws.removeListener("message", messageHandler); + messageHandler = null; + } + }); + + // Handle any websocket errors. + ws.once("error", (error: Error): void => { + + // If we're closing before fully established it's because we're shutting down the API - ignore it. + if(error.message !== "WebSocket was closed before the connection was established") { + + this.log.error(error.toString()); + } + + ws.terminate(); + }); + + // Process messages as they come in. + ws.on("message", messageHandler = (event: Buffer): void => { + + if(!event) { + + this.log.error("Unable to process message from the realtime events API."); + ws.terminate(); + return; + } + + // The Access events API seems to send a heartbeat every five seconds. + if(event.toString() === "\"Hello\"\n") { + + // Heartbeat. + if(this.eventsTimer) { + + clearTimeout(this.eventsTimer); + } + + this.eventsTimer = setTimeout(() => { + + this.log.error("Failed to detect heartbeat from the events API. Resetting the connection."); + this.reset(); + }, 1000 * 10); + + return; + } + + // Parse the JSON from the events API. + let json; + + try { + + json = JSON.parse(event.toString()) as JSON; + } catch(error) { + + this.log.error("Error processing message from the events API: %s", error); + return; + } + + // Emit the decoded packet for users. + this.emit("message", json); + }); + + // Make the websocket available, and then we're done. + this.events = ws; + + // Establish our heartbeat. + this.eventsTimer = setTimeout(() => { + + this.log.error("Failed to detect heartbeat from the events API. Resetting the connection."); + this.reset(); + }, 1000 * 10); + } catch(error) { + + this.log.error("Error connecting to the realtime update events API: %s", error); + } + + return true; + } + /** * Retrieve the bootstrap JSON from a UniFi Access controller. * * @returns Returns a promise that will resolve to `true` if successful and `false` otherwise. * - * @remarks A `bootstrap` event will be emitted each time this method is successfully called, with the {@link AccessDeviceConfig} JSON as an argument. + * @remarks A `bootstrap` event will be emitted each time this method is successfully called, with the AccessToplogyConfig JSON as an argument. As a + * convenience, the {@link devices}, {@link doors}, and {@link floors} properties will be populated as well. * * @example * Retrieve the bootstrap JSON. You can selectively choose to either `await` the promise that is returned by `getBootstrap`, or subscribe to the `bootstrap` event. @@ -340,6 +502,56 @@ export class AccessApi extends EventEmitter { return this.bootstrapController(true); } + /** + * Send an unlock command to the Access controller. + * + * @param device - Access device. + * + * @returns Returns `true` if successful, `false` otherwise. + */ + // Send an unlock command to a hub. + public async unlock(device: AccessDeviceConfig): Promise { + + // No device object, we're done. + if(!device) { + + return false; + } + + // Unlocking only works on hubs. + if(device.device_type !== "UAH") { + + return false; + } + + // Request the unlock from Access. + const response = await this.retrieve(this.getApiEndpoint("device") + "/" + device.unique_id + "/relay_unlock", { + + body: JSON.stringify({}), + method: "PUT" + }); + + if(!response?.ok) { + + this.log.error("%s: Unable to unlock the %s: %s.", this.getFullName(device), device.display_model, response?.status); + return false; + } + + // Get our status. + const status = await response.json() as AccessApiResponse; + + if(status.codeS === "SUCCESS") { + + return true; + } + + // We failed - let's log what we know. + this.log.error("%s: Error unlocking the %s: \n%s", this.getFullName(device), device.display_model, + util.inspect(status, { colors: false, depth: null, sorted: true })); + + return false; + } + /** * Update an Access device's configuration on the UniFi Access controller. * @@ -415,8 +627,7 @@ export class AccessApi extends EventEmitter { // Include the host address information, if we have it. const host = (("ip" in device) && device.ip) ? "address: " + device.ip + " " : ""; - - const type = device.device_type; + const type = (("display_model" in device) && device.display_model) ? device.display_model : device.device_type; // A completely enumerated device will appear as: // Device Name [Device Type] (address: IP address, mac: MAC address). @@ -447,9 +658,18 @@ export class AccessApi extends EventEmitter { public reset(): void { this._bootstrap = null; + this._floors = null; + this._doors = null; + this._devices = null; + + if(this.eventsTimer) { - this._eventsWs?.terminate(); - this._eventsWs = null; + clearTimeout(this.eventsTimer); + } + + this.eventsTimer = null; + this.events?.terminate(); + this.events = null; } /** @@ -691,7 +911,7 @@ export class AccessApi extends EventEmitter { case "bootstrap": - endpointSuffix = "dashboard/devices"; + endpointSuffix = "devices/topology4"; break; case "device": @@ -734,11 +954,44 @@ export class AccessApi extends EventEmitter { * @returns Returns the bootstrap JSON if the Access controller has been bootstrapped, `null` otherwise. */ // Get the bootstrap JSON. - public get bootstrap(): AccessDeviceConfig[][] | null { + public get bootstrap(): AccessTopologyConfig | null { return this._bootstrap; } + /** + * Access the Access controller list of devices. + * + * @returns Returns an array of all the devices from all the UniFi Access hubs associated with this controller, `null` otherwise. + */ + // Get the list of devices. + public get devices(): AccessDeviceConfig[] | null { + + return this._devices; + } + + /** + * Access the Access controller list of doors. + * + * @returns Returns an array of all the doors from all the UniFi Access hubs associated with this controller, `null` otherwise. + */ + // Get the list of doors. + public get doors(): AccessDoorConfig[] | null { + + return this._doors; + } + + /** + * Access the Access controller list of floors. + * + * @returns Returns an array of all the floors from all the UniFi Access hubs associated with this controller, `null` otherwise. + */ + // Get the list of floors. + public get floors(): AccessFloorConfig[] | null { + + return this._floors; + } + /** * Utility method that returns whether the credentials that were used to login to the Access controller have administrative privileges or not. * @@ -760,9 +1013,10 @@ export class AccessApi extends EventEmitter { public get name(): string { // Our controller string, if it exists, appears as `Controller [Controller Type]`. Otherwise, we appear as `address`. - if(this._bootstrap && this._bootstrap[0] && this._bootstrap[0][0].name) { + // Our controller string, if it exists, appears as `Controller`. Otherwise, we appear as `address`. + if(this._bootstrap && this._bootstrap.name) { - return this._bootstrap[0][0].name + " [" + this._bootstrap[0][0].device_type + "]"; + return this._bootstrap.name; } else { return this.address; diff --git a/src/access-types.ts b/src/access-types.ts index 8e10c74..d1b5f00 100644 --- a/src/access-types.ts +++ b/src/access-types.ts @@ -3,44 +3,98 @@ * access-types.ts: Type definitions for UniFi Access. */ -export interface AccessDeviceConfigEntryInterface { +/** + * UniFi Access API response JSON. + */ +export type AccessApiResponse = { + code: number, + codeS: string, + msg: string, + error: string, + data: string +}; - device_id: string, - key: string, - source: string, - tag: string, - value: string -} +/** + * UniFi Access event packet. + * + * @param event - Access event topic. + * @param data - Access event payload. + * + * @remarks A UniFi Access event packet is the representation of a notification event from a UniFi Access controller. The Access `event` property informs us of the + * notification type, such as `access.data.device.remote_unlock`, for door unlock events. The details of the event are delivered as a JSON payload in the `data` + * property. + */ +// A complete description of the UniFi Access notification events API packet format. +export type AccessEventPacket = { + + event: string, + receiver_id: string, + event_object_id: string, + save_to_history: boolean, + data: Record +}; // An semi-complete description of the UniFi Access device JSON. export interface AccessDeviceConfigInterface { adopt_time: number, + adopting: boolean, alias: string, bom_rev: string, capabilities: string[], - configs: AccessDeviceConfigEntryInterface[], connected_uah_id: string, device_type: string, - firmware: string, + display_model: string, + configs: AccessDeviceEntryConfigInterface[], + door: { + + extra_type: string, + full_name: string, + level: number, + location_type: string, + name: string, + timezone: string, + unique_id: string, + up_id: string, + work_time: string[], + work_time_id: string, + extras: AccessDeviceExtrasConfigInterface + }, firmware_update_time: number, + firmware: string, + floor: { + + extra_type: string, + extras: AccessDeviceExtrasConfigInterface, + full_name: string, + level: number, + location_type: string, + name: string, + timezone: string, + unique_id: string, + up_id: string, + work_time: string[], + work_time_id: string + }, guid: string, hw_type: string, + images: { + + l: string, + m: string, + s: string, + xl: string, + xs: string + }, ip: string, is_adopted: boolean, is_connected: boolean, is_managed: boolean, is_online: boolean, - is_revision_up_to_date: boolean, location: { + extra_type: string, - extras: { - "uah-input_state_dps": string, - "uah-wiring_state_dps-neg": string, - "uah-wiring_state_dps-pos": string, - door_thumbnail: string, - door_thumbnail_last_update: number - }, + extras: AccessDeviceExtrasConfigInterface, full_name: string, level: number, location_type: string, @@ -48,23 +102,118 @@ export interface AccessDeviceConfigInterface { timezone: string, unique_id: string, up_id: string, - work_time: string, - work_time_id: string + work_time_id: string, + work_time: string[] }, location_id: string, mac: string, + model: string, name: string, need_advisory: boolean, resource_name: string, - revision: string, revision_update_time: number, + revision: number, security_check: boolean, source: string, start_time: number, unique_id: string, update: string, - version: string, - version_update_time: number + update_manual: { + + device_version_upgrade_status: { + + completed: boolean, + failed: boolean, + failure_reason: string, + is_downloading: boolean, + is_upgrading: boolean, + is_waiting: boolean, + timed_out: boolean, + upgrade_seconds: number + }, + + from_version: string, + last_upgrade_start_time: string, + last_upgrade_success: string, + last_upgrade_failure_reason: string + }, + version_update_time: number, + version: string +} + +// An semi-complete description of the UniFi Access device entry configuration JSON. +export interface AccessDeviceEntryConfigInterface { + + device_id: string, + key: string, + source: string, + tag: string, + value: string +} + +// An semi-complete description of the UniFi Access device extras JSON. +export interface AccessDeviceExtrasConfigInterface { + + door_thumbnail: string, + door_thumbnail_last_update: number, + "uah-input_state_dps": boolean, + "uah-wiring_state_dps-neg": boolean, + "uah-wiring_state_dps-pos": boolean +} + +// An semi-complete description of the UniFi Access door JSON. +export interface AccessDoorConfigInterface { + + camera_resource_ids: string[], + device_groups: AccessDeviceConfigInterface[], + door_guard: string[], + extra_type: string, + extras: AccessDeviceExtrasConfigInterface, + full_name: string, + hotel_devices: string[], + level: number, + location_type: string, + name: string, + timezone: string, + unique_id: string, + up_id: string, + work_time_id: string, + work_time: string[], + +} + +// An semi-complete description of the UniFi Access floor JSON. +export interface AccessFloorConfigInterface { + + doors: AccessDoorConfigInterface[], + extra_type: string, + extras: AccessDeviceExtrasConfigInterface, + full_name: string, + level: number, + location_type: string, + name: string, + timezone: string, + unique_id: string, + up_id: string, + work_time: string[], + work_time_id: string +} + +// An semi-complete description of the UniFi Access topology JSON. +export interface AccessTopologyConfigInterface { + + extra_type: string, + extras: AccessDeviceExtrasConfigInterface, + floors: AccessFloorConfigInterface[], + full_name: string, + level: number, + location_type: string, + name: string, + timezone: string, + unique_id: string, + up_id: string, + work_time_id: string, + work_time: string[] } // This type declaration make all properties optional recursively including nested objects. This should @@ -76,10 +225,25 @@ export type DeepPartial = { [P in keyof T]?: T[P] extends Array ? Array> : DeepPartial }; -// We use types instead of interfaces here because we can more easily set the entire thing as readonly. -// Unfortunately, interfaces can't be quickly set as readonly in Typescript without marking each and -// every property as readonly along the way. +// We use types instead of interfaces here because we can more easily set the entire thing as readonly. Unfortunately, interfaces can't be quickly set as readonly in +// Typescript without marking each and every property as readonly along the way. /** @interface */ export type AccessDeviceConfig = Readonly; /** @interface */ export type AccessDeviceConfigPayload = DeepPartial; +/** @interface */ +export type AccessDeviceEntryConfig = Readonly; +/** @interface */ +export type AccessDeviceEntryConfigPayload = DeepPartial; +/** @interface */ +export type AccessDoorConfig = Readonly; +/** @interface */ +export type AccessDoorConfigPayload = DeepPartial; +/** @interface */ +export type AccessFloorConfig = Readonly; +/** @interface */ +export type AccessFloorConfigPayload = DeepPartial; +/** @interface */ +export type AccessTopologyConfig = Readonly; +/** @interface */ +export type AccessTopologyConfigPayload = DeepPartial;