@azure/communication-phone-numbers 1.4.0 → 1.5.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/README.md +5 -5
  2. package/dist/browser/generated/src/models/index.d.ts +7 -5
  3. package/dist/browser/generated/src/models/index.d.ts.map +1 -1
  4. package/dist/browser/generated/src/models/index.js.map +1 -1
  5. package/dist/browser/generated/src/models/parameters.js +3 -3
  6. package/dist/browser/generated/src/models/parameters.js.map +1 -1
  7. package/dist/browser/generated/src/operations/phoneNumbers.d.ts +4 -4
  8. package/dist/browser/generated/src/operations/phoneNumbers.js +5 -4
  9. package/dist/browser/generated/src/operations/phoneNumbers.js.map +1 -1
  10. package/dist/browser/generated/src/operationsInterfaces/phoneNumbers.d.ts +3 -3
  11. package/dist/browser/generated/src/operationsInterfaces/phoneNumbers.js.map +1 -1
  12. package/dist/browser/generated/src/phoneNumbersClient.js +2 -2
  13. package/dist/browser/generated/src/phoneNumbersClient.js.map +1 -1
  14. package/dist/browser/generated/src/siprouting/sipRoutingClientContext.js +1 -1
  15. package/dist/browser/generated/src/siprouting/sipRoutingClientContext.js.map +1 -1
  16. package/dist/browser/generated/src/tracing.js +1 -1
  17. package/dist/browser/generated/src/tracing.js.map +1 -1
  18. package/dist/browser/models.d.ts +6 -0
  19. package/dist/browser/models.d.ts.map +1 -1
  20. package/dist/browser/models.js.map +1 -1
  21. package/dist/browser/phoneNumbersClient.d.ts +21 -1
  22. package/dist/browser/phoneNumbersClient.d.ts.map +1 -1
  23. package/dist/browser/phoneNumbersClient.js +35 -0
  24. package/dist/browser/phoneNumbersClient.js.map +1 -1
  25. package/dist/browser/utils/constants.d.ts.map +1 -1
  26. package/dist/browser/utils/constants.js +1 -1
  27. package/dist/browser/utils/constants.js.map +1 -1
  28. package/dist/commonjs/generated/src/models/index.d.ts +7 -5
  29. package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
  30. package/dist/commonjs/generated/src/models/index.js.map +1 -1
  31. package/dist/commonjs/generated/src/models/parameters.js +3 -3
  32. package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
  33. package/dist/commonjs/generated/src/operations/phoneNumbers.d.ts +4 -4
  34. package/dist/commonjs/generated/src/operations/phoneNumbers.js +5 -4
  35. package/dist/commonjs/generated/src/operations/phoneNumbers.js.map +1 -1
  36. package/dist/commonjs/generated/src/operationsInterfaces/phoneNumbers.d.ts +3 -3
  37. package/dist/commonjs/generated/src/operationsInterfaces/phoneNumbers.js.map +1 -1
  38. package/dist/commonjs/generated/src/phoneNumbersClient.js +2 -2
  39. package/dist/commonjs/generated/src/phoneNumbersClient.js.map +1 -1
  40. package/dist/commonjs/generated/src/siprouting/sipRoutingClientContext.js +1 -1
  41. package/dist/commonjs/generated/src/siprouting/sipRoutingClientContext.js.map +1 -1
  42. package/dist/commonjs/generated/src/tracing.js +1 -1
  43. package/dist/commonjs/generated/src/tracing.js.map +1 -1
  44. package/dist/commonjs/models.d.ts +6 -0
  45. package/dist/commonjs/models.d.ts.map +1 -1
  46. package/dist/commonjs/models.js.map +1 -1
  47. package/dist/commonjs/phoneNumbersClient.d.ts +21 -1
  48. package/dist/commonjs/phoneNumbersClient.d.ts.map +1 -1
  49. package/dist/commonjs/phoneNumbersClient.js +35 -0
  50. package/dist/commonjs/phoneNumbersClient.js.map +1 -1
  51. package/dist/commonjs/utils/constants.d.ts.map +1 -1
  52. package/dist/commonjs/utils/constants.js +1 -1
  53. package/dist/commonjs/utils/constants.js.map +1 -1
  54. package/dist/esm/generated/src/models/index.d.ts +7 -5
  55. package/dist/esm/generated/src/models/index.d.ts.map +1 -1
  56. package/dist/esm/generated/src/models/index.js.map +1 -1
  57. package/dist/esm/generated/src/models/parameters.js +3 -3
  58. package/dist/esm/generated/src/models/parameters.js.map +1 -1
  59. package/dist/esm/generated/src/operations/phoneNumbers.d.ts +4 -4
  60. package/dist/esm/generated/src/operations/phoneNumbers.js +5 -4
  61. package/dist/esm/generated/src/operations/phoneNumbers.js.map +1 -1
  62. package/dist/esm/generated/src/operationsInterfaces/phoneNumbers.d.ts +3 -3
  63. package/dist/esm/generated/src/operationsInterfaces/phoneNumbers.js.map +1 -1
  64. package/dist/esm/generated/src/phoneNumbersClient.js +2 -2
  65. package/dist/esm/generated/src/phoneNumbersClient.js.map +1 -1
  66. package/dist/esm/generated/src/siprouting/sipRoutingClientContext.js +1 -1
  67. package/dist/esm/generated/src/siprouting/sipRoutingClientContext.js.map +1 -1
  68. package/dist/esm/generated/src/tracing.js +1 -1
  69. package/dist/esm/generated/src/tracing.js.map +1 -1
  70. package/dist/esm/models.d.ts +6 -0
  71. package/dist/esm/models.d.ts.map +1 -1
  72. package/dist/esm/models.js.map +1 -1
  73. package/dist/esm/phoneNumbersClient.d.ts +21 -1
  74. package/dist/esm/phoneNumbersClient.d.ts.map +1 -1
  75. package/dist/esm/phoneNumbersClient.js +35 -0
  76. package/dist/esm/phoneNumbersClient.js.map +1 -1
  77. package/dist/esm/utils/constants.d.ts.map +1 -1
  78. package/dist/esm/utils/constants.js +1 -1
  79. package/dist/esm/utils/constants.js.map +1 -1
  80. package/dist/react-native/generated/src/models/index.d.ts +7 -5
  81. package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
  82. package/dist/react-native/generated/src/models/index.js.map +1 -1
  83. package/dist/react-native/generated/src/models/parameters.js +3 -3
  84. package/dist/react-native/generated/src/models/parameters.js.map +1 -1
  85. package/dist/react-native/generated/src/operations/phoneNumbers.d.ts +4 -4
  86. package/dist/react-native/generated/src/operations/phoneNumbers.js +5 -4
  87. package/dist/react-native/generated/src/operations/phoneNumbers.js.map +1 -1
  88. package/dist/react-native/generated/src/operationsInterfaces/phoneNumbers.d.ts +3 -3
  89. package/dist/react-native/generated/src/operationsInterfaces/phoneNumbers.js.map +1 -1
  90. package/dist/react-native/generated/src/phoneNumbersClient.js +2 -2
  91. package/dist/react-native/generated/src/phoneNumbersClient.js.map +1 -1
  92. package/dist/react-native/generated/src/siprouting/sipRoutingClientContext.js +1 -1
  93. package/dist/react-native/generated/src/siprouting/sipRoutingClientContext.js.map +1 -1
  94. package/dist/react-native/generated/src/tracing.js +1 -1
  95. package/dist/react-native/generated/src/tracing.js.map +1 -1
  96. package/dist/react-native/models.d.ts +6 -0
  97. package/dist/react-native/models.d.ts.map +1 -1
  98. package/dist/react-native/models.js.map +1 -1
  99. package/dist/react-native/phoneNumbersClient.d.ts +21 -1
  100. package/dist/react-native/phoneNumbersClient.d.ts.map +1 -1
  101. package/dist/react-native/phoneNumbersClient.js +35 -0
  102. package/dist/react-native/phoneNumbersClient.js.map +1 -1
  103. package/dist/react-native/utils/constants.d.ts.map +1 -1
  104. package/dist/react-native/utils/constants.js +1 -1
  105. package/dist/react-native/utils/constants.js.map +1 -1
  106. package/package.json +1 -1
@@ -29,7 +29,7 @@ class PhoneNumbersClient extends coreClient.ServiceClient {
29
29
  const defaults = {
30
30
  requestContentType: "application/json; charset=utf-8",
31
31
  };
32
- const packageDetails = `azsdk-js-communication-phone-numbers/1.4.0`;
32
+ const packageDetails = `azsdk-js-communication-phone-numbers/1.5.0-beta.1`;
33
33
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
34
34
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
35
35
  : `${packageDetails}`;
@@ -40,7 +40,7 @@ class PhoneNumbersClient extends coreClient.ServiceClient {
40
40
  // Parameter assignments
41
41
  this.endpoint = endpoint;
42
42
  // Assigning values to Constant parameters
43
- this.apiVersion = options.apiVersion || "2025-04-01";
43
+ this.apiVersion = options.apiVersion || "2025-06-01";
44
44
  this.phoneNumbers = new index_js_1.PhoneNumbersImpl(this);
45
45
  this.addCustomApiVersionPolicy(options.apiVersion);
46
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"phoneNumbersClient.js","sourceRoot":"","sources":["../../../../src/generated/src/phoneNumbersClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AA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M,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAGF;AA3ED,gDA2EC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport { PhoneNumbersImpl } from \"./operations/index.js\";\nimport { PhoneNumbers } from \"./operationsInterfaces/index.js\";\nimport { PhoneNumbersClientOptionalParams } from \"./models/index.js\";\n\nexport class PhoneNumbersClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the PhoneNumbersClient class.\n * @param endpoint The communication resource, for example https://resourcename.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: PhoneNumbersClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: PhoneNumbersClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-phone-numbers/1.4.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint: options.endpoint ?? options.baseUri ?? \"{endpoint}\",\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2025-04-01\";\n this.phoneNumbers = new PhoneNumbersImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n phoneNumbers: PhoneNumbers;\n}\n"]}
1
+ {"version":3,"file":"phoneNumbersClient.js","sourceRoot":"","sources":["../../../../src/generated/src/phone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ACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAGF;AA3ED,gDA2EC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport { PhoneNumbersImpl } from \"./operations/index.js\";\nimport { PhoneNumbers } from \"./operationsInterfaces/index.js\";\nimport { PhoneNumbersClientOptionalParams } from \"./models/index.js\";\n\nexport class PhoneNumbersClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the PhoneNumbersClient class.\n * @param endpoint The communication resource, for example https://resourcename.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: PhoneNumbersClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: PhoneNumbersClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-phone-numbers/1.5.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint: options.endpoint ?? options.baseUri ?? \"{endpoint}\",\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2025-06-01\";\n this.phoneNumbers = new PhoneNumbersImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n phoneNumbers: PhoneNumbers;\n}\n"]}
@@ -27,7 +27,7 @@ class SipRoutingClientContext extends coreClient.ServiceClient {
27
27
  const defaults = {
28
28
  requestContentType: "application/json; charset=utf-8"
29
29
  };
30
- const packageDetails = `azsdk-js-communication-phone-numbers/1.4.0`;
30
+ const packageDetails = `azsdk-js-communication-phone-numbers/1.5.0-beta.1`;
31
31
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
32
32
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
33
33
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"sipRoutingClientContext.js","sourceRoot":"","sources":["../../../../../src/generated/src/siprouting/sipRoutingClientContext.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AAGjD,MAAa,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IAInE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAwC;QACpE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAmC;YAC/C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,4CAA4C,CAAC;QACpE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF;AA3CD,0DA2CC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { SipRoutingClientOptionalParams } from \"./models/index.js\";\n\nexport class SipRoutingClientContext extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SipRoutingClientContext class.\n * @param endpoint The communication resource, for example https://resourcename.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: SipRoutingClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: SipRoutingClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-communication-phone-numbers/1.4.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-03-01\";\n }\n}\n"]}
1
+ {"version":3,"file":"sipRoutingClientContext.js","sourceRoot":"","sources":["../../../../../src/generated/src/siprouting/sipRoutingClientContext.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AAGjD,MAAa,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IAInE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAwC;QACpE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAmC;YAC/C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,mDAAmD,CAAC;QAC3E,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF;AA3CD,0DA2CC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { SipRoutingClientOptionalParams } from \"./models/index.js\";\n\nexport class SipRoutingClientContext extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SipRoutingClientContext class.\n * @param endpoint The communication resource, for example https://resourcename.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: SipRoutingClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: SipRoutingClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-communication-phone-numbers/1.5.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-03-01\";\n }\n}\n"]}
@@ -12,6 +12,6 @@ const core_tracing_1 = require("@azure/core-tracing");
12
12
  exports.tracingClient = (0, core_tracing_1.createTracingClient)({
13
13
  namespace: "Microsoft.Communication",
14
14
  packageName: "@azure/communication-phone-numbers",
15
- packageVersion: "1.4.0",
15
+ packageVersion: "1.5.0-beta.1",
16
16
  });
17
17
  //# sourceMappingURL=tracing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,sDAA0D;AAE7C,QAAA,aAAa,GAAG,IAAA,kCAAmB,EAAC;IAC/C,SAAS,EAAE,yBAAyB;IACpC,WAAW,EAAE,oCAAoC;IACjD,cAAc,EAAE,OAAO;CACxB,CAAC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { createTracingClient } from \"@azure/core-tracing\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Communication\",\n packageName: \"@azure/communication-phone-numbers\",\n packageVersion: \"1.4.0\",\n});\n"]}
1
+ {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,sDAA0D;AAE7C,QAAA,aAAa,GAAG,IAAA,kCAAmB,EAAC;IAC/C,SAAS,EAAE,yBAAyB;IACpC,WAAW,EAAE,oCAAoC;IACjD,cAAc,EAAE,cAAc;CAC/B,CAAC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { createTracingClient } from \"@azure/core-tracing\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Communication\",\n packageName: \"@azure/communication-phone-numbers\",\n packageVersion: \"1.5.0-beta.1\",\n});\n"]}
@@ -54,11 +54,17 @@ export interface ListTollFreeAreaCodesOptions extends Omit<PhoneNumbersListAreaC
54
54
  */
