@azure/communication-phone-numbers 1.3.0-alpha.20230517.1 → 1.3.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/README.md +4 -18
  2. package/dist/index.js +421 -593
  3. package/dist/index.js.map +1 -1
  4. package/dist-esm/src/generated/src/index.js +1 -0
  5. package/dist-esm/src/generated/src/index.js.map +1 -1
  6. package/dist-esm/src/generated/src/lroImpl.js +11 -15
  7. package/dist-esm/src/generated/src/lroImpl.js.map +1 -1
  8. package/dist-esm/src/generated/src/models/index.js.map +1 -1
  9. package/dist-esm/src/generated/src/models/mappers.js +110 -0
  10. package/dist-esm/src/generated/src/models/mappers.js.map +1 -1
  11. package/dist-esm/src/generated/src/models/parameters.js +6 -2
  12. package/dist-esm/src/generated/src/models/parameters.js.map +1 -1
  13. package/dist-esm/src/generated/src/operations/phoneNumbers.js +155 -76
  14. package/dist-esm/src/generated/src/operations/phoneNumbers.js.map +1 -1
  15. package/dist-esm/src/generated/src/operationsInterfaces/phoneNumbers.js.map +1 -1
  16. package/dist-esm/src/generated/src/pagingHelper.js +32 -0
  17. package/dist-esm/src/generated/src/pagingHelper.js.map +1 -0
  18. package/dist-esm/src/generated/src/phoneNumbersClient.js +4 -22
  19. package/dist-esm/src/generated/src/phoneNumbersClient.js.map +1 -1
  20. package/dist-esm/src/generated/src/siprouting/models/index.js +1 -6
  21. package/dist-esm/src/generated/src/siprouting/models/index.js.map +1 -1
  22. package/dist-esm/src/generated/src/siprouting/models/mappers.js +0 -166
  23. package/dist-esm/src/generated/src/siprouting/models/mappers.js.map +1 -1
  24. package/dist-esm/src/generated/src/siprouting/models/parameters.js +2 -48
  25. package/dist-esm/src/generated/src/siprouting/models/parameters.js.map +1 -1
  26. package/dist-esm/src/generated/src/siprouting/operations/sipRouting.js +1 -35
  27. package/dist-esm/src/generated/src/siprouting/operations/sipRouting.js.map +1 -1
  28. package/dist-esm/src/generated/src/siprouting/operationsInterfaces/sipRouting.js.map +1 -1
  29. package/dist-esm/src/generated/src/siprouting/sipRoutingClientContext.js +2 -2
  30. package/dist-esm/src/generated/src/siprouting/sipRoutingClientContext.js.map +1 -1
  31. package/dist-esm/src/generated/src/tracing.js +1 -1
  32. package/dist-esm/src/generated/src/tracing.js.map +1 -1
  33. package/dist-esm/src/mappers.js +3 -31
  34. package/dist-esm/src/mappers.js.map +1 -1
  35. package/dist-esm/src/models.js.map +1 -1
  36. package/dist-esm/src/phoneNumbersClient.js +16 -3
  37. package/dist-esm/src/phoneNumbersClient.js.map +1 -1
  38. package/dist-esm/src/sipRoutingClient.js +63 -170
  39. package/dist-esm/src/sipRoutingClient.js.map +1 -1
  40. package/dist-esm/src/utils/constants.js +1 -1
  41. package/dist-esm/src/utils/constants.js.map +1 -1
  42. package/package.json +1 -2
  43. package/types/communication-phone-numbers.d.ts +53 -111
@@ -9,9 +9,6 @@ import { PollerLike } from '@azure/core-lro';
9
9
  import { PollOperationState } from '@azure/core-lro';
10
10
  import { TokenCredential } from '@azure/core-auth';
11
11
 
12
- /** Defines values for ActivityStatus. */
13
- export declare type ActivityStatus = "unknown" | "active" | "inactive";
14
-
15
12
  /**
16
13
  * Additional options for the purchase phone number operation.
17
14
  */
