@contactwise/cw-config-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

Table of content

  • Installing
  • Examples
  • Entities and it's methods

Installing

Using npm:

npm i @contactwise/cw-config-sdk

Examples

Creating a class instance

import { Client as sdk } from "@contactwise/cw-config-sdk";
let token = {
    token: token,
    expiresIn: 0
}

let client = new sdk(token, tenantId, environmentId, baseUrl);
Parameters Type Mandatory
token object yes
tenantId string yes
environmentId string yes
baseUrl string yes

baseUrl can be development, QA or a mock. It should contain api/v1.

Performing a GET request

import { Client as sdk } from "@contactwise/cw-config-sdk";
let token = {
    token: token,
    expiresIn: 0
}

let client = new sdk(token, tenantId, environmentId, baseUrl);

async function listAll() {
    let result = await client.Skills.listAsync()
        .then(response => response);
}

Performing a POST request

import { Client as sdk } from "@contactwise/cw-config-sdk";
let token = {
    token: token,
    expiresIn: 0
}

let client = new sdk(token, tenantId, environmentId, baseUrl);

async function create() {
    let createModel = {
        name: "adipisicingdolor",
        friendlyName: "in proident ut sint",
        description: "o",
        state: true
    }
    let result = await client.Skills.createAsync(createModel)
        .then(response => response)
}

Entities and it's methods

Addresses

ClassName - Addresses

Methods available

listAsync() - List all addresses

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="Name", descending=false

getByIdAsync(id) - Get an address by id

Parameters Type Mandatory
id string yes

getByNameAsync(name) - Get an address by name

Parameters Type Mandatory
name string yes

createAsync(model) - Create an address

model sample:

{
        name: "demo",
        friendlyName: "sample demo",
        description: "Excepteur anim nullam",
        street: "proident nostrud in deserunt",
        city: "quis id",
        region: "qui enim",
        postalCode: "628617",
        country: "IN"
}

updateAsync(model) - Update an address

model sample:

{
        id: "string",
        friendlyName: "sample",
        description: "sample",
        street: "sample street",
        city: "sample city",
        region: "sample region",
        postalCode: "628618",
        country: "IN",
}

deleteAsync(id) - Delete an address

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple addresses

model sample:

 ["3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"]

BusinessHours

ClassName - BusinessHours

Methods available

listAsync() - List all business hours

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="Name", descending=false

getByIdAsync(id) - Get business hour by id

Parameters Type Mandatory
id string yes

getByNameAync(name) - Get business hour by name

Parameters Type Mandatory
name string yes

createAsync(model) - Create business hour

model sample:

{
        name: "SdkExample",
        friendlyName: "SdkExample",
        state: true,
        timezoneId: "SA Eastern Standard Time",
        description: "SdkExample",
        schedule: {   
         'sunday': {'openingHours': '480',
        'closingHours': '1200'
 }}
}

updateAsync(model) - Update business hour

model sample:

{
       id: "string",
       name: "SdkExample",
       friendlyName: "Updated",
       state: true,
       timezoneId: "SA Eastern Standard Time",
       description: "updated",
       schedule:  {   
        'sunday': {'openingHours': '480',
       'closingHours': '1200'
 }}
}

deleteAsync(id) - Delete business hour

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple business hours

model sample:

 ["3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"]

Calendars

ClassName - Calendars

Methods available

listAsync() - List all calendars

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="FriendlyName", descending=false

getByIdAsync(id) - Get calendar by id

Parameters Type Mandatory
id string yes

getByFriendlyNameAync(friendlyName) - Get calendar by friendly name

Parameters Type Mandatory
friendlyName string yes

createAsync(model) - Create calendar

model sample:

{
   friendlyName: "finland",
   description: "finland calendar",
   state: true,
   holidays: [
              {
                date: "2021-04-22T00:00:00",
                friendlyName: "fcCalio",
                description: "fcCalio holiday",
                state: false
              }
            ],
   timezoneId: "Dateline Standard Time"
    }

updateAsync(model) - Update calendar

model sample:

{
   id: "string",
   friendlyName: "updated",
   description: "updated",
   state: true,
   date: "2021-04-22T00:00:00",
   timezoneId: "Pacific Standard Time"
}

