@ngageoint/mage.service 6.3.0-beta.0
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.
- package/bin/mage.service.js +230 -0
- package/bin/migration.js +60 -0
- package/bin/poststop.sh +1 -0
- package/bin/prestart.sh +1 -0
- package/lib/@types/express/index.d.ts +18 -0
- package/lib/@types/geojson-validation/index.d.ts +15 -0
- package/lib/@types/mongodb-migrations/index.d.ts +99 -0
- package/lib/access/index.d.ts +21 -0
- package/lib/access/index.d.ts.map +1 -0
- package/lib/access/index.js +40 -0
- package/lib/access/index.js.map +1 -0
- package/lib/adapters/adapters.controllers.web.d.ts +22 -0
- package/lib/adapters/adapters.controllers.web.d.ts.map +1 -0
- package/lib/adapters/adapters.controllers.web.js +55 -0
- package/lib/adapters/adapters.controllers.web.js.map +1 -0
- package/lib/adapters/adapters.db.mongoose.d.ts +5 -0
- package/lib/adapters/adapters.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/adapters.db.mongoose.js +76 -0
- package/lib/adapters/adapters.db.mongoose.js.map +1 -0
- package/lib/adapters/adapters.simple_id_factory.d.ts +5 -0
- package/lib/adapters/adapters.simple_id_factory.d.ts.map +1 -0
- package/lib/adapters/adapters.simple_id_factory.js +24 -0
- package/lib/adapters/adapters.simple_id_factory.js.map +1 -0
- package/lib/adapters/base/adapters.base.db.mongoose.d.ts +59 -0
- package/lib/adapters/base/adapters.base.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/base/adapters.base.db.mongoose.js +151 -0
- package/lib/adapters/base/adapters.base.db.mongoose.js.map +1 -0
- package/lib/adapters/events/adapters.events.controllers.web.d.ts +14 -0
- package/lib/adapters/events/adapters.events.controllers.web.d.ts.map +1 -0
- package/lib/adapters/events/adapters.events.controllers.web.js +83 -0
- package/lib/adapters/events/adapters.events.controllers.web.js.map +1 -0
- package/lib/adapters/events/adapters.events.db.mongoose.d.ts +26 -0
- package/lib/adapters/events/adapters.events.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/events/adapters.events.db.mongoose.js +127 -0
- package/lib/adapters/events/adapters.events.db.mongoose.js.map +1 -0
- package/lib/adapters/feeds/adapters.feeds.controllers.web.d.ts +25 -0
- package/lib/adapters/feeds/adapters.feeds.controllers.web.d.ts.map +1 -0
- package/lib/adapters/feeds/adapters.feeds.controllers.web.js +234 -0
- package/lib/adapters/feeds/adapters.feeds.controllers.web.js.map +1 -0
- package/lib/adapters/feeds/adapters.feeds.db.mongoose.d.ts +69 -0
- package/lib/adapters/feeds/adapters.feeds.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/feeds/adapters.feeds.db.mongoose.js +206 -0
- package/lib/adapters/feeds/adapters.feeds.db.mongoose.js.map +1 -0
- package/lib/adapters/icons/adapters.icons.content_store.file_system.d.ts +7 -0
- package/lib/adapters/icons/adapters.icons.content_store.file_system.d.ts.map +1 -0
- package/lib/adapters/icons/adapters.icons.content_store.file_system.js +13 -0
- package/lib/adapters/icons/adapters.icons.content_store.file_system.js.map +1 -0
- package/lib/adapters/icons/adapters.icons.controllers.web.d.ts +10 -0
- package/lib/adapters/icons/adapters.icons.controllers.web.d.ts.map +1 -0
- package/lib/adapters/icons/adapters.icons.controllers.web.js +118 -0
- package/lib/adapters/icons/adapters.icons.controllers.web.js.map +1 -0
- package/lib/adapters/icons/adapters.icons.db.mongoose.d.ts +39 -0
- package/lib/adapters/icons/adapters.icons.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/icons/adapters.icons.db.mongoose.js +295 -0
- package/lib/adapters/icons/adapters.icons.db.mongoose.js.map +1 -0
- package/lib/adapters/observations/adapters.observations.attachment_store.file_system.d.ts +29 -0
- package/lib/adapters/observations/adapters.observations.attachment_store.file_system.d.ts.map +1 -0
- package/lib/adapters/observations/adapters.observations.attachment_store.file_system.js +274 -0
- package/lib/adapters/observations/adapters.observations.attachment_store.file_system.js.map +1 -0
- package/lib/adapters/observations/adapters.observations.controllers.web.d.ts +40 -0
- package/lib/adapters/observations/adapters.observations.controllers.web.d.ts.map +1 -0
- package/lib/adapters/observations/adapters.observations.controllers.web.js +196 -0
- package/lib/adapters/observations/adapters.observations.controllers.web.js.map +1 -0
- package/lib/adapters/observations/adapters.observations.db.mongoose.d.ts +30 -0
- package/lib/adapters/observations/adapters.observations.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/observations/adapters.observations.db.mongoose.js +295 -0
- package/lib/adapters/observations/adapters.observations.db.mongoose.js.map +1 -0
- package/lib/adapters/plugins/adapters.plugins.db.mongoose.d.ts +17 -0
- package/lib/adapters/plugins/adapters.plugins.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/plugins/adapters.plugins.db.mongoose.js +59 -0
- package/lib/adapters/plugins/adapters.plugins.db.mongoose.js.map +1 -0
- package/lib/adapters/url_schemes/adapters.url_schemes.plugin.d.ts +39 -0
- package/lib/adapters/url_schemes/adapters.url_schemes.plugin.d.ts.map +1 -0
- package/lib/adapters/url_schemes/adapters.url_schemes.plugin.js +110 -0
- package/lib/adapters/url_schemes/adapters.url_schemes.plugin.js.map +1 -0
- package/lib/adapters/users/adapters.users.controllers.web.d.ts +7 -0
- package/lib/adapters/users/adapters.users.controllers.web.d.ts.map +1 -0
- package/lib/adapters/users/adapters.users.controllers.web.js +37 -0
- package/lib/adapters/users/adapters.users.controllers.web.js.map +1 -0
- package/lib/adapters/users/adapters.users.db.mongoose.d.ts +19 -0
- package/lib/adapters/users/adapters.users.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/users/adapters.users.db.mongoose.js +133 -0
- package/lib/adapters/users/adapters.users.db.mongoose.js.map +1 -0
- package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.d.ts +3 -0
- package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.d.ts.map +1 -0
- package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.js +53 -0
- package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.js.map +1 -0
- package/lib/api/attachment.d.ts +12 -0
- package/lib/api/attachment.d.ts.map +1 -0
- package/lib/api/attachment.js +81 -0
- package/lib/api/attachment.js.map +1 -0
- package/lib/api/event.d.ts +20 -0
- package/lib/api/event.d.ts.map +1 -0
- package/lib/api/event.js +185 -0
- package/lib/api/event.js.map +1 -0
- package/lib/api/events/location.d.ts +11 -0
- package/lib/api/events/location.d.ts.map +1 -0
- package/lib/api/events/location.js +13 -0
- package/lib/api/events/location.js.map +1 -0
- package/lib/api/events/observation.d.ts +15 -0
- package/lib/api/events/observation.d.ts.map +1 -0
- package/lib/api/events/observation.js +21 -0
- package/lib/api/events/observation.js.map +1 -0
- package/lib/api/feature.d.ts +8 -0
- package/lib/api/feature.d.ts.map +1 -0
- package/lib/api/feature.js +15 -0
- package/lib/api/feature.js.map +1 -0
- package/lib/api/field/attachmentField.d.ts +12 -0
- package/lib/api/field/attachmentField.d.ts.map +1 -0
- package/lib/api/field/attachmentField.js +40 -0
- package/lib/api/field/attachmentField.js.map +1 -0
- package/lib/api/field/checkboxField.d.ts +7 -0
- package/lib/api/field/checkboxField.d.ts.map +1 -0
- package/lib/api/field/checkboxField.js +19 -0
- package/lib/api/field/checkboxField.js.map +1 -0
- package/lib/api/field/dateField.d.ts +8 -0
- package/lib/api/field/dateField.d.ts.map +1 -0
- package/lib/api/field/dateField.js +21 -0
- package/lib/api/field/dateField.js.map +1 -0
- package/lib/api/field/emailField.d.ts +7 -0
- package/lib/api/field/emailField.d.ts.map +1 -0
- package/lib/api/field/emailField.js +19 -0
- package/lib/api/field/emailField.js.map +1 -0
- package/lib/api/field/field.d.ts +12 -0
- package/lib/api/field/field.d.ts.map +1 -0
- package/lib/api/field/field.js +12 -0
- package/lib/api/field/field.js.map +1 -0
- package/lib/api/field/geometryField.d.ts +7 -0
- package/lib/api/field/geometryField.d.ts.map +1 -0
- package/lib/api/field/geometryField.js +35 -0
- package/lib/api/field/geometryField.js.map +1 -0
- package/lib/api/field/index.d.ts +7 -0
- package/lib/api/field/index.d.ts.map +1 -0
- package/lib/api/field/index.js +30 -0
- package/lib/api/field/index.js.map +1 -0
- package/lib/api/field/multiSelectField.d.ts +7 -0
- package/lib/api/field/multiSelectField.d.ts.map +1 -0
- package/lib/api/field/multiSelectField.js +27 -0
- package/lib/api/field/multiSelectField.js.map +1 -0
- package/lib/api/field/numberField.d.ts +7 -0
- package/lib/api/field/numberField.d.ts.map +1 -0
- package/lib/api/field/numberField.js +27 -0
- package/lib/api/field/numberField.js.map +1 -0
- package/lib/api/field/selectField.d.ts +7 -0
- package/lib/api/field/selectField.d.ts.map +1 -0
- package/lib/api/field/selectField.js +22 -0
- package/lib/api/field/selectField.js.map +1 -0
- package/lib/api/field/textField.d.ts +7 -0
- package/lib/api/field/textField.d.ts.map +1 -0
- package/lib/api/field/textField.js +21 -0
- package/lib/api/field/textField.js.map +1 -0
- package/lib/api/form.d.ts +12 -0
- package/lib/api/form.d.ts.map +1 -0
- package/lib/api/form.js +239 -0
- package/lib/api/form.js.map +1 -0
- package/lib/api/icon.d.ts +22 -0
- package/lib/api/icon.d.ts.map +1 -0
- package/lib/api/icon.js +178 -0
- package/lib/api/icon.js.map +1 -0
- package/lib/api/index.d.ts +10 -0
- package/lib/api/index.d.ts.map +1 -0
- package/lib/api/index.js +11 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/layer.d.ts +73 -0
- package/lib/api/layer.d.ts.map +1 -0
- package/lib/api/layer.js +70 -0
- package/lib/api/layer.js.map +1 -0
- package/lib/api/location.d.ts +81 -0
- package/lib/api/location.d.ts.map +1 -0
- package/lib/api/location.js +35 -0
- package/lib/api/location.js.map +1 -0
- package/lib/api/observation.d.ts +25 -0
- package/lib/api/observation.d.ts.map +1 -0
- package/lib/api/observation.js +224 -0
- package/lib/api/observation.js.map +1 -0
- package/lib/api/user.d.ts +16 -0
- package/lib/api/user.d.ts.map +1 -0
- package/lib/api/user.js +250 -0
- package/lib/api/user.js.map +1 -0
- package/lib/app.api/app.api.errors.d.ts +42 -0
- package/lib/app.api/app.api.errors.d.ts.map +1 -0
- package/lib/app.api/app.api.errors.js +43 -0
- package/lib/app.api/app.api.errors.js.map +1 -0
- package/lib/app.api/app.api.global.d.ts +74 -0
- package/lib/app.api/app.api.global.d.ts.map +1 -0
- package/lib/app.api/app.api.global.js +59 -0
- package/lib/app.api/app.api.global.js.map +1 -0
- package/lib/app.api/events/app.api.events.d.ts +31 -0
- package/lib/app.api/events/app.api.events.d.ts.map +1 -0
- package/lib/app.api/events/app.api.events.js +3 -0
- package/lib/app.api/events/app.api.events.js.map +1 -0
- package/lib/app.api/feeds/app.api.feeds.d.ts +139 -0
- package/lib/app.api/feeds/app.api.feeds.d.ts.map +1 -0
- package/lib/app.api/feeds/app.api.feeds.js +26 -0
- package/lib/app.api/feeds/app.api.feeds.js.map +1 -0
- package/lib/app.api/icons/app.api.icons.d.ts +61 -0
- package/lib/app.api/icons/app.api.icons.d.ts.map +1 -0
- package/lib/app.api/icons/app.api.icons.js +29 -0
- package/lib/app.api/icons/app.api.icons.js.map +1 -0
- package/lib/app.api/observations/app.api.observations.d.ts +126 -0
- package/lib/app.api/observations/app.api.observations.d.ts.map +1 -0
- package/lib/app.api/observations/app.api.observations.js +61 -0
- package/lib/app.api/observations/app.api.observations.js.map +1 -0
- package/lib/app.api/users/app.api.users.d.ts +24 -0
- package/lib/app.api/users/app.api.users.d.ts.map +1 -0
- package/lib/app.api/users/app.api.users.js +3 -0
- package/lib/app.api/users/app.api.users.js.map +1 -0
- package/lib/app.d.ts +38 -0
- package/lib/app.d.ts.map +1 -0
- package/lib/app.impl/events/app.impl.events.d.ts +8 -0
- package/lib/app.impl/events/app.impl.events.d.ts.map +1 -0
- package/lib/app.impl/events/app.impl.events.js +107 -0
- package/lib/app.impl/events/app.impl.events.js.map +1 -0
- package/lib/app.impl/feeds/app.impl.feeds.d.ts +21 -0
- package/lib/app.impl/feeds/app.impl.feeds.d.ts.map +1 -0
- package/lib/app.impl/feeds/app.impl.feeds.js +527 -0
- package/lib/app.impl/feeds/app.impl.feeds.js.map +1 -0
- package/lib/app.impl/icons/app.impl.icons.d.ts +7 -0
- package/lib/app.impl/icons/app.impl.icons.d.ts.map +1 -0
- package/lib/app.impl/icons/app.impl.icons.js +81 -0
- package/lib/app.impl/icons/app.impl.icons.js.map +1 -0
- package/lib/app.impl/observations/app.impl.observations.d.ts +11 -0
- package/lib/app.impl/observations/app.impl.observations.d.ts.map +1 -0
- package/lib/app.impl/observations/app.impl.observations.js +357 -0
- package/lib/app.impl/observations/app.impl.observations.js.map +1 -0
- package/lib/app.impl/users/app.impl.users.d.ts +4 -0
- package/lib/app.impl/users/app.impl.users.d.ts.map +1 -0
- package/lib/app.impl/users/app.impl.users.js +37 -0
- package/lib/app.impl/users/app.impl.users.js.map +1 -0
- package/lib/app.js +506 -0
- package/lib/app.js.map +1 -0
- package/lib/assets/default-icon.png +0 -0
- package/lib/authentication/anonymous.d.ts +6 -0
- package/lib/authentication/anonymous.d.ts.map +1 -0
- package/lib/authentication/anonymous.js +17 -0
- package/lib/authentication/anonymous.js.map +1 -0
- package/lib/authentication/index.d.ts +24 -0
- package/lib/authentication/index.d.ts.map +1 -0
- package/lib/authentication/index.js +104 -0
- package/lib/authentication/index.js.map +1 -0
- package/lib/authentication/ldap.d.ts +2 -0
- package/lib/authentication/ldap.d.ts.map +1 -0
- package/lib/authentication/ldap.js +130 -0
- package/lib/authentication/ldap.js.map +1 -0
- package/lib/authentication/local.d.ts +2 -0
- package/lib/authentication/local.d.ts.map +1 -0
- package/lib/authentication/local.js +77 -0
- package/lib/authentication/local.js.map +1 -0
- package/lib/authentication/oauth.d.ts +2 -0
- package/lib/authentication/oauth.d.ts.map +1 -0
- package/lib/authentication/oauth.js +197 -0
- package/lib/authentication/oauth.js.map +1 -0
- package/lib/authentication/openidconnect.d.ts +2 -0
- package/lib/authentication/openidconnect.d.ts.map +1 -0
- package/lib/authentication/openidconnect.js +148 -0
- package/lib/authentication/openidconnect.js.map +1 -0
- package/lib/authentication/saml.d.ts +2 -0
- package/lib/authentication/saml.d.ts.map +1 -0
- package/lib/authentication/saml.js +287 -0
- package/lib/authentication/saml.js.map +1 -0
- package/lib/authentication/verification.d.ts +33 -0
- package/lib/authentication/verification.d.ts.map +1 -0
- package/lib/authentication/verification.js +144 -0
- package/lib/authentication/verification.js.map +1 -0
- package/lib/config.d.ts +15 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +20 -0
- package/lib/config.js.map +1 -0
- package/lib/dist-package.json +201 -0
- package/lib/docs/auth/local.yaml +90 -0
- package/lib/docs/geojson.yaml +375 -0
- package/lib/docs/openapi.yaml +4591 -0
- package/lib/entities/authentication/entities.authentication.d.ts +14 -0
- package/lib/entities/authentication/entities.authentication.d.ts.map +1 -0
- package/lib/entities/authentication/entities.authentication.js +3 -0
- package/lib/entities/authentication/entities.authentication.js.map +1 -0
- package/lib/entities/authorization/entities.authorization.d.ts +7 -0
- package/lib/entities/authorization/entities.authorization.d.ts.map +1 -0
- package/lib/entities/authorization/entities.authorization.js +3 -0
- package/lib/entities/authorization/entities.authorization.js.map +1 -0
- package/lib/entities/authorization/entities.permissions.d.ts +143 -0
- package/lib/entities/authorization/entities.permissions.d.ts.map +1 -0
- package/lib/entities/authorization/entities.permissions.js +101 -0
- package/lib/entities/authorization/entities.permissions.js.map +1 -0
- package/lib/entities/entities.domain_events.d.ts +1 -0
- package/lib/entities/entities.domain_events.d.ts.map +1 -0
- package/lib/entities/entities.domain_events.js +20 -0
- package/lib/entities/entities.domain_events.js.map +1 -0
- package/lib/entities/entities.global.d.ts +108 -0
- package/lib/entities/entities.global.d.ts.map +1 -0
- package/lib/entities/entities.global.js +67 -0
- package/lib/entities/entities.global.js.map +1 -0
- package/lib/entities/entities.i18n.d.ts +78 -0
- package/lib/entities/entities.i18n.d.ts.map +1 -0
- package/lib/entities/entities.i18n.js +69 -0
- package/lib/entities/entities.i18n.js.map +1 -0
- package/lib/entities/entities.json_types.d.ts +42 -0
- package/lib/entities/entities.json_types.d.ts.map +1 -0
- package/lib/entities/entities.json_types.js +3 -0
- package/lib/entities/entities.json_types.js.map +1 -0
- package/lib/entities/events/entities.events.d.ts +118 -0
- package/lib/entities/events/entities.events.d.ts.map +1 -0
- package/lib/entities/events/entities.events.forms.d.ts +132 -0
- package/lib/entities/events/entities.events.forms.d.ts.map +1 -0
- package/lib/entities/events/entities.events.forms.js +102 -0
- package/lib/entities/events/entities.events.forms.js.map +1 -0
- package/lib/entities/events/entities.events.js +146 -0
- package/lib/entities/events/entities.events.js.map +1 -0
- package/lib/entities/feeds/entities.feeds.d.ts +340 -0
- package/lib/entities/feeds/entities.feeds.d.ts.map +1 -0
- package/lib/entities/feeds/entities.feeds.js +213 -0
- package/lib/entities/feeds/entities.feeds.js.map +1 -0
- package/lib/entities/icons/entities.icons.d.ts +107 -0
- package/lib/entities/icons/entities.icons.d.ts.map +1 -0
- package/lib/entities/icons/entities.icons.js +26 -0
- package/lib/entities/icons/entities.icons.js.map +1 -0
- package/lib/entities/observations/entities.observations.d.ts +580 -0
- package/lib/entities/observations/entities.observations.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.attachment.d.ts +5 -0
- package/lib/entities/observations/entities.observations.fields.attachment.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.attachment.js +24 -0
- package/lib/entities/observations/entities.observations.fields.attachment.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.checkbox.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.checkbox.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.checkbox.js +17 -0
- package/lib/entities/observations/entities.observations.fields.checkbox.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.d.ts +20 -0
- package/lib/entities/observations/entities.observations.fields.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.date.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.date.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.date.js +21 -0
- package/lib/entities/observations/entities.observations.fields.date.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.email.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.email.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.email.js +20 -0
- package/lib/entities/observations/entities.observations.fields.email.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.geometry.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.geometry.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.geometry.js +62 -0
- package/lib/entities/observations/entities.observations.fields.geometry.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.js +37 -0
- package/lib/entities/observations/entities.observations.fields.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.multiselect.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.multiselect.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.multiselect.js +24 -0
- package/lib/entities/observations/entities.observations.fields.multiselect.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.numeric.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.numeric.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.numeric.js +24 -0
- package/lib/entities/observations/entities.observations.fields.numeric.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.required.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.required.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.required.js +14 -0
- package/lib/entities/observations/entities.observations.fields.required.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.select.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.select.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.select.js +17 -0
- package/lib/entities/observations/entities.observations.fields.select.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.text.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.text.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.text.js +15 -0
- package/lib/entities/observations/entities.observations.fields.text.js.map +1 -0
- package/lib/entities/observations/entities.observations.js +873 -0
- package/lib/entities/observations/entities.observations.js.map +1 -0
- package/lib/entities/ogcapi-features/entities.ogcapi-features.d.ts +98 -0
- package/lib/entities/ogcapi-features/entities.ogcapi-features.d.ts.map +1 -0
- package/lib/entities/ogcapi-features/entities.ogcapi-features.js +30 -0
- package/lib/entities/ogcapi-features/entities.ogcapi-features.js.map +1 -0
- package/lib/entities/teams/entities.teams.d.ts +26 -0
- package/lib/entities/teams/entities.teams.d.ts.map +1 -0
- package/lib/entities/teams/entities.teams.js +3 -0
- package/lib/entities/teams/entities.teams.js.map +1 -0
- package/lib/entities/users/entities.users.d.ts +66 -0
- package/lib/entities/users/entities.users.d.ts.map +1 -0
- package/lib/entities/users/entities.users.js +10 -0
- package/lib/entities/users/entities.users.js.map +1 -0
- package/lib/environment/env.d.ts +26 -0
- package/lib/environment/env.d.ts.map +1 -0
- package/lib/environment/env.js +136 -0
- package/lib/environment/env.js.map +1 -0
- package/lib/export/csv.d.ts +11 -0
- package/lib/export/csv.d.ts.map +1 -0
- package/lib/export/csv.js +243 -0
- package/lib/export/csv.js.map +1 -0
- package/lib/export/exporter.d.ts +79 -0
- package/lib/export/exporter.d.ts.map +1 -0
- package/lib/export/exporter.js +38 -0
- package/lib/export/exporter.js.map +1 -0
- package/lib/export/exporterFactory.d.ts +11 -0
- package/lib/export/exporterFactory.d.ts.map +1 -0
- package/lib/export/exporterFactory.js +17 -0
- package/lib/export/exporterFactory.js.map +1 -0
- package/lib/export/geojson.d.ts +10 -0
- package/lib/export/geojson.d.ts.map +1 -0
- package/lib/export/geojson.js +167 -0
- package/lib/export/geojson.js.map +1 -0
- package/lib/export/geopackage.d.ts +25 -0
- package/lib/export/geopackage.d.ts.map +1 -0
- package/lib/export/geopackage.js +687 -0
- package/lib/export/geopackage.js.map +1 -0
- package/lib/export/kml.d.ts +10 -0
- package/lib/export/kml.d.ts.map +1 -0
- package/lib/export/kml.js +128 -0
- package/lib/export/kml.js.map +1 -0
- package/lib/export/kmlWriter.d.ts +24 -0
- package/lib/export/kmlWriter.d.ts.map +1 -0
- package/lib/export/kmlWriter.js +431 -0
- package/lib/export/kmlWriter.js.map +1 -0
- package/lib/express.d.ts +9 -0
- package/lib/express.d.ts.map +1 -0
- package/lib/express.js +70 -0
- package/lib/express.js.map +1 -0
- package/lib/format/geoJsonFormat.d.ts +3 -0
- package/lib/format/geoJsonFormat.d.ts.map +1 -0
- package/lib/format/geoJsonFormat.js +65 -0
- package/lib/format/geoJsonFormat.js.map +1 -0
- package/lib/logger.d.ts +2 -0
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +21 -0
- package/lib/logger.js.map +1 -0
- package/lib/main.impl/main.impl.plugins.d.ts +12 -0
- package/lib/main.impl/main.impl.plugins.d.ts.map +1 -0
- package/lib/main.impl/main.impl.plugins.js +41 -0
- package/lib/main.impl/main.impl.plugins.js.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.d.ts +3 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.d.ts.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.js +32 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.js.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.d.ts +4 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.d.ts.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.js +26 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.js.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.d.ts +4 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.d.ts.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.js +41 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.js.map +1 -0
- package/lib/migrate.d.ts +4 -0
- package/lib/migrate.d.ts.map +1 -0
- package/lib/migrate.js +96 -0
- package/lib/migrate.js.map +1 -0
- package/lib/migrations/002-create-user-role.d.ts +4 -0
- package/lib/migrations/002-create-user-role.d.ts.map +1 -0
- package/lib/migrations/002-create-user-role.js +30 -0
- package/lib/migrations/002-create-user-role.js.map +1 -0
- package/lib/migrations/003-create-admin-role.d.ts +4 -0
- package/lib/migrations/003-create-admin-role.d.ts.map +1 -0
- package/lib/migrations/003-create-admin-role.js +31 -0
- package/lib/migrations/003-create-admin-role.js.map +1 -0
- package/lib/migrations/005-create-osm-layer.d.ts +4 -0
- package/lib/migrations/005-create-osm-layer.d.ts.map +1 -0
- package/lib/migrations/005-create-osm-layer.js +51 -0
- package/lib/migrations/005-create-osm-layer.js.map +1 -0
- package/lib/migrations/006-event-teams.d.ts +4 -0
- package/lib/migrations/006-event-teams.d.ts.map +1 -0
- package/lib/migrations/006-event-teams.js +40 -0
- package/lib/migrations/006-event-teams.js.map +1 -0
- package/lib/migrations/007-user-icon.d.ts +4 -0
- package/lib/migrations/007-user-icon.d.ts.map +1 -0
- package/lib/migrations/007-user-icon.js +21 -0
- package/lib/migrations/007-user-icon.js.map +1 -0
- package/lib/migrations/008-create-user-no-edit-role.d.ts +4 -0
- package/lib/migrations/008-create-user-no-edit-role.d.ts.map +1 -0
- package/lib/migrations/008-create-user-no-edit-role.js +34 -0
- package/lib/migrations/008-create-user-no-edit-role.js.map +1 -0
- package/lib/migrations/009-create-manager-role.d.ts +4 -0
- package/lib/migrations/009-create-manager-role.d.ts.map +1 -0
- package/lib/migrations/009-create-manager-role.js +50 -0
- package/lib/migrations/009-create-manager-role.js.map +1 -0
- package/lib/migrations/010-add-user-device-manager-role.d.ts +4 -0
- package/lib/migrations/010-add-user-device-manager-role.d.ts.map +1 -0
- package/lib/migrations/010-add-user-device-manager-role.js +38 -0
- package/lib/migrations/010-add-user-device-manager-role.js.map +1 -0
- package/lib/migrations/011-multiple-forms.d.ts +4 -0
- package/lib/migrations/011-multiple-forms.d.ts.map +1 -0
- package/lib/migrations/011-multiple-forms.js +161 -0
- package/lib/migrations/011-multiple-forms.js.map +1 -0
- package/lib/migrations/012-user-role-remove-delete.d.ts +4 -0
- package/lib/migrations/012-user-role-remove-delete.d.ts.map +1 -0
- package/lib/migrations/012-user-role-remove-delete.js +15 -0
- package/lib/migrations/012-user-role-remove-delete.js.map +1 -0
- package/lib/migrations/013-ensure-event-indexes.d.ts +4 -0
- package/lib/migrations/013-ensure-event-indexes.d.ts.map +1 -0
- package/lib/migrations/013-ensure-event-indexes.js +50 -0
- package/lib/migrations/013-ensure-event-indexes.js.map +1 -0
- package/lib/migrations/014-add-role-update-permission.d.ts +4 -0
- package/lib/migrations/014-add-role-update-permission.d.ts.map +1 -0
- package/lib/migrations/014-add-role-update-permission.js +15 -0
- package/lib/migrations/014-add-role-update-permission.js.map +1 -0
- package/lib/migrations/015-manager-role-add-user-create.d.ts +4 -0
- package/lib/migrations/015-manager-role-add-user-create.d.ts.map +1 -0
- package/lib/migrations/015-manager-role-add-user-create.js +15 -0
- package/lib/migrations/015-manager-role-add-user-create.js.map +1 -0
- package/lib/migrations/016-set-feed-primary-secondary.d.ts +4 -0
- package/lib/migrations/016-set-feed-primary-secondary.d.ts.map +1 -0
- package/lib/migrations/016-set-feed-primary-secondary.js +36 -0
- package/lib/migrations/016-set-feed-primary-secondary.js.map +1 -0
- package/lib/migrations/017-make-layers-available.d.ts +4 -0
- package/lib/migrations/017-make-layers-available.d.ts.map +1 -0
- package/lib/migrations/017-make-layers-available.js +48 -0
- package/lib/migrations/017-make-layers-available.js.map +1 -0
- package/lib/migrations/018-feeds-admin-permissions.d.ts +4 -0
- package/lib/migrations/018-feeds-admin-permissions.d.ts.map +1 -0
- package/lib/migrations/018-feeds-admin-permissions.js +32 -0
- package/lib/migrations/018-feeds-admin-permissions.js.map +1 -0
- package/lib/migrations/018-set-default-password-policy.d.ts +4 -0
- package/lib/migrations/018-set-default-password-policy.d.ts.map +1 -0
- package/lib/migrations/018-set-default-password-policy.js +73 -0
- package/lib/migrations/018-set-default-password-policy.js.map +1 -0
- package/lib/migrations/019-move-user-authentication.d.ts +4 -0
- package/lib/migrations/019-move-user-authentication.d.ts.map +1 -0
- package/lib/migrations/019-move-user-authentication.js +64 -0
- package/lib/migrations/019-move-user-authentication.js.map +1 -0
- package/lib/migrations/020-add-export-permissions.d.ts +4 -0
- package/lib/migrations/020-add-export-permissions.d.ts.map +1 -0
- package/lib/migrations/020-add-export-permissions.js +43 -0
- package/lib/migrations/020-add-export-permissions.js.map +1 -0
- package/lib/migrations/022-copy-auth-from-config-to-db.d.ts +4 -0
- package/lib/migrations/022-copy-auth-from-config-to-db.d.ts.map +1 -0
- package/lib/migrations/022-copy-auth-from-config-to-db.js +86 -0
- package/lib/migrations/022-copy-auth-from-config-to-db.js.map +1 -0
- package/lib/migrations/023-move-local-auth-from-settings.d.ts +4 -0
- package/lib/migrations/023-move-local-auth-from-settings.d.ts.map +1 -0
- package/lib/migrations/023-move-local-auth-from-settings.js +64 -0
- package/lib/migrations/023-move-local-auth-from-settings.js.map +1 -0
- package/lib/migrations/024-link-auth-to-auth-config.d.ts +4 -0
- package/lib/migrations/024-link-auth-to-auth-config.d.ts.map +1 -0
- package/lib/migrations/024-link-auth-to-auth-config.js +55 -0
- package/lib/migrations/024-link-auth-to-auth-config.js.map +1 -0
- package/lib/migrations/025-add-auth-config-permissions.d.ts +4 -0
- package/lib/migrations/025-add-auth-config-permissions.d.ts.map +1 -0
- package/lib/migrations/025-add-auth-config-permissions.js +39 -0
- package/lib/migrations/025-add-auth-config-permissions.js.map +1 -0
- package/lib/migrations/028-move-security-settings-to-secret-store.d.ts +4 -0
- package/lib/migrations/028-move-security-settings-to-secret-store.d.ts.map +1 -0
- package/lib/migrations/028-move-security-settings-to-secret-store.js +59 -0
- package/lib/migrations/028-move-security-settings-to-secret-store.js.map +1 -0
- package/lib/migrations/029-attachment-form-field.d.ts +4 -0
- package/lib/migrations/029-attachment-form-field.d.ts.map +1 -0
- package/lib/migrations/029-attachment-form-field.js +130 -0
- package/lib/migrations/029-attachment-form-field.js.map +1 -0
- package/lib/models/authentication.d.ts +102 -0
- package/lib/models/authentication.d.ts.map +1 -0
- package/lib/models/authentication.js +148 -0
- package/lib/models/authentication.js.map +1 -0
- package/lib/models/authenticationconfiguration.d.ts +196 -0
- package/lib/models/authenticationconfiguration.d.ts.map +1 -0
- package/lib/models/authenticationconfiguration.js +102 -0
- package/lib/models/authenticationconfiguration.js.map +1 -0
- package/lib/models/cappedLocation.d.ts +59 -0
- package/lib/models/cappedLocation.d.ts.map +1 -0
- package/lib/models/cappedLocation.js +76 -0
- package/lib/models/cappedLocation.js.map +1 -0
- package/lib/models/counter.d.ts +3 -0
- package/lib/models/counter.d.ts.map +1 -0
- package/lib/models/counter.js +37 -0
- package/lib/models/counter.js.map +1 -0
- package/lib/models/device.d.ts +131 -0
- package/lib/models/device.d.ts.map +1 -0
- package/lib/models/device.js +205 -0
- package/lib/models/device.js.map +1 -0
- package/lib/models/event.d.ts +75 -0
- package/lib/models/event.d.ts.map +1 -0
- package/lib/models/event.js +831 -0
- package/lib/models/event.js.map +1 -0
- package/lib/models/export.d.ts +263 -0
- package/lib/models/export.d.ts.map +1 -0
- package/lib/models/export.js +105 -0
- package/lib/models/export.js.map +1 -0
- package/lib/models/feature.d.ts +4 -0
- package/lib/models/feature.d.ts.map +1 -0
- package/lib/models/feature.js +41 -0
- package/lib/models/feature.js.map +1 -0
- package/lib/models/icon.d.ts +44 -0
- package/lib/models/icon.d.ts.map +1 -0
- package/lib/models/icon.js +69 -0
- package/lib/models/icon.js.map +1 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/index.d.ts.map +1 -0
- package/lib/models/index.js +12 -0
- package/lib/models/index.js.map +1 -0
- package/lib/models/layer.d.ts +82 -0
- package/lib/models/layer.d.ts.map +1 -0
- package/lib/models/layer.js +149 -0
- package/lib/models/layer.js.map +1 -0
- package/lib/models/location.d.ts +95 -0
- package/lib/models/location.d.ts.map +1 -0
- package/lib/models/location.js +96 -0
- package/lib/models/location.js.map +1 -0
- package/lib/models/login.d.ts +4 -0
- package/lib/models/login.d.ts.map +1 -0
- package/lib/models/login.js +88 -0
- package/lib/models/login.js.map +1 -0
- package/lib/models/observation.d.ts +93 -0
- package/lib/models/observation.d.ts.map +1 -0
- package/lib/models/observation.js +457 -0
- package/lib/models/observation.js.map +1 -0
- package/lib/models/role.d.ts +21 -0
- package/lib/models/role.d.ts.map +1 -0
- package/lib/models/role.js +78 -0
- package/lib/models/role.js.map +1 -0
- package/lib/models/setting.d.ts +53 -0
- package/lib/models/setting.d.ts.map +1 -0
- package/lib/models/setting.js +29 -0
- package/lib/models/setting.js.map +1 -0
- package/lib/models/team.d.ts +31 -0
- package/lib/models/team.d.ts.map +1 -0
- package/lib/models/team.js +518 -0
- package/lib/models/team.js.map +1 -0
- package/lib/models/token.d.ts +6 -0
- package/lib/models/token.d.ts.map +1 -0
- package/lib/models/token.js +68 -0
- package/lib/models/token.js.map +1 -0
- package/lib/models/user.d.ts +60 -0
- package/lib/models/user.d.ts.map +1 -0
- package/lib/models/user.js +405 -0
- package/lib/models/user.js.map +1 -0
- package/lib/permissions/permissions.events.d.ts +65 -0
- package/lib/permissions/permissions.events.d.ts.map +1 -0
- package/lib/permissions/permissions.events.js +154 -0
- package/lib/permissions/permissions.events.js.map +1 -0
- package/lib/permissions/permissions.feeds.d.ts +19 -0
- package/lib/permissions/permissions.feeds.d.ts.map +1 -0
- package/lib/permissions/permissions.feeds.js +58 -0
- package/lib/permissions/permissions.feeds.js.map +1 -0
- package/lib/permissions/permissions.icons.d.ts +9 -0
- package/lib/permissions/permissions.icons.d.ts.map +1 -0
- package/lib/permissions/permissions.icons.js +28 -0
- package/lib/permissions/permissions.icons.js.map +1 -0
- package/lib/permissions/permissions.observations.d.ts +14 -0
- package/lib/permissions/permissions.observations.d.ts.map +1 -0
- package/lib/permissions/permissions.observations.js +113 -0
- package/lib/permissions/permissions.observations.js.map +1 -0
- package/lib/permissions/permissions.role-based.base.d.ts +15 -0
- package/lib/permissions/permissions.role-based.base.d.ts.map +1 -0
- package/lib/permissions/permissions.role-based.base.js +14 -0
- package/lib/permissions/permissions.role-based.base.js.map +1 -0
- package/lib/permissions/permissions.users.d.ts +8 -0
- package/lib/permissions/permissions.users.d.ts.map +1 -0
- package/lib/permissions/permissions.users.js +23 -0
- package/lib/permissions/permissions.users.js.map +1 -0
- package/lib/plugins.api/index.d.ts +55 -0
- package/lib/plugins.api/index.d.ts.map +1 -0
- package/lib/plugins.api/index.js +5 -0
- package/lib/plugins.api/index.js.map +1 -0
- package/lib/plugins.api/plugins.api.db.d.ts +7 -0
- package/lib/plugins.api/plugins.api.db.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.db.js +5 -0
- package/lib/plugins.api/plugins.api.db.js.map +1 -0
- package/lib/plugins.api/plugins.api.events.d.ts +24 -0
- package/lib/plugins.api/plugins.api.events.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.events.js +5 -0
- package/lib/plugins.api/plugins.api.events.js.map +1 -0
- package/lib/plugins.api/plugins.api.feeds.d.ts +35 -0
- package/lib/plugins.api/plugins.api.feeds.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.feeds.js +12 -0
- package/lib/plugins.api/plugins.api.feeds.js.map +1 -0
- package/lib/plugins.api/plugins.api.icons.d.ts +21 -0
- package/lib/plugins.api/plugins.api.icons.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.icons.js +5 -0
- package/lib/plugins.api/plugins.api.icons.js.map +1 -0
- package/lib/plugins.api/plugins.api.observations.d.ts +10 -0
- package/lib/plugins.api/plugins.api.observations.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.observations.js +11 -0
- package/lib/plugins.api/plugins.api.observations.js.map +1 -0
- package/lib/plugins.api/plugins.api.users.d.ts +4 -0
- package/lib/plugins.api/plugins.api.users.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.users.js +5 -0
- package/lib/plugins.api/plugins.api.users.js.map +1 -0
- package/lib/plugins.api/plugins.api.web.d.ts +10 -0
- package/lib/plugins.api/plugins.api.web.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.web.js +3 -0
- package/lib/plugins.api/plugins.api.web.js.map +1 -0
- package/lib/provision/index.d.ts +23 -0
- package/lib/provision/index.d.ts.map +1 -0
- package/lib/provision/index.js +60 -0
- package/lib/provision/index.js.map +1 -0
- package/lib/provision/none.d.ts +3 -0
- package/lib/provision/none.d.ts.map +1 -0
- package/lib/provision/none.js +41 -0
- package/lib/provision/none.js.map +1 -0
- package/lib/provision/strategies/none.d.ts +9 -0
- package/lib/provision/strategies/none.d.ts.map +1 -0
- package/lib/provision/strategies/none.js +25 -0
- package/lib/provision/strategies/none.js.map +1 -0
- package/lib/provision/strategies/uid.d.ts +9 -0
- package/lib/provision/strategies/uid.d.ts.map +1 -0
- package/lib/provision/strategies/uid.js +28 -0
- package/lib/provision/strategies/uid.js.map +1 -0
- package/lib/provision/uid.d.ts +3 -0
- package/lib/provision/uid.d.ts.map +1 -0
- package/lib/provision/uid.js +43 -0
- package/lib/provision/uid.js.map +1 -0
- package/lib/routes/authenticationconfigurations.d.ts +3 -0
- package/lib/routes/authenticationconfigurations.d.ts.map +1 -0
- package/lib/routes/authenticationconfigurations.js +262 -0
- package/lib/routes/authenticationconfigurations.js.map +1 -0
- package/lib/routes/devices.d.ts +3 -0
- package/lib/routes/devices.d.ts.map +1 -0
- package/lib/routes/devices.js +206 -0
- package/lib/routes/devices.js.map +1 -0
- package/lib/routes/events.d.ts +47 -0
- package/lib/routes/events.d.ts.map +1 -0
- package/lib/routes/events.js +495 -0
- package/lib/routes/events.js.map +1 -0
- package/lib/routes/exports.d.ts +3 -0
- package/lib/routes/exports.d.ts.map +1 -0
- package/lib/routes/exports.js +204 -0
- package/lib/routes/exports.js.map +1 -0
- package/lib/routes/imports.d.ts +3 -0
- package/lib/routes/imports.d.ts.map +1 -0
- package/lib/routes/imports.js +41 -0
- package/lib/routes/imports.js.map +1 -0
- package/lib/routes/index.d.ts +3 -0
- package/lib/routes/index.d.ts.map +1 -0
- package/lib/routes/index.js +151 -0
- package/lib/routes/index.js.map +1 -0
- package/lib/routes/layers.d.ts +3 -0
- package/lib/routes/layers.d.ts.map +1 -0
- package/lib/routes/layers.js +433 -0
- package/lib/routes/layers.js.map +1 -0
- package/lib/routes/locations.d.ts +3 -0
- package/lib/routes/locations.d.ts.map +1 -0
- package/lib/routes/locations.js +124 -0
- package/lib/routes/locations.js.map +1 -0
- package/lib/routes/logins.d.ts +3 -0
- package/lib/routes/logins.d.ts.map +1 -0
- package/lib/routes/logins.js +64 -0
- package/lib/routes/logins.js.map +1 -0
- package/lib/routes/observations.d.ts +3 -0
- package/lib/routes/observations.d.ts.map +1 -0
- package/lib/routes/observations.js +368 -0
- package/lib/routes/observations.js.map +1 -0
- package/lib/routes/plugins.d.ts +3 -0
- package/lib/routes/plugins.d.ts.map +1 -0
- package/lib/routes/plugins.js +29 -0
- package/lib/routes/plugins.js.map +1 -0
- package/lib/routes/roles.d.ts +3 -0
- package/lib/routes/roles.d.ts.map +1 -0
- package/lib/routes/roles.js +64 -0
- package/lib/routes/roles.js.map +1 -0
- package/lib/routes/settings.d.ts +3 -0
- package/lib/routes/settings.d.ts.map +1 -0
- package/lib/routes/settings.js +21 -0
- package/lib/routes/settings.js.map +1 -0
- package/lib/routes/setup.d.ts +3 -0
- package/lib/routes/setup.d.ts.map +1 -0
- package/lib/routes/setup.js +90 -0
- package/lib/routes/setup.js.map +1 -0
- package/lib/routes/teams.d.ts +3 -0
- package/lib/routes/teams.d.ts.map +1 -0
- package/lib/routes/teams.js +213 -0
- package/lib/routes/teams.js.map +1 -0
- package/lib/routes/users.d.ts +3 -0
- package/lib/routes/users.d.ts.map +1 -0
- package/lib/routes/users.js +478 -0
- package/lib/routes/users.js.map +1 -0
- package/lib/schedule/export/export-task.d.ts +14 -0
- package/lib/schedule/export/export-task.d.ts.map +1 -0
- package/lib/schedule/export/export-task.js +70 -0
- package/lib/schedule/export/export-task.js.map +1 -0
- package/lib/schedule/index.d.ts +2 -0
- package/lib/schedule/index.d.ts.map +1 -0
- package/lib/schedule/index.js +27 -0
- package/lib/schedule/index.js.map +1 -0
- package/lib/security/key-mgt/key-mgt-factory.d.ts +7 -0
- package/lib/security/key-mgt/key-mgt-factory.d.ts.map +1 -0
- package/lib/security/key-mgt/key-mgt-factory.js +10 -0
- package/lib/security/key-mgt/key-mgt-factory.js.map +1 -0
- package/lib/security/key-mgt/plaintext-key-manager.d.ts +42 -0
- package/lib/security/key-mgt/plaintext-key-manager.d.ts.map +1 -0
- package/lib/security/key-mgt/plaintext-key-manager.js +52 -0
- package/lib/security/key-mgt/plaintext-key-manager.js.map +1 -0
- package/lib/security/responses/data-response.d.ts +13 -0
- package/lib/security/responses/data-response.d.ts.map +1 -0
- package/lib/security/responses/data-response.js +25 -0
- package/lib/security/responses/data-response.js.map +1 -0
- package/lib/security/secret-store-service.d.ts +39 -0
- package/lib/security/secret-store-service.d.ts.map +1 -0
- package/lib/security/secret-store-service.js +94 -0
- package/lib/security/secret-store-service.js.map +1 -0
- package/lib/security/storage/file-system-secret-store.d.ts +17 -0
- package/lib/security/storage/file-system-secret-store.d.ts.map +1 -0
- package/lib/security/storage/file-system-secret-store.js +46 -0
- package/lib/security/storage/file-system-secret-store.js.map +1 -0
- package/lib/security/storage/json-provider.d.ts +6 -0
- package/lib/security/storage/json-provider.d.ts.map +1 -0
- package/lib/security/storage/json-provider.js +17 -0
- package/lib/security/storage/json-provider.js.map +1 -0
- package/lib/security/utilities/secure-property-appender.d.ts +8 -0
- package/lib/security/utilities/secure-property-appender.d.ts.map +1 -0
- package/lib/security/utilities/secure-property-appender.js +39 -0
- package/lib/security/utilities/secure-property-appender.js.map +1 -0
- package/lib/transformers/authenticationconfiguration.d.ts +2 -0
- package/lib/transformers/authenticationconfiguration.d.ts.map +1 -0
- package/lib/transformers/authenticationconfiguration.js +22 -0
- package/lib/transformers/authenticationconfiguration.js.map +1 -0
- package/lib/transformers/export.d.ts +2 -0
- package/lib/transformers/export.d.ts.map +1 -0
- package/lib/transformers/export.js +13 -0
- package/lib/transformers/export.js.map +1 -0
- package/lib/transformers/geojson.d.ts +2 -0
- package/lib/transformers/geojson.d.ts.map +1 -0
- package/lib/transformers/geojson.js +24 -0
- package/lib/transformers/geojson.js.map +1 -0
- package/lib/transformers/layer.d.ts +2 -0
- package/lib/transformers/layer.d.ts.map +1 -0
- package/lib/transformers/layer.js +13 -0
- package/lib/transformers/layer.js.map +1 -0
- package/lib/transformers/observation.d.ts +2 -0
- package/lib/transformers/observation.d.ts.map +1 -0
- package/lib/transformers/observation.js +13 -0
- package/lib/transformers/observation.js.map +1 -0
- package/lib/transformers/pageinfo.d.ts +2 -0
- package/lib/transformers/pageinfo.d.ts.map +1 -0
- package/lib/transformers/pageinfo.js +27 -0
- package/lib/transformers/pageinfo.js.map +1 -0
- package/lib/transformers/user.d.ts +2 -0
- package/lib/transformers/user.d.ts.map +1 -0
- package/lib/transformers/user.js +19 -0
- package/lib/transformers/user.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/upload.d.ts +8 -0
- package/lib/upload.d.ts.map +1 -0
- package/lib/upload.js +30 -0
- package/lib/upload.js.map +1 -0
- package/lib/utilities/authenticationApiAppender.d.ts +10 -0
- package/lib/utilities/authenticationApiAppender.d.ts.map +1 -0
- package/lib/utilities/authenticationApiAppender.js +48 -0
- package/lib/utilities/authenticationApiAppender.js.map +1 -0
- package/lib/utilities/filterParser.d.ts +2 -0
- package/lib/utilities/filterParser.d.ts.map +1 -0
- package/lib/utilities/filterParser.js +87 -0
- package/lib/utilities/filterParser.js.map +1 -0
- package/lib/utilities/geopackage.d.ts +56 -0
- package/lib/utilities/geopackage.d.ts.map +1 -0
- package/lib/utilities/geopackage.js +335 -0
- package/lib/utilities/geopackage.js.map +1 -0
- package/lib/utilities/loader.d.ts +9 -0
- package/lib/utilities/loader.d.ts.map +1 -0
- package/lib/utilities/loader.js +25 -0
- package/lib/utilities/loader.js.map +1 -0
- package/lib/utilities/paging.d.ts +15 -0
- package/lib/utilities/paging.d.ts.map +1 -0
- package/lib/utilities/paging.js +56 -0
- package/lib/utilities/paging.js.map +1 -0
- package/lib/utilities/passwordValidator.d.ts +8 -0
- package/lib/utilities/passwordValidator.d.ts.map +1 -0
- package/lib/utilities/passwordValidator.js +175 -0
- package/lib/utilities/passwordValidator.js.map +1 -0
- package/lib/utilities/pbkdf2.d.ts +6 -0
- package/lib/utilities/pbkdf2.d.ts.map +1 -0
- package/lib/utilities/pbkdf2.js +79 -0
- package/lib/utilities/pbkdf2.js.map +1 -0
- package/lib/utilities/togeojson.d.ts +2 -0
- package/lib/utilities/togeojson.d.ts.map +1 -0
- package/lib/utilities/togeojson.js +308 -0
- package/lib/utilities/togeojson.js.map +1 -0
- package/lib/utilities/waitForMongooseConnection.d.ts +3 -0
- package/lib/utilities/waitForMongooseConnection.d.ts.map +1 -0
- package/lib/utilities/waitForMongooseConnection.js +34 -0
- package/lib/utilities/waitForMongooseConnection.js.map +1 -0
- package/lib/utilities/whitelist.d.ts +2 -0
- package/lib/utilities/whitelist.d.ts.map +1 -0
- package/lib/utilities/whitelist.js +18 -0
- package/lib/utilities/whitelist.js.map +1 -0
- package/lib/views/authentication.pug +10 -0
- package/lib/views/oauth.pug +12 -0
- package/lib/views/observation.pug +137 -0
- package/package.json +201 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
const util = require('util'), async = require('async'), archiver = require('archiver'), mgrs = require('mgrs'), moment = require('moment'), log = require('winston'), path = require('path'), json2csv = require('json2csv'), Exporter = require('./exporter'), { default: turfCentroid } = require('@turf/centroid'), wkx = require('wkx'), attachmentBase = require('../environment/env').attachmentBaseDirectory, User = require('../models/user'), Device = require('../models/device');
|
|
12
|
+
function Csv(options) {
|
|
13
|
+
Csv.super_.call(this, options);
|
|
14
|
+
}
|
|
15
|
+
util.inherits(Csv, Exporter);
|
|
16
|
+
module.exports = Csv;
|
|
17
|
+
function excelLink(attachmentName, attachmentNumber) {
|
|
18
|
+
return `=HYPERLINK("${attachmentName}", "attachment${attachmentNumber}")`;
|
|
19
|
+
}
|
|
20
|
+
Csv.prototype.export = function (streamable) {
|
|
21
|
+
const observationFields = [{
|
|
22
|
+
label: 'id',
|
|
23
|
+
value: 'id'
|
|
24
|
+
}, {
|
|
25
|
+
label: 'User',
|
|
26
|
+
value: 'user'
|
|
27
|
+
}, {
|
|
28
|
+
label: 'Device',
|
|
29
|
+
value: 'device'
|
|
30
|
+
}, {
|
|
31
|
+
label: 'Shape Type',
|
|
32
|
+
value: 'shapeType'
|
|
33
|
+
}, {
|
|
34
|
+
label: 'Latitude',
|
|
35
|
+
value: 'latitude'
|
|
36
|
+
}, {
|
|
37
|
+
label: 'Longitude',
|
|
38
|
+
value: 'longitude'
|
|
39
|
+
}, {
|
|
40
|
+
label: 'MGRS',
|
|
41
|
+
value: 'mgrs'
|
|
42
|
+
}, {
|
|
43
|
+
label: 'Date (ISO8601)',
|
|
44
|
+
value: 'timestamp'
|
|
45
|
+
}, {
|
|
46
|
+
label: 'Excel Timestamp (UTC)',
|
|
47
|
+
value: 'excelTimestamp'
|
|
48
|
+
}, {
|
|
49
|
+
label: 'Well Known Text',
|
|
50
|
+
value: 'wkt'
|
|
51
|
+
}, {
|
|
52
|
+
label: 'Location Provider',
|
|
53
|
+
value: 'provider'
|
|
54
|
+
}, {
|
|
55
|
+
label: 'Location Accuracy +/- (meters)',
|
|
56
|
+
value: 'accuracy'
|
|
57
|
+
}];
|
|
58
|
+
this._event.forms
|
|
59
|
+
.filter(form => !form.archived)
|
|
60
|
+
.forEach(form => {
|
|
61
|
+
const formPrefix = this._event.forms.length > 1 ? form.name + '.' : '';
|
|
62
|
+
form.fields
|
|
63
|
+
.filter(field => !field.archived)
|
|
64
|
+
.sort((a, b) => a.id - b.id)
|
|
65
|
+
.filter(field => field.type !== 'attachment')
|
|
66
|
+
.forEach(field => {
|
|
67
|
+
observationFields.push({
|
|
68
|
+
label: formPrefix + field.title,
|
|
69
|
+
value: formPrefix + field.name
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
observationFields.push({
|
|
74
|
+
label: 'Attachment',
|
|
75
|
+
value: 'attachment'
|
|
76
|
+
});
|
|
77
|
+
observationFields.push({
|
|
78
|
+
label: 'Attachment Excel Link',
|
|
79
|
+
value: 'attachmentExcelLink'
|
|
80
|
+
});
|
|
81
|
+
const locationFields = [
|
|
82
|
+
'user',
|
|
83
|
+
'timestamp',
|
|
84
|
+
'latitude',
|
|
85
|
+
'longitude',
|
|
86
|
+
'altitude',
|
|
87
|
+
'provider',
|
|
88
|
+
'mgrs',
|
|
89
|
+
'accuracy',
|
|
90
|
+
'speed',
|
|
91
|
+
'bearing',
|
|
92
|
+
'battery_level',
|
|
93
|
+
'device'
|
|
94
|
+
];
|
|
95
|
+
const archive = archiver('zip');
|
|
96
|
+
archive.pipe(streamable);
|
|
97
|
+
async.parallel([
|
|
98
|
+
done => {
|
|
99
|
+
if (!this._filter.exportObservations)
|
|
100
|
+
return done();
|
|
101
|
+
const asyncParser = new json2csv.AsyncParser({ fields: observationFields }, { readableObjectMode: true, writableObjectMode: true });
|
|
102
|
+
archive.append(asyncParser.processor, { name: 'observations.csv' });
|
|
103
|
+
this.streamObservations(asyncParser.input, archive, err => {
|
|
104
|
+
done(err);
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
done => {
|
|
108
|
+
if (!this._filter.exportLocations)
|
|
109
|
+
return done();
|
|
110
|
+
const asyncParser = new json2csv.AsyncParser({ fields: locationFields }, { readableObjectMode: true, writableObjectMode: true });
|
|
111
|
+
archive.append(asyncParser.processor, { name: 'locations.csv' });
|
|
112
|
+
this.streamLocations(asyncParser.input, err => {
|
|
113
|
+
done(err);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
], err => {
|
|
117
|
+
if (err) {
|
|
118
|
+
log.warn(err);
|
|
119
|
+
}
|
|
120
|
+
log.info('done writing csv, finalize archive');
|
|
121
|
+
archive.finalize();
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
Csv.prototype.streamObservations = function (stream, archive, done) {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
log.info("Retrieving observations from DB");
|
|
127
|
+
const cursor = this.requestObservations(this._filter);
|
|
128
|
+
let cache = {
|
|
129
|
+
user: null,
|
|
130
|
+
device: null
|
|
131
|
+
};
|
|
132
|
+
let numObservations = 0;
|
|
133
|
+
cursor.eachAsync((observation) => __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
const properties = yield this.flattenObservation(observation, cache, archive);
|
|
135
|
+
stream.push(properties);
|
|
136
|
+
numObservations++;
|
|
137
|
+
})).then(() => {
|
|
138
|
+
if (cursor)
|
|
139
|
+
cursor.close;
|
|
140
|
+
log.info('Successfully wrote ' + numObservations + ' observations to CSV');
|
|
141
|
+
log.info('done writing observations');
|
|
142
|
+
stream.push(null);
|
|
143
|
+
done();
|
|
144
|
+
}).catch(err => done(err));
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
Csv.prototype.flattenObservation = function (observation, cache, archive) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
const properties = observation.properties;
|
|
150
|
+
properties.id = observation.id;
|
|
151
|
+
if (!cache.user || cache.user._id.toString() !== observation.userId.toString()) {
|
|
152
|
+
cache.user = yield User.getUserById(observation.userId);
|
|
153
|
+
}
|
|
154
|
+
if (!cache.device || cache.device._id.toString() !== observation.deviceId.toString()) {
|
|
155
|
+
cache.device = yield Device.getDeviceById(observation.deviceId);
|
|
156
|
+
}
|
|
157
|
+
if (cache.user)
|
|
158
|
+
properties.user = cache.user.username;
|
|
159
|
+
if (cache.device)
|
|
160
|
+
properties.device = cache.device.uid;
|
|
161
|
+
const centroid = turfCentroid(observation);
|
|
162
|
+
properties.mgrs = mgrs.forward(centroid.geometry.coordinates);
|
|
163
|
+
properties.shapeType = observation.geometry.type;
|
|
164
|
+
if (observation.geometry.type === 'Point') {
|
|
165
|
+
properties.longitude = observation.geometry.coordinates[0];
|
|
166
|
+
properties.latitude = observation.geometry.coordinates[1];
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
properties.longitude = centroid.geometry.coordinates[0];
|
|
170
|
+
properties.latitude = centroid.geometry.coordinates[1];
|
|
171
|
+
}
|
|
172
|
+
properties.wkt = wkx.Geometry.parseGeoJSON(observation.geometry).toWkt();
|
|
173
|
+
properties.excelTimestamp = "=DATEVALUE(MID(INDIRECT(ADDRESS(ROW(),COLUMN()-1)),1,10)) + TIMEVALUE(MID(INDIRECT(ADDRESS(ROW(),COLUMN()-1)),12,8))";
|
|
174
|
+
if (observation.properties && observation.properties.forms) {
|
|
175
|
+
observation.properties.forms.forEach(observationForm => {
|
|
176
|
+
const form = this._event.formMap[observationForm.formId];
|
|
177
|
+
const formPrefix = this._event.forms.length > 1 ? form.name + '.' : '';
|
|
178
|
+
for (const name in observationForm) {
|
|
179
|
+
const field = form.fieldNameToField[name];
|
|
180
|
+
if (field) {
|
|
181
|
+
properties[formPrefix + field.name] = observationForm[name];
|
|
182
|
+
delete observationForm[name];
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
if (observation.attachments) {
|
|
188
|
+
observation.attachments.forEach((attachment, index) => {
|
|
189
|
+
const name = path.basename(attachment.relativePath);
|
|
190
|
+
properties.attachment = attachment.name;
|
|
191
|
+
properties.attachmentExcelLink = excelLink(name, index);
|
|
192
|
+
archive.file(path.join(attachmentBase, attachment.relativePath), { name });
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
return properties;
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
Csv.prototype.streamLocations = function (stream, done) {
|
|
199
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
200
|
+
const startDate = this._filter.startDate ? moment(this._filter.startDate) : null;
|
|
201
|
+
const endDate = this._filter.endDate ? moment(this._filter.endDate) : null;
|
|
202
|
+
log.info("Retrieving locations from DB");
|
|
203
|
+
const cursor = this.requestLocations({ startDate: startDate, endDate: endDate });
|
|
204
|
+
let cache = {
|
|
205
|
+
user: null,
|
|
206
|
+
device: null
|
|
207
|
+
};
|
|
208
|
+
let numLocations = 0;
|
|
209
|
+
cursor.eachAsync((location) => __awaiter(this, void 0, void 0, function* () {
|
|
210
|
+
const properties = yield this.flattenLocation(location, cache);
|
|
211
|
+
stream.push(properties);
|
|
212
|
+
numLocations++;
|
|
213
|
+
})).then(() => {
|
|
214
|
+
if (cursor)
|
|
215
|
+
cursor.close;
|
|
216
|
+
log.info('Successfully wrote ' + numLocations + ' locations to CSV');
|
|
217
|
+
log.info('done writing locations');
|
|
218
|
+
stream.push(null);
|
|
219
|
+
done();
|
|
220
|
+
}).catch(err => done(err));
|
|
221
|
+
});
|
|
222
|
+
};
|
|
223
|
+
Csv.prototype.flattenLocation = function (location, cache) {
|
|
224
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
225
|
+
log.debug('Flattening location ' + location._id.toString());
|
|
226
|
+
const properties = location.properties;
|
|
227
|
+
if (!cache.user || cache.user._id.toString() !== location.userId.toString()) {
|
|
228
|
+
cache.user = yield User.getUserById(location.userId);
|
|
229
|
+
}
|
|
230
|
+
if (!cache.device || cache.device._id.toString() !== properties.deviceId.toString()) {
|
|
231
|
+
cache.device = yield Device.getDeviceById(properties.deviceId);
|
|
232
|
+
}
|
|
233
|
+
if (cache.user)
|
|
234
|
+
properties.user = cache.user.username;
|
|
235
|
+
if (cache.device)
|
|
236
|
+
properties.device = cache.device.uid;
|
|
237
|
+
properties.longitude = location.geometry.coordinates[0];
|
|
238
|
+
properties.latitude = location.geometry.coordinates[1];
|
|
239
|
+
properties.mgrs = mgrs.forward(location.geometry.coordinates);
|
|
240
|
+
return properties;
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
//# sourceMappingURL=csv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csv.js","sourceRoot":"","sources":["../../src/export/csv.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,EACxB,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,EACxB,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,EAC9B,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,EACtB,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,EAC1B,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,EACxB,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,EACtB,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,EAC9B,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,EAChC,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,EACrD,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,EACpB,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,uBAAuB,EACtE,IAAI,GAAG,OAAO,CAAC,gBAAgB,CAAC,EAChC,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEzC,SAAS,GAAG,CAAC,OAAO;IAClB,GAAG,CAAC,MAAM,CAA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U,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QACvD,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAE9D,OAAO,UAAU,CAAC;IACpB,CAAC;CAAA,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
export = Exporter;
|
|
27
|
+
declare function Exporter(options: any): void;
|
|
28
|
+
declare class Exporter {
|
|
29
|
+
constructor(options: any);
|
|
30
|
+
_event: any;
|
|
31
|
+
_filter: any;
|
|
32
|
+
requestObservations(filter: any, done: any): any;
|
|
33
|
+
requestLocations(options: any, done: any): import("mongoose").Cursor<import("mongoose").Document<unknown, any, {
|
|
34
|
+
type: string;
|
|
35
|
+
teamIds: import("mongoose").Types.ObjectId[];
|
|
36
|
+
properties?: any;
|
|
37
|
+
userId?: import("mongoose").Types.ObjectId | undefined;
|
|
38
|
+
eventId?: number | undefined;
|
|
39
|
+
geometry?: {
|
|
40
|
+
required?: unknown;
|
|
41
|
+
type?: string | undefined;
|
|
42
|
+
} | undefined;
|
|
43
|
+
}> & {
|
|
44
|
+
type: string;
|
|
45
|
+
teamIds: import("mongoose").Types.ObjectId[];
|
|
46
|
+
properties?: any;
|
|
47
|
+
userId?: import("mongoose").Types.ObjectId | undefined;
|
|
48
|
+
eventId?: number | undefined;
|
|
49
|
+
geometry?: {
|
|
50
|
+
required?: unknown;
|
|
51
|
+
type?: string | undefined;
|
|
52
|
+
} | undefined;
|
|
53
|
+
} & {
|
|
54
|
+
_id: import("mongoose").Types.ObjectId;
|
|
55
|
+
}, import("mongoose").QueryOptions<import("mongoose").Document<unknown, any, {
|
|
56
|
+
type: string;
|
|
57
|
+
teamIds: import("mongoose").Types.ObjectId[];
|
|
58
|
+
properties?: any;
|
|
59
|
+
userId?: import("mongoose").Types.ObjectId | undefined;
|
|
60
|
+
eventId?: number | undefined;
|
|
61
|
+
geometry?: {
|
|
62
|
+
required?: unknown;
|
|
63
|
+
type?: string | undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
}> & {
|
|
66
|
+
type: string;
|
|
67
|
+
teamIds: import("mongoose").Types.ObjectId[];
|
|
68
|
+
properties?: any;
|
|
69
|
+
userId?: import("mongoose").Types.ObjectId | undefined;
|
|
70
|
+
eventId?: number | undefined;
|
|
71
|
+
geometry?: {
|
|
72
|
+
required?: unknown;
|
|
73
|
+
type?: string | undefined;
|
|
74
|
+
} | undefined;
|
|
75
|
+
} & {
|
|
76
|
+
_id: import("mongoose").Types.ObjectId;
|
|
77
|
+
}>> | undefined;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=exporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../src/export/exporter.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,8CAGC;;IAHD,0BAGC;IAFC,YAA2B;IAC3B,aAA6B;IAG/B,iDAeC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAaC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const Observation = require('../models/observation'), Location = require('../models/location');
|
|
3
|
+
function Exporter(options) {
|
|
4
|
+
this._event = options.event;
|
|
5
|
+
this._filter = options.filter;
|
|
6
|
+
}
|
|
7
|
+
Exporter.prototype.requestObservations = function (filter, done) {
|
|
8
|
+
const options = {
|
|
9
|
+
filter: {
|
|
10
|
+
states: ['active'],
|
|
11
|
+
observationStartDate: filter.startDate,
|
|
12
|
+
observationEndDate: filter.endDate,
|
|
13
|
+
favorites: filter.favorites,
|
|
14
|
+
important: filter.important,
|
|
15
|
+
attachments: filter.attachments
|
|
16
|
+
},
|
|
17
|
+
sort: { userId: 1 },
|
|
18
|
+
stream: true
|
|
19
|
+
};
|
|
20
|
+
return Observation.getObservations(this._event, options, done);
|
|
21
|
+
};
|
|
22
|
+
Exporter.prototype.requestLocations = function (options, done) {
|
|
23
|
+
const filter = {
|
|
24
|
+
eventId: this._event._id
|
|
25
|
+
};
|
|
26
|
+
if (options.userId)
|
|
27
|
+
filter.userId = options.userId;
|
|
28
|
+
if (options.lastLocationId)
|
|
29
|
+
filter.lastLocationId = options.lastLocationId;
|
|
30
|
+
if (options.startDate)
|
|
31
|
+
filter.startDate = options.startDate.toDate();
|
|
32
|
+
if (options.endDate)
|
|
33
|
+
filter.endDate = options.endDate.toDate();
|
|
34
|
+
const sort = { userId: 1, "properties.timestamp": 1, _id: 1 };
|
|
35
|
+
return Location.getLocations({ filter: filter, limit: options.limit, stream: true, sort: sort }, done);
|
|
36
|
+
};
|
|
37
|
+
module.exports = Exporter;
|
|
38
|
+
//# sourceMappingURL=exporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exporter.js","sourceRoot":"","sources":["../../src/export/exporter.js"],"names":[],"mappings":";AAAA,MAAM,WAAW,GAAG,OAAO,CAAC,uBAAuB,CAAC,EAChD,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAE7C,SAAS,QAAQ,CAAC,OAAO;IACvB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;AAChC,CAAC;AAED,QAAQ,CAAC,SAAS,CAAC,mBAAmB,GAAG,UAAU,MAAM,EAAE,IAAI;IAC7D,MAAM,OAAO,GAAG;QACd,MAAM,EAAE;YACN,MAAM,EAAE,CAAC,QAAQ,CAAC;YAClB,oBAAoB,EAAE,MAAM,CAAC,SAAS;YACtC,kBAAkB,EAAE,MAAM,CAAC,OAAO;YAClC,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,WAAW,EAAE,MAAM,CAAC,WAAW;SAChC;QACD,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;QACnB,MAAM,EAAE,IAAI;KACb,CAAA;IAED,OAAO,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AACjE,CAAC,CAAC;AAEF,QAAQ,CAAC,SAAS,CAAC,gBAAgB,GAAG,UAAU,OAAO,EAAE,IAAI;IAC3D,MAAM,MAAM,GAAG;QACb,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG;KACzB,CAAC;IAEF,IAAI,OAAO,CAAC,MAAM;QAAE,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IACnD,IAAI,OAAO,CAAC,cAAc;QAAE,MAAM,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;IAC3E,IAAI,OAAO,CAAC,SAAS;QAAE,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;IACrE,IAAI,OAAO,CAAC,OAAO;QAAE,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IAE/D,MAAM,IAAI,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,sBAAsB,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;IAE9D,OAAO,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;AACzG,CAAC,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _exports: ExporterFactory;
|
|
2
|
+
export = _exports;
|
|
3
|
+
declare function ExporterFactory(): void;
|
|
4
|
+
declare class ExporterFactory {
|
|
5
|
+
createExporter(type: any, options: any): Csv | Kml | GeoJson | GeoPackage | undefined;
|
|
6
|
+
}
|
|
7
|
+
import Csv = require("./csv");
|
|
8
|
+
import Kml = require("./kml");
|
|
9
|
+
import GeoJson = require("./geojson");
|
|
10
|
+
import GeoPackage = require("./geopackage");
|
|
11
|
+
//# sourceMappingURL=exporterFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exporterFactory.d.ts","sourceRoot":"","sources":["../../src/export/exporterFactory.js"],"names":[],"mappings":";;AAKA,yCAA8B;;IAE9B,sFAWC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const Kml = require('./kml'), Csv = require('./csv'), GeoJson = require('./geojson'), GeoPackage = require('./geopackage');
|
|
3
|
+
function ExporterFactory() { }
|
|
4
|
+
ExporterFactory.prototype.createExporter = function (type, options) {
|
|
5
|
+
switch (type) {
|
|
6
|
+
case 'kml':
|
|
7
|
+
return new Kml(options);
|
|
8
|
+
case 'geojson':
|
|
9
|
+
return new GeoJson(options);
|
|
10
|
+
case 'csv':
|
|
11
|
+
return new Csv(options);
|
|
12
|
+
case 'geopackage':
|
|
13
|
+
return new GeoPackage(options);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
module.exports = new ExporterFactory();
|
|
17
|
+
//# sourceMappingURL=exporterFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exporterFactory.js","sourceRoot":"","sources":["../../src/export/exporterFactory.js"],"names":[],"mappings":";AAAA,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,EACxB,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,EACtB,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,EAC9B,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAEzC,SAAS,eAAe,KAAK,CAAC;AAE9B,eAAe,CAAC,SAAS,CAAC,cAAc,GAAG,UAAU,IAAI,EAAE,OAAO;IAChE,QAAQ,IAAI,EAAE;QACZ,KAAK,KAAK;YACR,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;QAC1B,KAAK,SAAS;YACZ,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;QAC9B,KAAK,KAAK;YACR,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;QAC1B,KAAK,YAAY;YACf,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;KAClC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG,IAAI,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export = GeoJson;
|
|
2
|
+
declare function GeoJson(options: any): void;
|
|
3
|
+
declare class GeoJson {
|
|
4
|
+
constructor(options: any);
|
|
5
|
+
export(streamable: any): void;
|
|
6
|
+
mapObservationProperties(observation: any, archive: any): void;
|
|
7
|
+
streamObservations(stream: any, archive: any, done: any): Promise<void>;
|
|
8
|
+
streamLocations(stream: any, done: any): void;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=geojson.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geojson.d.ts","sourceRoot":"","sources":["../../src/export/geojson.js"],"names":[],"mappings":";AAiBA,6CAEC;;IAFD,0BAEC;IAKD,8BA8BC;IAED,+DAgEC;IAED,wEA8CC;IAED,8CA+BC"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
const util = require('util'), api = require('../api'), async = require('async'), archiver = require('archiver'), mgrs = require('mgrs'), moment = require('moment'), log = require('winston'), stream = require('stream'), path = require('path'), Exporter = require('./exporter'), attachmentBase = require('../environment/env').attachmentBaseDirectory, User = require('../models/user'), Device = require('../models/device'), { default: turfCentroid } = require('@turf/centroid');
|
|
12
|
+
function GeoJson(options) {
|
|
13
|
+
GeoJson.super_.call(this, options);
|
|
14
|
+
}
|
|
15
|
+
util.inherits(GeoJson, Exporter);
|
|
16
|
+
module.exports = GeoJson;
|
|
17
|
+
GeoJson.prototype.export = function (streamable) {
|
|
18
|
+
const archive = archiver('zip');
|
|
19
|
+
archive.pipe(streamable);
|
|
20
|
+
async.parallel([
|
|
21
|
+
done => {
|
|
22
|
+
if (!this._filter.exportObservations)
|
|
23
|
+
return done();
|
|
24
|
+
const observationStream = new stream.PassThrough();
|
|
25
|
+
archive.append(observationStream, { name: 'observations.geojson' });
|
|
26
|
+
this.streamObservations(observationStream, archive, err => {
|
|
27
|
+
observationStream.end();
|
|
28
|
+
done(err);
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
done => {
|
|
32
|
+
if (!this._filter.exportLocations)
|
|
33
|
+
return done();
|
|
34
|
+
const locationStream = new stream.PassThrough();
|
|
35
|
+
archive.append(locationStream, { name: 'locations.geojson' });
|
|
36
|
+
this.streamLocations(locationStream, err => {
|
|
37
|
+
locationStream.end();
|
|
38
|
+
done(err);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
], err => {
|
|
42
|
+
if (err)
|
|
43
|
+
log.warn(err);
|
|
44
|
+
archive.finalize();
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
GeoJson.prototype.mapObservationProperties = function (observation, archive) {
|
|
48
|
+
observation.properties = observation.properties || {};
|
|
49
|
+
observation.properties.timestamp = moment(observation.properties.timestamp).toISOString();
|
|
50
|
+
const centroid = turfCentroid(observation);
|
|
51
|
+
observation.properties.mgrs = mgrs.forward(centroid.geometry.coordinates);
|
|
52
|
+
if (observation.properties.forms) {
|
|
53
|
+
observation.properties.forms.forEach(observationForm => {
|
|
54
|
+
if (Object.keys(observationForm).length === 0)
|
|
55
|
+
return;
|
|
56
|
+
const form = this._event.formMap[observationForm.formId];
|
|
57
|
+
const formProperties = observation.properties[form.name] || [];
|
|
58
|
+
const properties = Object.fromEntries(form.fields
|
|
59
|
+
.filter(field => !field.archived && field.type !== 'password' && field.type !== 'geometry')
|
|
60
|
+
.filter(field => {
|
|
61
|
+
let hasValue = false;
|
|
62
|
+
switch (field.type) {
|
|
63
|
+
case 'attachment': {
|
|
64
|
+
hasValue = observation.attachments.some(attachment => {
|
|
65
|
+
return attachment.fieldName === field.name &&
|
|
66
|
+
attachment.observationFormId.toString() === observationForm._id.toString();
|
|
67
|
+
});
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
case 'checkbox': {
|
|
71
|
+
hasValue = field.value != null;
|
|
72
|
+
}
|
|
73
|
+
default: {
|
|
74
|
+
hasValue = observationForm[field.name];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return hasValue;
|
|
78
|
+
})
|
|
79
|
+
.sort((a, b) => a.id - b.id)
|
|
80
|
+
.map(field => {
|
|
81
|
+
let value = observationForm[field.name];
|
|
82
|
+
if (field.type === 'attachment') {
|
|
83
|
+
value = observation.attachments.filter(attachment => {
|
|
84
|
+
return attachment.fieldName === field.name &&
|
|
85
|
+
attachment.observationFormId.toString() === observationForm._id.toString();
|
|
86
|
+
})
|
|
87
|
+
.map(attachment => {
|
|
88
|
+
return attachment.relativePath;
|
|
89
|
+
});
|
|
90
|
+
value.forEach(attachmentPath => {
|
|
91
|
+
archive.file(path.join(attachmentBase, attachmentPath), { name: attachmentPath });
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
return [field.title, value];
|
|
95
|
+
}));
|
|
96
|
+
formProperties.push(properties);
|
|
97
|
+
observation.properties[form.name] = formProperties;
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
delete observation.properties.forms;
|
|
101
|
+
observation.properties.id = observation._id;
|
|
102
|
+
};
|
|
103
|
+
GeoJson.prototype.streamObservations = function (stream, archive, done) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
log.info("Requesting observations from DB");
|
|
106
|
+
const cursor = this.requestObservations(this._filter);
|
|
107
|
+
let user = null;
|
|
108
|
+
let device = null;
|
|
109
|
+
let numObservations = 0;
|
|
110
|
+
stream.write('{"type": "FeatureCollection", "features": [');
|
|
111
|
+
cursor.eachAsync((observation) => __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
if (numObservations > 0) {
|
|
113
|
+
stream.write(',');
|
|
114
|
+
}
|
|
115
|
+
this.mapObservationProperties(observation, archive);
|
|
116
|
+
if (!user || user._id.toString() !== observation.userId.toString()) {
|
|
117
|
+
user = yield User.getUserById(observation.userId);
|
|
118
|
+
}
|
|
119
|
+
if (!device || device._id.toString() !== observation.deviceId.toString()) {
|
|
120
|
+
device = yield Device.getDeviceById(observation.deviceId);
|
|
121
|
+
}
|
|
122
|
+
if (user)
|
|
123
|
+
observation.properties.user = user.username;
|
|
124
|
+
if (device)
|
|
125
|
+
observation.properties.device = device.uid;
|
|
126
|
+
const data = JSON.stringify({
|
|
127
|
+
geometry: observation.geometry,
|
|
128
|
+
properties: observation.properties
|
|
129
|
+
});
|
|
130
|
+
stream.write(data);
|
|
131
|
+
numObservations++;
|
|
132
|
+
})).then(() => {
|
|
133
|
+
if (cursor)
|
|
134
|
+
cursor.close;
|
|
135
|
+
stream.write(']}');
|
|
136
|
+
// throw in icons
|
|
137
|
+
archive.directory(new api.Icon(this._event._id).getBasePath(), 'mage-export/icons', { date: new Date() });
|
|
138
|
+
log.info('Successfully wrote ' + numObservations + ' observations to GeoJSON');
|
|
139
|
+
done();
|
|
140
|
+
}).catch(err => done(err));
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
GeoJson.prototype.streamLocations = function (stream, done) {
|
|
144
|
+
log.info('Requesting locations from DB');
|
|
145
|
+
const startDate = this._filter.startDate ? moment(this._filter.startDate) : null;
|
|
146
|
+
const endDate = this._filter.endDate ? moment(this._filter.endDate) : null;
|
|
147
|
+
const cursor = this.requestLocations({ startDate: startDate, endDate: endDate });
|
|
148
|
+
let numLocations = 0;
|
|
149
|
+
stream.write('{"type": "FeatureCollection", "features": [');
|
|
150
|
+
cursor.eachAsync(location => {
|
|
151
|
+
if (numLocations > 0) {
|
|
152
|
+
stream.write(',');
|
|
153
|
+
}
|
|
154
|
+
const centroid = turfCentroid(location);
|
|
155
|
+
location.properties.mgrs = mgrs.forward(centroid.geometry.coordinates);
|
|
156
|
+
const data = JSON.stringify(location);
|
|
157
|
+
stream.write(data);
|
|
158
|
+
numLocations++;
|
|
159
|
+
}).then(() => {
|
|
160
|
+
if (cursor)
|
|
161
|
+
cursor.close;
|
|
162
|
+
stream.write(']}');
|
|
163
|
+
log.info('Successfully wrote ' + numLocations + ' locations to GeoJSON');
|
|
164
|
+
done();
|
|
165
|
+
}).catch(err => done(err));
|
|
166
|
+
};
|
|
167
|
+
//# sourceMappingURL=geojson.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geojson.js","sourceRoot":"","sources":["../../src/export/geojson.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,EACxB,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,EACvB,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,EACxB,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,EAC9B,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,EACtB,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,EAC1B,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,EACxB,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,EAC1B,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,EACtB,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,EAChC,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,uBAAuB,EACtE,IAAI,GAAG,OAAO,CAAC,gBAAgB,CAAC,EAChC,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,EACpC,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,OAAO,C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C,CAAC,IAAI,CAAC,GAAG,EAAE;QACX,IAAI,MAAM;YAAE,MAAM,CAAC,KAAK,CAAC;QAEzB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEnB,GAAG,CAAC,IAAI,CAAC,qBAAqB,GAAG,YAAY,GAAG,uBAAuB,CAAC,CAAC;QAEzE,IAAI,EAAE,CAAC;IACT,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export = GeoPackage;
|
|
2
|
+
declare function GeoPackage(options: any): void;
|
|
3
|
+
declare class GeoPackage {
|
|
4
|
+
constructor(options: any);
|
|
5
|
+
iconMap: {};
|
|
6
|
+
export(streamable: any): Promise<void>;
|
|
7
|
+
createGeoPackageFile(): Promise<any>;
|
|
8
|
+
createObservationTable(geopackage: any): Promise<any>;
|
|
9
|
+
createAttachmentTable(geopackage: any): any;
|
|
10
|
+
addUserToUsersTable(geopackage: any, user: any, usersLastLocation: any, zoomToEnvelope: any): Promise<undefined>;
|
|
11
|
+
createLocationTableForUser(geopackage: any, userId: any): Promise<any>;
|
|
12
|
+
addLocationsToGeoPackage(geopackage: any): Promise<any>;
|
|
13
|
+
createFormAttributeTables(geopackage: any): Promise<any>;
|
|
14
|
+
fieldTypeToGeoPackageType(fieldType: any): "TEXT" | "INTEGER";
|
|
15
|
+
createUserTable(geopackage: any): Promise<any>;
|
|
16
|
+
addFormDataToGeoPackage(geopackage: any): Promise<any>;
|
|
17
|
+
addObservationsToGeoPackage(geopackage: any): Promise<any>;
|
|
18
|
+
calculateBounds(geometry: any, zoomToEnvelope: any): any;
|
|
19
|
+
addAttachments(geopackage: any, attachments: any, observationId: any, formTable: any, formRowId: any): Promise<void>;
|
|
20
|
+
createObservationFeatureTableStyles(geopackage: any): Promise<any>;
|
|
21
|
+
createUserFeatureTableStyles(geopackage: any): Promise<any>;
|
|
22
|
+
addObservationIcons(geopackage: any, featureTableStyles: any): Promise<any>;
|
|
23
|
+
setContentBounds(geopackage: any, featureDao: any, zoomToEnvelope: any): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=geopackage.d.ts.map
|