diff --git a/custom-words.txt b/custom-words.txt index 35e930fd7ebf..a138e7474e05 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -418,6 +418,7 @@ bzip cacerts cadl calculatebaseline +camara canadacentral canadaeast canceldelete diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/common.tsp b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/common.tsp new file mode 100644 index 000000000000..04cd2830874f --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/common.tsp @@ -0,0 +1,42 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-autorest"; +import "@azure-tools/typespec-azure-core"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.Core.Traits; + +namespace Azure.ProgrammableConnectivity; + +alias ServiceTraits = NoRepeatableRequests & + NoConditionalRequests & + SupportsClientRequestId & + RequestHeadersTrait; + +alias Operations = Azure.Core.ResourceOperations; + +@doc("Enum to provide static action endpoint") +enum CommonActionEnum { + @doc("Static endpoint") + action: "action", +} + +@doc("Resource representing an Operator Network") +@resource("network") +model Network { + @key + @pattern("[a-z0-9-]+$") + @doc("The ID of the network") + @visibility("read") + networkId: string; +} + +@doc("Header to identify APC Gateway resource.") +model ApcGatewayIdHeader { + @doc("The identifier of the APC Gateway resource which should handle this request.") + @header("apc-gateway-id") + apcGatewayId: string; +} diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/location.tsp b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/location.tsp new file mode 100644 index 000000000000..5c6575842495 --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/location.tsp @@ -0,0 +1,88 @@ +import "./common.tsp"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; + +namespace Azure.ProgrammableConnectivity; + +/// Interfaces + +interface LocationInterface { + verify is Operations.ResourceAction< + LocationEndpoint, + LocationVerifyRequest, + LocationVerifyResponse + >; +} + +/// Endpoints + +@resource("Location") +@doc("Static endpoint to access Location API") +model LocationEndpoint { + @key("action") + @doc("Static endpoint") + @visibility("read") + action: CommonActionEnum; +} + +/// Request models + +@doc("Request to verify Location") +model LocationVerifyRequest { + @doc("Network to query for this device") + network: Network; + + @doc("Latitude of location to be verified") + @minValue(-90) + @maxValue(90) + latitude: float32; + + @doc("Longitude of location to be verified") + @minValue(-180) + @maxValue(180) + longitude: float32; + + @doc("Accuracy expected for location verification in kilometers") + @minValue(2) + @maxValue(100) + accuracy: int32; + + @doc("Maximum age before a response is stale") + @minValue(60) + maxAge: int32; + + ...LocationDevice; +} + +/// Response models + +@doc("Response verifying location") +model LocationVerifyResponse { + @doc("True if the location is verified, False otherwise") + verified: boolean; +} + +/// Common models + +// TODO - implement maxProperties = 2 and minProperties = 2 +@doc("Device information needed by CAMARA Location API") +model LocationDevice { + @doc("External identifier or network access identifier of the device") + networkAccessIdentifier?: string; + + // TODO - is there a good way to commonise the phone number definition and still capture that it's sometimes required and sometimes optional? + @doc("Phone number in E.164 format (starting with country code), and optionally prefixed with '+'") + @pattern("^\\+?[0-9]{5,15}$") + phoneNumber?: string; + + @doc("IPv4 address and port of the device, in the form address:port") + @pattern("^([01]?\\d\\d?|2[0-4]\\d|25[0-5])(?:\\.(?:[01]?\\d\\d?|2[0-4]\\d|25[0-5])){3}(:\\d{1,4})?$") + ipv4Address?: string; + + @doc("IPv6 address of the device") + @pattern("^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))(\\/.+)?$") + ipv6Address?: string; +} diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/network.tsp b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/network.tsp new file mode 100644 index 000000000000..404d671c389c --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/network.tsp @@ -0,0 +1,42 @@ +import "./common.tsp"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.Core.Traits; + +namespace Azure.ProgrammableConnectivity; + +/// Interfaces + +interface Networks { + list is Operations.ResourceList; + + retrieve is Operations.ResourceAction< + NetworkRetrieveEndpoint, + NetworkDevice, + Network + >; +} + +/// Endpoints + +@resource("Network") +@doc("Static endpoint to access Network API") +model NetworkRetrieveEndpoint { + @key("action") + @doc("Static endpoint") + @visibility("read") + action: CommonActionEnum; +} + +/// Common models + +@doc("Represents a Device whose Network is searched for") +model NetworkDevice { + // TODO - is there a good way to commonise the phone number definition and still capture that it's sometimes required and sometimes optional? + @doc("Phone number in E.164 format (starting with country code), and optionally prefixed with '+'") + @pattern("^\\+?[0-9]{5,15}$") + phoneNumber: string; +} diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/number.tsp b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/number.tsp new file mode 100644 index 000000000000..8588e90ccabe --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/number.tsp @@ -0,0 +1,88 @@ +import "./common.tsp"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; + +namespace Azure.ProgrammableConnectivity; + +/// Interfaces + +@doc(""" + Number operations include Frontend Authentication. + + This means that each operation has 2 responses. + + The first response is a 302 redirect, which redirects the device to the device's Network + to authenticate directly. The Network responds with another 302 redirect and a token. + This redirects the device to APC, where the token is used to verify / retrieve + the device number. The second response is a 200 containing the result of the query. + + This flow takes place automatically without user interaction, and so only the result + of the entire flow (the 200 response) is included in this document. +""") +interface NumberInterface { + verify is Operations.ResourceAction< + NumberEndpoint, + NumberVerifyRequest, + NumberVerifyResponse + >; + + retrieve is Operations.ResourceAction< + NumberEndpoint, + {}, + NumberRetrieveResponse + >; +} + +/// Endpoints + +@resource("Number") +@doc("Static endpoint to access Number API") +model NumberEndpoint { + @key("action") + @doc("Static endpoint") + @visibility("read") + action: CommonActionEnum; +} + +/// Request models + +@doc("Request to verify number of device") +model NumberVerifyRequest { + @doc("Network to query for this device") + network: Network; + + ...NumberDevice; +} + +/// Response models + +@doc("Response verifying number of device") +model NumberVerifyResponse { + @doc("True if number is verified, False otherwise") + verified: boolean; +} + +@doc("Response with number of device") +model NumberRetrieveResponse { + // TODO - is there a good way to commonise the phone number definition and still capture that it's sometimes required and sometimes optional? + @doc("Phone number in E.164 format (starting with country code), and optionally prefixed with '+'") + @pattern("^\\+?[0-9]{5,15}$") + phoneNumber: string; +} + +/// Common models + +// TODO - implement maxProperties = 1 and minProperties = 1 +@doc("Device information needed by CAMARA Number API") +model NumberDevice { + // TODO - is there a good way to commonise the phone number definition and still capture that it's sometimes required and sometimes optional? + @doc("Phone number in E.164 format (starting with country code), and optionally prefixed with '+'") + @pattern("^\\+?[0-9]{5,15}$") + phoneNumber?: string; + + @doc("Hashed phone number. SHA-256 (in hexadecimal representation) of the mobile phone number in **E.164 format (starting with country code)**. Optionally prefixed with '+'.") + hashedPhoneNumber?: string; +} diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/simswap.tsp b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/simswap.tsp new file mode 100644 index 000000000000..108ef9d204d0 --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/simswap.tsp @@ -0,0 +1,81 @@ +import "./common.tsp"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.Core.Traits; + +namespace Azure.ProgrammableConnectivity; + +/// Interfaces + +interface SimSwapInterface { + retrieve is Operations.ResourceAction< + SimSwapEndpoint, + SimSwapRetrieveRequest, + SimSwapRetrieveResponse + >; + + verify is Operations.ResourceAction< + SimSwapEndpoint, + SimSwapVerifyRequest, + SimSwapVerifyResponse + >; +} + +/// Endpoints + +@resource("SimSwap") +@doc("Static endpoint to access SimSwap API") +model SimSwapEndpoint { + @key("action") + @doc("Static endpoint") + @visibility("read") + action: CommonActionEnum; +} + +/// Request models + +@doc("Request to retrieve SimSwap date") +model SimSwapRetrieveRequest { + @doc("Network to query for this device") + network: Network; + + ...SimSwapDevice; +} + +@doc("Request to verify SimSwap in period") +model SimSwapVerifyRequest { + @doc("Maximum lookback for SimSwap verification") + maxAge?: int32; + + @doc("Network to query for this device") + network: Network; + + ...SimSwapDevice; +} + +/// Response Models + +@doc("Response with SimSwap date") +model SimSwapRetrieveResponse { + @doc("Datetime of most recent swap for SIM") + date: utcDateTime; +} + +@doc("Response verifying SimSwap in period") +model SimSwapVerifyResponse { + @doc("True if the SIM has swapped in the specified period, False otherwise") + verified: boolean; +} + +/// Common models + +@doc("Device information needed by CAMARA SimSwap API") +model SimSwapDevice { + // TODO - is there a good way to commonise the phone number definition and still capture that it's sometimes required and sometimes optional? + @doc("Phone number in E.164 format (starting with country code), and optionally prefixed with '+'") + @pattern("^\\+?[0-9]{5,15}$") + phoneNumber: string; +} diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/client.tsp b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/client.tsp new file mode 100644 index 000000000000..164fc28c837f --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/client.tsp @@ -0,0 +1,5 @@ +/** + * PLACEHOLDER + * Add readme and sample + */ +import "./main.tsp"; diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/LocationInterface_Verify_MaximumSet_Gen.json b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/LocationInterface_Verify_MaximumSet_Gen.json new file mode 100644 index 000000000000..a4ec7d76a5c9 --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/LocationInterface_Verify_MaximumSet_Gen.json @@ -0,0 +1,28 @@ +{ + "title": "LocationInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "operationId": "LocationInterface_Verify", + "parameters": { + "api-version": "2023-11-14-preview", + "action": "action", + "x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000", + "apc-gateway-id": "zlnvwgnnhcbhlwnh", + "body": { + "network": {}, + "latitude": -88, + "longitude": -163, + "accuracy": 93, + "maxAge": 1195, + "networkAccessIdentifier": "awbbthkgdgvxbzywz", + "phoneNumber": "373736662145", + "ipv4Address": "236.236.60.07:8000", + "ipv6Address": "::/t(qq]" + } + }, + "responses": { + "200": { + "body": { + "verified": true + } + } + } +} diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/Networks_List_MaximumSet_Gen.json b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/Networks_List_MaximumSet_Gen.json new file mode 100644 index 000000000000..ae7616253a0b --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/Networks_List_MaximumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "Networks_List - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "operationId": "Networks_List", + "parameters": { + "api-version": "2023-11-14-preview", + "x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000", + "apc-gateway-id": "zlnvwgnnhcbhlwnh" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "networkId": "87" + } + ], + "nextLink": "https://microsoft.com/a" + } + } + } +} diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/Networks_Retrieve_MaximumSet_Gen.json b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/Networks_Retrieve_MaximumSet_Gen.json new file mode 100644 index 000000000000..77952e9e78e2 --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/Networks_Retrieve_MaximumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Networks_Retrieve - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "operationId": "Networks_Retrieve", + "parameters": { + "api-version": "2023-11-14-preview", + "action": "action", + "x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000", + "apc-gateway-id": "zlnvwgnnhcbhlwnh", + "body": { + "phoneNumber": "+3523311" + } + }, + "responses": { + "200": { + "body": { + "networkId": "87" + } + } + } +} diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/NumberInterface_Retrieve_MaximumSet_Gen.json b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/NumberInterface_Retrieve_MaximumSet_Gen.json new file mode 100644 index 000000000000..610607548958 --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/NumberInterface_Retrieve_MaximumSet_Gen.json @@ -0,0 +1,17 @@ +{ + "title": "NumberInterface_Retrieve", + "operationId": "NumberInterface_Retrieve", + "parameters": { + "api-version": "2023-11-14-preview", + "action": "action", + "x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000", + "apc-gateway-id": "zlnvwgnnhcbhlwnh" + }, + "responses": { + "200": { + "body": { + "phoneNumber": "27799869276" + } + } + } +} diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/NumberInterface_Verify_MaximumSet_Gen.json b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/NumberInterface_Verify_MaximumSet_Gen.json new file mode 100644 index 000000000000..ee8b183c505f --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/NumberInterface_Verify_MaximumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "NumberInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "operationId": "NumberInterface_Verify", + "parameters": { + "api-version": "2023-11-14-preview", + "action": "action", + "x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000", + "apc-gateway-id": "zlnvwgnnhcbhlwnh", + "body": { + "network": {}, + "phoneNumber": "+1277536317861", + "hashedPhoneNumber": "dvcnjvhhmlxbui" + } + }, + "responses": { + "200": { + "body": { + "verified": true + } + } + } +} diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/SimSwapInterface_Retrieve_MaximumSet_Gen.json b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/SimSwapInterface_Retrieve_MaximumSet_Gen.json new file mode 100644 index 000000000000..8fe66dab4869 --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/SimSwapInterface_Retrieve_MaximumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "SimSwapInterface_Retrieve - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "operationId": "SimSwapInterface_Retrieve", + "parameters": { + "api-version": "2023-11-14-preview", + "action": "action", + "x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000", + "apc-gateway-id": "zlnvwgnnhcbhlwnh", + "body": { + "network": {}, + "phoneNumber": "+714872" + } + }, + "responses": { + "200": { + "body": { + "date": "2023-11-28T14:07:55.771Z" + } + } + } +} diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/SimSwapInterface_Verify_MaximumSet_Gen.json b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/SimSwapInterface_Verify_MaximumSet_Gen.json new file mode 100644 index 000000000000..ba4a2445ec60 --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/SimSwapInterface_Verify_MaximumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "SimSwapInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "operationId": "SimSwapInterface_Verify", + "parameters": { + "api-version": "2023-11-14-preview", + "action": "action", + "x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000", + "apc-gateway-id": "zlnvwgnnhcbhlwnh", + "body": { + "maxAge": 11, + "network": {}, + "phoneNumber": "56705952" + } + }, + "responses": { + "200": { + "body": { + "verified": true + } + } + } +} diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/main.tsp b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/main.tsp new file mode 100644 index 000000000000..325e8e5fbd82 --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/main.tsp @@ -0,0 +1,35 @@ +import "./apis/location.tsp"; +import "./apis/network.tsp"; +import "./apis/number.tsp"; +import "./apis/simswap.tsp"; + +using TypeSpec.Http; +using TypeSpec.Versioning; +using Azure.Core; + +// TODO - understand if this is the right way to set up auth +@useAuth( + [ + OAuth2Auth<[ + { + type: OAuth2FlowType.implicit, + authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize", + scopes: ["https://programmableconnectivity.azure.net/default"], + } + ]> + ] +) +@service({ + title: "Programmable Connectivity", + version: "2023-11-14-preview", +}) +@useDependency(Azure.Core.Versions.v1_0_Preview_2) +@server( + "{endpoint}", + "Azure Programmable Connectivity Endpoint.", + { + @doc("An Azure Programmable Connectivity Endpoint providing access to Network APIs.") + endpoint: string, + } +) +namespace Azure.ProgrammableConnectivity; diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/tspconfig.yaml b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/tspconfig.yaml new file mode 100644 index 000000000000..30abc0d8a2c4 --- /dev/null +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/tspconfig.yaml @@ -0,0 +1,17 @@ +parameters: + "service-dir": + default: "sdk/azure.programmableconnectivity" + "dependencies": + "additionalDirectories": [] + default: "" +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" +linter: + extends: + - "@azure-tools/typespec-azure-core/all" diff --git a/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/LocationInterface_Verify_MaximumSet_Gen.json b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/LocationInterface_Verify_MaximumSet_Gen.json new file mode 100644 index 000000000000..a4ec7d76a5c9 --- /dev/null +++ b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/LocationInterface_Verify_MaximumSet_Gen.json @@ -0,0 +1,28 @@ +{ + "title": "LocationInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "operationId": "LocationInterface_Verify", + "parameters": { + "api-version": "2023-11-14-preview", + "action": "action", + "x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000", + "apc-gateway-id": "zlnvwgnnhcbhlwnh", + "body": { + "network": {}, + "latitude": -88, + "longitude": -163, + "accuracy": 93, + "maxAge": 1195, + "networkAccessIdentifier": "awbbthkgdgvxbzywz", + "phoneNumber": "373736662145", + "ipv4Address": "236.236.60.07:8000", + "ipv6Address": "::/t(qq]" + } + }, + "responses": { + "200": { + "body": { + "verified": true + } + } + } +} diff --git a/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/Networks_List_MaximumSet_Gen.json b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/Networks_List_MaximumSet_Gen.json new file mode 100644 index 000000000000..ae7616253a0b --- /dev/null +++ b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/Networks_List_MaximumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "Networks_List - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "operationId": "Networks_List", + "parameters": { + "api-version": "2023-11-14-preview", + "x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000", + "apc-gateway-id": "zlnvwgnnhcbhlwnh" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "networkId": "87" + } + ], + "nextLink": "https://microsoft.com/a" + } + } + } +} diff --git a/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/Networks_Retrieve_MaximumSet_Gen.json b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/Networks_Retrieve_MaximumSet_Gen.json new file mode 100644 index 000000000000..77952e9e78e2 --- /dev/null +++ b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/Networks_Retrieve_MaximumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Networks_Retrieve - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "operationId": "Networks_Retrieve", + "parameters": { + "api-version": "2023-11-14-preview", + "action": "action", + "x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000", + "apc-gateway-id": "zlnvwgnnhcbhlwnh", + "body": { + "phoneNumber": "+3523311" + } + }, + "responses": { + "200": { + "body": { + "networkId": "87" + } + } + } +} diff --git a/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/NumberInterface_Retrieve_MaximumSet_Gen.json b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/NumberInterface_Retrieve_MaximumSet_Gen.json new file mode 100644 index 000000000000..610607548958 --- /dev/null +++ b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/NumberInterface_Retrieve_MaximumSet_Gen.json @@ -0,0 +1,17 @@ +{ + "title": "NumberInterface_Retrieve", + "operationId": "NumberInterface_Retrieve", + "parameters": { + "api-version": "2023-11-14-preview", + "action": "action", + "x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000", + "apc-gateway-id": "zlnvwgnnhcbhlwnh" + }, + "responses": { + "200": { + "body": { + "phoneNumber": "27799869276" + } + } + } +} diff --git a/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/NumberInterface_Verify_MaximumSet_Gen.json b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/NumberInterface_Verify_MaximumSet_Gen.json new file mode 100644 index 000000000000..ee8b183c505f --- /dev/null +++ b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/NumberInterface_Verify_MaximumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "NumberInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "operationId": "NumberInterface_Verify", + "parameters": { + "api-version": "2023-11-14-preview", + "action": "action", + "x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000", + "apc-gateway-id": "zlnvwgnnhcbhlwnh", + "body": { + "network": {}, + "phoneNumber": "+1277536317861", + "hashedPhoneNumber": "dvcnjvhhmlxbui" + } + }, + "responses": { + "200": { + "body": { + "verified": true + } + } + } +} diff --git a/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/SimSwapInterface_Retrieve_MaximumSet_Gen.json b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/SimSwapInterface_Retrieve_MaximumSet_Gen.json new file mode 100644 index 000000000000..8fe66dab4869 --- /dev/null +++ b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/SimSwapInterface_Retrieve_MaximumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "SimSwapInterface_Retrieve - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "operationId": "SimSwapInterface_Retrieve", + "parameters": { + "api-version": "2023-11-14-preview", + "action": "action", + "x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000", + "apc-gateway-id": "zlnvwgnnhcbhlwnh", + "body": { + "network": {}, + "phoneNumber": "+714872" + } + }, + "responses": { + "200": { + "body": { + "date": "2023-11-28T14:07:55.771Z" + } + } + } +} diff --git a/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/SimSwapInterface_Verify_MaximumSet_Gen.json b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/SimSwapInterface_Verify_MaximumSet_Gen.json new file mode 100644 index 000000000000..ba4a2445ec60 --- /dev/null +++ b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/SimSwapInterface_Verify_MaximumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "SimSwapInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "operationId": "SimSwapInterface_Verify", + "parameters": { + "api-version": "2023-11-14-preview", + "action": "action", + "x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000", + "apc-gateway-id": "zlnvwgnnhcbhlwnh", + "body": { + "maxAge": 11, + "network": {}, + "phoneNumber": "56705952" + } + }, + "responses": { + "200": { + "body": { + "verified": true + } + } + } +} diff --git a/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/openapi.json b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/openapi.json new file mode 100644 index 000000000000..a2e84643bd3f --- /dev/null +++ b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/openapi.json @@ -0,0 +1,1034 @@ +{ + "swagger": "2.0", + "info": { + "title": "Programmable Connectivity", + "version": "2023-11-14-preview", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "name": "endpoint", + "in": "path", + "description": "An Azure Programmable Connectivity Endpoint providing access to Network APIs.", + "required": true, + "type": "string" + } + ] + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "OAuth2Auth": [ + "https://programmableconnectivity.azure.net/default" + ] + } + ], + "securityDefinitions": { + "OAuth2Auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://programmableconnectivity.azure.net/default": "" + } + } + }, + "tags": [], + "paths": { + "/Location/{action}:verify": { + "post": { + "operationId": "LocationInterface_Verify", + "description": "Resource action operation template.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "action", + "in": "path", + "description": "Static endpoint", + "required": true, + "type": "string", + "enum": [ + "action" + ], + "x-ms-enum": { + "name": "CommonActionEnum", + "modelAsString": true, + "values": [ + { + "name": "action", + "value": "action", + "description": "Static endpoint" + } + ] + } + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "$ref": "#/parameters/ApcGatewayIdHeader" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LocationVerifyRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/LocationVerifyResponse" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "LocationInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule": { + "$ref": "./examples/LocationInterface_Verify_MaximumSet_Gen.json" + } + } + } + }, + "/Network/{action}:retrieve": { + "post": { + "operationId": "Networks_Retrieve", + "description": "Resource action operation template.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "action", + "in": "path", + "description": "Static endpoint", + "required": true, + "type": "string", + "enum": [ + "action" + ], + "x-ms-enum": { + "name": "CommonActionEnum", + "modelAsString": true, + "values": [ + { + "name": "action", + "value": "action", + "description": "Static endpoint" + } + ] + } + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "$ref": "#/parameters/ApcGatewayIdHeader" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/NetworkDevice" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/Network" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Networks_Retrieve - generated by [MaximumSet] rule - generated by [MaximumSet] rule": { + "$ref": "./examples/Networks_Retrieve_MaximumSet_Gen.json" + } + } + } + }, + "/Number/{action}:verify": { + "post": { + "operationId": "NumberInterface_Verify", + "description": "Resource action operation template.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "action", + "in": "path", + "description": "Static endpoint", + "required": true, + "type": "string", + "enum": [ + "action" + ], + "x-ms-enum": { + "name": "CommonActionEnum", + "modelAsString": true, + "values": [ + { + "name": "action", + "value": "action", + "description": "Static endpoint" + } + ] + } + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "$ref": "#/parameters/ApcGatewayIdHeader" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/NumberVerifyRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/NumberVerifyResponse" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "NumberInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule": { + "$ref": "./examples/NumberInterface_Verify_MaximumSet_Gen.json" + } + } + } + }, + "/Number/{action}:retrieve": { + "post": { + "operationId": "NumberInterface_Retrieve", + "description": "Resource action operation template.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "action", + "in": "path", + "description": "Static endpoint", + "required": true, + "type": "string", + "enum": [ + "action" + ], + "x-ms-enum": { + "name": "CommonActionEnum", + "modelAsString": true, + "values": [ + { + "name": "action", + "value": "action", + "description": "Static endpoint" + } + ] + } + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "$ref": "#/parameters/ApcGatewayIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/NumberRetrieveResponse" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "NumberInterface_Retrieve": { + "$ref": "./examples/NumberInterface_Retrieve_MaximumSet_Gen.json" + } + } + } + }, + "/SimSwap/{action}:retrieve": { + "post": { + "operationId": "SimSwapInterface_Retrieve", + "description": "Resource action operation template.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "action", + "in": "path", + "description": "Static endpoint", + "required": true, + "type": "string", + "enum": [ + "action" + ], + "x-ms-enum": { + "name": "CommonActionEnum", + "modelAsString": true, + "values": [ + { + "name": "action", + "value": "action", + "description": "Static endpoint" + } + ] + } + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "$ref": "#/parameters/ApcGatewayIdHeader" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SimSwapRetrieveRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/SimSwapRetrieveResponse" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "SimSwapInterface_Retrieve - generated by [MaximumSet] rule - generated by [MaximumSet] rule": { + "$ref": "./examples/SimSwapInterface_Retrieve_MaximumSet_Gen.json" + } + } + } + }, + "/SimSwap/{action}:verify": { + "post": { + "operationId": "SimSwapInterface_Verify", + "description": "Resource action operation template.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "action", + "in": "path", + "description": "Static endpoint", + "required": true, + "type": "string", + "enum": [ + "action" + ], + "x-ms-enum": { + "name": "CommonActionEnum", + "modelAsString": true, + "values": [ + { + "name": "action", + "value": "action", + "description": "Static endpoint" + } + ] + } + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "$ref": "#/parameters/ApcGatewayIdHeader" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SimSwapVerifyRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/SimSwapVerifyResponse" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "SimSwapInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule": { + "$ref": "./examples/SimSwapInterface_Verify_MaximumSet_Gen.json" + } + } + } + }, + "/network": { + "get": { + "operationId": "Networks_List", + "description": "Resource list operation template.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "$ref": "#/parameters/ApcGatewayIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedNetwork" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Networks_List - generated by [MaximumSet] rule - generated by [MaximumSet] rule": { + "$ref": "./examples/Networks_List_MaximumSet_Gen.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "Azure.Core.Foundations.Error": { + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + }, + "x-ms-identifiers": [] + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "description": "A response containing error details.", + "properties": { + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "Inner error." + } + } + }, + "CommonActionEnum": { + "type": "string", + "description": "Enum to provide static action endpoint", + "enum": [ + "action" + ], + "x-ms-enum": { + "name": "CommonActionEnum", + "modelAsString": true, + "values": [ + { + "name": "action", + "value": "action", + "description": "Static endpoint" + } + ] + } + }, + "LocationDevice": { + "type": "object", + "description": "Device information needed by CAMARA Location API", + "properties": { + "networkAccessIdentifier": { + "type": "string", + "description": "External identifier or network access identifier of the device" + }, + "phoneNumber": { + "type": "string", + "description": "Phone number in E.164 format (starting with country code), and optionally prefixed with '+'", + "pattern": "^\\+?[0-9]{5,15}$" + }, + "ipv4Address": { + "type": "string", + "description": "IPv4 address and port of the device, in the form address:port", + "pattern": "^([01]?\\d\\d?|2[0-4]\\d|25[0-5])(?:\\.(?:[01]?\\d\\d?|2[0-4]\\d|25[0-5])){3}(:\\d{1,4})?$" + }, + "ipv6Address": { + "type": "string", + "description": "IPv6 address of the device", + "pattern": "^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))(\\/.+)?$" + } + } + }, + "LocationEndpoint": { + "type": "object", + "description": "Static endpoint to access Location API", + "properties": { + "action": { + "$ref": "#/definitions/CommonActionEnum", + "description": "Static endpoint", + "readOnly": true + } + }, + "required": [ + "action" + ] + }, + "LocationVerifyRequest": { + "type": "object", + "description": "Request to verify Location", + "properties": { + "network": { + "$ref": "#/definitions/Network", + "description": "Network to query for this device" + }, + "latitude": { + "type": "number", + "format": "float", + "description": "Latitude of location to be verified", + "minimum": -90, + "maximum": 90 + }, + "longitude": { + "type": "number", + "format": "float", + "description": "Longitude of location to be verified", + "minimum": -180, + "maximum": 180 + }, + "accuracy": { + "type": "integer", + "format": "int32", + "description": "Accuracy expected for location verification in kilometers", + "minimum": 2, + "maximum": 100 + }, + "maxAge": { + "type": "integer", + "format": "int32", + "description": "Maximum age before a response is stale", + "minimum": 60 + }, + "networkAccessIdentifier": { + "type": "string", + "description": "External identifier or network access identifier of the device" + }, + "phoneNumber": { + "type": "string", + "description": "Phone number in E.164 format (starting with country code), and optionally prefixed with '+'", + "pattern": "^\\+?[0-9]{5,15}$" + }, + "ipv4Address": { + "type": "string", + "description": "IPv4 address and port of the device, in the form address:port", + "pattern": "^([01]?\\d\\d?|2[0-4]\\d|25[0-5])(?:\\.(?:[01]?\\d\\d?|2[0-4]\\d|25[0-5])){3}(:\\d{1,4})?$" + }, + "ipv6Address": { + "type": "string", + "description": "IPv6 address of the device", + "pattern": "^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))(\\/.+)?$" + } + }, + "required": [ + "network", + "latitude", + "longitude", + "accuracy", + "maxAge" + ] + }, + "LocationVerifyResponse": { + "type": "object", + "description": "Response verifying location", + "properties": { + "verified": { + "type": "boolean", + "description": "True if the location is verified, False otherwise" + } + }, + "required": [ + "verified" + ] + }, + "Network": { + "type": "object", + "description": "Resource representing an Operator Network", + "properties": { + "networkId": { + "type": "string", + "description": "The ID of the network", + "pattern": "[a-z0-9-]+$", + "readOnly": true + } + }, + "required": [ + "networkId" + ] + }, + "NetworkDevice": { + "type": "object", + "description": "Represents a Device whose Network is searched for", + "properties": { + "phoneNumber": { + "type": "string", + "description": "Phone number in E.164 format (starting with country code), and optionally prefixed with '+'", + "pattern": "^\\+?[0-9]{5,15}$" + } + }, + "required": [ + "phoneNumber" + ] + }, + "NetworkRetrieveEndpoint": { + "type": "object", + "description": "Static endpoint to access Network API", + "properties": { + "action": { + "$ref": "#/definitions/CommonActionEnum", + "description": "Static endpoint", + "readOnly": true + } + }, + "required": [ + "action" + ] + }, + "NumberDevice": { + "type": "object", + "description": "Device information needed by CAMARA Number API", + "properties": { + "phoneNumber": { + "type": "string", + "description": "Phone number in E.164 format (starting with country code), and optionally prefixed with '+'", + "pattern": "^\\+?[0-9]{5,15}$" + }, + "hashedPhoneNumber": { + "type": "string", + "description": "Hashed phone number. SHA-256 (in hexadecimal representation) of the mobile phone number in **E.164 format (starting with country code)**. Optionally prefixed with '+'." + } + } + }, + "NumberEndpoint": { + "type": "object", + "description": "Static endpoint to access Number API", + "properties": { + "action": { + "$ref": "#/definitions/CommonActionEnum", + "description": "Static endpoint", + "readOnly": true + } + }, + "required": [ + "action" + ] + }, + "NumberRetrieveResponse": { + "type": "object", + "description": "Response with number of device", + "properties": { + "phoneNumber": { + "type": "string", + "description": "Phone number in E.164 format (starting with country code), and optionally prefixed with '+'", + "pattern": "^\\+?[0-9]{5,15}$" + } + }, + "required": [ + "phoneNumber" + ] + }, + "NumberVerifyRequest": { + "type": "object", + "description": "Request to verify number of device", + "properties": { + "network": { + "$ref": "#/definitions/Network", + "description": "Network to query for this device" + }, + "phoneNumber": { + "type": "string", + "description": "Phone number in E.164 format (starting with country code), and optionally prefixed with '+'", + "pattern": "^\\+?[0-9]{5,15}$" + }, + "hashedPhoneNumber": { + "type": "string", + "description": "Hashed phone number. SHA-256 (in hexadecimal representation) of the mobile phone number in **E.164 format (starting with country code)**. Optionally prefixed with '+'." + } + }, + "required": [ + "network" + ] + }, + "NumberVerifyResponse": { + "type": "object", + "description": "Response verifying number of device", + "properties": { + "verified": { + "type": "boolean", + "description": "True if number is verified, False otherwise" + } + }, + "required": [ + "verified" + ] + }, + "PagedNetwork": { + "type": "object", + "description": "Paged collection of Network items", + "properties": { + "value": { + "type": "array", + "description": "The Network items on this page", + "items": { + "$ref": "#/definitions/Network" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "SimSwapDevice": { + "type": "object", + "description": "Device information needed by CAMARA SimSwap API", + "properties": { + "phoneNumber": { + "type": "string", + "description": "Phone number in E.164 format (starting with country code), and optionally prefixed with '+'", + "pattern": "^\\+?[0-9]{5,15}$" + } + }, + "required": [ + "phoneNumber" + ] + }, + "SimSwapEndpoint": { + "type": "object", + "description": "Static endpoint to access SimSwap API", + "properties": { + "action": { + "$ref": "#/definitions/CommonActionEnum", + "description": "Static endpoint", + "readOnly": true + } + }, + "required": [ + "action" + ] + }, + "SimSwapRetrieveRequest": { + "type": "object", + "description": "Request to retrieve SimSwap date", + "properties": { + "network": { + "$ref": "#/definitions/Network", + "description": "Network to query for this device" + }, + "phoneNumber": { + "type": "string", + "description": "Phone number in E.164 format (starting with country code), and optionally prefixed with '+'", + "pattern": "^\\+?[0-9]{5,15}$" + } + }, + "required": [ + "network", + "phoneNumber" + ] + }, + "SimSwapRetrieveResponse": { + "type": "object", + "description": "Response with SimSwap date", + "properties": { + "date": { + "type": "string", + "format": "date-time", + "description": "Datetime of most recent swap for SIM" + } + }, + "required": [ + "date" + ] + }, + "SimSwapVerifyRequest": { + "type": "object", + "description": "Request to verify SimSwap in period", + "properties": { + "maxAge": { + "type": "integer", + "format": "int32", + "description": "Maximum lookback for SimSwap verification" + }, + "network": { + "$ref": "#/definitions/Network", + "description": "Network to query for this device" + }, + "phoneNumber": { + "type": "string", + "description": "Phone number in E.164 format (starting with country code), and optionally prefixed with '+'", + "pattern": "^\\+?[0-9]{5,15}$" + } + }, + "required": [ + "network", + "phoneNumber" + ] + }, + "SimSwapVerifyResponse": { + "type": "object", + "description": "Response verifying SimSwap in period", + "properties": { + "verified": { + "type": "boolean", + "description": "True if the SIM has swapped in the specified period, False otherwise" + } + }, + "required": [ + "verified" + ] + } + }, + "parameters": { + "ApcGatewayIdHeader": { + "name": "apc-gateway-id", + "in": "header", + "description": "The identifier of the APC Gateway resource which should handle this request.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-client-name": "apcGatewayId" + }, + "Azure.Core.ClientRequestIdHeader": { + "name": "x-ms-client-request-id", + "in": "header", + "description": "An opaque, globally-unique, client-generated string identifier for the request.", + "required": false, + "type": "string", + "format": "uuid", + "x-ms-parameter-location": "method", + "x-ms-client-name": "clientRequestId" + }, + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" + } + } +} diff --git a/specification/programmableconnectivity/data-plane/readme.md b/specification/programmableconnectivity/data-plane/readme.md new file mode 100644 index 000000000000..f011784ea846 --- /dev/null +++ b/specification/programmableconnectivity/data-plane/readme.md @@ -0,0 +1,40 @@ +# Azure Programmable Connectivity + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Azure Programmable Connectivity. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the Azure Programmable Connectivity. + +```yaml +openapi-type: data-plane +tag: package-2023-11-14-preview +title: AzureProgrammableConnectivity +``` + +### Tag: package-2023-11-14-preview + +These settings apply only when `--tag=package-2023-11-14-preview` is specified on the command line. + +```yaml $(tag) == 'package-2023-11-14-preview' +input-file: + - Azure.ProgrammableConnectivity/preview/2023-11-14-preview/openapi.json +``` \ No newline at end of file