deleteAsync(id) - Delete calendar

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple calendars

model sample:

 ["3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"]

Holidays

ClassName - Holidays

Methods available

listAsync() - List all holidays

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
calendarId string yes
pageNumber number no
pageSize number no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10

getByIdAsync(calendarId, id) - Get holiday by id

Parameters Type Mandatory
calendarId string yes
id string yes

createAsync(calendarId,model) - Create holiday

Parameters Type Mandatory
calendarId string yes

model sample:

{
  friendlyName: "estminim",
  description: "laboris aliquip",
  state: false,
  date: "1959-06-11T21:11:28.329Z",
}

updateAsync(calendarId, model) - Update holiday

Parameters Type Mandatory
calendarId string yes

model sample:

{
    id: "string",
    calendarId"a0db19f7-a213-467e-bd60-444ef4ab37",
    friendlyName: "ullamco",
    description: "incididunt occaecaest sunt",
    state: false,
    date: "1998-04-21T15:52:36.578Z"
}

deleteAsync(calendarId, id) - Delete holiday

Parameters Type Mandatory
calendarId string yes
id string yes

deleteMultipleAsync(calendarId, model) - Delete multiple holidays

Parameters Type Mandatory
calendarId string yes

model sample:

 ["3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"]

Phone Numbers

ClassName - PhoneNumbers

Methods available

listAsync() - List all phone numbers

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="Name", descending=false

getByIdAsync(id) - Get phone number by id

Parameters Type Mandatory
id string yes

createAsync(model) - Create phone number

model sample:

{
  id: "bb95251b-5688-6867-0923-361b7401a9e5",
  phoneNumber: "ea quis",
  addr"urn:uuid:e011f808-03-7930-fa6e53dc6ab3",
  isoCountry: "Ut aute" 
}

updateAsync(model) - Update phone number

model sample:

{
   number: "Excepteur adipisicing do ut",
   workflowId: "urn:uuid:064a187f-95f8-538c-4736-814da3e2226d",
   workflowFriendlyName: "exercitation esse mollit",
   addressId: "2116fde7-7628-29be-1d8e-a2ae846adbbd",
   addressFriendlyName: "eu",
   numberEnum: 0,
   beta: true,
   capabilities: {
       voice: true,
       sms: false,
       mms: true
    },
   lata: "reprehenderit incididunt cillum",
   locality: "aliquip velit",
   latitude: 17522559.56644593,
   longitude: -56964948.3743202,
   region: "ex Duis",
   postalCode: "Excepteur",
   countryCode: "magna non",
   isoCountry: "sed est",
   addressRequirements: "deserunt nostrud",
   sid: "officia sed ut ea",
   id: "828b43bb-a69b-7fdd-f3fd-900e216faa5f",
   name: "aliquip",
   friendlyName: "enim Excepteur amet",
   description: "quis sed id dolor",
   state: false,
   createdAt: "1947-10-03T06:22:00.069Z",
   createdBy: "proident dolore dolor eiusmod adipisicing",
   modifiedAt: "1991-03-06T04:37:01.446Z",
   modifiedBy: "nostr"
}

deleteAsync(id) - Delete phone number

Parameters Type Mandatory
id string yes

assignAsync(model) - Assign phone number to a workflow

model sample:

  {
    id: "ab1b59f8-7e28-40dc-aa12-bcfb143eb869",
    workflowId: "2b1070d6-9e6e-49e5-a224-b9b9cdb2e66a"
   }

Parameters for searchLocalAsync, searchMobileAsync and searchTollFreeAsync.

Parameters Type Mandatory
isoCountry string no
areaCode string no
beta boolean no
contains string no
distance string no
excludeAllAddressRequired boolean no
excludeForeignAddressRequired boolean no
excludeLocalAddressRequired boolean no
faxEnabled boolean no
inLata string no
inLocality string no
inPostalCode string no
inRegion string no
mmsEnabled boolean no
nearLatLong string no
nearNumber string no
smsEnabled boolean no
voiceEnabled boolean no
limit string no

The default values will be isoCountry="GB" and voiceEnabled = true.

searchLocalAsync() - Search a local phone number

searchMobileAsync() - Search a mobile phone number

