@ngageoint/mage.service 6.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (869) hide show
  1. package/bin/mage.service.js +230 -0
  2. package/bin/migration.js +60 -0
  3. package/bin/poststop.sh +1 -0
  4. package/bin/prestart.sh +1 -0
  5. package/lib/@types/express/index.d.ts +18 -0
  6. package/lib/@types/geojson-validation/index.d.ts +15 -0
  7. package/lib/@types/mongodb-migrations/index.d.ts +99 -0
  8. package/lib/access/index.d.ts +21 -0
  9. package/lib/access/index.d.ts.map +1 -0
  10. package/lib/access/index.js +40 -0
  11. package/lib/access/index.js.map +1 -0
  12. package/lib/adapters/adapters.controllers.web.d.ts +22 -0
  13. package/lib/adapters/adapters.controllers.web.d.ts.map +1 -0
  14. package/lib/adapters/adapters.controllers.web.js +55 -0
  15. package/lib/adapters/adapters.controllers.web.js.map +1 -0
  16. package/lib/adapters/adapters.db.mongoose.d.ts +5 -0
  17. package/lib/adapters/adapters.db.mongoose.d.ts.map +1 -0
  18. package/lib/adapters/adapters.db.mongoose.js +70 -0
  19. package/lib/adapters/adapters.db.mongoose.js.map +1 -0
  20. package/lib/adapters/adapters.simple_id_factory.d.ts +5 -0
  21. package/lib/adapters/adapters.simple_id_factory.d.ts.map +1 -0
  22. package/lib/adapters/adapters.simple_id_factory.js +24 -0
  23. package/lib/adapters/adapters.simple_id_factory.js.map +1 -0
  24. package/lib/adapters/base/adapters.base.db.mongoose.d.ts +59 -0
  25. package/lib/adapters/base/adapters.base.db.mongoose.d.ts.map +1 -0
  26. package/lib/adapters/base/adapters.base.db.mongoose.js +143 -0
  27. package/lib/adapters/base/adapters.base.db.mongoose.js.map +1 -0
  28. package/lib/adapters/events/adapters.events.controllers.web.d.ts +14 -0
  29. package/lib/adapters/events/adapters.events.controllers.web.d.ts.map +1 -0
  30. package/lib/adapters/events/adapters.events.controllers.web.js +83 -0
  31. package/lib/adapters/events/adapters.events.controllers.web.js.map +1 -0
  32. package/lib/adapters/events/adapters.events.db.mongoose.d.ts +27 -0
  33. package/lib/adapters/events/adapters.events.db.mongoose.d.ts.map +1 -0
  34. package/lib/adapters/events/adapters.events.db.mongoose.js +127 -0
  35. package/lib/adapters/events/adapters.events.db.mongoose.js.map +1 -0
  36. package/lib/adapters/feeds/adapters.feeds.controllers.web.d.ts +25 -0
  37. package/lib/adapters/feeds/adapters.feeds.controllers.web.d.ts.map +1 -0
  38. package/lib/adapters/feeds/adapters.feeds.controllers.web.js +234 -0
  39. package/lib/adapters/feeds/adapters.feeds.controllers.web.js.map +1 -0
  40. package/lib/adapters/feeds/adapters.feeds.db.mongoose.d.ts +63 -0
  41. package/lib/adapters/feeds/adapters.feeds.db.mongoose.d.ts.map +1 -0
  42. package/lib/adapters/feeds/adapters.feeds.db.mongoose.js +199 -0
  43. package/lib/adapters/feeds/adapters.feeds.db.mongoose.js.map +1 -0
  44. package/lib/adapters/icons/adapters.icons.content_store.file_system.d.ts +7 -0
  45. package/lib/adapters/icons/adapters.icons.content_store.file_system.d.ts.map +1 -0
  46. package/lib/adapters/icons/adapters.icons.content_store.file_system.js +13 -0
  47. package/lib/adapters/icons/adapters.icons.content_store.file_system.js.map +1 -0
  48. package/lib/adapters/icons/adapters.icons.controllers.web.d.ts +10 -0
  49. package/lib/adapters/icons/adapters.icons.controllers.web.d.ts.map +1 -0
  50. package/lib/adapters/icons/adapters.icons.controllers.web.js +118 -0
  51. package/lib/adapters/icons/adapters.icons.controllers.web.js.map +1 -0
  52. package/lib/adapters/icons/adapters.icons.db.mongoose.d.ts +38 -0
  53. package/lib/adapters/icons/adapters.icons.db.mongoose.d.ts.map +1 -0
  54. package/lib/adapters/icons/adapters.icons.db.mongoose.js +287 -0
  55. package/lib/adapters/icons/adapters.icons.db.mongoose.js.map +1 -0
  56. package/lib/adapters/observations/adapters.observations.attachment_store.file_system.d.ts +29 -0
  57. package/lib/adapters/observations/adapters.observations.attachment_store.file_system.d.ts.map +1 -0
  58. package/lib/adapters/observations/adapters.observations.attachment_store.file_system.js +274 -0
  59. package/lib/adapters/observations/adapters.observations.attachment_store.file_system.js.map +1 -0
  60. package/lib/adapters/observations/adapters.observations.controllers.web.d.ts +40 -0
  61. package/lib/adapters/observations/adapters.observations.controllers.web.d.ts.map +1 -0
  62. package/lib/adapters/observations/adapters.observations.controllers.web.js +196 -0
  63. package/lib/adapters/observations/adapters.observations.controllers.web.js.map +1 -0
  64. package/lib/adapters/observations/adapters.observations.db.mongoose.d.ts +30 -0
  65. package/lib/adapters/observations/adapters.observations.db.mongoose.d.ts.map +1 -0
  66. package/lib/adapters/observations/adapters.observations.db.mongoose.js +294 -0
  67. package/lib/adapters/observations/adapters.observations.db.mongoose.js.map +1 -0
  68. package/lib/adapters/plugins/adapters.plugins.db.mongoose.d.ts +17 -0
  69. package/lib/adapters/plugins/adapters.plugins.db.mongoose.d.ts.map +1 -0
  70. package/lib/adapters/plugins/adapters.plugins.db.mongoose.js +59 -0
  71. package/lib/adapters/plugins/adapters.plugins.db.mongoose.js.map +1 -0
  72. package/lib/adapters/url_schemes/adapters.url_schemes.plugin.d.ts +38 -0
  73. package/lib/adapters/url_schemes/adapters.url_schemes.plugin.d.ts.map +1 -0
  74. package/lib/adapters/url_schemes/adapters.url_schemes.plugin.js +110 -0
  75. package/lib/adapters/url_schemes/adapters.url_schemes.plugin.js.map +1 -0
  76. package/lib/adapters/users/adapters.users.controllers.web.d.ts +7 -0
  77. package/lib/adapters/users/adapters.users.controllers.web.d.ts.map +1 -0
  78. package/lib/adapters/users/adapters.users.controllers.web.js +37 -0
  79. package/lib/adapters/users/adapters.users.controllers.web.js.map +1 -0
  80. package/lib/adapters/users/adapters.users.db.mongoose.d.ts +19 -0
  81. package/lib/adapters/users/adapters.users.db.mongoose.d.ts.map +1 -0
  82. package/lib/adapters/users/adapters.users.db.mongoose.js +126 -0
  83. package/lib/adapters/users/adapters.users.db.mongoose.js.map +1 -0
  84. package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.d.ts +3 -0
  85. package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.d.ts.map +1 -0
  86. package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.js +53 -0
  87. package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.js.map +1 -0
  88. package/lib/api/attachment.d.ts +12 -0
  89. package/lib/api/attachment.d.ts.map +1 -0
  90. package/lib/api/attachment.js +81 -0
  91. package/lib/api/attachment.js.map +1 -0
  92. package/lib/api/event.d.ts +20 -0
  93. package/lib/api/event.d.ts.map +1 -0
  94. package/lib/api/event.js +185 -0
  95. package/lib/api/event.js.map +1 -0
  96. package/lib/api/events/location.d.ts +11 -0
  97. package/lib/api/events/location.d.ts.map +1 -0
  98. package/lib/api/events/location.js +13 -0
  99. package/lib/api/events/location.js.map +1 -0
  100. package/lib/api/events/observation.d.ts +15 -0
  101. package/lib/api/events/observation.d.ts.map +1 -0
  102. package/lib/api/events/observation.js +21 -0
  103. package/lib/api/events/observation.js.map +1 -0
  104. package/lib/api/feature.d.ts +8 -0
  105. package/lib/api/feature.d.ts.map +1 -0
  106. package/lib/api/feature.js +15 -0
  107. package/lib/api/feature.js.map +1 -0
  108. package/lib/api/field/attachmentField.d.ts +12 -0
  109. package/lib/api/field/attachmentField.d.ts.map +1 -0
  110. package/lib/api/field/attachmentField.js +40 -0
  111. package/lib/api/field/attachmentField.js.map +1 -0
  112. package/lib/api/field/checkboxField.d.ts +7 -0
  113. package/lib/api/field/checkboxField.d.ts.map +1 -0
  114. package/lib/api/field/checkboxField.js +19 -0
  115. package/lib/api/field/checkboxField.js.map +1 -0
  116. package/lib/api/field/dateField.d.ts +8 -0
  117. package/lib/api/field/dateField.d.ts.map +1 -0
  118. package/lib/api/field/dateField.js +21 -0
  119. package/lib/api/field/dateField.js.map +1 -0
  120. package/lib/api/field/emailField.d.ts +7 -0
  121. package/lib/api/field/emailField.d.ts.map +1 -0
  122. package/lib/api/field/emailField.js +19 -0
  123. package/lib/api/field/emailField.js.map +1 -0
  124. package/lib/api/field/field.d.ts +12 -0
  125. package/lib/api/field/field.d.ts.map +1 -0
  126. package/lib/api/field/field.js +12 -0
  127. package/lib/api/field/field.js.map +1 -0
  128. package/lib/api/field/geometryField.d.ts +7 -0
  129. package/lib/api/field/geometryField.d.ts.map +1 -0
  130. package/lib/api/field/geometryField.js +35 -0
  131. package/lib/api/field/geometryField.js.map +1 -0
  132. package/lib/api/field/index.d.ts +7 -0
  133. package/lib/api/field/index.d.ts.map +1 -0
  134. package/lib/api/field/index.js +30 -0
  135. package/lib/api/field/index.js.map +1 -0
  136. package/lib/api/field/multiSelectField.d.ts +7 -0
  137. package/lib/api/field/multiSelectField.d.ts.map +1 -0
  138. package/lib/api/field/multiSelectField.js +27 -0
  139. package/lib/api/field/multiSelectField.js.map +1 -0
  140. package/lib/api/field/numberField.d.ts +7 -0
  141. package/lib/api/field/numberField.d.ts.map +1 -0
  142. package/lib/api/field/numberField.js +27 -0
  143. package/lib/api/field/numberField.js.map +1 -0
  144. package/lib/api/field/selectField.d.ts +7 -0
  145. package/lib/api/field/selectField.d.ts.map +1 -0
  146. package/lib/api/field/selectField.js +22 -0
  147. package/lib/api/field/selectField.js.map +1 -0
  148. package/lib/api/field/textField.d.ts +7 -0
  149. package/lib/api/field/textField.d.ts.map +1 -0
  150. package/lib/api/field/textField.js +21 -0
  151. package/lib/api/field/textField.js.map +1 -0
  152. package/lib/api/form.d.ts +12 -0
  153. package/lib/api/form.d.ts.map +1 -0
  154. package/lib/api/form.js +239 -0
  155. package/lib/api/form.js.map +1 -0
  156. package/lib/api/icon.d.ts +22 -0
  157. package/lib/api/icon.d.ts.map +1 -0
  158. package/lib/api/icon.js +178 -0
  159. package/lib/api/icon.js.map +1 -0
  160. package/lib/api/index.d.ts +10 -0
  161. package/lib/api/index.d.ts.map +1 -0
  162. package/lib/api/index.js +11 -0
  163. package/lib/api/index.js.map +1 -0
  164. package/lib/api/layer.d.ts +14 -0
  165. package/lib/api/layer.d.ts.map +1 -0
  166. package/lib/api/layer.js +70 -0
  167. package/lib/api/layer.js.map +1 -0
  168. package/lib/api/location.d.ts +14 -0
  169. package/lib/api/location.d.ts.map +1 -0
  170. package/lib/api/location.js +35 -0
  171. package/lib/api/location.js.map +1 -0
  172. package/lib/api/observation.d.ts +25 -0
  173. package/lib/api/observation.d.ts.map +1 -0
  174. package/lib/api/observation.js +224 -0
  175. package/lib/api/observation.js.map +1 -0
  176. package/lib/api/user.d.ts +16 -0
  177. package/lib/api/user.d.ts.map +1 -0
  178. package/lib/api/user.js +250 -0
  179. package/lib/api/user.js.map +1 -0
  180. package/lib/app.api/app.api.errors.d.ts +42 -0
  181. package/lib/app.api/app.api.errors.d.ts.map +1 -0
  182. package/lib/app.api/app.api.errors.js +43 -0
  183. package/lib/app.api/app.api.errors.js.map +1 -0
  184. package/lib/app.api/app.api.global.d.ts +74 -0
  185. package/lib/app.api/app.api.global.d.ts.map +1 -0
  186. package/lib/app.api/app.api.global.js +59 -0
  187. package/lib/app.api/app.api.global.js.map +1 -0
  188. package/lib/app.api/events/app.api.events.d.ts +31 -0
  189. package/lib/app.api/events/app.api.events.d.ts.map +1 -0
  190. package/lib/app.api/events/app.api.events.js +3 -0
  191. package/lib/app.api/events/app.api.events.js.map +1 -0
  192. package/lib/app.api/feeds/app.api.feeds.d.ts +139 -0
  193. package/lib/app.api/feeds/app.api.feeds.d.ts.map +1 -0
  194. package/lib/app.api/feeds/app.api.feeds.js +26 -0
  195. package/lib/app.api/feeds/app.api.feeds.js.map +1 -0
  196. package/lib/app.api/icons/app.api.icons.d.ts +60 -0
  197. package/lib/app.api/icons/app.api.icons.d.ts.map +1 -0
  198. package/lib/app.api/icons/app.api.icons.js +29 -0
  199. package/lib/app.api/icons/app.api.icons.js.map +1 -0
  200. package/lib/app.api/observations/app.api.observations.d.ts +126 -0
  201. package/lib/app.api/observations/app.api.observations.d.ts.map +1 -0
  202. package/lib/app.api/observations/app.api.observations.js +61 -0
  203. package/lib/app.api/observations/app.api.observations.js.map +1 -0
  204. package/lib/app.api/users/app.api.users.d.ts +24 -0
  205. package/lib/app.api/users/app.api.users.d.ts.map +1 -0
  206. package/lib/app.api/users/app.api.users.js +3 -0
  207. package/lib/app.api/users/app.api.users.js.map +1 -0
  208. package/lib/app.d.ts +38 -0
  209. package/lib/app.d.ts.map +1 -0
  210. package/lib/app.impl/events/app.impl.events.d.ts +8 -0
  211. package/lib/app.impl/events/app.impl.events.d.ts.map +1 -0
  212. package/lib/app.impl/events/app.impl.events.js +107 -0
  213. package/lib/app.impl/events/app.impl.events.js.map +1 -0
  214. package/lib/app.impl/feeds/app.impl.feeds.d.ts +21 -0
  215. package/lib/app.impl/feeds/app.impl.feeds.d.ts.map +1 -0
  216. package/lib/app.impl/feeds/app.impl.feeds.js +527 -0
  217. package/lib/app.impl/feeds/app.impl.feeds.js.map +1 -0
  218. package/lib/app.impl/icons/app.impl.icons.d.ts +7 -0
  219. package/lib/app.impl/icons/app.impl.icons.d.ts.map +1 -0
  220. package/lib/app.impl/icons/app.impl.icons.js +81 -0
  221. package/lib/app.impl/icons/app.impl.icons.js.map +1 -0
  222. package/lib/app.impl/observations/app.impl.observations.d.ts +11 -0
  223. package/lib/app.impl/observations/app.impl.observations.d.ts.map +1 -0
  224. package/lib/app.impl/observations/app.impl.observations.js +357 -0
  225. package/lib/app.impl/observations/app.impl.observations.js.map +1 -0
  226. package/lib/app.impl/users/app.impl.users.d.ts +4 -0
  227. package/lib/app.impl/users/app.impl.users.d.ts.map +1 -0
  228. package/lib/app.impl/users/app.impl.users.js +37 -0
  229. package/lib/app.impl/users/app.impl.users.js.map +1 -0
  230. package/lib/app.js +507 -0
  231. package/lib/app.js.map +1 -0
  232. package/lib/assets/default-icon.png +0 -0
  233. package/lib/authentication/anonymous.d.ts +6 -0
  234. package/lib/authentication/anonymous.d.ts.map +1 -0
  235. package/lib/authentication/anonymous.js +17 -0
  236. package/lib/authentication/anonymous.js.map +1 -0
  237. package/lib/authentication/index.d.ts +24 -0
  238. package/lib/authentication/index.d.ts.map +1 -0
  239. package/lib/authentication/index.js +104 -0
  240. package/lib/authentication/index.js.map +1 -0
  241. package/lib/authentication/ldap.d.ts +2 -0
  242. package/lib/authentication/ldap.d.ts.map +1 -0
  243. package/lib/authentication/ldap.js +130 -0
  244. package/lib/authentication/ldap.js.map +1 -0
  245. package/lib/authentication/local.d.ts +2 -0
  246. package/lib/authentication/local.d.ts.map +1 -0
  247. package/lib/authentication/local.js +77 -0
  248. package/lib/authentication/local.js.map +1 -0
  249. package/lib/authentication/oauth.d.ts +2 -0
  250. package/lib/authentication/oauth.d.ts.map +1 -0
  251. package/lib/authentication/oauth.js +197 -0
  252. package/lib/authentication/oauth.js.map +1 -0
  253. package/lib/authentication/openidconnect.d.ts +2 -0
  254. package/lib/authentication/openidconnect.d.ts.map +1 -0
  255. package/lib/authentication/openidconnect.js +148 -0
  256. package/lib/authentication/openidconnect.js.map +1 -0
  257. package/lib/authentication/saml.d.ts +2 -0
  258. package/lib/authentication/saml.d.ts.map +1 -0
  259. package/lib/authentication/saml.js +287 -0
  260. package/lib/authentication/saml.js.map +1 -0
  261. package/lib/authentication/verification.d.ts +33 -0
  262. package/lib/authentication/verification.d.ts.map +1 -0
  263. package/lib/authentication/verification.js +144 -0
  264. package/lib/authentication/verification.js.map +1 -0
  265. package/lib/config.d.ts +15 -0
  266. package/lib/config.d.ts.map +1 -0
  267. package/lib/config.js +20 -0
  268. package/lib/config.js.map +1 -0
  269. package/lib/dist-package.json +203 -0
  270. package/lib/docs/auth/local.yaml +90 -0
  271. package/lib/docs/geojson.yaml +375 -0
  272. package/lib/docs/openapi.yaml +4591 -0
  273. package/lib/entities/authentication/entities.authentication.d.ts +14 -0
  274. package/lib/entities/authentication/entities.authentication.d.ts.map +1 -0
  275. package/lib/entities/authentication/entities.authentication.js +3 -0
  276. package/lib/entities/authentication/entities.authentication.js.map +1 -0
  277. package/lib/entities/authorization/entities.authorization.d.ts +7 -0
  278. package/lib/entities/authorization/entities.authorization.d.ts.map +1 -0
  279. package/lib/entities/authorization/entities.authorization.js +3 -0
  280. package/lib/entities/authorization/entities.authorization.js.map +1 -0
  281. package/lib/entities/authorization/entities.permissions.d.ts +143 -0
  282. package/lib/entities/authorization/entities.permissions.d.ts.map +1 -0
  283. package/lib/entities/authorization/entities.permissions.js +101 -0
  284. package/lib/entities/authorization/entities.permissions.js.map +1 -0
  285. package/lib/entities/entities.domain_events.d.ts +1 -0
  286. package/lib/entities/entities.domain_events.d.ts.map +1 -0
  287. package/lib/entities/entities.domain_events.js +20 -0
  288. package/lib/entities/entities.domain_events.js.map +1 -0
  289. package/lib/entities/entities.global.d.ts +107 -0
  290. package/lib/entities/entities.global.d.ts.map +1 -0
  291. package/lib/entities/entities.global.js +67 -0
  292. package/lib/entities/entities.global.js.map +1 -0
  293. package/lib/entities/entities.i18n.d.ts +78 -0
  294. package/lib/entities/entities.i18n.d.ts.map +1 -0
  295. package/lib/entities/entities.i18n.js +69 -0
  296. package/lib/entities/entities.i18n.js.map +1 -0
  297. package/lib/entities/entities.json_types.d.ts +42 -0
  298. package/lib/entities/entities.json_types.d.ts.map +1 -0
  299. package/lib/entities/entities.json_types.js +3 -0
  300. package/lib/entities/entities.json_types.js.map +1 -0
  301. package/lib/entities/events/entities.events.d.ts +118 -0
  302. package/lib/entities/events/entities.events.d.ts.map +1 -0
  303. package/lib/entities/events/entities.events.forms.d.ts +132 -0
  304. package/lib/entities/events/entities.events.forms.d.ts.map +1 -0
  305. package/lib/entities/events/entities.events.forms.js +102 -0
  306. package/lib/entities/events/entities.events.forms.js.map +1 -0
  307. package/lib/entities/events/entities.events.js +146 -0
  308. package/lib/entities/events/entities.events.js.map +1 -0
  309. package/lib/entities/feeds/entities.feeds.d.ts +340 -0
  310. package/lib/entities/feeds/entities.feeds.d.ts.map +1 -0
  311. package/lib/entities/feeds/entities.feeds.js +213 -0
  312. package/lib/entities/feeds/entities.feeds.js.map +1 -0
  313. package/lib/entities/icons/entities.icons.d.ts +106 -0
  314. package/lib/entities/icons/entities.icons.d.ts.map +1 -0
  315. package/lib/entities/icons/entities.icons.js +26 -0
  316. package/lib/entities/icons/entities.icons.js.map +1 -0
  317. package/lib/entities/observations/entities.observations.d.ts +569 -0
  318. package/lib/entities/observations/entities.observations.d.ts.map +1 -0
  319. package/lib/entities/observations/entities.observations.fields.attachment.d.ts +5 -0
  320. package/lib/entities/observations/entities.observations.fields.attachment.d.ts.map +1 -0
  321. package/lib/entities/observations/entities.observations.fields.attachment.js +24 -0
  322. package/lib/entities/observations/entities.observations.fields.attachment.js.map +1 -0
  323. package/lib/entities/observations/entities.observations.fields.checkbox.d.ts +3 -0
  324. package/lib/entities/observations/entities.observations.fields.checkbox.d.ts.map +1 -0
  325. package/lib/entities/observations/entities.observations.fields.checkbox.js +17 -0
  326. package/lib/entities/observations/entities.observations.fields.checkbox.js.map +1 -0
  327. package/lib/entities/observations/entities.observations.fields.d.ts +20 -0
  328. package/lib/entities/observations/entities.observations.fields.d.ts.map +1 -0
  329. package/lib/entities/observations/entities.observations.fields.date.d.ts +3 -0
  330. package/lib/entities/observations/entities.observations.fields.date.d.ts.map +1 -0
  331. package/lib/entities/observations/entities.observations.fields.date.js +21 -0
  332. package/lib/entities/observations/entities.observations.fields.date.js.map +1 -0
  333. package/lib/entities/observations/entities.observations.fields.email.d.ts +3 -0
  334. package/lib/entities/observations/entities.observations.fields.email.d.ts.map +1 -0
  335. package/lib/entities/observations/entities.observations.fields.email.js +20 -0
  336. package/lib/entities/observations/entities.observations.fields.email.js.map +1 -0
  337. package/lib/entities/observations/entities.observations.fields.geometry.d.ts +3 -0
  338. package/lib/entities/observations/entities.observations.fields.geometry.d.ts.map +1 -0
  339. package/lib/entities/observations/entities.observations.fields.geometry.js +62 -0
  340. package/lib/entities/observations/entities.observations.fields.geometry.js.map +1 -0
  341. package/lib/entities/observations/entities.observations.fields.js +37 -0
  342. package/lib/entities/observations/entities.observations.fields.js.map +1 -0
  343. package/lib/entities/observations/entities.observations.fields.multiselect.d.ts +3 -0
  344. package/lib/entities/observations/entities.observations.fields.multiselect.d.ts.map +1 -0
  345. package/lib/entities/observations/entities.observations.fields.multiselect.js +24 -0
  346. package/lib/entities/observations/entities.observations.fields.multiselect.js.map +1 -0
  347. package/lib/entities/observations/entities.observations.fields.numeric.d.ts +3 -0
  348. package/lib/entities/observations/entities.observations.fields.numeric.d.ts.map +1 -0
  349. package/lib/entities/observations/entities.observations.fields.numeric.js +24 -0
  350. package/lib/entities/observations/entities.observations.fields.numeric.js.map +1 -0
  351. package/lib/entities/observations/entities.observations.fields.required.d.ts +3 -0
  352. package/lib/entities/observations/entities.observations.fields.required.d.ts.map +1 -0
  353. package/lib/entities/observations/entities.observations.fields.required.js +14 -0
  354. package/lib/entities/observations/entities.observations.fields.required.js.map +1 -0
  355. package/lib/entities/observations/entities.observations.fields.select.d.ts +3 -0
  356. package/lib/entities/observations/entities.observations.fields.select.d.ts.map +1 -0
  357. package/lib/entities/observations/entities.observations.fields.select.js +17 -0
  358. package/lib/entities/observations/entities.observations.fields.select.js.map +1 -0
  359. package/lib/entities/observations/entities.observations.fields.text.d.ts +3 -0
  360. package/lib/entities/observations/entities.observations.fields.text.d.ts.map +1 -0
  361. package/lib/entities/observations/entities.observations.fields.text.js +15 -0
  362. package/lib/entities/observations/entities.observations.fields.text.js.map +1 -0
  363. package/lib/entities/observations/entities.observations.js +873 -0
  364. package/lib/entities/observations/entities.observations.js.map +1 -0
  365. package/lib/entities/ogcapi-features/entities.ogcapi-features.d.ts +98 -0
  366. package/lib/entities/ogcapi-features/entities.ogcapi-features.d.ts.map +1 -0
  367. package/lib/entities/ogcapi-features/entities.ogcapi-features.js +30 -0
  368. package/lib/entities/ogcapi-features/entities.ogcapi-features.js.map +1 -0
  369. package/lib/entities/teams/entities.teams.d.ts +26 -0
  370. package/lib/entities/teams/entities.teams.d.ts.map +1 -0
  371. package/lib/entities/teams/entities.teams.js +3 -0
  372. package/lib/entities/teams/entities.teams.js.map +1 -0
  373. package/lib/entities/users/entities.users.d.ts +66 -0
  374. package/lib/entities/users/entities.users.d.ts.map +1 -0
  375. package/lib/entities/users/entities.users.js +10 -0
  376. package/lib/entities/users/entities.users.js.map +1 -0
  377. package/lib/environment/env.d.ts +29 -0
  378. package/lib/environment/env.d.ts.map +1 -0
  379. package/lib/environment/env.js +106 -0
  380. package/lib/environment/env.js.map +1 -0
  381. package/lib/export/csv.d.ts +11 -0
  382. package/lib/export/csv.d.ts.map +1 -0
  383. package/lib/export/csv.js +243 -0
  384. package/lib/export/csv.js.map +1 -0
  385. package/lib/export/exporter.d.ts +12 -0
  386. package/lib/export/exporter.d.ts.map +1 -0
  387. package/lib/export/exporter.js +38 -0
  388. package/lib/export/exporter.js.map +1 -0
  389. package/lib/export/exporterFactory.d.ts +11 -0
  390. package/lib/export/exporterFactory.d.ts.map +1 -0
  391. package/lib/export/exporterFactory.js +17 -0
  392. package/lib/export/exporterFactory.js.map +1 -0
  393. package/lib/export/geojson.d.ts +10 -0
  394. package/lib/export/geojson.d.ts.map +1 -0
  395. package/lib/export/geojson.js +167 -0
  396. package/lib/export/geojson.js.map +1 -0
  397. package/lib/export/geopackage.d.ts +25 -0
  398. package/lib/export/geopackage.d.ts.map +1 -0
  399. package/lib/export/geopackage.js +687 -0
  400. package/lib/export/geopackage.js.map +1 -0
  401. package/lib/export/kml.d.ts +10 -0
  402. package/lib/export/kml.d.ts.map +1 -0
  403. package/lib/export/kml.js +128 -0
  404. package/lib/export/kml.js.map +1 -0
  405. package/lib/export/kmlWriter.d.ts +24 -0
  406. package/lib/export/kmlWriter.d.ts.map +1 -0
  407. package/lib/export/kmlWriter.js +431 -0
  408. package/lib/export/kmlWriter.js.map +1 -0
  409. package/lib/express.d.ts +9 -0
  410. package/lib/express.d.ts.map +1 -0
  411. package/lib/express.js +70 -0
  412. package/lib/express.js.map +1 -0
  413. package/lib/format/geoJsonFormat.d.ts +3 -0
  414. package/lib/format/geoJsonFormat.d.ts.map +1 -0
  415. package/lib/format/geoJsonFormat.js +65 -0
  416. package/lib/format/geoJsonFormat.js.map +1 -0
  417. package/lib/logger.d.ts +2 -0
  418. package/lib/logger.d.ts.map +1 -0
  419. package/lib/logger.js +21 -0
  420. package/lib/logger.js.map +1 -0
  421. package/lib/main.impl/main.impl.plugins.d.ts +12 -0
  422. package/lib/main.impl/main.impl.plugins.d.ts.map +1 -0
  423. package/lib/main.impl/main.impl.plugins.js +41 -0
  424. package/lib/main.impl/main.impl.plugins.js.map +1 -0
  425. package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.d.ts +3 -0
  426. package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.d.ts.map +1 -0
  427. package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.js +32 -0
  428. package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.js.map +1 -0
  429. package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.d.ts +4 -0
  430. package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.d.ts.map +1 -0
  431. package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.js +26 -0
  432. package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.js.map +1 -0
  433. package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.d.ts +4 -0
  434. package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.d.ts.map +1 -0
  435. package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.js +41 -0
  436. package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.js.map +1 -0
  437. package/lib/migrate.d.ts +4 -0
  438. package/lib/migrate.d.ts.map +1 -0
  439. package/lib/migrate.js +96 -0
  440. package/lib/migrate.js.map +1 -0
  441. package/lib/migrations/002-create-user-role.d.ts +4 -0
  442. package/lib/migrations/002-create-user-role.d.ts.map +1 -0
  443. package/lib/migrations/002-create-user-role.js +30 -0
  444. package/lib/migrations/002-create-user-role.js.map +1 -0
  445. package/lib/migrations/003-create-admin-role.d.ts +4 -0
  446. package/lib/migrations/003-create-admin-role.d.ts.map +1 -0
  447. package/lib/migrations/003-create-admin-role.js +31 -0
  448. package/lib/migrations/003-create-admin-role.js.map +1 -0
  449. package/lib/migrations/005-create-osm-layer.d.ts +4 -0
  450. package/lib/migrations/005-create-osm-layer.d.ts.map +1 -0
  451. package/lib/migrations/005-create-osm-layer.js +51 -0
  452. package/lib/migrations/005-create-osm-layer.js.map +1 -0
  453. package/lib/migrations/006-event-teams.d.ts +4 -0
  454. package/lib/migrations/006-event-teams.d.ts.map +1 -0
  455. package/lib/migrations/006-event-teams.js +40 -0
  456. package/lib/migrations/006-event-teams.js.map +1 -0
  457. package/lib/migrations/007-user-icon.d.ts +4 -0
  458. package/lib/migrations/007-user-icon.d.ts.map +1 -0
  459. package/lib/migrations/007-user-icon.js +21 -0
  460. package/lib/migrations/007-user-icon.js.map +1 -0
  461. package/lib/migrations/008-create-user-no-edit-role.d.ts +4 -0
  462. package/lib/migrations/008-create-user-no-edit-role.d.ts.map +1 -0
  463. package/lib/migrations/008-create-user-no-edit-role.js +34 -0
  464. package/lib/migrations/008-create-user-no-edit-role.js.map +1 -0
  465. package/lib/migrations/009-create-manager-role.d.ts +4 -0
  466. package/lib/migrations/009-create-manager-role.d.ts.map +1 -0
  467. package/lib/migrations/009-create-manager-role.js +50 -0
  468. package/lib/migrations/009-create-manager-role.js.map +1 -0
  469. package/lib/migrations/010-add-user-device-manager-role.d.ts +4 -0
  470. package/lib/migrations/010-add-user-device-manager-role.d.ts.map +1 -0
  471. package/lib/migrations/010-add-user-device-manager-role.js +38 -0
  472. package/lib/migrations/010-add-user-device-manager-role.js.map +1 -0
  473. package/lib/migrations/011-multiple-forms.d.ts +4 -0
  474. package/lib/migrations/011-multiple-forms.d.ts.map +1 -0
  475. package/lib/migrations/011-multiple-forms.js +161 -0
  476. package/lib/migrations/011-multiple-forms.js.map +1 -0
  477. package/lib/migrations/012-user-role-remove-delete.d.ts +4 -0
  478. package/lib/migrations/012-user-role-remove-delete.d.ts.map +1 -0
  479. package/lib/migrations/012-user-role-remove-delete.js +15 -0
  480. package/lib/migrations/012-user-role-remove-delete.js.map +1 -0
  481. package/lib/migrations/013-ensure-event-indexes.d.ts +4 -0
  482. package/lib/migrations/013-ensure-event-indexes.d.ts.map +1 -0
  483. package/lib/migrations/013-ensure-event-indexes.js +50 -0
  484. package/lib/migrations/013-ensure-event-indexes.js.map +1 -0
  485. package/lib/migrations/014-add-role-update-permission.d.ts +4 -0
  486. package/lib/migrations/014-add-role-update-permission.d.ts.map +1 -0
  487. package/lib/migrations/014-add-role-update-permission.js +15 -0
  488. package/lib/migrations/014-add-role-update-permission.js.map +1 -0
  489. package/lib/migrations/015-manager-role-add-user-create.d.ts +4 -0
  490. package/lib/migrations/015-manager-role-add-user-create.d.ts.map +1 -0
  491. package/lib/migrations/015-manager-role-add-user-create.js +15 -0
  492. package/lib/migrations/015-manager-role-add-user-create.js.map +1 -0
  493. package/lib/migrations/016-set-feed-primary-secondary.d.ts +4 -0
  494. package/lib/migrations/016-set-feed-primary-secondary.d.ts.map +1 -0
  495. package/lib/migrations/016-set-feed-primary-secondary.js +36 -0
  496. package/lib/migrations/016-set-feed-primary-secondary.js.map +1 -0
  497. package/lib/migrations/017-make-layers-available.d.ts +4 -0
  498. package/lib/migrations/017-make-layers-available.d.ts.map +1 -0
  499. package/lib/migrations/017-make-layers-available.js +48 -0
  500. package/lib/migrations/017-make-layers-available.js.map +1 -0
  501. package/lib/migrations/018-feeds-admin-permissions.d.ts +4 -0
  502. package/lib/migrations/018-feeds-admin-permissions.d.ts.map +1 -0
  503. package/lib/migrations/018-feeds-admin-permissions.js +32 -0
  504. package/lib/migrations/018-feeds-admin-permissions.js.map +1 -0
  505. package/lib/migrations/018-set-default-password-policy.d.ts +4 -0
  506. package/lib/migrations/018-set-default-password-policy.d.ts.map +1 -0
  507. package/lib/migrations/018-set-default-password-policy.js +58 -0
  508. package/lib/migrations/018-set-default-password-policy.js.map +1 -0
  509. package/lib/migrations/019-move-user-authentication.d.ts +4 -0
  510. package/lib/migrations/019-move-user-authentication.d.ts.map +1 -0
  511. package/lib/migrations/019-move-user-authentication.js +68 -0
  512. package/lib/migrations/019-move-user-authentication.js.map +1 -0
  513. package/lib/migrations/020-add-export-permissions.d.ts +4 -0
  514. package/lib/migrations/020-add-export-permissions.d.ts.map +1 -0
  515. package/lib/migrations/020-add-export-permissions.js +36 -0
  516. package/lib/migrations/020-add-export-permissions.js.map +1 -0
  517. package/lib/migrations/022-copy-auth-from-config-to-db.d.ts +4 -0
  518. package/lib/migrations/022-copy-auth-from-config-to-db.d.ts.map +1 -0
  519. package/lib/migrations/022-copy-auth-from-config-to-db.js +86 -0
  520. package/lib/migrations/022-copy-auth-from-config-to-db.js.map +1 -0
  521. package/lib/migrations/023-move-local-auth-from-settings.d.ts +4 -0
  522. package/lib/migrations/023-move-local-auth-from-settings.d.ts.map +1 -0
  523. package/lib/migrations/023-move-local-auth-from-settings.js +54 -0
  524. package/lib/migrations/023-move-local-auth-from-settings.js.map +1 -0
  525. package/lib/migrations/024-link-auth-to-auth-config.d.ts +4 -0
  526. package/lib/migrations/024-link-auth-to-auth-config.d.ts.map +1 -0
  527. package/lib/migrations/024-link-auth-to-auth-config.js +59 -0
  528. package/lib/migrations/024-link-auth-to-auth-config.js.map +1 -0
  529. package/lib/migrations/025-add-auth-config-permissions.d.ts +4 -0
  530. package/lib/migrations/025-add-auth-config-permissions.d.ts.map +1 -0
  531. package/lib/migrations/025-add-auth-config-permissions.js +32 -0
  532. package/lib/migrations/025-add-auth-config-permissions.js.map +1 -0
  533. package/lib/migrations/028-move-security-settings-to-secret-store.d.ts +4 -0
  534. package/lib/migrations/028-move-security-settings-to-secret-store.d.ts.map +1 -0
  535. package/lib/migrations/028-move-security-settings-to-secret-store.js +59 -0
  536. package/lib/migrations/028-move-security-settings-to-secret-store.js.map +1 -0
  537. package/lib/migrations/029-attachment-form-field.d.ts +4 -0
  538. package/lib/migrations/029-attachment-form-field.d.ts.map +1 -0
  539. package/lib/migrations/029-attachment-form-field.js +130 -0
  540. package/lib/migrations/029-attachment-form-field.js.map +1 -0
  541. package/lib/models/authentication.d.ts +17 -0
  542. package/lib/models/authentication.d.ts.map +1 -0
  543. package/lib/models/authentication.js +174 -0
  544. package/lib/models/authentication.js.map +1 -0
  545. package/lib/models/authenticationconfiguration.d.ts +15 -0
  546. package/lib/models/authenticationconfiguration.d.ts.map +1 -0
  547. package/lib/models/authenticationconfiguration.js +105 -0
  548. package/lib/models/authenticationconfiguration.js.map +1 -0
  549. package/lib/models/cappedLocation.d.ts +8 -0
  550. package/lib/models/cappedLocation.d.ts.map +1 -0
  551. package/lib/models/cappedLocation.js +78 -0
  552. package/lib/models/cappedLocation.js.map +1 -0
  553. package/lib/models/counter.d.ts +3 -0
  554. package/lib/models/counter.d.ts.map +1 -0
  555. package/lib/models/counter.js +37 -0
  556. package/lib/models/counter.js.map +1 -0
  557. package/lib/models/device.d.ts +14 -0
  558. package/lib/models/device.d.ts.map +1 -0
  559. package/lib/models/device.js +220 -0
  560. package/lib/models/device.js.map +1 -0
  561. package/lib/models/event.d.ts +75 -0
  562. package/lib/models/event.d.ts.map +1 -0
  563. package/lib/models/event.js +839 -0
  564. package/lib/models/event.js.map +1 -0
  565. package/lib/models/export.d.ts +18 -0
  566. package/lib/models/export.d.ts.map +1 -0
  567. package/lib/models/export.js +107 -0
  568. package/lib/models/export.js.map +1 -0
  569. package/lib/models/feature.d.ts +4 -0
  570. package/lib/models/feature.d.ts.map +1 -0
  571. package/lib/models/feature.js +43 -0
  572. package/lib/models/feature.js.map +1 -0
  573. package/lib/models/icon.d.ts +9 -0
  574. package/lib/models/icon.d.ts.map +1 -0
  575. package/lib/models/icon.js +69 -0
  576. package/lib/models/icon.js.map +1 -0
  577. package/lib/models/index.d.ts +2 -0
  578. package/lib/models/index.d.ts.map +1 -0
  579. package/lib/models/index.js +12 -0
  580. package/lib/models/index.js.map +1 -0
  581. package/lib/models/layer.d.ts +13 -0
  582. package/lib/models/layer.d.ts.map +1 -0
  583. package/lib/models/layer.js +149 -0
  584. package/lib/models/layer.js.map +1 -0
  585. package/lib/models/location.d.ts +8 -0
  586. package/lib/models/location.d.ts.map +1 -0
  587. package/lib/models/location.js +96 -0
  588. package/lib/models/location.js.map +1 -0
  589. package/lib/models/login.d.ts +4 -0
  590. package/lib/models/login.d.ts.map +1 -0
  591. package/lib/models/login.js +90 -0
  592. package/lib/models/login.js.map +1 -0
  593. package/lib/models/observation.d.ts +93 -0
  594. package/lib/models/observation.d.ts.map +1 -0
  595. package/lib/models/observation.js +461 -0
  596. package/lib/models/observation.js.map +1 -0
  597. package/lib/models/role.d.ts +22 -0
  598. package/lib/models/role.d.ts.map +1 -0
  599. package/lib/models/role.js +80 -0
  600. package/lib/models/role.js.map +1 -0
  601. package/lib/models/setting.d.ts +6 -0
  602. package/lib/models/setting.d.ts.map +1 -0
  603. package/lib/models/setting.js +31 -0
  604. package/lib/models/setting.js.map +1 -0
  605. package/lib/models/team.d.ts +31 -0
  606. package/lib/models/team.d.ts.map +1 -0
  607. package/lib/models/team.js +511 -0
  608. package/lib/models/team.js.map +1 -0
  609. package/lib/models/token.d.ts +6 -0
  610. package/lib/models/token.d.ts.map +1 -0
  611. package/lib/models/token.js +68 -0
  612. package/lib/models/token.js.map +1 -0
  613. package/lib/models/user.d.ts +60 -0
  614. package/lib/models/user.d.ts.map +1 -0
  615. package/lib/models/user.js +400 -0
  616. package/lib/models/user.js.map +1 -0
  617. package/lib/permissions/permissions.events.d.ts +69 -0
  618. package/lib/permissions/permissions.events.d.ts.map +1 -0
  619. package/lib/permissions/permissions.events.js +154 -0
  620. package/lib/permissions/permissions.events.js.map +1 -0
  621. package/lib/permissions/permissions.feeds.d.ts +19 -0
  622. package/lib/permissions/permissions.feeds.d.ts.map +1 -0
  623. package/lib/permissions/permissions.feeds.js +58 -0
  624. package/lib/permissions/permissions.feeds.js.map +1 -0
  625. package/lib/permissions/permissions.icons.d.ts +9 -0
  626. package/lib/permissions/permissions.icons.d.ts.map +1 -0
  627. package/lib/permissions/permissions.icons.js +28 -0
  628. package/lib/permissions/permissions.icons.js.map +1 -0
  629. package/lib/permissions/permissions.observations.d.ts +14 -0
  630. package/lib/permissions/permissions.observations.d.ts.map +1 -0
  631. package/lib/permissions/permissions.observations.js +113 -0
  632. package/lib/permissions/permissions.observations.js.map +1 -0
  633. package/lib/permissions/permissions.role-based.base.d.ts +15 -0
  634. package/lib/permissions/permissions.role-based.base.d.ts.map +1 -0
  635. package/lib/permissions/permissions.role-based.base.js +14 -0
  636. package/lib/permissions/permissions.role-based.base.js.map +1 -0
  637. package/lib/permissions/permissions.users.d.ts +8 -0
  638. package/lib/permissions/permissions.users.d.ts.map +1 -0
  639. package/lib/permissions/permissions.users.js +23 -0
  640. package/lib/permissions/permissions.users.js.map +1 -0
  641. package/lib/plugins.api/index.d.ts +55 -0
  642. package/lib/plugins.api/index.d.ts.map +1 -0
  643. package/lib/plugins.api/index.js +5 -0
  644. package/lib/plugins.api/index.js.map +1 -0
  645. package/lib/plugins.api/plugins.api.db.d.ts +7 -0
  646. package/lib/plugins.api/plugins.api.db.d.ts.map +1 -0
  647. package/lib/plugins.api/plugins.api.db.js +5 -0
  648. package/lib/plugins.api/plugins.api.db.js.map +1 -0
  649. package/lib/plugins.api/plugins.api.events.d.ts +24 -0
  650. package/lib/plugins.api/plugins.api.events.d.ts.map +1 -0
  651. package/lib/plugins.api/plugins.api.events.js +5 -0
  652. package/lib/plugins.api/plugins.api.events.js.map +1 -0
  653. package/lib/plugins.api/plugins.api.feeds.d.ts +35 -0
  654. package/lib/plugins.api/plugins.api.feeds.d.ts.map +1 -0
  655. package/lib/plugins.api/plugins.api.feeds.js +12 -0
  656. package/lib/plugins.api/plugins.api.feeds.js.map +1 -0
  657. package/lib/plugins.api/plugins.api.icons.d.ts +21 -0
  658. package/lib/plugins.api/plugins.api.icons.d.ts.map +1 -0
  659. package/lib/plugins.api/plugins.api.icons.js +5 -0
  660. package/lib/plugins.api/plugins.api.icons.js.map +1 -0
  661. package/lib/plugins.api/plugins.api.observations.d.ts +10 -0
  662. package/lib/plugins.api/plugins.api.observations.d.ts.map +1 -0
  663. package/lib/plugins.api/plugins.api.observations.js +11 -0
  664. package/lib/plugins.api/plugins.api.observations.js.map +1 -0
  665. package/lib/plugins.api/plugins.api.users.d.ts +4 -0
  666. package/lib/plugins.api/plugins.api.users.d.ts.map +1 -0
  667. package/lib/plugins.api/plugins.api.users.js +5 -0
  668. package/lib/plugins.api/plugins.api.users.js.map +1 -0
  669. package/lib/plugins.api/plugins.api.web.d.ts +10 -0
  670. package/lib/plugins.api/plugins.api.web.d.ts.map +1 -0
  671. package/lib/plugins.api/plugins.api.web.js +3 -0
  672. package/lib/plugins.api/plugins.api.web.js.map +1 -0
  673. package/lib/provision/index.d.ts +23 -0
  674. package/lib/provision/index.d.ts.map +1 -0
  675. package/lib/provision/index.js +60 -0
  676. package/lib/provision/index.js.map +1 -0
  677. package/lib/provision/none.d.ts +3 -0
  678. package/lib/provision/none.d.ts.map +1 -0
  679. package/lib/provision/none.js +41 -0
  680. package/lib/provision/none.js.map +1 -0
  681. package/lib/provision/strategies/none.d.ts +9 -0
  682. package/lib/provision/strategies/none.d.ts.map +1 -0
  683. package/lib/provision/strategies/none.js +25 -0
  684. package/lib/provision/strategies/none.js.map +1 -0
  685. package/lib/provision/strategies/uid.d.ts +9 -0
  686. package/lib/provision/strategies/uid.d.ts.map +1 -0
  687. package/lib/provision/strategies/uid.js +28 -0
  688. package/lib/provision/strategies/uid.js.map +1 -0
  689. package/lib/provision/uid.d.ts +3 -0
  690. package/lib/provision/uid.d.ts.map +1 -0
  691. package/lib/provision/uid.js +43 -0
  692. package/lib/provision/uid.js.map +1 -0
  693. package/lib/routes/authenticationconfigurations.d.ts +3 -0
  694. package/lib/routes/authenticationconfigurations.d.ts.map +1 -0
  695. package/lib/routes/authenticationconfigurations.js +209 -0
  696. package/lib/routes/authenticationconfigurations.js.map +1 -0
  697. package/lib/routes/devices.d.ts +3 -0
  698. package/lib/routes/devices.d.ts.map +1 -0
  699. package/lib/routes/devices.js +201 -0
  700. package/lib/routes/devices.js.map +1 -0
  701. package/lib/routes/events.d.ts +47 -0
  702. package/lib/routes/events.d.ts.map +1 -0
  703. package/lib/routes/events.js +495 -0
  704. package/lib/routes/events.js.map +1 -0
  705. package/lib/routes/exports.d.ts +3 -0
  706. package/lib/routes/exports.d.ts.map +1 -0
  707. package/lib/routes/exports.js +204 -0
  708. package/lib/routes/exports.js.map +1 -0
  709. package/lib/routes/imports.d.ts +3 -0
  710. package/lib/routes/imports.d.ts.map +1 -0
  711. package/lib/routes/imports.js +41 -0
  712. package/lib/routes/imports.js.map +1 -0
  713. package/lib/routes/index.d.ts +3 -0
  714. package/lib/routes/index.d.ts.map +1 -0
  715. package/lib/routes/index.js +151 -0
  716. package/lib/routes/index.js.map +1 -0
  717. package/lib/routes/layers.d.ts +3 -0
  718. package/lib/routes/layers.d.ts.map +1 -0
  719. package/lib/routes/layers.js +433 -0
  720. package/lib/routes/layers.js.map +1 -0
  721. package/lib/routes/locations.d.ts +3 -0
  722. package/lib/routes/locations.d.ts.map +1 -0
  723. package/lib/routes/locations.js +124 -0
  724. package/lib/routes/locations.js.map +1 -0
  725. package/lib/routes/logins.d.ts +3 -0
  726. package/lib/routes/logins.d.ts.map +1 -0
  727. package/lib/routes/logins.js +64 -0
  728. package/lib/routes/logins.js.map +1 -0
  729. package/lib/routes/observations.d.ts +3 -0
  730. package/lib/routes/observations.d.ts.map +1 -0
  731. package/lib/routes/observations.js +363 -0
  732. package/lib/routes/observations.js.map +1 -0
  733. package/lib/routes/plugins.d.ts +3 -0
  734. package/lib/routes/plugins.d.ts.map +1 -0
  735. package/lib/routes/plugins.js +29 -0
  736. package/lib/routes/plugins.js.map +1 -0
  737. package/lib/routes/roles.d.ts +3 -0
  738. package/lib/routes/roles.d.ts.map +1 -0
  739. package/lib/routes/roles.js +64 -0
  740. package/lib/routes/roles.js.map +1 -0
  741. package/lib/routes/settings.d.ts +3 -0
  742. package/lib/routes/settings.d.ts.map +1 -0
  743. package/lib/routes/settings.js +21 -0
  744. package/lib/routes/settings.js.map +1 -0
  745. package/lib/routes/setup.d.ts +3 -0
  746. package/lib/routes/setup.d.ts.map +1 -0
  747. package/lib/routes/setup.js +90 -0
  748. package/lib/routes/setup.js.map +1 -0
  749. package/lib/routes/teams.d.ts +3 -0
  750. package/lib/routes/teams.d.ts.map +1 -0
  751. package/lib/routes/teams.js +213 -0
  752. package/lib/routes/teams.js.map +1 -0
  753. package/lib/routes/users.d.ts +3 -0
  754. package/lib/routes/users.d.ts.map +1 -0
  755. package/lib/routes/users.js +478 -0
  756. package/lib/routes/users.js.map +1 -0
  757. package/lib/schedule/export/export-task.d.ts +14 -0
  758. package/lib/schedule/export/export-task.d.ts.map +1 -0
  759. package/lib/schedule/export/export-task.js +70 -0
  760. package/lib/schedule/export/export-task.js.map +1 -0
  761. package/lib/schedule/index.d.ts +2 -0
  762. package/lib/schedule/index.d.ts.map +1 -0
  763. package/lib/schedule/index.js +27 -0
  764. package/lib/schedule/index.js.map +1 -0
  765. package/lib/security/key-mgt/key-mgt-factory.d.ts +7 -0
  766. package/lib/security/key-mgt/key-mgt-factory.d.ts.map +1 -0
  767. package/lib/security/key-mgt/key-mgt-factory.js +10 -0
  768. package/lib/security/key-mgt/key-mgt-factory.js.map +1 -0
  769. package/lib/security/key-mgt/plaintext-key-manager.d.ts +42 -0
  770. package/lib/security/key-mgt/plaintext-key-manager.d.ts.map +1 -0
  771. package/lib/security/key-mgt/plaintext-key-manager.js +52 -0
  772. package/lib/security/key-mgt/plaintext-key-manager.js.map +1 -0
  773. package/lib/security/responses/data-response.d.ts +13 -0
  774. package/lib/security/responses/data-response.d.ts.map +1 -0
  775. package/lib/security/responses/data-response.js +25 -0
  776. package/lib/security/responses/data-response.js.map +1 -0
  777. package/lib/security/secret-store-service.d.ts +39 -0
  778. package/lib/security/secret-store-service.d.ts.map +1 -0
  779. package/lib/security/secret-store-service.js +94 -0
  780. package/lib/security/secret-store-service.js.map +1 -0
  781. package/lib/security/storage/file-system-secret-store.d.ts +17 -0
  782. package/lib/security/storage/file-system-secret-store.d.ts.map +1 -0
  783. package/lib/security/storage/file-system-secret-store.js +46 -0
  784. package/lib/security/storage/file-system-secret-store.js.map +1 -0
  785. package/lib/security/storage/json-provider.d.ts +6 -0
  786. package/lib/security/storage/json-provider.d.ts.map +1 -0
  787. package/lib/security/storage/json-provider.js +17 -0
  788. package/lib/security/storage/json-provider.js.map +1 -0
  789. package/lib/security/utilities/secure-property-appender.d.ts +8 -0
  790. package/lib/security/utilities/secure-property-appender.d.ts.map +1 -0
  791. package/lib/security/utilities/secure-property-appender.js +39 -0
  792. package/lib/security/utilities/secure-property-appender.js.map +1 -0
  793. package/lib/transformers/authenticationconfiguration.d.ts +2 -0
  794. package/lib/transformers/authenticationconfiguration.d.ts.map +1 -0
  795. package/lib/transformers/authenticationconfiguration.js +22 -0
  796. package/lib/transformers/authenticationconfiguration.js.map +1 -0
  797. package/lib/transformers/export.d.ts +2 -0
  798. package/lib/transformers/export.d.ts.map +1 -0
  799. package/lib/transformers/export.js +13 -0
  800. package/lib/transformers/export.js.map +1 -0
  801. package/lib/transformers/geojson.d.ts +2 -0
  802. package/lib/transformers/geojson.d.ts.map +1 -0
  803. package/lib/transformers/geojson.js +24 -0
  804. package/lib/transformers/geojson.js.map +1 -0
  805. package/lib/transformers/layer.d.ts +2 -0
  806. package/lib/transformers/layer.d.ts.map +1 -0
  807. package/lib/transformers/layer.js +13 -0
  808. package/lib/transformers/layer.js.map +1 -0
  809. package/lib/transformers/observation.d.ts +2 -0
  810. package/lib/transformers/observation.d.ts.map +1 -0
  811. package/lib/transformers/observation.js +13 -0
  812. package/lib/transformers/observation.js.map +1 -0
  813. package/lib/transformers/pageinfo.d.ts +2 -0
  814. package/lib/transformers/pageinfo.d.ts.map +1 -0
  815. package/lib/transformers/pageinfo.js +27 -0
  816. package/lib/transformers/pageinfo.js.map +1 -0
  817. package/lib/transformers/user.d.ts +2 -0
  818. package/lib/transformers/user.d.ts.map +1 -0
  819. package/lib/transformers/user.js +21 -0
  820. package/lib/transformers/user.js.map +1 -0
  821. package/lib/tsconfig.tsbuildinfo +1 -0
  822. package/lib/upload.d.ts +8 -0
  823. package/lib/upload.d.ts.map +1 -0
  824. package/lib/upload.js +30 -0
  825. package/lib/upload.js.map +1 -0
  826. package/lib/utilities/authenticationApiAppender.d.ts +10 -0
  827. package/lib/utilities/authenticationApiAppender.d.ts.map +1 -0
  828. package/lib/utilities/authenticationApiAppender.js +48 -0
  829. package/lib/utilities/authenticationApiAppender.js.map +1 -0
  830. package/lib/utilities/filterParser.d.ts +2 -0
  831. package/lib/utilities/filterParser.d.ts.map +1 -0
  832. package/lib/utilities/filterParser.js +87 -0
  833. package/lib/utilities/filterParser.js.map +1 -0
  834. package/lib/utilities/geopackage.d.ts +56 -0
  835. package/lib/utilities/geopackage.d.ts.map +1 -0
  836. package/lib/utilities/geopackage.js +335 -0
  837. package/lib/utilities/geopackage.js.map +1 -0
  838. package/lib/utilities/loader.d.ts +9 -0
  839. package/lib/utilities/loader.d.ts.map +1 -0
  840. package/lib/utilities/loader.js +25 -0
  841. package/lib/utilities/loader.js.map +1 -0
  842. package/lib/utilities/paging.d.ts +15 -0
  843. package/lib/utilities/paging.d.ts.map +1 -0
  844. package/lib/utilities/paging.js +56 -0
  845. package/lib/utilities/paging.js.map +1 -0
  846. package/lib/utilities/passwordValidator.d.ts +8 -0
  847. package/lib/utilities/passwordValidator.d.ts.map +1 -0
  848. package/lib/utilities/passwordValidator.js +175 -0
  849. package/lib/utilities/passwordValidator.js.map +1 -0
  850. package/lib/utilities/pbkdf2.d.ts +6 -0
  851. package/lib/utilities/pbkdf2.d.ts.map +1 -0
  852. package/lib/utilities/pbkdf2.js +79 -0
  853. package/lib/utilities/pbkdf2.js.map +1 -0
  854. package/lib/utilities/togeojson.d.ts +2 -0
  855. package/lib/utilities/togeojson.d.ts.map +1 -0
  856. package/lib/utilities/togeojson.js +308 -0
  857. package/lib/utilities/togeojson.js.map +1 -0
  858. package/lib/utilities/waitForMongooseConnection.d.ts +3 -0
  859. package/lib/utilities/waitForMongooseConnection.d.ts.map +1 -0
  860. package/lib/utilities/waitForMongooseConnection.js +34 -0
  861. package/lib/utilities/waitForMongooseConnection.js.map +1 -0
  862. package/lib/utilities/whitelist.d.ts +2 -0
  863. package/lib/utilities/whitelist.d.ts.map +1 -0
  864. package/lib/utilities/whitelist.js +18 -0
  865. package/lib/utilities/whitelist.js.map +1 -0
  866. package/lib/views/authentication.pug +10 -0
  867. package/lib/views/oauth.pug +12 -0
  868. package/lib/views/observation.pug +137 -0
  869. package/package.json +203 -0
