npm package: @one-view/pd-oneview-agent-monitor-types
Description: agent monitor plugin for supervisor tool service into 1vu integration.
Latest version: 0.0.21


FORMAT: 1A
VERSION: 1.0.0
HOST: https://api.pd-oneview.net/agent-monitor

# pd-oneview-agent-monitor

agent monitor plugin for supervisor tool service into 1vu integration.




## Obtain Agent list [/v1/agents{?filter.agent.name,filter.agent.status,filter.queue.name,direction,orderBy,page,pageSize}]

+ Parameters
    + filter.agent.name (optional, string)
    + filter.agent.status (optional, string)
    + filter.queue.name (optional, string)
    + orderBy (optional, string)
    + direction (optional, SortOrder)
    + page (optional, int64)
        + Default: 1
    + pageSize (optional, int64)
        + Default: 10

### List All Agents [GET]

+ Request

    + Headers

            Authorization: bearer token

+ Response 200 (application/json)
    + Attributes (AgentsListResponse)

+ Response 400 (application/json)
    + Attributes (Error)

+ Response 401 (application/json)
    + Attributes (Error)

+ Response 403 (application/json)
    + Attributes (Error)

+ Response 404 (application/json)
    + Attributes (Error)

+ Response 500 (application/json)
    + Attributes (Error)

## Obtain Agent list with cursor [/v1/agents/cursor{?filter.agent.name,filter.agent.status,filter.agent.email,direction,orderBy,token,pageSize}]

+ Parameters
    + filter.agent.name (optional, string)
    + filter.agent.status (optional, string)
    + filter.agent.email (optional, string)
    + orderBy (optional, string)
    + direction (optional, SortOrder)
    + token (optional, string)
    + pageSize (optional, int64)
        + Default: 10

### List All Agents [GET]

+ Request

    + Headers

            Authorization: bearer token

+ Response 200 (application/json)
    + Attributes (AgentsListCursorResponse)

+ Response 400 (application/json)
    + Attributes (Error)

+ Response 401 (application/json)
    + Attributes (Error)

+ Response 403 (application/json)
    + Attributes (Error)

+ Response 404 (application/json)
    + Attributes (Error)

+ Response 500 (application/json)
    + Attributes (Error)

## Obtain Agent list in batch [/v1/agents/batch{?filter.agent.ids,direction,orderBy,token,pageSize}]

+ Parameters
    + filter.agent.ids (optional, string)
    + orderBy (optional, string)
    + direction (optional, SortOrder)
    + token (optional, string)
    + pageSize (optional, int64)
        + Default: 10

### List All Agents [GET]

+ Request

    + Headers

            Authorization: bearer token

+ Response 200 (application/json)
    + Attributes (AgentsListCursorResponse)

+ Response 400 (application/json)
    + Attributes (Error)

+ Response 401 (application/json)
    + Attributes (Error)

+ Response 403 (application/json)
    + Attributes (Error)

+ Response 404 (application/json)
    + Attributes (Error)

+ Response 500 (application/json)
    + Attributes (Error)

## Agent Details [/v1/agent/{agentId}]

+ Parameters
    + agentId (required, string)

### Get Agent Details [GET]

+ Request

    + Headers

            Authorization: bearer token

+ Response 200 (application/json)
    + Attributes (AgentDetailResponse)

+ Response 400 (application/json)
    + Attributes (Error)

+ Response 401 (application/json)
    + Attributes (Error)

+ Response 403 (application/json)
    + Attributes (Error)

+ Response 404 (application/json)
    + Attributes (Error)

+ Response 500 (application/json)
    + Attributes (Error)

## Obtain agent's acitve cases [/v1/agent/{agentId}/cases]

+ Parameters
    + agentId (required, string)

### List All Agents [GET]

+ Request

    + Headers

            Authorization: bearer token

+ Response 200 (application/json)
    + Attributes (AgentActiveCasesResponse)

+ Response 400 (application/json)
    + Attributes (Error)

+ Response 401 (application/json)
    + Attributes (Error)

+ Response 403 (application/json)
    + Attributes (Error)

+ Response 404 (application/json)
    + Attributes (Error)

+ Response 500 (application/json)
    + Attributes (Error)

## Agent Online Status [/v1/agent/{agentId}/online]
update agent status as online to begin receive ticket

+ Parameters
    + agentId (required, string)

### Get agent to online [PUT]

+ Request

    + Headers

            Authorization: bearer token

+ Response 200 (application/json)
    + Attributes (AgentStatusInfo)

+ Response 400 (application/json)
    + Attributes (Error_400)

+ Response 403 (application/json)
    + Attributes (Error_403)

+ Response 404 (application/json)
    + Attributes (Error_404)

+ Response 500 (application/json)
    + Attributes (Error)

