sintfacilis 1.0.0

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