@@ -0,0 +1,4591 @@
1
+ openapi: 3.0.1
2
+ info:
3
+ title: MAGE (Mobile Awareness GEOINT Environment) API
4
+ description: MAGE API
5
+ contact:
6
+ name: MAGE Support
7
+ email: mage@nga.mil
8
+ license:
9
+ name: Apache 2.0
10
+ url: http://www.apache.org/licenses/LICENSE-2.0
11
+ version: 6.0.1
12
+ servers: []
13
+ security:
14
+ - mageToken: []
15
+ tags:
16
+ - name: Auth
17
+ - name: Authentication & Authorization
18
+ - name: Authentication Configuration
19
+ description: Authentication configurations define the strategies used to authenticate users into the system.
20
+ - name: Device
21
+ - name: Event
22
+ - name: Export
23
+ - name: Feed
24
+ description: >
25
+ Feeds are supplemental data sets that participants can add to their active event context.
26
+ Feed content could have any combination of spatial, temporal, or informational dimensions.
27
+ - name: Icon
28
+ - name: Layer
29
+ - name: Location
30
+ - name: Observation
31
+ - name: Role
32
+ - name: Settings
33
+ - name: Team
34
+ - name: User
35
+ paths:
36
+ /api/logins:
37
+ get:
38
+ tags: [ Auth ]
39
+ description: >
40
+ Return an array of user login events. This operation requires
41
+ `READ_USER` permission.
42
+ operationId: getUserLogins
43
+ parameters:
44
+ - name: userId
45
+ in: query
46
+ description: Return only logins for the given `userId`
47
+ schema: { $ref: '#/components/schemas/User/properties/id' }
48
+ - name: deviceId
49
+ in: query
50
+ description: Return only logins from the given `deviceId`
51
+ schema: { $ref: '#/components/schemas/Device/properties/id' }
52
+ - name: startDate
53
+ in: query
54
+ description: ISO 8601 start date to filter (inclusive)
55
+ schema:
56
+ type: string
57
+ format: date-time
58
+ - name: endDate
59
+ in: query
60
+ description: ISO 8601 end date filter (exclusive)
61
+ schema:
62
+ type: string
63
+ format: date-time
64
+ - name: limit
65
+ in: query
66
+ description: >
67
+ Limit the number of results to the given value. The default value
68
+ is `10`.
69
+ schema:
70
+ type: integer
71
+ - name: firstLoginId
72
+ in: query
73
+ description: The ID of the first login in the range of results
74
+ schema: { $ref: '#/components/schemas/Login/properties/id' }
75
+ - name: lastLoginId
76
+ in: query
77
+ description: The ID of the last login in the range of results
78
+ schema: { $ref: '#/components/schemas/Login/properties/id' }
79
+ responses:
80
+ 200:
81
+ description: >
82
+ Success - return the array of login events according to the given
83
+ query parameters.
84
+ content:
85
+ application/json:
86
+ schema:
87
+ type: object
88
+ required: [ logins ]
89
+ properties:
90
+ next:
91
+ type: string
92
+ format: uri
93
+ description: Link to the next chunk of results
94
+ prev:
95
+ type: string
96
+ format: uri
97
+ description: Link to the previous chunk of results
98
+ logins:
99
+ type: array
100
+ items: { $ref: '#/components/schemas/Login' }
101
+
102
+ /api/logout:
103
+ post:
104
+ tags:
105
+ - Auth
106
+ description: Invaldate the auth token for the requesting user.
107
+ operationId: logout
108
+ responses:
109
+ 200:
110
+ description: logout response
111
+
112
+ /auth/{authenticationStrategy}/signin:
113
+ post:
114
+ tags: [ Authentication & Authorization ]
115
+ summary: Authentication
116
+ description: Authenticate a user using a given strategy.
117
+ operationId: authenticate
118
+ security:
119
+ []
120
+ parameters:
121
+ - name: authenticationStrategy
122
+ in: path
123
+ description: Authentication strategy.
124
+ required: true
125
+ schema:
126
+ type: string
127
+ enum: [ local, ldap, saml, oauth, openidconnect ]
128
+ requestBody:
129
+ required: true
130
+ content:
131
+ application/json:
132
+ schema: { $ref: '#/components/schemas/UserIn' }
133
+ multipart/form-data:
134
+ schema: { $ref: '#/components/schemas/UserIn' }
135
+ responses:
136
+ 200:
137
+ description: Successfully signed in.
138
+ content:
139
+ application/json:
140
+ schema: { $ref: '#/components/schemas/Authentication' }
141
+
142
+ /auth/token:
143
+ post:
144
+ tags: [ Authentication & Authorization ]
145
+ summary: Device Authorization
146
+ description: Authorize a device. If device does not exist, it may also be created via this method.
147
+ operationId: authorize
148
+ security:
149
+ - authenticationToken: []
150
+ parameters:
151
+ - name: uid
152
+ in: query
153
+ description: Id of the device that requires provisioning
154
+ required: true
155
+ schema: { $ref: '#/components/schemas/Device/properties/id' }
156
+ - name: name
157
+ in: query
158
+ description: Name of the device
159
+ schema: { $ref: '#/components/schemas/Device/properties/name' }
160
+ - name: description
161
+ in: query
162
+ description: Description of the device
163
+ schema: { $ref: '#/components/schemas/Device/properties/description' }
164
+ - name: appVersion
165
+ in: query
166
+ description: Application version of the device (required if creating a new device)
167
+ schema: { $ref: '#/components/schemas/Device/properties/appVersion' }
168
+ requestBody:
169
+ required: false
170
+ content:
171
+ application/json:
172
+ schema: { $ref: '#/components/schemas/DeviceIn' }
173
+ multipart/form-data:
174
+ schema: { $ref: '#/components/schemas/DeviceIn' }
175
+ responses:
176
+ 200:
177
+ description: Successful device authorization, MAGE api token is returned.
178
+ 401:
179
+ description: User is not authorized. Typically this means you need to authenticate `/auth/local/signin`.
180
+ 403:
181
+ description: Failure to provision the device. This typically means the device needs to be registered.
182
+
183
+ /api/authentication/configuration/:
184
+ get:
185
+ tags: [Authentication Configuration]
186
+ summary: Get an array of all authentication configurations
187
+ description: Get all authentication configurations. The client must have `READ_AUTH_CONFIG` permission.
188
+ operationId: getAllAuthConfigs
189
+ parameters:
190
+ - { $ref: '#/components/parameters/authenticationConfigurationIncludeDisabled' }
191
+ responses:
192
+ 200:
193
+ description: A list of all authentication configurations.
194
+ content:
195
+ application/json:
196
+ schema:
197
+ type: array
198
+ items:
199
+ $ref: '#/components/schemas/AuthenticationConfiguration'
200
+ 401:
201
+ description: User is not authorized to view authentication configurations.
202
+ post:
203
+ tags: [Authentication Configuration]
204
+ summary: Create a new authentication configuration
205
+ description: Create a new authentication configuration. If enabled, it will allow users to use this method.
206
+ The client must have `UPDATE_AUTH_CONFIG` permission.
207
+ operationId: createNewAuthConfig
208
+ requestBody:
209
+ required: true
210
+ content:
211
+ application/json:
212
+ schema: { $ref: '#/components/schemas/AuthenticationConfiguration' }
213
+ responses:
214
+ 200:
215
+ description: The created authentication configuration
216
+ content:
217
+ application/json:
218
+ schema:
219
+ $ref: '#/components/schemas/AuthenticationConfiguration'
220
+ 401:
221
+ description: User is not authorized to create authentication configurations.
222
+ /api/authentication/configuration/{id}:
223
+ parameters:
224
+ - { $ref: '#/components/parameters/authenticationConfigurationIdInPath' }
225
+ put:
226
+ tags: [ Authentication Configuration ]
227
+ summary: Update an authentication configuration
228
+ description: >
229
+ Update the authentication configuration.
230
+ The client must have `UPDATE_AUTH_CONFIG` permission.
231
+ operationId: updateAuthConfigById
232
+ requestBody:
233
+ required: true
234
+ content:
235
+ application/json:
236
+ schema: { $ref: '#/components/schemas/AuthenticationConfiguration' }
237
+ responses:
238
+ 200:
239
+ description: authentication configuration update response
240
+ content:
241
+ application/json:
242
+ schema:
243
+ $ref: '#/components/schemas/AuthenticationConfiguration'
244
+ delete:
245
+ tags: [ Authentication Configuration ]
246
+ summary: Delete an authentication configuration
247
+ description: >
248
+ Delete the authentiction configuration document by `id`.
249
+ The client must have `UPDATE_AUTH_CONFIG` permission.
250
+ operationId: deleteAutheConfig
251
+ responses:
252
+ 204:
253
+ description: Success - authentication configuration
254
+ /api/authentication/configuration/count/{id}:
255
+ parameters:
256
+ - { $ref: '#/components/parameters/authenticationConfigurationIdInPath' }
257
+ get:
258
+ tags: [ Authentication Configuration ]
259
+ summary: Count the number of users for a given configuration
260
+ description: >
261
+ Count the number of users for a given configuration.
262
+ The client must have `READ_AUTH_CONFIG` permission.
263
+ operationId: countUsersByAuthConfig
264
+ responses:
265
+ 200:
266
+ description: The number of users created from the provided authentication.
267
+
268
+ /api/users:
269
+ post:
270
+ tags: [ User ]
271
+ description: >
272
+ Create a new user. Duplicate usernames are not allowed.
273
+ If the requesting user is an admin, i.e., has the `CREATE_USER`
274
+ permission, the user record will be active. Otherwise, the user will
275
+ be inactive and an admin must activate the user later. Additionally,
276
+ the `roleId` key is required when the requesting user is an admin.
277
+ Otherwise, the created user receives a default role. When the request
278
+ body contains `multipart/form-data`, MAGE will handle the `icon` and/or
279
+ `avatar` file form parameters. The server only sets the user's map
280
+ icon if the requesting user has the `CREATE_USER` permission.
281
+ operationId: createUser
282
+ requestBody:
283
+ required: true
284
+ content:
285
+ application/json:
286
+ schema: { $ref: '#/components/schemas/UserCreate' }
287
+ multipart/form-data:
288
+ schema: { $ref: '#/components/schemas/UserCreate' }
289
+ responses:
290
+ 200:
291
+ description: The created user document
292
+ content:
293
+ application/json:
294
+ schema:
295
+ $ref: '#/components/schemas/User'
296
+ get:
297
+ tags: [ User ]
298
+ description: >
299
+ Return an array of all users. The client must have `READ_USER` permission.
300
+ summary: Get an array of users.
301
+ operationId: getUsers
302
+ parameters:
303
+ - in: query
304
+ name: active
305
+ description: Return only active or inactive users.
306
+ schema:
307
+ type: boolean
308
+ - in: query
309
+ name: enabled
310
+ description: Return only enabled or disabled users.
311
+ schema:
312
+ type: boolean
313
+ - in: query
314
+ name: start
315
+ description: Used with pagination. Indicates the record number to start (leave blank for initial set of results).
316
+ schema:
317
+ type: integer
318
+ - in: query
319
+ name: limit
320
+ description: Used with pagination. Maximum number of records to return.
321
+ schema:
322
+ type: integer
323
+ - in: query
324
+ name: sort
325
+ description: Describes the sort order. Values allowed are asc, desc, ascending, descending, 1, and -1.
326
+ content:
327
+ application/json:
328
+ schema:
329
+ type: object
330
+ required:
331
+ - displayName
332
+ - _id
333
+ properties:
334
+ displayName:
335
+ type: string
336
+ _id:
337
+ type: string
338
+ - in: query
339
+ name: populate
340
+ description: >
341
+ Pre-populate the given relation keys in the result user documents.
342
+ Currently, this only supports 'roleId'.
343
+ schema: { $ref: '#/components/schemas/CommaSeparatedTokens' }
344
+ responses:
345
+ 200:
346
+ description: An array of user documents
347
+ content:
348
+ application/json:
349
+ schema:
350
+ type: array
351
+ items:
352
+ $ref: '#/components/schemas/User'
353
+ /api/users/count:
354
+ get:
355
+ tags: [ User ]
356
+ description: >
357
+ Return the number of users in the database. The client must
358
+ have `READ_USER` permission.
359
+ summary: Count the number of users in the database.
360
+ operationId: getUserCount
361
+ parameters:
362
+ - in: query
363
+ name: active
364
+ schema:
365
+ type: boolean
366
+ - in: query
367
+ name: enabled
368
+ schema:
369
+ type: boolean
370
+ responses:
371
+ 200:
372
+ description: A successful request
373
+ content:
374
+ application/json:
375
+ schema: { $ref: '#/components/schemas/Count' }
376
+ /api/next-users/search:
377
+ get:
378
+ tags: [ User ]
379
+ description: Search for users. The client must have `READ_USER` permission.
380
+ summary: User search.
381
+ operationId: userSearch
382
+ parameters:
383
+ - in: query
384
+ name: term
385
+ schema:
386
+ type: string
387
+ - in: query
388
+ name: page_size
389
+ schema:
390
+ type: integer
391
+ - in: query
392
+ name: page
393
+ schema:
394
+ type: integer
395
+ - in: query
396
+ name: total
397
+ schema:
398
+ type: boolean
399
+ responses:
400
+ 200:
401
+ description: Users matching the search
402
+ content:
403
+ application/json:
404
+ schema: { $ref: '#/components/schemas/PageOfUsers' }
405
+ /api/users/myself:
406
+ get:
407
+ tags: [ User ]
408
+ description: >
409
+ Return the user document for the requesting user based on the
410
+ provided authentication token.
411
+ operationId: getMyself
412
+ responses:
413
+ 200:
414
+ description: The user document for the requesting user
415
+ content:
416
+ application/json:
417
+ schema:
418
+ $ref: '#/components/schemas/User'
419
+ put:
420
+ tags: [ User ]
421
+ description: >
422
+ Update the user document for the requesting user based on the
423
+ provided authentication token. This operation does not support
424
+ changing the requesting user's password; use
425
+ `PUT /api/users/myself/password` for that.
426
+ operationId: updateMyself
427
+ requestBody:
428
+ required: true
429
+ content:
430
+ application/json:
431
+ schema: { $ref: '#/components/schemas/UserUpdateSelf' }
432
+ multipart/form-data:
433
+ schema: { $ref: '#/components/schemas/UserUpdateSelf' }
434
+ responses:
435
+ 200:
436
+ description: The updated user document
437
+ content:
438
+ application/json:
439
+ schema:
440
+ $ref: '#/components/schemas/User'
441
+ /api/users/myself/password:
442
+ put:
443
+ tags: [ User ]
444
+ description: Update the password for the requesting user.
445
+ operationId: updateMyPassword
446
+ requestBody:
447
+ content:
448
+ application/json:
449
+ schema:
450
+ type: object
451
+ properties:
452
+ newPassword:
453
+ type: string
454
+ format: password
455
+ newPasswordConfirm:
456
+ type: string
457
+ format: password
458
+ responses:
459
+ 200:
460
+ description: Successful password update; return the user document
461
+ content:
462
+ application/json:
463
+ schema: { $ref: '#/components/schemas/User' }
464
+ /api/users/myself/status:
465
+ put:
466
+ tags: [ User ]
467
+ description: Update the status of the requesting user.
468
+ operationId: updateMyStatus
469
+ requestBody:
470
+ content:
471
+ application/json:
472
+ schema:
473
+ type: object
474
+ properties:
475
+ status:
476
+ type: string
477
+ required: [ status ]
478
+ responses:
479
+ 200:
480
+ description: Successful status update
481
+ content:
482
+ application/json:
483
+ schema: { $ref: '#/components/schemas/User' }
484
+ delete:
485
+ tags: [ User ]
486
+ description: Delete the status of the requesting user.
487
+ operationId: deleteMyStatus
488
+ responses:
489
+ 200:
490
+ description: Successfully deleted status
491
+ content:
492
+ application/json:
493
+ schema: { $ref: '#/components/schemas/User' }
494
+ /api/users/{userId}:
495
+ parameters:
496
+ - { $ref: '#/components/parameters/userIdInPath' }
497
+ get:
498
+ tags:
499
+ - User
500
+ description: >
501
+ Return the user document whose `id` equals the `userId` path parameter.
502
+ The client must have `READ_USER` permission.
503
+ operationId: getUserById
504
+ responses:
505
+ 200:
506
+ description: The updated user document
507
+ content:
508
+ application/json:
509
+ schema:
510
+ $ref: '#/components/schemas/User'
511
+ put:
512
+ tags: [ User ]
513
+ description: >
514
+ Update the user document whose `id` equals the `userId` path parameter.
515
+ The client must have `UPDATE_USER` permission.
516
+ operationId: updateUserById
517
+ requestBody:
518
+ required: true
519
+ content:
520
+ application/json:
521
+ schema: { $ref: '#/components/schemas/UserIn' }
522
+ multipart/form-data:
523
+ schema: { $ref: '#/components/schemas/UserIn' }
524
+ responses:
525
+ 200:
526
+ description: user update response
527
+ content:
528
+ application/json:
529
+ schema:
530
+ $ref: '#/components/schemas/User'
531
+ delete:
532
+ tags: [ User ]
533
+ description: >
534
+ Delete the user document whose `id` equals the `userId` path parameter.
535
+ The client must have `DELETE_USER` permission.
536
+ operationId: deleteUser
537
+ responses:
538
+ 204:
539
+ description: Success - user deleted
540
+ /api/users/{userId}/avatar:
541
+ parameters:
542
+ - { $ref: '#/components/parameters/userIdInPath' }
543
+ get:
544
+ tags: [ User ]
545
+ description: Returns users avatar based on user id
546
+ operationId: getUserAvatar
547
+ responses:
548
+ 200:
549
+ description: user avatar response
550
+ content:
551
+ image/*:
552
+ schema:
553
+ type: string
554
+ format: binary
555
+ /api/users/{userId}/icon:
556
+ parameters:
557
+ - { $ref: '#/components/parameters/userIdInPath' }
558
+ get:
559
+ tags: [ User ]
560
+ description: Returns users map icon based on user id
561
+ operationId: getUserIcon
562
+ responses:
563
+ 200:
564
+ description: user icon response
565
+ content:
566
+ image/*:
567
+ schema:
568
+ type: string
569
+ format: binary
570
+ /api/users/{userId}/events/{eventId}/recent:
571
+ parameters:
572
+ - { $ref: '#/components/parameters/userIdInPath' }
573
+ - { $ref: '#/components/parameters/eventIdInPath' }
574
+ post:
575
+ tags: [ User ]
576
+ description: >
577
+ Add the given event to top of recent list for the given user. The list
578
+ is capped at 5.
579
+ operationId: addRecentEventForUser
580
+ responses:
581
+ 200:
582
+ description: user response
583
+ content:
584
+ application/json:
585
+ schema:
586
+ $ref: '#/components/schemas/User'
587
+
588
+ /api/devices:
589
+ post:
590
+ tags:
591
+ - Device
592
+ summary: Create a device
593
+ description: >
594
+ Save a new device document in the database. The request client must
595
+ have `CREATE_DEVICE` permission. `DEPRECATED`: Clients should be creating devices via authorize `/auth/{strategy}/authorize`
596
+ operationId: createDevice
597
+ requestBody:
598
+ $ref: '#/components/requestBodies/DeviceIn'
599
+ deprecated:
600
+ true
601
+ responses:
602
+ 200:
603
+ description: new device response
604
+ content:
605
+ application/json:
606
+ schema:
607
+ $ref: '#/components/schemas/Device'
608
+ get:
609
+ tags:
610
+ - Device
611
+ description: >
612
+ Return an array of all the device documents in the database. The
613
+ requesting client must have `READ_DEVICE` permission.
614
+ summary: Get all the device documents in the database.
615
+ operationId: getDevices
616
+ parameters:
617
+ - in: query
618
+ name: registered
619
+ description: Return only registered or unregistered devices.
620
+ schema: { $ref: '#/components/schemas/Device/properties/registered' }
621
+ - in: query
622
+ name: start
623
+ description: Used with pagination. Indicates the record number to start (leave blank for initial set of results).
624
+ schema:
625
+ type: integer
626
+ - in: query
627
+ name: limit
628
+ description: Used with pagination. Maximum number of records to return.
629
+ schema:
630
+ type: integer
631
+ - in: query
632
+ name: sort
633
+ description: Describes the sort order. Values allowed are asc, desc, ascending, descending, 1, and -1.
634
+ content:
635
+ application/json:
636
+ schema:
637
+ type: object
638
+ required:
639
+ - userAgent
640
+ - _id
641
+ properties:
642
+ userAgent:
643
+ type: string
644
+ _id:
645
+ type: string
646
+ - in: query
647
+ name: expand
648
+ description: >
649
+ Comma-separated list of relation keys to populate with related
650
+ documents. Currently the API only supports the `user` key.
651
+ schema: { $ref: '#/components/schemas/CommaSeparatedTokens' }
652
+ responses:
653
+ 200:
654
+ description: Success - an array of device documents
655
+ content:
656
+ application/json:
657
+ schema:
658
+ type: array
659
+ items:
660
+ $ref: '#/components/schemas/Device'
661
+ /api/devices/count:
662
+ get:
663
+ tags:
664
+ - Device
665
+ operationId: getDeviceCount
666
+ description: Return the number of devices in the database.
667
+ summary: Count the number of devices in the database.
668
+ parameters:
669
+ - in: query
670
+ name: registered
671
+ schema:
672
+ type: boolean
673
+ responses:
674
+ 200:
675
+ description: Success - return the device count
676
+ content:
677
+ application/json:
678
+ schema:
679
+ $ref: '#/components/schemas/Count'
680
+ /api/devices/{deviceId}:
681
+ parameters:
682
+ - $ref: '#/components/parameters/deviceIdInPath'
683
+ get:
684
+ tags:
685
+ - Device
686
+ description: >
687
+ Return the device document whose ID matches the path parameter for the
688
+ device ID. The requesting client must have READ_DEVICE permission.
689
+ operationId: getDeviceById
690
+ responses:
691
+ 200:
692
+ description: device response
693
+ content:
694
+ application/json:
695
+ schema:
696
+ $ref: '#/components/schemas/Device'
697
+ put:
698
+ tags:
699
+ - Device
700
+ description: >
701
+ Update a device document whose ID matches the path parameter for the
702
+ device ID. The requesting client must have `UPDATE_DEVICE` permission.
703
+ operationId: updateDeviceById
704
+ requestBody:
705
+ $ref: '#/components/requestBodies/DeviceIn'
706
+ responses:
707
+ 200:
708
+ description: device update response
709
+ content:
710
+ application/json:
711
+ schema:
712
+ $ref: '#/components/schemas/Device'
713
+ delete:
714
+ tags:
715
+ - Device
716
+ description: >
717
+ Delete a device document whose ID matches the path parameter for the
718
+ device ID. The requesting client must have `DELETE_DEVICE` permission.
719
+ operationId: deleteDeviceByIds
720
+ responses:
721
+ 204:
722
+ description: user deleted
723
+
724
+ /api/teams:
725
+ post:
726
+ tags: [ Team ]
727
+ description: >
728
+ Save a new team document to the database. The requesting user must
729
+ have `CREATE_TEAM` permission.
730
+ operationId: createTeam
731
+ requestBody:
732
+ required: true
733
+ content:
734
+ application/json:
735
+ schema: { $ref: '#/components/schemas/TeamCreate' }
736
+ application/x-www-form-urlencoded:
737
+ schema: { $ref: '#/components/schemas/TeamCreate' }
738
+ responses:
739
+ 200:
740
+ description: Success - the created team document
741
+ content:
742
+ application/json:
743
+ schema:
744
+ $ref: '#/components/schemas/Team'
745
+ get:
746
+ tags: [ Team ]
747
+ description: >
748
+ Return all the teams. The requesting client must have `READ_TEAM`
749
+ permission.
750
+ operationId: getTeams
751
+ parameters:
752
+ - in: query
753
+ name: start
754
+ description: Used with pagination. Indicates the record number to start (leave blank for initial set of results).
755
+ schema:
756
+ type: integer
757
+ - in: query
758
+ name: limit
759
+ description: Used with pagination. Maximum number of records to return.
760
+ schema:
761
+ type: integer
762
+ - in: query
763
+ name: sort
764
+ description: Describes the sort order. Values allowed are asc, desc, ascending, descending, 1, and -1.
765
+ content:
766
+ application/json:
767
+ schema:
768
+ type: object
769
+ required:
770
+ - name
771
+ - _id
772
+ properties:
773
+ name:
774
+ type: string
775
+ _id:
776
+ type: string
777
+ - in: query
778
+ name: omit_event_teams
779
+ description: >
780
+ Whether to omit the event's implicit team that MAGE automatically
781
+ creates for adding individual users to an event.
782
+ schema:
783
+ type: boolean
784
+ - in: query
785
+ name: with_members
786
+ description: >
787
+ Return only teams that have the given user IDs as members.
788
+ schema:
789
+ type: array
790
+ items:
791
+ $ref: '#/components/schemas/User/properties/id'
792
+ - in: query
793
+ name: without_members
794
+ description: >
795
+ Return only teams that do not have the given user IDs as members.
796
+ schema:
797
+ type: array
798
+ items:
799
+ $ref: '#/components/schemas/User/properties/id'
800
+ - in: query
801
+ name: term
802
+ description: >
803
+ Return teams whose name or description field contains the given search term.
804
+ schema:
805
+ type: string
806
+ responses:
807
+ 200:
808
+ description: Success - an array of team documents
809
+ content:
810
+ application/json:
811
+ schema:
812
+ type: array
813
+ items:
814
+ $ref: '#/components/schemas/Team'
815
+ /api/teams/count:
816
+ get:
817
+ tags: [ Team ]
818
+ description: >
819
+ Get the number of teams in the database. The requesting user must have
820
+ have `READ_TEAM` permission.
821
+ operationId: getTeamCount
822
+ responses:
823
+ 200:
824
+ description: Success - return the number of teams
825
+ content:
826
+ application/json:
827
+ schema: { $ref: '#/components/schemas/Count' }
828
+ /api/teams/{teamId}:
829
+ parameters:
830
+ - $ref: '#/components/parameters/teamIdInPath'
831
+ get:
832
+ tags: [ Team ]
833
+ description: >
834
+ Return the team document whose ID matches the team ID path parameter.
835
+ The requesting client must have `READ_TEAM` permission.
836
+ operationId: getTeamById
837
+ responses:
838
+ 200:
839
+ description: Success - a team document
840
+ content:
841
+ application/json:
842
+ schema:
843
+ $ref: '#/components/schemas/Team'
844
+ put:
845
+ tags: [ Team ]
846
+ description: >
847
+ Update the team document whose ID matches the team ID in the path.
848
+ The requesting user must have `UPDATE_TEAM` permission.
849
+ operationId: updateTeamById
850
+ requestBody:
851
+ required: true
852
+ content:
853
+ application/json:
854
+ schema: { $ref: '#/components/schemas/TeamIn' }
855
+ application/x-www-form-urlencoded:
856
+ schema: { $ref: '#/components/schemas/TeamIn' }
857
+ responses:
858
+ 200:
859
+ description: Success - return the updated team document.
860
+ content:
861
+ application/json:
862
+ schema:
863
+ $ref: '#/components/schemas/Team'
864
+ delete:
865
+ tags: [ Team ]
866
+ description: >
867
+ Delete the team document whose ID matches the team ID in the path. The
868
+ request user must have `DELETE_TEAM` permission.
869
+ operationId: deleteTeam
870
+ responses:
871
+ 204:
872
+ description: Success - team deleted
873
+ /api/teams/{teamId}/users:
874
+ parameters:
875
+ - { $ref: '#/components/parameters/teamIdInPath' }
876
+ post:
877
+ tags: [ Team ]
878
+ operationId: addUserToTeam
879
+ description: >
880
+ Add a user to a team. The request user must have `UPDATE_TEAM`
881
+ permission as well as an ACL entry in the team document with `update`
882
+ permission.
883
+ requestBody:
884
+ description: The user ID reference to add to the target team
885
+ content:
886
+ application/json:
887
+ schema:
888
+ $ref: '#/components/schemas/UserRef'
889
+ required: true
890
+ responses:
891
+ 200:
892
+ description: Success - return the updated team document.
893
+ content:
894
+ application/json:
895
+ schema: { $ref: '#/components/schemas/Team' }
896
+ /api/teams/{teamId}/users/{userId}:
897
+ parameters:
898
+ - { $ref: '#/components/parameters/teamIdInPath' }
899
+ - { $ref: '#/components/parameters/userIdInPath' }
900
+ delete:
901
+ tags: [ Team ]
902
+ operationId: removeUserFromTeam
903
+ description: >
904
+ Remove a user from a team. The requesting user must have `UPDATE_TEAM`
905
+ permission as well as an ACL entry in the team document with `update`
906
+ permission.
907
+ responses:
908
+ 200:
909
+ description: Success - return the updated team document.
910
+ content:
911
+ application/json:
912
+ schema: { $ref: '#/components/schemas/Team' }
913
+ /api/teams/{teamId}/acl/{userId}:
914
+ parameters:
915
+ - { $ref: '#/components/parameters/teamIdInPath' }
916
+ - { $ref: '#/components/parameters/userIdInPath' }
917
+ put:
918
+ tags: [ Team ]
919
+ operationId: setUserAccessForTeam
920
+ description: >
921
+ Update a team ACL entry. The requesting user must have `UPDATE_TEAM`
922
+ permission, as well as an ACL entry in the team document with `update`
923
+ permission.
924
+ requestBody:
925
+ $ref: '#/components/requestBodies/ACLRoleUpdate'
926
+ responses:
927
+ 200:
928
+ description: Success - return the updated team document.
929
+ content:
930
+ application/json:
931
+ schema: { $ref: '#/components/schemas/Team' }
932
+ delete:
933
+ tags: [ Team ]
934
+ operationId: removeUserAccessFromTeam
935
+ description: >
936
+ Delete a team ACL entry. The requesting user must have `UPDATE_TEAM`
937
+ permission, as well as an ACL entry in the team document with `update`
938
+ permission.
939
+ responses:
940
+ 200:
941
+ description: Success - return the updated team document.
942
+ content:
943
+ application/json:
944
+ schema: { $ref: '#/components/schemas/Team' }
945
+
946
+ /api/events:
947
+ post:
948
+ tags: [ Event ]
949
+ operationId: createEvent
950
+ description: >
951
+ Create a new event. The requesting user must have `CREATE_EVENT`
952
+ permission. MAGE assigns the requesting user to the event's ACL with
953
+ the `OWNER` role. Creating a new event implicitly creates a team
954
+ coupled to the event by the team's `teamEventId` property. One can
955
+ add users to this team to allow access to the event on an individual
956
+ basis. This allows team and user access management to remain
957
+ consistent across the API without having to maintain a list of users
958
+ separately for each event.
959
+ requestBody:
960
+ description: The new event document
961
+ content:
962
+ application/json:
963
+ schema:
964
+ $ref: '#/components/schemas/EventCreate'
965
+ required: true
966
+ responses:
967
+ 201:
968
+ description: Success - return the created event.
969
+ content:
970
+ application/json:
971
+ schema:
972
+ $ref: '#/components/schemas/Event'
973
+ get:
974
+ tags: [ Event ]
975
+ description: >
976
+ Get all of the MAGE server's events. The requesting user must have
977
+ `READ_EVENT_ALL` permission and an ACL entry on the even with `read`
978
+ permission.
979
+ operationId: getEvents
980
+ parameters:
981
+ - in: query
982
+ name: projection
983
+ schema:
984
+ type: string
985
+ - in: query
986
+ name: state
987
+ schema:
988
+ type: string
989
+ enum: [ active, complete ]
990
+ - in: query
991
+ name: userId
992
+ schema:
993
+ $ref: '#/components/schemas/User/properties/id'
994
+ description: >
995
+ Return only events the given user can access.
996
+ - in: query
997
+ name: populate
998
+ schema:
999
+ type: boolean
1000
+ description: >
1001
+ When omitted or not `false`, populate the teams and layers related
1002
+ to each event. Otherwise, the event documents will only contain
1003
+ the IDs of the related teams and layers. When populated, the
1004
+ event documents will contain the `teams` and `layers` keys mapped to
1005
+ arrays of their respective documents. When not populated, the
1006
+ event documents will contain the `eventIds` and `layerIds` keys
1007
+ mapped to arrays of ID strings. Populated team documents will NOT
1008
+ contain populated user documents.
1009
+ responses:
1010
+ 200:
1011
+ description: Success - return an array of event documents.
1012
+ content:
1013
+ application/json:
1014
+ schema:
1015
+ type: array
1016
+ items:
1017
+ $ref: '#/components/schemas/Event'
1018
+ /api/events/count:
1019
+ get:
1020
+ tags: [ Event ]
1021
+ description: >
1022
+ Get the number of events in the database. The requesting user must
1023
+ have `READ_EVENT_ALL` permission.
1024
+ responses:
1025
+ 200:
1026
+ description: Success
1027
+ content:
1028
+ application/json:
1029
+ schema:
1030
+ $ref: '#/components/schemas/Count'
1031
+ /api/events/{eventId}:
1032
+ parameters:
1033
+ - $ref: '#/components/parameters/eventIdInPath'
1034
+ get:
1035
+ tags: [ Event ]
1036
+ description: >
1037
+ Return the event with the ID specified in the path. The requesting
1038
+ user must have `READ_EVENT_ALL` permission and an ACL entry with `read`
1039
+ permission on the even.
1040
+ operationId: getEventById
1041
+ parameters:
1042
+ - in: query
1043
+ name: populate
1044
+ schema:
1045
+ type: boolean
1046
+ description: >
1047
+ When omitted or not `false`, populate the teams and layers related
1048
+ to each event. Otherwise, the event documents will only contain
1049
+ the IDs of the related teams and layers. When populated, the
1050
+ event documents will contain the `teams` and `layers` keys mapped to
1051
+ with arrays of their respective documents. When not populated, the
1052
+ event documents will contain the `eventIds` and `layerIds` keys
1053
+ mapped to arrays of ID strings. Populated team documents will NOT
1054
+ contain populated user documents.
1055
+ - in: query
1056
+ name: projection
1057
+ schema:
1058
+ type: string
1059
+ responses:
1060
+ 200:
1061
+ description: Sucess - return the event document.
1062
+ content:
1063
+ application/json:
1064
+ schema:
1065
+ $ref: '#/components/schemas/Event'
1066
+ put:
1067
+ tags: [ Event ]
1068
+ description: >
1069
+ Update the event with the ID specified in the path. The requesting
1070
+ user must have `UPDATE_EVENT` permission and an ACL entry on the event
1071
+ with `update` permission.
1072
+ operationId: updateEventById
1073
+ requestBody:
1074
+ description: event update body
1075
+ content:
1076
+ application/json:
1077
+ schema:
1078
+ $ref: '#/components/schemas/EventUpdate'
1079
+ required: true
1080
+ responses:
1081
+ 200:
1082
+ description: Success - return the update event document.
1083
+ content:
1084
+ application/json:
1085
+ schema:
1086
+ $ref: '#/components/schemas/Event'
1087
+ delete:
1088
+ tags: [ Event ]
1089
+ description: >
1090
+ Delete the event with the ID specified in the path. The requesting
1091
+ user must have `DELETE_EVENT` permission and an ACL entry on the event
1092
+ with `delete` permission.
1093
+ operationId: deleteEvent
1094
+ responses:
1095
+ 204:
1096
+ description: Success - event deleted
1097
+ /api/events/{eventId}/forms:
1098
+ parameters:
1099
+ - $ref: '#/components/parameters/eventIdInPath'
1100
+ post:
1101
+ tags: [ Event ]
1102
+ description: >
1103
+ Add a form to the specified event. The requesting user must have
1104
+ `UPDATE_EVENT` permission and an ACL entry on the event with `update`
1105
+ permission.
1106
+ operationId: addFormToEvent
1107
+ requestBody:
1108
+ content:
1109
+ application/json:
1110
+ schema:
1111
+ $ref: '#/components/schemas/FormCreate'
1112
+ multipart/form-data:
1113
+ schema:
1114
+ $ref: '#/components/schemas/FormImport'
1115
+ responses:
1116
+ 201:
1117
+ description: Success - return the updated event document
1118
+ content:
1119
+ application/json:
1120
+ schema:
1121
+ $ref: '#/components/schemas/Event'
1122
+ /api/events/{eventId}/forms/{formId}:
1123
+ parameters:
1124
+ - $ref: '#/components/parameters/eventIdInPath'
1125
+ - $ref: '#/components/parameters/formIdInPath'
1126
+ put:
1127
+ tags: [ Event ]
1128
+ operationId: updateFormById
1129
+ description: >
1130
+ Update the specified form for the specified event. The requesting
1131
+ client must have `UPDATE_EVENT` permission and an ACL entry on the
1132
+ event with `update` permission.
1133
+ requestBody:
1134
+ content:
1135
+ application/json:
1136
+ schema:
1137
+ $ref: '#/components/schemas/Form'
1138
+ responses:
1139
+ 200:
1140
+ description: Success - return the updated form document.
1141
+ content:
1142
+ application/json:
1143
+ schema:
1144
+ $ref: '#/components/schemas/Form'
1145
+ /api/events/{eventId}/{formId}/form.zip:
1146
+ parameters:
1147
+ - $ref: '#/components/parameters/eventIdInPath'
1148
+ - $ref: '#/components/parameters/formIdInPath'
1149
+ get:
1150
+ tags: [ Event ]
1151
+ operationId: exportForm
1152
+ description: >
1153
+ Export a zip archive of the form. The zip file includes metadata and
1154
+ map symbology icons in the following layout.
1155
+ ```
1156
+ form/form.json # the form document
1157
+ icons/ # a directory that contains the form's icon image files
1158
+ icons/icon.png
1159
+ # icon for 'primary_1' primary value with no variant value
1160
+ icons/<primary_1>/icon.png
1161
+ # icon for 'primary_1' primary value with 'variant_1' variant value
1162
+ icons/<primary_1>/<variant_1>/icon.png
1163
+ # icon for 'primary_1' primary value with 'variant_2' variant value
1164
+ icons/<primary_1>/<variant_2>/icon.png
1165
+ ...
1166
+ # and so on for any combination of primary and variant field values
1167
+ # that one wishes to have a specific map icon
1168
+ icons/<primary_n>/<variant_n>/icon.png
1169
+ ```
1170
+ The `<primary_x>` and `<variant_x>` directory components above are
1171
+ named after the choice values of the form's primary and variant
1172
+ select fields, respectively. Each `primary_x/variant_x` directory
1173
+ contains the map icon image that MAGE clients will use to represent
1174
+ observations with those values on a map. MAGE clients will use the
1175
+ form's default icon image to represent primary/variant combinations
1176
+ that are not present in the `icons` directory. The requesting user
1177
+ must have `READ_EVENT_ALL` permission and an ACL entry with `read`
1178
+ permission on the event.
1179
+ responses:
1180
+ 200:
1181
+ description: >
1182
+ Success - return a zip file of the form meta-data and icons.
1183
+ content:
1184
+ application/zip:
1185
+ schema:
1186
+ type: string
1187
+ format: binary
1188
+ /api/events/{eventId}/form/icons.zip:
1189
+ parameters:
1190
+ - $ref: '#/components/parameters/eventIdInPath'
1191
+ get:
1192
+ tags: [ Event ]
1193
+ operationId: getEventIcons
1194
+ description: >
1195
+ Get a zip file containing all the map icons for the forms of an event.
1196
+ The requesting user must have `READ_EVENT_ALL` permission and an ACL
1197
+ entry with `read` permission on the event. The top level of the zip
1198
+ file will contain one directory entry, `icons/`, which contains the
1199
+ icon files under directories named according to primary and variant
1200
+ field values as described above in the `exportForm` operation.
1201
+ responses:
1202
+ 200:
1203
+ description: Success - return a zip file of icon images for the event.
1204
+ content:
1205
+ application/zip:
1206
+ schema:
1207
+ type: string
1208
+ format: binary
1209
+ /api/events/{eventId}/icons/{formId}.json:
1210
+ parameters:
1211
+ - $ref: '#/components/parameters/eventIdInPath'
1212
+ - $ref: '#/components/parameters/formIdInPath'
1213
+ get:
1214
+ tags: [ Event ]
1215
+ operationId: getFormIcons
1216
+ description: >
1217
+ Return all the icons for the specified form as base-64 strings in a
1218
+ JSON document. The requesting user must have `READ_EVENT_ALL`
1219
+ permission and an ACL entry with `read` permission on the event.
1220
+ responses:
1221
+ 200:
1222
+ description: Success - return the array of form icons.
1223
+ content:
1224
+ application/json:
1225
+ schema:
1226
+ type: array
1227
+ items:
1228
+ $ref: '#/components/schemas/FormIconEmbedded'
1229
+ /api/events/{eventId}/icons:
1230
+ parameters:
1231
+ - $ref: '#/components/parameters/eventIdInPath'
1232
+ post:
1233
+ tags: [ Event ]
1234
+ operationId: uploadEventIcon
1235
+ description: >
1236
+ Upload the default icon for the specified event. The requesting user
1237
+ must have `UPDATE_EVENT` permission and an ACL entry on the event with
1238
+ `update` permission.
1239
+ requestBody:
1240
+ $ref: '#/components/requestBodies/FormIconUpload'
1241
+ responses:
1242
+ 200:
1243
+ $ref: '#/components/responses/FormIconInfo'
1244
+ get:
1245
+ tags: [ Event ]
1246
+ operationId: getEventIcon
1247
+ description: >
1248
+ Get the default icon image for the specified event. The requesting user
1249
+ must have `READ_EVENT_ALL` permission and an ACL entry on the event with
1250
+ `read` permission.
1251
+ responses:
1252
+ 200:
1253
+ $ref: '#/components/responses/FormIconContent'
1254
+ delete:
1255
+ tags: [ Event ]
1256
+ operationId: deleteEventIcon
1257
+ description: >
1258
+ Delete the default icon from the specified event. The requesting user
1259
+ must have `UPDATE_EVENT` permission and an ACL entry on the event with
1260
+ `update` permission.
1261
+ responses:
1262
+ 204:
1263
+ description: Success - icon deleted.
1264
+ /api/events/{eventId}/icons/{formId}:
1265
+ parameters:
1266
+ - $ref: '#/components/parameters/eventIdInPath'
1267
+ - $ref: '#/components/parameters/formIdInPath'
1268
+ post:
1269
+ tags: [ Event ]
1270
+ operationId: uploadDefaultFormIcon
1271
+ description: >
1272
+ Upload the default icon for the specified form. The requesting user
1273
+ must have 'UPDATE_EVENT' permission and an ACL entry on the event with
1274
+ `update` permission.
1275
+ requestBody:
1276
+ $ref: '#/components/requestBodies/FormIconUpload'
1277
+ responses:
1278
+ 200:
1279
+ $ref: '#/components/responses/FormIconInfo'
1280
+ get:
1281
+ tags: [ Event ]
1282
+ operationId: getDefaultFormIcon
1283
+ description: >
1284
+ Get the default icon for the specified form. The requesting user must
1285
+ have `READ_EVENT_ALL` permission and an ACL entry on the event with
1286
+ `read` permission.
1287
+ responses:
1288
+ 200:
1289
+ $ref: '#/components/responses/FormIconContent'
1290
+ delete:
1291
+ tags: [ Event ]
1292
+ operationId: deleteDefaultFormIcon
1293
+ description: >
1294
+ Delete the default icon from the form. The requesting user must have
1295
+ `UPDATE_EVENT` permission and an ACL entry on the event with `update`
1296
+ permission.
1297
+ responses:
1298
+ 204:
1299
+ description: Success - icon deleted.
1300
+ /api/events/{eventId}/icons/{formId}/{primary}:
1301
+ parameters:
1302
+ - $ref: '#/components/parameters/eventIdInPath'
1303
+ - $ref: '#/components/parameters/formIdInPath'
1304
+ - $ref: '#/components/parameters/primaryFieldValueInPath'
1305
+ post:
1306
+ tags: [ Event ]
1307
+ operationId: uploadPrimaryFormIcon
1308
+ requestBody:
1309
+ $ref: '#/components/requestBodies/FormIconUpload'
1310
+ responses:
1311
+ 200:
1312
+ $ref: '#/components/responses/FormIconInfo'
1313
+ get:
1314
+ tags: [ Event ]
1315
+ operationId: getPrimaryFormIcon
1316
+ description: >
1317
+ Get the default icon for the specified form. The requesting user must
1318
+ have `READ_EVENT_ALL` permission and an ACL entry on the event with
1319
+ `read` permission.
1320
+ responses:
1321
+ 200:
1322
+ $ref: '#/components/responses/FormIconContent'
1323
+ delete:
1324
+ tags: [ Event ]
1325
+ operationId: deletePrimaryFormIcon
1326
+ description: >
1327
+ Delete the primary icon from the form. The requesting user must have
1328
+ `UPDATE_EVENT` permission and an ACL entry on the event with `update`
1329
+ permission.
1330
+ responses:
1331
+ 204:
1332
+ description: Success - icon deleted.
1333
+ /api/events/{eventId}/icons/{formId}/{primary}/{variant}:
1334
+ parameters:
1335
+ - $ref: '#/components/parameters/eventIdInPath'
1336
+ - $ref: '#/components/parameters/formIdInPath'
1337
+ - $ref: '#/components/parameters/primaryFieldValueInPath'
1338
+ - $ref: '#/components/parameters/variantFieldValueInPath'
1339
+ post:
1340
+ tags: [ Event ]
1341
+ operationId: uploadVariantFormIcon
1342
+ description: >
1343
+ Upload the icon image associated with the specified primary + variant
1344
+ field value combination.
1345
+ responses:
1346
+ 200:
1347
+ $ref: '#/components/responses/FormIconInfo'
1348
+ get:
1349
+ tags: [ Event ]
1350
+ operationId: getVariantFormIcon
1351
+ description: >
1352
+ Get the variant icon for the specified form. The requesting user must
1353
+ have `READ_EVENT_ALL` permission and an ACL entry on the event with
1354
+ `read` permission.
1355
+ responses:
1356
+ 200:
1357
+ $ref: '#/components/responses/FormIconContent'
1358
+ delete:
1359
+ tags: [ Event ]
1360
+ operationId: deleteVariantFormIcon
1361
+ description: >
1362
+ Delete the variant icon from the form. The requesting user must have
1363
+ `UPDATE_EVENT` permission and an ACL entry on the event with `update`
1364
+ permission.
1365
+ responses:
1366
+ 204:
1367
+ description: Success - icon deleted.
1368
+ /api/events/{eventId}/layers:
1369
+ parameters:
1370
+ - $ref: '#/components/parameters/eventIdInPath'
1371
+ get:
1372
+ tags: [ Layer ]
1373
+ operationId: getLayersForEvent
1374
+ description: >
1375
+ Return an array of all layers for specified event.
1376
+ The client must have 'READ_LAYER_ALL' permission of `READ_LAYER_EVENT`
1377
+ permission and an ACL entry on the event with `read` permission.
1378
+ parameters:
1379
+ - in: query
1380
+ name: type
1381
+ schema:
1382
+ type: string
1383
+ enum: [ Imagery, Feature, GeoPackage ]
1384
+ responses:
1385
+ 200:
1386
+ description: Success - return an array of layer documents for specified event.
1387
+ content:
1388
+ application/json:
1389
+ schema:
1390
+ type: array
1391
+ items:
1392
+ $ref: '#/components/schemas/Layer'
1393
+ post:
1394
+ tags: [ Event ]
1395
+ operationId: addLayerToEvent
1396
+ description: >
1397
+ Add a layer to the specified event. The requesting user must have
1398
+ `UPDATE_EVENT` permission and an ACL entry on the event with `update`
1399
+ permission.
1400
+ requestBody:
1401
+ content:
1402
+ application/json:
1403
+ schema:
1404
+ $ref: '#/components/schemas/LayerRef'
1405
+ required: true
1406
+ responses:
1407
+ 200:
1408
+ description: Success - return the updated event document.
1409
+ content:
1410
+ application/json:
1411
+ schema:
1412
+ $ref: '#/components/schemas/Event'
1413
+ /api/events/{eventId}/layers/{layerId}:
1414
+ parameters:
1415
+ - $ref: '#/components/parameters/eventIdInPath'
1416
+ - $ref: '#/components/parameters/layerIdInPath'
1417
+ get:
1418
+ tags: [ Layer ]
1419
+ description: >
1420
+ Return the layer for the event specified with the ID specified
1421
+ in the path. The requesting user must have `READ_LAYER_ALL` permission
1422
+ or `READ_LAYER_EVENT` permission and an ACL entry on the evebnt with
1423
+ `update` permission.
1424
+ operationId: getLayerForEventById
1425
+ responses:
1426
+ 200:
1427
+ description: layer response
1428
+ content:
1429
+ application/json:
1430
+ schema:
1431
+ $ref: '#/components/schemas/Layer'
1432
+ application/octet-stream:
1433
+ schema:
1434
+ type: string
1435
+ format: binary
1436
+ delete:
1437
+ tags: [ Event ]
1438
+ operationId: removeLayerFromEvent
1439
+ description: >
1440
+ Remove the specified layer from the specified event. The requesting
1441
+ user must have `UPDATE_EVENT` permission and an ACL entry on the event
1442
+ with `update` permission.
1443
+ responses:
1444
+ 200:
1445
+ description: Success - return the updated event document.
1446
+ content:
1447
+ application/json:
1448
+ schema:
1449
+ $ref: '#/components/schemas/Event'
1450
+ /api/events/{eventId}/layers/{layerId}/{tableName}:
1451
+ parameters:
1452
+ - $ref: '#/components/parameters/eventIdInPath'
1453
+ - $ref: '#/components/parameters/layerIdInPath'
1454
+ get:
1455
+ tags: [ Layer ]
1456
+ operationId: getXYZTileForGeoPackage
1457
+ description: >
1458
+ Get an XYZ map tile for the specified layer in the specified event.
1459
+ parameters:
1460
+ - in: path
1461
+ name: tableName
1462
+ description: GeoPackage table name
1463
+ required: true
1464
+ schema:
1465
+ type: string
1466
+ responses:
1467
+ 200:
1468
+ description: Success - XYZ map tile.
1469
+ content:
1470
+ image/jpeg:
1471
+ schema:
1472
+ type: string
1473
+ format: binary
1474
+ description: JPEG map tile
1475
+ pbf:
1476
+ schema:
1477
+ type: string
1478
+ format: binary
1479
+ description: Google protobuf vector tile
1480
+
1481
+ /api/events/{eventId}/users:
1482
+ parameters:
1483
+ - $ref: '#/components/parameters/eventIdInPath'
1484
+ get:
1485
+ tags: [ Event ]
1486
+ operationId: getUsersForEvent
1487
+ description: >
1488
+ Get a flat list of all the users of all the teams with access to the
1489
+ specified event. The requesting user must have `READ_EVENT_ALL`
1490
+ permission and an ACL entry on the event with `read` permission.
1491
+ responses:
1492
+ 200:
1493
+ description: Success - return an array of user documents.
1494
+ content:
1495
+ application/json:
1496
+ schema:
1497
+ type: array
1498
+ items:
1499
+ $ref: '#/components/schemas/User'
1500
+ /api/events/{eventId}/teams:
1501
+ parameters:
1502
+ - $ref: '#/components/parameters/eventIdInPath'
1503
+ post:
1504
+ tags: [ Event ]
1505
+ operationId: addTeamToEvent
1506
+ description: >
1507
+ Add a team to the specified event. The requesting user must have
1508
+ `UPDATE_EVENT` permission and an ACL entry on the event with `update`
1509
+ permission. All of the team's members will have access to the event.
1510
+ requestBody:
1511
+ description: >
1512
+ Document referencing the ID of the team to add to the event
1513
+ content:
1514
+ application/json:
1515
+ schema:
1516
+ $ref: '#/components/schemas/TeamRef'
1517
+ required: true
1518
+ responses:
1519
+ 200:
1520
+ description: Success - return the updated event.
1521
+ content:
1522
+ application/json:
1523
+ schema:
1524
+ $ref: '#/components/schemas/Event'
1525
+ get:
1526
+ tags: [ Event ]
1527
+ operationId: getTeamsForEvent
1528
+ description: >
1529
+ Get the teams with access to the specified event. The requesting user
1530
+ must have `READ_EVENT_ALL` permission and an ACL entry on the event
1531
+ with `read` permission.
1532
+ parameters:
1533
+ - in: query
1534
+ name: populate
1535
+ description: >
1536
+ The `populate` parameter is a comma-separated list of keys in the
1537
+ returned team documents to populate with their referenced documents.
1538
+ When the value of `populate` includes `users`, MAGE will populate
1539
+ the returned team documents with the user documents they reference,
1540
+ replacing the `userIds` key in each team document with `users`.
1541
+ schema:
1542
+ type: string
1543
+ enum:
1544
+ - users
1545
+ - in: query
1546
+ name: omit_event_teams
1547
+ description: >
1548
+ Whether to omit the event's implicit team that MAGE automatically
1549
+ creates for adding individual users to an event.
1550
+ schema:
1551
+ type: boolean
1552
+ - in: query
1553
+ name: term
1554
+ description: >
1555
+ Return teams whose name or description contains the given search term.
1556
+ schema:
1557
+ type: string
1558
+ responses:
1559
+ 200:
1560
+ description: Success - return an array of team documents.
1561
+ content:
1562
+ application/json:
1563
+ schema:
1564
+ type: array
1565
+ items:
1566
+ $ref: '#/components/schemas/Team'
1567
+ /api/events/{eventId}/teams/{teamId}:
1568
+ parameters:
1569
+ - $ref: '#/components/parameters/eventIdInPath'
1570
+ - $ref: '#/components/parameters/teamIdInPath'
1571
+ delete:
1572
+ tags: [ Event ]
1573
+ operationId: removeTeamFromEvent
1574
+ description: >
1575
+ Remove the specified team from the specified event. The requesting
1576
+ user must have `UPDATE_EVENT` permission and an ACL entry on the event
1577
+ with `update` permission.
1578
+ responses:
1579
+ 200:
1580
+ description: Success - return the updated team document.
1581
+ content:
1582
+ application/json:
1583
+ schema:
1584
+ $ref: '#/components/schemas/Event'
1585
+ /api/events/{eventId}/acl/{userId}:
1586
+ parameters:
1587
+ - $ref: '#/components/parameters/eventIdInPath'
1588
+ - $ref: '#/components/parameters/userIdInPath'
1589
+ put:
1590
+ tags: [ Event ]
1591
+ operationId: setUserAccessForEvent
1592
+ description: >
1593
+ Set the specified user's ACL role on the specified event. The
1594
+ requesting user must have `UPDATE_EVENT` permission and an ACL entry on
1595
+ the event with `update` permission.
1596
+ requestBody:
1597
+ $ref: '#/components/requestBodies/ACLRoleUpdate'
1598
+ responses:
1599
+ 200:
1600
+ description: Success - return the updated event document.
1601
+ content:
1602
+ application/json:
1603
+ schema:
1604
+ $ref: '#/components/schemas/Event'
1605
+ delete:
1606
+ tags: [ Event ]
1607
+ operationId: removeUserAccessFromEvent
1608
+ description: >
1609
+ Remove the specified user's ACL role from the specified event. The
1610
+ requesting user must have `UPDATE_EVENT` permission and an ACL entry on
1611
+ the event with `update` permission.
1612
+ responses:
1613
+ 200:
1614
+ description: Success - return the updated event document.
1615
+ content:
1616
+ application/json:
1617
+ schema:
1618
+ $ref: '#/components/schemas/Event'
1619
+ /api/events/{eventId}/observations/id:
1620
+ parameters:
1621
+ - $ref: '#/components/parameters/eventIdInPath'
1622
+ post:
1623
+ tags: [ Observation ]
1624
+ operationId: createObservationId
1625
+ description: >
1626
+ Generate a new observation ID with which to save a new observation.
1627
+ responses:
1628
+ 201:
1629
+ description: >
1630
+ Success - return a stub observation document including the `id`,
1631
+ `eventId`, and `url` properties.
1632
+ content:
1633
+ application/json:
1634
+ schema:
1635
+ $ref: '#/components/schemas/Observation'
1636
+ links:
1637
+ createObservation:
1638
+ operationId: saveObservation
1639
+ parameters:
1640
+ eventId: $request.path.eventId
1641
+ ovservationId: $response.body#/id
1642
+ /api/events/{eventId}/observations/{observationId}:
1643
+ parameters:
1644
+ - $ref: '#/components/parameters/eventIdInPath'
1645
+ - $ref: '#/components/parameters/observationIdInPath'
1646
+ put:
1647
+ tags: [ Observation ]
1648
+ operationId: saveObservation
1649
+ description: >
1650
+ Create or update an observation with the specified observation ID for
1651
+ the specified event. To create an observation, the requesting user
1652
+ must have `CREATE_OBSERVATION` permission and must be a member of a
1653
+ team with access to the event. To update an observation, the
1654
+ requesting user must have `UPDATE_OBSERVATION_ALL` permission, or have
1655
+ `UPDATE_OBSERVATION_EVENT` permission as well as an ACL entry on the
1656
+ event with `read` permission, or be a member of a team with access to
1657
+ the event.
1658
+ requestBody:
1659
+ description: The observation properties
1660
+ content:
1661
+ application/json:
1662
+ schema:
1663
+ $ref: '#/components/schemas/ObservationIn'
1664
+ required: true
1665
+ responses:
1666
+ 200:
1667
+ description: Success - return the updated observation.
1668
+ content:
1669
+ application/json:
1670
+ schema:
1671
+ $ref: '#/components/schemas/Observation'
1672
+ get:
1673
+ tags: [ Observation ]
1674
+ operationId: getObservationById
1675
+ description: >
1676
+ Get the specified observation in the specified event. The requesting
1677
+ user must have `READ_OBSERVATION_ALL` permission, or have
1678
+ `READ_OBSERVATION_EVENT` permission and an ACL entry on the event with
1679
+ `read` permission.
1680
+ parameters: &obsQueryParams
1681
+ - $ref: '#/components/parameters/observationQuery.fields'
1682
+ - $ref: '#/components/parameters/observationQuery.startDate'
1683
+ - $ref: '#/components/parameters/observationQuery.endDate'
1684
+ - $ref: '#/components/parameters/observationQuery.observationStartDate'
1685
+ - $ref: '#/components/parameters/observationQuery.observationEndDate'
1686
+ - $ref: '#/components/parameters/observationQuery.bbox'
1687
+ - $ref: '#/components/parameters/observationQuery.geometry'
1688
+ - $ref: '#/components/parameters/observationQuery.states'
1689
+ - $ref: '#/components/parameters/observationQuery.sort'
1690
+ responses:
1691
+ 200:
1692
+ description: observation response
1693
+ content:
1694
+ application/json:
1695
+ schema:
1696
+ $ref: '#/components/schemas/Observation'
1697
+ /api/events/{eventId}/observations/{observationId}.zip:
1698
+ parameters:
1699
+ - $ref: '#/components/parameters/eventIdInPath'
1700
+ - $ref: '#/components/parameters/observationIdInPath'
1701
+ get:
1702
+ tags: [ Observation ]
1703
+ operationId: getObservationArchive
1704
+ description: >
1705
+ Get a zip archive of the specified observation content. The requesting
1706
+ user must have `READ_OBSERVATION_ALL` permission, or have
1707
+ `READ_OBSERVATION_EVENT` permission and an ACL entry on the event with
1708
+ `read` permission. The returned archive contains an entry named
1709
+ `<observation_id>/index.html`, as well as related resources for any
1710
+ media attached to the observation.
1711
+ responses:
1712
+ 200:
1713
+ description: Success - return the observation zip archive.
1714
+ content:
1715
+ application/zip:
1716
+ schema:
1717
+ type: string
1718
+ format: binary
1719
+ /api/events/{eventId}/observations:
1720
+ parameters:
1721
+ - $ref: '#/components/parameters/eventIdInPath'
1722
+ get:
1723
+ tags: [ Observation ]
1724
+ description: >
1725
+ Get all the observations for the specified event that match the
1726
+ specified query parameters. The requesting user must have
1727
+ `READ_OBSERVATION_ALL` permission, or have `READ_OBSERVATION_EVENT`
1728
+ permission and an ACL entry on the event with `read` permission.
1729
+ operationId: getObservationsForEvent
1730
+ # this used to be simply
1731
+ # parameters: *obsQueryParams
1732
+ # referencing above, instead of the duplicated parameter array, but with
1733
+ # the update to js-yaml 4.1.x through openapi-enforcer, yaml anchors seem
1734
+ # to be broken
1735
+ parameters:
1736
+ - $ref: '#/components/parameters/observationQuery.fields'
1737
+ - $ref: '#/components/parameters/observationQuery.startDate'
1738
+ - $ref: '#/components/parameters/observationQuery.endDate'
1739
+ - $ref: '#/components/parameters/observationQuery.observationStartDate'
1740
+ - $ref: '#/components/parameters/observationQuery.observationEndDate'
1741
+ - $ref: '#/components/parameters/observationQuery.bbox'
1742
+ - $ref: '#/components/parameters/observationQuery.geometry'
1743
+ - $ref: '#/components/parameters/observationQuery.states'
1744
+ - $ref: '#/components/parameters/observationQuery.sort'
1745
+ responses:
1746
+ 200:
1747
+ description: >
1748
+ Success - return the observation documents matching the query.
1749
+ content:
1750
+ application/json:
1751
+ schema:
1752
+ type: array
1753
+ items:
1754
+ $ref: '#/components/schemas/Observation'
1755
+ /api/events/{eventId}/observations/{observationId}/favorite:
1756
+ parameters:
1757
+ - $ref: '#/components/parameters/eventIdInPath'
1758
+ - $ref: '#/components/parameters/observationIdInPath'
1759
+ put:
1760
+ tags: [ Observation ]
1761
+ operationId: addObservationFavorite
1762
+ description: >
1763
+ Mark the specified observation as a favorite of the requesting user by
1764
+ adding the user's ID to the `favoriteUserIds` array on the observation.
1765
+ The requesting user must have `UPDATE_OBSERVATION_ALL` permission, or
1766
+ have `UPDATE_OBSERVATION_EVENT` permission and an ACL entry on the
1767
+ event with `read` permission.
1768
+ responses:
1769
+ 200:
1770
+ description: Success - return the updated observation.
1771
+ content:
1772
+ application/json:
1773
+ schema:
1774
+ $ref: '#/components/schemas/Observation'
1775
+ delete:
1776
+ tags: [ Observation ]
1777
+ operationId: removeObservationFavorite
1778
+ description: >
1779
+ Remove the requesting user's ID from the `favoriteUserIds` of the
1780
+ specified observation. The requesting user must have
1781
+ `UPDATE_OBSERVATION_ALL` permission, or have `UPDATE_OBSERVATION_EVENT`
1782
+ permission and an ACL entry on the event with `read` permission.
1783
+ responses:
1784
+ 200:
1785
+ description: Success - return the updated observation.
1786
+ content:
1787
+ application/json:
1788
+ schema:
1789
+ $ref: '#/components/schemas/Observation'
1790
+ /api/events/{eventId}/observations/{observationId}/important:
1791
+ parameters:
1792
+ - $ref: '#/components/parameters/eventIdInPath'
1793
+ - $ref: '#/components/parameters/observationIdInPath'
1794
+ put:
1795
+ tags: [ Observation ]
1796
+ operationId: setObservationImportant
1797
+ description: >
1798
+ Mark the specified observation as important. This operation allows
1799
+ administrators and event managers to flag important observations for
1800
+ all users with access to the event. The requesting user must have
1801
+ `UPDATE_EVENT` permission and an ACL entry on the event with `update`
1802
+ permission.
1803
+ requestBody:
1804
+ content:
1805
+ application/json:
1806
+ schema:
1807
+ $ref: '#/components/schemas/ObservationImportantCreate'
1808
+ required: true
1809
+ responses:
1810
+ 200:
1811
+ description: Success - return the updated observation.
1812
+ content:
1813
+ application/json:
1814
+ schema:
1815
+ $ref: '#/components/schemas/Observation'
1816
+ delete:
1817
+ tags: [ Observation ]
1818
+ operationId: removeObservationImportant
1819
+ description: >
1820
+ Remove the important flag from the specified observation. The
1821
+ requesting user must have `UPDATE_EVENT` permission and an ACL entry on
1822
+ the event with `update` permission.
1823
+ responses:
1824
+ 200:
1825
+ description: Success - return the updated observation.
1826
+ content:
1827
+ application/json:
1828
+ schema:
1829
+ $ref: '#/components/schemas/Observation'
1830
+ /api/events/{eventId}/observations/{observationId}/states:
1831
+ parameters:
1832
+ - $ref: '#/components/parameters/eventIdInPath'
1833
+ - $ref: '#/components/parameters/observationIdInPath'
1834
+ post:
1835
+ tags: [ Observation ]
1836
+ operationId: addObservationState
1837
+ description: >
1838
+ Set the current state of the specified observation. The state is
1839
+ appended to a list of states on the observation, the head of which is
1840
+ the current state. The requesting user must be the user that created
1841
+ the observation, have `UPDATE_EVENT` permission, or have an ACL entry on
1842
+ the event with `update` permission.
1843
+ requestBody:
1844
+ description: >
1845
+ The request body contains the name of the state to set on the
1846
+ target observation.
1847
+ content:
1848
+ application/json:
1849
+ schema:
1850
+ $ref: '#/components/schemas/ObservationStateCreate'
1851
+ required: true
1852
+ responses:
1853
+ 201:
1854
+ description: Success - return the added state document.
1855
+ content:
1856
+ application/json:
1857
+ schema:
1858
+ $ref: '#/components/schemas/ObservationState'
1859
+ /api/events/{eventId}/observations/{observationId}/attachments:
1860
+ parameters:
1861
+ - $ref: '#/components/parameters/eventIdInPath'
1862
+ - $ref: '#/components/parameters/observationIdInPath'
1863
+ post:
1864
+ tags: [ Observation ]
1865
+ operationId: addAttachment
1866
+ description: >
1867
+ Add the given attachment to the specified observation. The requesting
1868
+ user must have `UPDATE_OBSERVATION_ALL` permission, or have
1869
+ `UPDATE_OBSERVATION_EVENT` permission and an ACL entry on the event
1870
+ with `read` permission.
1871
+ requestBody:
1872
+ content:
1873
+ multipart/form-data:
1874
+ schema:
1875
+ type: object
1876
+ properties:
1877
+ attachment:
1878
+ type: string
1879
+ format: binary
1880
+ required:
1881
+ - attachment
1882
+ required: true
1883
+ responses:
1884
+ 200:
1885
+ description: Success - return the attachment descriptor.
1886
+ content:
1887
+ application/json:
1888
+ schema:
1889
+ $ref: '#/components/schemas/Attachment'
1890
+ get:
1891
+ tags: [ Observation ]
1892
+ operationId: getAttachments
1893
+ description: >
1894
+ Get the attachment descriptors for the specified observation. The
1895
+ requesting user must have `READ_OBSERVATION_ALL` permission, or have
1896
+ `READ_OBSERVATION_EVENT` permission and an ACL entry on the event with
1897
+ `read` permission.
1898
+ responses:
1899
+ 200:
1900
+ description: Success - return an array of attachment descriptors.
1901
+ content:
1902
+ application/octet-stream:
1903
+ schema:
1904
+ type: array
1905
+ items:
1906
+ $ref: '#/components/schemas/Attachment'
1907
+ /api/events/{eventId}/observations/{observationId}/attachments/{attachmentId}:
1908
+ parameters:
1909
+ - $ref: '#/components/parameters/eventIdInPath'
1910
+ - $ref: '#/components/parameters/observationIdInPath'
1911
+ - $ref: '#/components/parameters/attachmentIdInPath'
1912
+ put:
1913
+ tags: [ Observation ]
1914
+ operationId: updateAttachment
1915
+ description: >
1916
+ Update the specified attachment for the specified observation. The
1917
+ requesting user must have `UPDATE_OBSERVATION_ALL` permission, or have
1918
+ `UPDATE_OBSERVATION_EVENT` permission and an ACL entry on the event
1919
+ with `read` permission.
1920
+ requestBody:
1921
+ content:
1922
+ multipart/form-data:
1923
+ schema:
1924
+ type: object
1925
+ properties:
1926
+ attachment:
1927
+ type: string
1928
+ format: binary
1929
+ required: [ attachment ]
1930
+ required: true
1931
+ responses:
1932
+ 200:
1933
+ description: Success - return the updated attachment descriptor.
1934
+ content:
1935
+ application/json:
1936
+ schema:
1937
+ $ref: '#/components/schemas/Attachment'
1938
+ get:
1939
+ tags: [ Observation ]
1940
+ operationId: getAttachment
1941
+ description: >
1942
+ Get the specified attachment content. This operation returns the
1943
+ actual bytes of the attachment, not the attachment descriptor document.
1944
+ The requesting user must have `READ_OBSERVATION_ALL` permission, or have
1945
+ `READ_OBSERVATION_EVENT` permission and an ACL entry on the event with
1946
+ `read` permission.
1947
+ responses:
1948
+ 200:
1949
+ description: attachment response
1950
+ content:
1951
+ '*/*':
1952
+ schema:
1953
+ type: string
1954
+ format: binary
1955
+ delete:
1956
+ tags: [ Observation ]
1957
+ operationId: deleteAttachment
1958
+ description: >
1959
+ Delete the specified attachment from the specified observation. The
1960
+ requesting user must be the user that created the observation, have
1961
+ `UPDATE_EVENT` permission, or have an ACL entry on the event with
1962
+ `update` permission.
1963
+ responses:
1964
+ 204:
1965
+ description: Success - the attachment was deleted.
1966
+
1967
+ /api/events/{eventId}/feeds:
1968
+ parameters:
1969
+ - $ref: '#/components/parameters/eventIdInPath'
1970
+ get:
1971
+ tags: [ Feed ]
1972
+ operationId: listEventFeeds
1973
+ description: >
1974
+ Get a list of feeds associated with an event. Requires the
1975
+ `READ_EVENT_USER` permission.
1976
+ summary: Get feeds by event.
1977
+ responses:
1978
+ 200:
1979
+ description: Success - return an array of feed documents.
1980
+ content:
1981
+ application/json:
1982
+ schema:
1983
+ type: array
1984
+ items:
1985
+ $ref: '#/components/schemas/Feed'
1986
+ 403:
1987
+ description: Permission denied
1988
+ content:
1989
+ application/json:
1990
+ schema:
1991
+ type: object
1992
+ 404:
1993
+ description: Event not found
1994
+ content:
1995
+ application/json:
1996
+ schema:
1997
+ type: string
1998
+ post:
1999
+ tags: [ Feed ]
2000
+ operationId: addFeedToEvent
2001
+ description: >
2002
+ Add a feed to an event. Requires the `UPDATE_EVENT` permission.
2003
+ summary: Add a feed to an event.
2004
+ requestBody:
2005
+ description: >
2006
+ Event id and feed id to connect.
2007
+ content:
2008
+ application/json:
2009
+ schema:
2010
+ $ref: '#/components/schemas/FeedAddToEvent'
2011
+ required: true
2012
+ responses:
2013
+ 200:
2014
+ description: Success
2015
+ content:
2016
+ application/json:
2017
+ schema:
2018
+ $ref: '#/components/schemas/MageEvent'
2019
+ 400:
2020
+ description: Missing feed id
2021
+ content:
2022
+ application/json:
2023
+ schema:
2024
+ type: string
2025
+ 403:
2026
+ description: Permission denied
2027
+ content:
2028
+ application/json:
2029
+ schema:
2030
+ type: object
2031
+ 404:
2032
+ description: Event not found
2033
+ content:
2034
+ application/json:
2035
+ schema:
2036
+ type: string
2037
+ /api/events/{eventId}/feeds/{feedId}:
2038
+ parameters:
2039
+ - $ref: '#/components/parameters/eventIdInPath'
2040
+ - $ref: '#/components/parameters/feedIdInPath'
2041
+ delete:
2042
+ tags: [ Feed ]
2043
+ operationId: removeFeedFromEvent
2044
+ description: >
2045
+ Remove a feed from an event. Requires the `UPDATE_EVENT` permission.
2046
+ summary: Remove a feed from an event.
2047
+ responses:
2048
+ 200:
2049
+ description: Success
2050
+ content:
2051
+ application/json:
2052
+ schema: { $ref: '#/components/schemas/Feed' }
2053
+ 403:
2054
+ description: Permission denied
2055
+ content:
2056
+ application/json:
2057
+ schema:
2058
+ type: object
2059
+ 404:
2060
+ description: Event not found
2061
+ content:
2062
+ application/json:
2063
+ schema:
2064
+ type: string
2065
+ /api/events/{eventId}/feeds/{feedId}/content:
2066
+ parameters:
2067
+ - $ref: '#/components/parameters/eventIdInPath'
2068
+ - $ref: '#/components/parameters/feedIdInPath'
2069
+ post:
2070
+ tags: [ Feed ]
2071
+ operationId: fetchFeedContent
2072
+ description: >
2073
+ Fetch feed content. Requires the `READ_EVENT_USER` permission.
2074
+ summary: Get a feeds content.
2075
+ requestBody:
2076
+ description: Variable params.
2077
+ content:
2078
+ application/json:
2079
+ schema:
2080
+ $ref: '#/components/schemas/JsonObject'
2081
+ responses:
2082
+ 200:
2083
+ description: Success
2084
+ content:
2085
+ application/json:
2086
+ schema:
2087
+ $ref: '#/components/schemas/FeedContent'
2088
+ 403:
2089
+ description: Permission denied
2090
+ content:
2091
+ application/json:
2092
+ schema:
2093
+ type: object
2094
+ 404:
2095
+ description: Event not found
2096
+ content:
2097
+ application/json:
2098
+ schema:
2099
+ type: string
2100
+ /api/feeds/service_types:
2101
+ get:
2102
+ tags: [ Feed ]
2103
+ operationId: listFeedServiceTypes
2104
+ description: >
2105
+ Get a list of feed service types. Requires the `FEEDS_LIST_SERVICE_TYPES` permission.
2106
+ summary: Get a list of feed service types.
2107
+ responses:
2108
+ 200:
2109
+ description: Success
2110
+ content:
2111
+ application/json:
2112
+ schema:
2113
+ type: array
2114
+ items:
2115
+ $ref: '#/components/schemas/FeedServiceTypeDescriptor'
2116
+ 403:
2117
+ description: Permission denied
2118
+ content:
2119
+ application/json:
2120
+ schema:
2121
+ type: object
2122
+ /api/feeds/service_types/{feedServiceTypeId}/topic_preview:
2123
+ parameters:
2124
+ - $ref: '#/components/parameters/feedServiceTypeIdInPath'
2125
+ post:
2126
+ tags: [ Feed ]
2127
+ operationId: previewFeedTopics
2128
+ description: >
2129
+ Preview feed topics. Requires the `FEEDS_CREATE_SERVICE` permission.
2130
+ summary: Preview a feeds topic.
2131
+ requestBody:
2132
+ description: Service config.
2133
+ content:
2134
+ application/json:
2135
+ schema:
2136
+ $ref: '#/components/schemas/ServiceConfig'
2137
+ responses:
2138
+ 200:
2139
+ description: Success
2140
+ content:
2141
+ application/json:
2142
+ schema:
2143
+ type: array
2144
+ items:
2145
+ $ref: '#/components/schemas/FeedTopic'
2146
+ 403:
2147
+ description: Permission denied
2148
+ content:
2149
+ application/json:
2150
+ schema:
2151
+ type: object
2152
+ 404:
2153
+ description: Feed service type not found
2154
+ content:
2155
+ application/json:
2156
+ schema:
2157
+ type: object
2158
+ /api/feeds/services:
2159
+ post:
2160
+ tags: [ Feed ]
2161
+ operationId: createFeedService
2162
+ description: >
2163
+ Create a feed service. Requires the `FEEDS_CREATE_SERVICE` permission.
2164
+ summary: Create a feed service.
2165
+ requestBody:
2166
+ content:
2167
+ application/json:
2168
+ schema:
2169
+ $ref: '#/components/schemas/CreateFeedService'
2170
+ responses:
2171
+ 201:
2172
+ description: Success
2173
+ content:
2174
+ application/json:
2175
+ schema:
2176
+ $ref: '#/components/schemas/FeedService'
2177
+ 403:
2178
+ description: Permission denied
2179
+ content:
2180
+ application/json:
2181
+ schema:
2182
+ type: object
2183
+ get:
2184
+ tags: [ Feed ]
2185
+ operationId: listFeedServices
2186
+ description: >
2187
+ List all feed services. Requires the `FEEDS_LIST_SERVICES` permission.
2188
+ summary: Get a list of feed services.
2189
+ responses:
2190
+ 200:
2191
+ description: Success
2192
+ content:
2193
+ application/json:
2194
+ schema:
2195
+ type: array
2196
+ items:
2197
+ $ref: '#/components/schemas/FeedService'
2198
+ 403:
2199
+ description: Permission denied
2200
+ content:
2201
+ application/json:
2202
+ schema:
2203
+ type: object
2204
+ /api/feeds/services/{feedServiceId}/topics:
2205
+ parameters:
2206
+ - $ref: '#/components/parameters/feedServiceIdInPath'
2207
+ get:
2208
+ tags: [ Feed ]
2209
+ operationId: listFeedServiceTopics
2210
+ description: >
2211
+ List feed service topics. Requires `FEEDS_LIST_TOPICS` permission.
2212
+ summary: Get a list of feed service topics.
2213
+ responses:
2214
+ 200:
2215
+ description: Success
2216
+ content:
2217
+ application/json:
2218
+ schema:
2219
+ type: array
2220
+ items:
2221
+ $ref: '#/components/schemas/FeedTopic'
2222
+ 403:
2223
+ description: Permission denied
2224
+ content:
2225
+ application/json:
2226
+ schema:
2227
+ type: object
2228
+ 404:
2229
+ description: Feed service not found
2230
+ content:
2231
+ application/json:
2232
+ schema:
2233
+ type: object
2234
+ /api/feeds/services/{feedServiceId}/topics/{feedTopicId}/feed_preview:
2235
+ parameters:
2236
+ - $ref: '#/components/parameters/feedServiceIdInPath'
2237
+ - $ref: '#/components/parameters/feedTopicIdInPath'
2238
+ post:
2239
+ tags: [ Feed ]
2240
+ operationId: previewFeedServiceTopic
2241
+ description: >
2242
+ Preview feed service topic. Requires `FEEDS_CREATE_FEED` permission.
2243
+ summary: Get a preview of a feed service topic.
2244
+ requestBody:
2245
+ content:
2246
+ application/json:
2247
+ schema:
2248
+ $ref: '#/components/schemas/PreviewFeedRequest'
2249
+ responses:
2250
+ 200:
2251
+ description: Success
2252
+ content:
2253
+ application/json:
2254
+ schema:
2255
+ $ref: '#/components/schemas/FeedPreview'
2256
+ 403:
2257
+ description: Permission denied
2258
+ content:
2259
+ application/json:
2260
+ schema:
2261
+ type: object
2262
+ 404:
2263
+ description: Feed service or feed topic not found
2264
+ content:
2265
+ application/json:
2266
+ schema:
2267
+ type: object
2268
+ /api/feeds/services/{feedServiceId}/topics/{feedTopicId}/feeds:
2269
+ parameters:
2270
+ - $ref: '#/components/parameters/feedServiceIdInPath'
2271
+ - $ref: '#/components/parameters/feedTopicIdInPath'
2272
+ post:
2273
+ tags: [ Feed ]
2274
+ operationId: createFeed
2275
+ description: >
2276
+ Create feed. Requires the `FEEDS_CREATE_FEED` permission.
2277
+ summary: Create a new feed.
2278
+ requestBody:
2279
+ content:
2280
+ application/json:
2281
+ schema:
2282
+ $ref: '#/components/schemas/Feed'
2283
+ responses:
2284
+ 201:
2285
+ description: Success
2286
+ content:
2287
+ application/json:
2288
+ schema:
2289
+ $ref: '#/components/schemas/Feed'
2290
+ 403:
2291
+ description: Permission denied
2292
+ content:
2293
+ application/json:
2294
+ schema:
2295
+ type: object
2296
+ 404:
2297
+ description: Entity not found
2298
+ /api/feeds/{feedServiceId}/feeds:
2299
+ parameters:
2300
+ - $ref: '#/components/parameters/feedServiceIdInPath'
2301
+ get:
2302
+ tags: [ Feed ]
2303
+ operationId: listServiceFeeds
2304
+ description: >
2305
+ List service feeds. Requires the `FEEDS_LIST_ALL` permission.
2306
+ summary: Get a list of service feeds.
2307
+ responses:
2308
+ 200:
2309
+ description: Success
2310
+ content:
2311
+ application/json:
2312
+ schema:
2313
+ type: array
2314
+ items:
2315
+ $ref: '#/components/schemas/Feed'
2316
+ 403:
2317
+ description: Permission denied
2318
+ content:
2319
+ application/json:
2320
+ schema:
2321
+ type: object
2322
+ 404:
2323
+ description: Feed service not found
2324
+ /api/feeds/services/{feedServiceId}:
2325
+ parameters:
2326
+ - $ref: '#/components/parameters/feedServiceIdInPath'
2327
+ get:
2328
+ tags: [ Feed ]
2329
+ operationId: getFeedService
2330
+ description: >
2331
+ Get a feed service. Requires `FEEDS_LIST_SERVICES` permission.
2332
+ summary: Get a feed service.
2333
+ responses:
2334
+ 200:
2335
+ description: Success
2336
+ content:
2337
+ application/json:
2338
+ schema:
2339
+ $ref: '#/components/schemas/FeedService'
2340
+ 403:
2341
+ description: Permission denied
2342
+ content:
2343
+ application/json:
2344
+ schema:
2345
+ type: object
2346
+ 404:
2347
+ description: Feed service not found
2348
+ delete:
2349
+ tags: [ Feed ]
2350
+ operationId: deleteFeedService
2351
+ description: >
2352
+ Delete a feed service. Requires the `FEEDS_CREATE_SERVICE` permission.
2353
+ summary: Delete a feed service.
2354
+ responses:
2355
+ 200:
2356
+ description: Success
2357
+ content:
2358
+ text/plain:
2359
+ schema:
2360
+ type: string
2361
+ 403:
2362
+ description: Permission denied
2363
+ content:
2364
+ application/json:
2365
+ schema:
2366
+ type: object
2367
+ 404:
2368
+ description: Feed service not found.
2369
+ /api/feeds:
2370
+ get:
2371
+ tags: [ Feed ]
2372
+ operationId: listAllFeeds
2373
+ description: >
2374
+ List all feeds. Requires `FEEDS_LIST_ALL` permission.
2375
+ summary: Get a list of feeds.
2376
+ responses:
2377
+ 200:
2378
+ description: Success
2379
+ content:
2380
+ application/json:
2381
+ schema:
2382
+ type: array
2383
+ items:
2384
+ $ref: '#/components/schemas/Feed'
2385
+ 403:
2386
+ description: Permission denied
2387
+ content:
2388
+ application/json:
2389
+ schema:
2390
+ type: object
2391
+ /api/feeds/service_types/{feedServiceTypeId}:
2392
+ parameters:
2393
+ - $ref: '#/components/parameters/feedServiceTypeIdInPath'
2394
+ get:
2395
+ tags: [ Feed ]
2396
+ operationId: getServiceType
2397
+ description: >
2398
+ Get a service type by id. Requires `FEEDS_LIST_SERVICE_TYPES` permission.
2399
+ summary: Get a service type by id.
2400
+ responses:
2401
+ 200:
2402
+ description: Success
2403
+ content:
2404
+ application/json:
2405
+ schema:
2406
+ $ref: '#/components/schemas/FeedServiceTypeDescriptor'
2407
+ 403:
2408
+ description: Permission denied
2409
+ content:
2410
+ application/json:
2411
+ schema:
2412
+ type: object
2413
+ 404:
2414
+ description: Feed service type not found.
2415
+ /api/feeds/services/{feedServiceId}/topics/{feedTopicId}:
2416
+ parameters:
2417
+ - $ref: '#/components/parameters/feedServiceIdInPath'
2418
+ - $ref: '#/components/parameters/feedTopicIdInPath'
2419
+ get:
2420
+ tags: [ Feed ]
2421
+ operationId: getFeedTopic
2422
+ description: >
2423
+ Get a feed topic by id. Requires `FEEDS_LIST_TOPICS` permission.
2424
+ summary: Get a feed topic.
2425
+ responses:
2426
+ 200:
2427
+ description: Success
2428
+ content:
2429
+ application/json:
2430
+ schema:
2431
+ $ref: '#/components/schemas/FeedTopic'
2432
+ 403:
2433
+ description: Permission denied
2434
+ content:
2435
+ application/json:
2436
+ schema:
2437
+ type: object
2438
+ 404:
2439
+ description: Feed service or feed topic not found.
2440
+ /api/feeds/{feedId}:
2441
+ parameters:
2442
+ - $ref: '#/components/parameters/feedIdInPath'
2443
+ get:
2444
+ tags: [ Feed ]
2445
+ operationId: getFeedById
2446
+ description: >
2447
+ Get a feed by id. Requires `FEEDS_LIST_ALL` permission.
2448
+ summary: Get a feed.
2449
+ responses:
2450
+ 200:
2451
+ description: Success
2452
+ content:
2453
+ application/json:
2454
+ schema:
2455
+ $ref: '#/components/schemas/Feed'
2456
+ 403:
2457
+ description: Permission denied
2458
+ content:
2459
+ application/json:
2460
+ schema:
2461
+ type: object
2462
+ 404:
2463
+ description: Feed not found
2464
+ put:
2465
+ tags: [ Feed ]
2466
+ operationId: updateFeed
2467
+ description: >
2468
+ Update a feed. Requires the `FEEDS_CREATE_FEED` permssion.
2469
+ summary: Update a feed.
2470
+ requestBody:
2471
+ content:
2472
+ application/json:
2473
+ schema:
2474
+ $ref: '#/components/schemas/Feed'
2475
+ responses:
2476
+ 200:
2477
+ description: Success
2478
+ content:
2479
+ application/json:
2480
+ schema:
2481
+ $ref: '#/components/schemas/Feed'
2482
+ 403:
2483
+ description: Permission denied
2484
+ content:
2485
+ application/json:
2486
+ schema:
2487
+ type: object
2488
+ delete:
2489
+ tags: [ Feed ]
2490
+ operationId: deleteFeed
2491
+ description: >
2492
+ Delete a feed by id. Requires the `FEEDS_CREATE_FEED` permssion.
2493
+ summary: Delete a feed.
2494
+ responses:
2495
+ 200:
2496
+ description: Success
2497
+ content:
2498
+ text/plain:
2499
+ schema:
2500
+ type: string
2501
+
2502
+ /api/icons/{iconId}/content:
2503
+ parameters:
2504
+ - $ref: '#/components/parameters/iconIdInPath'
2505
+ get:
2506
+ tags: [ Icon ]
2507
+ operationId: getIconContent
2508
+ summary: Get an icons content.
2509
+ responses:
2510
+ 200:
2511
+ description: Success
2512
+ content:
2513
+ application/json:
2514
+ schema:
2515
+ $ref: '#/components/schemas/StaticIconWithContent'
2516
+ 404:
2517
+ description: Icon not found
2518
+ /api/icons/{iconId}:
2519
+ parameters:
2520
+ - $ref: '#/components/parameters/iconIdInPath'
2521
+ get:
2522
+ tags: [ Icon ]
2523
+ operationId: getIconById
2524
+ summary: Get an icon.
2525
+ responses:
2526
+ 200:
2527
+ description: Success
2528
+ content:
2529
+ application/json:
2530
+ schema:
2531
+ $ref: '#/components/schemas/StaticIcon'
2532
+ 404:
2533
+ description: Icon not found
2534
+ /api/icons:
2535
+ get:
2536
+ tags: [ Icon ]
2537
+ operationId: getIcons
2538
+ summary: Get all icons
2539
+ parameters:
2540
+ - in: query
2541
+ name: source_url
2542
+ schema:
2543
+ type: string
2544
+ - in: query
2545
+ name: page_size
2546
+ schema:
2547
+ type: integer
2548
+ - in: query
2549
+ name: page
2550
+ schema:
2551
+ type: integer
2552
+ - in: query
2553
+ name: search
2554
+ schema:
2555
+ type: string
2556
+ responses:
2557
+ 200:
2558
+ description: Success
2559
+ content:
2560
+ application/json:
2561
+ schema:
2562
+ $ref: '#/components/schemas/PageOfStaticIcons'
2563
+
2564
+ /api/layers:
2565
+ get:
2566
+ tags: [ Layer ]
2567
+ operationId: getLayers
2568
+ description: >
2569
+ Return an array of all layers. The client must have 'READ_LAYER_ALL' permission.
2570
+ parameters:
2571
+ - in: query
2572
+ name: type
2573
+ schema:
2574
+ type: string
2575
+ enum: [ Imagery, Feature, GeoPackage ]
2576
+ responses:
2577
+ 200:
2578
+ description: Success - return an array of layer documents.
2579
+ content:
2580
+ application/json:
2581
+ schema:
2582
+ type: array
2583
+ items:
2584
+ $ref: '#/components/schemas/Layer'
2585
+ post:
2586
+ tags: [ Layer ]
2587
+ operationId: createLayer
2588
+ description: >
2589
+ Create a new layer. The requesting user must have `CREATE_LAYER`
2590
+ permission.
2591
+ requestBody:
2592
+ description: The new layer document
2593
+ content:
2594
+ application/json:
2595
+ schema:
2596
+ $ref: '#/components/schemas/LayerCreate'
2597
+ required: true
2598
+ responses:
2599
+ 201:
2600
+ description: Success - return the created event.
2601
+ content:
2602
+ application/json:
2603
+ schema:
2604
+ $ref: '#/components/schemas/Layer'
2605
+ /api/layers/count:
2606
+ get:
2607
+ tags: [ Layer ]
2608
+ operationId: getLayerCount
2609
+ description: Return the number of layers in the database.
2610
+ responses:
2611
+ 200:
2612
+ description: Success - return the layer count
2613
+ content:
2614
+ application/json:
2615
+ schema:
2616
+ $ref: '#/components/schemas/Count'
2617
+ /api/layers/{layerId}:
2618
+ parameters:
2619
+ - { $ref: '#/components/parameters/layerIdInPath' }
2620
+ get:
2621
+ tags: [ Layer ]
2622
+ description: >
2623
+ Return the layer with the ID specified in the path. The requesting
2624
+ user must have `READ_LAYER_ALL` permission.
2625
+ operationId: getLayerById
2626
+ responses:
2627
+ 200:
2628
+ description: layer response
2629
+ content:
2630
+ application/json:
2631
+ schema:
2632
+ $ref: '#/components/schemas/Layer'
2633
+ application/octet-stream:
2634
+ schema:
2635
+ type: string
2636
+ format: binary
2637
+ put:
2638
+ tags: [ Layer ]
2639
+ operationId: updateLayerById
2640
+ description: >
2641
+ Update the layer with the ID specified in the path. The requesting
2642
+ user must have `UPDATE_LAYER` permission
2643
+ requestBody:
2644
+ description: layer update body
2645
+ content:
2646
+ application/json:
2647
+ schema:
2648
+ $ref: '#/components/schemas/LayerCreate'
2649
+ required: true
2650
+ responses:
2651
+ 200:
2652
+ description: Success - return the update layer document.
2653
+ content:
2654
+ application/json:
2655
+ schema:
2656
+ $ref: '#/components/schemas/Layer'
2657
+ delete:
2658
+ tags: [ Layer ]
2659
+ operationId: deleteLayer
2660
+ description: >
2661
+ Delete the event with the ID specified in the path. The requesting
2662
+ user must have `DELETE_LAYER`.
2663
+ responses:
2664
+ 204:
2665
+ description: Success - layer deleted
2666
+ /api/layers/{layerId}/features:
2667
+ parameters:
2668
+ - { $ref: '#/components/parameters/layerIdInPath' }
2669
+ get:
2670
+ tags: [ Layer ]
2671
+ operationId: getFeaturesForLayer
2672
+ description: >
2673
+ Return an array of features for specified layer.
2674
+ The requesting client must have `READ_LAYER_ALL`.
2675
+ responses:
2676
+ 200:
2677
+ description: Success - return an arrary of features.
2678
+ content:
2679
+ application/json:
2680
+ schema:
2681
+ type: array
2682
+ items:
2683
+ $ref: 'geojson.yaml#/definitions/feature'
2684
+ /api/events/{eventId}/layers/{layerId}/features:
2685
+ parameters:
2686
+ - { $ref: '#/components/parameters/eventIdInPath' }
2687
+ - { $ref: '#/components/parameters/layerIdInPath' }
2688
+ get:
2689
+ tags: [ Layer ]
2690
+ operationId: getFeaturesForEventAndLayer
2691
+ description: >
2692
+ Return an array of features for specified layer for specified event.
2693
+ The requesting client must have `READ_LAYER_ALL` permission or
2694
+ `READ_LAYER_EVENT` and an ACL entry on the event with `read` permission.
2695
+ responses:
2696
+ 200:
2697
+ description: Success - return an arrary of features.
2698
+ content:
2699
+ application/json:
2700
+ schema:
2701
+ type: array
2702
+ items:
2703
+ $ref: 'geojson.yaml#/definitions/feature'
2704
+ /api/events/{eventId}/locations:
2705
+ parameters:
2706
+ - { $ref: '#/components/parameters/eventIdInPath' }
2707
+ get:
2708
+ tags: [ Location ]
2709
+ operationId: getLocations
2710
+ description: >
2711
+ Return an array of locations for the specified event.
2712
+ The requesting client must have `READ_LOCATION_ALL` permission or
2713
+ `READ_LOCATION_EVENT` and an ACL entry on the event with `read` permission.
2714
+ parameters:
2715
+ - name: startDate
2716
+ in: query
2717
+ schema:
2718
+ type: string
2719
+ format: date-time
2720
+ - name: endDate
2721
+ in: query
2722
+ schema:
2723
+ type: string
2724
+ format: date-time
2725
+ - name: lastLocationId
2726
+ in: query
2727
+ description: locationId of last item in previous page (paging)
2728
+ schema:
2729
+ type: string
2730
+ - name: limit
2731
+ in: query
2732
+ description: limit locations (paging)
2733
+ schema:
2734
+ type: number
2735
+ responses:
2736
+ 200:
2737
+ description: Success - array of user locations.
2738
+ content:
2739
+ application/json:
2740
+ schema:
2741
+ type: array
2742
+ items:
2743
+ $ref: 'geojson.yaml#/definitions/feature'
2744
+ post:
2745
+ tags: [ Location ]
2746
+ operationId: createLocation
2747
+ description: >
2748
+ Create a new location for user with token in the specified event.
2749
+ The requesting client must have `CREATE_LOCATION` permission.
2750
+ requestBody:
2751
+ description: create location response
2752
+ content:
2753
+ application/json:
2754
+ schema:
2755
+ $ref: 'geojson.yaml#/definitions/feature'
2756
+ required: true
2757
+ responses:
2758
+ 200:
2759
+ description: Success - the created location document.
2760
+ /api/events/{eventId}/locations/users:
2761
+ parameters:
2762
+ - { $ref: '#/components/parameters/eventIdInPath' }
2763
+ get:
2764
+ tags: [ Location ]
2765
+ operationId: getLocationsByUser
2766
+ description: >
2767
+ Return an array of user locations for the specified event.
2768
+ The requesting client must have `READ_LOCATION_ALL` permission or
2769
+ `READ_LOCATION_EVENT` and an ACL entry on the event with `read` permission.
2770
+ parameters:
2771
+ - name: startDate
2772
+ in: query
2773
+ schema:
2774
+ type: string
2775
+ format: date-time
2776
+ - name: endDate
2777
+ in: query
2778
+ schema:
2779
+ type: string
2780
+ format: date-time
2781
+ - name: lastLocationId
2782
+ in: query
2783
+ description: locationId of last item in previous page (paging)
2784
+ schema:
2785
+ type: string
2786
+ - name: limit
2787
+ in: query
2788
+ description: limit locations (paging)
2789
+ schema:
2790
+ type: number
2791
+ responses:
2792
+ 200:
2793
+ description: Success - array of user locations.
2794
+ content:
2795
+ application/json:
2796
+ schema:
2797
+ type: array
2798
+ items:
2799
+ $ref: 'geojson.yaml#/definitions/feature'
2800
+ /api/roles:
2801
+ get:
2802
+ tags: [ Role ]
2803
+ operationId: getRoles
2804
+ description: >
2805
+ Return an array of all roles. The client must have `READ_ROLE` permission.
2806
+ responses:
2807
+ 200:
2808
+ description: Success - an array of role documents.
2809
+ content:
2810
+ application/json:
2811
+ schema:
2812
+ type: array
2813
+ items: { $ref: '#/components/schemas/Role' }
2814
+ post:
2815
+ tags: [ Role ]
2816
+ operationId: createRole
2817
+ description: >
2818
+ Create a new role. The client must have `CREATE_ROLE` permission.
2819
+ responses:
2820
+ 200:
2821
+ description: Success - the created role document.
2822
+ content:
2823
+ application/json:
2824
+ schema:
2825
+ $ref: '#/components/schemas/Role'
2826
+ /api/roles/{roleId}:
2827
+ parameters:
2828
+ - { $ref: '#/components/parameters/roleIdInPath' }
2829
+ get:
2830
+ tags: [ Role ]
2831
+ operationId: getRoleById
2832
+ description: >
2833
+ Return the role document whose `id` equals the `roleId` path parameter.
2834
+ The client must have `READ_ROLE` permission.
2835
+ responses:
2836
+ 200:
2837
+ description: Success - role document
2838
+ content:
2839
+ application/json:
2840
+ schema:
2841
+ $ref: '#/components/schemas/Role'
2842
+ put:
2843
+ tags: [ Role ]
2844
+ operationId: updateRoleById
2845
+ description: >
2846
+ Update the user document whose `id` equals the `roleId` path parameter.
2847
+ The client must have `UPDATE_ROLE` permission.
2848
+ requestBody:
2849
+ required: true
2850
+ content:
2851
+ application/json:
2852
+ schema: { $ref: '#/components/schemas/RoleIn' }
2853
+ responses:
2854
+ 200:
2855
+ description: Success - The updated role document.
2856
+ content:
2857
+ application/json:
2858
+ schema:
2859
+ $ref: '#/components/schemas/Role'
2860
+ delete:
2861
+ tags: [ Device ]
2862
+ description: >
2863
+ Delete a role document whose ID matches the path parameter for the
2864
+ role ID. The requesting client must have `DELETE_ROLE` permission.
2865
+ operationId: deleteRoleById
2866
+ responses:
2867
+ 200:
2868
+ description: Success - role deleted
2869
+ /api/settings:
2870
+ get:
2871
+ tags: [ Settings ]
2872
+ operationId: getSettings
2873
+ description: >
2874
+ Return an array of all the settings documents in the database. The
2875
+ requesting client must have `READ_SETTINGS` permission.
2876
+ responses:
2877
+ 200:
2878
+ description: Success - an array of settings documents
2879
+ content:
2880
+ application/json:
2881
+ schema:
2882
+ type: array
2883
+ items:
2884
+ $ref: '#/components/schemas/Setting'
2885
+ /api/settings/{type}:
2886
+ get:
2887
+ tags: [ Settings ]
2888
+ operationId: getSettingByType
2889
+ description: >
2890
+ Return a settings document by the referenced `type`. The
2891
+ requesting client must have `READ_SETTINGS` permission.
2892
+ parameters:
2893
+ - name: type
2894
+ in: path
2895
+ description: type name to update
2896
+ required: true
2897
+ schema:
2898
+ type: string
2899
+ enum:
2900
+ - banner
2901
+ - disclaimer
2902
+ - contactinfo
2903
+ responses:
2904
+ 200:
2905
+ description: Success - setting document
2906
+ content:
2907
+ application/json:
2908
+ schema:
2909
+ $ref: '#/components/schemas/Setting'
2910
+ put:
2911
+ tags: [ Settings ]
2912
+ operationId: updateSettingByType
2913
+ description: >
2914
+ Update the settings document whose `type` matches the type in the path.
2915
+ The requesting user must have `UPDATE_SETTINGS` permission.
2916
+ parameters:
2917
+ - name: type
2918
+ in: path
2919
+ description: type name to update
2920
+ required: true
2921
+ schema:
2922
+ type: string
2923
+ enum:
2924
+ - banner
2925
+ - disclaimer
2926
+ - contactinfo
2927
+ responses:
2928
+ 200:
2929
+ description: Success - the update settings document
2930
+ content:
2931
+ application/json:
2932
+ schema:
2933
+ $ref: '#/components/schemas/Setting'
2934
+ /api/exports/:
2935
+ get:
2936
+ tags: [ Export ]
2937
+ operationId: getAllExports
2938
+ description: >
2939
+ Get all exports regardless of user.
2940
+ summary: Get a list of all exports.
2941
+ responses:
2942
+ 200:
2943
+ description: all exports.
2944
+ content:
2945
+ application/json:
2946
+ schema:
2947
+ type: array
2948
+ items: { $ref: '#/components/schemas/Export' }
2949
+ post:
2950
+ tags: [ Export ]
2951
+ operationId: export
2952
+ description: >
2953
+ Export MAGE data (GeoJSON, KML, GeoPackage, CSV) in the background. The requesting user must have
2954
+ `READ_OBSERVATION_ALL` permission or `READ_OBSERVATION_EVENT` or an ACL entry in the
2955
+ event with `read`.
2956
+ summary: Export MAGE data using a background task.
2957
+ requestBody:
2958
+ content:
2959
+ application/json:
2960
+ schema:
2961
+ $ref: '#/components/schemas/ExportRequest'
2962
+ required: true
2963
+ responses:
2964
+ 201:
2965
+ description: export id
2966
+ headers:
2967
+ location:
2968
+ description: The URI of the export download.
2969
+ schema:
2970
+ type: string
2971
+ content:
2972
+ text/plain:
2973
+ schema:
2974
+ type: string
2975
+ /api/exports/myself:
2976
+ get:
2977
+ tags: [ Export ]
2978
+ operationId: getExports
2979
+ description: >
2980
+ Get only exports for current token holder.
2981
+ summary: Get exports.
2982
+ responses:
2983
+ 200:
2984
+ description: exports
2985
+ content:
2986
+ application/json:
2987
+ schema:
2988
+ type: array
2989
+ items: { $ref: '#/components/schemas/Export' }
2990
+ /api/exports/{exportId}:
2991
+ get:
2992
+ tags: [ Export ]
2993
+ operationId: getExportById
2994
+ description: >
2995
+ Download an export by id.
2996
+ summary: Download a completed export.
2997
+ parameters:
2998
+ - name: exportId
2999
+ in: path
3000
+ required: true
3001
+ schema:
3002
+ type: string
3003
+ responses:
3004
+ 200:
3005
+ description: The exported data as a compressed file.
3006
+ content:
3007
+ application/zip:
3008
+ schema:
3009
+ type: object
3010
+ components:
3011
+ securitySchemes:
3012
+ authenticationToken:
3013
+ type: http
3014
+ description: >
3015
+ Token generated after successful authentication. The client will exchange
3016
+ this token with an approved device for and API token.
3017
+ scheme: bearer
3018
+ bearerFormat: JWT
3019
+ mageToken:
3020
+ type: http
3021
+ description: >
3022
+ MAGE generates an API token when a client authenticates
3023
+ initially. The client can use the token for subsequent requests until
3024
+ it expires.
3025
+ scheme: bearer
3026
+ schemas:
3027
+ CommaSeparatedTokens:
3028
+ type: string
3029
+ pattern: '\w+(,\w+)*'
3030
+ ColorHex:
3031
+ description: >
3032
+ This is a 3 or 4 byte hexadecimal string prefixed with '#' representing
3033
+ an RGB or RGBA color value, e.g. '#ff4545',
3034
+ type: string
3035
+ pattern: '#([a-fA-F0-9]{2}){3,4}'
3036
+ Count:
3037
+ type: object
3038
+ required: [ count ]
3039
+ properties:
3040
+ count:
3041
+ type: integer
3042
+ NormalizedRange:
3043
+ type: number
3044
+ format: float
3045
+ minimum: 0.0
3046
+ maximum: 1.0
3047
+ SortKey:
3048
+ description: >
3049
+ A `SortKey` is a string comprising the name of a document key,
3050
+ optionally suffixed with a sort direction modifier of `+DESC` or `+ASC`
3051
+ for descending or ascending, respectively.
3052
+ type: string
3053
+ pattern: ^\w+(\+(ASC|DESC))?
3054
+ User:
3055
+ description: >
3056
+ The `User` schema defines the structure of persisted user documents as
3057
+ they exist in the database and as the server returns them in various
3058
+ responses.
3059
+ type: object
3060
+ properties:
3061
+ id:
3062
+ type: string
3063
+ username:
3064
+ type: string
3065
+ displayName:
3066
+ type: string
3067
+ status:
3068
+ type: string
3069
+ email:
3070
+ type: string
3071
+ format: email
3072
+ createdAt:
3073
+ type: string
3074
+ format: date-time
3075
+ lastUpdated:
3076
+ type: string
3077
+ format: date-time
3078
+ active:
3079
+ type: boolean
3080
+ enabled:
3081
+ type: boolean
3082
+ avatarUrl:
3083
+ type: string
3084
+ iconUrl:
3085
+ type: string
3086
+ authentication:
3087
+ $ref: '#/components/schemas/AuthStatus'
3088
+ role:
3089
+ $ref: '#/components/schemas/Role'
3090
+ roleId:
3091
+ $ref: '#/components/schemas/Role/properties/id'
3092
+ icon:
3093
+ $ref: '#/components/schemas/UserIcon'
3094
+ phones:
3095
+ type: array
3096
+ items:
3097
+ $ref: '#/components/schemas/Phone'
3098
+ recentEventIds:
3099
+ type: array
3100
+ items:
3101
+ $ref: '#/components/schemas/Event/properties/id'
3102
+ oneOf:
3103
+ - { type: object, required: [ role ], not: { type: object, required: [ roleId ] } }
3104
+ - { type: object, required: [ roleId ], not: { type: object, required: [ role ] } }
3105
+ - { type: object, not: { type: object, required: [ role, roleId ] } }
3106
+ UserRef:
3107
+ description: >
3108
+ `UserRef` is an object that references an existing user document with
3109
+ the required `id` property. MAGE ignores any properties other than
3110
+ `id`.
3111
+ type: object
3112
+ allOf:
3113
+ - { $ref: '#/components/schemas/User' }
3114
+ - { type: object, required: [ id ] }
3115
+ UserIn:
3116
+ type: object
3117
+ properties:
3118
+ username: { $ref: '#/components/schemas/User/properties/username' }
3119
+ displayName: { $ref: '#/components/schemas/User/properties/displayName' }
3120
+ email: { $ref: '#/components/schemas/User/properties/email' }
3121
+ phone:
3122
+ type: string
3123
+ format: phone
3124
+ roleId: { $ref: '#/components/schemas/User/properties/roleId' }
3125
+ iconMetadata:
3126
+ type: object
3127
+ properties:
3128
+ type: { $ref: '#/components/schemas/UserIcon/properties/type' }
3129
+ color: { $ref: '#/components/schemas/UserIcon/properties/color' }
3130
+ text: { $ref: '#/components/schemas/UserIcon/properties/text' }
3131
+ icon:
3132
+ description: >
3133
+ This key is valid only when encoded as `multipart/form-data`.
3134
+ This is a binary image file attachment.
3135
+ type: string
3136
+ format: binary
3137
+ avatar:
3138
+ description: >
3139
+ This key is valid only when encoded as `multipart/form-data`.
3140
+ This is a binary image file attachment.
3141
+ type: string
3142
+ format: binary
3143
+ allOf:
3144
+ - { $ref: '#/components/schemas/UserPasswordPair' }
3145
+ UserCreate:
3146
+ allOf:
3147
+ - { $ref: '#/components/schemas/UserIn' }
3148
+ - { type: object, required: [ username, displayName, password, passwordconfirm ] }
3149
+ UserUpdateSelf:
3150
+ allOf:
3151
+ - { $ref: '#/components/schemas/UserIn' }
3152
+ - type: object
3153
+ not:
3154
+ type: object
3155
+ required: [ password, passwordconfirm, icon, iconMetadata ]
3156
+ UserIcon:
3157
+ description: >
3158
+ A user icon is the small image that appears on a map to show the user's
3159
+ location.
3160
+ type: object
3161
+ properties:
3162
+ type:
3163
+ description: The origin of the icon
3164
+ type: string
3165
+ enum:
3166
+ - create
3167
+ - upload
3168
+ - none
3169
+ color:
3170
+ description: Color is only applicable for `create` type icons.
3171
+ $ref: '#/components/schemas/ColorHex'
3172
+ text:
3173
+ description: >
3174
+ Two-letter text label that appears on the map icon; only applies to
3175
+ `create` type icons
3176
+ type: string
3177
+ contentType:
3178
+ description: The MIME type of the icon image
3179
+ type: string
3180
+ size:
3181
+ description: The image size in bytes
3182
+ type: integer
3183
+ UserPasswordPair:
3184
+ type: object
3185
+ properties:
3186
+ password:
3187
+ type: string
3188
+ passwordconfirm:
3189
+ type: string
3190
+ oneOf:
3191
+ - { type: object, required: [ password, passwordconfirm ] }
3192
+ - { type: object, not: { type: object, required: [ password, passwordconfirm ] } }
3193
+ Authentication:
3194
+ type: object
3195
+ required:
3196
+ - user
3197
+ - token
3198
+ properties:
3199
+ user:
3200
+ $ref: '#/components/schemas/UserRef'
3201
+ token:
3202
+ type: string
3203
+ AuthStatus:
3204
+ type: object
3205
+ required:
3206
+ - type
3207
+ properties:
3208
+ type:
3209
+ type: string
3210
+ security:
3211
+ type: object
3212
+ properties:
3213
+ locked:
3214
+ type: boolean
3215
+ lockedUntil:
3216
+ type: string
3217
+ format: date-time
3218
+ invalidLoginAttempts:
3219
+ type: number
3220
+ numberOfTimesLocked:
3221
+ type: number
3222
+ ACL:
3223
+ description: >
3224
+ The ACL (Access Control List) is a mapping of user IDs to the roles and
3225
+ permissions users have to access the parent resource of the ACL.
3226
+ type: object
3227
+ additionalProperties:
3228
+ description: >
3229
+ The keys of the ACL object are user ID strings. The values specify
3230
+ the role and permissions that the user matching the associated key
3231
+ has to access a resource.
3232
+ type: object
3233
+ properties:
3234
+ role: { $ref: '#/components/schemas/ACLRole' }
3235
+ permissions:
3236
+ description: >
3237
+ The permissions of an ACL entry are currently a static mapping
3238
+ from the role. The ACL entry includes the permissions associated
3239
+ with the role to be more explicit about what the role means and
3240
+ how the user of the ACL entry can access the resource.
3241
+ type: array
3242
+ items: { $ref: '#/components/schemas/ACLPermission' }
3243
+ ACLRole:
3244
+ type: string
3245
+ enum:
3246
+ - OWNER
3247
+ - MANAGER
3248
+ - GUEST
3249
+ ACLPermission:
3250
+ type: string
3251
+ enum:
3252
+ - read
3253
+ - update
3254
+ - delete
3255
+ Device:
3256
+ required:
3257
+ - id
3258
+ - uid
3259
+ - name
3260
+ - description
3261
+ type: object
3262
+ properties:
3263
+ id:
3264
+ type: string
3265
+ uid:
3266
+ type: string
3267
+ description: >
3268
+ The device UID is an identifier string assigned at the application
3269
+ level. This is usually a UUID, but can be any string the creator
3270
+ of the device chooses.
3271
+ name:
3272
+ type: string
3273
+ description:
3274
+ type: string
3275
+ registered:
3276
+ type: boolean
3277
+ userAgent:
3278
+ type: string
3279
+ appVersion:
3280
+ type: string
3281
+ userId:
3282
+ $ref: '#/components/schemas/User/properties/id'
3283
+ user:
3284
+ $ref: '#/components/schemas/User'
3285
+ oneOf:
3286
+ - { type: object, required: [ userId ], not: { type: object, required: [ user ] } }
3287
+ - { type: object, required: [ user ], not: { type: object, required: [ userId ] } }
3288
+ DeviceIn:
3289
+ type: object
3290
+ required: [ uid ]
3291
+ properties:
3292
+ uid:
3293
+ type: string
3294
+ name:
3295
+ type: string
3296
+ description:
3297
+ type: string
3298
+ appVersion:
3299
+ type: string
3300
+ userId:
3301
+ $ref: '#/components/schemas/User/properties/id'
3302
+ Team:
3303
+ description: >
3304
+ A team is simply a grouping of users that commonly operate together.
3305
+ Teams facilitate adding groups of users to events.
3306
+ type: object
3307
+ properties:
3308
+ id:
3309
+ type: number
3310
+ name:
3311
+ type: string
3312
+ description:
3313
+ type: string
3314
+ users:
3315
+ type: array
3316
+ items:
3317
+ $ref: '#/components/schemas/UserRef'
3318
+ teamEventId:
3319
+ $ref: '#/components/schemas/Event/properties/id'
3320
+ description: >
3321
+ MAGE adds this property to indicate that a team is the implicitly
3322
+ created team paired with an event for grouping the event's users
3323
+ on an individual basis. This property references the ID of the
3324
+ event document to which the team belongs. To add an individual
3325
+ user to an event, add the user to the team with the `teamEventId`
3326
+ property that references the target event.
3327
+ acl:
3328
+ $ref: '#/components/schemas/ACL'
3329
+ TeamIn:
3330
+ type: object
3331
+ properties:
3332
+ name: { $ref: '#/components/schemas/Team/properties/name' }
3333
+ description: { $ref: '#/components/schemas/Team/properties/description' }
3334
+ users:
3335
+ type: array
3336
+ items: { $ref: '#/components/schemas/UserRef' }
3337
+ TeamCreate:
3338
+ allOf:
3339
+ - $ref: '#/components/schemas/TeamIn'
3340
+ - { type: object, required: [ name ] }
3341
+ TeamRef:
3342
+ allOf:
3343
+ - $ref: '#/components/schemas/Team'
3344
+ - { type: object, required: [ id ] }
3345
+ Event:
3346
+ required:
3347
+ - id
3348
+ - name
3349
+ type: object
3350
+ properties:
3351
+ id:
3352
+ type: integer
3353
+ name:
3354
+ type: string
3355
+ description:
3356
+ type: string
3357
+ complete:
3358
+ description: >
3359
+ When `true`, the `complete` flag indicates the event is no longer
3360
+ active. One can reactivate a complete event at any time.
3361
+ type: boolean
3362
+ style:
3363
+ description: >
3364
+ The event's geometry style is the default style applied to each
3365
+ form of the event. Individual forms can override the default
3366
+ style.
3367
+ $ref: '#/components/schemas/GeometryStyle'
3368
+ forms:
3369
+ type: array
3370
+ items:
3371
+ $ref: '#/components/schemas/Form'
3372
+ teams:
3373
+ type: array
3374
+ items:
3375
+ $ref: '#/components/schemas/Team'
3376
+ layers:
3377
+ type: array
3378
+ items:
3379
+ $ref: '#/components/schemas/Layer'
3380
+ acl:
3381
+ $ref: '#/components/schemas/ACL'
3382
+ EventCreate:
3383
+ required:
3384
+ - name
3385
+ type: object
3386
+ properties:
3387
+ name:
3388
+ $ref: '#/components/schemas/Event/properties/name'
3389
+ description:
3390
+ $ref: '#/components/schemas/Event/properties/description'
3391
+ EventUpdate:
3392
+ type: object
3393
+ properties:
3394
+ name:
3395
+ $ref: '#/components/schemas/Event/properties/name'
3396
+ description:
3397
+ $ref: '#/components/schemas/Event/properties/description'
3398
+ complete:
3399
+ $ref: '#/components/schemas/Event/properties/complete'
3400
+ forms:
3401
+ $ref: '#/components/schemas/Event/properties/forms'
3402
+ Form:
3403
+ type: object
3404
+ properties:
3405
+ id:
3406
+ type: string
3407
+ name:
3408
+ type: string
3409
+ description:
3410
+ type: string
3411
+ color:
3412
+ $ref: '#/components/schemas/ColorHex'
3413
+ description: >
3414
+ The form's color is a visual discriminator that displays in the
3415
+ observation form selector when an event has multiple forms.
3416
+ primaryField:
3417
+ type: string
3418
+ description: >
3419
+ The primary field must be a single-select-type field whose choices
3420
+ determine the map symbology used to represent the observation on a
3421
+ map.
3422
+ variantField:
3423
+ type: string
3424
+ description: >
3425
+ The variant field must be another single-select-type field whose
3426
+ values can further refine the map symbology associated with the
3427
+ primary field's value of in an observation.
3428
+ fields:
3429
+ type: array
3430
+ items:
3431
+ $ref: '#/components/schemas/Field'
3432
+ minItems: 1
3433
+ userFields:
3434
+ type: array
3435
+ items:
3436
+ $ref: '#/components/schemas/Field/properties/name'
3437
+ description: >
3438
+ A list of field names that will be drop-downs whose choices are
3439
+ dynamically populated with the names of users in the event.
3440
+ FormCreate:
3441
+ type: object
3442
+ allOf:
3443
+ - $ref: '#/components/schemas/Form'
3444
+ - type: object
3445
+ required: [ name, color, fields ]
3446
+ FormImport:
3447
+ type: object
3448
+ properties:
3449
+ name:
3450
+ $ref: '#/components/schemas/Form/properties/name'
3451
+ color:
3452
+ $ref: '#/components/schemas/Form/properties/color'
3453
+ form:
3454
+ type: string
3455
+ format: binary
3456
+ description: |
3457
+ The form is a zip file the user uploads. THe layout of the zip
3458
+ file is the same as described in the `exportForm` operation.
3459
+ required: [ name, color, form ]
3460
+ GeometryStyle:
3461
+ type: object
3462
+ properties:
3463
+ strokeWidth:
3464
+ type: integer
3465
+ strokeOpacity:
3466
+ $ref: '#/components/schemas/NormalizedRange'
3467
+ stroke:
3468
+ type: string
3469
+ Field:
3470
+ type: object
3471
+ properties:
3472
+ id:
3473
+ type: number
3474
+ name:
3475
+ type: string
3476
+ title:
3477
+ type: string
3478
+ type:
3479
+ type: string
3480
+ value:
3481
+ type: string
3482
+ required:
3483
+ type: boolean
3484
+ choices:
3485
+ type: array
3486
+ items:
3487
+ $ref: '#/components/schemas/Choice'
3488
+ Choice:
3489
+ type: object
3490
+ properties:
3491
+ id:
3492
+ type: number
3493
+ title:
3494
+ type: string
3495
+ value:
3496
+ type: string
3497
+ FormIcon:
3498
+ description: >
3499
+ `FormIcon` documents are the meta-data about icon images that MAGE
3500
+ clients use to mark the location on the map display of observations
3501
+ with the associated form.
3502
+ type: object
3503
+ properties:
3504
+ eventId:
3505
+ $ref: '#/components/schemas/Event/properties/id'
3506
+ formId:
3507
+ $ref: '#/components/schemas/Form/properties/id'
3508
+ primary:
3509
+ type: string
3510
+ nullable: true
3511
+ description: >
3512
+ The value of the primary form field associated with the icon
3513
+ variant:
3514
+ type: string
3515
+ nullable: true
3516
+ description: >
3517
+ The value of the variant form field associated with the icon
3518
+ relativePath:
3519
+ type: string
3520
+ pattern: ^/\\d+/\\d+(/[^/]+){0,2}$
3521
+ description: >
3522
+ The relative path of the icon image URL, which looks like
3523
+ `<event_id>/<form_id>[/<primary>[/variant]]`
3524
+ FormIconEmbedded:
3525
+ allOf:
3526
+ - $ref: '#/components/schemas/FormIcon'
3527
+ - type: object
3528
+ properties:
3529
+ icon:
3530
+ type: string
3531
+ pattern: ^data:image/[^;]+;base64,[A-Za-z0-9+/]+$
3532
+ description: >
3533
+ The base-64-encoded image bytes of the icon, formatted as a
3534
+ data URL suitable for use as the value of the HTML `img` tag's
3535
+ `src` attribute
3536
+ FormIconUpload:
3537
+ type: object
3538
+ properties:
3539
+ icon:
3540
+ type: string
3541
+ format: binary
3542
+ Layer:
3543
+ title: Layer
3544
+ type: object
3545
+ properties:
3546
+ id:
3547
+ type: number
3548
+ description: The unique layer ID
3549
+ name:
3550
+ type: string
3551
+ description:
3552
+ type: string
3553
+ type:
3554
+ type: string
3555
+ enum: [ Feature, Imagery, GeoPackage ]
3556
+ url:
3557
+ type: string
3558
+ base:
3559
+ type: boolean
3560
+ format:
3561
+ type: string
3562
+ enum: [ WMS, XYZ, TMS ]
3563
+ WMSLayer:
3564
+ title: WMSLayer
3565
+ type: object
3566
+ properties:
3567
+ layers:
3568
+ type: string
3569
+ description: Comma seperated list of WMS layer names
3570
+ styles:
3571
+ type: string
3572
+ description: Comma seperated list of WMS style names
3573
+ format:
3574
+ type: string
3575
+ description: WMS map tile format.
3576
+ version:
3577
+ type: string
3578
+ description: WMS service version.
3579
+ LayerRef:
3580
+ allOf:
3581
+ - $ref: '#/components/schemas/Layer'
3582
+ - type: object
3583
+ required: [ id ]
3584
+ ObservationIn:
3585
+ description: >
3586
+ This schema defines the observation properties a client sends to save
3587
+ a new or updated observation.
3588
+ allOf:
3589
+ - $ref: 'geojson.yaml#/definitions/feature'
3590
+ - type: object
3591
+ properties:
3592
+ properties:
3593
+ $ref: '#/components/schemas/ObservationFeatureProperties'
3594
+ - type: object
3595
+ required: [ type, geometry, properties ]
3596
+ Observation:
3597
+ title: Observation
3598
+ description: >
3599
+ The `Observation` is the operative concept of MAGE's geospatial data
3600
+ collection functionality. Observation documents are the geo-tagged
3601
+ form and media records that MAGE users submit to the MAGE server.
3602
+ Observation documents are extensions of GeoJSON feature documents, so
3603
+ all observations have a `type` property whose value is `Feature`, as
3604
+ well as a `geometry` property that holds the geospatial geometry of the
3605
+ observation, such as point or polygon coordinates. The values of the
3606
+ observation's form fields reside under the GeoJSON `properties` key.
3607
+ type: object
3608
+ properties:
3609
+ id:
3610
+ type: string
3611
+ description: The unique observation ID
3612
+ createdAt:
3613
+ type: string
3614
+ format: date-time
3615
+ lastModified:
3616
+ type: string
3617
+ format: date-time
3618
+ userId:
3619
+ $ref: '#/components/schemas/User/properties/id'
3620
+ deviceId:
3621
+ $ref: '#/components/schemas/Device/properties/id'
3622
+ eventId:
3623
+ $ref: '#/components/schemas/Event/properties/id'
3624
+ state:
3625
+ $ref: '#/components/schemas/ObservationState'
3626
+ url:
3627
+ type: string
3628
+ format: uri
3629
+ description: >
3630
+ This is the absolute URL of the observation where the client can
3631
+ fetch and update the observation document.
3632
+ favoriteUserIds:
3633
+ type: array
3634
+ items:
3635
+ $ref: '#/components/schemas/User/properties/id'
3636
+ attachements:
3637
+ type: array
3638
+ items:
3639
+ $ref: '#/components/schemas/Attachment'
3640
+ allOf:
3641
+ - $ref: '#/components/schemas/ObservationIn'
3642
+ example: {
3643
+ "createdAt": "2019-09-25T19:50:05.065Z",
3644
+ "deviceId": "5d697f88951c51a926e9dba4",
3645
+ "geometry": {
3646
+ "type": "Point",
3647
+ "coordinates": [
3648
+ -0.08910298347473145,
3649
+ 51.527068718503244
3650
+ ],
3651
+ },
3652
+ "lastModified": "2019-10-01T04:24:45.466Z",
3653
+ "properties": {
3654
+ "timestamp": "2019-09-25T19:48:55.859Z",
3655
+ "forms": [
3656
+ {
3657
+ "formId": 3,
3658
+ "field1": [
3659
+ "Umbarela"
3660
+ ],
3661
+ }
3662
+ ],
3663
+ },
3664
+ "type": "Feature",
3665
+ "userId": "5d697f88b8ed5f29bef7b10c",
3666
+ "favoriteUserIds": [
3667
+ "5d697f88b8ed5f29bef7b10c"
3668
+ ],
3669
+ "important": {
3670
+ "description": "Come back later",
3671
+ "timestamp": "2019-10-01T04:24:45.466Z",
3672
+ "userId": "5d697f88b8ed5f29bef7b10c"
3673
+ },
3674
+ "attachments": [
3675
+ {
3676
+ "contentType": "image/jpeg",
3677
+ "size": 24875,
3678
+ "name": "c1816efcab6e00c39623ddd8262b852e.jpg",
3679
+ "relativePath": "observations2/2019/9/25/c1816efcab6e00c39623ddd8262b852e.jpg",
3680
+ "lastModified": "2019-09-25T19:50:22.383Z",
3681
+ "oriented": false,
3682
+ "id": "5d8bc4fe038559417fffbb55",
3683
+ "url": "http://localhost:4242/api/events/2/observations/5d8bc4ed038559417fffbb53/attachments/5d8bc4fe038559417fffbb55"
3684
+ }
3685
+ ],
3686
+ "id": "5d8bc4ed038559417fffbb53",
3687
+ "eventId": 2,
3688
+ "url": "http://localhost:4242/api/events/2/observations/5d8bc4ed038559417fffbb53",
3689
+ "state": {
3690
+ "userId": "5d697f88b8ed5f29bef7b10c",
3691
+ "name": "active",
3692
+ "id": "5d8bc4ed038559417fffbb54",
3693
+ "url": "http://localhost:4242/api/events/2/observations/5d8bc4ed038559417fffbb53/states/5d8bc4ed038559417fffbb54"
3694
+ }
3695
+ }
3696
+ ObservationFeatureProperties:
3697
+ description: >
3698
+ This schema defines the specific keys that MAGE recognizes under the
3699
+ GeoJSON feature's `properties` entry.
3700
+ type: object
3701
+ properties:
3702
+ timestamp:
3703
+ type: string
3704
+ format: date-time
3705
+ forms:
3706
+ type: array
3707
+ items:
3708
+ type: object
3709
+ properties:
3710
+ formId:
3711
+ $ref: '#/components/schemas/Form/properties/id'
3712
+ additionalProperties: true
3713
+ required: [ timestamp ]
3714
+ ObservationImportant:
3715
+ type: object
3716
+ properties:
3717
+ userId:
3718
+ $ref: '#/components/schemas/User/properties/id'
3719
+ timestamp:
3720
+ type: string
3721
+ format: date-time
3722
+ description:
3723
+ type: string
3724
+ description: The reason for flagging an observation important
3725
+ ObservationImportantCreate:
3726
+ allOf:
3727
+ - $ref: '#/components/schemas/ObservationImportant'
3728
+ - type: object
3729
+ required: [ description ]
3730
+ ObservationState:
3731
+ type: object
3732
+ properties:
3733
+ id:
3734
+ type: string
3735
+ name:
3736
+ $ref: '#/components/schemas/ObservationStateName'
3737
+ userId:
3738
+ $ref: '#/components/schemas/User/properties/id'
3739
+ description: >
3740
+ The ID of the user that set this state on the parent observation.
3741
+ ObservationStateCreate:
3742
+ allOf:
3743
+ - $ref: '#/components/schemas/ObservationState'
3744
+ - type: object
3745
+ required: [ name ]
3746
+ ObservationStateName:
3747
+ type: string
3748
+ enum: [ active, archive ]
3749
+ description: >
3750
+ Setting an observation's state to `archive` effectively deletes the
3751
+ observation from client views, but preserves the observation data.
3752
+ Attachment:
3753
+ type: object
3754
+ properties:
3755
+ id:
3756
+ type: string
3757
+ name:
3758
+ type: string
3759
+ relativePath:
3760
+ type: string
3761
+ contentType:
3762
+ type: string
3763
+ url:
3764
+ type: string
3765
+ format: uri
3766
+ oriented:
3767
+ type: boolean
3768
+ LocalCredentials:
3769
+ required:
3770
+ - password
3771
+ - username
3772
+ type: object
3773
+ properties:
3774
+ username:
3775
+ type: string
3776
+ password:
3777
+ type: string
3778
+ Thumbnail:
3779
+ type: object
3780
+ properties:
3781
+ name:
3782
+ type: string
3783
+ contentType:
3784
+ type: string
3785
+ height:
3786
+ type: number
3787
+ width:
3788
+ type: number
3789
+ size:
3790
+ type: number
3791
+ minDimension:
3792
+ type: number
3793
+ Phone:
3794
+ type: object
3795
+ properties:
3796
+ type:
3797
+ description: >
3798
+ The type of phone number currently defaults to `Main` and is
3799
+ static.
3800
+ type: string
3801
+ number:
3802
+ type: string
3803
+ LoginResponse:
3804
+ type: object
3805
+ properties:
3806
+ token:
3807
+ type: string
3808
+ expirationDate:
3809
+ type: string
3810
+ user:
3811
+ $ref: '#/components/schemas/User'
3812
+ role:
3813
+ $ref: '#/components/schemas/Role'
3814
+ Login:
3815
+ type: object
3816
+ properties:
3817
+ id:
3818
+ type: string
3819
+ timestamp:
3820
+ type: string
3821
+ device:
3822
+ $ref: '#/components/schemas/Device'
3823
+ deviceId:
3824
+ $ref: '#/components/schemas/Device/properties/id'
3825
+ user:
3826
+ $ref: '#/components/schemas/User'
3827
+ userId:
3828
+ $ref: '#/components/schemas/User/properties/id'
3829
+ required:
3830
+ - id
3831
+ - timestamp
3832
+ allOf:
3833
+ - oneOf:
3834
+ - { type: object, required: [ deviceId ], not: { type: object, required: [ device ] } }
3835
+ - { type: object, required: [ device ], not: { type: object, required: [ deviceId ] } }
3836
+ - oneOf:
3837
+ - { type: object, required: [ userId ], not: { type: object, required: [ user ] } }
3838
+ - { type: object, required: [ user ], not: { type: object, required: [ userId ] } }
3839
+ Role:
3840
+ type: object
3841
+ properties:
3842
+ id:
3843
+ type: string
3844
+ name:
3845
+ type: string
3846
+ description:
3847
+ type: string
3848
+ permissions:
3849
+ type: array
3850
+ items:
3851
+ type: string
3852
+ required:
3853
+ - id
3854
+ - name
3855
+ - description
3856
+ - permissions
3857
+ RoleIn:
3858
+ type: object
3859
+ properties:
3860
+ name:
3861
+ type: string
3862
+ description:
3863
+ type: string
3864
+ permissions:
3865
+ type: array
3866
+ items:
3867
+ type: string
3868
+ LayerCreate:
3869
+ required:
3870
+ - name
3871
+ - type
3872
+ type: object
3873
+ properties:
3874
+ name:
3875
+ $ref: '#/components/schemas/Layer/properties/name'
3876
+ description:
3877
+ $ref: '#/components/schemas/Layer/properties/description'
3878
+ type:
3879
+ $ref: '#/components/schemas/Layer/properties/type'
3880
+ url:
3881
+ $ref: '#/components/schemas/Layer/properties/url'
3882
+ base:
3883
+ $ref: '#/components/schemas/Layer/properties/base'
3884
+ format:
3885
+ $ref: '#/components/schemas/Layer/properties/format'
3886
+ wms:
3887
+ $ref: '#/components/schemas/WMSLayer'
3888
+ geopackage:
3889
+ type: string
3890
+ format: binary
3891
+ description: |
3892
+ The geopackage is a GeoPackage file the user uploads. If uploading this file the `type` must
3893
+ be GeoPackage
3894
+ Setting:
3895
+ required:
3896
+ - type
3897
+ type: object
3898
+ properties:
3899
+ type:
3900
+ type: string
3901
+ settings:
3902
+ type: object
3903
+ Export:
3904
+ required:
3905
+ - type
3906
+ type: object
3907
+ properties:
3908
+ _id:
3909
+ type: string
3910
+ userId:
3911
+ $ref: '#/components/schemas/User/properties/id'
3912
+ physicalPath:
3913
+ type: string
3914
+ filename:
3915
+ type: string
3916
+ exportType:
3917
+ type: string
3918
+ enum: [ geojson, kml, geopackage, csv ]
3919
+ location:
3920
+ type: string
3921
+ status:
3922
+ type: string
3923
+ options:
3924
+ type: string
3925
+ AuthenticationConfiguration:
3926
+ required:
3927
+ - name
3928
+ - type
3929
+ type: object
3930
+ properties:
3931
+ name:
3932
+ type: string
3933
+ type:
3934
+ type: string
3935
+ title:
3936
+ type: string
3937
+ textColor:
3938
+ type: string
3939
+ buttonColor:
3940
+ type: string
3941
+ icon:
3942
+ type: string
3943
+ format: byte
3944
+ enabled:
3945
+ type: boolean
3946
+ settings:
3947
+ type: object
3948
+ Style:
3949
+ properties:
3950
+ fill:
3951
+ $ref: '#/components/schemas/ColorHex'
3952
+ stroke:
3953
+ $ref: '#/components/schemas/ColorHex'
3954
+ fillOpacity:
3955
+ type: integer
3956
+ minimum: 0
3957
+ maximum: 1
3958
+ strokeOpacity:
3959
+ type: integer
3960
+ minimum: 0
3961
+ maximum: 1
3962
+ strokeWidth:
3963
+ type: integer
3964
+ SourceUrlStaticIconReference:
3965
+ required:
3966
+ - sourceUrl
3967
+ properties:
3968
+ sourceUrl:
3969
+ type: string
3970
+ format: uri
3971
+ RegisteredStaticIconReference:
3972
+ required:
3973
+ - id
3974
+ properties:
3975
+ id:
3976
+ type: string
3977
+ MapStyle:
3978
+ properties:
3979
+ stroke:
3980
+ $ref: '#/components/schemas/ColorHex'
3981
+ strokeOpacity:
3982
+ type: integer
3983
+ minimum: 0
3984
+ maximum: 1
3985
+ strokeWidth:
3986
+ type: integer
3987
+ fill:
3988
+ $ref: '#/components/schemas/ColorHex'
3989
+ fillOpacity:
3990
+ type: integer
3991
+ minimum: 0
3992
+ maximum: 1
3993
+ icon:
3994
+ $ref: '#/components/schemas/SourceUrlStaticIconReference'
3995
+ Feed:
3996
+ required:
3997
+ - id
3998
+ - service
3999
+ - topic
4000
+ - title
4001
+ - itemsHaveIdentity
4002
+ - itemsHaveSpatialDimension
4003
+ type: object
4004
+ properties:
4005
+ id:
4006
+ type: string
4007
+ service:
4008
+ type: string
4009
+ topic:
4010
+ type: string
4011
+ title:
4012
+ type: string
4013
+ summary:
4014
+ type: string
4015
+ icon:
4016
+ $ref: '#/components/schemas/RegisteredStaticIconReference'
4017
+ constantParams:
4018
+ type: object
4019
+ variableParamsSchema:
4020
+ type: object
4021
+ updateFrequencySeconds:
4022
+ type: integer
4023
+ itemsHaveIdentity:
4024
+ type: boolean
4025
+ itemsHaveSpatialDimension:
4026
+ type: boolean
4027
+ itemTemporalProperty:
4028
+ type: string
4029
+ itemPrimaryProperty:
4030
+ type: string
4031
+ itemSecondaryProperty:
4032
+ type: string
4033
+ mapStyle:
4034
+ $ref: '#/components/schemas/MapStyle'
4035
+ itemPropertiesSchema:
4036
+ type: object
4037
+ FeedAddToEvent:
4038
+ required:
4039
+ - feedId
4040
+ type: object
4041
+ properties:
4042
+ feedId:
4043
+ type: string
4044
+ JsonObject:
4045
+ required:
4046
+ - prop
4047
+ type: object
4048
+ properties:
4049
+ prop:
4050
+ type: string
4051
+ value:
4052
+ type: object
4053
+ MageEvent:
4054
+ required:
4055
+ - id
4056
+ - name
4057
+ - layerIds
4058
+ - feedIds
4059
+ - forms
4060
+ - style
4061
+ - acl
4062
+ type: object
4063
+ properties:
4064
+ id:
4065
+ type: string
4066
+ name:
4067
+ type: string
4068
+ description:
4069
+ type: string
4070
+ complete:
4071
+ type: boolean
4072
+ teamIds:
4073
+ type: array
4074
+ items:
4075
+ type: string
4076
+ teams:
4077
+ type: array
4078
+ items:
4079
+ $ref: '#/components/schemas/Team'
4080
+ layerIds:
4081
+ type: array
4082
+ items:
4083
+ type: string
4084
+ feedIds:
4085
+ type: array
4086
+ items:
4087
+ type: string
4088
+ forms:
4089
+ type: array
4090
+ items:
4091
+ $ref: '#/components/schemas/Form'
4092
+ style:
4093
+ $ref: '#/components/schemas/Style'
4094
+ acl:
4095
+ $ref: '#/components/schemas/ACL'
4096
+ FeedContent:
4097
+ required:
4098
+ - feed
4099
+ - topic
4100
+ - items
4101
+ properties:
4102
+ feed:
4103
+ type: string
4104
+ variableParams:
4105
+ $ref: '#/components/schemas/JsonObject'
4106
+ topic:
4107
+ type: string
4108
+ items:
4109
+ type: array
4110
+ items:
4111
+ type: object
4112
+ pageCursor:
4113
+ type: object
4114
+ UserSearchResult:
4115
+ properties:
4116
+ id:
4117
+ type: string
4118
+ username:
4119
+ type: string
4120
+ displayName:
4121
+ type: string
4122
+ email:
4123
+ type: string
4124
+ active:
4125
+ type: boolean
4126
+ enabled:
4127
+ type: boolean
4128
+ allPhones:
4129
+ type: string
4130
+ PageOfUsers:
4131
+ required:
4132
+ - totalCount
4133
+ - pageSize
4134
+ - pageIndex
4135
+ - items
4136
+ properties:
4137
+ totalCount:
4138
+ type: integer
4139
+ pageSize:
4140
+ type: integer
4141
+ pageIndex:
4142
+ type: integer
4143
+ items:
4144
+ type: array
4145
+ items:
4146
+ $ref: '#/components/schemas/UserSearchResult'
4147
+ FeedServiceTypeDescriptor:
4148
+ properties:
4149
+ id:
4150
+ type: string
4151
+ pluginServiceTypeId:
4152
+ type: string
4153
+ title:
4154
+ type: string
4155
+ summary:
4156
+ type: string
4157
+ ServiceConfig:
4158
+ properties:
4159
+ serviceConfig:
4160
+ type: object
4161
+ FeedTopic:
4162
+ required:
4163
+ - id
4164
+ - title
4165
+ properties:
4166
+ id:
4167
+ type: string
4168
+ title:
4169
+ type: string
4170
+ summary:
4171
+ type: string
4172
+ icon:
4173
+ $ref: '#/components/schemas/SourceUrlStaticIconReference'
4174
+ paramsSchema:
4175
+ type: object
4176
+ updateFrequencySeconds:
4177
+ type: integer
4178
+ itemsHaveIdentity:
4179
+ type: boolean
4180
+ itemsHaveSpatialDimension:
4181
+ type: boolean
4182
+ itemTemporalProperty:
4183
+ type: string
4184
+ itemPrimaryProperty:
4185
+ type: string
4186
+ itemSecondaryProperty:
4187
+ type: string
4188
+ mapStyle:
4189
+ $ref: '#/components/schemas/MapStyle'
4190
+ itemPropertiesSchema:
4191
+ type: string
4192
+ CreateFeedService:
4193
+ properties:
4194
+ serviceType:
4195
+ type: string
4196
+ config:
4197
+ type: object
4198
+ title:
4199
+ type: string
4200
+ summary:
4201
+ type: string
4202
+ FeedService:
4203
+ required:
4204
+ - id
4205
+ - serviceType
4206
+ - title
4207
+ - config
4208
+ properties:
4209
+ id:
4210
+ type: string
4211
+ serviceType:
4212
+ type: string
4213
+ title:
4214
+ type: string
4215
+ summary:
4216
+ type: string
4217
+ config:
4218
+ type: object
4219
+ FeedPreview:
4220
+ required:
4221
+ - feed
4222
+ properties:
4223
+ feed:
4224
+ $ref: '#/components/schemas/Feed'
4225
+ content:
4226
+ $ref: '#/components/schemas/FeedContent'
4227
+ PreviewFeedRequest:
4228
+ properties:
4229
+ skipContentFetch:
4230
+ type: boolean
4231
+ variableParams:
4232
+ $ref: '#/components/schemas/JsonObject'
4233
+ ImageSize:
4234
+ required:
4235
+ - width
4236
+ - height
4237
+ properties:
4238
+ width:
4239
+ type: number
4240
+ height:
4241
+ type: number
4242
+ StaticIcon:
4243
+ required:
4244
+ - sourceUrl
4245
+ - id
4246
+ - registeredTimestamp
4247
+ properties:
4248
+ sourceUrl:
4249
+ type: string
4250
+ format: uri
4251
+ id:
4252
+ type: string
4253
+ registeredTimestamp:
4254
+ type: number
4255
+ resolvedTimestamp:
4256
+ type: number
4257
+ imageType:
4258
+ type: string
4259
+ enum:
4260
+ - raster
4261
+ - vector
4262
+ mediaType:
4263
+ type: string
4264
+ sizePixels:
4265
+ $ref: '#/components/schemas/ImageSize'
4266
+ sizeBytes:
4267
+ type: number
4268
+ contentHash:
4269
+ type: string
4270
+ contentTimestamp:
4271
+ type: number
4272
+ title:
4273
+ type: string
4274
+ summary:
4275
+ type: string
4276
+ fileName:
4277
+ type: string
4278
+ tags:
4279
+ type: array
4280
+ items:
4281
+ type: string
4282
+ StaticIconWithContent:
4283
+ required:
4284
+ - iconInfo
4285
+ - iconContent
4286
+ properties:
4287
+ iconInfo:
4288
+ $ref: '#/components/schemas/StaticIcon'
4289
+ iconContent:
4290
+ type: object
4291
+ PageOfStaticIcons:
4292
+ required:
4293
+ - totalCount
4294
+ - pageSize
4295
+ - pageIndex
4296
+ - items
4297
+ properties:
4298
+ totalCount:
4299
+ type: integer
4300
+ pageSize:
4301
+ type: integer
4302
+ pageIndex:
4303
+ type: integer
4304
+ items:
4305
+ type: array
4306
+ items:
4307
+ $ref: '#/components/schemas/StaticIcon'
4308
+ ExportRequest:
4309
+ required:
4310
+ - exportType
4311
+ - eventId
4312
+ - observations
4313
+ - locations
4314
+ properties:
4315
+ exportType:
4316
+ $ref: '#/components/schemas/Export/properties/exportType'
4317
+ eventId:
4318
+ $ref: '#/components/schemas/Event/properties/id'
4319
+ startDate:
4320
+ type: string
4321
+ format: date-time
4322
+ endDate:
4323
+ type: string
4324
+ format: date-time
4325
+ observations:
4326
+ type: boolean
4327
+ locations:
4328
+ type: boolean
4329
+ attachments:
4330
+ type: boolean
4331
+ favorites:
4332
+ type: boolean
4333
+ important:
4334
+ type: boolean
4335
+
4336
+ parameters:
4337
+ userIdInPath:
4338
+ in: path
4339
+ name: userId
4340
+ description: The ID of the target user document
4341
+ required: true
4342
+ example: 5d0b2bfeeec24262f1a5fdf3
4343
+ schema: { $ref: '#/components/schemas/User/properties/id' }
4344
+ eventIdInPath:
4345
+ in: path
4346
+ name: eventId
4347
+ description: The ID of the target event document
4348
+ required: true
4349
+ example: 1234
4350
+ schema: { $ref: '#/components/schemas/Event/properties/id' }
4351
+ formIdInPath:
4352
+ in: path
4353
+ name: formId
4354
+ description: The ID of a form within an event
4355
+ required: true
4356
+ schema: { $ref: '#/components/schemas/Form/properties/id' }
4357
+ primaryFieldValueInPath:
4358
+ in: path
4359
+ name: primary
4360
+ description: The value of the primary form field
4361
+ required: true
4362
+ schema:
4363
+ type: string
4364
+ variantFieldValueInPath:
4365
+ in: path
4366
+ name: variant
4367
+ description: The value of the variant form field
4368
+ required: true
4369
+ schema:
4370
+ type: string
4371
+ layerIdInPath:
4372
+ in: path
4373
+ name: layerId
4374
+ description: The ID of the target layer document
4375
+ required: true
4376
+ schema: { $ref: '#/components/schemas/Layer/properties/id' }
4377
+ deviceIdInPath:
4378
+ in: path
4379
+ name: deviceId
4380
+ description: The ID of the target device document
4381
+ required: true
4382
+ schema: { $ref: '#/components/schemas/Device/properties/id' }
4383
+ roleIdInPath:
4384
+ in: path
4385
+ name: roleId
4386
+ description: The ID of the target role document
4387
+ required: true
4388
+ schema: { $ref: '#/components/schemas/Device/properties/id' }
4389
+ teamIdInPath:
4390
+ in: path
4391
+ name: teamId
4392
+ description: The ID of the target team document
4393
+ required: true
4394
+ schema: { $ref: '#/components/schemas/Team/properties/id' }
4395
+ observationIdInPath:
4396
+ in: path
4397
+ name: observationId
4398
+ description: The ID of the target observation document
4399
+ required: true
4400
+ schema: { $ref: '#/components/schemas/Observation/properties/id' }
4401
+ attachmentIdInPath:
4402
+ in: path
4403
+ name: attachmentId
4404
+ description: The ID of the target attachment document
4405
+ required: true
4406
+ schema: { $ref: '#/components/schemas/Attachment/properties/id' }
4407
+ observationQuery.fields:
4408
+ in: query
4409
+ name: fields
4410
+ description: >
4411
+ The form fields to project in the result observation documents (JSON)
4412
+ explode: false
4413
+ schema:
4414
+ type: array
4415
+ items:
4416
+ type: string
4417
+ observationQuery.startDate:
4418
+ in: query
4419
+ name: startDate
4420
+ schema:
4421
+ type: string
4422
+ format: date-time
4423
+ description: >
4424
+ The low end of the range for the observations' `lastModified`
4425
+ property
4426
+ observationQuery.endDate:
4427
+ in: query
4428
+ name: endDate
4429
+ schema:
4430
+ type: string
4431
+ format: date-time
4432
+ description: >
4433
+ The high end of the range for the observations' `lastModified`
4434
+ property
4435
+ observationQuery.observationStartDate:
4436
+ in: query
4437
+ name: observationStartDate
4438
+ schema:
4439
+ type: string
4440
+ format: date-time
4441
+ description: >
4442
+ The low end of the range for the observations' `timestamp`
4443
+ property
4444
+ observationQuery.observationEndDate:
4445
+ in: query
4446
+ name: observationEndDate
4447
+ schema:
4448
+ type: string
4449
+ format: date-time
4450
+ description: >
4451
+ The low end of the range for the observations' `lastModified`
4452
+ property
4453
+ observationQuery.bbox:
4454
+ in: query
4455
+ name: bbox
4456
+ description: >
4457
+ Bounding box array as a JSON string, e.g.
4458
+ `[xMin, yMin, xMax, yMax]`
4459
+ explode: false
4460
+ schema:
4461
+ $ref: 'geojson.yaml#/definitions/boundingBox'
4462
+ observationQuery.geometry:
4463
+ in: query
4464
+ name: geometry
4465
+ description: >
4466
+ A URL-encoded, stringified JSON object that is a GeoJSON geometry
4467
+ as defined in geojson.yaml#/definitions/geometryObject
4468
+ schema:
4469
+ type: string
4470
+ format: json
4471
+ observationQuery.states:
4472
+ in: query
4473
+ name: states
4474
+ explode: false
4475
+ schema:
4476
+ type: array
4477
+ items:
4478
+ $ref: '#/components/schemas/ObservationStateName'
4479
+ observationQuery.sort:
4480
+ in: query
4481
+ name: sort
4482
+ description: >
4483
+ The `sort` query parameter is a comma-separated list of sort keys.
4484
+ Currently, this operation only supports sorting on the
4485
+ `lastModified` key.
4486
+ explode: false
4487
+ schema:
4488
+ type: array
4489
+ items:
4490
+ $ref: '#/components/schemas/SortKey'
4491
+ authenticationConfigurationIdInPath:
4492
+ in: path
4493
+ name: id
4494
+ description: The id of the authentication configuration
4495
+ required: true
4496
+ schema:
4497
+ type: string
4498
+ authenticationConfigurationIncludeDisabled:
4499
+ in: query
4500
+ name: includeDisabled
4501
+ description: Flag to return disabled configs
4502
+ required: false
4503
+ schema:
4504
+ type: boolean
4505
+ feedIdInPath:
4506
+ in: path
4507
+ name: feedId
4508
+ description: The ID of the target feed document
4509
+ required: true
4510
+ example: abc1234
4511
+ schema: { $ref: '#/components/schemas/Feed/properties/id' }
4512
+ feedServiceTypeIdInPath:
4513
+ in: path
4514
+ name: feedServiceTypeId
4515
+ description: The ID of the feed service type
4516
+ required: true
4517
+ example: abc1234
4518
+ schema:
4519
+ type: string
4520
+ feedServiceIdInPath:
4521
+ in: path
4522
+ name: feedServiceId
4523
+ description: The ID of the target feed service document
4524
+ required: true
4525
+ example: abc1234
4526
+ schema: { $ref: '#/components/schemas/FeedService/properties/id' }
4527
+ feedTopicIdInPath:
4528
+ in: path
4529
+ name: feedTopicId
4530
+ description: The ID of the target feed topic document
4531
+ required: true
4532
+ example: abc1234
4533
+ schema: { $ref: '#/components/schemas/FeedTopic/properties/id' }
4534
+ iconIdInPath:
4535
+ in: path
4536
+ name: iconId
4537
+ description: The ID of the target icon document
4538
+ required: true
4539
+ example: abc1234
4540
+ schema: { $ref: '#/components/schemas/StaticIcon/properties/id' }
4541
+
4542
+ responses:
4543
+ FormIconInfo:
4544
+ description: Return the meta-data about a form icon.
4545
+ content:
4546
+ application/json:
4547
+ schema:
4548
+ $ref: '#/components/schemas/FormIcon'
4549
+ FormIconContent:
4550
+ description: >
4551
+ Return the form icon as a base-64-encoded string value within the icon
4552
+ meta-data document, or as a binary image.
4553
+ content:
4554
+ application/json:
4555
+ schema:
4556
+ $ref: '#/components/schemas/FormIconEmbedded'
4557
+ image/*:
4558
+ schema:
4559
+ type: string
4560
+ format: binary
4561
+
4562
+ requestBodies:
4563
+ DeviceIn:
4564
+ description: >
4565
+ A `DeviceIn` request body specifies the keys and values to save to a
4566
+ `Device` document in the database.
4567
+ required: true
4568
+ content:
4569
+ application/json:
4570
+ schema: { $ref: '#/components/schemas/DeviceIn' }
4571
+ application/x-www-form-urlencoded:
4572
+ schema: { $ref: '#/components/schemas/DeviceIn' }
4573
+ FormIconUpload:
4574
+ required: true
4575
+ content:
4576
+ multipart/form-data:
4577
+ schema:
4578
+ $ref: '#/components/schemas/FormIconUpload'
4579
+ encoding:
4580
+ icon:
4581
+ contentType: image/*
4582
+ ACLRoleUpdate:
4583
+ required: true
4584
+ content:
4585
+ application/json:
4586
+ schema:
4587
+ type: object
4588
+ properties:
4589
+ role:
4590
+ $ref: '#/components/schemas/ACLRole'
4591
+ required: [ role ]