@azure/communication-phone-numbers 1.3.0-alpha.20241119.1 → 1.3.0-alpha.20241203.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.47.11"
8
+ "packageVersion": "7.48.0"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-phone-numbers",
3
- "version": "1.3.0-alpha.20241119.1",
3
+ "version": "1.3.0-alpha.20241203.1",
4
4
  "description": "SDK for Azure Communication service which facilitates phone number management.",
5
5
  "sdk-type": "client",
6
6
  "main": "./dist/commonjs/index.js",
@@ -1,691 +0,0 @@
1
- import type { CommonClientOptions } from '@azure/core-client';
2
- import * as coreClient from '@azure/core-client';
3
- import type { KeyCredential } from '@azure/core-auth';
4
- import type { OperationOptions } from '@azure/core-client';
5
- import type { PagedAsyncIterableIterator } from '@azure/core-paging';
6
- import type { PollerLike } from '@azure/core-lro';
7
- import type { PollOperationState } from '@azure/core-lro';
8
- import type { TokenCredential } from '@azure/core-auth';
9
-
10
- /**
11
- * Additional options for the purchase phone number operation.
12
- */
13
- export declare interface BeginPurchasePhoneNumbersOptions extends OperationOptions {
14
- }
15
-
16
- /**
17
- * Additional options for the release phone number operation.
18
- */
19
- export declare interface BeginReleasePhoneNumberOptions extends OperationOptions {
20
- }
21
-
22
- /**
23
- * Additional options for the search available phone numbers operation.
24
- */
25
- export declare interface BeginSearchAvailablePhoneNumbersOptions extends OperationOptions {
26
- }
27
-
28
- /**
29
- * Additional options for the update phone number capabilities operation.
30
- */
31
- export declare interface BeginUpdatePhoneNumberCapabilitiesOptions extends OperationOptions {
32
- }
33
-
34
- /**
35
- * Additional options for the get phone number request.
36
- */
37
- export declare type GetPurchasedPhoneNumberOptions = OperationOptions;
38
-
39
- /**
40
- * Additional options that can be passed to the available countries request.
41
- */
42
- export declare interface ListAvailableCountriesOptions extends OperationOptions {
43
- }
44
-
45
- /**
46
- * Additional options that can be passed to the Geographic area codes request.
47
- */
48
- export declare interface ListGeographicAreaCodesOptions extends PhoneNumbersListAreaCodesOptionalParams {
49
- }
50
-
51
- /**
52
- * Additional options that can be passed to the available localities request.
53
- */
54
- export declare interface ListLocalitiesOptions extends OperationOptions {
55
- administrativeDivision?: string;
56
- }
57
-
58
- /**
59
- * Additional options that can be passed to the available offerings request.
60
- */
61
- export declare interface ListOfferingsOptions extends OperationOptions {
62
- phoneNumberType?: PhoneNumberType;
63
- assignmentType?: PhoneNumberAssignmentType;
64
- }
65
-
66
- /**
67
- * Additional options that can be passed to the list phone numbers request.
68
- */
69
- export declare interface ListPurchasedPhoneNumbersOptions extends OperationOptions {
70
- }
71
-
72
- /**
73
- * Additional options that can be passed to list SIP routes.
74
- */
75
- export declare interface ListSipRoutesOptions extends OperationOptions {
76
- }
77
-
78
- /**
79
- * Additional options that can be passed to list SIP trunks.
80
- */
81
- export declare interface ListSipTrunksOptions extends OperationOptions {
82
- }
83
-
84
- /**
85
- * Additional options that can be passed to the Toll-Free area codes request.
86
- */
87
- export declare interface ListTollFreeAreaCodesOptions extends Omit<PhoneNumbersListAreaCodesOptionalParams, "assignmentType" | "locality" | "administrativeDivision"> {
88
- }
89
-
90
- /** Represents metadata describing the operator of a phone number */
91
- export declare interface OperatorDetails {
92
- /** Name of the phone operator */
93
- name: string;
94
- /** Mobile Network Code */
95
- mobileNetworkCode?: string;
96
- /** Mobile Country Code */
97
- mobileCountryCode?: string;
98
- }
99
-
100
- /** Represents metadata about a phone number that is controlled/provided by that phone number's operator. */
101
- export declare interface OperatorInformation {
102
- /** E.164 formatted string representation of the phone number */
103
- phoneNumber: string;
104
- /** National format of the phone number */
105
- nationalFormat?: string;
106
- /** International format of the phone number */
107
- internationalFormat?: string;
108
- /** ISO 3166-1 two character ('alpha-2') code associated with the phone number. */
109
- isoCountryCode?: string;
110
- /** Type of service associated with the phone number */
111
- numberType?: OperatorNumberType;
112
- /** Represents metadata describing the operator of a phone number */
113
- operatorDetails?: OperatorDetails;
114
- }
115
-
116
- /** Represents options to modify a search request for operator information */
117
- export declare interface OperatorInformationOptions {
118
- /** Includes the fields operatorDetails, numberType, and isoCountryCode in the response. Please note: use of this option will result in additional costs */
119
- includeAdditionalOperatorDetails?: boolean;
120
- }
121
-
122
- /** Represents a search result containing format and operator information associated with the requested phone numbers */
123
- export declare interface OperatorInformationResult {
124
- /**
125
- * Results of a search.
126
- * This array will have one entry per requested phone number which will contain the relevant operator information.
127
- */
128
- values?: OperatorInformation[];
129
- }
130
-
131
- /** Defines values for OperatorNumberType. */
132
- export declare type OperatorNumberType = "unknown" | "other" | "geographic" | "mobile";
133
-
134
- /** Represents an administrative division. e.g. state or province. */
135
- export declare interface PhoneNumberAdministrativeDivision {
136
- /** Represents the localized name of the administrative division of the locality. e.g. state or province localized name. */
137
- localizedName: string;
138
- /** Represents the abbreviated name of the administrative division of the locality. e.g. state or province abbreviation such as WA (Washington). */
139
- abbreviatedName: string;
140
- }
141
-
142
- /** Represents an Area Code. */
143
- export declare interface PhoneNumberAreaCode {
144
- /** An area code. */
145
- areaCode?: string;
146
- }
147
-
148
- /** Defines values for PhoneNumberAssignmentType. */
149
- export declare type PhoneNumberAssignmentType = "person" | "application";
150
-
151
- /** Capabilities of a phone number. */
152
- export declare interface PhoneNumberCapabilities {
153
- /** Capability value for calling. */
154
- calling: PhoneNumberCapabilityType;
155
- /** Capability value for SMS. */
156
- sms: PhoneNumberCapabilityType;
157
- }
158
-
159
- /** Capabilities of a phone number. */
160
- export declare interface PhoneNumberCapabilitiesRequest {
161
- /** Capability value for calling. */
162
- calling?: PhoneNumberCapabilityType;
163
- /** Capability value for SMS. */
164
- sms?: PhoneNumberCapabilityType;
165
- }
166
-
167
- /** Defines values for PhoneNumberCapabilityType. */
168
- export declare type PhoneNumberCapabilityType = "none" | "inbound" | "outbound" | "inbound+outbound";
169
-
170
- /** The incurred cost for a single phone number. */
171
- export declare interface PhoneNumberCost {
172
- /** The cost amount. */
173
- amount: number;
174
- /** The ISO 4217 currency code for the cost amount, e.g. USD. */
175
- currencyCode: string;
176
- /** The frequency with which the cost gets billed. */
177
- billingFrequency: "monthly";
178
- }
179
-
180
- /** Represents a country. */
181
- export declare interface PhoneNumberCountry {
182
- /** Represents the name of the country. */
183
- localizedName: string;
184
- /** Represents the abbreviated name of the country. */
185
- countryCode: string;
186
- }
187
-
188
- /** Represents a locality. */
189
- export declare interface PhoneNumberLocality {
190
- /** Represents the localized name of the locality. */
191
- localizedName: string;
192
- /** Represents an administrative division. e.g. state or province. */
193
- administrativeDivision?: PhoneNumberAdministrativeDivision;
194
- }
195
-
196
- /** Represents a phone number capability offering */
197
- export declare interface PhoneNumberOffering {
198
- /** Represents the number type of the offering. */
199
- phoneNumberType?: PhoneNumberType;
200
- /** Represents the assignment type of the offering. */
201
- assignmentType?: PhoneNumberAssignmentType;
202
- /** Capabilities of a phone number. */
203
- availableCapabilities?: PhoneNumberCapabilities;
204
- /** The incurred cost for a single phone number. */
205
- cost: PhoneNumberCost;
206
- }
207
-
208
- /**
209
- * Client class for interacting with Azure Communication Services Phone Number Administration.
210
- */
211
- export declare class PhoneNumbersClient {
212
- /**
213
- * A reference to the auto-generated PhoneNumber HTTP client.
214
- */
215
- private readonly client;
216
- /**
217
- * The accept language parameter to be used in the request header's "accept-language" property.
218
- */
219
- private acceptLanguage;
220
- /**
221
- * Initializes a new instance of the PhoneNumberAdministrationClient class using a connection string.
222
- *
223
- * @param connectionString - Connection string to connect to an Azure Communication Service resource. (eg: endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret)
224
- * @param options - Optional. Options to configure the HTTP pipeline.
225
- */
226
- constructor(connectionString: string, options?: PhoneNumbersClientOptions);
227
- /**
228
- * Initializes a new instance of the PhoneNumberAdministrationClient class using an Azure KeyCredential.
229
- *
230
- * @param url - The endpoint of the service (eg: https://contoso.eastus.communications.azure.net)
231
- * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.
232
- * @param options - Optional. Options to configure the HTTP pipeline.
233
- */
234
- constructor(url: string, credential: KeyCredential, options?: PhoneNumbersClientOptions);
235
- /**
236
- * Initializes a new instance of the PhoneNumberAdministrationClient class using a TokenCredential.
237
- * @param url - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).
238
- * @param credential - TokenCredential that is used to authenticate requests to the service.
239
- * @param options - Optional. Options to configure the HTTP pipeline.
240
- */
241
- constructor(url: string, credential: TokenCredential, options?: PhoneNumbersClientOptions);
242
- /**
243
- * Gets the details of a purchased phone number. Includes phone number, cost, country code, etc.
244
- *
245
- * @param phoneNumber - The E.164 formatted phone number being fetched. The leading plus can be either + or encoded as %2B.
246
- * @param options - Additional request options.
247
- */
248
- getPurchasedPhoneNumber(phoneNumber: string, options?: GetPurchasedPhoneNumberOptions): Promise<PurchasedPhoneNumber>;
249
- /**
250
- * Iterates the purchased phone numbers.
251
- *
252
- * Example usage:
253
- * ```ts
254
- * let client = new PhoneNumbersClient(credentials);
255
- * for await (const purchased of client.listPhoneNumbers()) {
256
- * console.log("phone number: ", purchased.phoneNumber);
257
- * }
258
- * ```
259
- * List all purchased phone numbers.
260
- * @param options - The optional parameters.
261
- */
262
- listPurchasedPhoneNumbers(options?: ListPurchasedPhoneNumbersOptions): PagedAsyncIterableIterator<PurchasedPhoneNumber>;
263
- /**
264
- * Starts the release of a purchased phone number.
265
- *
266
- * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.
267
- *
268
- * Example usage:
269
- * ```ts
270
- * const client = new PhoneNumbersClient(CONNECTION_STRING);
271
- * const releasePoller = await client.beginReleasePhoneNumber("+14125550100");
272
- *
273
- * // Serializing the poller
274
- * const serialized = releasePoller.toString();
275
- *
276
- * // Waiting until it's done
277
- * const results = await releasePoller.pollUntilDone();
278
- * console.log(results);
279
- * ```
280
- * @param phoneNumber - The E.164 formatted phone number being released. The leading plus can be either + or encoded as %2B.
281
- * @param options - Additional request options.
282
- */
283
- beginReleasePhoneNumber(phoneNumber: string, options?: BeginReleasePhoneNumberOptions): Promise<PollerLike<PollOperationState<ReleasePhoneNumberResult>, ReleasePhoneNumberResult>>;
284
- /**
285
- * Starts a search for phone numbers given some constraints such as name or area code.
286
- * The phone numbers that are found are reserved until you cancel, purchase or the reservation expires.
287
- *
288
- * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.
289
- *
290
- * Example usage:
291
- * ```ts
292
- * const client = new PhoneNumberAdministrationClient(CONNECTION_STRING);
293
- * const searchPoller = await client.beginSearchAvailablePhoneNumbers(SEARCH_REQUEST);
294
- *
295
- * // Serializing the poller
296
- * const serialized = searchPoller.toString();
297
- *
298
- * // Waiting until it's done
299
- * const results = await searchPoller.pollUntilDone();
300
- * console.log(results);
301
- * ```
302
- *
303
- * @param search - Request properties to constraint the search scope.
304
- * @param options - Additional request options.
305
- */
306
- beginSearchAvailablePhoneNumbers(search: SearchAvailablePhoneNumbersRequest, options?: BeginSearchAvailablePhoneNumbersOptions): Promise<PollerLike<PollOperationState<PhoneNumberSearchResult>, PhoneNumberSearchResult>>;
307
- /**
308
- * Starts the purchase of the phone number(s) in the search associated with a given id.
309
- *
310
- * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.
311
- *
312
- * Example usage:
313
- * ```ts
314
- * const client = new PhoneNumbersClient(CONNECTION_STRING);
315
- * const purchasePoller = await client.beginPurchasePhoneNumbers(SEARCH_ID);
316
- *
317
- * // Serializing the poller
318
- * const serialized = purchasePoller.toString();
319
- *
320
- * // Waiting until it's done
321
- * const results = await purchasePoller.pollUntilDone();
322
- * console.log(results);
323
- * ```
324
- *
325
- * @param searchId - The id of the search to purchase. Returned from `beginSearchAvailablePhoneNumbers`
326
- * @param options - Additional request options.
327
- */
328
- beginPurchasePhoneNumbers(searchId: string, options?: BeginPurchasePhoneNumbersOptions): Promise<PollerLike<PollOperationState<PurchasePhoneNumbersResult>, PurchasePhoneNumbersResult>>;
329
- /**
330
- * Starts the update of a purchased phone number's capabilities.
331
- *
332
- * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.
333
- *
334
- * Example usage:
335
- * ```ts
336
- * const client = new PhoneNumbersClient(CONNECTION_STRING);
337
- * const updatePoller = await client.beginUpdatePhoneNumberCapabilities("+14125550100", UPDATE_REQUEST);
338
- *
339
- * // Serializing the poller
340
- * const serialized = updatePoller.toString();
341
- *
342
- * // Waiting until it's done
343
- * const results = await updatePoller.pollUntilDone();
344
- * console.log(results);
345
- * ```
346
- *
347
- * @param phoneNumber - The E.164 formatted phone number being updated. The leading plus can be either + or encoded as %2B.
348
- * @param request - The updated properties which will be applied to the phone number.
349
- * @param options - Additional request options.
350
- */
351
- beginUpdatePhoneNumberCapabilities(phoneNumber: string, request: PhoneNumberCapabilitiesRequest, options?: BeginUpdatePhoneNumberCapabilitiesOptions): Promise<PollerLike<PollOperationState<PurchasedPhoneNumber>, PurchasedPhoneNumber>>;
352
- /**
353
- * Iterates the available countries.
354
- *
355
- * Example usage:
356
- * ```ts
357
- * let client = new PhoneNumbersClient(credentials);
358
- * for await (const country of client.listAvailableCountries()) {
359
- * console.log("country: ", country.localizedName);
360
- * }
361
- * ```
362
- * List all available countries.
363
- * @param options - The optional parameters.
364
- */
365
- listAvailableCountries(options?: ListAvailableCountriesOptions): PagedAsyncIterableIterator<PhoneNumberCountry>;
366
- /**
367
- * Iterates the available Toll-Free area codes.
368
- *
369
- * Example usage:
370
- * ```ts
371
- * let client = new PhoneNumbersClient(credentials);
372
- * for await (const areaCodeItem of client.listTollFreeAreaCodes()) {
373
- * console.log("area code: ", areaCodeItem.areaCode);
374
- * }
375
- * ```
376
- * List all available Toll-Free area codes.
377
- * @param countryCode - The ISO 3166-2 country code.
378
- * @param options - The optional parameters.
379
- */
380
- listAvailableTollFreeAreaCodes(countryCode: string, options?: ListTollFreeAreaCodesOptions): PagedAsyncIterableIterator<PhoneNumberAreaCode>;
381
- /**
382
- * Iterates the available Geographic area codes.
383
- *
384
- * Example usage:
385
- * ```ts
386
- * let client = new PhoneNumbersClient(credentials);
387
- * for await (const areaCodeItem of client.listGeographicAreaCodes()) {
388
- * console.log("area code: ", areaCodeItem.areaCode);
389
- * }
390
- * ```
391
- * List all available Geographic area codes.
392
- * @param countryCode - The ISO 3166-2 country code.
393
- * @param options - The optional parameters.
394
- */
395
- listAvailableGeographicAreaCodes(countryCode: string, options?: ListGeographicAreaCodesOptions): PagedAsyncIterableIterator<PhoneNumberAreaCode>;
396
- /**
397
- * Iterates the available localities.
398
- *
399
- * Example usage:
400
- * ```ts
401
- * let client = new PhoneNumbersClient(credentials);
402
- * for await (const locality of client.listAvailableLocalities()) {
403
- * console.log("locality: ", locality.localizedName);
404
- * }
405
- * ```
406
- * List all available localities.
407
- * @param countryCode - The ISO 3166-2 country code.
408
- * @param options - The optional parameters.
409
- */
410
- listAvailableLocalities(countryCode: string, options?: ListLocalitiesOptions): PagedAsyncIterableIterator<PhoneNumberLocality>;
411
- /**
412
- * Iterates the available offerings.
413
- *
414
- * Example usage:
415
- * ```ts
416
- * let client = new PhoneNumbersClient(credentials);
417
- * for await (const offering of client.listAvailableOfferings()) {
418
- * console.log("phone number type: ", offering.phoneNumberType);
419
- * console.log("cost: ", offering.cost.amount);
420
- * }
421
- * ```
422
- * List all available offerings.
423
- * @param countryCode - The ISO 3166-2 country code.
424
- * @param options - The optional parameters.
425
- */
426
- listAvailableOfferings(countryCode: string, options?: ListOfferingsOptions): PagedAsyncIterableIterator<PhoneNumberOffering>;
427
- /**
428
- * Search for operator information about specified phone numbers.
429
- *
430
- * @param phoneNumbers - The phone numbers to search.
431
- * @param options - Additional request options.
432
- */
433
- searchOperatorInformation(phoneNumbers: string[], options?: SearchOperatorInformationOptions): Promise<OperatorInformationResult>;
434
- }
435
-
436
- /**
437
- * Client options used to configure the PhoneNumbersClient API requests.
438
- */
439
- export declare interface PhoneNumbersClientOptions extends CommonClientOptions {
440
- /**
441
- * The accept language parameter to be used in the request header's "accept-language" property.
442
- */
443
- acceptLanguage?: string;
444
- }
445
-
446
- /** Represents a phone number search request to find phone numbers. Found phone numbers are temporarily held for a following purchase. */
447
- export declare interface PhoneNumberSearchRequest {
448
- /** The type of phone numbers to search for, e.g. geographic, or tollFree. */
449
- phoneNumberType: PhoneNumberType;
450
- /** The assignment type of the phone numbers to search for. A phone number can be assigned to a person, or to an application. */
451
- assignmentType: PhoneNumberAssignmentType;
452
- /** Capabilities of a phone number. */
453
- capabilities: PhoneNumberCapabilities;
454
- /** The area code of the desired phone number, e.g. 425. */
455
- areaCode?: string;
456
- /** The quantity of desired phone numbers. The default value is 1. */
457
- quantity?: number;
458
- }
459
-
460
- /** The result of a phone number search operation. */
461
- export declare interface PhoneNumberSearchResult {
462
- /** The search id. */
463
- searchId: string;
464
- /** The phone numbers that are available. Can be fewer than the desired search quantity. */
465
- phoneNumbers: string[];
466
- /** The phone number's type, e.g. geographic, or tollFree. */
467
- phoneNumberType: PhoneNumberType;
468
- /** Phone number's assignment type. */
469
- assignmentType: PhoneNumberAssignmentType;
470
- /** Capabilities of a phone number. */
471
- capabilities: PhoneNumberCapabilities;
472
- /** The incurred cost for a single phone number. */
473
- cost: PhoneNumberCost;
474
- /** The date that this search result expires and phone numbers are no longer on hold. A search result expires in less than 15min, e.g. 2020-11-19T16:31:49.048Z. */
475
- searchExpiresBy: Date;
476
- /** The error code of the search. */
477
- errorCode?: number;
478
- /** Mapping Error Messages to Codes */
479
- error?: PhoneNumberSearchResultError;
480
- }
481
-
482
- /** Defines values for PhoneNumberSearchResultError. */
483
- export declare type PhoneNumberSearchResultError = "NoError" | "UnknownErrorCode" | "OutOfStock" | "AuthorizationDenied" | "MissingAddress" | "InvalidAddress" | "InvalidOfferModel" | "NotEnoughLicenses" | "NoWallet" | "NotEnoughCredit" | "NumbersPartiallyAcquired" | "AllNumbersNotAcquired" | "ReservationExpired" | "PurchaseFailed" | "BillingUnavailable" | "ProvisioningFailed" | "UnknownSearchError";
484
-
485
- /** Optional parameters. */
486
- export declare interface PhoneNumbersListAreaCodesOptionalParams extends coreClient.OperationOptions {
487
- /** An optional parameter for how many entries to skip, for pagination purposes. The default value is 0. */
488
- skip?: number;
489
- /** An optional parameter for how many entries to return, for pagination purposes. The default value is 100. */
490
- maxPageSize?: number;
491
- /** Filter by assignmentType, e.g. Person, Application. */
492
- assignmentType?: PhoneNumberAssignmentType;
493
- /** The name of locality or town in which to search for the area code. This is required if the number type is Geographic. */
494
- locality?: string;
495
- /** The name of the state or province in which to search for the area code. */
496
- administrativeDivision?: string;
497
- /** The locale to display in the localized fields in the response. e.g. 'en-US' */
498
- acceptLanguage?: string;
499
- }
500
-
501
- /** Defines values for PhoneNumberType. */
502
- export declare type PhoneNumberType = "geographic" | "tollFree";
503
-
504
- /** Represents a purchased phone number. */
505
- export declare interface PurchasedPhoneNumber {
506
- /** The id of the phone number, e.g. 11234567890. */
507
- id: string;
508
- /** String of the E.164 format of the phone number, e.g. +11234567890. */
509
- phoneNumber: string;
510
- /** The ISO 3166-2 code of the phone number's country, e.g. US. */
511
- countryCode: string;
512
- /** The phone number's type, e.g. geographic, tollFree. */
513
- phoneNumberType: PhoneNumberType;
514
- /** Capabilities of a phone number. */
515
- capabilities: PhoneNumberCapabilities;
516
- /** The assignment type of the phone number. A phone number can be assigned to a person, or to an application. */
517
- assignmentType: PhoneNumberAssignmentType;
518
- /** The date and time that the phone number was purchased. */
519
- purchaseDate: Date;
520
- /** The incurred cost for a single phone number. */
521
- cost: PhoneNumberCost;
522
- }
523
-
524
- /**
525
- * The result of the phone numbers purchase operation.
526
- */
527
- export declare interface PurchasePhoneNumbersResult {
528
- }
529
-
530
- /**
531
- * The result of the phone number release operation.
532
- */
533
- export declare interface ReleasePhoneNumberResult {
534
- }
535
-
536
- /**
537
- * Represents a phone number search request to find phone numbers.
538
- * Found phone numbers are temporarily held for a following purchase.
539
- */
540
- export declare interface SearchAvailablePhoneNumbersRequest extends PhoneNumberSearchRequest {
541
- /**
542
- * The ISO 3166-2 country code, e.g. US, representing the location of the search.
543
- */
544
- countryCode: string;
545
- }
546
-
547
- /**
548
- * Additional options for the search operator information request.
549
- */
550
- export declare interface SearchOperatorInformationOptions extends OperationOptions {
551
- includeAdditionalOperatorDetails: boolean;
552
- }
553
-
554
- /**
555
- * Client class for interacting with Azure Communication Services SIP Routing Administration.
556
- */
557
- export declare class SipRoutingClient {
558
- /**
559
- * A reference to the auto-generated SipRouting HTTP client.
560
- */
561
- private readonly client;
562
- /**
563
- * Initializes a new instance of the SipRoutingClient class using a connection string.
564
- *
565
- * @param connectionString - Connection string to connect to an Azure Communication Service resource. (eg: endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret)
566
- * @param options - Optional. Options to configure the HTTP pipeline.
567
- */
568
- constructor(connectionString: string, options?: SipRoutingClientOptions);
569
- /**
570
- * Initializes a new instance of the SipRoutingClient class using an Azure KeyCredential.
571
- *
572
- * @param endpoint - The endpoint of the service (eg: https://contoso.eastus.communications.azure.net).
573
- * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.
574
- * @param options - Optional. Options to configure the HTTP pipeline.
575
- */
576
- constructor(endpoint: string, credential: KeyCredential, options?: SipRoutingClientOptions);
577
- /**
578
- * Initializes a new instance of the SipRoutingClient class using a TokenCredential.
579
- * @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).
580
- * @param credential - TokenCredential that is used to authenticate requests to the service.
581
- * @param options - Optional. Options to configure the HTTP pipeline.
582
- */
583
- constructor(endpoint: string, credential: TokenCredential, options?: SipRoutingClientOptions);
584
- /**
585
- * Lists the SIP trunks.
586
- * @param options - The options parameters.
587
- */
588
- listTrunks(options?: ListSipTrunksOptions): PagedAsyncIterableIterator<SipTrunk>;
589
- /**
590
- * Gets the SIP trunk.
591
- * @param fqdn - The trunk's FQDN.
592
- * @param options - The options parameters.
593
- */
594
- getTrunk(fqdn: string, options?: OperationOptions): Promise<SipTrunk>;
595
- /**
596
- * Lists the SIP trunk routes.
597
- * @param options - The options parameters.
598
- */
599
- listRoutes(options?: ListSipRoutesOptions): PagedAsyncIterableIterator<SipTrunkRoute>;
600
- /**
601
- * Sets the SIP trunks.
602
- * @param trunks - The SIP trunks to be set.
603
- * @param options - The options parameters.
604
- */
605
- setTrunks(trunks: SipTrunk[], options?: OperationOptions): Promise<SipTrunk[]>;
606
- /**
607
- * Sets the SIP trunk.
608
- * @param trunk - The SIP trunk to be set.
609
- * @param options - The options parameters.
610
- */
611
- setTrunk(trunk: SipTrunk, options?: OperationOptions): Promise<SipTrunk>;
612
- /**
613
- * Sets the SIP trunk routes.
614
- * @param routes - The SIP trunk routes to be set.
615
- * @param options - The options parameters.
616
- */
617
- setRoutes(routes: SipTrunkRoute[], options?: OperationOptions): Promise<SipTrunkRoute[]>;
618
- /**
619
- * Deletes the SIP trunk.
620
- * @param fqdn - The trunk's FQDN.
621
- * @param options - The options parameters.
622
- */
623
- deleteTrunk(fqdn: string, options?: OperationOptions): Promise<void>;
624
- private getRoutesInternal;
625
- private getTrunksInternal;
626
- private listRoutesPagingAll;
627
- private listTrunksPagingAll;
628
- private listTrunksPagingPage;
629
- private listRoutesPagingPage;
630
- }
631
-
632
- /**
633
- * Client options used to configure the SipRoutingClient API requests.
634
- */
635
- export declare interface SipRoutingClientOptions extends CommonClientOptions {
636
- }
637
-
638
- /** The Communication Services error. */
639
- export declare interface SipRoutingError {
640
- /** The error code. */
641
- code: string;
642
- /** The error message. */
643
- message: string;
644
- /**
645
- * The error target.
646
- * NOTE: This property will not be serialized. It can only be populated by the server.
647
- */
648
- readonly target?: string;
649
- /**
650
- * Further details about specific errors that led to this error.
651
- * NOTE: This property will not be serialized. It can only be populated by the server.
652
- */
653
- readonly details?: SipRoutingError[];
654
- /**
655
- * The inner error if any.
656
- * NOTE: This property will not be serialized. It can only be populated by the server.
657
- */
658
- readonly innerError?: SipRoutingError;
659
- }
660
-
661
- /**
662
- * Represents a SIP trunk for routing calls. See RFC 4904.
663
- */
664
- export declare interface SipTrunk {
665
- /**
666
- * Gets or sets FQDN of the trunk.
667
- */
668
- fqdn: string;
669
- /**
670
- * Gets or sets SIP signaling port of the trunk.
671
- */
672
- sipSignalingPort: number;
673
- }
674
-
675
- /** Represents a trunk route for routing calls. */
676
- export declare interface SipTrunkRoute {
677
- /** Gets or sets description of the route. */
678
- description?: string;
679
- /** Gets or sets name of the route. */
680
- name: string;
681
- /**
682
- * Gets or sets regex number pattern for routing calls. .NET regex format is supported.
683
- * The regex should match only digits with an optional '+' prefix without spaces.
684
- * I.e. "^\+[1-9][0-9]{3,23}$".
685
- */
686
- numberPattern: string;
687
- /** Gets or sets list of SIP trunks for routing calls. Trunks are represented as FQDN. */
688
- trunks?: string[];
689
- }
690
-
691
- export { }