@azure-rest/maps-route 1.0.0-beta.3 → 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 (258) hide show
  1. package/LICENSE +4 -4
  2. package/README.md +81 -67
  3. package/dist/browser/generated/clientDefinitions.d.ts +617 -0
  4. package/dist/browser/generated/clientDefinitions.d.ts.map +1 -0
  5. package/dist/browser/generated/clientDefinitions.js +4 -0
  6. package/dist/browser/generated/clientDefinitions.js.map +1 -0
  7. package/dist/browser/generated/index.d.ts +12 -0
  8. package/dist/browser/generated/index.d.ts.map +1 -0
  9. package/dist/browser/generated/index.js +14 -0
  10. package/dist/browser/generated/index.js.map +1 -0
  11. package/dist/browser/generated/isUnexpected.d.ts +7 -0
  12. package/dist/browser/generated/isUnexpected.d.ts.map +1 -0
  13. package/dist/browser/generated/isUnexpected.js +79 -0
  14. package/dist/browser/generated/isUnexpected.js.map +1 -0
  15. package/dist/browser/generated/logger.d.ts +2 -0
  16. package/dist/browser/generated/logger.d.ts.map +1 -0
  17. package/dist/browser/generated/logger.js +5 -0
  18. package/dist/browser/generated/logger.js.map +1 -0
  19. package/dist/browser/generated/mapsRouteClient.d.ts +15 -0
  20. package/dist/browser/generated/mapsRouteClient.d.ts.map +1 -0
  21. package/dist/browser/generated/mapsRouteClient.js +42 -0
  22. package/dist/browser/generated/mapsRouteClient.js.map +1 -0
  23. package/dist/browser/generated/models.d.ts +130 -0
  24. package/dist/browser/generated/models.d.ts.map +1 -0
  25. package/dist/browser/generated/models.js +4 -0
  26. package/dist/browser/generated/models.js.map +1 -0
  27. package/dist/browser/generated/outputModels.d.ts +286 -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 +937 -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/pollingHelper.d.ts +76 -0
  36. package/dist/browser/generated/pollingHelper.d.ts.map +1 -0
  37. package/dist/browser/generated/pollingHelper.js +105 -0
  38. package/dist/browser/generated/pollingHelper.js.map +1 -0
  39. package/dist/browser/generated/responses.d.ts +1409 -0
  40. package/dist/browser/generated/responses.d.ts.map +1 -0
  41. package/dist/browser/generated/responses.js +4 -0
  42. package/dist/browser/generated/responses.js.map +1 -0
  43. package/dist/browser/generated/serializeHelper.d.ts +2 -0
  44. package/dist/browser/generated/serializeHelper.d.ts.map +1 -0
  45. package/dist/browser/generated/serializeHelper.js +13 -0
  46. package/dist/browser/generated/serializeHelper.js.map +1 -0
  47. package/dist/browser/helpers.d.ts +18 -0
  48. package/dist/browser/helpers.d.ts.map +1 -0
  49. package/{dist-esm/src → dist/browser}/helpers.js +1 -1
  50. package/dist/browser/helpers.js.map +1 -0
  51. package/dist/browser/index.d.ts +5 -0
  52. package/dist/browser/index.d.ts.map +1 -0
  53. package/dist/browser/index.js +7 -0
  54. package/dist/browser/index.js.map +1 -0
  55. package/dist/browser/mapsRoute.d.ts +53 -0
  56. package/dist/browser/mapsRoute.d.ts.map +1 -0
  57. package/{dist-esm/src → dist/browser}/mapsRoute.js +5 -5
  58. package/dist/browser/mapsRoute.js.map +1 -0
  59. package/dist/browser/package.json +3 -0
  60. package/dist/commonjs/generated/clientDefinitions.d.ts +617 -0
  61. package/dist/commonjs/generated/clientDefinitions.d.ts.map +1 -0
  62. package/dist/commonjs/generated/clientDefinitions.js +5 -0
  63. package/dist/commonjs/generated/clientDefinitions.js.map +1 -0
  64. package/dist/commonjs/generated/index.d.ts +12 -0
  65. package/dist/commonjs/generated/index.d.ts.map +1 -0
  66. package/dist/commonjs/generated/index.js +17 -0
  67. package/dist/commonjs/generated/index.js.map +1 -0
  68. package/dist/commonjs/generated/isUnexpected.d.ts +7 -0
  69. package/dist/commonjs/generated/isUnexpected.d.ts.map +1 -0
  70. package/dist/commonjs/generated/isUnexpected.js +82 -0
  71. package/dist/commonjs/generated/isUnexpected.js.map +1 -0
  72. package/dist/commonjs/generated/logger.d.ts +2 -0
  73. package/dist/commonjs/generated/logger.d.ts.map +1 -0
  74. package/dist/commonjs/generated/logger.js +8 -0
  75. package/dist/commonjs/generated/logger.js.map +1 -0
  76. package/dist/commonjs/generated/mapsRouteClient.d.ts +15 -0
  77. package/dist/commonjs/generated/mapsRouteClient.d.ts.map +1 -0
  78. package/dist/commonjs/generated/mapsRouteClient.js +45 -0
  79. package/dist/commonjs/generated/mapsRouteClient.js.map +1 -0
  80. package/dist/commonjs/generated/models.d.ts +130 -0
  81. package/dist/commonjs/generated/models.d.ts.map +1 -0
  82. package/dist/commonjs/generated/models.js +5 -0
  83. package/dist/commonjs/generated/models.js.map +1 -0
  84. package/dist/commonjs/generated/outputModels.d.ts +286 -0
  85. package/dist/commonjs/generated/outputModels.d.ts.map +1 -0
  86. package/dist/commonjs/generated/outputModels.js +5 -0
  87. package/dist/commonjs/generated/outputModels.js.map +1 -0
  88. package/dist/commonjs/generated/parameters.d.ts +937 -0
  89. package/dist/commonjs/generated/parameters.d.ts.map +1 -0
  90. package/dist/commonjs/generated/parameters.js +5 -0
  91. package/dist/commonjs/generated/parameters.js.map +1 -0
  92. package/dist/commonjs/generated/pollingHelper.d.ts +76 -0
  93. package/dist/commonjs/generated/pollingHelper.d.ts.map +1 -0
  94. package/dist/commonjs/generated/pollingHelper.js +108 -0
  95. package/dist/commonjs/generated/pollingHelper.js.map +1 -0
  96. package/dist/commonjs/generated/responses.d.ts +1409 -0
  97. package/dist/commonjs/generated/responses.d.ts.map +1 -0
  98. package/dist/commonjs/generated/responses.js +5 -0
  99. package/dist/commonjs/generated/responses.js.map +1 -0
  100. package/dist/commonjs/generated/serializeHelper.d.ts +2 -0
  101. package/dist/commonjs/generated/serializeHelper.d.ts.map +1 -0
  102. package/dist/commonjs/generated/serializeHelper.js +16 -0
  103. package/dist/commonjs/generated/serializeHelper.js.map +1 -0
  104. package/dist/commonjs/helpers.d.ts +18 -0
  105. package/dist/commonjs/helpers.d.ts.map +1 -0
  106. package/dist/commonjs/helpers.js +47 -0
  107. package/dist/commonjs/helpers.js.map +1 -0
  108. package/dist/commonjs/index.d.ts +5 -0
  109. package/dist/commonjs/index.d.ts.map +1 -0
  110. package/dist/commonjs/index.js +10 -0
  111. package/dist/commonjs/index.js.map +1 -0
  112. package/dist/commonjs/mapsRoute.d.ts +53 -0
  113. package/dist/commonjs/mapsRoute.d.ts.map +1 -0
  114. package/dist/commonjs/mapsRoute.js +44 -0
  115. package/dist/commonjs/mapsRoute.js.map +1 -0
  116. package/dist/commonjs/package.json +3 -0
  117. package/dist/commonjs/tsdoc-metadata.json +11 -0
  118. package/dist/esm/generated/clientDefinitions.d.ts +617 -0
  119. package/dist/esm/generated/clientDefinitions.d.ts.map +1 -0
  120. package/dist/esm/generated/clientDefinitions.js +4 -0
  121. package/dist/esm/generated/clientDefinitions.js.map +1 -0
  122. package/dist/esm/generated/index.d.ts +12 -0
  123. package/dist/esm/generated/index.d.ts.map +1 -0
  124. package/dist/esm/generated/index.js +14 -0
  125. package/dist/esm/generated/index.js.map +1 -0
  126. package/dist/esm/generated/isUnexpected.d.ts +7 -0
  127. package/dist/esm/generated/isUnexpected.d.ts.map +1 -0
  128. package/dist/esm/generated/isUnexpected.js +79 -0
  129. package/dist/esm/generated/isUnexpected.js.map +1 -0
  130. package/dist/esm/generated/logger.d.ts +2 -0
  131. package/dist/esm/generated/logger.d.ts.map +1 -0
  132. package/dist/esm/generated/logger.js +5 -0
  133. package/dist/esm/generated/logger.js.map +1 -0
  134. package/dist/esm/generated/mapsRouteClient.d.ts +15 -0
  135. package/dist/esm/generated/mapsRouteClient.d.ts.map +1 -0
  136. package/dist/esm/generated/mapsRouteClient.js +42 -0
  137. package/dist/esm/generated/mapsRouteClient.js.map +1 -0
  138. package/dist/esm/generated/models.d.ts +130 -0
  139. package/dist/esm/generated/models.d.ts.map +1 -0
  140. package/dist/esm/generated/models.js +4 -0
  141. package/dist/esm/generated/models.js.map +1 -0
  142. package/dist/esm/generated/outputModels.d.ts +286 -0
  143. package/dist/esm/generated/outputModels.d.ts.map +1 -0
  144. package/dist/esm/generated/outputModels.js +4 -0
  145. package/dist/esm/generated/outputModels.js.map +1 -0
  146. package/dist/esm/generated/parameters.d.ts +937 -0
  147. package/dist/esm/generated/parameters.d.ts.map +1 -0
  148. package/dist/esm/generated/parameters.js +4 -0
  149. package/dist/esm/generated/parameters.js.map +1 -0
  150. package/dist/esm/generated/pollingHelper.d.ts +76 -0
  151. package/dist/esm/generated/pollingHelper.d.ts.map +1 -0
  152. package/dist/esm/generated/pollingHelper.js +105 -0
  153. package/dist/esm/generated/pollingHelper.js.map +1 -0
  154. package/dist/esm/generated/responses.d.ts +1409 -0
  155. package/dist/esm/generated/responses.d.ts.map +1 -0
  156. package/dist/esm/generated/responses.js +4 -0
  157. package/dist/esm/generated/responses.js.map +1 -0
  158. package/dist/esm/generated/serializeHelper.d.ts +2 -0
  159. package/dist/esm/generated/serializeHelper.d.ts.map +1 -0
  160. package/dist/esm/generated/serializeHelper.js +13 -0
  161. package/dist/esm/generated/serializeHelper.js.map +1 -0
  162. package/dist/esm/helpers.d.ts +18 -0
  163. package/dist/esm/helpers.d.ts.map +1 -0
  164. package/dist/esm/helpers.js +43 -0
  165. package/dist/esm/helpers.js.map +1 -0
  166. package/dist/esm/index.d.ts +5 -0
  167. package/dist/esm/index.d.ts.map +1 -0
  168. package/dist/esm/index.js +7 -0
  169. package/dist/esm/index.js.map +1 -0
  170. package/dist/esm/mapsRoute.d.ts +53 -0
  171. package/dist/esm/mapsRoute.d.ts.map +1 -0
  172. package/dist/esm/mapsRoute.js +40 -0
  173. package/dist/esm/mapsRoute.js.map +1 -0
  174. package/dist/esm/package.json +3 -0
  175. package/dist/react-native/generated/clientDefinitions.d.ts +617 -0
  176. package/dist/react-native/generated/clientDefinitions.d.ts.map +1 -0
  177. package/dist/react-native/generated/clientDefinitions.js +4 -0
  178. package/dist/react-native/generated/clientDefinitions.js.map +1 -0
  179. package/dist/react-native/generated/index.d.ts +12 -0
  180. package/dist/react-native/generated/index.d.ts.map +1 -0
  181. package/dist/react-native/generated/index.js +14 -0
  182. package/dist/react-native/generated/index.js.map +1 -0
  183. package/dist/react-native/generated/isUnexpected.d.ts +7 -0
  184. package/dist/react-native/generated/isUnexpected.d.ts.map +1 -0
  185. package/dist/react-native/generated/isUnexpected.js +79 -0
  186. package/dist/react-native/generated/isUnexpected.js.map +1 -0
  187. package/dist/react-native/generated/logger.d.ts +2 -0
  188. package/dist/react-native/generated/logger.d.ts.map +1 -0
  189. package/dist/react-native/generated/logger.js +5 -0
  190. package/dist/react-native/generated/logger.js.map +1 -0
  191. package/dist/react-native/generated/mapsRouteClient.d.ts +15 -0
  192. package/dist/react-native/generated/mapsRouteClient.d.ts.map +1 -0
  193. package/dist/react-native/generated/mapsRouteClient.js +42 -0
  194. package/dist/react-native/generated/mapsRouteClient.js.map +1 -0
  195. package/dist/react-native/generated/models.d.ts +130 -0
  196. package/dist/react-native/generated/models.d.ts.map +1 -0
  197. package/dist/react-native/generated/models.js +4 -0
  198. package/dist/react-native/generated/models.js.map +1 -0
  199. package/dist/react-native/generated/outputModels.d.ts +286 -0
  200. package/dist/react-native/generated/outputModels.d.ts.map +1 -0
  201. package/dist/react-native/generated/outputModels.js +4 -0
  202. package/dist/react-native/generated/outputModels.js.map +1 -0
  203. package/dist/react-native/generated/parameters.d.ts +937 -0
  204. package/dist/react-native/generated/parameters.d.ts.map +1 -0
  205. package/dist/react-native/generated/parameters.js +4 -0
  206. package/dist/react-native/generated/parameters.js.map +1 -0
  207. package/dist/react-native/generated/pollingHelper.d.ts +76 -0
  208. package/dist/react-native/generated/pollingHelper.d.ts.map +1 -0
  209. package/dist/react-native/generated/pollingHelper.js +105 -0
  210. package/dist/react-native/generated/pollingHelper.js.map +1 -0
  211. package/dist/react-native/generated/responses.d.ts +1409 -0
  212. package/dist/react-native/generated/responses.d.ts.map +1 -0
  213. package/dist/react-native/generated/responses.js +4 -0
  214. package/dist/react-native/generated/responses.js.map +1 -0
  215. package/dist/react-native/generated/serializeHelper.d.ts +2 -0
  216. package/dist/react-native/generated/serializeHelper.d.ts.map +1 -0
  217. package/dist/react-native/generated/serializeHelper.js +13 -0
  218. package/dist/react-native/generated/serializeHelper.js.map +1 -0
  219. package/dist/react-native/helpers.d.ts +18 -0
  220. package/dist/react-native/helpers.d.ts.map +1 -0
  221. package/dist/react-native/helpers.js +43 -0
  222. package/dist/react-native/helpers.js.map +1 -0
  223. package/dist/react-native/index.d.ts +5 -0
  224. package/dist/react-native/index.d.ts.map +1 -0
  225. package/dist/react-native/index.js +7 -0
  226. package/dist/react-native/index.js.map +1 -0
  227. package/dist/react-native/mapsRoute.d.ts +53 -0
  228. package/dist/react-native/mapsRoute.d.ts.map +1 -0
  229. package/dist/react-native/mapsRoute.js +40 -0
  230. package/dist/react-native/mapsRoute.js.map +1 -0
  231. package/dist/react-native/package.json +3 -0
  232. package/package.json +80 -63
  233. package/dist/index.js +0 -257
  234. package/dist/index.js.map +0 -1
  235. package/dist-esm/src/generated/clientDefinitions.js +0 -4
  236. package/dist-esm/src/generated/clientDefinitions.js.map +0 -1
  237. package/dist-esm/src/generated/index.js +0 -13
  238. package/dist-esm/src/generated/index.js.map +0 -1
  239. package/dist-esm/src/generated/isUnexpected.js +0 -76
  240. package/dist-esm/src/generated/isUnexpected.js.map +0 -1
  241. package/dist-esm/src/generated/mapsRouteClient.js +0 -30
  242. package/dist-esm/src/generated/mapsRouteClient.js.map +0 -1
  243. package/dist-esm/src/generated/models.js +0 -4
  244. package/dist-esm/src/generated/models.js.map +0 -1
  245. package/dist-esm/src/generated/outputModels.js +0 -4
  246. package/dist-esm/src/generated/outputModels.js.map +0 -1
  247. package/dist-esm/src/generated/parameters.js +0 -4
  248. package/dist-esm/src/generated/parameters.js.map +0 -1
  249. package/dist-esm/src/generated/pollingHelper.js +0 -55
  250. package/dist-esm/src/generated/pollingHelper.js.map +0 -1
  251. package/dist-esm/src/generated/responses.js +0 -4
  252. package/dist-esm/src/generated/responses.js.map +0 -1
  253. package/dist-esm/src/helpers.js.map +0 -1
  254. package/dist-esm/src/index.js +0 -7
  255. package/dist-esm/src/index.js.map +0 -1
  256. package/dist-esm/src/mapsRoute.js.map +0 -1
  257. package/review/maps-route.api.md +0 -911
  258. package/types/maps-route-rest.d.ts +0 -3431