@@ -41,19 +38,6 @@ export declare interface BeginUpdatePhoneNumberCapabilitiesOptions extends Opera
41
38
  */
42
39
  export declare type GetPurchasedPhoneNumberOptions = OperationOptions;
43
40
 
44
- /**
45
- * Additional options that can be passed to get SIP trunk.
46
- */
47
- export declare interface GetSipTrunkOptions extends OperationOptions {
48
- /**
49
- * Sets the optional parameter to retrieve SBC properties.
50
- */
51
- includeHealth?: boolean;
52
- }
53
-
54
- /** Defines values for InactiveReason. */
55
- export declare type InactiveReason = "noRecentCalls" | "noRecentPings" | "noRecentCallsAndPings";
56
-
57
41
  /**
58
42
  * Additional options that can be passed to the available countries request.
59
43
  */
@@ -87,12 +71,6 @@ export declare interface ListOfferingsOptions extends OperationOptions {
87
71
  export declare interface ListPurchasedPhoneNumbersOptions extends OperationOptions {
88
72
  }
89
73
 
90
- /**
91
- * Additional options that can be passed to list SIP trunks.
92
- */
93
- export declare interface ListSipDomainsOptions extends OperationOptions {
94
- }
95
-
96
74
  /**
97
75
  * Additional options that can be passed to list SIP routes.
98
76
  */
@@ -102,7 +80,7 @@ export declare interface ListSipRoutesOptions extends OperationOptions {
102
80
  /**
103
81
  * Additional options that can be passed to list SIP trunks.
104
82
  */
105
- export declare interface ListSipTrunksOptions extends GetSipTrunkOptions {
83
+ export declare interface ListSipTrunksOptions extends OperationOptions {
106
84
  }
107
85
 
108
86
  /**
@@ -111,6 +89,40 @@ export declare interface ListSipTrunksOptions extends GetSipTrunkOptions {
111
89
  export declare interface ListTollFreeAreaCodesOptions extends Omit<PhoneNumbersListAreaCodesOptionalParams, "assignmentType" | "locality" | "administrativeDivision"> {
112
90
  }
113
91
 
92
+ /** Represents metadata describing the operator of a phone number */
93
+ export declare interface OperatorDetails {
94
+ /** Name of the phone operator */
95
+ name?: string;
96
+ /** Mobile Network Code */
97
+ mobileNetworkCode?: string;
98
+ /** Mobile Country Code */
99
+ mobileCountryCode?: string;
100
+ }
101
+
102
+ /** Represents metadata about a phone number that is controlled/provided by that phone number's operator. */
103
+ export declare interface OperatorInformation {
104
+ /** E.164 formatted string representation of the phone number */
105
+ phoneNumber?: string;
106
+ /** Type of service associated with the phone number */
107
+ numberType?: OperatorNumberType;
108
+ /** ISO country code associated with the phone number. */
109
+ isoCountryCode?: string;
110
+ /** Represents metadata describing the operator of a phone number */
111
+ operatorDetails?: OperatorDetails;
112
+ }
113
+
114
+ /** Represents a search result containing operator information associated with the requested phone numbers */
115
+ export declare interface OperatorInformationResult {
116
+ /**
117
+ * Results of a search.
118
+ * This array will have one entry per requested phone number which will contain the relevant operator information.
119
+ */
120
+ values?: OperatorInformation[];
121
+ }
122
+
123
+ /** Defines values for OperatorNumberType. */
124
+ export declare type OperatorNumberType = "unknown" | "other" | "geographic" | "mobile";
125
+
114
126
  /** Represents an administrative division. e.g. state or province. */
115
127
  export declare interface PhoneNumberAdministrativeDivision {
116
128
  /** Represents the localized name of the administrative division of the locality. e.g. state or province localized name. */
@@ -404,6 +416,13 @@ export declare class PhoneNumbersClient {
404
416
  * @param options - The optional parameters.
405
417
  */
406
418
  listAvailableOfferings(countryCode: string, options?: ListOfferingsOptions): PagedAsyncIterableIterator<PhoneNumberOffering>;
419
+ /**
420
+ * Search for operator information about specified phone numbers.
421
+ *
422
+ * @param phoneNumbers - The phone numbers to search.
423
+ * @param options - Additional request options.
424
+ */
425
+ searchOperatorInformation(phoneNumbers: string[], options?: SearchOperatorInformationOptions): Promise<OperatorInformationResult>;
407
426
  }
408
427
 
409
428
  /**
@@ -446,15 +465,22 @@ export declare interface PhoneNumberSearchResult {
446
465
  cost: PhoneNumberCost;
447
466
  /** 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. */
448
467
  searchExpiresBy: Date;
468
+ /** The error code of the search. */
469
+ errorCode?: number;
470
+ /** Mapping Error Messages to Codes */
471
+ error?: PhoneNumberSearchResultError;
449
472
  }
450
473
 
474
+ /** Defines values for PhoneNumberSearchResultError. */
475
+ export declare type PhoneNumberSearchResultError = "NoError" | "UnknownErrorCode" | "OutOfStock" | "AuthorizationDenied" | "MissingAddress" | "InvalidAddress" | "InvalidOfferModel" | "NotEnoughLicenses" | "NoWallet" | "NotEnoughCredit" | "NumbersPartiallyAcquired" | "AllNumbersNotAcquired" | "ReservationExpired" | "PurchaseFailed" | "BillingUnavailable" | "ProvisioningFailed" | "UnknownSearchError";
476
+
451
477
  /** Optional parameters. */
452
478
  export declare interface PhoneNumbersListAreaCodesOptionalParams extends coreClient.OperationOptions {
453
479
  /** An optional parameter for how many entries to skip, for pagination purposes. The default value is 0. */
454
480
  skip?: number;
455
481
  /** An optional parameter for how many entries to return, for pagination purposes. The default value is 100. */
456
482
  maxPageSize?: number;
457
- /** Filter by assignmentType, e.g. User, Application. */
483
+ /** Filter by assignmentType, e.g. Person, Application. */
458
484
  assignmentType?: PhoneNumberAssignmentType;
459
485
  /** The name of locality or town in which to search for the area code. This is required if the number type is Geographic. */
460
486
  locality?: string;
@@ -467,9 +493,6 @@ export declare interface PhoneNumbersListAreaCodesOptionalParams extends coreCli
467
493
  /** Defines values for PhoneNumberType. */
468
494
  export declare type PhoneNumberType = "geographic" | "tollFree";
469
495
 
470
- /** Defines values for PingStatus. */
471
- export declare type PingStatus = "unknown" | "ok" | "expired" | "error";
472
-
473
496
  /** Represents a purchased phone number. */
474
497
  export declare interface PurchasedPhoneNumber {
475
498
  /** The id of the phone number, e.g. 11234567890. */
@@ -514,17 +537,9 @@ export declare interface SearchAvailablePhoneNumbersRequest extends PhoneNumberS
514
537
  }
515
538
 
516
539
  /**
517
- * Represents a SIP domain for routing calls. See RFC 4904.
540
+ * Additional options for the search operator information request.
518
541
  */
519
- export declare interface SipDomain {
520
- /**
521
- * Gets or sets domain uri.
522
- */
523
- domainName: string;
524
- /**
525
- * Gets or sets enabled flag
526
- */
527
- enabled: boolean;
542
+ export declare interface SearchOperatorInformationOptions extends OperationOptions {
528
543
  }
529
544
 
530
545
  /**
@@ -567,35 +582,12 @@ export declare class SipRoutingClient {
567
582
  * @param fqdn - The trunk's FQDN.
568
583
  * @param options - The options parameters.
569
584
  */
570
- getTrunk(fqdn: string, options?: GetSipTrunkOptions): Promise<SipTrunk>;
571
- /**
572
- * Gets the SIP domains.
573
- * @param options - The options parameters.
574
- */
575
- listDomains(options?: ListSipDomainsOptions): PagedAsyncIterableIterator<SipDomain>;
576
- /**
577
- * Gets the SIP domain.
578
- * @param domainName - The domain's name (ex: contoso.com).
579
- * @param options - The options parameters.
580
- */
581
- getDomain(domainName: string, options?: OperationOptions): Promise<SipDomain>;
585
+ getTrunk(fqdn: string, options?: OperationOptions): Promise<SipTrunk>;
582
586
  /**
583
587
  * Lists the SIP trunk routes.
584
588
  * @param options - The options parameters.
585
589
  */
586
590
  listRoutes(options?: ListSipRoutesOptions): PagedAsyncIterableIterator<SipTrunkRoute>;
587
- /**
588
- * Sets the SIP domains.
589
- * @param domains - The SIP domains to be set.
590
- * @param options - The options parameters.
591
- */
592
- setDomains(domains: SipDomain[], options?: OperationOptions): Promise<SipDomain[]>;
593
- /**
594
- * Sets the SIP domain.
595
- * @param domain - The SIP domain to be set.
596
- * @param options - The options parameters.
597
- */
598
- setDomain(domain: SipDomain, options?: OperationOptions): Promise<SipDomain>;
599
591
  /**
600
592
  * Sets the SIP trunks.
601
593
  * @param trunks - The SIP trunks to be set.
@@ -620,20 +612,11 @@ export declare class SipRoutingClient {
620
612
  * @param options - The options parameters.
621
613
  */
622
614
  deleteTrunk(fqdn: string, options?: OperationOptions): Promise<void>;
623
- /**
624
- * Deletes the SIP domain.
625
- * @param domainName - The domain's name (ex: contoso.com).
626
- * @param options - The options parameters.
627
- */
628
- deleteDomain(domainName: string, options?: OperationOptions): Promise<void>;
629
615
  private getRoutesInternal;
630
616
  private getTrunksInternal;
631
- private getDomainsInternal;
632
617
  private listRoutesPagingAll;
633
618
  private listTrunksPagingAll;
634
- private listDomainsPagingAll;
635
619
  private listTrunksPagingPage;
636
- private listDomainsPagingPage;
637
620
  private listRoutesPagingPage;
638
621
  }
639
622
 
@@ -678,38 +661,6 @@ export declare interface SipTrunk {
678
661
  * Gets or sets SIP signaling port of the trunk.
679
662
  */
680
663
  sipSignalingPort: number;
681
- /**
682
- * Gets or sets enabled property of the trunk.
683
- */
684
- enabled?: boolean;
685
- /**
686
- * Represents health state of a SIP trunk for routing calls.
687
- */
688
- readonly health?: SipTrunkHealth;
689
- }
690
-
691
- /** The activity status of Trunk. */
692
- export declare interface SipTrunkActivity {
693
- /** The activity status of Trunk. */
694
- status: ActivityStatus;
695
- /** The reason activity status of Trunk is inactive. */
696
- inactiveReason?: InactiveReason;
697
- }
698
-
699
- /** Represents health state of a SIP trunk for routing calls. */
700
- export declare interface SipTrunkHealth {
701
- /** The status of the TLS connections of the Trunk. */
702
- tls: SipTrunkTls;
703
- /** The status of SIP OPTIONS message sent by Trunk. */
704
- ping: SipTrunkPing;
705
- /** The activity status of Trunk. */
706
- activity: SipTrunkActivity;
707
- }
708
-
709
- /** The status of SIP OPTIONS message sent by Trunk. */
710
- export declare interface SipTrunkPing {
711
- /** The status of SIP OPTIONS message sent by Trunk. */
712
- status: PingStatus;
713
664
  }
714
665
 
715
666
  /** Represents a trunk route for routing calls. */
@@ -728,13 +679,4 @@ export declare interface SipTrunkRoute {
728
679
  trunks?: string[];
729
680
  }
730
681
 
731
- /** The status of the TLS connections of the Trunk. */
732
- export declare interface SipTrunkTls {
733
- /** The status of the TLS connections of the Trunk. */
734
- status: TlsStatus;
735
- }
736
-
737
- /** Defines values for TlsStatus. */
738
- export declare type TlsStatus = "unknown" | "ok" | "certExpiring" | "certExpired";
739
-
740
682
  export { }