55
55
  export interface ListGeographicAreaCodesOptions extends PhoneNumbersListAreaCodesOptionalParams {
56
56
  }
57
+ /**
58
+ * Additional options that can be passed to the Mobile area codes request.
59
+ */
60
+ export interface ListMobileAreaCodesOptions extends Omit<PhoneNumbersListAreaCodesOptionalParams, "locality" | "administrativeDivision"> {
61
+ }
57
62
  /**
58
63
  * Additional options that can be passed to the available localities request.
59
64
  */
60
65
  export interface ListLocalitiesOptions extends OperationOptions {
61
66
  administrativeDivision?: string;
67
+ phoneNumberType?: PhoneNumberType;
62
68
  }
63
69
  /**
64
70
  * Additional options for the search operator information request.
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,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BAA8B,CAAC;IAC9C,kFAAkF;IAClF,cAAc,CAAC,EAAE,yBAAyB,CAAC;IAC3C,iJAAiJ;IACjJ,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,sCAAsC,CAAC;AAE/E,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,iCAAiC,EACjC,yBAAyB,EACzB,mBAAmB,EACnB,6BAA6B,EAC7B,wBAAwB,EACxB,uBAAuB,EACvB,8BAA8B,EAC9B,yBAAyB,EACzB,eAAe,EACf,kBAAkB,EAClB,uCAAuC,EACvC,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,4BAA4B,EAC5B,sCAAsC,EACtC,uCAAuC,EACvC,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE5F;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions } from \"@azure/core-client\";\nimport type * as coreClient from \"@azure/core-client\";\nimport type {\n AvailablePhoneNumber,\n PhoneNumberAssignmentType,\n PhoneNumberCapabilitiesRequest,\n PhoneNumberSearchRequest,\n PhoneNumbersListAreaCodesOptionalParams,\n PhoneNumbersPurchaseReservationHeaders,\n PhoneNumberType,\n} from \"./generated/src/models/index.js\";\n\n/**\n * The result of the phone numbers purchase operation.\n */\nexport interface PurchasePhoneNumbersResult {}\n\n/**\n * The result of the phone number release operation.\n */\nexport interface ReleasePhoneNumberResult {}\n\n/**\n * Additional options for the get phone number request.\n */\nexport type GetPurchasedPhoneNumberOptions = OperationOptions;\n\n/**\n * Additional options that can be passed to the list phone numbers request.\n */\nexport interface ListPurchasedPhoneNumbersOptions extends OperationOptions {}\n\n/**\n * Represents a phone number search request to find phone numbers.\n * Found phone numbers are temporarily held for a following purchase.\n */\nexport interface SearchAvailablePhoneNumbersRequest extends PhoneNumberSearchRequest {\n /**\n * The ISO 3166-2 country code, e.g. US, representing the location of the search.\n */\n countryCode: string;\n}\n\n/**\n * Represents mandatory fields for a phone number browse request.\n */\nexport interface BrowseAvailableNumbersRequest {\n /** Represents the number type of the offering. */\n phoneNumberType: PhoneNumberType;\n /** The ISO 3166-2 country code, e.g. US, representing the location of the search. */\n countryCode: string;\n}\n\n/**\n * Additional options that can be passed to the available countries request.\n */\nexport interface ListAvailableCountriesOptions extends OperationOptions {}\n\n/**\n * Additional options that can be passed to the Toll-Free area codes request.\n */\nexport interface ListTollFreeAreaCodesOptions\n extends Omit<\n PhoneNumbersListAreaCodesOptionalParams,\n \"assignmentType\" | \"locality\" | \"administrativeDivision\"\n > {}\n\n/**\n * Additional options that can be passed to the Geographic area codes request.\n */\nexport interface ListGeographicAreaCodesOptions extends PhoneNumbersListAreaCodesOptionalParams {}\n\n/**\n * Additional options that can be passed to the available localities request.\n */\nexport interface ListLocalitiesOptions extends OperationOptions {\n administrativeDivision?: string;\n}\n\n/**\n * Additional options for the search operator information request.\n */\nexport interface SearchOperatorInformationOptions extends OperationOptions {\n includeAdditionalOperatorDetails?: boolean;\n}\n\n/**\n * Additional options that can be passed to list SIP routes.\n */\nexport interface ListSipRoutesOptions extends OperationOptions {}\n\n/**\n * Additional options that can be passed to list SIP trunks.\n */\nexport interface ListSipTrunksOptions extends OperationOptions {}\n\n/**\n * Additional options that can be passed to the available offerings request.\n */\nexport interface ListOfferingsOptions extends OperationOptions {\n phoneNumberType?: PhoneNumberType;\n assignmentType?: PhoneNumberAssignmentType;\n}\n\n/**\n * Required fields for create or update a phone numbers reservation.\n */\nexport interface CreateOrUpdateReservationRequest extends OperationOptions {\n /**\n * The id of the reservation.\n */\n reservationId: string;\n}\n\n/**\n * Additional options for updating a phone numbers reservation.\n */\nexport interface CreateOrUpdateReservationOptions extends OperationOptions {\n /**\n * The phone numbers to be added or updated in the reservation.\n */\n add?: AvailablePhoneNumber[];\n\n /**\n * The phone number ids to be removed from the reservation.\n */\n remove?: string[];\n}\n\n/**\n * Additional options for deleting a phone numbers reservation.\n */\nexport interface DeleteReservationOptions extends OperationOptions {}\n\n/**\n * Additional options for getting a phone numbers reservation.\n */\nexport interface GetReservationOptions extends OperationOptions {}\n\n/**\n * Additional options for listing all phone numbers reservations.\n */\nexport interface ListReservationOptions extends OperationOptions {}\n\n/**\n * Additional options for browse available phone numbers request.\n */\nexport interface BrowseAvailableNumbersOptions extends coreClient.OperationOptions {\n /** The minimum desired capabilities for the browse operation request. */\n capabilities?: PhoneNumberCapabilitiesRequest;\n /** Represents the assignment type of the offering. Also known as the use case. */\n assignmentType?: PhoneNumberAssignmentType;\n /** The phone number prefix to match. If specified, the search will be limited to phone numbers that start with the any of the given prefixes. */\n phoneNumberPrefixes?: string[];\n}\n\n/**\n * The result of the purchase reservation operation.\n */\nexport type PurchaseReservationResult = PhoneNumbersPurchaseReservationHeaders;\n\nexport {\n AvailablePhoneNumber,\n CommunicationError,\n PhoneNumberAdministrativeDivision,\n PhoneNumberAssignmentType,\n PhoneNumberAreaCode,\n PhoneNumberAvailabilityStatus,\n PhoneNumbersBrowseResult,\n PhoneNumberCapabilities,\n PhoneNumberCapabilitiesRequest,\n PhoneNumberCapabilityType,\n PhoneNumberCost,\n PhoneNumberCountry,\n PhoneNumbersListAreaCodesOptionalParams,\n PhoneNumberLocality,\n PhoneNumberOffering,\n PhoneNumberSearchRequest,\n PhoneNumberSearchResult,\n PhoneNumberSearchResultError,\n PhoneNumbersPurchaseReservationHeaders,\n PhoneNumbersPurchaseReservationResponse,\n PhoneNumbersReservation,\n PhoneNumberType,\n PurchasedPhoneNumber,\n OperatorDetails,\n OperatorInformation,\n OperatorInformationOptions,\n OperatorInformationResult,\n OperatorNumberType,\n ReservationStatus,\n} from \"./generated/src/models/index.js\";\n\nexport { SipRoutingError, SipTrunkRoute } from \"./generated/src/siprouting/models/index.js\";\n\n/**\n * Represents a SIP trunk for routing calls. See RFC 4904.\n */\nexport interface SipTrunk {\n /**\n * Gets or sets FQDN of the trunk.\n */\n fqdn: string;\n /**\n * Gets or sets SIP signaling port of the trunk.\n */\n sipSignalingPort: number;\n}\n"]}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions } from \"@azure/core-client\";\nimport type * as coreClient from \"@azure/core-client\";\nimport type {\n AvailablePhoneNumber,\n PhoneNumberAssignmentType,\n PhoneNumberCapabilitiesRequest,\n PhoneNumberSearchRequest,\n PhoneNumbersListAreaCodesOptionalParams,\n PhoneNumbersPurchaseReservationHeaders,\n PhoneNumberType,\n} from \"./generated/src/models/index.js\";\n\n/**\n * The result of the phone numbers purchase operation.\n */\nexport interface PurchasePhoneNumbersResult {}\n\n/**\n * The result of the phone number release operation.\n */\nexport interface ReleasePhoneNumberResult {}\n\n/**\n * Additional options for the get phone number request.\n */\nexport type GetPurchasedPhoneNumberOptions = OperationOptions;\n\n/**\n * Additional options that can be passed to the list phone numbers request.\n */\nexport interface ListPurchasedPhoneNumbersOptions extends OperationOptions {}\n\n/**\n * Represents a phone number search request to find phone numbers.\n * Found phone numbers are temporarily held for a following purchase.\n */\nexport interface SearchAvailablePhoneNumbersRequest extends PhoneNumberSearchRequest {\n /**\n * The ISO 3166-2 country code, e.g. US, representing the location of the search.\n */\n countryCode: string;\n}\n\n/**\n * Represents mandatory fields for a phone number browse request.\n */\nexport interface BrowseAvailableNumbersRequest {\n /** Represents the number type of the offering. */\n phoneNumberType: PhoneNumberType;\n /** The ISO 3166-2 country code, e.g. US, representing the location of the search. */\n countryCode: string;\n}\n\n/**\n * Additional options that can be passed to the available countries request.\n */\nexport interface ListAvailableCountriesOptions extends OperationOptions {}\n\n/**\n * Additional options that can be passed to the Toll-Free area codes request.\n */\nexport interface ListTollFreeAreaCodesOptions\n extends Omit<\n PhoneNumbersListAreaCodesOptionalParams,\n \"assignmentType\" | \"locality\" | \"administrativeDivision\"\n > {}\n\n/**\n * Additional options that can be passed to the Geographic area codes request.\n */\nexport interface ListGeographicAreaCodesOptions extends PhoneNumbersListAreaCodesOptionalParams {}\n\n/**\n * Additional options that can be passed to the Mobile area codes request.\n */\nexport interface ListMobileAreaCodesOptions\n extends Omit<PhoneNumbersListAreaCodesOptionalParams, \"locality\" | \"administrativeDivision\"> {}\n\n/**\n * Additional options that can be passed to the available localities request.\n */\nexport interface ListLocalitiesOptions extends OperationOptions {\n administrativeDivision?: string;\n phoneNumberType?: PhoneNumberType;\n}\n\n/**\n * Additional options for the search operator information request.\n */\nexport interface SearchOperatorInformationOptions extends OperationOptions {\n includeAdditionalOperatorDetails?: boolean;\n}\n\n/**\n * Additional options that can be passed to list SIP routes.\n */\nexport interface ListSipRoutesOptions extends OperationOptions {}\n\n/**\n * Additional options that can be passed to list SIP trunks.\n */\nexport interface ListSipTrunksOptions extends OperationOptions {}\n\n/**\n * Additional options that can be passed to the available offerings request.\n */\nexport interface ListOfferingsOptions extends OperationOptions {\n phoneNumberType?: PhoneNumberType;\n assignmentType?: PhoneNumberAssignmentType;\n}\n\n/**\n * Required fields for create or update a phone numbers reservation.\n */\nexport interface CreateOrUpdateReservationRequest extends OperationOptions {\n /**\n * The id of the reservation.\n */\n reservationId: string;\n}\n\n/**\n * Additional options for updating a phone numbers reservation.\n */\nexport interface CreateOrUpdateReservationOptions extends OperationOptions {\n /**\n * The phone numbers to be added or updated in the reservation.\n */\n add?: AvailablePhoneNumber[];\n\n /**\n * The phone number ids to be removed from the reservation.\n */\n remove?: string[];\n}\n\n/**\n * Additional options for deleting a phone numbers reservation.\n */\nexport interface DeleteReservationOptions extends OperationOptions {}\n\n/**\n * Additional options for getting a phone numbers reservation.\n */\nexport interface GetReservationOptions extends OperationOptions {}\n\n/**\n * Additional options for listing all phone numbers reservations.\n */\nexport interface ListReservationOptions extends OperationOptions {}\n\n/**\n * Additional options for browse available phone numbers request.\n */\nexport interface BrowseAvailableNumbersOptions extends coreClient.OperationOptions {\n /** The minimum desired capabilities for the browse operation request. */\n capabilities?: PhoneNumberCapabilitiesRequest;\n /** Represents the assignment type of the offering. Also known as the use case. */\n assignmentType?: PhoneNumberAssignmentType;\n /** The phone number prefix to match. If specified, the search will be limited to phone numbers that start with the any of the given prefixes. */\n phoneNumberPrefixes?: string[];\n}\n\n/**\n * The result of the purchase reservation operation.\n */\nexport type PurchaseReservationResult = PhoneNumbersPurchaseReservationHeaders;\n\nexport {\n AvailablePhoneNumber,\n CommunicationError,\n PhoneNumberAdministrativeDivision,\n PhoneNumberAssignmentType,\n PhoneNumberAreaCode,\n PhoneNumberAvailabilityStatus,\n PhoneNumbersBrowseResult,\n PhoneNumberCapabilities,\n PhoneNumberCapabilitiesRequest,\n PhoneNumberCapabilityType,\n PhoneNumberCost,\n PhoneNumberCountry,\n PhoneNumbersListAreaCodesOptionalParams,\n PhoneNumberLocality,\n PhoneNumberOffering,\n PhoneNumberSearchRequest,\n PhoneNumberSearchResult,\n PhoneNumberSearchResultError,\n PhoneNumbersPurchaseReservationHeaders,\n PhoneNumbersPurchaseReservationResponse,\n PhoneNumbersReservation,\n PhoneNumberType,\n PurchasedPhoneNumber,\n OperatorDetails,\n OperatorInformation,\n OperatorInformationOptions,\n OperatorInformationResult,\n OperatorNumberType,\n ReservationStatus,\n} from \"./generated/src/models/index.js\";\n\nexport { SipRoutingError, SipTrunkRoute } from \"./generated/src/siprouting/models/index.js\";\n\n/**\n * Represents a SIP trunk for routing calls. See RFC 4904.\n */\nexport interface SipTrunk {\n /**\n * Gets or sets FQDN of the trunk.\n */\n fqdn: string;\n /**\n * Gets or sets SIP signaling port of the trunk.\n */\n sipSignalingPort: number;\n}\n"]}
@@ -2,7 +2,7 @@ import type { KeyCredential, TokenCredential } from "@azure/core-auth";
2
2
  import type { PollOperationState, PollerLike } from "@azure/core-lro";
