@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.
- package/README.md +5 -5
- package/dist/browser/generated/src/models/index.d.ts +7 -5
- package/dist/browser/generated/src/models/index.d.ts.map +1 -1
- package/dist/browser/generated/src/models/index.js.map +1 -1
- package/dist/browser/generated/src/models/parameters.js +3 -3
- package/dist/browser/generated/src/models/parameters.js.map +1 -1
- package/dist/browser/generated/src/operations/phoneNumbers.d.ts +4 -4
- package/dist/browser/generated/src/operations/phoneNumbers.js +5 -4
- package/dist/browser/generated/src/operations/phoneNumbers.js.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/phoneNumbers.d.ts +3 -3
- package/dist/browser/generated/src/operationsInterfaces/phoneNumbers.js.map +1 -1
- package/dist/browser/generated/src/phoneNumbersClient.js +2 -2
- package/dist/browser/generated/src/phoneNumbersClient.js.map +1 -1
- package/dist/browser/generated/src/siprouting/sipRoutingClientContext.js +1 -1
- package/dist/browser/generated/src/siprouting/sipRoutingClientContext.js.map +1 -1
- package/dist/browser/generated/src/tracing.js +1 -1
- package/dist/browser/generated/src/tracing.js.map +1 -1
- package/dist/browser/models.d.ts +6 -0
- package/dist/browser/models.d.ts.map +1 -1
- package/dist/browser/models.js.map +1 -1
- package/dist/browser/phoneNumbersClient.d.ts +21 -1
- package/dist/browser/phoneNumbersClient.d.ts.map +1 -1
- package/dist/browser/phoneNumbersClient.js +35 -0
- package/dist/browser/phoneNumbersClient.js.map +1 -1
- package/dist/browser/utils/constants.d.ts.map +1 -1
- package/dist/browser/utils/constants.js +1 -1
- package/dist/browser/utils/constants.js.map +1 -1
- package/dist/commonjs/generated/src/models/index.d.ts +7 -5
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/index.js.map +1 -1
- package/dist/commonjs/generated/src/models/parameters.js +3 -3
- package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
- package/dist/commonjs/generated/src/operations/phoneNumbers.d.ts +4 -4
- package/dist/commonjs/generated/src/operations/phoneNumbers.js +5 -4
- package/dist/commonjs/generated/src/operations/phoneNumbers.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/phoneNumbers.d.ts +3 -3
- package/dist/commonjs/generated/src/operationsInterfaces/phoneNumbers.js.map +1 -1
- package/dist/commonjs/generated/src/phoneNumbersClient.js +2 -2
- package/dist/commonjs/generated/src/phoneNumbersClient.js.map +1 -1
- package/dist/commonjs/generated/src/siprouting/sipRoutingClientContext.js +1 -1
- package/dist/commonjs/generated/src/siprouting/sipRoutingClientContext.js.map +1 -1
- package/dist/commonjs/generated/src/tracing.js +1 -1
- package/dist/commonjs/generated/src/tracing.js.map +1 -1
- package/dist/commonjs/models.d.ts +6 -0
- package/dist/commonjs/models.d.ts.map +1 -1
- package/dist/commonjs/models.js.map +1 -1
- package/dist/commonjs/phoneNumbersClient.d.ts +21 -1
- package/dist/commonjs/phoneNumbersClient.d.ts.map +1 -1
- package/dist/commonjs/phoneNumbersClient.js +35 -0
- package/dist/commonjs/phoneNumbersClient.js.map +1 -1
- package/dist/commonjs/utils/constants.d.ts.map +1 -1
- package/dist/commonjs/utils/constants.js +1 -1
- package/dist/commonjs/utils/constants.js.map +1 -1
- package/dist/esm/generated/src/models/index.d.ts +7 -5
- package/dist/esm/generated/src/models/index.d.ts.map +1 -1
- package/dist/esm/generated/src/models/index.js.map +1 -1
- package/dist/esm/generated/src/models/parameters.js +3 -3
- package/dist/esm/generated/src/models/parameters.js.map +1 -1
- package/dist/esm/generated/src/operations/phoneNumbers.d.ts +4 -4
- package/dist/esm/generated/src/operations/phoneNumbers.js +5 -4
- package/dist/esm/generated/src/operations/phoneNumbers.js.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/phoneNumbers.d.ts +3 -3
- package/dist/esm/generated/src/operationsInterfaces/phoneNumbers.js.map +1 -1
- package/dist/esm/generated/src/phoneNumbersClient.js +2 -2
- package/dist/esm/generated/src/phoneNumbersClient.js.map +1 -1
- package/dist/esm/generated/src/siprouting/sipRoutingClientContext.js +1 -1
- package/dist/esm/generated/src/siprouting/sipRoutingClientContext.js.map +1 -1
- package/dist/esm/generated/src/tracing.js +1 -1
- package/dist/esm/generated/src/tracing.js.map +1 -1
- package/dist/esm/models.d.ts +6 -0
- package/dist/esm/models.d.ts.map +1 -1
- package/dist/esm/models.js.map +1 -1
- package/dist/esm/phoneNumbersClient.d.ts +21 -1
- package/dist/esm/phoneNumbersClient.d.ts.map +1 -1
- package/dist/esm/phoneNumbersClient.js +35 -0
- package/dist/esm/phoneNumbersClient.js.map +1 -1
- package/dist/esm/utils/constants.d.ts.map +1 -1
- package/dist/esm/utils/constants.js +1 -1
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/react-native/generated/src/models/index.d.ts +7 -5
- package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/index.js.map +1 -1
- package/dist/react-native/generated/src/models/parameters.js +3 -3
- package/dist/react-native/generated/src/models/parameters.js.map +1 -1
- package/dist/react-native/generated/src/operations/phoneNumbers.d.ts +4 -4
- package/dist/react-native/generated/src/operations/phoneNumbers.js +5 -4
- package/dist/react-native/generated/src/operations/phoneNumbers.js.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/phoneNumbers.d.ts +3 -3
- package/dist/react-native/generated/src/operationsInterfaces/phoneNumbers.js.map +1 -1
- package/dist/react-native/generated/src/phoneNumbersClient.js +2 -2
- package/dist/react-native/generated/src/phoneNumbersClient.js.map +1 -1
- package/dist/react-native/generated/src/siprouting/sipRoutingClientContext.js +1 -1
- package/dist/react-native/generated/src/siprouting/sipRoutingClientContext.js.map +1 -1
- package/dist/react-native/generated/src/tracing.js +1 -1
- package/dist/react-native/generated/src/tracing.js.map +1 -1
- package/dist/react-native/models.d.ts +6 -0
- package/dist/react-native/models.d.ts.map +1 -1
- package/dist/react-native/models.js.map +1 -1
- package/dist/react-native/phoneNumbersClient.d.ts +21 -1
- package/dist/react-native/phoneNumbersClient.d.ts.map +1 -1
- package/dist/react-native/phoneNumbersClient.js +35 -0
- package/dist/react-native/phoneNumbersClient.js.map +1 -1
- package/dist/react-native/utils/constants.d.ts.map +1 -1
- package/dist/react-native/utils/constants.js +1 -1
- package/dist/react-native/utils/constants.js.map +1 -1
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ export class PhoneNumbersClient extends coreClient.ServiceClient {
|
|
|
25
25
|
const defaults = {
|
|
26
26
|
requestContentType: "application/json; charset=utf-8",
|
|
27
27
|
};
|
|
28
|
-
const packageDetails = `azsdk-js-communication-phone-numbers/1.
|
|
28
|
+
const packageDetails = `azsdk-js-communication-phone-numbers/1.5.0-beta.1`;
|
|
29
29
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
30
30
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
31
31
|
: `${packageDetails}`;
|
|
@@ -36,7 +36,7 @@ export class PhoneNumbersClient extends coreClient.ServiceClient {
|
|
|
36
36
|
// Parameter assignments
|
|
37
37
|
this.endpoint = endpoint;
|
|
38
38
|
// Assigning values to Constant parameters
|
|
39
|
-
this.apiVersion = options.apiVersion || "2025-
|
|
39
|
+
this.apiVersion = options.apiVersion || "2025-06-01";
|
|
40
40
|
this.phoneNumbers = new PhoneNumbersImpl(this);
|
|
41
41
|
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
42
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phoneNumbersClient.js","sourceRoot":"","sources":["../../../../src/generated/src/phoneNumbersClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,MAAM,OAAO,kBAAmB,SAAQ,UAAU,CAAC,aAAa;IAI9D;;;;OAIG;IACH,Y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AAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAGF","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"]}
|
|
@@ -23,7 +23,7 @@ export class SipRoutingClientContext extends coreClient.ServiceClient {
|
|
|
23
23
|
const defaults = {
|
|
24
24
|
requestContentType: "application/json; charset=utf-8"
|
|
25
25
|
};
|
|
26
|
-
const packageDetails = `azsdk-js-communication-phone-numbers/1.
|
|
26
|
+
const packageDetails = `azsdk-js-communication-phone-numbers/1.5.0-beta.1`;
|
|
27
27
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
28
28
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
29
29
|
: `${packageDetails}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sipRoutingClientContext.js","sourceRoot":"","sources":["../../../../../src/generated/src/siprouting/sipRoutingClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,MAAM,OAAO,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,
|
|
1
|
+
{"version":3,"file":"sipRoutingClientContext.js","sourceRoot":"","sources":["../../../../../src/generated/src/siprouting/sipRoutingClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,MAAM,OAAO,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","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"]}
|
|
@@ -9,6 +9,6 @@ import { createTracingClient } from "@azure/core-tracing";
|
|
|
9
9
|
export const tracingClient = createTracingClient({
|
|
10
10
|
namespace: "Microsoft.Communication",
|
|
11
11
|
packageName: "@azure/communication-phone-numbers",
|
|
12
|
-
packageVersion: "1.
|
|
12
|
+
packageVersion: "1.5.0-beta.1",
|
|
13
13
|
});
|
|
14
14
|
//# sourceMappingURL=tracing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;IAC/C,SAAS,EAAE,yBAAyB;IACpC,WAAW,EAAE,oCAAoC;IACjD,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;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,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EACV,oBAAoB,EACpB,yBAAyB,EACzB,8BAA8B,EAC9B,wBAAwB,EACxB,uCAAuC,EACvC,sCAAsC,EACtC,eAAe,EAChB,MAAM,iCAAiC,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,0BAA0B;CAAG;AAE9C;;GAEG;AACH,MAAM,WAAW,wBAAwB;CAAG;AAE5C;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,gCAAiC,SAAQ,gBAAgB;CAAG;AAE7E;;;GAGG;AACH,MAAM,WAAW,kCAAmC,SAAQ,wBAAwB;IAClF;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,kDAAkD;IAClD,eAAe,EAAE,eAAe,CAAC;IACjC,qFAAqF;IACrF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;CAAG;AAE1E;;GAEG;AACH,MAAM,WAAW,4BACf,SAAQ,IAAI,CACV,uCAAuC,EACvC,gBAAgB,GAAG,UAAU,GAAG,wBAAwB,CACzD;CAAG;AAEN;;GAEG;AACH,MAAM,WAAW,8BAA+B,SAAQ,uCAAuC;CAAG;AAEl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AO,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,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
571
|
}
|
|
572
572
|
}
|
|
573
|
+
/**
|
|
574
|
+
* Iterates the available Mobile area codes.
|
|
575
|
+
*
|
|
576
|
+
* Example usage:
|
|
577
|
+
* ```ts snippet:PhoneNumbersClientListMobileAreaCodes
|
|
578
|
+
* import { DefaultAzureCredential } from "@azure/identity";
|
|
579
|
+
* import { PhoneNumbersClient } from "@azure/communication-phone-numbers";
|
|
580
|
+
*
|
|
581
|
+
* const credential = new DefaultAzureCredential();
|
|
582
|
+
* const client = new PhoneNumbersClient("<endpoint-from-resource>", credential);
|
|
583
|
+
*
|
|
584
|
+
* for await (const areaCodeItem of client.listAvailableMobileAreaCodes("IE")) {
|
|
585
|
+
* console.log("area code: ", areaCodeItem.areaCode);
|
|
586
|
+
* }
|
|
587
|
+
* ```
|
|
588
|
+
* List all available Geographic area codes.
|
|
589
|
+
* @param countryCode - The ISO 3166-2 country code.
|
|
590
|
+
* @param options - The optional parameters.
|
|
591
|
+
*/
|
|
592
|
+
listAvailableMobileAreaCodes(countryCode, options = {}) {
|
|
593
|
+
const { span, updatedOptions } = tracingClient.startSpan("PhoneNumbersClient-listAvailableMobileAreaCodes", options);
|
|
594
|
+
try {
|
|
595
|
+
return this.client.phoneNumbers.listAreaCodes(countryCode, "mobile", Object.assign({}, updatedOptions));
|
|
596
|
+
}
|
|
597
|
+
catch (e) {
|
|
598
|
+
span.setStatus({
|
|
599
|
+
status: "error",
|
|
600
|
+
error: e,
|
|
601
|
+
});
|
|
602
|
+
throw e;
|
|
603
|
+
}
|
|
604
|
+
finally {
|
|
605
|
+
span.end();
|
|
606
|
+
}
|
|
607
|
+
}
|
|
573
608
|
/**
|
|
574
609
|
* Iterates the available localities.
|
|
575
610
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phoneNumbersClient.js","sourceRoot":"","sources":["../../src/phoneNumbersClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,4CAA4C;;AAE5C,uDAAuD;AACv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C,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","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,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAIrD,OAAO,EAAE,kBAAkB,IAAI,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AA0C7F,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AAEnF,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAY3D,MAAM,2BAA2B,GAAG,CAAC,OAAY,EAAwC,EAAE,CACzF,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAoC7B,YACE,qBAA6B,EAC7B,mBAAiF,EACjF,eAA0C,EAAE;QAE5C,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;QAC7F,MAAM,OAAO,GAAG,2BAA2B,CAAC,mBAAmB,CAAC;YAC9D,CAAC,CAAC,mBAAmB;YACrB,CAAC,CAAC,YAAY,CAAC;QAEjB,MAAM,uBAAuB,mCACxB,OAAO,GACP;YACD,cAAc,EAAE;gBACd,MAAM,EAAE,MAAM,CAAC,IAAI;aACpB;SACF,CACF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AClC,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","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,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,EAAE,MAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,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"]}
|
package/package.json
CHANGED