@@ -719,6 +719,13 @@ def get_server_version_tuple() -> ServerVersion:
719719 return con .get_server_version_tuple ()
720720
721721
722+ def product_base_type_supported () -> bool :
723+ """Product base types are available on server.
724+ """
725+ con = get_server_api_connection ()
726+ return con .product_base_type_supported ()
727+
728+
722729def get_users (
723730 project_name : Optional [str ] = None ,
724731 usernames : Optional [Iterable [str ]] = None ,
@@ -4809,22 +4816,21 @@ def get_products(
48094816 fields : Optional [Iterable [str ]] = None ,
48104817 own_attributes = _PLACEHOLDER ,
48114818) -> Generator [ProductDict , None , None ]:
4812- """Query products from the server.
4819+ """Query products from server.
48134820
48144821 Todos:
48154822 Separate 'name_by_folder_ids' filtering to separated method. It
48164823 cannot be combined with some other filters.
48174824
48184825 Args:
4819- project_name (str): Name of the project.
4826+ project_name (str): Name of project.
48204827 product_ids (Optional[Iterable[str]]): Task ids to filter.
48214828 product_names (Optional[Iterable[str]]): Task names used for
48224829 filtering.
48234830 folder_ids (Optional[Iterable[str]]): Ids of task parents.
4824- Use 'None' if folder is direct child of the project.
4831+ Use 'None' if folder is direct child of project.
48254832 product_types (Optional[Iterable[str]]): Product types used for
48264833 filtering.
4827- product_base_types (Optional[Iterable[str]]): Product base types
48284834 product_name_regex (Optional[str]): Filter products by name regex.
48294835 product_path_regex (Optional[str]): Filter products by path regex.
48304836 Path starts with folder path and ends with product name.
@@ -4935,7 +4941,7 @@ def get_product_types(
49354941) -> list [ProductTypeDict ]:
49364942 """Types of products.
49374943
4938- This is the server- wide information. Product types have 'name', 'icon' and
4944+ This is server wide information. Product types have 'name', 'icon' and
49394945 'color'.
49404946
49414947 Args:
@@ -5012,6 +5018,7 @@ def create_product(
50125018 tags : Optional [Iterable [str ]] = None ,
50135019 status : Optional [str ] = None ,
50145020 active : Optional [bool ] = None ,
5021+ product_base_type : Optional [str ] = None ,
50155022 product_id : Optional [str ] = None ,
50165023) -> str :
50175024 """Create new product.
@@ -5026,6 +5033,7 @@ def create_product(
50265033 tags (Optional[Iterable[str]]): Product tags.
50275034 status (Optional[str]): Product status.
50285035 active (Optional[bool]): Product active state.
5036+ product_base_type (Optional[str]): Product base type.
50295037 product_id (Optional[str]): Product id. If not passed new id is
50305038 generated.
50315039
@@ -5044,6 +5052,7 @@ def create_product(
50445052 tags = tags ,
50455053 status = status ,
50465054 active = active ,
5055+ product_base_type = product_base_type ,
50475056 product_id = product_id ,
50485057 )
50495058
@@ -5054,6 +5063,7 @@ def update_product(
50545063 name : Optional [str ] = None ,
50555064 folder_id : Optional [str ] = None ,
50565065 product_type : Optional [str ] = None ,
5066+ product_base_type : Optional [str ] = None ,
50575067 attrib : Optional [dict [str , Any ]] = None ,
50585068 data : Optional [dict [str , Any ]] = None ,
50595069 tags : Optional [Iterable [str ]] = None ,
@@ -5073,6 +5083,7 @@ def update_product(
50735083 name (Optional[str]): New product name.
50745084 folder_id (Optional[str]): New product id.
50755085 product_type (Optional[str]): New product type.
5086+ product_base_type (Optional[str]): New product base type.
50765087 attrib (Optional[dict[str, Any]]): New product attributes.
50775088 data (Optional[dict[str, Any]]): New product data.
50785089 tags (Optional[Iterable[str]]): New product tags.
@@ -5087,6 +5098,7 @@ def update_product(
50875098 name = name ,
50885099 folder_id = folder_id ,
50895100 product_type = product_type ,
5101+ product_base_type = product_base_type ,
50905102 attrib = attrib ,
50915103 data = data ,
50925104 tags = tags ,
0 commit comments