-
Notifications
You must be signed in to change notification settings - Fork 178
Vonage Proactive connect
Vonage Proactive connect • Docs
Documentation / Vonage Proactive connect
Enumeration representing different event types.
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
ACTION_CALL_FAILED |
"action-call-failed" |
Event type: Action call failed. | proactive-connect/lib/enums/eventTypes.ts:13 |
ACTION_CALL_INFO |
"action-call-info" |
Event type: Action call info. | proactive-connect/lib/enums/eventTypes.ts:18 |
ACTION_CALL_SUCCEEDED |
"action-call-succeeded" |
Event type: Action call succeeded. | proactive-connect/lib/enums/eventTypes.ts:8 |
RECIPIENT_RESPONSE |
"recipient-response" |
Event type: Recipient response. | proactive-connect/lib/enums/eventTypes.ts:23 |
RUN_ITEMS_EXCLUDED |
"run-items-excluded" |
Event type: Run items excluded. | proactive-connect/lib/enums/eventTypes.ts:53 |
RUN_ITEMS_READY |
"run-items-ready" |
Event type: Run items ready. | proactive-connect/lib/enums/eventTypes.ts:48 |
RUN_ITEMS_TOTAL |
"run-items-total" |
Event type: Run items total. | proactive-connect/lib/enums/eventTypes.ts:43 |
RUN_ITEM_FAILED |
"run-item-failed" |
Event type: Run item failed. | proactive-connect/lib/enums/eventTypes.ts:33 |
RUN_ITEM_SKIPPED |
"run-item-skipped" |
Event type: Run item skipped. | proactive-connect/lib/enums/eventTypes.ts:28 |
RUN_ITEM_SUBMITTED |
"run-item-submitted" |
Event type: Run item submitted. | proactive-connect/lib/enums/eventTypes.ts:38 |
Enumeration representing sorting order.
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
ASC |
"asc" |
Ascending order. | proactive-connect/lib/enums/sortOrder.ts:8 |
DESC |
"desc" |
Descending order. | proactive-connect/lib/enums/sortOrder.ts:13 |
Enumeration representing synchronization status between the list content (items) and its data source.
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
CANCELLED |
"cancelled" |
Synchronization is cancelled. | proactive-connect/lib/enums/listSyncStatus.ts:28 |
CLEARING |
"clearing" |
Data is being cleared. | proactive-connect/lib/enums/listSyncStatus.ts:13 |
COMPLETED |
"completed" |
Synchronization is completed. | proactive-connect/lib/enums/listSyncStatus.ts:33 |
CONFIGURED |
"configured" |
Configuration is complete. | proactive-connect/lib/enums/listSyncStatus.ts:8 |
FAILED |
"failed" |
Synchronization has failed. | proactive-connect/lib/enums/listSyncStatus.ts:38 |
FETCHING |
"fetching" |
Data is being fetched. | proactive-connect/lib/enums/listSyncStatus.ts:18 |
PAUSED |
"paused" |
Synchronization is paused. | proactive-connect/lib/enums/listSyncStatus.ts:23 |
Represents an API client for interacting with the Vonage Proactive Connect API. This client provides methods for managing lists, list items, and performing import/export operations.
new ProactiveConnect(credentials, options?): ProactiveConnect
Creates a new instance of the Client.
• credentials: AuthInterface
| AuthParams
The authentication credentials or an authentication instance.
• options?: ConfigParams
Optional configuration settings for the client.
server-client/dist/client.d.ts:30
FORM_BOUNDARY: string = '-------------------------Vonage-Node_SDK';
proactive-connect/lib/proactiveConnect.ts:35
protected auth: AuthInterface;
The authentication instance responsible for generating authentication headers and query parameters.
server-client/dist/client.d.ts:19
protected authType: AuthenticationType = AuthenticationType.JWT;
The type of authentication used for the client's requests.
proactive-connect/lib/proactiveConnect.ts:37
protected config: ConfigParams;
Configuration settings for the client, including default hosts for various services and other request settings.
server-client/dist/client.d.ts:23
static LIST_WRITE_KEYS: string[];
proactive-connect/lib/proactiveConnect.ts:39
static transformers: __module;
Static property containing utility transformers.
server-client/dist/client.d.ts:11
addAuthenticationToRequest(request): Promise<VetchOptions>
Adds the appropriate authentication headers or parameters to the request based on the authentication type.
• request: VetchOptions
The request options to which authentication needs to be added.
Promise
<VetchOptions
>
- The request options with the added authentication.
Client
.addAuthenticationToRequest
server-client/dist/client.d.ts:37
clearList(listId): Promise<true>
Clears all data from an existing list in the Vonage Proactive Connect API by its unique identifier.
• listId: string
The unique identifier of the list to clear.
Promise
<true
>
A promise that resolves to true
if the list is successfully cleared.
If there's an issue with the API request or the list clearing fails.
proactive-connect/lib/proactiveConnect.ts:142
createList(list): Promise<List>
Creates a new list in the Vonage Proactive Connect API.
• list: List
The list object representing the list to be created.
Promise
<List
>
A promise that resolves to the newly created list.
If there's an issue with the API request or the list creation fails.
proactive-connect/lib/proactiveConnect.ts:80
createListItem<T>(listId, item): Promise<ListItem<T>>
Creates a new list item in a specific list of the Vonage Proactive Connect API.
• T
• listId: string
The unique identifier of the list to add the item to.
• item: ListItem
<T
>
The list item object representing the item to be created.
Promise
<ListItem
<T
>>
A promise that resolves to the newly created list item.
If there's an issue with the API request or the list item creation fails.
proactive-connect/lib/proactiveConnect.ts:185
deleteList(listId): Promise<true>
Updates an existing list in the Vonage Proactive Connect API by its unique identifier.
• listId: string
The unique identifier of the list to update.
Promise
<true
>
A promise that resolves to the updated list.
If there's an issue with the API request or the list update fails.
proactive-connect/lib/proactiveConnect.ts:127
deleteListItem(listId, itemId): Promise<true>
Deletes a specific list item by its unique identifier from a list in the Vonage Proactive Connect API.
• listId: string
The unique identifier of the list containing the item to delete.
• itemId: string
The unique identifier of the list item to delete.
Promise
<true
>
A promise that resolves to true
if the list item is successfully deleted.
If there's an issue with the API request or the list item deletion fails.
proactive-connect/lib/proactiveConnect.ts:253
downloadListItems(listId, file): Promise<true>
Downloads a file containing all list items from a specific list in the Vonage Proactive Connect API.
• listId: string
The unique identifier of the list to download items from.
• file: string
The path to the file where the list items will be saved.
Promise
<true
>
A promise that resolves to true
if the list items are successfully downloaded and saved to the file.
If there's an issue with the API request or the file download fails.
proactive-connect/lib/proactiveConnect.ts:269
findAllListItems<T>(listId, params): AsyncGenerator<ListItem<T>, void & ListItem<T>, undefined>
Retrieves all list items from a specific list in the Vonage Proactive Connect API.
• T
• listId: string
The unique identifier of the list to retrieve items from.
• params: FindListItemParams
= {}
Optional parameters for pagination and filtering.
AsyncGenerator
<ListItem
<T
>, undefined
>
An async generator that yields list items as they are retrieved.
If there's an issue with the API request.
proactive-connect/lib/proactiveConnect.ts:158
findAllLists(params): AsyncGenerator<List, void & List, undefined>
Retrieves all lists available in the Vonage Proactive Connect API.
• params: FindListParams
= {}
Optional parameters for pagination and filtering.
AsyncGenerator
<List
, undefined
>
An async generator that yields lists as they are retrieved.
If there's an issue with the API request.
proactive-connect/lib/proactiveConnect.ts:55
getListById(listId): Promise<List>
Retrieves a list by its unique identifier from the Vonage Proactive Connect API.
• listId: string
The unique identifier of the list to retrieve.
Promise
<List
>
A promise that resolves to the retrieved list.
If there's an issue with the API request or the list retrieval fails.
proactive-connect/lib/proactiveConnect.ts:100
getListItemById<T>(listId, itemId): Promise<ListItem<T>>
Retrieves a specific list item by its unique identifier from a list in the Vonage Proactive Connect API.
• T
• listId: string
The unique identifier of the list containing the item.
• itemId: string
The unique identifier of the list item to retrieve.
Promise
<ListItem
<T
>>
A promise that resolves to the retrieved list item.
If there's an issue with the API request or the list item retrieval fails.
proactive-connect/lib/proactiveConnect.ts:208
importListItems(listId, file): Promise<ImportFileResponse>
Imports list items from a CSV file into a specific list in the Vonage Proactive Connect API.
• listId: string
The unique identifier of the list to import items into.
• file: string
The path to the CSV file containing the list items to import.
Promise
<ImportFileResponse
>
A promise that resolves to an import response containing details on the number of items inserted, updated, and deleted.
If there's an issue with the API request or the import process fails.
proactive-connect/lib/proactiveConnect.ts:287
protected parseResponse<T>(request, response): Promise<VetchResponse<T>>
Parses the response based on its content type.
• T
The expected type of the parsed response data.
• request: VetchOptions
The request options.
• response: Response
The raw response from the request.
Promise
<VetchResponse
<T
>>
- The parsed response.
server-client/dist/client.d.ts:134
protected prepareBody(request): undefined | string
Prepares the body for the request based on the content type.
• request: VetchOptions
The request options.
undefined
| string
- The prepared request body as a string or undefined.
server-client/dist/client.d.ts:124
protected prepareRequest(request): Promise<VetchOptions>
Prepares the request with necessary headers, authentication, and query parameters.
• request: VetchOptions
The initial request options.
Promise
<VetchOptions
>
- The modified request options.
server-client/dist/client.d.ts:117
sendDeleteRequest<T>(url): Promise<VetchResponse<T>>
Sends a DELETE request to the specified URL.
• T
• url: string
The URL endpoint for the DELETE request.
Promise
<VetchResponse
<T
>>
- The response from the DELETE request.
server-client/dist/client.d.ts:44
sendFormSubmitRequest<T>(url, payload?): Promise<VetchResponse<T>>
Sends a POST request with form data to the specified URL.
• T
• url: string
The URL endpoint for the POST request.
• payload?: Record
<string
, string
>
Optional payload containing form data to send with the POST request.
Promise
<VetchResponse
<T
>>
- The response from the POST request.
server-client/dist/client.d.ts:52
sendGetRequest<T>(url, queryParams?): Promise<VetchResponse<T>>
Sends a GET request to the specified URL with optional query parameters.
• T
• url: string
The URL endpoint for the GET request.
• queryParams?
Optional query parameters to append to the URL. These should be compatible with Node's URLSearchParams.
Promise
<VetchResponse
<T
>>
- The response from the GET request.
server-client/dist/client.d.ts:60
sendPatchRequest<T>(url, payload?): Promise<VetchResponse<T>>
Sends a PATCH request to the specified URL with an optional payload.
• T
• url: string
The URL endpoint for the PATCH request.
• payload?
Optional payload to be sent as the body of the PATCH request.
Promise
<VetchResponse
<T
>>
- The response from the PATCH request.
server-client/dist/client.d.ts:70
sendPostRequest<T>(url, payload?): Promise<VetchResponse<T>>
Sends a POST request to the specified URL with an optional payload.
• T
• url: string
The URL endpoint for the POST request.
• payload?
Optional payload to be sent as the body of the POST request.
Promise
<VetchResponse
<T
>>
- The response from the POST request.
server-client/dist/client.d.ts:80
sendPutRequest<T>(url, payload?): Promise<VetchResponse<T>>
Sends a PUT request to the specified URL with an optional payload.
• T
• url: string
The URL endpoint for the PUT request.
• payload?
Optional payload to be sent as the body of the PUT request.
Promise
<VetchResponse
<T
>>
- The response from the PUT request.
server-client/dist/client.d.ts:90
sendRequest<T>(request): Promise<VetchResponse<T>>
Sends a request adding necessary headers, handling authentication, and parsing the response.
• T
• request: VetchOptions
The options defining the request, including URL, method, headers, and data.
Promise
<VetchResponse
<T
>>
- The parsed response from the request.
server-client/dist/client.d.ts:110
sendRequestWithData<T>(
method,
url,
payload?): Promise<VetchResponse<T>>
Sends a request with JSON-encoded data to the specified URL using the provided HTTP method.
• T
• method: POST
| PUT
| PATCH
The HTTP method to be used for the request (only POST, PATCH, or PUT are acceptable).
• url: string
The URL endpoint for the request.
• payload?
Optional payload to be sent as the body of the request, JSON-encoded.
Promise
<VetchResponse
<T
>>
- The response from the request.
server-client/dist/client.d.ts:101
updateList(listId, list): Promise<List>
• listId: string
• list: List
Promise
<List
>
proactive-connect/lib/proactiveConnect.ts:107
updateListItem<T>(
listId,
itemId,
item): Promise<ListItem<T>>
Updates an existing list item in a specific list of the Vonage Proactive Connect API by its unique identifier.
• T
• listId: string
The unique identifier of the list containing the item.
• itemId: string
The unique identifier of the list item to update.
• item: ListItem
<T
>
The list item object representing the updated item.
Promise
<ListItem
<T
>>
A promise that resolves to the updated list item.
If there's an issue with the API request or the list item update fails.
proactive-connect/lib/proactiveConnect.ts:229
type Event: object;
Represents an event that captures various activities or changes in the system, such as changes to user subscribe status, the creation of a new list based on a response, the invocation of a chat bot agent, or the triggering of certain analytics.
data: unknown;
The data associated with the event (unknown type).
id: string;
The unique identifier for the event.
jobId: string;
The unique identifier for the job related to the event.
occurredAt: string;
The date and time when the event occurred.
recipientId: string;
The string identifier of a recipient, such as an email or phone number.
runId: string;
The unique identifier for the run related to the event.
srcCtx: string;
The name of the segment or matcher related to the event.
type: EventTypes;
The type of the event, which should be one of the values from the 'EventTypes' enum.
proactive-connect/lib/types/event.ts:9
type FindListItemParams: object;
Represents parameters for finding list items.
optional order: SortOrder;
The sorting order for the list items. Should be one of the values from the 'SortOrder' enum (ASC or DESC).
optional page: number;
The page number for pagination.
optional pageSize: number;
The number of items per page for pagination.
proactive-connect/lib/types/findListItemParams.ts:6
type FindListParams: object;
Represents parameters for finding lists.
optional order: SortOrder;
The sorting order for the lists. Should be one of the values from the 'SortOrder' enum (ASC or DESC).
optional page: number;
The page number for pagination.
optional pageSize: number;
The number of lists per page for pagination.
proactive-connect/lib/types/findListParams.ts:6
type ImportFileResponse: object;
Represents the response when importing data from a file.
optional deleted: number;
The number of items deleted during the import process.
optional inserted: number;
The number of items successfully inserted during the import process.
optional updated: number;
The number of items updated during the import process.
Vonage API's will return information using snake_case
. This represents the
pure response before the client will transform the keys into camelCase
.
proactive-connect/lib/types/responses/importFileResponse.ts:7
type List: object;
Represents a list with associated metadata and synchronization details.
optional attributes: ListAttribute[];
An array of attributes associated with the list (optional).
createdAt: string;
The creation date and time of the list.
optional datasource: ListSalesForceDataSource | ListManualDatasource;
The data source for the list, which can be either a Salesforce data source or a manual data source.
optional description: string;
The description of the list (optional).
id: string;
The unique identifier for the list.
itemsCount: number;
The number of items in the list.
name: string;
The name of the list.
syncStatus: ListSyncStatus;
The synchronization status of the list.
optional tags: string[];
An array of tags associated with the list (optional).
updatedAt: string;
The last update date and time of the list.
proactive-connect/lib/types/list.ts:9
type ListAttribute: object;
Represents an attribute associated with a list.
optional alias: string;
An optional alias for the attribute.
optional key: boolean;
Indicates whether the attribute is a key attribute (optional).
Set to true
if this attribute should be used as a key to correlate lists.
name: string;
The name of the attribute.
proactive-connect/lib/types/listAttribute.ts:4
type ListItem<DataType>: object;
Represents an item within a list, with associated metadata and data of a generic type.
• DataType
The type of data associated with the list item.
optional createdAt: string;
The creation date and time of the list item (optional).
data: DataType;
The data associated with the list item.
id: string;
The unique identifier for the list item.
listId: string;
The unique identifier of the list to which this item belongs.
optional updatedAt: string;
The last update date and time of the list item (optional).
proactive-connect/lib/types/listItem.ts:5
type ListItemPageResponse<DataType>: object & APILinks;
Represents a paginated response containing a list of items with associated metadata.
_embedded: object;
An embedded object containing an array of list items and their associated data.
_embedded.items: ListItemResponse<DataType>[];
An array of list item responses with associated data.
order: SortOrder;
The sorting order applied to the list items.
page: number;
The page number of the current page.
page_size: number;
The number of items per page.
total_items: number;
The total number of items across all pages.
total_pages: number;
The total number of pages.
• DataType
The type of data associated with the list items.
Vonage API's will return information using snake_case
. This represents the
pure response before the client will transform the keys into camelCase
.
proactive-connect/lib/types/responses/listItemPageResponse.ts:12
type ListItemResponse<DataType>: Omit<ListItem<DataType>, "createdAt" | "updatedAt" | "listId"> & object & APILinks;
Represents a response object for a list item with associated data.
created_at: string;
The creation date and time of the list item.
list_id: string;
The unique identifier of the list to which this item belongs.
updated_at: string;
The last update date and time of the list item.
• DataType
The type of data associated with the list item.
Vonage API's will return information using snake_case
. This represents the
pure response before the client will transform the keys into camelCase
.
proactive-connect/lib/types/responses/listItemResponse.ts:11
type ListManualDatasource: object;
Represents a manual data source for a list.
type: "manual";
The type of the data source, which is always 'manual'.
proactive-connect/lib/types/listManualDatasource.ts:4
type ListPageResponse: object & APILinks;
Represents a paginated response containing a list of lists with associated metadata.
_embedded: object;
An embedded object containing an array of list responses with associated metadata.
_embedded.lists: ListResponse[];
An array of list responses with associated metadata.
order: SortOrder;
The sorting order applied to the lists.
page: number;
The page number of the current page.
page_size: number;
The number of lists per page.
total_items: number;
The total number of lists across all pages.
total_pages: number;
The total number of pages.
Vonage API's will return information using snake_case
. This represents the
pure response before the client will transform the keys into camelCase
.
proactive-connect/lib/types/responses/listPageResponse.ts:11
type ListResponse: Omit<List, "createdAt" | "updatedAt" | "itemsCount"> & object & APILinks;
Represents a response object for a list with associated metadata and synchronization details.
created_at: string;
The creation date and time of the list.
optional datasource: ListManualDatasource | SaleForceDataSourceResponse;
The data source for the list, which can be either a manual data source or a Salesforce data source.
items_count: number;
The number of items in the list.
sync_status: SyncStatusResponse;
The synchronization status of the list.
updated_at: string;
The last update date and time of the list.
Vonage API's will return information using snake_case
. This represents the
pure response before the client will transform the keys into camelCase
.
proactive-connect/lib/types/responses/listResponse.ts:50
type ListSalesForceDataSource: object;
Represents a Salesforce data source for a list.
integrationId: string;
The integration ID defining Salesforce credentials to use for this data source.
soql: string;
The SOQL query defining which data to fetch from Salesforce.
type: "salesforce";
The type of the data source, which is always 'salesforce'.
proactive-connect/lib/types/listSalesForceDataSource.ts:4
type ListSyncStatus: object;
Represents the synchronization status of a list.
dataModified: boolean;
Indicates whether one or more list items were added, removed, and/or modified since the latest sync.
optional details: string;
Additional details on the synchronization status (optional).
dirty: boolean;
Indicates whether the list content or metadata were modified since the last sync.
metadataModified: boolean;
Indicates whether the list metadata (definition) is modified since the latest sync.
value: SyncStatus;
The synchronization status value, which should be one of the values from the 'SyncStatus' enum.
proactive-connect/lib/types/listSyncStatus.ts:6
type SaleForceDataSourceRequest: Omit<ListSalesForceDataSource, "integrationId"> & object;
Represents a response object for a Salesforce data source with modified integration ID.
integration_id: string;
The integration ID defining Salesforce credentials to use for this data source.
Vonage API's will return information using snake_case
. This represents the
pure response before the client will transform the keys into camelCase
.
proactive-connect/lib/types/requests/writeListRequest.ts:11
type SaleForceDataSourceResponse: Omit<ListSalesForceDataSource, "integrationId"> & object;
Represents a response object for a Salesforce data source with modified integration ID.
integration_id: string;
The integration ID defining Salesforce credentials to use for this data source.
Vonage API's will return information using snake_case
. This represents the
pure response before the client will transform the keys into camelCase
.
proactive-connect/lib/types/responses/listResponse.ts:34
type SyncStatusResponse: Omit<ListSyncStatus, "metadataModified" | "dataModified"> & object;
Represents a response object for synchronization status with modified metadata and data flags.
data_modified: boolean;
Indicates whether one or more list items were added, removed, and/or modified since the latest sync.
metadata_modified: boolean;
Indicates whether the list metadata (definition) is modified since the latest sync.
Vonage API's will return information using snake_case
. This represents the
pure response before the client will transform the keys into camelCase
.
proactive-connect/lib/types/responses/listResponse.ts:13
type WriteListRequest: Pick<List, "name" | "description" | "tags" | "attributes"> & object;
Represents a request object for creating or updating a list with associated metadata.
optional datasource: ListManualDatasource | SaleForceDataSourceRequest;
The data source for the list, which can be either a manual data source or a Salesforce data source.
Vonage API's will return information using snake_case
. This represents the
pure response before the client will transform the keys into camelCase
.