deleteMembership method

Future<void> deleteMembership({
  1. required String agentSpaceId,
  2. required String applicationId,
  3. required String membershipId,
  4. MembershipType? memberType,
})

Deletes a membership, revoking a user's access to an agent space.

Parameter agentSpaceId : The unique identifier of the agent space to revoke access from.

Parameter applicationId : The unique identifier of the application that contains the agent space.

Parameter membershipId : The unique identifier of the membership to delete.

Parameter memberType : The type of member to remove.

Implementation

Future<void> deleteMembership({
  required String agentSpaceId,
  required String applicationId,
  required String membershipId,
  MembershipType? memberType,
}) async {
  final $payload = <String, dynamic>{
    'agentSpaceId': agentSpaceId,
    'applicationId': applicationId,
    'membershipId': membershipId,
    if (memberType != null) 'memberType': memberType.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/DeleteMembership',
    exceptionFnMap: _exceptionFns,
  );
}