API Clients β
API clients, ready to use in project "Out of the box".
Interface β
Each client should have default Interface for CRUD methods. This naming is important, because Store modules depend on this interface.
getList: (params: any) => Promise<{ items: array, next: boolean }>;get: ({ itemId: string }) => Promise<{}>;add: ({ itemInstance: object }) => Promise<any>;patch: ({ id: string, changes: object }) => Promise<any>;update: ({ itemId: string, itemInstance: object }) => Promise<any>;delete: ({ id: string }) => Promise<any>;getLookup:seegetList.
All other methods are named depending on context.
Users β
js
import { users } from '@webitel/ui-sdk/src/api/clients';
const {
getList,
get,
add,
patch,
update,
delete: _delete,
getLookup,
patchUserPresence,
logoutUser,
} = users;Roles β
js
import { roles } from '@webitel/ui-sdk/src/api/clients';
const {
getList,
get,
add,
update,
delete: _delete,
getLookup,
getExtendedRoles,
getPermissionsOptions,
} = roles;Queues β
js
import { queues } from '@webitel/ui-sdk/src/api/clients';
const {
getList,
get,
add,
patch,
update,
delete: _delete,
getLookup,
getQueuesTags,
} = queues;Media β
js
import { media } from '@webitel/ui-sdk/src/api/clients';
const { getList, get, add, delete: _delete, getLookup } = media;Lists β
js
import { lists } from '@webitel/ui-sdk/src/api/clients';
const { getList, get, add, patch, update, delete: _delete, getLookup } = lists;Gateways β
js
import { gateways } from '@webitel/ui-sdk/src/api/clients';
const {
getList,
get,
add,
patch,
update,
delete: _delete,
getLookup,
} = gateways;Flows β
js
import { flows } from '@webitel/ui-sdk/src/api/clients';
const {
getList,
get,
add,
patch,
update,
delete: _delete,
getLookup,
getFlowTags,
} = flows;Communications β
js
import { communications } from '@webitel/ui-sdk/src/api/clients';
const {
getList,
get,
add,
patch,
update,
delete: _delete,
getLookup,
} = communications;Chat Gateways β
js
import { chatGateways } from '@webitel/ui-sdk/src/api/clients';
const {
getList,
get,
add,
patch,
update,
delete: _delete,
getLookup,
} = chatGateways;Calendars β
js
import { calendars } from '@webitel/ui-sdk/src/api/clients';
const {
getList,
get,
add,
patch,
update,
delete: _delete,
getLookup,
getTimezonesLookup,
} = calendars;Buckets β
js
import { buckets } from '@webitel/ui-sdk/src/api/clients';
const { getList, get, add, update, delete: _delete, getLookup } = buckets;Agents β
js
import { agents } from '@webitel/ui-sdk/src/api/clients';
const {
getList,
get,
add,
patch,
update,
delete: _delete,
getLookup,
getAgentHistory,
getRegularAgentsOptions,
getAgentUsersOptions,
getSupervisorOptions,
} = agents;Teams β
js
import { teams } from '@webitel/ui-sdk/src/api/clients';
const { getList, get, add, update, delete: _delete, getLookup } = teams;Skills β
js
import { skills } from '@webitel/ui-sdk/src/api/clients';
const { getList, get, add, update, delete: _delete, getLookup } = skills;