Skip to content

Commit

Permalink
LC-132 add remote logout (#151)
Browse files Browse the repository at this point in the history
* LC-132 add remote logout

* remove unused status parameter

---------

Co-authored-by: Wojciech Fabjańczuk <wojciechfabjanczuk@gmail.com>
  • Loading branch information
maciejjwojcik and wfabjanczuk authored Dec 21, 2023
1 parent b81f8a5 commit 2d98acb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions agent/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,3 +412,10 @@ func (a *API) ListRoutingStatuses(groupIDs []int) ([]AgentStatus, error) {

return resp, err
}

// Logout logs out the specified agent
func (a *API) Logout(agentID string) error {
return a.Call("logout", &logoutRequest{
AgentID: agentID,
}, &emptyResponse{})
}
4 changes: 4 additions & 0 deletions agent/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,7 @@ type followCustomerRequest struct {
type listRoutingStatusesRequest struct {
Filters *routingStatusesFilter `json:"filters"`
}

type logoutRequest struct {
AgentID string `json:"agent_id"`
}

0 comments on commit 2d98acb

Please sign in to comment.