aspernaturalias 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (370) hide show
  1. package/.prettierignore +2 -0
  2. package/.travis.yml +31 -0
  3. package/.vscode/launch.json +24 -0
  4. package/.vscode/settings.json +3 -0
  5. package/codecov.yml +3 -0
  6. package/demos/ago-node-cli/README.md +29 -0
  7. package/demos/ago-node-cli/ago.js +33 -0
  8. package/demos/ago-node-cli/index.js +11 -0
  9. package/demos/ago-node-cli/lib/item-export-command.js +48 -0
  10. package/demos/ago-node-cli/lib/item-search-command.js +35 -0
  11. package/demos/ago-node-cli/package-lock.json +152 -0
  12. package/demos/ago-node-cli/package.json +30 -0
  13. package/demos/attachments/README.md +5 -0
  14. package/demos/attachments/index.html +164 -0
  15. package/demos/attachments/package-lock.json +182 -0
  16. package/demos/attachments/package.json +18 -0
  17. package/demos/batch-geocoder-node/NYC_Restaurant_Inspection_Results.csv +100 -0
  18. package/demos/batch-geocoder-node/README.md +15 -0
  19. package/demos/batch-geocoder-node/batch-geocode.js +115 -0
  20. package/demos/batch-geocoder-node/config-template.js +18 -0
  21. package/demos/batch-geocoder-node/package-lock.json +94 -0
  22. package/demos/batch-geocoder-node/package.json +38 -0
  23. package/demos/express/README.md +15 -0
  24. package/demos/express/config.json.template +3 -0
  25. package/demos/express/package-lock.json +413 -0
  26. package/demos/express/package.json +18 -0
  27. package/demos/express/server.js +33 -0
  28. package/demos/feature-service-browser/README.md +6 -0
  29. package/demos/feature-service-browser/index.html +122 -0
  30. package/demos/feature-service-browser/package-lock.json +182 -0
  31. package/demos/feature-service-browser/package.json +18 -0
  32. package/demos/geocoder-browser/README.md +10 -0
  33. package/demos/geocoder-browser/config.js.template +1 -0
  34. package/demos/geocoder-browser/index.html +131 -0
  35. package/demos/geocoder-browser/package-lock.json +182 -0
  36. package/demos/geocoder-browser/package.json +19 -0
  37. package/demos/geocoder-browser/post-sign-in.html +25 -0
  38. package/demos/jsapi-integration/README.md +25 -0
  39. package/demos/jsapi-integration/config.js +6 -0
  40. package/demos/jsapi-integration/index.html +85 -0
  41. package/demos/jsapi-integration/package-lock.json +184 -0
  42. package/demos/jsapi-integration/package.json +19 -0
  43. package/demos/node-cli-item-management/README.md +10 -0
  44. package/demos/node-cli-item-management/index.js +238 -0
  45. package/demos/node-cli-item-management/package-lock.json +152 -0
  46. package/demos/node-cli-item-management/package.json +27 -0
  47. package/demos/node-cli-item-management/screenshot.png +0 -0
  48. package/demos/oauth2-browser/README.md +14 -0
  49. package/demos/oauth2-browser/authenticate.html +30 -0
  50. package/demos/oauth2-browser/config.js.template +6 -0
  51. package/demos/oauth2-browser/index.html +202 -0
  52. package/demos/oauth2-browser/logo.svg +4 -0
  53. package/demos/oauth2-browser/package-lock.json +163 -0
  54. package/demos/oauth2-browser/package.json +18 -0
  55. package/demos/oauth2-browser/style.css +36 -0
  56. package/demos/oauth2-browser-retry/README.md +25 -0
  57. package/demos/oauth2-browser-retry/authenticate.html +22 -0
  58. package/demos/oauth2-browser-retry/index.html +116 -0
  59. package/demos/oauth2-browser-retry/logo.svg +4 -0
  60. package/demos/stream-response-to-file/README.md +7 -0
  61. package/demos/stream-response-to-file/index.js +36 -0
  62. package/demos/stream-response-to-file/output/.gitkeep +0 -0
  63. package/demos/stream-response-to-file/package-lock.json +60 -0
  64. package/demos/stream-response-to-file/package.json +33 -0
  65. package/demos/tree-shaking-rollup/.babelrc +3 -0
  66. package/demos/tree-shaking-rollup/README.md +9 -0
  67. package/demos/tree-shaking-rollup/index.html +11 -0
  68. package/demos/tree-shaking-rollup/package-lock.json +2225 -0
  69. package/demos/tree-shaking-rollup/package.json +25 -0
  70. package/demos/tree-shaking-rollup/rollup.config.js +17 -0
  71. package/demos/tree-shaking-rollup/src/index.js +8 -0
  72. package/demos/tree-shaking-webpack/README.md +9 -0
  73. package/demos/tree-shaking-webpack/index.html +11 -0
  74. package/demos/tree-shaking-webpack/package-lock.json +4595 -0
  75. package/demos/tree-shaking-webpack/package.json +24 -0
  76. package/demos/tree-shaking-webpack/src/index.js +10 -0
  77. package/demos/tree-shaking-webpack/webpack.config.js +27 -0
  78. package/demos/vue/.env.example +11 -0
  79. package/demos/vue/.eslintrc.js +17 -0
  80. package/demos/vue/.postcssrc.js +5 -0
  81. package/demos/vue/README.md +17 -0
  82. package/demos/vue/babel.config.js +3 -0
  83. package/demos/vue/package-lock.json +11323 -0
  84. package/demos/vue/package.json +33 -0
  85. package/demos/vue/public/favicon.ico +0 -0
  86. package/demos/vue/public/index.html +24 -0
  87. package/demos/vue/src/assets/logo.svg +29 -0
  88. package/demos/vue/src/components/App.vue +305 -0
  89. package/demos/vue/src/components/Authenticate.vue +65 -0
  90. package/demos/vue/src/components/Loader.vue +230 -0
  91. package/demos/vue/src/main.js +92 -0
  92. package/demos/webmap-checker-sapper/.env.example +5 -0
  93. package/demos/webmap-checker-sapper/README.md +123 -0
  94. package/demos/webmap-checker-sapper/appveyor.yml +18 -0
  95. package/demos/webmap-checker-sapper/cypress/fixtures/example.json +5 -0
  96. package/demos/webmap-checker-sapper/cypress/integration/spec.js +19 -0
  97. package/demos/webmap-checker-sapper/cypress/plugins/index.js +17 -0
  98. package/demos/webmap-checker-sapper/cypress/support/commands.js +25 -0
  99. package/demos/webmap-checker-sapper/cypress/support/index.js +20 -0
  100. package/demos/webmap-checker-sapper/cypress.json +4 -0
  101. package/demos/webmap-checker-sapper/package-lock.json +3851 -0
  102. package/demos/webmap-checker-sapper/package.json +50 -0
  103. package/demos/webmap-checker-sapper/rollup.config.js +87 -0
  104. package/demos/webmap-checker-sapper/src/client.js +20 -0
  105. package/demos/webmap-checker-sapper/src/components/LayerStatus.html +108 -0
  106. package/demos/webmap-checker-sapper/src/components/Nav.html +21 -0
  107. package/demos/webmap-checker-sapper/src/components/WebMap.html +62 -0
  108. package/demos/webmap-checker-sapper/src/routes/_error.html +41 -0
  109. package/demos/webmap-checker-sapper/src/routes/_layout.html +21 -0
  110. package/demos/webmap-checker-sapper/src/routes/auth/authorize.js +18 -0
  111. package/demos/webmap-checker-sapper/src/routes/auth/exchange-token.js +20 -0
  112. package/demos/webmap-checker-sapper/src/routes/auth/post-sign-in.js +24 -0
  113. package/demos/webmap-checker-sapper/src/routes/auth/sign-out.js +10 -0
  114. package/demos/webmap-checker-sapper/src/routes/index.html +20 -0
  115. package/demos/webmap-checker-sapper/src/routes/webmaps/[webmapId].html +83 -0
  116. package/demos/webmap-checker-sapper/src/routes/webmaps/index.html +59 -0
  117. package/demos/webmap-checker-sapper/src/server.js +101 -0
  118. package/demos/webmap-checker-sapper/src/service-worker.js +82 -0
  119. package/demos/webmap-checker-sapper/src/template.html +33 -0
  120. package/demos/webmap-checker-sapper/src/userInfoMiddleware.js +21 -0
  121. package/demos/webmap-checker-sapper/src/utils.js +33 -0
  122. package/demos/webmap-checker-sapper/static/favicon.png +0 -0
  123. package/demos/webmap-checker-sapper/static/global.css +36 -0
  124. package/demos/webmap-checker-sapper/static/manifest.json +20 -0
  125. package/demos/webmap-checker-sapper/static/svelte-logo-192.png +0 -0
  126. package/demos/webmap-checker-sapper/static/svelte-logo-512.png +0 -0
  127. package/docs/FAQ.md +48 -0
  128. package/docs/HISTORY.md +62 -0
  129. package/docs/acetate.config.js +262 -0
  130. package/docs/build-typedoc.js +434 -0
  131. package/docs/generate-srihashes.js +53 -0
  132. package/docs/src/_layout.html +86 -0
  133. package/docs/src/api/_declaration.html +600 -0
  134. package/docs/src/api/_layout.html +204 -0
  135. package/docs/src/api/_package.html +38 -0
  136. package/docs/src/api/index.html +16 -0
  137. package/docs/src/guides/_layout.html +24 -0
  138. package/docs/src/guides/amd-requirejs-dojo.md +40 -0
  139. package/docs/src/guides/browser-authentication.md +41 -0
  140. package/docs/src/guides/bundlers.md +52 -0
  141. package/docs/src/guides/cli-authentication.md +9 -0
  142. package/docs/src/guides/client-server-authentication.md +9 -0
  143. package/docs/src/guides/from-a-cdn.md +38 -0
  144. package/docs/src/guides/index.md +59 -0
  145. package/docs/src/guides/node.md +87 -0
  146. package/docs/src/guides/package-overview.md +111 -0
  147. package/docs/src/guides/server-authentication.md +9 -0
  148. package/docs/src/guides/whats-new-v2-0.md +305 -0
  149. package/docs/src/img/icons.png +0 -0
  150. package/docs/src/img/icons@2x.png +0 -0
  151. package/docs/src/index.html +12 -0
  152. package/docs/src/js/api-search.js +112 -0
  153. package/docs/src/js/nav-toggle.js +41 -0
  154. package/docs/src/sass/_highlight.scss +96 -0
  155. package/docs/src/sass/_icons.scss +157 -0
  156. package/docs/src/sass/style.scss +242 -0
  157. package/docs/src/srihashes.json +12 -0
  158. package/jasmine.json +7 -0
  159. package/karma.conf.js +106 -0
  160. package/lerna.json +8 -0
  161. package/notes/README.md +88 -0
  162. package/package.json +129 -0
  163. package/packages/arcgis-rest-auth/README.md +71 -0
  164. package/packages/arcgis-rest-auth/package-lock.json +11 -0
  165. package/packages/arcgis-rest-auth/package.json +69 -0
  166. package/packages/arcgis-rest-auth/src/ApplicationSession.ts +122 -0
  167. package/packages/arcgis-rest-auth/src/UserSession.ts +997 -0
  168. package/packages/arcgis-rest-auth/src/authenticated-request-options.ts +24 -0
  169. package/packages/arcgis-rest-auth/src/fetch-token.ts +50 -0
  170. package/packages/arcgis-rest-auth/src/generate-token.ts +35 -0
  171. package/packages/arcgis-rest-auth/src/index.ts +9 -0
  172. package/packages/arcgis-rest-auth/test/ApplicationSession.test.ts +124 -0
  173. package/packages/arcgis-rest-auth/test/UserSession.test.ts +1315 -0
  174. package/packages/arcgis-rest-auth/test/fetchToken.test.ts +112 -0
  175. package/packages/arcgis-rest-auth/test/generateToken.test.ts +102 -0
  176. package/packages/arcgis-rest-auth/test/utils.ts +14 -0
  177. package/packages/arcgis-rest-auth/tsconfig.json +6 -0
  178. package/packages/arcgis-rest-feature-layer/README.md +77 -0
  179. package/packages/arcgis-rest-feature-layer/package-lock.json +11 -0
  180. package/packages/arcgis-rest-feature-layer/package.json +64 -0
  181. package/packages/arcgis-rest-feature-layer/src/add.ts +56 -0
  182. package/packages/arcgis-rest-feature-layer/src/addAttachment.ts +53 -0
  183. package/packages/arcgis-rest-feature-layer/src/decodeValues.ts +124 -0
  184. package/packages/arcgis-rest-feature-layer/src/delete.ts +61 -0
  185. package/packages/arcgis-rest-feature-layer/src/deleteAttachments.ts +52 -0
  186. package/packages/arcgis-rest-feature-layer/src/getAttachments.ts +55 -0
  187. package/packages/arcgis-rest-feature-layer/src/getLayer.ts +24 -0
  188. package/packages/arcgis-rest-feature-layer/src/helpers.ts +55 -0
  189. package/packages/arcgis-rest-feature-layer/src/index.ts +28 -0
  190. package/packages/arcgis-rest-feature-layer/src/query.ts +203 -0
  191. package/packages/arcgis-rest-feature-layer/src/queryRelated.ts +89 -0
  192. package/packages/arcgis-rest-feature-layer/src/update.ts +56 -0
  193. package/packages/arcgis-rest-feature-layer/src/updateAttachment.ts +59 -0
  194. package/packages/arcgis-rest-feature-layer/test/attachments.test.ts +202 -0
  195. package/packages/arcgis-rest-feature-layer/test/crud.test.ts +130 -0
  196. package/packages/arcgis-rest-feature-layer/test/decodeValues.test.ts +67 -0
  197. package/packages/arcgis-rest-feature-layer/test/getLayer.test.ts +31 -0
  198. package/packages/arcgis-rest-feature-layer/test/mocks/cvdQueryResponse.ts +225 -0
  199. package/packages/arcgis-rest-feature-layer/test/mocks/feature.ts +281 -0
  200. package/packages/arcgis-rest-feature-layer/test/mocks/fields.ts +779 -0
  201. package/packages/arcgis-rest-feature-layer/test/mocks/foo.txt +1 -0
  202. package/packages/arcgis-rest-feature-layer/test/mocks/service.ts +259 -0
  203. package/packages/arcgis-rest-feature-layer/test/query.test.ts +168 -0
  204. package/packages/arcgis-rest-feature-layer/tsconfig.json +6 -0
  205. package/packages/arcgis-rest-geocoding/README.md +86 -0
  206. package/packages/arcgis-rest-geocoding/package-lock.json +11 -0
  207. package/packages/arcgis-rest-geocoding/package.json +64 -0
  208. package/packages/arcgis-rest-geocoding/src/bulk.ts +105 -0
  209. package/packages/arcgis-rest-geocoding/src/geocode.ts +130 -0
  210. package/packages/arcgis-rest-geocoding/src/helpers.ts +54 -0
  211. package/packages/arcgis-rest-geocoding/src/index.ts +15 -0
  212. package/packages/arcgis-rest-geocoding/src/reverse.ts +84 -0
  213. package/packages/arcgis-rest-geocoding/src/suggest.ts +45 -0
  214. package/packages/arcgis-rest-geocoding/test/bulk.test.ts +151 -0
  215. package/packages/arcgis-rest-geocoding/test/geocode.test.ts +212 -0
  216. package/packages/arcgis-rest-geocoding/test/helpers.test.ts +85 -0
  217. package/packages/arcgis-rest-geocoding/test/mocks/responses.ts +637 -0
  218. package/packages/arcgis-rest-geocoding/test/reverse.test.ts +126 -0
  219. package/packages/arcgis-rest-geocoding/test/suggest.test.ts +53 -0
  220. package/packages/arcgis-rest-geocoding/tsconfig.json +6 -0
  221. package/packages/arcgis-rest-portal/README.md +73 -0
  222. package/packages/arcgis-rest-portal/package-lock.json +11 -0
  223. package/packages/arcgis-rest-portal/package.json +64 -0
  224. package/packages/arcgis-rest-portal/src/groups/create.ts +43 -0
  225. package/packages/arcgis-rest-portal/src/groups/get.ts +99 -0
  226. package/packages/arcgis-rest-portal/src/groups/helpers.ts +14 -0
  227. package/packages/arcgis-rest-portal/src/groups/join.ts +57 -0
  228. package/packages/arcgis-rest-portal/src/groups/notification.ts +77 -0
  229. package/packages/arcgis-rest-portal/src/groups/protect.ts +56 -0
  230. package/packages/arcgis-rest-portal/src/groups/remove.ts +32 -0
  231. package/packages/arcgis-rest-portal/src/groups/search.ts +25 -0
  232. package/packages/arcgis-rest-portal/src/groups/update.ts +39 -0
  233. package/packages/arcgis-rest-portal/src/index.ts +48 -0
  234. package/packages/arcgis-rest-portal/src/items/add.ts +137 -0
  235. package/packages/arcgis-rest-portal/src/items/create.ts +128 -0
  236. package/packages/arcgis-rest-portal/src/items/get.ts +177 -0
  237. package/packages/arcgis-rest-portal/src/items/helpers.ts +193 -0
  238. package/packages/arcgis-rest-portal/src/items/protect.ts +39 -0
  239. package/packages/arcgis-rest-portal/src/items/remove.ts +131 -0
  240. package/packages/arcgis-rest-portal/src/items/search.ts +25 -0
  241. package/packages/arcgis-rest-portal/src/items/update.ts +145 -0
  242. package/packages/arcgis-rest-portal/src/sharing/access.ts +84 -0
  243. package/packages/arcgis-rest-portal/src/sharing/group-sharing.ts +210 -0
  244. package/packages/arcgis-rest-portal/src/sharing/helpers.ts +84 -0
  245. package/packages/arcgis-rest-portal/src/users/get-user-url.ts +18 -0
  246. package/packages/arcgis-rest-portal/src/users/get-user.ts +58 -0
  247. package/packages/arcgis-rest-portal/src/users/invitation.ts +162 -0
  248. package/packages/arcgis-rest-portal/src/users/notification.ts +70 -0
  249. package/packages/arcgis-rest-portal/src/users/update.ts +66 -0
  250. package/packages/arcgis-rest-portal/src/util/SearchQueryBuilder.ts +374 -0
  251. package/packages/arcgis-rest-portal/src/util/generic-search.ts +67 -0
  252. package/packages/arcgis-rest-portal/src/util/get-portal-url.ts +27 -0
  253. package/packages/arcgis-rest-portal/src/util/get-portal.ts +52 -0
  254. package/packages/arcgis-rest-portal/src/util/search.ts +38 -0
  255. package/packages/arcgis-rest-portal/test/groups/crud.test.ts +180 -0
  256. package/packages/arcgis-rest-portal/test/groups/get.test.ts +101 -0
  257. package/packages/arcgis-rest-portal/test/groups/join.test.ts +72 -0
  258. package/packages/arcgis-rest-portal/test/groups/notification.test.ts +112 -0
  259. package/packages/arcgis-rest-portal/test/groups/protect.test.ts +72 -0
  260. package/packages/arcgis-rest-portal/test/groups/search.test.ts +110 -0
  261. package/packages/arcgis-rest-portal/test/items/add.test.ts +321 -0
  262. package/packages/arcgis-rest-portal/test/items/create.test.ts +375 -0
  263. package/packages/arcgis-rest-portal/test/items/get.test.ts +309 -0
  264. package/packages/arcgis-rest-portal/test/items/protect.test.ts +122 -0
  265. package/packages/arcgis-rest-portal/test/items/remove.test.ts +238 -0
  266. package/packages/arcgis-rest-portal/test/items/search.test.ts +272 -0
  267. package/packages/arcgis-rest-portal/test/items/update.test.ts +515 -0
  268. package/packages/arcgis-rest-portal/test/mocks/groups/responses.ts +144 -0
  269. package/packages/arcgis-rest-portal/test/mocks/items/foo.zip +0 -0
  270. package/packages/arcgis-rest-portal/test/mocks/items/item.ts +122 -0
  271. package/packages/arcgis-rest-portal/test/mocks/items/resources.ts +31 -0
  272. package/packages/arcgis-rest-portal/test/mocks/items/search.ts +121 -0
  273. package/packages/arcgis-rest-portal/test/mocks/portal/response.ts +112 -0
  274. package/packages/arcgis-rest-portal/test/mocks/sharing/sharing.ts +18 -0
  275. package/packages/arcgis-rest-portal/test/mocks/users/invitation.ts +70 -0
  276. package/packages/arcgis-rest-portal/test/mocks/users/notification.ts +34 -0
  277. package/packages/arcgis-rest-portal/test/mocks/users/user.ts +173 -0
  278. package/packages/arcgis-rest-portal/test/sharing/access.test.ts +162 -0
  279. package/packages/arcgis-rest-portal/test/sharing/group-sharing.test.ts +650 -0
  280. package/packages/arcgis-rest-portal/test/sharing/helpers.test.ts +55 -0
  281. package/packages/arcgis-rest-portal/test/users/get-user-url.test.ts +40 -0
  282. package/packages/arcgis-rest-portal/test/users/get-user.test.ts +90 -0
  283. package/packages/arcgis-rest-portal/test/users/invitation.test.ts +127 -0
  284. package/packages/arcgis-rest-portal/test/users/notification.test.ts +77 -0
  285. package/packages/arcgis-rest-portal/test/users/update.test.ts +151 -0
  286. package/packages/arcgis-rest-portal/test/util/SearchQueryBuilder.test.ts +340 -0
  287. package/packages/arcgis-rest-portal/test/util/get-portal-url.test.ts +37 -0
  288. package/packages/arcgis-rest-portal/test/util/portal.test.ts +97 -0
  289. package/packages/arcgis-rest-portal/tsconfig.json +6 -0
  290. package/packages/arcgis-rest-request/README.md +72 -0
  291. package/packages/arcgis-rest-request/package-lock.json +11 -0
  292. package/packages/arcgis-rest-request/package.json +60 -0
  293. package/packages/arcgis-rest-request/src/index.ts +24 -0
  294. package/packages/arcgis-rest-request/src/request.ts +389 -0
  295. package/packages/arcgis-rest-request/src/utils/ArcGISRequestError.ts +76 -0
  296. package/packages/arcgis-rest-request/src/utils/ErrorTypes.ts +29 -0
  297. package/packages/arcgis-rest-request/src/utils/GrantTypes.ts +5 -0
  298. package/packages/arcgis-rest-request/src/utils/HTTPMethods.ts +6 -0
  299. package/packages/arcgis-rest-request/src/utils/IAuthenticationManager.ts +21 -0
  300. package/packages/arcgis-rest-request/src/utils/IFetchTokenParams.ts +11 -0
  301. package/packages/arcgis-rest-request/src/utils/IGenerateTokenParams.ts +9 -0
  302. package/packages/arcgis-rest-request/src/utils/IParamBuilder.ts +3 -0
  303. package/packages/arcgis-rest-request/src/utils/IParams.ts +6 -0
  304. package/packages/arcgis-rest-request/src/utils/IParamsBuilder.ts +5 -0
  305. package/packages/arcgis-rest-request/src/utils/IRequestOptions.ts +43 -0
  306. package/packages/arcgis-rest-request/src/utils/ITokenRequestOptions.ts +9 -0
  307. package/packages/arcgis-rest-request/src/utils/ResponseFormats.ts +10 -0
  308. package/packages/arcgis-rest-request/src/utils/append-custom-params.ts +49 -0
  309. package/packages/arcgis-rest-request/src/utils/clean-url.ts +16 -0
  310. package/packages/arcgis-rest-request/src/utils/encode-form-data.ts +38 -0
  311. package/packages/arcgis-rest-request/src/utils/encode-query-string.ts +23 -0
  312. package/packages/arcgis-rest-request/src/utils/process-params.ts +109 -0
  313. package/packages/arcgis-rest-request/src/utils/retryAuthError.ts +10 -0
  314. package/packages/arcgis-rest-request/src/utils/warn.ts +11 -0
  315. package/packages/arcgis-rest-request/src/utils/with-options.ts +48 -0
  316. package/packages/arcgis-rest-request/test/mocks/errors.ts +76 -0
  317. package/packages/arcgis-rest-request/test/mocks/geojson-feature-collection.ts +13 -0
  318. package/packages/arcgis-rest-request/test/mocks/param-builder.ts +7 -0
  319. package/packages/arcgis-rest-request/test/mocks/sharing-rest-info.ts +41 -0
  320. package/packages/arcgis-rest-request/test/mocks/webmap.ts +41 -0
  321. package/packages/arcgis-rest-request/test/request.test.ts +496 -0
  322. package/packages/arcgis-rest-request/test/utils/ArcGISAuthError.test.ts +191 -0
  323. package/packages/arcgis-rest-request/test/utils/ArcGISRequestError.test.ts +51 -0
  324. package/packages/arcgis-rest-request/test/utils/check-for-errors.test.ts +111 -0
  325. package/packages/arcgis-rest-request/test/utils/clean-url.test.ts +47 -0
  326. package/packages/arcgis-rest-request/test/utils/encode-form-data.test.ts +133 -0
  327. package/packages/arcgis-rest-request/test/utils/process-params.test.ts +193 -0
  328. package/packages/arcgis-rest-request/test/utils/with-options.test.ts +133 -0
  329. package/packages/arcgis-rest-request/tsconfig.json +4 -0
  330. package/packages/arcgis-rest-routing/README.md +75 -0
  331. package/packages/arcgis-rest-routing/package-lock.json +11 -0
  332. package/packages/arcgis-rest-routing/package.json +63 -0
  333. package/packages/arcgis-rest-routing/src/helpers.ts +16 -0
  334. package/packages/arcgis-rest-routing/src/index.ts +11 -0
  335. package/packages/arcgis-rest-routing/src/solveRoute.ts +124 -0
  336. package/packages/arcgis-rest-routing/test/mocks/responses.ts +825 -0
  337. package/packages/arcgis-rest-routing/test/solveRoute.test.ts +509 -0
  338. package/packages/arcgis-rest-routing/tsconfig.json +6 -0
  339. package/packages/arcgis-rest-service-admin/README.md +73 -0
  340. package/packages/arcgis-rest-service-admin/package-lock.json +11 -0
  341. package/packages/arcgis-rest-service-admin/package.json +65 -0
  342. package/packages/arcgis-rest-service-admin/src/addTo.ts +70 -0
  343. package/packages/arcgis-rest-service-admin/src/create.ts +213 -0
  344. package/packages/arcgis-rest-service-admin/src/index.ts +9 -0
  345. package/packages/arcgis-rest-service-admin/test/addTo.test.ts +350 -0
  346. package/packages/arcgis-rest-service-admin/test/create.test.ts +377 -0
  347. package/packages/arcgis-rest-service-admin/test/mocks/layerDefinition.ts +79 -0
  348. package/packages/arcgis-rest-service-admin/test/mocks/move.ts +11 -0
  349. package/packages/arcgis-rest-service-admin/test/mocks/service.ts +69 -0
  350. package/packages/arcgis-rest-service-admin/tsconfig.json +6 -0
  351. package/packages/arcgis-rest-types/README.md +66 -0
  352. package/packages/arcgis-rest-types/package.json +54 -0
  353. package/packages/arcgis-rest-types/src/feature.ts +39 -0
  354. package/packages/arcgis-rest-types/src/geometry.ts +272 -0
  355. package/packages/arcgis-rest-types/src/group.ts +72 -0
  356. package/packages/arcgis-rest-types/src/index.ts +7 -0
  357. package/packages/arcgis-rest-types/src/item.ts +65 -0
  358. package/packages/arcgis-rest-types/src/symbol.ts +170 -0
  359. package/packages/arcgis-rest-types/src/user.ts +48 -0
  360. package/packages/arcgis-rest-types/src/webmap.ts +1345 -0
  361. package/packages/arcgis-rest-types/tsconfig.json +9 -0
  362. package/support/changelog.js +393 -0
  363. package/support/deploy-doc-site.js +16 -0
  364. package/support/dev.sh +6 -0
  365. package/support/publish.sh +47 -0
  366. package/support/test-helpers.js +9 -0
  367. package/tsconfig.json +63 -0
  368. package/tslint.json +16 -0
  369. package/umd-base-profile.js +81 -0
  370. package/umd-production-profile.js +13 -0
