diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/DeleteOperation.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/DeleteOperation.json new file mode 100644 index 000000000000..3e4e63bf00cd --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/DeleteOperation.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "endpoint": "https://resourcename.communication.azure.com/", + "operationId": "search_my-operation-id" + }, + "responses": { + "204": {} + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetAreaCodes.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetAreaCodes.json new file mode 100644 index 000000000000..829544a00439 --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetAreaCodes.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "endpoint": "https://resourcename.communication.azure.com/", + "countryCode": "CA", + "phoneNumberType": "geographic", + "locality": "Vancouver", + "administrativeDivision": "BC" + }, + "responses": { + "200": { + "body": { + "areaCodes": [ + { + "areaCode": "236" + }, + { + "areaCode": "604" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetCountries.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetCountries.json new file mode 100644 index 000000000000..c24d30e40f15 --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetCountries.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "endpoint": "https://resourcename.communication.azure.com/", + "header": { + "accept-language": "en-US" + } + }, + "responses": { + "200": { + "body": { + "countries": [ + { + "localizedName": "Canada", + "countryCode": "CA" + }, + { + "localizedName": "United States", + "countryCode": "US" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetLocalities.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetLocalities.json new file mode 100644 index 000000000000..80d3ce60399e --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetLocalities.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "endpoint": "https://resourcename.communication.azure.com/", + "countryCode": "CA", + "header": { + "accept-language": "en-US" + } + }, + "responses": { + "200": { + "body": { + "phoneNumberLocalities": [ + { + "localizedName": "Vancouver", + "administrativeDivision": { + "localizedName": "British Columbia", + "abbreviatedName": "BC" + } + }, + { + "localizedName": "Toronto", + "administrativeDivision": { + "localizedName": "Ontario", + "abbreviatedName": "ON" + } + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetOfferings.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetOfferings.json new file mode 100644 index 000000000000..257aab1861c7 --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetOfferings.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "endpoint": "https://resourcename.communication.azure.com/", + "countryCode": "CA", + "header": { + "accept-language": "en-US" + } + }, + "responses": { + "200": { + "body": { + "phoneNumberOfferings": [ + { + "phoneNumberType": "geographic", + "assignmentType": "person", + "availableCapabilities": { + "calling": "outbound", + "sms": "outbound" + }, + "cost": { + "amount": 1.0, + "currencyCode": "USD", + "billingFrequency": "monthly" + } + }, + { + "phoneNumberType": "geographic", + "assignmentType": "person", + "availableCapabilities": { + "calling": "inbound+outbound", + "sms": "outbound" + }, + "cost": { + "amount": 1.0, + "currencyCode": "USD", + "billingFrequency": "monthly" + } + }, + { + "phoneNumberType": "tollFree", + "assignmentType": "application", + "availableCapabilities": { + "calling": "none", + "sms": "outbound" + }, + "cost": { + "amount": 2.0, + "currencyCode": "USD", + "billingFrequency": "monthly" + } + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetOperation.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetOperation.json new file mode 100644 index 000000000000..c1682893dbc0 --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetOperation.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "endpoint": "https://resourcename.communication.azure.com/", + "operationId": "search-my-operation-id" + }, + "responses": { + "200": { + "headers": { + "Location": "/availablePhoneNumbers/searchResults/378ddf60-81be-452a-ba4f-613198ea6c28" + }, + "body": { + "status": "succeeded", + "resourceLocation": "/availablePhoneNumbers/searchResults/378ddf60-81be-452a-ba4f-613198ea6c28", + "createdDateTime": "2020-11-19T16:31:49.048Z", + "id": "search-my-operation-id", + "operationType": "search", + "lastActionDateTime": "2020-11-19T22:31:49.048Z" + } + } + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetPhoneNumber.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetPhoneNumber.json new file mode 100644 index 000000000000..c2a72bc82d19 --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetPhoneNumber.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "endpoint": "https://resourcename.communication.azure.com/", + "phoneNumber": "+11234567890" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "11234567890", + "phoneNumber": "+11234567890", + "countryCode": "US", + "assignmentType": "person", + "phoneNumberType": "geographic", + "capabilities": { + "calling": "inbound+outbound", + "sms": "inbound" + }, + "purchaseDate": "2020-11-19T16:31:49.048Z", + "cost": { + "amount": 0.8, + "currencyCode": "USD", + "billingFrequency": "monthly" + } + } + } + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetPhoneNumberSearchResult.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetPhoneNumberSearchResult.json new file mode 100644 index 000000000000..305b3cf273da --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetPhoneNumberSearchResult.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "searchId": "378ddf60-81be-452a-ba4f-613198ea6c28", + "endpoint": "https://resourcename.communication.azure.com/" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "searchId": "378ddf60-81be-452a-ba4f-613198ea6c28", + "phoneNumbers": [ + "+18001212121" + ], + "phoneNumberType": "tollFree", + "assignmentType": "application", + "capabilities": { + "sms": "inbound+outbound", + "calling": "none" + }, + "cost": { + "amount": 1.2, + "currencyCode": "USD", + "billingFrequency": "monthly" + }, + "searchExpiresBy": "2020-11-19T16:31:49.048Z", + "errorCode": 1000, + "error": "OutOfStock" + } + } + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetPhoneNumbers.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetPhoneNumbers.json new file mode 100644 index 000000000000..ae2389f3117f --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/GetPhoneNumbers.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "endpoint": "https://resourcename.communication.azure.com/", + "phoneNumber": "+11234567890" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "phoneNumbers": [ + { + "id": "11234567890", + "phoneNumber": "+11234567890", + "countryCode": "US", + "assignmentType": "person", + "phoneNumberType": "geographic", + "capabilities": { + "calling": "inbound+outbound", + "sms": "inbound" + }, + "purchaseDate": "2020-11-19T16:31:49.048Z", + "cost": { + "amount": 0.8, + "currencyCode": "USD", + "billingFrequency": "monthly" + } + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/PurchasePhoneNumbers.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/PurchasePhoneNumbers.json new file mode 100644 index 000000000000..9095ce8db094 --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/PurchasePhoneNumbers.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "endpoint": "https://resourcename.communication.azure.com/", + "body": { + "searchId": "378ddf60-81be-452a-ba4f-613198ea6c28" + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "/phoneNumbers/operations/purchase_378ddf60-81be-452a-ba4f-613198ea6c28", + "operation-id": "purchase_378ddf60-81be-452a-ba4f-613198ea6c28", + "purchase-id": "378ddf60-81be-452a-ba4f-613198ea6c28" + } + } + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/ReleasePhoneNumber.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/ReleasePhoneNumber.json new file mode 100644 index 000000000000..1aca7c0d7a12 --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/ReleasePhoneNumber.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "phoneNumber": "+11234567890", + "endpoint": "https://resourcename.communication.azure.com/" + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "/phoneNumbers/operations/release_378ddf60-81be-452a-ba4f-613198ea6c28", + "operation-id": "release_378ddf60-81be-452a-ba4f-613198ea6c28", + "release-id": "378ddf60-81be-452a-ba4f-613198ea6c28" + } + } + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/SearchOperatorInformation.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/SearchOperatorInformation.json new file mode 100644 index 000000000000..14df569a4c8b --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/SearchOperatorInformation.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "endpoint": "https://resourcename.communication.azure.com/", + "body": { + "phoneNumbers": [ + "+11234567890" + ] + } + }, + "responses": { + "200": { + "body": { + "values": [ + { + "phoneNumber": "+11234567890", + "numberType": "mobile", + "operatorDetails": { + "name": "T-Mobile", + "mobileNetworkCode": "260", + "mobileCountryCode": "310" + } + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/SearchPhoneNumbers.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/SearchPhoneNumbers.json new file mode 100644 index 000000000000..6dbf7de6ce47 --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/SearchPhoneNumbers.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "body": { + "phoneNumberType": "tollFree", + "assignmentType": "application", + "capabilities": { + "sms": "inbound+outbound", + "calling": "none" + }, + "areaCode": "425", + "quantity": 1 + }, + "countryCode": "US", + "endpoint": "https://resourcename.communication.azure.com/" + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "/phoneNumbers/operations/search_378ddf60-81be-452a-ba4f-613198ea6c28", + "Location": "/availablePhoneNumbers/searchResults/378ddf60-81be-452a-ba4f-613198ea6c28", + "operation-id": "search_378ddf60-81be-452a-ba4f-613198ea6c28", + "search-id": "378ddf60-81be-452a-ba4f-613198ea6c28" + }, + "body": { + "searchId": "378ddf60-81be-452a-ba4f-613198ea6c28", + "phoneNumbers": [ + "+18001212121" + ], + "phoneNumberType": "tollFree", + "assignmentType": "application", + "capabilities": { + "sms": "inbound+outbound", + "calling": "none" + }, + "cost": { + "amount": 1.2, + "currencyCode": "USD", + "billingFrequency": "monthly" + }, + "searchExpiresBy": "2020-11-19T16:31:49.048Z" + } + } + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/UpdatePhoneNumberCapabilities.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/UpdatePhoneNumberCapabilities.json new file mode 100644 index 000000000000..8cee7d6b1f16 --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/examples/UpdatePhoneNumberCapabilities.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "endpoint": "https://resourcename.communication.azure.com/", + "phoneNumber": "+14792000102", + "body": { + "calling": "inbound+outbound", + "sms": "none" + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "/phoneNumbers/operations/capabilities_378ddf60-81be-452a-ba4f-613198ea6c28", + "Location": "/phoneNumbers/%2b14792000102", + "operation-id": "capabilities_378ddf60-81be-452a-ba4f-613198ea6c28", + "capabilities-id": "378ddf60-81be-452a-ba4f-613198ea6c28" + }, + "body": { + "id": "14792000102", + "phoneNumber": "+14792000102", + "countryCode": "US", + "assignmentType": "person", + "phoneNumberType": "geographic", + "capabilities": { + "calling": "inbound+outbound", + "sms": "none" + }, + "purchaseDate": "2020-11-19T16:31:49.048Z", + "cost": { + "amount": 0.8, + "currencyCode": "USD", + "billingFrequency": "monthly" + } + } + } + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/phonenumbers.json b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/phonenumbers.json new file mode 100644 index 000000000000..7a852e4d92a7 --- /dev/null +++ b/specification/communication/data-plane/PhoneNumbers/preview/2023-05-01-preview/phonenumbers.json @@ -0,0 +1,1585 @@ +{ + "swagger": "2.0", + "info": { + "title": "PhoneNumbersClient", + "description": "The phone numbers client uses Azure Communication Services to purchase and manage phone numbers.", + "version": "2023-05-01-preview" + }, + "paths": { + "/availablePhoneNumbers/countries/{countryCode}/areaCodes": { + "get": { + "tags": [ + "Browse for available countries, cities and area codes" + ], + "summary": "Gets the list of available area codes.", + "operationId": "PhoneNumbers_ListAreaCodes", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "countryCode", + "description": "The ISO 3166-2 country code, e.g. US.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "phoneNumberType", + "description": "Filter by numberType, e.g. Geographic, TollFree.", + "required": true, + "type": "string", + "enum": [ + "geographic", + "tollFree" + ], + "x-ms-enum": { + "name": "PhoneNumberType", + "modelAsString": true + } + }, + { + "in": "query", + "name": "skip", + "description": "An optional parameter for how many entries to skip, for pagination purposes. The default value is 0.", + "type": "integer", + "format": "int32", + "default": 0 + }, + { + "in": "query", + "name": "maxPageSize", + "description": "An optional parameter for how many entries to return, for pagination purposes. The default value is 100.", + "type": "integer", + "format": "int32", + "default": 100 + }, + { + "in": "query", + "name": "assignmentType", + "description": "Filter by assignmentType, e.g. Person, Application.", + "type": "string", + "enum": [ + "person", + "application" + ], + "x-ms-enum": { + "name": "PhoneNumberAssignmentType", + "modelAsString": true + } + }, + { + "in": "query", + "name": "locality", + "description": "The name of locality or town in which to search for the area code. This is required if the number type is Geographic.", + "type": "string" + }, + { + "in": "query", + "name": "administrativeDivision", + "description": "The name of the state or province in which to search for the area code.", + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "header", + "name": "accept-language", + "description": "The locale to display in the localized fields in the response. e.g. 'en-US'", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PhoneNumberAreaCodes" + } + }, + "default": { + "description": "Failure", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "areaCodes" + }, + "x-ms-examples": { + "Get Area Codes Search Result": { + "$ref": "./examples/GetAreaCodes.json" + } + } + } + }, + "/availablePhoneNumbers/countries": { + "get": { + "tags": [ + "Browse for available countries, cities and area codes" + ], + "summary": "Gets the list of supported countries.", + "operationId": "PhoneNumbers_ListAvailableCountries", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "skip", + "description": "An optional parameter for how many entries to skip, for pagination purposes. The default value is 0.", + "type": "integer", + "format": "int32", + "default": 0 + }, + { + "in": "query", + "name": "maxPageSize", + "description": "An optional parameter for how many entries to return, for pagination purposes. The default value is 100.", + "type": "integer", + "format": "int32", + "default": 100 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "header", + "name": "accept-language", + "description": "The locale to display in the localized fields in the response. e.g. 'en-US'", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PhoneNumberCountries" + } + }, + "default": { + "description": "Failure", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "countries" + }, + "x-ms-examples": { + "Get countries": { + "$ref": "./examples/GetCountries.json" + } + } + } + }, + "/availablePhoneNumbers/countries/{countryCode}/localities": { + "get": { + "tags": [ + "Browse for available countries, cities and area codes" + ], + "summary": "Gets the list of cities or towns with available phone numbers.", + "operationId": "PhoneNumbers_ListAvailableLocalities", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "countryCode", + "description": "The ISO 3166-2 country code, e.g. US.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "skip", + "description": "An optional parameter for how many entries to skip, for pagination purposes. The default value is 0.", + "type": "integer", + "format": "int32", + "default": 0 + }, + { + "in": "query", + "name": "maxPageSize", + "description": "An optional parameter for how many entries to return, for pagination purposes. The default value is 100.", + "type": "integer", + "format": "int32", + "default": 100 + }, + { + "in": "query", + "name": "administrativeDivision", + "description": "An optional parameter for the name of the state or province in which to search for the area code.", + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "header", + "name": "accept-language", + "description": "The locale to display in the localized fields in the response. e.g. 'en-US'", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PhoneNumberLocalities" + } + }, + "default": { + "description": "Failure", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "phoneNumberLocalities" + }, + "x-ms-examples": { + "Get PhoneNumber Search Result": { + "$ref": "./examples/GetLocalities.json" + } + } + } + }, + "/availablePhoneNumbers/countries/{countryCode}/offerings": { + "get": { + "tags": [ + "Browse for available countries, cities and area codes" + ], + "summary": "List available offerings of capabilities with rates for the given country.", + "operationId": "PhoneNumbers_ListOfferings", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "countryCode", + "description": "The ISO 3166-2 country code, e.g. US.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "skip", + "description": "An optional parameter for how many entries to skip, for pagination purposes. The default value is 0.", + "type": "integer", + "format": "int32", + "default": 0 + }, + { + "in": "query", + "name": "maxPageSize", + "description": "An optional parameter for how many entries to return, for pagination purposes. The default value is 100.", + "type": "integer", + "format": "int32", + "default": 100 + }, + { + "in": "query", + "name": "phoneNumberType", + "description": "Filter by numberType, e.g. Geographic, TollFree.", + "type": "string", + "enum": [ + "geographic", + "tollFree" + ], + "x-ms-enum": { + "name": "PhoneNumberType", + "modelAsString": true + } + }, + { + "in": "query", + "name": "assignmentType", + "description": "Filter by assignmentType, e.g. Person, Application.", + "type": "string", + "enum": [ + "person", + "application" + ], + "x-ms-enum": { + "name": "PhoneNumberAssignmentType", + "modelAsString": true + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "header", + "name": "accept-language", + "description": "The locale to display in the localized fields in the response. e.g. 'en-US'", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/OfferingsResponse" + } + }, + "default": { + "description": "Failure", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "phoneNumberOfferings" + }, + "x-ms-examples": { + "Get PhoneNumber Search Result": { + "$ref": "./examples/GetOfferings.json" + } + } + } + }, + "/availablePhoneNumbers/countries/{countryCode}/:search": { + "post": { + "tags": [ + "Find and purchase available phone numbers" + ], + "summary": "Search for available phone numbers to purchase.", + "operationId": "PhoneNumbers_SearchAvailablePhoneNumbers", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "countryCode", + "description": "The ISO 3166-2 country code, e.g. US.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "description": "The phone number search request.", + "required": true, + "schema": { + "$ref": "#/definitions/PhoneNumberSearchRequest" + } + } + ], + "responses": { + "202": { + "description": "The service has accepted the request and will start processing later. It will return 'Accepted' immediately and include an 'Operation-Location' and 'Location' headers. Client side should further query the operation status using the URL specified in 'Operation-Location' header. When operation completes successfully query final result using URL specified in 'Location' header.", + "schema": { + "$ref": "#/definitions/PhoneNumberSearchResult" + }, + "headers": { + "Location": { + "description": "URL to retrieve the final result after operation completes.", + "type": "string" + }, + "Operation-Location": { + "description": "URL to query for status of the operation.", + "type": "string" + }, + "operation-id": { + "description": "The operation id.", + "type": "string" + }, + "search-id": { + "description": "The search operation id.", + "type": "string" + } + } + }, + "default": { + "description": "Failure", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Search for phone numbers": { + "$ref": "./examples/SearchPhoneNumbers.json" + } + } + } + }, + "/availablePhoneNumbers/searchResults/{searchId}": { + "get": { + "tags": [ + "Find and purchase available phone numbers" + ], + "summary": "Gets a phone number search result by search id.", + "operationId": "PhoneNumbers_GetSearchResult", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "searchId", + "description": "The search Id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PhoneNumberSearchResult" + } + }, + "default": { + "description": "Failure", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-examples": { + "Get PhoneNumber Search Result": { + "$ref": "./examples/GetPhoneNumberSearchResult.json" + } + } + } + }, + "/availablePhoneNumbers/:purchase": { + "post": { + "tags": [ + "Find and purchase available phone numbers" + ], + "summary": "Purchases phone numbers.", + "operationId": "PhoneNumbers_PurchasePhoneNumbers", + "consumes": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "description": "The phone number purchase request", + "required": true, + "schema": { + "$ref": "#/definitions/PhoneNumberPurchaseRequest" + } + } + ], + "responses": { + "202": { + "description": "The service has accepted the request and will start processing later. It will return 'Accepted' immediately and include an 'Operation-Location' header. Client side should further query the operation status using the URL specified in 'Operation-Location' header.", + "headers": { + "Operation-Location": { + "description": "URL to query for status of the operation.", + "type": "string" + }, + "operation-id": { + "description": "The operation id.", + "type": "string" + }, + "purchase-id": { + "description": "The purchase operation id.", + "type": "string" + } + } + }, + "default": { + "description": "Failure", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Purchase phone numbers": { + "$ref": "./examples/PurchasePhoneNumbers.json" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/phoneNumbers/operations/{operationId}": { + "get": { + "tags": [ + "Long running operations" + ], + "summary": "Gets an operation by its id.", + "operationId": "PhoneNumbers_GetOperation", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "operationId", + "description": "The id of the operation", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "When the operation is completed, query the final result of the operation using the URL specified in the 'Location' attribute in the response header.", + "schema": { + "$ref": "#/definitions/PhoneNumberOperation" + }, + "headers": { + "Location": { + "description": "Url to retrieve the final result after operation completes.", + "type": "string" + } + } + }, + "default": { + "description": "Failure", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-examples": { + "Get long running operation status by operation id": { + "$ref": "./examples/GetOperation.json" + } + } + }, + "delete": { + "tags": [ + "Long running operations" + ], + "summary": "Cancels an operation by its id.", + "operationId": "PhoneNumbers_CancelOperation", + "parameters": [ + { + "in": "path", + "name": "operationId", + "description": "The id of the operation", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "default": { + "description": "Failure", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-examples": { + "Delete long running operation with the given operation id": { + "$ref": "./examples/DeleteOperation.json" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/phoneNumbers/{phoneNumber}/capabilities": { + "patch": { + "tags": [ + "Manage purchased phone numbers" + ], + "summary": "Updates the capabilities of a phone number.", + "operationId": "PhoneNumbers_UpdateCapabilities", + "consumes": [ + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "phoneNumber", + "description": "The phone number id in E.164 format. The leading plus can be either + or encoded as %2B, e.g. +11234567890.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "description": "Defines the update capabilities request.", + "schema": { + "$ref": "#/definitions/PhoneNumberCapabilitiesRequest" + } + } + ], + "responses": { + "202": { + "description": "The service has accepted the request and will start processing later. It will return 'Accepted' immediately and include an 'Operation-Location' and 'Location' headers. Client side should further query the operation status using the URL specified in 'Operation-Location' header. When operation completes successfully query final result using URL specified in 'Location' header.", + "schema": { + "$ref": "#/definitions/PurchasedPhoneNumber" + }, + "headers": { + "Location": { + "description": "URL to retrieve the final result after operation completes.", + "type": "string" + }, + "Operation-Location": { + "description": "URL to query for status of the operation.", + "type": "string" + }, + "operation-id": { + "description": "The operation id.", + "type": "string" + }, + "capabilities-id": { + "description": "The capabilities operation id.", + "type": "string" + } + } + }, + "default": { + "description": "Failure", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Update phoneNumber capabilities": { + "$ref": "./examples/UpdatePhoneNumberCapabilities.json" + } + } + } + }, + "/phoneNumbers/{phoneNumber}": { + "get": { + "tags": [ + "Manage purchased phone numbers" + ], + "summary": "Gets the details of the given purchased phone number.", + "operationId": "PhoneNumbers_GetByNumber", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "phoneNumber", + "description": "The purchased phone number whose details are to be fetched in E.164 format, e.g. +11234567890.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PurchasedPhoneNumber" + } + }, + "default": { + "description": "Failure", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-examples": { + "Fetch purchased phone number": { + "$ref": "./examples/GetPhoneNumber.json" + } + } + }, + "delete": { + "tags": [ + "Manage purchased phone numbers" + ], + "summary": "Releases a purchased phone number.", + "operationId": "PhoneNumbers_ReleasePhoneNumber", + "parameters": [ + { + "in": "path", + "name": "phoneNumber", + "description": "Phone number to be released, e.g. +11234567890.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "The service has accepted the request and will start processing later. It will return 'Accepted' immediately and include an 'Operation-Location' header. Client side should further query the operation status using the URL specified in 'Operation-Location' header.", + "headers": { + "Operation-Location": { + "description": "URL to query for status of the operation.", + "type": "string" + }, + "operation-id": { + "description": "The operation id.", + "type": "string" + }, + "release-id": { + "description": "The release operation id.", + "type": "string" + } + } + }, + "default": { + "description": "Failure", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Release phone number": { + "$ref": "./examples/ReleasePhoneNumber.json" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/phoneNumbers": { + "get": { + "tags": [ + "Manage purchased phone numbers" + ], + "summary": "Gets the list of all purchased phone numbers.", + "operationId": "PhoneNumbers_ListPhoneNumbers", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "skip", + "description": "An optional parameter for how many entries to skip, for pagination purposes. The default value is 0.", + "type": "integer", + "format": "int32", + "default": 0 + }, + { + "in": "query", + "name": "top", + "description": "An optional parameter for how many entries to return, for pagination purposes. The default value is 100.", + "type": "integer", + "format": "int32", + "default": 100 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PurchasedPhoneNumbers" + } + }, + "default": { + "description": "Failure", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "phoneNumbers" + }, + "x-ms-examples": { + "List purchased phone numbers": { + "$ref": "./examples/GetPhoneNumbers.json" + } + } + } + }, + "/operatorInformation/:search": { + "post": { + "tags": [ + "Obtain operator information for requested numbers" + ], + "summary": "Searches for operator information for a given list of phone numbers.", + "operationId": "PhoneNumbers_OperatorInformationSearch", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "required": true, + "description": "The phone number(s) whose operator information should be searched", + "schema": { + "$ref": "#/definitions/OperatorInformationRequest" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/OperatorInformationResult" + } + }, + "default": { + "description": "Failure", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-examples": { + "Search for operator information on phone numbers": { + "$ref": "./examples/SearchOperatorInformation.json" + } + } + } + } + }, + "definitions": { + "OfferingsResponse": { + "description": "Represents a wrapper around a list of offerings.", + "type": "object", + "properties": { + "phoneNumberOfferings": { + "description": "Represents the underlying list of offerings.", + "type": "array", + "items": { + "$ref": "#/definitions/PhoneNumberOffering" + } + }, + "nextLink": { + "description": "Represents the URL link to the next page.", + "type": "string" + } + } + }, + "PhoneNumberAdministrativeDivision": { + "description": "Represents an administrative division. e.g. state or province.", + "required": [ + "abbreviatedName", + "localizedName" + ], + "type": "object", + "properties": { + "localizedName": { + "description": "Represents the localized name of the administrative division of the locality. e.g. state or province localized name.", + "type": "string" + }, + "abbreviatedName": { + "description": "Represents the abbreviated name of the administrative division of the locality. e.g. state or province abbreviation such as WA (Washington).", + "type": "string" + } + } + }, + "PhoneNumberAreaCode": { + "description": "Represents an Area Code.", + "type": "object", + "properties": { + "areaCode": { + "description": "An area code.", + "type": "string" + } + } + }, + "PhoneNumberAreaCodes": { + "description": "The list of available area codes.", + "required": [ + "areaCodes" + ], + "type": "object", + "properties": { + "areaCodes": { + "description": "Represents a list of available toll-free area codes.", + "type": "array", + "items": { + "$ref": "#/definitions/PhoneNumberAreaCode" + } + }, + "nextLink": { + "description": "Represents the URL link to the next page.", + "type": "string" + } + } + }, + "PhoneNumberCapabilities": { + "description": "Capabilities of a phone number.", + "required": [ + "calling", + "sms" + ], + "type": "object", + "properties": { + "calling": { + "description": "Capability value for calling.", + "enum": [ + "none", + "inbound", + "outbound", + "inbound+outbound" + ], + "type": "string", + "x-ms-enum": { + "name": "PhoneNumberCapabilityType", + "modelAsString": true + } + }, + "sms": { + "description": "Capability value for SMS.", + "enum": [ + "none", + "inbound", + "outbound", + "inbound+outbound" + ], + "type": "string", + "x-ms-enum": { + "name": "PhoneNumberCapabilityType", + "modelAsString": true + } + } + } + }, + "PhoneNumberCapabilitiesRequest": { + "description": "Capabilities of a phone number.", + "type": "object", + "properties": { + "calling": { + "description": "Capability value for calling.", + "enum": [ + "none", + "inbound", + "outbound", + "inbound+outbound" + ], + "type": "string", + "x-ms-enum": { + "name": "PhoneNumberCapabilityType", + "modelAsString": true + } + }, + "sms": { + "description": "Capability value for SMS.", + "enum": [ + "none", + "inbound", + "outbound", + "inbound+outbound" + ], + "type": "string", + "x-ms-enum": { + "name": "PhoneNumberCapabilityType", + "modelAsString": true + } + } + } + }, + "PhoneNumberCost": { + "description": "The incurred cost for a single phone number.", + "required": [ + "amount", + "billingFrequency", + "currencyCode" + ], + "type": "object", + "properties": { + "amount": { + "format": "double", + "description": "The cost amount.", + "type": "number" + }, + "currencyCode": { + "description": "The ISO 4217 currency code for the cost amount, e.g. USD.", + "type": "string" + }, + "billingFrequency": { + "description": "The frequency with which the cost gets billed.", + "enum": [ + "monthly" + ], + "type": "string", + "x-ms-enum": { + "name": "BillingFrequency", + "modelAsString": true + } + } + } + }, + "PhoneNumberCountries": { + "description": "Represents a wrapper around a list of countries.", + "type": "object", + "properties": { + "countries": { + "description": "Represents the underlying list of countries.", + "type": "array", + "items": { + "$ref": "#/definitions/PhoneNumberCountry" + } + }, + "nextLink": { + "description": "Represents the URL link to the next page", + "type": "string" + } + } + }, + "PhoneNumberCountry": { + "description": "Represents a country.", + "required": [ + "countryCode", + "localizedName" + ], + "type": "object", + "properties": { + "localizedName": { + "description": "Represents the name of the country.", + "type": "string" + }, + "countryCode": { + "description": "Represents the abbreviated name of the country.", + "type": "string" + } + } + }, + "PhoneNumberLocalities": { + "description": "Represents a wrapper around a list of cities or towns.", + "type": "object", + "properties": { + "phoneNumberLocalities": { + "description": "Represents the underlying list of localities, e.g. cities or town.", + "type": "array", + "items": { + "$ref": "#/definitions/PhoneNumberLocality" + } + }, + "nextLink": { + "description": "Represents the URL link to the next page.", + "type": "string" + } + } + }, + "PhoneNumberLocality": { + "description": "Represents a locality.", + "required": [ + "localizedName" + ], + "type": "object", + "properties": { + "localizedName": { + "description": "Represents the localized name of the locality.", + "type": "string" + }, + "administrativeDivision": { + "$ref": "#/definitions/PhoneNumberAdministrativeDivision" + } + } + }, + "PhoneNumberOffering": { + "description": "Represents a phone number capability offering", + "required": [ + "cost" + ], + "type": "object", + "properties": { + "phoneNumberType": { + "description": "Represents the number type of the offering.", + "enum": [ + "geographic", + "tollFree" + ], + "type": "string", + "x-ms-enum": { + "name": "PhoneNumberType", + "modelAsString": true + } + }, + "assignmentType": { + "description": "Represents the assignment type of the offering.", + "enum": [ + "person", + "application" + ], + "type": "string", + "x-ms-enum": { + "name": "PhoneNumberAssignmentType", + "modelAsString": true + } + }, + "availableCapabilities": { + "$ref": "#/definitions/PhoneNumberCapabilities" + }, + "cost": { + "$ref": "#/definitions/PhoneNumberCost" + } + } + }, + "PhoneNumberOperation": { + "required": [ + "createdDateTime", + "id", + "operationType", + "status" + ], + "type": "object", + "properties": { + "operationType": { + "description": "The type of operation, e.g. Search", + "enum": [ + "purchase", + "releasePhoneNumber", + "search", + "updatePhoneNumberCapabilities" + ], + "type": "string", + "x-ms-enum": { + "name": "PhoneNumberOperationType", + "modelAsString": true + } + }, + "status": { + "description": "Status of operation.", + "enum": [ + "notStarted", + "running", + "succeeded", + "failed" + ], + "type": "string", + "x-ms-enum": { + "name": "PhoneNumberOperationStatus", + "modelAsString": true + } + }, + "resourceLocation": { + "description": "URL for retrieving the result of the operation, if any.", + "type": "string" + }, + "createdDateTime": { + "format": "date-time", + "description": "The date that the operation was created.", + "type": "string" + }, + "error": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationError" + }, + "id": { + "description": "Id of operation.", + "type": "string" + }, + "lastActionDateTime": { + "format": "date-time", + "description": "The most recent date that the operation was changed.", + "type": "string", + "readOnly": true + } + } + }, + "PhoneNumberPurchaseRequest": { + "description": "The phone number search purchase request.", + "type": "object", + "properties": { + "searchId": { + "description": "The search id.", + "type": "string" + } + } + }, + "PhoneNumberSearchRequest": { + "description": "Represents a phone number search request to find phone numbers. Found phone numbers are temporarily held for a following purchase.", + "required": [ + "assignmentType", + "capabilities", + "phoneNumberType" + ], + "type": "object", + "properties": { + "phoneNumberType": { + "description": "The type of phone numbers to search for, e.g. geographic, or tollFree.", + "enum": [ + "geographic", + "tollFree" + ], + "type": "string", + "x-ms-enum": { + "name": "PhoneNumberType", + "modelAsString": true + } + }, + "assignmentType": { + "description": "The assignment type of the phone numbers to search for. A phone number can be assigned to a person, or to an application.", + "enum": [ + "person", + "application" + ], + "type": "string", + "x-ms-enum": { + "name": "PhoneNumberAssignmentType", + "modelAsString": true + } + }, + "capabilities": { + "$ref": "#/definitions/PhoneNumberCapabilities" + }, + "areaCode": { + "description": "The area code of the desired phone number, e.g. 425.", + "type": "string" + }, + "quantity": { + "format": "int32", + "description": "The quantity of desired phone numbers. The default value is 1.", + "default": 1, + "maximum": 2147483647, + "minimum": 1, + "type": "integer" + } + } + }, + "PhoneNumberSearchResult": { + "description": "The result of a phone number search operation.", + "required": [ + "assignmentType", + "capabilities", + "cost", + "phoneNumbers", + "phoneNumberType", + "searchExpiresBy", + "searchId" + ], + "type": "object", + "properties": { + "searchId": { + "description": "The search id.", + "type": "string" + }, + "phoneNumbers": { + "description": "The phone numbers that are available. Can be fewer than the desired search quantity.", + "type": "array", + "items": { + "type": "string" + } + }, + "phoneNumberType": { + "description": "The phone number's type, e.g. geographic, or tollFree.", + "enum": [ + "geographic", + "tollFree" + ], + "type": "string", + "x-ms-enum": { + "name": "PhoneNumberType", + "modelAsString": true + } + }, + "assignmentType": { + "description": "Phone number's assignment type.", + "enum": [ + "person", + "application" + ], + "type": "string", + "x-ms-enum": { + "name": "PhoneNumberAssignmentType", + "modelAsString": true + } + }, + "capabilities": { + "$ref": "#/definitions/PhoneNumberCapabilities" + }, + "cost": { + "$ref": "#/definitions/PhoneNumberCost" + }, + "searchExpiresBy": { + "format": "date-time", + "description": "The date that this search result expires and phone numbers are no longer on hold. A search result expires in less than 15min, e.g. 2020-11-19T16:31:49.048Z.", + "type": "string" + }, + "errorCode": { + "format": "int32", + "description": "The error code of the search.", + "type": "integer" + }, + "error": { + "description": "Mapping Error Messages to Codes", + "enum": [ + "NoError", + "UnknownErrorCode", + "OutOfStock", + "AuthorizationDenied", + "MissingAddress", + "InvalidAddress", + "InvalidOfferModel", + "NotEnoughLicenses", + "NoWallet", + "NotEnoughCredit", + "NumbersPartiallyAcquired", + "AllNumbersNotAcquired", + "ReservationExpired", + "PurchaseFailed", + "BillingUnavailable", + "ProvisioningFailed", + "UnknownSearchError" + ], + "type": "string", + "x-ms-enum": { + "name": "Error", + "modelAsString": true + } + } + } + }, + "PurchasedPhoneNumber": { + "description": "Represents a purchased phone number.", + "required": [ + "assignmentType", + "capabilities", + "cost", + "countryCode", + "id", + "phoneNumber", + "phoneNumberType", + "purchaseDate" + ], + "type": "object", + "properties": { + "id": { + "description": "The id of the phone number, e.g. 11234567890.", + "type": "string" + }, + "phoneNumber": { + "description": "String of the E.164 format of the phone number, e.g. +11234567890.", + "type": "string" + }, + "countryCode": { + "description": "The ISO 3166-2 code of the phone number's country, e.g. US.", + "type": "string" + }, + "phoneNumberType": { + "description": "The phone number's type, e.g. geographic, tollFree.", + "enum": [ + "geographic", + "tollFree" + ], + "type": "string", + "x-ms-enum": { + "name": "PhoneNumberType", + "modelAsString": true + } + }, + "capabilities": { + "$ref": "#/definitions/PhoneNumberCapabilities" + }, + "assignmentType": { + "description": "The assignment type of the phone number. A phone number can be assigned to a person, or to an application.", + "enum": [ + "person", + "application" + ], + "type": "string", + "x-ms-enum": { + "name": "PhoneNumberAssignmentType", + "modelAsString": true + } + }, + "purchaseDate": { + "format": "date-time", + "description": "The date and time that the phone number was purchased.", + "type": "string" + }, + "cost": { + "$ref": "#/definitions/PhoneNumberCost" + } + } + }, + "PurchasedPhoneNumbers": { + "description": "The list of purchased phone numbers.", + "required": [ + "phoneNumbers" + ], + "type": "object", + "properties": { + "phoneNumbers": { + "description": "Represents a list of phone numbers.", + "type": "array", + "items": { + "$ref": "#/definitions/PurchasedPhoneNumber" + } + }, + "nextLink": { + "description": "Represents the URL link to the next page of phone number results.", + "type": "string" + } + } + }, + "OperatorInformationRequest": { + "description": "Represents a search request for operator information for the given phone numbers", + "type": "object", + "properties": { + "phoneNumbers": { + "description": "Phone number(s) whose operator information is being requested", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "OperatorInformationResult": { + "description": "Represents a search result containing operator information associated with the requested phone numbers", + "type": "object", + "properties": { + "values": { + "description": "Results of a search.\r\nThis array will have one entry per requested phone number which will contain the relevant operator information.", + "type": "array", + "items": { + "$ref": "#/definitions/OperatorInformation" + } + } + } + }, + "OperatorInformation": { + "description": "Represents metadata about a phone number that is controlled/provided by that phone number's operator.", + "type": "object", + "properties": { + "phoneNumber": { + "description": "E.164 formatted string representation of the phone number", + "type": "string" + }, + "numberType": { + "description": "Type of service associated with the phone number", + "enum": [ + "geographic", + "mobile", + "paging", + "freePhone", + "specialServices", + "testNumber", + "voip" + ], + "type": "string", + "x-ms-enum": { + "name": "OperatorNumberType", + "modelAsString": true + } + }, + "operatorDetails": { + "$ref": "#/definitions/OperatorDetails" + } + } + }, + "OperatorDetails": { + "description": "Represents metadata describing the operator of a phone number", + "type": "object", + "properties": { + "name": { + "description": "Name of the phone operator", + "type": "string" + }, + "mobileNetworkCode": { + "description": "Mobile Network Code", + "type": "string" + }, + "mobileCountryCode": { + "description": "Mobile Country Code", + "type": "string" + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "in": "query", + "name": "api-version", + "description": "Version of API to invoke", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "Endpoint": { + "in": "path", + "name": "endpoint", + "description": "The communication resource, for example https://resourcename.communication.azure.com", + "required": true, + "type": "string", + "format": "url", + "x-ms-skip-url-encoding": true, + "x-ms-parameter-location": "client" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + }, + "description": "Azure Active Directory OAuth2 Flow" + } + }, + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/Endpoint" + } + ] + } +} diff --git a/specification/communication/data-plane/PhoneNumbers/readme.md b/specification/communication/data-plane/PhoneNumbers/readme.md index 2a406b475d86..403e001909d4 100644 --- a/specification/communication/data-plane/PhoneNumbers/readme.md +++ b/specification/communication/data-plane/PhoneNumbers/readme.md @@ -85,6 +85,17 @@ title: Azure Communication Services ``` +### Tag: package-phonenumber-2023-05-01-preview + +These settings apply only when `--tag=package-phonenumber-2023-05-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-phonenumber-2023-05-01-preview' +input-file: + - preview/2023-05-01-preview/phonenumbers.json +title: + Azure Communication Services +``` + ## Supression ``` yaml directive: