import { inspect, InspectOptions } from "util"; import TokenPage, { TokenPaginationPayload } from "../../../base/TokenPage"; import Response from "../../../http/response"; import V1 from "../V1"; import { ApiResponse } from "../../../base/ApiResponse"; /** * A physical PoP within an edge zone. Observable only; not used for configuration. */ export declare class EdgeLocation { /** * PoP identifier in `{IATA}-{n}` format (e.g. `DUB-1`). Appears in `X-Twilio-Edge-Location` response header. Not valid for use in Settings.edgeZones. */ "id": string; /** * City where the PoP is located. */ "city": string; /** * ISO 3166-1 alpha-2 country code. */ "country": string; constructor(payload: any); } /** * Options to pass to each */ export interface EdgeZoneListInstanceEachOptions { /** Number of items per page (max 100, reflecting the 50-resource account limit per resource type) */ pageSize?: number; /** Token for pagination */ pageToken?: string; /** Function to process each record. If this and a positional callback are passed, this one will be used */ callback?: (item: EdgeZoneInstance, 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 EdgeZoneListInstanceOptions { /** Number of items per page (max 100, reflecting the 50-resource account limit per resource type) */ pageSize?: number; /** Token for pagination */ pageToken?: string; /** 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 EdgeZoneListInstancePageOptions { /** Number of items per page (max 100, reflecting the 50-resource account limit per resource type) */ pageSize?: number; /** Token for pagination */ pageToken?: string; } export interface EdgeZoneSolution { } export interface EdgeZoneListInstance { _version: V1; _solution: EdgeZoneSolution; _uri: string; /** * Streams EdgeZoneInstance 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 { EdgeZoneListInstanceEachOptions } [params] - Options for request * @param { function } [callback] - Function to process each record */ each(callback?: (item: EdgeZoneInstance, done: (err?: Error) => void) => void): void; each(params: EdgeZoneListInstanceEachOptions, callback?: (item: EdgeZoneInstance, done: (err?: Error) => void) => void): void; /** * Streams EdgeZoneInstance 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 { EdgeZoneListInstanceEachOptions } [params] - Options for request * @param { function } [callback] - Function to process each record */ eachWithHttpInfo(callback?: (item: EdgeZoneInstance, done: (err?: Error) => void) => void): void; eachWithHttpInfo(params: EdgeZoneListInstanceEachOptions, callback?: (item: EdgeZoneInstance, done: (err?: Error) => void) => void): void; /** * Retrieve a single target page of EdgeZoneInstance 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: EdgeZonePage) => any): Promise; /** * Retrieve a single target page of EdgeZoneInstance 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 EdgeZoneInstance 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 { EdgeZoneListInstanceOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records */ list(callback?: (error: Error | null, items: EdgeZoneInstance[]) => any): Promise; list(params: EdgeZoneListInstanceOptions, callback?: (error: Error | null, items: EdgeZoneInstance[]) => any): Promise; /** * Lists EdgeZoneInstance 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 { EdgeZoneListInstanceOptions } [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: EdgeZoneListInstanceOptions, callback?: (error: Error | null, items: ApiResponse) => any): Promise>; /** * Retrieve a single page of EdgeZoneInstance 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 { EdgeZoneListInstancePageOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records */ page(callback?: (error: Error | null, items: EdgeZonePage) => any): Promise; page(params: EdgeZoneListInstancePageOptions, callback?: (error: Error | null, items: EdgeZonePage) => any): Promise; /** * Retrieve a single page of EdgeZoneInstance 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 { EdgeZoneListInstancePageOptions } [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: EdgeZoneListInstancePageOptions, 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 EdgeZoneListInstance(version: V1): EdgeZoneListInstance; interface EdgeZonePayload extends TokenPaginationPayload { edgeZones: EdgeZoneResource[]; } interface EdgeZoneResource { id: string; friendlyName: string; description: string; edgeLocations: Array; } /** * A named geographic zone through which Twilio delivers webhooks. */ export declare class EdgeZoneInstance { protected _version: V1; constructor(_version: V1, _payload: EdgeZoneResource); /** * Stable zone identifier. Use this value in Settings.edgeZones. */ id: string; /** * Human-readable zone name. */ friendlyName: string; /** * Routing guidance for this zone. */ description: string; /** * PoPs currently active within this zone. */ edgeLocations: Array; /** * Provide a user-friendly representation * * @returns Object */ toJSON(): { id: string; friendlyName: string; description: string; edgeLocations: EdgeLocation[]; }; [inspect.custom](_depth: any, options: InspectOptions): string; } export declare class EdgeZonePage extends TokenPage { /** * Initialize the EdgeZonePage * * @param version - Version of the resource * @param response - Response from the API * @param uri - URI of the resource * @param params - Query parameters * @param solution - Path solution */ constructor(version: V1, response: Response, uri: string, params: any, solution: EdgeZoneSolution); /** * Build an instance of EdgeZoneInstance * * @param payload - Payload response from the API */ getInstance(payload: EdgeZoneResource): EdgeZoneInstance; [inspect.custom](depth: any, options: InspectOptions): string; } export {};