3
3
  import type { PagedAsyncIterableIterator } from "@azure/core-paging";
4
4
  import type { OperatorInformationResult, PhoneNumberAreaCode, PhoneNumberCapabilitiesRequest, PhoneNumberCountry, PhoneNumberLocality, PhoneNumberOffering, PhoneNumbersBrowseResult, PhoneNumberSearchResult, PhoneNumbersReservation, PurchasedPhoneNumber } from "./generated/src/models/index.js";
5
- import type { BrowseAvailableNumbersRequest, DeleteReservationOptions, GetPurchasedPhoneNumberOptions, GetReservationOptions, ListAvailableCountriesOptions, ListGeographicAreaCodesOptions, ListLocalitiesOptions, ListOfferingsOptions, ListPurchasedPhoneNumbersOptions, ListReservationOptions, ListTollFreeAreaCodesOptions, PurchasePhoneNumbersResult, ReleasePhoneNumberResult, SearchAvailablePhoneNumbersRequest, SearchOperatorInformationOptions, CreateOrUpdateReservationOptions, BrowseAvailableNumbersOptions, CreateOrUpdateReservationRequest } from "./models.js";
5
+ import type { BrowseAvailableNumbersRequest, DeleteReservationOptions, GetPurchasedPhoneNumberOptions, GetReservationOptions, ListAvailableCountriesOptions, ListGeographicAreaCodesOptions, ListMobileAreaCodesOptions, ListLocalitiesOptions, ListOfferingsOptions, ListPurchasedPhoneNumbersOptions, ListReservationOptions, ListTollFreeAreaCodesOptions, PurchasePhoneNumbersResult, ReleasePhoneNumberResult, SearchAvailablePhoneNumbersRequest, SearchOperatorInformationOptions, CreateOrUpdateReservationOptions, BrowseAvailableNumbersOptions, CreateOrUpdateReservationRequest } from "./models.js";
6
6
  import type { BeginPurchasePhoneNumbersOptions, BeginReleasePhoneNumberOptions, BeginReservationPurchaseOptions, BeginSearchAvailablePhoneNumbersOptions, BeginUpdatePhoneNumberCapabilitiesOptions } from "./lroModels.js";
7
7
  import type { CommonClientOptions } from "@azure/core-client";
8
8
  /**
@@ -451,6 +451,26 @@ export declare class PhoneNumbersClient {
451
451
  * @param options - The optional parameters.
452
452
  */
453
453
  listAvailableGeographicAreaCodes(countryCode: string, options?: ListGeographicAreaCodesOptions): PagedAsyncIterableIterator<PhoneNumberAreaCode>;