searchTollFreeAsync() - Search a toll free phone number

Prompts

ClassName - Prompts

Methods available

listAsync() - List all prompts

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="Name", descending=false

getByIdAsync(id) - Get prompt by id

Parameters Type Mandatory
id string yes

getByNameAync(name) - Get prompt by name

Parameters Type Mandatory
name string yes

createAsync(model) - Create prompts

model sample:

{
  file: "C:/ContactWise/Projects/prompts/audio/ClassicalCut.mp3",
  name: "adipisicingdolor",
  friendlyName: "in proident ut sint",
  description: "o",
  state: true
}

updateAsync(model) - Update prompts

model sample:

{
 id: "string",
 friendlyName: "updated friName",
 description: "update des",
 state: true
}

deleteAsync(id) - Delete prompts

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple prompts

model sample:

 ["3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"]

Tenants

ClassName - Tenants

Methods available

listAsync() - List all tenants

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10

getByIdAsync(id) - Get tenant by id

Parameters Type Mandatory
id string yes

createAsync(model) - Create tenant

model sample:

{
   id: "veniam reprehe",
   name: "culpa quis pariatur aute",
   description: "ut nulla",
   createdBy: "aliquip irure deserunt veniam exercitation"
}

updateAsync(model) - Update tenant

model sample:

{
  id: "eiusmod culpa consequat",
  name: "dolor",
  description: "in Excepteur",
  modifiedBy: "ex",
  maxEnvironments: -44587372,
  state: 2
}

deleteAsync(id) - Delete tenant

Parameters Type Mandatory
id string yes

Users

ClassName - Users

Methods available

listAsync() - List all users

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
columnName string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, columnName="firstName", descending=false

getByIdAsync(id) - Get user by id

Parameters Type Mandatory
id string yes

createAsync(model) - Create user

model sample:

{
  firstName: "animdolor",
  lastName: "aniesse",
  email: "johndoe@example.org",
  login: "johndoe@example.org",
  birthday: "1986-06-08T00:32:22.113Z",
  isActive: false,
  password: "Loram ipsum dolar",
  skills: [
            {
              skillId: "5f4d1416-8a9c-411e-bc7d-1a390c727899",
              name: "cillum ut deserunt aliquip reprehenderit",
              level: 3
            }
        ],
  roles: [
            "Administrator"
        ],
  extensionId: "1a5e5d46-a08b-4d70-b756-09bb27467b3f",
  mobile: "string",
  work: "string",
  home: "string",
  sip: "string",
  preferredEndpoint: {}
}

updateAsync(model) - Update user

model sample:

{
  id: "string",
  firstName: "consequa",
  lastName: "estarosa",
  isActive: false,
  roles: [
            "Administrator"
        ],
  extensionId: "1a5e5d46-a08b-4d70-b756-09bb27467b3f",
   
}

assignSkillToUser(model) - Assign a skill to user

model sample:

{
 id: "5f4d1416-8a9c-411e-bc7d-1a390c727899",
 skillId: "63ac70aa-dfd6-e526-d038-4163b4e62df5",
 level: 3
}

updateSkillForUser(model) - Update skill for user

model sample:

{
 id: "5f4d1416-8a9c-411e-bc7d-1a390c727899",
 skillId: "63ac70aa-dfd6-e526-d038-4163b4e62df5",
 level: 2
}

removeSkillFromUser(model) - Remove skill from user

model sample:

{
  id: "5f4d1416-8a9c-411e-bc7d-1a390c727899",
  skillId: "63ac70aa-dfd6-e526-d038-4163b4e62df5",
  level: 2
}

deleteAsync(id) - Delete user

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple users

model sample:

 ["3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"]

Workflows

ClassName - Workflows

Methods available

listAsync() - List all workflows

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="Name", descending=false

getByIdAsync(id) - Get workflow by id

Parameters Type Mandatory
id string yes

getByNameAync(name) - Get workflow by name

Parameters Type Mandatory
name string yes

createAsync(model) - Create workflow

model sample:

{
   name: "cupidatatLorem",
   friendlyName: "occaecat",
   description: "cillum",
   state: false,
   type: 0,
   flowDocument: "nonnostrudisiipsum",
}