@@ -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 {\n RouteRequestRouteMatrixParameters,\n RouteGetRouteMatrixParameters,\n RouteRequestRouteMatrixSyncParameters,\n RouteGetRouteDirectionsParameters,\n RouteGetRouteDirectionsWithAdditionalParametersParameters,\n RouteGetRouteRangeParameters,\n RouteRequestRouteDirectionsBatchParameters,\n RouteGetRouteDirectionsBatchParameters,\n RouteRequestRouteDirectionsBatchSyncParameters,\n} from \"./parameters.js\";\nimport {\n RouteRequestRouteMatrix200Response,\n RouteRequestRouteMatrix202Response,\n RouteGetRouteMatrix200Response,\n RouteGetRouteMatrix202Response,\n RouteRequestRouteMatrixSync200Response,\n RouteRequestRouteMatrixSync408Response,\n RouteRequestRouteMatrixSyncDefaultResponse,\n RouteGetRouteDirections200Response,\n RouteGetRouteDirectionsDefaultResponse,\n RouteGetRouteDirectionsWithAdditionalParameters200Response,\n RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse,\n RouteGetRouteRange200Response,\n RouteGetRouteRangeDefaultResponse,\n RouteRequestRouteDirectionsBatch200Response,\n RouteRequestRouteDirectionsBatch202Response,\n RouteGetRouteDirectionsBatch200Response,\n RouteGetRouteDirectionsBatch202Response,\n RouteRequestRouteDirectionsBatchSync200Response,\n RouteRequestRouteDirectionsBatchSync408Response,\n RouteRequestRouteDirectionsBatchSyncDefaultResponse,\n} from \"./responses.js\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface RequestRouteMatrix {\n /**\n *\n * The `Post Route Matrix` API is an HTTP `POST` request that allows calculation of a matrix of route summaries for a set of routes defined by origin and destination locations by using an asynchronous (async) request. To make a synchronous (sync) request, see [Post Route Matrix Sync](/rest/api/maps/route/post-route-matrix-sync). For every given origin, the service calculates the cost of routing from that origin to every given destination. The set of origins and the set of destinations can be thought of as the column and row headers of a table and each cell in the table contains the costs of routing from the origin to the destination for that cell. As an example, let's say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from the restaurant. To solve this use case, they can call Matrix Route API.\n *\n *\n * For each route, the travel times and distances are returned. You can use the computed costs to determine which detailed routes to calculate using the Route Directions API.\n *\n *\n * The maximum size of a matrix for async request is **700** and for sync request it's **100** (the number of origins multiplied by the number of destinations).\n *\n * > [!NOTE]\n * > All origins and destinations should be contained in an axis-aligned 400 km x 400 km bounding box. Otherwise some matrix cells will be resolved as OUT_OF_REGION.\n *\n *\n *\n * ### Submit Synchronous Route Matrix Request\n * If your scenario requires synchronous requests and the maximum size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).\n *\n * ```\n * POST https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key}\n * ```\n *\n * ### Submit Asynchronous Route Matrix Request\n * The Asynchronous API is appropriate for processing big volumes of relatively complex routing requests. When you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available. If `waitForResults` parameter in the request is set to true, user will get a 200 response if the request is finished under 120 seconds.\n *\n *\n * The maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25. 10x70 (it does not need to be square).\n *\n *\n * The asynchronous responses are stored for **24** hours. The redirect URL returns a 404 response if used after the expiration period.\n *\n *\n *\n *\n * ```\n * POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}\n * ```\n *\n * Here's a typical sequence of asynchronous operations:\n * 1. Client sends a Route Matrix POST request to Azure Maps\n *\n * 2. The server will respond with one of the following:\n *\n * > HTTP `202 Accepted` - Route Matrix request has been accepted.\n *\n * > HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad Request or any other Error status code.\n *\n *\n * 3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL to download the results of the request. This status URI looks like the following:\n *\n * ```\n * GET https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key}\n * ```\n *\n *\n * 4. Client issues a GET request on the download URL obtained in Step 3 to download the results\n *\n * ### Download Sync Results\n * When you make a POST request for Route Matrix Sync API, the service returns 200 response code for successful request and a response array. The response body will contain the data and there will be no possibility to retrieve the results later.\n *\n * ### Download Async Results\n * When a request issues a `202 Accepted` response, the request is being processed using our async pipeline. You will be given a URL to check the progress of your async request in the location header of the response. This status URI looks like the following:\n * ```\n * GET https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key}\n * ```\n *\n * The URL provided by the location header will return the following responses when a `GET` request is issued.\n *\n * > HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some time.\n *\n * > HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.\n */\n post(\n options: RouteRequestRouteMatrixParameters,\n ): StreamableMethod<\n RouteRequestRouteMatrix200Response | RouteRequestRouteMatrix202Response\n >;\n /**\n *\n * The `Get Route Matrix` API is an HTTP `GET` request that computes the travel time and distance for all possible pairs in a list of origins and destinations. Unlike the [Get Route Directions](/rest/api/maps/route/get-route-directions) API, which provide detailed route instructions, this API focuses on efficiency by giving you the cost (travel time and distance) of routing from each origin to every destination. For more information, see [Best practices for Azure Maps Route service](/azure/azure-maps/how-to-use-best-practices-for-routing).\n *\n * For every given origin, the service calculates the cost of routing from that origin to every given destination. The set of origins and the set of destinations can be thought of as the column and row headers of a table and each cell in the table contains the costs of routing from the origin to the destination for that cell. As an example, let's say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from the restaurant. To solve this use case, they can call Matrix Route API.\n *\n *\n * For each route, the travel times and distances are returned. You can use the computed costs to determine which detailed routes to calculate using the Route Directions API.\n *\n *\n * The maximum size of a matrix for async request is **700** and for sync request it's **100** (the number of origins multiplied by the number of destinations).\n *\n *\n *\n * ### Submit Synchronous Route Matrix Request\n * If your scenario requires synchronous requests and the maximum size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).\n *\n * ```\n * GET https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key}\n * ```\n *\n * ### Submit Asynchronous Route Matrix Request\n * The Asynchronous API is appropriate for processing big volumes of relatively complex routing requests. When you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available. If `waitForResults` parameter in the request is set to true, user will get a 200 response if the request is finished under 120 seconds.\n *\n *\n * The maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25. 10x70 (it does not need to be square).\n *\n *\n * The asynchronous responses are stored for **24** hours. The redirect URL returns a 404 response if used after the expiration period.\n *\n *\n *\n *\n * ```\n * GET https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}\n * ```\n *\n * Here's a typical sequence of asynchronous operations:\n * 1. Client sends a Route Matrix GET request to Azure Maps\n *\n * 2. The server will respond with one of the following:\n *\n * > HTTP `202 Accepted` - Route Matrix request has been accepted.\n *\n * > HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad Request or any other Error status code.\n *\n *\n * 3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL to download the results of the request. This status URI looks like the following:\n *\n * ```\n * GET https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key}\n * ```\n *\n *\n * 4. Client issues a GET request on the download URL obtained in Step 3 to download the results\n *\n * ### Download Sync Results\n * When you make a GET request for Route Matrix Sync API, the service returns 200 response code for successful request and a response array. The response body will contain the data and there will be no possibility to retrieve the results later.\n *\n * ### Download Async Results\n * When a request issues a `202 Accepted` response, the request is being processed using our async pipeline. You will be given a URL to check the progress of your async request in the location header of the response. This status URI looks like the following:\n * ```\n * GET https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key}\n * ```\n *\n * The URL provided by the location header will return the following responses when a `GET` request is issued.\n *\n * > HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some time.\n *\n * > HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.\n */\n get(\n options?: RouteGetRouteMatrixParameters,\n ): StreamableMethod<\n RouteGetRouteMatrix200Response | RouteGetRouteMatrix202Response\n >;\n}\n\nexport interface RequestRouteMatrixSync {\n /**\n *\n * The `Post Route Matrix Sync` API is an HTTP `POST` request that allows calculation of a matrix of route summaries for a set of routes defined by origin and destination locations by using a single synchronous (sync) request. To make an asynchronous (async) request, see [Post Route Matrix](/rest/api/maps/route/post-route-matrix). For every given origin, the service calculates the cost of routing from that origin to every given destination. The set of origins and the set of destinations can be thought of as the column and row headers of a table and each cell in the table contains the costs of routing from the origin to the destination for that cell. As an example, let's say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from the restaurant. To solve this use case, they can call Matrix Route API.\n *\n *\n * For each route, the travel times and distances are returned. You can use the computed costs to determine which detailed routes to calculate using the Route Directions API.\n *\n *\n * The maximum size of a matrix for async request is **700** and for sync request it's **100** (the number of origins multiplied by the number of destinations).\n *\n *\n *\n * ### Submit Synchronous Route Matrix Request\n * If your scenario requires synchronous requests and the maximum size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).\n *\n * ```\n * POST https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key}\n * ```\n *\n * ### Submit Asynchronous Route Matrix Request\n * The Asynchronous API is appropriate for processing big volumes of relatively complex routing requests. When you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available. If `waitForResults` parameter in the request is set to true, user will get a 200 response if the request is finished under 120 seconds.\n *\n *\n * The maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25. 10x70 (it does not need to be square).\n *\n *\n * The asynchronous responses are stored for **24** hours. The redirect URL returns a 404 response if used after the expiration period.\n *\n *\n *\n *\n * ```\n * POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}\n * ```\n *\n * Here's a typical sequence of asynchronous operations:\n * 1. Client sends a Route Matrix POST request to Azure Maps\n *\n * 2. The server will respond with one of the following:\n *\n * > HTTP `202 Accepted` - Route Matrix request has been accepted.\n *\n * > HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad Request or any other Error status code.\n *\n *\n * 3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL to download the results of the request. This status URI looks like the following:\n *\n * ```\n * GET https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key}\n * ```\n *\n *\n * 4. Client issues a GET request on the download URL obtained in Step 3 to download the results\n *\n * ### Download Sync Results\n * When you make a POST request for Route Matrix Sync API, the service returns 200 response code for successful request and a response array. The response body will contain the data and there will be no possibility to retrieve the results later.\n *\n * ### Download Async Results\n * When a request issues a `202 Accepted` response, the request is being processed using our async pipeline. You will be given a URL to check the progress of your async request in the location header of the response. This status URI looks like the following:\n * ```\n * GET https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key}\n * ```\n *\n * The URL provided by the location header will return the following responses when a `GET` request is issued.\n *\n * > HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some time.\n *\n * > HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.\n */\n post(\n options: RouteRequestRouteMatrixSyncParameters,\n ): StreamableMethod<\n | RouteRequestRouteMatrixSync200Response\n | RouteRequestRouteMatrixSync408Response\n | RouteRequestRouteMatrixSyncDefaultResponse\n >;\n}\n\nexport interface GetRouteDirections {\n /**\n *\n * The `Get Route Directions` API is an HTTP `GET` request that returns a route between an origin and a destination, passing through waypoints if specified. The route takes into account factors such as current traffic and the typical road speeds on the requested day of the week and time of day.\n *\n * Information returned includes the distance, estimated travel time, and a representation of the route geometry. Additional routing information such as optimized waypoint order or turn by turn instructions is also available, depending on the options selected.\n *\n * Routing service provides a set of parameters for a detailed description of a vehicle-specific consumption model. For more information, see [Consumption Model](/azure/azure-maps/consumption-model).\n */\n get(\n options: RouteGetRouteDirectionsParameters,\n ): StreamableMethod<\n RouteGetRouteDirections200Response | RouteGetRouteDirectionsDefaultResponse\n >;\n /**\n *\n * The `Post Route Directions` API is an HTTP `POST` request that returns a route between an origin and a destination, passing through waypoints if they are specified. The route will take into account factors such as current traffic and the typical road speeds on the requested day of the week and time of day.\n *\n * Information returned includes the distance, estimated travel time, and a representation of the route geometry. Additional routing information such as optimized waypoint order or turn by turn instructions is also available, depending on the options selected.\n *\n * Routing service provides a set of parameters for a detailed description of a vehicle-specific Consumption Model. Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for detailed explanation of the concepts and parameters involved.\n */\n post(\n options: RouteGetRouteDirectionsWithAdditionalParametersParameters,\n ): StreamableMethod<\n | RouteGetRouteDirectionsWithAdditionalParameters200Response\n | RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse\n >;\n}\n\nexport interface GetRouteRange {\n /**\n *\n * The `Get Route Range` (Isochrone) API is an HTTP `GET` request that will calculate a set of locations that can be reached from the origin point based on fuel, energy, time or distance budget that is specified. A polygon boundary (or Isochrone) is returned in a counterclockwise orientation as well as the precise polygon center which was the result of the origin point.\n *\n * The returned polygon can be used for further processing such as [Search Inside Geometry](/rest/api/maps/search/post-search-inside-geometry) to search for POIs within the provided isochrone.\n */\n get(\n options: RouteGetRouteRangeParameters,\n ): StreamableMethod<\n RouteGetRouteRange200Response | RouteGetRouteRangeDefaultResponse\n >;\n}\n\nexport interface RequestRouteDirectionsBatch {\n /**\n *\n * The `Post Route Directions Batch` API is an HTTP `POST` request that sends batches of queries to the [Get Route Directions](/rest/api/maps/route/get-route-directions) API using a single asynchronous request. You can call `Route Directions Batch` API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **700** queries and sync API up to **100** queries. To call the `Post Route Directions Batch` API in a synchronous request, see [Post Route Directions Batch Sync](/rest/api/maps/route/post-route-directions-batch-sync).\n *\n * ### Submit Asynchronous Batch Request\n * The Asynchronous API is appropriate for processing big volumes of relatively complex route requests\n * - It allows the retrieval of results in a separate call (multiple downloads are possible).\n * - The asynchronous API is optimized for reliability and is not expected to run into a timeout.\n * - The number of batch items is limited to **700** for this API.\n *\n * When you make a request by using async request, by default the service returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be checked periodically until the response data or error information is available.\n * The asynchronous responses are stored for **24** hours. The redirect URL returns a 404 response if used after the expiration period.\n *\n * Please note that asynchronous batch request is a long-running operation. Here's a typical sequence of operations:\n * 1. Client sends a Route Directions Batch `POST` request to Azure Maps.\n * ```\n * POST https://atlas.microsoft.com/route/directions/batch/json?api-version=1.0&subscription-key={subscription-key}\n * ```\n * 2. The server will respond with one of the following:\n *\n * > HTTP `202 Accepted` - Batch request has been accepted.\n *\n * > HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request` or any other `Error` status code.\n *\n * 3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to download the results of the batch request.\n * This status URI looks like following:\n * ```\n * GET https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n * ```\n * 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.\n *\n * ### POST Body for Batch Request\n * To send the _route directions_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 3 _route directions_ queries:\n *\n *\n * ```json\n * {\n * \"batchItems\": [\n * { \"query\": \"?query=47.620659,-122.348934:47.610101,-122.342015&travelMode=bicycle&routeType=eco&traffic=false\" },\n * { \"query\": \"?query=40.759856,-73.985108:40.771136,-73.973506&travelMode=pedestrian&routeType=shortest\" },\n * { \"query\": \"?query=48.923159,-122.557362:32.621279,-116.840362\" }\n * ]\n * }\n * ```\n *\n * A _route directions_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version and subscription-key. It can accept any of the supported _route directions_ [URI parameters](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#uri-parameters). The string values in the _route directions_ query must be properly escaped (e.g. \" character should be escaped with \\\\ ) and it should also be properly URL-encoded.\n *\n *\n * The async API allows caller to batch up to **700** queries and sync API up to **100** queries, and the batch should contain at least **1** query.\n *\n *\n * ### Download Asynchronous Batch Results\n * To download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n *\n * ```\n * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n * ```\n * Here's the typical sequence of operations for downloading the batch results:\n * 1. Client sends a `GET` request using the _download URL_.\n * 2. The server will respond with one of the following:\n *\n * > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n *\n * > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n *\n *\n *\n * ### Batch Response Model\n * The returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n *\n * - [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If the query completed successfully.\n *\n * - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n *\n *\n * Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:\n *\n *\n * ```json\n * {\n * \"summary\": {\n * \"successfulRequests\": 1,\n * \"totalRequests\": 2\n * },\n * \"batchItems\": [\n * {\n * \"statusCode\": 200,\n * \"response\": {\n * \"routes\": [\n * {\n * \"summary\": {\n * \"lengthInMeters\": 1758,\n * \"travelTimeInSeconds\": 387,\n * \"trafficDelayInSeconds\": 0,\n * \"departureTime\": \"2018-07-17T00:49:56+00:00\",\n * \"arrivalTime\": \"2018-07-17T00:56:22+00:00\"\n * },\n * \"legs\": [\n * {\n * \"summary\": {\n * \"lengthInMeters\": 1758,\n * \"travelTimeInSeconds\": 387,\n * \"trafficDelayInSeconds\": 0,\n * \"departureTime\": \"2018-07-17T00:49:56+00:00\",\n * \"arrivalTime\": \"2018-07-17T00:56:22+00:00\"\n * },\n * \"points\": [\n * {\n * \"latitude\": 47.62094,\n * \"longitude\": -122.34892\n * },\n * {\n * \"latitude\": 47.62094,\n * \"longitude\": -122.3485\n * },\n * {\n * \"latitude\": 47.62095,\n * \"longitude\": -122.3476\n * }\n * ]\n * }\n * ],\n * \"sections\": [\n * {\n * \"startPointIndex\": 0,\n * \"endPointIndex\": 40,\n * \"sectionType\": \"TRAVEL_MODE\",\n * \"travelMode\": \"bicycle\"\n * }\n * ]\n * }\n * ]\n * }\n * },\n * {\n * \"statusCode\": 400,\n * \"response\":\n * {\n * \"error\":\n * {\n * \"code\": \"400 BadRequest\",\n * \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n * }\n * }\n * }\n * ]\n * }\n * ```\n */\n post(\n options: RouteRequestRouteDirectionsBatchParameters,\n ): StreamableMethod<\n | RouteRequestRouteDirectionsBatch200Response\n | RouteRequestRouteDirectionsBatch202Response\n >;\n /**\n *\n * The `Get Route Directions Batch` API is an HTTP `GET` request that sends batches of queries to the [Get Route Directions](/rest/api/maps/route/get-route-directions) API using a single request. You can call `Get Route Directions Batch` API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **700** queries and sync API up to **100** queries.\n *\n * ### Download Asynchronous Batch Results\n * To download the async batch results you will issue a `GET` request to the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful `POST` batch request and looks like the following:\n *\n * ```\n * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}\n * ```\n * Here's the typical sequence of operations for downloading the batch results:\n * 1. Client sends a `GET` request using the _download URL_.\n * 2. The server will respond with one of the following:\n *\n * > HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some time.\n *\n * > HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.\n *\n *\n *\n * ### Batch Response Model\n * The returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n *\n * - [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If the query completed successfully.\n *\n * - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n *\n *\n * Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:\n *\n *\n * ```json\n * {\n * \"summary\": {\n * \"successfulRequests\": 1,\n * \"totalRequests\": 2\n * },\n * \"batchItems\": [\n * {\n * \"statusCode\": 200,\n * \"response\": {\n * \"routes\": [\n * {\n * \"summary\": {\n * \"lengthInMeters\": 1758,\n * \"travelTimeInSeconds\": 387,\n * \"trafficDelayInSeconds\": 0,\n * \"departureTime\": \"2018-07-17T00:49:56+00:00\",\n * \"arrivalTime\": \"2018-07-17T00:56:22+00:00\"\n * },\n * \"legs\": [\n * {\n * \"summary\": {\n * \"lengthInMeters\": 1758,\n * \"travelTimeInSeconds\": 387,\n * \"trafficDelayInSeconds\": 0,\n * \"departureTime\": \"2018-07-17T00:49:56+00:00\",\n * \"arrivalTime\": \"2018-07-17T00:56:22+00:00\"\n * },\n * \"points\": [\n * {\n * \"latitude\": 47.62094,\n * \"longitude\": -122.34892\n * },\n * {\n * \"latitude\": 47.62094,\n * \"longitude\": -122.3485\n * },\n * {\n * \"latitude\": 47.62095,\n * \"longitude\": -122.3476\n * }\n * ]\n * }\n * ],\n * \"sections\": [\n * {\n * \"startPointIndex\": 0,\n * \"endPointIndex\": 40,\n * \"sectionType\": \"TRAVEL_MODE\",\n * \"travelMode\": \"bicycle\"\n * }\n * ]\n * }\n * ]\n * }\n * },\n * {\n * \"statusCode\": 400,\n * \"response\":\n * {\n * \"error\":\n * {\n * \"code\": \"400 BadRequest\",\n * \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n * }\n * }\n * }\n * ]\n * }\n * ```\n */\n get(\n options?: RouteGetRouteDirectionsBatchParameters,\n ): StreamableMethod<\n | RouteGetRouteDirectionsBatch200Response\n | RouteGetRouteDirectionsBatch202Response\n >;\n}\n\nexport interface RequestRouteDirectionsBatchSync {\n /**\n *\n * The `Post Route Directions Batch Sync` API is an HTTP `POST` request that sends batches of queries to the [Get Route Directions](/rest/api/maps/route/get-route-directions) API using a single synchronous request. You can call `Route Directions Batch` API to run either asynchronously (async) or synchronously (sync). The async API allows caller to batch up to **700** queries and sync API up to **100** queries. To call the `Post Route Directions Batch` API in a asynchronous request, see [Post Route Directions Batch](/rest/api/maps/route/post-route-directions-batch).\n * ### Submit Synchronous Batch Request\n * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n * ```\n * POST https://atlas.microsoft.com/route/directions/batch/sync/json?api-version=1.0&subscription-key={subscription-key}\n * ```\n * ### Batch Response Model\n * The returned data content is similar for async and sync requests. When downloading the results of an async batch request, if the batch has finished processing, the response body contains the batch response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in `batchItems` is of one of the following types:\n *\n * - [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If the query completed successfully.\n *\n * - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n *\n *\n * Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:\n *\n *\n * ```json\n * {\n * \"summary\": {\n * \"successfulRequests\": 1,\n * \"totalRequests\": 2\n * },\n * \"batchItems\": [\n * {\n * \"statusCode\": 200,\n * \"response\": {\n * \"routes\": [\n * {\n * \"summary\": {\n * \"lengthInMeters\": 1758,\n * \"travelTimeInSeconds\": 387,\n * \"trafficDelayInSeconds\": 0,\n * \"departureTime\": \"2018-07-17T00:49:56+00:00\",\n * \"arrivalTime\": \"2018-07-17T00:56:22+00:00\"\n * },\n * \"legs\": [\n * {\n * \"summary\": {\n * \"lengthInMeters\": 1758,\n * \"travelTimeInSeconds\": 387,\n * \"trafficDelayInSeconds\": 0,\n * \"departureTime\": \"2018-07-17T00:49:56+00:00\",\n * \"arrivalTime\": \"2018-07-17T00:56:22+00:00\"\n * },\n * \"points\": [\n * {\n * \"latitude\": 47.62094,\n * \"longitude\": -122.34892\n * },\n * {\n * \"latitude\": 47.62094,\n * \"longitude\": -122.3485\n * },\n * {\n * \"latitude\": 47.62095,\n * \"longitude\": -122.3476\n * }\n * ]\n * }\n * ],\n * \"sections\": [\n * {\n * \"startPointIndex\": 0,\n * \"endPointIndex\": 40,\n * \"sectionType\": \"TRAVEL_MODE\",\n * \"travelMode\": \"bicycle\"\n * }\n * ]\n * }\n * ]\n * }\n * },\n * {\n * \"statusCode\": 400,\n * \"response\":\n * {\n * \"error\":\n * {\n * \"code\": \"400 BadRequest\",\n * \"message\": \"Bad request: one or more parameters were incorrectly specified or are mutually exclusive.\"\n * }\n * }\n * }\n * ]\n * }\n * ```\n */\n post(\n options: RouteRequestRouteDirectionsBatchSyncParameters,\n ): StreamableMethod<\n | RouteRequestRouteDirectionsBatchSync200Response\n | RouteRequestRouteDirectionsBatchSync408Response\n | RouteRequestRouteDirectionsBatchSyncDefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/route/matrix/\\{format\\}' has methods for the following verbs: post, get */\n (path: \"/route/matrix/{format}\", format: \"json\"): RequestRouteMatrix;\n /** Resource for '/route/matrix/sync/\\{format\\}' has methods for the following verbs: post */\n (path: \"/route/matrix/sync/{format}\", format: \"json\"): RequestRouteMatrixSync;\n /** Resource for '/route/directions/\\{format\\}' has methods for the following verbs: get, post */\n (\n path: \"/route/directions/{format}\",\n format: \"json\" | \"xml\",\n ): GetRouteDirections;\n /** Resource for '/route/range/\\{format\\}' has methods for the following verbs: get */\n (path: \"/route/range/{format}\", format: \"json\" | \"xml\"): GetRouteRange;\n /** Resource for '/route/directions/batch/\\{format\\}' has methods for the following verbs: post, get */\n (\n path: \"/route/directions/batch/{format}\",\n format: \"json\",\n ): RequestRouteDirectionsBatch;\n /** Resource for '/route/directions/batch/sync/\\{format\\}' has methods for the following verbs: post */\n (\n path: \"/route/directions/batch/sync/{format}\",\n format: \"json\",\n ): RequestRouteDirectionsBatchSync;\n}\n\nexport type MapsRouteClient = Client & {\n path: Routes;\n};\n"]}
@@ -0,0 +1,12 @@
1
+ import MapsRouteClient from "./mapsRouteClient.js";
2
+ export * from "./mapsRouteClient.js";
3
+ export * from "./parameters.js";
4
+ export * from "./responses.js";
5
+ export * from "./clientDefinitions.js";
6
+ export * from "./isUnexpected.js";
7
+ export * from "./models.js";
8
+ export * from "./outputModels.js";
9
+ export * from "./pollingHelper.js";
10
+ export * from "./serializeHelper.js";
11
+ export default MapsRouteClient;
12
+ //# 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,eAAe,MAAM,sBAAsB,CAAC;AAEnD,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AAErC,eAAe,eAAe,CAAC"}
@@ -0,0 +1,17 @@
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 mapsRouteClient_js_1 = tslib_1.__importDefault(require("./mapsRouteClient.js"));
7
+ tslib_1.__exportStar(require("./mapsRouteClient.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("./models.js"), exports);
13
+ tslib_1.__exportStar(require("./outputModels.js"), exports);
14
+ tslib_1.__exportStar(require("./pollingHelper.js"), exports);
15
+ tslib_1.__exportStar(require("./serializeHelper.js"), exports);
16
+ exports.default = mapsRouteClient_js_1.default;
17
+ //# 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,sFAAmD;AAEnD,+DAAqC;AACrC,0DAAgC;AAChC,yDAA+B;AAC/B,iEAAuC;AACvC,4DAAkC;AAClC,sDAA4B;AAC5B,4DAAkC;AAClC,6DAAmC;AACnC,+DAAqC;AAErC,kBAAe,4BAAe,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport MapsRouteClient from \"./mapsRouteClient.js\";\n\nexport * from \"./mapsRouteClient.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./models.js\";\nexport * from \"./outputModels.js\";\nexport * from \"./pollingHelper.js\";\nexport * from \"./serializeHelper.js\";\n\nexport default MapsRouteClient;\n"]}
@@ -0,0 +1,7 @@
1
+ import { RouteRequestRouteMatrixSync200Response, RouteRequestRouteMatrixSync408Response, RouteRequestRouteMatrixSyncDefaultResponse, RouteGetRouteDirections200Response, RouteGetRouteDirectionsDefaultResponse, RouteGetRouteDirectionsWithAdditionalParameters200Response, RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse, RouteGetRouteRange200Response, RouteGetRouteRangeDefaultResponse, RouteRequestRouteDirectionsBatchSync200Response, RouteRequestRouteDirectionsBatchSync408Response, RouteRequestRouteDirectionsBatchSyncDefaultResponse } from "./responses.js";
2
+ export declare function isUnexpected(response: RouteRequestRouteMatrixSync200Response | RouteRequestRouteMatrixSync408Response | RouteRequestRouteMatrixSyncDefaultResponse): response is RouteRequestRouteMatrixSync408Response;
3
+ export declare function isUnexpected(response: RouteGetRouteDirections200Response | RouteGetRouteDirectionsDefaultResponse): response is RouteGetRouteDirectionsDefaultResponse;
4
+ export declare function isUnexpected(response: RouteGetRouteDirectionsWithAdditionalParameters200Response | RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse): response is RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse;
5
+ export declare function isUnexpected(response: RouteGetRouteRange200Response | RouteGetRouteRangeDefaultResponse): response is RouteGetRouteRangeDefaultResponse;
6
+ export declare function isUnexpected(response: RouteRequestRouteDirectionsBatchSync200Response | RouteRequestRouteDirectionsBatchSync408Response | RouteRequestRouteDirectionsBatchSyncDefaultResponse): response is RouteRequestRouteDirectionsBatchSync408Response;
7
+ //# 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,sCAAsC,EACtC,sCAAsC,EACtC,0CAA0C,EAC1C,kCAAkC,EAClC,sCAAsC,EACtC,0DAA0D,EAC1D,8DAA8D,EAC9D,6BAA6B,EAC7B,iCAAiC,EACjC,+CAA+C,EAC/C,+CAA+C,EAC/C,mDAAmD,EACpD,MAAM,gBAAgB,CAAC;AAcxB,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,sCAAsC,GACtC,sCAAsC,GACtC,0CAA0C,GAC7C,QAAQ,IAAI,sCAAsC,CAAC;AACtD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,kCAAkC,GAClC,sCAAsC,GACzC,QAAQ,IAAI,sCAAsC,CAAC;AACtD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,0DAA0D,GAC1D,8DAA8D,GACjE,QAAQ,IAAI,8DAA8D,CAAC;AAC9E,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,6BAA6B,GAAG,iCAAiC,GAC1E,QAAQ,IAAI,iCAAiC,CAAC;AACjD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,+CAA+C,GAC/C,+CAA+C,GAC/C,mDAAmD,GACtD,QAAQ,IAAI,+CAA+C,CAAC"}
@@ -0,0 +1,82 @@
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 /route/matrix/{format}": ["200", "202"],
8
+ "POST /route/matrix/{format}": ["200", "202"],
9
+ "POST /route/matrix/sync/{format}": ["200"],
10
+ "GET /route/directions/{format}": ["200"],
11
+ "POST /route/directions/{format}": ["200"],
12
+ "GET /route/range/{format}": ["200"],
13
+ "GET /route/directions/batch/{format}": ["200", "202"],
14
+ "POST /route/directions/batch/{format}": ["200", "202"],
15
+ "POST /route/directions/batch/sync/{format}": ["200"],
16
+ };
17
+ function isUnexpected(response) {
18
+ const lroOriginal = response.headers["x-ms-original-url"];
19
+ const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
20
+ const method = response.request.method;
21
+ let pathDetails = responseMap[`${method} ${url.pathname}`];
22
+ if (!pathDetails) {
23
+ pathDetails = getParametrizedPathSuccess(method, url.pathname);
24
+ }
25
+ return !pathDetails.includes(response.status);
26
+ }
27
+ function getParametrizedPathSuccess(method, path) {
28
+ var _a, _b, _c, _d;
29
+ const pathParts = path.split("/");
30
+ // Traverse list to match the longest candidate
31
+ // matchedLen: the length of candidate path
32
+ // matchedValue: the matched status code array
33
+ let matchedLen = -1, matchedValue = [];
34
+ // Iterate the responseMap to find a match
35
+ for (const [key, value] of Object.entries(responseMap)) {
36
+ // Extracting the path from the map key which is in format
37
+ // GET /path/foo
38
+ if (!key.startsWith(method)) {
39
+ continue;
40
+ }
41
+ const candidatePath = getPathFromMapKey(key);
42
+ // Get each part of the url path
43
+ const candidateParts = candidatePath.split("/");
44
+ // track if we have found a match to return the values found.
45
+ let found = true;
46
+ for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
47
+ if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) &&
48
+ ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
49
+ const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
50
+ // If the current part of the candidate is a "template" part
51
+ // Try to use the suffix of pattern to match the path
52
+ // {guid} ==> $
53
+ // {guid}:export ==> :export$
54
+ const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
55
+ if (!isMatched) {
56
+ found = false;
57
+ break;
58
+ }
59
+ continue;
60
+ }
61
+ // If the candidate part is not a template and
62
+ // the parts don't match mark the candidate as not found
63
+ // to move on with the next candidate path.
64
+ if (candidateParts[i] !== pathParts[j]) {
65
+ found = false;
66
+ break;
67
+ }
68
+ }
69
+ // We finished evaluating the current candidate parts
70
+ // Update the matched value if and only if we found the longer pattern
71
+ if (found && candidatePath.length > matchedLen) {
72
+ matchedLen = candidatePath.length;
73
+ matchedValue = value;
74
+ }
75
+ }
76
+ return matchedValue;
77
+ }
78
+ function getPathFromMapKey(mapKey) {
79
+ const pathStart = mapKey.indexOf("/");
80
+ return mapKey.slice(pathStart);
81
+ }
82
+ //# sourceMappingURL=isUnexpected.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../../src/generated/isUnexpected.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n RouteRequestRouteMatrixSync200Response,\n RouteRequestRouteMatrixSync408Response,\n RouteRequestRouteMatrixSyncDefaultResponse,\n RouteGetRouteDirections200Response,\n RouteGetRouteDirectionsDefaultResponse,\n RouteGetRouteDirectionsWithAdditionalParameters200Response,\n RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse,\n RouteGetRouteRange200Response,\n RouteGetRouteRangeDefaultResponse,\n RouteRequestRouteDirectionsBatchSync200Response,\n RouteRequestRouteDirectionsBatchSync408Response,\n RouteRequestRouteDirectionsBatchSyncDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /route/matrix/{format}\": [\"200\", \"202\"],\n \"POST /route/matrix/{format}\": [\"200\", \"202\"],\n \"POST /route/matrix/sync/{format}\": [\"200\"],\n \"GET /route/directions/{format}\": [\"200\"],\n \"POST /route/directions/{format}\": [\"200\"],\n \"GET /route/range/{format}\": [\"200\"],\n \"GET /route/directions/batch/{format}\": [\"200\", \"202\"],\n \"POST /route/directions/batch/{format}\": [\"200\", \"202\"],\n \"POST /route/directions/batch/sync/{format}\": [\"200\"],\n};\n\nexport function isUnexpected(\n response:\n | RouteRequestRouteMatrixSync200Response\n | RouteRequestRouteMatrixSync408Response\n | RouteRequestRouteMatrixSyncDefaultResponse,\n): response is RouteRequestRouteMatrixSync408Response;\nexport function isUnexpected(\n response:\n | RouteGetRouteDirections200Response\n | RouteGetRouteDirectionsDefaultResponse,\n): response is RouteGetRouteDirectionsDefaultResponse;\nexport function isUnexpected(\n response:\n | RouteGetRouteDirectionsWithAdditionalParameters200Response\n | RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse,\n): response is RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse;\nexport function isUnexpected(\n response: RouteGetRouteRange200Response | RouteGetRouteRangeDefaultResponse,\n): response is RouteGetRouteRangeDefaultResponse;\nexport function isUnexpected(\n response:\n | RouteRequestRouteDirectionsBatchSync200Response\n | RouteRequestRouteDirectionsBatchSync408Response\n | RouteRequestRouteDirectionsBatchSyncDefaultResponse,\n): response is RouteRequestRouteDirectionsBatchSync408Response;\nexport function isUnexpected(\n response:\n | RouteRequestRouteMatrixSync200Response\n | RouteRequestRouteMatrixSync408Response\n | RouteRequestRouteMatrixSyncDefaultResponse\n | RouteGetRouteDirections200Response\n | RouteGetRouteDirectionsDefaultResponse\n | RouteGetRouteDirectionsWithAdditionalParameters200Response\n | RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse\n | RouteGetRouteRange200Response\n | RouteGetRouteRangeDefaultResponse\n | RouteRequestRouteDirectionsBatchSync200Response\n | RouteRequestRouteDirectionsBatchSync408Response\n | RouteRequestRouteDirectionsBatchSyncDefaultResponse,\n): response is\n | RouteRequestRouteMatrixSync408Response\n | RouteRequestRouteMatrixSyncDefaultResponse\n | RouteGetRouteDirectionsDefaultResponse\n | RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse\n | RouteGetRouteRangeDefaultResponse\n | RouteRequestRouteDirectionsBatchSync408Response\n | RouteRequestRouteDirectionsBatchSyncDefaultResponse {\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,qCAAmC,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-route");
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,YAAY,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"maps-route\");\n"]}
@@ -0,0 +1,15 @@
1
+ import { ClientOptions } from "@azure-rest/core-client";
2
+ import { KeyCredential } from "@azure/core-auth";
3
+ import { MapsRouteClient } from "./clientDefinitions.js";
4
+ /** The optional parameters for the client */
5
+ export interface MapsRouteClientOptions extends ClientOptions {
6
+ /** The api version option of the client */
7
+ apiVersion?: string;
8
+ }
9
+ /**
10
+ * Initialize a new instance of `MapsRouteClient`
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 }?: MapsRouteClientOptions): MapsRouteClient;
15
+ //# sourceMappingURL=mapsRouteClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapsRouteClient.d.ts","sourceRoot":"","sources":["../../../src/generated/mapsRouteClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,6CAA6C;AAC7C,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IAC3D,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,sBAA2B,GAC9D,eAAe,CA6CjB"}
@@ -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 `MapsRouteClient`
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-route-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=mapsRouteClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapsRouteClient.js","sourceRoot":"","sources":["../../../src/generated/mapsRouteClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAkBlC,+BAgDC;;AAhED,yDAAmE;AACnE,2CAAqC;AAUrC;;;;GAIG;AACH,SAAwB,YAAY,CAClC,WAA0B,EAC1B,KAA6D,EAAE;;QAA/D,EAAE,UAAU,GAAG,KAAK,OAA2C,EAAtC,OAAO,sBAAhC,cAAkC,CAAF;IAEhC,MAAM,WAAW,GACf,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,6BAA6B,CAAC;IACvE,MAAM,aAAa,GAAG,uCAAuC,CAAC;IAC9D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,kBAAM,CAAC,IAAI;SACtD,EACD,WAAW,EAAE;YACX,gBAAgB,EACd,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,gBAAgB,mCAAI,kBAAkB;SAC9D,GACF,CAAC;IACF,MAAM,MAAM,GAAG,IAAA,uBAAS,EACtB,WAAW,EACX,WAAW,EACX,OAAO,CACW,CAAC;IAErB,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QACxB,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,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 { MapsRouteClient } from \"./clientDefinitions.js\";\n\n/** The optional parameters for the client */\nexport interface MapsRouteClientOptions extends ClientOptions {\n /** The api version option of the client */\n apiVersion?: string;\n}\n\n/**\n * Initialize a new instance of `MapsRouteClient`\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 }: MapsRouteClientOptions = {},\n): MapsRouteClient {\n const endpointUrl =\n options.endpoint ?? options.baseUrl ?? `https://atlas.microsoft.com`;\n const userAgentInfo = `azsdk-js-maps-route-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 MapsRouteClient;\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,130 @@
1
+ /** An object with a matrix of coordinates. */
2
+ export interface RouteMatrixQuery {
3
+ /** A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details. */
4
+ origins: GeoJsonMultiPoint;
5
+ /** A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details. */
6
+ destinations: GeoJsonMultiPoint;
7
+ }
8
+ /** A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details. */
9
+ export interface GeoJsonMultiPoint extends GeoJsonGeometryParent, GeoJsonMultiPointData {
10
+ type: "MultiPoint";
11
+ }
12
+ /** A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details. */
13
+ export interface GeoJsonGeometryParent extends GeoJsonObjectParent {
14
+ type: "GeoJsonGeometry" | "MultiPoint" | "MultiPolygon" | "Point" | "LineString" | "MultiLineString" | "Polygon" | "GeometryCollection";
15
+ }
16
+ /** A valid `GeoJSON` object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3) for details. */
17
+ export interface GeoJsonObjectParent {
18
+ type: "GeoJsonObject" | "GeoJsonGeometry" | "MultiPoint" | "MultiPolygon" | "Point" | "LineString" | "MultiLineString" | "Polygon" | "GeometryCollection" | "Feature" | "FeatureCollection";
19
+ }
20
+ /** Data contained by a `GeoJson MultiPoint`. */
21
+ export interface GeoJsonMultiPointData {
22
+ /** Coordinates for the `GeoJson MultiPoint` geometry. */
23
+ coordinates: Array<Array<number>>;
24
+ }
25
+ /** Post body parameters for Route directions. */
26
+ export interface RouteDirectionParameters {
27
+ /**
28
+ * A GeoJSON Geometry collection representing sequence of coordinates used as input for route reconstruction and for calculating zero or more alternative routes to this reference route.
29
+ * - The provided sequence of supporting points is used as input for route reconstruction.
30
+ * - The alternative routes are calculated between the origin and destination points specified in the base path parameter locations.
31
+ * - If both _minDeviationDistance_ and _minDeviationTime_ are set to zero, then these origin and destination points are
32
+ * expected to be at (or very near) the beginning and end of the reference route, respectively.
33
+ * - Intermediate locations (_waypoints_) are not supported when using <_supportingPoints_>.
34
+ * - The reference route may contain traffic incidents of type _ROAD_CLOSURE_, which are
35
+ * ignored for the calculation of the reference route's travel time and traffic delay.
36
+ */
37
+ supportingPoints?: Record<string, unknown>;
38
+ /** This is a list of 3-character, ISO 3166-1, alpha-3 country codes of countries/regions in which all toll roads with vignettes are to be avoided, e.g. "AUS,CHE". Toll roads with vignettes in countries/regions not in the list are unaffected. Note: It is an error to specify both **avoidVignette** and **allowVignette**. */
39
+ avoidVignette?: Array<string>;
40
+ /** This is a list of 3-character, ISO 3166-1, alpha-3 country codes of countries/regions in which toll roads with vignettes are allowed, e.g. "AUS,CHE". Specifying **allowVignette** with some countries/regions X is equivalent to specifying **avoidVignette** with all countries/regions but X. Specifying **allowVignette** with an empty list is the same as avoiding all toll roads with vignettes. Note: It is an error to specify both **avoidVignette** and **allowVignette**. */
41
+ allowVignette?: Array<string>;
42
+ /** A GeoJSON MultiPolygon representing list of areas to avoid. Only rectangle polygons are supported. The maximum size of a rectangle is about 160x160 km. Maximum number of avoided areas is **10**. It cannot cross the 180th meridian. It must be between -80 and +80 degrees of latitude. */
43
+ avoidAreas?: GeoJsonMultiPolygon;
44
+ }
45
+ /** A valid `GeoJSON MultiPolygon` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.7) for details. */
46
+ export interface GeoJsonMultiPolygon extends GeoJsonGeometryParent, GeoJsonMultiPolygonData {
47
+ type: "MultiPolygon";
48
+ }
49
+ export interface GeoJsonMultiPolygonData {
50
+ /** Contains a list of valid `GeoJSON Polygon` objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude). */
51
+ coordinates: Array<Array<Array<Array<number>>>>;
52
+ }
53
+ /** This type represents the request body for the Batch service. */
54
+ export interface BatchRequest {
55
+ /** The list of queries to process. */
56
+ batchItems?: Array<BatchRequestItem>;
57
+ }
58
+ /** Batch request object */
59
+ export interface BatchRequestItem {
60
+ /** This parameter contains a query string used to perform an unstructured geocoding operation. The query string will be passed verbatim to the search API for processing. */
61
+ query?: string;
62
+ }
63
+ /** A valid `GeoJSON Point` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.2) for details. */
64
+ export interface GeoJsonPoint extends GeoJsonGeometryParent, GeoJsonPointData {
65
+ type: "Point";
66
+ }
67
+ /** Data contained by a `GeoJson Point`. */
68
+ export interface GeoJsonPointData {
69
+ /** A `Position` is an array of numbers with two or more elements. The first two elements are _longitude_ and _latitude_, precisely in that order. _Altitude/Elevation_ is an optional third element. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.1) for details. */
70
+ coordinates: Array<number>;
71
+ }
72
+ /** A valid `GeoJSON LineString` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.4) for details. */
73
+ export interface GeoJsonLineString extends GeoJsonGeometryParent, GeoJsonLineStringData {
74
+ type: "LineString";
75
+ }
76
+ export interface GeoJsonLineStringData {
77
+ /** Coordinates for the `GeoJson LineString` geometry. */
78
+ coordinates: Array<Array<number>>;
79
+ }
80
+ /** A valid `GeoJSON MultiLineString` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.5) for details. */
81
+ export interface GeoJsonMultiLineString extends GeoJsonGeometryParent, GeoJsonMultiLineStringData {
82
+ type: "MultiLineString";
83
+ }
84
+ export interface GeoJsonMultiLineStringData {
85
+ /** Coordinates for the `GeoJson MultiLineString` geometry. */
86
+ coordinates: Array<Array<Array<number>>>;
87
+ }
88
+ /** A valid `GeoJSON Polygon` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.6) for details. */
89
+ export interface GeoJsonPolygon extends GeoJsonGeometryParent, GeoJsonPolygonData {
90
+ type: "Polygon";
91
+ }
92
+ export interface GeoJsonPolygonData {
93
+ /** Coordinates for the `GeoJson Polygon` geometry type. */
94
+ coordinates: Array<Array<Array<number>>>;
95
+ }
96
+ /** A valid `GeoJSON GeometryCollection` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.8) for details. */
97
+ export interface GeoJsonGeometryCollection extends GeoJsonGeometryParent, GeoJsonGeometryCollectionData {
98
+ type: "GeometryCollection";
99
+ }
100
+ export interface GeoJsonGeometryCollectionData {
101
+ /** Contains a list of valid `GeoJSON` geometry objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude). */
102
+ geometries: Array<GeoJsonGeometry>;
103
+ }
104
+ /** A valid `GeoJSON Feature` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.2) for details. */
105
+ export interface GeoJsonFeature extends GeoJsonObjectParent, GeoJsonFeatureData {
106
+ type: "Feature";
107
+ }
108
+ export interface GeoJsonFeatureData {
109
+ /** A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details. */
110
+ geometry: GeoJsonGeometry;
111
+ /** Properties can contain any additional metadata about the `Feature`. Value can be any JSON object or a JSON null value */
112
+ properties?: Record<string, unknown>;
113
+ /** Identifier for the feature. */
114
+ id?: string;
115
+ /** The type of the feature. The value depends on the data model the current feature is part of. Some data models may have an empty value. */
116
+ featureType?: string;
117
+ }
118
+ /** A valid `GeoJSON FeatureCollection` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.3) for details. */
119
+ export interface GeoJsonFeatureCollection extends GeoJsonObjectParent, GeoJsonFeatureCollectionData {
120
+ type: "FeatureCollection";
121
+ }
122
+ export interface GeoJsonFeatureCollectionData {
123
+ /** Contains a list of valid `GeoJSON Feature` objects. */
124
+ features: Array<GeoJsonFeature>;
125
+ }
126
+ /** A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details. */
127
+ export type GeoJsonGeometry = GeoJsonGeometryParent | GeoJsonMultiPoint | GeoJsonMultiPolygon | GeoJsonPoint | GeoJsonLineString | GeoJsonMultiLineString | GeoJsonPolygon | GeoJsonGeometryCollection;
128
+ /** A valid `GeoJSON` object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3) for details. */
129
+ export type GeoJsonObject = GeoJsonGeometry | GeoJsonMultiPoint | GeoJsonMultiPolygon | GeoJsonPoint | GeoJsonLineString | GeoJsonMultiLineString | GeoJsonPolygon | GeoJsonGeometryCollection | GeoJsonFeature | GeoJsonFeatureCollection;
130
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/generated/models.ts"],"names":[],"mappings":"AAGA,8CAA8C;AAC9C,MAAM,WAAW,gBAAgB;IAC/B,6IAA6I;IAC7I,OAAO,EAAE,iBAAiB,CAAC;IAC3B,6IAA6I;IAC7I,YAAY,EAAE,iBAAiB,CAAC;CACjC;AAED,6IAA6I;AAC7I,MAAM,WAAW,iBACf,SAAQ,qBAAqB,EAC3B,qBAAqB;IACvB,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,iSAAiS;AACjS,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,IAAI,EACA,iBAAiB,GACjB,YAAY,GACZ,cAAc,GACd,OAAO,GACP,YAAY,GACZ,iBAAiB,GACjB,SAAS,GACT,oBAAoB,CAAC;CAC1B;AAED,uHAAuH;AACvH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EACA,eAAe,GACf,iBAAiB,GACjB,YAAY,GACZ,cAAc,GACd,OAAO,GACP,YAAY,GACZ,iBAAiB,GACjB,SAAS,GACT,oBAAoB,GACpB,SAAS,GACT,mBAAmB,CAAC;CACzB;AAED,gDAAgD;AAChD,MAAM,WAAW,qBAAqB;IACpC,yDAAyD;IACzD,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;CACnC;AAED,iDAAiD;AACjD,MAAM,WAAW,wBAAwB;IACvC;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,mUAAmU;IACnU,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,4dAA4d;IAC5d,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,iSAAiS;IACjS,UAAU,CAAC,EAAE,mBAAmB,CAAC;CAClC;AAED,6IAA6I;AAC7I,MAAM,WAAW,mBACf,SAAQ,qBAAqB,EAC3B,uBAAuB;IACzB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,wIAAwI;IACxI,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CACjD;AAED,mEAAmE;AACnE,MAAM,WAAW,YAAY;IAC3B,sCAAsC;IACtC,UAAU,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;CACtC;AAED,2BAA2B;AAC3B,MAAM,WAAW,gBAAgB;IAC/B,6KAA6K;IAC7K,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wIAAwI;AACxI,MAAM,WAAW,YAAa,SAAQ,qBAAqB,EAAE,gBAAgB;IAC3E,IAAI,EAAE,OAAO,CAAC;CACf;AAED,2CAA2C;AAC3C,MAAM,WAAW,gBAAgB;IAC/B,mSAAmS;IACnS,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,6IAA6I;AAC7I,MAAM,WAAW,iBACf,SAAQ,qBAAqB,EAC3B,qBAAqB;IACvB,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,yDAAyD;IACzD,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;CACnC;AAED,kJAAkJ;AAClJ,MAAM,WAAW,sBACf,SAAQ,qBAAqB,EAC3B,0BAA0B;IAC5B,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,MAAM,WAAW,0BAA0B;IACzC,8DAA8D;IAC9D,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAC1C;AAED,0IAA0I;AAC1I,MAAM,WAAW,cACf,SAAQ,qBAAqB,EAC3B,kBAAkB;IACpB,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAC1C;AAED,mJAAmJ;AACnJ,MAAM,WAAW,yBACf,SAAQ,qBAAqB,EAC3B,6BAA6B;IAC/B,IAAI,EAAE,oBAAoB,CAAC;CAC5B;AAED,MAAM,WAAW,6BAA6B;IAC5C,yIAAyI;IACzI,UAAU,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CACpC;AAED,sIAAsI;AACtI,MAAM,WAAW,cACf,SAAQ,mBAAmB,EACzB,kBAAkB;IACpB,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,iSAAiS;IACjS,QAAQ,EAAE,eAAe,CAAC;IAC1B,4HAA4H;IAC5H,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,kCAAkC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6IAA6I;IAC7I,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,gJAAgJ;AAChJ,MAAM,WAAW,wBACf,SAAQ,mBAAmB,EACzB,4BAA4B;IAC9B,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED,MAAM,WAAW,4BAA4B;IAC3C,0DAA0D;IAC1D,QAAQ,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,iSAAiS;AACjS,MAAM,MAAM,eAAe,GACvB,qBAAqB,GACrB,iBAAiB,GACjB,mBAAmB,GACnB,YAAY,GACZ,iBAAiB,GACjB,sBAAsB,GACtB,cAAc,GACd,yBAAyB,CAAC;AAC9B,uHAAuH;AACvH,MAAM,MAAM,aAAa,GACrB,eAAe,GACf,iBAAiB,GACjB,mBAAmB,GACnB,YAAY,GACZ,iBAAiB,GACjB,sBAAsB,GACtB,cAAc,GACd,yBAAyB,GACzB,cAAc,GACd,wBAAwB,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=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/generated/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** An object with a matrix of coordinates. */\nexport interface RouteMatrixQuery {\n /** A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details. */\n origins: GeoJsonMultiPoint;\n /** A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details. */\n destinations: GeoJsonMultiPoint;\n}\n\n/** A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details. */\nexport interface GeoJsonMultiPoint\n extends GeoJsonGeometryParent,\n GeoJsonMultiPointData {\n type: \"MultiPoint\";\n}\n\n/** A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details. */\nexport interface GeoJsonGeometryParent extends GeoJsonObjectParent {\n type:\n | \"GeoJsonGeometry\"\n | \"MultiPoint\"\n | \"MultiPolygon\"\n | \"Point\"\n | \"LineString\"\n | \"MultiLineString\"\n | \"Polygon\"\n | \"GeometryCollection\";\n}\n\n/** A valid `GeoJSON` object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3) for details. */\nexport interface GeoJsonObjectParent {\n type:\n | \"GeoJsonObject\"\n | \"GeoJsonGeometry\"\n | \"MultiPoint\"\n | \"MultiPolygon\"\n | \"Point\"\n | \"LineString\"\n | \"MultiLineString\"\n | \"Polygon\"\n | \"GeometryCollection\"\n | \"Feature\"\n | \"FeatureCollection\";\n}\n\n/** Data contained by a `GeoJson MultiPoint`. */\nexport interface GeoJsonMultiPointData {\n /** Coordinates for the `GeoJson MultiPoint` geometry. */\n coordinates: Array<Array<number>>;\n}\n\n/** Post body parameters for Route directions. */\nexport interface RouteDirectionParameters {\n /**\n * A GeoJSON Geometry collection representing sequence of coordinates used as input for route reconstruction and for calculating zero or more alternative routes to this reference route.\n * - The provided sequence of supporting points is used as input for route reconstruction.\n * - The alternative routes are calculated between the origin and destination points specified in the base path parameter locations.\n * - If both _minDeviationDistance_ and _minDeviationTime_ are set to zero, then these origin and destination points are\n * expected to be at (or very near) the beginning and end of the reference route, respectively.\n * - Intermediate locations (_waypoints_) are not supported when using <_supportingPoints_>.\n * - The reference route may contain traffic incidents of type _ROAD_CLOSURE_, which are\n * ignored for the calculation of the reference route's travel time and traffic delay.\n */\n supportingPoints?: Record<string, unknown>;\n /** This is a list of 3-character, ISO 3166-1, alpha-3 country codes of countries/regions in which all toll roads with vignettes are to be avoided, e.g. \"AUS,CHE\". Toll roads with vignettes in countries/regions not in the list are unaffected. Note: It is an error to specify both **avoidVignette** and **allowVignette**. */\n avoidVignette?: Array<string>;\n /** This is a list of 3-character, ISO 3166-1, alpha-3 country codes of countries/regions in which toll roads with vignettes are allowed, e.g. \"AUS,CHE\". Specifying **allowVignette** with some countries/regions X is equivalent to specifying **avoidVignette** with all countries/regions but X. Specifying **allowVignette** with an empty list is the same as avoiding all toll roads with vignettes. Note: It is an error to specify both **avoidVignette** and **allowVignette**. */\n allowVignette?: Array<string>;\n /** A GeoJSON MultiPolygon representing list of areas to avoid. Only rectangle polygons are supported. The maximum size of a rectangle is about 160x160 km. Maximum number of avoided areas is **10**. It cannot cross the 180th meridian. It must be between -80 and +80 degrees of latitude. */\n avoidAreas?: GeoJsonMultiPolygon;\n}\n\n/** A valid `GeoJSON MultiPolygon` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.7) for details. */\nexport interface GeoJsonMultiPolygon\n extends GeoJsonGeometryParent,\n GeoJsonMultiPolygonData {\n type: \"MultiPolygon\";\n}\n\nexport interface GeoJsonMultiPolygonData {\n /** Contains a list of valid `GeoJSON Polygon` objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude). */\n coordinates: Array<Array<Array<Array<number>>>>;\n}\n\n/** This type represents the request body for the Batch service. */\nexport interface BatchRequest {\n /** The list of queries to process. */\n batchItems?: Array<BatchRequestItem>;\n}\n\n/** Batch request object */\nexport interface BatchRequestItem {\n /** This parameter contains a query string used to perform an unstructured geocoding operation. The query string will be passed verbatim to the search API for processing. */\n query?: string;\n}\n\n/** A valid `GeoJSON Point` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.2) for details. */\nexport interface GeoJsonPoint extends GeoJsonGeometryParent, GeoJsonPointData {\n type: \"Point\";\n}\n\n/** Data contained by a `GeoJson Point`. */\nexport interface GeoJsonPointData {\n /** A `Position` is an array of numbers with two or more elements. The first two elements are _longitude_ and _latitude_, precisely in that order. _Altitude/Elevation_ is an optional third element. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.1) for details. */\n coordinates: Array<number>;\n}\n\n/** A valid `GeoJSON LineString` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.4) for details. */\nexport interface GeoJsonLineString\n extends GeoJsonGeometryParent,\n GeoJsonLineStringData {\n type: \"LineString\";\n}\n\nexport interface GeoJsonLineStringData {\n /** Coordinates for the `GeoJson LineString` geometry. */\n coordinates: Array<Array<number>>;\n}\n\n/** A valid `GeoJSON MultiLineString` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.5) for details. */\nexport interface GeoJsonMultiLineString\n extends GeoJsonGeometryParent,\n GeoJsonMultiLineStringData {\n type: \"MultiLineString\";\n}\n\nexport interface GeoJsonMultiLineStringData {\n /** Coordinates for the `GeoJson MultiLineString` geometry. */\n coordinates: Array<Array<Array<number>>>;\n}\n\n/** A valid `GeoJSON Polygon` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.6) for details. */\nexport interface GeoJsonPolygon\n extends GeoJsonGeometryParent,\n GeoJsonPolygonData {\n type: \"Polygon\";\n}\n\nexport interface GeoJsonPolygonData {\n /** Coordinates for the `GeoJson Polygon` geometry type. */\n coordinates: Array<Array<Array<number>>>;\n}\n\n/** A valid `GeoJSON GeometryCollection` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.8) for details. */\nexport interface GeoJsonGeometryCollection\n extends GeoJsonGeometryParent,\n GeoJsonGeometryCollectionData {\n type: \"GeometryCollection\";\n}\n\nexport interface GeoJsonGeometryCollectionData {\n /** Contains a list of valid `GeoJSON` geometry objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude). */\n geometries: Array<GeoJsonGeometry>;\n}\n\n/** A valid `GeoJSON Feature` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.2) for details. */\nexport interface GeoJsonFeature\n extends GeoJsonObjectParent,\n GeoJsonFeatureData {\n type: \"Feature\";\n}\n\nexport interface GeoJsonFeatureData {\n /** A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details. */\n geometry: GeoJsonGeometry;\n /** Properties can contain any additional metadata about the `Feature`. Value can be any JSON object or a JSON null value */\n properties?: Record<string, unknown>;\n /** Identifier for the feature. */\n id?: string;\n /** The type of the feature. The value depends on the data model the current feature is part of. Some data models may have an empty value. */\n featureType?: string;\n}\n\n/** A valid `GeoJSON FeatureCollection` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.3) for details. */\nexport interface GeoJsonFeatureCollection\n extends GeoJsonObjectParent,\n GeoJsonFeatureCollectionData {\n type: \"FeatureCollection\";\n}\n\nexport interface GeoJsonFeatureCollectionData {\n /** Contains a list of valid `GeoJSON Feature` objects. */\n features: Array<GeoJsonFeature>;\n}\n\n/** A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details. */\nexport type GeoJsonGeometry =\n | GeoJsonGeometryParent\n | GeoJsonMultiPoint\n | GeoJsonMultiPolygon\n | GeoJsonPoint\n | GeoJsonLineString\n | GeoJsonMultiLineString\n | GeoJsonPolygon\n | GeoJsonGeometryCollection;\n/** A valid `GeoJSON` object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3) for details. */\nexport type GeoJsonObject =\n | GeoJsonGeometry\n | GeoJsonMultiPoint\n | GeoJsonMultiPolygon\n | GeoJsonPoint\n | GeoJsonLineString\n | GeoJsonMultiLineString\n | GeoJsonPolygon\n | GeoJsonGeometryCollection\n | GeoJsonFeature\n | GeoJsonFeatureCollection;\n"]}