autnam 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (490) hide show
  1. package/.env.example +2 -0
  2. package/.eslintrc.json +37 -0
  3. package/.github/workflows/deploy-docs.yml +27 -0
  4. package/.github/workflows/pre-release-tests.yml +49 -0
  5. package/.github/workflows/pull-request-tests.yml +49 -0
  6. package/.github/workflows/release.yml +75 -0
  7. package/.prettierignore +2 -0
  8. package/.prettierrc +19 -0
  9. package/.vscode/launch.json +25 -0
  10. package/.vscode/settings.json +5 -0
  11. package/codecov.yml +7 -0
  12. package/commitlint.config.cjs +41 -0
  13. package/demos/.eslintrc.js +13 -0
  14. package/demos/ago-node-cli/README.md +30 -0
  15. package/demos/ago-node-cli/ago.js +31 -0
  16. package/demos/ago-node-cli/index.js +11 -0
  17. package/demos/ago-node-cli/lib/item-export-command.js +48 -0
  18. package/demos/ago-node-cli/lib/item-search-command.js +32 -0
  19. package/demos/ago-node-cli/package.json +29 -0
  20. package/demos/attachments-browser/README.md +7 -0
  21. package/demos/attachments-browser/index.html +165 -0
  22. package/demos/attachments-browser/package.json +15 -0
  23. package/demos/attachments-node/README.md +4 -0
  24. package/demos/attachments-node/image.jpg +0 -0
  25. package/demos/attachments-node/index.js +89 -0
  26. package/demos/attachments-node/package.json +19 -0
  27. package/demos/batch-geocoder-node/NYC_Restaurant_Inspection_Results.csv +100 -0
  28. package/demos/batch-geocoder-node/README.md +13 -0
  29. package/demos/batch-geocoder-node/batch-geocode.js +112 -0
  30. package/demos/batch-geocoder-node/config-template.js +18 -0
  31. package/demos/batch-geocoder-node/package.json +34 -0
  32. package/demos/browser-es-modules/README.md +7 -0
  33. package/demos/browser-es-modules/index.html +38 -0
  34. package/demos/browser-es-modules/package.json +15 -0
  35. package/demos/deno/README.md +1 -0
  36. package/demos/deno/import_map.json +8 -0
  37. package/demos/deno/index.js +5 -0
  38. package/demos/express/README.md +16 -0
  39. package/demos/express/config.json.template +3 -0
  40. package/demos/express/package.json +15 -0
  41. package/demos/express/server.js +37 -0
  42. package/demos/feature-service-browser/README.md +8 -0
  43. package/demos/feature-service-browser/index.html +122 -0
  44. package/demos/feature-service-browser/package.json +15 -0
  45. package/demos/geocoder-browser/README.md +12 -0
  46. package/demos/geocoder-browser/authenticate.html +29 -0
  47. package/demos/geocoder-browser/config.js.template +1 -0
  48. package/demos/geocoder-browser/index.html +139 -0
  49. package/demos/geocoder-browser/package.json +15 -0
  50. package/demos/jsapi-integration/README.md +26 -0
  51. package/demos/jsapi-integration/authenticate.html +29 -0
  52. package/demos/jsapi-integration/config.js +6 -0
  53. package/demos/jsapi-integration/index.html +91 -0
  54. package/demos/jsapi-integration/package.json +15 -0
  55. package/demos/node-cli-item-management/README.md +11 -0
  56. package/demos/node-cli-item-management/index.js +229 -0
  57. package/demos/node-cli-item-management/package.json +24 -0
  58. package/demos/node-cli-item-management/screenshot.png +0 -0
  59. package/demos/node-common-js/README.md +4 -0
  60. package/demos/node-common-js/index.js +5 -0
  61. package/demos/node-common-js/package.json +15 -0
  62. package/demos/node-es-modules/README.md +4 -0
  63. package/demos/node-es-modules/index.js +5 -0
  64. package/demos/node-es-modules/package.json +16 -0
  65. package/demos/oauth2-browser/README.md +17 -0
  66. package/demos/oauth2-browser/authenticate.html +29 -0
  67. package/demos/oauth2-browser/config.js.template +6 -0
  68. package/demos/oauth2-browser/index.html +223 -0
  69. package/demos/oauth2-browser/logo.svg +4 -0
  70. package/demos/oauth2-browser/package.json +15 -0
  71. package/demos/oauth2-browser/style.css +36 -0
  72. package/demos/oauth2-browser-retry/README.md +32 -0
  73. package/demos/oauth2-browser-retry/authenticate.html +21 -0
  74. package/demos/oauth2-browser-retry/index.html +114 -0
  75. package/demos/oauth2-browser-retry/logo.svg +4 -0
  76. package/demos/oauth2-browser-retry/package.json +15 -0
  77. package/demos/parcel/README.md +8 -0
  78. package/demos/parcel/index.html +16 -0
  79. package/demos/parcel/index.js +8 -0
  80. package/demos/parcel/package.json +20 -0
  81. package/demos/snowpack/README.md +8 -0
  82. package/demos/snowpack/index.html +16 -0
  83. package/demos/snowpack/index.js +8 -0
  84. package/demos/snowpack/package.json +20 -0
  85. package/demos/snowpack/snowpack.config.js +3 -0
  86. package/demos/stream-response-to-file/README.md +7 -0
  87. package/demos/stream-response-to-file/index.js +36 -0
  88. package/demos/stream-response-to-file/output/.gitkeep +0 -0
  89. package/demos/stream-response-to-file/package.json +31 -0
  90. package/demos/tree-shaking-rollup/.babelrc +3 -0
  91. package/demos/tree-shaking-rollup/README.md +9 -0
  92. package/demos/tree-shaking-rollup/index.html +11 -0
  93. package/demos/tree-shaking-rollup/package.json +22 -0
  94. package/demos/tree-shaking-rollup/rollup.config.js +13 -0
  95. package/demos/tree-shaking-rollup/src/index.js +8 -0
  96. package/demos/tree-shaking-webpack/README.md +9 -0
  97. package/demos/tree-shaking-webpack/index.html +11 -0
  98. package/demos/tree-shaking-webpack/package.json +26 -0
  99. package/demos/tree-shaking-webpack/src/index.js +8 -0
  100. package/demos/tree-shaking-webpack/webpack.config.js +29 -0
  101. package/demos/vite/README.md +6 -0
  102. package/demos/vite/favicon.svg +15 -0
  103. package/demos/vite/index.html +13 -0
  104. package/demos/vite/main.js +8 -0
  105. package/demos/vite/package.json +18 -0
  106. package/demos/vue/.env.example +11 -0
  107. package/demos/vue/.eslintrc.js +17 -0
  108. package/demos/vue/.postcssrc.js +5 -0
  109. package/demos/vue/README.md +17 -0
  110. package/demos/vue/babel.config.js +3 -0
  111. package/demos/vue/package.json +35 -0
  112. package/demos/vue/public/favicon.ico +0 -0
  113. package/demos/vue/public/index.html +24 -0
  114. package/demos/vue/src/assets/logo.svg +29 -0
  115. package/demos/vue/src/components/App.vue +303 -0
  116. package/demos/vue/src/components/Authenticate.vue +65 -0
  117. package/demos/vue/src/components/Loader.vue +230 -0
  118. package/demos/vue/src/main.js +92 -0
  119. package/demos/webmap-checker-sapper/.env.example +5 -0
  120. package/demos/webmap-checker-sapper/README.md +124 -0
  121. package/demos/webmap-checker-sapper/appveyor.yml +18 -0
  122. package/demos/webmap-checker-sapper/cypress/fixtures/example.json +5 -0
  123. package/demos/webmap-checker-sapper/cypress/integration/spec.js +19 -0
  124. package/demos/webmap-checker-sapper/cypress/plugins/index.js +17 -0
  125. package/demos/webmap-checker-sapper/cypress/support/commands.js +25 -0
  126. package/demos/webmap-checker-sapper/cypress/support/index.js +20 -0
  127. package/demos/webmap-checker-sapper/cypress.json +4 -0
  128. package/demos/webmap-checker-sapper/package.json +47 -0
  129. package/demos/webmap-checker-sapper/rollup.config.js +87 -0
  130. package/demos/webmap-checker-sapper/src/client.js +20 -0
  131. package/demos/webmap-checker-sapper/src/components/LayerStatus.html +108 -0
  132. package/demos/webmap-checker-sapper/src/components/Nav.html +21 -0
  133. package/demos/webmap-checker-sapper/src/components/WebMap.html +62 -0
  134. package/demos/webmap-checker-sapper/src/routes/_error.html +41 -0
  135. package/demos/webmap-checker-sapper/src/routes/_layout.html +21 -0
  136. package/demos/webmap-checker-sapper/src/routes/auth/authorize.js +18 -0
  137. package/demos/webmap-checker-sapper/src/routes/auth/exchange-token.js +20 -0
  138. package/demos/webmap-checker-sapper/src/routes/auth/post-sign-in.js +24 -0
  139. package/demos/webmap-checker-sapper/src/routes/auth/sign-out.js +10 -0
  140. package/demos/webmap-checker-sapper/src/routes/index.html +20 -0
  141. package/demos/webmap-checker-sapper/src/routes/webmaps/[webmapId].html +83 -0
  142. package/demos/webmap-checker-sapper/src/routes/webmaps/index.html +59 -0
  143. package/demos/webmap-checker-sapper/src/server.js +102 -0
  144. package/demos/webmap-checker-sapper/src/service-worker.js +82 -0
  145. package/demos/webmap-checker-sapper/src/template.html +33 -0
  146. package/demos/webmap-checker-sapper/src/userInfoMiddleware.js +21 -0
  147. package/demos/webmap-checker-sapper/src/utils.js +33 -0
  148. package/demos/webmap-checker-sapper/static/favicon.png +0 -0
  149. package/demos/webmap-checker-sapper/static/global.css +36 -0
  150. package/demos/webmap-checker-sapper/static/manifest.json +20 -0
  151. package/demos/webmap-checker-sapper/static/svelte-logo-192.png +0 -0
  152. package/demos/webmap-checker-sapper/static/svelte-logo-512.png +0 -0
  153. package/docs/.eslintrc.js +12 -0
  154. package/docs/FAQ.md +48 -0
  155. package/docs/HISTORY.md +62 -0
  156. package/docs/acetate.config.js +262 -0
  157. package/docs/build-typedoc.js +434 -0
  158. package/docs/generate-srihashes.js +61 -0
  159. package/docs/package.json +3 -0
  160. package/docs/src/_layout.html +86 -0
  161. package/docs/src/api/_declaration.html +600 -0
  162. package/docs/src/api/_layout.html +204 -0
  163. package/docs/src/api/_package.html +38 -0
  164. package/docs/src/api/index.html +16 -0
  165. package/docs/src/guides/_layout.html +24 -0
  166. package/docs/src/guides/amd-requirejs-dojo.md +40 -0
  167. package/docs/src/guides/browser-authentication.md +39 -0
  168. package/docs/src/guides/bundlers.md +52 -0
  169. package/docs/src/guides/cli-authentication.md +9 -0
  170. package/docs/src/guides/client-server-authentication.md +9 -0
  171. package/docs/src/guides/embedded-apps.md +106 -0
  172. package/docs/src/guides/from-a-cdn.md +38 -0
  173. package/docs/src/guides/index.md +59 -0
  174. package/docs/src/guides/node.md +84 -0
  175. package/docs/src/guides/package-overview.md +111 -0
  176. package/docs/src/guides/server-authentication.md +9 -0
  177. package/docs/src/guides/whats-new-v2-0.md +305 -0
  178. package/docs/src/img/icons.png +0 -0
  179. package/docs/src/img/icons@2x.png +0 -0
  180. package/docs/src/img/oauth-browser.png +0 -0
  181. package/docs/src/index.html +12 -0
  182. package/docs/src/js/api-search.js +112 -0
  183. package/docs/src/js/nav-toggle.js +41 -0
  184. package/docs/src/sass/_highlight.scss +96 -0
  185. package/docs/src/sass/_icons.scss +157 -0
  186. package/docs/src/sass/style.scss +242 -0
  187. package/jasmine.json +7 -0
  188. package/jasmine.live.json +7 -0
  189. package/karma.conf.cjs +128 -0
  190. package/package.json +87 -0
  191. package/packages/arcgis-rest-auth/CHANGELOG.md +80 -0
  192. package/packages/arcgis-rest-auth/README.md +71 -0
  193. package/packages/arcgis-rest-auth/package.json +66 -0
  194. package/packages/arcgis-rest-auth/src/index.ts +34 -0
  195. package/packages/arcgis-rest-auth/tsconfig.json +6 -0
  196. package/packages/arcgis-rest-demographics/CHANGELOG.md +14 -0
  197. package/packages/arcgis-rest-demographics/README.md +74 -0
  198. package/packages/arcgis-rest-demographics/package.json +69 -0
  199. package/packages/arcgis-rest-demographics/src/getAvailableCountries.ts +113 -0
  200. package/packages/arcgis-rest-demographics/src/getAvailableDataCollections.ts +161 -0
  201. package/packages/arcgis-rest-demographics/src/getAvailableGeographyLevels.ts +86 -0
  202. package/packages/arcgis-rest-demographics/src/getGeography.ts +152 -0
  203. package/packages/arcgis-rest-demographics/src/helpers.ts +27 -0
  204. package/packages/arcgis-rest-demographics/src/index.ts +16 -0
  205. package/packages/arcgis-rest-demographics/src/queryDemographicData.ts +108 -0
  206. package/packages/arcgis-rest-demographics/test/getAvailableCountries.test.ts +89 -0
  207. package/packages/arcgis-rest-demographics/test/getAvailableDataCollections.test.ts +114 -0
  208. package/packages/arcgis-rest-demographics/test/getAvailableGeographyLevels.test.ts +69 -0
  209. package/packages/arcgis-rest-demographics/test/getGeography.test.ts +150 -0
  210. package/packages/arcgis-rest-demographics/test/mocks/responses.ts +4 -0
  211. package/packages/arcgis-rest-demographics/test/queryDemographicData.test.live.ts +50 -0
  212. package/packages/arcgis-rest-demographics/test/queryDemographicData.test.ts +127 -0
  213. package/packages/arcgis-rest-demographics/tsconfig.json +6 -0
  214. package/packages/arcgis-rest-feature-service/CHANGELOG.md +44 -0
  215. package/packages/arcgis-rest-feature-service/README.md +75 -0
  216. package/packages/arcgis-rest-feature-service/package.json +70 -0
  217. package/packages/arcgis-rest-feature-service/src/add.ts +55 -0
  218. package/packages/arcgis-rest-feature-service/src/addAttachment.ts +53 -0
  219. package/packages/arcgis-rest-feature-service/src/addToServiceDefinition.ts +74 -0
  220. package/packages/arcgis-rest-feature-service/src/applyEdits.ts +94 -0
  221. package/packages/arcgis-rest-feature-service/src/createFeatureService.ts +191 -0
  222. package/packages/arcgis-rest-feature-service/src/decodeValues.ts +126 -0
  223. package/packages/arcgis-rest-feature-service/src/delete.ts +62 -0
  224. package/packages/arcgis-rest-feature-service/src/deleteAttachments.ts +52 -0
  225. package/packages/arcgis-rest-feature-service/src/getAllLayersAndTables.ts +30 -0
  226. package/packages/arcgis-rest-feature-service/src/getAttachments.ts +55 -0
  227. package/packages/arcgis-rest-feature-service/src/getLayer.ts +23 -0
  228. package/packages/arcgis-rest-feature-service/src/getService.ts +25 -0
  229. package/packages/arcgis-rest-feature-service/src/getServiceAdminInfo.ts +33 -0
  230. package/packages/arcgis-rest-feature-service/src/getViewSources.ts +19 -0
  231. package/packages/arcgis-rest-feature-service/src/helpers.ts +768 -0
  232. package/packages/arcgis-rest-feature-service/src/index.ts +37 -0
  233. package/packages/arcgis-rest-feature-service/src/query.ts +200 -0
  234. package/packages/arcgis-rest-feature-service/src/queryRelated.ts +86 -0
  235. package/packages/arcgis-rest-feature-service/src/update.ts +65 -0
  236. package/packages/arcgis-rest-feature-service/src/updateAttachment.ts +59 -0
  237. package/packages/arcgis-rest-feature-service/src/updateServiceDefinition.ts +53 -0
  238. package/packages/arcgis-rest-feature-service/test/addToServiceDefinition.test.ts +350 -0
  239. package/packages/arcgis-rest-feature-service/test/attachments.test.ts +188 -0
  240. package/packages/arcgis-rest-feature-service/test/createFeatureService.test.ts +279 -0
  241. package/packages/arcgis-rest-feature-service/test/crud.test.ts +196 -0
  242. package/packages/arcgis-rest-feature-service/test/decodeValues.test.ts +66 -0
  243. package/packages/arcgis-rest-feature-service/test/getAllLayersAndTables.test.ts +27 -0
  244. package/packages/arcgis-rest-feature-service/test/getLayer.test.ts +30 -0
  245. package/packages/arcgis-rest-feature-service/test/getService.test.ts +30 -0
  246. package/packages/arcgis-rest-feature-service/test/getServiceAdminInfo.test.ts +41 -0
  247. package/packages/arcgis-rest-feature-service/test/getViewSources.test.ts +45 -0
  248. package/packages/arcgis-rest-feature-service/test/helpers.test.ts +27 -0
  249. package/packages/arcgis-rest-feature-service/test/mocks/allLayersAndTablesResponse.ts +950 -0
  250. package/packages/arcgis-rest-feature-service/test/mocks/cvdQueryResponse.ts +225 -0
  251. package/packages/arcgis-rest-feature-service/test/mocks/feature.ts +302 -0
  252. package/packages/arcgis-rest-feature-service/test/mocks/fields.ts +779 -0
  253. package/packages/arcgis-rest-feature-service/test/mocks/foo.txt +1 -0
  254. package/packages/arcgis-rest-feature-service/test/mocks/layerDefinition.ts +80 -0
  255. package/packages/arcgis-rest-feature-service/test/mocks/service.ts +476 -0
  256. package/packages/arcgis-rest-feature-service/test/query.test.ts +166 -0
  257. package/packages/arcgis-rest-feature-service/test/updateServiceDefinition.test.ts +103 -0
  258. package/packages/arcgis-rest-feature-service/tsconfig.json +9 -0
  259. package/packages/arcgis-rest-fetch/README.md +17 -0
  260. package/packages/arcgis-rest-fetch/browser-ponyfill.js +8 -0
  261. package/packages/arcgis-rest-fetch/browser-ponyfill.mjs +8 -0
  262. package/packages/arcgis-rest-fetch/index.types.d.ts +8 -0
  263. package/packages/arcgis-rest-fetch/node-ponyfill.js +10 -0
  264. package/packages/arcgis-rest-fetch/node-ponyfill.mjs +10 -0
  265. package/packages/arcgis-rest-fetch/package.json +21 -0
  266. package/packages/arcgis-rest-form-data/README.md +15 -0
  267. package/packages/arcgis-rest-form-data/browser-ponyfill.js +5 -0
  268. package/packages/arcgis-rest-form-data/browser-ponyfill.mjs +3 -0
  269. package/packages/arcgis-rest-form-data/index.types.d.ts +9 -0
  270. package/packages/arcgis-rest-form-data/node-ponyfill.js +7 -0
  271. package/packages/arcgis-rest-form-data/node-ponyfill.mjs +5 -0
  272. package/packages/arcgis-rest-form-data/package.json +21 -0
  273. package/packages/arcgis-rest-geocoding/CHANGELOG.md +26 -0
  274. package/packages/arcgis-rest-geocoding/README.md +85 -0
  275. package/packages/arcgis-rest-geocoding/package.json +69 -0
  276. package/packages/arcgis-rest-geocoding/src/bulk.ts +106 -0
  277. package/packages/arcgis-rest-geocoding/src/geocode.ts +169 -0
  278. package/packages/arcgis-rest-geocoding/src/helpers.ts +56 -0
  279. package/packages/arcgis-rest-geocoding/src/index.ts +17 -0
  280. package/packages/arcgis-rest-geocoding/src/reverse.ts +82 -0
  281. package/packages/arcgis-rest-geocoding/src/suggest.ts +45 -0
  282. package/packages/arcgis-rest-geocoding/test/bulk.test.ts +193 -0
  283. package/packages/arcgis-rest-geocoding/test/geocode.test.ts +254 -0
  284. package/packages/arcgis-rest-geocoding/test/helpers.test.ts +85 -0
  285. package/packages/arcgis-rest-geocoding/test/mocks/responses.ts +1031 -0
  286. package/packages/arcgis-rest-geocoding/test/reverse.test.ts +124 -0
  287. package/packages/arcgis-rest-geocoding/test/suggest.test.ts +53 -0
  288. package/packages/arcgis-rest-geocoding/tsconfig.json +6 -0
  289. package/packages/arcgis-rest-portal/CHANGELOG.md +73 -0
  290. package/packages/arcgis-rest-portal/README.md +72 -0
  291. package/packages/arcgis-rest-portal/package.json +68 -0
  292. package/packages/arcgis-rest-portal/src/groups/add-users.ts +140 -0
  293. package/packages/arcgis-rest-portal/src/groups/create.ts +42 -0
  294. package/packages/arcgis-rest-portal/src/groups/get.ts +187 -0
  295. package/packages/arcgis-rest-portal/src/groups/helpers.ts +14 -0
  296. package/packages/arcgis-rest-portal/src/groups/invite-users.ts +141 -0
  297. package/packages/arcgis-rest-portal/src/groups/join.ts +57 -0
  298. package/packages/arcgis-rest-portal/src/groups/notification.ts +77 -0
  299. package/packages/arcgis-rest-portal/src/groups/protect.ts +56 -0
  300. package/packages/arcgis-rest-portal/src/groups/remove-users.ts +84 -0
  301. package/packages/arcgis-rest-portal/src/groups/remove.ts +32 -0
  302. package/packages/arcgis-rest-portal/src/groups/search.ts +48 -0
  303. package/packages/arcgis-rest-portal/src/groups/update-user-membership.ts +63 -0
  304. package/packages/arcgis-rest-portal/src/groups/update.ts +39 -0
  305. package/packages/arcgis-rest-portal/src/helpers.ts +83 -0
  306. package/packages/arcgis-rest-portal/src/index.ts +68 -0
  307. package/packages/arcgis-rest-portal/src/items/add.ts +145 -0
  308. package/packages/arcgis-rest-portal/src/items/content.ts +70 -0
  309. package/packages/arcgis-rest-portal/src/items/create.ts +149 -0
  310. package/packages/arcgis-rest-portal/src/items/export.ts +92 -0
  311. package/packages/arcgis-rest-portal/src/items/get.ts +444 -0
  312. package/packages/arcgis-rest-portal/src/items/helpers.ts +272 -0
  313. package/packages/arcgis-rest-portal/src/items/protect.ts +41 -0
  314. package/packages/arcgis-rest-portal/src/items/reassign.ts +59 -0
  315. package/packages/arcgis-rest-portal/src/items/remove.ts +139 -0
  316. package/packages/arcgis-rest-portal/src/items/search.ts +25 -0
  317. package/packages/arcgis-rest-portal/src/items/update.ts +188 -0
  318. package/packages/arcgis-rest-portal/src/items/upload.ts +124 -0
  319. package/packages/arcgis-rest-portal/src/orgs/notification.ts +148 -0
  320. package/packages/arcgis-rest-portal/src/services/get-unique-service-name.ts +35 -0
  321. package/packages/arcgis-rest-portal/src/services/is-service-name-available.ts +29 -0
  322. package/packages/arcgis-rest-portal/src/sharing/access.ts +84 -0
  323. package/packages/arcgis-rest-portal/src/sharing/helpers.ts +80 -0
  324. package/packages/arcgis-rest-portal/src/sharing/is-item-shared-with-group.ts +42 -0
  325. package/packages/arcgis-rest-portal/src/sharing/share-item-with-group.ts +335 -0
  326. package/packages/arcgis-rest-portal/src/sharing/unshare-item-with-group.ts +114 -0
  327. package/packages/arcgis-rest-portal/src/users/get-user-tags.ts +52 -0
  328. package/packages/arcgis-rest-portal/src/users/get-user-url.ts +18 -0
  329. package/packages/arcgis-rest-portal/src/users/get-user.ts +60 -0
  330. package/packages/arcgis-rest-portal/src/users/invitation.ts +157 -0
  331. package/packages/arcgis-rest-portal/src/users/notification.ts +67 -0
  332. package/packages/arcgis-rest-portal/src/users/search-users.ts +35 -0
  333. package/packages/arcgis-rest-portal/src/users/update.ts +63 -0
  334. package/packages/arcgis-rest-portal/src/util/SearchQueryBuilder.ts +391 -0
  335. package/packages/arcgis-rest-portal/src/util/array.ts +16 -0
  336. package/packages/arcgis-rest-portal/src/util/generic-search.ts +111 -0
  337. package/packages/arcgis-rest-portal/src/util/get-portal-settings.ts +44 -0
  338. package/packages/arcgis-rest-portal/src/util/get-portal-url.ts +32 -0
  339. package/packages/arcgis-rest-portal/src/util/get-portal.ts +53 -0
  340. package/packages/arcgis-rest-portal/src/util/get-subscription-info.ts +43 -0
  341. package/packages/arcgis-rest-portal/src/util/scrub-control-chars.ts +13 -0
  342. package/packages/arcgis-rest-portal/src/util/search.ts +48 -0
  343. package/packages/arcgis-rest-portal/test/groups/add-users.test.ts +238 -0
  344. package/packages/arcgis-rest-portal/test/groups/crud.test.ts +183 -0
  345. package/packages/arcgis-rest-portal/test/groups/get.test.ts +174 -0
  346. package/packages/arcgis-rest-portal/test/groups/invite-users.test.ts +146 -0
  347. package/packages/arcgis-rest-portal/test/groups/join.test.ts +71 -0
  348. package/packages/arcgis-rest-portal/test/groups/notification.test.ts +111 -0
  349. package/packages/arcgis-rest-portal/test/groups/protect.test.ts +71 -0
  350. package/packages/arcgis-rest-portal/test/groups/remove-users.test.ts +140 -0
  351. package/packages/arcgis-rest-portal/test/groups/search.test.ts +151 -0
  352. package/packages/arcgis-rest-portal/test/groups/update-user-membership.test.ts +64 -0
  353. package/packages/arcgis-rest-portal/test/items/add.test.ts +320 -0
  354. package/packages/arcgis-rest-portal/test/items/content.test.ts +161 -0
  355. package/packages/arcgis-rest-portal/test/items/create.test.ts +404 -0
  356. package/packages/arcgis-rest-portal/test/items/export.test.ts +115 -0
  357. package/packages/arcgis-rest-portal/test/items/get.test.ts +606 -0
  358. package/packages/arcgis-rest-portal/test/items/helpers.test.ts +60 -0
  359. package/packages/arcgis-rest-portal/test/items/protect.test.ts +120 -0
  360. package/packages/arcgis-rest-portal/test/items/reassign.test.ts +130 -0
  361. package/packages/arcgis-rest-portal/test/items/remove.test.ts +259 -0
  362. package/packages/arcgis-rest-portal/test/items/search.test.ts +274 -0
  363. package/packages/arcgis-rest-portal/test/items/update.test.ts +549 -0
  364. package/packages/arcgis-rest-portal/test/items/upload.test.ts +286 -0
  365. package/packages/arcgis-rest-portal/test/mocks/groups/responses.ts +208 -0
  366. package/packages/arcgis-rest-portal/test/mocks/items/foo.zip +0 -0
  367. package/packages/arcgis-rest-portal/test/mocks/items/item.ts +526 -0
  368. package/packages/arcgis-rest-portal/test/mocks/items/resources.ts +38 -0
  369. package/packages/arcgis-rest-portal/test/mocks/items/search.ts +121 -0
  370. package/packages/arcgis-rest-portal/test/mocks/portal/response.ts +126 -0
  371. package/packages/arcgis-rest-portal/test/mocks/portal/settings-response.ts +56 -0
  372. package/packages/arcgis-rest-portal/test/mocks/sharing/sharing.ts +18 -0
  373. package/packages/arcgis-rest-portal/test/mocks/users/invitation.ts +70 -0
  374. package/packages/arcgis-rest-portal/test/mocks/users/notification.ts +34 -0
  375. package/packages/arcgis-rest-portal/test/mocks/users/user-search.ts +388 -0
  376. package/packages/arcgis-rest-portal/test/mocks/users/user-tags.ts +5 -0
  377. package/packages/arcgis-rest-portal/test/mocks/users/user.ts +174 -0
  378. package/packages/arcgis-rest-portal/test/orgs/notification.test.ts +142 -0
  379. package/packages/arcgis-rest-portal/test/services/get-unique-service-name.test.ts +64 -0
  380. package/packages/arcgis-rest-portal/test/services/is-service-name-available.test.ts +41 -0
  381. package/packages/arcgis-rest-portal/test/sharing/access.test.ts +162 -0
  382. package/packages/arcgis-rest-portal/test/sharing/helpers.test.ts +55 -0
  383. package/packages/arcgis-rest-portal/test/sharing/share-item-with-group.test.ts +1328 -0
  384. package/packages/arcgis-rest-portal/test/sharing/unshare-item-with-group.test.ts +288 -0
  385. package/packages/arcgis-rest-portal/test/users/get-user-tags.test.ts +71 -0
  386. package/packages/arcgis-rest-portal/test/users/get-user-url.test.ts +40 -0
  387. package/packages/arcgis-rest-portal/test/users/get-user.test.ts +90 -0
  388. package/packages/arcgis-rest-portal/test/users/invitation.test.ts +126 -0
  389. package/packages/arcgis-rest-portal/test/users/notification.test.ts +76 -0
  390. package/packages/arcgis-rest-portal/test/users/search.test.ts +41 -0
  391. package/packages/arcgis-rest-portal/test/users/update.test.ts +150 -0
  392. package/packages/arcgis-rest-portal/test/util/SearchQueryBuilder.test.ts +295 -0
  393. package/packages/arcgis-rest-portal/test/util/array.test.ts +33 -0
  394. package/packages/arcgis-rest-portal/test/util/get-portal-settings.test.ts +57 -0
  395. package/packages/arcgis-rest-portal/test/util/get-portal-url.test.ts +37 -0
  396. package/packages/arcgis-rest-portal/test/util/portal.test.ts +137 -0
  397. package/packages/arcgis-rest-portal/test/util/scrub-control-chars.test.ts +25 -0
  398. package/packages/arcgis-rest-portal/tsconfig.json +6 -0
  399. package/packages/arcgis-rest-request/README.md +72 -0
  400. package/packages/arcgis-rest-request/package.json +69 -0
  401. package/packages/arcgis-rest-request/post-message-auth-spec.md +70 -0
  402. package/packages/arcgis-rest-request/src/ApiKeyManager.ts +60 -0
  403. package/packages/arcgis-rest-request/src/ApplicationCredentialsManager.ts +141 -0
  404. package/packages/arcgis-rest-request/src/ArcGISIdentityManager.ts +1470 -0
  405. package/packages/arcgis-rest-request/src/app-tokens.ts +132 -0
  406. package/packages/arcgis-rest-request/src/authenticated-request-options.ts +23 -0
  407. package/packages/arcgis-rest-request/src/federation-utils.ts +88 -0
  408. package/packages/arcgis-rest-request/src/fetch-token.ts +48 -0
  409. package/packages/arcgis-rest-request/src/generate-token.ts +32 -0
  410. package/packages/arcgis-rest-request/src/index.ts +46 -0
  411. package/packages/arcgis-rest-request/src/request.ts +446 -0
  412. package/packages/arcgis-rest-request/src/revoke-token.ts +73 -0
  413. package/packages/arcgis-rest-request/src/types/feature.ts +42 -0
  414. package/packages/arcgis-rest-request/src/types/geometry.ts +239 -0
  415. package/packages/arcgis-rest-request/src/types/group.ts +72 -0
  416. package/packages/arcgis-rest-request/src/types/service.ts +87 -0
  417. package/packages/arcgis-rest-request/src/types/symbol.ts +21 -0
  418. package/packages/arcgis-rest-request/src/types/user.ts +49 -0
  419. package/packages/arcgis-rest-request/src/utils/ArcGISRequestError.ts +82 -0
  420. package/packages/arcgis-rest-request/src/utils/ErrorTypes.ts +29 -0
  421. package/packages/arcgis-rest-request/src/utils/GrantTypes.ts +5 -0
  422. package/packages/arcgis-rest-request/src/utils/HTTPMethods.ts +6 -0
  423. package/packages/arcgis-rest-request/src/utils/IAuthenticationManager.ts +22 -0
  424. package/packages/arcgis-rest-request/src/utils/IFetchTokenParams.ts +11 -0
  425. package/packages/arcgis-rest-request/src/utils/IGenerateTokenParams.ts +9 -0
  426. package/packages/arcgis-rest-request/src/utils/IParamBuilder.ts +3 -0
  427. package/packages/arcgis-rest-request/src/utils/IParams.ts +6 -0
  428. package/packages/arcgis-rest-request/src/utils/IParamsBuilder.ts +5 -0
  429. package/packages/arcgis-rest-request/src/utils/IRequestOptions.ts +59 -0
  430. package/packages/arcgis-rest-request/src/utils/ITokenRequestOptions.ts +9 -0
  431. package/packages/arcgis-rest-request/src/utils/ResponseFormats.ts +10 -0
  432. package/packages/arcgis-rest-request/src/utils/append-custom-params.ts +46 -0
  433. package/packages/arcgis-rest-request/src/utils/clean-url.ts +20 -0
  434. package/packages/arcgis-rest-request/src/utils/decode-query-string.ts +27 -0
  435. package/packages/arcgis-rest-request/src/utils/encode-form-data.ts +41 -0
  436. package/packages/arcgis-rest-request/src/utils/encode-query-string.ts +37 -0
  437. package/packages/arcgis-rest-request/src/utils/process-params.ts +109 -0
  438. package/packages/arcgis-rest-request/src/utils/retryAuthError.ts +10 -0
  439. package/packages/arcgis-rest-request/src/utils/warn.ts +11 -0
  440. package/packages/arcgis-rest-request/src/utils/with-options.ts +48 -0
  441. package/packages/arcgis-rest-request/src/validate-app-access.ts +69 -0
  442. package/packages/arcgis-rest-request/test/ApiKey.test.ts +53 -0
  443. package/packages/arcgis-rest-request/test/ApplicationSession.test.ts +148 -0
  444. package/packages/arcgis-rest-request/test/ArcGISIdentityManager.test.ts +2579 -0
  445. package/packages/arcgis-rest-request/test/app-tokens.test.ts +91 -0
  446. package/packages/arcgis-rest-request/test/federation-utils.test.ts +323 -0
  447. package/packages/arcgis-rest-request/test/fetchToken.test.ts +110 -0
  448. package/packages/arcgis-rest-request/test/generateToken.test.ts +40 -0
  449. package/packages/arcgis-rest-request/test/mocks/errors.ts +76 -0
  450. package/packages/arcgis-rest-request/test/mocks/geojson-feature-collection.ts +13 -0
  451. package/packages/arcgis-rest-request/test/mocks/param-builder.ts +7 -0
  452. package/packages/arcgis-rest-request/test/mocks/sharing-rest-info.ts +41 -0
  453. package/packages/arcgis-rest-request/test/mocks/webmap.ts +41 -0
  454. package/packages/arcgis-rest-request/test/request.test.ts +563 -0
  455. package/packages/arcgis-rest-request/test/revoke-token.test.ts +55 -0
  456. package/packages/arcgis-rest-request/test/utils/ArcGISAuthError.test.ts +196 -0
  457. package/packages/arcgis-rest-request/test/utils/ArcGISRequestError.test.ts +51 -0
  458. package/packages/arcgis-rest-request/test/utils/check-for-errors.test.ts +111 -0
  459. package/packages/arcgis-rest-request/test/utils/clean-url.test.ts +50 -0
  460. package/packages/arcgis-rest-request/test/utils/encode-form-data.test.ts +146 -0
  461. package/packages/arcgis-rest-request/test/utils/encode-query-string.test.ts +22 -0
  462. package/packages/arcgis-rest-request/test/utils/process-params.test.ts +205 -0
  463. package/packages/arcgis-rest-request/test/utils/with-options.test.ts +135 -0
  464. package/packages/arcgis-rest-request/test/validate-app-access.test.ts +44 -0
  465. package/packages/arcgis-rest-request/tsconfig.json +4 -0
  466. package/packages/arcgis-rest-routing/README.md +74 -0
  467. package/packages/arcgis-rest-routing/package.json +69 -0
  468. package/packages/arcgis-rest-routing/src/closestFacility.ts +223 -0
  469. package/packages/arcgis-rest-routing/src/helpers.ts +104 -0
  470. package/packages/arcgis-rest-routing/src/index.ts +20 -0
  471. package/packages/arcgis-rest-routing/src/originDestinationMatrix.ts +219 -0
  472. package/packages/arcgis-rest-routing/src/serviceArea.ts +169 -0
  473. package/packages/arcgis-rest-routing/src/solveRoute.ts +179 -0
  474. package/packages/arcgis-rest-routing/test/closestFacility.test.ts +686 -0
  475. package/packages/arcgis-rest-routing/test/mocks/inputs.ts +132 -0
  476. package/packages/arcgis-rest-routing/test/mocks/responses.ts +13316 -0
  477. package/packages/arcgis-rest-routing/test/originDestinationMatrix.test.ts +795 -0
  478. package/packages/arcgis-rest-routing/test/serviceArea.test.ts +601 -0
  479. package/packages/arcgis-rest-routing/test/solveRoute.test.ts +681 -0
  480. package/packages/arcgis-rest-routing/tsconfig.json +6 -0
  481. package/prettier-package-json.config.cjs +81 -0
  482. package/rollup.js +152 -0
  483. package/scripts/create-dist-package-jsons.js +17 -0
  484. package/scripts/deploy-doc-site.js +16 -0
  485. package/scripts/generate-sri-hashes.js +52 -0
  486. package/scripts/get-package-json.js +27 -0
  487. package/scripts/run-demo-server.js +21 -0
  488. package/scripts/test-helpers.ts +20 -0
  489. package/tsconfig.json +62 -0
  490. package/typedoc.json +14 -0
