@spytecgps/nova-orm 0.0.224 → 0.0.226
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/dist/entities/acumaticaAmazonProduct.js +46 -0
- package/dist/entities/acumaticaImeiIccidData.js +91 -0
- package/dist/entities/acumaticaOrderShipmentDetails.js +61 -0
- package/dist/entities/acumaticaShipment.js +31 -0
- package/dist/entities/acumaticaShipmentAmazon.js +26 -0
- package/dist/entities/aempToken.js +47 -0
- package/dist/entities/alert.js +129 -0
- package/dist/entities/alertMigration.js +115 -0
- package/dist/entities/alertMigrationBatch.js +21 -0
- package/dist/entities/alertTimeWindowConfiguration.js +61 -0
- package/dist/entities/alertType.js +83 -0
- package/dist/entities/appFeatureType.js +36 -0
- package/dist/entities/assetCategory.js +32 -0
- package/dist/entities/billing.js +108 -0
- package/dist/entities/billingCustomerBraintree.js +62 -0
- package/dist/entities/billingDeviceHistory.js +61 -0
- package/dist/entities/billingHubspotPaymentLog.js +256 -0
- package/dist/entities/billingKlarnaCustomer.js +76 -0
- package/dist/entities/billingKlarnaOrder.js +114 -0
- package/dist/entities/billingStatusHistoryBraintree.js +63 -0
- package/dist/entities/billingSubscriptionBraintree.js +229 -0
- package/dist/entities/blacklist.js +51 -0
- package/dist/entities/blacklistType.js +31 -0
- package/dist/entities/boundary.js +119 -0
- package/dist/entities/boundaryEvent.js +105 -0
- package/dist/entities/cellTower.js +66 -0
- package/dist/entities/client.js +153 -0
- package/dist/entities/clientAppFeature.js +47 -0
- package/dist/entities/clientConfiguration.js +47 -0
- package/dist/entities/clientDeviceSetting.js +90 -0
- package/dist/entities/clientType.js +36 -0
- package/dist/entities/country.js +90 -0
- package/dist/entities/customerAttribute.js +52 -0
- package/dist/entities/dataSourceType.js +31 -0
- package/dist/entities/deactivation.js +83 -0
- package/dist/entities/deactivationReason.js +40 -0
- package/dist/entities/device.js +160 -0
- package/dist/entities/deviceAlertConfiguration.js +71 -0
- package/dist/entities/deviceBehavior.js +147 -0
- package/dist/entities/deviceCustomConfiguration.js +67 -0
- package/dist/entities/deviceHistory.js +46 -0
- package/dist/entities/deviceModelListener.js +46 -0
- package/dist/entities/devicePairing.js +67 -0
- package/dist/entities/devicePromotion.js +104 -0
- package/dist/entities/deviceReplacement.js +57 -0
- package/dist/entities/deviceTask.js +44 -0
- package/dist/entities/deviceType.js +149 -0
- package/dist/entities/deviceTypeEvent.js +32 -0
- package/dist/entities/deviceTypeFeature.js +32 -0
- package/dist/entities/deviceTypeFirmware.js +117 -0
- package/dist/entities/entityTag.js +48 -0
- package/dist/entities/entityType.js +31 -0
- package/dist/entities/event.js +36 -0
- package/dist/entities/feature.js +36 -0
- package/dist/entities/firmwareAutoUpgradeBlacklist.js +35 -0
- package/dist/entities/firmwareUpgradeTask.js +105 -0
- package/dist/entities/iccidStatus.js +49 -0
- package/dist/entities/imeiIccidCarrier.js +125 -0
- package/dist/entities/imeiIccidHistory.js +43 -0
- package/dist/entities/index.js +99 -0
- package/dist/entities/industry.js +46 -0
- package/dist/entities/latestPosition.js +100 -0
- package/dist/entities/latestPositionMigration.js +96 -0
- package/dist/entities/latestPositionMigrationBatch.js +21 -0
- package/dist/entities/magento2Gps.js +256 -0
- package/dist/entities/magento2Plan.js +41 -0
- package/dist/entities/mobileNetwork.js +51 -0
- package/dist/entities/notificationRecipient.js +100 -0
- package/dist/entities/organization.js +46 -0
- package/dist/entities/plan.js +86 -0
- package/dist/entities/position.js +102 -0
- package/dist/entities/positionMigration.js +96 -0
- package/dist/entities/positionMigrationBatch.js +21 -0
- package/dist/entities/promotion.js +134 -0
- package/dist/entities/securityRole.js +41 -0
- package/dist/entities/serviceProvider.js +41 -0
- package/dist/entities/serviceProviderProduct.js +61 -0
- package/dist/entities/serviceProviderProductNetwork.js +31 -0
- package/dist/entities/serviceProviderProductType.js +31 -0
- package/dist/entities/sim.js +92 -0
- package/dist/entities/task.js +146 -0
- package/dist/entities/taskSchedule.js +141 -0
- package/dist/entities/trip.js +127 -0
- package/dist/entities/tripCompletionStatus.js +36 -0
- package/dist/entities/tripPosition.js +26 -0
- package/dist/entities/user.js +196 -0
- package/dist/entities/userActivation.js +52 -0
- package/dist/entities/userActivationDevice.js +164 -0
- package/dist/entities/userActivationEvent.js +61 -0
- package/dist/entities/userActivationMetric.js +208 -0
- package/dist/entities/userAlertComplain.js +78 -0
- package/dist/entities/userAlertConfiguration.js +109 -0
- package/dist/entities/userAppFeedback.js +52 -0
- package/dist/entities/userAppIncident.js +176 -0
- package/dist/entities/userConfiguration.js +109 -0
- package/dist/entities/userDataDeletionRequest.js +56 -0
- package/dist/entities/userDeviceBehaviorTask.js +80 -0
- package/dist/entities/userInvitation.js +89 -0
- package/dist/entities/userRatingRequest.js +75 -0
- package/dist/entities/userRegistrationAttempt.js +177 -0
- package/dist/entities/userSecurityRole.js +33 -0
- package/dist/index.js +1 -2
- package/dist/migration/1684483704434-addLowerCaseIndex.js +16 -0
- package/dist/novaDataSource.js +111 -0
- package/dist/repositories/acumatica/getAcumaticaImeiIccidData.js +35 -0
- package/dist/repositories/acumatica/getAcumaticaShipmentDetails.js +50 -0
- package/dist/repositories/acumatica/getLastAcumaticaShipmentDetails.js +27 -0
- package/dist/repositories/acumatica/index.js +52 -0
- package/dist/repositories/aempToken/createAempToken.js +26 -0
- package/dist/repositories/aempToken/deleteAempTokens.js +30 -0
- package/dist/repositories/aempToken/getAempTokens.js +27 -0
- package/dist/repositories/aempToken/index.js +53 -0
- package/dist/repositories/alertTypes/getAlertTypes.js +13 -0
- package/dist/repositories/alertTypes/index.js +18 -0
- package/dist/repositories/alerts/createAlert.js +94 -0
- package/dist/repositories/alerts/createUserAlertComplain.js +26 -0
- package/dist/repositories/alerts/getAlertsReportByClient.js +65 -0
- package/dist/repositories/alerts/getAlertsReportByUser.js +127 -0
- package/dist/repositories/alerts/index.js +104 -0
- package/dist/repositories/appFeatures/createAppFeatureType.js +15 -0
- package/dist/repositories/appFeatures/createClientAppFeature.js +15 -0
- package/dist/repositories/appFeatures/getClientAppFeatures.js +39 -0
- package/dist/repositories/appFeatures/index.js +57 -0
- package/dist/repositories/assetCategories/getAssetCategories.js +8 -0
- package/dist/repositories/assetCategories/index.js +16 -0
- package/dist/repositories/baseRepository.js +9 -0
- package/dist/repositories/billing/createBilling.js +37 -0
- package/dist/repositories/billing/createBillingDeviceHistory.js +30 -0
- package/dist/repositories/billing/createBillingHubspotPaymentLog.js +61 -0
- package/dist/repositories/billing/createBillingStatusHistoryBraintree.js +32 -0
- package/dist/repositories/billing/getBillingCustomerBraintreeById.js +18 -0
- package/dist/repositories/billing/getBillingKlarnaOrderByImei.js +18 -0
- package/dist/repositories/billing/getBillingSubscriptionBraintreeByImei.js +18 -0
- package/dist/repositories/billing/getBillingSubscriptionsBraintree.js +25 -0
- package/dist/repositories/billing/getBillings.js +42 -0
- package/dist/repositories/billing/getCanceledImeis.js +84 -0
- package/dist/repositories/billing/getCanceledImeisMatchingMagentoData.js +100 -0
- package/dist/repositories/billing/getChurnStatusByClientId.js +27 -0
- package/dist/repositories/billing/getClientIdFromBraintreeCustomer.js +20 -0
- package/dist/repositories/billing/getMagentoPlan.js +21 -0
- package/dist/repositories/billing/getUserByBraintreeCustomerId.js +22 -0
- package/dist/repositories/billing/index.js +353 -0
- package/dist/repositories/billing/updateBilling.js +43 -0
- package/dist/repositories/billing/updateBillingCustomerBraintree.js +37 -0
- package/dist/repositories/billing/upsertBillingCustomerBraintree.js +39 -0
- package/dist/repositories/billing/upsertBillingKlarnaCustomer.js +52 -0
- package/dist/repositories/billing/upsertBillingKlarnaOrder.js +58 -0
- package/dist/repositories/billing/upsertBillingSubscriptionBraintree.js +20 -0
- package/dist/repositories/blacklist/getBlacklists.js +19 -0
- package/dist/repositories/blacklist/index.js +19 -0
- package/dist/repositories/boundaries/createBoundary.js +52 -0
- package/dist/repositories/boundaries/deleteBoundary.js +23 -0
- package/dist/repositories/boundaries/getBoundariesByClientId.js +17 -0
- package/dist/repositories/boundaries/getBoundariesIdsByClientId.js +19 -0
- package/dist/repositories/boundaries/getBoundariesReport.js +141 -0
- package/dist/repositories/boundaries/getBoundaryById.js +14 -0
- package/dist/repositories/boundaries/index.js +178 -0
- package/dist/repositories/boundaries/processBoundaryEvent.js +211 -0
- package/dist/repositories/boundaries/updateBoundary.js +53 -0
- package/dist/repositories/boundaries/upsertBoundaryEvent.js +23 -0
- package/dist/repositories/clients/createClient.js +35 -0
- package/dist/repositories/clients/createClientConfiguration.js +18 -0
- package/dist/repositories/clients/createCustomerAttribute.js +16 -0
- package/dist/repositories/clients/deleteClientAndConfiguration.js +25 -0
- package/dist/repositories/clients/getClient.js +32 -0
- package/dist/repositories/clients/getClientConfiguration.js +14 -0
- package/dist/repositories/clients/getClients.js +26 -0
- package/dist/repositories/clients/getCustomerAttribute.js +14 -0
- package/dist/repositories/clients/index.js +192 -0
- package/dist/repositories/clients/updateClient.js +52 -0
- package/dist/repositories/clients/updateClientConfiguration.js +31 -0
- package/dist/repositories/clients/updateCustomerAttribute.js +27 -0
- package/dist/repositories/countries/getCountries.js +14 -0
- package/dist/repositories/countries/getCountry.js +23 -0
- package/dist/repositories/countries/index.js +33 -0
- package/dist/repositories/deactivations/createDeactivation.js +16 -0
- package/dist/repositories/deactivations/getDeactivationReasons.js +24 -0
- package/dist/repositories/deactivations/getLatestDeactivationByImei.js +19 -0
- package/dist/repositories/deactivations/index.js +58 -0
- package/dist/repositories/deviceBehaviors/createDeviceBehaviorTask.js +48 -0
- package/dist/repositories/deviceBehaviors/getDeviceBehaviorTasks.js +40 -0
- package/dist/repositories/deviceBehaviors/getDeviceBehaviors.js +41 -0
- package/dist/repositories/deviceBehaviors/getDeviceBehaviorsByIds.js +16 -0
- package/dist/repositories/deviceBehaviors/getDevicesLastBehaviorTask.js +42 -0
- package/dist/repositories/deviceBehaviors/getLatestDeviceBehaviorTasks.js +40 -0
- package/dist/repositories/deviceBehaviors/index.js +147 -0
- package/dist/repositories/deviceBehaviors/updateDeviceBehaviorTask.js +27 -0
- package/dist/repositories/deviceBehaviors/upsertDeviceBehavior.js +20 -0
- package/dist/repositories/devicePairings/createDevicePairing.js +21 -0
- package/dist/repositories/devicePairings/deleteDevicePairing.js +16 -0
- package/dist/repositories/devicePairings/getDevicePairings.js +36 -0
- package/dist/repositories/devicePairings/getDevicePairingsByImei.js +20 -0
- package/dist/repositories/devicePairings/index.js +90 -0
- package/dist/repositories/devicePairings/updateDevicePairing.js +32 -0
- package/dist/repositories/devices/createClientDeviceSetting.js +25 -0
- package/dist/repositories/devices/createDevice.js +30 -0
- package/dist/repositories/devices/createDeviceReplacement.js +34 -0
- package/dist/repositories/devices/createDeviceType.js +15 -0
- package/dist/repositories/devices/deleteDevice.js +16 -0
- package/dist/repositories/devices/generateDeviceIdentifierKey.js +18 -0
- package/dist/repositories/devices/getCanceledDevicesWithActiveSimCards.js +40 -0
- package/dist/repositories/devices/getCarrierStatusUpdatedBefore.js +40 -0
- package/dist/repositories/devices/getClientDeviceSetting.js +20 -0
- package/dist/repositories/devices/getClientDeviceSettings.js +17 -0
- package/dist/repositories/devices/getDevice.js +33 -0
- package/dist/repositories/devices/getDeviceCustomConfig.js +37 -0
- package/dist/repositories/devices/getDeviceTypeByImei.js +18 -0
- package/dist/repositories/devices/getDeviceTypes.js +30 -0
- package/dist/repositories/devices/getDeviceTypesModelsOrderedByDeviceCount.js +27 -0
- package/dist/repositories/devices/getDeviceWithUsersInfo.js +59 -0
- package/dist/repositories/devices/getDevices.js +46 -0
- package/dist/repositories/devices/getFilteredImeisWithStatus.js +20 -0
- package/dist/repositories/devices/getIccidStatus.js +17 -0
- package/dist/repositories/devices/getImeiIccidCarrier.js +23 -0
- package/dist/repositories/devices/getImeiIccidCarriers.js +17 -0
- package/dist/repositories/devices/index.js +464 -0
- package/dist/repositories/devices/updateClientDeviceSetting.js +38 -0
- package/dist/repositories/devices/updateDevice.js +56 -0
- package/dist/repositories/devices/updateDeviceType.js +43 -0
- package/dist/repositories/devices/updateIccidStatus.js +28 -0
- package/dist/repositories/devices/updateImeiIccidCarrier.js +43 -0
- package/dist/repositories/devices/upsertIccidStatus.js +36 -0
- package/dist/repositories/firmwares/createDeviceFirmware.js +37 -0
- package/dist/repositories/firmwares/createFirmwareAutoUpgradeBlacklist.js +16 -0
- package/dist/repositories/firmwares/createFirmwareUpgradeTask.js +36 -0
- package/dist/repositories/firmwares/getDeviceFirmwares.js +21 -0
- package/dist/repositories/firmwares/getFirmwareAutoUpgradeBlacklist.js +23 -0
- package/dist/repositories/firmwares/getFirmwareUpgradeTasks.js +105 -0
- package/dist/repositories/firmwares/getFirmwareUpgradeTasksCount.js +56 -0
- package/dist/repositories/firmwares/index.js +194 -0
- package/dist/repositories/firmwares/updateDeviceFirmware.js +41 -0
- package/dist/repositories/firmwares/updateFirmwareUpgradeTasks.js +37 -0
- package/dist/repositories/index.js +31 -0
- package/dist/repositories/notificationRecipients/createNotificationRecipient.js +37 -0
- package/dist/repositories/notificationRecipients/deleteNotificationRecipients.js +26 -0
- package/dist/repositories/notificationRecipients/deleteNotificationRecipientsByEmailOrPhone.js +28 -0
- package/dist/repositories/notificationRecipients/getNotificationRecipients.js +16 -0
- package/dist/repositories/notificationRecipients/index.js +131 -0
- package/dist/repositories/notificationRecipients/updateNotificationRecipient.js +37 -0
- package/dist/repositories/notificationRecipients/updateUsersNotificationsUnsubscribedInfoStatus.js +98 -0
- package/dist/repositories/notificationRecipients/updateUsersNotificationsUnsuscribedStatus.js +35 -0
- package/dist/repositories/positions/createPosition.js +100 -0
- package/dist/repositories/positions/getLatestPositionByImei.js +26 -0
- package/dist/repositories/positions/getPositionsByImei.js +23 -0
- package/dist/repositories/positions/getPositionsReportByClient.js +87 -0
- package/dist/repositories/positions/index.js +101 -0
- package/dist/repositories/positions/upsertLatestPosition.js +41 -0
- package/dist/repositories/security/createUserRole.js +30 -0
- package/dist/repositories/security/getAllRoles.js +8 -0
- package/dist/repositories/security/getUserRoles.js +15 -0
- package/dist/repositories/security/getUserRolesByClientId.js +17 -0
- package/dist/repositories/security/index.js +111 -0
- package/dist/repositories/security/removeUserRoles.js +21 -0
- package/dist/repositories/security/updateUserRole.js +27 -0
- package/dist/repositories/security/userIsAdminOrOwner.js +20 -0
- package/dist/repositories/security/userIsInRole.js +18 -0
- package/dist/repositories/tasks/addTaskScheduleDevices.js +37 -0
- package/dist/repositories/tasks/completeTask.js +25 -0
- package/dist/repositories/tasks/createTask.js +22 -0
- package/dist/repositories/tasks/createTaskSchedule.js +33 -0
- package/dist/repositories/tasks/deleteTask.js +22 -0
- package/dist/repositories/tasks/deleteTaskSchedule.js +22 -0
- package/dist/repositories/tasks/deleteTaskScheduleDevices.js +17 -0
- package/dist/repositories/tasks/getDeviceTasks.js +28 -0
- package/dist/repositories/tasks/getTaskSchedule.js +31 -0
- package/dist/repositories/tasks/getTaskSchedules.js +75 -0
- package/dist/repositories/tasks/getTaskSchedulesCount.js +23 -0
- package/dist/repositories/tasks/getTasks.js +29 -0
- package/dist/repositories/tasks/getTasksCount.js +20 -0
- package/dist/repositories/tasks/index.js +441 -0
- package/dist/repositories/tasks/setTaskAsPastDue.js +23 -0
- package/dist/repositories/tasks/setTaskScheduleDevices.js +43 -0
- package/dist/repositories/tasks/updateTask.js +21 -0
- package/dist/repositories/tasks/updateTaskSchedule.js +35 -0
- package/dist/repositories/trips/createTrip.js +29 -0
- package/dist/repositories/trips/getTripById.js +15 -0
- package/dist/repositories/trips/getTrips.js +65 -0
- package/dist/repositories/trips/index.js +69 -0
- package/dist/repositories/trips/updateTripEndValues.js +36 -0
- package/dist/repositories/trips/upsertTrip.js +31 -0
- package/dist/repositories/userActivations/createUserActivation.js +26 -0
- package/dist/repositories/userActivations/createUserActivationDevice.js +35 -0
- package/dist/repositories/userActivations/createUserActivationEvent.js +34 -0
- package/dist/repositories/userActivations/createUserActivationMetric.js +28 -0
- package/dist/repositories/userActivations/deleteUserActivation.js +22 -0
- package/dist/repositories/userActivations/getLastActivationDevice.js +26 -0
- package/dist/repositories/userActivations/getUserActivationDevices.js +24 -0
- package/dist/repositories/userActivations/getUserActivationDevicesByClientId.js +26 -0
- package/dist/repositories/userActivations/getUserActivationMetrics.js +24 -0
- package/dist/repositories/userActivations/getUserActivations.js +29 -0
- package/dist/repositories/userActivations/index.js +229 -0
- package/dist/repositories/userActivations/updateUserActivationDevice.js +39 -0
- package/dist/repositories/userActivations/updateUserActivationMetrics.js +61 -0
- package/dist/repositories/userAppFeedback/createUserAppFeedback.js +26 -0
- package/dist/repositories/userAppFeedback/index.js +23 -0
- package/dist/repositories/userAppIncidents/getUserAppIncidents.js +28 -0
- package/dist/repositories/userAppIncidents/index.js +63 -0
- package/dist/repositories/userAppIncidents/upsertUserAppIncident.js +53 -0
- package/dist/repositories/userConfigurations/bulkCreateUserAlertConfigurations.js +46 -0
- package/dist/repositories/userConfigurations/createDeviceAlertTimeWindows.js +36 -0
- package/dist/repositories/userConfigurations/createUserAlertTimeWindows.js +33 -0
- package/dist/repositories/userConfigurations/createUserConfiguration.js +34 -0
- package/dist/repositories/userConfigurations/deleteDeviceAlertTimeWindows.js +17 -0
- package/dist/repositories/userConfigurations/deleteUserAlertConfigurations.js +24 -0
- package/dist/repositories/userConfigurations/deleteUserAlertTimeWindows.js +17 -0
- package/dist/repositories/userConfigurations/deleteUserConfiguration.js +23 -0
- package/dist/repositories/userConfigurations/getDeviceAlertTimeWindows.js +43 -0
- package/dist/repositories/userConfigurations/getUserAlertConfigurations.js +25 -0
- package/dist/repositories/userConfigurations/getUserAlertTimeWindows.js +35 -0
- package/dist/repositories/userConfigurations/getUserConfigurations.js +31 -0
- package/dist/repositories/userConfigurations/index.js +298 -0
- package/dist/repositories/userConfigurations/updateDeviceAlertTimeWindows.js +29 -0
- package/dist/repositories/userConfigurations/updateUserAlertConfigurations.js +46 -0
- package/dist/repositories/userConfigurations/updateUserAlertTimeWindows.js +28 -0
- package/dist/repositories/userConfigurations/updateUserConfiguration.js +49 -0
- package/dist/repositories/userDataDeletionRequests/createUserDataDeletionRequest.js +28 -0
- package/dist/repositories/userDataDeletionRequests/getUserDataDeletionRequest.js +29 -0
- package/dist/repositories/userDataDeletionRequests/index.js +66 -0
- package/dist/repositories/userDataDeletionRequests/removeUserDataDeletionRequest.js +17 -0
- package/dist/repositories/userDataDeletionRequests/updateUserDataDeletionRequest.js +38 -0
- package/dist/repositories/userInvitations/createUserInvitation.js +43 -0
- package/dist/repositories/userInvitations/getUserInvitationById.js +22 -0
- package/dist/repositories/userInvitations/getUserInvitations.js +31 -0
- package/dist/repositories/userInvitations/index.js +82 -0
- package/dist/repositories/userInvitations/updateUserInvitation.js +50 -0
- package/dist/repositories/userRatingRequests/createUserRatingRequest.js +34 -0
- package/dist/repositories/userRatingRequests/getUserRatingRequests.js +23 -0
- package/dist/repositories/userRatingRequests/index.js +41 -0
- package/dist/repositories/userRegistrationAttempts/createUserRegistrationAttempt.js +40 -0
- package/dist/repositories/userRegistrationAttempts/getUserRegistrationAttempts.js +29 -0
- package/dist/repositories/userRegistrationAttempts/index.js +70 -0
- package/dist/repositories/userRegistrationAttempts/updateUserRegistrationAttempt.js +40 -0
- package/dist/repositories/users/createUser.js +47 -0
- package/dist/repositories/users/deleteAccount.js +98 -0
- package/dist/repositories/users/deleteUser.js +22 -0
- package/dist/repositories/users/getUserById.js +22 -0
- package/dist/repositories/users/getUserData.js +66 -0
- package/dist/repositories/users/getUsers.js +49 -0
- package/dist/repositories/users/getUsersConfigurationByImei.js +29 -0
- package/dist/repositories/users/getUsersIdByPhoneAndCountryCode.js +21 -0
- package/dist/repositories/users/getUsersWithRoles.js +32 -0
- package/dist/repositories/users/index.js +195 -0
- package/dist/repositories/users/updateUser.js +109 -0
- package/dist/subscribers/allEntitiesSubscriber.js +52 -0
- package/dist/subscribers/index.js +2 -0
- package/dist/types/acumatica.js +1 -0
- package/dist/types/aempToken.js +1 -0
- package/dist/types/alert.js +1 -0
- package/dist/types/alertTypes.js +1 -0
- package/dist/types/appFeatures.js +1 -0
- package/dist/types/billing.js +1 -0
- package/dist/types/blacklist.js +1 -0
- package/dist/types/boundaries.js +1 -0
- package/dist/types/clients.js +1 -0
- package/dist/types/common.js +1 -0
- package/dist/types/countries.js +1 -0
- package/dist/types/deactivations.js +1 -0
- package/dist/types/deviceBehaviors.js +1 -0
- package/dist/types/devicePairings.js +1 -0
- package/dist/types/devices.js +1 -0
- package/dist/types/enums.js +74 -0
- package/dist/types/firmwares.js +17 -0
- package/dist/types/index.js +30 -0
- package/dist/types/logger.js +9 -0
- package/dist/types/notificationRecipients.js +1 -0
- package/dist/types/position.js +1 -0
- package/dist/types/security.js +1 -0
- package/dist/types/tasks.js +1 -0
- package/dist/types/trip.js +29 -0
- package/dist/types/user.js +1 -0
- package/dist/types/userActivations.js +1 -0
- package/dist/types/userAppFeedback.js +1 -0
- package/dist/types/userAppIncidents.js +1 -0
- package/dist/types/userConfigurations.js +1 -0
- package/dist/types/userDataDeletionRequests.js +1 -0
- package/dist/types/userInvitations.js +1 -0
- package/dist/types/userRatingRequests.js +1 -0
- package/dist/types/userRegistrationAttempts.js +1 -0
- package/dist/utils/anyAttributeHasValue.js +20 -0
- package/dist/utils/anyAttributeIsNull.js +12 -0
- package/dist/utils/boolToNumberTransformer.js +23 -0
- package/dist/utils/consoleLogger.js +42 -0
- package/dist/utils/filterTools.js +299 -0
- package/dist/utils/mapRawEntityToEntity.js +12 -0
- package/dist/utils/queryLogger.js +48 -0
- package/dist/utils/randomizer.js +39 -0
- package/dist/utils/stringToDateTransformer.js +16 -0
- package/dist/utils/uuidHelpers.js +30 -0
- package/package.json +10 -8
- package/dist/index.js.LICENSE.txt +0 -41
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { BaseRepository } from '../baseRepository';
|
|
3
|
+
import { createUser } from './createUser';
|
|
4
|
+
import { deleteAccount } from './deleteAccount';
|
|
5
|
+
import { deleteUser } from './deleteUser';
|
|
6
|
+
import { getUserById } from './getUserById';
|
|
7
|
+
import { getUsersData } from './getUserData';
|
|
8
|
+
import { getUsers } from './getUsers';
|
|
9
|
+
import { getUsersConfigurationByImei } from './getUsersConfigurationByImei';
|
|
10
|
+
import { getUsersIdsByPhoneAndCountryCode } from './getUsersIdByPhoneAndCountryCode';
|
|
11
|
+
import { getUsersWithRoles } from './getUsersWithRoles';
|
|
12
|
+
import { updateUser } from './updateUser';
|
|
13
|
+
export class UsersRepository extends BaseRepository {
|
|
14
|
+
/**
|
|
15
|
+
* Get user by id
|
|
16
|
+
* @param {GetUserByIdParams} params containing information to get a user by id
|
|
17
|
+
* - filters.id: The user id
|
|
18
|
+
* @returns The user information
|
|
19
|
+
*/
|
|
20
|
+
async getUserById(params) {
|
|
21
|
+
this.logger.trace(params, 'UsersRepository::getUserById started with params');
|
|
22
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
23
|
+
const result = await getUserById(novaDataSource, params, this.logger);
|
|
24
|
+
this.logger.trace(result, 'UsersRepository::getUserById result');
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get users with filters
|
|
29
|
+
* @param {GetUsersParams} params containing information to get users with filters
|
|
30
|
+
* - filters.clientId: The client id to obtain all users from that client
|
|
31
|
+
* - filters.email: The user email to obtain all users with that email (lower case and trimmed comparison)
|
|
32
|
+
* - filters.userName: The userName to obtain all users with that userName (lower case and trimmed comparison, using userName and preferredUserName fields)
|
|
33
|
+
* - filters.search: Search test to obtain all users with that search text (lower case and trimmed comparison, using userName, preferredUserName, email and id fields)
|
|
34
|
+
* @returns The user information
|
|
35
|
+
*/
|
|
36
|
+
async getUsers(params) {
|
|
37
|
+
this.logger.trace(params, 'UsersRepository::getUsers started with params');
|
|
38
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
39
|
+
const result = await getUsers(novaDataSource, params, this.logger);
|
|
40
|
+
this.logger.trace(result, 'UsersRepository::getUsers result');
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get user data by imei
|
|
45
|
+
* @param {GetUsersConfigurationByImeiParams} params containing information to get a device by imei
|
|
46
|
+
* - filters.imei: The imei of the device
|
|
47
|
+
*/
|
|
48
|
+
async getUsersConfigurationByImei(params) {
|
|
49
|
+
this.logger.trace(params, 'UsersRepository::getUsersConfigurationByImei started with params');
|
|
50
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
51
|
+
const result = await getUsersConfigurationByImei(novaDataSource, params, this.logger);
|
|
52
|
+
this.logger.trace(result, 'UsersRepository::getUsersConfigurationByImei result');
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Get user ids by phone and country code
|
|
57
|
+
* @param {GetUsersIdsByPhoneAndCountryCodeParams} params containing information to get a user by phone and country code
|
|
58
|
+
* - filters.phone: The phone of the user. If the phone parameter is in the format +[internationalDirectDialing][phone], the +[internationalDirectDialing] should correspond to the internationalDirectDialing in the user's profile
|
|
59
|
+
* - filters.countryCode: The country code of the user (US, MX, etc)
|
|
60
|
+
*/
|
|
61
|
+
async getUsersIdsByPhoneAndCountryCode(params) {
|
|
62
|
+
this.logger.trace(params, 'UsersRepository::getUsersIdsByPhoneAndCountryCode started with params');
|
|
63
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
64
|
+
const result = await getUsersIdsByPhoneAndCountryCode(novaDataSource, params, this.logger);
|
|
65
|
+
this.logger.trace(result, 'UsersRepository::getUsersIdsByPhoneAndCountryCode result');
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Get users with roles
|
|
70
|
+
* @param {GetUsersWithRolesParams} params containing information to get users with roles
|
|
71
|
+
* - filters.clientId: The client id to obtain all users from that client
|
|
72
|
+
* - filters.roleId: The role id to obtain all users with that role, optional
|
|
73
|
+
* - filters.status: The status to obtain all users with that status, optional
|
|
74
|
+
* roleId or status must be provided
|
|
75
|
+
* @returns The user information with the role name
|
|
76
|
+
*/
|
|
77
|
+
async getUsersWithRoles(params) {
|
|
78
|
+
this.logger.trace(params, 'UsersRepository::getUsersWithRoles started with params');
|
|
79
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
80
|
+
const result = await getUsersWithRoles(novaDataSource, params, this.logger);
|
|
81
|
+
this.logger.trace(result, 'UsersRepository::getUsersWithRoles result');
|
|
82
|
+
return result;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Create a new user
|
|
86
|
+
* @param {CreateUserParams} params containing information to create a new user
|
|
87
|
+
* id: the user id, required
|
|
88
|
+
* firstName: the first name, required
|
|
89
|
+
* lastName: the last name, required
|
|
90
|
+
* companyName: the company name, optional
|
|
91
|
+
* telephone: the phone number, optional
|
|
92
|
+
* street: the street from the user's address, optional
|
|
93
|
+
* postalCode: the postal code from the user's address, optional
|
|
94
|
+
* city: the city from the user's address, optional
|
|
95
|
+
* region: the region from the user's address, optional
|
|
96
|
+
* email: the email, required
|
|
97
|
+
* userName: the user name, required
|
|
98
|
+
* preferredUserName: the preferred user name, optional
|
|
99
|
+
* status: the status, optional. If not provided, the default value is 'A' (active)
|
|
100
|
+
* clientId: the client id, required
|
|
101
|
+
* pinCode: the pin code, optional
|
|
102
|
+
* isAdmin: whether the user is administrator, optional. If not provided, the default value is false
|
|
103
|
+
* countryId: the country id, optional
|
|
104
|
+
* telephoneCountryId: the country id corresponding to the phone number, optional
|
|
105
|
+
* dataSourceTypeId?: the data source type id, optional
|
|
106
|
+
* emailVerified: whether the email is verified, optional. If not provided, the default value is true
|
|
107
|
+
* @returns The created user
|
|
108
|
+
*/
|
|
109
|
+
async createUser(params) {
|
|
110
|
+
this.logger.trace(params, 'UsersRepository::createUser started with params');
|
|
111
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
112
|
+
const result = await createUser(novaDataSource, params, this.logger);
|
|
113
|
+
this.logger.trace(result, 'UsersRepository::createUser result');
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Delete a user
|
|
118
|
+
* @param {DeleteUserParams} params containing information to delete a user
|
|
119
|
+
* id: the user id, required
|
|
120
|
+
* @returns Whether the user was deleted or not
|
|
121
|
+
*/
|
|
122
|
+
async deleteUser(params) {
|
|
123
|
+
this.logger.trace(params, 'UsersRepository::deleteUser started with params');
|
|
124
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
125
|
+
const result = await deleteUser(novaDataSource, params, this.logger);
|
|
126
|
+
this.logger.trace({ result }, 'UsersRepository::deleteUser result');
|
|
127
|
+
return result;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Update a user
|
|
131
|
+
* @param {UpdateUserParams} params containing information to update a user
|
|
132
|
+
* At least one filter must be provided:
|
|
133
|
+
* filters.userId: the user id to filter the users to update, optional
|
|
134
|
+
* filters.email: the user email to filter the users to update, optional
|
|
135
|
+
* filters.statusList: a list of status to filter the users to update, optional
|
|
136
|
+
* At least one value must be provided:
|
|
137
|
+
* values.firstName: the first name, optional
|
|
138
|
+
* values.lastName: the last name, optional
|
|
139
|
+
* values.companyName: the company name, optional
|
|
140
|
+
* values.telephone: the phone number, optional
|
|
141
|
+
* values.street: the street from the user's address, optional
|
|
142
|
+
* values.postalCode: the postal code from the user's address, optional
|
|
143
|
+
* values.city: the city from the user's address, optional
|
|
144
|
+
* values.region: the region from the user's address, optional
|
|
145
|
+
* values.email: the email, optional
|
|
146
|
+
* values.userName: the user name, optional
|
|
147
|
+
* values.preferredUserName: the preferred user name, optional
|
|
148
|
+
* values.status: the status, optional
|
|
149
|
+
* values.isAdmin: whether the user is administrator, optional
|
|
150
|
+
* values.countryId: the country id, optional
|
|
151
|
+
* values.countryCode: the country alpha2 code to find the countryId, optional (if countryId is provided, countryCode is ignored)
|
|
152
|
+
* values.telephoneCountryId: the country id corresponding to the phone number, optional
|
|
153
|
+
* values.telephoneCountryCode: the country alpha2 code to find the telephoneCountryId, optional (if telephoneCountryId is provided, telephoneCountryCode is ignored)
|
|
154
|
+
* values.dataSourceTypeId?: the data source type id, optional
|
|
155
|
+
* values.emailVerified: whether the email is verified, optional
|
|
156
|
+
* values.latitude: the latitude, optional
|
|
157
|
+
* values.longitude: the longitude, optional
|
|
158
|
+
* values.lastLoginAt: the last login date, optional
|
|
159
|
+
* @returns Whether the user was updated or not
|
|
160
|
+
*/
|
|
161
|
+
async updateUser(params) {
|
|
162
|
+
this.logger.trace(params, 'UsersRepository::updateUser started with params');
|
|
163
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
164
|
+
const result = await updateUser(novaDataSource, params, this.logger);
|
|
165
|
+
this.logger.trace({ result }, 'UsersRepository::updateUser result');
|
|
166
|
+
return result;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get users data
|
|
170
|
+
* @param {GetUsersDataParams} params containing information to get users data
|
|
171
|
+
* - filters.imei: The imei of the device to obtain users configurations
|
|
172
|
+
* @returns The array of users data
|
|
173
|
+
*/
|
|
174
|
+
async getUsersData(params) {
|
|
175
|
+
this.logger.trace(params, 'UsersRepository::getUsersData started with params');
|
|
176
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
177
|
+
const result = await getUsersData(novaDataSource, params, this.logger);
|
|
178
|
+
this.logger.trace({ result }, 'UsersRepository::getUsersData result');
|
|
179
|
+
return result;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Delete an account
|
|
183
|
+
* @param {DeleteAccountParams} params containing information to delete an account
|
|
184
|
+
* - filters.userId: The user id to delete the account
|
|
185
|
+
* - filters.clientId: The client id to delete the account
|
|
186
|
+
* @returns Whether the account was deleted or not
|
|
187
|
+
*/
|
|
188
|
+
async deleteAccount(params) {
|
|
189
|
+
this.logger.trace(params, 'UsersRepository::deleteAccount started with params');
|
|
190
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
191
|
+
const result = await deleteAccount(novaDataSource, params, this.logger);
|
|
192
|
+
this.logger.trace({ result }, 'UsersRepository::deleteAccount result');
|
|
193
|
+
return result;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { User } from '../../entities/user';
|
|
2
|
+
import { uuidStringToBinaryBuffer } from '../../utils/uuidHelpers';
|
|
3
|
+
import { getCountry } from '../countries/getCountry';
|
|
4
|
+
const findCountryIdFromCode = async (countryAlpha2Code, novaDataSource, logger) => {
|
|
5
|
+
let country = await getCountry(novaDataSource, {
|
|
6
|
+
filters: { alpha2Code: countryAlpha2Code },
|
|
7
|
+
}, logger);
|
|
8
|
+
if (!country) {
|
|
9
|
+
country = await getCountry(novaDataSource, {
|
|
10
|
+
filters: { alpha2Code: 'US' }, // default to USA
|
|
11
|
+
}, logger);
|
|
12
|
+
}
|
|
13
|
+
return country?.id;
|
|
14
|
+
};
|
|
15
|
+
export const updateUser = async (novaDataSource, params, logger) => {
|
|
16
|
+
const binaryBuffer = uuidStringToBinaryBuffer(params?.filters?.userId);
|
|
17
|
+
// at least one filter is required
|
|
18
|
+
if (!binaryBuffer &&
|
|
19
|
+
!params?.filters?.email &&
|
|
20
|
+
!params?.filters?.statusList?.length &&
|
|
21
|
+
!params?.filters?.userName) {
|
|
22
|
+
logger.warn({ params }, 'UsersRepository::updateUser - missing required parameters');
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
// at least one field to update is required
|
|
26
|
+
if (params?.values?.city === undefined &&
|
|
27
|
+
params?.values?.companyName === undefined &&
|
|
28
|
+
!params?.values?.countryCode &&
|
|
29
|
+
!params?.values?.countryId &&
|
|
30
|
+
!params?.values?.dataSourceTypeId &&
|
|
31
|
+
!params?.values?.email &&
|
|
32
|
+
params?.values?.emailVerified == null &&
|
|
33
|
+
!params?.values?.firstName &&
|
|
34
|
+
params?.values?.isAdmin == null &&
|
|
35
|
+
!params?.values?.lastName &&
|
|
36
|
+
!params?.values?.postalCode &&
|
|
37
|
+
!params?.values?.preferredUserName &&
|
|
38
|
+
params?.values?.region === undefined &&
|
|
39
|
+
!params?.values?.status &&
|
|
40
|
+
params?.values?.street === undefined &&
|
|
41
|
+
params?.values?.telephone === undefined &&
|
|
42
|
+
!params?.values?.telephoneCountryCode &&
|
|
43
|
+
!params?.values?.telephoneCountryId &&
|
|
44
|
+
!params?.values?.userName &&
|
|
45
|
+
!params?.values?.latitude &&
|
|
46
|
+
!params?.values?.longitude &&
|
|
47
|
+
!params?.values?.lastLoginAt) {
|
|
48
|
+
logger.warn({ params }, 'UsersRepository::updateUser - missing required parameters');
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
let countryId = params.values.countryId;
|
|
52
|
+
if (!countryId && params.values.countryCode) {
|
|
53
|
+
countryId = await findCountryIdFromCode(params.values.countryCode, novaDataSource, logger);
|
|
54
|
+
}
|
|
55
|
+
let telephoneCountryId = params.values.telephoneCountryId;
|
|
56
|
+
if (!telephoneCountryId && params.values.telephoneCountryCode) {
|
|
57
|
+
telephoneCountryId = await findCountryIdFromCode(params.values.telephoneCountryCode, novaDataSource, logger);
|
|
58
|
+
}
|
|
59
|
+
return novaDataSource.safeQuery(async (dataSource) => {
|
|
60
|
+
const usersRepository = dataSource.getRepository(User);
|
|
61
|
+
const now = new Date();
|
|
62
|
+
let queryBuilder = usersRepository
|
|
63
|
+
.createQueryBuilder()
|
|
64
|
+
.update(User)
|
|
65
|
+
.set({
|
|
66
|
+
firstName: params.values.firstName,
|
|
67
|
+
lastName: params.values.lastName,
|
|
68
|
+
companyName: params.values.companyName,
|
|
69
|
+
telephone: params.values.telephone,
|
|
70
|
+
street: params.values.street,
|
|
71
|
+
postalCode: params.values.postalCode,
|
|
72
|
+
city: params.values.city,
|
|
73
|
+
region: params.values.region,
|
|
74
|
+
email: params.values.email?.toLowerCase(),
|
|
75
|
+
userName: params.values.userName,
|
|
76
|
+
preferredUserName: params.values.preferredUserName,
|
|
77
|
+
status: params.values.status,
|
|
78
|
+
isAdmin: params.values.isAdmin,
|
|
79
|
+
countryId,
|
|
80
|
+
telephoneCountryId,
|
|
81
|
+
dataSourceTypeId: params.values.dataSourceTypeId,
|
|
82
|
+
emailVerified: params.values.emailVerified,
|
|
83
|
+
modifiedAt: now,
|
|
84
|
+
lat: params.values.latitude,
|
|
85
|
+
lon: params.values.longitude,
|
|
86
|
+
lastLoginAt: params.values.lastLoginAt,
|
|
87
|
+
});
|
|
88
|
+
if (binaryBuffer) {
|
|
89
|
+
queryBuilder = queryBuilder.andWhere('id = :id', { id: binaryBuffer });
|
|
90
|
+
}
|
|
91
|
+
if (params.filters.email) {
|
|
92
|
+
queryBuilder = queryBuilder.andWhere('LOWER(email) = LOWER(:email)', {
|
|
93
|
+
email: params.filters.email,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
if (params.filters.statusList?.length) {
|
|
97
|
+
queryBuilder = queryBuilder.andWhere('status IN (:statusList)', {
|
|
98
|
+
statusList: params.filters.statusList,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
if (params.filters.userName) {
|
|
102
|
+
queryBuilder = queryBuilder.andWhere('userName = :userName', {
|
|
103
|
+
userName: params.filters.userName,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
const result = await queryBuilder.execute();
|
|
107
|
+
return result.affected > 0;
|
|
108
|
+
}, 'UsersRepository::updateUser');
|
|
109
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { EventSubscriber } from 'typeorm';
|
|
8
|
+
const entitiesToLogErrorOnDelete = ['Device', 'Billing'];
|
|
9
|
+
let AllEntitiesSubscriber = class AllEntitiesSubscriber {
|
|
10
|
+
// TODO: We need to put back these logs but using the logger instead of the console log
|
|
11
|
+
/**
|
|
12
|
+
* Called after entity insertion.
|
|
13
|
+
*/
|
|
14
|
+
// afterInsert(event: InsertEvent<any>) {
|
|
15
|
+
// console.debug(`AFTER ENTITY INSERTED: `, event.entity)
|
|
16
|
+
// }
|
|
17
|
+
/**
|
|
18
|
+
* Called after entity update.
|
|
19
|
+
*/
|
|
20
|
+
// afterUpdate(event: UpdateEvent<any>) {
|
|
21
|
+
// console.debug(`AFTER ENTITY UPDATED: `, {
|
|
22
|
+
// entity: event.entity,
|
|
23
|
+
// databaseEntity: event.databaseEntity,
|
|
24
|
+
// })
|
|
25
|
+
// }
|
|
26
|
+
/**
|
|
27
|
+
* Called after entity removal.
|
|
28
|
+
*/
|
|
29
|
+
afterRemove(event) {
|
|
30
|
+
const entityType = event.metadata.name;
|
|
31
|
+
const logError = entitiesToLogErrorOnDelete.includes(entityType);
|
|
32
|
+
const message = `ENTITY OF TYPE ${entityType} REMOVED`;
|
|
33
|
+
if (logError) {
|
|
34
|
+
console.error(message, {
|
|
35
|
+
entityId: event.entityId,
|
|
36
|
+
entity: event.entity,
|
|
37
|
+
databaseEntity: event.databaseEntity,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
// else {
|
|
41
|
+
// console.warn(message, {
|
|
42
|
+
// entityId: event.entityId,
|
|
43
|
+
// entity: event.entity,
|
|
44
|
+
// databaseEntity: event.databaseEntity,
|
|
45
|
+
// })
|
|
46
|
+
// }
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
AllEntitiesSubscriber = __decorate([
|
|
50
|
+
EventSubscriber()
|
|
51
|
+
], AllEntitiesSubscriber);
|
|
52
|
+
export { AllEntitiesSubscriber };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export var HapnSecurityRole;
|
|
2
|
+
(function (HapnSecurityRole) {
|
|
3
|
+
HapnSecurityRole[HapnSecurityRole["Admin"] = 1] = "Admin";
|
|
4
|
+
HapnSecurityRole[HapnSecurityRole["Collaborator"] = 2] = "Collaborator";
|
|
5
|
+
HapnSecurityRole[HapnSecurityRole["Owner"] = 3] = "Owner";
|
|
6
|
+
})(HapnSecurityRole || (HapnSecurityRole = {}));
|
|
7
|
+
export var DeviceStatus;
|
|
8
|
+
(function (DeviceStatus) {
|
|
9
|
+
DeviceStatus["Active"] = "A";
|
|
10
|
+
DeviceStatus["Deleted"] = "D";
|
|
11
|
+
})(DeviceStatus || (DeviceStatus = {}));
|
|
12
|
+
export var BoundaryStatus;
|
|
13
|
+
(function (BoundaryStatus) {
|
|
14
|
+
BoundaryStatus[BoundaryStatus["Active"] = 1] = "Active";
|
|
15
|
+
BoundaryStatus[BoundaryStatus["Inactive"] = 2] = "Inactive";
|
|
16
|
+
BoundaryStatus[BoundaryStatus["Deleted"] = 3] = "Deleted";
|
|
17
|
+
})(BoundaryStatus || (BoundaryStatus = {}));
|
|
18
|
+
export var HapnClientType;
|
|
19
|
+
(function (HapnClientType) {
|
|
20
|
+
HapnClientType[HapnClientType["b2c"] = 1] = "b2c";
|
|
21
|
+
HapnClientType[HapnClientType["b2b"] = 2] = "b2b";
|
|
22
|
+
HapnClientType[HapnClientType["test"] = 3] = "test";
|
|
23
|
+
})(HapnClientType || (HapnClientType = {}));
|
|
24
|
+
export var DeviceBehaviorType;
|
|
25
|
+
(function (DeviceBehaviorType) {
|
|
26
|
+
DeviceBehaviorType["ReportingFrequency"] = "ReportingFrequency";
|
|
27
|
+
DeviceBehaviorType["Advanced"] = "Advanced";
|
|
28
|
+
DeviceBehaviorType["Query"] = "Query";
|
|
29
|
+
DeviceBehaviorType["General"] = "General";
|
|
30
|
+
})(DeviceBehaviorType || (DeviceBehaviorType = {}));
|
|
31
|
+
export var DeviceBehaviorStatus;
|
|
32
|
+
(function (DeviceBehaviorStatus) {
|
|
33
|
+
DeviceBehaviorStatus["Active"] = "active";
|
|
34
|
+
DeviceBehaviorStatus["Inactive"] = "inactive";
|
|
35
|
+
})(DeviceBehaviorStatus || (DeviceBehaviorStatus = {}));
|
|
36
|
+
export var DeviceBehaviorTaskStatus;
|
|
37
|
+
(function (DeviceBehaviorTaskStatus) {
|
|
38
|
+
DeviceBehaviorTaskStatus["InProgress"] = "InProgress";
|
|
39
|
+
DeviceBehaviorTaskStatus["Completed"] = "Completed";
|
|
40
|
+
DeviceBehaviorTaskStatus["Canceled"] = "Canceled";
|
|
41
|
+
DeviceBehaviorTaskStatus["Failed"] = "Failed";
|
|
42
|
+
})(DeviceBehaviorTaskStatus || (DeviceBehaviorTaskStatus = {}));
|
|
43
|
+
export var NotificationRecipientType;
|
|
44
|
+
(function (NotificationRecipientType) {
|
|
45
|
+
NotificationRecipientType[NotificationRecipientType["Email"] = 1] = "Email";
|
|
46
|
+
NotificationRecipientType[NotificationRecipientType["Phone"] = 2] = "Phone";
|
|
47
|
+
})(NotificationRecipientType || (NotificationRecipientType = {}));
|
|
48
|
+
export var BlacklistType;
|
|
49
|
+
(function (BlacklistType) {
|
|
50
|
+
BlacklistType[BlacklistType["CreditCard"] = 1] = "CreditCard";
|
|
51
|
+
BlacklistType[BlacklistType["Email"] = 2] = "Email";
|
|
52
|
+
BlacklistType[BlacklistType["Address"] = 3] = "Address";
|
|
53
|
+
BlacklistType[BlacklistType["Ip"] = 4] = "Ip";
|
|
54
|
+
BlacklistType[BlacklistType["Imei"] = 5] = "Imei";
|
|
55
|
+
BlacklistType[BlacklistType["ClientId"] = 6] = "ClientId";
|
|
56
|
+
})(BlacklistType || (BlacklistType = {}));
|
|
57
|
+
export var TripType;
|
|
58
|
+
(function (TripType) {
|
|
59
|
+
TripType[TripType["Trip"] = 1] = "Trip";
|
|
60
|
+
TripType[TripType["Stop"] = 2] = "Stop";
|
|
61
|
+
})(TripType || (TripType = {}));
|
|
62
|
+
export var TripCompletionStatus;
|
|
63
|
+
(function (TripCompletionStatus) {
|
|
64
|
+
TripCompletionStatus[TripCompletionStatus["Current"] = 1] = "Current";
|
|
65
|
+
TripCompletionStatus[TripCompletionStatus["Completed"] = 2] = "Completed";
|
|
66
|
+
TripCompletionStatus[TripCompletionStatus["Deleted"] = 3] = "Deleted";
|
|
67
|
+
TripCompletionStatus[TripCompletionStatus["TempCurrent"] = 10] = "TempCurrent";
|
|
68
|
+
TripCompletionStatus[TripCompletionStatus["TempCompleted"] = 20] = "TempCompleted";
|
|
69
|
+
})(TripCompletionStatus || (TripCompletionStatus = {}));
|
|
70
|
+
export var BoundaryEventType;
|
|
71
|
+
(function (BoundaryEventType) {
|
|
72
|
+
BoundaryEventType["Enter"] = "boundaryEnter";
|
|
73
|
+
BoundaryEventType["Exit"] = "boundaryExit";
|
|
74
|
+
})(BoundaryEventType || (BoundaryEventType = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export var UpgradeType;
|
|
2
|
+
(function (UpgradeType) {
|
|
3
|
+
UpgradeType["BB"] = "0";
|
|
4
|
+
UpgradeType["MCU"] = "1";
|
|
5
|
+
UpgradeType["BLE"] = "2";
|
|
6
|
+
UpgradeType["MODEM"] = "7";
|
|
7
|
+
})(UpgradeType || (UpgradeType = {}));
|
|
8
|
+
export var FirmwareUpgradeTaskStatus;
|
|
9
|
+
(function (FirmwareUpgradeTaskStatus) {
|
|
10
|
+
FirmwareUpgradeTaskStatus["Queued"] = "Queued";
|
|
11
|
+
FirmwareUpgradeTaskStatus["QueuedWaitingForConfig"] = "QueuedWaitingForConfig";
|
|
12
|
+
FirmwareUpgradeTaskStatus["QueuedWaitingForVersionMessage"] = "QueuedWaitingForVersionMessage";
|
|
13
|
+
FirmwareUpgradeTaskStatus["InProgress"] = "InProgress";
|
|
14
|
+
FirmwareUpgradeTaskStatus["Completed"] = "Completed";
|
|
15
|
+
FirmwareUpgradeTaskStatus["Canceled"] = "Canceled";
|
|
16
|
+
FirmwareUpgradeTaskStatus["Failed"] = "Failed";
|
|
17
|
+
})(FirmwareUpgradeTaskStatus || (FirmwareUpgradeTaskStatus = {}));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as Acumatica from './acumatica';
|
|
2
|
+
import * as Alerts from './alert';
|
|
3
|
+
import * as AlertTypes from './alertTypes';
|
|
4
|
+
import * as AppFeatures from './appFeatures';
|
|
5
|
+
import * as Billing from './billing';
|
|
6
|
+
import * as Blacklist from './blacklist';
|
|
7
|
+
import * as Boundaries from './boundaries';
|
|
8
|
+
import * as Clients from './clients';
|
|
9
|
+
import * as Countries from './countries';
|
|
10
|
+
import * as Deactivations from './deactivations';
|
|
11
|
+
import * as DeviceBehaviors from './deviceBehaviors';
|
|
12
|
+
import * as DevicePairings from './devicePairings';
|
|
13
|
+
import * as Devices from './devices';
|
|
14
|
+
import * as Enums from './enums';
|
|
15
|
+
import * as Firmwares from './firmwares';
|
|
16
|
+
import * as Logger from './logger';
|
|
17
|
+
import * as NotificationRecipients from './notificationRecipients';
|
|
18
|
+
import * as Positions from './position';
|
|
19
|
+
import * as Security from './security';
|
|
20
|
+
import * as Trips from './trip';
|
|
21
|
+
import * as Users from './user';
|
|
22
|
+
import * as UserActivations from './userActivations';
|
|
23
|
+
import * as UserAppFeedback from './userAppFeedback';
|
|
24
|
+
import * as UserAppIncidents from './userAppIncidents';
|
|
25
|
+
import * as UserConfigurations from './userConfigurations';
|
|
26
|
+
import * as UserDataDeletionRequests from './userDataDeletionRequests';
|
|
27
|
+
import * as UserInvitations from './userInvitations';
|
|
28
|
+
import * as UserRatingRequests from './userRatingRequests';
|
|
29
|
+
import * as UserRegistrationAttempts from './userRegistrationAttempts';
|
|
30
|
+
export { Acumatica, Alerts, AlertTypes, AppFeatures, Billing, Blacklist, Boundaries, Clients, Countries, Deactivations, DeviceBehaviors, DevicePairings, Devices, Firmwares, Logger, NotificationRecipients, Positions, Security, Trips, Users, UserActivations, UserAppFeedback, UserAppIncidents, UserConfigurations, UserDataDeletionRequests, UserInvitations, UserRatingRequests, UserRegistrationAttempts, Enums, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const requiredCreateTripParamsAttributes = [
|
|
2
|
+
'tripGuid',
|
|
3
|
+
'imei',
|
|
4
|
+
'startDate',
|
|
5
|
+
'distance',
|
|
6
|
+
'startLat',
|
|
7
|
+
'startLon',
|
|
8
|
+
'startAddress',
|
|
9
|
+
'positionStart',
|
|
10
|
+
'tripCompletionStatusId',
|
|
11
|
+
'clientId',
|
|
12
|
+
'duration',
|
|
13
|
+
'tripType',
|
|
14
|
+
'startMessageId',
|
|
15
|
+
];
|
|
16
|
+
export const requiredUpdateTripEndValuesParamsAttributes = [
|
|
17
|
+
'filters.tripGuid',
|
|
18
|
+
'values.endDate',
|
|
19
|
+
'values.endLat',
|
|
20
|
+
'values.endLon',
|
|
21
|
+
'values.endAddress',
|
|
22
|
+
'values.positionEnd',
|
|
23
|
+
'values.endMessageId',
|
|
24
|
+
'values.distance',
|
|
25
|
+
'values.duration',
|
|
26
|
+
'values.tripType',
|
|
27
|
+
'values.tripCompletionStatusId',
|
|
28
|
+
];
|
|
29
|
+
export const requiredGetTripsParamsAttributes = ['filters.clientId', 'filters.from', 'filters.to'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const anyAttributeHasValue = (obj) => {
|
|
2
|
+
if (!obj)
|
|
3
|
+
return false;
|
|
4
|
+
for (const key in obj) {
|
|
5
|
+
if (obj.hasOwnProperty(key)) {
|
|
6
|
+
const value = obj[key];
|
|
7
|
+
if (value != null) {
|
|
8
|
+
if (typeof value === 'object') {
|
|
9
|
+
if (anyAttributeHasValue(value)) {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return false;
|
|
20
|
+
};
|