Skip to content

Commit 84113e3

Browse files
whisper6284markcowlAdrian Tangdanielortega-msft
authored
[Communication - Phone Number Service] Proposed countries offerings API for the ACS Phone Number Service. (#18869)
* Add blockchain to latest profile * Add additional types * . * . * . * . * Add example files. * . * Update ACS Phone Numbers ReadMe. * Fix ACS Phone Number ReadMe typos. * . * Move temporarily to 2022-07-31-preview3 * . * Update API version in README. * . * . * Update example files. * . * . * . * . * . * . * In descriptions, replace country with country/region. * Replace Cities with Localities. Replace CountryCapability with PhoneNumberOffering. * Apply renames from SDK review comments * Rename offerings to phoneNumberOfferings * Fix phoneNumberOfferings pagination * Remove duplicate definition for assignment type * Move to stable 2022-11-30 * . * . * Remove accepted-language from get phone number. * . * . * Add API version parameter to localities API. * . * Property name phoneNumberCountries -> countries. * Fix country property name. * . * Remove locality/adminstrative division from search, and update API version. * Fix example. * Prettier * Update area codes example * Fix pageable property in offerings. * Add modelAsString = true for some enum query parameters. * Add sesarch result error properties. * Prettier. * Update enum query name for phone number assignment type * Update enum query name for phone number assignment type in offerings. * . * Have host have format URL, and x-ms-parameter-location to ApiVersionParameter. * . * Add suppression for operation name change. * Update suppression to version 2022-12-01. --------- Co-authored-by: Mark Cowlishaw <[email protected]> Co-authored-by: Adrian Tang <[email protected]> Co-authored-by: Daniel Ortega <[email protected]>
1 parent 2491b61 commit 84113e3

15 files changed

+1870
-2
lines changed

specification/communication/data-plane/PhoneNumbers/readme.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,30 @@ These are the global settings for the communicationservices.
2626

2727
```yaml
2828
openapi-type: data-plane
29-
tag: package-2020-07-20-preview1
29+
tag: package-phonenumber-2022-12-01
30+
```
31+
32+
### Tag: package-phonenumber-2022-12-01
33+
34+
These settings apply only when `--tag=package-phonenumber-2022-12-01` is specified on the command line.
35+
36+
```yaml $(tag) == 'package-phonenumber-2022-12-01'
37+
input-file:
38+
- stable/2022-12-01/phonenumbers.json
39+
title:
40+
Azure Communication Services
41+
```
42+
43+
## Supression
44+
``` yaml
45+
directive:
46+
- from:
47+
- phonenumbers.json
48+
suppress:
49+
- R2005 #Long running operation status code
50+
- R1001 #to suppress (OperationIdNounVerb/R1001/SDKViolation)
51+
reason:
52+
Approval from Azure review board that Long Running Operations can return 202s. Cannot rename operation names without breaking changes.
3053
```
3154

3255
### Tag: package-phonenumber-2021-03-07
@@ -69,8 +92,9 @@ directive:
6992
- phonenumbers.json
7093
suppress:
7194
- R2005 #Long running operation status code
95+
- R1001 #to suppress (OperationIdNounVerb/R1001/SDKViolation)
7296
reason:
73-
Approval from Azure review board that Long Running Operations can return 202s.
97+
Approval from Azure review board that Long Running Operations can return 202s. Cannot rename operation names without breaking changes.
7498
```
7599

76100
---
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-12-01",
4+
"endpoint": "https://resourcename.communication.azure.com/",
5+
"operationId": "search_my-operation-id"
6+
},
7+
"responses": {
8+
"204": {}
9+
}
10+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-12-01",
4+
"endpoint": "https://resourcename.communication.azure.com/",
5+
"countryCode": "CA",
6+
"phoneNumberType": "geographic",
7+
"locality": "Vancouver",
8+
"administrativeDivision": "BC"
9+
},
10+
"responses": {
11+
"200": {
12+
"body": {
13+
"areaCodes": [
14+
{
15+
"areaCode": "236"
16+
},
17+
{
18+
"areaCode": "604"
19+
}
20+
]
21+
}
22+
}
23+
}
24+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-12-01",
4+
"endpoint": "https://resourcename.communication.azure.com/",
5+
"header": {
6+
"accept-language": "en-US"
7+
}
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"countries": [
13+
{
14+
"localizedName": "Canada",
15+
"countryCode": "CA"
16+
},
17+
{
18+
"localizedName": "United States",
19+
"countryCode": "US"
20+
}
21+
]
22+
}
23+
}
24+
}
25+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-12-01",
4+
"endpoint": "https://resourcename.communication.azure.com/",
5+
"countryCode": "CA",
6+
"header": {
7+
"accept-language": "en-US"
8+
}
9+
},
10+
"responses": {
11+
"200": {
12+
"body": {
13+
"phoneNumberLocalities": [
14+
{
15+
"localizedName": "Vancouver",
16+
"administrativeDivision": {
17+
"localizedName": "British Columbia",
18+
"abbreviatedName": "BC"
19+
}
20+
},
21+
{
22+
"localizedName": "Toronto",
23+
"administrativeDivision": {
24+
"localizedName": "Ontario",
25+
"abbreviatedName": "ON"
26+
}
27+
}
28+
]
29+
}
30+
}
31+
}
32+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-12-01",
4+
"endpoint": "https://resourcename.communication.azure.com/",
5+
"countryCode": "CA",
6+
"header": {
7+
"accept-language": "en-US"
8+
}
9+
},
10+
"responses": {
11+
"200": {
12+
"body": {
13+
"phoneNumberOfferings": [
14+
{
15+
"phoneNumberType": "geographic",
16+
"assignmentType": "person",
17+
"availableCapabilities": {
18+
"calling": "outbound",
19+
"sms": "outbound"
20+
},
21+
"cost": {
22+
"amount": 1.0,
23+
"currencyCode": "USD",
24+
"billingFrequency": "monthly"
25+
}
26+
},
27+
{
28+
"phoneNumberType": "geographic",
29+
"assignmentType": "person",
30+
"availableCapabilities": {
31+
"calling": "inbound+outbound",
32+
"sms": "outbound"
33+
},
34+
"cost": {
35+
"amount": 1.0,
36+
"currencyCode": "USD",
37+
"billingFrequency": "monthly"
38+
}
39+
},
40+
{
41+
"phoneNumberType": "tollFree",
42+
"assignmentType": "application",
43+
"availableCapabilities": {
44+
"calling": "none",
45+
"sms": "outbound"
46+
},
47+
"cost": {
48+
"amount": 2.0,
49+
"currencyCode": "USD",
50+
"billingFrequency": "monthly"
51+
}
52+
}
53+
]
54+
}
55+
}
56+
}
57+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-12-01",
4+
"endpoint": "https://resourcename.communication.azure.com/",
5+
"operationId": "search-my-operation-id"
6+
},
7+
"responses": {
8+
"200": {
9+
"headers": {
10+
"Location": "/availablePhoneNumbers/searchResults/378ddf60-81be-452a-ba4f-613198ea6c28"
11+
},
12+
"body": {
13+
"status": "succeeded",
14+
"resourceLocation": "/availablePhoneNumbers/searchResults/378ddf60-81be-452a-ba4f-613198ea6c28",
15+
"createdDateTime": "2020-11-19T16:31:49.048Z",
16+
"id": "search-my-operation-id",
17+
"operationType": "search",
18+
"lastActionDateTime": "2020-11-19T22:31:49.048Z"
19+
}
20+
}
21+
}
22+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-12-01",
4+
"endpoint": "https://resourcename.communication.azure.com/",
5+
"phoneNumber": "+11234567890"
6+
},
7+
"responses": {
8+
"200": {
9+
"headers": {},
10+
"body": {
11+
"id": "11234567890",
12+
"phoneNumber": "+11234567890",
13+
"countryCode": "US",
14+
"assignmentType": "person",
15+
"phoneNumberType": "geographic",
16+
"capabilities": {
17+
"calling": "inbound+outbound",
18+
"sms": "inbound"
19+
},
20+
"purchaseDate": "2020-11-19T16:31:49.048Z",
21+
"cost": {
22+
"amount": 0.8,
23+
"currencyCode": "USD",
24+
"billingFrequency": "monthly"
25+
}
26+
}
27+
}
28+
}
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-12-01",
4+
"searchId": "378ddf60-81be-452a-ba4f-613198ea6c28",
5+
"endpoint": "https://resourcename.communication.azure.com/"
6+
},
7+
"responses": {
8+
"200": {
9+
"headers": {},
10+
"body": {
11+
"searchId": "378ddf60-81be-452a-ba4f-613198ea6c28",
12+
"phoneNumbers": [
13+
"+18001212121"
14+
],
15+
"phoneNumberType": "tollFree",
16+
"assignmentType": "application",
17+
"capabilities": {
18+
"sms": "inbound+outbound",
19+
"calling": "none"
20+
},
21+
"cost": {
22+
"amount": 1.2,
23+
"currencyCode": "USD",
24+
"billingFrequency": "monthly"
25+
},
26+
"searchExpiresBy": "2020-11-19T16:31:49.048Z",
27+
"errorCode": 1000,
28+
"error": "OutOfStock"
29+
}
30+
}
31+
}
32+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-12-01",
4+
"endpoint": "https://resourcename.communication.azure.com/",
5+
"phoneNumber": "+11234567890"
6+
},
7+
"responses": {
8+
"200": {
9+
"headers": {},
10+
"body": {
11+
"phoneNumbers": [
12+
{
13+
"id": "11234567890",
14+
"phoneNumber": "+11234567890",
15+
"countryCode": "US",
16+
"assignmentType": "person",
17+
"phoneNumberType": "geographic",
18+
"capabilities": {
19+
"calling": "inbound+outbound",
20+
"sms": "inbound"
21+
},
22+
"purchaseDate": "2020-11-19T16:31:49.048Z",
23+
"cost": {
24+
"amount": 0.8,
25+
"currencyCode": "USD",
26+
"billingFrequency": "monthly"
27+
}
28+
}
29+
]
30+
}
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)