88from ...core .client_wrapper import AsyncClientWrapper , SyncClientWrapper
99from ...core .request_options import RequestOptions
1010from ...types .organization_member_tag import OrganizationMemberTag
11- from ...types .organization_member_tag_assignment_request import OrganizationMemberTagAssignmentRequest
1211from ...types .organization_member_tag_import_status import OrganizationMemberTagImportStatus
1312from ...types .paginated_organization_member_tag_list import PaginatedOrganizationMemberTagList
1413from .raw_client import AsyncRawMemberTagsClient , RawMemberTagsClient
@@ -144,8 +143,18 @@ def assign(
144143 self ,
145144 id : int ,
146145 * ,
147- assignments : typing .Sequence [OrganizationMemberTagAssignmentRequest ],
146+ all_ : bool ,
147+ exclude_project_id : typing .Optional [float ] = None ,
148+ exclude_workspace_id : typing .Optional [float ] = None ,
149+ is_deleted : typing .Optional [bool ] = None ,
150+ role : typing .Optional [str ] = None ,
151+ tags : typing .Optional [str ] = None ,
152+ user_last_activity_gte : typing .Optional [str ] = None ,
153+ user_last_activity_lte : typing .Optional [str ] = None ,
154+ excluded : typing .Optional [typing .Sequence [int ]] = OMIT ,
155+ included : typing .Optional [typing .Sequence [int ]] = OMIT ,
148156 overwrite : typing .Optional [bool ] = OMIT ,
157+ bulk_organization_member_tag_assignment_request_tags : typing .Optional [typing .Sequence [int ]] = OMIT ,
149158 request_options : typing .Optional [RequestOptions ] = None ,
150159 ) -> AssignMemberTagsResponse :
151160 """
@@ -162,12 +171,42 @@ def assign(
162171 id : int
163172 A unique integer value identifying this organization.
164173
165- assignments : typing.Sequence[OrganizationMemberTagAssignmentRequest]
166- List of member tag assignments to assign.
174+ all_ : bool
175+ If true, assign tags to all organization members. If false, assign tags to the provided users.
176+
177+ exclude_project_id : typing.Optional[float]
178+ Filter exclude_project_id by exact match
179+
180+ exclude_workspace_id : typing.Optional[float]
181+ Filter exclude_workspace_id by exact match
182+
183+ is_deleted : typing.Optional[bool]
184+ Filter is_deleted by exact match
185+
186+ role : typing.Optional[str]
187+ Filter role by in list (comma-separated values)
188+
189+ tags : typing.Optional[str]
190+ Filter tags by in list (comma-separated values)
191+
192+ user_last_activity_gte : typing.Optional[str]
193+ Filter user__last_activity by greater than or equal to
194+
195+ user_last_activity_lte : typing.Optional[str]
196+ Filter user__last_activity by less than or equal to
197+
198+ excluded : typing.Optional[typing.Sequence[int]]
199+ List of user IDs to exclude from the assignment.
200+
201+ included : typing.Optional[typing.Sequence[int]]
202+ List of user IDs to include in the assignment.
167203
168204 overwrite : typing.Optional[bool]
169205 If true, replace all existing tag assignments for each user with the provided ones. If false, only add new assignments.
170206
207+ bulk_organization_member_tag_assignment_request_tags : typing.Optional[typing.Sequence[int]]
208+ List of tag IDs to assign.
209+
171210 request_options : typing.Optional[RequestOptions]
172211 Request-specific configuration.
173212
@@ -178,23 +217,31 @@ def assign(
178217
179218 Examples
180219 --------
181- from label_studio_sdk import LabelStudio, OrganizationMemberTagAssignmentRequest
220+ from label_studio_sdk import LabelStudio
182221
183222 client = LabelStudio(
184223 api_key="YOUR_API_KEY",
185224 )
186225 client.organizations.member_tags.assign(
187226 id=1,
188- assignments=[
189- OrganizationMemberTagAssignmentRequest(
190- tag_ids=[1],
191- user_id=1,
192- )
193- ],
227+ all_=True,
194228 )
195229 """
196230 _response = self ._raw_client .assign (
197- id , assignments = assignments , overwrite = overwrite , request_options = request_options
231+ id ,
232+ all_ = all_ ,
233+ exclude_project_id = exclude_project_id ,
234+ exclude_workspace_id = exclude_workspace_id ,
235+ is_deleted = is_deleted ,
236+ role = role ,
237+ tags = tags ,
238+ user_last_activity_gte = user_last_activity_gte ,
239+ user_last_activity_lte = user_last_activity_lte ,
240+ excluded = excluded ,
241+ included = included ,
242+ overwrite = overwrite ,
243+ bulk_organization_member_tag_assignment_request_tags = bulk_organization_member_tag_assignment_request_tags ,
244+ request_options = request_options ,
198245 )
199246 return _response .data
200247
@@ -575,8 +622,18 @@ async def assign(
575622 self ,
576623 id : int ,
577624 * ,
578- assignments : typing .Sequence [OrganizationMemberTagAssignmentRequest ],
625+ all_ : bool ,
626+ exclude_project_id : typing .Optional [float ] = None ,
627+ exclude_workspace_id : typing .Optional [float ] = None ,
628+ is_deleted : typing .Optional [bool ] = None ,
629+ role : typing .Optional [str ] = None ,
630+ tags : typing .Optional [str ] = None ,
631+ user_last_activity_gte : typing .Optional [str ] = None ,
632+ user_last_activity_lte : typing .Optional [str ] = None ,
633+ excluded : typing .Optional [typing .Sequence [int ]] = OMIT ,
634+ included : typing .Optional [typing .Sequence [int ]] = OMIT ,
579635 overwrite : typing .Optional [bool ] = OMIT ,
636+ bulk_organization_member_tag_assignment_request_tags : typing .Optional [typing .Sequence [int ]] = OMIT ,
580637 request_options : typing .Optional [RequestOptions ] = None ,
581638 ) -> AssignMemberTagsResponse :
582639 """
@@ -593,12 +650,42 @@ async def assign(
593650 id : int
594651 A unique integer value identifying this organization.
595652
596- assignments : typing.Sequence[OrganizationMemberTagAssignmentRequest]
597- List of member tag assignments to assign.
653+ all_ : bool
654+ If true, assign tags to all organization members. If false, assign tags to the provided users.
655+
656+ exclude_project_id : typing.Optional[float]
657+ Filter exclude_project_id by exact match
658+
659+ exclude_workspace_id : typing.Optional[float]
660+ Filter exclude_workspace_id by exact match
661+
662+ is_deleted : typing.Optional[bool]
663+ Filter is_deleted by exact match
664+
665+ role : typing.Optional[str]
666+ Filter role by in list (comma-separated values)
667+
668+ tags : typing.Optional[str]
669+ Filter tags by in list (comma-separated values)
670+
671+ user_last_activity_gte : typing.Optional[str]
672+ Filter user__last_activity by greater than or equal to
673+
674+ user_last_activity_lte : typing.Optional[str]
675+ Filter user__last_activity by less than or equal to
676+
677+ excluded : typing.Optional[typing.Sequence[int]]
678+ List of user IDs to exclude from the assignment.
679+
680+ included : typing.Optional[typing.Sequence[int]]
681+ List of user IDs to include in the assignment.
598682
599683 overwrite : typing.Optional[bool]
600684 If true, replace all existing tag assignments for each user with the provided ones. If false, only add new assignments.
601685
686+ bulk_organization_member_tag_assignment_request_tags : typing.Optional[typing.Sequence[int]]
687+ List of tag IDs to assign.
688+
602689 request_options : typing.Optional[RequestOptions]
603690 Request-specific configuration.
604691
@@ -611,10 +698,7 @@ async def assign(
611698 --------
612699 import asyncio
613700
614- from label_studio_sdk import (
615- AsyncLabelStudio,
616- OrganizationMemberTagAssignmentRequest,
617- )
701+ from label_studio_sdk import AsyncLabelStudio
618702
619703 client = AsyncLabelStudio(
620704 api_key="YOUR_API_KEY",
@@ -624,19 +708,27 @@ async def assign(
624708 async def main() -> None:
625709 await client.organizations.member_tags.assign(
626710 id=1,
627- assignments=[
628- OrganizationMemberTagAssignmentRequest(
629- tag_ids=[1],
630- user_id=1,
631- )
632- ],
711+ all_=True,
633712 )
634713
635714
636715 asyncio.run(main())
637716 """
638717 _response = await self ._raw_client .assign (
639- id , assignments = assignments , overwrite = overwrite , request_options = request_options
718+ id ,
719+ all_ = all_ ,
720+ exclude_project_id = exclude_project_id ,
721+ exclude_workspace_id = exclude_workspace_id ,
722+ is_deleted = is_deleted ,
723+ role = role ,
724+ tags = tags ,
725+ user_last_activity_gte = user_last_activity_gte ,
726+ user_last_activity_lte = user_last_activity_lte ,
727+ excluded = excluded ,
728+ included = included ,
729+ overwrite = overwrite ,
730+ bulk_organization_member_tag_assignment_request_tags = bulk_organization_member_tag_assignment_request_tags ,
731+ request_options = request_options ,
640732 )
641733 return _response .data
642734
0 commit comments