@@ -887,6 +887,7 @@ def create_image_task(
887887 file_path : str ,
888888 status : str = None ,
889889 external_status : str = None ,
890+ custom_task_status : str = "" ,
890891 priority : Priority = None ,
891892 annotations : list = [],
892893 tags : list = [],
@@ -902,6 +903,8 @@ def create_image_task(
902903 status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
903904 'approved', 'declined' (Optional).
904905 external_status can be 'registered', 'completed', 'skipped', 'reviewed',
906+ custom_task_status is the initial value of the status.
907+ it can be set to 'registered', 'pending', 'workflow_{1..6}_completed', 'workflow_{1..6}_declined' (Optional).
905908 priority is the priority of the task (default: none) (Optional).
906909 Set one of the numbers corresponding to:
907910 none = 0,
@@ -917,6 +920,7 @@ def create_image_task(
917920 external_assignee is slug of external assigned user (Optional).
918921 external_reviewer is slug of external review user (Optional).
919922 external_approver is slug of external approve user (Optional).
923+ workflow_{1..6}_user is slug of custom workflow assignee user for each step (Optional).
920924 """
921925 endpoint = "tasks/image"
922926 if not utils .is_image_supported_ext (file_path ):
@@ -942,6 +946,8 @@ def create_image_task(
942946 payload ["tags" ] = tags
943947 if is_delete_exif :
944948 payload ["isDeleteExif" ] = is_delete_exif
949+ if custom_task_status :
950+ payload ["customTaskStatus" ] = custom_task_status
945951
946952 self .__fill_assign_users (payload , ** kwargs )
947953
@@ -1868,6 +1874,7 @@ def update_image_task(
18681874 task_id : str ,
18691875 status : str = None ,
18701876 external_status : str = None ,
1877+ custom_task_status : str = "" ,
18711878 priority : Priority = None ,
18721879 tags : list = [],
18731880 annotations : List [dict ] = [],
@@ -1881,6 +1888,8 @@ def update_image_task(
18811888 status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
18821889 'approved', 'declined' (Optional).
18831890 external_status can be 'registered', 'completed', 'skipped', 'reviewed',
1891+ custom_task_status is the initial value of the status.
1892+ it can be set to 'registered', 'pending', 'workflow_{1..6}_completed', 'workflow_{1..6}_declined' (Optional).
18841893 priority is the priority of the task (default: none) (Optional).
18851894 Set one of the numbers corresponding to:
18861895 none = 0,
@@ -1897,6 +1906,7 @@ def update_image_task(
18971906 external_assignee is slug of external assigned user (Optional).
18981907 external_reviewer is slug of external review user (Optional).
18991908 external_approver is slug of external approve user (Optional).
1909+ workflow_{1..6}_user is slug of custom workflow assignee user for each step (Optional).
19001910 """
19011911 endpoint = "tasks/image/" + task_id
19021912 payload = {}
@@ -1916,6 +1926,8 @@ def update_image_task(
19161926 payload ["annotations" ] = delete_extra_annotations_parameter (annotations )
19171927 if relations :
19181928 payload ["relations" ] = relations
1929+ if custom_task_status :
1930+ payload ["customTaskStatus" ] = custom_task_status
19191931
19201932 self .__fill_assign_users (payload , ** kwargs )
19211933
@@ -4255,6 +4267,18 @@ def __fill_assign_users(payload: dict, **kwargs):
42554267 payload ["externalReviewer" ] = kwargs .get ("external_reviewer" )
42564268 if "external_approver" in kwargs :
42574269 payload ["externalApprover" ] = kwargs .get ("external_approver" )
4270+ if "workflow_1_user" in kwargs :
4271+ payload ["workflow1User" ] = kwargs .get ("workflow_1_user" )
4272+ if "workflow_2_user" in kwargs :
4273+ payload ["workflow2User" ] = kwargs .get ("workflow_2_user" )
4274+ if "workflow_3_user" in kwargs :
4275+ payload ["workflow3User" ] = kwargs .get ("workflow_3_user" )
4276+ if "workflow_4_user" in kwargs :
4277+ payload ["workflow4User" ] = kwargs .get ("workflow_4_user" )
4278+ if "workflow_5_user" in kwargs :
4279+ payload ["workflow5User" ] = kwargs .get ("workflow_5_user" )
4280+ if "workflow_6_user" in kwargs :
4281+ payload ["workflow6User" ] = kwargs .get ("workflow_6_user" )
42584282
42594283 def __get_signed_path (
42604284 self ,
0 commit comments