@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
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@azure-rest/maps-route",
3
3
  "sdk-type": "client",
4
4
  "author": "Microsoft Corporation",
5
- "version": "1.0.0-beta.3",
5
+ "version": "1.0.0-beta.5",
6
6
  "description": "A client library for Azure Maps maps-route",
7
7
  "keywords": [
8
8
  "node",
@@ -15,9 +15,9 @@
15
15
  "route"
16
16
  ],
17
17
  "license": "MIT",
18
- "main": "dist/index.js",
19
- "module": "./dist-esm/src/index.js",
20
- "types": "./types/maps-route-rest.d.ts",
18
+ "main": "./dist/commonjs/index.js",
19
+ "module": "./dist/esm/index.js",
20
+ "types": "./dist/commonjs/index.d.ts",
21
21
  "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/maps/maps-route-rest/README.md",
22
22
  "repository": "github:Azure/azure-sdk-for-js",
23
23
  "bugs": {
@@ -25,11 +25,8 @@
25
25
  },
26
26
  "files": [
27
27
  "dist/",
28
- "dist-esm/src/",
29
- "types/maps-route-rest.d.ts",
30
28
  "README.md",
31
- "LICENSE",
32
- "review/*"
29
+ "LICENSE"
33
30
  ],
34
31
  "//sampleConfiguration": {
35
32
  "productName": "Azure Maps Route",
@@ -38,9 +35,8 @@
38
35
  "azure-maps"
39
36
  ],
40
37
  "requiredResources": {
41
- "Azure Maps Resource": "https://docs.microsoft.com/azure/azure-maps/how-to-create-template"
38
+ "Azure Maps Resource": "https://learn.microsoft.com/azure/azure-maps/how-to-create-template"
42
39
  },
43
- "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure-rest/maps-route",
44
40
  "disableDocsMs": true
45
41
  },
46
42
  "//metadata": {
@@ -55,78 +51,99 @@
55
51
  "node": ">=18.0.0"
56
52
  },
57
53
  "scripts": {
58
- "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
59
- "build:browser": "tsc -p . && dev-tool run bundle",
60
- "build:node": "tsc -p . && dev-tool run bundle --browser-test false",
54
+ "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
55
+ "build:browser": "dev-tool run build-package && dev-tool run bundle",
56
+ "build:debug": "dev-tool run build-package && dev-tool run bundle && dev-tool run extract-api",
57
+ "build:node": "dev-tool run build-package && dev-tool run bundle --browser-test false",
61
58
  "build:samples": "dev-tool samples publish --force",
62
- "build:test": "tsc -p . && dev-tool run bundle",
63
- "build:debug": "tsc -p . && dev-tool run bundle && api-extractor run --local",
59
+ "build:test": "dev-tool run build-package && dev-tool run bundle",
64
60
  "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
65
- "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
61
+ "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
66
62
  "execute:samples": "dev-tool samples run samples-dev",
67
- "extract-api": "rimraf review && mkdirp ./review && api-extractor run --local",
63
+ "extract-api": "dev-tool run vendored rimraf review && dev-tool run extract-api",
68
64
  "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
69
65
  "generate:client": "autorest --typescript swagger/README.md && npm run format",
70
- "integration-test:browser": "dev-tool run test:browser",
71
- "integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
72
66
  "integration-test": "npm run integration-test:node && npm run integration-test:browser",
73
- "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
74
- "lint": "eslint package.json api-extractor.json src test --ext .ts",
67
+ "integration-test:browser": "dev-tool run test:browser",
68
+ "integration-test:node": "dev-tool run test:vitest --esm",
69
+ "lint": "eslint package.json api-extractor.json src test",
70
+ "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
75
71
  "pack": "npm pack 2>&1",
72
+ "test": "npm run clean && npm run build:test && npm run unit-test",
76
73
  "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
77
74
  "test:node": "npm run clean && npm run build:test && npm run unit-test:node",
78
- "test": "npm run clean && npm run build:test && npm run unit-test",
79
75
  "unit-test": "npm run unit-test:node && npm run unit-test:browser",
80
- "unit-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 --exclude 'test/**/browser/*.spec.ts' 'test/**/*.spec.ts'",
81
- "unit-test:browser": "dev-tool run test:browser",
82
- "build": "npm run clean && tsc -p . && dev-tool run bundle && mkdirp ./review && api-extractor run --local"
76
+ "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
77
+ "unit-test:node": "dev-tool run test:vitest",
78
+ "update-snippets": "dev-tool run update-snippets"
83
79
  },
