@azure/communication-phone-numbers 1.3.0-alpha.20241122.8 → 1.3.0-alpha.20241205.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/generated/src/index.d.ts +5 -0
- package/dist/browser/generated/src/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/index.js +4 -4
- package/dist/browser/generated/src/index.js.map +1 -0
- package/dist/browser/generated/src/lroImpl.d.ts +11 -0
- package/dist/browser/generated/src/lroImpl.d.ts.map +1 -0
- package/dist/browser/generated/src/models/index.d.ts +480 -0
- package/dist/browser/generated/src/models/index.d.ts.map +1 -0
- package/dist/browser/generated/src/models/mappers.d.ts +32 -0
- package/dist/browser/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/browser/generated/src/models/parameters.d.ts +31 -0
- package/dist/browser/generated/src/models/parameters.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/models/parameters.js +1 -1
- package/dist/browser/generated/src/models/parameters.js.map +1 -0
- package/dist/browser/generated/src/operations/index.d.ts +2 -0
- package/dist/browser/generated/src/operations/index.d.ts.map +1 -0
- package/dist/browser/generated/src/operations/index.js +9 -0
- package/{dist-esm/src → dist/browser}/generated/src/operations/index.js.map +1 -1
- package/dist/browser/generated/src/operations/phoneNumbers.d.ts +204 -0
- package/dist/browser/generated/src/operations/phoneNumbers.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/operations/phoneNumbers.js +5 -5
- package/dist/browser/generated/src/operations/phoneNumbers.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts +2 -0
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/index.js +9 -0
- package/{dist-esm/src → dist/browser}/generated/src/operationsInterfaces/index.js.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/phoneNumbers.d.ts +123 -0
- package/dist/browser/generated/src/operationsInterfaces/phoneNumbers.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/phoneNumbers.js.map +1 -0
- package/dist/browser/generated/src/pagingHelper.d.ts +13 -0
- package/dist/browser/generated/src/pagingHelper.d.ts.map +1 -0
- package/dist/browser/generated/src/phoneNumbersClient.d.ts +17 -0
- package/dist/browser/generated/src/phoneNumbersClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/phoneNumbersClient.js +1 -1
- package/dist/browser/generated/src/phoneNumbersClient.js.map +1 -0
- package/dist/browser/generated/src/siprouting/index.d.ts +5 -0
- package/dist/browser/generated/src/siprouting/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/siprouting/index.js +4 -4
- package/dist/browser/generated/src/siprouting/index.js.map +1 -0
- package/dist/browser/generated/src/siprouting/models/index.d.ts +119 -0
- package/dist/browser/generated/src/siprouting/models/index.d.ts.map +1 -0
- package/dist/browser/generated/src/siprouting/models/mappers.d.ts +11 -0
- package/dist/browser/generated/src/siprouting/models/mappers.d.ts.map +1 -0
- package/dist/browser/generated/src/siprouting/models/parameters.d.ts +8 -0
- package/dist/browser/generated/src/siprouting/models/parameters.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/siprouting/models/parameters.js +1 -1
- package/{dist-esm/src → dist/browser}/generated/src/siprouting/models/parameters.js.map +1 -1
- package/dist/browser/generated/src/siprouting/operations/index.d.ts +2 -0
- package/dist/browser/generated/src/siprouting/operations/index.d.ts.map +1 -0
- package/{dist-esm/src/generated/src → dist/browser/generated/src/siprouting}/operations/index.js +1 -1
- package/dist/browser/generated/src/siprouting/operations/index.js.map +1 -0
- package/dist/browser/generated/src/siprouting/operations/sipRouting.d.ts +23 -0
- package/dist/browser/generated/src/siprouting/operations/sipRouting.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/siprouting/operations/sipRouting.js +2 -2
- package/dist/browser/generated/src/siprouting/operations/sipRouting.js.map +1 -0
- package/dist/browser/generated/src/siprouting/operationsInterfaces/index.d.ts +2 -0
- package/dist/browser/generated/src/siprouting/operationsInterfaces/index.d.ts.map +1 -0
- package/{dist-esm/src/generated/src → dist/browser/generated/src/siprouting}/operationsInterfaces/index.js +1 -1
- package/dist/browser/generated/src/siprouting/operationsInterfaces/index.js.map +1 -0
- package/dist/browser/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts +15 -0
- package/dist/browser/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/siprouting/operationsInterfaces/sipRouting.js.map +1 -1
- package/dist/browser/generated/src/siprouting/sipRoutingClient.d.ts +13 -0
- package/dist/browser/generated/src/siprouting/sipRoutingClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/siprouting/sipRoutingClient.js +2 -2
- package/dist/browser/generated/src/siprouting/sipRoutingClient.js.map +1 -0
- package/dist/browser/generated/src/siprouting/sipRoutingClientContext.d.ts +13 -0
- package/dist/browser/generated/src/siprouting/sipRoutingClientContext.d.ts.map +1 -0
- package/dist/browser/generated/src/siprouting/sipRoutingClientContext.js.map +1 -0
- package/dist/browser/generated/src/tracing.d.ts +2 -0
- package/dist/browser/generated/src/tracing.d.ts.map +1 -0
- package/dist/browser/index.d.ts +5 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +7 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/lroModels.d.ts +22 -0
- package/dist/browser/lroModels.d.ts.map +1 -0
- package/dist/browser/mappers.d.ts +17 -0
- package/dist/browser/mappers.d.ts.map +1 -0
- package/dist/browser/mappers.js.map +1 -0
- package/dist/browser/models.d.ts +91 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/models.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/phoneNumbersClient.d.ts +244 -0
- package/dist/browser/phoneNumbersClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/phoneNumbersClient.js +4 -4
- package/dist/browser/phoneNumbersClient.js.map +1 -0
- package/dist/browser/sipRoutingClient.d.ts +88 -0
- package/dist/browser/sipRoutingClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/sipRoutingClient.js +5 -5
- package/dist/browser/sipRoutingClient.js.map +1 -0
- package/dist/browser/utils/constants.d.ts +2 -0
- package/dist/browser/utils/constants.d.ts.map +1 -0
- package/dist/browser/utils/customPipelinePolicies.d.ts +11 -0
- package/dist/browser/utils/customPipelinePolicies.d.ts.map +1 -0
- package/dist/browser/utils/index.d.ts +3 -0
- package/dist/browser/utils/index.d.ts.map +1 -0
- package/dist/browser/utils/index.js +5 -0
- package/dist/browser/utils/index.js.map +1 -0
- package/dist/browser/utils/logger.d.ts +5 -0
- package/dist/browser/utils/logger.d.ts.map +1 -0
- package/dist/commonjs/generated/src/index.d.ts +5 -0
- package/dist/commonjs/generated/src/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/index.js +19 -0
- package/dist/commonjs/generated/src/index.js.map +1 -0
- package/dist/commonjs/generated/src/lroImpl.d.ts +11 -0
- package/dist/commonjs/generated/src/lroImpl.d.ts.map +1 -0
- package/dist/commonjs/generated/src/lroImpl.js +24 -0
- package/dist/commonjs/generated/src/lroImpl.js.map +1 -0
- package/dist/commonjs/generated/src/models/index.d.ts +480 -0
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/index.js +10 -0
- package/dist/commonjs/generated/src/models/index.js.map +1 -0
- package/dist/commonjs/generated/src/models/mappers.d.ts +32 -0
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/mappers.js +911 -0
- package/dist/commonjs/generated/src/models/mappers.js.map +1 -0
- package/dist/commonjs/generated/src/models/parameters.d.ts +31 -0
- package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/parameters.js +246 -0
- package/dist/commonjs/generated/src/models/parameters.js.map +1 -0
- package/dist/commonjs/generated/src/operations/index.d.ts +2 -0
- package/dist/commonjs/generated/src/operations/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/index.js +12 -0
- package/dist/commonjs/generated/src/operations/index.js.map +1 -0
- package/dist/commonjs/generated/src/operations/phoneNumbers.d.ts +204 -0
- package/dist/commonjs/generated/src/operations/phoneNumbers.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/phoneNumbers.js +1122 -0
- package/dist/commonjs/generated/src/operations/phoneNumbers.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts +2 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.js +12 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/phoneNumbers.d.ts +123 -0
- package/dist/commonjs/generated/src/operationsInterfaces/phoneNumbers.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/phoneNumbers.js +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/phoneNumbers.js.map +1 -0
- package/dist/commonjs/generated/src/pagingHelper.d.ts +13 -0
- package/dist/commonjs/generated/src/pagingHelper.d.ts.map +1 -0
- package/dist/commonjs/generated/src/pagingHelper.js +36 -0
- package/dist/commonjs/generated/src/pagingHelper.js.map +1 -0
- package/dist/commonjs/generated/src/phoneNumbersClient.d.ts +17 -0
- package/dist/commonjs/generated/src/phoneNumbersClient.d.ts.map +1 -0
- package/dist/commonjs/generated/src/phoneNumbersClient.js +74 -0
- package/dist/commonjs/generated/src/phoneNumbersClient.js.map +1 -0
- package/dist/commonjs/generated/src/siprouting/index.d.ts +5 -0
- package/dist/commonjs/generated/src/siprouting/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/siprouting/index.js +18 -0
- package/dist/commonjs/generated/src/siprouting/index.js.map +1 -0
- package/dist/commonjs/generated/src/siprouting/models/index.d.ts +119 -0
- package/dist/commonjs/generated/src/siprouting/models/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/siprouting/models/index.js +10 -0
- package/dist/commonjs/generated/src/siprouting/models/index.js.map +1 -0
- package/dist/commonjs/generated/src/siprouting/models/mappers.d.ts +11 -0
- package/dist/commonjs/generated/src/siprouting/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/generated/src/siprouting/models/mappers.js +243 -0
- package/dist/commonjs/generated/src/siprouting/models/mappers.js.map +1 -0
- package/dist/commonjs/generated/src/siprouting/models/parameters.d.ts +8 -0
- package/dist/commonjs/generated/src/siprouting/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/generated/src/siprouting/models/parameters.js +64 -0
- package/dist/commonjs/generated/src/siprouting/models/parameters.js.map +1 -0
- package/dist/commonjs/generated/src/siprouting/operations/index.d.ts +2 -0
- package/dist/commonjs/generated/src/siprouting/operations/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/siprouting/operations/index.js +12 -0
- package/dist/commonjs/generated/src/siprouting/operations/index.js.map +1 -0
- package/dist/commonjs/generated/src/siprouting/operations/sipRouting.d.ts +23 -0
- package/dist/commonjs/generated/src/siprouting/operations/sipRouting.d.ts.map +1 -0
- package/dist/commonjs/generated/src/siprouting/operations/sipRouting.js +84 -0
- package/dist/commonjs/generated/src/siprouting/operations/sipRouting.js.map +1 -0
- package/dist/commonjs/generated/src/siprouting/operationsInterfaces/index.d.ts +2 -0
- package/dist/commonjs/generated/src/siprouting/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/siprouting/operationsInterfaces/index.js +12 -0
- package/dist/commonjs/generated/src/siprouting/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts +15 -0
- package/dist/commonjs/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts.map +1 -0
- package/dist/commonjs/generated/src/siprouting/operationsInterfaces/sipRouting.js +10 -0
- package/dist/commonjs/generated/src/siprouting/operationsInterfaces/sipRouting.js.map +1 -0
- package/dist/commonjs/generated/src/siprouting/sipRoutingClient.d.ts +13 -0
- package/dist/commonjs/generated/src/siprouting/sipRoutingClient.d.ts.map +1 -0
- package/dist/commonjs/generated/src/siprouting/sipRoutingClient.js +25 -0
- package/dist/commonjs/generated/src/siprouting/sipRoutingClient.js.map +1 -0
- package/dist/commonjs/generated/src/siprouting/sipRoutingClientContext.d.ts +13 -0
- package/dist/commonjs/generated/src/siprouting/sipRoutingClientContext.d.ts.map +1 -0
- package/dist/commonjs/generated/src/siprouting/sipRoutingClientContext.js +45 -0
- package/dist/commonjs/generated/src/siprouting/sipRoutingClientContext.js.map +1 -0
- package/dist/commonjs/generated/src/tracing.d.ts +2 -0
- package/dist/commonjs/generated/src/tracing.d.ts.map +1 -0
- package/dist/commonjs/generated/src/tracing.js +17 -0
- package/dist/commonjs/generated/src/tracing.js.map +1 -0
- package/dist/commonjs/index.d.ts +5 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +10 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/lroModels.d.ts +22 -0
- package/dist/commonjs/lroModels.d.ts.map +1 -0
- package/dist/commonjs/lroModels.js +5 -0
- package/dist/commonjs/lroModels.js.map +1 -0
- package/dist/commonjs/mappers.d.ts +17 -0
- package/dist/commonjs/mappers.d.ts.map +1 -0
- package/dist/commonjs/mappers.js +32 -0
- package/dist/commonjs/mappers.js.map +1 -0
- package/dist/commonjs/models.d.ts +91 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +5 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/phoneNumbersClient.d.ts +244 -0
- package/dist/commonjs/phoneNumbersClient.d.ts.map +1 -0
- package/dist/commonjs/phoneNumbersClient.js +361 -0
- package/dist/commonjs/phoneNumbersClient.js.map +1 -0
- package/dist/commonjs/sipRoutingClient.d.ts +88 -0
- package/dist/commonjs/sipRoutingClient.d.ts.map +1 -0
- package/dist/commonjs/sipRoutingClient.js +252 -0
- package/dist/commonjs/sipRoutingClient.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/commonjs/utils/constants.d.ts +2 -0
- package/dist/commonjs/utils/constants.d.ts.map +1 -0
- package/dist/commonjs/utils/constants.js +7 -0
- package/dist/commonjs/utils/constants.js.map +1 -0
- package/dist/commonjs/utils/customPipelinePolicies.d.ts +11 -0
- package/dist/commonjs/utils/customPipelinePolicies.d.ts.map +1 -0
- package/dist/commonjs/utils/customPipelinePolicies.js +30 -0
- package/dist/commonjs/utils/customPipelinePolicies.js.map +1 -0
- package/dist/commonjs/utils/index.d.ts +3 -0
- package/dist/commonjs/utils/index.d.ts.map +1 -0
- package/dist/commonjs/utils/index.js +8 -0
- package/dist/commonjs/utils/index.js.map +1 -0
- package/dist/commonjs/utils/logger.d.ts +5 -0
- package/dist/commonjs/utils/logger.d.ts.map +1 -0
- package/dist/commonjs/utils/logger.js +11 -0
- package/dist/commonjs/utils/logger.js.map +1 -0
- package/dist/esm/generated/src/index.d.ts +5 -0
- package/dist/esm/generated/src/index.d.ts.map +1 -0
- package/dist/esm/generated/src/index.js +13 -0
- package/dist/esm/generated/src/index.js.map +1 -0
- package/dist/esm/generated/src/lroImpl.d.ts +11 -0
- package/dist/esm/generated/src/lroImpl.d.ts.map +1 -0
- package/dist/esm/generated/src/lroImpl.js +21 -0
- package/dist/esm/generated/src/lroImpl.js.map +1 -0
- package/dist/esm/generated/src/models/index.d.ts +480 -0
- package/dist/esm/generated/src/models/index.d.ts.map +1 -0
- package/dist/esm/generated/src/models/index.js +9 -0
- package/dist/esm/generated/src/models/index.js.map +1 -0
- package/dist/esm/generated/src/models/mappers.d.ts +32 -0
- package/dist/esm/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/esm/generated/src/models/mappers.js +908 -0
- package/dist/esm/generated/src/models/mappers.js.map +1 -0
- package/dist/esm/generated/src/models/parameters.d.ts +31 -0
- package/dist/esm/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/esm/generated/src/models/parameters.js +243 -0
- package/dist/esm/generated/src/models/parameters.js.map +1 -0
- package/dist/esm/generated/src/operations/index.d.ts +2 -0
- package/dist/esm/generated/src/operations/index.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/index.js +9 -0
- package/dist/esm/generated/src/operations/index.js.map +1 -0
- package/dist/esm/generated/src/operations/phoneNumbers.d.ts +204 -0
- package/dist/esm/generated/src/operations/phoneNumbers.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/phoneNumbers.js +1118 -0
- package/dist/esm/generated/src/operations/phoneNumbers.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts +2 -0
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/index.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/phoneNumbers.d.ts +123 -0
- package/dist/esm/generated/src/operationsInterfaces/phoneNumbers.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/phoneNumbers.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/phoneNumbers.js.map +1 -0
- package/dist/esm/generated/src/pagingHelper.d.ts +13 -0
- package/dist/esm/generated/src/pagingHelper.d.ts.map +1 -0
- package/dist/esm/generated/src/pagingHelper.js +32 -0
- package/dist/esm/generated/src/pagingHelper.js.map +1 -0
- package/dist/esm/generated/src/phoneNumbersClient.d.ts +17 -0
- package/dist/esm/generated/src/phoneNumbersClient.d.ts.map +1 -0
- package/dist/esm/generated/src/phoneNumbersClient.js +69 -0
- package/dist/esm/generated/src/phoneNumbersClient.js.map +1 -0
- package/dist/esm/generated/src/siprouting/index.d.ts +5 -0
- package/dist/esm/generated/src/siprouting/index.d.ts.map +1 -0
- package/dist/esm/generated/src/siprouting/index.js +12 -0
- package/dist/esm/generated/src/siprouting/index.js.map +1 -0
- package/dist/esm/generated/src/siprouting/models/index.d.ts +119 -0
- package/dist/esm/generated/src/siprouting/models/index.d.ts.map +1 -0
- package/dist/esm/generated/src/siprouting/models/index.js +9 -0
- package/dist/esm/generated/src/siprouting/models/index.js.map +1 -0
- package/dist/esm/generated/src/siprouting/models/mappers.d.ts +11 -0
- package/dist/esm/generated/src/siprouting/models/mappers.d.ts.map +1 -0
- package/dist/esm/generated/src/siprouting/models/mappers.js +240 -0
- package/dist/esm/generated/src/siprouting/models/mappers.js.map +1 -0
- package/dist/esm/generated/src/siprouting/models/parameters.d.ts +8 -0
- package/dist/esm/generated/src/siprouting/models/parameters.d.ts.map +1 -0
- package/dist/esm/generated/src/siprouting/models/parameters.js +61 -0
- package/dist/esm/generated/src/siprouting/models/parameters.js.map +1 -0
- package/dist/esm/generated/src/siprouting/operations/index.d.ts +2 -0
- package/dist/esm/generated/src/siprouting/operations/index.d.ts.map +1 -0
- package/dist/esm/generated/src/siprouting/operations/index.js +9 -0
- package/dist/esm/generated/src/siprouting/operations/index.js.map +1 -0
- package/dist/esm/generated/src/siprouting/operations/sipRouting.d.ts +23 -0
- package/dist/esm/generated/src/siprouting/operations/sipRouting.d.ts.map +1 -0
- package/dist/esm/generated/src/siprouting/operations/sipRouting.js +79 -0
- package/dist/esm/generated/src/siprouting/operations/sipRouting.js.map +1 -0
- package/dist/esm/generated/src/siprouting/operationsInterfaces/index.d.ts +2 -0
- package/dist/esm/generated/src/siprouting/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/generated/src/siprouting/operationsInterfaces/index.js +9 -0
- package/dist/esm/generated/src/siprouting/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts +15 -0
- package/dist/esm/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts.map +1 -0
- package/dist/esm/generated/src/siprouting/operationsInterfaces/sipRouting.js +9 -0
- package/dist/esm/generated/src/siprouting/operationsInterfaces/sipRouting.js.map +1 -0
- package/dist/esm/generated/src/siprouting/sipRoutingClient.d.ts +13 -0
- package/dist/esm/generated/src/siprouting/sipRoutingClient.d.ts.map +1 -0
- package/dist/esm/generated/src/siprouting/sipRoutingClient.js +21 -0
- package/dist/esm/generated/src/siprouting/sipRoutingClient.js.map +1 -0
- package/dist/esm/generated/src/siprouting/sipRoutingClientContext.d.ts +13 -0
- package/dist/esm/generated/src/siprouting/sipRoutingClientContext.d.ts.map +1 -0
- package/dist/esm/generated/src/siprouting/sipRoutingClientContext.js +40 -0
- package/dist/esm/generated/src/siprouting/sipRoutingClientContext.js.map +1 -0
- package/dist/esm/generated/src/tracing.d.ts +2 -0
- package/dist/esm/generated/src/tracing.d.ts.map +1 -0
- package/dist/esm/generated/src/tracing.js +14 -0
- package/dist/esm/generated/src/tracing.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lroModels.d.ts +22 -0
- package/dist/esm/lroModels.d.ts.map +1 -0
- package/dist/esm/lroModels.js +4 -0
- package/dist/esm/lroModels.js.map +1 -0
- package/dist/esm/mappers.d.ts +17 -0
- package/dist/esm/mappers.d.ts.map +1 -0
- package/dist/esm/mappers.js +28 -0
- package/dist/esm/mappers.js.map +1 -0
- package/dist/esm/models.d.ts +91 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +4 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/phoneNumbersClient.d.ts +244 -0
- package/dist/esm/phoneNumbersClient.d.ts.map +1 -0
- package/dist/esm/phoneNumbersClient.js +357 -0
- package/dist/esm/phoneNumbersClient.js.map +1 -0
- package/dist/esm/sipRoutingClient.d.ts +88 -0
- package/dist/esm/sipRoutingClient.d.ts.map +1 -0
- package/dist/esm/sipRoutingClient.js +248 -0
- package/dist/esm/sipRoutingClient.js.map +1 -0
- package/dist/esm/utils/constants.d.ts +2 -0
- package/dist/esm/utils/constants.d.ts.map +1 -0
- package/dist/esm/utils/constants.js +4 -0
- package/dist/esm/utils/constants.js.map +1 -0
- package/dist/esm/utils/customPipelinePolicies.d.ts +11 -0
- package/dist/esm/utils/customPipelinePolicies.d.ts.map +1 -0
- package/dist/esm/utils/customPipelinePolicies.js +27 -0
- package/dist/esm/utils/customPipelinePolicies.js.map +1 -0
- package/dist/esm/utils/index.d.ts +3 -0
- package/dist/esm/utils/index.d.ts.map +1 -0
- package/dist/esm/utils/index.js +5 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/esm/utils/logger.d.ts +5 -0
- package/dist/esm/utils/logger.d.ts.map +1 -0
- package/dist/esm/utils/logger.js +8 -0
- package/dist/esm/utils/logger.js.map +1 -0
- package/dist/react-native/generated/src/index.d.ts +5 -0
- package/dist/react-native/generated/src/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/index.js +13 -0
- package/dist/react-native/generated/src/index.js.map +1 -0
- package/dist/react-native/generated/src/lroImpl.d.ts +11 -0
- package/dist/react-native/generated/src/lroImpl.d.ts.map +1 -0
- package/dist/react-native/generated/src/lroImpl.js +21 -0
- package/dist/react-native/generated/src/lroImpl.js.map +1 -0
- package/dist/react-native/generated/src/models/index.d.ts +480 -0
- package/dist/react-native/generated/src/models/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/index.js +9 -0
- package/dist/react-native/generated/src/models/index.js.map +1 -0
- package/dist/react-native/generated/src/models/mappers.d.ts +32 -0
- package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/mappers.js +908 -0
- package/dist/react-native/generated/src/models/mappers.js.map +1 -0
- package/dist/react-native/generated/src/models/parameters.d.ts +31 -0
- package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/parameters.js +243 -0
- package/dist/react-native/generated/src/models/parameters.js.map +1 -0
- package/dist/react-native/generated/src/operations/index.d.ts +2 -0
- package/dist/react-native/generated/src/operations/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/index.js +9 -0
- package/dist/react-native/generated/src/operations/index.js.map +1 -0
- package/dist/react-native/generated/src/operations/phoneNumbers.d.ts +204 -0
- package/dist/react-native/generated/src/operations/phoneNumbers.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/phoneNumbers.js +1118 -0
- package/dist/react-native/generated/src/operations/phoneNumbers.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +2 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/phoneNumbers.d.ts +123 -0
- package/dist/react-native/generated/src/operationsInterfaces/phoneNumbers.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/phoneNumbers.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/phoneNumbers.js.map +1 -0
- package/dist/react-native/generated/src/pagingHelper.d.ts +13 -0
- package/dist/react-native/generated/src/pagingHelper.d.ts.map +1 -0
- package/dist/react-native/generated/src/pagingHelper.js +32 -0
- package/dist/react-native/generated/src/pagingHelper.js.map +1 -0
- package/dist/react-native/generated/src/phoneNumbersClient.d.ts +17 -0
- package/dist/react-native/generated/src/phoneNumbersClient.d.ts.map +1 -0
- package/dist/react-native/generated/src/phoneNumbersClient.js +69 -0
- package/dist/react-native/generated/src/phoneNumbersClient.js.map +1 -0
- package/dist/react-native/generated/src/siprouting/index.d.ts +5 -0
- package/dist/react-native/generated/src/siprouting/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/siprouting/index.js +12 -0
- package/dist/react-native/generated/src/siprouting/index.js.map +1 -0
- package/dist/react-native/generated/src/siprouting/models/index.d.ts +119 -0
- package/dist/react-native/generated/src/siprouting/models/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/siprouting/models/index.js +9 -0
- package/dist/react-native/generated/src/siprouting/models/index.js.map +1 -0
- package/dist/react-native/generated/src/siprouting/models/mappers.d.ts +11 -0
- package/dist/react-native/generated/src/siprouting/models/mappers.d.ts.map +1 -0
- package/dist/react-native/generated/src/siprouting/models/mappers.js +240 -0
- package/dist/react-native/generated/src/siprouting/models/mappers.js.map +1 -0
- package/dist/react-native/generated/src/siprouting/models/parameters.d.ts +8 -0
- package/dist/react-native/generated/src/siprouting/models/parameters.d.ts.map +1 -0
- package/dist/react-native/generated/src/siprouting/models/parameters.js +61 -0
- package/dist/react-native/generated/src/siprouting/models/parameters.js.map +1 -0
- package/dist/react-native/generated/src/siprouting/operations/index.d.ts +2 -0
- package/dist/react-native/generated/src/siprouting/operations/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/siprouting/operations/index.js +9 -0
- package/dist/react-native/generated/src/siprouting/operations/index.js.map +1 -0
- package/dist/react-native/generated/src/siprouting/operations/sipRouting.d.ts +23 -0
- package/dist/react-native/generated/src/siprouting/operations/sipRouting.d.ts.map +1 -0
- package/dist/react-native/generated/src/siprouting/operations/sipRouting.js +79 -0
- package/dist/react-native/generated/src/siprouting/operations/sipRouting.js.map +1 -0
- package/dist/react-native/generated/src/siprouting/operationsInterfaces/index.d.ts +2 -0
- package/dist/react-native/generated/src/siprouting/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/siprouting/operationsInterfaces/index.js +9 -0
- package/dist/react-native/generated/src/siprouting/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts +15 -0
- package/dist/react-native/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts.map +1 -0
- package/dist/react-native/generated/src/siprouting/operationsInterfaces/sipRouting.js +9 -0
- package/dist/react-native/generated/src/siprouting/operationsInterfaces/sipRouting.js.map +1 -0
- package/dist/react-native/generated/src/siprouting/sipRoutingClient.d.ts +13 -0
- package/dist/react-native/generated/src/siprouting/sipRoutingClient.d.ts.map +1 -0
- package/dist/react-native/generated/src/siprouting/sipRoutingClient.js +21 -0
- package/dist/react-native/generated/src/siprouting/sipRoutingClient.js.map +1 -0
- package/dist/react-native/generated/src/siprouting/sipRoutingClientContext.d.ts +13 -0
- package/dist/react-native/generated/src/siprouting/sipRoutingClientContext.d.ts.map +1 -0
- package/dist/react-native/generated/src/siprouting/sipRoutingClientContext.js +40 -0
- package/dist/react-native/generated/src/siprouting/sipRoutingClientContext.js.map +1 -0
- package/dist/react-native/generated/src/tracing.d.ts +2 -0
- package/dist/react-native/generated/src/tracing.d.ts.map +1 -0
- package/dist/react-native/generated/src/tracing.js +14 -0
- package/dist/react-native/generated/src/tracing.js.map +1 -0
- package/dist/react-native/index.d.ts +5 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +7 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/lroModels.d.ts +22 -0
- package/dist/react-native/lroModels.d.ts.map +1 -0
- package/dist/react-native/lroModels.js +4 -0
- package/dist/react-native/lroModels.js.map +1 -0
- package/dist/react-native/mappers.d.ts +17 -0
- package/dist/react-native/mappers.d.ts.map +1 -0
- package/dist/react-native/mappers.js +28 -0
- package/dist/react-native/mappers.js.map +1 -0
- package/dist/react-native/models.d.ts +91 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.js +4 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/phoneNumbersClient.d.ts +244 -0
- package/dist/react-native/phoneNumbersClient.d.ts.map +1 -0
- package/dist/react-native/phoneNumbersClient.js +357 -0
- package/dist/react-native/phoneNumbersClient.js.map +1 -0
- package/dist/react-native/sipRoutingClient.d.ts +88 -0
- package/dist/react-native/sipRoutingClient.d.ts.map +1 -0
- package/dist/react-native/sipRoutingClient.js +248 -0
- package/dist/react-native/sipRoutingClient.js.map +1 -0
- package/dist/react-native/utils/constants.d.ts +2 -0
- package/dist/react-native/utils/constants.d.ts.map +1 -0
- package/dist/react-native/utils/constants.js +4 -0
- package/dist/react-native/utils/constants.js.map +1 -0
- package/dist/react-native/utils/customPipelinePolicies.d.ts +11 -0
- package/dist/react-native/utils/customPipelinePolicies.d.ts.map +1 -0
- package/dist/react-native/utils/customPipelinePolicies.js +27 -0
- package/dist/react-native/utils/customPipelinePolicies.js.map +1 -0
- package/dist/react-native/utils/index.d.ts +3 -0
- package/dist/react-native/utils/index.d.ts.map +1 -0
- package/dist/react-native/utils/index.js +5 -0
- package/dist/react-native/utils/index.js.map +1 -0
- package/dist/react-native/utils/logger.d.ts +5 -0
- package/dist/react-native/utils/logger.d.ts.map +1 -0
- package/dist/react-native/utils/logger.js +8 -0
- package/dist/react-native/utils/logger.js.map +1 -0
- package/package.json +59 -37
- package/dist/index.js +0 -3495
- package/dist/index.js.map +0 -1
- package/dist-esm/src/generated/src/index.js.map +0 -1
- package/dist-esm/src/generated/src/models/parameters.js.map +0 -1
- package/dist-esm/src/generated/src/operations/phoneNumbers.js.map +0 -1
- package/dist-esm/src/generated/src/operationsInterfaces/phoneNumbers.js.map +0 -1
- package/dist-esm/src/generated/src/phoneNumbersClient.js.map +0 -1
- package/dist-esm/src/generated/src/siprouting/index.js.map +0 -1
- package/dist-esm/src/generated/src/siprouting/operations/index.js +0 -9
- package/dist-esm/src/generated/src/siprouting/operations/index.js.map +0 -1
- package/dist-esm/src/generated/src/siprouting/operations/sipRouting.js.map +0 -1
- package/dist-esm/src/generated/src/siprouting/operationsInterfaces/index.js +0 -9
- package/dist-esm/src/generated/src/siprouting/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/src/generated/src/siprouting/sipRoutingClient.js.map +0 -1
- package/dist-esm/src/generated/src/siprouting/sipRoutingClientContext.js.map +0 -1
- package/dist-esm/src/index.js +0 -7
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/mappers.js.map +0 -1
- package/dist-esm/src/models.js.map +0 -1
- package/dist-esm/src/phoneNumbersClient.js.map +0 -1
- package/dist-esm/src/sipRoutingClient.js.map +0 -1
- package/dist-esm/src/utils/index.js +0 -5
- package/dist-esm/src/utils/index.js.map +0 -1
- package/types/communication-phone-numbers.d.ts +0 -691
- /package/{dist-esm/src → dist/browser}/generated/src/lroImpl.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/lroImpl.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/models/index.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/models/index.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/models/mappers.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/models/mappers.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/operationsInterfaces/phoneNumbers.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/pagingHelper.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/pagingHelper.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/siprouting/models/index.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/siprouting/models/index.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/siprouting/models/mappers.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/siprouting/models/mappers.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/siprouting/operationsInterfaces/sipRouting.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/siprouting/sipRoutingClientContext.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/tracing.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/tracing.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/lroModels.js +0 -0
- /package/{dist-esm/src → dist/browser}/lroModels.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/mappers.js +0 -0
- /package/{dist-esm/src → dist/browser}/models.js +0 -0
- /package/{dist-esm/src → dist/browser}/utils/constants.js +0 -0
- /package/{dist-esm/src → dist/browser}/utils/constants.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/utils/customPipelinePolicies.js +0 -0
- /package/{dist-esm/src → dist/browser}/utils/customPipelinePolicies.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/utils/logger.js +0 -0
- /package/{dist-esm/src → dist/browser}/utils/logger.js.map +0 -0
package/dist/index.js
DELETED
@@ -1,3495 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
var tslib = require('tslib');
|
6
|
-
var communicationCommon = require('@azure/communication-common');
|
7
|
-
var coreAuth = require('@azure/core-auth');
|
8
|
-
var coreTracing = require('@azure/core-tracing');
|
9
|
-
var logger$1 = require('@azure/logger');
|
10
|
-
var coreClient = require('@azure/core-client');
|
11
|
-
var coreLro = require('@azure/core-lro');
|
12
|
-
|
13
|
-
function _interopNamespaceDefault(e) {
|
14
|
-
var n = Object.create(null);
|
15
|
-
if (e) {
|
16
|
-
Object.keys(e).forEach(function (k) {
|
17
|
-
if (k !== 'default') {
|
18
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
19
|
-
Object.defineProperty(n, k, d.get ? d : {
|
20
|
-
enumerable: true,
|
21
|
-
get: function () { return e[k]; }
|
22
|
-
});
|
23
|
-
}
|
24
|
-
});
|
25
|
-
}
|
26
|
-
n.default = e;
|
27
|
-
return Object.freeze(n);
|
28
|
-
}
|
29
|
-
|
30
|
-
var coreClient__namespace = /*#__PURE__*/_interopNamespaceDefault(coreClient);
|
31
|
-
|
32
|
-
/*
|
33
|
-
* Copyright (c) Microsoft Corporation.
|
34
|
-
* Licensed under the MIT License.
|
35
|
-
*
|
36
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
37
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
38
|
-
*/
|
39
|
-
const pageMap = new WeakMap();
|
40
|
-
function setContinuationToken(page, continuationToken) {
|
41
|
-
var _a;
|
42
|
-
if (typeof page !== "object" || page === null || !continuationToken) {
|
43
|
-
return;
|
44
|
-
}
|
45
|
-
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
46
|
-
pageInfo.continuationToken = continuationToken;
|
47
|
-
pageMap.set(page, pageInfo);
|
48
|
-
}
|
49
|
-
|
50
|
-
/*
|
51
|
-
* Copyright (c) Microsoft Corporation.
|
52
|
-
* Licensed under the MIT License.
|
53
|
-
*
|
54
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
55
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
56
|
-
*/
|
57
|
-
const tracingClient = coreTracing.createTracingClient({
|
58
|
-
namespace: "Microsoft.Communication",
|
59
|
-
packageName: "@azure/communication-phone-numbers",
|
60
|
-
packageVersion: "1.2.1",
|
61
|
-
});
|
62
|
-
|
63
|
-
/*
|
64
|
-
* Copyright (c) Microsoft Corporation.
|
65
|
-
* Licensed under the MIT License.
|
66
|
-
*
|
67
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
68
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
69
|
-
*/
|
70
|
-
const PhoneNumberAreaCodes = {
|
71
|
-
type: {
|
72
|
-
name: "Composite",
|
73
|
-
className: "PhoneNumberAreaCodes",
|
74
|
-
modelProperties: {
|
75
|
-
areaCodes: {
|
76
|
-
serializedName: "areaCodes",
|
77
|
-
required: true,
|
78
|
-
type: {
|
79
|
-
name: "Sequence",
|
80
|
-
element: {
|
81
|
-
type: {
|
82
|
-
name: "Composite",
|
83
|
-
className: "PhoneNumberAreaCode",
|
84
|
-
},
|
85
|
-
},
|
86
|
-
},
|
87
|
-
},
|
88
|
-
nextLink: {
|
89
|
-
serializedName: "nextLink",
|
90
|
-
type: {
|
91
|
-
name: "String",
|
92
|
-
},
|
93
|
-
},
|
94
|
-
},
|
95
|
-
},
|
96
|
-
};
|
97
|
-
const PhoneNumberAreaCode = {
|
98
|
-
type: {
|
99
|
-
name: "Composite",
|
100
|
-
className: "PhoneNumberAreaCode",
|
101
|
-
modelProperties: {
|
102
|
-
areaCode: {
|
103
|
-
serializedName: "areaCode",
|
104
|
-
type: {
|
105
|
-
name: "String",
|
106
|
-
},
|
107
|
-
},
|
108
|
-
},
|
109
|
-
},
|
110
|
-
};
|
111
|
-
const CommunicationErrorResponse$1 = {
|
112
|
-
type: {
|
113
|
-
name: "Composite",
|
114
|
-
className: "CommunicationErrorResponse",
|
115
|
-
modelProperties: {
|
116
|
-
error: {
|
117
|
-
serializedName: "error",
|
118
|
-
type: {
|
119
|
-
name: "Composite",
|
120
|
-
className: "CommunicationError",
|
121
|
-
},
|
122
|
-
},
|
123
|
-
},
|
124
|
-
},
|
125
|
-
};
|
126
|
-
const CommunicationError = {
|
127
|
-
type: {
|
128
|
-
name: "Composite",
|
129
|
-
className: "CommunicationError",
|
130
|
-
modelProperties: {
|
131
|
-
code: {
|
132
|
-
serializedName: "code",
|
133
|
-
required: true,
|
134
|
-
type: {
|
135
|
-
name: "String",
|
136
|
-
},
|
137
|
-
},
|
138
|
-
message: {
|
139
|
-
serializedName: "message",
|
140
|
-
required: true,
|
141
|
-
type: {
|
142
|
-
name: "String",
|
143
|
-
},
|
144
|
-
},
|
145
|
-
target: {
|
146
|
-
serializedName: "target",
|
147
|
-
readOnly: true,
|
148
|
-
type: {
|
149
|
-
name: "String",
|
150
|
-
},
|
151
|
-
},
|
152
|
-
details: {
|
153
|
-
serializedName: "details",
|
154
|
-
readOnly: true,
|
155
|
-
type: {
|
156
|
-
name: "Sequence",
|
157
|
-
element: {
|
158
|
-
type: {
|
159
|
-
name: "Composite",
|
160
|
-
className: "CommunicationError",
|
161
|
-
},
|
162
|
-
},
|
163
|
-
},
|
164
|
-
},
|
165
|
-
innerError: {
|
166
|
-
serializedName: "innererror",
|
167
|
-
type: {
|
168
|
-
name: "Composite",
|
169
|
-
className: "CommunicationError",
|
170
|
-
},
|
171
|
-
},
|
172
|
-
},
|
173
|
-
},
|
174
|
-
};
|
175
|
-
const PhoneNumberCountries = {
|
176
|
-
type: {
|
177
|
-
name: "Composite",
|
178
|
-
className: "PhoneNumberCountries",
|
179
|
-
modelProperties: {
|
180
|
-
countries: {
|
181
|
-
serializedName: "countries",
|
182
|
-
type: {
|
183
|
-
name: "Sequence",
|
184
|
-
element: {
|
185
|
-
type: {
|
186
|
-
name: "Composite",
|
187
|
-
className: "PhoneNumberCountry",
|
188
|
-
},
|
189
|
-
},
|
190
|
-
},
|
191
|
-
},
|
192
|
-
nextLink: {
|
193
|
-
serializedName: "nextLink",
|
194
|
-
type: {
|
195
|
-
name: "String",
|
196
|
-
},
|
197
|
-
},
|
198
|
-
},
|
199
|
-
},
|
200
|
-
};
|
201
|
-
const PhoneNumberCountry = {
|
202
|
-
type: {
|
203
|
-
name: "Composite",
|
204
|
-
className: "PhoneNumberCountry",
|
205
|
-
modelProperties: {
|
206
|
-
localizedName: {
|
207
|
-
serializedName: "localizedName",
|
208
|
-
required: true,
|
209
|
-
type: {
|
210
|
-
name: "String",
|
211
|
-
},
|
212
|
-
},
|
213
|
-
countryCode: {
|
214
|
-
serializedName: "countryCode",
|
215
|
-
required: true,
|
216
|
-
type: {
|
217
|
-
name: "String",
|
218
|
-
},
|
219
|
-
},
|
220
|
-
},
|
221
|
-
},
|
222
|
-
};
|
223
|
-
const PhoneNumberLocalities = {
|
224
|
-
type: {
|
225
|
-
name: "Composite",
|
226
|
-
className: "PhoneNumberLocalities",
|
227
|
-
modelProperties: {
|
228
|
-
phoneNumberLocalities: {
|
229
|
-
serializedName: "phoneNumberLocalities",
|
230
|
-
type: {
|
231
|
-
name: "Sequence",
|
232
|
-
element: {
|
233
|
-
type: {
|
234
|
-
name: "Composite",
|
235
|
-
className: "PhoneNumberLocality",
|
236
|
-
},
|
237
|
-
},
|
238
|
-
},
|
239
|
-
},
|
240
|
-
nextLink: {
|
241
|
-
serializedName: "nextLink",
|
242
|
-
type: {
|
243
|
-
name: "String",
|
244
|
-
},
|
245
|
-
},
|
246
|
-
},
|
247
|
-
},
|
248
|
-
};
|
249
|
-
const PhoneNumberLocality = {
|
250
|
-
type: {
|
251
|
-
name: "Composite",
|
252
|
-
className: "PhoneNumberLocality",
|
253
|
-
modelProperties: {
|
254
|
-
localizedName: {
|
255
|
-
serializedName: "localizedName",
|
256
|
-
required: true,
|
257
|
-
type: {
|
258
|
-
name: "String",
|
259
|
-
},
|
260
|
-
},
|
261
|
-
administrativeDivision: {
|
262
|
-
serializedName: "administrativeDivision",
|
263
|
-
type: {
|
264
|
-
name: "Composite",
|
265
|
-
className: "PhoneNumberAdministrativeDivision",
|
266
|
-
},
|
267
|
-
},
|
268
|
-
},
|
269
|
-
},
|
270
|
-
};
|
271
|
-
const PhoneNumberAdministrativeDivision = {
|
272
|
-
type: {
|
273
|
-
name: "Composite",
|
274
|
-
className: "PhoneNumberAdministrativeDivision",
|
275
|
-
modelProperties: {
|
276
|
-
localizedName: {
|
277
|
-
serializedName: "localizedName",
|
278
|
-
required: true,
|
279
|
-
type: {
|
280
|
-
name: "String",
|
281
|
-
},
|
282
|
-
},
|
283
|
-
abbreviatedName: {
|
284
|
-
serializedName: "abbreviatedName",
|
285
|
-
required: true,
|
286
|
-
type: {
|
287
|
-
name: "String",
|
288
|
-
},
|
289
|
-
},
|
290
|
-
},
|
291
|
-
},
|
292
|
-
};
|
293
|
-
const OfferingsResponse = {
|
294
|
-
type: {
|
295
|
-
name: "Composite",
|
296
|
-
className: "OfferingsResponse",
|
297
|
-
modelProperties: {
|
298
|
-
phoneNumberOfferings: {
|
299
|
-
serializedName: "phoneNumberOfferings",
|
300
|
-
type: {
|
301
|
-
name: "Sequence",
|
302
|
-
element: {
|
303
|
-
type: {
|
304
|
-
name: "Composite",
|
305
|
-
className: "PhoneNumberOffering",
|
306
|
-
},
|
307
|
-
},
|
308
|
-
},
|
309
|
-
},
|
310
|
-
nextLink: {
|
311
|
-
serializedName: "nextLink",
|
312
|
-
type: {
|
313
|
-
name: "String",
|
314
|
-
},
|
315
|
-
},
|
316
|
-
},
|
317
|
-
},
|
318
|
-
};
|
319
|
-
const PhoneNumberOffering = {
|
320
|
-
type: {
|
321
|
-
name: "Composite",
|
322
|
-
className: "PhoneNumberOffering",
|
323
|
-
modelProperties: {
|
324
|
-
phoneNumberType: {
|
325
|
-
serializedName: "phoneNumberType",
|
326
|
-
type: {
|
327
|
-
name: "String",
|
328
|
-
},
|
329
|
-
},
|
330
|
-
assignmentType: {
|
331
|
-
serializedName: "assignmentType",
|
332
|
-
type: {
|
333
|
-
name: "String",
|
334
|
-
},
|
335
|
-
},
|
336
|
-
availableCapabilities: {
|
337
|
-
serializedName: "availableCapabilities",
|
338
|
-
type: {
|
339
|
-
name: "Composite",
|
340
|
-
className: "PhoneNumberCapabilities",
|
341
|
-
},
|
342
|
-
},
|
343
|
-
cost: {
|
344
|
-
serializedName: "cost",
|
345
|
-
type: {
|
346
|
-
name: "Composite",
|
347
|
-
className: "PhoneNumberCost",
|
348
|
-
},
|
349
|
-
},
|
350
|
-
},
|
351
|
-
},
|
352
|
-
};
|
353
|
-
const PhoneNumberCapabilities = {
|
354
|
-
type: {
|
355
|
-
name: "Composite",
|
356
|
-
className: "PhoneNumberCapabilities",
|
357
|
-
modelProperties: {
|
358
|
-
calling: {
|
359
|
-
serializedName: "calling",
|
360
|
-
required: true,
|
361
|
-
type: {
|
362
|
-
name: "String",
|
363
|
-
},
|
364
|
-
},
|
365
|
-
sms: {
|
366
|
-
serializedName: "sms",
|
367
|
-
required: true,
|
368
|
-
type: {
|
369
|
-
name: "String",
|
370
|
-
},
|
371
|
-
},
|
372
|
-
},
|
373
|
-
},
|
374
|
-
};
|
375
|
-
const PhoneNumberCost = {
|
376
|
-
type: {
|
377
|
-
name: "Composite",
|
378
|
-
className: "PhoneNumberCost",
|
379
|
-
modelProperties: {
|
380
|
-
amount: {
|
381
|
-
serializedName: "amount",
|
382
|
-
required: true,
|
383
|
-
type: {
|
384
|
-
name: "Number",
|
385
|
-
},
|
386
|
-
},
|
387
|
-
currencyCode: {
|
388
|
-
serializedName: "currencyCode",
|
389
|
-
required: true,
|
390
|
-
type: {
|
391
|
-
name: "String",
|
392
|
-
},
|
393
|
-
},
|
394
|
-
billingFrequency: {
|
395
|
-
defaultValue: "monthly",
|
396
|
-
isConstant: true,
|
397
|
-
serializedName: "billingFrequency",
|
398
|
-
type: {
|
399
|
-
name: "String",
|
400
|
-
},
|
401
|
-
},
|
402
|
-
},
|
403
|
-
},
|
404
|
-
};
|
405
|
-
const PhoneNumberSearchRequest = {
|
406
|
-
type: {
|
407
|
-
name: "Composite",
|
408
|
-
className: "PhoneNumberSearchRequest",
|
409
|
-
modelProperties: {
|
410
|
-
phoneNumberType: {
|
411
|
-
serializedName: "phoneNumberType",
|
412
|
-
required: true,
|
413
|
-
type: {
|
414
|
-
name: "String",
|
415
|
-
},
|
416
|
-
},
|
417
|
-
assignmentType: {
|
418
|
-
serializedName: "assignmentType",
|
419
|
-
required: true,
|
420
|
-
type: {
|
421
|
-
name: "String",
|
422
|
-
},
|
423
|
-
},
|
424
|
-
capabilities: {
|
425
|
-
serializedName: "capabilities",
|
426
|
-
type: {
|
427
|
-
name: "Composite",
|
428
|
-
className: "PhoneNumberCapabilities",
|
429
|
-
},
|
430
|
-
},
|
431
|
-
areaCode: {
|
432
|
-
serializedName: "areaCode",
|
433
|
-
type: {
|
434
|
-
name: "String",
|
435
|
-
},
|
436
|
-
},
|
437
|
-
quantity: {
|
438
|
-
defaultValue: 1,
|
439
|
-
constraints: {
|
440
|
-
InclusiveMaximum: 2147483647,
|
441
|
-
InclusiveMinimum: 1,
|
442
|
-
},
|
443
|
-
serializedName: "quantity",
|
444
|
-
type: {
|
445
|
-
name: "Number",
|
446
|
-
},
|
447
|
-
},
|
448
|
-
},
|
449
|
-
},
|
450
|
-
};
|
451
|
-
const PhoneNumberSearchResult = {
|
452
|
-
type: {
|
453
|
-
name: "Composite",
|
454
|
-
className: "PhoneNumberSearchResult",
|
455
|
-
modelProperties: {
|
456
|
-
searchId: {
|
457
|
-
serializedName: "searchId",
|
458
|
-
required: true,
|
459
|
-
type: {
|
460
|
-
name: "String",
|
461
|
-
},
|
462
|
-
},
|
463
|
-
phoneNumbers: {
|
464
|
-
serializedName: "phoneNumbers",
|
465
|
-
required: true,
|
466
|
-
type: {
|
467
|
-
name: "Sequence",
|
468
|
-
element: {
|
469
|
-
type: {
|
470
|
-
name: "String",
|
471
|
-
},
|
472
|
-
},
|
473
|
-
},
|
474
|
-
},
|
475
|
-
phoneNumberType: {
|
476
|
-
serializedName: "phoneNumberType",
|
477
|
-
required: true,
|
478
|
-
type: {
|
479
|
-
name: "String",
|
480
|
-
},
|
481
|
-
},
|
482
|
-
assignmentType: {
|
483
|
-
serializedName: "assignmentType",
|
484
|
-
required: true,
|
485
|
-
type: {
|
486
|
-
name: "String",
|
487
|
-
},
|
488
|
-
},
|
489
|
-
capabilities: {
|
490
|
-
serializedName: "capabilities",
|
491
|
-
type: {
|
492
|
-
name: "Composite",
|
493
|
-
className: "PhoneNumberCapabilities",
|
494
|
-
},
|
495
|
-
},
|
496
|
-
cost: {
|
497
|
-
serializedName: "cost",
|
498
|
-
type: {
|
499
|
-
name: "Composite",
|
500
|
-
className: "PhoneNumberCost",
|
501
|
-
},
|
502
|
-
},
|
503
|
-
searchExpiresBy: {
|
504
|
-
serializedName: "searchExpiresBy",
|
505
|
-
required: true,
|
506
|
-
type: {
|
507
|
-
name: "DateTime",
|
508
|
-
},
|
509
|
-
},
|
510
|
-
errorCode: {
|
511
|
-
serializedName: "errorCode",
|
512
|
-
type: {
|
513
|
-
name: "Number",
|
514
|
-
},
|
515
|
-
},
|
516
|
-
error: {
|
517
|
-
serializedName: "error",
|
518
|
-
type: {
|
519
|
-
name: "String",
|
520
|
-
},
|
521
|
-
},
|
522
|
-
},
|
523
|
-
},
|
524
|
-
};
|
525
|
-
const PhoneNumberPurchaseRequest = {
|
526
|
-
type: {
|
527
|
-
name: "Composite",
|
528
|
-
className: "PhoneNumberPurchaseRequest",
|
529
|
-
modelProperties: {
|
530
|
-
searchId: {
|
531
|
-
serializedName: "searchId",
|
532
|
-
type: {
|
533
|
-
name: "String",
|
534
|
-
},
|
535
|
-
},
|
536
|
-
},
|
537
|
-
},
|
538
|
-
};
|
539
|
-
const PhoneNumberOperation = {
|
540
|
-
type: {
|
541
|
-
name: "Composite",
|
542
|
-
className: "PhoneNumberOperation",
|
543
|
-
modelProperties: {
|
544
|
-
operationType: {
|
545
|
-
serializedName: "operationType",
|
546
|
-
required: true,
|
547
|
-
type: {
|
548
|
-
name: "String",
|
549
|
-
},
|
550
|
-
},
|
551
|
-
status: {
|
552
|
-
serializedName: "status",
|
553
|
-
required: true,
|
554
|
-
type: {
|
555
|
-
name: "String",
|
556
|
-
},
|
557
|
-
},
|
558
|
-
resourceLocation: {
|
559
|
-
serializedName: "resourceLocation",
|
560
|
-
type: {
|
561
|
-
name: "String",
|
562
|
-
},
|
563
|
-
},
|
564
|
-
createdDateTime: {
|
565
|
-
serializedName: "createdDateTime",
|
566
|
-
required: true,
|
567
|
-
type: {
|
568
|
-
name: "DateTime",
|
569
|
-
},
|
570
|
-
},
|
571
|
-
error: {
|
572
|
-
serializedName: "error",
|
573
|
-
type: {
|
574
|
-
name: "Composite",
|
575
|
-
className: "CommunicationError",
|
576
|
-
},
|
577
|
-
},
|
578
|
-
id: {
|
579
|
-
serializedName: "id",
|
580
|
-
required: true,
|
581
|
-
type: {
|
582
|
-
name: "String",
|
583
|
-
},
|
584
|
-
},
|
585
|
-
lastActionDateTime: {
|
586
|
-
serializedName: "lastActionDateTime",
|
587
|
-
readOnly: true,
|
588
|
-
type: {
|
589
|
-
name: "DateTime",
|
590
|
-
},
|
591
|
-
},
|
592
|
-
},
|
593
|
-
},
|
594
|
-
};
|
595
|
-
const PhoneNumberCapabilitiesRequest = {
|
596
|
-
type: {
|
597
|
-
name: "Composite",
|
598
|
-
className: "PhoneNumberCapabilitiesRequest",
|
599
|
-
modelProperties: {
|
600
|
-
calling: {
|
601
|
-
serializedName: "calling",
|
602
|
-
type: {
|
603
|
-
name: "String",
|
604
|
-
},
|
605
|
-
},
|
606
|
-
sms: {
|
607
|
-
serializedName: "sms",
|
608
|
-
type: {
|
609
|
-
name: "String",
|
610
|
-
},
|
611
|
-
},
|
612
|
-
},
|
613
|
-
},
|
614
|
-
};
|
615
|
-
const PurchasedPhoneNumber = {
|
616
|
-
type: {
|
617
|
-
name: "Composite",
|
618
|
-
className: "PurchasedPhoneNumber",
|
619
|
-
modelProperties: {
|
620
|
-
id: {
|
621
|
-
serializedName: "id",
|
622
|
-
required: true,
|
623
|
-
type: {
|
624
|
-
name: "String",
|
625
|
-
},
|
626
|
-
},
|
627
|
-
phoneNumber: {
|
628
|
-
serializedName: "phoneNumber",
|
629
|
-
required: true,
|
630
|
-
type: {
|
631
|
-
name: "String",
|
632
|
-
},
|
633
|
-
},
|
634
|
-
countryCode: {
|
635
|
-
serializedName: "countryCode",
|
636
|
-
required: true,
|
637
|
-
type: {
|
638
|
-
name: "String",
|
639
|
-
},
|
640
|
-
},
|
641
|
-
phoneNumberType: {
|
642
|
-
serializedName: "phoneNumberType",
|
643
|
-
required: true,
|
644
|
-
type: {
|
645
|
-
name: "String",
|
646
|
-
},
|
647
|
-
},
|
648
|
-
capabilities: {
|
649
|
-
serializedName: "capabilities",
|
650
|
-
type: {
|
651
|
-
name: "Composite",
|
652
|
-
className: "PhoneNumberCapabilities",
|
653
|
-
},
|
654
|
-
},
|
655
|
-
assignmentType: {
|
656
|
-
serializedName: "assignmentType",
|
657
|
-
required: true,
|
658
|
-
type: {
|
659
|
-
name: "String",
|
660
|
-
},
|
661
|
-
},
|
662
|
-
purchaseDate: {
|
663
|
-
serializedName: "purchaseDate",
|
664
|
-
required: true,
|
665
|
-
type: {
|
666
|
-
name: "DateTime",
|
667
|
-
},
|
668
|
-
},
|
669
|
-
cost: {
|
670
|
-
serializedName: "cost",
|
671
|
-
type: {
|
672
|
-
name: "Composite",
|
673
|
-
className: "PhoneNumberCost",
|
674
|
-
},
|
675
|
-
},
|
676
|
-
},
|
677
|
-
},
|
678
|
-
};
|
679
|
-
const PurchasedPhoneNumbers = {
|
680
|
-
type: {
|
681
|
-
name: "Composite",
|
682
|
-
className: "PurchasedPhoneNumbers",
|
683
|
-
modelProperties: {
|
684
|
-
phoneNumbers: {
|
685
|
-
serializedName: "phoneNumbers",
|
686
|
-
required: true,
|
687
|
-
type: {
|
688
|
-
name: "Sequence",
|
689
|
-
element: {
|
690
|
-
type: {
|
691
|
-
name: "Composite",
|
692
|
-
className: "PurchasedPhoneNumber",
|
693
|
-
},
|
694
|
-
},
|
695
|
-
},
|
696
|
-
},
|
697
|
-
nextLink: {
|
698
|
-
serializedName: "nextLink",
|
699
|
-
type: {
|
700
|
-
name: "String",
|
701
|
-
},
|
702
|
-
},
|
703
|
-
},
|
704
|
-
},
|
705
|
-
};
|
706
|
-
const OperatorInformationRequest = {
|
707
|
-
type: {
|
708
|
-
name: "Composite",
|
709
|
-
className: "OperatorInformationRequest",
|
710
|
-
modelProperties: {
|
711
|
-
phoneNumbers: {
|
712
|
-
serializedName: "phoneNumbers",
|
713
|
-
required: true,
|
714
|
-
type: {
|
715
|
-
name: "Sequence",
|
716
|
-
element: {
|
717
|
-
type: {
|
718
|
-
name: "String",
|
719
|
-
},
|
720
|
-
},
|
721
|
-
},
|
722
|
-
},
|
723
|
-
options: {
|
724
|
-
serializedName: "options",
|
725
|
-
type: {
|
726
|
-
name: "Composite",
|
727
|
-
className: "OperatorInformationOptions",
|
728
|
-
},
|
729
|
-
},
|
730
|
-
},
|
731
|
-
},
|
732
|
-
};
|
733
|
-
const OperatorInformationOptions = {
|
734
|
-
type: {
|
735
|
-
name: "Composite",
|
736
|
-
className: "OperatorInformationOptions",
|
737
|
-
modelProperties: {
|
738
|
-
includeAdditionalOperatorDetails: {
|
739
|
-
serializedName: "includeAdditionalOperatorDetails",
|
740
|
-
type: {
|
741
|
-
name: "Boolean",
|
742
|
-
},
|
743
|
-
},
|
744
|
-
},
|
745
|
-
},
|
746
|
-
};
|
747
|
-
const OperatorInformationResult = {
|
748
|
-
type: {
|
749
|
-
name: "Composite",
|
750
|
-
className: "OperatorInformationResult",
|
751
|
-
modelProperties: {
|
752
|
-
values: {
|
753
|
-
serializedName: "values",
|
754
|
-
type: {
|
755
|
-
name: "Sequence",
|
756
|
-
element: {
|
757
|
-
type: {
|
758
|
-
name: "Composite",
|
759
|
-
className: "OperatorInformation",
|
760
|
-
},
|
761
|
-
},
|
762
|
-
},
|
763
|
-
},
|
764
|
-
},
|
765
|
-
},
|
766
|
-
};
|
767
|
-
const OperatorInformation = {
|
768
|
-
type: {
|
769
|
-
name: "Composite",
|
770
|
-
className: "OperatorInformation",
|
771
|
-
modelProperties: {
|
772
|
-
phoneNumber: {
|
773
|
-
serializedName: "phoneNumber",
|
774
|
-
required: true,
|
775
|
-
type: {
|
776
|
-
name: "String",
|
777
|
-
},
|
778
|
-
},
|
779
|
-
nationalFormat: {
|
780
|
-
serializedName: "nationalFormat",
|
781
|
-
type: {
|
782
|
-
name: "String",
|
783
|
-
},
|
784
|
-
},
|
785
|
-
internationalFormat: {
|
786
|
-
serializedName: "internationalFormat",
|
787
|
-
type: {
|
788
|
-
name: "String",
|
789
|
-
},
|
790
|
-
},
|
791
|
-
isoCountryCode: {
|
792
|
-
serializedName: "isoCountryCode",
|
793
|
-
type: {
|
794
|
-
name: "String",
|
795
|
-
},
|
796
|
-
},
|
797
|
-
numberType: {
|
798
|
-
serializedName: "numberType",
|
799
|
-
type: {
|
800
|
-
name: "String",
|
801
|
-
},
|
802
|
-
},
|
803
|
-
operatorDetails: {
|
804
|
-
serializedName: "operatorDetails",
|
805
|
-
type: {
|
806
|
-
name: "Composite",
|
807
|
-
className: "OperatorDetails",
|
808
|
-
},
|
809
|
-
},
|
810
|
-
},
|
811
|
-
},
|
812
|
-
};
|
813
|
-
const OperatorDetails = {
|
814
|
-
type: {
|
815
|
-
name: "Composite",
|
816
|
-
className: "OperatorDetails",
|
817
|
-
modelProperties: {
|
818
|
-
name: {
|
819
|
-
serializedName: "name",
|
820
|
-
required: true,
|
821
|
-
type: {
|
822
|
-
name: "String",
|
823
|
-
},
|
824
|
-
},
|
825
|
-
mobileNetworkCode: {
|
826
|
-
serializedName: "mobileNetworkCode",
|
827
|
-
type: {
|
828
|
-
name: "String",
|
829
|
-
},
|
830
|
-
},
|
831
|
-
mobileCountryCode: {
|
832
|
-
serializedName: "mobileCountryCode",
|
833
|
-
type: {
|
834
|
-
name: "String",
|
835
|
-
},
|
836
|
-
},
|
837
|
-
},
|
838
|
-
},
|
839
|
-
};
|
840
|
-
const PhoneNumbersSearchAvailablePhoneNumbersHeaders = {
|
841
|
-
type: {
|
842
|
-
name: "Composite",
|
843
|
-
className: "PhoneNumbersSearchAvailablePhoneNumbersHeaders",
|
844
|
-
modelProperties: {
|
845
|
-
location: {
|
846
|
-
serializedName: "location",
|
847
|
-
type: {
|
848
|
-
name: "String",
|
849
|
-
},
|
850
|
-
},
|
851
|
-
operationLocation: {
|
852
|
-
serializedName: "operation-location",
|
853
|
-
type: {
|
854
|
-
name: "String",
|
855
|
-
},
|
856
|
-
},
|
857
|
-
operationId: {
|
858
|
-
serializedName: "operation-id",
|
859
|
-
type: {
|
860
|
-
name: "String",
|
861
|
-
},
|
862
|
-
},
|
863
|
-
searchId: {
|
864
|
-
serializedName: "search-id",
|
865
|
-
type: {
|
866
|
-
name: "String",
|
867
|
-
},
|
868
|
-
},
|
869
|
-
},
|
870
|
-
},
|
871
|
-
};
|
872
|
-
const PhoneNumbersPurchasePhoneNumbersHeaders = {
|
873
|
-
type: {
|
874
|
-
name: "Composite",
|
875
|
-
className: "PhoneNumbersPurchasePhoneNumbersHeaders",
|
876
|
-
modelProperties: {
|
877
|
-
operationLocation: {
|
878
|
-
serializedName: "operation-location",
|
879
|
-
type: {
|
880
|
-
name: "String",
|
881
|
-
},
|
882
|
-
},
|
883
|
-
operationId: {
|
884
|
-
serializedName: "operation-id",
|
885
|
-
type: {
|
886
|
-
name: "String",
|
887
|
-
},
|
888
|
-
},
|
889
|
-
purchaseId: {
|
890
|
-
serializedName: "purchase-id",
|
891
|
-
type: {
|
892
|
-
name: "String",
|
893
|
-
},
|
894
|
-
},
|
895
|
-
},
|
896
|
-
},
|
897
|
-
};
|
898
|
-
const PhoneNumbersGetOperationHeaders = {
|
899
|
-
type: {
|
900
|
-
name: "Composite",
|
901
|
-
className: "PhoneNumbersGetOperationHeaders",
|
902
|
-
modelProperties: {
|
903
|
-
location: {
|
904
|
-
serializedName: "location",
|
905
|
-
type: {
|
906
|
-
name: "String",
|
907
|
-
},
|
908
|
-
},
|
909
|
-
},
|
910
|
-
},
|
911
|
-
};
|
912
|
-
const PhoneNumbersUpdateCapabilitiesHeaders = {
|
913
|
-
type: {
|
914
|
-
name: "Composite",
|
915
|
-
className: "PhoneNumbersUpdateCapabilitiesHeaders",
|
916
|
-
modelProperties: {
|
917
|
-
location: {
|
918
|
-
serializedName: "location",
|
919
|
-
type: {
|
920
|
-
name: "String",
|
921
|
-
},
|
922
|
-
},
|
923
|
-
operationLocation: {
|
924
|
-
serializedName: "operation-location",
|
925
|
-
type: {
|
926
|
-
name: "String",
|
927
|
-
},
|
928
|
-
},
|
929
|
-
operationId: {
|
930
|
-
serializedName: "operation-id",
|
931
|
-
type: {
|
932
|
-
name: "String",
|
933
|
-
},
|
934
|
-
},
|
935
|
-
capabilitiesId: {
|
936
|
-
serializedName: "capabilities-id",
|
937
|
-
type: {
|
938
|
-
name: "String",
|
939
|
-
},
|
940
|
-
},
|
941
|
-
},
|
942
|
-
},
|
943
|
-
};
|
944
|
-
const PhoneNumbersReleasePhoneNumberHeaders = {
|
945
|
-
type: {
|
946
|
-
name: "Composite",
|
947
|
-
className: "PhoneNumbersReleasePhoneNumberHeaders",
|
948
|
-
modelProperties: {
|
949
|
-
operationLocation: {
|
950
|
-
serializedName: "operation-location",
|
951
|
-
type: {
|
952
|
-
name: "String",
|
953
|
-
},
|
954
|
-
},
|
955
|
-
operationId: {
|
956
|
-
serializedName: "operation-id",
|
957
|
-
type: {
|
958
|
-
name: "String",
|
959
|
-
},
|
960
|
-
},
|
961
|
-
releaseId: {
|
962
|
-
serializedName: "release-id",
|
963
|
-
type: {
|
964
|
-
name: "String",
|
965
|
-
},
|
966
|
-
},
|
967
|
-
},
|
968
|
-
},
|
969
|
-
};
|
970
|
-
|
971
|
-
var Mappers$1 = /*#__PURE__*/Object.freeze({
|
972
|
-
__proto__: null,
|
973
|
-
CommunicationError: CommunicationError,
|
974
|
-
CommunicationErrorResponse: CommunicationErrorResponse$1,
|
975
|
-
OfferingsResponse: OfferingsResponse,
|
976
|
-
OperatorDetails: OperatorDetails,
|
977
|
-
OperatorInformation: OperatorInformation,
|
978
|
-
OperatorInformationOptions: OperatorInformationOptions,
|
979
|
-
OperatorInformationRequest: OperatorInformationRequest,
|
980
|
-
OperatorInformationResult: OperatorInformationResult,
|
981
|
-
PhoneNumberAdministrativeDivision: PhoneNumberAdministrativeDivision,
|
982
|
-
PhoneNumberAreaCode: PhoneNumberAreaCode,
|
983
|
-
PhoneNumberAreaCodes: PhoneNumberAreaCodes,
|
984
|
-
PhoneNumberCapabilities: PhoneNumberCapabilities,
|
985
|
-
PhoneNumberCapabilitiesRequest: PhoneNumberCapabilitiesRequest,
|
986
|
-
PhoneNumberCost: PhoneNumberCost,
|
987
|
-
PhoneNumberCountries: PhoneNumberCountries,
|
988
|
-
PhoneNumberCountry: PhoneNumberCountry,
|
989
|
-
PhoneNumberLocalities: PhoneNumberLocalities,
|
990
|
-
PhoneNumberLocality: PhoneNumberLocality,
|
991
|
-
PhoneNumberOffering: PhoneNumberOffering,
|
992
|
-
PhoneNumberOperation: PhoneNumberOperation,
|
993
|
-
PhoneNumberPurchaseRequest: PhoneNumberPurchaseRequest,
|
994
|
-
PhoneNumberSearchRequest: PhoneNumberSearchRequest,
|
995
|
-
PhoneNumberSearchResult: PhoneNumberSearchResult,
|
996
|
-
PhoneNumbersGetOperationHeaders: PhoneNumbersGetOperationHeaders,
|
997
|
-
PhoneNumbersPurchasePhoneNumbersHeaders: PhoneNumbersPurchasePhoneNumbersHeaders,
|
998
|
-
PhoneNumbersReleasePhoneNumberHeaders: PhoneNumbersReleasePhoneNumberHeaders,
|
999
|
-
PhoneNumbersSearchAvailablePhoneNumbersHeaders: PhoneNumbersSearchAvailablePhoneNumbersHeaders,
|
1000
|
-
PhoneNumbersUpdateCapabilitiesHeaders: PhoneNumbersUpdateCapabilitiesHeaders,
|
1001
|
-
PurchasedPhoneNumber: PurchasedPhoneNumber,
|
1002
|
-
PurchasedPhoneNumbers: PurchasedPhoneNumbers
|
1003
|
-
});
|
1004
|
-
|
1005
|
-
/*
|
1006
|
-
* Copyright (c) Microsoft Corporation.
|
1007
|
-
* Licensed under the MIT License.
|
1008
|
-
*
|
1009
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
1010
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
1011
|
-
*/
|
1012
|
-
const accept$1 = {
|
1013
|
-
parameterPath: "accept",
|
1014
|
-
mapper: {
|
1015
|
-
defaultValue: "application/json",
|
1016
|
-
isConstant: true,
|
1017
|
-
serializedName: "Accept",
|
1018
|
-
type: {
|
1019
|
-
name: "String",
|
1020
|
-
},
|
1021
|
-
},
|
1022
|
-
};
|
1023
|
-
const endpoint$1 = {
|
1024
|
-
parameterPath: "endpoint",
|
1025
|
-
mapper: {
|
1026
|
-
serializedName: "endpoint",
|
1027
|
-
required: true,
|
1028
|
-
type: {
|
1029
|
-
name: "String",
|
1030
|
-
},
|
1031
|
-
},
|
1032
|
-
skipEncoding: true,
|
1033
|
-
};
|
1034
|
-
const countryCode = {
|
1035
|
-
parameterPath: "countryCode",
|
1036
|
-
mapper: {
|
1037
|
-
serializedName: "countryCode",
|
1038
|
-
required: true,
|
1039
|
-
type: {
|
1040
|
-
name: "String",
|
1041
|
-
},
|
1042
|
-
},
|
1043
|
-
};
|
1044
|
-
const phoneNumberType = {
|
1045
|
-
parameterPath: "phoneNumberType",
|
1046
|
-
mapper: {
|
1047
|
-
serializedName: "phoneNumberType",
|
1048
|
-
required: true,
|
1049
|
-
type: {
|
1050
|
-
name: "Enum",
|
1051
|
-
allowedValues: ["geographic", "tollFree"],
|
1052
|
-
},
|
1053
|
-
},
|
1054
|
-
};
|
1055
|
-
const skip = {
|
1056
|
-
parameterPath: ["options", "skip"],
|
1057
|
-
mapper: {
|
1058
|
-
defaultValue: 0,
|
1059
|
-
serializedName: "skip",
|
1060
|
-
type: {
|
1061
|
-
name: "Number",
|
1062
|
-
},
|
1063
|
-
},
|
1064
|
-
};
|
1065
|
-
const maxPageSize = {
|
1066
|
-
parameterPath: ["options", "maxPageSize"],
|
1067
|
-
mapper: {
|
1068
|
-
defaultValue: 100,
|
1069
|
-
serializedName: "maxPageSize",
|
1070
|
-
type: {
|
1071
|
-
name: "Number",
|
1072
|
-
},
|
1073
|
-
},
|
1074
|
-
};
|
1075
|
-
const assignmentType = {
|
1076
|
-
parameterPath: ["options", "assignmentType"],
|
1077
|
-
mapper: {
|
1078
|
-
serializedName: "assignmentType",
|
1079
|
-
type: {
|
1080
|
-
name: "Enum",
|
1081
|
-
allowedValues: ["person", "application"],
|
1082
|
-
},
|
1083
|
-
},
|
1084
|
-
};
|
1085
|
-
const locality = {
|
1086
|
-
parameterPath: ["options", "locality"],
|
1087
|
-
mapper: {
|
1088
|
-
serializedName: "locality",
|
1089
|
-
type: {
|
1090
|
-
name: "String",
|
1091
|
-
},
|
1092
|
-
},
|
1093
|
-
};
|
1094
|
-
const administrativeDivision = {
|
1095
|
-
parameterPath: ["options", "administrativeDivision"],
|
1096
|
-
mapper: {
|
1097
|
-
serializedName: "administrativeDivision",
|
1098
|
-
type: {
|
1099
|
-
name: "String",
|
1100
|
-
},
|
1101
|
-
},
|
1102
|
-
};
|
1103
|
-
const apiVersion$1 = {
|
1104
|
-
parameterPath: "apiVersion",
|
1105
|
-
mapper: {
|
1106
|
-
defaultValue: "2024-03-01-preview",
|
1107
|
-
isConstant: true,
|
1108
|
-
serializedName: "api-version",
|
1109
|
-
type: {
|
1110
|
-
name: "String",
|
1111
|
-
},
|
1112
|
-
},
|
1113
|
-
};
|
1114
|
-
const acceptLanguage = {
|
1115
|
-
parameterPath: ["options", "acceptLanguage"],
|
1116
|
-
mapper: {
|
1117
|
-
serializedName: "accept-language",
|
1118
|
-
type: {
|
1119
|
-
name: "String",
|
1120
|
-
},
|
1121
|
-
},
|
1122
|
-
};
|
1123
|
-
const phoneNumberType1 = {
|
1124
|
-
parameterPath: ["options", "phoneNumberType"],
|
1125
|
-
mapper: {
|
1126
|
-
serializedName: "phoneNumberType",
|
1127
|
-
type: {
|
1128
|
-
name: "Enum",
|
1129
|
-
allowedValues: ["geographic", "tollFree"],
|
1130
|
-
},
|
1131
|
-
},
|
1132
|
-
};
|
1133
|
-
const contentType$1 = {
|
1134
|
-
parameterPath: ["options", "contentType"],
|
1135
|
-
mapper: {
|
1136
|
-
defaultValue: "application/json",
|
1137
|
-
isConstant: true,
|
1138
|
-
serializedName: "Content-Type",
|
1139
|
-
type: {
|
1140
|
-
name: "String",
|
1141
|
-
},
|
1142
|
-
},
|
1143
|
-
};
|
1144
|
-
const searchId = {
|
1145
|
-
parameterPath: "searchId",
|
1146
|
-
mapper: {
|
1147
|
-
serializedName: "searchId",
|
1148
|
-
required: true,
|
1149
|
-
type: {
|
1150
|
-
name: "String",
|
1151
|
-
},
|
1152
|
-
},
|
1153
|
-
};
|
1154
|
-
const operationId = {
|
1155
|
-
parameterPath: "operationId",
|
1156
|
-
mapper: {
|
1157
|
-
serializedName: "operationId",
|
1158
|
-
required: true,
|
1159
|
-
type: {
|
1160
|
-
name: "String",
|
1161
|
-
},
|
1162
|
-
},
|
1163
|
-
};
|
1164
|
-
const contentType1 = {
|
1165
|
-
parameterPath: ["options", "contentType"],
|
1166
|
-
mapper: {
|
1167
|
-
defaultValue: "application/merge-patch+json",
|
1168
|
-
isConstant: true,
|
1169
|
-
serializedName: "Content-Type",
|
1170
|
-
type: {
|
1171
|
-
name: "String",
|
1172
|
-
},
|
1173
|
-
},
|
1174
|
-
};
|
1175
|
-
const phoneNumber = {
|
1176
|
-
parameterPath: "phoneNumber",
|
1177
|
-
mapper: {
|
1178
|
-
serializedName: "phoneNumber",
|
1179
|
-
required: true,
|
1180
|
-
type: {
|
1181
|
-
name: "String",
|
1182
|
-
},
|
1183
|
-
},
|
1184
|
-
};
|
1185
|
-
const top = {
|
1186
|
-
parameterPath: ["options", "top"],
|
1187
|
-
mapper: {
|
1188
|
-
defaultValue: 100,
|
1189
|
-
serializedName: "top",
|
1190
|
-
type: {
|
1191
|
-
name: "Number",
|
1192
|
-
},
|
1193
|
-
},
|
1194
|
-
};
|
1195
|
-
const nextLink = {
|
1196
|
-
parameterPath: "nextLink",
|
1197
|
-
mapper: {
|
1198
|
-
serializedName: "nextLink",
|
1199
|
-
required: true,
|
1200
|
-
type: {
|
1201
|
-
name: "String",
|
1202
|
-
},
|
1203
|
-
},
|
1204
|
-
skipEncoding: true,
|
1205
|
-
};
|
1206
|
-
|
1207
|
-
/*
|
1208
|
-
* Copyright (c) Microsoft Corporation.
|
1209
|
-
* Licensed under the MIT License.
|
1210
|
-
*
|
1211
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
1212
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
1213
|
-
*/
|
1214
|
-
function createLroSpec(inputs) {
|
1215
|
-
const { args, spec, sendOperationFn } = inputs;
|
1216
|
-
return {
|
1217
|
-
requestMethod: spec.httpMethod,
|
1218
|
-
requestPath: spec.path,
|
1219
|
-
sendInitialRequest: () => sendOperationFn(args, spec),
|
1220
|
-
sendPollRequest: (path, options) => {
|
1221
|
-
const restSpec = tslib.__rest(spec, ["requestBody"]);
|
1222
|
-
return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
|
1223
|
-
},
|
1224
|
-
};
|
1225
|
-
}
|
1226
|
-
|
1227
|
-
/*
|
1228
|
-
* Copyright (c) Microsoft Corporation.
|
1229
|
-
* Licensed under the MIT License.
|
1230
|
-
*
|
1231
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
1232
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
1233
|
-
*/
|
1234
|
-
/// <reference lib="esnext.asynciterable" />
|
1235
|
-
/** Class containing PhoneNumbers operations. */
|
1236
|
-
class PhoneNumbersImpl {
|
1237
|
-
/**
|
1238
|
-
* Initialize a new instance of the class PhoneNumbers class.
|
1239
|
-
* @param client Reference to the service client
|
1240
|
-
*/
|
1241
|
-
constructor(client) {
|
1242
|
-
this.client = client;
|
1243
|
-
}
|
1244
|
-
/**
|
1245
|
-
* Gets the list of available area codes.
|
1246
|
-
* @param countryCode The ISO 3166-2 country code, e.g. US.
|
1247
|
-
* @param phoneNumberType Filter by numberType, e.g. Geographic, TollFree.
|
1248
|
-
* @param options The options parameters.
|
1249
|
-
*/
|
1250
|
-
listAreaCodes(countryCode, phoneNumberType, options) {
|
1251
|
-
const iter = this.listAreaCodesPagingAll(countryCode, phoneNumberType, options);
|
1252
|
-
return {
|
1253
|
-
next() {
|
1254
|
-
return iter.next();
|
1255
|
-
},
|
1256
|
-
[Symbol.asyncIterator]() {
|
1257
|
-
return this;
|
1258
|
-
},
|
1259
|
-
byPage: (settings) => {
|
1260
|
-
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1261
|
-
throw new Error("maxPageSize is not supported by this operation.");
|
1262
|
-
}
|
1263
|
-
return this.listAreaCodesPagingPage(countryCode, phoneNumberType, options, settings);
|
1264
|
-
},
|
1265
|
-
};
|
1266
|
-
}
|
1267
|
-
listAreaCodesPagingPage(countryCode, phoneNumberType, options, settings) {
|
1268
|
-
return tslib.__asyncGenerator(this, arguments, function* listAreaCodesPagingPage_1() {
|
1269
|
-
let result;
|
1270
|
-
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1271
|
-
if (!continuationToken) {
|
1272
|
-
result = yield tslib.__await(this._listAreaCodes(countryCode, phoneNumberType, options));
|
1273
|
-
let page = result.areaCodes || [];
|
1274
|
-
continuationToken = result.nextLink;
|
1275
|
-
setContinuationToken(page, continuationToken);
|
1276
|
-
yield yield tslib.__await(page);
|
1277
|
-
}
|
1278
|
-
while (continuationToken) {
|
1279
|
-
result = yield tslib.__await(this._listAreaCodesNext(countryCode, continuationToken, options));
|
1280
|
-
continuationToken = result.nextLink;
|
1281
|
-
let page = result.areaCodes || [];
|
1282
|
-
setContinuationToken(page, continuationToken);
|
1283
|
-
yield yield tslib.__await(page);
|
1284
|
-
}
|
1285
|
-
});
|
1286
|
-
}
|
1287
|
-
listAreaCodesPagingAll(countryCode, phoneNumberType, options) {
|
1288
|
-
return tslib.__asyncGenerator(this, arguments, function* listAreaCodesPagingAll_1() {
|
1289
|
-
var _a, e_1, _b, _c;
|
1290
|
-
try {
|
1291
|
-
for (var _d = true, _e = tslib.__asyncValues(this.listAreaCodesPagingPage(countryCode, phoneNumberType, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
1292
|
-
_c = _f.value;
|
1293
|
-
_d = false;
|
1294
|
-
const page = _c;
|
1295
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
1296
|
-
}
|
1297
|
-
}
|
1298
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
1299
|
-
finally {
|
1300
|
-
try {
|
1301
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
1302
|
-
}
|
1303
|
-
finally { if (e_1) throw e_1.error; }
|
1304
|
-
}
|
1305
|
-
});
|
1306
|
-
}
|
1307
|
-
/**
|
1308
|
-
* Gets the list of supported countries.
|
1309
|
-
* @param options The options parameters.
|
1310
|
-
*/
|
1311
|
-
listAvailableCountries(options) {
|
1312
|
-
const iter = this.listAvailableCountriesPagingAll(options);
|
1313
|
-
return {
|
1314
|
-
next() {
|
1315
|
-
return iter.next();
|
1316
|
-
},
|
1317
|
-
[Symbol.asyncIterator]() {
|
1318
|
-
return this;
|
1319
|
-
},
|
1320
|
-
byPage: (settings) => {
|
1321
|
-
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1322
|
-
throw new Error("maxPageSize is not supported by this operation.");
|
1323
|
-
}
|
1324
|
-
return this.listAvailableCountriesPagingPage(options, settings);
|
1325
|
-
},
|
1326
|
-
};
|
1327
|
-
}
|
1328
|
-
listAvailableCountriesPagingPage(options, settings) {
|
1329
|
-
return tslib.__asyncGenerator(this, arguments, function* listAvailableCountriesPagingPage_1() {
|
1330
|
-
let result;
|
1331
|
-
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1332
|
-
if (!continuationToken) {
|
1333
|
-
result = yield tslib.__await(this._listAvailableCountries(options));
|
1334
|
-
let page = result.countries || [];
|
1335
|
-
continuationToken = result.nextLink;
|
1336
|
-
setContinuationToken(page, continuationToken);
|
1337
|
-
yield yield tslib.__await(page);
|
1338
|
-
}
|
1339
|
-
while (continuationToken) {
|
1340
|
-
result = yield tslib.__await(this._listAvailableCountriesNext(continuationToken, options));
|
1341
|
-
continuationToken = result.nextLink;
|
1342
|
-
let page = result.countries || [];
|
1343
|
-
setContinuationToken(page, continuationToken);
|
1344
|
-
yield yield tslib.__await(page);
|
1345
|
-
}
|
1346
|
-
});
|
1347
|
-
}
|
1348
|
-
listAvailableCountriesPagingAll(options) {
|
1349
|
-
return tslib.__asyncGenerator(this, arguments, function* listAvailableCountriesPagingAll_1() {
|
1350
|
-
var _a, e_2, _b, _c;
|
1351
|
-
try {
|
1352
|
-
for (var _d = true, _e = tslib.__asyncValues(this.listAvailableCountriesPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
1353
|
-
_c = _f.value;
|
1354
|
-
_d = false;
|
1355
|
-
const page = _c;
|
1356
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
1357
|
-
}
|
1358
|
-
}
|
1359
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
1360
|
-
finally {
|
1361
|
-
try {
|
1362
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
1363
|
-
}
|
1364
|
-
finally { if (e_2) throw e_2.error; }
|
1365
|
-
}
|
1366
|
-
});
|
1367
|
-
}
|
1368
|
-
/**
|
1369
|
-
* Gets the list of cities or towns with available phone numbers.
|
1370
|
-
* @param countryCode The ISO 3166-2 country code, e.g. US.
|
1371
|
-
* @param options The options parameters.
|
1372
|
-
*/
|
1373
|
-
listAvailableLocalities(countryCode, options) {
|
1374
|
-
const iter = this.listAvailableLocalitiesPagingAll(countryCode, options);
|
1375
|
-
return {
|
1376
|
-
next() {
|
1377
|
-
return iter.next();
|
1378
|
-
},
|
1379
|
-
[Symbol.asyncIterator]() {
|
1380
|
-
return this;
|
1381
|
-
},
|
1382
|
-
byPage: (settings) => {
|
1383
|
-
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1384
|
-
throw new Error("maxPageSize is not supported by this operation.");
|
1385
|
-
}
|
1386
|
-
return this.listAvailableLocalitiesPagingPage(countryCode, options, settings);
|
1387
|
-
},
|
1388
|
-
};
|
1389
|
-
}
|
1390
|
-
listAvailableLocalitiesPagingPage(countryCode, options, settings) {
|
1391
|
-
return tslib.__asyncGenerator(this, arguments, function* listAvailableLocalitiesPagingPage_1() {
|
1392
|
-
let result;
|
1393
|
-
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1394
|
-
if (!continuationToken) {
|
1395
|
-
result = yield tslib.__await(this._listAvailableLocalities(countryCode, options));
|
1396
|
-
let page = result.phoneNumberLocalities || [];
|
1397
|
-
continuationToken = result.nextLink;
|
1398
|
-
setContinuationToken(page, continuationToken);
|
1399
|
-
yield yield tslib.__await(page);
|
1400
|
-
}
|
1401
|
-
while (continuationToken) {
|
1402
|
-
result = yield tslib.__await(this._listAvailableLocalitiesNext(countryCode, continuationToken, options));
|
1403
|
-
continuationToken = result.nextLink;
|
1404
|
-
let page = result.phoneNumberLocalities || [];
|
1405
|
-
setContinuationToken(page, continuationToken);
|
1406
|
-
yield yield tslib.__await(page);
|
1407
|
-
}
|
1408
|
-
});
|
1409
|
-
}
|
1410
|
-
listAvailableLocalitiesPagingAll(countryCode, options) {
|
1411
|
-
return tslib.__asyncGenerator(this, arguments, function* listAvailableLocalitiesPagingAll_1() {
|
1412
|
-
var _a, e_3, _b, _c;
|
1413
|
-
try {
|
1414
|
-
for (var _d = true, _e = tslib.__asyncValues(this.listAvailableLocalitiesPagingPage(countryCode, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
1415
|
-
_c = _f.value;
|
1416
|
-
_d = false;
|
1417
|
-
const page = _c;
|
1418
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
1419
|
-
}
|
1420
|
-
}
|
1421
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
1422
|
-
finally {
|
1423
|
-
try {
|
1424
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
1425
|
-
}
|
1426
|
-
finally { if (e_3) throw e_3.error; }
|
1427
|
-
}
|
1428
|
-
});
|
1429
|
-
}
|
1430
|
-
/**
|
1431
|
-
* List available offerings of capabilities with rates for the given country.
|
1432
|
-
* @param countryCode The ISO 3166-2 country code, e.g. US.
|
1433
|
-
* @param options The options parameters.
|
1434
|
-
*/
|
1435
|
-
listOfferings(countryCode, options) {
|
1436
|
-
const iter = this.listOfferingsPagingAll(countryCode, options);
|
1437
|
-
return {
|
1438
|
-
next() {
|
1439
|
-
return iter.next();
|
1440
|
-
},
|
1441
|
-
[Symbol.asyncIterator]() {
|
1442
|
-
return this;
|
1443
|
-
},
|
1444
|
-
byPage: (settings) => {
|
1445
|
-
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1446
|
-
throw new Error("maxPageSize is not supported by this operation.");
|
1447
|
-
}
|
1448
|
-
return this.listOfferingsPagingPage(countryCode, options, settings);
|
1449
|
-
},
|
1450
|
-
};
|
1451
|
-
}
|
1452
|
-
listOfferingsPagingPage(countryCode, options, settings) {
|
1453
|
-
return tslib.__asyncGenerator(this, arguments, function* listOfferingsPagingPage_1() {
|
1454
|
-
let result;
|
1455
|
-
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1456
|
-
if (!continuationToken) {
|
1457
|
-
result = yield tslib.__await(this._listOfferings(countryCode, options));
|
1458
|
-
let page = result.phoneNumberOfferings || [];
|
1459
|
-
continuationToken = result.nextLink;
|
1460
|
-
setContinuationToken(page, continuationToken);
|
1461
|
-
yield yield tslib.__await(page);
|
1462
|
-
}
|
1463
|
-
while (continuationToken) {
|
1464
|
-
result = yield tslib.__await(this._listOfferingsNext(countryCode, continuationToken, options));
|
1465
|
-
continuationToken = result.nextLink;
|
1466
|
-
let page = result.phoneNumberOfferings || [];
|
1467
|
-
setContinuationToken(page, continuationToken);
|
1468
|
-
yield yield tslib.__await(page);
|
1469
|
-
}
|
1470
|
-
});
|
1471
|
-
}
|
1472
|
-
listOfferingsPagingAll(countryCode, options) {
|
1473
|
-
return tslib.__asyncGenerator(this, arguments, function* listOfferingsPagingAll_1() {
|
1474
|
-
var _a, e_4, _b, _c;
|
1475
|
-
try {
|
1476
|
-
for (var _d = true, _e = tslib.__asyncValues(this.listOfferingsPagingPage(countryCode, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
1477
|
-
_c = _f.value;
|
1478
|
-
_d = false;
|
1479
|
-
const page = _c;
|
1480
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
1481
|
-
}
|
1482
|
-
}
|
1483
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
1484
|
-
finally {
|
1485
|
-
try {
|
1486
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
1487
|
-
}
|
1488
|
-
finally { if (e_4) throw e_4.error; }
|
1489
|
-
}
|
1490
|
-
});
|
1491
|
-
}
|
1492
|
-
/**
|
1493
|
-
* Gets the list of all purchased phone numbers.
|
1494
|
-
* @param options The options parameters.
|
1495
|
-
*/
|
1496
|
-
listPhoneNumbers(options) {
|
1497
|
-
const iter = this.listPhoneNumbersPagingAll(options);
|
1498
|
-
return {
|
1499
|
-
next() {
|
1500
|
-
return iter.next();
|
1501
|
-
},
|
1502
|
-
[Symbol.asyncIterator]() {
|
1503
|
-
return this;
|
1504
|
-
},
|
1505
|
-
byPage: (settings) => {
|
1506
|
-
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1507
|
-
throw new Error("maxPageSize is not supported by this operation.");
|
1508
|
-
}
|
1509
|
-
return this.listPhoneNumbersPagingPage(options, settings);
|
1510
|
-
},
|
1511
|
-
};
|
1512
|
-
}
|
1513
|
-
listPhoneNumbersPagingPage(options, settings) {
|
1514
|
-
return tslib.__asyncGenerator(this, arguments, function* listPhoneNumbersPagingPage_1() {
|
1515
|
-
let result;
|
1516
|
-
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1517
|
-
if (!continuationToken) {
|
1518
|
-
result = yield tslib.__await(this._listPhoneNumbers(options));
|
1519
|
-
let page = result.phoneNumbers || [];
|
1520
|
-
continuationToken = result.nextLink;
|
1521
|
-
setContinuationToken(page, continuationToken);
|
1522
|
-
yield yield tslib.__await(page);
|
1523
|
-
}
|
1524
|
-
while (continuationToken) {
|
1525
|
-
result = yield tslib.__await(this._listPhoneNumbersNext(continuationToken, options));
|
1526
|
-
continuationToken = result.nextLink;
|
1527
|
-
let page = result.phoneNumbers || [];
|
1528
|
-
setContinuationToken(page, continuationToken);
|
1529
|
-
yield yield tslib.__await(page);
|
1530
|
-
}
|
1531
|
-
});
|
1532
|
-
}
|
1533
|
-
listPhoneNumbersPagingAll(options) {
|
1534
|
-
return tslib.__asyncGenerator(this, arguments, function* listPhoneNumbersPagingAll_1() {
|
1535
|
-
var _a, e_5, _b, _c;
|
1536
|
-
try {
|
1537
|
-
for (var _d = true, _e = tslib.__asyncValues(this.listPhoneNumbersPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
1538
|
-
_c = _f.value;
|
1539
|
-
_d = false;
|
1540
|
-
const page = _c;
|
1541
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
1542
|
-
}
|
1543
|
-
}
|
1544
|
-
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
1545
|
-
finally {
|
1546
|
-
try {
|
1547
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
1548
|
-
}
|
1549
|
-
finally { if (e_5) throw e_5.error; }
|
1550
|
-
}
|
1551
|
-
});
|
1552
|
-
}
|
1553
|
-
/**
|
1554
|
-
* Gets the list of available area codes.
|
1555
|
-
* @param countryCode The ISO 3166-2 country code, e.g. US.
|
1556
|
-
* @param phoneNumberType Filter by numberType, e.g. Geographic, TollFree.
|
1557
|
-
* @param options The options parameters.
|
1558
|
-
*/
|
1559
|
-
async _listAreaCodes(countryCode, phoneNumberType, options) {
|
1560
|
-
return tracingClient.withSpan("PhoneNumbersClient._listAreaCodes", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1561
|
-
return this.client.sendOperationRequest({ countryCode, phoneNumberType, options }, listAreaCodesOperationSpec);
|
1562
|
-
});
|
1563
|
-
}
|
1564
|
-
/**
|
1565
|
-
* Gets the list of supported countries.
|
1566
|
-
* @param options The options parameters.
|
1567
|
-
*/
|
1568
|
-
async _listAvailableCountries(options) {
|
1569
|
-
return tracingClient.withSpan("PhoneNumbersClient._listAvailableCountries", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1570
|
-
return this.client.sendOperationRequest({ options }, listAvailableCountriesOperationSpec);
|
1571
|
-
});
|
1572
|
-
}
|
1573
|
-
/**
|
1574
|
-
* Gets the list of cities or towns with available phone numbers.
|
1575
|
-
* @param countryCode The ISO 3166-2 country code, e.g. US.
|
1576
|
-
* @param options The options parameters.
|
1577
|
-
*/
|
1578
|
-
async _listAvailableLocalities(countryCode, options) {
|
1579
|
-
return tracingClient.withSpan("PhoneNumbersClient._listAvailableLocalities", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1580
|
-
return this.client.sendOperationRequest({ countryCode, options }, listAvailableLocalitiesOperationSpec);
|
1581
|
-
});
|
1582
|
-
}
|
1583
|
-
/**
|
1584
|
-
* List available offerings of capabilities with rates for the given country.
|
1585
|
-
* @param countryCode The ISO 3166-2 country code, e.g. US.
|
1586
|
-
* @param options The options parameters.
|
1587
|
-
*/
|
1588
|
-
async _listOfferings(countryCode, options) {
|
1589
|
-
return tracingClient.withSpan("PhoneNumbersClient._listOfferings", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1590
|
-
return this.client.sendOperationRequest({ countryCode, options }, listOfferingsOperationSpec);
|
1591
|
-
});
|
1592
|
-
}
|
1593
|
-
/**
|
1594
|
-
* Search for available phone numbers to purchase.
|
1595
|
-
* @param countryCode The ISO 3166-2 country code, e.g. US.
|
1596
|
-
* @param phoneNumberType The type of phone numbers to search for, e.g. geographic, or tollFree.
|
1597
|
-
* @param assignmentType The assignment type of the phone numbers to search for. A phone number can be
|
1598
|
-
* assigned to a person, or to an application.
|
1599
|
-
* @param capabilities Capabilities of a phone number.
|
1600
|
-
* @param options The options parameters.
|
1601
|
-
*/
|
1602
|
-
async beginSearchAvailablePhoneNumbers(countryCode, phoneNumberType, assignmentType, capabilities, options) {
|
1603
|
-
const directSendOperation = async (args, spec) => {
|
1604
|
-
return tracingClient.withSpan("PhoneNumbersClient.beginSearchAvailablePhoneNumbers", options !== null && options !== void 0 ? options : {}, async () => {
|
1605
|
-
return this.client.sendOperationRequest(args, spec);
|
1606
|
-
});
|
1607
|
-
};
|
1608
|
-
const sendOperationFn = async (args, spec) => {
|
1609
|
-
var _a;
|
1610
|
-
let currentRawResponse = undefined;
|
1611
|
-
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
1612
|
-
const callback = (rawResponse, flatResponse) => {
|
1613
|
-
currentRawResponse = rawResponse;
|
1614
|
-
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
1615
|
-
};
|
1616
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
1617
|
-
const flatResponse = await directSendOperation(updatedArgs, spec);
|
1618
|
-
return {
|
1619
|
-
flatResponse,
|
1620
|
-
rawResponse: {
|
1621
|
-
statusCode: currentRawResponse.status,
|
1622
|
-
body: currentRawResponse.parsedBody,
|
1623
|
-
headers: currentRawResponse.headers.toJSON(),
|
1624
|
-
},
|
1625
|
-
};
|
1626
|
-
};
|
1627
|
-
const lro = createLroSpec({
|
1628
|
-
sendOperationFn,
|
1629
|
-
args: {
|
1630
|
-
countryCode,
|
1631
|
-
phoneNumberType,
|
1632
|
-
assignmentType,
|
1633
|
-
capabilities,
|
1634
|
-
options,
|
1635
|
-
},
|
1636
|
-
spec: searchAvailablePhoneNumbersOperationSpec,
|
1637
|
-
});
|
1638
|
-
const poller = new coreLro.LroEngine(lro, {
|
1639
|
-
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
1640
|
-
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
1641
|
-
lroResourceLocationConfig: "location",
|
1642
|
-
});
|
1643
|
-
await poller.poll();
|
1644
|
-
return poller;
|
1645
|
-
}
|
1646
|
-
/**
|
1647
|
-
* Search for available phone numbers to purchase.
|
1648
|
-
* @param countryCode The ISO 3166-2 country code, e.g. US.
|
1649
|
-
* @param phoneNumberType The type of phone numbers to search for, e.g. geographic, or tollFree.
|
1650
|
-
* @param assignmentType The assignment type of the phone numbers to search for. A phone number can be
|
1651
|
-
* assigned to a person, or to an application.
|
1652
|
-
* @param capabilities Capabilities of a phone number.
|
1653
|
-
* @param options The options parameters.
|
1654
|
-
*/
|
1655
|
-
async beginSearchAvailablePhoneNumbersAndWait(countryCode, phoneNumberType, assignmentType, capabilities, options) {
|
1656
|
-
const poller = await this.beginSearchAvailablePhoneNumbers(countryCode, phoneNumberType, assignmentType, capabilities, options);
|
1657
|
-
return poller.pollUntilDone();
|
1658
|
-
}
|
1659
|
-
/**
|
1660
|
-
* Gets a phone number search result by search id.
|
1661
|
-
* @param searchId The search Id.
|
1662
|
-
* @param options The options parameters.
|
1663
|
-
*/
|
1664
|
-
async getSearchResult(searchId, options) {
|
1665
|
-
return tracingClient.withSpan("PhoneNumbersClient.getSearchResult", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1666
|
-
return this.client.sendOperationRequest({ searchId, options }, getSearchResultOperationSpec);
|
1667
|
-
});
|
1668
|
-
}
|
1669
|
-
/**
|
1670
|
-
* Purchases phone numbers.
|
1671
|
-
* @param options The options parameters.
|
1672
|
-
*/
|
1673
|
-
async beginPurchasePhoneNumbers(options) {
|
1674
|
-
const directSendOperation = async (args, spec) => {
|
1675
|
-
return tracingClient.withSpan("PhoneNumbersClient.beginPurchasePhoneNumbers", options !== null && options !== void 0 ? options : {}, async () => {
|
1676
|
-
return this.client.sendOperationRequest(args, spec);
|
1677
|
-
});
|
1678
|
-
};
|
1679
|
-
const sendOperationFn = async (args, spec) => {
|
1680
|
-
var _a;
|
1681
|
-
let currentRawResponse = undefined;
|
1682
|
-
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
1683
|
-
const callback = (rawResponse, flatResponse) => {
|
1684
|
-
currentRawResponse = rawResponse;
|
1685
|
-
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
1686
|
-
};
|
1687
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
1688
|
-
const flatResponse = await directSendOperation(updatedArgs, spec);
|
1689
|
-
return {
|
1690
|
-
flatResponse,
|
1691
|
-
rawResponse: {
|
1692
|
-
statusCode: currentRawResponse.status,
|
1693
|
-
body: currentRawResponse.parsedBody,
|
1694
|
-
headers: currentRawResponse.headers.toJSON(),
|
1695
|
-
},
|
1696
|
-
};
|
1697
|
-
};
|
1698
|
-
const lro = createLroSpec({
|
1699
|
-
sendOperationFn,
|
1700
|
-
args: { options },
|
1701
|
-
spec: purchasePhoneNumbersOperationSpec,
|
1702
|
-
});
|
1703
|
-
const poller = new coreLro.LroEngine(lro, {
|
1704
|
-
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
1705
|
-
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
1706
|
-
});
|
1707
|
-
await poller.poll();
|
1708
|
-
return poller;
|
1709
|
-
}
|
1710
|
-
/**
|
1711
|
-
* Purchases phone numbers.
|
1712
|
-
* @param options The options parameters.
|
1713
|
-
*/
|
1714
|
-
async beginPurchasePhoneNumbersAndWait(options) {
|
1715
|
-
const poller = await this.beginPurchasePhoneNumbers(options);
|
1716
|
-
return poller.pollUntilDone();
|
1717
|
-
}
|
1718
|
-
/**
|
1719
|
-
* Gets an operation by its id.
|
1720
|
-
* @param operationId The id of the operation
|
1721
|
-
* @param options The options parameters.
|
1722
|
-
*/
|
1723
|
-
async getOperation(operationId, options) {
|
1724
|
-
return tracingClient.withSpan("PhoneNumbersClient.getOperation", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1725
|
-
return this.client.sendOperationRequest({ operationId, options }, getOperationOperationSpec);
|
1726
|
-
});
|
1727
|
-
}
|
1728
|
-
/**
|
1729
|
-
* Cancels an operation by its id.
|
1730
|
-
* @param operationId The id of the operation
|
1731
|
-
* @param options The options parameters.
|
1732
|
-
*/
|
1733
|
-
async cancelOperation(operationId, options) {
|
1734
|
-
return tracingClient.withSpan("PhoneNumbersClient.cancelOperation", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1735
|
-
return this.client.sendOperationRequest({ operationId, options }, cancelOperationOperationSpec);
|
1736
|
-
});
|
1737
|
-
}
|
1738
|
-
/**
|
1739
|
-
* Updates the capabilities of a phone number.
|
1740
|
-
* @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded
|
1741
|
-
* as %2B, e.g. +11234567890.
|
1742
|
-
* @param options The options parameters.
|
1743
|
-
*/
|
1744
|
-
async beginUpdateCapabilities(phoneNumber, options) {
|
1745
|
-
const directSendOperation = async (args, spec) => {
|
1746
|
-
return tracingClient.withSpan("PhoneNumbersClient.beginUpdateCapabilities", options !== null && options !== void 0 ? options : {}, async () => {
|
1747
|
-
return this.client.sendOperationRequest(args, spec);
|
1748
|
-
});
|
1749
|
-
};
|
1750
|
-
const sendOperationFn = async (args, spec) => {
|
1751
|
-
var _a;
|
1752
|
-
let currentRawResponse = undefined;
|
1753
|
-
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
1754
|
-
const callback = (rawResponse, flatResponse) => {
|
1755
|
-
currentRawResponse = rawResponse;
|
1756
|
-
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
1757
|
-
};
|
1758
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
1759
|
-
const flatResponse = await directSendOperation(updatedArgs, spec);
|
1760
|
-
return {
|
1761
|
-
flatResponse,
|
1762
|
-
rawResponse: {
|
1763
|
-
statusCode: currentRawResponse.status,
|
1764
|
-
body: currentRawResponse.parsedBody,
|
1765
|
-
headers: currentRawResponse.headers.toJSON(),
|
1766
|
-
},
|
1767
|
-
};
|
1768
|
-
};
|
1769
|
-
const lro = createLroSpec({
|
1770
|
-
sendOperationFn,
|
1771
|
-
args: { phoneNumber, options },
|
1772
|
-
spec: updateCapabilitiesOperationSpec,
|
1773
|
-
});
|
1774
|
-
const poller = new coreLro.LroEngine(lro, {
|
1775
|
-
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
1776
|
-
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
1777
|
-
lroResourceLocationConfig: "location",
|
1778
|
-
});
|
1779
|
-
await poller.poll();
|
1780
|
-
return poller;
|
1781
|
-
}
|
1782
|
-
/**
|
1783
|
-
* Updates the capabilities of a phone number.
|
1784
|
-
* @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded
|
1785
|
-
* as %2B, e.g. +11234567890.
|
1786
|
-
* @param options The options parameters.
|
1787
|
-
*/
|
1788
|
-
async beginUpdateCapabilitiesAndWait(phoneNumber, options) {
|
1789
|
-
const poller = await this.beginUpdateCapabilities(phoneNumber, options);
|
1790
|
-
return poller.pollUntilDone();
|
1791
|
-
}
|
1792
|
-
/**
|
1793
|
-
* Gets the details of the given purchased phone number.
|
1794
|
-
* @param phoneNumber The purchased phone number whose details are to be fetched in E.164 format, e.g.
|
1795
|
-
* +11234567890.
|
1796
|
-
* @param options The options parameters.
|
1797
|
-
*/
|
1798
|
-
async getByNumber(phoneNumber, options) {
|
1799
|
-
return tracingClient.withSpan("PhoneNumbersClient.getByNumber", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1800
|
-
return this.client.sendOperationRequest({ phoneNumber, options }, getByNumberOperationSpec);
|
1801
|
-
});
|
1802
|
-
}
|
1803
|
-
/**
|
1804
|
-
* Releases a purchased phone number.
|
1805
|
-
* @param phoneNumber Phone number to be released, e.g. +11234567890.
|
1806
|
-
* @param options The options parameters.
|
1807
|
-
*/
|
1808
|
-
async beginReleasePhoneNumber(phoneNumber, options) {
|
1809
|
-
const directSendOperation = async (args, spec) => {
|
1810
|
-
return tracingClient.withSpan("PhoneNumbersClient.beginReleasePhoneNumber", options !== null && options !== void 0 ? options : {}, async () => {
|
1811
|
-
return this.client.sendOperationRequest(args, spec);
|
1812
|
-
});
|
1813
|
-
};
|
1814
|
-
const sendOperationFn = async (args, spec) => {
|
1815
|
-
var _a;
|
1816
|
-
let currentRawResponse = undefined;
|
1817
|
-
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
1818
|
-
const callback = (rawResponse, flatResponse) => {
|
1819
|
-
currentRawResponse = rawResponse;
|
1820
|
-
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
1821
|
-
};
|
1822
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
1823
|
-
const flatResponse = await directSendOperation(updatedArgs, spec);
|
1824
|
-
return {
|
1825
|
-
flatResponse,
|
1826
|
-
rawResponse: {
|
1827
|
-
statusCode: currentRawResponse.status,
|
1828
|
-
body: currentRawResponse.parsedBody,
|
1829
|
-
headers: currentRawResponse.headers.toJSON(),
|
1830
|
-
},
|
1831
|
-
};
|
1832
|
-
};
|
1833
|
-
const lro = createLroSpec({
|
1834
|
-
sendOperationFn,
|
1835
|
-
args: { phoneNumber, options },
|
1836
|
-
spec: releasePhoneNumberOperationSpec,
|
1837
|
-
});
|
1838
|
-
const poller = new coreLro.LroEngine(lro, {
|
1839
|
-
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
1840
|
-
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
1841
|
-
});
|
1842
|
-
await poller.poll();
|
1843
|
-
return poller;
|
1844
|
-
}
|
1845
|
-
/**
|
1846
|
-
* Releases a purchased phone number.
|
1847
|
-
* @param phoneNumber Phone number to be released, e.g. +11234567890.
|
1848
|
-
* @param options The options parameters.
|
1849
|
-
*/
|
1850
|
-
async beginReleasePhoneNumberAndWait(phoneNumber, options) {
|
1851
|
-
const poller = await this.beginReleasePhoneNumber(phoneNumber, options);
|
1852
|
-
return poller.pollUntilDone();
|
1853
|
-
}
|
1854
|
-
/**
|
1855
|
-
* Gets the list of all purchased phone numbers.
|
1856
|
-
* @param options The options parameters.
|
1857
|
-
*/
|
1858
|
-
async _listPhoneNumbers(options) {
|
1859
|
-
return tracingClient.withSpan("PhoneNumbersClient._listPhoneNumbers", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1860
|
-
return this.client.sendOperationRequest({ options }, listPhoneNumbersOperationSpec);
|
1861
|
-
});
|
1862
|
-
}
|
1863
|
-
/**
|
1864
|
-
* Searches for number format and operator information for a given list of phone numbers.
|
1865
|
-
* @param phoneNumbers Phone number(s) whose operator information is being requested
|
1866
|
-
* @param options The options parameters.
|
1867
|
-
*/
|
1868
|
-
async operatorInformationSearch(phoneNumbers, options) {
|
1869
|
-
return tracingClient.withSpan("PhoneNumbersClient.operatorInformationSearch", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1870
|
-
return this.client.sendOperationRequest({ phoneNumbers, options }, operatorInformationSearchOperationSpec);
|
1871
|
-
});
|
1872
|
-
}
|
1873
|
-
/**
|
1874
|
-
* ListAreaCodesNext
|
1875
|
-
* @param countryCode The ISO 3166-2 country code, e.g. US.
|
1876
|
-
* @param nextLink The nextLink from the previous successful call to the ListAreaCodes method.
|
1877
|
-
* @param options The options parameters.
|
1878
|
-
*/
|
1879
|
-
async _listAreaCodesNext(countryCode, nextLink, options) {
|
1880
|
-
return tracingClient.withSpan("PhoneNumbersClient._listAreaCodesNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1881
|
-
return this.client.sendOperationRequest({ countryCode, nextLink, options }, listAreaCodesNextOperationSpec);
|
1882
|
-
});
|
1883
|
-
}
|
1884
|
-
/**
|
1885
|
-
* ListAvailableCountriesNext
|
1886
|
-
* @param nextLink The nextLink from the previous successful call to the ListAvailableCountries method.
|
1887
|
-
* @param options The options parameters.
|
1888
|
-
*/
|
1889
|
-
async _listAvailableCountriesNext(nextLink, options) {
|
1890
|
-
return tracingClient.withSpan("PhoneNumbersClient._listAvailableCountriesNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1891
|
-
return this.client.sendOperationRequest({ nextLink, options }, listAvailableCountriesNextOperationSpec);
|
1892
|
-
});
|
1893
|
-
}
|
1894
|
-
/**
|
1895
|
-
* ListAvailableLocalitiesNext
|
1896
|
-
* @param countryCode The ISO 3166-2 country code, e.g. US.
|
1897
|
-
* @param nextLink The nextLink from the previous successful call to the ListAvailableLocalities
|
1898
|
-
* method.
|
1899
|
-
* @param options The options parameters.
|
1900
|
-
*/
|
1901
|
-
async _listAvailableLocalitiesNext(countryCode, nextLink, options) {
|
1902
|
-
return tracingClient.withSpan("PhoneNumbersClient._listAvailableLocalitiesNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1903
|
-
return this.client.sendOperationRequest({ countryCode, nextLink, options }, listAvailableLocalitiesNextOperationSpec);
|
1904
|
-
});
|
1905
|
-
}
|
1906
|
-
/**
|
1907
|
-
* ListOfferingsNext
|
1908
|
-
* @param countryCode The ISO 3166-2 country code, e.g. US.
|
1909
|
-
* @param nextLink The nextLink from the previous successful call to the ListOfferings method.
|
1910
|
-
* @param options The options parameters.
|
1911
|
-
*/
|
1912
|
-
async _listOfferingsNext(countryCode, nextLink, options) {
|
1913
|
-
return tracingClient.withSpan("PhoneNumbersClient._listOfferingsNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1914
|
-
return this.client.sendOperationRequest({ countryCode, nextLink, options }, listOfferingsNextOperationSpec);
|
1915
|
-
});
|
1916
|
-
}
|
1917
|
-
/**
|
1918
|
-
* ListPhoneNumbersNext
|
1919
|
-
* @param nextLink The nextLink from the previous successful call to the ListPhoneNumbers method.
|
1920
|
-
* @param options The options parameters.
|
1921
|
-
*/
|
1922
|
-
async _listPhoneNumbersNext(nextLink, options) {
|
1923
|
-
return tracingClient.withSpan("PhoneNumbersClient._listPhoneNumbersNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
1924
|
-
return this.client.sendOperationRequest({ nextLink, options }, listPhoneNumbersNextOperationSpec);
|
1925
|
-
});
|
1926
|
-
}
|
1927
|
-
}
|
1928
|
-
// Operation Specifications
|
1929
|
-
const serializer$1 = coreClient__namespace.createSerializer(Mappers$1, /* isXml */ false);
|
1930
|
-
const listAreaCodesOperationSpec = {
|
1931
|
-
path: "/availablePhoneNumbers/countries/{countryCode}/areaCodes",
|
1932
|
-
httpMethod: "GET",
|
1933
|
-
responses: {
|
1934
|
-
200: {
|
1935
|
-
bodyMapper: PhoneNumberAreaCodes,
|
1936
|
-
},
|
1937
|
-
default: {
|
1938
|
-
bodyMapper: CommunicationErrorResponse$1,
|
1939
|
-
},
|
1940
|
-
},
|
1941
|
-
queryParameters: [
|
1942
|
-
phoneNumberType,
|
1943
|
-
skip,
|
1944
|
-
maxPageSize,
|
1945
|
-
assignmentType,
|
1946
|
-
locality,
|
1947
|
-
administrativeDivision,
|
1948
|
-
apiVersion$1,
|
1949
|
-
],
|
1950
|
-
urlParameters: [endpoint$1, countryCode],
|
1951
|
-
headerParameters: [accept$1, acceptLanguage],
|
1952
|
-
serializer: serializer$1,
|
1953
|
-
};
|
1954
|
-
const listAvailableCountriesOperationSpec = {
|
1955
|
-
path: "/availablePhoneNumbers/countries",
|
1956
|
-
httpMethod: "GET",
|
1957
|
-
responses: {
|
1958
|
-
200: {
|
1959
|
-
bodyMapper: PhoneNumberCountries,
|
1960
|
-
},
|
1961
|
-
default: {
|
1962
|
-
bodyMapper: CommunicationErrorResponse$1,
|
1963
|
-
},
|
1964
|
-
},
|
1965
|
-
queryParameters: [
|
1966
|
-
skip,
|
1967
|
-
maxPageSize,
|
1968
|
-
apiVersion$1,
|
1969
|
-
],
|
1970
|
-
urlParameters: [endpoint$1],
|
1971
|
-
headerParameters: [accept$1, acceptLanguage],
|
1972
|
-
serializer: serializer$1,
|
1973
|
-
};
|
1974
|
-
const listAvailableLocalitiesOperationSpec = {
|
1975
|
-
path: "/availablePhoneNumbers/countries/{countryCode}/localities",
|
1976
|
-
httpMethod: "GET",
|
1977
|
-
responses: {
|
1978
|
-
200: {
|
1979
|
-
bodyMapper: PhoneNumberLocalities,
|
1980
|
-
},
|
1981
|
-
default: {
|
1982
|
-
bodyMapper: CommunicationErrorResponse$1,
|
1983
|
-
},
|
1984
|
-
},
|
1985
|
-
queryParameters: [
|
1986
|
-
skip,
|
1987
|
-
maxPageSize,
|
1988
|
-
administrativeDivision,
|
1989
|
-
apiVersion$1,
|
1990
|
-
],
|
1991
|
-
urlParameters: [endpoint$1, countryCode],
|
1992
|
-
headerParameters: [accept$1, acceptLanguage],
|
1993
|
-
serializer: serializer$1,
|
1994
|
-
};
|
1995
|
-
const listOfferingsOperationSpec = {
|
1996
|
-
path: "/availablePhoneNumbers/countries/{countryCode}/offerings",
|
1997
|
-
httpMethod: "GET",
|
1998
|
-
responses: {
|
1999
|
-
200: {
|
2000
|
-
bodyMapper: OfferingsResponse,
|
2001
|
-
},
|
2002
|
-
default: {
|
2003
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2004
|
-
},
|
2005
|
-
},
|
2006
|
-
queryParameters: [
|
2007
|
-
skip,
|
2008
|
-
maxPageSize,
|
2009
|
-
assignmentType,
|
2010
|
-
apiVersion$1,
|
2011
|
-
phoneNumberType1,
|
2012
|
-
],
|
2013
|
-
urlParameters: [endpoint$1, countryCode],
|
2014
|
-
headerParameters: [accept$1, acceptLanguage],
|
2015
|
-
serializer: serializer$1,
|
2016
|
-
};
|
2017
|
-
const searchAvailablePhoneNumbersOperationSpec = {
|
2018
|
-
path: "/availablePhoneNumbers/countries/{countryCode}/:search",
|
2019
|
-
httpMethod: "POST",
|
2020
|
-
responses: {
|
2021
|
-
200: {
|
2022
|
-
bodyMapper: PhoneNumberSearchResult,
|
2023
|
-
headersMapper: PhoneNumbersSearchAvailablePhoneNumbersHeaders,
|
2024
|
-
},
|
2025
|
-
201: {
|
2026
|
-
bodyMapper: PhoneNumberSearchResult,
|
2027
|
-
headersMapper: PhoneNumbersSearchAvailablePhoneNumbersHeaders,
|
2028
|
-
},
|
2029
|
-
202: {
|
2030
|
-
bodyMapper: PhoneNumberSearchResult,
|
2031
|
-
headersMapper: PhoneNumbersSearchAvailablePhoneNumbersHeaders,
|
2032
|
-
},
|
2033
|
-
204: {
|
2034
|
-
bodyMapper: PhoneNumberSearchResult,
|
2035
|
-
headersMapper: PhoneNumbersSearchAvailablePhoneNumbersHeaders,
|
2036
|
-
},
|
2037
|
-
default: {
|
2038
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2039
|
-
},
|
2040
|
-
},
|
2041
|
-
requestBody: {
|
2042
|
-
parameterPath: {
|
2043
|
-
phoneNumberType: ["phoneNumberType"],
|
2044
|
-
assignmentType: ["assignmentType"],
|
2045
|
-
capabilities: ["capabilities"],
|
2046
|
-
areaCode: ["options", "areaCode"],
|
2047
|
-
quantity: ["options", "quantity"],
|
2048
|
-
},
|
2049
|
-
mapper: Object.assign(Object.assign({}, PhoneNumberSearchRequest), { required: true }),
|
2050
|
-
},
|
2051
|
-
queryParameters: [apiVersion$1],
|
2052
|
-
urlParameters: [endpoint$1, countryCode],
|
2053
|
-
headerParameters: [accept$1, contentType$1],
|
2054
|
-
mediaType: "json",
|
2055
|
-
serializer: serializer$1,
|
2056
|
-
};
|
2057
|
-
const getSearchResultOperationSpec = {
|
2058
|
-
path: "/availablePhoneNumbers/searchResults/{searchId}",
|
2059
|
-
httpMethod: "GET",
|
2060
|
-
responses: {
|
2061
|
-
200: {
|
2062
|
-
bodyMapper: PhoneNumberSearchResult,
|
2063
|
-
},
|
2064
|
-
default: {
|
2065
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2066
|
-
},
|
2067
|
-
},
|
2068
|
-
queryParameters: [apiVersion$1],
|
2069
|
-
urlParameters: [endpoint$1, searchId],
|
2070
|
-
headerParameters: [accept$1],
|
2071
|
-
serializer: serializer$1,
|
2072
|
-
};
|
2073
|
-
const purchasePhoneNumbersOperationSpec = {
|
2074
|
-
path: "/availablePhoneNumbers/:purchase",
|
2075
|
-
httpMethod: "POST",
|
2076
|
-
responses: {
|
2077
|
-
200: {
|
2078
|
-
headersMapper: PhoneNumbersPurchasePhoneNumbersHeaders,
|
2079
|
-
},
|
2080
|
-
201: {
|
2081
|
-
headersMapper: PhoneNumbersPurchasePhoneNumbersHeaders,
|
2082
|
-
},
|
2083
|
-
202: {
|
2084
|
-
headersMapper: PhoneNumbersPurchasePhoneNumbersHeaders,
|
2085
|
-
},
|
2086
|
-
204: {
|
2087
|
-
headersMapper: PhoneNumbersPurchasePhoneNumbersHeaders,
|
2088
|
-
},
|
2089
|
-
default: {
|
2090
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2091
|
-
},
|
2092
|
-
},
|
2093
|
-
requestBody: {
|
2094
|
-
parameterPath: { searchId: ["options", "searchId"] },
|
2095
|
-
mapper: Object.assign(Object.assign({}, PhoneNumberPurchaseRequest), { required: true }),
|
2096
|
-
},
|
2097
|
-
queryParameters: [apiVersion$1],
|
2098
|
-
urlParameters: [endpoint$1],
|
2099
|
-
headerParameters: [accept$1, contentType$1],
|
2100
|
-
mediaType: "json",
|
2101
|
-
serializer: serializer$1,
|
2102
|
-
};
|
2103
|
-
const getOperationOperationSpec = {
|
2104
|
-
path: "/phoneNumbers/operations/{operationId}",
|
2105
|
-
httpMethod: "GET",
|
2106
|
-
responses: {
|
2107
|
-
200: {
|
2108
|
-
bodyMapper: PhoneNumberOperation,
|
2109
|
-
headersMapper: PhoneNumbersGetOperationHeaders,
|
2110
|
-
},
|
2111
|
-
default: {
|
2112
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2113
|
-
},
|
2114
|
-
},
|
2115
|
-
queryParameters: [apiVersion$1],
|
2116
|
-
urlParameters: [endpoint$1, operationId],
|
2117
|
-
headerParameters: [accept$1],
|
2118
|
-
serializer: serializer$1,
|
2119
|
-
};
|
2120
|
-
const cancelOperationOperationSpec = {
|
2121
|
-
path: "/phoneNumbers/operations/{operationId}",
|
2122
|
-
httpMethod: "DELETE",
|
2123
|
-
responses: {
|
2124
|
-
204: {},
|
2125
|
-
default: {
|
2126
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2127
|
-
},
|
2128
|
-
},
|
2129
|
-
queryParameters: [apiVersion$1],
|
2130
|
-
urlParameters: [endpoint$1, operationId],
|
2131
|
-
headerParameters: [accept$1],
|
2132
|
-
serializer: serializer$1,
|
2133
|
-
};
|
2134
|
-
const updateCapabilitiesOperationSpec = {
|
2135
|
-
path: "/phoneNumbers/{phoneNumber}/capabilities",
|
2136
|
-
httpMethod: "PATCH",
|
2137
|
-
responses: {
|
2138
|
-
200: {
|
2139
|
-
bodyMapper: PurchasedPhoneNumber,
|
2140
|
-
headersMapper: PhoneNumbersUpdateCapabilitiesHeaders,
|
2141
|
-
},
|
2142
|
-
201: {
|
2143
|
-
bodyMapper: PurchasedPhoneNumber,
|
2144
|
-
headersMapper: PhoneNumbersUpdateCapabilitiesHeaders,
|
2145
|
-
},
|
2146
|
-
202: {
|
2147
|
-
bodyMapper: PurchasedPhoneNumber,
|
2148
|
-
headersMapper: PhoneNumbersUpdateCapabilitiesHeaders,
|
2149
|
-
},
|
2150
|
-
204: {
|
2151
|
-
bodyMapper: PurchasedPhoneNumber,
|
2152
|
-
headersMapper: PhoneNumbersUpdateCapabilitiesHeaders,
|
2153
|
-
},
|
2154
|
-
default: {
|
2155
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2156
|
-
},
|
2157
|
-
},
|
2158
|
-
requestBody: {
|
2159
|
-
parameterPath: { calling: ["options", "calling"], sms: ["options", "sms"] },
|
2160
|
-
mapper: PhoneNumberCapabilitiesRequest,
|
2161
|
-
},
|
2162
|
-
queryParameters: [apiVersion$1],
|
2163
|
-
urlParameters: [endpoint$1, phoneNumber],
|
2164
|
-
headerParameters: [accept$1, contentType1],
|
2165
|
-
mediaType: "json",
|
2166
|
-
serializer: serializer$1,
|
2167
|
-
};
|
2168
|
-
const getByNumberOperationSpec = {
|
2169
|
-
path: "/phoneNumbers/{phoneNumber}",
|
2170
|
-
httpMethod: "GET",
|
2171
|
-
responses: {
|
2172
|
-
200: {
|
2173
|
-
bodyMapper: PurchasedPhoneNumber,
|
2174
|
-
},
|
2175
|
-
default: {
|
2176
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2177
|
-
},
|
2178
|
-
},
|
2179
|
-
queryParameters: [apiVersion$1],
|
2180
|
-
urlParameters: [endpoint$1, phoneNumber],
|
2181
|
-
headerParameters: [accept$1],
|
2182
|
-
serializer: serializer$1,
|
2183
|
-
};
|
2184
|
-
const releasePhoneNumberOperationSpec = {
|
2185
|
-
path: "/phoneNumbers/{phoneNumber}",
|
2186
|
-
httpMethod: "DELETE",
|
2187
|
-
responses: {
|
2188
|
-
200: {
|
2189
|
-
headersMapper: PhoneNumbersReleasePhoneNumberHeaders,
|
2190
|
-
},
|
2191
|
-
201: {
|
2192
|
-
headersMapper: PhoneNumbersReleasePhoneNumberHeaders,
|
2193
|
-
},
|
2194
|
-
202: {
|
2195
|
-
headersMapper: PhoneNumbersReleasePhoneNumberHeaders,
|
2196
|
-
},
|
2197
|
-
204: {
|
2198
|
-
headersMapper: PhoneNumbersReleasePhoneNumberHeaders,
|
2199
|
-
},
|
2200
|
-
default: {
|
2201
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2202
|
-
},
|
2203
|
-
},
|
2204
|
-
queryParameters: [apiVersion$1],
|
2205
|
-
urlParameters: [endpoint$1, phoneNumber],
|
2206
|
-
headerParameters: [accept$1],
|
2207
|
-
serializer: serializer$1,
|
2208
|
-
};
|
2209
|
-
const listPhoneNumbersOperationSpec = {
|
2210
|
-
path: "/phoneNumbers",
|
2211
|
-
httpMethod: "GET",
|
2212
|
-
responses: {
|
2213
|
-
200: {
|
2214
|
-
bodyMapper: PurchasedPhoneNumbers,
|
2215
|
-
},
|
2216
|
-
default: {
|
2217
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2218
|
-
},
|
2219
|
-
},
|
2220
|
-
queryParameters: [skip, apiVersion$1, top],
|
2221
|
-
urlParameters: [endpoint$1],
|
2222
|
-
headerParameters: [accept$1],
|
2223
|
-
serializer: serializer$1,
|
2224
|
-
};
|
2225
|
-
const operatorInformationSearchOperationSpec = {
|
2226
|
-
path: "/operatorInformation/:search",
|
2227
|
-
httpMethod: "POST",
|
2228
|
-
responses: {
|
2229
|
-
200: {
|
2230
|
-
bodyMapper: OperatorInformationResult,
|
2231
|
-
},
|
2232
|
-
default: {
|
2233
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2234
|
-
},
|
2235
|
-
},
|
2236
|
-
requestBody: {
|
2237
|
-
parameterPath: {
|
2238
|
-
phoneNumbers: ["phoneNumbers"],
|
2239
|
-
options: ["options", "options"],
|
2240
|
-
},
|
2241
|
-
mapper: Object.assign(Object.assign({}, OperatorInformationRequest), { required: true }),
|
2242
|
-
},
|
2243
|
-
queryParameters: [apiVersion$1],
|
2244
|
-
urlParameters: [endpoint$1],
|
2245
|
-
headerParameters: [accept$1, contentType$1],
|
2246
|
-
mediaType: "json",
|
2247
|
-
serializer: serializer$1,
|
2248
|
-
};
|
2249
|
-
const listAreaCodesNextOperationSpec = {
|
2250
|
-
path: "{nextLink}",
|
2251
|
-
httpMethod: "GET",
|
2252
|
-
responses: {
|
2253
|
-
200: {
|
2254
|
-
bodyMapper: PhoneNumberAreaCodes,
|
2255
|
-
},
|
2256
|
-
default: {
|
2257
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2258
|
-
},
|
2259
|
-
},
|
2260
|
-
urlParameters: [
|
2261
|
-
endpoint$1,
|
2262
|
-
countryCode,
|
2263
|
-
nextLink,
|
2264
|
-
],
|
2265
|
-
headerParameters: [accept$1, acceptLanguage],
|
2266
|
-
serializer: serializer$1,
|
2267
|
-
};
|
2268
|
-
const listAvailableCountriesNextOperationSpec = {
|
2269
|
-
path: "{nextLink}",
|
2270
|
-
httpMethod: "GET",
|
2271
|
-
responses: {
|
2272
|
-
200: {
|
2273
|
-
bodyMapper: PhoneNumberCountries,
|
2274
|
-
},
|
2275
|
-
default: {
|
2276
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2277
|
-
},
|
2278
|
-
},
|
2279
|
-
urlParameters: [endpoint$1, nextLink],
|
2280
|
-
headerParameters: [accept$1, acceptLanguage],
|
2281
|
-
serializer: serializer$1,
|
2282
|
-
};
|
2283
|
-
const listAvailableLocalitiesNextOperationSpec = {
|
2284
|
-
path: "{nextLink}",
|
2285
|
-
httpMethod: "GET",
|
2286
|
-
responses: {
|
2287
|
-
200: {
|
2288
|
-
bodyMapper: PhoneNumberLocalities,
|
2289
|
-
},
|
2290
|
-
default: {
|
2291
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2292
|
-
},
|
2293
|
-
},
|
2294
|
-
urlParameters: [
|
2295
|
-
endpoint$1,
|
2296
|
-
countryCode,
|
2297
|
-
nextLink,
|
2298
|
-
],
|
2299
|
-
headerParameters: [accept$1, acceptLanguage],
|
2300
|
-
serializer: serializer$1,
|
2301
|
-
};
|
2302
|
-
const listOfferingsNextOperationSpec = {
|
2303
|
-
path: "{nextLink}",
|
2304
|
-
httpMethod: "GET",
|
2305
|
-
responses: {
|
2306
|
-
200: {
|
2307
|
-
bodyMapper: OfferingsResponse,
|
2308
|
-
},
|
2309
|
-
default: {
|
2310
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2311
|
-
},
|
2312
|
-
},
|
2313
|
-
urlParameters: [
|
2314
|
-
endpoint$1,
|
2315
|
-
countryCode,
|
2316
|
-
nextLink,
|
2317
|
-
],
|
2318
|
-
headerParameters: [accept$1, acceptLanguage],
|
2319
|
-
serializer: serializer$1,
|
2320
|
-
};
|
2321
|
-
const listPhoneNumbersNextOperationSpec = {
|
2322
|
-
path: "{nextLink}",
|
2323
|
-
httpMethod: "GET",
|
2324
|
-
responses: {
|
2325
|
-
200: {
|
2326
|
-
bodyMapper: PurchasedPhoneNumbers,
|
2327
|
-
},
|
2328
|
-
default: {
|
2329
|
-
bodyMapper: CommunicationErrorResponse$1,
|
2330
|
-
},
|
2331
|
-
},
|
2332
|
-
urlParameters: [endpoint$1, nextLink],
|
2333
|
-
headerParameters: [accept$1],
|
2334
|
-
serializer: serializer$1,
|
2335
|
-
};
|
2336
|
-
|
2337
|
-
/*
|
2338
|
-
* Copyright (c) Microsoft Corporation.
|
2339
|
-
* Licensed under the MIT License.
|
2340
|
-
*
|
2341
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
2342
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
2343
|
-
*/
|
2344
|
-
let PhoneNumbersClient$1 = class PhoneNumbersClient extends coreClient__namespace.ServiceClient {
|
2345
|
-
/**
|
2346
|
-
* Initializes a new instance of the PhoneNumbersClient class.
|
2347
|
-
* @param endpoint The communication resource, for example https://resourcename.communication.azure.com
|
2348
|
-
* @param options The parameter options
|
2349
|
-
*/
|
2350
|
-
constructor(endpoint, options) {
|
2351
|
-
var _a, _b;
|
2352
|
-
if (endpoint === undefined) {
|
2353
|
-
throw new Error("'endpoint' cannot be null");
|
2354
|
-
}
|
2355
|
-
// Initializing default values for options
|
2356
|
-
if (!options) {
|
2357
|
-
options = {};
|
2358
|
-
}
|
2359
|
-
const defaults = {
|
2360
|
-
requestContentType: "application/json; charset=utf-8",
|
2361
|
-
};
|
2362
|
-
const packageDetails = `azsdk-js-communication-phone-numbers/1.2.1`;
|
2363
|
-
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
2364
|
-
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
2365
|
-
: `${packageDetails}`;
|
2366
|
-
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
2367
|
-
userAgentPrefix,
|
2368
|
-
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
|
2369
|
-
super(optionsWithDefaults);
|
2370
|
-
// Parameter assignments
|
2371
|
-
this.endpoint = endpoint;
|
2372
|
-
// Assigning values to Constant parameters
|
2373
|
-
this.apiVersion = options.apiVersion || "2024-03-01-preview";
|
2374
|
-
this.phoneNumbers = new PhoneNumbersImpl(this);
|
2375
|
-
this.addCustomApiVersionPolicy(options.apiVersion);
|
2376
|
-
}
|
2377
|
-
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
2378
|
-
addCustomApiVersionPolicy(apiVersion) {
|
2379
|
-
if (!apiVersion) {
|
2380
|
-
return;
|
2381
|
-
}
|
2382
|
-
const apiVersionPolicy = {
|
2383
|
-
name: "CustomApiVersionPolicy",
|
2384
|
-
async sendRequest(request, next) {
|
2385
|
-
const param = request.url.split("?");
|
2386
|
-
if (param.length > 1) {
|
2387
|
-
const newParams = param[1].split("&").map((item) => {
|
2388
|
-
if (item.indexOf("api-version") > -1) {
|
2389
|
-
return "api-version=" + apiVersion;
|
2390
|
-
}
|
2391
|
-
else {
|
2392
|
-
return item;
|
2393
|
-
}
|
2394
|
-
});
|
2395
|
-
request.url = param[0] + "?" + newParams.join("&");
|
2396
|
-
}
|
2397
|
-
return next(request);
|
2398
|
-
},
|
2399
|
-
};
|
2400
|
-
this.pipeline.addPolicy(apiVersionPolicy);
|
2401
|
-
}
|
2402
|
-
};
|
2403
|
-
|
2404
|
-
// Copyright (c) Microsoft Corporation.
|
2405
|
-
// Licensed under the MIT License.
|
2406
|
-
/**
|
2407
|
-
* Creates a `PipelinePolicy` that converts relative URL values in the `nextLink` property to absolute URLs.
|
2408
|
-
*
|
2409
|
-
* This is necessary because the Core V2 library does not support paging with relative links at time of writing.
|
2410
|
-
*
|
2411
|
-
* @param host - The base URL of the resource.
|
2412
|
-
* @returns the `PipelinePolicy` that addresses the issue.
|
2413
|
-
*/
|
2414
|
-
function createPhoneNumbersPagingPolicy(host) {
|
2415
|
-
return {
|
2416
|
-
name: "phoneNumbersPagingPolicy",
|
2417
|
-
async sendRequest(request, next) {
|
2418
|
-
var _a;
|
2419
|
-
const response = await next(request);
|
2420
|
-
let nextLink = (_a = response === null || response === void 0 ? void 0 : response.parsedBody) === null || _a === void 0 ? void 0 : _a.nextLink;
|
2421
|
-
if (nextLink && !nextLink.startsWith(host)) {
|
2422
|
-
nextLink = host.endsWith("/") ? nextLink.substring(1) : nextLink;
|
2423
|
-
const absolutePath = `${host}${nextLink}`;
|
2424
|
-
response.parsedBody.nextLink = absolutePath;
|
2425
|
-
}
|
2426
|
-
return response;
|
2427
|
-
},
|
2428
|
-
};
|
2429
|
-
}
|
2430
|
-
|
2431
|
-
// Copyright (c) Microsoft Corporation.
|
2432
|
-
// Licensed under the MIT License.
|
2433
|
-
/**
|
2434
|
-
* The \@azure\/logger configuration for this package.
|
2435
|
-
*/
|
2436
|
-
const logger = logger$1.createClientLogger("communication-phone-numbers");
|
2437
|
-
|
2438
|
-
// Copyright (c) Microsoft Corporation.
|
2439
|
-
// Licensed under the MIT License.
|
2440
|
-
/// <reference lib="esnext.asynciterable" />
|
2441
|
-
const isPhoneNumbersClientOptions = (options) => options && !communicationCommon.isKeyCredential(options) && !coreAuth.isTokenCredential(options);
|
2442
|
-
/**
|
2443
|
-
* Client class for interacting with Azure Communication Services Phone Number Administration.
|
2444
|
-
*/
|
2445
|
-
class PhoneNumbersClient {
|
2446
|
-
constructor(connectionStringOrUrl, credentialOrOptions, maybeOptions = {}) {
|
2447
|
-
const { url, credential } = communicationCommon.parseClientArguments(connectionStringOrUrl, credentialOrOptions);
|
2448
|
-
const options = isPhoneNumbersClientOptions(credentialOrOptions)
|
2449
|
-
? credentialOrOptions
|
2450
|
-
: maybeOptions;
|
2451
|
-
const internalPipelineOptions = Object.assign(Object.assign({}, options), {
|
2452
|
-
loggingOptions: {
|
2453
|
-
logger: logger.info,
|
2454
|
-
},
|
2455
|
-
});
|
2456
|
-
this.client = new PhoneNumbersClient$1(url, Object.assign({ endpoint: url }, internalPipelineOptions));
|
2457
|
-
const authPolicy = communicationCommon.createCommunicationAuthPolicy(credential);
|
2458
|
-
this.client.pipeline.addPolicy(authPolicy);
|
2459
|
-
// This policy is temporary workarounds to address compatibility issues with Azure Core V2.
|
2460
|
-
const phoneNumbersPagingPolicy = createPhoneNumbersPagingPolicy(url);
|
2461
|
-
this.client.pipeline.addPolicy(phoneNumbersPagingPolicy);
|
2462
|
-
this.acceptLanguage = maybeOptions.acceptLanguage;
|
2463
|
-
}
|
2464
|
-
/**
|
2465
|
-
* Gets the details of a purchased phone number. Includes phone number, cost, country code, etc.
|
2466
|
-
*
|
2467
|
-
* @param phoneNumber - The E.164 formatted phone number being fetched. The leading plus can be either + or encoded as %2B.
|
2468
|
-
* @param options - Additional request options.
|
2469
|
-
*/
|
2470
|
-
getPurchasedPhoneNumber(phoneNumber, options = {}) {
|
2471
|
-
return tracingClient.withSpan("PhoneNumbersClient-getPurchasedPhoneNumber", options, (updatedOptions) => {
|
2472
|
-
return this.client.phoneNumbers.getByNumber(phoneNumber, Object.assign({}, updatedOptions));
|
2473
|
-
});
|
2474
|
-
}
|
2475
|
-
/**
|
2476
|
-
* Iterates the purchased phone numbers.
|
2477
|
-
*
|
2478
|
-
* Example usage:
|
2479
|
-
* ```ts
|
2480
|
-
* let client = new PhoneNumbersClient(credentials);
|
2481
|
-
* for await (const purchased of client.listPhoneNumbers()) {
|
2482
|
-
* console.log("phone number: ", purchased.phoneNumber);
|
2483
|
-
* }
|
2484
|
-
* ```
|
2485
|
-
* List all purchased phone numbers.
|
2486
|
-
* @param options - The optional parameters.
|
2487
|
-
*/
|
2488
|
-
listPurchasedPhoneNumbers(options = {}) {
|
2489
|
-
const { span, updatedOptions } = tracingClient.startSpan("PhoneNumbersClient-listPurchasedPhoneNumbers", options);
|
2490
|
-
try {
|
2491
|
-
return this.client.phoneNumbers.listPhoneNumbers(Object.assign({}, updatedOptions));
|
2492
|
-
}
|
2493
|
-
catch (e) {
|
2494
|
-
span.setStatus({
|
2495
|
-
status: "error",
|
2496
|
-
error: e,
|
2497
|
-
});
|
2498
|
-
throw e;
|
2499
|
-
}
|
2500
|
-
finally {
|
2501
|
-
span.end();
|
2502
|
-
}
|
2503
|
-
}
|
2504
|
-
/**
|
2505
|
-
* Starts the release of a purchased phone number.
|
2506
|
-
*
|
2507
|
-
* This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.
|
2508
|
-
*
|
2509
|
-
* Example usage:
|
2510
|
-
* ```ts
|
2511
|
-
* const client = new PhoneNumbersClient(CONNECTION_STRING);
|
2512
|
-
* const releasePoller = await client.beginReleasePhoneNumber("+14125550100");
|
2513
|
-
*
|
2514
|
-
* // Serializing the poller
|
2515
|
-
* const serialized = releasePoller.toString();
|
2516
|
-
*
|
2517
|
-
* // Waiting until it's done
|
2518
|
-
* const results = await releasePoller.pollUntilDone();
|
2519
|
-
* console.log(results);
|
2520
|
-
* ```
|
2521
|
-
* @param phoneNumber - The E.164 formatted phone number being released. The leading plus can be either + or encoded as %2B.
|
2522
|
-
* @param options - Additional request options.
|
2523
|
-
*/
|
2524
|
-
beginReleasePhoneNumber(phoneNumber, options = {}) {
|
2525
|
-
return tracingClient.withSpan("PhoneNumbersClient-beginReleasePhoneNumber", options, (updatedOptions) => {
|
2526
|
-
return this.client.phoneNumbers.beginReleasePhoneNumber(phoneNumber, updatedOptions);
|
2527
|
-
});
|
2528
|
-
}
|
2529
|
-
/**
|
2530
|
-
* Starts a search for phone numbers given some constraints such as name or area code.
|
2531
|
-
* The phone numbers that are found are reserved until you cancel, purchase or the reservation expires.
|
2532
|
-
*
|
2533
|
-
* This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.
|
2534
|
-
*
|
2535
|
-
* Example usage:
|
2536
|
-
* ```ts
|
2537
|
-
* const client = new PhoneNumberAdministrationClient(CONNECTION_STRING);
|
2538
|
-
* const searchPoller = await client.beginSearchAvailablePhoneNumbers(SEARCH_REQUEST);
|
2539
|
-
*
|
2540
|
-
* // Serializing the poller
|
2541
|
-
* const serialized = searchPoller.toString();
|
2542
|
-
*
|
2543
|
-
* // Waiting until it's done
|
2544
|
-
* const results = await searchPoller.pollUntilDone();
|
2545
|
-
* console.log(results);
|
2546
|
-
* ```
|
2547
|
-
*
|
2548
|
-
* @param search - Request properties to constraint the search scope.
|
2549
|
-
* @param options - Additional request options.
|
2550
|
-
*/
|
2551
|
-
beginSearchAvailablePhoneNumbers(search, options = {}) {
|
2552
|
-
return tracingClient.withSpan("PhoneNumbersClient-beginSearchAvailablePhoneNumbers", options, (updatedOptions) => {
|
2553
|
-
const { countryCode, phoneNumberType, assignmentType, capabilities } = search, rest = tslib.__rest(search, ["countryCode", "phoneNumberType", "assignmentType", "capabilities"]);
|
2554
|
-
return this.client.phoneNumbers.beginSearchAvailablePhoneNumbers(countryCode, phoneNumberType, assignmentType, capabilities, Object.assign(Object.assign({}, updatedOptions), rest));
|
2555
|
-
});
|
2556
|
-
}
|
2557
|
-
/**
|
2558
|
-
* Starts the purchase of the phone number(s) in the search associated with a given id.
|
2559
|
-
*
|
2560
|
-
* This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.
|
2561
|
-
*
|
2562
|
-
* Example usage:
|
2563
|
-
* ```ts
|
2564
|
-
* const client = new PhoneNumbersClient(CONNECTION_STRING);
|
2565
|
-
* const purchasePoller = await client.beginPurchasePhoneNumbers(SEARCH_ID);
|
2566
|
-
*
|
2567
|
-
* // Serializing the poller
|
2568
|
-
* const serialized = purchasePoller.toString();
|
2569
|
-
*
|
2570
|
-
* // Waiting until it's done
|
2571
|
-
* const results = await purchasePoller.pollUntilDone();
|
2572
|
-
* console.log(results);
|
2573
|
-
* ```
|
2574
|
-
*
|
2575
|
-
* @param searchId - The id of the search to purchase. Returned from `beginSearchAvailablePhoneNumbers`
|
2576
|
-
* @param options - Additional request options.
|
2577
|
-
*/
|
2578
|
-
beginPurchasePhoneNumbers(searchId, options = {}) {
|
2579
|
-
return tracingClient.withSpan("PhoneNumbersClient-beginPurchasePhoneNumbers", options, (updatedOptions) => {
|
2580
|
-
return this.client.phoneNumbers.beginPurchasePhoneNumbers(Object.assign(Object.assign({}, updatedOptions), { searchId }));
|
2581
|
-
});
|
2582
|
-
}
|
2583
|
-
/**
|
2584
|
-
* Starts the update of a purchased phone number's capabilities.
|
2585
|
-
*
|
2586
|
-
* This function returns a Long Running Operation poller that allows you to wait indefinitely until the operation is complete.
|
2587
|
-
*
|
2588
|
-
* Example usage:
|
2589
|
-
* ```ts
|
2590
|
-
* const client = new PhoneNumbersClient(CONNECTION_STRING);
|
2591
|
-
* const updatePoller = await client.beginUpdatePhoneNumberCapabilities("+14125550100", UPDATE_REQUEST);
|
2592
|
-
*
|
2593
|
-
* // Serializing the poller
|
2594
|
-
* const serialized = updatePoller.toString();
|
2595
|
-
*
|
2596
|
-
* // Waiting until it's done
|
2597
|
-
* const results = await updatePoller.pollUntilDone();
|
2598
|
-
* console.log(results);
|
2599
|
-
* ```
|
2600
|
-
*
|
2601
|
-
* @param phoneNumber - The E.164 formatted phone number being updated. The leading plus can be either + or encoded as %2B.
|
2602
|
-
* @param request - The updated properties which will be applied to the phone number.
|
2603
|
-
* @param options - Additional request options.
|
2604
|
-
*/
|
2605
|
-
beginUpdatePhoneNumberCapabilities(phoneNumber, request, options = {}) {
|
2606
|
-
if (!phoneNumber) {
|
2607
|
-
throw Error("phone number can't be empty");
|
2608
|
-
}
|
2609
|
-
return tracingClient.withSpan("PhoneNumbersClient-beginUpdatePhoneNumberCapabilities", options, (updatedOptions) => {
|
2610
|
-
return this.client.phoneNumbers.beginUpdateCapabilities(phoneNumber, Object.assign(Object.assign({}, updatedOptions), request));
|
2611
|
-
});
|
2612
|
-
}
|
2613
|
-
/**
|
2614
|
-
* Iterates the available countries.
|
2615
|
-
*
|
2616
|
-
* Example usage:
|
2617
|
-
* ```ts
|
2618
|
-
* let client = new PhoneNumbersClient(credentials);
|
2619
|
-
* for await (const country of client.listAvailableCountries()) {
|
2620
|
-
* console.log("country: ", country.localizedName);
|
2621
|
-
* }
|
2622
|
-
* ```
|
2623
|
-
* List all available countries.
|
2624
|
-
* @param options - The optional parameters.
|
2625
|
-
*/
|
2626
|
-
listAvailableCountries(options = {}) {
|
2627
|
-
const { span, updatedOptions } = tracingClient.startSpan("PhoneNumbersClient-listAvailableCountries", options);
|
2628
|
-
try {
|
2629
|
-
return this.client.phoneNumbers.listAvailableCountries(Object.assign(Object.assign({}, updatedOptions), { acceptLanguage: this.acceptLanguage }));
|
2630
|
-
}
|
2631
|
-
catch (e) {
|
2632
|
-
span.setStatus({
|
2633
|
-
status: "error",
|
2634
|
-
error: e,
|
2635
|
-
});
|
2636
|
-
throw e;
|
2637
|
-
}
|
2638
|
-
finally {
|
2639
|
-
span.end();
|
2640
|
-
}
|
2641
|
-
}
|
2642
|
-
/**
|
2643
|
-
* Iterates the available Toll-Free area codes.
|
2644
|
-
*
|
2645
|
-
* Example usage:
|
2646
|
-
* ```ts
|
2647
|
-
* let client = new PhoneNumbersClient(credentials);
|
2648
|
-
* for await (const areaCodeItem of client.listTollFreeAreaCodes()) {
|
2649
|
-
* console.log("area code: ", areaCodeItem.areaCode);
|
2650
|
-
* }
|
2651
|
-
* ```
|
2652
|
-
* List all available Toll-Free area codes.
|
2653
|
-
* @param countryCode - The ISO 3166-2 country code.
|
2654
|
-
* @param options - The optional parameters.
|
2655
|
-
*/
|
2656
|
-
listAvailableTollFreeAreaCodes(countryCode, options = {}) {
|
2657
|
-
const { span, updatedOptions } = tracingClient.startSpan("PhoneNumbersClient-listAvailableTollFreeAreaCodes", options);
|
2658
|
-
try {
|
2659
|
-
return this.client.phoneNumbers.listAreaCodes(countryCode, "tollFree", Object.assign(Object.assign({}, updatedOptions), { assignmentType: "application" }));
|
2660
|
-
}
|
2661
|
-
catch (e) {
|
2662
|
-
span.setStatus({
|
2663
|
-
status: "error",
|
2664
|
-
error: e,
|
2665
|
-
});
|
2666
|
-
throw e;
|
2667
|
-
}
|
2668
|
-
finally {
|
2669
|
-
span.end();
|
2670
|
-
}
|
2671
|
-
}
|
2672
|
-
/**
|
2673
|
-
* Iterates the available Geographic area codes.
|
2674
|
-
*
|
2675
|
-
* Example usage:
|
2676
|
-
* ```ts
|
2677
|
-
* let client = new PhoneNumbersClient(credentials);
|
2678
|
-
* for await (const areaCodeItem of client.listGeographicAreaCodes()) {
|
2679
|
-
* console.log("area code: ", areaCodeItem.areaCode);
|
2680
|
-
* }
|
2681
|
-
* ```
|
2682
|
-
* List all available Geographic area codes.
|
2683
|
-
* @param countryCode - The ISO 3166-2 country code.
|
2684
|
-
* @param options - The optional parameters.
|
2685
|
-
*/
|
2686
|
-
listAvailableGeographicAreaCodes(countryCode, options = {}) {
|
2687
|
-
const { span, updatedOptions } = tracingClient.startSpan("PhoneNumbersClient-listAvailableGeographicFreeAreaCodes", options);
|
2688
|
-
try {
|
2689
|
-
return this.client.phoneNumbers.listAreaCodes(countryCode, "geographic", Object.assign({}, updatedOptions));
|
2690
|
-
}
|
2691
|
-
catch (e) {
|
2692
|
-
span.setStatus({
|
2693
|
-
status: "error",
|
2694
|
-
error: e,
|
2695
|
-
});
|
2696
|
-
throw e;
|
2697
|
-
}
|
2698
|
-
finally {
|
2699
|
-
span.end();
|
2700
|
-
}
|
2701
|
-
}
|
2702
|
-
/**
|
2703
|
-
* Iterates the available localities.
|
2704
|
-
*
|
2705
|
-
* Example usage:
|
2706
|
-
* ```ts
|
2707
|
-
* let client = new PhoneNumbersClient(credentials);
|
2708
|
-
* for await (const locality of client.listAvailableLocalities()) {
|
2709
|
-
* console.log("locality: ", locality.localizedName);
|
2710
|
-
* }
|
2711
|
-
* ```
|
2712
|
-
* List all available localities.
|
2713
|
-
* @param countryCode - The ISO 3166-2 country code.
|
2714
|
-
* @param options - The optional parameters.
|
2715
|
-
*/
|
2716
|
-
listAvailableLocalities(countryCode, options = {}) {
|
2717
|
-
const { span, updatedOptions } = tracingClient.startSpan("PhoneNumbersClient-listAvailableLocalities", options);
|
2718
|
-
try {
|
2719
|
-
return this.client.phoneNumbers.listAvailableLocalities(countryCode, Object.assign(Object.assign({}, updatedOptions), { acceptLanguage: this.acceptLanguage }));
|
2720
|
-
}
|
2721
|
-
catch (e) {
|
2722
|
-
span.setStatus({
|
2723
|
-
status: "error",
|
2724
|
-
error: e,
|
2725
|
-
});
|
2726
|
-
throw e;
|
2727
|
-
}
|
2728
|
-
finally {
|
2729
|
-
span.end();
|
2730
|
-
}
|
2731
|
-
}
|
2732
|
-
/**
|
2733
|
-
* Iterates the available offerings.
|
2734
|
-
*
|
2735
|
-
* Example usage:
|
2736
|
-
* ```ts
|
2737
|
-
* let client = new PhoneNumbersClient(credentials);
|
2738
|
-
* for await (const offering of client.listAvailableOfferings()) {
|
2739
|
-
* console.log("phone number type: ", offering.phoneNumberType);
|
2740
|
-
* console.log("cost: ", offering.cost.amount);
|
2741
|
-
* }
|
2742
|
-
* ```
|
2743
|
-
* List all available offerings.
|
2744
|
-
* @param countryCode - The ISO 3166-2 country code.
|
2745
|
-
* @param options - The optional parameters.
|
2746
|
-
*/
|
2747
|
-
listAvailableOfferings(countryCode, options = {}) {
|
2748
|
-
const { span, updatedOptions } = tracingClient.startSpan("PhoneNumbersClient-listOfferings", options);
|
2749
|
-
try {
|
2750
|
-
return this.client.phoneNumbers.listOfferings(countryCode, Object.assign({}, updatedOptions));
|
2751
|
-
}
|
2752
|
-
catch (e) {
|
2753
|
-
span.setStatus({
|
2754
|
-
status: "error",
|
2755
|
-
error: e,
|
2756
|
-
});
|
2757
|
-
throw e;
|
2758
|
-
}
|
2759
|
-
finally {
|
2760
|
-
span.end();
|
2761
|
-
}
|
2762
|
-
}
|
2763
|
-
/**
|
2764
|
-
* Search for operator information about specified phone numbers.
|
2765
|
-
*
|
2766
|
-
* @param phoneNumbers - The phone numbers to search.
|
2767
|
-
* @param options - Additional request options.
|
2768
|
-
*/
|
2769
|
-
searchOperatorInformation(phoneNumbers, options = { includeAdditionalOperatorDetails: false }) {
|
2770
|
-
const { span, updatedOptions } = tracingClient.startSpan("PhoneNumbersClient-searchOperatorInformation", options);
|
2771
|
-
try {
|
2772
|
-
return this.client.phoneNumbers.operatorInformationSearch(phoneNumbers, Object.assign(Object.assign({}, updatedOptions), { options: { includeAdditionalOperatorDetails: options.includeAdditionalOperatorDetails } }));
|
2773
|
-
}
|
2774
|
-
catch (e) {
|
2775
|
-
span.setStatus({
|
2776
|
-
status: "error",
|
2777
|
-
error: e,
|
2778
|
-
});
|
2779
|
-
throw e;
|
2780
|
-
}
|
2781
|
-
finally {
|
2782
|
-
span.end();
|
2783
|
-
}
|
2784
|
-
}
|
2785
|
-
}
|
2786
|
-
|
2787
|
-
/*
|
2788
|
-
* Copyright (c) Microsoft Corporation.
|
2789
|
-
* Licensed under the MIT License.
|
2790
|
-
*
|
2791
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
2792
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
2793
|
-
*/
|
2794
|
-
const SipConfiguration = {
|
2795
|
-
type: {
|
2796
|
-
name: "Composite",
|
2797
|
-
className: "SipConfiguration",
|
2798
|
-
modelProperties: {
|
2799
|
-
trunks: {
|
2800
|
-
serializedName: "trunks",
|
2801
|
-
type: {
|
2802
|
-
name: "Dictionary",
|
2803
|
-
value: { type: { name: "Composite", className: "SipTrunk" } }
|
2804
|
-
}
|
2805
|
-
},
|
2806
|
-
routes: {
|
2807
|
-
constraints: {
|
2808
|
-
MaxItems: 250
|
2809
|
-
},
|
2810
|
-
serializedName: "routes",
|
2811
|
-
type: {
|
2812
|
-
name: "Sequence",
|
2813
|
-
element: {
|
2814
|
-
type: {
|
2815
|
-
name: "Composite",
|
2816
|
-
className: "SipTrunkRoute"
|
2817
|
-
}
|
2818
|
-
}
|
2819
|
-
}
|
2820
|
-
}
|
2821
|
-
}
|
2822
|
-
}
|
2823
|
-
};
|
2824
|
-
const SipTrunk = {
|
2825
|
-
type: {
|
2826
|
-
name: "Composite",
|
2827
|
-
className: "SipTrunk",
|
2828
|
-
modelProperties: {
|
2829
|
-
sipSignalingPort: {
|
2830
|
-
serializedName: "sipSignalingPort",
|
2831
|
-
required: true,
|
2832
|
-
type: {
|
2833
|
-
name: "Number"
|
2834
|
-
}
|
2835
|
-
}
|
2836
|
-
}
|
2837
|
-
}
|
2838
|
-
};
|
2839
|
-
const SipTrunkRoute = {
|
2840
|
-
type: {
|
2841
|
-
name: "Composite",
|
2842
|
-
className: "SipTrunkRoute",
|
2843
|
-
modelProperties: {
|
2844
|
-
description: {
|
2845
|
-
constraints: {
|
2846
|
-
MaxLength: 1024
|
2847
|
-
},
|
2848
|
-
serializedName: "description",
|
2849
|
-
type: {
|
2850
|
-
name: "String"
|
2851
|
-
}
|
2852
|
-
},
|
2853
|
-
name: {
|
2854
|
-
constraints: {
|
2855
|
-
MaxLength: 256
|
2856
|
-
},
|
2857
|
-
serializedName: "name",
|
2858
|
-
required: true,
|
2859
|
-
type: {
|
2860
|
-
name: "String"
|
2861
|
-
}
|
2862
|
-
},
|
2863
|
-
numberPattern: {
|
2864
|
-
constraints: {
|
2865
|
-
MaxLength: 1024
|
2866
|
-
},
|
2867
|
-
serializedName: "numberPattern",
|
2868
|
-
required: true,
|
2869
|
-
type: {
|
2870
|
-
name: "String"
|
2871
|
-
}
|
2872
|
-
},
|
2873
|
-
trunks: {
|
2874
|
-
constraints: {
|
2875
|
-
MaxItems: 250
|
2876
|
-
},
|
2877
|
-
serializedName: "trunks",
|
2878
|
-
type: {
|
2879
|
-
name: "Sequence",
|
2880
|
-
element: {
|
2881
|
-
type: {
|
2882
|
-
name: "String"
|
2883
|
-
}
|
2884
|
-
}
|
2885
|
-
}
|
2886
|
-
}
|
2887
|
-
}
|
2888
|
-
}
|
2889
|
-
};
|
2890
|
-
const CommunicationErrorResponse = {
|
2891
|
-
type: {
|
2892
|
-
name: "Composite",
|
2893
|
-
className: "CommunicationErrorResponse",
|
2894
|
-
modelProperties: {
|
2895
|
-
error: {
|
2896
|
-
serializedName: "error",
|
2897
|
-
type: {
|
2898
|
-
name: "Composite",
|
2899
|
-
className: "SipRoutingError"
|
2900
|
-
}
|
2901
|
-
}
|
2902
|
-
}
|
2903
|
-
}
|
2904
|
-
};
|
2905
|
-
const SipRoutingError = {
|
2906
|
-
type: {
|
2907
|
-
name: "Composite",
|
2908
|
-
className: "SipRoutingError",
|
2909
|
-
modelProperties: {
|
2910
|
-
code: {
|
2911
|
-
serializedName: "code",
|
2912
|
-
required: true,
|
2913
|
-
type: {
|
2914
|
-
name: "String"
|
2915
|
-
}
|
2916
|
-
},
|
2917
|
-
message: {
|
2918
|
-
serializedName: "message",
|
2919
|
-
required: true,
|
2920
|
-
type: {
|
2921
|
-
name: "String"
|
2922
|
-
}
|
2923
|
-
},
|
2924
|
-
target: {
|
2925
|
-
serializedName: "target",
|
2926
|
-
readOnly: true,
|
2927
|
-
type: {
|
2928
|
-
name: "String"
|
2929
|
-
}
|
2930
|
-
},
|
2931
|
-
details: {
|
2932
|
-
serializedName: "details",
|
2933
|
-
readOnly: true,
|
2934
|
-
type: {
|
2935
|
-
name: "Sequence",
|
2936
|
-
element: {
|
2937
|
-
type: {
|
2938
|
-
name: "Composite",
|
2939
|
-
className: "SipRoutingError"
|
2940
|
-
}
|
2941
|
-
}
|
2942
|
-
}
|
2943
|
-
},
|
2944
|
-
innerError: {
|
2945
|
-
serializedName: "innererror",
|
2946
|
-
type: {
|
2947
|
-
name: "Composite",
|
2948
|
-
className: "SipRoutingError"
|
2949
|
-
}
|
2950
|
-
}
|
2951
|
-
}
|
2952
|
-
}
|
2953
|
-
};
|
2954
|
-
const SipConfigurationUpdate = {
|
2955
|
-
type: {
|
2956
|
-
name: "Composite",
|
2957
|
-
className: "SipConfigurationUpdate",
|
2958
|
-
modelProperties: {
|
2959
|
-
trunks: {
|
2960
|
-
serializedName: "trunks",
|
2961
|
-
type: {
|
2962
|
-
name: "Dictionary",
|
2963
|
-
value: { type: { name: "Composite", className: "TrunkUpdate" } }
|
2964
|
-
}
|
2965
|
-
},
|
2966
|
-
routes: {
|
2967
|
-
constraints: {
|
2968
|
-
MaxItems: 250
|
2969
|
-
},
|
2970
|
-
serializedName: "routes",
|
2971
|
-
type: {
|
2972
|
-
name: "Sequence",
|
2973
|
-
element: {
|
2974
|
-
type: {
|
2975
|
-
name: "Composite",
|
2976
|
-
className: "SipTrunkRoute"
|
2977
|
-
}
|
2978
|
-
}
|
2979
|
-
}
|
2980
|
-
}
|
2981
|
-
}
|
2982
|
-
}
|
2983
|
-
};
|
2984
|
-
const TrunkUpdate = {
|
2985
|
-
type: {
|
2986
|
-
name: "Composite",
|
2987
|
-
className: "TrunkUpdate",
|
2988
|
-
modelProperties: {
|
2989
|
-
sipSignalingPort: {
|
2990
|
-
serializedName: "sipSignalingPort",
|
2991
|
-
type: {
|
2992
|
-
name: "Number"
|
2993
|
-
}
|
2994
|
-
}
|
2995
|
-
}
|
2996
|
-
}
|
2997
|
-
};
|
2998
|
-
const SipRoutingGetExceptionHeaders = {
|
2999
|
-
type: {
|
3000
|
-
name: "Composite",
|
3001
|
-
className: "SipRoutingGetExceptionHeaders",
|
3002
|
-
modelProperties: {
|
3003
|
-
xMsErrorCode: {
|
3004
|
-
serializedName: "x-ms-error-code",
|
3005
|
-
type: {
|
3006
|
-
name: "String"
|
3007
|
-
}
|
3008
|
-
}
|
3009
|
-
}
|
3010
|
-
}
|
3011
|
-
};
|
3012
|
-
const SipRoutingUpdateExceptionHeaders = {
|
3013
|
-
type: {
|
3014
|
-
name: "Composite",
|
3015
|
-
className: "SipRoutingUpdateExceptionHeaders",
|
3016
|
-
modelProperties: {
|
3017
|
-
xMsErrorCode: {
|
3018
|
-
serializedName: "x-ms-error-code",
|
3019
|
-
type: {
|
3020
|
-
name: "String"
|
3021
|
-
}
|
3022
|
-
}
|
3023
|
-
}
|
3024
|
-
}
|
3025
|
-
};
|
3026
|
-
|
3027
|
-
var Mappers = /*#__PURE__*/Object.freeze({
|
3028
|
-
__proto__: null,
|
3029
|
-
CommunicationErrorResponse: CommunicationErrorResponse,
|
3030
|
-
SipConfiguration: SipConfiguration,
|
3031
|
-
SipConfigurationUpdate: SipConfigurationUpdate,
|
3032
|
-
SipRoutingError: SipRoutingError,
|
3033
|
-
SipRoutingGetExceptionHeaders: SipRoutingGetExceptionHeaders,
|
3034
|
-
SipRoutingUpdateExceptionHeaders: SipRoutingUpdateExceptionHeaders,
|
3035
|
-
SipTrunk: SipTrunk,
|
3036
|
-
SipTrunkRoute: SipTrunkRoute,
|
3037
|
-
TrunkUpdate: TrunkUpdate
|
3038
|
-
});
|
3039
|
-
|
3040
|
-
/*
|
3041
|
-
* Copyright (c) Microsoft Corporation.
|
3042
|
-
* Licensed under the MIT License.
|
3043
|
-
*
|
3044
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
3045
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
3046
|
-
*/
|
3047
|
-
const accept = {
|
3048
|
-
parameterPath: "accept",
|
3049
|
-
mapper: {
|
3050
|
-
defaultValue: "application/json",
|
3051
|
-
isConstant: true,
|
3052
|
-
serializedName: "Accept",
|
3053
|
-
type: {
|
3054
|
-
name: "String"
|
3055
|
-
}
|
3056
|
-
}
|
3057
|
-
};
|
3058
|
-
const endpoint = {
|
3059
|
-
parameterPath: "endpoint",
|
3060
|
-
mapper: {
|
3061
|
-
serializedName: "endpoint",
|
3062
|
-
required: true,
|
3063
|
-
type: {
|
3064
|
-
name: "String"
|
3065
|
-
}
|
3066
|
-
},
|
3067
|
-
skipEncoding: true
|
3068
|
-
};
|
3069
|
-
const apiVersion = {
|
3070
|
-
parameterPath: "apiVersion",
|
3071
|
-
mapper: {
|
3072
|
-
defaultValue: "2023-03-01",
|
3073
|
-
isConstant: true,
|
3074
|
-
serializedName: "api-version",
|
3075
|
-
type: {
|
3076
|
-
name: "String"
|
3077
|
-
}
|
3078
|
-
}
|
3079
|
-
};
|
3080
|
-
const contentType = {
|
3081
|
-
parameterPath: ["options", "contentType"],
|
3082
|
-
mapper: {
|
3083
|
-
defaultValue: "application/merge-patch+json",
|
3084
|
-
isConstant: true,
|
3085
|
-
serializedName: "Content-Type",
|
3086
|
-
type: {
|
3087
|
-
name: "String"
|
3088
|
-
}
|
3089
|
-
}
|
3090
|
-
};
|
3091
|
-
|
3092
|
-
/*
|
3093
|
-
* Copyright (c) Microsoft Corporation.
|
3094
|
-
* Licensed under the MIT License.
|
3095
|
-
*
|
3096
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
3097
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
3098
|
-
*/
|
3099
|
-
/** Class containing SipRouting operations. */
|
3100
|
-
class SipRoutingImpl {
|
3101
|
-
/**
|
3102
|
-
* Initialize a new instance of the class SipRouting class.
|
3103
|
-
* @param client Reference to the service client
|
3104
|
-
*/
|
3105
|
-
constructor(client) {
|
3106
|
-
this.client = client;
|
3107
|
-
}
|
3108
|
-
/**
|
3109
|
-
* Gets SIP configuration for resource.
|
3110
|
-
* @param options The options parameters.
|
3111
|
-
*/
|
3112
|
-
get(options) {
|
3113
|
-
return this.client.sendOperationRequest({ options }, getOperationSpec);
|
3114
|
-
}
|
3115
|
-
/**
|
3116
|
-
* Updates SIP configuration for resource.
|
3117
|
-
* @param options The options parameters.
|
3118
|
-
*/
|
3119
|
-
update(options) {
|
3120
|
-
return this.client.sendOperationRequest({ options }, updateOperationSpec);
|
3121
|
-
}
|
3122
|
-
}
|
3123
|
-
// Operation Specifications
|
3124
|
-
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
3125
|
-
const getOperationSpec = {
|
3126
|
-
path: "/sip",
|
3127
|
-
httpMethod: "GET",
|
3128
|
-
responses: {
|
3129
|
-
200: {
|
3130
|
-
bodyMapper: SipConfiguration
|
3131
|
-
},
|
3132
|
-
default: {
|
3133
|
-
bodyMapper: CommunicationErrorResponse,
|
3134
|
-
headersMapper: SipRoutingGetExceptionHeaders
|
3135
|
-
}
|
3136
|
-
},
|
3137
|
-
queryParameters: [apiVersion],
|
3138
|
-
urlParameters: [endpoint],
|
3139
|
-
headerParameters: [accept],
|
3140
|
-
serializer
|
3141
|
-
};
|
3142
|
-
const updateOperationSpec = {
|
3143
|
-
path: "/sip",
|
3144
|
-
httpMethod: "PATCH",
|
3145
|
-
responses: {
|
3146
|
-
200: {
|
3147
|
-
bodyMapper: SipConfiguration
|
3148
|
-
},
|
3149
|
-
default: {
|
3150
|
-
bodyMapper: CommunicationErrorResponse,
|
3151
|
-
headersMapper: SipRoutingUpdateExceptionHeaders
|
3152
|
-
}
|
3153
|
-
},
|
3154
|
-
requestBody: {
|
3155
|
-
parameterPath: {
|
3156
|
-
trunks: ["options", "trunks"],
|
3157
|
-
routes: ["options", "routes"]
|
3158
|
-
},
|
3159
|
-
mapper: SipConfigurationUpdate
|
3160
|
-
},
|
3161
|
-
queryParameters: [apiVersion],
|
3162
|
-
urlParameters: [endpoint],
|
3163
|
-
headerParameters: [accept, contentType],
|
3164
|
-
mediaType: "json",
|
3165
|
-
serializer
|
3166
|
-
};
|
3167
|
-
|
3168
|
-
/*
|
3169
|
-
* Copyright (c) Microsoft Corporation.
|
3170
|
-
* Licensed under the MIT License.
|
3171
|
-
*
|
3172
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
3173
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
3174
|
-
*/
|
3175
|
-
class SipRoutingClientContext extends coreClient__namespace.ServiceClient {
|
3176
|
-
/**
|
3177
|
-
* Initializes a new instance of the SipRoutingClientContext class.
|
3178
|
-
* @param endpoint The communication resource, for example https://resourcename.communication.azure.com
|
3179
|
-
* @param options The parameter options
|
3180
|
-
*/
|
3181
|
-
constructor(endpoint, options) {
|
3182
|
-
if (endpoint === undefined) {
|
3183
|
-
throw new Error("'endpoint' cannot be null");
|
3184
|
-
}
|
3185
|
-
// Initializing default values for options
|
3186
|
-
if (!options) {
|
3187
|
-
options = {};
|
3188
|
-
}
|
3189
|
-
const defaults = {
|
3190
|
-
requestContentType: "application/json; charset=utf-8"
|
3191
|
-
};
|
3192
|
-
const packageDetails = `azsdk-js-communication-phone-numbers/1.2.1`;
|
3193
|
-
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
3194
|
-
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
3195
|
-
: `${packageDetails}`;
|
3196
|
-
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
3197
|
-
userAgentPrefix
|
3198
|
-
}, baseUri: options.endpoint || "{endpoint}" });
|
3199
|
-
super(optionsWithDefaults);
|
3200
|
-
// Parameter assignments
|
3201
|
-
this.endpoint = endpoint;
|
3202
|
-
// Assigning values to Constant parameters
|
3203
|
-
this.apiVersion = options.apiVersion || "2023-03-01";
|
3204
|
-
}
|
3205
|
-
}
|
3206
|
-
|
3207
|
-
/*
|
3208
|
-
* Copyright (c) Microsoft Corporation.
|
3209
|
-
* Licensed under the MIT License.
|
3210
|
-
*
|
3211
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
3212
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
3213
|
-
*/
|
3214
|
-
let SipRoutingClient$1 = class SipRoutingClient extends SipRoutingClientContext {
|
3215
|
-
/**
|
3216
|
-
* Initializes a new instance of the SipRoutingClient class.
|
3217
|
-
* @param endpoint The communication resource, for example https://resourcename.communication.azure.com
|
3218
|
-
* @param options The parameter options
|
3219
|
-
*/
|
3220
|
-
constructor(endpoint, options) {
|
3221
|
-
super(endpoint, options);
|
3222
|
-
this.sipRouting = new SipRoutingImpl(this);
|
3223
|
-
}
|
3224
|
-
};
|
3225
|
-
|
3226
|
-
// Copyright (c) Microsoft Corporation.
|
3227
|
-
// Licensed under the MIT License.
|
3228
|
-
/**
|
3229
|
-
* @internal
|
3230
|
-
* Transforming SIP trunks REST model to SDK model
|
3231
|
-
*/
|
3232
|
-
function transformFromRestModel(trunks) {
|
3233
|
-
const result = [];
|
3234
|
-
if (trunks) {
|
3235
|
-
Object.keys(trunks).forEach((fqdn) => {
|
3236
|
-
const port = trunks[fqdn].sipSignalingPort;
|
3237
|
-
result.push({ fqdn: fqdn, sipSignalingPort: port });
|
3238
|
-
});
|
3239
|
-
}
|
3240
|
-
return result;
|
3241
|
-
}
|
3242
|
-
/**
|
3243
|
-
* @internal
|
3244
|
-
* Transforming SIP trunks SDK model to REST model
|
3245
|
-
*/
|
3246
|
-
function transformIntoRestModel(trunks) {
|
3247
|
-
const result = {};
|
3248
|
-
trunks.forEach((trunk) => {
|
3249
|
-
result[trunk.fqdn] = { sipSignalingPort: trunk.sipSignalingPort };
|
3250
|
-
});
|
3251
|
-
return result;
|
3252
|
-
}
|
3253
|
-
|
3254
|
-
// Copyright (c) Microsoft Corporation.
|
3255
|
-
// Licensed under the MIT License.
|
3256
|
-
/**
|
3257
|
-
* Checks whether the type of a value is SipClientOptions or not.
|
3258
|
-
*
|
3259
|
-
* @param options - The value being checked.
|
3260
|
-
*/
|
3261
|
-
const isSipClientOptions = (options) => options && !communicationCommon.isKeyCredential(options) && !coreAuth.isTokenCredential(options);
|
3262
|
-
/**
|
3263
|
-
* Client class for interacting with Azure Communication Services SIP Routing Administration.
|
3264
|
-
*/
|
3265
|
-
class SipRoutingClient {
|
3266
|
-
constructor(connectionStringOrUrl, credentialOrOptions, maybeOptions = {}) {
|
3267
|
-
const { url, credential } = communicationCommon.parseClientArguments(connectionStringOrUrl, credentialOrOptions);
|
3268
|
-
const options = isSipClientOptions(credentialOrOptions) ? credentialOrOptions : maybeOptions;
|
3269
|
-
const internalPipelineOptions = Object.assign(Object.assign({}, options), {
|
3270
|
-
loggingOptions: {
|
3271
|
-
logger: logger.info,
|
3272
|
-
},
|
3273
|
-
});
|
3274
|
-
this.client = new SipRoutingClient$1(url, Object.assign({ endpoint: url }, internalPipelineOptions));
|
3275
|
-
const authPolicy = communicationCommon.createCommunicationAuthPolicy(credential);
|
3276
|
-
this.client.pipeline.addPolicy(authPolicy);
|
3277
|
-
}
|
3278
|
-
/**
|
3279
|
-
* Lists the SIP trunks.
|
3280
|
-
* @param options - The options parameters.
|
3281
|
-
*/
|
3282
|
-
listTrunks(options = {}) {
|
3283
|
-
const { span, updatedOptions } = tracingClient.startSpan("SipRoutingClient-listTrunks", options);
|
3284
|
-
try {
|
3285
|
-
const iter = this.listTrunksPagingAll(Object.assign({}, updatedOptions));
|
3286
|
-
return {
|
3287
|
-
next() {
|
3288
|
-
return iter.next();
|
3289
|
-
},
|
3290
|
-
[Symbol.asyncIterator]() {
|
3291
|
-
return this;
|
3292
|
-
},
|
3293
|
-
byPage: () => {
|
3294
|
-
return this.listTrunksPagingPage(Object.assign({}, updatedOptions));
|
3295
|
-
},
|
3296
|
-
};
|
3297
|
-
}
|
3298
|
-
catch (e) {
|
3299
|
-
span.setStatus({
|
3300
|
-
status: "error",
|
3301
|
-
error: e,
|
3302
|
-
});
|
3303
|
-
throw e;
|
3304
|
-
}
|
3305
|
-
finally {
|
3306
|
-
span.end();
|
3307
|
-
}
|
3308
|
-
}
|
3309
|
-
/**
|
3310
|
-
* Gets the SIP trunk.
|
3311
|
-
* @param fqdn - The trunk's FQDN.
|
3312
|
-
* @param options - The options parameters.
|
3313
|
-
*/
|
3314
|
-
async getTrunk(fqdn, options = {}) {
|
3315
|
-
return tracingClient.withSpan("SipRoutingClient-getTrunk", options, async (updatedOptions) => {
|
3316
|
-
const trunks = await this.getTrunksInternal(updatedOptions);
|
3317
|
-
const trunk = trunks.find((value) => value.fqdn === fqdn);
|
3318
|
-
if (trunk) {
|
3319
|
-
return trunk;
|
3320
|
-
}
|
3321
|
-
throw { code: "NotFound", message: "Not Found" };
|
3322
|
-
});
|
3323
|
-
}
|
3324
|
-
/**
|
3325
|
-
* Lists the SIP trunk routes.
|
3326
|
-
* @param options - The options parameters.
|
3327
|
-
*/
|
3328
|
-
listRoutes(options = {}) {
|
3329
|
-
const { span, updatedOptions } = tracingClient.startSpan("SipRoutingClient-listRoutes", options);
|
3330
|
-
try {
|
3331
|
-
const iter = this.listRoutesPagingAll(Object.assign({}, updatedOptions));
|
3332
|
-
return {
|
3333
|
-
next() {
|
3334
|
-
return iter.next();
|
3335
|
-
},
|
3336
|
-
[Symbol.asyncIterator]() {
|
3337
|
-
return this;
|
3338
|
-
},
|
3339
|
-
byPage: () => {
|
3340
|
-
return this.listRoutesPagingPage(Object.assign({}, updatedOptions));
|
3341
|
-
},
|
3342
|
-
};
|
3343
|
-
}
|
3344
|
-
catch (e) {
|
3345
|
-
span.setStatus({
|
3346
|
-
status: "error",
|
3347
|
-
error: e,
|
3348
|
-
});
|
3349
|
-
throw e;
|
3350
|
-
}
|
3351
|
-
finally {
|
3352
|
-
span.end();
|
3353
|
-
}
|
3354
|
-
}
|
3355
|
-
/**
|
3356
|
-
* Sets the SIP trunks.
|
3357
|
-
* @param trunks - The SIP trunks to be set.
|
3358
|
-
* @param options - The options parameters.
|
3359
|
-
*/
|
3360
|
-
async setTrunks(trunks, options = {}) {
|
3361
|
-
return tracingClient.withSpan("SipRoutingClient-setTrunks", options, async (updatedOptions) => {
|
3362
|
-
const patch = { trunks: transformIntoRestModel(trunks) };
|
3363
|
-
let config = await this.client.sipRouting.get(updatedOptions);
|
3364
|
-
const storedFqdns = transformFromRestModel(config.trunks).map((trunk) => trunk.fqdn);
|
3365
|
-
const setFqdns = trunks.map((trunk) => trunk.fqdn);
|
3366
|
-
storedFqdns.forEach((storedFqdn) => {
|
3367
|
-
const shouldDeleteStoredTrunk = !setFqdns.find((value) => value === storedFqdn);
|
3368
|
-
if (shouldDeleteStoredTrunk) {
|
3369
|
-
patch.trunks[storedFqdn] = null;
|
3370
|
-
}
|
3371
|
-
});
|
3372
|
-
const isPatchNeeded = Object.keys(patch.trunks).length > 0;
|
3373
|
-
if (isPatchNeeded) {
|
3374
|
-
const payload = Object.assign(Object.assign({}, updatedOptions), patch);
|
3375
|
-
config = await this.client.sipRouting.update(payload);
|
3376
|
-
}
|
3377
|
-
return transformFromRestModel(config.trunks);
|
3378
|
-
});
|
3379
|
-
}
|
3380
|
-
/**
|
3381
|
-
* Sets the SIP trunk.
|
3382
|
-
* @param trunk - The SIP trunk to be set.
|
3383
|
-
* @param options - The options parameters.
|
3384
|
-
*/
|
3385
|
-
async setTrunk(trunk, options = {}) {
|
3386
|
-
return tracingClient.withSpan("SipRoutingClient-setTrunk", options, async (updatedOptions) => {
|
3387
|
-
const patch = {
|
3388
|
-
trunks: transformIntoRestModel([trunk]),
|
3389
|
-
};
|
3390
|
-
const payload = Object.assign(Object.assign({}, updatedOptions), patch);
|
3391
|
-
const config = await this.client.sipRouting.update(payload);
|
3392
|
-
const storedTrunk = transformFromRestModel(config.trunks).find((value) => value.fqdn === trunk.fqdn);
|
3393
|
-
if (storedTrunk) {
|
3394
|
-
return storedTrunk;
|
3395
|
-
}
|
3396
|
-
throw { code: "NotFound", message: "Not Found" };
|
3397
|
-
});
|
3398
|
-
}
|
3399
|
-
/**
|
3400
|
-
* Sets the SIP trunk routes.
|
3401
|
-
* @param routes - The SIP trunk routes to be set.
|
3402
|
-
* @param options - The options parameters.
|
3403
|
-
*/
|
3404
|
-
async setRoutes(routes, options = {}) {
|
3405
|
-
return tracingClient.withSpan("SipRoutingClient-setRoutes", options, async (updatedOptions) => {
|
3406
|
-
const patch = {
|
3407
|
-
routes: routes,
|
3408
|
-
};
|
3409
|
-
const payload = Object.assign(Object.assign({}, updatedOptions), patch);
|
3410
|
-
const config = await this.client.sipRouting.update(payload);
|
3411
|
-
const storedRoutes = config.routes || (await this.getRoutesInternal(updatedOptions));
|
3412
|
-
return storedRoutes;
|
3413
|
-
});
|
3414
|
-
}
|
3415
|
-
/**
|
3416
|
-
* Deletes the SIP trunk.
|
3417
|
-
* @param fqdn - The trunk's FQDN.
|
3418
|
-
* @param options - The options parameters.
|
3419
|
-
*/
|
3420
|
-
async deleteTrunk(fqdn, options = {}) {
|
3421
|
-
return tracingClient.withSpan("SipRoutingClient-deleteTrunk", options, async (updatedOptions) => {
|
3422
|
-
const trunks = {};
|
3423
|
-
trunks[fqdn] = null;
|
3424
|
-
const patch = {
|
3425
|
-
trunks: trunks,
|
3426
|
-
};
|
3427
|
-
const payload = Object.assign(Object.assign({}, updatedOptions), patch);
|
3428
|
-
await this.client.sipRouting.update(payload);
|
3429
|
-
});
|
3430
|
-
}
|
3431
|
-
async getRoutesInternal(options) {
|
3432
|
-
const config = await this.client.sipRouting.get(options);
|
3433
|
-
return config.routes || [];
|
3434
|
-
}
|
3435
|
-
async getTrunksInternal(options) {
|
3436
|
-
const config = await this.client.sipRouting.get(options);
|
3437
|
-
return transformFromRestModel(config.trunks);
|
3438
|
-
}
|
3439
|
-
listRoutesPagingAll(options) {
|
3440
|
-
return tslib.__asyncGenerator(this, arguments, function* listRoutesPagingAll_1() {
|
3441
|
-
var _a, e_1, _b, _c;
|
3442
|
-
try {
|
3443
|
-
for (var _d = true, _e = tslib.__asyncValues(this.listRoutesPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
3444
|
-
_c = _f.value;
|
3445
|
-
_d = false;
|
3446
|
-
const page = _c;
|
3447
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
3448
|
-
}
|
3449
|
-
}
|
3450
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
3451
|
-
finally {
|
3452
|
-
try {
|
3453
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
3454
|
-
}
|
3455
|
-
finally { if (e_1) throw e_1.error; }
|
3456
|
-
}
|
3457
|
-
});
|
3458
|
-
}
|
3459
|
-
listTrunksPagingAll(options) {
|
3460
|
-
return tslib.__asyncGenerator(this, arguments, function* listTrunksPagingAll_1() {
|
3461
|
-
var _a, e_2, _b, _c;
|
3462
|
-
try {
|
3463
|
-
for (var _d = true, _e = tslib.__asyncValues(this.listTrunksPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
3464
|
-
_c = _f.value;
|
3465
|
-
_d = false;
|
3466
|
-
const page = _c;
|
3467
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
3468
|
-
}
|
3469
|
-
}
|
3470
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
3471
|
-
finally {
|
3472
|
-
try {
|
3473
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
3474
|
-
}
|
3475
|
-
finally { if (e_2) throw e_2.error; }
|
3476
|
-
}
|
3477
|
-
});
|
3478
|
-
}
|
3479
|
-
listTrunksPagingPage() {
|
3480
|
-
return tslib.__asyncGenerator(this, arguments, function* listTrunksPagingPage_1(options = {}) {
|
3481
|
-
const apiResult = yield tslib.__await(this.getTrunksInternal(options));
|
3482
|
-
yield yield tslib.__await(apiResult);
|
3483
|
-
});
|
3484
|
-
}
|
3485
|
-
listRoutesPagingPage() {
|
3486
|
-
return tslib.__asyncGenerator(this, arguments, function* listRoutesPagingPage_1(options = {}) {
|
3487
|
-
const apiResult = yield tslib.__await(this.getRoutesInternal(options));
|
3488
|
-
yield yield tslib.__await(apiResult);
|
3489
|
-
});
|
3490
|
-
}
|
3491
|
-
}
|
3492
|
-
|
3493
|
-
exports.PhoneNumbersClient = PhoneNumbersClient;
|
3494
|
-
exports.SipRoutingClient = SipRoutingClient;
|
3495
|
-
//# sourceMappingURL=index.js.map
|