updateAsync(model) - Update workflow

model sample:

{
   id: "string",
   friendlyName: "anim ullamco Duis",
   description: "et irure nisi  laborum",
   state: false,
   flowDocument: "nonnostrudisiipsum",
}

deleteAsync(id) - Delete workflow

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple workflow

model sample:

 ["3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"]

Configuration Settings

ClassName - ConfigurationSettings

Methods available

listAsync() - List all configuration settings

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="Name", descending=false, search=""

getByIdAsync(id) - Get configuration setting by id

Parameters Type Mandatory
id string yes

createAsync(model) - Create configuration setting

model sample:

{
    name: "laborum esse elit in",
    friendlyName: "in proident",
    description: "aliqua commodo",
    state: false,
    settings: "laborum Excepteur anim eiusmod sunt"
}

updateAsync(model) - Update configuration setting

model sample:

{
    id: "urn:uuid:0552e4b9-92e1-e877-de12-c5d5120198b1",
    friendlyName: "in ex nisi",
    description: "minim quis",
    state: false,
    settings: "nostrud in "
}

deleteAsync(id) - Delete configuration setting

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple configuration settings

model sample:

[
  "3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"
]

Contacts

ClassName - Contacts

Methods available

listAsync() - List all contacts

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="FirstName", descending=false, search=""

getByIdAsync(id) - Get contact by id

Parameters Type Mandatory
id string yes

createAsync(model) - Create contact

model sample:

{
  firstName: "dolor cupidatat qui s",
  surname: "est cupidatat s",
  middleName: "laboris Lorem aliqu",
  nickName: "Excepteur",
  company: "cupidatat laborum dolor aliqua reprehenderit",
  jobTitle: "in eiusmod officia",
  department: "Excepteur et",
  country: "do elit velit",
  street: "eu laborum tempor ex",
  street2: "occaecat dolore",
  city: "nostrud in veniam",
  pinCode: "sit culpa",
  stateName: "irure ex Lorem magna et",
  website: "dolore commodo",
  birthday: "1966-04-30T10:53:17.891Z",
  telephone: "eu id consectetur do",
  emailAddress: "veniam velit sit in",
  notes: "labore Excepteur occaecat aliquip",
  description: "dolore consectetur ut dolor laborum",
  state: false
}

updateAsync(model) - Update contact

model sample:

{
    id: "urn:uuid:0fe486c4-c67e-f814-5e04-865e1463ad5c",
    firstName: "dolor cupidatat qui s",
    surname: "est cupidatat s",
    middleName: "laboris Lorem aliqu",
    nickName: "Excepteur",
    company: "cupidatat laborum dolor aliqua reprehenderit",
    jobTitle: "in eiusmod officia",
    department: "Excepteur et",
    country: "do elit velit",
    street: "eu laborum tempor ex",
    street2: "occaecat dolore",
    city: "nostrud in veniam",
    pinCode: "sit culpa",
    stateName: "irure ex Lorem magna et",
    website: "dolore commodo",
    birthday: "1966-04-30T10:53:17.891Z",
    telephone: "eu id consectetur do",
    emailAddress: "veniam velit sit in",
    notes: "labore Excepteur occaecat aliquip",
    description: "dolore consectetur ut dolor laborum",
    state: false
}

deleteAsync(id) - Delete contact

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple contacts

model sample:

[
  "3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"
]

Disposition Codes

ClassName - DispositionCodes

Methods available

listAsync() - List all disposition codes

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="Name", descending=false, search=""

getByIdAsync(id) - Get disposition code by id

Parameters Type Mandatory
id string yes

getByNameAsync(name) - Get disposition code by name

Parameters Type Mandatory
name string yes

createAsync(model) - Create disposition code

model sample:

{
  name: "adipisicing dolor",
  friendlyName: "in proident ut sint",
  description: "o",
  state: true
}

updateAsync(model) - Update disposition code

model sample:

{
  id: "6f804cd7-f989-6ed6-b8c3-8bc1fa41a2aa",
  friendlyName: "irure culpa",
  description: "incididunt aute ex pariatur",
  state: true
}

deleteAsync(id) - Delete disposition code

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple disposition codes

model sample:

[
  "3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"
]

