@azure-rest/maps-geolocation 1.0.0-beta.4 → 1.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +4 -4
- package/README.md +33 -24
- package/dist/browser/MapsGeolocation.d.ts +53 -0
- package/dist/browser/MapsGeolocation.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/MapsGeolocation.js +1 -1
- package/dist/browser/MapsGeolocation.js.map +1 -0
- package/dist/browser/generated/clientDefinitions.d.ts +18 -0
- package/dist/browser/generated/clientDefinitions.d.ts.map +1 -0
- package/dist/browser/generated/clientDefinitions.js +4 -0
- package/dist/browser/generated/clientDefinitions.js.map +1 -0
- package/dist/browser/generated/index.d.ts +9 -0
- package/dist/browser/generated/index.d.ts.map +1 -0
- package/dist/browser/generated/index.js +11 -0
- package/dist/browser/generated/index.js.map +1 -0
- package/dist/browser/generated/isUnexpected.d.ts +3 -0
- package/dist/browser/generated/isUnexpected.d.ts.map +1 -0
- package/dist/browser/generated/isUnexpected.js +71 -0
- package/dist/browser/generated/isUnexpected.js.map +1 -0
- package/dist/browser/generated/logger.d.ts +2 -0
- package/dist/browser/generated/logger.d.ts.map +1 -0
- package/dist/browser/generated/logger.js +5 -0
- package/dist/browser/generated/logger.js.map +1 -0
- package/dist/browser/generated/mapsGeolocationClient.d.ts +15 -0
- package/dist/browser/generated/mapsGeolocationClient.d.ts.map +1 -0
- package/dist/browser/generated/mapsGeolocationClient.js +42 -0
- package/dist/browser/generated/mapsGeolocationClient.js.map +1 -0
- package/dist/browser/generated/outputModels.d.ts +38 -0
- package/dist/browser/generated/outputModels.d.ts.map +1 -0
- package/dist/browser/generated/outputModels.js +4 -0
- package/dist/browser/generated/outputModels.js.map +1 -0
- package/dist/browser/generated/parameters.d.ts +10 -0
- package/dist/browser/generated/parameters.d.ts.map +1 -0
- package/dist/browser/generated/parameters.js +4 -0
- package/dist/browser/generated/parameters.js.map +1 -0
- package/dist/browser/generated/responses.d.ts +19 -0
- package/dist/browser/generated/responses.d.ts.map +1 -0
- package/dist/browser/generated/responses.js +4 -0
- package/dist/browser/generated/responses.js.map +1 -0
- package/dist/browser/index.d.ts +4 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +6 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/commonjs/MapsGeolocation.d.ts +53 -0
- package/dist/commonjs/MapsGeolocation.d.ts.map +1 -0
- package/dist/commonjs/MapsGeolocation.js +44 -0
- package/dist/commonjs/MapsGeolocation.js.map +1 -0
- package/dist/commonjs/generated/clientDefinitions.d.ts +18 -0
- package/dist/commonjs/generated/clientDefinitions.d.ts.map +1 -0
- package/dist/commonjs/generated/clientDefinitions.js +5 -0
- package/dist/commonjs/generated/clientDefinitions.js.map +1 -0
- package/dist/commonjs/generated/index.d.ts +9 -0
- package/dist/commonjs/generated/index.d.ts.map +1 -0
- package/dist/commonjs/generated/index.js +14 -0
- package/dist/commonjs/generated/index.js.map +1 -0
- package/dist/commonjs/generated/isUnexpected.d.ts +3 -0
- package/dist/commonjs/generated/isUnexpected.d.ts.map +1 -0
- package/dist/commonjs/generated/isUnexpected.js +74 -0
- package/dist/commonjs/generated/isUnexpected.js.map +1 -0
- package/dist/commonjs/generated/logger.d.ts +2 -0
- package/dist/commonjs/generated/logger.d.ts.map +1 -0
- package/dist/commonjs/generated/logger.js +8 -0
- package/dist/commonjs/generated/logger.js.map +1 -0
- package/dist/commonjs/generated/mapsGeolocationClient.d.ts +15 -0
- package/dist/commonjs/generated/mapsGeolocationClient.d.ts.map +1 -0
- package/dist/commonjs/generated/mapsGeolocationClient.js +45 -0
- package/dist/commonjs/generated/mapsGeolocationClient.js.map +1 -0
- package/dist/commonjs/generated/outputModels.d.ts +38 -0
- package/dist/commonjs/generated/outputModels.d.ts.map +1 -0
- package/dist/commonjs/generated/outputModels.js +5 -0
- package/dist/commonjs/generated/outputModels.js.map +1 -0
- package/dist/commonjs/generated/parameters.d.ts +10 -0
- package/dist/commonjs/generated/parameters.d.ts.map +1 -0
- package/dist/commonjs/generated/parameters.js +5 -0
- package/dist/commonjs/generated/parameters.js.map +1 -0
- package/dist/commonjs/generated/responses.d.ts +19 -0
- package/dist/commonjs/generated/responses.d.ts.map +1 -0
- package/dist/commonjs/generated/responses.js +5 -0
- package/dist/commonjs/generated/responses.js.map +1 -0
- package/dist/commonjs/index.d.ts +4 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +9 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/MapsGeolocation.d.ts +53 -0
- package/dist/esm/MapsGeolocation.d.ts.map +1 -0
- package/dist/esm/MapsGeolocation.js +40 -0
- package/dist/esm/MapsGeolocation.js.map +1 -0
- package/dist/esm/generated/clientDefinitions.d.ts +18 -0
- package/dist/esm/generated/clientDefinitions.d.ts.map +1 -0
- package/dist/esm/generated/clientDefinitions.js +4 -0
- package/dist/esm/generated/clientDefinitions.js.map +1 -0
- package/dist/esm/generated/index.d.ts +9 -0
- package/dist/esm/generated/index.d.ts.map +1 -0
- package/dist/esm/generated/index.js +11 -0
- package/dist/esm/generated/index.js.map +1 -0
- package/dist/esm/generated/isUnexpected.d.ts +3 -0
- package/dist/esm/generated/isUnexpected.d.ts.map +1 -0
- package/dist/esm/generated/isUnexpected.js +71 -0
- package/dist/esm/generated/isUnexpected.js.map +1 -0
- package/dist/esm/generated/logger.d.ts +2 -0
- package/dist/esm/generated/logger.d.ts.map +1 -0
- package/dist/esm/generated/logger.js +5 -0
- package/dist/esm/generated/logger.js.map +1 -0
- package/dist/esm/generated/mapsGeolocationClient.d.ts +15 -0
- package/dist/esm/generated/mapsGeolocationClient.d.ts.map +1 -0
- package/dist/esm/generated/mapsGeolocationClient.js +42 -0
- package/dist/esm/generated/mapsGeolocationClient.js.map +1 -0
- package/dist/esm/generated/outputModels.d.ts +38 -0
- package/dist/esm/generated/outputModels.d.ts.map +1 -0
- package/dist/esm/generated/outputModels.js +4 -0
- package/dist/esm/generated/outputModels.js.map +1 -0
- package/dist/esm/generated/parameters.d.ts +10 -0
- package/dist/esm/generated/parameters.d.ts.map +1 -0
- package/dist/esm/generated/parameters.js +4 -0
- package/dist/esm/generated/parameters.js.map +1 -0
- package/dist/esm/generated/responses.d.ts +19 -0
- package/dist/esm/generated/responses.d.ts.map +1 -0
- package/dist/esm/generated/responses.js +4 -0
- package/dist/esm/generated/responses.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/react-native/MapsGeolocation.d.ts +53 -0
- package/dist/react-native/MapsGeolocation.d.ts.map +1 -0
- package/dist/react-native/MapsGeolocation.js +40 -0
- package/dist/react-native/MapsGeolocation.js.map +1 -0
- package/dist/react-native/generated/clientDefinitions.d.ts +18 -0
- package/dist/react-native/generated/clientDefinitions.d.ts.map +1 -0
- package/dist/react-native/generated/clientDefinitions.js +4 -0
- package/dist/react-native/generated/clientDefinitions.js.map +1 -0
- package/dist/react-native/generated/index.d.ts +9 -0
- package/dist/react-native/generated/index.d.ts.map +1 -0
- package/dist/react-native/generated/index.js +11 -0
- package/dist/react-native/generated/index.js.map +1 -0
- package/dist/react-native/generated/isUnexpected.d.ts +3 -0
- package/dist/react-native/generated/isUnexpected.d.ts.map +1 -0
- package/dist/react-native/generated/isUnexpected.js +71 -0
- package/dist/react-native/generated/isUnexpected.js.map +1 -0
- package/dist/react-native/generated/logger.d.ts +2 -0
- package/dist/react-native/generated/logger.d.ts.map +1 -0
- package/dist/react-native/generated/logger.js +5 -0
- package/dist/react-native/generated/logger.js.map +1 -0
- package/dist/react-native/generated/mapsGeolocationClient.d.ts +15 -0
- package/dist/react-native/generated/mapsGeolocationClient.d.ts.map +1 -0
- package/dist/react-native/generated/mapsGeolocationClient.js +42 -0
- package/dist/react-native/generated/mapsGeolocationClient.js.map +1 -0
- package/dist/react-native/generated/outputModels.d.ts +38 -0
- package/dist/react-native/generated/outputModels.d.ts.map +1 -0
- package/dist/react-native/generated/outputModels.js +4 -0
- package/dist/react-native/generated/outputModels.js.map +1 -0
- package/dist/react-native/generated/parameters.d.ts +10 -0
- package/dist/react-native/generated/parameters.d.ts.map +1 -0
- package/dist/react-native/generated/parameters.js +4 -0
- package/dist/react-native/generated/parameters.js.map +1 -0
- package/dist/react-native/generated/responses.d.ts +19 -0
- package/dist/react-native/generated/responses.d.ts.map +1 -0
- package/dist/react-native/generated/responses.js +4 -0
- package/dist/react-native/generated/responses.js.map +1 -0
- package/dist/react-native/index.d.ts +4 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +6 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/package.json +70 -52
- package/dist/index.js +0 -167
- package/dist/index.js.map +0 -1
- package/dist-esm/src/MapsGeolocation.js.map +0 -1
- package/dist-esm/src/index.js +0 -6
- package/dist-esm/src/index.js.map +0 -1
- package/review/maps-geolocation.api.md +0 -112
- package/types/maps-geolocation-rest.d.ts +0 -159
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import type { AzureKeyCredential } from '@azure/core-auth';
|
|
2
|
-
import type { AzureSASCredential } from '@azure/core-auth';
|
|
3
|
-
import { Client } from '@azure-rest/core-client';
|
|
4
|
-
import { ClientOptions } from '@azure-rest/core-client';
|
|
5
|
-
import { HttpResponse } from '@azure-rest/core-client';
|
|
6
|
-
import { RequestParameters } from '@azure-rest/core-client';
|
|
7
|
-
import { StreamableMethod } from '@azure-rest/core-client';
|
|
8
|
-
import type { TokenCredential } from '@azure/core-auth';
|
|
9
|
-
|
|
10
|
-
/** The object containing the country/region information. */
|
|
11
|
-
export declare interface CountryRegionOutput {
|
|
12
|
-
/** The IP Address's 2-character code [(ISO 3166-1)](https://www.iso.org/iso-3166-country-codes.html) of the country or region. Please note, IP address in ranges reserved for special purpose will return Null for country/region. */
|
|
13
|
-
readonly isoCode?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/** The resource management error additional info. */
|
|
17
|
-
export declare interface ErrorAdditionalInfoOutput {
|
|
18
|
-
/** The additional info type. */
|
|
19
|
-
readonly type?: string;
|
|
20
|
-
/** The additional info. */
|
|
21
|
-
readonly info?: Record<string, unknown>;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/** The error detail. */
|
|
25
|
-
export declare interface ErrorDetailOutput {
|
|
26
|
-
/** The error code. */
|
|
27
|
-
readonly code?: string;
|
|
28
|
-
/** The error message. */
|
|
29
|
-
readonly message?: string;
|
|
30
|
-
/** The error target. */
|
|
31
|
-
readonly target?: string;
|
|
32
|
-
/** The error details. */
|
|
33
|
-
readonly details?: Array<ErrorDetailOutput>;
|
|
34
|
-
/** The error additional info. */
|
|
35
|
-
readonly additionalInfo?: Array<ErrorAdditionalInfoOutput>;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */
|
|
39
|
-
export declare interface ErrorResponseOutput {
|
|
40
|
-
/** The error object. */
|
|
41
|
-
error?: ErrorDetailOutput;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
* The `Get IP To Location` API is an HTTP `GET` request that, given an IP address, returns the ISO country code from which that IP address is located. Developers can use this information to block or alter certain content based on geographical locations where the application is being viewed from.
|
|
47
|
-
*/
|
|
48
|
-
export declare interface GeolocationGetLocation200Response extends HttpResponse {
|
|
49
|
-
status: "200";
|
|
50
|
-
body: IpAddressToLocationResultOutput;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
*
|
|
55
|
-
* The `Get IP To Location` API is an HTTP `GET` request that, given an IP address, returns the ISO country code from which that IP address is located. Developers can use this information to block or alter certain content based on geographical locations where the application is being viewed from.
|
|
56
|
-
*/
|
|
57
|
-
export declare interface GeolocationGetLocationDefaultResponse extends HttpResponse {
|
|
58
|
-
status: string;
|
|
59
|
-
body: ErrorResponseOutput;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export declare type GeolocationGetLocationParameters = GeolocationGetLocationQueryParam & RequestParameters;
|
|
63
|
-
|
|
64
|
-
export declare interface GeolocationGetLocationQueryParam {
|
|
65
|
-
queryParameters: GeolocationGetLocationQueryParamProperties;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export declare interface GeolocationGetLocationQueryParamProperties {
|
|
69
|
-
/** The IP address. Both IPv4 and IPv6 are allowed. */
|
|
70
|
-
ip: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export declare interface GetLocation {
|
|
74
|
-
/**
|
|
75
|
-
*
|
|
76
|
-
* The `Get IP To Location` API is an HTTP `GET` request that, given an IP address, returns the ISO country code from which that IP address is located. Developers can use this information to block or alter certain content based on geographical locations where the application is being viewed from.
|
|
77
|
-
*/
|
|
78
|
-
get(options: GeolocationGetLocationParameters): StreamableMethod<GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse>;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/** This object is returned from a successful call to IP Address to country/region API */
|
|
82
|
-
export declare interface IpAddressToLocationResultOutput {
|
|
83
|
-
/** The object containing the country/region information. */
|
|
84
|
-
readonly countryRegion?: CountryRegionOutput;
|
|
85
|
-
/** The IP Address of the request. */
|
|
86
|
-
readonly ipAddress?: string;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export declare function isUnexpected(response: GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse): response is GeolocationGetLocationDefaultResponse;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Creates an instance of MapsGeolocationClient from a subscription key.
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```ts
|
|
96
|
-
* import MapsGeolocation from "@azure-rest/maps-geolocation";
|
|
97
|
-
* import { AzureKeyCredential } from "@azure/core-auth";
|
|
98
|
-
*
|
|
99
|
-
* const credential = new AzureKeyCredential("<subscription-key>");
|
|
100
|
-
* const client = MapsGeolocation(credential);
|
|
101
|
-
*```
|
|
102
|
-
*
|
|
103
|
-
* @param credential - An AzureKeyCredential instance used to authenticate requests to the service
|
|
104
|
-
* @param options - Options used to configure the Geolocation Client
|
|
105
|
-
*/
|
|
106
|
-
declare function MapsGeolocation(credential: AzureKeyCredential, options?: ClientOptions): MapsGeolocationClient;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Creates an instance of MapsGeolocation from an Azure Identity `TokenCredential`.
|
|
110
|
-
*
|
|
111
|
-
* @example
|
|
112
|
-
* ```ts
|
|
113
|
-
* import MapsGeolocation from "@azure-rest/maps-geo-location";
|
|
114
|
-
* import { DefaultAzureCredential } from "@azure/identity";
|
|
115
|
-
*
|
|
116
|
-
* const credential = new DefaultAzureCredential();
|
|
117
|
-
* const client = MapsGeolocation(credential, "<maps-account-client-id>");
|
|
118
|
-
*```
|
|
119
|
-
*
|
|
120
|
-
* @param credential - An TokenCredential instance used to authenticate requests to the service
|
|
121
|
-
* @param mapsAccountClientId - The Azure Maps client id of a specific map resource
|
|
122
|
-
* @param options - Options used to configure the Route Client
|
|
123
|
-
*/
|
|
124
|
-
declare function MapsGeolocation(credential: TokenCredential, mapsAccountClientId: string, options?: ClientOptions): MapsGeolocationClient;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Creates an instance of MapsGeolocation from an Azure Identity `AzureSASCredential`.
|
|
128
|
-
*
|
|
129
|
-
* @example
|
|
130
|
-
* ```ts
|
|
131
|
-
* import MapsGeolocation from "@azure-rest/maps-geo-location";
|
|
132
|
-
* import { AzureSASCredential } from "@azure/core-auth";
|
|
133
|
-
*
|
|
134
|
-
* const credential = new AzureSASCredential("<SAS Token>");
|
|
135
|
-
* const client = MapsGeolocation(credential);
|
|
136
|
-
* ```
|
|
137
|
-
*
|
|
138
|
-
* @param credential - An AzureSASCredential instance used to authenticate requests to the service
|
|
139
|
-
* @param options - Options used to configure the Geolocation Client
|
|
140
|
-
*/
|
|
141
|
-
declare function MapsGeolocation(credential: AzureSASCredential, options?: ClientOptions): MapsGeolocationClient;
|
|
142
|
-
export default MapsGeolocation;
|
|
143
|
-
|
|
144
|
-
export declare type MapsGeolocationClient = Client & {
|
|
145
|
-
path: Routes;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
/** The optional parameters for the client */
|
|
149
|
-
export declare interface MapsGeolocationClientOptions extends ClientOptions {
|
|
150
|
-
/** The api version option of the client */
|
|
151
|
-
apiVersion?: string;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export declare interface Routes {
|
|
155
|
-
/** Resource for '/geolocation/ip/\{format\}' has methods for the following verbs: get */
|
|
156
|
-
(path: "/geolocation/ip/{format}", format: "json"): GetLocation;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export { }
|