454
+ /**
455
+ * Iterates the available Mobile area codes.
456
+ *
457
+ * Example usage:
458
+ * ```ts snippet:PhoneNumbersClientListMobileAreaCodes
459
+ * import { DefaultAzureCredential } from "@azure/identity";
460
+ * import { PhoneNumbersClient } from "@azure/communication-phone-numbers";
461
+ *
462
+ * const credential = new DefaultAzureCredential();
463
+ * const client = new PhoneNumbersClient("<endpoint-from-resource>", credential);
464
+ *
465
+ * for await (const areaCodeItem of client.listAvailableMobileAreaCodes("IE")) {
466
+ * console.log("area code: ", areaCodeItem.areaCode);
467
+ * }
468
+ * ```
469
+ * List all available Geographic area codes.
470
+ * @param countryCode - The ISO 3166-2 country code.
471
+ * @param options - The optional parameters.
472
+ */
473
+ listAvailableMobileAreaCodes(countryCode: string, options?: ListMobileAreaCodesOptions): PagedAsyncIterableIterator<PhoneNumberAreaCode>;
454
474
  /**
455
475
  * Iterates the available localities.
456
476
  *
@@ -1 +1 @@
1
- {"version":3,"file":"phoneNumbersClient.d.ts","sourceRoot":"","sources":["../../src/phoneNumbersClient.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAErE,OAAO,KAAK,EAEV,yBAAyB,EACzB,mBAAmB,EACnB,8BAA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;;;;;;;;;;OAiBG;IACI,sBAAsB,CAC3B,OAAO,GAAE,6BAAkC,GAC1C,0BAA0B,CAAC,kBAAkB,CAAC;IAuBjD;;;;;;;;;;;;;;;;;;OAkBG;IACI,8BAA8B,CACnC,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,4BAAiC,GACzC,0BAA0B,CAAC,mBAAmB,CAAC;IAuBlD;;;;;;;;;;;;;;;;;;OAkBG;IACI,gCAAgC,CACrC,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,8BAAmC,GAC3C,0BAA0B,CAAC,mBAAmB,CAAC;IAsBlD;;;;;;;;;;;;;;;;;;OAkBG;IACI,4BAA4B,CACjC,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,0BAA+B,GACvC,0BAA0B,CAAC,mBAAmB,CAAC;IAsBlD;;;;;;;;;;;;;;;;;;OAkBG;IACI,uBAAuB,CAC5B,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,qBAA0B,GAClC,0BAA0B,CAAC,mBAAmB,CAAC;IAuBlD;;;;;;;;;;;;;;;;;;;OAmBG;IACI,sBAAsB,CAC3B,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,oBAAyB,GACjC,0BAA0B,CAAC,mBAAmB,CAAC;IAsBlD;;;;;;;;;;;;;;;;;OAiBG;IACI,gBAAgB,CACrB,OAAO,GAAE,sBAA2B,GACnC,0BAA0B,CAAC,uBAAuB,CAAC;IAsBtD;;;;;OAKG;IACI,yBAAyB,CAC9B,YAAY,EAAE,MAAM,EAAE,EACtB,OAAO,GAAE,gCAA8E,GACtF,OAAO,CAAC,yBAAyB,CAAC;IAuBrC,OAAO,CAAC,4BAA4B;IAcpC,OAAO,CAAC,iCAAiC;CAa1C"}
@@ -573,6 +573,41 @@ class PhoneNumbersClient {
573
573
  span.end();
574
574
  }
575
575
  }
576
+ /**
577
+ * Iterates the available Mobile area codes.
578
+ *
579
+ * Example usage:
580
+ * ```ts snippet:PhoneNumbersClientListMobileAreaCodes
581
+ * import { DefaultAzureCredential } from "@azure/identity";
582
+ * import { PhoneNumbersClient } from "@azure/communication-phone-numbers";
583
+ *
584
+ * const credential = new DefaultAzureCredential();
585
+ * const client = new PhoneNumbersClient("<endpoint-from-resource>", credential);
586
+ *
587
+ * for await (const areaCodeItem of client.listAvailableMobileAreaCodes("IE")) {
588
+ * console.log("area code: ", areaCodeItem.areaCode);
589
+ * }
590
+ * ```
591
+ * List all available Geographic area codes.
592
+ * @param countryCode - The ISO 3166-2 country code.
593
+ * @param options - The optional parameters.
594
+ */
595
+ listAvailableMobileAreaCodes(countryCode, options = {}) {
596
+ const { span, updatedOptions } = tracing_js_1.tracingClient.startSpan("PhoneNumbersClient-listAvailableMobileAreaCodes", options);
597
+ try {
598
+ return this.client.phoneNumbers.listAreaCodes(countryCode, "mobile", Object.assign({}, updatedOptions));
599
+ }
600
+ catch (e) {
601
+ span.setStatus({
602
+ status: "error",
603
+ error: e,
604
+ });
605
+ throw e;
606
+ }
607
+ finally {
608
+ span.end();
609
+ }
610
+ }
576
611
  /**
577
612
  * Iterates the available localities.
578
613
  *
@@ -1 +1 @@
1
- {"version":3,"file":"phoneNumbersClient.js","sourceRoot":"","sources":["../../src/phoneNumbersClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,4CAA4C;;;;AAE5C,uDAAuD;AACvD,sEAIqC;AAErC,gDAAqD;AAIrD,uDAA6F;AAyC7F,iFAAmF;AAEnF,+CAA0C;AAC1C,2DAA2D;AAY3D,MAAM,2BAA2B,GAAG,CAAC,OAAY,EAAwC,EAAE,CACzF,OAAO,IAAI,CAAC,IAAA,sCAAe,EAAC,OAAO,CAAC,IAAI,CAAC,IAAA,6BAAiB,EAAC,OAAO,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAa,kBAAkB;IAoC7B,YACE,qBAA6B,EAC7B,mBAAiF,EACjF,eAA0C,EAAE;QAE5C,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAA,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H,CAAC;QACD,OAAO,uBAAuB,CAAC;IACjC,CAAC;IAEO,iCAAiC,CACvC,kBAA2E,EAC3E,YAAsB;QAEtB,MAAM,uBAAuB,GAC3B,kBAAkB,CAAC;QACrB,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;YACvC,IAAI,WAAW,EAAE,CAAC;gBAChB,uBAAuB,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;YAC9C,CAAC;QACH,CAAC;QACD,OAAO,uBAAuB,CAAC;IACjC,CAAC;CACF;AAv7BD,gDAu7BC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/// <reference lib=\"esnext.asynciterable\" />\n\n/* eslint-disable @azure/azure-sdk/ts-naming-options */\nimport {\n createCommunicationAuthPolicy,\n isKeyCredential,\n parseClientArguments,\n} from \"@azure/communication-common\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type { InternalPipelineOptions } from \"@azure/core-rest-pipeline\";\nimport type { PollOperationState, PollerLike } from \"@azure/core-lro\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { PhoneNumbersClient as PhoneNumbersGeneratedClient } from \"./generated/src/index.js\";\nimport type {\n AvailablePhoneNumber,\n OperatorInformationResult,\n PhoneNumberAreaCode,\n PhoneNumberCapabilitiesRequest,\n PhoneNumberCountry,\n PhoneNumberLocality,\n PhoneNumberOffering,\n PhoneNumbersBrowseResult,\n PhoneNumberSearchResult,\n PhoneNumbersReservation,\n PurchasedPhoneNumber,\n} from \"./generated/src/models/index.js\";\nimport type {\n BrowseAvailableNumbersRequest,\n DeleteReservationOptions,\n GetPurchasedPhoneNumberOptions,\n GetReservationOptions,\n ListAvailableCountriesOptions,\n ListGeographicAreaCodesOptions,\n ListLocalitiesOptions,\n ListOfferingsOptions,\n ListPurchasedPhoneNumbersOptions,\n ListReservationOptions,\n ListTollFreeAreaCodesOptions,\n PurchasePhoneNumbersResult,\n ReleasePhoneNumberResult,\n SearchAvailablePhoneNumbersRequest,\n SearchOperatorInformationOptions,\n CreateOrUpdateReservationOptions,\n BrowseAvailableNumbersOptions,\n CreateOrUpdateReservationRequest,\n} from \"./models.js\";\nimport type {\n BeginPurchasePhoneNumbersOptions,\n BeginReleasePhoneNumberOptions,\n BeginReservationPurchaseOptions,\n BeginSearchAvailablePhoneNumbersOptions,\n BeginUpdatePhoneNumberCapabilitiesOptions,\n} from \"./lroModels.js\";\nimport { createPhoneNumbersPagingPolicy } from \"./utils/customPipelinePolicies.js\";\nimport type { CommonClientOptions } from \"@azure/core-client\";\nimport { logger } from \"./utils/index.js\";\nimport { tracingClient } from \"./generated/src/tracing.js\";\n\n/**\n * Client options used to configure the PhoneNumbersClient API requests.\n */\nexport interface PhoneNumbersClientOptions extends CommonClientOptions {\n /**\n * The accept language parameter to be used in the request header's \"accept-language\" property.\n */\n acceptLanguage?: string;\n}\n\nconst isPhoneNumbersClientOptions = (options: any): options is PhoneNumbersClientOptions =>\n options && !isKeyCredential(options) && !isTokenCredential(options);\n\n/**\n * Client class for interacting with Azure Communication Services Phone Number Administration.\n */\nexport class PhoneNumbersClient {\n /**\n * A reference to the auto-generated PhoneNumber HTTP client.\n */\n private readonly client: PhoneNumbersGeneratedClient;\n\n /**\n * The accept language parameter to be used in the request header's \"accept-language\" property.\n */\n private acceptLanguage: string | undefined;\n\n /**\n * Initializes a new instance of the PhoneNumberAdministrationClient class using a connection string.\n *\n * @param connectionString - Connection string to connect to an Azure Communication Service resource. (eg: endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret)\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(connectionString: string, options?: PhoneNumbersClientOptions);\n\n /**\n * Initializes a new instance of the PhoneNumberAdministrationClient class using an Azure KeyCredential.\n *\n * @param url - The endpoint of the service (eg: https://contoso.eastus.communications.azure.net)\n * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(url: string, credential: KeyCredential, options?: PhoneNumbersClientOptions);\n\n /**\n * Initializes a new instance of the PhoneNumberAdministrationClient class using a TokenCredential.\n * @param url - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).\n * @param credential - TokenCredential that is used to authenticate requests to the service.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(url: string, credential: TokenCredential, options?: PhoneNumbersClientOptions);\n\n public constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: KeyCredential | TokenCredential | PhoneNumbersClientOptions,\n maybeOptions: PhoneNumbersClientOptions = {},\n ) {\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const options = isPhoneNumbersClientOptions(credentialOrOptions)\n ? credentialOrOptions\n : maybeOptions;\n\n const internalPipelineOptions: InternalPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n },\n },\n };\n\n this.client = new PhoneNumbersGeneratedClient(url, {\n endpoint: url,\n ...internalPipelineOptions,\n });\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.client.pipeline.addPolicy(authPolicy);\n\n // This policy is temporary workarounds to address compatibility issues with Azure Core V2.\n const phoneNumbersPagingPolicy = createPhoneNumbersPagingPolicy(url);\n this.client.pipeline.addPolicy(phoneNumbersPagingPolicy);\n this.acceptLanguage = maybeOptions.acceptLanguage;\n }\n\n /**\n * Deletes a reservation by its ID..\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientDeleteReservation\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const reservationId = \"<reservation-id>\";\n * await client.deleteReservation(reservationId);\n *\n * console.log(`Reservation with ID ${reservationId} has been deleted.`);\n * ```\n * Delete a reservation.\n * @param reservationId - The id of the reservation.\n * @param options - Additional request options.\n */\n public deleteReservation(\n reservationId: string,\n options: DeleteReservationOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"PhoneNumbersClient-deleteReservation\",\n options,\n (updatedOptions) => {\n return this.client.phoneNumbers.deleteReservation(reservationId, {\n ...updatedOptions,\n });\n },\n );\n }\n\n /**\n * Gets the details of a purchased phone number. Includes phone number, cost, country code, etc.\n *\n * @param phoneNumber - The E.164 formatted phone number being fetched. The leading plus can be either + or encoded as %2B.\n * @param options - Additional request options.\n */\n public getPurchasedPhoneNumber(\n phoneNumber: string,\n options: GetPurchasedPhoneNumberOptions = {},\n ): Promise<PurchasedPhoneNumber> {\n return tracingClient.withSpan(\n \"PhoneNumbersClient-getPurchasedPhoneNumber\",\n options,\n (updatedOptions) => {\n return this.client.phoneNumbers.getByNumber(phoneNumber, {\n ...updatedOptions,\n });\n },\n );\n }\n\n /**\n * Retrieves the reservation with the given ID, including all of the phone numbers associated with it.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientGetReservation\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const reservationId = \"<reservation-id>\";\n * const reservationResponse = await client.getReservation(reservationId);\n *\n * console.log(`Phone numbers in reservation: ${reservationResponse.phoneNumbers}`);\n * ```\n * Get a reservation.\n * @param reservationId - The id of the reservation.\n * @param options - Additional request options.\n */\n public getReservation(\n reservationId: string,\n options: GetReservationOptions = {},\n ): Promise<PhoneNumbersReservation> {\n return tracingClient.withSpan(\n \"PhoneNumbersClient-getReservation\",\n options,\n (updatedOptions) => {\n return this.client.phoneNumbers.getReservation(reservationId, {\n ...updatedOptions,\n });\n },\n );\n }\n\n /**\n * Iterates the purchased phone numbers.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListPurchasedPhoneNumbers\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const phoneNumbers = client.listPurchasedPhoneNumbers();\n *\n * for await (const phoneNumber of phoneNumbers) {\n * console.log(`The id is the same as the phone number: ${phoneNumber.id}`);\n * console.log(`Phone number type is ${phoneNumber.phoneNumberType}`);\n * }\n * ```\n * List all purchased phone numbers.\n * @param options - The optional parameters.\n */\n public listPurchasedPhoneNumbers(\n options: ListPurchasedPhoneNumbersOptions = {},\n ): PagedAsyncIterableIterator<PurchasedPhoneNumber> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listPurchasedPhoneNumbers\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listPhoneNumbers({\n ...updatedOptions,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Browses for available phone numbers to purchase.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientBrowseAvailablePhoneNumbers\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import {\n * PhoneNumbersClient,\n * BrowseAvailableNumbersRequest,\n * } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const browseAvailableNumberRequest: BrowseAvailableNumbersRequest = {\n * countryCode: \"US\",\n * phoneNumberType: \"tollFree\",\n * };\n * const browseAvailableNumbers = await client.browseAvailablePhoneNumbers(\n * browseAvailableNumberRequest,\n * {\n * capabilities: {\n * calling: \"outbound\",\n * },\n * assignmentType: \"application\",\n * },\n * );\n * for (const phoneNumber of browseAvailableNumbers.phoneNumbers) {\n * console.log(\"Found phone number: \", phoneNumber.phoneNumber);\n * }\n * ```\n * Browse available phone numbers\n * @param request - The request parameters for browsing available phone numbers.\n * @param options - Additional request options.\n */\n public browseAvailablePhoneNumbers(\n request: BrowseAvailableNumbersRequest,\n options?: BrowseAvailableNumbersOptions,\n ): Promise<PhoneNumbersBrowseResult> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-browseAvailableNumbers\",\n options,\n );\n\n try {\n const { countryCode, phoneNumberType, ...rest } = request;\n return this.client.phoneNumbers.browseAvailableNumbers(countryCode, phoneNumberType, {\n ...updatedOptions,\n ...rest,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Starts the release of a purchased phone number.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientReleasePhoneNumber\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const phoneNumberToRelease = \"<phone-number-to-release>\";\n *\n * const releasePoller = await client.beginReleasePhoneNumber(phoneNumberToRelease);\n *\n * // Release is underway.\n * await releasePoller.pollUntilDone();\n * console.log(\"Successfully release phone number.\");\n * ```\n * @param phoneNumber - The E.164 formatted phone number being released. The leading plus can be either + or encoded as %2B.\n * @param options - Additional request options.\n */\n public beginReleasePhoneNumber(\n phoneNumber: string,\n options: BeginReleasePhoneNumberOptions = {},\n ): Promise<PollerLike<PollOperationState<ReleasePhoneNumberResult>, ReleasePhoneNumberResult>> {\n return tracingClient.withSpan(\n \"PhoneNumbersClient-beginReleasePhoneNumber\",\n options,\n (updatedOptions) => {\n return this.client.phoneNumbers.beginReleasePhoneNumber(phoneNumber, updatedOptions);\n },\n );\n }\n\n /**\n * Starts a search for phone numbers given some constraints such as name or area code.\n * The phone numbers that are found are reserved until you cancel, purchase or the reservation expires.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientSearchAvailablePhoneNumbers\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import {\n * PhoneNumbersClient,\n * SearchAvailablePhoneNumbersRequest,\n * } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const searchRequest: SearchAvailablePhoneNumbersRequest = {\n * countryCode: \"US\",\n * phoneNumberType: \"tollFree\",\n * assignmentType: \"application\",\n * capabilities: {\n * sms: \"outbound\",\n * calling: \"none\",\n * },\n * quantity: 1,\n * };\n *\n * const searchPoller = await client.beginSearchAvailablePhoneNumbers(searchRequest);\n *\n * // The search is underway. Wait to receive searchId.\n * const searchResults = await searchPoller.pollUntilDone();\n * console.log(`Found phone number: ${searchResults.phoneNumbers[0]}`);\n * console.log(`searchId: ${searchResults.searchId}`);\n * ```\n *\n * @param search - Request properties to constraint the search scope.\n * @param options - Additional request options.\n */\n public beginSearchAvailablePhoneNumbers(\n search: SearchAvailablePhoneNumbersRequest,\n options: BeginSearchAvailablePhoneNumbersOptions = {},\n ): Promise<PollerLike<PollOperationState<PhoneNumberSearchResult>, PhoneNumberSearchResult>> {\n return tracingClient.withSpan(\n \"PhoneNumbersClient-beginSearchAvailablePhoneNumbers\",\n options,\n (updatedOptions) => {\n const { countryCode, phoneNumberType, assignmentType, capabilities, ...rest } = search;\n return this.client.phoneNumbers.beginSearchAvailablePhoneNumbers(\n countryCode,\n phoneNumberType,\n assignmentType,\n capabilities,\n {\n ...updatedOptions,\n ...rest,\n },\n );\n },\n );\n }\n\n /**\n * Starts the purchase of the phone number(s) in the search associated with a given id.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientPurchasePhoneNumbers\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import {\n * PhoneNumbersClient,\n * SearchAvailablePhoneNumbersRequest,\n * } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const searchRequest: SearchAvailablePhoneNumbersRequest = {\n * countryCode: \"US\",\n * phoneNumberType: \"tollFree\",\n * assignmentType: \"application\",\n * capabilities: {\n * sms: \"outbound\",\n * calling: \"none\",\n * },\n * quantity: 1,\n * };\n *\n * const searchPoller = await client.beginSearchAvailablePhoneNumbers(searchRequest);\n *\n * // The search is underway. Wait to receive searchId.\n * const { searchId, phoneNumbers } = await searchPoller.pollUntilDone();\n *\n * const purchasePoller = await client.beginPurchasePhoneNumbers(searchId);\n *\n * // Purchase is underway.\n * await purchasePoller.pollUntilDone();\n * console.log(`Successfully purchased ${phoneNumbers[0]}`);\n * ```\n *\n * @param searchId - The id of the search to purchase. Returned from `beginSearchAvailablePhoneNumbers`\n * @param options - Additional request options.\n */\n public beginPurchasePhoneNumbers(\n searchId: string,\n options: BeginPurchasePhoneNumbersOptions = {},\n ): Promise<\n PollerLike<PollOperationState<PurchasePhoneNumbersResult>, PurchasePhoneNumbersResult>\n > {\n return tracingClient.withSpan(\n \"PhoneNumbersClient-beginPurchasePhoneNumbers\",\n options,\n (updatedOptions) => {\n return this.client.phoneNumbers.beginPurchasePhoneNumbers({\n ...updatedOptions,\n searchId,\n });\n },\n );\n }\n\n /**\n * Starts the purchase of the phone number(s) in the search associated with a given id.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientBeginReservationPurchase\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const reservationId = \"<reservation-id>\";\n *\n * const purchasePoller = await client.beginReservationPurchase(reservationId);\n *\n * // Purchase is underway.\n * const purchaseResult = await purchasePoller.pollUntilDone();\n * console.log(`Successfully purchased phone numbers in reservation: ${reservationId}`);\n * ```\n * Begins the purchase of the phone numbers in the reservation with the given ID.\n * @param reservationId - The id of the reservation.\n * @param options - Additional request options.\n */\n public beginReservationPurchase(\n reservationId: string,\n options: BeginReservationPurchaseOptions = {},\n ): Promise<\n PollerLike<PollOperationState<PurchasePhoneNumbersResult>, PurchasePhoneNumbersResult>\n > {\n return tracingClient.withSpan(\n \"PhoneNumbersClient-beginReservationPurchase\",\n options,\n (updatedOptions) => {\n return this.client.phoneNumbers.beginPurchaseReservation(reservationId, {\n ...updatedOptions,\n });\n },\n );\n }\n\n /**\n * Starts the update of a purchased phone number's capabilities.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientUpdatePhoneNumberCapabilities\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import {\n * PhoneNumbersClient,\n * PhoneNumberCapabilitiesRequest,\n * } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const phoneNumberToUpdate = \"<phone-number-to-update>\";\n *\n * // This will update phone number to send and receive sms, but only send calls.\n * const updateRequest: PhoneNumberCapabilitiesRequest = {\n * sms: \"inbound+outbound\",\n * calling: \"outbound\",\n * };\n *\n * const updatePoller = await client.beginUpdatePhoneNumberCapabilities(\n * phoneNumberToUpdate,\n * updateRequest,\n * );\n *\n * // Update is underway.\n * const { capabilities } = await updatePoller.pollUntilDone();\n * console.log(`These are the update capabilities: ${capabilities}`);\n * ```\n *\n * @param phoneNumber - The E.164 formatted phone number being updated. The leading plus can be either + or encoded as %2B.\n * @param request - The updated properties which will be applied to the phone number.\n * @param options - Additional request options.\n */\n public beginUpdatePhoneNumberCapabilities(\n phoneNumber: string,\n request: PhoneNumberCapabilitiesRequest,\n options: BeginUpdatePhoneNumberCapabilitiesOptions = {},\n ): Promise<PollerLike<PollOperationState<PurchasedPhoneNumber>, PurchasedPhoneNumber>> {\n if (!phoneNumber) {\n throw Error(\"phone number can't be empty\");\n }\n return tracingClient.withSpan(\n \"PhoneNumbersClient-beginUpdatePhoneNumberCapabilities\",\n options,\n (updatedOptions) => {\n return this.client.phoneNumbers.beginUpdateCapabilities(phoneNumber, {\n ...updatedOptions,\n ...request,\n });\n },\n );\n }\n\n /**\n * Adds and removes phone numbers from the reservation with the given ID. The response will be the\n * updated state of the reservation. Phone numbers can be reserved by including them in the payload. If\n * a number is already in the reservation, it will be ignored. To remove a phone number, set it\n * explicitly to null in the request payload. This operation is idempotent. If a reservation with the\n * same ID already exists, it will be updated, otherwise a new one is created. Only reservations with\n * 'active' status can be updated. Updating a reservation will extend the expiration time of the\n * reservation to 15 minutes after the last change, up to a maximum of 2 hours from creation time.\n * Partial success is possible, in which case the response will have a 207 status code.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientBrowseAndReserveAvailablePhoneNumbers\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import {\n * PhoneNumbersClient,\n * BrowseAvailableNumbersRequest,\n * AvailablePhoneNumber,\n * } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const browseAvailableNumberRequest: BrowseAvailableNumbersRequest = {\n * countryCode: \"US\",\n * phoneNumberType: \"tollFree\",\n * };\n *\n * const browseAvailableNumbers = await client.browseAvailablePhoneNumbers(\n * browseAvailableNumberRequest,\n * {\n * capabilities: {\n * calling: \"outbound\",\n * },\n * assignmentType: \"application\",\n * },\n * );\n * const phoneNumbers = browseAvailableNumbers.phoneNumbers;\n * const phoneNumbersList = [phoneNumbers[0], phoneNumbers[1]];\n * const reservationResponse = await client.createOrUpdateReservation(\n * {\n * reservationId: \"reservationId\",\n * },\n * {\n * add: phoneNumbersList,\n * },\n * );\n * const numbersWithError: AvailablePhoneNumber[] = [];\n * for (const number of Object.values(reservationResponse.phoneNumbers || {})) {\n * if (number != null && number.status === \"error\") {\n * numbersWithError.push(number);\n * }\n * }\n * if (numbersWithError.length > 0) {\n * console.log(\"Errors occurred during reservation\");\n * } else {\n * console.log(\"Reservation operation completed without errors.\");\n * }\n * ```\n *\n * Create or update a reservation.\n * @param request - The request parameters for creating or updating a reservation.\n * @param options - The options parameters.\n */\n public async createOrUpdateReservation(\n request: CreateOrUpdateReservationRequest,\n options?: CreateOrUpdateReservationOptions,\n ): Promise<PhoneNumbersReservation> {\n const phoneNumbersReservation: { [propertyName: string]: AvailablePhoneNumber | null } = {};\n\n if (options?.add) {\n this.addPhoneNumbersToReservation(phoneNumbersReservation, options.add);\n }\n\n if (options?.remove) {\n this.removePhoneNumbersFromReservation(phoneNumbersReservation, options.remove);\n }\n\n const reservationOptionalParams = {\n ...options,\n phoneNumbers: phoneNumbersReservation,\n };\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-createOrUpdateReservation\",\n reservationOptionalParams,\n );\n\n try {\n return this.client.phoneNumbers.createOrUpdateReservation(\n request.reservationId,\n updatedOptions,\n );\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Iterates the available countries.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListAvailableCountries\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * for await (const country of client.listAvailableCountries()) {\n * console.log(\"country: \", country.localizedName);\n * }\n * ```\n * List all available countries.\n * @param options - The optional parameters.\n */\n public listAvailableCountries(\n options: ListAvailableCountriesOptions = {},\n ): PagedAsyncIterableIterator<PhoneNumberCountry> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listAvailableCountries\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listAvailableCountries({\n ...updatedOptions,\n acceptLanguage: this.acceptLanguage,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Iterates the available Toll-Free area codes.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListTollFreeAreaCodes\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * for await (const areaCodeItem of client.listAvailableTollFreeAreaCodes(\"US\")) {\n * console.log(\"area code: \", areaCodeItem.areaCode);\n * }\n * ```\n * List all available Toll-Free area codes.\n * @param countryCode - The ISO 3166-2 country code.\n * @param options - The optional parameters.\n */\n public listAvailableTollFreeAreaCodes(\n countryCode: string,\n options: ListTollFreeAreaCodesOptions = {},\n ): PagedAsyncIterableIterator<PhoneNumberAreaCode> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listAvailableTollFreeAreaCodes\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listAreaCodes(countryCode, \"tollFree\", {\n ...updatedOptions,\n assignmentType: \"application\",\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Iterates the available Geographic area codes.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListGeographicAreaCodes\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * for await (const areaCodeItem of client.listAvailableGeographicAreaCodes(\"US\")) {\n * console.log(\"area code: \", areaCodeItem.areaCode);\n * }\n * ```\n * List all available Geographic area codes.\n * @param countryCode - The ISO 3166-2 country code.\n * @param options - The optional parameters.\n */\n public listAvailableGeographicAreaCodes(\n countryCode: string,\n options: ListGeographicAreaCodesOptions = {},\n ): PagedAsyncIterableIterator<PhoneNumberAreaCode> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listAvailableGeographicFreeAreaCodes\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listAreaCodes(countryCode, \"geographic\", {\n ...updatedOptions,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Iterates the available localities.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListAvailableLocalities\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * for await (const locality of client.listAvailableLocalities(\"US\")) {\n * console.log(\"locality: \", locality.localizedName);\n * }\n * ```\n * List all available localities.\n * @param countryCode - The ISO 3166-2 country code.\n * @param options - The optional parameters.\n */\n public listAvailableLocalities(\n countryCode: string,\n options: ListLocalitiesOptions = {},\n ): PagedAsyncIterableIterator<PhoneNumberLocality> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listAvailableLocalities\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listAvailableLocalities(countryCode, {\n ...updatedOptions,\n acceptLanguage: this.acceptLanguage,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Iterates the available offerings.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListAvailableOfferings\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * for await (const offering of client.listAvailableOfferings(\"US\")) {\n * console.log(\"phone number type: \", offering.phoneNumberType);\n * console.log(\"cost: \", offering.cost.amount);\n * }\n * ```\n * List all available offerings.\n * @param countryCode - The ISO 3166-2 country code.\n * @param options - The optional parameters.\n */\n public listAvailableOfferings(\n countryCode: string,\n options: ListOfferingsOptions = {},\n ): PagedAsyncIterableIterator<PhoneNumberOffering> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listOfferings\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listOfferings(countryCode, {\n ...updatedOptions,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Iterates all phone number reservations.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListReservations\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * for await (const reservation of client.listReservations()) {\n * console.log(`Reservation id: ${reservation.id}`);\n * }\n * ```\n * List all phone number reservations. Note that the reservations will not be populated with the phone numbers associated with them.\n * @param options - The optional parameters.\n */\n public listReservations(\n options: ListReservationOptions = {},\n ): PagedAsyncIterableIterator<PhoneNumbersReservation> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listReservations\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listReservations({\n ...updatedOptions,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Search for operator information about specified phone numbers.\n *\n * @param phoneNumbers - The phone numbers to search.\n * @param options - Additional request options.\n */\n public searchOperatorInformation(\n phoneNumbers: string[],\n options: SearchOperatorInformationOptions = { includeAdditionalOperatorDetails: false },\n ): Promise<OperatorInformationResult> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-searchOperatorInformation\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.operatorInformationSearch(phoneNumbers, {\n ...updatedOptions,\n options: { includeAdditionalOperatorDetails: options.includeAdditionalOperatorDetails },\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n private addPhoneNumbersToReservation(\n currentReservation: { [propertyName: string]: AvailablePhoneNumber | null },\n phoneNumbers: AvailablePhoneNumber[],\n ): { [propertyName: string]: AvailablePhoneNumber | null } {\n const phoneNumbersReservation: { [propertyName: string]: AvailablePhoneNumber | null } =\n currentReservation;\n for (const phoneNumber of phoneNumbers) {\n if (phoneNumber.id) {\n phoneNumbersReservation[phoneNumber.id] = phoneNumber;\n }\n }\n return phoneNumbersReservation;\n }\n\n private removePhoneNumbersFromReservation(\n currentReservation: { [propertyName: string]: AvailablePhoneNumber | null },\n phoneNumbers: string[],\n ): { [propertyName: string]: AvailablePhoneNumber | null } {\n const phoneNumbersReservation: { [propertyName: string]: AvailablePhoneNumber | null } =\n currentReservation;\n for (const phoneNumber of phoneNumbers) {\n if (phoneNumber) {\n phoneNumbersReservation[phoneNumber] = null;\n }\n }\n return phoneNumbersReservation;\n }\n}\n"]}
1
+ {"version":3,"file":"phoneNumbersClient.js","sourceRoot":"","sources":["../../src/phoneNumbersClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,4CAA4C;;;;AAE5C,uDAAuD;AACvD,sEAIqC;AAErC,gDAAqD;AAIrD,uDAA6F;AA0C7F,iFAAmF;AAEnF,+CAA0C;AAC1C,2DAA2D;AAY3D,MAAM,2BAA2B,GAAG,CAAC,OAAY,EAAwC,EAAE,CACzF,OAAO,IAAI,CAAC,IAAA,sCAAe,EAAC,OAAO,CAAC,IAAI,CAAC,IAAA,6BAAiB,EAAC,OAAO,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAa,kBAA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I,CAAC;YACH,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,yBAAyB,CAAC,YAAY,kCACjE,cAAc,KACjB,OAAO,EAAE,EAAE,gCAAgC,EAAE,OAAO,CAAC,gCAAgC,EAAE,IACvF,CAAC;QACL,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,IAAI,CAAC,SAAS,CAAC;gBACb,MAAM,EAAE,OAAO;gBACf,KAAK,EAAE,CAAC;aACT,CAAC,CAAC;YAEH,MAAM,CAAC,CAAC;QACV,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,GAAG,EAAE,CAAC;QACb,CAAC;IACH,CAAC;IAEO,4BAA4B,CAClC,kBAA2E,EAC3E,YAAoC;QAEpC,MAAM,uBAAuB,GAC3B,kBAAkB,CAAC;QACrB,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;YACvC,IAAI,WAAW,CAAC,EAAE,EAAE,CAAC;gBACnB,uBAAuB,CAAC,WAAW,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC;YACxD,CAAC;QACH,CAAC;QACD,OAAO,uBAAuB,CAAC;IACjC,CAAC;IAEO,iCAAiC,CACvC,kBAA2E,EAC3E,YAAsB;QAEtB,MAAM,uBAAuB,GAC3B,kBAAkB,CAAC;QACrB,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;YACvC,IAAI,WAAW,EAAE,CAAC;gBAChB,uBAAuB,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;YAC9C,CAAC;QACH,CAAC;QACD,OAAO,uBAAuB,CAAC;IACjC,CAAC;CACF;AAn+BD,gDAm+BC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/// <reference lib=\"esnext.asynciterable\" />\n\n/* eslint-disable @azure/azure-sdk/ts-naming-options */\nimport {\n createCommunicationAuthPolicy,\n isKeyCredential,\n parseClientArguments,\n} from \"@azure/communication-common\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type { InternalPipelineOptions } from \"@azure/core-rest-pipeline\";\nimport type { PollOperationState, PollerLike } from \"@azure/core-lro\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { PhoneNumbersClient as PhoneNumbersGeneratedClient } from \"./generated/src/index.js\";\nimport type {\n AvailablePhoneNumber,\n OperatorInformationResult,\n PhoneNumberAreaCode,\n PhoneNumberCapabilitiesRequest,\n PhoneNumberCountry,\n PhoneNumberLocality,\n PhoneNumberOffering,\n PhoneNumbersBrowseResult,\n PhoneNumberSearchResult,\n PhoneNumbersReservation,\n PurchasedPhoneNumber,\n} from \"./generated/src/models/index.js\";\nimport type {\n BrowseAvailableNumbersRequest,\n DeleteReservationOptions,\n GetPurchasedPhoneNumberOptions,\n GetReservationOptions,\n ListAvailableCountriesOptions,\n ListGeographicAreaCodesOptions,\n ListMobileAreaCodesOptions,\n ListLocalitiesOptions,\n ListOfferingsOptions,\n ListPurchasedPhoneNumbersOptions,\n ListReservationOptions,\n ListTollFreeAreaCodesOptions,\n PurchasePhoneNumbersResult,\n ReleasePhoneNumberResult,\n SearchAvailablePhoneNumbersRequest,\n SearchOperatorInformationOptions,\n CreateOrUpdateReservationOptions,\n BrowseAvailableNumbersOptions,\n CreateOrUpdateReservationRequest,\n} from \"./models.js\";\nimport type {\n BeginPurchasePhoneNumbersOptions,\n BeginReleasePhoneNumberOptions,\n BeginReservationPurchaseOptions,\n BeginSearchAvailablePhoneNumbersOptions,\n BeginUpdatePhoneNumberCapabilitiesOptions,\n} from \"./lroModels.js\";\nimport { createPhoneNumbersPagingPolicy } from \"./utils/customPipelinePolicies.js\";\nimport type { CommonClientOptions } from \"@azure/core-client\";\nimport { logger } from \"./utils/index.js\";\nimport { tracingClient } from \"./generated/src/tracing.js\";\n\n/**\n * Client options used to configure the PhoneNumbersClient API requests.\n */\nexport interface PhoneNumbersClientOptions extends CommonClientOptions {\n /**\n * The accept language parameter to be used in the request header's \"accept-language\" property.\n */\n acceptLanguage?: string;\n}\n\nconst isPhoneNumbersClientOptions = (options: any): options is PhoneNumbersClientOptions =>\n options && !isKeyCredential(options) && !isTokenCredential(options);\n\n/**\n * Client class for interacting with Azure Communication Services Phone Number Administration.\n */\nexport class PhoneNumbersClient {\n /**\n * A reference to the auto-generated PhoneNumber HTTP client.\n */\n private readonly client: PhoneNumbersGeneratedClient;\n\n /**\n * The accept language parameter to be used in the request header's \"accept-language\" property.\n */\n private acceptLanguage: string | undefined;\n\n /**\n * Initializes a new instance of the PhoneNumberAdministrationClient class using a connection string.\n *\n * @param connectionString - Connection string to connect to an Azure Communication Service resource. (eg: endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret)\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(connectionString: string, options?: PhoneNumbersClientOptions);\n\n /**\n * Initializes a new instance of the PhoneNumberAdministrationClient class using an Azure KeyCredential.\n *\n * @param url - The endpoint of the service (eg: https://contoso.eastus.communications.azure.net)\n * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(url: string, credential: KeyCredential, options?: PhoneNumbersClientOptions);\n\n /**\n * Initializes a new instance of the PhoneNumberAdministrationClient class using a TokenCredential.\n * @param url - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).\n * @param credential - TokenCredential that is used to authenticate requests to the service.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(url: string, credential: TokenCredential, options?: PhoneNumbersClientOptions);\n\n public constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: KeyCredential | TokenCredential | PhoneNumbersClientOptions,\n maybeOptions: PhoneNumbersClientOptions = {},\n ) {\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const options = isPhoneNumbersClientOptions(credentialOrOptions)\n ? credentialOrOptions\n : maybeOptions;\n\n const internalPipelineOptions: InternalPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n },\n },\n };\n\n this.client = new PhoneNumbersGeneratedClient(url, {\n endpoint: url,\n ...internalPipelineOptions,\n });\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.client.pipeline.addPolicy(authPolicy);\n\n // This policy is temporary workarounds to address compatibility issues with Azure Core V2.\n const phoneNumbersPagingPolicy = createPhoneNumbersPagingPolicy(url);\n this.client.pipeline.addPolicy(phoneNumbersPagingPolicy);\n this.acceptLanguage = maybeOptions.acceptLanguage;\n }\n\n /**\n * Deletes a reservation by its ID..\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientDeleteReservation\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const reservationId = \"<reservation-id>\";\n * await client.deleteReservation(reservationId);\n *\n * console.log(`Reservation with ID ${reservationId} has been deleted.`);\n * ```\n * Delete a reservation.\n * @param reservationId - The id of the reservation.\n * @param options - Additional request options.\n */\n public deleteReservation(\n reservationId: string,\n options: DeleteReservationOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"PhoneNumbersClient-deleteReservation\",\n options,\n (updatedOptions) => {\n return this.client.phoneNumbers.deleteReservation(reservationId, {\n ...updatedOptions,\n });\n },\n );\n }\n\n /**\n * Gets the details of a purchased phone number. Includes phone number, cost, country code, etc.\n *\n * @param phoneNumber - The E.164 formatted phone number being fetched. The leading plus can be either + or encoded as %2B.\n * @param options - Additional request options.\n */\n public getPurchasedPhoneNumber(\n phoneNumber: string,\n options: GetPurchasedPhoneNumberOptions = {},\n ): Promise<PurchasedPhoneNumber> {\n return tracingClient.withSpan(\n \"PhoneNumbersClient-getPurchasedPhoneNumber\",\n options,\n (updatedOptions) => {\n return this.client.phoneNumbers.getByNumber(phoneNumber, {\n ...updatedOptions,\n });\n },\n );\n }\n\n /**\n * Retrieves the reservation with the given ID, including all of the phone numbers associated with it.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientGetReservation\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const reservationId = \"<reservation-id>\";\n * const reservationResponse = await client.getReservation(reservationId);\n *\n * console.log(`Phone numbers in reservation: ${reservationResponse.phoneNumbers}`);\n * ```\n * Get a reservation.\n * @param reservationId - The id of the reservation.\n * @param options - Additional request options.\n */\n public getReservation(\n reservationId: string,\n options: GetReservationOptions = {},\n ): Promise<PhoneNumbersReservation> {\n return tracingClient.withSpan(\n \"PhoneNumbersClient-getReservation\",\n options,\n (updatedOptions) => {\n return this.client.phoneNumbers.getReservation(reservationId, {\n ...updatedOptions,\n });\n },\n );\n }\n\n /**\n * Iterates the purchased phone numbers.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListPurchasedPhoneNumbers\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const phoneNumbers = client.listPurchasedPhoneNumbers();\n *\n * for await (const phoneNumber of phoneNumbers) {\n * console.log(`The id is the same as the phone number: ${phoneNumber.id}`);\n * console.log(`Phone number type is ${phoneNumber.phoneNumberType}`);\n * }\n * ```\n * List all purchased phone numbers.\n * @param options - The optional parameters.\n */\n public listPurchasedPhoneNumbers(\n options: ListPurchasedPhoneNumbersOptions = {},\n ): PagedAsyncIterableIterator<PurchasedPhoneNumber> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listPurchasedPhoneNumbers\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listPhoneNumbers({\n ...updatedOptions,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Browses for available phone numbers to purchase.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientBrowseAvailablePhoneNumbers\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import {\n * PhoneNumbersClient,\n * BrowseAvailableNumbersRequest,\n * } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const browseAvailableNumberRequest: BrowseAvailableNumbersRequest = {\n * countryCode: \"US\",\n * phoneNumberType: \"tollFree\",\n * };\n * const browseAvailableNumbers = await client.browseAvailablePhoneNumbers(\n * browseAvailableNumberRequest,\n * {\n * capabilities: {\n * calling: \"outbound\",\n * },\n * assignmentType: \"application\",\n * },\n * );\n * for (const phoneNumber of browseAvailableNumbers.phoneNumbers) {\n * console.log(\"Found phone number: \", phoneNumber.phoneNumber);\n * }\n * ```\n * Browse available phone numbers\n * @param request - The request parameters for browsing available phone numbers.\n * @param options - Additional request options.\n */\n public browseAvailablePhoneNumbers(\n request: BrowseAvailableNumbersRequest,\n options?: BrowseAvailableNumbersOptions,\n ): Promise<PhoneNumbersBrowseResult> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-browseAvailableNumbers\",\n options,\n );\n\n try {\n const { countryCode, phoneNumberType, ...rest } = request;\n return this.client.phoneNumbers.browseAvailableNumbers(countryCode, phoneNumberType, {\n ...updatedOptions,\n ...rest,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Starts the release of a purchased phone number.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientReleasePhoneNumber\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const phoneNumberToRelease = \"<phone-number-to-release>\";\n *\n * const releasePoller = await client.beginReleasePhoneNumber(phoneNumberToRelease);\n *\n * // Release is underway.\n * await releasePoller.pollUntilDone();\n * console.log(\"Successfully release phone number.\");\n * ```\n * @param phoneNumber - The E.164 formatted phone number being released. The leading plus can be either + or encoded as %2B.\n * @param options - Additional request options.\n */\n public beginReleasePhoneNumber(\n phoneNumber: string,\n options: BeginReleasePhoneNumberOptions = {},\n ): Promise<PollerLike<PollOperationState<ReleasePhoneNumberResult>, ReleasePhoneNumberResult>> {\n return tracingClient.withSpan(\n \"PhoneNumbersClient-beginReleasePhoneNumber\",\n options,\n (updatedOptions) => {\n return this.client.phoneNumbers.beginReleasePhoneNumber(phoneNumber, updatedOptions);\n },\n );\n }\n\n /**\n * Starts a search for phone numbers given some constraints such as name or area code.\n * The phone numbers that are found are reserved until you cancel, purchase or the reservation expires.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientSearchAvailablePhoneNumbers\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import {\n * PhoneNumbersClient,\n * SearchAvailablePhoneNumbersRequest,\n * } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const searchRequest: SearchAvailablePhoneNumbersRequest = {\n * countryCode: \"US\",\n * phoneNumberType: \"tollFree\",\n * assignmentType: \"application\",\n * capabilities: {\n * sms: \"outbound\",\n * calling: \"none\",\n * },\n * quantity: 1,\n * };\n *\n * const searchPoller = await client.beginSearchAvailablePhoneNumbers(searchRequest);\n *\n * // The search is underway. Wait to receive searchId.\n * const searchResults = await searchPoller.pollUntilDone();\n * console.log(`Found phone number: ${searchResults.phoneNumbers[0]}`);\n * console.log(`searchId: ${searchResults.searchId}`);\n * ```\n *\n * @param search - Request properties to constraint the search scope.\n * @param options - Additional request options.\n */\n public beginSearchAvailablePhoneNumbers(\n search: SearchAvailablePhoneNumbersRequest,\n options: BeginSearchAvailablePhoneNumbersOptions = {},\n ): Promise<PollerLike<PollOperationState<PhoneNumberSearchResult>, PhoneNumberSearchResult>> {\n return tracingClient.withSpan(\n \"PhoneNumbersClient-beginSearchAvailablePhoneNumbers\",\n options,\n (updatedOptions) => {\n const { countryCode, phoneNumberType, assignmentType, capabilities, ...rest } = search;\n return this.client.phoneNumbers.beginSearchAvailablePhoneNumbers(\n countryCode,\n phoneNumberType,\n assignmentType,\n capabilities,\n {\n ...updatedOptions,\n ...rest,\n },\n );\n },\n );\n }\n\n /**\n * Starts the purchase of the phone number(s) in the search associated with a given id.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientPurchasePhoneNumbers\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import {\n * PhoneNumbersClient,\n * SearchAvailablePhoneNumbersRequest,\n * } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const searchRequest: SearchAvailablePhoneNumbersRequest = {\n * countryCode: \"US\",\n * phoneNumberType: \"tollFree\",\n * assignmentType: \"application\",\n * capabilities: {\n * sms: \"outbound\",\n * calling: \"none\",\n * },\n * quantity: 1,\n * };\n *\n * const searchPoller = await client.beginSearchAvailablePhoneNumbers(searchRequest);\n *\n * // The search is underway. Wait to receive searchId.\n * const { searchId, phoneNumbers } = await searchPoller.pollUntilDone();\n *\n * const purchasePoller = await client.beginPurchasePhoneNumbers(searchId);\n *\n * // Purchase is underway.\n * await purchasePoller.pollUntilDone();\n * console.log(`Successfully purchased ${phoneNumbers[0]}`);\n * ```\n *\n * @param searchId - The id of the search to purchase. Returned from `beginSearchAvailablePhoneNumbers`\n * @param options - Additional request options.\n */\n public beginPurchasePhoneNumbers(\n searchId: string,\n options: BeginPurchasePhoneNumbersOptions = {},\n ): Promise<\n PollerLike<PollOperationState<PurchasePhoneNumbersResult>, PurchasePhoneNumbersResult>\n > {\n return tracingClient.withSpan(\n \"PhoneNumbersClient-beginPurchasePhoneNumbers\",\n options,\n (updatedOptions) => {\n return this.client.phoneNumbers.beginPurchasePhoneNumbers({\n ...updatedOptions,\n searchId,\n });\n },\n );\n }\n\n /**\n * Starts the purchase of the phone number(s) in the search associated with a given id.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientBeginReservationPurchase\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const reservationId = \"<reservation-id>\";\n *\n * const purchasePoller = await client.beginReservationPurchase(reservationId);\n *\n * // Purchase is underway.\n * const purchaseResult = await purchasePoller.pollUntilDone();\n * console.log(`Successfully purchased phone numbers in reservation: ${reservationId}`);\n * ```\n * Begins the purchase of the phone numbers in the reservation with the given ID.\n * @param reservationId - The id of the reservation.\n * @param options - Additional request options.\n */\n public beginReservationPurchase(\n reservationId: string,\n options: BeginReservationPurchaseOptions = {},\n ): Promise<\n PollerLike<PollOperationState<PurchasePhoneNumbersResult>, PurchasePhoneNumbersResult>\n > {\n return tracingClient.withSpan(\n \"PhoneNumbersClient-beginReservationPurchase\",\n options,\n (updatedOptions) => {\n return this.client.phoneNumbers.beginPurchaseReservation(reservationId, {\n ...updatedOptions,\n });\n },\n );\n }\n\n /**\n * Starts the update of a purchased phone number's capabilities.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientUpdatePhoneNumberCapabilities\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import {\n * PhoneNumbersClient,\n * PhoneNumberCapabilitiesRequest,\n * } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const phoneNumberToUpdate = \"<phone-number-to-update>\";\n *\n * // This will update phone number to send and receive sms, but only send calls.\n * const updateRequest: PhoneNumberCapabilitiesRequest = {\n * sms: \"inbound+outbound\",\n * calling: \"outbound\",\n * };\n *\n * const updatePoller = await client.beginUpdatePhoneNumberCapabilities(\n * phoneNumberToUpdate,\n * updateRequest,\n * );\n *\n * // Update is underway.\n * const { capabilities } = await updatePoller.pollUntilDone();\n * console.log(`These are the update capabilities: ${capabilities}`);\n * ```\n *\n * @param phoneNumber - The E.164 formatted phone number being updated. The leading plus can be either + or encoded as %2B.\n * @param request - The updated properties which will be applied to the phone number.\n * @param options - Additional request options.\n */\n public beginUpdatePhoneNumberCapabilities(\n phoneNumber: string,\n request: PhoneNumberCapabilitiesRequest,\n options: BeginUpdatePhoneNumberCapabilitiesOptions = {},\n ): Promise<PollerLike<PollOperationState<PurchasedPhoneNumber>, PurchasedPhoneNumber>> {\n if (!phoneNumber) {\n throw Error(\"phone number can't be empty\");\n }\n return tracingClient.withSpan(\n \"PhoneNumbersClient-beginUpdatePhoneNumberCapabilities\",\n options,\n (updatedOptions) => {\n return this.client.phoneNumbers.beginUpdateCapabilities(phoneNumber, {\n ...updatedOptions,\n ...request,\n });\n },\n );\n }\n\n /**\n * Adds and removes phone numbers from the reservation with the given ID. The response will be the\n * updated state of the reservation. Phone numbers can be reserved by including them in the payload. If\n * a number is already in the reservation, it will be ignored. To remove a phone number, set it\n * explicitly to null in the request payload. This operation is idempotent. If a reservation with the\n * same ID already exists, it will be updated, otherwise a new one is created. Only reservations with\n * 'active' status can be updated. Updating a reservation will extend the expiration time of the\n * reservation to 15 minutes after the last change, up to a maximum of 2 hours from creation time.\n * Partial success is possible, in which case the response will have a 207 status code.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientBrowseAndReserveAvailablePhoneNumbers\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import {\n * PhoneNumbersClient,\n * BrowseAvailableNumbersRequest,\n * AvailablePhoneNumber,\n * } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * const browseAvailableNumberRequest: BrowseAvailableNumbersRequest = {\n * countryCode: \"US\",\n * phoneNumberType: \"tollFree\",\n * };\n *\n * const browseAvailableNumbers = await client.browseAvailablePhoneNumbers(\n * browseAvailableNumberRequest,\n * {\n * capabilities: {\n * calling: \"outbound\",\n * },\n * assignmentType: \"application\",\n * },\n * );\n * const phoneNumbers = browseAvailableNumbers.phoneNumbers;\n * const phoneNumbersList = [phoneNumbers[0], phoneNumbers[1]];\n * const reservationResponse = await client.createOrUpdateReservation(\n * {\n * reservationId: \"reservationId\",\n * },\n * {\n * add: phoneNumbersList,\n * },\n * );\n * const numbersWithError: AvailablePhoneNumber[] = [];\n * for (const number of Object.values(reservationResponse.phoneNumbers || {})) {\n * if (number != null && number.status === \"error\") {\n * numbersWithError.push(number);\n * }\n * }\n * if (numbersWithError.length > 0) {\n * console.log(\"Errors occurred during reservation\");\n * } else {\n * console.log(\"Reservation operation completed without errors.\");\n * }\n * ```\n *\n * Create or update a reservation.\n * @param request - The request parameters for creating or updating a reservation.\n * @param options - The options parameters.\n */\n public async createOrUpdateReservation(\n request: CreateOrUpdateReservationRequest,\n options?: CreateOrUpdateReservationOptions,\n ): Promise<PhoneNumbersReservation> {\n const phoneNumbersReservation: { [propertyName: string]: AvailablePhoneNumber | null } = {};\n\n if (options?.add) {\n this.addPhoneNumbersToReservation(phoneNumbersReservation, options.add);\n }\n\n if (options?.remove) {\n this.removePhoneNumbersFromReservation(phoneNumbersReservation, options.remove);\n }\n\n const reservationOptionalParams = {\n ...options,\n phoneNumbers: phoneNumbersReservation,\n };\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-createOrUpdateReservation\",\n reservationOptionalParams,\n );\n\n try {\n return this.client.phoneNumbers.createOrUpdateReservation(\n request.reservationId,\n updatedOptions,\n );\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Iterates the available countries.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListAvailableCountries\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * for await (const country of client.listAvailableCountries()) {\n * console.log(\"country: \", country.localizedName);\n * }\n * ```\n * List all available countries.\n * @param options - The optional parameters.\n */\n public listAvailableCountries(\n options: ListAvailableCountriesOptions = {},\n ): PagedAsyncIterableIterator<PhoneNumberCountry> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listAvailableCountries\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listAvailableCountries({\n ...updatedOptions,\n acceptLanguage: this.acceptLanguage,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Iterates the available Toll-Free area codes.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListTollFreeAreaCodes\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * for await (const areaCodeItem of client.listAvailableTollFreeAreaCodes(\"US\")) {\n * console.log(\"area code: \", areaCodeItem.areaCode);\n * }\n * ```\n * List all available Toll-Free area codes.\n * @param countryCode - The ISO 3166-2 country code.\n * @param options - The optional parameters.\n */\n public listAvailableTollFreeAreaCodes(\n countryCode: string,\n options: ListTollFreeAreaCodesOptions = {},\n ): PagedAsyncIterableIterator<PhoneNumberAreaCode> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listAvailableTollFreeAreaCodes\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listAreaCodes(countryCode, \"tollFree\", {\n ...updatedOptions,\n assignmentType: \"application\",\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Iterates the available Geographic area codes.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListGeographicAreaCodes\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * for await (const areaCodeItem of client.listAvailableGeographicAreaCodes(\"US\")) {\n * console.log(\"area code: \", areaCodeItem.areaCode);\n * }\n * ```\n * List all available Geographic area codes.\n * @param countryCode - The ISO 3166-2 country code.\n * @param options - The optional parameters.\n */\n public listAvailableGeographicAreaCodes(\n countryCode: string,\n options: ListGeographicAreaCodesOptions = {},\n ): PagedAsyncIterableIterator<PhoneNumberAreaCode> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listAvailableGeographicFreeAreaCodes\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listAreaCodes(countryCode, \"geographic\", {\n ...updatedOptions,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Iterates the available Mobile area codes.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListMobileAreaCodes\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * for await (const areaCodeItem of client.listAvailableMobileAreaCodes(\"IE\")) {\n * console.log(\"area code: \", areaCodeItem.areaCode);\n * }\n * ```\n * List all available Geographic area codes.\n * @param countryCode - The ISO 3166-2 country code.\n * @param options - The optional parameters.\n */\n public listAvailableMobileAreaCodes(\n countryCode: string,\n options: ListMobileAreaCodesOptions = {},\n ): PagedAsyncIterableIterator<PhoneNumberAreaCode> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listAvailableMobileAreaCodes\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listAreaCodes(countryCode, \"mobile\", {\n ...updatedOptions,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Iterates the available localities.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListAvailableLocalities\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * for await (const locality of client.listAvailableLocalities(\"US\")) {\n * console.log(\"locality: \", locality.localizedName);\n * }\n * ```\n * List all available localities.\n * @param countryCode - The ISO 3166-2 country code.\n * @param options - The optional parameters.\n */\n public listAvailableLocalities(\n countryCode: string,\n options: ListLocalitiesOptions = {},\n ): PagedAsyncIterableIterator<PhoneNumberLocality> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listAvailableLocalities\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listAvailableLocalities(countryCode, {\n ...updatedOptions,\n acceptLanguage: this.acceptLanguage,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Iterates the available offerings.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListAvailableOfferings\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * for await (const offering of client.listAvailableOfferings(\"US\")) {\n * console.log(\"phone number type: \", offering.phoneNumberType);\n * console.log(\"cost: \", offering.cost.amount);\n * }\n * ```\n * List all available offerings.\n * @param countryCode - The ISO 3166-2 country code.\n * @param options - The optional parameters.\n */\n public listAvailableOfferings(\n countryCode: string,\n options: ListOfferingsOptions = {},\n ): PagedAsyncIterableIterator<PhoneNumberOffering> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listOfferings\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listOfferings(countryCode, {\n ...updatedOptions,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Iterates all phone number reservations.\n *\n * Example usage:\n * ```ts snippet:PhoneNumbersClientListReservations\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { PhoneNumbersClient } from \"@azure/communication-phone-numbers\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = new PhoneNumbersClient(\"<endpoint-from-resource>\", credential);\n *\n * for await (const reservation of client.listReservations()) {\n * console.log(`Reservation id: ${reservation.id}`);\n * }\n * ```\n * List all phone number reservations. Note that the reservations will not be populated with the phone numbers associated with them.\n * @param options - The optional parameters.\n */\n public listReservations(\n options: ListReservationOptions = {},\n ): PagedAsyncIterableIterator<PhoneNumbersReservation> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-listReservations\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.listReservations({\n ...updatedOptions,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Search for operator information about specified phone numbers.\n *\n * @param phoneNumbers - The phone numbers to search.\n * @param options - Additional request options.\n */\n public searchOperatorInformation(\n phoneNumbers: string[],\n options: SearchOperatorInformationOptions = { includeAdditionalOperatorDetails: false },\n ): Promise<OperatorInformationResult> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"PhoneNumbersClient-searchOperatorInformation\",\n options,\n );\n\n try {\n return this.client.phoneNumbers.operatorInformationSearch(phoneNumbers, {\n ...updatedOptions,\n options: { includeAdditionalOperatorDetails: options.includeAdditionalOperatorDetails },\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n\n throw e;\n } finally {\n span.end();\n }\n }\n\n private addPhoneNumbersToReservation(\n currentReservation: { [propertyName: string]: AvailablePhoneNumber | null },\n phoneNumbers: AvailablePhoneNumber[],\n ): { [propertyName: string]: AvailablePhoneNumber | null } {\n const phoneNumbersReservation: { [propertyName: string]: AvailablePhoneNumber | null } =\n currentReservation;\n for (const phoneNumber of phoneNumbers) {\n if (phoneNumber.id) {\n phoneNumbersReservation[phoneNumber.id] = phoneNumber;\n }\n }\n return phoneNumbersReservation;\n }\n\n private removePhoneNumbersFromReservation(\n currentReservation: { [propertyName: string]: AvailablePhoneNumber | null },\n phoneNumbers: string[],\n ): { [propertyName: string]: AvailablePhoneNumber | null } {\n const phoneNumbersReservation: { [propertyName: string]: AvailablePhoneNumber | null } =\n currentReservation;\n for (const phoneNumber of phoneNumbers) {\n if (phoneNumber) {\n phoneNumbersReservation[phoneNumber] = null;\n }\n }\n return phoneNumbersReservation;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,EAAE,MAAgB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,EAAE,MAAuB,CAAC"}
@@ -3,5 +3,5 @@
3
3
  // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.SDK_VERSION = void 0;
6
- exports.SDK_VERSION = "1.4.0";
6
+ exports.SDK_VERSION = "1.5.0-beta.1";
7
7
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,WAAW,GAAW,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.4.0\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,WAAW,GAAW,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.5.0-beta.1\";\n"]}
@@ -180,7 +180,7 @@ export interface PhoneNumbersReservationPurchaseRequest {
180
180
  }