Documents

ClassName - Documents

Methods available

listAsync() - List all documents

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="Name", descending=false, search=""

getByIdAsync(id) - Get document by id

Parameters Type Mandatory
id string yes

getByTitleAsync(title) - Get document by title

Parameters Type Mandatory
title string yes

createAsync(model) - Create document

model sample:

{
  name: "minim culpa sed ad",
  friendlyName: "reprehenderit ipsum m",
  description: "Lorem in id sed",
  state: true,
  title: "est dolor",
  content: "cupidatat eu"
}

updateAsync(model) - Update document

model sample:

{
  id: "urn:uuid:13e2a76c-0429-910a-1a0e-5ff10d68401f",
  title: "commodo id dolor do",
  description: "laboris commo",
  content: "cillum dolore dolor ut"
}

deleteAsync(id) - Delete document

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple documents

model sample:

[
  "3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"
]

Extensions

ClassName - Extensions

Methods available

listAsync() - List all extensions

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="Number", descending=false, search=""

getUnassignedAsync() - Get unassigned extensions

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
column string no
descending boolean no
search string no
by string no
pageNumber number no
pageSize number no

If parameters are not provided, the default value will be column="Number", descending=false, search="", by="", pageNumber=1, pageSize=10

getByIdAsync(id) - Get extension by id

Parameters Type Mandatory
id string yes

createAsync(model) - Create extension

model sample:

{
  name: "nulla irure",
  friendlyName: "eu fugiat",
  description: "minim adip",
  state: false,
  directoryNumberType: 1,
  number: "aute",
  workflowId: "urn:uuid:0998cf6a-c550-1f31-b51b-811f64d1e812"
}

updateAsync(model) - Update extension

model sample:

{
  id: "282e1ac5-33b7-4cf7-c718-5ffd1d269cf4",
  workflowId: "urn:uuid:b4ae0cef-19e4-e97b-583e-264beeea4485",
  friendlyName: "in enim nisi ut",
  description: "amet minim nostrud mollit",
  state: true,
  directoryNumberType: 1
}

deleteAsync(id) - Delete extension

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple extensions

model sample:

[
  "3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"
]

Queues

ClassName - Queues

Methods available

listAsync() - List all queues

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="Name", descending=false, search=""

getByIdAsync(id) - Get queue by id

Parameters Type Mandatory
id string yes

getByNameAsync(name) - Get queue by name

Parameters Type Mandatory
name string yes

createAsync(model) - Create queue

model sample:

{
  name: "labore enim",
  friendlyName: "esse",
  description: "dolor exercitation",
  state: false,
  skillExpression: "Spanish > 1"
}

updateAsync(model) - Update queue

model sample:

{
  id: "0a948be9-b570-6da7-3768-a4cec0da6cd0",
  friendlyName: "et",
  description: "sit",
  state: false,
  skillExpression: "English > 1"
}

deleteAsync(id) - Delete queue

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple queues

model sample:

[
  "3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"
]

RoutePoints

ClassName - RoutePoints

Methods available

listAsync() - List all routePoints

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="Number", descending=false, search=""

getByIdAsync(id) - Get routePoint by id

Parameters Type Mandatory
id string yes

getByNameAsync(name) - Get routePoint by name

Parameters Type Mandatory
name string yes

createAsync(model) - Create routePoint

model sample:

{
  name: "nulla irure",
  friendlyName: "eu fugiat",
  description: "minim adip",
  state: false,
  directoryNumberType: 1,
  number: "aute",
  workflowId: "urn:uuid:0998cf6a-c550-1f31-b51b-811f64d1e812"
}

updateAsync(model) - Update routePoint

model sample:

{
  id: "282e1ac5-33b7-4cf7-c718-5ffd1d269cf4",
  workflowId: "urn:uuid:b4ae0cef-19e4-e97b-583e-264beeea4485",
  friendlyName: "in enim nisi ut",
  description: "amet minim nostrud mollit",
  state: true,
  directoryNumberType: 1
}

deleteAsync(id) - Delete routePoint

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple routePoints

model sample:

[
  "3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"
]

Skills

ClassName - Skills

Methods available

listAsync() - List all skills

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="Name", descending=false, search=""

