Skip to content

Commit

Permalink
Update CHANGELOG & type defs after rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
  • Loading branch information
florian-h05 committed Dec 30, 2022
1 parent 9cf8935 commit 6bed6a7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 26 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

## to be released

| Type | Namespace | Description | Reference | Breaking |
|-------------|------------|--------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|----------|
| Type | Namespace | Description | Reference | Breaking |
|-------------|-----------|----------------------------------------------------------------------------|--------------------------------------------------------|----------|
| Enhancement | `items` | Refactor `metadata` & `itemchannllink` APIs & add additional functionality | [#212](https://github.com/openhab/openhab-js/pull/212) | **Yes** |

Also see the [Release Milestone](https://github.com/openhab/openhab-js/milestone/11).

Expand Down
49 changes: 27 additions & 22 deletions types/items/items.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ export function addItem(itemConfig: ItemConfig): Item;
*/
export function getItemsByTag(...tagNames: string[]): Item[];
/**
* Replaces (upserts) an Item. If an Item exists with the same name, it will be removed and a new Item with
* the supplied parameters will be created in it's place. If an Item does not exist with this name, a new
* Replaces (or adds) an Item. If an Item exists with the same name, it will be removed and a new Item with
* the supplied parameters will be created in its place. If an Item does not exist with this name, a new
* Item will be created with the supplied parameters.
*
* This function can be useful in scripts which create a static set of Items which may need updating either
Expand Down Expand Up @@ -221,30 +221,34 @@ export class Item {
*/
get isUninitialized(): boolean;
/**
* Gets metadata values for this Item.
* @param {string} namespace The namespace for the metadata to retreive
* @returns {string} the metadata associated with this Item and namespace
* Gets metadata with the given name for this Item.
* @param {string} namespace The namespace for the metadata to retrieve
* @returns {{configuration: *, value: string}|null} metadata or null if the Item has no metadata with the given name
*/
getMetadataValue(namespace: string): string;
getMetadata(namespace: string): {
configuration: any;
value: string;
} | null;
/**
* Updates metadata values for this Item.
* @param {string} namespace The namespace for the metadata to update
* @param {string} value the value to update the metadata to
* @returns {string} the updated value
* Updates or adds the given metadata for this Item.
* @param {string} namespace name of the metadata
* @param {string} value value for this metadata
* @param {object} [configuration] optional metadata configuration
* @returns {{configuration: *, value: string}|null} old metadata or `null` if the Item has no metadata with the given name
*/
updateMetadataValue(namespace: string, value: string): string;
replaceMetadata(namespace: string, value: string, configuration?: object): {
configuration: any;
value: string;
} | null;
/**
* Inserts or updates metadata values for this Item.
* @param {string} namespace The namespace for the metadata to update
* @param {string} value the value to update the metadata to
* @returns {boolean} true iff a new value was inserted
* Removes metadata with a given name from a given Item.
* @param {string} namespace name of the metadata
* @returns {{configuration: *, value: string}|null} removed metadata or `null` if the Item has no metadata with the given name
*/
upsertMetadataValue(namespace: string, value: string): boolean;
/**
* Updates metadata values for this Item.
* @param {Map} namespaceToValues A map of namespaces to values to update
*/
updateMetadataValues(namespaceToValues: Map<any, any>): void;
removeMetadata(namespace: string): {
configuration: any;
value: string;
} | null;
/**
* Sends a command to the Item.
*
Expand Down Expand Up @@ -320,12 +324,13 @@ export class Item {
removeTags(...tagNames: string[]): void;
toString(): any;
}
import metadata = require("./metadata/metadata");
import ItemHistory = require("./item-history");
import ItemSemantics = require("./item-semantics");
declare namespace time {
type ZonedDateTime = import('@js-joda/core').ZonedDateTime;
}
import time = require("../time");
export declare function objects(): any;
export {};
export { metadata };
//# sourceMappingURL=items.d.ts.map
2 changes: 1 addition & 1 deletion types/items/items.d.ts.map

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

2 changes: 1 addition & 1 deletion types/items/metadata/itemchannellink.d.ts.map

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

0 comments on commit 6bed6a7

Please sign in to comment.