@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.
Files changed (175) hide show
  1. package/LICENSE +4 -4
  2. package/README.md +33 -24
  3. package/dist/browser/MapsGeolocation.d.ts +53 -0
  4. package/dist/browser/MapsGeolocation.d.ts.map +1 -0
  5. package/{dist-esm/src → dist/browser}/MapsGeolocation.js +1 -1
  6. package/dist/browser/MapsGeolocation.js.map +1 -0
  7. package/dist/browser/generated/clientDefinitions.d.ts +18 -0
  8. package/dist/browser/generated/clientDefinitions.d.ts.map +1 -0
  9. package/dist/browser/generated/clientDefinitions.js +4 -0
  10. package/dist/browser/generated/clientDefinitions.js.map +1 -0
  11. package/dist/browser/generated/index.d.ts +9 -0
  12. package/dist/browser/generated/index.d.ts.map +1 -0
  13. package/dist/browser/generated/index.js +11 -0
  14. package/dist/browser/generated/index.js.map +1 -0
  15. package/dist/browser/generated/isUnexpected.d.ts +3 -0
  16. package/dist/browser/generated/isUnexpected.d.ts.map +1 -0
  17. package/dist/browser/generated/isUnexpected.js +71 -0
  18. package/dist/browser/generated/isUnexpected.js.map +1 -0
  19. package/dist/browser/generated/logger.d.ts +2 -0
  20. package/dist/browser/generated/logger.d.ts.map +1 -0
  21. package/dist/browser/generated/logger.js +5 -0
  22. package/dist/browser/generated/logger.js.map +1 -0
  23. package/dist/browser/generated/mapsGeolocationClient.d.ts +15 -0
  24. package/dist/browser/generated/mapsGeolocationClient.d.ts.map +1 -0
  25. package/dist/browser/generated/mapsGeolocationClient.js +42 -0
  26. package/dist/browser/generated/mapsGeolocationClient.js.map +1 -0
  27. package/dist/browser/generated/outputModels.d.ts +38 -0
  28. package/dist/browser/generated/outputModels.d.ts.map +1 -0
  29. package/dist/browser/generated/outputModels.js +4 -0
  30. package/dist/browser/generated/outputModels.js.map +1 -0
  31. package/dist/browser/generated/parameters.d.ts +10 -0
  32. package/dist/browser/generated/parameters.d.ts.map +1 -0
  33. package/dist/browser/generated/parameters.js +4 -0
  34. package/dist/browser/generated/parameters.js.map +1 -0
  35. package/dist/browser/generated/responses.d.ts +19 -0
  36. package/dist/browser/generated/responses.d.ts.map +1 -0
  37. package/dist/browser/generated/responses.js +4 -0
  38. package/dist/browser/generated/responses.js.map +1 -0
  39. package/dist/browser/index.d.ts +4 -0
  40. package/dist/browser/index.d.ts.map +1 -0
  41. package/dist/browser/index.js +6 -0
  42. package/dist/browser/index.js.map +1 -0
  43. package/dist/browser/package.json +3 -0
  44. package/dist/commonjs/MapsGeolocation.d.ts +53 -0
  45. package/dist/commonjs/MapsGeolocation.d.ts.map +1 -0
  46. package/dist/commonjs/MapsGeolocation.js +44 -0
  47. package/dist/commonjs/MapsGeolocation.js.map +1 -0
  48. package/dist/commonjs/generated/clientDefinitions.d.ts +18 -0
  49. package/dist/commonjs/generated/clientDefinitions.d.ts.map +1 -0
  50. package/dist/commonjs/generated/clientDefinitions.js +5 -0
  51. package/dist/commonjs/generated/clientDefinitions.js.map +1 -0
  52. package/dist/commonjs/generated/index.d.ts +9 -0
  53. package/dist/commonjs/generated/index.d.ts.map +1 -0
  54. package/dist/commonjs/generated/index.js +14 -0
  55. package/dist/commonjs/generated/index.js.map +1 -0
  56. package/dist/commonjs/generated/isUnexpected.d.ts +3 -0
  57. package/dist/commonjs/generated/isUnexpected.d.ts.map +1 -0
  58. package/dist/commonjs/generated/isUnexpected.js +74 -0
  59. package/dist/commonjs/generated/isUnexpected.js.map +1 -0
  60. package/dist/commonjs/generated/logger.d.ts +2 -0
  61. package/dist/commonjs/generated/logger.d.ts.map +1 -0
  62. package/dist/commonjs/generated/logger.js +8 -0
  63. package/dist/commonjs/generated/logger.js.map +1 -0
  64. package/dist/commonjs/generated/mapsGeolocationClient.d.ts +15 -0
  65. package/dist/commonjs/generated/mapsGeolocationClient.d.ts.map +1 -0
  66. package/dist/commonjs/generated/mapsGeolocationClient.js +45 -0
  67. package/dist/commonjs/generated/mapsGeolocationClient.js.map +1 -0
  68. package/dist/commonjs/generated/outputModels.d.ts +38 -0
  69. package/dist/commonjs/generated/outputModels.d.ts.map +1 -0
  70. package/dist/commonjs/generated/outputModels.js +5 -0
  71. package/dist/commonjs/generated/outputModels.js.map +1 -0
  72. package/dist/commonjs/generated/parameters.d.ts +10 -0
  73. package/dist/commonjs/generated/parameters.d.ts.map +1 -0
  74. package/dist/commonjs/generated/parameters.js +5 -0
  75. package/dist/commonjs/generated/parameters.js.map +1 -0
  76. package/dist/commonjs/generated/responses.d.ts +19 -0
  77. package/dist/commonjs/generated/responses.d.ts.map +1 -0
  78. package/dist/commonjs/generated/responses.js +5 -0
  79. package/dist/commonjs/generated/responses.js.map +1 -0
  80. package/dist/commonjs/index.d.ts +4 -0
  81. package/dist/commonjs/index.d.ts.map +1 -0
  82. package/dist/commonjs/index.js +9 -0
  83. package/dist/commonjs/index.js.map +1 -0
  84. package/dist/commonjs/package.json +3 -0
  85. package/dist/commonjs/tsdoc-metadata.json +11 -0
  86. package/dist/esm/MapsGeolocation.d.ts +53 -0
  87. package/dist/esm/MapsGeolocation.d.ts.map +1 -0
  88. package/dist/esm/MapsGeolocation.js +40 -0
  89. package/dist/esm/MapsGeolocation.js.map +1 -0
  90. package/dist/esm/generated/clientDefinitions.d.ts +18 -0
  91. package/dist/esm/generated/clientDefinitions.d.ts.map +1 -0
  92. package/dist/esm/generated/clientDefinitions.js +4 -0
  93. package/dist/esm/generated/clientDefinitions.js.map +1 -0
  94. package/dist/esm/generated/index.d.ts +9 -0
  95. package/dist/esm/generated/index.d.ts.map +1 -0
  96. package/dist/esm/generated/index.js +11 -0
  97. package/dist/esm/generated/index.js.map +1 -0
  98. package/dist/esm/generated/isUnexpected.d.ts +3 -0
  99. package/dist/esm/generated/isUnexpected.d.ts.map +1 -0
  100. package/dist/esm/generated/isUnexpected.js +71 -0
  101. package/dist/esm/generated/isUnexpected.js.map +1 -0
  102. package/dist/esm/generated/logger.d.ts +2 -0
  103. package/dist/esm/generated/logger.d.ts.map +1 -0
  104. package/dist/esm/generated/logger.js +5 -0
  105. package/dist/esm/generated/logger.js.map +1 -0
  106. package/dist/esm/generated/mapsGeolocationClient.d.ts +15 -0
  107. package/dist/esm/generated/mapsGeolocationClient.d.ts.map +1 -0
  108. package/dist/esm/generated/mapsGeolocationClient.js +42 -0
  109. package/dist/esm/generated/mapsGeolocationClient.js.map +1 -0
  110. package/dist/esm/generated/outputModels.d.ts +38 -0
  111. package/dist/esm/generated/outputModels.d.ts.map +1 -0
  112. package/dist/esm/generated/outputModels.js +4 -0
  113. package/dist/esm/generated/outputModels.js.map +1 -0
  114. package/dist/esm/generated/parameters.d.ts +10 -0
  115. package/dist/esm/generated/parameters.d.ts.map +1 -0
  116. package/dist/esm/generated/parameters.js +4 -0
  117. package/dist/esm/generated/parameters.js.map +1 -0
  118. package/dist/esm/generated/responses.d.ts +19 -0
  119. package/dist/esm/generated/responses.d.ts.map +1 -0
  120. package/dist/esm/generated/responses.js +4 -0
  121. package/dist/esm/generated/responses.js.map +1 -0
  122. package/dist/esm/index.d.ts +4 -0
  123. package/dist/esm/index.d.ts.map +1 -0
  124. package/dist/esm/index.js +6 -0
  125. package/dist/esm/index.js.map +1 -0
  126. package/dist/esm/package.json +3 -0
  127. package/dist/react-native/MapsGeolocation.d.ts +53 -0
  128. package/dist/react-native/MapsGeolocation.d.ts.map +1 -0
  129. package/dist/react-native/MapsGeolocation.js +40 -0
  130. package/dist/react-native/MapsGeolocation.js.map +1 -0
  131. package/dist/react-native/generated/clientDefinitions.d.ts +18 -0
  132. package/dist/react-native/generated/clientDefinitions.d.ts.map +1 -0
  133. package/dist/react-native/generated/clientDefinitions.js +4 -0
  134. package/dist/react-native/generated/clientDefinitions.js.map +1 -0
  135. package/dist/react-native/generated/index.d.ts +9 -0
  136. package/dist/react-native/generated/index.d.ts.map +1 -0
  137. package/dist/react-native/generated/index.js +11 -0
  138. package/dist/react-native/generated/index.js.map +1 -0
  139. package/dist/react-native/generated/isUnexpected.d.ts +3 -0
  140. package/dist/react-native/generated/isUnexpected.d.ts.map +1 -0
  141. package/dist/react-native/generated/isUnexpected.js +71 -0
  142. package/dist/react-native/generated/isUnexpected.js.map +1 -0
  143. package/dist/react-native/generated/logger.d.ts +2 -0
  144. package/dist/react-native/generated/logger.d.ts.map +1 -0
  145. package/dist/react-native/generated/logger.js +5 -0
  146. package/dist/react-native/generated/logger.js.map +1 -0
  147. package/dist/react-native/generated/mapsGeolocationClient.d.ts +15 -0
  148. package/dist/react-native/generated/mapsGeolocationClient.d.ts.map +1 -0
  149. package/dist/react-native/generated/mapsGeolocationClient.js +42 -0
  150. package/dist/react-native/generated/mapsGeolocationClient.js.map +1 -0
  151. package/dist/react-native/generated/outputModels.d.ts +38 -0
  152. package/dist/react-native/generated/outputModels.d.ts.map +1 -0
  153. package/dist/react-native/generated/outputModels.js +4 -0
  154. package/dist/react-native/generated/outputModels.js.map +1 -0
  155. package/dist/react-native/generated/parameters.d.ts +10 -0
  156. package/dist/react-native/generated/parameters.d.ts.map +1 -0
  157. package/dist/react-native/generated/parameters.js +4 -0
  158. package/dist/react-native/generated/parameters.js.map +1 -0
  159. package/dist/react-native/generated/responses.d.ts +19 -0
  160. package/dist/react-native/generated/responses.d.ts.map +1 -0
  161. package/dist/react-native/generated/responses.js +4 -0
  162. package/dist/react-native/generated/responses.js.map +1 -0
  163. package/dist/react-native/index.d.ts +4 -0
  164. package/dist/react-native/index.d.ts.map +1 -0
  165. package/dist/react-native/index.js +6 -0
  166. package/dist/react-native/index.js.map +1 -0
  167. package/dist/react-native/package.json +3 -0
  168. package/package.json +70 -52
  169. package/dist/index.js +0 -167
  170. package/dist/index.js.map +0 -1
  171. package/dist-esm/src/MapsGeolocation.js.map +0 -1
  172. package/dist-esm/src/index.js +0 -6
  173. package/dist-esm/src/index.js.map +0 -1
  174. package/review/maps-geolocation.api.md +0 -112
  175. package/types/maps-geolocation-rest.d.ts +0 -159
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/generated/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { HttpResponse } from \"@azure-rest/core-client\";\nimport {\n IpAddressToLocationResultOutput,\n ErrorResponseOutput,\n} from \"./outputModels.js\";\n\n/**\n *\n * 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.\n */\nexport interface GeolocationGetLocation200Response extends HttpResponse {\n status: \"200\";\n body: IpAddressToLocationResultOutput;\n}\n\n/**\n *\n * 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.\n */\nexport interface GeolocationGetLocationDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import MapsGeolocation from "./MapsGeolocation.js";
2
+ export * from "./generated/index.js";
3
+ export default MapsGeolocation;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAEnD,cAAc,sBAAsB,CAAC;AACrC,eAAe,eAAe,CAAC"}
@@ -0,0 +1,6 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import MapsGeolocation from "./MapsGeolocation.js";
4
+ export * from "./generated/index.js";
5
+ export default MapsGeolocation;
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAEnD,cAAc,sBAAsB,CAAC;AACrC,eAAe,eAAe,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport MapsGeolocation from \"./MapsGeolocation.js\";\n\nexport * from \"./generated/index.js\";\nexport default MapsGeolocation;\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,53 @@
1
+ import type { ClientOptions } from "@azure-rest/core-client";
2
+ import type { AzureKeyCredential, AzureSASCredential, TokenCredential } from "@azure/core-auth";
3
+ import type { MapsGeolocationClient } from "./generated/index.js";
4
+ /**
5
+ * Creates an instance of MapsGeolocationClient from a subscription key.
6
+ *
7
+ * @example
8
+ * ```ts snippet:ReadmeSampleCreateClient_SubscriptionKey
9
+ * import { AzureKeyCredential } from "@azure/core-auth";
10
+ * import MapsGeolocation from "@azure-rest/maps-geolocation";
11
+ *
12
+ * const credential = new AzureKeyCredential("<subscription-key>");
13
+ * const client = MapsGeolocation(credential);
14
+ *```
15
+ *
16
+ * @param credential - An AzureKeyCredential instance used to authenticate requests to the service
17
+ * @param options - Options used to configure the Geolocation Client
18
+ */
19
+ export default function MapsGeolocation(credential: AzureKeyCredential, options?: ClientOptions): MapsGeolocationClient;
20
+ /**
21
+ * Creates an instance of MapsGeolocation from an Azure Identity `TokenCredential`.
22
+ *
23
+ * @example
24
+ * ```ts snippet:ReadmeSampleCreateClient_TokenCredential
25
+ * import { DefaultAzureCredential } from "@azure/identity";
26
+ * import MapsGeolocation from "@azure-rest/maps-geolocation";
27
+ *
28
+ * const credential = new DefaultAzureCredential();
29
+ * const client = MapsGeolocation(credential, "<maps-account-client-id>");
30
+ *```
31
+ *
32
+ * @param credential - An TokenCredential instance used to authenticate requests to the service
33
+ * @param mapsAccountClientId - The Azure Maps client id of a specific map resource
34
+ * @param options - Options used to configure the Route Client
35
+ */
36
+ export default function MapsGeolocation(credential: TokenCredential, mapsAccountClientId: string, options?: ClientOptions): MapsGeolocationClient;
37
+ /**
38
+ * Creates an instance of MapsGeolocation from an Azure Identity `AzureSASCredential`.
39
+ *
40
+ * @example
41
+ * ```ts snippet:ReadmeSampleCreateClient_SASToken
42
+ * import { AzureSASCredential } from "@azure/core-auth";
43
+ * import MapsGeolocation from "@azure-rest/maps-geolocation";
44
+ *
45
+ * const credential = new AzureSASCredential("<SAS Token>");
46
+ * const client = MapsGeolocation(credential);
47
+ * ```
48
+ *
49
+ * @param credential - An AzureSASCredential instance used to authenticate requests to the service
50
+ * @param options - Options used to configure the Geolocation Client
51
+ */
52
+ export default function MapsGeolocation(credential: AzureSASCredential, options?: ClientOptions): MapsGeolocationClient;
53
+ //# sourceMappingURL=MapsGeolocation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapsGeolocation.d.ts","sourceRoot":"","sources":["../../src/MapsGeolocation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGhG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAIlE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,UAAU,EAAE,kBAAkB,EAC9B,OAAO,CAAC,EAAE,aAAa,GACtB,qBAAqB,CAAC;AACzB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,UAAU,EAAE,eAAe,EAC3B,mBAAmB,EAAE,MAAM,EAC3B,OAAO,CAAC,EAAE,aAAa,GACtB,qBAAqB,CAAC;AACzB;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,UAAU,EAAE,kBAAkB,EAC9B,OAAO,CAAC,EAAE,aAAa,GACtB,qBAAqB,CAAC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.default = MapsGeolocation;
6
+ const tslib_1 = require("tslib");
7
+ const core_auth_1 = require("@azure/core-auth");
8
+ const maps_common_1 = require("@azure/maps-common");
9
+ const index_js_1 = tslib_1.__importDefault(require("./generated/index.js"));
10
+ const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
11
+ function MapsGeolocation(credential, clientIdOrOptions = {}, maybeOptions = {}) {
12
+ const options = typeof clientIdOrOptions === "string" ? maybeOptions : clientIdOrOptions;
13
+ /**
14
+ * maps service requires a header "ms-x-client-id", which is different from the standard Microsoft Entra ID.
15
+ * So we need to do our own implementation.
16
+ * This customized authentication is following by this guide: https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/RLC-customization.md#custom-authentication
17
+ */
18
+ if ((0, core_auth_1.isTokenCredential)(credential)) {
19
+ const clientId = typeof clientIdOrOptions === "string" ? clientIdOrOptions : "";
20
+ if (!clientId) {
21
+ throw Error("Client id is needed for TokenCredential");
22
+ }
23
+ const client = (0, index_js_1.default)(undefined, options);
24
+ client.pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({
25
+ credential,
26
+ scopes: "https://atlas.microsoft.com/.default",
27
+ }));
28
+ client.pipeline.addPolicy((0, maps_common_1.createMapsClientIdPolicy)(clientId));
29
+ return client;
30
+ }
31
+ if ((0, core_auth_1.isSASCredential)(credential)) {
32
+ const client = (0, index_js_1.default)(undefined, options);
33
+ client.pipeline.addPolicy({
34
+ name: "mapsSASCredentialPolicy",
35
+ async sendRequest(request, next) {
36
+ request.headers.set("Authorization", `jwt-sas ${credential.signature}`);
37
+ return next(request);
38
+ },
39
+ });
40
+ return client;
41
+ }
42
+ return (0, index_js_1.default)(credential, options);
43
+ }
44
+ //# sourceMappingURL=MapsGeolocation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapsGeolocation.js","sourceRoot":"","sources":["../../src/MapsGeolocation.ts"],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,EAAE,CAAC,CAAC;gBACxE,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,IAAA,kBAAY,EAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport type { AzureKeyCredential, AzureSASCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isSASCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { createMapsClientIdPolicy } from \"@azure/maps-common\";\nimport type { MapsGeolocationClient } from \"./generated/index.js\";\nimport createClient from \"./generated/index.js\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\n\n/**\n * Creates an instance of MapsGeolocationClient from a subscription key.\n *\n * @example\n * ```ts snippet:ReadmeSampleCreateClient_SubscriptionKey\n * import { AzureKeyCredential } from \"@azure/core-auth\";\n * import MapsGeolocation from \"@azure-rest/maps-geolocation\";\n *\n * const credential = new AzureKeyCredential(\"<subscription-key>\");\n * const client = MapsGeolocation(credential);\n *```\n *\n * @param credential - An AzureKeyCredential instance used to authenticate requests to the service\n * @param options - Options used to configure the Geolocation Client\n */\nexport default function MapsGeolocation(\n credential: AzureKeyCredential,\n options?: ClientOptions,\n): MapsGeolocationClient;\n/**\n * Creates an instance of MapsGeolocation from an Azure Identity `TokenCredential`.\n *\n * @example\n * ```ts snippet:ReadmeSampleCreateClient_TokenCredential\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import MapsGeolocation from \"@azure-rest/maps-geolocation\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = MapsGeolocation(credential, \"<maps-account-client-id>\");\n *```\n *\n * @param credential - An TokenCredential instance used to authenticate requests to the service\n * @param mapsAccountClientId - The Azure Maps client id of a specific map resource\n * @param options - Options used to configure the Route Client\n */\nexport default function MapsGeolocation(\n credential: TokenCredential,\n mapsAccountClientId: string,\n options?: ClientOptions,\n): MapsGeolocationClient;\n/**\n * Creates an instance of MapsGeolocation from an Azure Identity `AzureSASCredential`.\n *\n * @example\n * ```ts snippet:ReadmeSampleCreateClient_SASToken\n * import { AzureSASCredential } from \"@azure/core-auth\";\n * import MapsGeolocation from \"@azure-rest/maps-geolocation\";\n *\n * const credential = new AzureSASCredential(\"<SAS Token>\");\n * const client = MapsGeolocation(credential);\n * ```\n *\n * @param credential - An AzureSASCredential instance used to authenticate requests to the service\n * @param options - Options used to configure the Geolocation Client\n */\nexport default function MapsGeolocation(\n credential: AzureSASCredential,\n options?: ClientOptions,\n): MapsGeolocationClient;\nexport default function MapsGeolocation(\n credential: TokenCredential | AzureKeyCredential | AzureSASCredential,\n clientIdOrOptions: string | ClientOptions = {},\n maybeOptions: ClientOptions = {},\n): MapsGeolocationClient {\n const options = typeof clientIdOrOptions === \"string\" ? maybeOptions : clientIdOrOptions;\n\n /**\n * maps service requires a header \"ms-x-client-id\", which is different from the standard Microsoft Entra ID.\n * So we need to do our own implementation.\n * This customized authentication is following by this guide: https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/RLC-customization.md#custom-authentication\n */\n if (isTokenCredential(credential)) {\n const clientId = typeof clientIdOrOptions === \"string\" ? clientIdOrOptions : \"\";\n if (!clientId) {\n throw Error(\"Client id is needed for TokenCredential\");\n }\n const client = createClient(undefined as any, options);\n client.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential,\n scopes: \"https://atlas.microsoft.com/.default\",\n }),\n );\n client.pipeline.addPolicy(createMapsClientIdPolicy(clientId));\n return client;\n }\n\n if (isSASCredential(credential)) {\n const client = createClient(undefined as any, options);\n client.pipeline.addPolicy({\n name: \"mapsSASCredentialPolicy\",\n async sendRequest(request, next) {\n request.headers.set(\"Authorization\", `jwt-sas ${credential.signature}`);\n return next(request);\n },\n });\n return client;\n }\n\n return createClient(credential, options);\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import { GeolocationGetLocationParameters } from "./parameters.js";
2
+ import { GeolocationGetLocation200Response, GeolocationGetLocationDefaultResponse } from "./responses.js";
3
+ import { Client, StreamableMethod } from "@azure-rest/core-client";
4
+ export interface GetLocation {
5
+ /**
6
+ *
7
+ * 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.
8
+ */
9
+ get(options: GeolocationGetLocationParameters): StreamableMethod<GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse>;
10
+ }
11
+ export interface Routes {
12
+ /** Resource for '/geolocation/ip/\{format\}' has methods for the following verbs: get */
13
+ (path: "/geolocation/ip/{format}", format: "json"): GetLocation;
14
+ }
15
+ export type MapsGeolocationClient = Client & {
16
+ path: Routes;
17
+ };
18
+ //# sourceMappingURL=clientDefinitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../../src/generated/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,iCAAiC,EACjC,qCAAqC,EACtC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,GAAG,CACD,OAAO,EAAE,gCAAgC,GACxC,gBAAgB,CACjB,iCAAiC,GAAG,qCAAqC,CAC1E,CAAC;CACH;AAED,MAAM,WAAW,MAAM;IACrB,yFAAyF;IACzF,CAAC,IAAI,EAAE,0BAA0B,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC;CACjE;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG;IAC3C,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=clientDefinitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../../src/generated/clientDefinitions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeolocationGetLocationParameters } from \"./parameters.js\";\nimport {\n GeolocationGetLocation200Response,\n GeolocationGetLocationDefaultResponse,\n} from \"./responses.js\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface GetLocation {\n /**\n *\n * 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.\n */\n get(\n options: GeolocationGetLocationParameters,\n ): StreamableMethod<\n GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/geolocation/ip/\\{format\\}' has methods for the following verbs: get */\n (path: \"/geolocation/ip/{format}\", format: \"json\"): GetLocation;\n}\n\nexport type MapsGeolocationClient = Client & {\n path: Routes;\n};\n"]}
@@ -0,0 +1,9 @@
1
+ import MapsGeolocationClient from "./mapsGeolocationClient.js";
2
+ export * from "./mapsGeolocationClient.js";
3
+ export * from "./parameters.js";
4
+ export * from "./responses.js";
5
+ export * from "./clientDefinitions.js";
6
+ export * from "./isUnexpected.js";
7
+ export * from "./outputModels.js";
8
+ export default MapsGeolocationClient;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAGA,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAE/D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAElC,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ const tslib_1 = require("tslib");
6
+ const mapsGeolocationClient_js_1 = tslib_1.__importDefault(require("./mapsGeolocationClient.js"));
7
+ tslib_1.__exportStar(require("./mapsGeolocationClient.js"), exports);
8
+ tslib_1.__exportStar(require("./parameters.js"), exports);
9
+ tslib_1.__exportStar(require("./responses.js"), exports);
10
+ tslib_1.__exportStar(require("./clientDefinitions.js"), exports);
11
+ tslib_1.__exportStar(require("./isUnexpected.js"), exports);
12
+ tslib_1.__exportStar(require("./outputModels.js"), exports);
13
+ exports.default = mapsGeolocationClient_js_1.default;
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,kGAA+D;AAE/D,qEAA2C;AAC3C,0DAAgC;AAChC,yDAA+B;AAC/B,iEAAuC;AACvC,4DAAkC;AAClC,4DAAkC;AAElC,kBAAe,kCAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport MapsGeolocationClient from \"./mapsGeolocationClient.js\";\n\nexport * from \"./mapsGeolocationClient.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./outputModels.js\";\n\nexport default MapsGeolocationClient;\n"]}
@@ -0,0 +1,3 @@
1
+ import { GeolocationGetLocation200Response, GeolocationGetLocationDefaultResponse } from "./responses.js";
2
+ export declare function isUnexpected(response: GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse): response is GeolocationGetLocationDefaultResponse;
3
+ //# sourceMappingURL=isUnexpected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../../src/generated/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iCAAiC,EACjC,qCAAqC,EACtC,MAAM,gBAAgB,CAAC;AAMxB,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,iCAAiC,GACjC,qCAAqC,GACxC,QAAQ,IAAI,qCAAqC,CAAC"}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.isUnexpected = isUnexpected;
6
+ const responseMap = {
7
+ "GET /geolocation/ip/{format}": ["200"],
8
+ };
9
+ function isUnexpected(response) {
10
+ const lroOriginal = response.headers["x-ms-original-url"];
11
+ const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
12
+ const method = response.request.method;
13
+ let pathDetails = responseMap[`${method} ${url.pathname}`];
14
+ if (!pathDetails) {
15
+ pathDetails = getParametrizedPathSuccess(method, url.pathname);
16
+ }
17
+ return !pathDetails.includes(response.status);
18
+ }
19
+ function getParametrizedPathSuccess(method, path) {
20
+ var _a, _b, _c, _d;
21
+ const pathParts = path.split("/");
22
+ // Traverse list to match the longest candidate
23
+ // matchedLen: the length of candidate path
24
+ // matchedValue: the matched status code array
25
+ let matchedLen = -1, matchedValue = [];
26
+ // Iterate the responseMap to find a match
27
+ for (const [key, value] of Object.entries(responseMap)) {
28
+ // Extracting the path from the map key which is in format
29
+ // GET /path/foo
30
+ if (!key.startsWith(method)) {
31
+ continue;
32
+ }
33
+ const candidatePath = getPathFromMapKey(key);
34
+ // Get each part of the url path
35
+ const candidateParts = candidatePath.split("/");
36
+ // track if we have found a match to return the values found.
37
+ let found = true;
38
+ for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
39
+ if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) &&
40
+ ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
41
+ const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
42
+ // If the current part of the candidate is a "template" part
43
+ // Try to use the suffix of pattern to match the path
44
+ // {guid} ==> $
45
+ // {guid}:export ==> :export$
46
+ const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
47
+ if (!isMatched) {
48
+ found = false;
49
+ break;
50
+ }
51
+ continue;
52
+ }
53
+ // If the candidate part is not a template and
54
+ // the parts don't match mark the candidate as not found
55
+ // to move on with the next candidate path.
56
+ if (candidateParts[i] !== pathParts[j]) {
57
+ found = false;
58
+ break;
59
+ }
60
+ }
61
+ // We finished evaluating the current candidate parts
62
+ // Update the matched value if and only if we found the longer pattern
63
+ if (found && candidatePath.length > matchedLen) {
64
+ matchedLen = candidatePath.length;
65
+ matchedValue = value;
66
+ }
67
+ }
68
+ return matchedValue;
69
+ }
70
+ function getPathFromMapKey(mapKey) {
71
+ const pathStart = mapKey.indexOf("/");
72
+ return mapKey.slice(pathStart);
73
+ }
74
+ //# sourceMappingURL=isUnexpected.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../../src/generated/isUnexpected.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAgBlC,oCAaC;AAtBD,MAAM,WAAW,GAA6B;IAC5C,8BAA8B,EAAE,CAAC,KAAK,CAAC;CACxC,CAAC;AAOF,SAAgB,YAAY,CAC1B,QAEyC;IAEzC,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,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;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n GeolocationGetLocation200Response,\n GeolocationGetLocationDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /geolocation/ip/{format}\": [\"200\"],\n};\n\nexport function isUnexpected(\n response:\n | GeolocationGetLocation200Response\n | GeolocationGetLocationDefaultResponse,\n): response is GeolocationGetLocationDefaultResponse;\nexport function isUnexpected(\n response:\n | GeolocationGetLocation200Response\n | GeolocationGetLocationDefaultResponse,\n): response is GeolocationGetLocationDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (\n let i = candidateParts.length - 1, j = pathParts.length - 1;\n i >= 1 && j >= 1;\n i--, j--\n ) {\n if (\n candidateParts[i]?.startsWith(\"{\") &&\n candidateParts[i]?.indexOf(\"}\") !== -1\n ) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(\n `${candidateParts[i]?.slice(start, end)}`,\n ).test(pathParts[j] || \"\");\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const logger: import("@azure/logger").AzureLogger;
2
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/generated/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAAyC,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.logger = void 0;
6
+ const logger_1 = require("@azure/logger");
7
+ exports.logger = (0, logger_1.createClientLogger)("maps-geolocation");
8
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/generated/logger.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,0CAAmD;AACtC,QAAA,MAAM,GAAG,IAAA,2BAAkB,EAAC,kBAAkB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"maps-geolocation\");\n"]}
@@ -0,0 +1,15 @@
1
+ import { ClientOptions } from "@azure-rest/core-client";
2
+ import { KeyCredential } from "@azure/core-auth";
3
+ import { MapsGeolocationClient } from "./clientDefinitions.js";
4
+ /** The optional parameters for the client */
5
+ export interface MapsGeolocationClientOptions extends ClientOptions {
6
+ /** The api version option of the client */
7
+ apiVersion?: string;
8
+ }
9
+ /**
10
+ * Initialize a new instance of `MapsGeolocationClient`
11
+ * @param credentials - uniquely identify client credential
12
+ * @param options - the parameter for all optional parameters
13
+ */
14
+ export default function createClient(credentials: KeyCredential, { apiVersion, ...options }?: MapsGeolocationClientOptions): MapsGeolocationClient;
15
+ //# sourceMappingURL=mapsGeolocationClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapsGeolocationClient.d.ts","sourceRoot":"","sources":["../../../src/generated/mapsGeolocationClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,6CAA6C;AAC7C,MAAM,WAAW,4BAA6B,SAAQ,aAAa;IACjE,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,WAAW,EAAE,aAAa,EAC1B,EAAE,UAAkB,EAAE,GAAG,OAAO,EAAE,GAAE,4BAAiC,GACpE,qBAAqB,CA6CvB"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.default = createClient;
6
+ const tslib_1 = require("tslib");
7
+ const core_client_1 = require("@azure-rest/core-client");
8
+ const logger_js_1 = require("./logger.js");
9
+ /**
10
+ * Initialize a new instance of `MapsGeolocationClient`
11
+ * @param credentials - uniquely identify client credential
12
+ * @param options - the parameter for all optional parameters
13
+ */
14
+ function createClient(credentials, _a = {}) {
15
+ var _b, _c, _d, _e, _f, _g;
16
+ var { apiVersion = "1.0" } = _a, options = tslib_1.__rest(_a, ["apiVersion"]);
17
+ const endpointUrl = (_c = (_b = options.endpoint) !== null && _b !== void 0 ? _b : options.baseUrl) !== null && _c !== void 0 ? _c : `https://atlas.microsoft.com`;
18
+ const userAgentInfo = `azsdk-js-maps-geolocation-rest/1.0.0-beta.4`;
19
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
20
+ ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
21
+ : `${userAgentInfo}`;
22
+ options = Object.assign(Object.assign({}, options), { userAgentOptions: {
23
+ userAgentPrefix,
24
+ }, loggingOptions: {
25
+ logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger_js_1.logger.info,
26
+ }, credentials: {
27
+ apiKeyHeaderName: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.apiKeyHeaderName) !== null && _g !== void 0 ? _g : "subscription-key",
28
+ } });
29
+ const client = (0, core_client_1.getClient)(endpointUrl, credentials, options);
30
+ client.pipeline.removePolicy({ name: "ApiVersionPolicy" });
31
+ client.pipeline.addPolicy({
32
+ name: "ClientApiVersionPolicy",
33
+ sendRequest: (req, next) => {
34
+ // Use the apiVersion defined in request url directly
35
+ // Append one if there is no apiVersion and we have one at client options
36
+ const url = new URL(req.url);
37
+ if (!url.searchParams.get("api-version") && apiVersion) {
38
+ req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${apiVersion}`;
39
+ }
40
+ return next(req);
41
+ },
42
+ });
43
+ return client;
44
+ }
45
+ //# sourceMappingURL=mapsGeolocationClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapsGeolocationClient.js","sourceR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M,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,UAAU,EAAE,CAAC;gBACvD,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport { KeyCredential } from \"@azure/core-auth\";\nimport { MapsGeolocationClient } from \"./clientDefinitions.js\";\n\n/** The optional parameters for the client */\nexport interface MapsGeolocationClientOptions extends ClientOptions {\n /** The api version option of the client */\n apiVersion?: string;\n}\n\n/**\n * Initialize a new instance of `MapsGeolocationClient`\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n credentials: KeyCredential,\n { apiVersion = \"1.0\", ...options }: MapsGeolocationClientOptions = {},\n): MapsGeolocationClient {\n const endpointUrl =\n options.endpoint ?? options.baseUrl ?? `https://atlas.microsoft.com`;\n const userAgentInfo = `azsdk-js-maps-geolocation-rest/1.0.0-beta.4`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n apiKeyHeaderName:\n options.credentials?.apiKeyHeaderName ?? \"subscription-key\",\n },\n };\n const client = getClient(\n endpointUrl,\n credentials,\n options,\n ) as MapsGeolocationClient;\n\n client.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n client.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\") && apiVersion) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n\n return client;\n}\n"]}
@@ -0,0 +1,38 @@
1
+ /** This object is returned from a successful call to IP Address to country/region API */
2
+ export interface IpAddressToLocationResultOutput {
3
+ /** The object containing the country/region information. */
4
+ readonly countryRegion?: CountryRegionOutput;
5
+ /** The IP Address of the request. */
6
+ readonly ipAddress?: string;
7
+ }
8
+ /** The object containing the country/region information. */
9
+ export interface CountryRegionOutput {
10
+ /** 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. */
11
+ readonly isoCode?: string;
12
+ }
13
+ /** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */
14
+ export interface ErrorResponseOutput {
15
+ /** The error object. */
16
+ error?: ErrorDetailOutput;
17
+ }
18
+ /** The error detail. */
19
+ export interface ErrorDetailOutput {
20
+ /** The error code. */
21
+ readonly code?: string;
22
+ /** The error message. */
23
+ readonly message?: string;
24
+ /** The error target. */
25
+ readonly target?: string;
26
+ /** The error details. */
27
+ readonly details?: Array<ErrorDetailOutput>;
28
+ /** The error additional info. */
29
+ readonly additionalInfo?: Array<ErrorAdditionalInfoOutput>;
30
+ }
31
+ /** The resource management error additional info. */
32
+ export interface ErrorAdditionalInfoOutput {
33
+ /** The additional info type. */
34
+ readonly type?: string;
35
+ /** The additional info. */
36
+ readonly info?: Record<string, unknown>;
37
+ }
38
+ //# sourceMappingURL=outputModels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../../src/generated/outputModels.ts"],"names":[],"mappings":"AAGA,yFAAyF;AACzF,MAAM,WAAW,+BAA+B;IAC9C,4DAA4D;IAC5D,QAAQ,CAAC,aAAa,CAAC,EAAE,mBAAmB,CAAC;IAC7C,qCAAqC;IACrC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,4DAA4D;AAC5D,MAAM,WAAW,mBAAmB;IAClC,sOAAsO;IACtO,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,qKAAqK;AACrK,MAAM,WAAW,mBAAmB;IAClC,wBAAwB;IACxB,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B;AAED,wBAAwB;AACxB,MAAM,WAAW,iBAAiB;IAChC,sBAAsB;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,yBAAyB;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,wBAAwB;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,yBAAyB;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC5C,iCAAiC;IACjC,QAAQ,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;CAC5D;AAED,qDAAqD;AACrD,MAAM,WAAW,yBAAyB;IACxC,gCAAgC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,2BAA2B;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=outputModels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../../src/generated/outputModels.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** This object is returned from a successful call to IP Address to country/region API */\nexport interface IpAddressToLocationResultOutput {\n /** The object containing the country/region information. */\n readonly countryRegion?: CountryRegionOutput;\n /** The IP Address of the request. */\n readonly ipAddress?: string;\n}\n\n/** The object containing the country/region information. */\nexport interface CountryRegionOutput {\n /** 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. */\n readonly isoCode?: string;\n}\n\n/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */\nexport interface ErrorResponseOutput {\n /** The error object. */\n error?: ErrorDetailOutput;\n}\n\n/** The error detail. */\nexport interface ErrorDetailOutput {\n /** The error code. */\n readonly code?: string;\n /** The error message. */\n readonly message?: string;\n /** The error target. */\n readonly target?: string;\n /** The error details. */\n readonly details?: Array<ErrorDetailOutput>;\n /** The error additional info. */\n readonly additionalInfo?: Array<ErrorAdditionalInfoOutput>;\n}\n\n/** The resource management error additional info. */\nexport interface ErrorAdditionalInfoOutput {\n /** The additional info type. */\n readonly type?: string;\n /** The additional info. */\n readonly info?: Record<string, unknown>;\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import { RequestParameters } from "@azure-rest/core-client";
2
+ export interface GeolocationGetLocationQueryParamProperties {
3
+ /** The IP address. Both IPv4 and IPv6 are allowed. */
4
+ ip: string;
5
+ }
6
+ export interface GeolocationGetLocationQueryParam {
7
+ queryParameters: GeolocationGetLocationQueryParamProperties;
8
+ }
9
+ export type GeolocationGetLocationParameters = GeolocationGetLocationQueryParam & RequestParameters;
10
+ //# sourceMappingURL=parameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../src/generated/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,WAAW,0CAA0C;IACzD,sDAAsD;IACtD,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,gCAAgC;IAC/C,eAAe,EAAE,0CAA0C,CAAC;CAC7D;AAED,MAAM,MAAM,gCAAgC,GAC1C,gCAAgC,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=parameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../src/generated/parameters.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RequestParameters } from \"@azure-rest/core-client\";\n\nexport interface GeolocationGetLocationQueryParamProperties {\n /** The IP address. Both IPv4 and IPv6 are allowed. */\n ip: string;\n}\n\nexport interface GeolocationGetLocationQueryParam {\n queryParameters: GeolocationGetLocationQueryParamProperties;\n}\n\nexport type GeolocationGetLocationParameters =\n GeolocationGetLocationQueryParam & RequestParameters;\n"]}
@@ -0,0 +1,19 @@
1
+ import { HttpResponse } from "@azure-rest/core-client";
2
+ import { IpAddressToLocationResultOutput, ErrorResponseOutput } from "./outputModels.js";
3
+ /**
4
+ *
5
+ * 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.
6
+ */
7
+ export interface GeolocationGetLocation200Response extends HttpResponse {
8
+ status: "200";
9
+ body: IpAddressToLocationResultOutput;
10
+ }
11
+ /**
12
+ *
13
+ * 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.
14
+ */
15
+ export interface GeolocationGetLocationDefaultResponse extends HttpResponse {
16
+ status: string;
17
+ body: ErrorResponseOutput;
18
+ }
19
+ //# sourceMappingURL=responses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../src/generated/responses.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACL,+BAA+B,EAC/B,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAE3B;;;GAGG;AACH,MAAM,WAAW,iCAAkC,SAAQ,YAAY;IACrE,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,+BAA+B,CAAC;CACvC;AAED;;;GAGG;AACH,MAAM,WAAW,qCAAsC,SAAQ,YAAY;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;CAC3B"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=responses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/generated/responses.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { HttpResponse } from \"@azure-rest/core-client\";\nimport {\n IpAddressToLocationResultOutput,\n ErrorResponseOutput,\n} from \"./outputModels.js\";\n\n/**\n *\n * 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.\n */\nexport interface GeolocationGetLocation200Response extends HttpResponse {\n status: \"200\";\n body: IpAddressToLocationResultOutput;\n}\n\n/**\n *\n * 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.\n */\nexport interface GeolocationGetLocationDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import MapsGeolocation from "./MapsGeolocation.js";
2
+ export * from "./generated/index.js";
3
+ export default MapsGeolocation;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAEnD,cAAc,sBAAsB,CAAC;AACrC,eAAe,eAAe,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ const tslib_1 = require("tslib");
6
+ const MapsGeolocation_js_1 = tslib_1.__importDefault(require("./MapsGeolocation.js"));
7
+ tslib_1.__exportStar(require("./generated/index.js"), exports);
8
+ exports.default = MapsGeolocation_js_1.default;
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,sFAAmD;AAEnD,+DAAqC;AACrC,kBAAe,4BAAe,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport MapsGeolocation from \"./MapsGeolocation.js\";\n\nexport * from \"./generated/index.js\";\nexport default MapsGeolocation;\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.51.1"
9
+ }
10
+ ]
11
+ }