84
80
  "sideEffects": false,
85
81
  "autoPublish": false,
86
82
  "dependencies": {
87
- "@azure/core-auth": "^1.3.0",
88
83
  "@azure-rest/core-client": "^1.0.0",
89
- "@azure/core-rest-pipeline": "^1.8.0",
90
- "@azure/logger": "^1.0.0",
91
- "@azure/core-lro": "^2.2.0",
84
+ "@azure/abort-controller": "^2.1.2",
85
+ "@azure/core-auth": "^1.9.0",
86
+ "@azure/core-lro": "^3.1.0",
87
+ "@azure/core-rest-pipeline": "^1.19.0",
88
+ "@azure/logger": "^1.1.4",
92
89
  "@azure/maps-common": "1.0.0-beta.2",
93
- "tslib": "^2.4.0"
90
+ "tslib": "^2.8.1"
94
91
  },
95
92
  "devDependencies": {
96
- "@microsoft/api-extractor": "^7.31.1",
97
- "autorest": "latest",
98
- "@types/node": "^18.0.0",
99
- "dotenv": "^16.0.0",
100
- "eslint": "^8.0.0",
101
- "mkdirp": "^1.0.4",
102
- "rimraf": "^3.0.0",
103
- "source-map-support": "^0.5.9",
104
- "typescript": "~5.2.0",
93
+ "@azure-tools/test-credential": "^2.0.0",
94
+ "@azure-tools/test-recorder": "^4.1.0",
95
+ "@azure-tools/test-utils-vitest": "^1.0.0",
105
96
  "@azure/dev-tool": "^1.0.0",
106
97
  "@azure/eslint-plugin-azure-sdk": "^3.0.0",
107
- "@azure-tools/test-credential": "^1.0.0",
108
- "@azure/identity": "^3.3.0",
109
- "@azure-tools/test-recorder": "^3.0.0",
110
- "mocha": "^10.0.0",
111
- "cross-env": "^7.0.2",
112
- "@types/chai": "^4.2.8",
113
- "chai": "^4.2.0",
114
- "karma-chrome-launcher": "^3.0.0",
115
- "karma-coverage": "^2.0.0",
116
- "karma-env-preprocessor": "^0.1.1",
117
- "karma-firefox-launcher": "^1.1.0",
118
- "karma-junit-reporter": "^2.0.1",
119
- "karma-mocha-reporter": "^2.2.5",
120
- "karma-mocha": "^2.0.1",
121
- "karma-source-map-support": "~1.4.0",
122
- "karma-sourcemap-loader": "^0.3.8",
123
- "karma": "^6.2.0",
124
- "c8": "^8.0.0",
125
- "@types/mocha": "^10.0.0",
126
- "ts-node": "^10.0.0",
127
- "esm": "^3.2.18"
98
+ "@azure/identity": "^4.6.0",
99
+ "@types/node": "^18.0.0",
100
+ "@vitest/browser": "^3.0.5",
101
+ "@vitest/coverage-istanbul": "^3.0.5",
102
+ "autorest": "latest",
103
+ "dotenv": "^16.0.0",
104
+ "eslint": "^9.9.0",
105
+ "playwright": "^1.50.1",
106
+ "typescript": "~5.7.2",
107
+ "vitest": "^3.0.5"
108
+ },
109
+ "browser": "./dist/browser/index.js",
110
+ "type": "module",
111
+ "tshy": {
112
+ "project": "./tsconfig.src.json",
113
+ "exports": {
114
+ "./package.json": "./package.json",
115
+ ".": "./src/index.ts"
116
+ },
117
+ "dialects": [
118
+ "esm",
119
+ "commonjs"
120
+ ],
121
+ "esmDialects": [
122
+ "browser",
123
+ "react-native"
124
+ ],
125
+ "selfLink": false
126
+ },
127
+ "exports": {
128
+ "./package.json": "./package.json",
129
+ ".": {
130
+ "browser": {
131
+ "types": "./dist/browser/index.d.ts",
132
+ "default": "./dist/browser/index.js"
133
+ },
134
+ "react-native": {
135
+ "types": "./dist/react-native/index.d.ts",
136
+ "default": "./dist/react-native/index.js"
137
+ },
138
+ "import": {
139
+ "types": "./dist/esm/index.d.ts",
140
+ "default": "./dist/esm/index.js"
141
+ },
142
+ "require": {
143
+ "types": "./dist/commonjs/index.d.ts",
144
+ "default": "./dist/commonjs/index.js"
145
+ }
146
+ }
128
147
  },
