Untitled
unknown
plain_text
a year ago
2.0 kB
2
Indexable
Never
// Event listeners const agentsOnline = { action: 'subscribe', subject: 'agents-online' } // return number of online agents const callsNew = { action: 'subscribe', subject: 'calls-new' } // return array of new calls to claim by agent // Actions const callsHistoryAgent = { reuqestID: 1, action: 'list', entity: 'calls', data: { isForAdmin: false, // only hsitory for current user page: 1, // for pagination recordsPerPage: 10, // for pagination recordsTotal: 100, // for pagination filters?: { search: 'test' // something more if needed } } } // return array of history of calls for current agent const callsHistoryAdmin = { reuqestID: 1, action: 'list', entity: 'calls', data: { isForAdmin: true, // only hsitory for current user page: 1, // for pagination recordsPerPage: 10, // for pagination recordsTotal: 100, // for pagination filters?: { search: 'test' // something more if needed } } } // return array of history of calls for admin const agentsList = { reuqestID: 1, action: 'list', entity: 'agents', data: { page: 1, // for pagination recordsPerPage: 10, // for pagination recordsTotal: 100, // for pagination filters?: { search: 'test' // something more if needed } } } // return array of agents const agentCreate = { reuqestID: 1, action: 'create', entity: 'agents', data: { id: 1, firstName: 'test', lastName: 'test', email: 'test@test.test', countryCode: 'test', isAdmin: true, isSuperAdmin: true } } // return created agent const agentEdit = { reuqestID: 1, action: 'edit', entity: 'agents', data: { id: 1, firstName: 'test', lastName: 'test', email: 'test@test.test', countryCode: 'test', isAdmin: true, isSuperAdmin: true } } // return edited agent const agentDelete = { reuqestID: 1, action: 'delete', entity: 'agents', data: { id: 1 } } // return deleted agent