/// import { CommunicationUserIdentifier } from '@azure/communication-common'; import * as coreHttp from '@azure/core-http'; import { HttpResponse } from '@azure/core-http'; import { KeyCredential } from '@azure/core-auth'; import { OperationOptions } from '@azure/core-http'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { PipelineOptions } from '@azure/core-http'; import { PollerLike } from '@azure/core-lro'; import { PollOperationState } from '@azure/core-lro'; import { TokenCredential } from '@azure/core-auth'; /** * Represents an acquired phone number. */ export declare interface AcquiredPhoneNumber { /** * String of the E.164 format of the phone number */ phoneNumber: string; /** * The set of all acquired capabilities of the phone number. */ acquiredCapabilities: Capability[]; /** * The set of all available capabilities that can be acquired for this phone number. */ availableCapabilities: Capability[]; /** * The assignment status of the phone number. Conveys what type of entity the number is assigned to. */ assignmentStatus?: AssignmentStatus; /** * The name of the place of the phone number. */ placeName?: string; /** * The activation state of the phone number. Can be "Activated", "AssignmentPending", "AssignmentFailed", "UpdatePending", "UpdateFailed" */ activationState?: ActivationState; } /** * A wrapper of list of phone numbers */ export declare interface AcquiredPhoneNumbers { /** * Represents a list of phone numbers */ phoneNumbers?: AcquiredPhoneNumber[]; /** * Represents the URL link to the next page */ nextLink?: string; } /** * Defines values for ActivationState. */ export declare type ActivationState = "Activated" | "AssignmentPending" | "AssignmentFailed" | "UpdatePending" | "UpdateFailed"; /** * Represents a list of area codes. */ export declare interface AreaCodes { /** * Represents the list of primary area codes. */ primaryAreaCodes?: string[]; /** * Represents the list of secondary area codes. */ secondaryAreaCodes?: string[]; /** * Represents the URL link to the next page */ nextLink?: string; } /** * Defines values for AssignmentStatus. */ export declare type AssignmentStatus = "Unassigned" | "Unknown" | "UserAssigned" | "ConferenceAssigned" | "FirstPartyAppAssigned" | "ThirdPartyAppAssigned"; /** * Additional request options for requesting the purchase of a phone number reservation. */ export declare interface BeginPurchaseReservationOptions extends PhoneNumberPollerOptionsBase, OperationOptions { } /** * Additional request options for requesting the release of a list of phone numbers. */ export declare interface BeginReleasePhoneNumbersOptions extends PhoneNumberPollerOptionsBase, OperationOptions { } /** * Additional request options for requesting the reservation of phone numbers. */ export declare interface BeginReservePhoneNumbersOptions extends PhoneNumberPollerOptionsBase, OperationOptions { quantity?: number; locationOptions?: LocationOptionsDetails[]; } /** * Additional request option for the cancel phone number reservation operation. */ export declare type CancelReservationOptions = OperationOptions; /** * Defines values for CapabilitiesUpdateStatus. */ export declare type CapabilitiesUpdateStatus = "Pending" | "InProgress" | "Complete" | "Error"; /** * Defines values for Capability. */ export declare type Capability = "UserAssignment" | "FirstPartyVoiceAppAssignment" | "ConferenceAssignment" | "P2PSmsEnabled" | "Geographic" | "NonGeographic" | "TollCalling" | "TollFreeCalling" | "Premium" | "P2PSmsCapable" | "A2PSmsCapable" | "A2PSmsEnabled" | "Calling" | "TollFree" | "FirstPartyAppAssignment" | "ThirdPartyAppAssignment" | "Azure" | "Office365" | "InboundCalling" | "OutboundCalling" | "InboundA2PSms" | "OutboundA2PSms" | "InboundP2PSms" | "OutboundP2PSms"; /** * Represents carrier details. */ export declare interface CarrierDetails { /** * Name of carrier details */ name?: string; /** * Display name of carrier details */ localizedName?: string; } /** * Client class for interacting with Azure Communication Services User Token Management. */ export declare class CommunicationIdentityClient { /** * A reference to the auto-generated UserToken HTTP client. */ private readonly client; /** * Initializes a new instance of the CommunicationIdentity class. * @param connectionString Connection string to connect to an Azure Communication Service resource. * Example: "endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret"; * @param options Optional. Options to configure the HTTP pipeline. */ constructor(connectionString: string, options?: CommunicationIdentityOptions); /** * Initializes a new instance of the CommunicationIdentity class using an Azure KeyCredential. * @param url The endpoint of the service (ex: https://contoso.eastus.communications.azure.net). * @param credential An object that is used to authenticate requests to the service. Use the AzureKeyCredential or `@azure/identity` to create a credential. * @param options Optional. Options to configure the HTTP pipeline. */ constructor(url: string, credential: KeyCredential, options?: CommunicationIdentityOptions); /** * Initializes a new instance of the CommunicationIdentity class using a TokenCredential. * @param url The endpoint of the service (ex: https://contoso.eastus.communications.azure.net) * @param credential TokenCredential that is used to authenticate requests to the service. * @param options Optional. Options to configure the HTTP pipeline. */ constructor(url: string, credential: TokenCredential, options?: CommunicationIdentityOptions); /** * Creates a scoped user token. * * @param {CommunicationUser} user The user whose tokens are being revoked. * @param {TokenScope[]} scopes Scopes to include in the token. * @param {OperationOptions} [options={}] Additional options for the request. */ issueToken(user: CommunicationUserIdentifier, scopes: TokenScope[], options?: OperationOptions): Promise; /** * Revokes all data and tokens created for a user. * * @param {CommunicationUser} user The user whose tokens are being revoked. * @param {Date} tokensValidFrom Tokens issued before this time will be revoked. * @param {OperationOptions} [options={}] Additional options for the request. */ revokeTokens(user: CommunicationUserIdentifier, tokensValidFrom?: Date, options?: OperationOptions): Promise; /** * Creates a single user. * * @param {OperationOptions} [options={}] Additional options for the request. */ createUser(options?: OperationOptions): Promise; /** * Triggers revocation event for user and deletes all its data. * * @param {CommunicationUser} user The user being deleted. * @param {OperationOptions} [options={}] Additional options for the request. */ deleteUser(user: CommunicationUserIdentifier, options?: OperationOptions): Promise; } /** * Client options used to configure the CommunicationIdentity API requests. */ export declare interface CommunicationIdentityOptions extends PipelineOptions { } export declare interface CommunicationIdentityToken { /** * Identifier of the identity owning the token. */ id: string; /** * The token issued for the identity. */ token: string; /** * The expiry time of the token. */ expiresOn: Date; } export declare interface CommunicationTokenRequest { /** * List of scopes attached to the token. */ scopes: string[]; } /** * The issued token and the user it was issued for. */ export declare interface CommunicationUserToken extends Pick { /** * Represents the user the token was issued for */ user: CommunicationUserIdentifier; } /** * Options for configuring a phone number. */ export declare interface ConfigurePhoneNumberOptions extends OperationOptions { /** * Associates the phone number with a given applicationId. */ applicationId?: string; /** * Routable TargetId for the ACS Number */ azurePstnTargetId?: string; } /** * A request for configuring a phone number. */ export declare interface ConfigurePhoneNumberRequest { /** * The E.164 representation representation of the phone number. */ phoneNumber: string; /** * Associates the phone number with a given callback URL. */ callbackUrl: string; } /** * Represents the response from starting a search for phone numbers. */ export declare type CreatePhoneNumberReservationResponse = WithResponse; /** * Options for creating a search. */ export declare interface CreateReservationOptions extends OperationOptions { /** * The location options of the search. */ locationOptions?: LocationOptionsDetails[]; } /** * Request to create phone number reservations. */ export declare interface CreateReservationRequest { /** * Display name of the search. */ name: string; /** * Description of the search. */ description: string; /** * List of subTypeIds associated with the search. */ phonePlanIds: string[]; /** * Areacode to search for. */ areaCode: string; /** * The number of phone numbers to return */ quantity: number; } export declare interface CreateReservationResponse { reservationId: string; } /** * Represents the response from creating a user */ export declare type CreateUserResponse = WithResponse; /** * Options for querying available area codes. */ export declare type GetAreaCodesOptions = OperationOptions; /** * Request to get available area codes. */ export declare interface GetAreaCodesRequest { /** * The type of location information required by the plan. */ locationType: string; /** * The ISO 3166-2 country code to find national destination codes for. */ countryCode: string; /** * The phone plan's id. */ phonePlanId: string; /** * Represents a list of location option queries, used for fetching area codes. */ locationOptionsQueries: LocationOptionsQueries; } /** * Represents the response from getting a list of the supported area codes. */ export declare type GetAreaCodesResponse = WithResponse; /** * Additional request options for getting the update capabilities request. */ export declare type GetCapabilitiesUpdateOptions = OperationOptions; /** * Represents the response from getting the update capabilities request associated with a given id. */ export declare type GetCapabilitiesUpdateResponse = WithResponse; /** * Additional request options for getting the configuration of a phone number. */ export declare type GetPhoneNumberConfigurationOptions = OperationOptions; /** * Represents the response from getting the configuration for a given number. */ export declare type GetPhoneNumberConfigurationResponse = WithResponse; /** * Options for getting a plan location options */ export declare type GetPhonePlanLocationOptionsOptions = PageableLocalizationOptions; export declare interface GetPhonePlanLocationOptionsRequest extends PageableLocalizationOptions { /** * The ISO 3166-2 country code to find national destination codes for. */ countryCode: string; /** * The id of the phone plan group. */ phonePlanGroupId: string; /** * The id of the phone plan. */ phonePlanId: string; } /** * Represents the response from getting the location options for a given phone plan. */ export declare type GetPhonePlanLocationOptionsResponse = WithResponse; /** * Additional request options for getting a release. */ export declare type GetReleaseOptions = OperationOptions; /** * Represents the response from getting the release associated with a given id. */ export declare type GetReleaseResponse = WithResponse; /** * Additional request option for the get phone number reservation operation. */ export declare type GetReservationOptions = OperationOptions; /** * Represents the response from getting the search associated with a given id. */ export declare type GetReservationResponse = WithResponse; /** * Represents the response from issuing a token */ export declare type IssueTokenResponse = WithResponse; /** * Options for listing acquired phone numbers. */ export declare type ListPhoneNumbersOptions = PageableLocalizationOptions; /** * Options for querying plan groups by country. */ export declare interface ListPhonePlanGroupsOptions extends PageableLocalizationOptions { includeRateInformation?: boolean; } /** * Options for listing phone plans. */ export declare type ListPhonePlansOptions = PageableLocalizationOptions; export declare interface ListPhonePlansRequest { /** * The ISO 3166-2 country code to find national destination codes for. */ countryCode: string; /** * The id of the phone plan group to get plans from. */ phonePlanGroupId: string; } /** * Options for querying supported countries. */ export declare type ListSupportedCountriesOptions = PageableLocalizationOptions; /** * Base options to pass a locale that is used for localizing strings in the responses. */ export declare interface LocalizationOptions extends OperationOptions { /** * Set locale to localize strings in responses. */ locale?: string; } /** * Represents a location options. */ export declare interface LocationOptions { /** * The label id of the location. */ labelId?: string; /** * The display name of the location. */ labelName?: string; /** * The underlying location option details. */ options?: LocationOptionsDetails[]; } /** * Represents location options details. */ export declare interface LocationOptionsDetails { /** * The name of the location options */ name?: string; /** * The abbreviated name of the location options */ value?: string; /** * The underlying location options */ locationOptions?: LocationOptions[]; } /** * Represents a list of location option queries, used for fetching area codes. */ export declare interface LocationOptionsQueries { /** * Represents the underlying list of countries. */ locationOptions?: LocationOptionsQuery[]; } /** * Represents a location options parameter, used for fetching area codes. */ export declare interface LocationOptionsQuery { /** * Represents the location option label id, returned from the GetLocationOptions API. */ labelId?: string; /** * Represents the location options value, returned from the GetLocationOptions API. */ optionsValue?: string; } /** * Represents a wrapper around a list of location options. */ export declare interface LocationOptionsResponse { /** * Represents a location options. */ locationOptions?: LocationOptions; } /** * Defines values for LocationType. */ export declare type LocationType = "CivicAddress" | "NotRequired" | "Selection"; /** * Definition for number configuration */ export declare interface NumberConfiguration { /** * Definition for pstn number configuration */ pstnConfiguration: PstnConfiguration; /** * The phone number to configure */ phoneNumber: string; } /** * Definition for number configuration */ export declare interface NumberConfigurationResponse { /** * Definition for pstn number configuration */ pstnConfiguration: PstnConfiguration; } /** * Represents an individual number capabilities update request */ export declare interface NumberUpdateCapabilities { /** * Capabilities to be added to a phone number */ add?: Capability[]; /** * Capabilities to be removed from a phone number */ remove?: Capability[]; } /** * Base options to pass a locale and pagination parameters in the same request. */ export declare interface PageableLocalizationOptions extends PageableOptions, LocalizationOptions { } /** * Base options to pass pagination parameters. */ export declare interface PageableOptions extends OperationOptions { /** * An optional parameter for how many entries to skip, for pagination purposes. Default value: 0. */ skip?: number; /** * An optional parameter for how many entries to return, for pagination purposes. Default value: * 100. */ take?: number; } /** * Client class for interacting with Azure Communication Services PhoneNumber Administration. */ export declare class PhoneNumberAdministrationClient { /** * A reference to the auto-generated PhoneNumber HTTP client. */ private readonly client; /** * Initializes a new instance of the PhoneNumberAdministrationClient class. * @param connectionString Connection string to connect to an Azure Communication Service resource. * Example: "endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret"; * @param options Optional. Options to configure the HTTP pipeline. */ constructor(connectionString: string, options?: PhoneNumberAdministrationClientOptions); /** * Initializes a new instance of the PhoneNumberAdministrationClient class using an Azure KeyCredential. * @param url The endpoint of the service (ex: https://contoso.eastus.communications.azure.net). * @param credential An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential. * @param options Optional. Options to configure the HTTP pipeline. */ constructor(url: string, credential: KeyCredential, options?: PhoneNumberAdministrationClientOptions); /** * Initializes a new instance of the PhoneNumberAdministrationClient class using a TokenCredential. * @param url The endpoint of the service (ex: https://contoso.eastus.communications.azure.net). * @param credential TokenCredential that is used to authenticate requests to the service. * @param options Optional. Options to configure the HTTP pipeline. */ constructor(url: string, credential: TokenCredential, options?: PhoneNumberAdministrationClientOptions); /** * Configures a phone number, for example to assign a callbackUrl. * @param config The configuration details * @param options Additional request options. */ configurePhoneNumber(config: ConfigurePhoneNumberRequest, options?: ConfigurePhoneNumberOptions): Promise; /** * Unconfigure a phone number, resetting its' configuration. * @param phoneNumber Phone Number to unconfigure. * @param options Additional request options. */ unconfigurePhoneNumber(phoneNumber: string, options?: UnconfigurePhoneNumberOptions): Promise; /** * Updates the capabilities for a list of phone numbers. * The response includes the id of the created update capabilities request, * remember that id for subsequent calls to getCapabilitiesUpdate. * @param phoneNumberCapabilitiesUpdates Dictionary containing a list of phone numbers and their capabilities updates. * @param options Additional request options. */ updatePhoneNumbersCapabilities(phoneNumberCapabilitiesUpdates: PhoneNumberCapabilitiesUpdates, options?: UpdateCapabilitiesOptions): Promise; /** * Get the update capabilities request associated with a given id. * @param capabilitiesUpdateId The id associated with the request. * @param options Additional request options. */ getCapabilitiesUpdate(capabilitiesUpdateId: string, options?: GetCapabilitiesUpdateOptions): Promise; /** * Gets a list of the supported area codes based on location. * @param request Request properties to constraint the search scope. * @param options Additional request options. */ getAreaCodes(request: GetAreaCodesRequest, options?: GetAreaCodesOptions): Promise; /** * Gets the configuration for a given phone number. * @param phoneNumber The E.164 representation of the phone number whose configuration is requested. * @param options Additional request options. */ getPhoneNumberConfiguration(phoneNumber: string, options?: GetPhoneNumberConfigurationOptions): Promise; /** * Gets the location options for a given phone plan. * @param request Request properties to constraint the search scope. * @param options Additional request options. */ getPhonePlanLocationOptions(request: GetPhonePlanLocationOptionsRequest, options?: GetPhonePlanLocationOptionsOptions): Promise; /** * Gets the reservation associated with a given id. * Use this function to query the status of a phone number reservation. * @param reservationId The id of the reservation returned by createReservation. * @param options Additional request options. */ getReservation(reservationId: string, options?: GetReservationOptions): Promise; /** * Cancels the reservation associated with a given id. * @param reservationId The id of the reservation returned by createReservation. * @param options Additional request options. */ cancelReservation(reservationId: string, options?: CancelReservationOptions): Promise; /* Excluded from this release type: listSearchesPage */ /* Excluded from this release type: listSearchesAll */ /** * Iterates the searches created by the Azure resource. * * Example usage: * ```ts * let client = new PhoneNumberAdministrationClient(credentials); * for await (const entity of client.listSearches()) { * console.log("id: ", entity.id); * } * ``` * Gets all searches created by the Azure resource. * @param {PageableOptions} [options] Optional parameters for the underlying HTTP request. */ listSearches(options?: PageableOptions): PagedAsyncIterableIterator; /* Excluded from this release type: listReleasesPage */ /* Excluded from this release type: listReleasesAll */ /** * Iterates the releases created by the Azure resource. * * Example usage: * ```ts * let client = new PhoneNumberAdministrationClient(credentials); * for await (const entity of client.listReleases()) { * console.log("id: ", entity.id); * } * ``` * Gets all releases created by the Azure resource. * @param {PageableOptions} [options] Optional parameters for the underlying HTTP request. */ listReleases(options?: PageableOptions): PagedAsyncIterableIterator; /* Excluded from this release type: listSupportedCountriesPage */ /* Excluded from this release type: listSupportedCountriesAll */ /** * Iterates the supported countries. * * Example usage: * ```ts * let client = new PhoneNumberAdministrationClient(credentials); * for await (const country of client.listSupportedCountries()) { * console.log("country name: ", country.localizedName); * } * ``` * @summary List all supported countries. * @param {ListSupportedCountriesOptions} [options] The optional parameters. */ listSupportedCountries(options?: ListSupportedCountriesOptions): PagedAsyncIterableIterator; /* Excluded from this release type: listPhoneNumbersPage */ /* Excluded from this release type: listPhoneNumbersAll */ /** * Iterates the acquired phone numbers. * * Example usage: * ```ts * let client = new PhoneNumberAdministrationClient(credentials); * for await (const acquired of client.listPhoneNumbers()) { * console.log("phone number: ", acquired.phoneNumber); * } * ``` * @summary List all acquired phone numbers. * @param {ListPhoneNumbersOptions} [options] The optional parameters. */ listPhoneNumbers(options?: ListPhoneNumbersOptions): PagedAsyncIterableIterator; /* Excluded from this release type: listPhonePlanGroupsPage */ /* Excluded from this release type: listPhonePlanGroupsAll */ /** * Iterates the available phone plan groups for a country. * * Example usage: * ```ts * let client = new PhoneNumberAdministrationClient(credentials); * for await (const phonePlanGroup of client.listPhonePlanGroups("CA")) { * console.log("plan group id: ", phonePlanGroup.phonePlanGroupId); * } * ``` * @summary List all available phone plan groups for a country. * @param {ListPhonePlanGroupsOptions} [options] The optional parameters. */ listPhonePlanGroups(countryCode: string, options?: ListPhonePlanGroupsOptions): PagedAsyncIterableIterator; /* Excluded from this release type: listPhonePlansPage */ /* Excluded from this release type: listPhonePlansAll */ /** * Iterates the available phone plan for a plan group. * * Example usage: * ```ts * let client = new PhoneNumberAdministrationClient(credentials); * for await (const phonePlan of client.listPhonePlanGroups(PLAN_GROUP_INFO)) { * console.log("plan id: ", phonePlan.phonePlanId); * } * * Gets all available phone plans for a given plan group. * @param planGroupInfo Information need to search for plans. * @param options Additional request options. */ listPhonePlans(planGroupInfo: ListPhonePlansRequest, options?: ListPhonePlansOptions): PagedAsyncIterableIterator; /** * Starts the release of a list of acquired phone numbers. * * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete. * * Example usage: * ```ts * const client = new PhoneNumberAdministrationClient(CONNECTION_STRING); * const releasePoller = await client.beginReleasePhoneNumbers(PHONE_NUMBERS); * * // Serializing the poller * const serialized = releasePoller.toString(); * * // Waiting until it's done * const results = await releasePoller.pollUntilDone(); * console.log(results); * ``` * @param {string[]} phoneNumbers The phone numbers to be released. * @param {BeginReleasePhoneNumbersOptions} options Additional request options. */ beginReleasePhoneNumbers(phoneNumbers: string[], options?: BeginReleasePhoneNumbersOptions): Promise, PhoneNumberRelease>>; /** * Starts a search for phone numbers given some constraints such as name or area code. * The phone numbers that are found are reserved until you cancel, purchase or the reservation expires. * * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete. * * Example usage: * ```ts * const client = new PhoneNumberAdministrationClient(CONNECTION_STRING); * const reservePoller = await client.beginReservePhoneNumbers(RESERVATION_REQUEST); * * // Serializing the poller * const serialized = reservePoller.toString(); * * // Waiting until it's done * const results = await reservePoller.pollUntilDone(); * console.log(results); * ``` * * @param {CreateReservationRequest} reservationRequest Request properties to constraint the search scope. * @param {BeginReservePhoneNumbersOptions} options Additional request options. */ beginReservePhoneNumbers(reservationRequest: CreateReservationRequest, options?: BeginReservePhoneNumbersOptions): Promise, PhoneNumberReservation>>; /** * Starts the purchase of the phone number(s) in the reservation associated with a given id. * * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete. * * Example usage: * ```ts * const client = new PhoneNumberAdministrationClient(CONNECTION_STRING); * const purchasePoller = await client.beginPurchaseReservation(RESERVATION_ID); * * // Serializing the poller * const serialized = purchasePoller.toString(); * * // Waiting until it's done * const results = await purchasePoller.pollUntilDone(); * console.log(results); * ``` * * @param {string} reservationId The id of the reservation to purchase. * @param {BeginPurchaseReservationOptions} options Additional request options. */ beginPurchaseReservation(reservationId: string, options?: BeginPurchaseReservationOptions): Promise, void>>; } /** * Client options used to configure the UserTokenClient API requests. */ export declare interface PhoneNumberAdministrationClientOptions extends PipelineOptions { } /** * Contains response data for the getAllAreaCodes operation. */ export declare type PhoneNumberAdministrationGetAllAreaCodesResponse = AreaCodes & { /** * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: AreaCodes; }; }; /** * Contains response data for the getCapabilitiesUpdate operation. */ export declare type PhoneNumberAdministrationGetCapabilitiesUpdateResponse = UpdatePhoneNumberCapabilitiesResponse & { /** * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: UpdatePhoneNumberCapabilitiesResponse; }; }; /** * Contains response data for the getNumberConfiguration operation. */ export declare type PhoneNumberAdministrationGetNumberConfigurationResponse = NumberConfigurationResponse & { /** * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: NumberConfigurationResponse; }; }; /** * Contains response data for the getPhonePlanLocationOptions operation. */ export declare type PhoneNumberAdministrationGetPhonePlanLocationOptionsResponse = LocationOptionsResponse & { /** * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: LocationOptionsResponse; }; }; /** * Contains response data for the getReleaseById operation. */ export declare type PhoneNumberAdministrationGetReleaseByIdResponse = PhoneNumberRelease & { /** * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: PhoneNumberRelease; }; }; /** * Contains response data for the releasePhoneNumbers operation. */ export declare type PhoneNumberAdministrationReleasePhoneNumbersResponse = ReleaseResponse & { /** * The underlying HTTP response. */ _response: coreHttp.HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: ReleaseResponse; }; }; /** * The capabilities update for each of a set of phone numbers. */ export declare type PhoneNumberCapabilitiesUpdates = { [propertyName: string]: NumberUpdateCapabilities; }; /** * Represents a wrapper around a list of countries. */ export declare interface PhoneNumberCountries { /** * Represents the underlying list of countries. */ countries?: PhoneNumberCountry[]; /** * Represents the URL link to the next page */ nextLink?: string; } /** * Represents a country. */ export declare interface PhoneNumberCountry { /** * Represents the name of the country. */ localizedName: string; /** * Represents the abbreviated name of the country. */ countryCode: string; } /** * Represents a list of searches or releases, as part of the response when fetching all searches or releases. */ export declare interface PhoneNumberEntities { /** * The underlying list of entities. */ entities?: PhoneNumberEntity[]; /** * Represents the URL link to the next page */ nextLink?: string; } /** * Represents a phone number entity, as part of the response when calling get all searches or releases. */ export declare interface PhoneNumberEntity { /** * The id of the entity. It is the search id of a search. It is the release id of a release. */ id?: string; /** * Date and time the entity is created. */ createdAt?: Date; /** * Name of the entity. */ displayName?: string; /** * Quantity of requested phone numbers in the entity. */ quantity?: number; /** * Quantity of acquired phone numbers in the entity. */ quantityObtained?: number; /** * Status of the entity. */ status?: string; /** * The Firm Order Confirmation date of the phone number entity. */ focDate?: Date; } /** * Represents the optional parameters that can be passed to phone number pollers. */ export declare interface PhoneNumberPollerOptionsBase { /** * Time between each polling in milliseconds. */ pollInterval?: number; /** * A serialized poller, used to resume an existing operation */ resumeFrom?: string; } /** * Represents a release */ export declare interface PhoneNumberRelease { /** * The id of the release. */ releaseId?: string; /** * The creation time of the release. */ createdAt?: Date; /** * The release status. */ status?: ReleaseStatus; /** * The underlying error message of a release. */ errorMessage?: string; /** * The list of phone numbers in the release, mapped to its individual statuses. */ phoneNumberReleaseStatusDetails?: { [propertyName: string]: PhoneNumberReleaseDetails; }; } export declare interface PhoneNumberReleaseDetails { /** * The release status of a phone number. */ status?: PhoneNumberReleaseStatus; /** * The error code in the case the status is error. */ errorCode?: number; } /** * Defines values for PhoneNumberReleaseStatus. */ export declare type PhoneNumberReleaseStatus = "Pending" | "Success" | "Error" | "InProgress"; /** * Represents a phone number search */ export declare interface PhoneNumberReservation { /** * The id of the search. */ reservationId?: string; /** * The name of the search. */ displayName?: string; /** * The creation time of the search. */ createdAt?: Date; /** * The description of the search. */ description?: string; /** * The phone plan ids of the search. */ phonePlanIds?: string[]; /** * The area code of the search. */ areaCode?: string; /** * The quantity of phone numbers in the search. */ quantity?: number; /** * The location options of the search. */ locationOptions?: LocationOptionsDetails[]; /** * The status of the search. */ status?: SearchStatus; /** * The list of phone numbers in the search, in the case the status is reserved or success. */ phoneNumbers?: string[]; /** * The date that search expires and the numbers become available. */ reservationExpiryDate?: Date; /** * The error code of the search. */ errorCode?: number; } /** * Defines values for PhoneNumberType. */ export declare type PhoneNumberType = "Unknown" | "Geographic" | "TollFree" | "Indirect"; /** * Represents a phone plan. */ export declare interface PhonePlan { /** * The phone plan id */ phonePlanId: string; /** * The name of the phone plan */ localizedName: string; /** * The location type of the phone plan. */ locationType: LocationType; /** * The list of available area codes in the phone plan. */ areaCodes?: string[]; /** * Capabilities of the phone plan. */ capabilities?: Capability[]; /** * The maximum number of phone numbers one can acquire in a search in this phone plan. */ maximumSearchSize?: number; } /** * Represents a plan group. */ export declare interface PhonePlanGroup { /** * The id of the plan group */ phonePlanGroupId: string; /** * The phone number type of the plan group */ phoneNumberType?: PhoneNumberType; /** * The name of the plan group. */ localizedName: string; /** * The description of the plan group. */ localizedDescription: string; /** * Represents carrier details. */ carrierDetails?: CarrierDetails; /** * Represents a wrapper of rate information */ rateInformation?: RateInformation; } /** * Represents a wrapper of list of plan groups. */ export declare interface PhonePlanGroups { /** * The underlying list of phone plan groups. */ phonePlanGroups?: PhonePlanGroup[]; /** * Represents the URL link to the next page */ nextLink?: string; } /** * Represents a wrapper around a list of countries. */ export declare interface PhonePlansResponse { /** * Represents the underlying list of phone plans. */ phonePlans?: PhonePlan[]; /** * Represents the URL link to the next page */ nextLink?: string; } /** * Definition for pstn number configuration */ export declare interface PstnConfiguration { /** * The webhook URL on the phone number configuration. */ callbackUrl: string; /** * The application id of the application to which to configure */ applicationId?: string; } /** * Additional request option for the purchase reservation operation. */ export declare type PurchaseReservationOptions = OperationOptions; /** * Represents a wrapper of rate information */ export declare interface RateInformation { /** * The monthly rate of a phone plan group */ monthlyRate?: number; /** * The currency of a phone plan group */ currencyType?: "USD"; /** * The error code of a phone plan group */ rateErrorMessage?: string; } /** * Additional request options for requesting the release of a list of phone numbers. */ export declare type ReleasePhoneNumbersOptions = OperationOptions; /** * Represents the response from requesting the release of a list of acquired phone numbers. */ export declare type ReleasePhoneNumbersResponse = WithResponse; /** * Represents a release response. */ export declare interface ReleaseResponse { /** * The release id of a created release. */ releaseId: string; } /** * Defines values for ReleaseStatus. */ export declare type ReleaseStatus = "Pending" | "InProgress" | "Complete" | "Failed" | "Expired"; /** * Defines values for SearchStatus. */ export declare type SearchStatus = "Pending" | "InProgress" | "Reserved" | "Expired" | "Expiring" | "Completing" | "Refreshing" | "Success" | "Manual" | "Cancelled" | "Cancelling" | "Error" | "PurchasePending"; /** * Represents the scope of the token. */ export declare type TokenScope = "chat" | "voip" | "pstn"; /** * Additional request options for unconfiguring a phone number. */ export declare type UnconfigurePhoneNumberOptions = OperationOptions; /** * Additional options for updating phone numbers capabilities. */ export declare interface UpdateCapabilitiesOptions extends OperationOptions { phoneNumbers?: PhoneNumberCapabilitiesUpdates; } /** * Represents a number capability update response. */ export declare interface UpdateNumberCapabilitiesResponse { /** * The capabilities id */ capabilitiesUpdateId: string; } /** * Represents the response from updating the capabilities for a list of phone numbers. */ export declare type UpdateNumbersCapabilitiesResponse = WithResponse; /** * Response for getting a phone number update capabilities. */ export declare interface UpdatePhoneNumberCapabilitiesResponse { /** * The id of the phone number capabilities update */ capabilitiesUpdateId?: string; /** * The time the capabilities update was created */ createdAt?: Date; /** * Status of the capabilities update. */ capabilitiesUpdateStatus?: CapabilitiesUpdateStatus; /** * The capabilities update for each of a set of phone numbers. */ phoneNumberCapabilitiesUpdates?: { [propertyName: string]: NumberUpdateCapabilities; }; } /** * Represents a generic HTTP response */ export declare type VoidResponse = WithResponse<{}>; /** * Represents an object with a non-enumerable _response property which provides * information about the HTTP response. */ export declare type WithResponse = T & { _response: HttpResponse; }; export { }