From 47804d16b31df5ed9e5bf2dd5584671b6407c9c8 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Fri, 16 Dec 2022 16:00:04 +0100 Subject: [PATCH 1/4] [items] ItemHistory: Fix typos in JSDoc Signed-off-by: Florian Hotze --- items/item-history.js | 52 +++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/items/item-history.js b/items/item-history.js index 1b5621558..f76ae13e4 100644 --- a/items/item-history.js +++ b/items/item-history.js @@ -21,7 +21,7 @@ class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ averageBetween (begin, end, serviceId) { @@ -37,7 +37,7 @@ class ItemHistory { * console.log('KitchenDimmer average since yesterday', item.history.averageSince(yesterday)); * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ averageSince (timestamp, serviceId) { @@ -49,7 +49,7 @@ class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ changedBetween (begin, end, serviceId) { @@ -60,7 +60,7 @@ class ItemHistory { * Checks if the state of a given Item has changed since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ changedSince (timestamp, serviceId) { @@ -72,7 +72,7 @@ class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ deltaBetween (begin, end, serviceId) { @@ -83,7 +83,7 @@ class ItemHistory { * Gets the difference value of the state of a given Item since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ deltaSince (timestamp, serviceId) { @@ -95,7 +95,7 @@ class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ deviationBetween (begin, end, serviceId) { @@ -106,7 +106,7 @@ class ItemHistory { * Gets the standard deviation of the state of the given Item since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ deviationSince (timestamp, serviceId) { @@ -118,7 +118,7 @@ class ItemHistory { * * @deprecated Replaced by evolutionRateSince and evolutionRateBetween. * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ evolutionRate (timestamp, serviceId) { @@ -131,7 +131,7 @@ class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ evolutionRateBetween (begin, end, serviceId) { @@ -142,7 +142,7 @@ class ItemHistory { * Gets the evolution rate of the state of a given Item since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ evolutionRateSince (timestamp, serviceId) { @@ -153,7 +153,7 @@ class ItemHistory { * Retrieves the historic state for a given Item at a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(string | null)} state */ historicState (timestamp, serviceId) { @@ -163,7 +163,7 @@ class ItemHistory { /** * Query the last update time of a given Item. * - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(ZonedDateTime | null)} */ lastUpdate (serviceId) { @@ -173,7 +173,7 @@ class ItemHistory { /** * Retrieves the historic item state for a given Item at the current point in time. * - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(string | null)} state */ latestState (serviceId) { @@ -185,7 +185,7 @@ class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ maximumBetween (begin, end, serviceId) { @@ -198,7 +198,7 @@ class ItemHistory { * Gets the state with the maximum value of a given Item since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ maximumSince (timestamp, serviceId) { @@ -212,7 +212,7 @@ class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ minimumBetween (begin, end, serviceId) { @@ -225,7 +225,7 @@ class ItemHistory { * Gets the state with the minimum value of a given Item since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ minimumSince (timestamp, serviceId) { @@ -237,7 +237,7 @@ class ItemHistory { /** * Persists the state of a given Item. * - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. */ persist (serviceId) { PersistenceExtensions.persist(this.rawItem, ...arguments); @@ -247,7 +247,7 @@ class ItemHistory { * Returns the previous state of a given Item. * * @param {boolean} [skipEqual] optional, if true, skips equal state values and searches the first state not equal the current state - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(string | null)} state or null */ previousState (skipEqual, serviceId) { @@ -259,7 +259,7 @@ class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ sumBetween (begin, end, serviceId) { @@ -270,7 +270,7 @@ class ItemHistory { * Gets the sum of the states of a given Item since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ sumSince (timestamp, serviceId) { @@ -282,7 +282,7 @@ class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ updatedBetween (begin, end, serviceId) { @@ -293,7 +293,7 @@ class ItemHistory { * Checks if the state of a given Item has been updated since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ updatedSince (timestamp, serviceId) { @@ -305,7 +305,7 @@ class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ varianceBetween (begin, end, serviceId) { @@ -316,7 +316,7 @@ class ItemHistory { * Gets the variance of the state of the given Item since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ varianceSince (timestamp, serviceId) { From 416438e2f63647bd9b2ddc0ed79925840f27b9a8 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Fri, 16 Dec 2022 16:09:10 +0100 Subject: [PATCH 2/4] [items] ItemHistory: Add `count****` methods Reference https://github.com/openhab/openhab-core/pull/3145. Reference https://github.com/openhab/openhab-core/pull/3211. Signed-off-by: Florian Hotze --- items/item-history.js | 46 +++++++++++++++++ types/items/item-history.d.ts | 86 +++++++++++++++++++++---------- types/items/item-history.d.ts.map | 2 +- 3 files changed, 107 insertions(+), 27 deletions(-) diff --git a/items/item-history.js b/items/item-history.js index f76ae13e4..5d6d40247 100644 --- a/items/item-history.js +++ b/items/item-history.js @@ -67,6 +67,52 @@ class ItemHistory { return PersistenceExtensions.changedSince(this.rawItem, ...arguments); } + /** + * Gets the number of available historic data points of a given Item between two certain points in time. + * + * @param {(ZonedDateTime | Date)} begin begin + * @param {(ZonedDateTime | Date)} end end + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. + * @returns {number} + */ + countBetween (begin, end, serviceId) { + return PersistenceExtensions.countBetween(this.rawItem, ...arguments); + } + + /** + * Gets the number of available historic data points of a given Item since a certain point in time. + * + * @param {(ZonedDateTime | Date)} timestamp + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. + * @returns {number} + */ + countSince (timestamp, serviceId) { + return PersistenceExtensions.countSince(this.rawItem, ...arguments); + } + + /** + * Gets the number of changes in historic data points of a given Item between two certain points in time. + * + * @param {(ZonedDateTime | Date)} begin begin + * @param {(ZonedDateTime | Date)} end end + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. + * @returns {number} + */ + countStateChangesBetween (begin, end, serviceId) { + return PersistenceExtensions.countStateChangesBetween(this.rawItem, ...arguments); + } + + /** + * Gets the number of changes in historic data points of a given Item since a certain point in time. + * + * @param {(ZonedDateTime | Date)} timestamp + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. + * @returns {number} + */ + countStateChangesSince (timestamp, serviceId) { + return PersistenceExtensions.countStateChangesSince(this.rawItem, ...arguments); + } + /** * Gets the difference value of the state of a given Item between two certain points in time. * diff --git a/types/items/item-history.d.ts b/types/items/item-history.d.ts index 163dd74e5..e43e51bab 100644 --- a/types/items/item-history.d.ts +++ b/types/items/item-history.d.ts @@ -15,7 +15,7 @@ declare class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ averageBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -28,7 +28,7 @@ declare class ItemHistory { * console.log('KitchenDimmer average since yesterday', item.history.averageSince(yesterday)); * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ averageSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -37,7 +37,7 @@ declare class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ changedBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): boolean; @@ -45,16 +45,50 @@ declare class ItemHistory { * Checks if the state of a given Item has changed since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ changedSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): boolean; + /** + * Gets the number of available historic data points of a given Item between two certain points in time. + * + * @param {(ZonedDateTime | Date)} begin begin + * @param {(ZonedDateTime | Date)} end end + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. + * @returns {number} + */ + countBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): number; + /** + * Gets the number of available historic data points of a given Item since a certain point in time. + * + * @param {(ZonedDateTime | Date)} timestamp + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. + * @returns {number} + */ + countSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): number; + /** + * Gets the number of changes in historic data points of a given Item between two certain points in time. + * + * @param {(ZonedDateTime | Date)} begin begin + * @param {(ZonedDateTime | Date)} end end + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. + * @returns {number} + */ + countStateChangesBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): number; + /** + * Gets the number of changes in historic data points of a given Item since a certain point in time. + * + * @param {(ZonedDateTime | Date)} timestamp + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. + * @returns {number} + */ + countStateChangesSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): number; /** * Gets the difference value of the state of a given Item between two certain points in time. * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ deltaBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -62,7 +96,7 @@ declare class ItemHistory { * Gets the difference value of the state of a given Item since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ deltaSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -71,7 +105,7 @@ declare class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ deviationBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -79,7 +113,7 @@ declare class ItemHistory { * Gets the standard deviation of the state of the given Item since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ deviationSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -88,7 +122,7 @@ declare class ItemHistory { * * @deprecated Replaced by evolutionRateSince and evolutionRateBetween. * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ evolutionRate(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -97,7 +131,7 @@ declare class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ evolutionRateBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -105,7 +139,7 @@ declare class ItemHistory { * Gets the evolution rate of the state of a given Item since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ evolutionRateSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -113,21 +147,21 @@ declare class ItemHistory { * Retrieves the historic state for a given Item at a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(string | null)} state */ historicState(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (string | null); /** * Query the last update time of a given Item. * - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(ZonedDateTime | null)} */ lastUpdate(serviceId?: string, ...args: any[]): (ZonedDateTime | null); /** * Retrieves the historic item state for a given Item at the current point in time. * - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(string | null)} state */ latestState(serviceId?: string, ...args: any[]): (string | null); @@ -136,7 +170,7 @@ declare class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ maximumBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -144,7 +178,7 @@ declare class ItemHistory { * Gets the state with the maximum value of a given Item since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ maximumSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -153,7 +187,7 @@ declare class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ minimumBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -161,21 +195,21 @@ declare class ItemHistory { * Gets the state with the minimum value of a given Item since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ minimumSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Persists the state of a given Item. * - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. */ persist(serviceId?: string, ...args: any[]): void; /** * Returns the previous state of a given Item. * * @param {boolean} [skipEqual] optional, if true, skips equal state values and searches the first state not equal the current state - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(string | null)} state or null */ previousState(skipEqual?: boolean, serviceId?: string, ...args: any[]): (string | null); @@ -184,7 +218,7 @@ declare class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ sumBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -192,7 +226,7 @@ declare class ItemHistory { * Gets the sum of the states of a given Item since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ sumSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -201,7 +235,7 @@ declare class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ updatedBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): boolean; @@ -209,7 +243,7 @@ declare class ItemHistory { * Checks if the state of a given Item has been updated since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ updatedSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): boolean; @@ -218,7 +252,7 @@ declare class ItemHistory { * * @param {(ZonedDateTime | Date)} begin begin * @param {(ZonedDateTime | Date)} end end - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ varianceBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); @@ -226,7 +260,7 @@ declare class ItemHistory { * Gets the variance of the state of the given Item since a certain point in time. * * @param {(ZonedDateTime | Date)} timestamp - * @param {string} [serviceId] Optional persistance service ID, if omitted, the default persistance service will be used. + * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ varianceSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); diff --git a/types/items/item-history.d.ts.map b/types/items/item-history.d.ts.map index f00c1fd9d..b22f01289 100644 --- a/types/items/item-history.d.ts.map +++ b/types/items/item-history.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"item-history.d.ts","sourceRoot":"","sources":["../../items/item-history.js"],"names":[],"mappings":";AAKA;;;;;;;GAOG;AACH;IACE,0BAEC;IADC,aAAsB;IAGxB;;;;;;;OAOG;IACH,sBALW,CAAC,gBAAgB,IAAI,CAAC,OACtB,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;;;;;;OAWG;IACH,wBAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CA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AInB;IAED;;;;;;;OAOG;IACH,uBALW,CAAC,gBAAgB,IAAI,CAAC,OACtB,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;OAMG;IACH,yBAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;OAEG;IACH,qBAEC;IAED;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,uBAEC;CACF"} \ No newline at end of file +{"version":3,"file":"item-history.d.ts","sourceRoot":"","sources":["../../items/item-history.js"],"names":[],"mappings":";AAKA;;;;;;;GAOG;AACH;IACE,0BAEC;IADC,aAAsB;IAGxB;;;;;;;OAOG;IACH,sBALW,CAAC,gBAAgB,IAAI,CAAC,OACtB,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;;;;;;OAWG;IACH,wBAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;;OAOG;IACH,sBALW,CAAC,gBAAgB,IAAI,CAAC,OACtB,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,OAAO,CAInB;IAED;;;;;;OAMG;IACH,wBAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,OAAO,CAInB;IAED;;;;;;;OAOG;IACH,oBALW,CAAC,gBAAgB,IAAI,CAAC,OACtB,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,MAAM,CAIlB;IAED;;;;;;OAMG;IACH,sBAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,MAAM,CAIlB;IAED;;;;;;;OAOG;IACH,gCALW,CAAC,gBAAgB,IAAI,CAAC,OACtB,CAAC,gBAAgB,IAAI,CAAC,c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,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;OAMG;IACH,yBAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;OAEG;IACH,qBAEC;IAED;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,uBAEC;CACF"} \ No newline at end of file From 594c87064f13ef8019da50ab1b4e3122bc568af6 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Fri, 16 Dec 2022 16:27:53 +0100 Subject: [PATCH 3/4] [items] ItemHistory: Fix param JSDoc Signed-off-by: Florian Hotze --- items/item-history.js | 78 +++++++++--------- types/items/item-history.d.ts | 132 +++++++++++++++--------------- types/items/item-history.d.ts.map | 2 +- 3 files changed, 106 insertions(+), 106 deletions(-) diff --git a/items/item-history.js b/items/item-history.js index 5d6d40247..7aa1959c1 100644 --- a/items/item-history.js +++ b/items/item-history.js @@ -19,8 +19,8 @@ class ItemHistory { /** * Gets the average value of the state of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ @@ -36,7 +36,7 @@ class ItemHistory { * var item = items.getItem('KitchenDimmer'); * console.log('KitchenDimmer average since yesterday', item.history.averageSince(yesterday)); * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ @@ -47,8 +47,8 @@ class ItemHistory { /** * Checks if the state of a given Item has changed between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ @@ -59,7 +59,7 @@ class ItemHistory { /** * Checks if the state of a given Item has changed since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ @@ -70,8 +70,8 @@ class ItemHistory { /** * Gets the number of available historic data points of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {number} */ @@ -82,7 +82,7 @@ class ItemHistory { /** * Gets the number of available historic data points of a given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {number} */ @@ -93,8 +93,8 @@ class ItemHistory { /** * Gets the number of changes in historic data points of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {number} */ @@ -105,7 +105,7 @@ class ItemHistory { /** * Gets the number of changes in historic data points of a given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {number} */ @@ -116,8 +116,8 @@ class ItemHistory { /** * Gets the difference value of the state of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ @@ -128,7 +128,7 @@ class ItemHistory { /** * Gets the difference value of the state of a given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ @@ -139,8 +139,8 @@ class ItemHistory { /** * Gets the standard deviation of the state of the given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ @@ -151,7 +151,7 @@ class ItemHistory { /** * Gets the standard deviation of the state of the given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ @@ -163,7 +163,7 @@ class ItemHistory { * Gets the evolution rate of the state of a given Item since a certain point in time. * * @deprecated Replaced by evolutionRateSince and evolutionRateBetween. - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ @@ -175,8 +175,8 @@ class ItemHistory { /** * Gets the evolution rate of the state of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ @@ -187,7 +187,7 @@ class ItemHistory { /** * Gets the evolution rate of the state of a given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ @@ -198,7 +198,7 @@ class ItemHistory { /** * Retrieves the historic state for a given Item at a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(string | null)} state */ @@ -210,7 +210,7 @@ class ItemHistory { * Query the last update time of a given Item. * * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. - * @returns {(ZonedDateTime | null)} + * @returns {(time.ZonedDateTime | null)} */ lastUpdate (serviceId) { return this._dateOrNull(PersistenceExtensions.lastUpdate(this.rawItem, ...arguments)); @@ -229,8 +229,8 @@ class ItemHistory { /** * Gets the state with the maximum value of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ @@ -243,7 +243,7 @@ class ItemHistory { /** * Gets the state with the maximum value of a given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ @@ -256,8 +256,8 @@ class ItemHistory { /** * Gets the state with the minimum value of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ @@ -270,7 +270,7 @@ class ItemHistory { /** * Gets the state with the minimum value of a given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ @@ -303,8 +303,8 @@ class ItemHistory { /** * Gets the sum of the states of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ @@ -315,7 +315,7 @@ class ItemHistory { /** * Gets the sum of the states of a given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ @@ -326,8 +326,8 @@ class ItemHistory { /** * Checks if the state of a given Item has been updated between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ @@ -338,7 +338,7 @@ class ItemHistory { /** * Checks if the state of a given Item has been updated since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ @@ -349,8 +349,8 @@ class ItemHistory { /** * Gets the variance of the state of the given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ @@ -361,7 +361,7 @@ class ItemHistory { /** * Gets the variance of the state of the given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ diff --git a/types/items/item-history.d.ts b/types/items/item-history.d.ts index e43e51bab..ad5b04973 100644 --- a/types/items/item-history.d.ts +++ b/types/items/item-history.d.ts @@ -13,12 +13,12 @@ declare class ItemHistory { /** * Gets the average value of the state of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ - averageBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + averageBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Gets the average value of the state of a given Item since a certain point in time. * @@ -27,137 +27,137 @@ declare class ItemHistory { * var item = items.getItem('KitchenDimmer'); * console.log('KitchenDimmer average since yesterday', item.history.averageSince(yesterday)); * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ - averageSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + averageSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Checks if the state of a given Item has changed between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ - changedBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): boolean; + changedBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): boolean; /** * Checks if the state of a given Item has changed since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ - changedSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): boolean; + changedSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): boolean; /** * Gets the number of available historic data points of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {number} */ - countBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): number; + countBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): number; /** * Gets the number of available historic data points of a given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {number} */ - countSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): number; + countSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): number; /** * Gets the number of changes in historic data points of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {number} */ - countStateChangesBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): number; + countStateChangesBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): number; /** * Gets the number of changes in historic data points of a given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {number} */ - countStateChangesSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): number; + countStateChangesSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): number; /** * Gets the difference value of the state of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ - deltaBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + deltaBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Gets the difference value of the state of a given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ - deltaSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + deltaSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Gets the standard deviation of the state of the given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ - deviationBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + deviationBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Gets the standard deviation of the state of the given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ - deviationSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + deviationSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Gets the evolution rate of the state of a given Item since a certain point in time. * * @deprecated Replaced by evolutionRateSince and evolutionRateBetween. - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ - evolutionRate(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + evolutionRate(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Gets the evolution rate of the state of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ - evolutionRateBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + evolutionRateBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Gets the evolution rate of the state of a given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ - evolutionRateSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + evolutionRateSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Retrieves the historic state for a given Item at a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(string | null)} state */ - historicState(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (string | null); + historicState(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (string | null); /** * Query the last update time of a given Item. * * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. - * @returns {(ZonedDateTime | null)} + * @returns {(time.ZonedDateTime | null)} */ - lastUpdate(serviceId?: string, ...args: any[]): (ZonedDateTime | null); + lastUpdate(serviceId?: string, ...args: any[]): (time.ZonedDateTime | null); /** * Retrieves the historic item state for a given Item at the current point in time. * @@ -168,37 +168,37 @@ declare class ItemHistory { /** * Gets the state with the maximum value of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ - maximumBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + maximumBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Gets the state with the maximum value of a given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ - maximumSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + maximumSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Gets the state with the minimum value of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ - minimumBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + minimumBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Gets the state with the minimum value of a given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} state or null */ - minimumSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + minimumSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Persists the state of a given Item. * @@ -216,54 +216,54 @@ declare class ItemHistory { /** * Gets the sum of the states of a given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ - sumBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + sumBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Gets the sum of the states of a given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ - sumSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + sumSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Checks if the state of a given Item has been updated between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ - updatedBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): boolean; + updatedBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): boolean; /** * Checks if the state of a given Item has been updated since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {boolean} */ - updatedSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): boolean; + updatedSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): boolean; /** * Gets the variance of the state of the given Item between two certain points in time. * - * @param {(ZonedDateTime | Date)} begin begin - * @param {(ZonedDateTime | Date)} end end + * @param {(time.ZonedDateTime | Date)} begin begin + * @param {(time.ZonedDateTime | Date)} end end * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ - varianceBetween(begin: (ZonedDateTime | Date), end: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + varianceBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * Gets the variance of the state of the given Item since a certain point in time. * - * @param {(ZonedDateTime | Date)} timestamp + * @param {(time.ZonedDateTime | Date)} timestamp * @param {string} [serviceId] Optional persistence service ID, if omitted, the default persistence service will be used. * @returns {(number | null)} */ - varianceSince(timestamp: (ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); + varianceSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (number | null); /** * @private */ diff --git a/types/items/item-history.d.ts.map b/types/items/item-history.d.ts.map index b22f01289..b2dfd6c52 100644 --- a/types/items/item-history.d.ts.map +++ b/types/items/item-history.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"item-history.d.ts","sourceRoot":"","sources":["../../items/item-history.js"],"names":[],"mappings":";AAKA;;;;;;;GAOG;AACH;IACE,0BAEC;IADC,aAAsB;IAGxB;;;;;;;OAOG;IACH,sBALW,CAAC,gBAAgB,IAAI,CAAC,OACtB,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;;;;;;OAWG;IACH,wBAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;;OAOG;IACH,sBALW,CAAC,gBAAgB,IAAI,CAAC,OACtB,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,OAAO,CAInB;IAED;;;;;;OAMG;IACH,wBAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,OAAO,CAInB;IAED;;;;;;;OAOG;IACH,oBALW,CAAC,gBAAgB,IAAI,CAAC,OACtB,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,MAAM,CAIlB;IAED;;;;;;OAMG;IACH,sBAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,MAAM,CAIlB;IAED;;;;;;;OAOG;IACH,gCALW,CAAC,gBAAgB,IAAI,CAAC,OACtB,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,MAAM,CAIlB;IAED;;;;;;OAMG;IACH,kCAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,MAAM,CAIlB;IAED;;;;;;;OAOG;IACH,oBALW,CAAC,gBAAgB,IAAI,CAAC,OACtB,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;OAMG;IACH,sBAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAA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AAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAM3B;IAED;;;;;;OAMG;IACH,wBAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAM3B;IAED;;;;OAIG;IACH,oBAFW,MAAM,wBAIhB;IAED;;;;;;OAMG;IACH,0BAJW,OAAO,cACP,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;;OAOG;IACH,kBALW,CAAC,gBAAgB,IAAI,CAAC,OACtB,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;OAMG;IACH,oBAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;;OAOG;IACH,sBALW,CAAC,gBAAgB,IAAI,CAAC,OACtB,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,OAAO,CAInB;IAED;;;;;;OAMG;IACH,wBAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,OAAO,CAInB;IAED;;;;;;;OAOG;IACH,uBALW,CAAC,gBAAgB,IAAI,CAAC,OACtB,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;OAMG;IACH,yBAJW,CAAC,gBAAgB,IAAI,CAAC,cACtB,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;OAEG;IACH,qBAEC;IAED;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,uBAEC;CACF"} \ No newline at end of file +{"version":3,"file":"item-history.d.ts","sourceRoot":"","sources":["../../items/item-history.js"],"names":[],"mappings":";AAKA;;;;;;;GAOG;AACH;IACE,0BAEC;IADC,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AC,CAM3B;IAED;;;;;;OAMG;IACH,wBAJW,CAAC,qBAAqB,IAAI,CAAC,cAC3B,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAM3B;IAED;;;;OAIG;IACH,oBAFW,MAAM,wBAIhB;IAED;;;;;;OAMG;IACH,0BAJW,OAAO,cACP,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;;OAOG;IACH,kBALW,CAAC,qBAAqB,IAAI,CAAC,OAC3B,CAAC,qBAAqB,IAAI,CAAC,cAC3B,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;OAMG;IACH,oBAJW,CAAC,qBAAqB,IAAI,CAAC,cAC3B,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;;OAOG;IACH,sBALW,CAAC,qBAAqB,IAAI,CAAC,OAC3B,CAAC,qBAAqB,IAAI,CAAC,cAC3B,MAAM,mBACJ,OAAO,CAInB;IAED;;;;;;OAMG;IACH,wBAJW,CAAC,qBAAqB,IAAI,CAAC,cAC3B,MAAM,mBACJ,OAAO,CAInB;IAED;;;;;;;OAOG;IACH,uBALW,CAAC,qBAAqB,IAAI,CAAC,OAC3B,CAAC,qBAAqB,IAAI,CAAC,cAC3B,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;;;;;OAMG;IACH,yBAJW,CAAC,qBAAqB,IAAI,CAAC,cAC3B,MAAM,mBACJ,CAAC,MAAM,GAAG,IAAI,CAAC,CAI3B;IAED;;OAEG;IACH,qBAEC;IAED;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,uBAEC;CACF"} \ No newline at end of file From d4a7a84a1f2ed56d21cd6ac9bbbe5df94e0959a9 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Mon, 19 Dec 2022 20:39:13 +0100 Subject: [PATCH 4/4] Update CHANGELOG Signed-off-by: Florian Hotze --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0308c17df..f3a69c17e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ | Type | Namespace | Description | Reference | Breaking | |-------------|------------|----------------------------------------------------------|--------------------------------------------------------|----------| | Enhancement | `triggers` | Add support for `Item` as argument & Add arg type checks | [#194](https://github.com/openhab/openhab-js/pull/194) | No | +| Enhancement | `items` | ItemHistory: Add new persistence methods | [#196](https://github.com/openhab/openhab-js/pull/196) | No | Also see the [Release Milestone](https://github.com/openhab/openhab-js/milestone/10).