@azure/maps-common 1.0.0-beta.2 → 1.0.0-beta.3

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 (166) hide show
  1. package/LICENSE +3 -3
  2. package/README.md +12 -2
  3. package/{types/3.1 → dist/browser}/credential/createAzureMapsKeyCredentialPolicy.d.ts +8 -8
  4. package/dist/browser/credential/createAzureMapsKeyCredentialPolicy.d.ts.map +1 -0
  5. package/{dist-esm → dist/browser}/credential/createAzureMapsKeyCredentialPolicy.js +1 -1
  6. package/dist/browser/credential/createAzureMapsKeyCredentialPolicy.js.map +1 -0
  7. package/{types/latest → dist/browser}/credential/createMapsClientIdPolicy.d.ts +1 -1
  8. package/dist/browser/credential/createMapsClientIdPolicy.d.ts.map +1 -0
  9. package/{dist-esm → dist/browser}/credential/createMapsClientIdPolicy.js +1 -1
  10. package/dist/browser/credential/createMapsClientIdPolicy.js.map +1 -0
  11. package/dist/browser/credential/index.d.ts +3 -0
  12. package/{types/latest → dist/browser}/credential/index.d.ts.map +1 -1
  13. package/dist/browser/credential/index.js +5 -0
  14. package/dist/browser/credential/index.js.map +1 -0
  15. package/dist/browser/index.d.ts +3 -0
  16. package/dist/browser/index.d.ts.map +1 -0
  17. package/dist/browser/index.js +5 -0
  18. package/dist/browser/index.js.map +1 -0
  19. package/{types/latest → dist/browser}/models/geojsons.d.ts +9 -9
  20. package/dist/browser/models/geojsons.d.ts.map +1 -0
  21. package/dist/browser/models/geojsons.js +4 -0
  22. package/dist/browser/models/geojsons.js.map +1 -0
  23. package/dist/browser/models/index.d.ts +4 -0
  24. package/dist/browser/models/index.d.ts.map +1 -0
  25. package/dist/browser/models/index.js +6 -0
  26. package/dist/browser/models/index.js.map +1 -0
  27. package/{types/latest → dist/browser}/models/lro.d.ts +3 -2
  28. package/dist/browser/models/lro.d.ts.map +1 -0
  29. package/{dist-esm → dist/browser}/models/lro.js +7 -4
  30. package/dist/browser/models/lro.js.map +1 -0
  31. package/{types/latest → dist/browser}/models/models.d.ts +1 -1
  32. package/dist/browser/models/models.d.ts.map +1 -0
  33. package/dist/browser/models/models.js +4 -0
  34. package/dist/browser/models/models.js.map +1 -0
  35. package/dist/browser/package.json +3 -0
  36. package/{types/latest → dist/commonjs}/credential/createAzureMapsKeyCredentialPolicy.d.ts +2 -2
  37. package/dist/commonjs/credential/createAzureMapsKeyCredentialPolicy.d.ts.map +1 -0
  38. package/dist/commonjs/credential/createAzureMapsKeyCredentialPolicy.js +26 -0
  39. package/dist/commonjs/credential/createAzureMapsKeyCredentialPolicy.js.map +1 -0
  40. package/{types/3.1 → dist/commonjs}/credential/createMapsClientIdPolicy.d.ts +7 -7
  41. package/dist/commonjs/credential/createMapsClientIdPolicy.d.ts.map +1 -0
  42. package/dist/commonjs/credential/createMapsClientIdPolicy.js +26 -0
  43. package/dist/commonjs/credential/createMapsClientIdPolicy.js.map +1 -0
  44. package/dist/commonjs/credential/index.d.ts +3 -0
  45. package/dist/commonjs/credential/index.d.ts.map +1 -0
  46. package/dist/commonjs/credential/index.js +8 -0
  47. package/dist/commonjs/credential/index.js.map +1 -0
  48. package/dist/commonjs/index.d.ts +3 -0
  49. package/dist/commonjs/index.d.ts.map +1 -0
  50. package/dist/commonjs/index.js +8 -0
  51. package/dist/commonjs/index.js.map +1 -0
  52. package/{types/3.1 → dist/commonjs}/models/geojsons.d.ts +104 -111
  53. package/dist/commonjs/models/geojsons.d.ts.map +1 -0
  54. package/dist/commonjs/models/geojsons.js +5 -0
  55. package/dist/commonjs/models/geojsons.js.map +1 -0
  56. package/dist/commonjs/models/index.d.ts +4 -0
  57. package/dist/commonjs/models/index.d.ts.map +1 -0
  58. package/dist/commonjs/models/index.js +9 -0
  59. package/dist/commonjs/models/index.js.map +1 -0
  60. package/{types/3.1 → dist/commonjs}/models/lro.d.ts +23 -22
  61. package/dist/commonjs/models/lro.d.ts.map +1 -0
  62. package/dist/commonjs/models/lro.js +41 -0
  63. package/dist/commonjs/models/lro.js.map +1 -0
  64. package/{types/3.1 → dist/commonjs}/models/models.d.ts +14 -17
  65. package/dist/commonjs/models/models.d.ts.map +1 -0
  66. package/dist/commonjs/models/models.js +5 -0
  67. package/dist/commonjs/models/models.js.map +1 -0
  68. package/dist/commonjs/package.json +3 -0
  69. package/{types/latest → dist/commonjs}/tsdoc-metadata.json +11 -11
  70. package/dist/esm/credential/createAzureMapsKeyCredentialPolicy.d.ts +8 -0
  71. package/dist/esm/credential/createAzureMapsKeyCredentialPolicy.d.ts.map +1 -0
  72. package/dist/esm/credential/createAzureMapsKeyCredentialPolicy.js +23 -0
  73. package/dist/esm/credential/createAzureMapsKeyCredentialPolicy.js.map +1 -0
  74. package/dist/esm/credential/createMapsClientIdPolicy.d.ts +7 -0
  75. package/dist/esm/credential/createMapsClientIdPolicy.d.ts.map +1 -0
  76. package/dist/esm/credential/createMapsClientIdPolicy.js +23 -0
  77. package/dist/esm/credential/createMapsClientIdPolicy.js.map +1 -0
  78. package/dist/esm/credential/index.d.ts +3 -0
  79. package/dist/esm/credential/index.d.ts.map +1 -0
  80. package/dist/esm/credential/index.js +5 -0
  81. package/dist/esm/credential/index.js.map +1 -0
  82. package/dist/esm/index.d.ts +3 -0
  83. package/dist/esm/index.d.ts.map +1 -0
  84. package/dist/esm/index.js +5 -0
  85. package/dist/esm/index.js.map +1 -0
  86. package/dist/esm/models/geojsons.d.ts +104 -0
  87. package/dist/esm/models/geojsons.d.ts.map +1 -0
  88. package/dist/esm/models/geojsons.js +4 -0
  89. package/dist/esm/models/geojsons.js.map +1 -0
  90. package/dist/esm/models/index.d.ts +4 -0
  91. package/dist/esm/models/index.d.ts.map +1 -0
  92. package/dist/esm/models/index.js +6 -0
  93. package/dist/esm/models/index.js.map +1 -0
  94. package/dist/esm/models/lro.d.ts +23 -0
  95. package/dist/esm/models/lro.d.ts.map +1 -0
  96. package/dist/esm/models/lro.js +37 -0
  97. package/dist/esm/models/lro.js.map +1 -0
  98. package/dist/esm/models/models.d.ts +14 -0
  99. package/dist/esm/models/models.d.ts.map +1 -0
  100. package/dist/esm/models/models.js +4 -0
  101. package/dist/esm/models/models.js.map +1 -0
  102. package/dist/esm/package.json +3 -0
  103. package/dist/react-native/credential/createAzureMapsKeyCredentialPolicy.d.ts +8 -0
  104. package/dist/react-native/credential/createAzureMapsKeyCredentialPolicy.d.ts.map +1 -0
  105. package/dist/react-native/credential/createAzureMapsKeyCredentialPolicy.js +23 -0
  106. package/dist/react-native/credential/createAzureMapsKeyCredentialPolicy.js.map +1 -0
  107. package/dist/react-native/credential/createMapsClientIdPolicy.d.ts +7 -0
  108. package/dist/react-native/credential/createMapsClientIdPolicy.d.ts.map +1 -0
  109. package/dist/react-native/credential/createMapsClientIdPolicy.js +23 -0
  110. package/dist/react-native/credential/createMapsClientIdPolicy.js.map +1 -0
  111. package/dist/react-native/credential/index.d.ts +3 -0
  112. package/dist/react-native/credential/index.d.ts.map +1 -0
  113. package/dist/react-native/credential/index.js +5 -0
  114. package/dist/react-native/credential/index.js.map +1 -0
  115. package/dist/react-native/index.d.ts +3 -0
  116. package/dist/react-native/index.d.ts.map +1 -0
  117. package/dist/react-native/index.js +5 -0
  118. package/dist/react-native/index.js.map +1 -0
  119. package/dist/react-native/models/geojsons.d.ts +104 -0
  120. package/dist/react-native/models/geojsons.d.ts.map +1 -0
  121. package/dist/react-native/models/geojsons.js +4 -0
  122. package/dist/react-native/models/geojsons.js.map +1 -0
  123. package/dist/react-native/models/index.d.ts +4 -0
  124. package/dist/react-native/models/index.d.ts.map +1 -0
  125. package/dist/react-native/models/index.js +6 -0
  126. package/dist/react-native/models/index.js.map +1 -0
  127. package/dist/react-native/models/lro.d.ts +23 -0
  128. package/dist/react-native/models/lro.d.ts.map +1 -0
  129. package/dist/react-native/models/lro.js +37 -0
  130. package/dist/react-native/models/lro.js.map +1 -0
  131. package/dist/react-native/models/models.d.ts +14 -0
  132. package/dist/react-native/models/models.d.ts.map +1 -0
  133. package/dist/react-native/models/models.js +4 -0
  134. package/dist/react-native/models/models.js.map +1 -0
  135. package/dist/react-native/package.json +3 -0
  136. package/package.json +79 -57
  137. package/dist/index.js +0 -89
  138. package/dist/index.js.map +0 -1
  139. package/dist-esm/credential/createAzureMapsKeyCredentialPolicy.js.map +0 -1
  140. package/dist-esm/credential/createMapsClientIdPolicy.js.map +0 -1
  141. package/dist-esm/credential/index.js +0 -5
  142. package/dist-esm/credential/index.js.map +0 -1
  143. package/dist-esm/index.js +0 -5
  144. package/dist-esm/index.js.map +0 -1
  145. package/dist-esm/models/geojsons.js +0 -4
  146. package/dist-esm/models/geojsons.js.map +0 -1
  147. package/dist-esm/models/index.js +0 -6
  148. package/dist-esm/models/index.js.map +0 -1
  149. package/dist-esm/models/lro.js.map +0 -1
  150. package/dist-esm/models/models.js +0 -4
  151. package/dist-esm/models/models.js.map +0 -1
  152. package/types/3.1/credential/index.d.ts +0 -3
  153. package/types/3.1/index.d.ts +0 -3
  154. package/types/3.1/maps-common.d.ts +0 -162
  155. package/types/3.1/models/index.d.ts +0 -4
  156. package/types/latest/credential/createAzureMapsKeyCredentialPolicy.d.ts.map +0 -1
  157. package/types/latest/credential/createMapsClientIdPolicy.d.ts.map +0 -1
  158. package/types/latest/credential/index.d.ts +0 -3
  159. package/types/latest/index.d.ts +0 -3
  160. package/types/latest/index.d.ts.map +0 -1
  161. package/types/latest/maps-common.d.ts +0 -178
  162. package/types/latest/models/geojsons.d.ts.map +0 -1
  163. package/types/latest/models/index.d.ts +0 -4
  164. package/types/latest/models/index.d.ts.map +0 -1
  165. package/types/latest/models/lro.d.ts.map +0 -1
  166. package/types/latest/models/models.d.ts.map +0 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- The MIT License (MIT)
