diff --git a/.changes/unreleased/new-items-20260202-103719.yaml b/.changes/unreleased/new-items-20260202-103719.yaml new file mode 100644 index 00000000..156b4db6 --- /dev/null +++ b/.changes/unreleased/new-items-20260202-103719.yaml @@ -0,0 +1,6 @@ +kind: new-items +body: Add support of DigitalTwinBuilder item type in create, rm, get and set (metadata only) +time: 2026-02-02T10:37:19.062674977Z +custom: + Author: may-hartov + AuthorLink: https://github.com/may-hartov diff --git a/src/fabric_cli/core/fab_types.py b/src/fabric_cli/core/fab_types.py index 41048fc4..2888f625 100644 --- a/src/fabric_cli/core/fab_types.py +++ b/src/fabric_cli/core/fab_types.py @@ -140,8 +140,7 @@ def from_string(cls, vws_type_str): class _BaseItemType(Enum): @classmethod def from_string(cls, item_type_str): - raise NotImplementedError( - "This method must be implemented in the subclass") + raise NotImplementedError("This method must be implemented in the subclass") ################################## @@ -200,8 +199,7 @@ def from_string(cls, vws_type_str): if item.value.lower() == vws_type_str.lower(): return item raise FabricCLIError( - ErrorMessages.Common.invalid_virtual_item_container_type( - vws_type_str), + ErrorMessages.Common.invalid_virtual_item_container_type(vws_type_str), fab_constant.ERROR_INVALID_ITEM_TYPE, ) @@ -237,7 +235,7 @@ def from_string(cls, item_type_str): VirtualItemContainerType.SPARK_POOL: VirtualItemType.SPARK_POOL, VirtualItemContainerType.MANAGED_IDENTITY: VirtualItemType.MANAGED_IDENTITY, VirtualItemContainerType.MANAGED_PRIVATE_ENDPOINT: VirtualItemType.MANAGED_PRIVATE_ENDPOINT, - VirtualItemContainerType.EXTERNAL_DATA_SHARE: VirtualItemType.EXTERNAL_DATA_SHARE + VirtualItemContainerType.EXTERNAL_DATA_SHARE: VirtualItemType.EXTERNAL_DATA_SHARE, } ################ @@ -262,6 +260,7 @@ class ItemType(_BaseItemType): DASHBOARD = "Dashboard" DATAMART = "Datamart" DATA_PIPELINE = "DataPipeline" + DIGITAL_TWIN_BUILDER = "DigitalTwinBuilder" ENVIRONMENT = "Environment" EVENTHOUSE = "Eventhouse" EVENTSTREAM = "Eventstream" @@ -492,6 +491,7 @@ class MirroredDatabaseFolders(Enum): ItemType.DASHBOARD: "dashboards", ItemType.DATA_PIPELINE: "dataPipelines", ItemType.DATAMART: "datamarts", + ItemType.DIGITAL_TWIN_BUILDER: "digitalTwinBuilders", ItemType.ENVIRONMENT: "environments", ItemType.EVENTHOUSE: "eventhouses", ItemType.EVENTSTREAM: "eventstreams", @@ -538,6 +538,7 @@ class MirroredDatabaseFolders(Enum): ItemType.DASHBOARD: "dashboards", ItemType.DATAMART: "datamarts", ItemType.DATA_PIPELINE: "pipelines", + ItemType.DIGITAL_TWIN_BUILDER: "digitaltwinbuilders", ItemType.ENVIRONMENT: "sparkenvironments", ItemType.EVENTHOUSE: "eventhouses", ItemType.EVENTSTREAM: "eventstreams", diff --git a/src/fabric_cli/core/hiearchy/fab_item.py b/src/fabric_cli/core/hiearchy/fab_item.py index 47d2106e..b7d1a9d7 100644 --- a/src/fabric_cli/core/hiearchy/fab_item.py +++ b/src/fabric_cli/core/hiearchy/fab_item.py @@ -39,8 +39,7 @@ def item_type(self) -> ItemType: return _item_type else: raise FabricCLIError( - ErrorMessages.Hierarchy.item_type_not_valid( - str(super().item_type)), + ErrorMessages.Hierarchy.item_type_not_valid(str(super().item_type)), fab_constant.ERROR_INVALID_ITEM_TYPE, ) @@ -112,6 +111,7 @@ def get_payload(self, definition, input_format=None) -> dict: | ItemType.EVENTHOUSE | ItemType.KQL_DATABASE | ItemType.MIRRORED_DATABASE + | ItemType.DIGITAL_TWIN_BUILDER | ItemType.REFLEX | ItemType.EVENTSTREAM | ItemType.MOUNTED_DATA_FACTORY