@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.
- 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 +70 -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 +143 -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 +27 -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 +63 -0
- package/lib/adapters/feeds/adapters.feeds.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/feeds/adapters.feeds.db.mongoose.js +199 -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 +38 -0
- package/lib/adapters/icons/adapters.icons.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/icons/adapters.icons.db.mongoose.js +287 -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 +294 -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 +38 -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 +126 -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 +14 -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 +14 -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 +60 -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 +507 -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 +203 -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 +107 -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 +106 -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 +569 -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 +29 -0
- package/lib/environment/env.d.ts.map +1 -0
- package/lib/environment/env.js +106 -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 +12 -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 +58 -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 +68 -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 +36 -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 +54 -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 +59 -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 +32 -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 +17 -0
- package/lib/models/authentication.d.ts.map +1 -0
- package/lib/models/authentication.js +174 -0
- package/lib/models/authentication.js.map +1 -0
- package/lib/models/authenticationconfiguration.d.ts +15 -0
- package/lib/models/authenticationconfiguration.d.ts.map +1 -0
- package/lib/models/authenticationconfiguration.js +105 -0
- package/lib/models/authenticationconfiguration.js.map +1 -0
- package/lib/models/cappedLocation.d.ts +8 -0
- package/lib/models/cappedLocation.d.ts.map +1 -0
- package/lib/models/cappedLocation.js +78 -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 +14 -0
- package/lib/models/device.d.ts.map +1 -0
- package/lib/models/device.js +220 -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 +839 -0
- package/lib/models/event.js.map +1 -0
- package/lib/models/export.d.ts +18 -0
- package/lib/models/export.d.ts.map +1 -0
- package/lib/models/export.js +107 -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 +43 -0
- package/lib/models/feature.js.map +1 -0
- package/lib/models/icon.d.ts +9 -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 +13 -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 +8 -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 +90 -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 +461 -0
- package/lib/models/observation.js.map +1 -0
- package/lib/models/role.d.ts +22 -0
- package/lib/models/role.d.ts.map +1 -0
- package/lib/models/role.js +80 -0
- package/lib/models/role.js.map +1 -0
- package/lib/models/setting.d.ts +6 -0
- package/lib/models/setting.d.ts.map +1 -0
- package/lib/models/setting.js +31 -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 +511 -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 +400 -0
- package/lib/models/user.js.map +1 -0
- package/lib/permissions/permissions.events.d.ts +69 -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 +209 -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 +201 -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 +363 -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 +21 -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 +203 -0
|
@@ -0,0 +1,569 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { UserId } from '../users/entities.users';
|
|
3
|
+
import { BBox, Feature, Geometry } from 'geojson';
|
|
4
|
+
import { MageEvent, MageEventAttrs, MageEventId } from '../events/entities.events';
|
|
5
|
+
import { PageOf, PagingParameters, PendingEntityId } from '../entities.global';
|
|
6
|
+
import { Form, FormField, FormId } from '../events/entities.events.forms';
|
|
7
|
+
import { JsonPrimitive } from '../entities.json_types';
|
|
8
|
+
export declare type ObservationId = string;
|
|
9
|
+
export interface ObservationAttrs extends Feature<Geometry, ObservationFeatureProperties> {
|
|
10
|
+
id: ObservationId;
|
|
11
|
+
eventId: MageEventId;
|
|
12
|
+
userId?: UserId;
|
|
13
|
+
deviceId?: string;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
lastModified: Date;
|
|
16
|
+
attachments: readonly Attachment[];
|
|
17
|
+
important?: Readonly<ObservationImportantFlag> | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* TODO: scalability - potential problem if thousands of users favorite;
|
|
20
|
+
* this should not be returned to the client
|
|
21
|
+
*/
|
|
22
|
+
favoriteUserIds: readonly UserId[];
|
|
23
|
+
/**
|
|
24
|
+
* * TODO: scalability - likely not a problem in practice most of the time
|
|
25
|
+
* * TODO: we do not actually have a reason to maintain an array of states -
|
|
26
|
+
* state should just be a single value object, and should not need
|
|
27
|
+
* a unique id
|
|
28
|
+
*/
|
|
29
|
+
states: readonly ObservationState[];
|
|
30
|
+
}
|
|
31
|
+
export interface ObservationFeatureProperties {
|
|
32
|
+
/**
|
|
33
|
+
* This timestamp is a user-supplied timestamp that indicates the actual time
|
|
34
|
+
* the observation occurred.
|
|
35
|
+
*/
|
|
36
|
+
timestamp: Date;
|
|
37
|
+
forms: FormEntry[];
|
|
38
|
+
}
|
|
39
|
+
export interface ObservationImportantFlag {
|
|
40
|
+
userId?: UserId;
|
|
41
|
+
timestamp?: Date;
|
|
42
|
+
description?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface ObservationState {
|
|
45
|
+
id: string | PendingEntityId;
|
|
46
|
+
name: 'active' | 'archived';
|
|
47
|
+
userId?: UserId | undefined;
|
|
48
|
+
}
|
|
49
|
+
export declare type FormEntryId = string;
|
|
50
|
+
/**
|
|
51
|
+
* TODO: create strong types and union for form field values, basically json
|
|
52
|
+
* primitives along with attachment array and geojson geometry object
|
|
53
|
+
*/
|
|
54
|
+
export interface FormEntry {
|
|
55
|
+
id: FormEntryId;
|
|
56
|
+
formId: FormId;
|
|
57
|
+
[formFieldName: string]: FormFieldEntry;
|
|
58
|
+
}
|
|
59
|
+
export declare type FormFieldEntryItem = Exclude<JsonPrimitive, null> | Geometry | Date;
|
|
60
|
+
export declare type FormFieldEntry = FormFieldEntryItem | FormFieldEntryItem[] | null;
|
|
61
|
+
export declare type AttachmentId = string;
|
|
62
|
+
/**
|
|
63
|
+
* TODO: Currently the web app uses the `name` and `contentType` keys in the
|
|
64
|
+
* attachment object to correlate pending file uploads to newly saved
|
|
65
|
+
* attachments. While this works most of the time, especially for the web
|
|
66
|
+
* when uplaods are nearly immediate, maybe something like a `pendingUploadId`
|
|
67
|
+
* key would be more reliable for correlating a saved attachment record to
|
|
68
|
+
* the file that the client intends to upload for that attachment.
|
|
69
|
+
*/
|
|
70
|
+
export interface Attachment {
|
|
71
|
+
/**
|
|
72
|
+
* Attachment IDs are globally unique, not unique only in the context of an
|
|
73
|
+
* observation or form entry.
|
|
74
|
+
*/
|
|
75
|
+
id: AttachmentId;
|
|
76
|
+
observationFormId: FormEntryId;
|
|
77
|
+
fieldName: string;
|
|
78
|
+
/**
|
|
79
|
+
* TODO: Nothing seems to use this property. Should we remove it, or
|
|
80
|
+
* actually use it to inform browser caching?
|
|
81
|
+
*/
|
|
82
|
+
lastModified?: Date;
|
|
83
|
+
/**
|
|
84
|
+
* The content type is an IANA standard media type string, e.g., `image/jpeg`.
|
|
85
|
+
*/
|
|
86
|
+
contentType?: string;
|
|
87
|
+
size?: number;
|
|
88
|
+
name?: string;
|
|
89
|
+
width?: number;
|
|
90
|
+
height?: number;
|
|
91
|
+
/**
|
|
92
|
+
* The attachment's content locator is an abstract term that mostly exists
|
|
93
|
+
* to reconcile with the legacy design of storing the relative file system
|
|
94
|
+
* path of an attachment's file on the attachment document itself. However,
|
|
95
|
+
* as MAGE transitions to cloud-native infrastructure, one can more easily
|
|
96
|
+
* envision swapping some sort of cloud-based BLOB storage service for the
|
|
97
|
+
* legacy local file system storage. Renaming the old `relativePath`
|
|
98
|
+
* property to `contentLocator` is an attempt to allow for saving a lookup key
|
|
99
|
+
* that does not necessarily imply an underlying file system as the storage
|
|
100
|
+
* layer. Implementations of the abstract {@link AttachmentStore} interface
|
|
101
|
+
* would assign their own lookup key to this property, although the intention
|
|
102
|
+
* of that interface's design is to be completely opaque with respect to how
|
|
103
|
+
* an implementation stores and indexes attachment content. An attachment
|
|
104
|
+
* store implementation may not use `contentLocator` at all.
|
|
105
|
+
*/
|
|
106
|
+
contentLocator?: string;
|
|
107
|
+
oriented: boolean;
|
|
108
|
+
thumbnails: Thumbnail[];
|
|
109
|
+
}
|
|
110
|
+
export interface Thumbnail {
|
|
111
|
+
minDimension: number;
|
|
112
|
+
/**
|
|
113
|
+
* See {@link Attachment.contentLocator} for an explanation.
|
|
114
|
+
*/
|
|
115
|
+
contentLocator?: string;
|
|
116
|
+
contentType?: string;
|
|
117
|
+
size?: number;
|
|
118
|
+
name?: string;
|
|
119
|
+
width?: number;
|
|
120
|
+
height?: number;
|
|
121
|
+
}
|
|
122
|
+
export declare function copyObservationAttrs(from: ObservationAttrs): ObservationAttrs;
|
|
123
|
+
export declare function copyAttachmentAttrs(from: Attachment): Attachment;
|
|
124
|
+
export declare function copyThumbnailAttrs(from: Thumbnail): Thumbnail;
|
|
125
|
+
export declare function copyObservationStateAttrs(from: ObservationState): ObservationState;
|
|
126
|
+
export declare function copyImportantFlagAttrs(from: ObservationImportantFlag): ObservationImportantFlag;
|
|
127
|
+
/**
|
|
128
|
+
* The intention of this class is to provide a mutation model for observation
|
|
129
|
+
* updates. While `ObservationAttrs` is more just raw the keys and values of
|
|
130
|
+
* observations, this class retains some extra context for validation so
|
|
131
|
+
* the client can make changes to the observation data while receiving
|
|
132
|
+
* validation feedback for every operation performed on the observation.
|
|
133
|
+
* TODO: add domain event tracking to this class
|
|
134
|
+
*/
|
|
135
|
+
export declare class Observation implements Readonly<ObservationAttrs> {
|
|
136
|
+
#private;
|
|
137
|
+
/**
|
|
138
|
+
* Validate the given observation attributes against the given MAGE event's
|
|
139
|
+
* constraints and forms, and create the corresponding `Observation` instance
|
|
140
|
+
* with the validation result.
|
|
141
|
+
* @param attrs
|
|
142
|
+
* @param mageEvent
|
|
143
|
+
*/
|
|
144
|
+
static evaluate(attrs: ObservationAttrs, mageEvent: MageEvent): Observation;
|
|
145
|
+
/**
|
|
146
|
+
* TODO: This does not currently do anything besides assigning the
|
|
147
|
+
* `lastModified` timestamp on the updated observation and calling
|
|
148
|
+
* {@link Observation.evaluate()} with the given update attributes.
|
|
149
|
+
* Eventually this should perform the logic to find the differences and
|
|
150
|
+
* produce the domain events resulting from updating the target observation
|
|
151
|
+
* to the update attributes.
|
|
152
|
+
*
|
|
153
|
+
* Return an {@link ObservationUpdateError} if the event IDs on the target
|
|
154
|
+
* and udpate do not match.
|
|
155
|
+
*
|
|
156
|
+
* @param target
|
|
157
|
+
* @param update
|
|
158
|
+
* @returns
|
|
159
|
+
*/
|
|
160
|
+
static assignTo(target: Observation, update: ObservationAttrs): Observation | ObservationUpdateError;
|
|
161
|
+
readonly id: string;
|
|
162
|
+
readonly eventId: number;
|
|
163
|
+
readonly mageEvent: MageEvent;
|
|
164
|
+
/**
|
|
165
|
+
* If an observation has no user ID, the user that created the observation
|
|
166
|
+
* was removed from the system.
|
|
167
|
+
*/
|
|
168
|
+
readonly userId?: UserId | undefined;
|
|
169
|
+
/**
|
|
170
|
+
* If an observation has no device ID, the device that submitted the
|
|
171
|
+
* observation was removed from the system.
|
|
172
|
+
*/
|
|
173
|
+
readonly deviceId?: string | undefined;
|
|
174
|
+
readonly createdAt: Date;
|
|
175
|
+
readonly lastModified: Date;
|
|
176
|
+
readonly important?: Readonly<ObservationImportantFlag> | undefined;
|
|
177
|
+
readonly states: readonly ObservationState[];
|
|
178
|
+
readonly favoriteUserIds: readonly UserId[];
|
|
179
|
+
readonly type = "Feature";
|
|
180
|
+
readonly bbox?: BBox | undefined;
|
|
181
|
+
readonly geometry: Readonly<Geometry>;
|
|
182
|
+
readonly properties: Readonly<ObservationFeatureProperties>;
|
|
183
|
+
readonly attachments: readonly Attachment[];
|
|
184
|
+
readonly pendingEvents: readonly PendingObservationDomainEvent[];
|
|
185
|
+
constructor(...args: unknown[]);
|
|
186
|
+
get validation(): ObservationValidationResult;
|
|
187
|
+
/**
|
|
188
|
+
* This is a convenience accessor for {@link ObservationFeatureProperties.timestamp}.
|
|
189
|
+
*/
|
|
190
|
+
get timestamp(): Date;
|
|
191
|
+
/**
|
|
192
|
+
* This is a convenience accessor for {@link ObservationFeatureProperties.forms}.
|
|
193
|
+
*/
|
|
194
|
+
get formEntries(): FormEntry[];
|
|
195
|
+
formEntryForId(id: FormEntryId): FormEntry | null;
|
|
196
|
+
attachmentFor(id: AttachmentId): Attachment | null;
|
|
197
|
+
attachmentsForField(fieldName: string, formEntryId: FormEntryId): Attachment[];
|
|
198
|
+
}
|
|
199
|
+
export declare enum ObservationDomainEventType {
|
|
200
|
+
AttachmentsRemoved = "Observation.AttachmentsRemoved"
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* A pending domain event waits for dispatch in the {@link Observation.pendingEvents | pending events}
|
|
204
|
+
* on the observation instance that generated the event. To avoid a circular
|
|
205
|
+
* reference, pending events do not have a member for the observation instance
|
|
206
|
+
* that generated them.
|
|
207
|
+
*/
|
|
208
|
+
export declare type PendingObservationDomainEvent = {
|
|
209
|
+
readonly type: ObservationDomainEventType;
|
|
210
|
+
} & ({
|
|
211
|
+
type: ObservationDomainEventType.AttachmentsRemoved;
|
|
212
|
+
readonly removedAttachments: readonly Readonly<Attachment>[];
|
|
213
|
+
});
|
|
214
|
+
/**
|
|
215
|
+
* This type simply adds the subject observation instance to the {@link PendingObservationDomainEvent}
|
|
216
|
+
* so listeners of the event will have the observation that generated the
|
|
217
|
+
* event when received.
|
|
218
|
+
*/
|
|
219
|
+
export declare type ObservationEmitted<Pending extends PendingObservationDomainEvent> = Pending & {
|
|
220
|
+
/**
|
|
221
|
+
* For now, this value is the snapshot of the observation just after the save
|
|
222
|
+
* operation that initiated domain event dispatch. Hence, this observation
|
|
223
|
+
* will have no pending events and reflects the state of the observation
|
|
224
|
+
* after the mutations that created the domain events. That understanding
|
|
225
|
+
* could change if more domain event requirements present themselves, but
|
|
226
|
+
* this is sufficient for the, at this time, singular domain event that
|
|
227
|
+
* supports attachment removal.
|
|
228
|
+
*/
|
|
229
|
+
readonly observation: Observation;
|
|
230
|
+
};
|
|
231
|
+
export declare type AttachmentsRemovedDomainEvent = Extract<PendingObservationDomainEvent, {
|
|
232
|
+
type: ObservationDomainEventType.AttachmentsRemoved;
|
|
233
|
+
}>;
|
|
234
|
+
export interface ObservationValidationResult {
|
|
235
|
+
readonly hasErrors: boolean;
|
|
236
|
+
readonly coreAttrsErrors: {
|
|
237
|
+
readonly [attr in ObservationValidationCoreAttrKey]?: string;
|
|
238
|
+
};
|
|
239
|
+
readonly formCountErrors: readonly [FormId, FormCountError][];
|
|
240
|
+
readonly formEntryErrors: readonly [number, FormEntryValidationError][];
|
|
241
|
+
/**
|
|
242
|
+
* This list contains attachment error map entries where the key is the
|
|
243
|
+
* position of the attachment in the `attachments` array on the observation,
|
|
244
|
+
* and the value is the `AttachmentValidationError`.
|
|
245
|
+
*/
|
|
246
|
+
readonly attachmentErrors: readonly [number, AttachmentValidationError][];
|
|
247
|
+
readonly totalFormCountError: TotalFormCountError | null;
|
|
248
|
+
}
|
|
249
|
+
export declare function validateObservation(observationAttrs: ObservationAttrs, mageEvent: MageEvent): ObservationValidationResult;
|
|
250
|
+
export declare type ObservationValidationCoreAttrKey = 'eventId' | 'type' | 'geometry' | 'timestamp' | 'forms';
|
|
251
|
+
export declare const MinFormsConstraint: unique symbol;
|
|
252
|
+
export declare const MaxFormsConstraint: unique symbol;
|
|
253
|
+
export declare class TotalFormCountError {
|
|
254
|
+
readonly constraint: typeof MinFormsConstraint | typeof MaxFormsConstraint;
|
|
255
|
+
readonly constraintCount: number;
|
|
256
|
+
static tooFewFormEntries(mageEvent: MageEventAttrs): TotalFormCountError;
|
|
257
|
+
static tooManyFormEntries(mageEvent: MageEventAttrs): TotalFormCountError;
|
|
258
|
+
private constructor();
|
|
259
|
+
message(): string;
|
|
260
|
+
}
|
|
261
|
+
export declare class FormCountError {
|
|
262
|
+
readonly constraint: typeof MinFormsConstraint | typeof MaxFormsConstraint;
|
|
263
|
+
readonly constraintCount: number;
|
|
264
|
+
readonly formId: FormId;
|
|
265
|
+
readonly formName: string;
|
|
266
|
+
static tooFewEntriesForForm(form: Form): FormCountError;
|
|
267
|
+
static tooManyEntriesForForm(form: Form): FormCountError;
|
|
268
|
+
private constructor();
|
|
269
|
+
message(): string;
|
|
270
|
+
}
|
|
271
|
+
export declare class FormEntryValidationError {
|
|
272
|
+
#private;
|
|
273
|
+
readonly formEntryId: FormEntryId;
|
|
274
|
+
readonly formEntryPosition: number;
|
|
275
|
+
/**
|
|
276
|
+
* If there is no form reference error, set the form name for convenience
|
|
277
|
+
* when building the validation error message text.
|
|
278
|
+
*/
|
|
279
|
+
formName: string | null;
|
|
280
|
+
constructor(formEntryId: FormEntryId, formEntryPosition: number);
|
|
281
|
+
addEntryLevelError(x: FormEntryValidationErrorReason): this;
|
|
282
|
+
addFieldError(x: FormFieldValidationError): this;
|
|
283
|
+
get entryLevelErrors(): Set<FormEntryValidationErrorReason>;
|
|
284
|
+
/**
|
|
285
|
+
* This is a map of field names to form field validation errors.
|
|
286
|
+
*/
|
|
287
|
+
get fieldErrors(): Map<string, FormFieldValidationError>;
|
|
288
|
+
}
|
|
289
|
+
export declare enum FormEntryValidationErrorReason {
|
|
290
|
+
FormRef = "FormEntryValidationErrorReason.FormRef",
|
|
291
|
+
DuplicateId = "FormEntryValidationErrorReason.DuplicateId"
|
|
292
|
+
}
|
|
293
|
+
export declare type FormFieldValidationErrorAttrs = {
|
|
294
|
+
[Prop in keyof Omit<FormFieldValidationError, 'error'>]: FormFieldValidationError[Prop];
|
|
295
|
+
};
|
|
296
|
+
export declare enum FieldConstraintKey {
|
|
297
|
+
Value = "value",
|
|
298
|
+
Min = "min",
|
|
299
|
+
Max = "max",
|
|
300
|
+
Required = "required"
|
|
301
|
+
}
|
|
302
|
+
export declare class FormFieldValidationError {
|
|
303
|
+
readonly fieldName: string;
|
|
304
|
+
readonly constraint: FieldConstraintKey;
|
|
305
|
+
readonly message: string;
|
|
306
|
+
constructor(attrs: FormFieldValidationErrorAttrs);
|
|
307
|
+
/**
|
|
308
|
+
* `error` is a readonly accessor alias for `validationRuleKey` for backward
|
|
309
|
+
* compatibility.
|
|
310
|
+
* TODO: verify this is still necessary (NECESSARY?!)
|
|
311
|
+
*/
|
|
312
|
+
get error(): string;
|
|
313
|
+
}
|
|
314
|
+
export declare enum AttachmentValidationErrorReason {
|
|
315
|
+
FieldRef = "AttachmentValidationErrorReason.FieldRef",
|
|
316
|
+
FormEntryRef = "AttachmentValidationErrorReason.FormEntryRef",
|
|
317
|
+
DuplicateId = "AttachmentValidationErrorReason.DuplicateId"
|
|
318
|
+
}
|
|
319
|
+
export declare class AttachmentValidationError {
|
|
320
|
+
readonly reason: AttachmentValidationErrorReason;
|
|
321
|
+
readonly message: string;
|
|
322
|
+
constructor(reason: AttachmentValidationErrorReason, message: string);
|
|
323
|
+
}
|
|
324
|
+
export declare function validationResultMessage(result: ObservationValidationResult): string;
|
|
325
|
+
export declare class ObservationUpdateError extends Error {
|
|
326
|
+
readonly reason: ObservationUpdateErrorReason;
|
|
327
|
+
static eventIdMismatch(expected: MageEventId, actual: MageEventId | undefined): ObservationUpdateError;
|
|
328
|
+
constructor(reason: ObservationUpdateErrorReason, message: string);
|
|
329
|
+
}
|
|
330
|
+
export declare enum ObservationUpdateErrorReason {
|
|
331
|
+
EventId = "event_id"
|
|
332
|
+
}
|
|
333
|
+
export declare function formEntryForId(formEntryId: FormEntryId, observation: ObservationAttrs): FormEntry | null;
|
|
334
|
+
export declare function attachmentsForField(field: FormField | string, formEntry: FormEntry | FormEntryId, observationAttrs: ObservationAttrs): Attachment[];
|
|
335
|
+
/**
|
|
336
|
+
* Remove the form entry with the given ID and return the resulting
|
|
337
|
+
* (potentially invalid) observation.
|
|
338
|
+
*
|
|
339
|
+
* TODO: add a `FormEntryNotFound` error similar to `removeAttachment()`
|
|
340
|
+
*/
|
|
341
|
+
export declare function removeFormEntry(observation: Observation, formEntryId: FormEntryId): Observation;
|
|
342
|
+
export declare type AttachmentCreateAttrs = Omit<Attachment, 'id' | 'observationFormId' | 'fieldName' | 'lastModified'>;
|
|
343
|
+
export declare type AttachmentPatchAttrs = Partial<AttachmentCreateAttrs>;
|
|
344
|
+
export declare type AttachmentContentPatchAttrs = Required<Pick<Attachment, 'contentLocator' | 'size'>>;
|
|
345
|
+
export declare type ThumbnailContentPatchAttrs = Required<Pick<Thumbnail, 'contentLocator' | 'size'>> & Thumbnail;
|
|
346
|
+
/**
|
|
347
|
+
* Add the given attachment to the given observation. Return a new observation
|
|
348
|
+
* instance with the added attachment, or return an {@link AttachmentAddError}
|
|
349
|
+
* if the given attachment does not reference a valid form entry and field.
|
|
350
|
+
* Note that the returned observation may still have validation errors resulting
|
|
351
|
+
* from the added attachment if the attachment violates the associated form
|
|
352
|
+
* constraints, such as min/max or allowed attachment types.
|
|
353
|
+
* @param observation
|
|
354
|
+
* @param fieldName
|
|
355
|
+
* @param formEntryId
|
|
356
|
+
* @param attrs
|
|
357
|
+
* @returns
|
|
358
|
+
*/
|
|
359
|
+
export declare function addAttachment(observation: Observation, attachmentId: AttachmentId, fieldName: string, formEntryId: FormEntryId, attrs: AttachmentCreateAttrs): Observation | AttachmentAddError;
|
|
360
|
+
/**
|
|
361
|
+
* Update the attachment for the given ID with the given patch object. Keys
|
|
362
|
+
* that are present in the patch whose values are `undefined` will assign
|
|
363
|
+
* `undefined` to the resulting updated attachment. Keys not present in the
|
|
364
|
+
* patch will have no affect on the resulting updated attachment.
|
|
365
|
+
* @param observation
|
|
366
|
+
* @param attachmentId
|
|
367
|
+
* @param patch
|
|
368
|
+
* @returns
|
|
369
|
+
*/
|
|
370
|
+
export declare function patchAttachment(observation: Observation, attachmentId: AttachmentId, patch: AttachmentPatchAttrs): Observation | AttachmentNotFoundError;
|
|
371
|
+
export declare function removeAttachment(observation: Observation, attachmentId: AttachmentId): Observation | AttachmentNotFoundError;
|
|
372
|
+
/**
|
|
373
|
+
* Add the given thumbnail to the given attachment. If the attachment already
|
|
374
|
+
* has a thumbnail at the same minimum dimension as the given thumbnail,
|
|
375
|
+
* replace the existing thumbnail with the given thumbnail at the same position
|
|
376
|
+
* in the thumbnails array.
|
|
377
|
+
* @param observation
|
|
378
|
+
* @param attachmentId
|
|
379
|
+
* @param thumbnail
|
|
380
|
+
* @returns
|
|
381
|
+
*/
|
|
382
|
+
export declare function putAttachmentThumbnailForMinDimension(observation: Observation, attachmentId: AttachmentId, thumbnail: Thumbnail): Observation | AttachmentNotFoundError;
|
|
383
|
+
/**
|
|
384
|
+
* Return the index of the thumbnail on the given attachment that best satisfies
|
|
385
|
+
* the given target dimension. That will be the thumbnail with the smallest
|
|
386
|
+
* {@link Attachment.minDimension} greater than the target dimension.
|
|
387
|
+
*/
|
|
388
|
+
export declare function thumbnailIndexForTargetDimension(targetDimension: number, attachment: Attachment): number | undefined;
|
|
389
|
+
export declare class AttachmentAddError extends Error {
|
|
390
|
+
readonly validationErr: AttachmentValidationError;
|
|
391
|
+
static invalidNewAttachment(invalidErr: AttachmentValidationError): AttachmentAddError;
|
|
392
|
+
constructor(validationErr: AttachmentValidationError);
|
|
393
|
+
}
|
|
394
|
+
export declare class AttachmentNotFoundError extends Error {
|
|
395
|
+
readonly attachmentId: AttachmentId;
|
|
396
|
+
constructor(attachmentId: AttachmentId);
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* This repository provides persistence operations for `Observation` entities
|
|
400
|
+
* within the scope of one MAGE event.
|
|
401
|
+
*/
|
|
402
|
+
export interface EventScopedObservationRepository {
|
|
403
|
+
readonly eventScope: MageEventId;
|
|
404
|
+
allocateObservationId(): Promise<ObservationId>;
|
|
405
|
+
/**
|
|
406
|
+
* Save the given observation. This operation uses PUT semantics, so
|
|
407
|
+
* essentially overwrites an existing observation with the given attributes.
|
|
408
|
+
* Therefore, the risk of conflicting udpates exists, when two or more
|
|
409
|
+
* clients fetch the same version of an observation, and each client makes
|
|
410
|
+
* different changes to the observation, the client that saves its changes
|
|
411
|
+
* last will win, overwriting the changes the other clients saved.
|
|
412
|
+
* @param observation
|
|
413
|
+
*/
|
|
414
|
+
save(observation: Observation): Promise<Observation | ObservationRepositoryError>;
|
|
415
|
+
findById(id: ObservationId): Promise<Observation | null>;
|
|
416
|
+
/**
|
|
417
|
+
* Return the most recent observation in the event as determined by
|
|
418
|
+
* the observation's `lastModified` timestamp. Return null if there are no
|
|
419
|
+
* observations in the event.
|
|
420
|
+
* @returns an `Observation` object or `null`
|
|
421
|
+
*/
|
|
422
|
+
findLatest(): Promise<ObservationAttrs | null>;
|
|
423
|
+
findLastModifiedAfter(timestamp: number, paging: PagingParameters): Promise<PageOf<ObservationAttrs>>;
|
|
424
|
+
/**
|
|
425
|
+
* Update the specified attachment with the given attributes. This
|
|
426
|
+
* persistence function exists alongside the {@link save} method to prevent
|
|
427
|
+
* concurrent updates from colliding and overwriting each other. That
|
|
428
|
+
* situation is common when storing attachment content because a single
|
|
429
|
+
* client will intiate several parallel content uploads for multiple
|
|
430
|
+
* attachments. Each separate content upload could fetch the same version of
|
|
431
|
+
* the observation from the database, store the content, then update that
|
|
432
|
+
* version of the observation record. If using the whole observation `save()`
|
|
433
|
+
* method to apply the update just for a single attachment, each save
|
|
434
|
+
* operation would overwrite the changes for the save operations that came
|
|
435
|
+
* before. Return the updated `Observation` entity instance on a successful
|
|
436
|
+
* update. Return an `AttachmentNotFoundError` if the given observation did
|
|
437
|
+
* not have an attachment with the given attachment ID. Return null if the
|
|
438
|
+
* given observation does not exist in the database.
|
|
439
|
+
*
|
|
440
|
+
* Note that this is a shallow patch, so if the patch has the `thumbnails`
|
|
441
|
+
* key, the method will persist the value of that key to the database, as
|
|
442
|
+
* opposed to deeply patching any thumbnails present in the array. This
|
|
443
|
+
* method should essentially use {@link patchAttachment} to perform the
|
|
444
|
+
* patch for the resulting attachment.
|
|
445
|
+
*
|
|
446
|
+
* TODO: Account for patch invalidating the attachment media type.
|
|
447
|
+
*/
|
|
448
|
+
patchAttachment(observation: Observation, attachmentId: AttachmentId, contentInfo: AttachmentPatchAttrs): Promise<Observation | AttachmentNotFoundError | null>;
|
|
449
|
+
/**
|
|
450
|
+
* Because attachments reference a form entry by its ID, an API to generate
|
|
451
|
+
* form entry IDs is necessary.
|
|
452
|
+
*/
|
|
453
|
+
nextFormEntryIds(count?: number): Promise<FormEntryId[]>;
|
|
454
|
+
nextAttachmentIds(count?: number): Promise<AttachmentId[]>;
|
|
455
|
+
}
|
|
456
|
+
export declare class ObservationRepositoryError extends Error {
|
|
457
|
+
readonly code: ObservationRepositoryErrorCode;
|
|
458
|
+
constructor(code: ObservationRepositoryErrorCode, message?: string);
|
|
459
|
+
}
|
|
460
|
+
export declare enum ObservationRepositoryErrorCode {
|
|
461
|
+
InvalidObservationId = "ObservationRepositoryError.InvalidObservationId",
|
|
462
|
+
InvalidObservation = "ObservationRepositoryError.InvalidObservation"
|
|
463
|
+
}
|
|
464
|
+
export interface ObservationRepositoryForEvent {
|
|
465
|
+
(event: MageEventId): Promise<EventScopedObservationRepository>;
|
|
466
|
+
}
|
|
467
|
+
export declare type StagedAttachmentContentId = unknown;
|
|
468
|
+
export declare class StagedAttachmentContentRef {
|
|
469
|
+
readonly id: StagedAttachmentContentId;
|
|
470
|
+
constructor(id: StagedAttachmentContentId);
|
|
471
|
+
}
|
|
472
|
+
export declare class StagedAttachmentContent extends StagedAttachmentContentRef {
|
|
473
|
+
readonly tempLocation: NodeJS.WritableStream;
|
|
474
|
+
constructor(id: StagedAttachmentContentId, tempLocation: NodeJS.WritableStream);
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* TODO: Maybe instead of the `null | Observation | AttachmentStoreError`
|
|
478
|
+
* pattern many of these method signatures use, a single `AttachmentStoreResult`
|
|
479
|
+
* class with a `success` flag and `observation` and `error` properties would
|
|
480
|
+
* be eaiser for clients to consume.
|
|
481
|
+
*/
|
|
482
|
+
export interface AttachmentStore {
|
|
483
|
+
/**
|
|
484
|
+
* Create a temporary staging area to hold attachment content pending
|
|
485
|
+
* persistence of the associated attachment record to the observation in the
|
|
486
|
+
* database. After saving the attachment record to the parent observation,
|
|
487
|
+
* the client must move the temporary content to the proper permanent
|
|
488
|
+
* location for the saved attachment using the {@link saveContent()} function.
|
|
489
|
+
* This mechanism is useful in cases when a content stream exists, but the
|
|
490
|
+
* provider of the content stream needs to examine the bytes while streaming
|
|
491
|
+
* to the temporary location in order to determine the attachment meta-data.
|
|
492
|
+
* This mechanism also facilitates periodic cleanup of orphaned temporary
|
|
493
|
+
* content.
|
|
494
|
+
*/
|
|
495
|
+
stagePendingContent(): Promise<StagedAttachmentContent>;
|
|
496
|
+
/**
|
|
497
|
+
* Save the given content to the store for the specified attachment. If the
|
|
498
|
+
* `content` argument is an ID for {@link StagedAttachmentContent staged content},
|
|
499
|
+
* the store will move the content at the temporary location to the permanent
|
|
500
|
+
* location for the specified attachment. If the store assigns a new
|
|
501
|
+
* {@link Attachment.contentLocator | content locator} to the attachment after
|
|
502
|
+
* a successful save, and/or changes the size of the attachment to the actual
|
|
503
|
+
* number of bytes written, return a {@link AttachmentContentPatchAttrs patch}
|
|
504
|
+
* to {@link EventScopedObservationRepository.patchAttachment update}
|
|
505
|
+
* the attachment new observation instance with the {@link patchAttachment | patched}
|
|
506
|
+
* attachment. Return `null` if the save succeeded and no change to the
|
|
507
|
+
* attachment was necessary. Return an {@link AttachmentStoreError} if the
|
|
508
|
+
* save failed.
|
|
509
|
+
*/
|
|
510
|
+
saveContent(content: NodeJS.ReadableStream | StagedAttachmentContentRef, attachmentId: AttachmentId, observation: Observation): Promise<null | AttachmentContentPatchAttrs | AttachmentStoreError>;
|
|
511
|
+
/**
|
|
512
|
+
* Similar to {@link saveContent()}, but for thumbnails of attachments.
|
|
513
|
+
* The store distinguishes thumbnails by their standard minimum dimension.
|
|
514
|
+
* If the `contentLocator` or the `size` of the stored thumbnail content is
|
|
515
|
+
* different than what is on the input thumbnail meta-data, return thumbnail
|
|
516
|
+
* attributes suitable to pass to {@link putAttachmentThumbnailForMinDimension}
|
|
517
|
+
* to update the observation with the new attachment thumbnail.
|
|
518
|
+
*/
|
|
519
|
+
saveThumbnailContent(content: NodeJS.ReadableStream | StagedAttachmentContentId, minDimension: number, attachmentId: AttachmentId, observation: Observation): Promise<null | ThumbnailContentPatchAttrs | AttachmentStoreError>;
|
|
520
|
+
/**
|
|
521
|
+
* Return a read stream of the content for the given attachment. The client
|
|
522
|
+
* can specify an optional zero-based range of bytes to read from the
|
|
523
|
+
* content, which will return a read stream limited the specified range.
|
|
524
|
+
* Note that the end index of the range is inclusive, as is the case with
|
|
525
|
+
* Node's streams API, as opposed to array and string operations, for
|
|
526
|
+
* which the end index is usually exclusive. Return `null` if not content
|
|
527
|
+
* exists for the given attachment. Return an `AttachmentStoreError` if
|
|
528
|
+
* an error occurred reading from the underlying storage.
|
|
529
|
+
*/
|
|
530
|
+
readContent(attachmentId: AttachmentId, observation: Observation, range?: {
|
|
531
|
+
start: number;
|
|
532
|
+
end?: number;
|
|
533
|
+
}): Promise<NodeJS.ReadableStream | null | AttachmentStoreError>;
|
|
534
|
+
readThumbnailContent(minDimension: number, attachmentId: AttachmentId, observation: Observation): Promise<NodeJS.ReadableStream | null | AttachmentStoreError>;
|
|
535
|
+
/**
|
|
536
|
+
* Delete the given attachment's content, including thumbnail content. If
|
|
537
|
+
* the attachment no longer exists on the given observation, return null upon
|
|
538
|
+
* success. If the attachment still exists on the observation, return
|
|
539
|
+
* {@link AttachmentContentPatchAttrs patch} attributes that reflect the
|
|
540
|
+
* missing content to {@link EventScopedObservationRepository.patchAttachment update}
|
|
541
|
+
* the attachment.
|
|
542
|
+
*/
|
|
543
|
+
deleteContent(attachment: Attachment, observation: Observation): Promise<null | AttachmentPatchAttrs | AttachmentStoreError>;
|
|
544
|
+
}
|
|
545
|
+
export declare class AttachmentStoreError extends Error {
|
|
546
|
+
readonly errorCode: AttachmentStoreErrorCode;
|
|
547
|
+
static invalidAttachmentId(attachmentId: AttachmentId, observation: Observation): AttachmentStoreError;
|
|
548
|
+
static invalidThumbnailDimension(minDimension: number, attachmentId: AttachmentId, observation: Observation): AttachmentStoreError;
|
|
549
|
+
constructor(errorCode: AttachmentStoreErrorCode, message?: string);
|
|
550
|
+
}
|
|
551
|
+
export declare enum AttachmentStoreErrorCode {
|
|
552
|
+
/**
|
|
553
|
+
* The given attachment ID was not found in the given observation's
|
|
554
|
+
* attachment list.
|
|
555
|
+
*/
|
|
556
|
+
InvalidAttachmentId = "AttachmentStoreError.InvalidAttachmentId",
|
|
557
|
+
InvalidThumbnailDimension = "AttachmentStoreError.InvalidThumbnailDimension",
|
|
558
|
+
/**
|
|
559
|
+
* The content for the given attachment ID was not found in the attachment
|
|
560
|
+
* store.
|
|
561
|
+
*/
|
|
562
|
+
ContentNotFound = "AttachmentStoreError.ContentNotFound",
|
|
563
|
+
/**
|
|
564
|
+
* The underlying storage system, e.g. file system, raised an error during
|
|
565
|
+
* some I/O operation.
|
|
566
|
+
*/
|
|
567
|
+
StorageError = "AttachmentStoreError.StorageError"
|
|
568
|
+
}
|
|
569
|
+
//# sourceMappingURL=entities.observations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entities.observations.d.ts","sourceRoot":"","sources":["../../../src/entities/observations/entities.observations.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAClF,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAC9E,OAAO,EAAE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E,WAAW,EAAE,WAAW,GAAG,oBAAoB;IAItG,MAAM,CAAC,yBAAyB,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,GAAG,oBAAoB;gBAI7G,SAAS,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,MAAM;CAI3E;AAED,oBAAY,wBAAwB;IAClC;;;OAGG;IACH,mBAAmB,6CAA6C;IAChE,yBAAyB,mDAAmD;IAC5E;;;OAGG;IACH,eAAe,yCAAyC;IACxD;;;OAGG;IACH,YAAY,sCAAsC;CACnD"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FormField } from '../events/entities.events.forms';
|
|
2
|
+
import { FormEntryId, ObservationAttrs } from './entities.observations';
|
|
3
|
+
import { SimpleFieldValidationResult } from './entities.observations.fields';
|
|
4
|
+
export declare const AttachmentFieldValidation: <Failed, Succeeded>(field: FormField, formEntryId: FormEntryId, observationAttrs: ObservationAttrs, result: SimpleFieldValidationResult<Failed, Succeeded>) => Failed | Succeeded;
|
|
5
|
+
//# sourceMappingURL=entities.observations.fields.attachment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entities.observations.fields.attachment.d.ts","sourceRoot":"","sources":["../../../src/entities/observations/entities.observations.fields.attachment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAC1F,OAAO,EAA2C,WAAW,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAChH,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AAG5E,eAAO,MAAM,yBAAyB,6BAAgE,SAAS,eAAe,WAAW,oBAAoB,gBAAgB,+EAiB5K,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AttachmentFieldValidation = void 0;
|
|
4
|
+
const entities_events_forms_1 = require("../events/entities.events.forms");
|
|
5
|
+
const entities_observations_1 = require("./entities.observations");
|
|
6
|
+
const AttachmentFieldValidation = function AttachmentFieldValidation(field, formEntryId, observationAttrs, result) {
|
|
7
|
+
var _a;
|
|
8
|
+
const attachments = (0, entities_observations_1.attachmentsForField)(field, formEntryId, observationAttrs);
|
|
9
|
+
if (typeof field.min === 'number' && attachments.length < field.min) {
|
|
10
|
+
return result.failedBecauseTheEntry(`requires at least ${field.min} ${field.min > 1 ? 'attachments' : 'attachment'}`, entities_observations_1.FieldConstraintKey.Min);
|
|
11
|
+
}
|
|
12
|
+
if (typeof field.max === 'number' && attachments.length > field.max) {
|
|
13
|
+
return result.failedBecauseTheEntry(`allows at most ${field.max} ${field.max > 1 ? 'attachments' : 'attachment'}`, entities_observations_1.FieldConstraintKey.Max);
|
|
14
|
+
}
|
|
15
|
+
// TODO: ensure new attachment content types
|
|
16
|
+
// TODO: attachmentTypeIsValidForField() should probably just move here
|
|
17
|
+
// TODO: invalidate if form entry has a value?
|
|
18
|
+
if (attachments.some(x => !(0, entities_events_forms_1.attachmentTypeIsValidForField)(field, x.contentType))) {
|
|
19
|
+
return result.failedBecauseTheEntry(`allows only content of type ${(_a = field.allowedAttachmentTypes) === null || _a === void 0 ? void 0 : _a.join(', ')}`);
|
|
20
|
+
}
|
|
21
|
+
return result.succeeded();
|
|
22
|
+
};
|
|
23
|
+
exports.AttachmentFieldValidation = AttachmentFieldValidation;
|
|
24
|
+
//# sourceMappingURL=entities.observations.fields.attachment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entities.observations.fields.attachment.js","sourceRoot":"","sources":["../../../src/entities/observations/entities.observations.fields.attachment.ts"],"names":[],"mappings":";;;AAAA,2EAA0F;AAC1F,mEAAgH;AAIzG,MAAM,yBAAyB,GAAG,SAAS,yBAAyB,CAAoB,KAAgB,EAAE,WAAwB,EAAE,gBAAkC,EAAE,MAAsD;;IACnO,MAAM,WAAW,GAAG,IAAA,2CAAmB,EAAC,KAAK,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAA;IAC7E,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,EAAE;QACnE,OAAO,MAAM,CAAC,qBAAqB,CAAC,qBAAqB,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,EAAE,EAAE,0CAAkB,CAAC,GAAG,CAAC,CAAA;KAC9I;IACD,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,EAAE;QACnE,OAAO,MAAM,CAAC,qBAAqB,CAAC,kBAAkB,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,EAAE,EAAE,0CAAkB,CAAC,GAAG,CAAC,CAAA;KAC3I;IAED,4CAA4C;IAC5C,uEAAuE;IACvE,8CAA8C;IAE9C,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAA,qDAA6B,EAAC,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE;QAC/E,OAAO,MAAM,CAAC,qBAAqB,CAAC,+BAA+B,MAAA,KAAK,CAAC,sBAAsB,0CAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;KAC/G;IACD,OAAO,MAAM,CAAC,SAAS,EAAE,CAAA;AAC3B,CAAC,CAAA;AAjBY,QAAA,yBAAyB,6BAiBrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entities.observations.fields.checkbox.d.ts","sourceRoot":"","sources":["../../../src/entities/observations/entities.observations.fields.checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAA;AAMtE,eAAO,MAAM,uBAAuB,EAAE,qBAQrC,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CheckboxFieldValidation = void 0;
|
|
4
|
+
function isBoolean(value) {
|
|
5
|
+
return toString.call(value) === '[object Boolean]';
|
|
6
|
+
}
|
|
7
|
+
const CheckboxFieldValidation = function CheckboxFieldValidation(field, value, result) {
|
|
8
|
+
if (isBoolean(value)) {
|
|
9
|
+
return result.succeeded();
|
|
10
|
+
}
|
|
11
|
+
if (!value) {
|
|
12
|
+
return result.succeeded();
|
|
13
|
+
}
|
|
14
|
+
return result.failedBecauseTheEntry('must be a boolean');
|
|
15
|
+
};
|
|
16
|
+
exports.CheckboxFieldValidation = CheckboxFieldValidation;
|
|
17
|
+
//# sourceMappingURL=entities.observations.fields.checkbox.js.map
|