@@ -42,7 +42,6 @@ def __init__(self, *args, **kwargs):
4242 projects = Relationship .ToMany ("Project" , True )
4343 webhooks = Relationship .ToMany ("Webhook" , False )
4444
45- @experimental
4645 def invite_user (
4746 self ,
4847 email : str ,
@@ -83,22 +82,21 @@ def invite_user(
8382 "projectRoleId" : project_role .role .uid
8483 } for project_role in project_roles or []]
8584
86- res = self .client .execute (query_str , {
87- data_param : [ {
88- "inviterId" : self . client . get_user (). uid ,
89- "inviteeEmail " : email ,
90- "organizationId " : self . uid ,
91- "organizationRoleId " : role .uid ,
92- "projects " : projects
93- }]
94- },
95- experimental = True )
85+ res = self .client .execute (
86+ query_str , {
87+ data_param : [{
88+ "inviterId " : self . client . get_user (). uid ,
89+ "inviteeEmail " : email ,
90+ "organizationId " : self .uid ,
91+ "organizationRoleId " : role . uid ,
92+ "projects" : projects
93+ }]
94+ } )
9695 invite_response = res ['createInvites' ][0 ]['invite' ]
9796 if not invite_response :
9897 raise LabelboxError (f"Unable to send invite for email { email } " )
9998 return Invite (self .client , invite_response )
10099
101- @experimental
102100 def invite_limit (self ) -> InviteLimit :
103101 """ Retrieve invite limits for the org
104102 This already accounts for users currently in the org
@@ -109,10 +107,10 @@ def invite_limit(self) -> InviteLimit:
109107
110108 """
111109 org_id_param = "organizationId"
112- res = self .client .execute ("""query InvitesLimitPyApi($%s: ID!) {
110+ res = self .client .execute (
111+ """query InvitesLimitPyApi($%s: ID!) {
113112 invitesLimit(where: {id: $%s}) { used limit remaining }
114- }""" % (org_id_param , org_id_param ), {org_id_param : self .uid },
115- experimental = True )
113+ }""" % (org_id_param , org_id_param ), {org_id_param : self .uid })
116114 return InviteLimit (
117115 ** {utils .snake_case (k ): v for k , v in res ['invitesLimit' ].items ()})
118116
0 commit comments