Service to update consuming domains based on specified options and parameters.
UpdateConsumingDomains
Provides a method to update consuming domains and optionally connect IPs based on the domains provided.
updateConsumingDomains
Options for updating consuming domains:
domains
alt_domains
apiUserName
apiKey
apiToken
parameters
participants
consume_sockets
getDomains
connectIps
getUpdatedAllParams
Resolves when the consuming domains have been successfully updated.
const options = { domains: ['example.com', 'sample.org'], alt_domains: { primary: 'primary.com', backup: 'backup.com' }, apiUserName: 'user123', apiKey: 'apikey123', apiToken: 'token123', parameters: { participants: [{ id: '1', name: 'John Doe' }], consume_sockets: [socket1, socket2], getDomains: (opts) => fetchDomains(opts), connectIps: (opts) => connectToIPs(opts), getUpdatedAllParams: () => refreshParams(), },};await updateConsumingDomainsService.updateConsumingDomains(options); Copy
const options = { domains: ['example.com', 'sample.org'], alt_domains: { primary: 'primary.com', backup: 'backup.com' }, apiUserName: 'user123', apiKey: 'apikey123', apiToken: 'token123', parameters: { participants: [{ id: '1', name: 'John Doe' }], consume_sockets: [socket1, socket2], getDomains: (opts) => fetchDomains(opts), connectIps: (opts) => connectToIPs(opts), getUpdatedAllParams: () => refreshParams(), },};await updateConsumingDomainsService.updateConsumingDomains(options);
Updates the consuming domains based on the provided options.
The options for updating the consuming domains.
A promise that resolves when the consuming domains have been updated.
Will log an error message if an error occurs during the update process.
Service to update consuming domains based on specified options and parameters.
Name
UpdateConsumingDomains
Description
Provides a method to update consuming domains and optionally connect IPs based on the domains provided.
Method
updateConsumingDomains
Param: options
Options for updating consuming domains:
domains
{Arrayalt_domains
{AltDomains}: Alternative domains for fallback scenarios.apiUserName
{string}: API username for authentication.apiKey
{string}: API key for access.apiToken
{string}: API token for additional security.parameters
{UpdateConsumingDomainsParameters}: The parameters needed for updating, including:participants
{Arrayconsume_sockets
{ArraygetDomains
{Function}: Function to retrieve current domain configurations.connectIps
{Function}: Function to initiate IP connections.getUpdatedAllParams
{Function}: Refreshes and returns the latest parameters.Returns
Resolves when the consuming domains have been successfully updated.
Example