1
+ Copyright (c) Microsoft Corporation.
2
2
 
3
- Copyright (c) 2022 Microsoft
3
+ MIT License
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -12,7 +12,7 @@ furnished to do so, subject to the following conditions:
12
12
  The above copyright notice and this permission notice shall be included in all
13
13
  copies or substantial portions of the Software.
14
14
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
package/README.md CHANGED
@@ -31,6 +31,18 @@ For information on next steps, please see our [Maps client libraries](#maps-clie
31
31
 
32
32
  If you run into issues while using this library, directly or indirectly, please feel free to [file an issue](https://github.com/Azure/azure-sdk-for-js/issues/new).
33
33
 
34
+ ### Logging
35
+
36
+ Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
37
+
38
+ ```ts snippet:SetLogLevel
39
+ import { setLogLevel } from "@azure/logger";
40
+
41
+ setLogLevel("info");
42
+ ```
43
+
44
+ For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
45
+
34
46
  ## Contributing
35
47
 
36
48
  If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code.
@@ -38,5 +50,3 @@ If you'd like to contribute to this library, please read the [contributing guide
38
50
  ## Related projects
39
51
 
40
52
  - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
41
-
42
- ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmaps%2Fmaps-common%2FREADME.png)
@@ -1,8 +1,8 @@
1
- import { PipelinePolicy } from "@azure/core-rest-pipeline";
2
- import { KeyCredential } from "@azure/core-auth";
3
- /**
4
- * Create an HTTP pipeline policy to authenticate a request
5
- * using an `AzureKeyCredential` for Azure Maps
6
- */
7
- export declare function createAzureMapsKeyCredentialPolicy(azureKeyCredential: KeyCredential): PipelinePolicy;
8
- //# sourceMappingURL=createAzureMapsKeyCredentialPolicy.d.ts.map
1
+ import type { PipelinePolicy } from "@azure/core-rest-pipeline";
2
+ import type { KeyCredential } from "@azure/core-auth";
3
+ /**
4
+ * Create an HTTP pipeline policy to authenticate a request
5
+ * using an `AzureKeyCredential` for Azure Maps
6
+ */
7
+ export declare function createAzureMapsKeyCredentialPolicy(azureKeyCredential: KeyCredential): PipelinePolicy;
8
+ //# sourceMappingURL=createAzureMapsKeyCredentialPolicy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAzureMapsKeyCredentialPolicy.d.ts","sourceRoot":"","sources":["../../../src/credential/createAzureMapsKeyCredentialPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,cAAc,EAIf,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAStD;;;GAGG;AACH,wBAAgB,kCAAkC,CAChD,kBAAkB,EAAE,aAAa,GAChC,cAAc,CAUhB"}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  const API_KEY_HEADER_NAME = "subscription-key";
4
4
  /**
5
5
  * The programmatic identifier of the mapsAzureKeyCredentialPolicy.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAzureMapsKeyCredentialPolicy.js","sourceRoot":"","sources":["../../../src/credential/createAzureMapsKeyCredentialPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAE/C;;GAEG;AACH,MAAM,gCAAgC,GAAG,8BAA8B,CAAC;AAExE;;;GAGG;AACH,MAAM,UAAU,kCAAkC,CAChD,kBAAiC;IAEjC,OAAO;QACL,IAAI,EAAE,gCAAgC;QACtC,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC;gBAC9C,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;YACnE,CAAC;YACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport type { KeyCredential } from \"@azure/core-auth\";\n\nconst API_KEY_HEADER_NAME = \"subscription-key\";\n\n/**\n * The programmatic identifier of the mapsAzureKeyCredentialPolicy.\n */\nconst azureMapsKeyCredentialPolicyName = \"mapsAzureKeyCredentialPolicy\";\n\n/**\n * Create an HTTP pipeline policy to authenticate a request\n * using an `AzureKeyCredential` for Azure Maps\n */\nexport function createAzureMapsKeyCredentialPolicy(\n azureKeyCredential: KeyCredential,\n): PipelinePolicy {\n return {\n name: azureMapsKeyCredentialPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n if (!request.headers.has(API_KEY_HEADER_NAME)) {\n request.headers.set(API_KEY_HEADER_NAME, azureKeyCredential.key);\n }\n return next(request);\n },\n };\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { PipelinePolicy } from "@azure/core-rest-pipeline";
1
+ import type { PipelinePolicy } from "@azure/core-rest-pipeline";
2
2
  /**
3
3
  * Create an HTTP pipeline policy to add x-ms-client-id header
4
4
  * for `TokenCredential` based authentication for Azure Maps
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createMapsClientIdPolicy.d.ts","sourceRoot":"","sources":["../../../src/credential/createMapsClientIdPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,cAAc,EAIf,MAAM,2BAA2B,CAAC;AASnC;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,CAU7E"}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  const MAPS_CLIENT_ID_HEADER_NAME = "x-ms-client-id";
4
4
  /**
5
5
  * The programmatic identifier of the mapsTokenCredentialPolicy.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createMapsClientIdPolicy.js","sourceRoot":"","sources":["../../../src/credential/createMapsClientIdPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,MAAM,0BAA0B,GAAG,gBAAgB,CAAC;AAEpD;;GAEG;AACH,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAEpD;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,YAAoB;IAC3D,OAAO;QACL,IAAI,EAAE,sBAAsB;QAC5B,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,EAAE,CAAC;gBACrD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,YAAY,CAAC,CAAC;YAChE,CAAC;YACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\n\nconst MAPS_CLIENT_ID_HEADER_NAME = \"x-ms-client-id\";\n\n/**\n * The programmatic identifier of the mapsTokenCredentialPolicy.\n */\nconst mapsClientIdPolicyName = \"mapsClientIdPolicy\";\n\n/**\n * Create an HTTP pipeline policy to add x-ms-client-id header\n * for `TokenCredential` based authentication for Azure Maps\n */\nexport function createMapsClientIdPolicy(mapsClientId: string): PipelinePolicy {\n return {\n name: mapsClientIdPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n if (!request.headers.has(MAPS_CLIENT_ID_HEADER_NAME)) {\n request.headers.set(MAPS_CLIENT_ID_HEADER_NAME, mapsClientId);\n }\n return next(request);\n },\n };\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export * from "./createAzureMapsKeyCredentialPolicy.js";
2
+ export * from "./createMapsClientIdPolicy.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/credential/index.ts"],"names":[],"mappings":"AAGA,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/credential/index.ts"],"names":[],"mappings":"AAGA,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC"}
@@ -0,0 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export * from "./createAzureMapsKeyCredentialPolicy.js";
4
+ export * from "./createMapsClientIdPolicy.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/credential/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./createAzureMapsKeyCredentialPolicy.js\";\nexport * from \"./createMapsClientIdPolicy.js\";\n"]}
@@ -0,0 +1,3 @@
1
+ export * from "./credential/index.js";
2
+ export * from "./models/index.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export * from "./credential/index.js";
4
+ export * from "./models/index.js";
5
+ //# 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,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./credential/index.js\";\nexport * from \"./models/index.js\";\n"]}
@@ -1,16 +1,16 @@
1
1
  /** Geometry types */