getByIdAsync(id) - Get skill by id

Parameters Type Mandatory
id string yes

createAsync(model) - Create skill

model sample:

{
  name: "adipisicing dolor",
  friendlyName: "in proident ut sint",
  description: "o",
  state: true
}

updateAsync(model) - Update skill

model sample:

{
  id: "6f804cd7-f989-6ed6-b8c3-8bc1fa41a2aa",
  friendlyName: "irure culpa",
  description: "incididunt aute ex pariatur",
  state: true
}

deleteAsync(id) - Delete skill

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple skills

model sample:

[
  "3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"
]

StatusCodes

ClassName - StatusCodes

Methods available

listAsync() - List all statusCodes

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, column="Name", descending=false, search=""

getByIdAsync(id) - Get statusCode by id

Parameters Type Mandatory
id string yes

getByNameAsync(name) - Get statusCode by name

Parameters Type Mandatory
name string yes

syncWithTelephonyServiceProvider() - Sync statusCode with telephony service provider

No Parameters required

createAsync(model) - Create statusCode

model sample:

{
  name: "exercitation veniam",
  friendlyName: "elit",
  description: "officia deserunt id in",
  state: true,
  color: "dolor officia Ut irure",
  iconUrl: "ex voluptate tempor",
  isAvailable: true,
  isDisplayable: true,
  isMandatory: true,
  sid: "tempor commodo"
}

updateAsync(model) - Update statusCode

model sample:

{
  id: "0d728a2e-6990-f9e9-fd2c-8936ecc854cc",
  friendlyName: "amet et nostrud cupidatat",
  description: "pariatur ut ex ipsum",
  state: true,
  color: "eiusmod non anim",
  iconUrl: "proident Ut dolor",
  isAvailable: false,
  isDisplayable: false
}

deleteAsync(id) - Delete statusCode

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple statusCodes

model sample:

[
  "3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"
]

Audits

ClassName - Audits

Method available

listAsync() - List all audits

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
pageNumber number no
pageSize number no
from string no
to string no
search string no
by string no

If parameters are not provided, the default value will be pageNumber=1, pageSize=10, from="1976-03-17T20:46:03.999Z", to="2000-07-06T01:51:06.994Z"

Dn

ClassName - Dn

Methods available

listAsync() - List all dn

It is recommended to pass the parameters in the following order

Parameters Type Mandatory
dnType number no
pageNumber number no
pageSize number no
column string no
descending boolean no
search string no
by string no

If parameters are not provided, the default value will be dnType=1, pageNumber=1, pageSize=10, column="Name", descending=false, search=""

getByIdAsync(id) - Get dn by id

Parameters Type Mandatory
id string yes
dnType number yes

getByNumberAsync(number) - Get dn by number

Parameters Type Mandatory
number string yes

createAsync(model) - Create dn

model sample:

{
  name: "nulla irure",
  friendlyName: "eu fugiat",
  description: "minim adip",
  state: false,
  directoryNumberType: 1,
  number: "aute",
  workflowId: "urn:uuid:0998cf6a-c550-1f31-b51b-811f64d1e812"
}

updateAsync(model) - Update dn

model sample:

{
  id: "282e1ac5-33b7-4cf7-c718-5ffd1d269cf4",
  workflowId: "urn:uuid:b4ae0cef-19e4-e97b-583e-264beeea4485",
  friendlyName: "in enim nisi ut",
  description: "amet minim nostrud mollit",
  state: true,
  directoryNumberType: 1
}

deleteAsync(id) - Delete dn

Parameters Type Mandatory
id string yes

deleteMultipleAsync(model) - Delete multiple dn

model sample:

[
  "3ac97d60-4d72-4a23-8c01-7d51fc89a0b1", "dc22dbd5-b596-4b2d-87de-fa8aa64155b5"
]

Settings

ClassName - Settings

Method available

getAsync() - Get settings

No Parameters required

Dependents (0)

Package Sidebar

Install

npm i @contactwise/cw-config-sdk

Weekly Downloads

0

Version

1.1.3

License

ISC

Unpacked Size

217 kB

Total Files

197

Last publish

Collaborators

  • issac.jackson
  • rushmitha
  • blakshmikanth