181
181
  /** Represents a phone number search request to find phone numbers. Found phone numbers are temporarily held for a following purchase. */
182
182
  export interface PhoneNumberSearchRequest {
183
- /** The type of phone numbers to search for, e.g. geographic, or tollFree. */
183
+ /** The type of phone numbers to search for, e.g. geographic, tollFree, mobile. */
184
184
  phoneNumberType: PhoneNumberType;
185
185
  /** The assignment type of the phone numbers to search for. A phone number can be assigned to a person, or to an application. */
186
186
  assignmentType: PhoneNumberAssignmentType;
@@ -197,7 +197,7 @@ export interface PhoneNumberSearchResult {
197
197
  searchId: string;
198
198
  /** The phone numbers that are available. Can be fewer than the desired search quantity. */
199
199
  phoneNumbers: string[];
200
- /** The phone number's type, e.g. geographic, or tollFree. */
200
+ /** The phone number's type, e.g. geographic, tollFree, mobile. */
201
201
  phoneNumberType: PhoneNumberType;
202
202
  /** Phone number's assignment type. */
203
203
  assignmentType: PhoneNumberAssignmentType;
@@ -255,7 +255,7 @@ export interface PurchasedPhoneNumber {
255
255
  phoneNumber: string;
256
256
  /** The ISO 3166-2 code of the phone number's country, e.g. US. */
257
257
  countryCode: string;
258
- /** The phone number's type, e.g. geographic, tollFree. */
258
+ /** The phone number's type, e.g. geographic, tollFree, mobile. */
259
259
  phoneNumberType: PhoneNumberType;
260
260
  /** Capabilities of a phone number. */
261
261
  capabilities: PhoneNumberCapabilities;
@@ -379,7 +379,7 @@ export interface PhoneNumbersReleasePhoneNumberHeaders {
379
379
  releaseId?: string;
380
380
  }
381
381
  /** Defines values for PhoneNumberType. */
382
- export type PhoneNumberType = "geographic" | "tollFree";
382
+ export type PhoneNumberType = "geographic" | "tollFree" | "mobile";
383
383
  /** Defines values for PhoneNumberAssignmentType. */
384
384
  export type PhoneNumberAssignmentType = "person" | "application";
385
385
  /** Defines values for PhoneNumberCapabilityType. */
@@ -445,6 +445,8 @@ export interface PhoneNumbersListAvailableLocalitiesOptionalParams extends coreC
445
445
  administrativeDivision?: string;
446
446
  /** The locale to display in the localized fields in the response. e.g. 'en-US' */
447
447
  acceptLanguage?: string;
448
+ /** Filter by numberType, e.g. Geographic, TollFree, Mobile. */
449
+ phoneNumberType?: PhoneNumberType;
448
450
  }
449
451
  /** Contains response data for the listAvailableLocalities operation. */
450
452
  export type PhoneNumbersListAvailableLocalitiesResponse = PhoneNumberLocalities;
@@ -458,7 +460,7 @@ export interface PhoneNumbersListOfferingsOptionalParams extends coreClient.Oper
458
460
  assignmentType?: PhoneNumberAssignmentType;
459
461
  /** The locale to display in the localized fields in the response. e.g. 'en-US' */
460
462
  acceptLanguage?: string;
461
- /** Filter by numberType, e.g. Geographic, TollFree. */
463
+ /** Filter by numberType, e.g. Geographic, TollFree, Mobile. */
462
464
  phoneNumberType?: PhoneNumberType;
463
465
  }
464
466
  /** Contains response data for the listOfferings operation. */