UNPKG

verimor-api-sdk

Version:
41 lines (40 loc) 1.64 kB
import { BaseApi } from './base-api'; import { BlacklistNumber } from '../models/blacklist-number'; import { ProxyConfig } from '../models/proxy-config'; /** * BlacklistApi class provides methods to manage blacklisted numbers. */ export declare class BlacklistApi extends BaseApi { /** * Creates an instance of BlacklistApi. * @param username - The API username. * @param password - The API password. * @param proxyConfig - Optional proxy configuration. */ constructor(username: string, password: string, proxyConfig?: ProxyConfig); /** * Retrieves blacklisted numbers. * @param offset - The offset for pagination. * @param limit - The number of records to retrieve (max 100). * @returns Promise resolving to an object containing total and records. * @throws ErrorResponse if the API call fails. */ getBlacklistedNumbers(offset?: number, limit?: number): Promise<{ total: number; records: BlacklistNumber[]; }>; /** * Adds numbers to the blacklist. * @param phones - Array of phone numbers to blacklist. * @returns Promise resolving to a success message. * @throws ErrorResponse if the API call fails. */ addNumbersToBlacklist(phones: string[]): Promise<string>; /** * Removes numbers from the blacklist. * @param phones - Array of phone numbers to remove from blacklist. * @returns Promise resolving to a success message. * @throws ErrorResponse if the API call fails. */ deleteNumbersFromBlacklist(phones: string[]): Promise<string>; }