@@ -0,0 +1,1031 @@
1
+ /* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
2
+ * Apache-2.0 */
3
+
4
+ import { IGeocodeResponse } from "../../src/geocode.js";
5
+ import { ISuggestResponse } from "../../src/suggest.js";
6
+ import { IReverseGeocodeResponse } from "../../src/reverse.js";
7
+ import { IBulkGeocodeResponse } from "../../src/bulk.js";
8
+
9
+ export const FindAddressCandidates: any = {
10
+ spatialReference: { wkid: 4326, latestWkid: 4326 },
11
+ candidates: [
12
+ {
13
+ address: "LAX",
14
+ location: { x: -118.40896999999995, y: 33.942510000000027 },
15
+ score: 100,
16
+ attributes: {},
17
+ extent: {
18
+ xmin: -118.43396999999996,
19
+ ymin: 33.917510000000028,
20
+ xmax: -118.38396999999995,
21
+ ymax: 33.967510000000026
22
+ }
23
+ },
24
+ {
25
+ address: "LAX",
26
+ location: { x: -118.39223999999996, y: 33.945610000000045 },
27
+ score: 100,
28
+ attributes: {},
29
+ extent: {
30
+ xmin: -118.42923999999996,
31
+ ymin: 33.908610000000046,
32
+ xmax: -118.35523999999995,
33
+ ymax: 33.982610000000044
34
+ }
35
+ },
36
+ {
37
+ address: "Lax, Georgia",
38
+ location: { x: -83.121539999999982, y: 31.473250000000064 },
39
+ score: 100,
40
+ attributes: {},
41
+ extent: {
42
+ xmin: -83.141539999999978,
43
+ ymin: 31.453250000000065,
44
+ xmax: -83.101539999999986,
45
+ ymax: 31.493250000000064
46
+ }
47
+ },
48
+ {
49
+ address: "Lax, Wallis",
50
+ location: { x: 8.1173600000000761, y: 46.387720000000058 },
51
+ score: 100,
52
+ attributes: {},
53
+ extent: {
54
+ xmin: 8.0953600000000758,
55
+ ymin: 46.36572000000006,
56
+ xmax: 8.1393600000000763,
57
+ ymax: 46.409720000000057
58
+ }
59
+ },
60
+ {
61
+ address: "LAX, Georgia",
62
+ location: { x: -83.113229999999987, y: 31.478320000000053 },
63
+ score: 100,
64
+ attributes: {},
65
+ extent: {
66
+ xmin: -83.123229999999992,
67
+ ymin: 31.468320000000052,
68
+ xmax: -83.103229999999982,
69
+ ymax: 31.488320000000055
70
+ }
71
+ },
72
+ {
73
+ address: "Lax, Mouret, Aveyron, Occitanie",
74
+ location: { x: 2.5409300000000599, y: 44.507390000000044 },
75
+ score: 100,
76
+ attributes: {},
77
+ extent: {
78
+ xmin: 2.5309300000000601,
79
+ ymin: 44.497390000000046,
80
+ xmax: 2.5509300000000596,
81
+ ymax: 44.517390000000042
82
+ }
83
+ },
84
+ {
85
+ address: "Lax, Saint-Hippolyte, Aveyron, Occitanie",
86
+ location: { x: 2.604370000000074, y: 44.723100000000045 },
87
+ score: 100,
88
+ attributes: {},
89
+ extent: {
90
+ xmin: 2.5943700000000742,
91
+ ymin: 44.713100000000047,
92
+ xmax: 2.6143700000000738,
93
+ ymax: 44.733100000000043
94
+ }
95
+ },
96
+ {
97
+ address: "Lax, Baraqueville, Aveyron, Occitanie",
98
+ location: { x: 2.4934300000000462, y: 44.315860000000043 },
99
+ score: 100,
100
+ attributes: {},
101
+ extent: {
102
+ xmin: 2.4834300000000464,
103
+ ymin: 44.305860000000045,
104
+ xmax: 2.503430000000046,
105
+ ymax: 44.325860000000041
106
+ }
107
+ },
108
+ {
109
+ address: "Lax",
110
+ location: { x: 12.239340000000027, y: 48.030010000000061 },
111
+ score: 100,
112
+ attributes: {},
113
+ extent: {
114
+ xmin: 12.234340000000026,
115
+ ymin: 48.025010000000059,
116
+ xmax: 12.244340000000028,
117
+ ymax: 48.035010000000064
118
+ }
119
+ },
120
+ {
121
+ address: "Lax",
122
+ location: { x: -75.568029999999965, y: 6.180780000000027 },
123
+ score: 100,
124
+ attributes: {},
125
+ extent: {
126
+ xmin: -75.57302999999996,
127
+ ymin: 6.1757800000000271,
128
+ xmax: -75.563029999999969,
129
+ ymax: 6.1857800000000269
130
+ }
131
+ },
132
+ {
133
+ address: "Lax",
134
+ location: { x: -75.556379999999933, y: 6.1986100000000306 },
135
+ score: 100,
136
+ attributes: {},
137
+ extent: {
138
+ xmin: -75.561379999999929,
139
+ ymin: 6.1936100000000307,
140
+ xmax: -75.551379999999938,
141
+ ymax: 6.2036100000000305
142
+ }
143
+ },
144
+ {
145
+ address: "Lax",
146
+ location: { x: -75.565409999999986, y: 6.1981900000000678 },
147
+ score: 100,
148
+ attributes: {},
149
+ extent: {
150
+ xmin: -75.570409999999981,
151
+ ymin: 6.1931900000000679,
152
+ xmax: -75.56040999999999,
153
+ ymax: 6.2031900000000677
154
+ }
155
+ },
156
+ {
157
+ address: "Lax",
158
+ location: { x: -96.917359999999974, y: 19.528950000000066 },
159
+ score: 100,
160
+ attributes: {},
161
+ extent: {
162
+ xmin: -96.922359999999969,
163
+ ymin: 19.523950000000067,
164
+ xmax: -96.912359999999978,
165
+ ymax: 19.533950000000065
166
+ }
167
+ },
168
+ {
169
+ address: "Lax",
170
+ location: { x: -103.71520999999996, y: 19.256050000000073 },
171
+ score: 100,
172
+ attributes: {},
173
+ extent: {
174
+ xmin: -103.72020999999995,
175
+ ymin: 19.251050000000074,
176
+ xmax: -103.71020999999996,
177
+ ymax: 19.261050000000072
178
+ }
179
+ },
180
+ {
181
+ address: "Lax",
182
+ location: { x: 20.97431000000006, y: 42.008330000000058 },
183
+ score: 100,
184
+ attributes: {},
185
+ extent: {
186
+ xmin: 20.969310000000061,
187
+ ymin: 42.003330000000055,
188
+ xmax: 20.979310000000059,
189
+ ymax: 42.01333000000006
190
+ }
191
+ },
192
+ {
193
+ address: "Lax",
194
+ location: { x: -17.407549999999958, y: 65.967800000000068 },
195
+ score: 100,
196
+ attributes: {},
197
+ extent: {
198
+ xmin: -21.407549999999958,
199
+ ymin: 61.967800000000068,
200
+ xmax: -13.407549999999958,
201
+ ymax: 69.967800000000068
202
+ }
203
+ },
204
+ {
205
+ address: "Lax",
206
+ location: { x: -20.482389999999953, y: 64.107450000000028 },
207
+ score: 100,
208
+ attributes: {},
209
+ extent: {
210
+ xmin: -24.482389999999953,
211
+ ymin: 60.107450000000028,
212
+ xmax: -16.482389999999953,
213
+ ymax: 68.107450000000028
214
+ }
215
+ },
216
+ {
217
+ address: "Lax",
218
+ location: { x: 72.956330000000037, y: 19.170890000000043 },
219
+ score: 100,
220
+ attributes: {},
221
+ extent: {
222
+ xmin: 72.951330000000041,
223
+ ymin: 19.165890000000044,
224
+ xmax: 72.961330000000032,
225
+ ymax: 19.175890000000042
226
+ }
227
+ }
228
+ ]
229
+ };
230
+
231
+ export const FindAddressCandidates3857: any = {
232
+ spatialReference: { wkid: 102100, latestWkid: 3857 },
233
+ candidates: [
234
+ {
235
+ address: "LAX",
236
+ location: { x: -13181226.245756002, y: 4021085.133528708 },
237
+ score: 100,
238
+ attributes: {},
239
+ extent: {
240
+ xmin: -13184009.233025834,
241
+ ymin: 4017731.0054129288,
242
+ xmax: -13178443.25848617,
243
+ ymax: 4024440.2468070528
244
+ }
245
+ },
246
+ {
247
+ address: "LAX",
248
+ location: { x: -13179363.870675031, y: 4021501.1140443031 },
249
+ score: 100,
250
+ attributes: {},
251
+ extent: {
252
+ xmin: -13183482.691834381,
253
+ ymin: 4016537.1733597796,
254
+ xmax: -13175245.049515678,
255
+ ymax: 4026467.2129598851
256
+ }
257
+ },
258
+ {
259
+ address: "Lax, Georgia",
260
+ location: { x: -9253047.5067527182, y: 3694363.3876446122 },
261
+ score: 100,
262
+ attributes: {},
263
+ extent: {
264
+ xmin: -9255273.8965685833,
265
+ ymin: 3691753.2413776354,
266
+ xmax: -9250821.116936855,
267
+ ymax: 3696974.0917169792
268
+ }
269
+ },
270
+ {
271
+ address: "Lax, Wallis",
272
+ location: { x: 903620.38178569567, y: 5842700.8168161009 },
273
+ score: 100,
274
+ attributes: {},
275
+ extent: {
276
+ xmin: 901171.35298824357,
277
+ ymin: 5839151.0558100352,
278
+ xmax: 906069.41058314766,
279
+ ymax: 5846252.0087984027
280
+ }
281
+ },
282
+ {
283
+ address: "LAX, Georgia",
284
+ location: { x: -9252122.4417842273, y: 3695025.1483260384 },
285
+ score: 100,
286
+ attributes: {},
287
+ extent: {
288
+ xmin: -9253235.6366921607,
289
+ ymin: 3693719.9348085131,
290
+ xmax: -9251009.2468762938,
291
+ ymax: 3696330.5013301708
292
+ }
293
+ },
294
+ {
295
+ address: "Lax, Mouret, Aveyron, Occitanie",
296
+ location: { x: 282855.03374135931, y: 5544300.6600977806 },
297
+ score: 100,
298
+ attributes: {},
299
+ extent: {
300
+ xmin: 281741.83883342659,
301
+ ymin: 5542739.8611555723,
302
+ xmax: 283968.22864929202,
303
+ ymax: 5545861.726829391
304
+ }
305
+ },
306
+ {
307
+ address: "Lax, Saint-Hippolyte, Aveyron, Occitanie",
308
+ location: { x: 289917.14223728608, y: 5578034.0781470081 },
309
+ score: 100,
310
+ attributes: {},
311
+ extent: {
312
+ xmin: 288803.94732935342,
313
+ ymin: 5576467.4716463415,
314
+ xmax: 291030.33714521886,
315
+ ymax: 5579600.9554653689
316
+ }
317
+ },
318
+ {
319
+ address: "Lax, Baraqueville, Aveyron, Occitanie",
320
+ location: { x: 277567.35792867729, y: 5514453.0687185861 },
321
+ score: 100,
322
+ attributes: {},
323
+ extent: {
324
+ xmin: 276454.16302074457,
325
+ ymin: 5512897.3719480922,
326
+ xmax: 278680.55283660995,
327
+ ymax: 5516009.030624019
328
+ }
329
+ },
330
+ {
331
+ address: "Lax",
332
+ location: { x: 1362477.0964457479, y: 6111848.8824957125 },
333
+ score: 100,
334
+ attributes: {},
335
+ extent: {
336
+ xmin: 1361920.4989917814,
337
+ ymin: 6111016.6167508559,
338
+ xmax: 1363033.6938997144,
339
+ ymax: 6112681.2289920524
340
+ }
341
+ },
342
+ {
343
+ address: "Lax",
344
+ location: { x: -8412194.6198508162, y: 689379.63465026789 },
345
+ score: 100,
346
+ attributes: {},
347
+ extent: {
348
+ xmin: -8412751.2173047829,
349
+ ymin: 688819.78549905319,
350
+ xmax: -8411638.0223968513,
351
+ ymax: 689939.48909239401
352
+ }
353
+ },
354
+ {
355
+ address: "Lax",
356
+ location: { x: -8410897.7477830723, y: 691376.09982812416 },
357
+ score: 100,
358
+ attributes: {},
359
+ extent: {
360
+ xmin: -8411454.3452370372,
361
+ ymin: 690816.23178956239,
362
+ xmax: -8410341.1503291074,
363
+ ymax: 691935.97317315813
364
+ }
365
+ },
366
+ {
367
+ address: "Lax",
368
+ location: { x: -8411902.9627849404, y: 691329.07070880022 },
369
+ score: 100,
370
+ attributes: {},
371
+ extent: {
372
+ xmin: -8412459.5602389071,
373
+ ymin: 690769.20311578107,
374
+ xmax: -8411346.3653309755,
375
+ ymax: 691888.94360792264
376
+ }
377
+ },
378
+ {
379
+ address: "Lax",
380
+ location: { x: -10788791.164228376, y: 2217311.2852158318 },
381
+ score: 100,
382
+ attributes: {},
383
+ extent: {
384
+ xmin: -10789347.761682343,
385
+ ymin: 2216720.7229251787,
386
+ xmax: -10788234.566774411,
387
+ ymax: 2217901.86578603
388
+ }
389
+ },
390
+ {
391
+ address: "Lax",
392
+ location: { x: -11545524.364717431, y: 2185104.9715203405 },
393
+ score: 100,
394
+ attributes: {},
395
+ extent: {
396
+ xmin: -11546080.962171396,
397
+ ymin: 2184515.3984116013,
398
+ xmax: -11544967.767263465,
399
+ ymax: 2185694.5626025777
400
+ }
401
+ },
402
+ {
403
+ address: "Lax",
404
+ location: { x: 2334849.5089402725, y: 5162227.3193348181 },
405
+ score: 100,
406
+ attributes: {},
407
+ extent: {
408
+ xmin: 2334292.9114863062,
409
+ ymin: 5161478.2749526929,
410
+ xmax: 2335406.1063942388,
411
+ ymax: 5162976.4225926846
412
+ }
413
+ },
414
+ {
415
+ address: "Lax",
416
+ location: { x: -1937799.6019584446, y: 9868038.655359244 },
417
+ score: 100,
418
+ attributes: {},
419
+ extent: {
420
+ xmin: -2383077.565131539,
421
+ ymin: 8851511.6785163414,
422
+ xmax: -1492521.6387853504,
423
+ ymax: 11058243.401079001
424
+ }
425
+ },
426
+ {
427
+ address: "Lax",
428
+ location: { x: -2280089.2250292334, y: 9377102.5183685143 },
429
+ score: 100,
430
+ attributes: {},
431
+ extent: {
432
+ xmin: -2725367.1882023276,
433
+ ymin: 8423699.3995848913,
434
+ xmax: -1834811.2618561389,
435
+ ymax: 10479001.910809115
436
+ }
437
+ },
438
+ {
439
+ address: "Lax",
440
+ location: { x: 8121461.5057460321, y: 2175065.8116463651 },
441
+ score: 100,
442
+ attributes: {},
443
+ extent: {
444
+ xmin: 8120904.9082920672,
445
+ ymin: 2174476.5438052211,
446
+ xmax: 8122018.1031999979,
447
+ ymax: 2175655.0973659842
448
+ }
449
+ }
450
+ ]
451
+ };
452
+
453
+ export const FindAddressCandidatesNullExtent: IGeocodeResponse = {
454
+ spatialReference: {
455
+ wkid: 4326,
456
+ latestWkid: 4326
457
+ },
458
+ candidates: [
459
+ {
460
+ address: "LAX",
461
+ location: {
462
+ x: -118.40896999999995,
463
+ y: 33.942510000000027
464
+ },
465
+ score: 100,
466
+ attributes: {}
467
+ },
468
+ {
469
+ address: "LAX",
470
+ location: {
471
+ x: -118.39223999999996,
472
+ y: 33.945610000000045
473
+ },
474
+ score: 100,
475
+ attributes: {}
476
+ },
477
+ {
478
+ address: "Lax, Georgia",
479
+ location: {
480
+ x: -83.121539999999982,
481
+ y: 31.473250000000064
482
+ },
483
+ score: 100,
484
+ attributes: {}
485
+ }
486
+ ],
487
+ geoJson: {
488
+ type: "FeatureCollection",
489
+ features: []
490
+ }
491
+ };
492
+
493
+ export const Suggest: ISuggestResponse = {
494
+ suggestions: [
495
+ {
496
+ text: "LAX, Los Angeles, CA, USA",
497
+ magicKey:
498
+ "dHA9MCNsb2M9ODU0NzQzNCNsbmc9MzMjcGw9MzcyMzM5OCNsYnM9MTQ6MTQwODQ0MjY=",
499
+ isCollection: false
500
+ },
501
+ {
502
+ text: "LAX, W Century Blvd, Los Angeles, CA, 90045, USA",
503
+ magicKey:
504
+ "dHA9MCNsb2M9NTM2MDg5NyNsbmc9MzMjcGw9MTcyOTI5NCNsYnM9MTQ6MTQwODQ0MjY=",
505
+ isCollection: false
506
+ },
507
+ {
508
+ text: "Laxou, Meurthe-et-Moselle, Alsace-Champagne-Ardenne-Lorraine, FRA",
509
+ magicKey:
510
+ "dHA9MCNsb2M9MTI0NTI0ODMjbG5nPTQxI3BsPTYxMzg0NDAjbGJzPTE0OjE0NTM3NzIw",
511
+ isCollection: false
512
+ },
513
+ {
514
+ text: "Laxå, SWE",
515
+ magicKey:
516
+ "dHA9MCNsb2M9NDA5NTk3NTEjbG5nPTEzOCNwbD0zNzQzODEyNyNsYnM9MTQ6MTQ1Mzc4NjI=",
517
+ isCollection: false
518
+ },
519
+ {
520
+ text: "Laxmanchanda, Adilabad, Telangana, IND",
521
+ magicKey:
522
+ "dHA9MCNsb2M9MzExMDM2MzEjbG5nPTMzI3BsPTIyNjA1MDczI2xicz0xNDoxNDUyOTc5MA==",
523
+ isCollection: false
524
+ }
525
+ ]
526
+ };
527
+
528
+ export const ReverseGeocode: IReverseGeocodeResponse = {
529
+ address: {
530
+ Match_addr: "LA Airport",
531
+ LongLabel: "LA Airport, Los Angeles, CA, USA",
532
+ ShortLabel: "LA Airport",
533
+ Addr_type: "POI",
534
+ Type: "Airport",
535
+ PlaceName: "LA Airport",
536
+ AddNum: "",
537
+ Address: "",
538
+ Block: "",
539
+ Sector: "",
540
+ Neighborhood: "",
541
+ District: "",
542
+ City: "Los Angeles",
543
+ MetroArea: "",
544
+ Subregion: "Los Angeles County",
545
+ Region: "California",
546
+ Territory: "",
547
+ Postal: "",
548
+ PostalExt: "",
549
+ CountryCode: "USA"
550
+ },
551
+ location: {
552
+ x: -118.40896999999995,
553
+ y: 33.942510000000027,
554
+ spatialReference: {
555
+ wkid: 4326,
556
+ latestWkid: 4326
557
+ }
558
+ }
559
+ };
560
+
561
+ export const GeocodeAddresses: IBulkGeocodeResponse = {
562
+ spatialReference: { wkid: 4326, latestWkid: 4326 },
563
+ locations: [
564
+ {
565
+ address: "380 New York St, Redlands, California, 92373",
566
+ location: { x: -117.19567031799994, y: 34.056488119000051 },
567
+ score: 100,
568
+ attributes: {
569
+ ResultID: 1,
570
+ Loc_name: "World",
571
+ Status: "M",
572
+ Score: 100,
573
+ Match_addr: "380 New York St, Redlands, California, 92373",
574
+ LongLabel: "380 New York St, Redlands, CA, 92373, USA",
575
+ ShortLabel: "380 New York St",
576
+ Addr_type: "PointAddress",
577
+ Type: "",
578
+ PlaceName: "",
579
+ Place_addr: "380 New York St, Redlands, California, 92373",
580
+ Phone: "",
581
+ URL: "",
582
+ Rank: 20,
583
+ AddBldg: "",
584
+ AddNum: "380",
585
+ AddNumFrom: "",
586
+ AddNumTo: "",
587
+ AddRange: "",
588
+ Side: "R",
589
+ StPreDir: "",
590
+ StPreType: "",
591
+ StName: "New York",
592
+ StType: "St",
593
+ StDir: "",
594
+ BldgType: "",
595
+ BldgName: "",
596
+ LevelType: "",
597
+ LevelName: "",
598
+ UnitType: "",
599
+ UnitName: "",
600
+ SubAddr: "",
601
+ StAddr: "380 New York St",
602
+ Block: "",
603
+ Sector: "",
604
+ Nbrhd: "West Redlands",
605
+ District: "",
606
+ City: "Redlands",
607
+ MetroArea: "Inland Empire",
608
+ Subregion: "San Bernardino",
609
+ Region: "California",
610
+ RegionAbbr: "CA",
611
+ Territory: "",
612
+ Zone: "",
613
+ Postal: "92373",
614
+ PostalExt: "",
615
+ Country: "USA",
616
+ LangCode: "ENG",
617
+ Distance: 0,
618
+ X: -117.1956703176181,
619
+ Y: 34.056488119308924,
620
+ DisplayX: -117.1953135,
621
+ DisplayY: 34.056108000000009,
622
+ Xmin: -117.1963135,
623
+ Xmax: -117.19431349999999,
624
+ Ymin: 34.055108000000011,
625
+ Ymax: 34.057108000000007
626
+ }
627
+ },
628
+ {
629
+ address: "1 World Way, Los Angeles, California, 90045",
630
+ location: { x: -118.39751976799994, y: 33.944172212000069 },
631
+ score: 100,
632
+ attributes: {
633
+ ResultID: 2,
634
+ Loc_name: "World",
635
+ Status: "M",
636
+ Score: 100,
637
+ Match_addr: "1 World Way, Los Angeles, California, 90045",
638
+ LongLabel: "1 World Way, Los Angeles, CA, 90045, USA",
639
+ ShortLabel: "1 World Way",
640
+ Addr_type: "StreetAddress",
641
+ Type: "",
642
+ PlaceName: "",
643
+ Place_addr: "1 World Way, Los Angeles, California, 90045",
644
+ Phone: "",
645
+ URL: "",
646
+ Rank: 20,
647
+ AddBldg: "",
648
+ AddNum: "1",
649
+ AddNumFrom: "1",
650
+ AddNumTo: "57",
651
+ AddRange: "1-57",
652
+ Side: "R",
653
+ StPreDir: "",
654
+ StPreType: "",
655
+ StName: "World",
656
+ StType: "Way",
657
+ StDir: "",
658
+ BldgType: "",
659
+ BldgName: "",
660
+ LevelType: "",
661
+ LevelName: "",
662
+ UnitType: "",
663
+ UnitName: "",
664
+ SubAddr: "",
665
+ StAddr: "1 World Way",
666
+ Block: "",
667
+ Sector: "",
668
+ Nbrhd: "Westchester",
669
+ District: "",
670
+ City: "Los Angeles",
671
+ MetroArea: "Los Angeles Metro Area",
672
+ Subregion: "Los Angeles",
673
+ Region: "California",
674
+ RegionAbbr: "CA",
675
+ Territory: "",
676
+ Zone: "",
677
+ Postal: "90045",
678
+ PostalExt: "",
679
+ Country: "USA",
680
+ LangCode: "ENG",
681
+ Distance: 0,
682
+ X: -118.39751976816108,
683
+ Y: 33.944172211706103,
684
+ DisplayX: -118.39751976816108,
685
+ DisplayY: 33.944172211706103,
686
+ Xmin: -118.39851976816108,
687
+ Xmax: -118.39651976816107,
688
+ Ymin: 33.943172211706106,
689
+ Ymax: 33.945172211706101
690
+ }
691
+ },
692
+ {
693
+ address: "foo bar baz",
694
+ score: 0,
695
+ attributes: {} as any
696
+ }
697
+ ]
698
+ };
699
+
700
+ export const SharingInfo = {
701
+ currentVersion: 10.41,
702
+ serviceDescription: "Sample geocoder for San Diego, California, USA",
703
+ addressFields: [
704
+ {
705
+ name: "Address",
706
+ type: "esriFieldTypeString",
707
+ alias: "Address",
708
+ required: false,
709
+ length: 100
710
+ },
711
+ {
712
+ name: "Neighborhood",
713
+ type: "esriFieldTypeString",
714
+ alias: "Neighborhood",
715
+ required: false,
716
+ length: 50
717
+ },
718
+ {
719
+ name: "City",
720
+ type: "esriFieldTypeString",
721
+ alias: "City",
722
+ required: false,
723
+ length: 100
724
+ },
725
+ {
726
+ name: "Subregion",
727
+ type: "esriFieldTypeString",
728
+ alias: "Subregion",
729
+ required: false,
730
+ length: 50
731
+ },
732
+ {
733
+ name: "Region",
734
+ type: "esriFieldTypeString",
735
+ alias: "Region",
736
+ required: false,
737
+ length: 75
738
+ },
739
+ {
740
+ name: "Postal",
741
+ type: "esriFieldTypeString",
742
+ alias: "Postal",
743
+ required: false,
744
+ length: 15
745
+ },
746
+ {
747
+ name: "PostalExt",
748
+ type: "esriFieldTypeString",
749
+ alias: "PostalExt",
750
+ required: false,
751
+ length: 12
752
+ },
753
+ {
754
+ name: "Country",
755
+ type: "esriFieldTypeString",
756
+ alias: "Country",
757
+ required: false,
758
+ length: 50
759
+ }
760
+ ],
761
+ singleLineAddressField: {
762
+ name: "SingleLine",
763
+ type: "esriFieldTypeString",
764
+ alias: "Single Line Input",
765
+ required: false,
766
+ length: 250
767
+ },
768
+ candidateFields: [
769
+ {
770
+ name: "Loc_name",
771
+ type: "esriFieldTypeString",
772
+ alias: "Loc_name",
773
+ required: false,
774
+ length: 29
775
+ },
776
+ {
777
+ name: "Shape",
778
+ type: "esriFieldTypeGeometry",
779
+ alias: "Shape",
780
+ required: false
781
+ },
782
+ {
783
+ name: "Score",
784
+ type: "esriFieldTypeDouble",
785
+ alias: "Score",
786
+ required: false
787
+ },
788
+ {
789
+ name: "Match_addr",
790
+ type: "esriFieldTypeString",
791
+ alias: "Match_addr",
792
+ required: false,
793
+ length: 200
794
+ },
795
+ {
796
+ name: "Side",
797
+ type: "esriFieldTypeString",
798
+ alias: "Side",
799
+ required: false,
800
+ length: 1
801
+ },
802
+ {
803
+ name: "StAddr",
804
+ type: "esriFieldTypeString",
805
+ alias: "StAddr",
806
+ required: false,
807
+ length: 120
808
+ },
809
+ {
810
+ name: "AddNum",
811
+ type: "esriFieldTypeString",
812
+ alias: "AddNum",
813
+ required: false,
814
+ length: 12
815
+ },
816
+ {
817
+ name: "StPreDir",
818
+ type: "esriFieldTypeString",
819
+ alias: "StPreDir",
820
+ required: false,
821
+ length: 20
822
+ },
823
+ {
824
+ name: "StPreType",
825
+ type: "esriFieldTypeString",
826
+ alias: "StPreType",
827
+ required: false,
828
+ length: 20
829
+ },
830
+ {
831
+ name: "StName",
832
+ type: "esriFieldTypeString",
833
+ alias: "StName",
834
+ required: false,
835
+ length: 70
836
+ },
837
+ {
838
+ name: "StType",
839
+ type: "esriFieldTypeString",
840
+ alias: "StType",
841
+ required: false,
842
+ length: 20
843
+ },
844
+ {
845
+ name: "StDir",
846
+ type: "esriFieldTypeString",
847
+ alias: "StDir",
848
+ required: false,
849
+ length: 20
850
+ },
851
+ {
852
+ name: "City",
853
+ type: "esriFieldTypeString",
854
+ alias: "City",
855
+ required: false,
856
+ length: 120
857
+ },
858
+ {
859
+ name: "Region",
860
+ type: "esriFieldTypeString",
861
+ alias: "Region",
862
+ required: false,
863
+ length: 120
864
+ },
865
+ {
866
+ name: "Postal",
867
+ type: "esriFieldTypeString",
868
+ alias: "Postal",
869
+ required: false,
870
+ length: 10
871
+ },
872
+ {
873
+ name: "Country",
874
+ type: "esriFieldTypeString",
875
+ alias: "Country",
876
+ required: false,
877
+ length: 10
878
+ }
879
+ ],
880
+ intersectionCandidateFields: [
881
+ {
882
+ name: "Loc_name",
883
+ type: "esriFieldTypeString",
884
+ alias: "Loc_name",
885
+ required: false,
886
+ length: 29
887
+ },
888
+ {
889
+ name: "Shape",
890
+ type: "esriFieldTypeGeometry",
891
+ alias: "Shape",
892
+ required: false
893
+ },
894
+ {
895
+ name: "Score",
896
+ type: "esriFieldTypeDouble",
897
+ alias: "Score",
898
+ required: false
899
+ },
900
+ {
901
+ name: "Match_addr",
902
+ type: "esriFieldTypeString",
903
+ alias: "Match_addr",
904
+ required: false,
905
+ length: 200
906
+ },
907
+ {
908
+ name: "Side",
909
+ type: "esriFieldTypeString",
910
+ alias: "Side",
911
+ required: false,
912
+ length: 1
913
+ },
914
+ {
915
+ name: "StAddr",
916
+ type: "esriFieldTypeString",
917
+ alias: "StAddr",
918
+ required: false,
919
+ length: 120
920
+ },
921
+ {
922
+ name: "AddNum",
923
+ type: "esriFieldTypeString",
924
+ alias: "AddNum",
925
+ required: false,
926
+ length: 12
927
+ },
928
+ {
929
+ name: "StPreDir",
930
+ type: "esriFieldTypeString",
931
+ alias: "StPreDir",
932
+ required: false,
933
+ length: 20
934
+ },
935
+ {
936
+ name: "StPreType",
937
+ type: "esriFieldTypeString",
938
+ alias: "StPreType",
939
+ required: false,
940
+ length: 20
941
+ },
942
+ {
943
+ name: "StName",
944
+ type: "esriFieldTypeString",
945
+ alias: "StName",
946
+ required: false,
947
+ length: 70
948
+ },
949
+ {
950
+ name: "StType",
951
+ type: "esriFieldTypeString",
952
+ alias: "StType",
953
+ required: false,
954
+ length: 20
955
+ },
956
+ {
957
+ name: "StDir",
958
+ type: "esriFieldTypeString",
959
+ alias: "StDir",
960
+ required: false,
961
+ length: 20
962
+ },
963
+ {
964
+ name: "City",
965
+ type: "esriFieldTypeString",
966
+ alias: "City",
967
+ required: false,
968
+ length: 120
969
+ },
970
+ {
971
+ name: "Region",
972
+ type: "esriFieldTypeString",
973
+ alias: "Region",
974
+ required: false,
975
+ length: 120
976
+ },
977
+ {
978
+ name: "Postal",
979
+ type: "esriFieldTypeString",
980
+ alias: "Postal",
981
+ required: false,
982
+ length: 10
983
+ },
984
+ {
985
+ name: "Country",
986
+ type: "esriFieldTypeString",
987
+ alias: "Country",
988
+ required: false,
989
+ length: 10
990
+ }
991
+ ],
992
+ spatialReference: {
993
+ wkid: 4326,
994
+ latestWkid: 4326
995
+ },
996
+ locatorProperties: {
997
+ UICLSID: "{3D486637-6BCF-4A0C-83DB-A02D437FB8FC}",
998
+ IntersectionConnectors: "& @ | and",
999
+ SuggestedBatchSize: 150,
1000
+ MaxBatchSize: 1000,
1001
+ LoadBalancerTimeOut: 60,
1002
+ WriteXYCoordFields: "TRUE",
1003
+ WriteStandardizedAddressField: "FALSE",
1004
+ WriteReferenceIDField: "FALSE",
1005
+ WritePercentAlongField: "FALSE"
1006
+ },
1007
+ locators: [
1008
+ {
1009
+ name: "PointAddress"
1010
+ },
1011
+ {
1012
+ name: "StreetAddress"
1013
+ },
1014
+ {
1015
+ name: "PostalExt"
1016
+ },
1017
+ {
1018
+ name: "StreetName"
1019
+ },
1020
+ {
1021
+ name: "Postal"
1022
+ },
1023
+ {
1024
+ name: "Gazetteer"
1025
+ },
1026
+ {
1027
+ name: "AdminPlaces"
1028
+ }
1029
+ ],
1030
+ capabilities: "Geocode,ReverseGeocode,Suggest"
1031
+ };