import { Client, AuthenticationType } from '@vonage/server-client'; import { AdvancedResponse } from './types/Responses/AdvancedResponse.js'; import { AsyncAdvancedResponse } from './types/Responses/AsyncAdvancedResponse.js'; import { BasicResponse } from './types/Responses/BasicResponse.js'; import { StandardResponse } from './types/Responses/StandardResponse.js'; import { AdvancedLookupOptions } from './types/AdvancedLookupOptions.js'; import { StandardLookupOptions } from './types/StandardLookupOptions.js'; import { BasicLookupOptions } from './types/BasicLookupOptions.js'; import './enums/LookupOutcome.js'; import './enums/Reachable.js'; import './enums/ValidNumber.js'; import './types/Responses/RoamingDataResponse.js'; import './types/Responses/RealTimeDataResponse.js'; import './enums/CallerType.js'; import './types/Responses/CarrierInforResponse.js'; import './enums/NetworkType.js'; import './types/Responses/CallerIdentityResponse.js'; /** * Client for the Vonage Number Insights API. * * @example * Create a standalone Number Insight client * * ```ts * import { NumberInsights } from '@vonage/numberInsight'; * * const numberInsightClient = new NumberInsights({ * apiKey: VONAGE_API_KEY, * apiSecret: VONAGE_API_SECRET * }); * ``` * * @example * Create an Number Insight client from the Vonage client * * ```ts * import { Vonage } from '@vonage/server-client'; * * const vonage = new Vonage({ * apiKey: VONAGE_API_KEY, * apiSecret: VONAGE_API_SECRET * }); * * const numberInsightClient = vonage.numberInsight; * ``` */ declare class NumberInsights extends Client { /** * @see {@link Client.authType} */ protected authType: AuthenticationType; /** * Perform an advanced number lookup operation. * * @param {string} phoneNumber - The phone number to perform the lookup for. * @param {AdvancedLookupOptions} options - Additional options for the lookup. * @return {Promise} A promise that resolves to the advanced lookup response. * @example * ```ts * const lookup = await numberInsightsClient.advancedLookup('15555551212'); * console.log(`Ths number is ${lookup.valid_number}`); * ``` */ advancedLookup(phoneNumber: string, options?: AdvancedLookupOptions): Promise; /** * Perform an asynchronous advanced number lookup operation. * * @param {string} phoneNumber - The phone number to perform the lookup for. * @param {string} callback - The callback URL for receiving the async lookup response. * @param {StandardLookupOptions} options - Additional options for the lookup. * @return {Promise} A promise that resolves to the async advanced lookup response. * * @example * ```ts * const lookup = await numberInsightsClient.asyncAdvancedLookup( * '15555551212', * 'https://example.com/number-insights', * ); * console.log(`The request ID is ${lookup.request_id}`); * ``` * * @example * Lookup with the CNAME option: * ```ts * const lookup = await numberInsightsClient.asyncAdvancedLookup( * '15555551212', * 'https://example.com/number-insights', * { cname: true }, * ); * console.log(`The request ID is ${lookup.request_id}`); * ``` */ asyncAdvancedLookup(phoneNumber: string, callback: string, options?: StandardLookupOptions): Promise; /** * Perform a basic number lookup operation. * * @param {string} phoneNumber - The phone number to perform the lookup for. * @param {BasicLookupOptions} options - Additional options for the lookup. * @return {Promise} A promise that resolves to the basic lookup response. * * @example * ```ts * const lookup = await numberInsightsClient.basicLookup( * '15555551212', * ); * console.log(`The request ID is ${lookup.request_id}`); * ``` * * @example * Lookup with the country option: * ```ts * const lookup = await numberInsightsClient.basicLookup( * '15555551212', * { country: 'US' }, * ); * console.log(`The request ID is ${lookup.request_id}`); * ``` */ basicLookup(phoneNumber: string, options?: BasicLookupOptions): Promise; /** * Perform a standard number lookup operation. * * @param {string} phoneNumber - The phone number to perform the lookup for. * @param {StandardLookupOptions} options - Additional options for the lookup. * @return {Promise} A promise that resolves to the standard lookup response. * * @example * ```ts * const lookup = await numberInsightsClient.standardLookup( * '15555551212', * ); * console.log(`The request ID is ${lookup.request_id}`); * ``` * * @example * Lookup with the cname option: * ```ts * const lookup = await numberInsightsClient.standardLookup( * '15555551212', * { cname: true }, * ); * console.log(`The request ID is ${lookup.request_id}`); * ``` */ standardLookup(phoneNumber: string, options?: StandardLookupOptions): Promise; } export { NumberInsights };