Class UpdateConsumingDomains

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 {Array}: The list of domains to be updated.
  • alt_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 {Array}: List of participants.
    • consume_sockets {Array}: Sockets to use for consuming domains.
    • getDomains {Function}: Function to retrieve current domain configurations.
    • connectIps {Function}: Function to initiate IP connections.
    • getUpdatedAllParams {Function}: Refreshes and returns the latest parameters.

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);

Constructors

Methods