deleteContactsFromGroup

abstract suspend fun deleteContactsFromGroup(groupId: String?, contactIds: List<String?>): RainbowResult<Unit>

Removes multiple contacts from a specific group.

This method removes a list of contacts, identified by contactIds, from the group specified by groupId. The result is returned as a RainbowResult, indicating success or failure. Upon success, the group's details are updated in the groups property.

Validation Rules:

  • groupId must not be null or empty.

  • contactIds must not be empty; null or empty IDs in the list will be ignored.

Behavior:

  • If groupId is null or empty, the function returns a Failure with an appropriate error message.

  • If contactIds is empty, a Failure is returned.

  • If all contacts are successfully removed, a success is returned.

  • If some removals fail, a Failure with error details is returned.

Return

A RainbowResult indicating success or failure.

Parameters

groupId

The unique identifier of the group from which the contacts will be removed. Must not be null or empty.

contactIds

A list of unique identifiers for the contacts to remove. If empty, the function fails.