## Agent Offline Status [/v1/agent/{agentId}/offline]
update agent status as offline to stop receiving ticket

+ Parameters
    + agentId (required, string)

### Set agent to offline [PUT]

+ Request

    + Headers

            Authorization: bearer token

+ Response 200 (application/json)
    + Attributes (AgentStatusInfo)

+ Response 400 (application/json)
    + Attributes (Error_400)

+ Response 403 (application/json)
    + Attributes (Error_403)

+ Response 404 (application/json)
    + Attributes (Error_404)

+ Response 500 (application/json)
    + Attributes (Error)

## Update agent status v1 [/v1/agent/{agentId}/status]
update agent status

+ Parameters
    + agentId (required, string)

### Update agent status [PUT]

+ Request

    + Headers

            Authorization: bearer token

+ Attributes (UpdateAgentStatusParam)

+ Response 200 (application/json)
    + Attributes (AgentStatusInfo)

+ Response 400 (application/json)
    + Attributes (Error_400)

+ Response 403 (application/json)
    + Attributes (Error_403)

+ Response 404 (application/json)
    + Attributes (Error_404)

+ Response 500 (application/json)
    + Attributes (Error)
# Data Structures

## int32 (number)
## int64 (number)

## `error_object` (object)
+ `status` (string)
+ `title` (string)

## `Error` (object)
+ errors (array[error_object])

## `Error_401` (object)
+ errors (array)
    + - (`error_object`)
        + `status`: `401` (string)
        + `title`: `not authorize` (string)

## `Error_404` (object)
+ errors (array)
    + - (`error_object`)
        + `status`: `404` (string)
        + `title`: `not found` (string)

## `Error_403` (object)
+ errors (array)
    + - (`error_object`)
        + `status`: `403` (string)
        + `title`: `forbidden` (string)

## `Error_400` (object)
+ errors (array)
    + - (`error_object`)
        + `status`: `400` (string)
        + `title`: `bad request` (string)

## `Error_500` (object)
+ errors (array)
    + - (`error_object`)
        + `status`: `500` (string)
        + `title`: `internal server error` (string)

## AgentDetailResponse
+ data (Agent, required)

## AgentsListResponse
+ list (array[Agent], fixed-type, required) - list of agents
+ page: 1 (int32)
+ pageSize: 10 (int32)

## AgentsListCursorResponse
+ list (array[Agent], fixed-type, required) - list of agents
+ pageSize: 10 (int32)
+ cursor (Cursor, required) - object of pagination cursor

## AgentActiveCasesResponse
+ list (array[TicketCase], fixed-type, required)

## Agent
+ generic_status: `ONLINE` (string)
+ id: `9x94r90d-dsfkjdfkg3-sdfjk` (string, required)
+ statusAlias: `In Meeting` (string, required)
+ averageHandlingTime: 10000 (int64, required)
+ attributes (AgentAttributes)

## AgentAttributes
+ name: `Jon Doe` (string, required)
+ signature: `j` (string)
+ email: `jon@example.com` (string)
+ channels (array[string])
    + `chat`
+ queues (array[string], required)
    + `eng`
+ countries (array[string], required)
    + `SG`
+ role (AgentRole)
+ updatedAt: `2012-12-11 08:52:31 +0000 UTC` (string, required)
+ lastLoginTime: `2012-12-11 08:52:31 +0000 UTC` (string, required)
+ organization: `fp` (string)
+ timezone: `Asia/Singapore` (string)
+ manager: `Jon Doe Manager` (string)
+ potentialChatWorkload: 10 (int64, required)
+ activeWorkload: 2 (int64, required)
+ supervisor: `Jon Doe Supervisor` (string)
+ timeInStatus : 10000 (int64, required)
+ expertises (array[string], fixed-type)

## Cursor
+ currentPage: `tokenA` (string, required)
+ nextPage: `tokenB` (string, required)
+ previousPages (array[string], required, fixed-type)

## TicketCase
+ id: `1234567` (string, required)
+ requestTime: `2012-12-11 08:52:31 +0000 UTC` (string, required)
+ acceptingTime: `2012-12-11 08:52:31 +0000 UTC` (string, required)
+ assignedTime: `2012-12-11 08:52:31 +0000 UTC` (string, required)
+ handlingTime: 3600 (int64, required) handling time duration in seconds
+ queue: `Eng Chat` (string, required)
+ isChatClosed: false (boolean, required)

## SortOrder (enum)
+ asc
+ desc

## AgentRole (enum)
+ AGENT
+ MANAGER
+ SUPERVISOR

## AgentStatusInfo
+ id                : `f4b8f8e5-365a-4ed1-a122-0f4ba1afef44` (string) - agent id
+ status            : `online` (string) - agent status

## AgentStatusList
+ data (array[string], fixed-type, required) - List of agent status

## UpdateAgentStatusParam
+ status (string, required) - new status