impeditmaiores 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (421) hide show
  1. package/.prettierignore +2 -0
  2. package/.travis.yml +35 -0
  3. package/.vscode/launch.json +24 -0
  4. package/.vscode/settings.json +3 -0
  5. package/codecov.yml +7 -0
  6. package/demos/ago-node-cli/README.md +29 -0
  7. package/demos/ago-node-cli/ago.js +33 -0
  8. package/demos/ago-node-cli/index.js +11 -0
  9. package/demos/ago-node-cli/lib/item-export-command.js +48 -0
  10. package/demos/ago-node-cli/lib/item-search-command.js +35 -0
  11. package/demos/ago-node-cli/package-lock.json +152 -0
  12. package/demos/ago-node-cli/package.json +30 -0
  13. package/demos/attachments/README.md +5 -0
  14. package/demos/attachments/index.html +165 -0
  15. package/demos/attachments/package-lock.json +182 -0
  16. package/demos/attachments/package.json +18 -0
  17. package/demos/batch-geocoder-node/NYC_Restaurant_Inspection_Results.csv +100 -0
  18. package/demos/batch-geocoder-node/README.md +15 -0
  19. package/demos/batch-geocoder-node/batch-geocode.js +115 -0
  20. package/demos/batch-geocoder-node/config-template.js +18 -0
  21. package/demos/batch-geocoder-node/package-lock.json +81 -0
  22. package/demos/batch-geocoder-node/package.json +37 -0
  23. package/demos/express/README.md +15 -0
  24. package/demos/express/config.json.template +3 -0
  25. package/demos/express/package-lock.json +413 -0
  26. package/demos/express/package.json +18 -0
  27. package/demos/express/server.js +33 -0
  28. package/demos/feature-service-browser/README.md +6 -0
  29. package/demos/feature-service-browser/index.html +122 -0
  30. package/demos/feature-service-browser/package-lock.json +182 -0
  31. package/demos/feature-service-browser/package.json +18 -0
  32. package/demos/geocoder-browser/README.md +10 -0
  33. package/demos/geocoder-browser/config.js.template +1 -0
  34. package/demos/geocoder-browser/index.html +131 -0
  35. package/demos/geocoder-browser/package-lock.json +182 -0
  36. package/demos/geocoder-browser/package.json +19 -0
  37. package/demos/geocoder-browser/post-sign-in.html +25 -0
  38. package/demos/jsapi-integration/README.md +25 -0
  39. package/demos/jsapi-integration/config.js +6 -0
  40. package/demos/jsapi-integration/index.html +89 -0
  41. package/demos/jsapi-integration/package-lock.json +184 -0
  42. package/demos/jsapi-integration/package.json +19 -0
  43. package/demos/node-cli-item-management/README.md +10 -0
  44. package/demos/node-cli-item-management/index.js +238 -0
  45. package/demos/node-cli-item-management/package-lock.json +152 -0
  46. package/demos/node-cli-item-management/package.json +27 -0
  47. package/demos/node-cli-item-management/screenshot.png +0 -0
  48. package/demos/oauth2-browser/README.md +14 -0
  49. package/demos/oauth2-browser/authenticate.html +30 -0
  50. package/demos/oauth2-browser/config.js.template +6 -0
  51. package/demos/oauth2-browser/index.html +211 -0
  52. package/demos/oauth2-browser/logo.svg +4 -0
  53. package/demos/oauth2-browser/package-lock.json +224 -0
  54. package/demos/oauth2-browser/package.json +18 -0
  55. package/demos/oauth2-browser/style.css +36 -0
  56. package/demos/oauth2-browser-retry/README.md +25 -0
  57. package/demos/oauth2-browser-retry/authenticate.html +22 -0
  58. package/demos/oauth2-browser-retry/index.html +116 -0
  59. package/demos/oauth2-browser-retry/logo.svg +4 -0
  60. package/demos/stream-response-to-file/README.md +7 -0
  61. package/demos/stream-response-to-file/index.js +36 -0
  62. package/demos/stream-response-to-file/output/.gitkeep +0 -0
  63. package/demos/stream-response-to-file/package-lock.json +60 -0
  64. package/demos/stream-response-to-file/package.json +33 -0
  65. package/demos/tree-shaking-rollup/.babelrc +3 -0
  66. package/demos/tree-shaking-rollup/README.md +9 -0
  67. package/demos/tree-shaking-rollup/index.html +11 -0
  68. package/demos/tree-shaking-rollup/package-lock.json +2225 -0
  69. package/demos/tree-shaking-rollup/package.json +25 -0
  70. package/demos/tree-shaking-rollup/rollup.config.js +17 -0
  71. package/demos/tree-shaking-rollup/src/index.js +8 -0
  72. package/demos/tree-shaking-webpack/README.md +8 -0
  73. package/demos/tree-shaking-webpack/index.html +11 -0
  74. package/demos/tree-shaking-webpack/package-lock.json +4614 -0
  75. package/demos/tree-shaking-webpack/package.json +24 -0
  76. package/demos/tree-shaking-webpack/src/index.js +10 -0
  77. package/demos/tree-shaking-webpack/webpack.config.js +27 -0
  78. package/demos/vue/.env.example +11 -0
  79. package/demos/vue/.eslintrc.js +17 -0
  80. package/demos/vue/.postcssrc.js +5 -0
  81. package/demos/vue/README.md +17 -0
  82. package/demos/vue/babel.config.js +3 -0
  83. package/demos/vue/package-lock.json +11342 -0
  84. package/demos/vue/package.json +33 -0
  85. package/demos/vue/public/favicon.ico +0 -0
  86. package/demos/vue/public/index.html +24 -0
  87. package/demos/vue/src/assets/logo.svg +29 -0
  88. package/demos/vue/src/components/App.vue +305 -0
  89. package/demos/vue/src/components/Authenticate.vue +65 -0
  90. package/demos/vue/src/components/Loader.vue +230 -0
  91. package/demos/vue/src/main.js +92 -0
  92. package/demos/webmap-checker-sapper/.env.example +5 -0
  93. package/demos/webmap-checker-sapper/README.md +123 -0
  94. package/demos/webmap-checker-sapper/appveyor.yml +18 -0
  95. package/demos/webmap-checker-sapper/cypress/fixtures/example.json +5 -0
  96. package/demos/webmap-checker-sapper/cypress/integration/spec.js +19 -0
  97. package/demos/webmap-checker-sapper/cypress/plugins/index.js +17 -0
  98. package/demos/webmap-checker-sapper/cypress/support/commands.js +25 -0
  99. package/demos/webmap-checker-sapper/cypress/support/index.js +20 -0
  100. package/demos/webmap-checker-sapper/cypress.json +4 -0
  101. package/demos/webmap-checker-sapper/package-lock.json +3870 -0
  102. package/demos/webmap-checker-sapper/package.json +50 -0
  103. package/demos/webmap-checker-sapper/rollup.config.js +87 -0
  104. package/demos/webmap-checker-sapper/src/client.js +20 -0
  105. package/demos/webmap-checker-sapper/src/components/LayerStatus.html +108 -0
  106. package/demos/webmap-checker-sapper/src/components/Nav.html +21 -0
  107. package/demos/webmap-checker-sapper/src/components/WebMap.html +62 -0
  108. package/demos/webmap-checker-sapper/src/routes/_error.html +41 -0
  109. package/demos/webmap-checker-sapper/src/routes/_layout.html +21 -0
  110. package/demos/webmap-checker-sapper/src/routes/auth/authorize.js +18 -0
  111. package/demos/webmap-checker-sapper/src/routes/auth/exchange-token.js +20 -0
  112. package/demos/webmap-checker-sapper/src/routes/auth/post-sign-in.js +24 -0
  113. package/demos/webmap-checker-sapper/src/routes/auth/sign-out.js +10 -0
  114. package/demos/webmap-checker-sapper/src/routes/index.html +20 -0
  115. package/demos/webmap-checker-sapper/src/routes/webmaps/[webmapId].html +83 -0
  116. package/demos/webmap-checker-sapper/src/routes/webmaps/index.html +59 -0
  117. package/demos/webmap-checker-sapper/src/server.js +101 -0
  118. package/demos/webmap-checker-sapper/src/service-worker.js +82 -0
  119. package/demos/webmap-checker-sapper/src/template.html +33 -0
  120. package/demos/webmap-checker-sapper/src/userInfoMiddleware.js +21 -0
  121. package/demos/webmap-checker-sapper/src/utils.js +33 -0
  122. package/demos/webmap-checker-sapper/static/favicon.png +0 -0
  123. package/demos/webmap-checker-sapper/static/global.css +36 -0
  124. package/demos/webmap-checker-sapper/static/manifest.json +20 -0
  125. package/demos/webmap-checker-sapper/static/svelte-logo-192.png +0 -0
  126. package/demos/webmap-checker-sapper/static/svelte-logo-512.png +0 -0
  127. package/docs/FAQ.md +48 -0
  128. package/docs/HISTORY.md +62 -0
  129. package/docs/acetate.config.js +262 -0
  130. package/docs/build-typedoc.js +434 -0
  131. package/docs/generate-srihashes.js +53 -0
  132. package/docs/src/_layout.html +86 -0
  133. package/docs/src/api/_declaration.html +600 -0
  134. package/docs/src/api/_layout.html +204 -0
  135. package/docs/src/api/_package.html +38 -0
  136. package/docs/src/api/index.html +16 -0
  137. package/docs/src/guides/_layout.html +24 -0
  138. package/docs/src/guides/amd-requirejs-dojo.md +40 -0
  139. package/docs/src/guides/browser-authentication.md +41 -0
  140. package/docs/src/guides/bundlers.md +52 -0
  141. package/docs/src/guides/cli-authentication.md +9 -0
  142. package/docs/src/guides/client-server-authentication.md +9 -0
  143. package/docs/src/guides/embedded-apps.md +93 -0
  144. package/docs/src/guides/from-a-cdn.md +38 -0
  145. package/docs/src/guides/index.md +59 -0
  146. package/docs/src/guides/node.md +87 -0
  147. package/docs/src/guides/package-overview.md +111 -0
  148. package/docs/src/guides/server-authentication.md +9 -0
  149. package/docs/src/guides/whats-new-v2-0.md +305 -0
  150. package/docs/src/img/icons.png +0 -0
  151. package/docs/src/img/icons@2x.png +0 -0
  152. package/docs/src/index.html +12 -0
  153. package/docs/src/js/api-search.js +112 -0
  154. package/docs/src/js/nav-toggle.js +41 -0
  155. package/docs/src/sass/_highlight.scss +96 -0
  156. package/docs/src/sass/_icons.scss +157 -0
  157. package/docs/src/sass/style.scss +242 -0
  158. package/docs/src/srihashes.json +12 -0
  159. package/jasmine.json +7 -0
  160. package/karma.conf.js +106 -0
  161. package/lerna.json +8 -0
  162. package/notes/README.md +68 -0
  163. package/package.json +87 -0
  164. package/packages/arcgis-rest-auth/README.md +71 -0
  165. package/packages/arcgis-rest-auth/package-lock.json +11 -0
  166. package/packages/arcgis-rest-auth/package.json +69 -0
  167. package/packages/arcgis-rest-auth/src/ApplicationSession.ts +122 -0
  168. package/packages/arcgis-rest-auth/src/UserSession.ts +1206 -0
  169. package/packages/arcgis-rest-auth/src/app-tokens.ts +91 -0
  170. package/packages/arcgis-rest-auth/src/authenticated-request-options.ts +24 -0
  171. package/packages/arcgis-rest-auth/src/federation-utils.ts +85 -0
  172. package/packages/arcgis-rest-auth/src/fetch-token.ts +50 -0
  173. package/packages/arcgis-rest-auth/src/generate-token.ts +35 -0
  174. package/packages/arcgis-rest-auth/src/index.ts +9 -0
  175. package/packages/arcgis-rest-auth/src/validate-app-access.ts +68 -0
  176. package/packages/arcgis-rest-auth/test/ApplicationSession.test.ts +124 -0
  177. package/packages/arcgis-rest-auth/test/UserSession.test.ts +1807 -0
  178. package/packages/arcgis-rest-auth/test/app-tokens.test.ts +91 -0
  179. package/packages/arcgis-rest-auth/test/federation-utils.test.ts +323 -0
  180. package/packages/arcgis-rest-auth/test/fetchToken.test.ts +112 -0
  181. package/packages/arcgis-rest-auth/test/generateToken.test.ts +102 -0
  182. package/packages/arcgis-rest-auth/test/utils.ts +14 -0
  183. package/packages/arcgis-rest-auth/test/validate-app-access.test.ts +46 -0
  184. package/packages/arcgis-rest-auth/tsconfig.json +6 -0
  185. package/packages/arcgis-rest-feature-layer/README.md +77 -0
  186. package/packages/arcgis-rest-feature-layer/package-lock.json +11 -0
  187. package/packages/arcgis-rest-feature-layer/package.json +64 -0
  188. package/packages/arcgis-rest-feature-layer/src/add.ts +56 -0
  189. package/packages/arcgis-rest-feature-layer/src/addAttachment.ts +53 -0
  190. package/packages/arcgis-rest-feature-layer/src/applyEdits.ts +90 -0
  191. package/packages/arcgis-rest-feature-layer/src/decodeValues.ts +124 -0
  192. package/packages/arcgis-rest-feature-layer/src/delete.ts +61 -0
  193. package/packages/arcgis-rest-feature-layer/src/deleteAttachments.ts +52 -0
  194. package/packages/arcgis-rest-feature-layer/src/getAttachments.ts +55 -0
  195. package/packages/arcgis-rest-feature-layer/src/getLayer.ts +24 -0
  196. package/packages/arcgis-rest-feature-layer/src/getService.ts +26 -0
  197. package/packages/arcgis-rest-feature-layer/src/helpers.ts +79 -0
  198. package/packages/arcgis-rest-feature-layer/src/index.ts +31 -0
  199. package/packages/arcgis-rest-feature-layer/src/query.ts +204 -0
  200. package/packages/arcgis-rest-feature-layer/src/queryRelated.ts +89 -0
  201. package/packages/arcgis-rest-feature-layer/src/update.ts +56 -0
  202. package/packages/arcgis-rest-feature-layer/src/updateAttachment.ts +59 -0
  203. package/packages/arcgis-rest-feature-layer/test/attachments.test.ts +200 -0
  204. package/packages/arcgis-rest-feature-layer/test/crud.test.ts +195 -0
  205. package/packages/arcgis-rest-feature-layer/test/decodeValues.test.ts +67 -0
  206. package/packages/arcgis-rest-feature-layer/test/getLayer.test.ts +31 -0
  207. package/packages/arcgis-rest-feature-layer/test/getService.test.ts +31 -0
  208. package/packages/arcgis-rest-feature-layer/test/mocks/cvdQueryResponse.ts +225 -0
  209. package/packages/arcgis-rest-feature-layer/test/mocks/feature.ts +302 -0
  210. package/packages/arcgis-rest-feature-layer/test/mocks/fields.ts +779 -0
  211. package/packages/arcgis-rest-feature-layer/test/mocks/foo.txt +1 -0
  212. package/packages/arcgis-rest-feature-layer/test/mocks/service.ts +398 -0
  213. package/packages/arcgis-rest-feature-layer/test/query.test.ts +167 -0
  214. package/packages/arcgis-rest-feature-layer/tsconfig.json +6 -0
  215. package/packages/arcgis-rest-geocoding/README.md +86 -0
  216. package/packages/arcgis-rest-geocoding/package-lock.json +11 -0
  217. package/packages/arcgis-rest-geocoding/package.json +64 -0
  218. package/packages/arcgis-rest-geocoding/src/bulk.ts +104 -0
  219. package/packages/arcgis-rest-geocoding/src/geocode.ts +133 -0
  220. package/packages/arcgis-rest-geocoding/src/helpers.ts +54 -0
  221. package/packages/arcgis-rest-geocoding/src/index.ts +15 -0
  222. package/packages/arcgis-rest-geocoding/src/reverse.ts +84 -0
  223. package/packages/arcgis-rest-geocoding/src/suggest.ts +45 -0
  224. package/packages/arcgis-rest-geocoding/test/bulk.test.ts +194 -0
  225. package/packages/arcgis-rest-geocoding/test/geocode.test.ts +249 -0
  226. package/packages/arcgis-rest-geocoding/test/helpers.test.ts +85 -0
  227. package/packages/arcgis-rest-geocoding/test/mocks/responses.ts +637 -0
  228. package/packages/arcgis-rest-geocoding/test/reverse.test.ts +126 -0
  229. package/packages/arcgis-rest-geocoding/test/suggest.test.ts +53 -0
  230. package/packages/arcgis-rest-geocoding/tsconfig.json +6 -0
  231. package/packages/arcgis-rest-portal/README.md +73 -0
  232. package/packages/arcgis-rest-portal/package-lock.json +11 -0
  233. package/packages/arcgis-rest-portal/package.json +64 -0
  234. package/packages/arcgis-rest-portal/src/groups/add-users.ts +140 -0
  235. package/packages/arcgis-rest-portal/src/groups/create.ts +43 -0
  236. package/packages/arcgis-rest-portal/src/groups/get.ts +184 -0
  237. package/packages/arcgis-rest-portal/src/groups/helpers.ts +14 -0
  238. package/packages/arcgis-rest-portal/src/groups/invite-users.ts +127 -0
  239. package/packages/arcgis-rest-portal/src/groups/join.ts +57 -0
  240. package/packages/arcgis-rest-portal/src/groups/notification.ts +77 -0
  241. package/packages/arcgis-rest-portal/src/groups/protect.ts +56 -0
  242. package/packages/arcgis-rest-portal/src/groups/remove-users.ts +76 -0
  243. package/packages/arcgis-rest-portal/src/groups/remove.ts +32 -0
  244. package/packages/arcgis-rest-portal/src/groups/search.ts +47 -0
  245. package/packages/arcgis-rest-portal/src/groups/update-user-membership.ts +63 -0
  246. package/packages/arcgis-rest-portal/src/groups/update.ts +39 -0
  247. package/packages/arcgis-rest-portal/src/index.ts +66 -0
  248. package/packages/arcgis-rest-portal/src/items/add.ts +138 -0
  249. package/packages/arcgis-rest-portal/src/items/content.ts +67 -0
  250. package/packages/arcgis-rest-portal/src/items/create.ts +150 -0
  251. package/packages/arcgis-rest-portal/src/items/export.ts +80 -0
  252. package/packages/arcgis-rest-portal/src/items/get.ts +437 -0
  253. package/packages/arcgis-rest-portal/src/items/helpers.ts +275 -0
  254. package/packages/arcgis-rest-portal/src/items/protect.ts +41 -0
  255. package/packages/arcgis-rest-portal/src/items/reassign.ts +61 -0
  256. package/packages/arcgis-rest-portal/src/items/remove.ts +135 -0
  257. package/packages/arcgis-rest-portal/src/items/search.ts +25 -0
  258. package/packages/arcgis-rest-portal/src/items/update.ts +184 -0
  259. package/packages/arcgis-rest-portal/src/items/upload.ts +125 -0
  260. package/packages/arcgis-rest-portal/src/orgs/notification.ts +131 -0
  261. package/packages/arcgis-rest-portal/src/sharing/access.ts +84 -0
  262. package/packages/arcgis-rest-portal/src/sharing/helpers.ts +81 -0
  263. package/packages/arcgis-rest-portal/src/sharing/is-item-shared-with-group.ts +42 -0
  264. package/packages/arcgis-rest-portal/src/sharing/share-item-with-group.ts +319 -0
  265. package/packages/arcgis-rest-portal/src/sharing/unshare-item-with-group.ts +105 -0
  266. package/packages/arcgis-rest-portal/src/users/get-user-tags.ts +52 -0
  267. package/packages/arcgis-rest-portal/src/users/get-user-url.ts +18 -0
  268. package/packages/arcgis-rest-portal/src/users/get-user.ts +58 -0
  269. package/packages/arcgis-rest-portal/src/users/invitation.ts +156 -0
  270. package/packages/arcgis-rest-portal/src/users/notification.ts +68 -0
  271. package/packages/arcgis-rest-portal/src/users/search-users.ts +37 -0
  272. package/packages/arcgis-rest-portal/src/users/update.ts +66 -0
  273. package/packages/arcgis-rest-portal/src/util/SearchQueryBuilder.ts +374 -0
  274. package/packages/arcgis-rest-portal/src/util/array.ts +16 -0
  275. package/packages/arcgis-rest-portal/src/util/generic-search.ts +99 -0
  276. package/packages/arcgis-rest-portal/src/util/get-portal-settings.ts +45 -0
  277. package/packages/arcgis-rest-portal/src/util/get-portal-url.ts +27 -0
  278. package/packages/arcgis-rest-portal/src/util/get-portal.ts +52 -0
  279. package/packages/arcgis-rest-portal/src/util/get-subscription-info.ts +43 -0
  280. package/packages/arcgis-rest-portal/src/util/scrub-control-chars.ts +12 -0
  281. package/packages/arcgis-rest-portal/src/util/search.ts +42 -0
  282. package/packages/arcgis-rest-portal/test/groups/add-users.test.ts +239 -0
  283. package/packages/arcgis-rest-portal/test/groups/crud.test.ts +180 -0
  284. package/packages/arcgis-rest-portal/test/groups/get.test.ts +176 -0
  285. package/packages/arcgis-rest-portal/test/groups/invite-users.test.ts +149 -0
  286. package/packages/arcgis-rest-portal/test/groups/join.test.ts +72 -0
  287. package/packages/arcgis-rest-portal/test/groups/notification.test.ts +112 -0
  288. package/packages/arcgis-rest-portal/test/groups/protect.test.ts +72 -0
  289. package/packages/arcgis-rest-portal/test/groups/remove-users.test.ts +140 -0
  290. package/packages/arcgis-rest-portal/test/groups/search.test.ts +151 -0
  291. package/packages/arcgis-rest-portal/test/groups/update-user-membership.test.ts +62 -0
  292. package/packages/arcgis-rest-portal/test/items/add.test.ts +323 -0
  293. package/packages/arcgis-rest-portal/test/items/content.test.ts +156 -0
  294. package/packages/arcgis-rest-portal/test/items/create.test.ts +399 -0
  295. package/packages/arcgis-rest-portal/test/items/export.test.ts +122 -0
  296. package/packages/arcgis-rest-portal/test/items/get.test.ts +583 -0
  297. package/packages/arcgis-rest-portal/test/items/helpers.test.ts +60 -0
  298. package/packages/arcgis-rest-portal/test/items/protect.test.ts +122 -0
  299. package/packages/arcgis-rest-portal/test/items/reassign.test.ts +131 -0
  300. package/packages/arcgis-rest-portal/test/items/remove.test.ts +238 -0
  301. package/packages/arcgis-rest-portal/test/items/search.test.ts +272 -0
  302. package/packages/arcgis-rest-portal/test/items/update.test.ts +554 -0
  303. package/packages/arcgis-rest-portal/test/items/upload.test.ts +282 -0
  304. package/packages/arcgis-rest-portal/test/mocks/groups/responses.ts +208 -0
  305. package/packages/arcgis-rest-portal/test/mocks/items/foo.zip +0 -0
  306. package/packages/arcgis-rest-portal/test/mocks/items/item.ts +526 -0
  307. package/packages/arcgis-rest-portal/test/mocks/items/resources.ts +38 -0
  308. package/packages/arcgis-rest-portal/test/mocks/items/search.ts +121 -0
  309. package/packages/arcgis-rest-portal/test/mocks/portal/response.ts +126 -0
  310. package/packages/arcgis-rest-portal/test/mocks/portal/settings-response.ts +56 -0
  311. package/packages/arcgis-rest-portal/test/mocks/sharing/sharing.ts +18 -0
  312. package/packages/arcgis-rest-portal/test/mocks/users/invitation.ts +70 -0
  313. package/packages/arcgis-rest-portal/test/mocks/users/notification.ts +34 -0
  314. package/packages/arcgis-rest-portal/test/mocks/users/user-search.ts +388 -0
  315. package/packages/arcgis-rest-portal/test/mocks/users/user-tags.ts +5 -0
  316. package/packages/arcgis-rest-portal/test/mocks/users/user.ts +174 -0
  317. package/packages/arcgis-rest-portal/test/orgs/notification.test.ts +142 -0
  318. package/packages/arcgis-rest-portal/test/sharing/access.test.ts +162 -0
  319. package/packages/arcgis-rest-portal/test/sharing/helpers.test.ts +55 -0
  320. package/packages/arcgis-rest-portal/test/sharing/share-item-with-group.test.ts +1325 -0
  321. package/packages/arcgis-rest-portal/test/sharing/unshare-item-with-group.test.ts +288 -0
  322. package/packages/arcgis-rest-portal/test/users/get-user-tags.test.ts +71 -0
  323. package/packages/arcgis-rest-portal/test/users/get-user-url.test.ts +40 -0
  324. package/packages/arcgis-rest-portal/test/users/get-user.test.ts +90 -0
  325. package/packages/arcgis-rest-portal/test/users/invitation.test.ts +127 -0
  326. package/packages/arcgis-rest-portal/test/users/notification.test.ts +77 -0
  327. package/packages/arcgis-rest-portal/test/users/search.test.ts +42 -0
  328. package/packages/arcgis-rest-portal/test/users/update.test.ts +151 -0
  329. package/packages/arcgis-rest-portal/test/util/SearchQueryBuilder.test.ts +340 -0
  330. package/packages/arcgis-rest-portal/test/util/array.test.ts +30 -0
  331. package/packages/arcgis-rest-portal/test/util/get-portal-settings.test.ts +68 -0
  332. package/packages/arcgis-rest-portal/test/util/get-portal-url.test.ts +37 -0
  333. package/packages/arcgis-rest-portal/test/util/portal.test.ts +148 -0
  334. package/packages/arcgis-rest-portal/test/util/scrub-control-chars.test.ts +22 -0
  335. package/packages/arcgis-rest-portal/tsconfig.json +6 -0
  336. package/packages/arcgis-rest-request/README.md +72 -0
  337. package/packages/arcgis-rest-request/package-lock.json +11 -0
  338. package/packages/arcgis-rest-request/package.json +60 -0
  339. package/packages/arcgis-rest-request/src/index.ts +25 -0
  340. package/packages/arcgis-rest-request/src/request.ts +413 -0
  341. package/packages/arcgis-rest-request/src/utils/ArcGISRequestError.ts +76 -0
  342. package/packages/arcgis-rest-request/src/utils/ErrorTypes.ts +29 -0
  343. package/packages/arcgis-rest-request/src/utils/GrantTypes.ts +5 -0
  344. package/packages/arcgis-rest-request/src/utils/HTTPMethods.ts +6 -0
  345. package/packages/arcgis-rest-request/src/utils/IAuthenticationManager.ts +21 -0
  346. package/packages/arcgis-rest-request/src/utils/IFetchTokenParams.ts +11 -0
  347. package/packages/arcgis-rest-request/src/utils/IGenerateTokenParams.ts +9 -0
  348. package/packages/arcgis-rest-request/src/utils/IParamBuilder.ts +3 -0
  349. package/packages/arcgis-rest-request/src/utils/IParams.ts +6 -0
  350. package/packages/arcgis-rest-request/src/utils/IParamsBuilder.ts +5 -0
  351. package/packages/arcgis-rest-request/src/utils/IRequestOptions.ts +49 -0
  352. package/packages/arcgis-rest-request/src/utils/ITokenRequestOptions.ts +9 -0
  353. package/packages/arcgis-rest-request/src/utils/ResponseFormats.ts +10 -0
  354. package/packages/arcgis-rest-request/src/utils/append-custom-params.ts +49 -0
  355. package/packages/arcgis-rest-request/src/utils/clean-url.ts +20 -0
  356. package/packages/arcgis-rest-request/src/utils/decode-query-string.ts +27 -0
  357. package/packages/arcgis-rest-request/src/utils/encode-form-data.ts +38 -0
  358. package/packages/arcgis-rest-request/src/utils/encode-query-string.ts +35 -0
  359. package/packages/arcgis-rest-request/src/utils/process-params.ts +108 -0
  360. package/packages/arcgis-rest-request/src/utils/retryAuthError.ts +10 -0
  361. package/packages/arcgis-rest-request/src/utils/warn.ts +11 -0
  362. package/packages/arcgis-rest-request/src/utils/with-options.ts +48 -0
  363. package/packages/arcgis-rest-request/test/mocks/errors.ts +76 -0
  364. package/packages/arcgis-rest-request/test/mocks/geojson-feature-collection.ts +13 -0
  365. package/packages/arcgis-rest-request/test/mocks/param-builder.ts +7 -0
  366. package/packages/arcgis-rest-request/test/mocks/sharing-rest-info.ts +41 -0
  367. package/packages/arcgis-rest-request/test/mocks/webmap.ts +41 -0
  368. package/packages/arcgis-rest-request/test/request.test.ts +571 -0
  369. package/packages/arcgis-rest-request/test/utils/ArcGISAuthError.test.ts +191 -0
  370. package/packages/arcgis-rest-request/test/utils/ArcGISRequestError.test.ts +51 -0
  371. package/packages/arcgis-rest-request/test/utils/check-for-errors.test.ts +111 -0
  372. package/packages/arcgis-rest-request/test/utils/clean-url.test.ts +50 -0
  373. package/packages/arcgis-rest-request/test/utils/encode-form-data.test.ts +133 -0
  374. package/packages/arcgis-rest-request/test/utils/encode-query-string.test.ts +18 -0
  375. package/packages/arcgis-rest-request/test/utils/process-params.test.ts +205 -0
  376. package/packages/arcgis-rest-request/test/utils/with-options.test.ts +133 -0
  377. package/packages/arcgis-rest-request/tsconfig.json +4 -0
  378. package/packages/arcgis-rest-routing/README.md +75 -0
  379. package/packages/arcgis-rest-routing/package-lock.json +11 -0
  380. package/packages/arcgis-rest-routing/package.json +63 -0
  381. package/packages/arcgis-rest-routing/src/helpers.ts +16 -0
  382. package/packages/arcgis-rest-routing/src/index.ts +11 -0
  383. package/packages/arcgis-rest-routing/src/solveRoute.ts +124 -0
  384. package/packages/arcgis-rest-routing/test/mocks/responses.ts +825 -0
  385. package/packages/arcgis-rest-routing/test/solveRoute.test.ts +509 -0
  386. package/packages/arcgis-rest-routing/tsconfig.json +6 -0
  387. package/packages/arcgis-rest-service-admin/README.md +73 -0
  388. package/packages/arcgis-rest-service-admin/package-lock.json +11 -0
  389. package/packages/arcgis-rest-service-admin/package.json +65 -0
  390. package/packages/arcgis-rest-service-admin/src/addTo.ts +70 -0
  391. package/packages/arcgis-rest-service-admin/src/create.ts +189 -0
  392. package/packages/arcgis-rest-service-admin/src/index.ts +11 -0
  393. package/packages/arcgis-rest-service-admin/src/update.ts +50 -0
  394. package/packages/arcgis-rest-service-admin/test/addTo.test.ts +350 -0
  395. package/packages/arcgis-rest-service-admin/test/create.test.ts +294 -0
  396. package/packages/arcgis-rest-service-admin/test/mocks/layerDefinition.ts +79 -0
  397. package/packages/arcgis-rest-service-admin/test/mocks/service.ts +81 -0
  398. package/packages/arcgis-rest-service-admin/test/update.test.ts +115 -0
  399. package/packages/arcgis-rest-service-admin/tsconfig.json +6 -0
  400. package/packages/arcgis-rest-types/README.md +66 -0
  401. package/packages/arcgis-rest-types/package.json +54 -0
  402. package/packages/arcgis-rest-types/src/feature.ts +39 -0
  403. package/packages/arcgis-rest-types/src/geometry.ts +272 -0
  404. package/packages/arcgis-rest-types/src/group.ts +72 -0
  405. package/packages/arcgis-rest-types/src/index.ts +9 -0
  406. package/packages/arcgis-rest-types/src/item.ts +81 -0
  407. package/packages/arcgis-rest-types/src/service.ts +114 -0
  408. package/packages/arcgis-rest-types/src/statisticDefinition.ts +33 -0
  409. package/packages/arcgis-rest-types/src/symbol.ts +170 -0
  410. package/packages/arcgis-rest-types/src/user.ts +49 -0
  411. package/packages/arcgis-rest-types/src/webmap.ts +1367 -0
  412. package/packages/arcgis-rest-types/tsconfig.json +10 -0
  413. package/support/changelog.js +393 -0
  414. package/support/deploy-doc-site.js +16 -0
  415. package/support/dev.sh +6 -0
  416. package/support/publish.sh +47 -0
  417. package/support/test-helpers.js +9 -0
  418. package/tsconfig.json +63 -0
  419. package/tslint.json +16 -0
  420. package/umd-base-profile.js +81 -0
  421. package/umd-production-profile.js +13 -0
