updateChannelMemberSchemeRolesWithHttpInfo method

Future<Response> updateChannelMemberSchemeRolesWithHttpInfo(
  1. String channelId,
  2. String userId,
  3. MmUpdateTeamMemberSchemeRolesRequest mmUpdateTeamMemberSchemeRolesRequest
)

Update the scheme-derived roles of a channel member.

Update a channel member's scheme_admin/scheme_user properties. Typically this should either be scheme_admin=false, scheme_user=true for ordinary channel member, or scheme_admin=true, scheme_user=true for a channel admin. Minimum server version: 5.0 ##### Permissions Must be authenticated and have the manage_channel_roles permission.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> updateChannelMemberSchemeRolesWithHttpInfo(
  String channelId,
  String userId,
  MmUpdateTeamMemberSchemeRolesRequest mmUpdateTeamMemberSchemeRolesRequest,
) async {
  // ignore: prefer_const_declarations
  final path = r'/channels/{channel_id}/members/{user_id}/schemeRoles'
      .replaceAll('{channel_id}', channelId)
      .replaceAll('{user_id}', userId);

  // ignore: prefer_final_locals
  Object? postBody = mmUpdateTeamMemberSchemeRolesRequest;

  final queryParams = <MmQueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];

  return apiClient.invokeAPI(
    path,
    'PUT',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}