129
- "browser": {
130
- "./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js"
131
- }
148
+ "react-native": "./dist/react-native/index.js"
132
149
  }
package/dist/index.js DELETED
@@ -1,257 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var coreAuth = require('@azure/core-auth');
6
- var mapsCommon = require('@azure/maps-common');
7
- var coreClient = require('@azure-rest/core-client');
8
- var coreRestPipeline = require('@azure/core-rest-pipeline');
9
- var coreLro = require('@azure/core-lro');
10
-
11
- // Copyright (c) Microsoft Corporation.
12
- // Licensed under the MIT license.
13
- /**
14
- * Initialize a new instance of the class MapsRouteClient class.
15
- * @param credentials type: KeyCredential
16
- */
17
- function createClient(credentials, options = {}) {
18
- const baseUrl = options.baseUrl ?? `https://atlas.microsoft.com`;
19
- options.apiVersion = options.apiVersion ?? "1.0";
20
- options = {
21
- ...options,
22
- credentials: {
23
- apiKeyHeaderName: "subscription-key"
24
- }
25
- };
26
- const userAgentInfo = `azsdk-js-maps-route-rest/1.0.0-beta.1`;
27
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
28
- ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
29
- : `${userAgentInfo}`;
30
- options = {
31
- ...options,
32
- userAgentOptions: {
33
- userAgentPrefix
34
- }
35
- };
36
- const client = coreClient.getClient(baseUrl, credentials, options);
37
- return client;
38
- }
39
-
40
- // Copyright (c) Microsoft Corporation.
41
- // Licensed under the MIT license.
42
- const responseMap = {
43
- "POST /route/matrix/{format}": ["200", "202"],
44
- "GET /route/matrix/{format}": ["200", "202"],
45
- "POST /route/matrix/sync/{format}": ["200"],
46
- "GET /route/directions/{format}": ["200"],
47
- "POST /route/directions/{format}": ["200"],
48
- "GET /route/range/{format}": ["200"],
49
- "POST /route/directions/batch/{format}": ["200", "202"],
50
- "GET /route/directions/batch/{format}": ["200", "202"],
51
- "POST /route/directions/batch/sync/{format}": ["200"]
52
- };
53
- function isUnexpected(response) {
54
- const lroOriginal = response.headers["x-ms-original-url"];
55
- const url = new URL(lroOriginal ?? response.request.url);
56
- const method = response.request.method;
57
- let pathDetails = responseMap[`${method} ${url.pathname}`];
58
- if (!pathDetails) {
59
- pathDetails = geParametrizedPathSuccess(method, url.pathname);
60
- }
61
- return !pathDetails.includes(response.status);
62
- }
63
- function geParametrizedPathSuccess(method, path) {
64
- const pathParts = path.split("/");
65
- // Iterate the responseMap to find a match
66
- for (const [key, value] of Object.entries(responseMap)) {
67
- // Extracting the path from the map key which is in format
68
- // GET /path/foo
69
- if (!key.startsWith(method)) {
70
- continue;
71
- }
72
- const candidatePath = getPathFromMapKey(key);
73
- // Get each part of the url path
74
- const candidateParts = candidatePath.split("/");
75
- // If the candidate and actual paths don't match in size
76
- // we move on to the next candidate path
77
- if (candidateParts.length === pathParts.length &&
78
- hasParametrizedPath(key)) {
79
- // track if we have found a match to return the values found.
80
- let found = true;
81
- for (let i = 0; i < candidateParts.length; i++) {
82
- if (candidateParts[i]?.startsWith("{") &&
83
- candidateParts[i]?.endsWith("}")) {
84
- // If the current part of the candidate is a "template" part
85
- // it is a match with the actual path part on hand
86
- // skip as the parameterized part can match anything
87
- continue;
88
- }
89
- // If the candidate part is not a template and
90
- // the parts don't match mark the candidate as not found
91
- // to move on with the next candidate path.
92
- if (candidateParts[i] !== pathParts[i]) {
93
- found = false;
94
- break;
95
- }
96
- }
97
- // We finished evaluating the current candidate parts
98
- // if all parts matched we return the success values form
99
- // the path mapping.
100
- if (found) {
101
- return value;
102
- }
103
- }
104
- }
105
- // No match was found, return an empty array.
106
- return [];
107
- }
108
- function hasParametrizedPath(path) {
109
- return path.includes("/{");
110
- }
111
- function getPathFromMapKey(mapKey) {
112
- const pathStart = mapKey.indexOf("/");
113
- return mapKey.slice(pathStart);
114
- }
115
-
116
- // Copyright (c) Microsoft Corporation.
117
- // Licensed under the MIT license.
118
- /**
119
- * Helper function that builds a Poller object to help polling a long running operation.
120
- * @param client - Client to use for sending the request to get additional pages.
121
- * @param initialResponse - The initial response.
122
- * @param options - Options to set a resume state or custom polling interval.
123
- * @returns - A poller object to poll for operation state updates and eventually get the final response.
124
- */
125
- function getLongRunningPoller(client, initialResponse, options = {}) {
126
- const poller = {
127
- requestMethod: initialResponse.request.method,
128
- requestPath: initialResponse.request.url,
129
- sendInitialRequest: async () => {
130
- // In the case of Rest Clients we are building the LRO poller object from a response that's the reason
131
- // we are not triggering the initial request here, just extracting the information from the
132
- // response we were provided.
133
- return getLroResponse(initialResponse);
134
- },
135
- sendPollRequest: async (path) => {
136
- // This is the callback that is going to be called to poll the service
137
- // to get the latest status. We use the client provided and the polling path
138
- // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location
139
- // depending on the lro pattern that the service implements. If non is provided we default to the initial path.
140
- const response = await client
141
- .pathUnchecked(path ?? initialResponse.request.url)
142
- .get();
143
- const lroResponse = getLroResponse(response);
144
- lroResponse.rawResponse.headers["x-ms-original-url"] =
145
- initialResponse.request.url;
146
- return lroResponse;
147
- }
148
- };
149
- return new coreLro.LroEngine(poller, options);
150
- }
151
- /**
152
- * Converts a Rest Client response to a response that the LRO engine knows about
153
- * @param response - a rest client http response
154
- * @returns - An LRO response that the LRO engine can work with
155
- */
156
- function getLroResponse(response) {
157
- if (Number.isNaN(response.status)) {
158
- throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);
159
- }
160
- return {
161
- flatResponse: response,
162
- rawResponse: {
163
- ...response,
164
- statusCode: Number.parseInt(response.status),
165
- body: response.body
166
- }
167
- };
168
- }
169
-
170
- // Copyright (c) Microsoft Corporation.
171
- // Licensed under the MIT license.
172
- function MapsRoute(credential, clientIdOrOptions = {}, maybeOptions = {}) {
173
- const options = typeof clientIdOrOptions === "string" ? maybeOptions : clientIdOrOptions;
174
- /**
175
- * maps service requires a header "ms-x-client-id", which is different from the standard AAD.
176
- * So we need to do our own implementation.
177
- * This customized authentication is following by this guide: https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/RLC-customization.md#custom-authentication
178
- */
179
- if (coreAuth.isTokenCredential(credential)) {
180
- const clientId = typeof clientIdOrOptions === "string" ? clientIdOrOptions : "";
181
- if (!clientId) {
182
- throw Error("Client id is needed for TokenCredential");
183
- }
184
- const client = createClient(undefined, options);
185
- client.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
186
- credential,
187
- scopes: `${options.baseUrl || "https://atlas.microsoft.com"}/.default`,
188
- }));
189
- client.pipeline.addPolicy(mapsCommon.createMapsClientIdPolicy(clientId));
190
- return client;
191
- }
192
- if (coreAuth.isSASCredential(credential)) {
193
- const client = createClient(undefined, options);
194
- client.pipeline.addPolicy({
195
- name: "mapsSASCredentialPolicy",
196
- async sendRequest(request, next) {
197
- request.headers.set("Authorization", `jwt-sas ${credential.signature}`);
198
- return next(request);
199
- },
200
- });
201
- return client;
202
- }
203
- return createClient(credential, options);
204
- }
205
-
206
- // Copyright (c) Microsoft Corporation.
207
- // Licensed under the MIT license.
208
- function toLatLonString(coordinates) {
209
- return `${coordinates[0]},${coordinates[1]}`;
210
- }
211
- /**
212
- * Transform an array of [Latitude, Longtitute] to a string in the following format:
213
- * "Latitude_1,Longtitute_1:Latitude_2,Longtitute_2:..."
214
- *
215
- * @param coordinates - An array of Latitude/Longtitute pair to transform.
216
- * @returns The transformed string.
217
- */
218
- function toColonDelimitedLatLonString(coordinates) {
219
- return coordinates.map((c) => toLatLonString(c)).join(":");
220
- }
221
- /**
222
- * Create a batch request body of a bunch of route direction requests.
223
- *
224
- * @param queryParamProperties - An object of the query parameters for a route direction request
225
- * @returns The composed batch request.
226
- */
227
- function createRouteDirectionsBatchRequest(queryParamProperties) {
228
- return {
229
- batchItems: queryParamProperties.map((queryParam) => ({
230
- query: "?" +
231
- Object.entries(queryParam)
232
- .map(([k, v]) => {
233
- // Skip if no value
234
- if (typeof v === "undefined" || v === null) {
235
- return "";
236
- }
237
- // Check name mappings: Array values
238
- if ((k === "departAt" || k === "arriveAt") && v instanceof Date) {
239
- return `${k}=${v.toISOString()}`;
240
- }
241
- return `${k}=${v}`;
242
- })
243
- .filter((s) => s !== "")
244
- .join("&"),
245
- })),
246
- };
247
- }
248
-
249
- // Copyright (c) Microsoft Corporation.
250
- // Licensed under the MIT license.
251
-
252
- exports.createRouteDirectionsBatchRequest = createRouteDirectionsBatchRequest;
253
- exports.default = MapsRoute;
254
- exports.getLongRunningPoller = getLongRunningPoller;
255
- exports.isUnexpected = isUnexpected;
256
- exports.toColonDelimitedLatLonString = toColonDelimitedLatLonString;
257
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../src/generated/mapsRouteClient.ts","../src/generated/isUnexpected.ts","../src/generated/pollingHelper.ts","../src/mapsRoute.ts","../src/helpers.ts","../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { KeyCredential } from \"@azure/core-auth\";\nimport { MapsRouteClient } from \"./clientDefinitions\";\n\n/**\n * Initialize a new instance of the class MapsRouteClient class.\n * @param credentials type: KeyCredential\n */\nexport default function createClient(\n credentials: KeyCredential,\n options: ClientOptions = {}\n): MapsRouteClient {\n const baseUrl = options.baseUrl ?? `https://atlas.microsoft.com`;\n options.apiVersion = options.apiVersion ?? \"1.0\";\n options = {\n ...options,\n credentials: {\n apiKeyHeaderName: \"subscription-key\"\n }\n };\n\n const userAgentInfo = `azsdk-js-maps-route-rest/1.0.0-beta.1`;\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 };\n\n const client = getClient(baseUrl, credentials, options) as MapsRouteClient;\n\n return client;\n}\n","// 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\";\n\nconst responseMap: Record<string, string[]> = {\n \"POST /route/matrix/{format}\": [\"200\", \"202\"],\n \"GET /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 \"POST /route/directions/batch/{format}\": [\"200\", \"202\"],\n \"GET /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 = geParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction geParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\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 // If the candidate and actual paths don't match in size\n // we move on to the next candidate path\n if (\n candidateParts.length === pathParts.length &&\n hasParametrizedPath(key)\n ) {\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = 0; i < candidateParts.length; i++) {\n if (\n candidateParts[i]?.startsWith(\"{\") &&\n candidateParts[i]?.endsWith(\"}\")\n ) {\n // If the current part of the candidate is a \"template\" part\n // it is a match with the actual path part on hand\n // skip as the parameterized part can match anything\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[i]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // if all parts matched we return the success values form\n // the path mapping.\n if (found) {\n return value;\n }\n }\n }\n\n // No match was found, return an empty array.\n return [];\n}\n\nfunction hasParametrizedPath(path: string): boolean {\n return path.includes(\"/{\");\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport {\n LongRunningOperation,\n LroEngine,\n LroEngineOptions,\n LroResponse,\n PollerLike,\n PollOperationState\n} from \"@azure/core-lro\";\n\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: LroEngineOptions<TResult, PollOperationState<TResult>> = {}\n): PollerLike<PollOperationState<TResult>, TResult> {\n const poller: LongRunningOperation<TResult> = {\n requestMethod: initialResponse.request.method,\n requestPath: initialResponse.request.url,\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n const response = await client\n .pathUnchecked(path ?? initialResponse.request.url)\n .get();\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] =\n initialResponse.request.url;\n return lroResponse;\n }\n };\n\n return new LroEngine(poller, options);\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO engine knows about\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO engine can work with\n */\nfunction getLroResponse<TResult extends HttpResponse>(\n response: TResult\n): LroResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(\n `Status code of the response is not a number. Value: ${response.status}`\n );\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body\n }\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ClientOptions } from \"@azure-rest/core-client\";\nimport {\n AzureKeyCredential,\n AzureSASCredential,\n TokenCredential,\n isSASCredential,\n isTokenCredential,\n} from \"@azure/core-auth\";\nimport { createMapsClientIdPolicy } from \"@azure/maps-common\";\nimport { MapsRouteClient } from \"./generated\";\nimport createClient from \"./generated\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\n\n/**\n * Creates an instance of MapsRouteClient from a subscription key.\n *\n * @example\n * ```ts\n * import MapsRoute from \"@azure-rest/maps-route\";\n * import { AzureKeyCredential } from \"@azure/core-auth\";\n *\n * const credential = new AzureKeyCredential(\"<subscription-key>\");\n * const client = MapsRoute(credential);\n *```\n *\n * @param credential - An AzureKeyCredential instance used to authenticate requests to the service\n * @param options - Options used to configure the Route Client\n */\nexport default function MapsRoute(\n credential: AzureKeyCredential,\n options?: ClientOptions,\n): MapsRouteClient;\n/**\n * Creates an instance of MapsRoute from an Azure Identity `TokenCredential`.\n *\n * @example\n * ```ts\n * import MapsRoute from \"@azure-rest/maps-route\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = MapsRoute(credential, \"<maps-account-client-id>\");\n *```\n *\n * @param credential - An TokenCredential instance used to authenticate requests to the service\n * @param mapsAccountClientId - The Azure Maps client id of a specific map resource\n * @param options - Options used to configure the Route Client\n */\nexport default function MapsRoute(\n credential: TokenCredential,\n mapsAccountClientId: string,\n options?: ClientOptions,\n): MapsRouteClient;\n/**\n * Creates an instance of MapsRoute from an Azure Identity `AzureSASCredential`.\n *\n * @example\n * ```ts\n * import MapsRoute from \"@azure-rest/maps-route\";\n * import { AzureSASCredential } from \"@azure/core-auth\";\n *\n * const credential = new AzureSASCredential(\"<SAS Token>\");\n * const client = MapsRoute(credential);\n * ```\n *\n * @param credential - An AzureSASCredential instance used to authenticate requests to the service\n * @param options - Options used to configure the Route Client\n */\nexport default function MapsRoute(\n credential: AzureSASCredential,\n options?: ClientOptions,\n): MapsRouteClient;\nexport default function MapsRoute(\n credential: TokenCredential | AzureKeyCredential | AzureSASCredential,\n clientIdOrOptions: string | ClientOptions = {},\n maybeOptions: ClientOptions = {},\n): MapsRouteClient {\n const options = typeof clientIdOrOptions === \"string\" ? maybeOptions : clientIdOrOptions;\n\n /**\n * maps service requires a header \"ms-x-client-id\", which is different from the standard AAD.\n * So we need to do our own implementation.\n * This customized authentication is following by this guide: https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/RLC-customization.md#custom-authentication\n */\n if (isTokenCredential(credential)) {\n const clientId = typeof clientIdOrOptions === \"string\" ? clientIdOrOptions : \"\";\n if (!clientId) {\n throw Error(\"Client id is needed for TokenCredential\");\n }\n const client = createClient(undefined as any, options);\n client.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential,\n scopes: `${options.baseUrl || \"https://atlas.microsoft.com\"}/.default`,\n }),\n );\n client.pipeline.addPolicy(createMapsClientIdPolicy(clientId));\n return client;\n }\n\n if (isSASCredential(credential)) {\n const client = createClient(undefined as any, options);\n client.pipeline.addPolicy({\n name: \"mapsSASCredentialPolicy\",\n async sendRequest(request, next) {\n request.headers.set(\"Authorization\", `jwt-sas ${credential.signature}`);\n return next(request);\n },\n });\n return client;\n }\n\n return createClient(credential, options);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { LatLon } from \"@azure/maps-common\";\nimport { BatchRequest, RouteGetRouteDirectionsQueryParamProperties } from \"./generated\";\n\nfunction toLatLonString(coordinates: LatLon): string {\n return `${coordinates[0]},${coordinates[1]}`;\n}\n\n/**\n * Transform an array of [Latitude, Longtitute] to a string in the following format:\n * \"Latitude_1,Longtitute_1:Latitude_2,Longtitute_2:...\"\n *\n * @param coordinates - An array of Latitude/Longtitute pair to transform.\n * @returns The transformed string.\n */\nexport function toColonDelimitedLatLonString(coordinates: LatLon[]): string {\n return coordinates.map((c) => toLatLonString(c)).join(\":\");\n}\n\n/**\n * Create a batch request body of a bunch of route direction requests.\n *\n * @param queryParamProperties - An object of the query parameters for a route direction request\n * @returns The composed batch request.\n */\nexport function createRouteDirectionsBatchRequest(\n queryParamProperties: RouteGetRouteDirectionsQueryParamProperties[],\n): BatchRequest {\n return {\n batchItems: queryParamProperties.map((queryParam) => ({\n query:\n \"?\" +\n Object.entries(queryParam)\n .map(([k, v]) => {\n // Skip if no value\n if (typeof v === \"undefined\" || v === null) {\n return \"\";\n }\n // Check name mappings: Array values\n if ((k === \"departAt\" || k === \"arriveAt\") && v instanceof Date) {\n return `${k}=${v.toISOString()}`;\n }\n return `${k}=${v}`;\n })\n .filter((s) => s !== \"\")\n .join(\"&\"),\n })),\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport MapsRoute from \"./mapsRoute\";\n\nexport * from \"./generated\";\nexport * from \"./helpers\";\n\nexport default MapsRoute;\n"],"names":["getClient","LroEngine","isTokenCredential","bearerTokenAuthenticationPolicy","createMapsClientIdPolicy","isSASCredential"],"mappings":";;;;;;;;;;AAAA;AACA;AAMA;;;AAGG;AACqB,SAAA,YAAY,CAClC,WAA0B,EAC1B,UAAyB,EAAE,EAAA;AAE3B,IAAA,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,6BAA6B,CAAC;IACjE,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,KAAK,CAAC;AACjD,IAAA,OAAO,GAAG;AACR,QAAA,GAAG,OAAO;AACV,QAAA,WAAW,EAAE;AACX,YAAA,gBAAgB,EAAE,kBAAkB;AACrC,SAAA;KACF,CAAC;IAEF,MAAM,aAAa,GAAG,CAAA,qCAAA,CAAuC,CAAC;IAC9D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;UAChE,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,CAAI,CAAA,EAAA,aAAa,CAAE,CAAA;AAChE,UAAE,CAAA,EAAG,aAAa,CAAA,CAAE,CAAC;AACzB,IAAA,OAAO,GAAG;AACR,QAAA,GAAG,OAAO;AACV,QAAA,gBAAgB,EAAE;YAChB,eAAe;AAChB,SAAA;KACF,CAAC;IAEF,MAAM,MAAM,GAAGA,oBA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W,EAAE,EAAE,CAAC;AAClC,qBAAA;AACD,oBAAA,OAAO,CAAG,EAAA,CAAC,CAAI,CAAA,EAAA,CAAC,EAAE,CAAC;AACrB,iBAAC,CAAC;qBACD,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;qBACvB,IAAI,CAAC,GAAG,CAAC;AACf,SAAA,CAAC,CAAC;KACJ,CAAC;AACJ;;AClDA;AACA;;;;;;;;"}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=clientDefinitions.js.map
@@ -1 +0,0 @@
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\";\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\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface RequestRouteMatrix {\n /**\n *\n * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n * The Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by origin and destination locations by using an asynchronous (async) or synchronous (sync) POST request. 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 **14** days. 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 * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n * 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 get(\n options?: RouteGetRouteMatrixParameters\n ): StreamableMethod<\n RouteGetRouteMatrix200Response | RouteGetRouteMatrix202Response\n >;\n}\n\nexport interface RequestRouteMatrixSync {\n /**\n *\n * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n * The Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by origin and destination locations by using an asynchronous (async) or synchronous (sync) POST request. 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 **14** days. 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 * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n *\n * 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 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 get(\n options: RouteGetRouteDirectionsParameters\n ): StreamableMethod<\n RouteGetRouteDirections200Response | RouteGetRouteDirectionsDefaultResponse\n >;\n /**\n * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n *\n * 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 * __Route Range (Isochrone) API__\n *\n *\n * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n * This service 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](https://docs.microsoft.com/rest/api/maps/search/postsearchinsidegeometry) 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 * **Route Directions Batch API**\n *\n *\n * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n *\n *\n * The Route Directions Batch API sends batches of queries to [Route Directions API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. 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.\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 **14** days. 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 request. Here's a typical sequence of operations:\n * 1. Client sends a Route Directions Batch `POST` request to Azure Maps\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 ```\n * Note:- Please remember to add AUTH information (subscription-key/azure_auth - See [Security](#security)) to the _status URI_ before running it. <br>\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 * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\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 * **Route Directions Batch API**\n *\n *\n * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n *\n *\n * The Route Directions Batch API sends batches of queries to [Route Directions API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. 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.\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"]}
@@ -1,13 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import MapsRouteClient from "./mapsRouteClient";
4
- export * from "./mapsRouteClient";
5
- export * from "./parameters";
6
- export * from "./responses";
7
- export * from "./clientDefinitions";
8
- export * from "./isUnexpected";
9
- export * from "./models";
10
- export * from "./outputModels";
11
- export * from "./pollingHelper";
12
- export default MapsRouteClient;
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAEhC,eAAe,eAAe,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport MapsRouteClient from \"./mapsRouteClient\";\n\nexport * from \"./mapsRouteClient\";\nexport * from \"./parameters\";\nexport * from \"./responses\";\nexport * from \"./clientDefinitions\";\nexport * from \"./isUnexpected\";\nexport * from \"./models\";\nexport * from \"./outputModels\";\nexport * from \"./pollingHelper\";\n\nexport default MapsRouteClient;\n"]}