GroupService

@Service
class GroupService(groupRepository: GroupRepository, contactRepository: ContactRepository)(source)

Serviço de Grupos de Contatos. Grupos são agrupamentos de contatos para envio de campanhas em massa.

Constructors

Link copied to clipboard
constructor(groupRepository: GroupRepository, contactRepository: ContactRepository)

Functions

Link copied to clipboard
@Transactional
fun addContactsToGroup(tenantId: String, groupId: String, contactIds: List<String>): GroupResponse
Link copied to clipboard
@Transactional
fun createGroup(tenantId: String, request: CreateGroupRequest): GroupResponse
Link copied to clipboard
@Transactional
fun deleteGroup(tenantId: String, groupId: String)
Link copied to clipboard
@Transactional(readOnly = true)
fun getGroup(tenantId: String, groupId: String): GroupResponse?
Link copied to clipboard
@Transactional(readOnly = true)
fun listGroupContacts(tenantId: String, groupId: String): List<ContactResponse>
Link copied to clipboard
@Transactional(readOnly = true)
fun listGroups(tenantId: String): List<GroupResponse>
Link copied to clipboard
@Transactional
fun removeContactsFromGroup(tenantId: String, groupId: String, contactIds: List<String>): GroupResponse
Link copied to clipboard
@Transactional
fun updateGroup(tenantId: String, groupId: String, request: UpdateGroupRequest): GroupResponse