diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/common.tsp b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/common.tsp index 61451a39f267..eb8b3bf4762f 100644 --- a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/common.tsp +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/common.tsp @@ -16,24 +16,7 @@ alias ServiceTraits = NoRepeatableRequests & SupportsClientRequestId & RequestHeadersTrait; -alias Operations = Azure.Core.ResourceOperations; - -// TODO - This Enum only exists to stop linting yelling at us. Can we do this better? -@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; -} +alias Operations = Azure.Core.ResourceOperations; @doc("Header to identify APC Gateway resource.") model ApcGatewayIdHeader { @@ -41,3 +24,40 @@ model ApcGatewayIdHeader { @header("apc-gateway-id") apcGatewayId: string; } + +@doc("Identifier for the network to be queried") +model NetworkIdentifier { + @doc("The type of identifier for the network. one of: 'IPv4', 'IPv6', 'NetworkCode'") + identifierType: string; + /** + The network identifier in a format matching the type above: + - IPv4 of a device in dotted-quad form 1.2.3.4. + - IPv6 of a device in IETF 5952 format. + - NetworkCode matching our documentation or an output from /Network:retrieve." + */ + identifier: string; +} + + @doc("The phone number of the device to be identified.") + model PhoneNumberModel + { + @doc("Phone number in E.164 format (starting with country code), and optionally prefixed with '+'") + @pattern("^\\+?[0-9]{5,15}$") + phoneNumber?: string; + } + +@error +@doc("A custom error type for APC.") +model ApcErrorResponse { + @doc("The numeric error code.") + status: int32; + + @doc("The error code") + code: string; + + @doc("The detailed error message.") + errorMessage: string; + + @doc("The consent URL in case of a consent failure") + consentUrl?: url; +} diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/location.tsp b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/location.tsp index 031e5245ac83..6cad5a77fcfc 100644 --- a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/location.tsp +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/location.tsp @@ -10,6 +10,7 @@ namespace Azure.ProgrammableConnectivity; /// Interfaces interface LocationInterface { + @doc("Verifies whether a device is within a specified location area, defined as an accuracy (radius) around a point, specified by longitude and latitude.") verify is Operations.ResourceAction< LocationEndpoint, LocationVerifyRequest, @@ -25,15 +26,15 @@ model LocationEndpoint { @key("action") @doc("Static endpoint") @visibility("read") - action: CommonActionEnum; + action: ""; } /// Request models @doc("Request to verify Location") model LocationVerifyRequest { - @doc("Network to query for this device") - network: Network; + @doc("Network to query for this device, or device information to enable network routing.") + networkIdentifier: NetworkIdentifier; @doc("Latitude of location to be verified") @minValue(-90) @@ -50,7 +51,8 @@ model LocationVerifyRequest { @maxValue(100) accuracy: int32; - ...LocationDevice; + @doc("The device to find the location for.") + locationDevice: LocationDevice } /// Response models @@ -62,23 +64,43 @@ model LocationVerifyResponse { } /// Common models - -// TODO - implement maxProperties = 1 and minProperties = 1 -@doc("Device information needed by CAMARA Location API") +@doc("Device information needed by operator to provide location information. Include exactly one of these properties to identify your device.") model LocationDevice { @doc("External identifier or network access identifier of the device") networkAccessIdentifier?: string; + + ...PhoneNumberModel; + + @doc ("IPv4 address and port of the device") + ipv4Address?: Ipv4Address; - // 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 ("IPv6 address and port of the device") + ipv6Address?: Ipv6Address; +} - @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 ("IPv4 device indicator") +model Ipv4Address { + /** IPv4 address may be specified in form
as: + - address - an IPv4 number in dotted-quad form 1.2.3.4. Only this exact IP number will match the flow control rule. + - address/mask - an IP number as above with a mask width of the form 1.2.3.4/24. + In this case, all IP numbers from 1.2.3.0 to 1.2.3.255 will match. The bit width MUST be valid for the IP version. */ + ipv4: string; + + @doc ("User equipment port.") + port: int32; +} - @doc("IPv6 address of the device") - @pattern("^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))(\\/.+)?$") - ipv6Address?: string; +@doc ("IPv6 device indicator") +model Ipv6Address { + /** IPv6 address, following IETF 5952 format, may be specified in form
as: + - address - The /128 subnet is optional for single addresses: + - 2001:db8:85a3:8d3:1319:8a2e:370:7344 + - 2001:db8:85a3:8d3:1319:8a2e:370:7344/128 + - address/mask - an IP v6 number with a mask: + - 2001:db8:85a3:8d3::0/64 + - 2001:db8:85a3:8d3::/64 */ + ipv6: string; + + @doc ("User equipment port.") + port: int32; } \ No newline at end of file diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/network.tsp b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/network.tsp index 955ea442add5..bff8f089ff1f 100644 --- a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/network.tsp +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/network.tsp @@ -11,12 +11,10 @@ namespace Azure.ProgrammableConnectivity; /// Interfaces interface Networks { - // TODO - do we need this? - list is Operations.ResourceList; - + @doc("Retrieves the network a given device is on. Returns network in a networkCode format that can be used for other APIs.") retrieve is Operations.ResourceAction< NetworkRetrieveEndpoint, - NetworkDevice, + DeviceNetworkIdentifier, Network >; } @@ -29,15 +27,23 @@ model NetworkRetrieveEndpoint { @key("action") @doc("Static endpoint") @visibility("read") - action: CommonActionEnum; + action: ""; } /// 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; +@doc("The device for which to find the network.") +model DeviceNetworkIdentifier { + @doc("The type of device identifier given: 'IPv4' or 'IPv6'.") + identifierType: string; + /** The device identifier in a format matching the type above: + - IPv4 in dotted-quad format. + - IPV6 in IETF 5952 format.*/ + deviceIdentifier: string; } + +@doc("The network that the device is on.") +model Network { + @pattern("[a-z0-9-]+$") + @doc("The identifier for the network. This can be used as the networkIdentifier for the service APIs.") + networkCode: string; +} \ No newline at end of file diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/number.tsp b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/number.tsp index 5e8756766736..46a4eecd4633 100644 --- a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/number.tsp +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/number.tsp @@ -23,16 +23,18 @@ namespace Azure.ProgrammableConnectivity; of the entire flow (the 200 response) is included in this document. """) interface NumberInterface { + + @doc("Verifies the phone number (MSISDN) associated with a device.") verify is Operations.ResourceAction< NumberEndpoint, NumberVerifyRequest, NumberVerifyResponse >; - // TODO - GET or POST? + @doc("Retrieves the phone number (MSISDN) associated with a device.") retrieve is Operations.ResourceAction< NumberEndpoint, - {}, + NetworkIdentifier, NumberRetrieveResponse >; } @@ -45,15 +47,15 @@ model NumberEndpoint { @key("action") @doc("Static endpoint") @visibility("read") - action: CommonActionEnum; + action: ""; } /// Request models @doc("Request to verify number of device") model NumberVerifyRequest { - @doc("Network to query for this device") - network: Network; + @doc("Identifier for the network to query for this device.") + networkIdentifier: NetworkIdentifier; ...NumberDevice; } @@ -68,21 +70,15 @@ model NumberVerifyResponse { @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") +@doc("Device information to verify phone number. Include exactly one form of phone number.") 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; + ...PhoneNumberModel; @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 index 108ef9d204d0..85ce58fab364 100644 --- a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/simswap.tsp +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/apis/simswap.tsp @@ -9,14 +9,16 @@ using Azure.Core.Traits; namespace Azure.ProgrammableConnectivity; /// Interfaces - +@doc("SIM Swap API provides the customer the ability to obtain information on any recent SIM pairing change related to the User's mobile account.") interface SimSwapInterface { + @doc("Provides timestamp of latest SIM swap") retrieve is Operations.ResourceAction< SimSwapEndpoint, SimSwapRetrieveRequest, SimSwapRetrieveResponse >; + @doc("Verifies if a SIM swap has been performed during a past period (defined in the request with 'maxAgeHours' attribute). Returns 'True' if a SIM swap has occured.") verify is Operations.ResourceAction< SimSwapEndpoint, SimSwapVerifyRequest, @@ -32,28 +34,28 @@ model SimSwapEndpoint { @key("action") @doc("Static endpoint") @visibility("read") - action: CommonActionEnum; + action: ""; } /// Request models @doc("Request to retrieve SimSwap date") model SimSwapRetrieveRequest { - @doc("Network to query for this device") - network: Network; - ...SimSwapDevice; + + @doc("Network to query for this device") + networkIdentifier: NetworkIdentifier; } @doc("Request to verify SimSwap in period") model SimSwapVerifyRequest { @doc("Maximum lookback for SimSwap verification") - maxAge?: int32; + @minValue(1) + @maxValue(2400) + maxAgeHours?: int32 = 240; - @doc("Network to query for this device") - network: Network; - - ...SimSwapDevice; + @doc("Identifier for the network to query for this device.") + networkIdentifier: NetworkIdentifier; } /// Response Models @@ -72,10 +74,10 @@ model SimSwapVerifyResponse { /// Common models -@doc("Device information needed by CAMARA SimSwap API") +@doc("Device information needed by operator to find sim swap information.") 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/examples/LocationInterface_Verify_MaximumSet_Gen.json b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/LocationInterface_Verify_MaximumSet_Gen.json index 8828f3df4c3a..f4c7ead4368b 100644 --- a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/LocationInterface_Verify_MaximumSet_Gen.json +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/LocationInterface_Verify_MaximumSet_Gen.json @@ -1,20 +1,30 @@ { - "title": "LocationInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "title": "LocationInterface_Verify", "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", + "x-ms-client-request-id": "peoejiqirqp", + "apc-gateway-id": "zdgrzzaxlodrvewbksn", "body": { - "network": {}, - "latitude": -88, - "longitude": -163, - "accuracy": 93, - "networkAccessIdentifier": "awbbthkgdgvxbzywz", - "phoneNumber": "373736662145", - "ipv4Address": "236.236.60.07:8000", - "ipv6Address": "::/t(qq]" + "networkIdentifier": { + "identifierType": "ipv4", + "identifier": "12.12.12.12" + }, + "latitude": 70, + "longitude": -161, + "accuracy": 91, + "locationDevice": { + "networkAccessIdentifier": "122345@domain.com", + "phoneNumber": "+447000000000", + "ipv4Address": { + "ipv4": "12.12.12.12", + "port": 2442 + }, + "ipv6Address": { + "ipv6": "3001:0da8:75a3:0000:0000:8a2e:0370:7334", + "port": 1643 + } + } } }, "responses": { @@ -22,6 +32,28 @@ "body": { "verified": true } + }, + "403": { + "body": { + "status": 403, + "message": "There user has not consented", + "code": "CONSENT_URL_ERROR", + "consentUrl": "https://operator.consent_url.com" + } + }, + "404":{ + "body":{ + "status": 404, + "message": "There is no Operator configured for this network.", + "code": "OPERATOR_NOT_FOUND" + } + }, + "500":{ + "body":{ + "status": 500, + "message": "INTERNAL_ERROR", + "code": "Internal error occurred" + } } } -} +} \ No newline at end of file diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/Networks_List_MaximumSet_Gen.json b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/Networks_List_MaximumSet_Gen.json deleted file mode 100644 index ae7616253a0b..000000000000 --- a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/Networks_List_MaximumSet_Gen.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "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 index 77952e9e78e2..9ec39cb2ed17 100644 --- a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/Networks_Retrieve_MaximumSet_Gen.json +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/Networks_Retrieve_MaximumSet_Gen.json @@ -1,20 +1,25 @@ { - "title": "Networks_Retrieve - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "title": "Networks_Retrieve", "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", + "x-ms-client-request-id": "peoejiqirqp", + "apc-gateway-id": "zdgrzzaxlodrvewbksn", "body": { - "phoneNumber": "+3523311" + "identifierType": "ipv6", + "deviceIdentifier": "3001:0da8:75a3:0000:0000:8a2e:0370:7334" } }, "responses": { "200": { "body": { - "networkId": "87" + "networkCode": "Example_Network" } + }, + "404": { + "status": 404, + "message": "There is no Operator configured for this IP address.", + "code": "OPERATOR_NOT_FOUND" } } -} +} \ No newline at end of file diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/NumberInterface_Retrieve_MaximumSet_Gen.json b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/NumberInterface_Retrieve_MaximumSet_Gen.json index 610607548958..3d713bd2d887 100644 --- a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/NumberInterface_Retrieve_MaximumSet_Gen.json +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/NumberInterface_Retrieve_MaximumSet_Gen.json @@ -3,15 +3,32 @@ "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" + "x-ms-client-request-id": "peoejiqirqp", + "apc-gateway-id": "zdgrzzaxlodrvewbksn", + "body": { + "identifierType": "ipv6", + "deviceIdentifier": "3001:0da8:75a3:0000:0000:8a2e:0370:7334" + } }, "responses": { "200": { "body": { - "phoneNumber": "27799869276" + "phoneNumber": "7570575566" } - } + }, + "404":{ + "body":{ + "status": 404, + "message": "There is no Operator configured for this network.", + "code": "OPERATOR_NOT_FOUND" + } + }, + "500":{ + "body":{ + "status": 500, + "message": "INTERNAL_ERROR", + "code": "Internal error occurred" + } + } } -} +} \ No newline at end of file diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/NumberInterface_Verify_MaximumSet_Gen.json b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/NumberInterface_Verify_MaximumSet_Gen.json index ee8b183c505f..17e7bce59d73 100644 --- a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/NumberInterface_Verify_MaximumSet_Gen.json +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/NumberInterface_Verify_MaximumSet_Gen.json @@ -1,15 +1,17 @@ { - "title": "NumberInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "title": "NumberInterface_Verify", "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", + "x-ms-client-request-id": "peoejiqirqp", + "apc-gateway-id": "zdgrzzaxlodrvewbksn", "body": { - "network": {}, - "phoneNumber": "+1277536317861", - "hashedPhoneNumber": "dvcnjvhhmlxbui" + "networkIdentifier": { + "identifierType": "IPv4", + "identifier": "12.12.12.12" + }, + "phoneNumber": "304265322620", + "hashedPhoneNumber": "sgzvoznnzpn" } }, "responses": { @@ -17,6 +19,20 @@ "body": { "verified": true } + }, + "404":{ + "body":{ + "status": 404, + "message": "There is no Operator configured for this network.", + "code": "OPERATOR_NOT_FOUND" + } + }, + "500":{ + "body":{ + "status": 500, + "message": "INTERNAL_ERROR", + "code": "Internal error occurred" + } } } -} +} \ No newline at end of file diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/SimSwapInterface_Retrieve_MaximumSet_Gen.json b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/SimSwapInterface_Retrieve_MaximumSet_Gen.json index 8fe66dab4869..9eb2461e3c22 100644 --- a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/SimSwapInterface_Retrieve_MaximumSet_Gen.json +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/SimSwapInterface_Retrieve_MaximumSet_Gen.json @@ -1,21 +1,37 @@ { - "title": "SimSwapInterface_Retrieve - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "title": "SimSwapInterface_Retrieve", "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", + "x-ms-client-request-id": "peoejiqirqp", + "apc-gateway-id": "zdgrzzaxlodrvewbksn", "body": { - "network": {}, - "phoneNumber": "+714872" + "phoneNumber": "+61215310263792", + "networkIdentifier": { + "identifierType": "IPv6", + "identifier": "2001:0db8:85a3:0000:0000:8a2e:0370:7334" + } } }, "responses": { "200": { "body": { - "date": "2023-11-28T14:07:55.771Z" + "date": "2023-12-12T09:01:33.333Z" + } + }, + "404":{ + "body":{ + "status": 404, + "message": "There is no Operator configured for this network.", + "code": "OPERATOR_NOT_FOUND" + } + }, + "500":{ + "body":{ + "status": 500, + "message": "INTERNAL_ERROR", + "code": "Internal error occurred" } } } -} +} \ No newline at end of file diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/main.tsp b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/main.tsp index 40a9dd80a0f1..cd287f656f49 100644 --- a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/main.tsp +++ b/specification/programmableconnectivity/Azure.ProgrammableConnectivity/main.tsp @@ -15,7 +15,7 @@ using Azure.Core; { type: OAuth2FlowType.implicit, authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize", - scopes: ["https://programmableconnectivity.azure.net/default"], + scopes: ["https://programmableconnectivity.azure.net/.default"], } ]> ] @@ -25,12 +25,11 @@ using Azure.Core; version: "2023-11-14-preview", }) @useDependency(Azure.Core.Versions.v1_0_Preview_2) -// TODO - what is this? @server( "{endpoint}", "Azure Programmable Connectivity Endpoint.", { - @doc("An Azure Programmable Connectivity Endpoint providing access to Network APIs.") + @doc("An Azure Programmable Connectivity Endpoint providing access to Network APIs, for example eastus.usprod.apcgatewayapi.azure.com") endpoint: string, } ) 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 index 8828f3df4c3a..f4c7ead4368b 100644 --- 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 @@ -1,20 +1,30 @@ { - "title": "LocationInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "title": "LocationInterface_Verify", "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", + "x-ms-client-request-id": "peoejiqirqp", + "apc-gateway-id": "zdgrzzaxlodrvewbksn", "body": { - "network": {}, - "latitude": -88, - "longitude": -163, - "accuracy": 93, - "networkAccessIdentifier": "awbbthkgdgvxbzywz", - "phoneNumber": "373736662145", - "ipv4Address": "236.236.60.07:8000", - "ipv6Address": "::/t(qq]" + "networkIdentifier": { + "identifierType": "ipv4", + "identifier": "12.12.12.12" + }, + "latitude": 70, + "longitude": -161, + "accuracy": 91, + "locationDevice": { + "networkAccessIdentifier": "122345@domain.com", + "phoneNumber": "+447000000000", + "ipv4Address": { + "ipv4": "12.12.12.12", + "port": 2442 + }, + "ipv6Address": { + "ipv6": "3001:0da8:75a3:0000:0000:8a2e:0370:7334", + "port": 1643 + } + } } }, "responses": { @@ -22,6 +32,28 @@ "body": { "verified": true } + }, + "403": { + "body": { + "status": 403, + "message": "There user has not consented", + "code": "CONSENT_URL_ERROR", + "consentUrl": "https://operator.consent_url.com" + } + }, + "404":{ + "body":{ + "status": 404, + "message": "There is no Operator configured for this network.", + "code": "OPERATOR_NOT_FOUND" + } + }, + "500":{ + "body":{ + "status": 500, + "message": "INTERNAL_ERROR", + "code": "Internal error occurred" + } } } -} +} \ No newline at end of file diff --git a/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/LocationInterface_Verify_MinimumSet_Gen.json b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/LocationInterface_Verify_MinimumSet_Gen.json new file mode 100644 index 000000000000..0f3302732092 --- /dev/null +++ b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/LocationInterface_Verify_MinimumSet_Gen.json @@ -0,0 +1,25 @@ +{ + "title": "LocationInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "operationId": "LocationInterface_Verify", + "parameters": { + "api-version": "2023-11-14-preview", + "apc-gateway-id": "zlnvwgnnhcbhlwnh", + "body": { + "networkIdentifier": { + "identifierType": "Ipv4", + "identifier": "236.236.60.07" + }, + "latitude": -88, + "longitude": -163, + "accuracy": 93, + "locationDevice": {} + } + }, + "responses": { + "200": { + "body": { + "verified": true + } + } + } +} \ No newline at end of file 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 deleted file mode 100644 index ae7616253a0b..000000000000 --- a/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/Networks_List_MaximumSet_Gen.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "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 index 77952e9e78e2..9ec39cb2ed17 100644 --- 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 @@ -1,20 +1,25 @@ { - "title": "Networks_Retrieve - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "title": "Networks_Retrieve", "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", + "x-ms-client-request-id": "peoejiqirqp", + "apc-gateway-id": "zdgrzzaxlodrvewbksn", "body": { - "phoneNumber": "+3523311" + "identifierType": "ipv6", + "deviceIdentifier": "3001:0da8:75a3:0000:0000:8a2e:0370:7334" } }, "responses": { "200": { "body": { - "networkId": "87" + "networkCode": "Example_Network" } + }, + "404": { + "status": 404, + "message": "There is no Operator configured for this IP address.", + "code": "OPERATOR_NOT_FOUND" } } -} +} \ No newline at end of file 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 index 610607548958..3d713bd2d887 100644 --- 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 @@ -3,15 +3,32 @@ "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" + "x-ms-client-request-id": "peoejiqirqp", + "apc-gateway-id": "zdgrzzaxlodrvewbksn", + "body": { + "identifierType": "ipv6", + "deviceIdentifier": "3001:0da8:75a3:0000:0000:8a2e:0370:7334" + } }, "responses": { "200": { "body": { - "phoneNumber": "27799869276" + "phoneNumber": "7570575566" } - } + }, + "404":{ + "body":{ + "status": 404, + "message": "There is no Operator configured for this network.", + "code": "OPERATOR_NOT_FOUND" + } + }, + "500":{ + "body":{ + "status": 500, + "message": "INTERNAL_ERROR", + "code": "Internal error occurred" + } + } } -} +} \ No newline at end of file diff --git a/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/NumberInterface_Retrieve_MinimumSet_Gen.json b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/NumberInterface_Retrieve_MinimumSet_Gen.json new file mode 100644 index 000000000000..8dc3b5de9a9e --- /dev/null +++ b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/NumberInterface_Retrieve_MinimumSet_Gen.json @@ -0,0 +1,15 @@ +{ + "title": "NumberInterface_Retrieve - generated by [MinimumSet] rule", + "operationId": "NumberInterface_Retrieve", + "parameters": { + "api-version": "2023-11-14-preview", + "apc-gateway-id": "zlnvwgnnhcbhlwnh" + }, + "responses": { + "200": { + "body": { + "phoneNumber": "27799869276" + } + } + } +} \ No newline at end of file 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 index ee8b183c505f..17e7bce59d73 100644 --- 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 @@ -1,15 +1,17 @@ { - "title": "NumberInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "title": "NumberInterface_Verify", "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", + "x-ms-client-request-id": "peoejiqirqp", + "apc-gateway-id": "zdgrzzaxlodrvewbksn", "body": { - "network": {}, - "phoneNumber": "+1277536317861", - "hashedPhoneNumber": "dvcnjvhhmlxbui" + "networkIdentifier": { + "identifierType": "IPv4", + "identifier": "12.12.12.12" + }, + "phoneNumber": "304265322620", + "hashedPhoneNumber": "sgzvoznnzpn" } }, "responses": { @@ -17,6 +19,20 @@ "body": { "verified": true } + }, + "404":{ + "body":{ + "status": 404, + "message": "There is no Operator configured for this network.", + "code": "OPERATOR_NOT_FOUND" + } + }, + "500":{ + "body":{ + "status": 500, + "message": "INTERNAL_ERROR", + "code": "Internal error occurred" + } } } -} +} \ No newline at end of file diff --git a/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/NumberInterface_Verify_MinimumSet_Gen.json b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/NumberInterface_Verify_MinimumSet_Gen.json new file mode 100644 index 000000000000..1982299c349b --- /dev/null +++ b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/NumberInterface_Verify_MinimumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "NumberInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "operationId": "NumberInterface_Verify", + "parameters": { + "api-version": "2023-11-14-preview", + "apc-gateway-id": "zlnvwgnnhcbhlwnh", + "body": { + "networkIdentifier": { + "identifierType": "ipv4", + "identifier": "12.12.12.12" + } + } + }, + "responses": { + "200": { + "body": { + "verified": true + } + } + } +} \ No newline at end of file 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 index 8fe66dab4869..9eb2461e3c22 100644 --- 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 @@ -1,21 +1,37 @@ { - "title": "SimSwapInterface_Retrieve - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "title": "SimSwapInterface_Retrieve", "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", + "x-ms-client-request-id": "peoejiqirqp", + "apc-gateway-id": "zdgrzzaxlodrvewbksn", "body": { - "network": {}, - "phoneNumber": "+714872" + "phoneNumber": "+61215310263792", + "networkIdentifier": { + "identifierType": "IPv6", + "identifier": "2001:0db8:85a3:0000:0000:8a2e:0370:7334" + } } }, "responses": { "200": { "body": { - "date": "2023-11-28T14:07:55.771Z" + "date": "2023-12-12T09:01:33.333Z" + } + }, + "404":{ + "body":{ + "status": 404, + "message": "There is no Operator configured for this network.", + "code": "OPERATOR_NOT_FOUND" + } + }, + "500":{ + "body":{ + "status": 500, + "message": "INTERNAL_ERROR", + "code": "Internal error occurred" } } } -} +} \ No newline at end of file diff --git a/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/SimSwapInterface_Retrieve_MinimumSet_Gen.json b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/SimSwapInterface_Retrieve_MinimumSet_Gen.json new file mode 100644 index 000000000000..20c7ddb4e69e --- /dev/null +++ b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/SimSwapInterface_Retrieve_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "SimSwapInterface_Retrieve - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "operationId": "SimSwapInterface_Retrieve", + "parameters": { + "api-version": "2023-11-14-preview", + "apc-gateway-id": "zlnvwgnnhcbhlwnh", + "body": { + "phoneNumber": "+714872", + "networkIdentifier": { + "identifierType": "obfpqxxgafiqo", + "identifier": "h" + } + } + }, + "responses": { + "200": { + "body": { + "date": "2023-11-28T14:07:55.771Z" + } + } + } +} \ No newline at end of file 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 index ba4a2445ec60..acce0018e8af 100644 --- 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 @@ -1,15 +1,16 @@ { - "title": "SimSwapInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "title": "SimSwapInterface_Verify", "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", + "x-ms-client-request-id": "peoejiqirqp", + "apc-gateway-id": "zdgrzzaxlodrvewbksn", "body": { - "maxAge": 11, - "network": {}, - "phoneNumber": "56705952" + "maxAgeHours": 941, + "networkIdentifier": { + "identifierType": "ipv4", + "identifier": "12.12.12.12" + } } }, "responses": { @@ -19,4 +20,4 @@ } } } -} +} \ No newline at end of file diff --git a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/SimSwapInterface_Verify_MaximumSet_Gen.json b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/SimSwapInterface_Verify_MinimumSet_Gen.json similarity index 60% rename from specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/SimSwapInterface_Verify_MaximumSet_Gen.json rename to specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/SimSwapInterface_Verify_MinimumSet_Gen.json index ba4a2445ec60..07866db24565 100644 --- a/specification/programmableconnectivity/Azure.ProgrammableConnectivity/examples/SimSwapInterface_Verify_MaximumSet_Gen.json +++ b/specification/programmableconnectivity/data-plane/Azure.ProgrammableConnectivity/preview/2023-11-14-preview/examples/SimSwapInterface_Verify_MinimumSet_Gen.json @@ -1,15 +1,14 @@ { - "title": "SimSwapInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "title": "SimSwapInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] 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" + "networkIdentifier": { + "identifierType": "obfpqxxgafiqo", + "identifier": "h" + } } }, "responses": { @@ -19,4 +18,4 @@ } } } -} +} \ No newline at end of file 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 index 88c518d3f46e..c2ef05ad21dd 100644 --- 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 @@ -19,7 +19,7 @@ { "name": "endpoint", "in": "path", - "description": "An Azure Programmable Connectivity Endpoint providing access to Network APIs.", + "description": "An Azure Programmable Connectivity Endpoint providing access to Network APIs, for example eastus.usprod.apcgatewayapi.azure.com", "required": true, "type": "string" } @@ -34,7 +34,7 @@ "security": [ { "OAuth2Auth": [ - "https://programmableconnectivity.azure.net/default" + "https://programmableconnectivity.azure.net/.default" ] } ], @@ -44,41 +44,20 @@ "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { - "https://programmableconnectivity.azure.net/default": "" + "https://programmableconnectivity.azure.net/.default": "" } } }, "tags": [], "paths": { - "/Location/{action}:verify": { + "/Location:verify": { "post": { "operationId": "LocationInterface_Verify", - "description": "Resource action operation template.", + "description": "Verifies whether a device is within a specified location area, defined as an accuracy (radius) around a point, specified by longitude and latitude.", "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" }, @@ -111,52 +90,25 @@ "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." - } + "$ref": "#/definitions/ApcErrorResponse" } } }, "x-ms-examples": { - "LocationInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule": { + "LocationInterface_Verify": { "$ref": "./examples/LocationInterface_Verify_MaximumSet_Gen.json" } } } }, - "/Network/{action}:retrieve": { + "/Network:retrieve": { "post": { "operationId": "Networks_Retrieve", - "description": "Resource action operation template.", + "description": "Retrieves the network a given device is on. Returns network in a networkCode format that can be used for other APIs.", "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" }, @@ -168,7 +120,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/NetworkDevice" + "$ref": "#/definitions/DeviceNetworkIdentifier" } } ], @@ -189,52 +141,25 @@ "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." - } + "$ref": "#/definitions/ApcErrorResponse" } } }, "x-ms-examples": { - "Networks_Retrieve - generated by [MaximumSet] rule - generated by [MaximumSet] rule": { + "Networks_Retrieve": { "$ref": "./examples/Networks_Retrieve_MaximumSet_Gen.json" } } } }, - "/Number/{action}:verify": { + "/Number:retrieve": { "post": { - "operationId": "NumberInterface_Verify", - "description": "Resource action operation template.", + "operationId": "NumberInterface_Retrieve", + "description": "Retrieves the phone number (MSISDN) associated with a device.", "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" }, @@ -246,7 +171,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/NumberVerifyRequest" + "$ref": "#/definitions/NetworkIdentifier" } } ], @@ -254,7 +179,7 @@ "200": { "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/NumberVerifyResponse" + "$ref": "#/definitions/NumberRetrieveResponse" }, "headers": { "x-ms-client-request-id": { @@ -267,64 +192,45 @@ "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." - } + "$ref": "#/definitions/ApcErrorResponse" } } }, "x-ms-examples": { - "NumberInterface_Verify - generated by [MaximumSet] rule - generated by [MaximumSet] rule": { - "$ref": "./examples/NumberInterface_Verify_MaximumSet_Gen.json" + "NumberInterface_Retrieve": { + "$ref": "./examples/NumberInterface_Retrieve_MaximumSet_Gen.json" } } } }, - "/Number/{action}:retrieve": { + "/Number:verify": { "post": { - "operationId": "NumberInterface_Retrieve", - "description": "Resource action operation template.", + "operationId": "NumberInterface_Verify", + "description": "Verifies the phone number (MSISDN) associated with a device.", "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/NumberRetrieveResponse" + "$ref": "#/definitions/NumberVerifyResponse" }, "headers": { "x-ms-client-request-id": { @@ -337,52 +243,25 @@ "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." - } + "$ref": "#/definitions/ApcErrorResponse" } } }, "x-ms-examples": { - "NumberInterface_Retrieve": { - "$ref": "./examples/NumberInterface_Retrieve_MaximumSet_Gen.json" + "NumberInterface_Verify": { + "$ref": "./examples/NumberInterface_Verify_MaximumSet_Gen.json" } } } }, - "/SimSwap/{action}:retrieve": { + "/SimSwap:retrieve": { "post": { "operationId": "SimSwapInterface_Retrieve", - "description": "Resource action operation template.", + "description": "Provides timestamp of latest SIM swap", "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" }, @@ -415,52 +294,25 @@ "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." - } + "$ref": "#/definitions/ApcErrorResponse" } } }, "x-ms-examples": { - "SimSwapInterface_Retrieve - generated by [MaximumSet] rule - generated by [MaximumSet] rule": { + "SimSwapInterface_Retrieve": { "$ref": "./examples/SimSwapInterface_Retrieve_MaximumSet_Gen.json" } } } }, - "/SimSwap/{action}:verify": { + "/SimSwap:verify": { "post": { "operationId": "SimSwapInterface_Verify", - "description": "Resource action operation template.", + "description": "Verifies if a SIM swap has been performed during a past period (defined in the request with 'maxAgeHours' attribute). Returns 'True' if a SIM swap has occured.", "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" }, @@ -493,159 +345,102 @@ "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." - } + "$ref": "#/definitions/ApcErrorResponse" } } - }, - "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": { + "ApcErrorResponse": { "type": "object", - "description": "The error object.", + "description": "A custom error type for APC.", "properties": { + "status": { + "type": "integer", + "format": "int32", + "description": "The numeric error code." + }, "code": { "type": "string", - "description": "One of a server-defined set of error codes." + "description": "The error code" }, - "message": { + "errorMessage": { "type": "string", - "description": "A human-readable representation of the error." + "description": "The detailed error message." }, - "target": { + "consentUrl": { "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." + "format": "uri", + "description": "The consent URL in case of a consent failure" } }, "required": [ + "status", "code", - "message" + "errorMessage" ] }, - "Azure.Core.Foundations.ErrorResponse": { + "DeviceNetworkIdentifier": { "type": "object", - "description": "A response containing error details.", + "description": "The device for which to find the network.", "properties": { - "error": { - "$ref": "#/definitions/Azure.Core.Foundations.Error", - "description": "The error object." + "identifierType": { + "type": "string", + "description": "The type of device identifier given: 'IPv4' or 'IPv6'." + }, + "deviceIdentifier": { + "type": "string", + "description": "The device identifier in a format matching the type above:\n - IPv4 in dotted-quad format.\n - IPV6 in IETF 5952 format." } }, "required": [ - "error" + "identifierType", + "deviceIdentifier" ] }, - "Azure.Core.Foundations.InnerError": { + "Ipv4Address": { "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.", + "description": "IPv4 device indicator", "properties": { - "code": { + "ipv4": { "type": "string", - "description": "One of a server-defined set of error codes." + "description": "IPv4 address may be specified in form
as:\n - address - an IPv4 number in dotted-quad form 1.2.3.4. Only this exact IP number will match the flow control rule.\n - address/mask - an IP number as above with a mask width of the form 1.2.3.4/24.\n In this case, all IP numbers from 1.2.3.0 to 1.2.3.255 will match. The bit width MUST be valid for the IP version." }, - "innererror": { - "$ref": "#/definitions/Azure.Core.Foundations.InnerError", - "description": "Inner error." + "port": { + "type": "integer", + "format": "int32", + "description": "User equipment port." } - } + }, + "required": [ + "ipv4", + "port" + ] }, - "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" - } - ] - } + "Ipv6Address": { + "type": "object", + "description": "IPv6 device indicator", + "properties": { + "ipv6": { + "type": "string", + "description": "IPv6 address, following IETF 5952 format, may be specified in form
as:\n - address - The /128 subnet is optional for single addresses:\n - 2001:db8:85a3:8d3:1319:8a2e:370:7344\n - 2001:db8:85a3:8d3:1319:8a2e:370:7344/128\n - address/mask - an IP v6 number with a mask:\n - 2001:db8:85a3:8d3::0/64\n - 2001:db8:85a3:8d3::/64" + }, + "port": { + "type": "integer", + "format": "int32", + "description": "User equipment port." + } + }, + "required": [ + "ipv6", + "port" + ] }, "LocationDevice": { "type": "object", - "description": "Device information needed by CAMARA Location API", + "description": "Device information needed by operator to provide location information. Include exactly one of these properties to identify your device.", "properties": { "networkAccessIdentifier": { "type": "string", @@ -657,14 +452,12 @@ "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})?$" + "$ref": "#/definitions/Ipv4Address", + "description": "IPv4 address and port of the device" }, "ipv6Address": { - "type": "string", - "description": "IPv6 address of the device", - "pattern": "^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))(\\/.+)?$" + "$ref": "#/definitions/Ipv6Address", + "description": "IPv6 address and port of the device" } } }, @@ -673,8 +466,14 @@ "description": "Static endpoint to access Location API", "properties": { "action": { - "$ref": "#/definitions/CommonActionEnum", + "type": "string", "description": "Static endpoint", + "enum": [ + "" + ], + "x-ms-enum": { + "modelAsString": false + }, "readOnly": true } }, @@ -686,9 +485,9 @@ "type": "object", "description": "Request to verify Location", "properties": { - "network": { - "$ref": "#/definitions/Network", - "description": "Network to query for this device" + "networkIdentifier": { + "$ref": "#/definitions/NetworkIdentifier", + "description": "Network to query for this device, or device information to enable network routing." }, "latitude": { "type": "number", @@ -711,31 +510,17 @@ "minimum": 2, "maximum": 100 }, - "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}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))(\\/.+)?$" + "locationDevice": { + "$ref": "#/definitions/LocationDevice", + "description": "The device to find the location for." } }, "required": [ - "network", + "networkIdentifier", "latitude", "longitude", - "accuracy" + "accuracy", + "locationDevice" ] }, "LocationVerifyResponse": { @@ -753,31 +538,34 @@ }, "Network": { "type": "object", - "description": "Resource representing an Operator Network", + "description": "The network that the device is on.", "properties": { - "networkId": { + "networkCode": { "type": "string", - "description": "The ID of the network", - "pattern": "[a-z0-9-]+$", - "readOnly": true + "description": "The identifier for the network. This can be used as the networkIdentifier for the service APIs.", + "pattern": "[a-z0-9-]+$" } }, "required": [ - "networkId" + "networkCode" ] }, - "NetworkDevice": { + "NetworkIdentifier": { "type": "object", - "description": "Represents a Device whose Network is searched for", + "description": "Identifier for the network to be queried", "properties": { - "phoneNumber": { + "identifierType": { "type": "string", - "description": "Phone number in E.164 format (starting with country code), and optionally prefixed with '+'", - "pattern": "^\\+?[0-9]{5,15}$" + "description": "The type of identifier for the network. one of: 'IPv4', 'IPv6', 'NetworkCode'" + }, + "identifier": { + "type": "string", + "description": "The network identifier in a format matching the type above:\n - IPv4 of a device in dotted-quad form 1.2.3.4.\n - IPv6 of a device in IETF 5952 format.\n - NetworkCode matching our documentation or an output from /Network:retrieve.\"" } }, "required": [ - "phoneNumber" + "identifierType", + "identifier" ] }, "NetworkRetrieveEndpoint": { @@ -785,8 +573,14 @@ "description": "Static endpoint to access Network API", "properties": { "action": { - "$ref": "#/definitions/CommonActionEnum", + "type": "string", "description": "Static endpoint", + "enum": [ + "" + ], + "x-ms-enum": { + "modelAsString": false + }, "readOnly": true } }, @@ -796,7 +590,7 @@ }, "NumberDevice": { "type": "object", - "description": "Device information needed by CAMARA Number API", + "description": "Device information to verify phone number. Include exactly one form of phone number.", "properties": { "phoneNumber": { "type": "string", @@ -814,8 +608,14 @@ "description": "Static endpoint to access Number API", "properties": { "action": { - "$ref": "#/definitions/CommonActionEnum", + "type": "string", "description": "Static endpoint", + "enum": [ + "" + ], + "x-ms-enum": { + "modelAsString": false + }, "readOnly": true } }, @@ -841,9 +641,9 @@ "type": "object", "description": "Request to verify number of device", "properties": { - "network": { - "$ref": "#/definitions/Network", - "description": "Network to query for this device" + "networkIdentifier": { + "$ref": "#/definitions/NetworkIdentifier", + "description": "Identifier for the network to query for this device." }, "phoneNumber": { "type": "string", @@ -856,7 +656,7 @@ } }, "required": [ - "network" + "networkIdentifier" ] }, "NumberVerifyResponse": { @@ -872,31 +672,20 @@ "verified" ] }, - "PagedNetwork": { + "PhoneNumberModel": { "type": "object", - "description": "Paged collection of Network items", + "description": "The phone number of the device to be identified.", "properties": { - "value": { - "type": "array", - "description": "The Network items on this page", - "items": { - "$ref": "#/definitions/Network" - }, - "x-ms-identifiers": [] - }, - "nextLink": { + "phoneNumber": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "description": "Phone number in E.164 format (starting with country code), and optionally prefixed with '+'", + "pattern": "^\\+?[0-9]{5,15}$" } - }, - "required": [ - "value" - ] + } }, "SimSwapDevice": { "type": "object", - "description": "Device information needed by CAMARA SimSwap API", + "description": "Device information needed by operator to find sim swap information.", "properties": { "phoneNumber": { "type": "string", @@ -913,8 +702,14 @@ "description": "Static endpoint to access SimSwap API", "properties": { "action": { - "$ref": "#/definitions/CommonActionEnum", + "type": "string", "description": "Static endpoint", + "enum": [ + "" + ], + "x-ms-enum": { + "modelAsString": false + }, "readOnly": true } }, @@ -926,19 +721,19 @@ "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}$" + }, + "networkIdentifier": { + "$ref": "#/definitions/NetworkIdentifier", + "description": "Network to query for this device" } }, "required": [ - "network", - "phoneNumber" + "phoneNumber", + "networkIdentifier" ] }, "SimSwapRetrieveResponse": { @@ -959,24 +754,21 @@ "type": "object", "description": "Request to verify SimSwap in period", "properties": { - "maxAge": { + "maxAgeHours": { "type": "integer", "format": "int32", - "description": "Maximum lookback for SimSwap verification" - }, - "network": { - "$ref": "#/definitions/Network", - "description": "Network to query for this device" + "description": "Maximum lookback for SimSwap verification", + "default": 240, + "minimum": 1, + "maximum": 2400 }, - "phoneNumber": { - "type": "string", - "description": "Phone number in E.164 format (starting with country code), and optionally prefixed with '+'", - "pattern": "^\\+?[0-9]{5,15}$" + "networkIdentifier": { + "$ref": "#/definitions/NetworkIdentifier", + "description": "Identifier for the network to query for this device." } }, "required": [ - "network", - "phoneNumber" + "networkIdentifier" ] }, "SimSwapVerifyResponse": {