deleteGroup

abstract suspend fun deleteGroup(groupId: String?): RainbowResult<Unit>

Deletes a group by its unique ID.

This method deletes a specific group identified by the given groupId. If the deletion is successful, the group is removed from the groups property. The result is returned as a RainbowResult, indicating success or failure.

Behavior:

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

  • If the group is successfully deleted, a RainbowResult containing Unit is returned.

Return

A RainbowResult indicating success or failure.

Parameters

groupId

The unique identifier of the group to delete. Must not be null or empty.