@@ -0,0 +1,122 @@
1
+ /* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
2
+ * Apache-2.0 */
3
+
4
+ import { IItem } from "@esri/arcgis-rest-types";
5
+ import {
6
+ IGetRelatedItemsResponse,
7
+ IGetItemGroupsResponse
8
+ } from "../../../src/items/get";
9
+
10
+ export const ItemSuccessResponse: any = {
11
+ success: true,
12
+ id: "3efakeitemid0000"
13
+ };
14
+
15
+ export const ItemResponse: IItem = {
16
+ id: "4bc",
17
+ owner: "jeffvader",
18
+ title: "DS Plans",
19
+ description: "The plans",
20
+ snippet: "Yeah these are the ones",
21
+ tags: ["plans", "star dust"],
22
+ type: "Web Map",
23
+ typeKeywords: ["Javascript", "hubSiteApplication"],
24
+ properties: {
25
+ parentId: "3eb"
26
+ },
27
+ created: 123,
28
+ modified: 456,
29
+ size: 123,
30
+ numViews: 1337,
31
+ protected: false
32
+ };
33
+
34
+ export const RelatedItemsResponse: IGetRelatedItemsResponse = {
35
+ total: 1,
36
+ relatedItems: [ItemResponse]
37
+ };
38
+
39
+ export const ItemDataResponse: any = {
40
+ source: "3ef",
41
+ values: {
42
+ key: "value"
43
+ }
44
+ };
45
+
46
+ export const ItemGroupResponse: IGetItemGroupsResponse = {
47
+ admin: [
48
+ {
49
+ id: "2ecb37a8c8fb4051af9c086c25503bb0",
50
+ title: "Street Maps",
51
+ isInvitationOnly: false,
52
+ owner: "jsmith",
53
+ description:
54
+ "The street maps group provides street maps for the city of Redlands.",
55
+ snippet: null,
56
+ tags: ["Redlands", "Street", "Maps"],
57
+ phone: "909.555.1234",
58
+ thumbnail: "streets.jpg",
59
+ created: 1247082196000,
60
+ modified: 1276793808000,
61
+ access: "public",
62
+ userMembership: {
63
+ username: "jsmith",
64
+ memberType: "owner",
65
+ applications: 1
66
+ },
67
+ isFav: false,
68
+ autoJoin: false,
69
+ isViewOnly: false,
70
+ protected: false
71
+ }
72
+ ],
73
+ member: [
74
+ {
75
+ id: "bf51aa6e879e4676b683dcbefb0ab0a9",
76
+ title: "Parks and Recreation",
77
+ isInvitationOnly: true,
78
+ owner: "swilson",
79
+ description:
80
+ "The Parks and Recreation group contains maps and applications used by the Parks Department.",
81
+ snippet: null,
82
+ tags: ["Redlands", "Parks", "Recreation"],
83
+ phone: "909.555.1234",
84
+ thumbnail: "parks.jpg",
85
+ created: 1247082197000,
86
+ modified: 1276793919000,
87
+ access: "private",
88
+ userMembership: {
89
+ username: "jsmith",
90
+ memberType: "member"
91
+ },
92
+ isFav: false,
93
+ autoJoin: false,
94
+ isViewOnly: false,
95
+ protected: false
96
+ }
97
+ ],
98
+ other: [
99
+ {
100
+ id: "dbc385ac1b7d4231b24b97750f0e633c",
101
+ title: "Featured Maps and Apps",
102
+ isInvitationOnly: true,
103
+ owner: "city_redlands",
104
+ description: "These items are featured on the gallery page.",
105
+ snippet: null,
106
+ tags: ["gallery", "Featured Maps", "Featured Apps"],
107
+ phone: "909.555.1234",
108
+ thumbnail: "gallery.jpg",
109
+ created: 1327099662000,
110
+ modified: 1327099662000,
111
+ access: "public",
112
+ userMembership: {
113
+ username: "jsmith",
114
+ memberType: "nonmember"
115
+ },
116
+ isFav: false,
117
+ autoJoin: false,
118
+ isViewOnly: false,
119
+ protected: false
120
+ }
121
+ ]
122
+ };
@@ -0,0 +1,31 @@
1
+ /* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
2
+ * Apache-2.0 */
3
+
4
+ export const GetItemResourcesResponse: any = {
5
+ total: 3,
6
+ start: 1,
7
+ num: 3,
8
+ nextStart: -1,
9
+ resources: [
10
+ {
11
+ resource: "image/banner.jpg"
12
+ },
13
+ {
14
+ resource: "image/logo.jpg"
15
+ },
16
+ {
17
+ resource: "text/desc.txt"
18
+ }
19
+ ]
20
+ };
21
+
22
+ export const RemoveItemResourceResponse: any = {
23
+ success: true
24
+ };
25
+
26
+ export const UpdateItemResourceResponse: any = {
27
+ success: true,
28
+ itemId: "0c66beb52dff4994be67937cdadbdbf1",
29
+ owner: "jsmith",
30
+ folder: null
31
+ };
@@ -0,0 +1,121 @@
1
+ /* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
2
+ * Apache-2.0 */
3
+
4
+ import { IItem } from "@esri/arcgis-rest-types";
5
+ import { ISearchResult } from "../../../src/util/search";
6
+
7
+ export const SearchResponse: ISearchResult<IItem> = {
8
+ query: "",
9
+ total: 10795,
10
+ start: 1,
11
+ num: 1,
12
+ nextStart: -1,
13
+ results: [
14
+ {
15
+ id: "a5b",
16
+ owner: "dcadminqa",
17
+ created: 1496748288000,
18
+ modified: 1508856526000,
19
+ name: "survey123_7d7a9fabcb0c44bcaf1d6473cd088a07",
20
+ title: " Drug Activity Reporter",
21
+ type: "Feature Service",
22
+ typeKeywords: [
23
+ "ArcGIS Server",
24
+ "Data",
25
+ "Feature Access",
26
+ "Feature Service",
27
+ "OwnerView",
28
+ "Service",
29
+ "Survey123",
30
+ "Survey123 Hub",
31
+ "Hosted Service"
32
+ ],
33
+ description: "Some Description",
34
+ tags: [],
35
+ snippet: "Some Snippet",
36
+ thumbnail: "thumbnail/ago_downloaded.png",
37
+ documentation: "WAT docs",
38
+ extent: [[-180, -90], [180, 90]],
39
+ categories: [],
40
+ spatialReference: null,
41
+ accessInformation: null,
42
+ licenseInfo: null,
43
+ culture: null,
44
+ properties: {},
45
+ url:
46
+ "https://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/survey123_7d7a9fabcb0c44bcaf1d6473cd088a07/FeatureServer",
47
+ proxyFilter: null,
48
+ access: "shared",
49
+ size: -1,
50
+ appCategories: [],
51
+ industries: [],
52
+ languages: [],
53
+ largeThumbnail: null,
54
+ banner: null,
55
+ screenshots: [],
56
+ listed: false,
57
+ numComments: 0,
58
+ numRatings: 0,
59
+ avgRating: 0,
60
+ numViews: 4
61
+ }
62
+ ]
63
+ };
64
+
65
+ export const BigSearchResponse: ISearchResult<IItem> = {
66
+ query: "",
67
+ total: 10795,
68
+ start: 1,
69
+ num: 1,
70
+ nextStart: 2,
71
+ results: [
72
+ {
73
+ id: "a5b",
74
+ owner: "dcadminqa",
75
+ created: 1496748288000,
76
+ modified: 1508856526000,
77
+ name: "survey123_7d7a9fabcb0c44bcaf1d6473cd088a07",
78
+ title: " Drug Activity Reporter",
79
+ type: "Feature Service",
80
+ typeKeywords: [
81
+ "ArcGIS Server",
82
+ "Data",
83
+ "Feature Access",
84
+ "Feature Service",
85
+ "OwnerView",
86
+ "Service",
87
+ "Survey123",
88
+ "Survey123 Hub",
89
+ "Hosted Service"
90
+ ],
91
+ description: "Some Description",
92
+ tags: [],
93
+ snippet: "Some Snippet",
94
+ thumbnail: "thumbnail/ago_downloaded.png",
95
+ documentation: "WAT docs",
96
+ extent: [[-180, -90], [180, 90]],
97
+ categories: [],
98
+ spatialReference: null,
99
+ accessInformation: null,
100
+ licenseInfo: null,
101
+ culture: null,
102
+ properties: {},
103
+ url:
104
+ "https://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/survey123_7d7a9fabcb0c44bcaf1d6473cd088a07/FeatureServer",
105
+ proxyFilter: null,
106
+ access: "shared",
107
+ size: -1,
108
+ appCategories: [],
109
+ industries: [],
110
+ languages: [],
111
+ largeThumbnail: null,
112
+ banner: null,
113
+ screenshots: [],
114
+ listed: false,
115
+ numComments: 0,
116
+ numRatings: 0,
117
+ avgRating: 0,
118
+ numViews: 4
119
+ }
120
+ ]
121
+ };
@@ -0,0 +1,112 @@
1
+ /* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
2
+ * Apache-2.0 */
3
+
4
+ import { IPortal } from "../../../src/util/get-portal";
5
+
6
+ export const PortalResponse: IPortal = {
7
+ access: "public",
8
+ allSSL: false,
9
+ allowedRedirectUris: [],
10
+ analysisLayersGroupQuery:
11
+ 'title:"Living Atlas Analysis Layers" AND owner:esri',
12
+ authorizedCrossOriginDomains: [],
13
+ availableCredits: 9584.193,
14
+ basemapGalleryGroupQuery: "id:06d589ea1fdb47768ee3870f497333c0",
15
+ canListApps: false,
16
+ canListData: false,
17
+ canListPreProvisionedItems: false,
18
+ canProvisionDirectPurchase: false,
19
+ canSearchPublic: true,
20
+ canShareBingPublic: false,
21
+ canSharePublic: true,
22
+ canSignInArcGIS: true,
23
+ canSignInIDP: true,
24
+ colorSetsGroupQuery: 'title:"Esri Colors" AND owner:esri_en',
25
+ commentsEnabled: true,
26
+ created: 1392336986000,
27
+ creditAssignments: "enabled",
28
+ culture: "en",
29
+ customBaseUrl: "mapsdevext.arcgis.com",
30
+ databaseQuota: -1,
31
+ databaseUsage: -1,
32
+ defaultBasemap: {},
33
+ defaultExtent: {
34
+ type: "extent",
35
+ xmin: -8589300.590116454,
36
+ ymin: 4692777.971239516,
37
+ xmax: -8562027.314872108,
38
+ ymax: 4722244.554454538,
39
+ spatialReference: {
40
+ wkid: 102100
41
+ }
42
+ },
43
+ defaultUserCreditAssignment: 100,
44
+ defaultVectorBasemap: {
45
+ baseMapLayers: [],
46
+ title: "Topographic"
47
+ },
48
+ description: "We're the DC R&amp;D Center",
49
+ eueiEnabled: false,
50
+ featuredGroups: [],
51
+ featuredGroupsId: "",
52
+ featuredItemsGroupQuery: "",
53
+ galleryTemplatesGroupQuery: 'title:"Gallery Templates" AND owner:esri_en',
54
+ hasCategorySchema: false,
55
+ helpBase: "http://docdev.arcgis.com/en/arcgis-online/",
56
+ helpMap: {},
57
+ helperServices: {},
58
+ homePageFeaturedContent: "",
59
+ homePageFeaturedContentCount: 12,
60
+ id: "LjjARY1mkhxulWPq",
61
+ isPortal: false,
62
+ layerTemplatesGroupQuery: 'title:"Esri Layer Templates" AND owner:esri_en',
63
+ livingAtlasGroupQuery: 'title:"Featured Maps And Apps" AND owner:esri',
64
+ maxTokenExpirationMinutes: -1,
65
+ metadataEditable: true,
66
+ metadataFormats: ["iso19139"],
67
+ modified: 1511894763000,
68
+ name: "Washington, DC",
69
+ notificationsEnabled: false,
70
+ portalHostname: "devext.arcgis.com",
71
+ portalMode: "multitenant",
72
+ portalName: "ArcGIS Online",
73
+ portalProperties: {},
74
+ portalThumbnail: null,
75
+ region: "WO",
76
+ rotatorPanels: [
77
+ {
78
+ id: "banner-2",
79
+ innerHTML:
80
+ "<img src='images/banner-2.jpg' style='-webkit-border-radius:0 0 10px 10px; -moz-border-radius:0 0 10px 10px; -o-border-radius:0 0 10px 10px; border-radius:0 0 10px 10px; margin-top:0; width:960px; height:180px;'/><div style='position:absolute; bottom:80px; left:80px; max-height:65px; width:660px; margin:0;'><img src='http://dc.mapsdevext.arcgis.com/sharing/rest/portals/self/resources/thumbnail.png?token=SECURITY_TOKEN' alt='Washington, DC' class='esriFloatLeading esriTrailingMargin025' style='margin-bottom:0; max-height:100px;'/><span style='position:absolute; bottom:0; margin-bottom:0; line-height:normal; font-family:HelveticaNeue,Verdana; font-weight:600; font-size:32px; color:#369;'>Washington, DC</span></div>"
81
+ }
82
+ ],
83
+ showHomePageDescription: false,
84
+ staticImagesUrl: "http://static.arcgis.com/images",
85
+ storageQuota: 2199023255552,
86
+ storageUsage: 17622609523,
87
+ stylesGroupQuery: 'title:"Esri Styles" AND owner:esri_en',
88
+ supportsHostedServices: true,
89
+ symbolSetsGroupQuery: 'title:"Esri Symbols" AND owner:esri_en',
90
+ templatesGroupQuery: "id:f233da8d297e4ff9ae992c21f8f4010f",
91
+ thumbnail: "thumbnail.png",
92
+ units: "english",
93
+ updateUserProfileDisabled: false,
94
+ urlKey: "dc",
95
+ useStandardizedQuery: true,
96
+ useVectorBasemaps: false,
97
+ vectorBasemapGalleryGroupQuery:
98
+ 'title:"ArcGIS Online Vector Basemaps" AND owner:esri_en',
99
+ subscriptionInfo: {},
100
+ isHubEnabled: false,
101
+ ipCntryCode: "US",
102
+ httpPort: 80,
103
+ httpsPort: 443,
104
+ supportsOAuth: true,
105
+ currentVersion: "5.4",
106
+ allowedOrigins: [],
107
+ mfaAdmins: [],
108
+ contacts: ["dcadmin"],
109
+ mfaEnabled: false,
110
+ user: {},
111
+ appInfo: {}
112
+ };
@@ -0,0 +1,18 @@
1
+ /* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
2
+ * Apache-2.0 */
3
+
4
+ import { UserSession } from "@esri/arcgis-rest-auth";
5
+ import { TOMORROW } from "@esri/arcgis-rest-auth/test/utils";
6
+
7
+ export const MOCK_USER_SESSION = new UserSession({
8
+ clientId: "clientId",
9
+ redirectUri: "https://example-app.com/redirect-uri",
10
+ token: "fake-token",
11
+ tokenExpires: TOMORROW,
12
+ refreshToken: "refreshToken",
13
+ refreshTokenExpires: TOMORROW,
14
+ refreshTokenTTL: 1440,
15
+ username: "jsmith",
16
+ password: "123456",
17
+ portal: "https://myorg.maps.arcgis.com/sharing/rest"
18
+ });
@@ -0,0 +1,70 @@
1
+ import { IInvitation, IInvitationResult } from "../../../src/users/invitation";
2
+
3
+ export const UserInvitationsResponse: IInvitationResult = {
4
+ userInvitations: [
5
+ {
6
+ id: "G45ad52e7560e470598815499003c13f6",
7
+ targetType: "group",
8
+ targetId: "5d780fcf924e4e7ab1952a71472bc950",
9
+ received: 1538516323000,
10
+ accepted: false,
11
+ mustApprove: false,
12
+ email: null,
13
+ role: "group_member",
14
+ type: "user",
15
+ dateAccepted: -1,
16
+ expiration: 1539725923000,
17
+ created: 1538516323000,
18
+ username: "mjuniper_dcqa",
19
+ fromUsername: {
20
+ username: "dcadminqa"
21
+ },
22
+ groupId: "5d780fcf924e4e7ab1952a71472bc950"
23
+ }
24
+ ]
25
+ };
26
+
27
+ export const UserInvitationResponse: IInvitation = {
28
+ id: "G45ad52e7560e470598815499003c13f6",
29
+ targetType: "group",
30
+ targetId: "5d780fcf924e4e7ab1952a71472bc950",
31
+ received: 1538516323000,
32
+ accepted: false,
33
+ mustApprove: false,
34
+ email: null,
35
+ role: "group_member",
36
+ type: "user",
37
+ dateAccepted: -1,
38
+ expiration: 1539725923000,
39
+ created: 1538516323000,
40
+ username: "mjuniper_dcqa",
41
+ fromUsername: {
42
+ username: "dcadminqa",
43
+ fullname: "DcAdminQA QaExtDc"
44
+ },
45
+ group: {
46
+ id: "5d780fcf924e4e7ab1952a71472bc950",
47
+ title: "Jupe test group 2",
48
+ isInvitationOnly: true,
49
+ owner: "dcadminqa",
50
+ description: null,
51
+ snippet: null,
52
+ tags: ["hub"],
53
+ phone: null,
54
+ sortField: "title",
55
+ sortOrder: "asc",
56
+ isViewOnly: false,
57
+ thumbnail: null,
58
+ created: 1538516296000,
59
+ modified: 1538516296000,
60
+ access: "public",
61
+ capabilities: [],
62
+ isFav: false,
63
+ isReadOnly: false,
64
+ protected: false,
65
+ autoJoin: false,
66
+ notificationsEnabled: false,
67
+ provider: null,
68
+ providerGroupName: null
69
+ }
70
+ };
@@ -0,0 +1,34 @@
1
+ import { INotificationResult } from "../../../src/users/notification";
2
+
3
+ export const UserNotificationsResponse: INotificationResult = {
4
+ notifications: [
5
+ {
6
+ id: "7eee83bb4bc94c1e82bb5b931ab9a818",
7
+ type: "message_received",
8
+ target: "c@sey",
9
+ targetType: "user",
10
+ received: 1534788621000,
11
+ data: {
12
+ fromUser: "adminuser",
13
+ subject: "this is the subject",
14
+ message: "this is the message"
15
+ }
16
+ },
17
+ {
18
+ id: "e8c18248ee2f4eb298d443026982b59c",
19
+ type: "group_join",
20
+ target: "c@sey",
21
+ targetType: "user",
22
+ received: 1534788353000,
23
+ data: {
24
+ groupId: "0c943127d4a545e6874e4ee4e1f88fa8",
25
+ groupTitle: "This is Jupe's Test Event"
26
+ }
27
+ }
28
+ ]
29
+ };
30
+
31
+ export const IDeleteSuccessResponse: any = {
32
+ success: true,
33
+ notificationId: "3ef"
34
+ };
@@ -0,0 +1,173 @@
1
+ /* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
2
+ * Apache-2.0 */
3
+
4
+ import { IUser } from "@esri/arcgis-rest-types";
5
+
6
+ export const AnonUserResponse: IUser = {
7
+ username: "jsmith",
8
+ fullName: "John Smith",
9
+ firstName: "John",
10
+ lastName: "Smith",
11
+ description: "Senior GIS Analyst for the city of Redlands.",
12
+ tags: ["GIS Analyst", "City of Redlands"],
13
+ culture: "en",
14
+ region: "US",
15
+ units: "metric",
16
+ thumbnail: "myProfile.jpg",
17
+ created: 1258501046000,
18
+ modified: 1290625562000,
19
+ provider: "arcgis"
20
+ };
21
+
22
+ export const GroupMemberUserResponse: IUser = {
23
+ ...AnonUserResponse,
24
+ availableCredits: 479.50998,
25
+ assignedCredits: 500.0,
26
+ preferredView: "Web",
27
+ email: "jsmith33@esri.com",
28
+ idpUsername: "null",
29
+ favGroupId: "829e32cca4dd475a8bb63bb56b16fe3e",
30
+ lastLogin: 1385766284000,
31
+ mfaEnabled: false,
32
+ access: "public",
33
+ storageUsage: 583650,
34
+ storageQuota: 2147483648,
35
+ orgId: "qWAReEOCnD7eTxOe",
36
+ role: "org_publisher",
37
+ privileges: [
38
+ "portal:admin:deleteItems",
39
+ "portal:admin:reassignItems",
40
+ "portal:admin:updateItems",
41
+ "portal:admin:viewItems",
42
+ "portal:admin:viewUsers",
43
+ "portal:user:createGroup",
44
+ "portal:user:createItem",
45
+ "portal:user:joinGroup",
46
+ "portal:user:shareToGroup",
47
+ "portal:user:shareToOrg"
48
+ ],
49
+ roleId: "RDnHQBSBbsJuIkUp",
50
+ level: "2",
51
+ disabled: false,
52
+ groups: [
53
+ {
54
+ id: "t6b",
55
+ title: "Street Maps",
56
+ isInvitationOnly: false,
57
+ owner: "whoknows",
58
+ description:
59
+ "The street map group provides street maps for the city of Redlands.",
60
+ snippet: "City of Redlands maps",
61
+ tags: ["Redlands", "street", "maps"],
62
+ phone: "http://www.esri.com",
63
+ thumbnail: "streets.jpg",
64
+ created: 1258501221000,
65
+ modified: 1272309404000,
66
+ access: "org",
67
+ userMembership: {
68
+ username: "jsmith",
69
+ memberType: "member",
70
+ applications: 0
71
+ },
72
+ protected: false,
73
+ isViewOnly: false,
74
+ isFav: false,
75
+ isOpenData: true,
76
+ autoJoin: false
77
+ }
78
+ ]
79
+ };
80
+
81
+ export const GroupNonMemberUserResponse: IUser = {
82
+ ...GroupMemberUserResponse,
83
+ groups: [
84
+ {
85
+ id: "abc",
86
+ title: "Street Maps",
87
+ isInvitationOnly: false,
88
+ owner: "whoknows",
89
+ description:
90
+ "The street map group provides street maps for the city of Redlands.",
91
+ snippet: "City of Redlands maps",
92
+ tags: ["Redlands", "street", "maps"],
93
+ phone: "http://www.esri.com",
94
+ thumbnail: "streets.jpg",
95
+ created: 1258501221000,
96
+ modified: 1272309404000,
97
+ access: "org",
98
+ userMembership: {
99
+ username: "jsmith",
100
+ memberType: "member",
101
+ applications: 0
102
+ },
103
+ protected: false,
104
+ isViewOnly: false,
105
+ isFav: false,
106
+ isOpenData: true,
107
+ autoJoin: false
108
+ }
109
+ ]
110
+ };
111
+
112
+ export const GroupAdminUserResponse = {
113
+ ...GroupMemberUserResponse,
114
+ groups: [
115
+ {
116
+ id: "t6b",
117
+ title: "Street Maps",
118
+ isInvitationOnly: false,
119
+ owner: "whoknows",
120
+ description:
121
+ "The street map group provides street maps for the city of Redlands.",
122
+ snippet: "City of Redlands maps",
123
+ tags: ["Redlands", "street", "maps"],
124
+ phone: "http://www.esri.com",
125
+ thumbnail: "streets.jpg",
126
+ created: 1258501221000,
127
+ modified: 1272309404000,
128
+ access: "org",
129
+ userMembership: {
130
+ username: "jsmith",
131
+ memberType: "admin",
132
+ applications: 0
133
+ },
134
+ protected: false,
135
+ isViewOnly: false,
136
+ isFav: false,
137
+ isOpenData: true,
138
+ autoJoin: false
139
+ }
140
+ ]
141
+ };
142
+
143
+ export const OrgAdminUserResponse = {
144
+ ...GroupAdminUserResponse,
145
+ role: "org_admin",
146
+ groups: [
147
+ {
148
+ id: "t6b",
149
+ title: "Street Maps",
150
+ isInvitationOnly: false,
151
+ owner: "whoknows",
152
+ description:
153
+ "The street map group provides street maps for the city of Redlands.",
154
+ snippet: "City of Redlands maps",
155
+ tags: ["Redlands", "street", "maps"],
156
+ phone: "http://www.esri.com",
157
+ thumbnail: "streets.jpg",
158
+ created: 1258501221000,
159
+ modified: 1272309404000,
160
+ access: "org",
161
+ userMembership: {
162
+ username: "jsmith",
163
+ memberType: "owner",
164
+ applications: 0
165
+ },
166
+ protected: false,
167
+ isViewOnly: false,
168
+ isFav: false,
169
+ isOpenData: true,
170
+ autoJoin: false
171
+ }
172
+ ]
173
+ };