2
- export declare type GeometryType = "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection";
2
+ export type GeometryType = "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection";
3
3
  /** GeoJSON types */
4
- export declare type GeoJsonType = GeometryType | "Feature" | "FeatureCollection";
4
+ export type GeoJsonType = GeometryType | "Feature" | "FeatureCollection";
5
5
  /** 2D bounding box */
6
- export declare type BBox2D = [
6
+ export type BBox2D = [
7
7
  southWestLongitude: number,
8
8
  southWestLatitude: number,
9
9
  northEastLongitude: number,
10
10
  northEastLatitude: number
11
11
  ];
12
12
  /** 3D bounding box */
13
- export declare type BBox3D = [
13
+ export type BBox3D = [
14
14
  southWestLongitude: number,
15
15
  southWestLatitude: number,
16
16
  southWestElevation: number,
@@ -19,7 +19,7 @@ export declare type BBox3D = [
19
19
  northEastElevation: number
20
20
  ];
21
21
  /** Bounding box including information on the coordinate range for its geometries */
22
- export declare type BBox = BBox2D | BBox3D;
22
+ export type BBox = BBox2D | BBox3D;
23
23
  /** A GeoJSON object represents a Geometry, Feature, or collection of
24
24
  Features. [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-3) */
25
25
  export interface GeoJsonObject {
@@ -29,11 +29,11 @@ export interface GeoJsonObject {
29
29
  bbox?: BBox;
30
30
  }
31
31
  /** 2D position */
32
- export declare type Position2D = [longitude: number, latitude: number];
32
+ export type Position2D = [longitude: number, latitude: number];
33
33
  /** 3D position */
34
- export declare type Position3D = [longitude: number, latitude: number, elevation: number];
34
+ export type Position3D = [longitude: number, latitude: number, elevation: number];
35
35
  /** An array of number representing a point */
36
- export declare type Position = Position2D | Position3D;
36
+ export type Position = Position2D | Position3D;
37
37
  /** GeoJSON Point. [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-3.1.2) */
38
38
  export interface GeoJsonPoint extends GeoJsonObject {
39
39
  type: "Point";
@@ -79,7 +79,7 @@ export interface GeoJsonMultiPolygon extends GeoJsonObject {
79
79
  coordinates: Position[][][];
80
80
  }
81
81
  /** GeoJSON Geometry */
82
- export declare type GeoJsonGeometry = GeoJsonPoint | GeoJsonMultiPoint | GeoJsonLineString | GeoJsonMultiLineString | GeoJsonPolygon | GeoJsonMultiPolygon;
82
+ export type GeoJsonGeometry = GeoJsonPoint | GeoJsonMultiPoint | GeoJsonLineString | GeoJsonMultiLineString | GeoJsonPolygon | GeoJsonMultiPolygon;
83
83
  /** GeoJSON GeometryCollection. [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-3.1.8) */
84
84
  export interface GeoJsonGeometryCollection extends GeoJsonObject {
85
85
  type: "GeometryCollection";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geojsons.d.ts","sourceRoot":"","sources":["../../../src/models/geojsons.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=geojsons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geojsons.js","sourceRoot":"","sources":["../../../src/models/geojsons.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// Definitions based on [RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946)\n\n/** Geometry types */\nexport type GeometryType =\n | \"Point\"\n | \"MultiPoint\"\n | \"LineString\"\n | \"MultiLineString\"\n | \"Polygon\"\n | \"MultiPolygon\"\n | \"GeometryCollection\";\n\n/** GeoJSON types */\nexport type GeoJsonType = GeometryType | \"Feature\" | \"FeatureCollection\";\n\n/** 2D bounding box */\nexport type BBox2D = [\n southWestLongitude: number,\n southWestLatitude: number,\n northEastLongitude: number,\n northEastLatitude: number,\n];\n/** 3D bounding box */\nexport type BBox3D = [\n southWestLongitude: number,\n southWestLatitude: number,\n southWestElevation: number,\n northEastLongitude: number,\n northEastLatitude: number,\n northEastElevation: number,\n];\n/** Bounding box including information on the coordinate range for its geometries */\nexport type BBox = BBox2D | BBox3D;\n\n/** A GeoJSON object represents a Geometry, Feature, or collection of\n Features. [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-3) */\nexport interface GeoJsonObject {\n /** Representing the type of this GeoJSON object, including the seven geometry type and \"Feature\", \"FeatureCollection\". [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-1.4) */\n type: GeoJsonType;\n /** Include information on the coordinate range for its Geometries, Features, or FeatureCollections. [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-5) */\n bbox?: BBox;\n}\n/** 2D position */\nexport type Position2D = [longitude: number, latitude: number];\n/** 3D position */\nexport type Position3D = [longitude: number, latitude: number, elevation: number];\n/** An array of number representing a point */\nexport type Position = Position2D | Position3D;\n\n/** GeoJSON Point. [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-3.1.2) */\nexport interface GeoJsonPoint extends GeoJsonObject {\n type: \"Point\";\n /** For type \"Point\", the \"coordinates\" member is a single position. */\n coordinates: Position;\n}\n\n/** GeoJSON MultiPoint. [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-3.1.3) */\nexport interface GeoJsonMultiPoint extends GeoJsonObject {\n type: \"MultiPoint\";\n /** For type \"MultiPoint\", the \"coordinates\" member is an array of positions. */\n coordinates: Position[];\n}\n\n/** GeoJSON LineString. [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-3.1.4) */\nexport interface GeoJsonLineString extends GeoJsonObject {\n type: \"LineString\";\n /** For type \"LineString\", the \"coordinates\" member is an array of two or more positions. */\n coordinates: Position[];\n}\n\n/** GeoJSON MultiLineString. [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-3.1.5) */\nexport interface GeoJsonMultiLineString extends GeoJsonObject {\n type: \"MultiLineString\";\n /** For type \"MultiLineString\", the \"coordinates\" member is an array of LineString coordinate arrays. */\n coordinates: Position[][];\n}\n\n/**\n * GeoJSON Polygon. [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-3.1.6)\n *\n * To specify a constraint specific to Polygons, it is useful to introduce the concept of a linear ring:\n * - A linear ring is a closed LineString with four or more positions.\n * - The first and last positions are equivalent, and they MUST contain identical values; their representation SHOULD also be identical.\n * - A linear ring is the boundary of a surface or the boundary of a hole in a surface.\n * - A linear ring MUST follow the right-hand rule with respect to the area it bounds, i.e., exterior rings are counterclockwise, and holes are clockwise.\n * */\nexport interface GeoJsonPolygon extends GeoJsonObject {\n type: \"Polygon\";\n /** For type \"Polygon\", the \"coordinates\" member MUST be an array of linear ring coordinate arrays. */\n coordinates: Position[][];\n}\n\n/** GeoJSON MultiPolygon. [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-3.1.7) */\nexport interface GeoJsonMultiPolygon extends GeoJsonObject {\n type: \"MultiPolygon\";\n /** For type \"MultiPolygon\", the \"coordinates\" member is an array of Polygon coordinate arrays. */\n coordinates: Position[][][];\n}\n\n/** GeoJSON Geometry */\nexport type GeoJsonGeometry =\n | GeoJsonPoint\n | GeoJsonMultiPoint\n | GeoJsonLineString\n | GeoJsonMultiLineString\n | GeoJsonPolygon\n | GeoJsonMultiPolygon;\n\n/** GeoJSON GeometryCollection. [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-3.1.8) */\nexport interface GeoJsonGeometryCollection extends GeoJsonObject {\n type: \"GeometryCollection\";\n /* It's not recommended to include GeometryCollection recursively */\n geometries: GeoJsonGeometry[];\n}\n\n/** \n * GeoJSON Feature\n * A Feature object represents a spatially bounded thing. Every Feature\n object is a GeoJSON object. [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-3.2)\n */\nexport interface GeoJsonFeature extends GeoJsonObject {\n type: \"Feature\";\n geometry?: GeoJsonGeometry;\n properties?: Record<string, any>;\n id?: number | string;\n}\n\n/** GeoJSON FeatureCollection. [Reference](https://www.rfc-editor.org/rfc/rfc7946#section-3.3) */\nexport interface GeoJsonFeatureCollection extends GeoJsonObject {\n type: \"FeatureCollection\";\n features: GeoJsonFeature[];\n}\n"]}
@@ -0,0 +1,4 @@
1
+ export * from "./geojsons.js";
2
+ export * from "./models.js";
3
+ export * from "./lro.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAGA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
@@ -0,0 +1,6 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export * from "./geojsons.js";
4
+ export * from "./models.js";
5
+ export * from "./lro.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./geojsons.js\";\nexport * from \"./models.js\";\nexport * from \"./lro.js\";\n"]}
@@ -1,5 +1,6 @@
1
- import { OperationOptions, OperationSpec, ServiceClient } from "@azure/core-client";
2
- import { LroResponse } from "@azure/core-lro";
1
+ import type { ServiceClient } from "@azure/core-client";
2
+ import { type OperationOptions, type OperationSpec } from "@azure/core-client";
3
+ import type { LroResponse } from "@azure/core-lro";
3
4
  /**
4
5
  * Extract several fields of the response to the rawResponse
5
6
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lro.d.ts","sourceRoot":"","sources":["../../../src/models/lro.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,QAAQ,SAAS,gBAAgB,EAAE,SAAS,EAC/E,WAAW,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,OAAO,CAAC,SAAS,CAAC,EACtD,OAAO,EAAE,QAAQ,GAChB,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAkBjC;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,SAAS,gBAAgB,EACjC,OAAO,SAAS,aAAa,EAC7B,QAAQ,EAAE;IACV,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,QAAQ,CAAC;IAClB,IAAI,EAAE,aAAa,CAAC;CACrB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAOlD"}
@@ -8,10 +8,13 @@
8
8
  export async function getRawResponse(getResponse, options) {
9
9
  const { onResponse } = options || {};
10
10
  let rawResponse;
11
- const flatResponse = await getResponse(Object.assign(Object.assign({}, options), { onResponse: (response, flatResponseParam) => {
11
+ const flatResponse = await getResponse({
12
+ ...options,
13
+ onResponse: (response, flatResponseParam) => {
12
14
  rawResponse = response;
13
- onResponse === null || onResponse === void 0 ? void 0 : onResponse(response, flatResponseParam);
14
- } }));
15
+ onResponse?.(response, flatResponseParam);
16
+ },
17
+ });
15
18
  return {
16
19
  flatResponse,
17
20
  rawResponse: {
@@ -29,6 +32,6 @@ export async function getRawResponse(getResponse, options) {
29
32
  */
30
33
  export function createSendPollRequest(settings) {
31
34
  const { client, options, spec } = settings;
32
- return async (path) => getRawResponse((paramOptions) => client.sendOperationRequest({ options: paramOptions }, Object.assign({ path }, spec)), options);
35
+ return async (path) => getRawResponse((paramOptions) => client.sendOperationRequest({ options: paramOptions }, { path, ...spec }), options);
33
36
  }
34
37
  //# sourceMappingURL=lro.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lro.js","sourceRoot":"","sources":["../../../src/models/lro.ts"],"names":[],"mappings":"AAUA;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,WAAsD,EACtD,OAAiB;IAEjB,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IACrC,IAAI,WAAkC,CAAC;IACvC,MAAM,YAAY,GAAG,MAAM,WAAW,CAAC;QACrC,GAAG,OAAO;QACV,UAAU,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,EAAE;YAC1C,WAAW,GAAG,QAAQ,CAAC;YACvB,UAAU,EAAE,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;QAC5C,CAAC;KACF,CAAC,CAAC;IACH,OAAO;QACL,YAAY;QACZ,WAAW,EAAE;YACX,UAAU,EAAE,WAAY,CAAC,MAAM;YAC/B,OAAO,EAAE,WAAY,CAAC,OAAO,CAAC,MAAM,EAAE;YACtC,IAAI,EAAE,WAAY,CAAC,UAAU;SAC9B;KACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAGnC,QAID;IACC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;IAC3C,OAAO,KAAK,EAAE,IAAY,EAAE,EAAE,CAC5B,cAAc,CACZ,CAAC,YAAY,EAAE,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC,EAC3F,OAAO,CACR,CAAC;AACN,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { ServiceClient } from \"@azure/core-client\";\nimport {\n type FullOperationResponse,\n type OperationOptions,\n type OperationSpec,\n} from \"@azure/core-client\";\nimport type { LroResponse } from \"@azure/core-lro\";\n\n/**\n * Extract several fields of the response to the rawResponse\n *\n * @param getResponse - A async function that actually call the backend API.\n * @param options - The options for the getResponse callback\n * @returns A promise for the API call.\n */\nexport async function getRawResponse<TOptions extends OperationOptions, TResponse>(\n getResponse: (options: TOptions) => Promise<TResponse>,\n options: TOptions,\n): Promise<LroResponse<TResponse>> {\n const { onResponse } = options || {};\n let rawResponse: FullOperationResponse;\n const flatResponse = await getResponse({\n ...options,\n onResponse: (response, flatResponseParam) => {\n rawResponse = response;\n onResponse?.(response, flatResponseParam);\n },\n });\n return {\n flatResponse,\n rawResponse: {\n statusCode: rawResponse!.status,\n headers: rawResponse!.headers.toJSON(),\n body: rawResponse!.parsedBody,\n },\n };\n}\n\n/**\n * Helper function to create a method that can be passed to sendPollRequest in createHttpPoller.\n *\n * @param settings - The settings of the poll request, including client, options and the spec\n * @returns A callback that accept the path as input and return the promise of Lro response.\n */\nexport function createSendPollRequest<\n TOptions extends OperationOptions,\n TClient extends ServiceClient,\n>(settings: {\n client: TClient;\n options: TOptions;\n spec: OperationSpec;\n}): (path: string) => Promise<LroResponse<unknown>> {\n const { client, options, spec } = settings;\n return async (path: string) =>\n getRawResponse(\n (paramOptions) => client.sendOperationRequest({ options: paramOptions }, { path, ...spec }),\n options,\n );\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Latitude/Longitude Pair
3
3
  */
4
- export declare type LatLon = [latitude: number, longitude: number];
4
+ export type LatLon = [latitude: number, longitude: number];
5
5
  /**
6
6
  * Bounding Box
7
7
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Latitude/Longitude Pair\n */\nexport type LatLon = [latitude: number, longitude: number];\n\n/**\n * Bounding Box\n */\nexport interface BoundingBox {\n /** Top left corner of the bounding box */\n topLeft: LatLon;\n /** Bottom right corner of the bounding box */\n bottomRight: LatLon;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -1,5 +1,5 @@
1
- import { PipelinePolicy } from "@azure/core-rest-pipeline";
2
- import { KeyCredential } from "@azure/core-auth";
1
+ import type { PipelinePolicy } from "@azure/core-rest-pipeline";
2
+ import type { KeyCredential } from "@azure/core-auth";
3
3
  /**
4
4
  * Create an HTTP pipeline policy to authenticate a request
5
5
  * using an `AzureKeyCredential` for Azure Maps
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAzureMapsKeyCredentialPolicy.d.ts","sourceRoot":"","sources":["../../../src/credential/createAzureMapsKeyCredentialPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,cAAc,EAIf,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAStD;;;GAGG;AACH,wBAAgB,kCAAkC,CAChD,kBAAkB,EAAE,aAAa,GAChC,cAAc,CAUhB"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.createAzureMapsKeyCredentialPolicy = createAzureMapsKeyCredentialPolicy;
6
+ const API_KEY_HEADER_NAME = "subscription-key";
7
+ /**
8
+ * The programmatic identifier of the mapsAzureKeyCredentialPolicy.
9
+ */
10
+ const azureMapsKeyCredentialPolicyName = "mapsAzureKeyCredentialPolicy";
11
+ /**
12
+ * Create an HTTP pipeline policy to authenticate a request
13
+ * using an `AzureKeyCredential` for Azure Maps
14
+ */
15
+ function createAzureMapsKeyCredentialPolicy(azureKeyCredential) {
16
+ return {
17
+ name: azureMapsKeyCredentialPolicyName,
18
+ async sendRequest(request, next) {
19
+ if (!request.headers.has(API_KEY_HEADER_NAME)) {
20
+ request.headers.set(API_KEY_HEADER_NAME, azureKeyCredential.key);
21
+ }
22
+ return next(request);
23
+ },
24
+ };
25
+ }
26
+ //# sourceMappingURL=createAzureMapsKeyCredentialPolicy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAzureMapsKeyCredentialPolicy.js","sourceRoot":"","sources":["../../../src/credential/createAzureMapsKeyCredentialPolicy.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAqBlC,gFAYC;AAvBD,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAE/C;;GAEG;AACH,MAAM,gCAAgC,GAAG,8BAA8B,CAAC;AAExE;;;GAGG;AACH,SAAgB,kCAAkC,CAChD,kBAAiC;IAEjC,OAAO;QACL,IAAI,EAAE,gCAAgC;QACtC,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC;gBAC9C,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;YACnE,CAAC;YACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport type { KeyCredential } from \"@azure/core-auth\";\n\nconst API_KEY_HEADER_NAME = \"subscription-key\";\n\n/**\n * The programmatic identifier of the mapsAzureKeyCredentialPolicy.\n */\nconst azureMapsKeyCredentialPolicyName = \"mapsAzureKeyCredentialPolicy\";\n\n/**\n * Create an HTTP pipeline policy to authenticate a request\n * using an `AzureKeyCredential` for Azure Maps\n */\nexport function createAzureMapsKeyCredentialPolicy(\n azureKeyCredential: KeyCredential,\n): PipelinePolicy {\n return {\n name: azureMapsKeyCredentialPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n if (!request.headers.has(API_KEY_HEADER_NAME)) {\n request.headers.set(API_KEY_HEADER_NAME, azureKeyCredential.key);\n }\n return next(request);\n },\n };\n}\n"]}
@@ -1,7 +1,7 @@
1
- import { PipelinePolicy } from "@azure/core-rest-pipeline";
2
- /**
3
- * Create an HTTP pipeline policy to add x-ms-client-id header
4
- * for `TokenCredential` based authentication for Azure Maps
5
- */
6
- export declare function createMapsClientIdPolicy(mapsClientId: string): PipelinePolicy;
7
- //# sourceMappingURL=createMapsClientIdPolicy.d.ts.map
1
+ import type { PipelinePolicy } from "@azure/core-rest-pipeline";
2
+ /**
3
+ * Create an HTTP pipeline policy to add x-ms-client-id header
4
+ * for `TokenCredential` based authentication for Azure Maps
5
+ */
6
+ export declare function createMapsClientIdPolicy(mapsClientId: string): PipelinePolicy;
7
+ //# sourceMappingURL=createMapsClientIdPolicy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createMapsClientIdPolicy.d.ts","sourceRoot":"","sources":["../../../src/credential/createMapsClientIdPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,cAAc,EAIf,MAAM,2BAA2B,CAAC;AASnC;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,CAU7E"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.createMapsClientIdPolicy = createMapsClientIdPolicy;
6
+ const MAPS_CLIENT_ID_HEADER_NAME = "x-ms-client-id";
7
+ /**
8
+ * The programmatic identifier of the mapsTokenCredentialPolicy.
9
+ */
10
+ const mapsClientIdPolicyName = "mapsClientIdPolicy";
11
+ /**
12
+ * Create an HTTP pipeline policy to add x-ms-client-id header
13
+ * for `TokenCredential` based authentication for Azure Maps
14
+ */
15
+ function createMapsClientIdPolicy(mapsClientId) {
16
+ return {
17
+ name: mapsClientIdPolicyName,
18
+ async sendRequest(request, next) {
19
+ if (!request.headers.has(MAPS_CLIENT_ID_HEADER_NAME)) {
20
+ request.headers.set(MAPS_CLIENT_ID_HEADER_NAME, mapsClientId);
21
+ }
22
+ return next(request);
23
+ },
24
+ };
25
+ }
26
+ //# sourceMappingURL=createMapsClientIdPolicy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createMapsClientIdPolicy.js","sourceRoot":"","sources":["../../../src/credential/createMapsClientIdPolicy.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAoBlC,4DAUC;AArBD,MAAM,0BAA0B,GAAG,gBAAgB,CAAC;AAEpD;;GAEG;AACH,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAEpD;;;GAGG;AACH,SAAgB,wBAAwB,CAAC,YAAoB;IAC3D,OAAO;QACL,IAAI,EAAE,sBAAsB;QAC5B,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,EAAE,CAAC;gBACrD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,YAAY,CAAC,CAAC;YAChE,CAAC;YACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\n\nconst MAPS_CLIENT_ID_HEADER_NAME = \"x-ms-client-id\";\n\n/**\n * The programmatic identifier of the mapsTokenCredentialPolicy.\n */\nconst mapsClientIdPolicyName = \"mapsClientIdPolicy\";\n\n/**\n * Create an HTTP pipeline policy to add x-ms-client-id header\n * for `TokenCredential` based authentication for Azure Maps\n */\nexport function createMapsClientIdPolicy(mapsClientId: string): PipelinePolicy {\n return {\n name: mapsClientIdPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n if (!request.headers.has(MAPS_CLIENT_ID_HEADER_NAME)) {\n request.headers.set(MAPS_CLIENT_ID_HEADER_NAME, mapsClientId);\n }\n return next(request);\n },\n };\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export * from "./createAzureMapsKeyCredentialPolicy.js";
2
+ export * from "./createMapsClientIdPolicy.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/credential/index.ts"],"names":[],"mappings":"AAGA,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,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
+ const tslib_1 = require("tslib");
6
+ tslib_1.__exportStar(require("./createAzureMapsKeyCredentialPolicy.js"), exports);
7
+ tslib_1.__exportStar(require("./createMapsClientIdPolicy.js"), exports);
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/credential/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,kFAAwD;AACxD,wEAA8C","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./createAzureMapsKeyCredentialPolicy.js\";\nexport * from \"./createMapsClientIdPolicy.js\";\n"]}
@@ -0,0 +1,3 @@
1
+ export * from "./credential/index.js";
2
+ export * from "./models/index.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,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
+ const tslib_1 = require("tslib");
6
+ tslib_1.__exportStar(require("./credential/index.js"), exports);
7
+ tslib_1.__exportStar(require("./models/index.js"), exports);
8
+ //# 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,gEAAsC;AACtC,4DAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./credential/index.js\";\nexport * from \"./models/index.js\";\n"]}