@@ -0,0 +1,1367 @@
1
+ /* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
2
+ * Apache-2.0 */
3
+
4
+ import {
5
+ IExtent,
6
+ ISpatialReference,
7
+ GeometryType,
8
+ IHasZM,
9
+ IGeometry,
10
+ IPoint
11
+ } from "./geometry";
12
+
13
+ import { IFeature, IFeatureSet } from "./feature";
14
+
15
+ import {
16
+ ISimpleLineSymbol,
17
+ IPictureMarkerSymbol,
18
+ ISimpleFillSymbol,
19
+ Color
20
+ } from "./symbol";
21
+
22
+ /**
23
+ * Field type.
24
+ */
25
+ export type FieldType =
26
+ | "esriFieldTypeBlob"
27
+ | "esriFieldTypeDate"
28
+ | "esriFieldTypeDouble"
29
+ | "esriFieldTypeGeometry"
30
+ | "esriFieldTypeGlobalID"
31
+ | "esriFieldTypeGUID"
32
+ | "esriFieldTypeInteger"
33
+ | "esriFieldTypeOID"
34
+ | "esriFieldTypeRaster"
35
+ | "esriFieldTypeSingle"
36
+ | "esriFieldTypeSmallInteger"
37
+ | "esriFieldTypeString"
38
+ | "esriFieldTypeXML";
39
+
40
+ /**
41
+ * Contains information about an attribute field.
42
+ *
43
+ * `IField` can also be imported from the following packages:
44
+ *
45
+ * ```js
46
+ * import { IField } from "@esri/arcgis-rest-feature-layer";
47
+ * ```
48
+ */
49
+ export interface IField {
50
+ /** A string defining the field name. */
51
+ name: string;
52
+ /** A string defining the field type. */
53
+ type: FieldType;
54
+ /** A string defining the field alias. */
55
+ alias?: string;
56
+ /** The domain objects if applicable. */
57
+ domain?: any;
58
+ /** A Boolean defining whether this field is editable. */
59
+ editable?: boolean;
60
+ /** A Boolean defining whether or not the field is an exact match. */
61
+ exactMatch?: boolean;
62
+ /** A number defining how many characters are allowed in a string. field. */
63
+ length?: number;
64
+ /** A Boolean defining whether this field can have a null value. */
65
+ nullable?: boolean;
66
+ /** The value written in for new records by default. */
67
+ defaultValue?: any;
68
+ }
69
+
70
+ /**
71
+ * Params for paging operations
72
+ *
73
+ * `IPagingParams` can also be imported from the following packages:
74
+ *
75
+ * ```js
76
+ * import { IPagingParams } from "@esri/arcgis-rest-portal";
77
+ * ```
78
+ */
79
+ export interface IPagingParams {
80
+ start?: number;
81
+ num?: number;
82
+ }
83
+ /**
84
+ * Paging properties for paged responses.
85
+ *
86
+ * `IPagedResponse` can also be imported from the following packages:
87
+ *
88
+ * ```js
89
+ * import { IPagedResponse } from "@esri/arcgis-rest-portal";
90
+ * ```
91
+ */
92
+ export interface IPagedResponse extends IPagingParams {
93
+ /** total number of object across all pages */
94
+ total: number;
95
+ /** next entry index or -1 for the last page */
96
+ nextStart: number;
97
+ }
98
+ /**
99
+ * The format object can be used with numerical or date fields to provide more detail about how values should be displayed in popup windows.
100
+ */
101
+ export interface IFieldFormat {
102
+ /** A string used with date fields to specify how the date should appear in popup windows. */
103
+ dateFormat?:
104
+ | "shortDate"
105
+ | "shortDateLE"
106
+ | "longMonthDayYear"
107
+ | "dayShortMonthYear"
108
+ | "longDate"
109
+ | "shortDateShortTime"
110
+ | "shortDateLEShortTime"
111
+ | "shortDateShortTime24"
112
+ | "shortDateLEShortTime24"
113
+ | "shortDateLongTime"
114
+ | "shortDateLELongTime"
115
+ | "shortDateLongTime24"
116
+ | "shortDateLELongTime24"
117
+ | "longMonthYear"
118
+ | "shortMonthYear"
119
+ | "year";
120
+
121
+ /**
122
+ * A Boolean used with numerical fields. A value of true allows the number to have a digit (or thousands) separator when the value appears in popup windows.
123
+ * Depending on the locale, this separator is a decimal point or a comma. A value of false means that no separator will be used.
124
+ */
125
+ digitSeparator?: boolean;
126
+ /**
127
+ * An integer used with numerical fields to specify the number of supported decimal places that should appear in popup windows. Any places beyond this value are rounded.
128
+ */
129
+ places?: number;
130
+ }
131
+
132
+ /**
133
+ * Defines how a field in the dataset participates (or does not participate) in a popup window.
134
+ */
135
+ export interface IFieldInfo {
136
+ /** A string containing the field name as defined by the service. Anywhere that a fieldname is referenced as {field-name} in popupInfo, an Arcade expression can also be referenced as{expression/}`. */
137
+ fieldName?: any;
138
+ /** A format object used with numerical or date fields to provide more detail about how the value should be displayed in a web map popup window. */
139
+ format?: IFieldFormat;
140
+ /** A Boolean determining whether users can edit this field. Not applicable to Arcade expressions. */
141
+ isEditable?: boolean;
142
+ /** A string containing the field alias. This can be overridden by the web map author. Not applicable to Arcade expressions as title is used instead. */
143
+ label?: string;
144
+ /** A string determining what type of input box editors see when editing the field. Applies only to string fields. Not applicable to Arcade expressions. */
145
+ stringFieldOption?: "textbox" | "textarea" | "richtext";
146
+
147
+ /** A string providing an editing hint for editors of the field. Not applicable to Arcade expressions. */
148
+ tooltip?: string;
149
+ /** A Boolean determining whether the field is visible in the popup window. */
150
+ visible?: boolean;
151
+ }
152
+
153
+ /**
154
+ * Arcade expression added to the pop-up.
155
+ */
156
+ export interface IPopupExpressionInfo {
157
+ /** The Arcade expression. */
158
+ expression?: string;
159
+ /** Unique identifier for the expression. */
160
+ name?: string;
161
+ /** Return type of the Arcade expression, can be number or string. Defaults to string value. Number values are assumed to be double. This can be determined by the authoring client by executing the expression using a sample feature(s), although it can be corrected by the user. Knowing the returnType allows the authoring client to present fields in relevant contexts. For example, numeric fields in numeric contexts such as charts. */
162
+ returnType?: "number" | "string";
163
+ /** Title of the expression. */
164
+ title?: string;
165
+ }
166
+
167
+ /**
168
+ * The value object contains information for popup windows about how images should be retrieved or charts constructed.
169
+ */
170
+ export interface IMediaInfoValue {
171
+ /** Used with charts. An array of strings, with each string containing the name of a field to display in the chart. */
172
+ fields?: string[];
173
+ /** Used with images. A string containing a URL to be launched in a browser when a user clicks the image. */
174
+ linkURL?: string;
175
+ /** Used with charts. An optional string containing the name of a field. The values of all fields in the chart will be normalized (divided) by the value of this field. */
176
+ normalizeField?: string;
177
+ /** Used with images. A string containing the URL to the image. */
178
+ sourceURL?: string;
179
+ /** String value indicating the tooltip for a chart specified from another field. This field is needed when related records are not sued. It is used for showing tooltips from another field in the same layer or related layer/table. */
180
+ tooltipField?: string;
181
+ }
182
+
183
+ /**
184
+ * Defines an image or a chart to be displayed in a popup window.
185
+ */
186
+ export interface IMediaInfo {
187
+ /** A string caption describing the media. */
188
+ caption?: any;
189
+ /** Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled. If the property does not exist, it's equivalent to having a value of 0. Only applicable when type is set to image. */
190
+ refreshInterval?: any;
191
+ /** A string title for the media. */
192
+ title?: string | null;
193
+ /** A string defining the type of media. */
194
+ type?: "image" | "barchart" | "columnchart" | "linechart" | "piechart";
195
+
196
+ /** A value object containing information about how the image should be retrieved or how the chart should be constructed. */
197
+ value?: IMediaInfoValue | null;
198
+ }
199
+
200
+ /**
201
+ * Popup elements allow users to author popups, using multiple elements such as tabular views, string description, media (charts and images), and attachments of the attributes
202
+ * and control the order in which they appear. Specifically, popupElements do the following:
203
+ * 1) provide the ability to explicitly add a field/ value table in addition to a description,
204
+ * 2) allow adding multiple description elements, and
205
+ * 3) allow a user to author and consume elements of a popup in the order of their choosing.
206
+ */
207
+ export interface IPopupElement {
208
+ /**
209
+ * This property applies to elements of type attachments. A string value indicating how to display the attachment.
210
+ * Possible values are, preview, and list. If list is specified, attachments show as links.
211
+ */
212
+ displayType?: "preview" | "list";
213
+ /**
214
+ * This property applies to elements of type fields. It is an array of popupInfo.fieldInfo objects representing a field/value pair displayed as a table within the popupElement.
215
+ * If the fieldInfos property is not provided, the popupElement will display whatever is specified directly in the popupInfo.fieldInfos property.
216
+ */
217
+ fieldInfos?: IFieldInfo[];
218
+ /**
219
+ * This property applies to elements of type media. An array of popupInfo.mediaInfo objects representing an image or chart for display.
220
+ * If no mediaInfos property is provided, the popupElement will display whatever is specified in the popupInfo.mediaInfo property.
221
+ */
222
+ mediaInfos?: IMediaInfo[];
223
+ /**
224
+ * This property applies to elements of type text. This is string value indicating the text to be displayed within the popupElement.
225
+ * If no text property is provided, the popupElement will display whatever is specified in the popupInfo.description property.
226
+ */
227
+ text?: string;
228
+ /** String value indicating which elements to use. */
229
+ type?: "text" | "fields" | "media" | "attachments";
230
+ }
231
+
232
+ /**
233
+ * Object indicating the field display order for the related records and whether they should be sorted in ascending or descending order.
234
+ */
235
+ export interface IOrderByField {
236
+ /** The attribute value of the field selected that will drive the sorting of related records. */
237
+ field?: string;
238
+ /** Set the ascending or descending sort order of the returned related records. */
239
+ order?: "asc" | "desc";
240
+ }
241
+
242
+ /**
243
+ * The sort in the popupInfo for the parent feature. This impacts the sorting order for the returned child records.
244
+ */
245
+ export interface IRelatedRecordsInfo {
246
+ /** Array of orderByFields objects indicating the field display order for the related records and whether they should be sorted in ascending 'asc' or descending 'desc' order. */
247
+ orderByFields?: IOrderByField[];
248
+ /** Required boolean value indicating whether to display related records. If true, client should let the user navigate to the related records. Defaults to true if the layer participates in a relationship AND the related layer/table has already been added to the map (either as an operationalLayer or as a table). */
249
+ showRelatedRecords: boolean;
250
+ }
251
+
252
+ /**
253
+ * Defines the look and feel of popup windows when a user clicks or queries a feature.
254
+ */
255
+ export interface IPopupInfo {
256
+ /** A string that appears in the body of the popup window as a description. It is also possible to specify the description as HTML-formatted content. */
257
+ description?: string | null;
258
+ /** List of Arcade expressions added to the pop-up. */
259
+ expressionInfos?: IPopupExpressionInfo[];
260
+ /** Array of fieldInfo information properties. This information is provided by the service layer definition. When the description uses name/value pairs, the order of the array is how the fields display in the editable Map Viewer popup and the resulting popup. It is also possible to specify HTML-formatted content. */
261
+ fieldInfos?: IFieldInfo[];
262
+ /** Additional options that can be defined for the popup layer. */
263
+ layerOptions?: {
264
+ /** Indicates whether or not the NoData records should be displayed. */
265
+ showNoDataRecords: boolean;
266
+ };
267
+ /** Array of various mediaInfo to display. Can be of type image, piechart, barchart, columnchart, or linechart. The order given is the order in which is displays. */
268
+ mediaInfos?: IMediaInfo[];
269
+ /** An array of popupElement objects that represent an ordered list of popup elements. */
270
+ popupElements?: IPopupElement[];
271
+ /** Indicates whether to enable related records if they exist on a layer. */
272
+ relatedRecordsInfo?: IRelatedRecordsInfo;
273
+ /** Indicates whether attachments will be loaded for feature layers that have attachments. */
274
+ showAttachments?: boolean;
275
+ /** A string that appears at the top of the popup window as a title. */
276
+ title?: string;
277
+ }
278
+
279
+ /**
280
+ * Defines the appearance for the background of the map.
281
+ * @example
282
+ * { "background": { "color": [255,255,255,255] } }
283
+ */
284
+ export interface IWebMapBackground {
285
+ /**
286
+ * To define the color of the background of the map (which is shown when no data is shown).
287
+ */
288
+ color: Color;
289
+ }
290
+
291
+ /**
292
+ * Predefined bookmarks for use by the application. A bookmark is a saved map extent that allows end users to quickly navigate to a particular area of interest.
293
+ */
294
+ export interface IBookmark {
295
+ /** An extent object containing a spatial reference, a lower left coordinate, and an upper right coordinate defining the rectangular area of the bookmark. The spatial reference must be the same as the map spatial reference. Documentation for the envelope is in the Geometry Objects topic of the ArcGIS REST API help. */
296
+ extent: IExtent;
297
+ /** A string name for the bookmark. */
298
+ name: string;
299
+ }
300
+
301
+ /**
302
+ * Map range information
303
+ * @example
304
+ * {
305
+ * "mapRangeInfo": {
306
+ * "activeRangeName": "floors",
307
+ * "currentRangeExtent": [ -2, 10 ],
308
+ * "fullRangeExtent": [-2, 100 ]
309
+ * }
310
+ * }
311
+ */
312
+ export interface IMapRangeInfo {
313
+ /** Active range ID that slider/picker acts upon. */
314
+ activeRangeName?: string;
315
+ /** Current range for the active range. */
316
+ currentRangeExtent?: number[];
317
+ /** Full range extent for the active range to be presented in the UI. */
318
+ fullRangeExtent?: number[];
319
+ }
320
+
321
+ /**
322
+ * Contains location information within a presentation slide.
323
+ * @see https://developers.arcgis.com/web-map-specification/objects/mapLocation/
324
+ */
325
+ export interface IMapLocation {
326
+ /** The center of the map specified using X/Y coordinates. */
327
+ centerPoint: IPoint;
328
+ /** Well-known ID (WKID) or well-known text (WKT). */
329
+ spatialReference: ISpatialReference;
330
+ }
331
+
332
+ /**
333
+ * An array of numbers indicating layer visibility.
334
+ * @example
335
+ * {
336
+ * "visibleLayer": {
337
+ * "featureVisibility": [
338
+ * [ 1 ],
339
+ * [],
340
+ * [],
341
+ * [ 0 ]
342
+ * ],
343
+ * "id": "73128eb3-05ee-46a7-8c22-0c385a0b1827"
344
+ * }
345
+ * }
346
+ */
347
+ export interface IVisibleLayer {
348
+ /** An array of arrays. */
349
+ featureVisibility?: any[][];
350
+ /** The id of the layer as listed on the operational layer. */
351
+ id?: number;
352
+ /** An array of integers. */
353
+ subLayerIds?: number[];
354
+ }
355
+
356
+ /**
357
+ * A presentation slide's visiblePopup which contains anchorPoint, featureId, layerId, and subLayerId.
358
+ * @see https://developers.arcgis.com/web-map-specification/objects/visiblePopup/
359
+ */
360
+ export interface IVisiblePopup {
361
+ /** Object with spatialReference, x, and y. */
362
+ anchorPoint?: IPoint;
363
+ /** An integer specifying the feature's id. */
364
+ featureId?: number;
365
+ /** A string specifying the layer id. */
366
+ layerId?: string;
367
+ /** An integer specifying the sublayer id. */
368
+ subLayerId?: number;
369
+ }
370
+
371
+ export interface ISlide {
372
+ /** Basemaps give the web map a geographic context. */
373
+ baseMap?: IBaseMap;
374
+ /** The standard Esri extent object with spatialReference, xmax, xmin, ymax and ymin. */
375
+ extent?: IExtent;
376
+ /** Indicates whether the slide should be hidden within the presentation. */
377
+ hidden?: boolean;
378
+ /** An object with a centerPoint object and sometimes a resolution. */
379
+ mapLocation?: IMapLocation;
380
+ /** An array of two numbers. The first one indicates start time and the second one indicates end time. */
381
+ timeExtent?: [number, number];
382
+ /** Title including text and formatting for each slide. */
383
+ title?: string;
384
+ /** An array of objects used to indicate layer visibility. */
385
+ visibleLayers?: IVisibleLayer;
386
+ /** A presentation slide's visiblePopup which contains anchorPoint, featureId, layerId, and subLayerId. */
387
+ visiblePopup?: IVisiblePopup;
388
+ }
389
+
390
+ export interface IPresentation {
391
+ /** Indicates whether to display the time slider (if accessible). */
392
+ displayTimeSlider?: boolean;
393
+ /** Indicates whether to display a legend on all slides. */
394
+ showLegend?: boolean;
395
+ /** Number of seconds to show slide before proceeding to the next slide. */
396
+ slideAdvancementInterval?: number;
397
+ /** Array of slide objects. */
398
+ slides?: ISlide[];
399
+ /** Indicates whether to use the time extent (if applicable) of a slide. */
400
+ useTimeExtentOfSlide?: boolean;
401
+ }
402
+
403
+ /**
404
+ * Root element in the web map specifying an array of table objects.
405
+ *
406
+ * `ITable` can also be imported from the following packages:
407
+ *
408
+ * ```js
409
+ * import { ITable } from "@esri-arcgis-rest-service-admin"
410
+ * ```
411
+ */
412
+ export interface ITable {
413
+ /** Table name */
414
+ name?: string;
415
+ /** A comma-separated string listing which editing operations are allowed on an editable feature service. Available operations include: 'Create', 'Delete', 'Query', 'Update', and 'Editing'. */
416
+ capabilities?: string;
417
+ /** Object indicating the definitionEditor used as a layer's interactive filter. */
418
+ definitionEditor?: IDefinitionEditor;
419
+ /** Unique string identifier for the table. */
420
+ id?: string;
421
+ /** Unique string value indicating an item registered in ArcGIS Online or your organization's portal. */
422
+ itemId?: string;
423
+ /** A layerDefinition object defining a definition expression for the table. */
424
+ layerDefinition?: ILayerDefinition;
425
+ /** An object defining the content of popup windows when you query a record and the sort option for child related records. */
426
+ popupInfo?: IPopupInfo;
427
+ /** String value for the title of the table. */
428
+ title?: string;
429
+ /** String value indicating the URL reference of the hosted table. */
430
+ url?: string;
431
+ }
432
+
433
+ /**
434
+ * The web map data lists the basemap, operational layers, and bookmarks to be used in the web map.
435
+ * It also contains information about popup windows and layer styling overrides to be used in the web map.
436
+ * A version property allows you to supply the version of the web map JSON format being used.
437
+ */
438
+ export interface IWebmap {
439
+ /** Viewing and editing properties of the webmap */
440
+ applicationProperties?: IApplicationProperties;
441
+ /** String value indicating the application which authored the webmap */
442
+ authoringApp?: string;
443
+ /** String value indicating the authoring App's version number */
444
+ authoringAppVersion?: string;
445
+ /** Defines the appearance for the background of the map. */
446
+ background?: IWebMapBackground;
447
+ /** [Required] Basemaps give the web map a geographic context */
448
+ baseMap: IBaseMap;
449
+ /** A bookmark is a saved geographic extent that allows end users to quickly navigate to a particular area of interest */
450
+ bookmarks?: IBookmark[];
451
+ /** Map Range Information */
452
+ mapRangeInfo?: IMapRangeInfo;
453
+ /** Operational layers contain business data which are used to make thematic maps */
454
+ operationalLayers?: ILayer[];
455
+ /** A presentation consists of multiple slides. Each slide has a different title, extent, basemap, layers etc */
456
+ presentation?: any;
457
+ /** [Required] An object used to specify the spatial reference of the given geometry. */
458
+ spatialReference: ISpatialReference;
459
+ /** Root element in the web map specifying an array of table objects. (optional) */
460
+ tables?: ITable[];
461
+ /** [Required] Root element in the web map specifying a string value indicating the web map version. */
462
+ version: string;
463
+ /** The widgets object contains widgets that should be exposed to the user */
464
+ widgets?: any;
465
+ }
466
+
467
+ /**
468
+ * Range object.
469
+ * @see https://developers.arcgis.com/web-map-specification/objects/range/
470
+ */
471
+ export interface IRange {
472
+ /** Indicates the mode in which the active range should be presented to the user. Must be one of the following values: slider, picker */
473
+ interactionMode?: "slider" | "picker";
474
+
475
+ /** This is used to generate the activeRangeValues if activeRangeValues are not specified. */
476
+ numberOfStops?: any;
477
+ /** Interval in which stops should be generated. */
478
+ stopInterval?: number;
479
+ }
480
+
481
+ /**
482
+ * The widgets object contains widgets that should be exposed to the user.
483
+ */
484
+ export interface IWidget {
485
+ /** Active range. */
486
+ range?: IRange;
487
+ /** Time animation is controlled by a configurable time slider. The time slider widget will act upon all the time aware layers in the map. */
488
+ timeSlider?: ITimeSliderProperties;
489
+ }
490
+
491
+ /**
492
+ * Configurable properties used within the TimeSlider widget.
493
+ */
494
+ export interface ITimeSliderProperties {
495
+ /** An optional array of numbers indicating the slider's start to end time extent. */
496
+ currentTimeExtent?: number[];
497
+ /** The optional end of the time slider. If not specified, the slider defaults to the full time extent of all time-enabled layers. */
498
+ endTime?: number;
499
+ /** Number of stops within the timeSlider widget. */
500
+ numberOfStops?: number;
501
+ /** The optional start of the time slider. If not specified, the slider defaults to the full time extent of all time-enabled layers. */
502
+ startTime?: number;
503
+ /** The default value for the thumbCount is 1. */
504
+ thumbCount?: number;
505
+ /** Rate at which the time animation plays. Units are in milliseconds. Default is 1000. */
506
+ thumbMovingRate?: number;
507
+ /** The interval which has been defined for the time slider. */
508
+ timeStopInterval?: number;
509
+ }
510
+
511
+ /**
512
+ * Time animation is controlled by a configurable time slider. Those configurations are saved to the web map as a timeSlider widget.
513
+ */
514
+ export interface ITimeSlider {
515
+ /**
516
+ * Configurable properties used within the TimeSlider widget.
517
+ */
518
+ properties: ITimeSliderProperties;
519
+ }
520
+
521
+ /**
522
+ * The applicationProperties object is one of the objects at the top level of the JSON web map JSON schema. This is responsible for containing the viewing and editing properties of the web map. There are specific objects within this object that are applicable only to Collector and are explained within the property descriptions.
523
+ */
524
+ export interface IApplicationProperties {
525
+ /** If locationTracking is set and enabled, the Collector application will update the feature service at the defined interval with the current location of the user logged into the Collector app. */
526
+ editing?: IEditingProperties | null;
527
+ /** Use if working with offline maps. */
528
+ offline?: IOfflineInfo | null;
529
+ /** An object containing all the viewing properties of the web map. If this is null or not defined, the client should assume a logical default. */
530
+ viewing?: IViewingInfo | null;
531
+ }
532
+
533
+ /**
534
+ * An object containing all the editing properties within the web map.
535
+ */
536
+ export interface IEditingProperties {
537
+ /**
538
+ * If locationTracking is set and enabled, the collector app will update the feature service at the defined interval with the current location of the user logged into the collector application.
539
+ */
540
+ locationTracking: ILocationTracking;
541
+ }
542
+
543
+ /**
544
+ * If locationTracking is set and enabled, the collector app will update the feature service at the defined interval with the current location of the user logged into the collector application.
545
+ */
546
+ export interface ILocationTracking {
547
+ /** A boolean value indicating whether or not location tracking is enabled on the webmap. */
548
+ enabled: boolean;
549
+ /** An object of additional information specifying layer and update interval time. */
550
+ info: ILocationTrackingInfo;
551
+ }
552
+
553
+ /**
554
+ * An object containing additional information specifying layer and update interval time used in the locationTracking object.
555
+ */
556
+ export interface ILocationTrackingInfo {
557
+ /** A string value indicating the given layer id specified in the web map. */
558
+ layerId: any;
559
+ /** A numeric value indicating the time interval used to update the feature service. Default value is 300 seconds. */
560
+ updateInterval?: any;
561
+ }
562
+
563
+ /**
564
+ * Use if working with offline maps.
565
+ */
566
+ export interface IOfflineInfo {
567
+ /** Object detailing the available offline editing options. */
568
+ editableLayers: IEditableLayers;
569
+ /** Object indicating what to do with attachments in read-only layers. */
570
+ readonlyLayers: IReadOnlyLayers;
571
+ }
572
+
573
+ /**
574
+ * Object detailing the available offline editing options.
575
+ */
576
+ export interface IEditableLayers {
577
+ /**
578
+ * When editing layers, the edits are always sent to the server. This string value indicates which data is retrieved.
579
+ * For example, none indicates that only the schema is written since neither the features nor attachments are retrieved.
580
+ * For a full sync without downloading attachments, indicate features. Lastly, the default behavior is to have a full
581
+ * sync using featuresAndAttachments where both features and attachments are retrieved.
582
+ */
583
+ download: "none" | "featuresAndAttachments" | "featuers";
584
+ /** This string value indicates how the data is synced. */
585
+ sync:
586
+ | "uploadFeaturesAndAttachments"
587
+ | "syncFeaturesAndAttachments"
588
+ | "syncFeaturesUploadAttachments";
589
+ }
590
+
591
+ /**
592
+ * Read-only layers as the features are always retrieved from the server.
593
+ */
594
+ export interface IReadOnlyLayers {
595
+ /** Indicates whether to include attachments with the read-only data. */
596
+ downloadAttachments: boolean;
597
+ }
598
+
599
+ export interface IEnableable {
600
+ enabled: boolean;
601
+ }
602
+
603
+ /**
604
+ * An object specifying the search parameters set within the web map.
605
+ */
606
+ export interface ISearch extends IEnableable {
607
+ /** A boolean value indicating whether or not to disable the place finder. */
608
+ disablePlaceFinder?: any;
609
+ /** A string value used to indicate the hint provided with the search dialog. */
610
+ hintText?: any;
611
+ /** An array of layer objects defining the styling, geometry, and attribute information for the features. */
612
+ layers?: any;
613
+ }
614
+
615
+ /**
616
+ * An object containing all the viewing properties of the web map. If this is null or not defined, the client should assume a logical default.
617
+ */
618
+ export interface IViewingInfo {
619
+ /** The basemap tool which will use the basemap group defined in the Portal. */
620
+ basemapGallery?: IEnableable;
621
+ /** Measure tool. */
622
+ measure?: IEnableable;
623
+ /** The route tool which will leverage the Portals defined route service. */
624
+ routing?: IEnableable;
625
+ /** An object specifying search parameters within the webmap. */
626
+ search?: ISearch;
627
+ }
628
+
629
+ /**
630
+ * A basemap layer is a layer that provides geographic context to the map. A web map always contains a basemap.
631
+ * The basemap has a title and is the combination of each baseMapLayer.
632
+ * It is required that a baseMap be saved within the web map.
633
+ */
634
+ export interface IBaseMap {
635
+ /** An array of baseMapLayer objects defining the basemaps used in the web map. */
636
+ baseMapLayers: ILayer[];
637
+ /** Required string title for the basemap that can be used in a table of contents. It takes the title of the first baseMapLayer in the array. */
638
+ title: string;
639
+ }
640
+
641
+ export interface ILayer {
642
+ /** A unique identifying string for the layer. */
643
+ id: any;
644
+ /** Layer name */
645
+ name?: string;
646
+ /** Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal. */
647
+ itemId?: string;
648
+ /** Indicates the layer type */
649
+ layerType: string;
650
+ /** Integer property used to determine the maximum scale at which the layer is displayed. */
651
+ maxScale?: number;
652
+ /** Integer property used to determine the minimum scale at which the layer is displayed. */
653
+ minScale?: number;
654
+ /** The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency. */
655
+ opacity?: number;
656
+ /** Boolean property indicating whether to display in the legend. */
657
+ showLegend?: boolean;
658
+ /** A user-friendly string title for the layer that can be used in a table of contents. */
659
+ title?: string;
660
+ /**
661
+ * Deprecated, use layerType instead.
662
+ * @deprecated
663
+ */
664
+ type?: string;
665
+ /** Boolean property determining whether the layer is initially visible in the web map. */
666
+ visibility?: boolean;
667
+ /** The URL to the layer. Not applicable to all layer types. */
668
+ url?: string;
669
+ }
670
+
671
+ export interface ISupportsTime {
672
+ /** This property is applicable to layers that support time. If 'true', timeAnimation is enabled. */
673
+ timeAnimation?: boolean;
674
+ }
675
+
676
+ export interface IBingLayer extends ILayer {
677
+ /** String value that unlocks the use of Bing layers in a web map. */
678
+ bingKey?: string;
679
+ /** Boolean value indicating whether the Bing key can be shared to the public. */
680
+ canShareBingPublic?: boolean;
681
+ /** String indicating the layer type. */
682
+ layerType: "BingMapsAerial" | "BingMapsRoad" | "BingMapsHybrid";
683
+ /** A string value representing the URL to the Portal/organization Self resource. Calls should be made to this property to retrieve the Bing key. If the key is not made accessible to the public or if canShareBingPublic is false, any web maps using Bing layers will not work. */
684
+ portalUrl?: string;
685
+ }
686
+
687
+ export interface IImageServiceLayer extends ILayer, ISupportsTime {
688
+ /** An array of bandIds that are visible, can specify bands to export or rearrange band order(from image service). */
689
+ bandIds?: number[];
690
+ /** Controls how much loss the image will be subjected to by the compression algorithm (from image service). */
691
+ compressionQuality?: any;
692
+ /** Stores interactive filters. */
693
+ definitionEditor?: any;
694
+ /** Boolean property indicating whether to ignore popups defined by the service item. */
695
+ disablePopup?: boolean;
696
+ /** String value representing image format. */
697
+ format?:
698
+ | "jpgpng"
699
+ | "png"
700
+ | "png8"
701
+ | "png24"
702
+ | "jpg"
703
+ | "bmp"
704
+ | "gif"
705
+ | "tiff"
706
+ | "png32";
707
+
708
+ /** The algorithm used for interpolation. */
709
+ interpolation?:
710
+ | "RSP_BilinearInterpolation"
711
+ | "RSP_CubicConvolution"
712
+ | "RSP_Majority"
713
+ | "RSP_NearestNeighbor";
714
+
715
+ /** This is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false). */
716
+ isReference?: boolean;
717
+ /** A layerDefinition object defining the attribute schema and drawing information for the layer. */
718
+ layerDefinition?: any;
719
+ /** String indicating the layer type. Value of this property must be ArcGISImageServiceLayer */
720
+ layerType: "ArcGISImageServiceLayer";
721
+ /** Specifies the mosaic rule when defining how individual images should be mosaicked. */
722
+ mosaicRule?: any;
723
+ /** The pixel value that represents no information. */
724
+ noData?: any;
725
+ /** A string value of interpretation of noData setting. Default is 'esriNoDataMatchAny' when noData is a number, and 'esriNoDataMatchAll' when noData is an array. */
726
+ noDataInterpretation?: "esriNoDataMatchAny" | "esriNoDataMatchAll";
727
+ /** Pertains to the type of values stored in the raster, such as signed integer, unsigned integer, or floating point. */
728
+ pixelType?:
729
+ | "C128"
730
+ | "C64"
731
+ | "F32"
732
+ | "F64"
733
+ | "S16"
734
+ | "S32"
735
+ | "S8"
736
+ | "U1"
737
+ | "U16"
738
+ | "U2"
739
+ | "U32"
740
+ | "U4"
741
+ | "U8"
742
+ | "UNKNOWN";
743
+
744
+ /** A popupInfo object defining the content of popup windows when you click or query a feature. */
745
+ popupInfo?: IPopupInfo;
746
+ /** Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled. */
747
+ refreshInterval?: number;
748
+ /** Specifies the rendering rule for how the requested image should be rendered. */
749
+ renderingRule?: any;
750
+ }
751
+
752
+ export interface IImageVectorLayer extends ILayer, ISupportsTime {
753
+ /** Stores interactive filters. */
754
+ definitionEditor?: any;
755
+ /** Boolean property indicating whether to ignore popups defined by the service item. */
756
+ disablePopup?: any;
757
+ /** This is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false). */
758
+ isReference?: boolean;
759
+ /** A layerDefinition object defining the attribute schema and drawing information for the layer. */
760
+ layerDefinition?: any;
761
+ /** String indicating the layer type. Value of this property must be ArcGISImageServiceVectorLayer */
762
+ layerType: "ArcGISImageServiceVectorLayer";
763
+ /** Specifies the mosaic rule when defining how individual images should be mosaicked. */
764
+ mosaicRule?: any;
765
+ /** A popupInfo object defining the content of popup windows when you click or query a feature. */
766
+ popupInfo?: IPopupInfo;
767
+ /** Number describing the size of the tile. */
768
+ symbolTileSize?: any;
769
+ }
770
+
771
+ export interface IDefinitionParameter {
772
+ /** The default value that is automatically given if nothing is provided. */
773
+ defaultValue?: number | string;
774
+ /** A string value representing the name of the field to query. */
775
+ fieldName?: string;
776
+ /** Number given to uniquely identify the specified parameter. */
777
+ parameterId?: any;
778
+ /** The field type for the specified field parameter. */
779
+ type?:
780
+ | "esriFieldTypeBlob"
781
+ | "esriFieldTypeDate"
782
+ | "esriFieldTypeDouble"
783
+ | "esriFieldTypeGeometry"
784
+ | "esriFieldTypeGlobalID"
785
+ | "esriFieldTypeGUID"
786
+ | "esriFieldTypeInteger"
787
+ | "esriFieldTypeOID"
788
+ | "esriFieldTypeRaster"
789
+ | "esriFieldTypeSingle"
790
+ | "esriFieldTypeSmallInteger"
791
+ | "esriFieldTypeString"
792
+ | "esriFieldTypeXML";
793
+
794
+ /** An integer value representing exact UNIX time used when defaultValue is a date string. */
795
+ utcValue?: number;
796
+ }
797
+
798
+ export interface IDefinitionInput {
799
+ /** A string value representing a hint for the input. */
800
+ hint?: string;
801
+ /** An array of parameter objects. */
802
+ parameters?: IDefinitionParameter[];
803
+ /** A string value representing the prompt for the input. */
804
+ prompt?: string;
805
+ }
806
+
807
+ /**
808
+ * The definitionEditor stores interactive filters at the same level as layerDefinition.
809
+ */
810
+ export interface IDefinitionEditor {
811
+ /** An array of input objects. */
812
+ inputs?: IDefinitionInput[];
813
+ /** A string value representing the where clause for the interactive filter. */
814
+ parameterizedExpression?: string;
815
+ }
816
+
817
+ /**
818
+ * A layer object may allow overrides on popup content and drawing behavior for individual layers of a web service.
819
+ * This object also contains geographic features and their attributes when used in a feature collection.
820
+ */
821
+ export interface IChildLayer {
822
+ /** Default visibility of the layers in the map service. */
823
+ defaultVisibility?: any;
824
+ /** An object that provides interactive filters. */
825
+ definitionEditor?: IDefinitionEditor;
826
+ /** A featureSet object containing the geometry and attributes of the features in the layer. Used with feature collections only. */
827
+ featureSet?: IFeatureSet;
828
+ /** Information about each field in a layer. Used with feature collections. */
829
+ field?: IField[];
830
+ /** A string indicating the index position of the layer in the map service or feature collection. */
831
+ id?: string;
832
+ /** The layerDefinition object defines the attribute schema and drawing information for the layer. */
833
+ layerDefinition?: any;
834
+ /** A string URL to a service that should be used for all queries against the layer. Used with hosted tiled map services on ArcGIS Online when there is an associated feature service that allows for queries. */
835
+ layerUrl?: any;
836
+ /** Represents the maximum scale at which the layer definition will be applied. */
837
+ maxScale?: any;
838
+ /** Represents the minimum scale at which the layer definition will be applied. */
839
+ minScale?: any;
840
+ /** Iterates within a featureset. Number objectId value is incremented +1 based on last Object ID defined for the feature in a featureset. Used with feature collections. */
841
+ nextObjectId?: any;
842
+ /** If working with nested layers, this is the numeric value indicating the layer id of the next layer (parent) directly above the current referenced layer. */
843
+ parentLayerId?: any;
844
+ /** A popupInfo object defining the popup window content for the layer. */
845
+ popupInfo?: IPopupInfo;
846
+ /** Indicates whether to allow map authors the ability to control what layers should be shown in a client's legend. */
847
+ showLegend?: any;
848
+ /** Array of numeric values indicating the layer index for layers nested directly under the parent layer. */
849
+ subLayer?: any;
850
+ /** If the layer is a parent layer, it will have one or more sub layers included in an array. */
851
+ subLayerIds?: any;
852
+ /** A user-friendly string title for the layer that can be used in a table of contents. */
853
+ title?: any;
854
+ }
855
+
856
+ export interface IMapServiceLayer extends ILayer, ISupportsTime {
857
+ /** This is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false). */
858
+ isReference?: any;
859
+ /** String indicating the layer type. */
860
+ layerType: "ArcGISMapServiceLayer";
861
+ /** An array of layer objects defining the styling, geometry, and attribute information for the features. */
862
+ layers?: IChildLayer[];
863
+ /** Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled. */
864
+ refreshInterval?: number;
865
+ /** (Optional) A thematicGroup object used in ArcGISMapServiceLayer layers. */
866
+ thematicGroup?: IThematicGroup;
867
+ /** An array of sublayer ids that should appear visible. Used with map service layers that are not tiled. */
868
+ visibleLayers?: number[];
869
+ }
870
+
871
+ export interface IThematicGroup {
872
+ /** An array of string values indicating all the fields used within the webmap. All other fields can be disregarded and should not display in any field selection list. */
873
+ fieldNames?: string[];
874
+ /** A zero-based array of integers indicating the layers to be used in the webmap. NOTE: All other layers should not be added to the TOC and may or may not be visible on the map as reference layers. */
875
+ layerIds?: number[];
876
+ /** String property indicating the name for the thematic grouping of layers. */
877
+ name?: string;
878
+ }
879
+
880
+ export interface IDrawingInfo {
881
+ /** Only used for feature collections with a renderer. The feature's symbol is defined by the layer's renderer. */
882
+ fixedSymbols?: any;
883
+ /** An object defining the properties used for labeling the layer. */
884
+ labelingInfo?: any;
885
+ /** An object defined which provides the symbology for the layer. */
886
+ renderer?: any;
887
+ /** Boolean property indicating whether symbols should stay the same size in screen units as you zoom in. A value of true means the symbols stay the same size in screen units regardless of the map scale. */
888
+ scaleSymbols?: any;
889
+ /** Defines whether labels should be shown or not. This is only valid for sublayers. */
890
+ showLabels?: boolean;
891
+ /** Number value ranging between 0 (no transparency) to 100 (completely transparent). */
892
+ transparency?: number;
893
+ }
894
+
895
+ export interface IEditingInfo {
896
+ /** date of last edit to the layer */
897
+ lastEditDate?: number
898
+ }
899
+
900
+ /**
901
+ * `ILayerDefinition` can also be imported from the following packages:
902
+ *
903
+ * ```js
904
+ * import { ILayerDefinition } from "@esri/arcgis-rest-service-admin";
905
+ * import { ILayerDefinition } from "@esri/arcgis-rest-feature-layer";
906
+ * ```
907
+ */
908
+ export interface ILayerDefinition extends IHasZM {
909
+ /** Boolean value indicating whether the geometry of the features in the layer can be edited. */
910
+ allowGeometryUpdates?: boolean;
911
+ /** A comma separated list of supported capabilities, e.g. Query,Editing. */
912
+ capabilities?: string;
913
+ /** String value for the copyright text information for the layer. */
914
+ copyrightText?: string;
915
+ /** Numeric value indicating the server version of the layer. */
916
+ currentVersion?: number;
917
+ /** Boolean value indicating whether the layer's visibility is turned on. */
918
+ defaultVisibility?: boolean;
919
+ /** Stores interactive filters. */
920
+ definitionEditor?: IDefinitionEditor;
921
+ /** SQL-based definition expression string that narrows the data to be displayed in the layer. */
922
+ definitionExpression?: string;
923
+ /** String value of the layer as defined in the map service. */
924
+ description?: string;
925
+ /** A string value that summarizes the feature. */
926
+ displayField?: string;
927
+ /** Contains drawing, labeling, and transparency information. */
928
+ drawingInfo?: any;
929
+ /** An object defining the rectangular area. */
930
+ extent?: IExtent | null;
931
+ /** An object defining the editing info (last edit date). */
932
+ editingInfo?: IEditingInfo;
933
+ /** Feature reductions declutter the screen by hiding features that would otherwise intersect with other features on screen. */
934
+ featureReduction?: any;
935
+ /** An array of field objects containing information about the attribute fields for the feature collection or layer. */
936
+ fields?: IField[];
937
+ /** A string defining the type of geometry. Possible geometry types are: esriGeometryPoint, esriGeometryMultipoint, esriGeometryPolyline, esriGeometryPolygon, and esriGeometryEnvelope. */
938
+ geometryType?: GeometryType;
939
+ /** The unique identifier for a feature or table row within a geodatabase. */
940
+ globalIdField?: string;
941
+ /** Indicates whether attachments should be loaded for the layer. */
942
+ hasAttachments?: boolean;
943
+ /** Boolean value indicating whether data changes. True if it does not. */
944
+ hasStaticData?: boolean;
945
+ /** String value indicating the HTML popup type. */
946
+ htmlPopupType?:
947
+ | "esriServerHTMLPopupTypeNone"
948
+ | "esriServerHTMLPopupTypeAsURL"
949
+ | "esriServerHTMLPopupTypeAsHTMLText";
950
+
951
+ /** The identifier assigned to the layer. */
952
+ id?: number;
953
+ /** Boolean value indicating whether the data is versioned. */
954
+ isDataVersioned?: boolean;
955
+ /** Numeric value indicating tbe maximum number of records that will be returned at once for a query. */
956
+ maxRecordCount?: number;
957
+ /** Represents the maximum scale at which the layer definition will be applied. This does not apply to layers of type: ArcGISMapServiceLayer, ImageServiceVectorLayer or ImageServiceLayer. */
958
+ maxScale?: number;
959
+ /** Represents the minimum scale at which the layer definition will be applied. This does not apply to layers of type: ArcGISMapServiceLayer, ImageServiceVectorLayer or ImageServiceLayer. */
960
+ minScale?: number;
961
+ /** Contains a unique name for the layer that can be displayed in a legend. */
962
+ name?: string;
963
+ /** Indicates the name of the object ID field in the dataset. */
964
+ objectIdField?: string;
965
+ /** Dictates whether a client can support having an end user modify symbols on individual features. */
966
+ overrideSymbols?: boolean;
967
+ /** Indicates range information */
968
+ rangeInfos?: any;
969
+ /** An object indicating the layerDefinition's layer source. */
970
+ source?: any;
971
+ /** An object containing the WKID or WKT identifying the spatial reference of the layer's geometry. */
972
+ spatialReference?: ISpatialReference;
973
+ /** String value indicating the output formats that are supported in a query. */
974
+ supportedQueryFormats?: string;
975
+ /** Boolean value indicating whether the layer supports orderByFields in a query operation. */
976
+ supportsAdvancedQueries?: boolean;
977
+ /** Boolean value indicating whether the layer supports uploading attachments with the Uploads operation. This can then be used in the Add Attachment and Update Attachment operations. */
978
+ supportsAttachmentsByUploadId?: boolean;
979
+ /** Boolean value indicating whether the layer supports the Calculate REST operation when updating features. */
980
+ supportsCalculate?: boolean;
981
+ /** Boolean value indicating whether the layer supports rolling back edits made on a feature layer if some of the edits fail. */
982
+ supportsRollbackOnFailureParameter?: boolean;
983
+ /** Boolean value indicating whether feature layer query operations support statistical functions. */
984
+ supportsStatistics?: boolean;
985
+ /** Boolean value indicating whether the validateSQL operation is supported across a feature service layer. */
986
+ supportsValidateSql?: boolean;
987
+ /** A property of the layer definition when there are no types defined; otherwise, templates are defined as properties of the types. */
988
+ templates?: ITemplate[];
989
+ /** The time info metadata of the layer. May be set for feature layers inside a feature collection item. */
990
+ timeInfo?: any;
991
+ /** Indicates whether the layerDefinition applies to a Feature Layer or a Table. */
992
+ type?: "Feature Layer" | "Table";
993
+ /** Contains the name of the field holding the type ID for the features. */
994
+ typeIdField?: string;
995
+ /** Contains information about an attribute field. */
996
+ types?: any;
997
+ /** String value indicating the attribute field that is used to control the visibility of a feature.
998
+ * If applicable, when rendering a feature the client should use this field to control visibility.
999
+ * The field's values are 0 = do not display, 1 = display.
1000
+ */
1001
+ visibilityField?: string;
1002
+ relationships?: any[];
1003
+ editFieldsInfo?: {
1004
+ creationDateField?: string;
1005
+ creatorField?: string;
1006
+ editDateField?: string;
1007
+ editorField?: string;
1008
+ };
1009
+ parentLayerId?: number;
1010
+ ownershipBasedAccessControlForFeatures?: boolean;
1011
+ syncCanReturnChanges?: boolean;
1012
+ archivingInfo?: {
1013
+ supportsQueryWithHistoricMoment?: boolean;
1014
+ startArchivingMoment?: number;
1015
+ };
1016
+ supportsValidateSQL?: boolean;
1017
+ advancedQueryCapabilities?: {
1018
+ supportsPagination?: boolean;
1019
+ supportsTrueCurve?: boolean;
1020
+ supportsQueryWithDistance?: boolean;
1021
+ supportsReturningQueryExtent?: boolean;
1022
+ supportsStatistics?: boolean;
1023
+ supportsOrderBy?: boolean;
1024
+ supportsDistinct?: boolean;
1025
+ supportsSqlExpression?: boolean;
1026
+ supportsPercentileStatistics?: boolean;
1027
+ };
1028
+ allowTrueCurvesUpdates?: boolean;
1029
+ onlyAllowTrueCurveUpdatesByTrueCurveClients?: boolean;
1030
+ supportsApplyEditsWithGlobalIds?: boolean;
1031
+ subtypeField?: string;
1032
+ indexes?: any[];
1033
+ dateFieldsTimeReference?: {
1034
+ timeZone?: string;
1035
+ respectsDaylightSaving?: boolean;
1036
+ };
1037
+ useStandardizedQueries?: boolean;
1038
+ }
1039
+
1040
+ export interface ITypeInfoDomain {
1041
+ type: string | "inherited";
1042
+ }
1043
+
1044
+ export type FeatureEditTool =
1045
+ | "esriFeatureEditToolAutoCompletePolygon"
1046
+ | "esriFeatureEditToolPolygon"
1047
+ | "esriFeatureEditToolTriangle"
1048
+ | "esriFeatureEditToolRectangle"
1049
+ | "esriFeatureEditToolLeftArrow"
1050
+ | "esriFeatureEditToolRightArrow"
1051
+ | "esriFeatureEditToolEllipse"
1052
+ | "esriFeatureEditToolUpArrow"
1053
+ | "esriFeatureEditToolDownArrow"
1054
+ | "esriFeatureEditToolCircle"
1055
+ | "esriFeatureEditToolFreehand"
1056
+ | "esriFeatureEditToolLine"
1057
+ | "esriFeatureEditToolNone"
1058
+ | "esriFeatureEditToolText"
1059
+ | "esriFeatureEditToolPoint";
1060
+
1061
+ /**
1062
+ * Templates describe features that can be created in a layer. They are generally used with feature collections and editable web-based CSV layers.
1063
+ * Templates are not used with ArcGIS feature services as these already have templates defined in the service. They are also defined as properties
1064
+ * of the layer definition when there are no defined types. Otherwise, templates are defined as properties of the types.
1065
+ */
1066
+ export interface ITemplate {
1067
+ /** A string value containing a detailed description of the template. */
1068
+ description?: any;
1069
+ /**
1070
+ * An optional string that can define a client-side drawing tool to be used with this feature. For example, map notes used by the Online Map Viewer use this to represent the viewer's different drawing tools.
1071
+ */
1072
+ drawingTool?: FeatureEditTool;
1073
+ /** A string containing a user-friendly name for the template. */
1074
+ name?: string;
1075
+ /** A feature object representing a prototypical feature for the template. */
1076
+ prototype?: IFeature;
1077
+ }
1078
+
1079
+ export interface ITypeInfo {
1080
+ /** A comma-delimited series of domain objects for each domain in the type. */
1081
+ domains?: {
1082
+ [domain: string]: ITypeInfoDomain;
1083
+ };
1084
+ /** A unique string or numerical ID for the type. */
1085
+ id?: string | number;
1086
+ /** A user-friendly name for the type. */
1087
+ name?: string;
1088
+ /** Defined as a property of the layer definition when there are no types defined; otherwise, templates are defined as properties of the types. */
1089
+ templates?: ITemplate[];
1090
+ }
1091
+
1092
+ /**
1093
+ * Allows use of OpenStreetMap data for use in basemaps only.
1094
+ */
1095
+ export interface IOpenStreetMapLayer extends ILayer {
1096
+ /** String indicating the layer type. Value of this property must be OpenStreetMap */
1097
+ layerType: "OpenStreetMap";
1098
+ /**
1099
+ * @deprecated
1100
+ */
1101
+ type?: "OpenStreetMap";
1102
+ }
1103
+
1104
+ export interface ITiledImageServiceLayer extends ILayer {
1105
+ /** Applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false). */
1106
+ isReference?: boolean;
1107
+ /** String indicating the layer type. Value of this property must be ArcGISTiledImageServiceLayer */
1108
+ layerType: "ArcGISTiledImageServiceLayer";
1109
+ /** Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled. */
1110
+ refreshInterval?: number;
1111
+ }
1112
+
1113
+ /**
1114
+ * Exclusion areas define extent areas where no data will be fetched for a layer.
1115
+ */
1116
+ export interface IExclusionArea {
1117
+ /** The geometry defining the area where no data will be fetched. Only extent is supported. */
1118
+ geometry?: IGeometry;
1119
+ /** The zoom level where the exclusion ends. */
1120
+ maxScale?: number;
1121
+ /** The zoom level where the exclusion ends. */
1122
+ maxZoom?: number;
1123
+ /** The zoom level where the exclusion starts. */
1124
+ minScale?: number;
1125
+ /** The zoom level where the exclusion starts. */
1126
+ minZoom?: number;
1127
+ }
1128
+
1129
+ /**
1130
+ * An ArcGIS Tiled Map Service layer displays map content from an ArcGIS Server Map service that has been cached (tiled).
1131
+ */
1132
+ export interface ITiledMapServiceLayer extends ILayer {
1133
+ /**
1134
+ * NOTE: Applicable if used as a baseMapLayer. Integer value(s) indicating the display levels of the basemap layer.
1135
+ * Only applicable for TiledMapService layers. All tiled map service layers should share the same tiling scheme.
1136
+ * This property cannot be set via the Map Viewer UI.
1137
+ */
1138
+ displayLevels?: number | number[];
1139
+ /**
1140
+ * NOTE: Applicable if used as a baseMapLayer. An array of exclusionArea objects defining the layer exclusions.
1141
+ */
1142
+ exclusionAreas?: IExclusionArea[];
1143
+ /** This property is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false). */
1144
+ isReference?: any;
1145
+ /** Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal. */
1146
+ itemId?: any;
1147
+ /** String indicating the layer type. */
1148
+ layerType: "ArcGISTiledMapServiceLayer";
1149
+ /** An array of layer objects defining a URL for queries and the popup window content. */
1150
+ layers?: IChildLayer[];
1151
+ /** Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled. */
1152
+ refreshInterval?: number;
1153
+ }
1154
+
1155
+ /**
1156
+ * A vector tile layer references a set of web-accessible vector tiles and the corresponding style for how those tiles should be drawn.
1157
+ */
1158
+ export interface IVectorTileLayer extends ILayer {
1159
+ /** String indicating the layer type. */
1160
+ layerType: "VectorTileLayer";
1161
+ /** A url to a JSON file containing the stylesheet information used to render the layer. You may also pass an object containing the stylesheet information identical to the JSON file. */
1162
+ styleUrl?: string;
1163
+ /** Deprecated. User layerType instead. */
1164
+ type?: "VectorTileLayer";
1165
+ }
1166
+
1167
+ export interface ILod {
1168
+ /** ID for each level. */
1169
+ level?: number;
1170
+ /** String to be used when constructing URL to access a tile from this LOD. */
1171
+ levelValue?: string;
1172
+ /** Resolution in map units of each pixel in a tile for each level. */
1173
+ resolution?: number;
1174
+ /** Scale for each level. */
1175
+ scale?: number;
1176
+ }
1177
+
1178
+ /**
1179
+ * Tile information, returned from the WMTS OGC Web Service. The tileInfo will contain the spatial reference of the layer.
1180
+ * tileInfo is the same json representation as the ArcGIS Map/Image service tileInfo except that it may contain a levelValue
1181
+ * on the lod objects that should be used instead of the level in the templateUrl.
1182
+ */
1183
+ export interface ITileInfo {
1184
+ /** Requested tile's column. */
1185
+ cols?: any;
1186
+ /** Compression quality of the tile. */
1187
+ compressionQuality?: any;
1188
+ /** The dpi of the tiling scheme. */
1189
+ dpi?: any;
1190
+ /** Image format of the cached tiles. */
1191
+ format?:
1192
+ | "jpg"
1193
+ | "png"
1194
+ | "png24"
1195
+ | "png32"
1196
+ | "png8"
1197
+ | "pdf"
1198
+ | "bmp"
1199
+ | "gif"
1200
+ | "svg"
1201
+ | "svgz"
1202
+ | "emf"
1203
+ | "ps"
1204
+ | "mixed"
1205
+ | "lerc";
1206
+
1207
+ /** An array of levels of detail that define the tiling scheme. */
1208
+ lods?: ILod[];
1209
+ /** The tiling scheme origin. */
1210
+ origin?: IPoint;
1211
+ /** Requested tile's row. */
1212
+ rows?: any;
1213
+ /** The spatial reference of the tiling schema. */
1214
+ spatialReference?: ISpatialReference;
1215
+ }
1216
+
1217
+ /**
1218
+ * Object defines and provides information about layers in a WMTSLayer service.
1219
+ */
1220
+ export interface IWebMapTileServiceInfo {
1221
+ /** A sequence of parameters used to append different custom parameters to a WMTS tile request. These parameters are applied to GetTile. The customLayerParameters property takes precedence if customParameters is also present. */
1222
+ customLayerParameters?: any;
1223
+ /** A sequence of parameters used to append custom parameters to all WMTS requests. These parameters are applied to GetCapabilities and GetTile. If used with the customLayerParameters property, customParameters will not take precedence. */
1224
+ customParameters?: any;
1225
+ /** Identifier for the specific layer used in the WMTS service. Required input by the user. */
1226
+ layerIdentifier: string;
1227
+ /** Tiling schema, set by the WMTS service. */
1228
+ tileMatrixSet?: any;
1229
+ /** URL to the WMTS web service. Required input by the user. */
1230
+ url: string;
1231
+ }
1232
+
1233
+ export interface IWebTiledLayer extends ILayer {
1234
+ /** Attribution to the Web Tiled Layer provider. It is displayed in the attribution on the web map. Input required by the user when the layer is added to the web map. */
1235
+ copyright?: any;
1236
+ /** An extent object representing the full extent envelope for the layer. */
1237
+ fullExtent?: IExtent;
1238
+ /** This is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false). */
1239
+ isReference?: any;
1240
+ /** String indicating the layer type. Value of this property must be WebTiledLayer */
1241
+ layerType: "WebTiledLayer";
1242
+ /** Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled. */
1243
+ refreshInterval?: any;
1244
+ /** If subdomains are detected, they must be specified. The map viewer detects if the Web Tiled Layer has subdomains by parsing the templateURL value for {subDomain}. */
1245
+ subDomains?: any;
1246
+ /** URL to the Web Tiled Layer. Input required by the user when the layer is added to the web map. The template URL contains a parameterized URL. The URL can contain the following templated parameters: 'level', 'col', 'row', and 'subDomain'. */
1247
+ templateUrl?: any;
1248
+ /** Contains the spatial reference and the tiling scheme of the layer. Typically retrieved from a WMTS OGC Web Service. If missing the layer must be in the WGS 1984 Web Mercator (Auxiliary Sphere) tiling scheme. */
1249
+ tileInfo?: ITileInfo;
1250
+ /**
1251
+ * Deprecated, use layerType instead.
1252
+ * @deprecated
1253
+ */
1254
+ type?: "WebTiledLayer";
1255
+ /** Object containing information about the chosen WMTS service layer and tiling schema. */
1256
+ wmtsInfo?: IWebMapTileServiceInfo;
1257
+ }
1258
+
1259
+ /**
1260
+ * The CSV layer type references a CSV or TXT file from a publically-accessible web server. It then dynamically loads into the map at run time. The CSV layer will maintain a reference to the CSV resource.
1261
+ */
1262
+ export interface ICsvLayer extends ILayer {
1263
+ /** A string defining the character used to separate columns in a CSV file. */
1264
+ columnDelimiter?: "," | " " | ";" | "|" | "\t";
1265
+ /** A layerDefinition object defining the attribute schema and drawing information for the layer. */
1266
+ layerDefinition?: ILayerDefinition;
1267
+ /** String indicating the layer type. */
1268
+ layerType: "CSV";
1269
+ /** A locationInfo object defining how location information will be retrieved from a CSV file. */
1270
+ locationInfo?: any;
1271
+ /** A popupInfo object defining the content of popup windows when you click or query a feature. */
1272
+ popupInfo?: IPopupInfo;
1273
+ /** Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled. */
1274
+ refreshInterval?: number;
1275
+ /** Deprecated, use layerType instead. */
1276
+ type?: "CSV";
1277
+ }
1278
+
1279
+ /**
1280
+ * Feature layers can be created by referencing a layer from either a map service or a feature service or by specifying a feature collection object.
1281
+ * Use a map service if you just want to retrieve geometries and attributes from the server and symbolize them yourself. Use a feature service if
1282
+ * you want to take advantage of symbols from the service's source map document. Also, use a feature service if you plan on doing editing with the
1283
+ * feature layer. Feature layers honor any feature templates configured in the source map document. Feature collection objects are used to create
1284
+ * a feature layer based on the supplied definition.
1285
+ */
1286
+ export interface IFeatureLayer extends ILayer, ISupportsTime {
1287
+ /** A comma-separated string listing which editing operations are allowed on an editable feature service. */
1288
+ capabilities?: string;
1289
+ /** Stores interactive filters. */
1290
+ definitionEditor?: IDefinitionEditor;
1291
+ /** Indicates whether to allow a client to ignore popups defined by the service item. */
1292
+ disablePopup?: true;
1293
+ /** A featureCollection object defining a layer of features whose geometry and attributes are either stored directly within the web map or with an item. Feature Collections can be created from CSVs, shapefiles, GPX, or map notes. */
1294
+ featureCollection?: any;
1295
+ /** Indicates the type of features in the feature collection. If featureCollectionType is missing, it means the feature collection is a regular single-layer or multi-layer feature collection. */
1296
+ featureCollectionType?: "markup" | "notes" | "route";
1297
+
1298
+ /** A layerDefinition object defining the attribute schema and drawing information for the layer. */
1299
+ layerDefinition?: ILayerDefinition;
1300
+ /** String indicating the layer type. */
1301
+ layerType: "ArcGISFeatureLayer";
1302
+ /** 0 is snapshot mode. 1 is on-demand mode. 2 is selection-only mode. Used with ArcGIS feature services and individual layers in ArcGIS map services. */
1303
+ mode?: 0 | 1 | 2;
1304
+ /** A popupInfo object defining the content of popup windows when you click or query a feature. */
1305
+ popupInfo?: IPopupInfo;
1306
+ /** Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled. */
1307
+ refreshInterval?: number;
1308
+ /** Labels will display if this property is set to true and the layer also has a labelingInfo property associated with it. This property can get stored in the web map config and in the item/data. */
1309
+ showLabels?: true;
1310
+ /** An array of sublayer ids that should appear visible. Used with feature layers that are based on feature collections. */
1311
+ visibleLayers?: number[];
1312
+ }
1313
+
1314
+ export interface IGeoRssLayer extends ILayer {
1315
+ /** String indicating the layer type. */
1316
+ layerType: "GeoRSS";
1317
+ /** Defined by the GeoRSS to JSON request service. If the GeoRSS feed does not have lines, this property is not added to the layer JSON. */
1318
+ lineSymbol?: ISimpleLineSymbol;
1319
+ /** Defined by the GeoRSS to JSON request service. If the GeoRSS feed does not have points, this property is not added to the layer JSON. */
1320
+ pointSymbol?: IPictureMarkerSymbol;
1321
+ /** Defined by the GeoRSS to JSON request service. If the GeoRSS feed does not have polygons, this property is not added to the layer JSON. */
1322
+ polygonSymbol?: ISimpleFillSymbol;
1323
+ /** Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled. */
1324
+ refreshInterval?: number;
1325
+ /**
1326
+ * Deprecated, please use layerType.
1327
+ * @deprecated
1328
+ */
1329
+ type?: "GeoRSS";
1330
+ }
1331
+
1332
+ export interface IKmlLayer extends ILayer {
1333
+ /** String indicating the layer type. */
1334
+ layerType: "KML";
1335
+ /** A number representing the maximum scale at which the layer will be visible. The number is the scale's denominator. */
1336
+ maxScale?: any;
1337
+ /** A number representing the minimum scale at which the layer will be visible. The number is the scale's denominator. */
1338
+ minScale?: any;
1339
+ /** The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency. */
1340
+ opacity?: any;
1341
+ /** Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled. */
1342
+ refreshInterval?: any;
1343
+ /** Indicates whether to allow map authors the ability to control what layers should be shown in a client's legend. */
1344
+ showLegend?: any;
1345
+ /** A user-friendly string title for the layer that can be used in a table of contents. */
1346
+ title?: any;
1347
+ /**
1348
+ * @deprecated
1349
+ * Use layerType instead.
1350
+ */
1351
+ type?: "KML";
1352
+ /** Array of numeric IDs of folders that will be made visible. */
1353
+ visibleFolders?: number[];
1354
+ }
1355
+
1356
+ export interface IArcGisStreamLayer extends ILayer {
1357
+ /** Stores interactive filters. */
1358
+ definitionEditor?: IDefinitionEditor;
1359
+ /** Indicates whether to ignore popups defined by the service item. */
1360
+ disablePopup?: boolean;
1361
+ /** A layerDefinition object defining the attribute schema and drawing information for the layer. */
1362
+ layerDefinition?: ILayerDefinition;
1363
+ /** String indicating the layer type. */
1364
+ layerType: "ArcGISStreamLayer";
1365
+ /** A popupInfo object defining the content of pop-up windows when you click or query a feature. */
1366
+ popupInfo?: IPopupInfo;
1367
+ }