import { inspect, InspectOptions } from "util"; import Page, { TwilioResponsePayload } from "../../../base/Page"; import Response from "../../../http/response"; import V2 from "../V2"; import { ApiResponse } from "../../../base/ApiResponse"; export declare class CountyCarrierValue { "country"?: string; "carriers"?: Array; constructor(payload: any); } export declare class CountyCarrierValueCarriers { /** * The name of the carrier. */ "carrier"?: string; /** * Total number of outbound calls for the carrier in the country. */ "totalCalls"?: number; /** * Total number of blocked outbound calls for the carrier in the country. */ "blockedCalls"?: number; /** * Percentage of blocked outbound calls for the carrier in the country. */ "blockedCallsPercentage"?: number; constructor(payload: any); } /** * Number of calls made in answering machine detection (AMD) enabled. */ export declare class InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection { /** * Total number of calls with answering machine detection (AMD) enabled. */ "totalCalls"?: number; /** * Percentage of calls marked as answered by human. */ "answeredByHumanPercentage"?: number; /** * Percentage of calls marked as answered by machined related like the following: `machine_start`, `machine_end_beep`, `machine_end_silence`, `machine_end_other`, `fax` */ "answeredByMachinePercentage"?: number; constructor(payload: any); } /** * Percentage of calls made in each state. */ export declare class InsightsV2OutboundPhoneNumberReportCallStatePercentage { /** * Percentage of completed outbound calls. */ "completed"?: number; /** * Percentage of failed outbound calls. */ "fail"?: number; /** * Percentage of busy outbound calls. */ "busy"?: number; /** * Percentage of no-answer outbound calls. */ "noanswer"?: number; /** * Percentage of canceled outbound calls. */ "canceled"?: number; constructor(payload: any); } /** * Options to pass to each */ export interface OutboundListInstanceEachOptions { /** How many resources to return in each list page. */ pageSize?: number; /** Function to process each record. If this and a positional callback are passed, this one will be used */ callback?: (item: OutboundInstance, done: (err?: Error) => void) => void; /** Function to be called upon completion of streaming */ done?: Function; /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */ limit?: number; } /** * Options to pass to list */ export interface OutboundListInstanceOptions { /** How many resources to return in each list page. */ pageSize?: number; /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */ limit?: number; } /** * Options to pass to page */ export interface OutboundListInstancePageOptions { /** How many resources to return in each list page. */ pageSize?: number; /** Page Number, this value is simply for client state */ pageNumber?: number; /** PageToken provided by the API */ pageToken?: string; } export interface OutboundSolution { reportId: string; } export interface OutboundListInstance { _version: V2; _solution: OutboundSolution; _uri: string; /** * Streams OutboundInstance records from the API. * * This operation lazily loads records as efficiently as possible until the limit * is reached. * * The results are passed into the callback function, so this operation is memory * efficient. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { OutboundListInstanceEachOptions } [params] - Options for request * @param { function } [callback] - Function to process each record */ each(callback?: (item: OutboundInstance, done: (err?: Error) => void) => void): void; each(params: OutboundListInstanceEachOptions, callback?: (item: OutboundInstance, done: (err?: Error) => void) => void): void; /** * Streams OutboundInstance records from the API with HTTP metadata captured per page. * * This operation lazily loads records as efficiently as possible until the limit * is reached. HTTP metadata (status code, headers) is captured for each page request. * * The results are passed into the callback function, so this operation is memory * efficient. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { OutboundListInstanceEachOptions } [params] - Options for request * @param { function } [callback] - Function to process each record */ eachWithHttpInfo(callback?: (item: OutboundInstance, done: (err?: Error) => void) => void): void; eachWithHttpInfo(params: OutboundListInstanceEachOptions, callback?: (item: OutboundInstance, done: (err?: Error) => void) => void): void; /** * Retrieve a single target page of OutboundInstance records from the API. * * The request is executed immediately. * * @param { string } [targetUrl] - API-generated URL for the requested results page * @param { function } [callback] - Callback to handle list of records */ getPage(targetUrl: string, callback?: (error: Error | null, items: OutboundPage) => any): Promise; /** * Retrieve a single target page of OutboundInstance records from the API with HTTP metadata. * * The request is executed immediately. * * @param { string } [targetUrl] - API-generated URL for the requested results page * @param { function } [callback] - Callback to handle list of records with metadata */ getPageWithHttpInfo(targetUrl: string, callback?: (error: Error | null, items: ApiResponse) => any): Promise>; /** * Lists OutboundInstance records from the API as a list. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { OutboundListInstanceOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records */ list(callback?: (error: Error | null, items: OutboundInstance[]) => any): Promise; list(params: OutboundListInstanceOptions, callback?: (error: Error | null, items: OutboundInstance[]) => any): Promise; /** * Lists OutboundInstance records from the API as a list with HTTP metadata. * * Returns all records along with HTTP metadata from the first page fetched. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { OutboundListInstanceOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records with metadata */ listWithHttpInfo(callback?: (error: Error | null, items: ApiResponse) => any): Promise>; listWithHttpInfo(params: OutboundListInstanceOptions, callback?: (error: Error | null, items: ApiResponse) => any): Promise>; /** * Retrieve a single page of OutboundInstance records from the API. * * The request is executed immediately. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { OutboundListInstancePageOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records */ page(callback?: (error: Error | null, items: OutboundPage) => any): Promise; page(params: OutboundListInstancePageOptions, callback?: (error: Error | null, items: OutboundPage) => any): Promise; /** * Retrieve a single page of OutboundInstance records from the API with HTTP metadata. * * The request is executed immediately. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { OutboundListInstancePageOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records with metadata */ pageWithHttpInfo(callback?: (error: Error | null, items: ApiResponse) => any): Promise>; pageWithHttpInfo(params: OutboundListInstancePageOptions, callback?: (error: Error | null, items: ApiResponse) => any): Promise>; /** * Provide a user-friendly representation */ toJSON(): any; [inspect.custom](_depth: any, options: InspectOptions): any; } export declare function OutboundListInstance(version: V2, reportId: string): OutboundListInstance; interface OutboundPayload extends TwilioResponsePayload { reports: OutboundResource[]; } interface OutboundResource { handle: string; total_calls: number; call_answer_score: number; calls_by_device_type: { [key: string]: number; }; answer_rate_device_type: { [key: string]: number; }; call_state_percentage: InsightsV2OutboundPhoneNumberReportCallStatePercentage; blocked_calls_by_carrier: Array; silent_calls_percentage: number; short_duration_calls_percentage: number; long_duration_calls_percentage: number; potential_robocalls_percentage: number; answering_machine_detection: InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection; } export declare class OutboundInstance { protected _version: V2; constructor(_version: V2, payload: OutboundResource, reportId?: string); /** * The outbound phone number handle. */ handle: string; /** * Total number of outbound calls made with the given handle during the report period. */ totalCalls: number; /** * The call answer score measures customers behavior to the delivered calls. The score is a value between 0 and 100, where 100 indicates that all calls were successfully answered. */ callAnswerScore: number; /** * Number of calls made with each device type. `voip`, `mobile`, `landline`, `unknown` */ callsByDeviceType: { [key: string]: number; }; /** * Answer rate for each device type. `voip`, `mobile`, `landline`, `unknown` */ answerRateDeviceType: { [key: string]: number; }; callStatePercentage: InsightsV2OutboundPhoneNumberReportCallStatePercentage; /** * Percentage of blocked calls by carrier per country. */ blockedCallsByCarrier: Array; /** * Percentage of calls with silence tags over total calls. A silent tag is indicative of a connectivity issue or muted audio. */ silentCallsPercentage: number; /** * Percentage of completed outbound calls under 10 seconds (PSTN Short call tags); More than 15% is typically low trust measured. */ shortDurationCallsPercentage: number; /** * Percentage of long duration calls ( >= 60 seconds) */ longDurationCallsPercentage: number; /** * Percentage of completed outbound calls to unassigned or unallocated phone numbers. */ potentialRobocallsPercentage: number; answeringMachineDetection: InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection; /** * Provide a user-friendly representation * * @returns Object */ toJSON(): { handle: string; totalCalls: number; callAnswerScore: number; callsByDeviceType: { [key: string]: number; }; answerRateDeviceType: { [key: string]: number; }; callStatePercentage: InsightsV2OutboundPhoneNumberReportCallStatePercentage; blockedCallsByCarrier: CountyCarrierValue[]; silentCallsPercentage: number; shortDurationCallsPercentage: number; longDurationCallsPercentage: number; potentialRobocallsPercentage: number; answeringMachineDetection: InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection; }; [inspect.custom](_depth: any, options: InspectOptions): string; } export declare class OutboundPage extends Page { /** * Initialize the OutboundPage * * @param version - Version of the resource * @param response - Response from the API * @param solution - Path solution */ constructor(version: V2, response: Response, solution: OutboundSolution); /** * Build an instance of OutboundInstance * * @param payload - Payload response from the API */ getInstance(payload: OutboundResource): OutboundInstance; [inspect.custom](depth: any, options: InspectOptions): string; } export {};