@spytecgps/nova-orm 1.2.29-rc7 → 1.2.29-rc8
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 +2 -1
- package/dist/entities/acumaticaAmazonProduct.js.map +1 -0
- package/dist/entities/acumaticaImeiIccidData.js +4 -2
- package/dist/entities/acumaticaImeiIccidData.js.map +1 -0
- package/dist/entities/acumaticaOrderShipmentDetails.js +5 -3
- package/dist/entities/acumaticaOrderShipmentDetails.js.map +1 -0
- package/dist/entities/acumaticaShipment.js +1 -0
- package/dist/entities/acumaticaShipment.js.map +1 -0
- package/dist/entities/acumaticaShipmentAmazon.js +1 -0
- package/dist/entities/acumaticaShipmentAmazon.js.map +1 -0
- package/dist/entities/aempToken.d.ts +1 -0
- package/dist/entities/aempToken.js +1 -0
- package/dist/entities/aempToken.js.map +1 -0
- package/dist/entities/airflow/airflowAcumaticaExportImeiIccidData.js +82 -0
- package/dist/entities/airflow/airflowAcumaticaExportImeiIccidData.js.map +1 -0
- package/dist/entities/airflow/airflowAcumaticaExportOrderShipmentDetails.js +147 -0
- package/dist/entities/airflow/airflowAcumaticaExportOrderShipmentDetails.js.map +1 -0
- package/dist/entities/airflow/airflowAcumaticaShipmentsAmazon.js +42 -0
- package/dist/entities/airflow/airflowAcumaticaShipmentsAmazon.js.map +1 -0
- package/dist/entities/alert.d.ts +1 -0
- package/dist/entities/alert.js +11 -3
- package/dist/entities/alert.js.map +1 -0
- package/dist/entities/alertType.js +1 -0
- package/dist/entities/alertType.js.map +1 -0
- package/dist/entities/appFeatureType.js +1 -0
- package/dist/entities/appFeatureType.js.map +1 -0
- package/dist/entities/{deviceTypeEvent.js → asinPromotion.js} +24 -19
- package/dist/entities/asinPromotion.js.map +1 -0
- package/dist/entities/assetCategory.js +1 -0
- package/dist/entities/assetCategory.js.map +1 -0
- package/dist/entities/beaconBleMesh.js +63 -0
- package/dist/entities/beaconBleMesh.js.map +1 -0
- package/dist/entities/billing.js +1 -0
- package/dist/entities/billing.js.map +1 -0
- package/dist/entities/billingCustomerAmazon.js +83 -0
- package/dist/entities/billingCustomerAmazon.js.map +1 -0
- package/dist/entities/billingCustomerBraintree.js +1 -0
- package/dist/entities/billingCustomerBraintree.js.map +1 -0
- package/dist/entities/billingDeviceHistory.js +1 -0
- package/dist/entities/billingDeviceHistory.js.map +1 -0
- package/dist/entities/billingDeviceTypePlan.js +64 -0
- package/dist/entities/billingDeviceTypePlan.js.map +1 -0
- package/dist/entities/billingHubspotPaymentLog.js +1 -0
- package/dist/entities/billingHubspotPaymentLog.js.map +1 -0
- package/dist/entities/billingKlarnaCustomer.js +1 -0
- package/dist/entities/billingKlarnaCustomer.js.map +1 -0
- package/dist/entities/billingKlarnaOrder.js +1 -0
- package/dist/entities/billingKlarnaOrder.js.map +1 -0
- package/dist/entities/billingPlanFeatures.js +37 -0
- package/dist/entities/billingPlanFeatures.js.map +1 -0
- package/dist/entities/billingPlans.js +127 -0
- package/dist/entities/billingPlans.js.map +1 -0
- package/dist/entities/billingStatusHistoryBraintree.js +1 -0
- package/dist/entities/billingStatusHistoryBraintree.js.map +1 -0
- package/dist/entities/billingSubscriptionAmazon.js +162 -0
- package/dist/entities/billingSubscriptionAmazon.js.map +1 -0
- package/dist/entities/billingSubscriptionBraintree.js +1 -0
- package/dist/entities/billingSubscriptionBraintree.js.map +1 -0
- package/dist/entities/blacklist.js +1 -0
- package/dist/entities/blacklist.js.map +1 -0
- package/dist/entities/blacklistType.js +1 -0
- package/dist/entities/blacklistType.js.map +1 -0
- package/dist/entities/bleMesh.js +74 -0
- package/dist/entities/bleMesh.js.map +1 -0
- package/dist/entities/bleMeshConfiguration.js +1 -1
- package/dist/entities/bleMeshConfiguration.js.map +1 -0
- package/dist/entities/boundary.js +2 -0
- package/dist/entities/boundary.js.map +1 -0
- package/dist/entities/boundaryEvent.d.ts +1 -0
- package/dist/entities/boundaryEvent.js +1 -0
- package/dist/entities/boundaryEvent.js.map +1 -0
- package/dist/entities/cellTower.js +1 -0
- package/dist/entities/cellTower.js.map +1 -0
- package/dist/entities/client.d.ts +1 -0
- package/dist/entities/client.js +1 -6
- package/dist/entities/client.js.map +1 -0
- package/dist/entities/clientAlertConfiguration.js +90 -0
- package/dist/entities/clientAlertConfiguration.js.map +1 -0
- package/dist/entities/clientAlertRecipient.d.ts +1 -0
- package/dist/entities/clientAlertRecipient.js +98 -0
- package/dist/entities/clientAlertRecipient.js.map +1 -0
- package/dist/entities/clientAppFeature.js +1 -0
- package/dist/entities/clientAppFeature.js.map +1 -0
- package/dist/entities/clientConfiguration.js +14 -2
- package/dist/entities/clientConfiguration.js.map +1 -0
- package/dist/entities/clientDeviceSetting.js +6 -0
- package/dist/entities/clientDeviceSetting.js.map +1 -0
- package/dist/entities/clientIngestorConfiguration.js +48 -0
- package/dist/entities/clientIngestorConfiguration.js.map +1 -0
- package/dist/entities/clientType.js +1 -0
- package/dist/entities/clientType.js.map +1 -0
- package/dist/entities/country.js +3 -1
- package/dist/entities/country.js.map +1 -0
- package/dist/entities/customerAttribute.js +29 -0
- package/dist/entities/customerAttribute.js.map +1 -0
- package/dist/entities/dataExport.d.ts +1 -0
- package/dist/entities/dataExport.js +74 -0
- package/dist/entities/dataExport.js.map +1 -0
- package/dist/entities/dataSourceType.js +1 -0
- package/dist/entities/dataSourceType.js.map +1 -0
- package/dist/entities/deactivation.js +1 -0
- package/dist/entities/deactivation.js.map +1 -0
- package/dist/entities/deactivationReason.js +1 -0
- package/dist/entities/deactivationReason.js.map +1 -0
- package/dist/entities/device.js +14 -0
- package/dist/entities/device.js.map +1 -0
- package/dist/entities/deviceBehavior.js +1 -0
- package/dist/entities/deviceBehavior.js.map +1 -0
- package/dist/entities/deviceBleMesh.js +78 -0
- package/dist/entities/deviceBleMesh.js.map +1 -0
- package/dist/entities/deviceBleMeshUpdateTask.d.ts +1 -0
- package/dist/entities/deviceBleMeshUpdateTask.js +83 -0
- package/dist/entities/deviceBleMeshUpdateTask.js.map +1 -0
- package/dist/entities/deviceChangesHistory.js +48 -0
- package/dist/entities/deviceChangesHistory.js.map +1 -0
- package/dist/entities/deviceCustomConfiguration.js +12 -2
- package/dist/entities/deviceCustomConfiguration.js.map +1 -0
- package/dist/entities/deviceHistory.js +1 -0
- package/dist/entities/deviceHistory.js.map +1 -0
- package/dist/entities/deviceModelListener.js +1 -0
- package/dist/entities/deviceModelListener.js.map +1 -0
- package/dist/entities/devicePairing.js +16 -0
- package/dist/entities/devicePairing.js.map +1 -0
- package/dist/entities/devicePromotion.js +6 -73
- package/dist/entities/devicePromotion.js.map +1 -0
- package/dist/entities/deviceReplacement.d.ts +1 -0
- package/dist/entities/deviceReplacement.js +1 -0
- package/dist/entities/deviceReplacement.js.map +1 -0
- package/dist/entities/deviceStatus.js +61 -0
- package/dist/entities/deviceStatus.js.map +1 -0
- package/dist/entities/deviceTask.js +1 -0
- package/dist/entities/deviceTask.js.map +1 -0
- package/dist/entities/deviceType.js +2 -7
- package/dist/entities/deviceType.js.map +1 -0
- package/dist/entities/deviceTypeFeature.js +1 -0
- package/dist/entities/deviceTypeFeature.js.map +1 -0
- package/dist/entities/deviceTypeFirmware.js +1 -0
- package/dist/entities/deviceTypeFirmware.js.map +1 -0
- package/dist/entities/deviceTypePromotion.js +37 -0
- package/dist/entities/deviceTypePromotion.js.map +1 -0
- package/dist/entities/emailDomain.js +39 -0
- package/dist/entities/emailDomain.js.map +1 -0
- package/dist/entities/entityTag.js +41 -17
- package/dist/entities/entityTag.js.map +1 -0
- package/dist/entities/entityType.js +1 -0
- package/dist/entities/entityType.js.map +1 -0
- package/dist/entities/feature.js +1 -0
- package/dist/entities/feature.js.map +1 -0
- package/dist/entities/firmwareAutoUpgradeBlacklist.js +1 -0
- package/dist/entities/firmwareAutoUpgradeBlacklist.js.map +1 -0
- package/dist/entities/firmwareUpgradeTask.d.ts +1 -0
- package/dist/entities/firmwareUpgradeTask.js +3 -0
- package/dist/entities/firmwareUpgradeTask.js.map +1 -0
- package/dist/entities/iccidStatus.js +1 -0
- package/dist/entities/iccidStatus.js.map +1 -0
- package/dist/entities/imeiIccidCarrier.js +1 -0
- package/dist/entities/imeiIccidCarrier.js.map +1 -0
- package/dist/entities/imeiIccidHistory.js +1 -0
- package/dist/entities/imeiIccidHistory.js.map +1 -0
- package/dist/entities/{event.js → imeiIccidImport.js} +16 -20
- package/dist/entities/imeiIccidImport.js.map +1 -0
- package/dist/entities/index.js +29 -8
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/industry.js +1 -0
- package/dist/entities/industry.js.map +1 -0
- package/dist/entities/latestPosition.d.ts +1 -0
- package/dist/entities/latestPosition.js +6 -0
- package/dist/entities/latestPosition.js.map +1 -0
- package/dist/entities/latestPositionMigration.d.ts +1 -0
- package/dist/entities/latestPositionMigration.js +1 -0
- package/dist/entities/latestPositionMigration.js.map +1 -0
- package/dist/entities/latestPositionMigrationBatch.js +1 -0
- package/dist/entities/latestPositionMigrationBatch.js.map +1 -0
- package/dist/entities/latestUserAppInfo.d.ts +1 -0
- package/dist/entities/latestUserAppInfo.js +43 -0
- package/dist/entities/latestUserAppInfo.js.map +1 -0
- package/dist/entities/liveLink.js +126 -0
- package/dist/entities/liveLink.js.map +1 -0
- package/dist/entities/magento2Gps.js +7 -4
- package/dist/entities/magento2Gps.js.map +1 -0
- package/dist/entities/magento2Plan.js +1 -0
- package/dist/entities/magento2Plan.js.map +1 -0
- package/dist/entities/marketplacePromotion.js +37 -0
- package/dist/entities/marketplacePromotion.js.map +1 -0
- package/dist/entities/mobileNetwork.js +1 -0
- package/dist/entities/mobileNetwork.js.map +1 -0
- package/dist/entities/notificationRecipient.d.ts +1 -0
- package/dist/entities/notificationRecipient.js +29 -1
- package/dist/entities/notificationRecipient.js.map +1 -0
- package/dist/entities/orderShipmentInternational.js +67 -0
- package/dist/entities/orderShipmentInternational.js.map +1 -0
- package/dist/entities/organization.d.ts +1 -0
- package/dist/entities/organization.js +1 -0
- package/dist/entities/organization.js.map +1 -0
- package/dist/entities/plan.js +1 -0
- package/dist/entities/plan.js.map +1 -0
- package/dist/entities/position.d.ts +1 -0
- package/dist/entities/position.js +6 -2
- package/dist/entities/position.js.map +1 -0
- package/dist/entities/positionMigration.d.ts +1 -0
- package/dist/entities/positionMigration.js +1 -0
- package/dist/entities/positionMigration.js.map +1 -0
- package/dist/entities/positionMigrationBatch.js +1 -0
- package/dist/entities/positionMigrationBatch.js.map +1 -0
- package/dist/entities/promotion.js +47 -45
- package/dist/entities/promotion.js.map +1 -0
- package/dist/entities/promotionHistory.js +90 -0
- package/dist/entities/promotionHistory.js.map +1 -0
- package/dist/entities/securityRole.js +8 -1
- package/dist/entities/securityRole.js.map +1 -0
- package/dist/entities/serviceProvider.js +1 -0
- package/dist/entities/serviceProvider.js.map +1 -0
- package/dist/entities/serviceProviderProduct.js +2 -1
- package/dist/entities/serviceProviderProduct.js.map +1 -0
- package/dist/entities/serviceProviderProductNetwork.js +1 -0
- package/dist/entities/serviceProviderProductNetwork.js.map +1 -0
- package/dist/entities/serviceProviderProductType.js +1 -0
- package/dist/entities/serviceProviderProductType.js.map +1 -0
- package/dist/entities/sim.js +1 -0
- package/dist/entities/sim.js.map +1 -0
- package/dist/entities/subscriptionHistoricalPrice.js +151 -0
- package/dist/entities/subscriptionHistoricalPrice.js.map +1 -0
- package/dist/entities/tag.js +68 -0
- package/dist/entities/tag.js.map +1 -0
- package/dist/entities/task.js +41 -2
- package/dist/entities/task.js.map +1 -0
- package/dist/entities/taskSchedule.js +7 -1
- package/dist/entities/taskSchedule.js.map +1 -0
- package/dist/entities/trip.d.ts +1 -0
- package/dist/entities/trip.js +12 -0
- package/dist/entities/trip.js.map +1 -0
- package/dist/entities/tripCompletionStatus.js +1 -0
- package/dist/entities/tripCompletionStatus.js.map +1 -0
- package/dist/entities/tripPosition.js +1 -0
- package/dist/entities/tripPosition.js.map +1 -0
- package/dist/entities/user.d.ts +1 -0
- package/dist/entities/user.js +23 -1
- package/dist/entities/user.js.map +1 -0
- package/dist/entities/userActivation.d.ts +1 -0
- package/dist/entities/userActivation.js +1 -0
- package/dist/entities/userActivation.js.map +1 -0
- package/dist/entities/userActivationDevice.js +3 -2
- package/dist/entities/userActivationDevice.js.map +1 -0
- package/dist/entities/userActivationEvent.d.ts +1 -0
- package/dist/entities/userActivationEvent.js +1 -0
- package/dist/entities/userActivationEvent.js.map +1 -0
- package/dist/entities/userActivationMetric.d.ts +1 -0
- package/dist/entities/userActivationMetric.js +1 -0
- package/dist/entities/userActivationMetric.js.map +1 -0
- package/dist/entities/userAlertComplain.d.ts +1 -0
- package/dist/entities/userAlertComplain.js +1 -0
- package/dist/entities/userAlertComplain.js.map +1 -0
- package/dist/entities/userAlertConfiguration.d.ts +1 -0
- package/dist/entities/userAlertConfiguration.js +37 -3
- package/dist/entities/userAlertConfiguration.js.map +1 -0
- package/dist/entities/userAlertNotificationsConfig.d.ts +1 -0
- package/dist/entities/userAlertNotificationsConfig.js +91 -0
- package/dist/entities/userAlertNotificationsConfig.js.map +1 -0
- package/dist/entities/userAppFeedback.d.ts +1 -0
- package/dist/entities/userAppFeedback.js +1 -0
- package/dist/entities/userAppFeedback.js.map +1 -0
- package/dist/entities/userAppIncident.d.ts +1 -0
- package/dist/entities/userAppIncident.js +1 -0
- package/dist/entities/userAppIncident.js.map +1 -0
- package/dist/entities/userConfiguration.d.ts +1 -0
- package/dist/entities/userConfiguration.js +1 -0
- package/dist/entities/userConfiguration.js.map +1 -0
- package/dist/entities/userDataDeletionRequest.d.ts +1 -0
- package/dist/entities/userDataDeletionRequest.js +3 -1
- package/dist/entities/userDataDeletionRequest.js.map +1 -0
- package/dist/entities/userDeviceBehaviorTask.d.ts +1 -0
- package/dist/entities/userDeviceBehaviorTask.js +1 -0
- package/dist/entities/userDeviceBehaviorTask.js.map +1 -0
- package/dist/entities/userInvitation.js +14 -1
- package/dist/entities/userInvitation.js.map +1 -0
- package/dist/entities/userRatingRequest.d.ts +1 -0
- package/dist/entities/userRatingRequest.js +1 -0
- package/dist/entities/userRatingRequest.js.map +1 -0
- package/dist/entities/userRegistrationAttempt.d.ts +1 -0
- package/dist/entities/userRegistrationAttempt.js +1 -0
- package/dist/entities/userRegistrationAttempt.js.map +1 -0
- package/dist/entities/userSecurityRole.d.ts +1 -0
- package/dist/entities/userSecurityRole.js +14 -1
- package/dist/entities/userSecurityRole.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -0
- package/dist/migration/1684483704434-addLowerCaseIndex.js +1 -0
- package/dist/migration/1684483704434-addLowerCaseIndex.js.map +1 -0
- package/dist/novaDataSource.js +99 -16
- package/dist/novaDataSource.js.map +1 -0
- package/dist/repositories/acumatica/getAcumaticaImeiIccidData.js +15 -3
- package/dist/repositories/acumatica/getAcumaticaImeiIccidData.js.map +1 -0
- package/dist/repositories/acumatica/getAcumaticaShipmentAmazon.js +23 -0
- package/dist/repositories/acumatica/getAcumaticaShipmentAmazon.js.map +1 -0
- package/dist/repositories/acumatica/getAcumaticaShipmentDetails.js +9 -3
- package/dist/repositories/acumatica/getAcumaticaShipmentDetails.js.map +1 -0
- package/dist/repositories/acumatica/getLastAcumaticaShipmentDetails.js +8 -2
- package/dist/repositories/acumatica/getLastAcumaticaShipmentDetails.js.map +1 -0
- package/dist/repositories/acumatica/getOrderShipmentInternational.js +23 -0
- package/dist/repositories/acumatica/getOrderShipmentInternational.js.map +1 -0
- package/dist/repositories/acumatica/index.js +32 -3
- package/dist/repositories/acumatica/index.js.map +1 -0
- package/dist/repositories/aempToken/createAempToken.js +1 -0
- package/dist/repositories/aempToken/createAempToken.js.map +1 -0
- package/dist/repositories/aempToken/deleteAempTokens.js +4 -3
- package/dist/repositories/aempToken/deleteAempTokens.js.map +1 -0
- package/dist/repositories/aempToken/getAempTokens.js +12 -4
- package/dist/repositories/aempToken/getAempTokens.js.map +1 -0
- package/dist/repositories/aempToken/index.js +4 -3
- package/dist/repositories/aempToken/index.js.map +1 -0
- package/dist/repositories/alertTypes/getAlertTypes.js +8 -2
- package/dist/repositories/alertTypes/getAlertTypes.js.map +1 -0
- package/dist/repositories/alertTypes/index.js +2 -1
- package/dist/repositories/alertTypes/index.js.map +1 -0
- package/dist/repositories/alerts/createAlert.js +5 -0
- package/dist/repositories/alerts/createAlert.js.map +1 -0
- package/dist/repositories/alerts/createUserAlertComplain.js +1 -0
- package/dist/repositories/alerts/createUserAlertComplain.js.map +1 -0
- package/dist/repositories/alerts/getAlertsReportByClient.js +5 -0
- package/dist/repositories/alerts/getAlertsReportByClient.js.map +1 -0
- package/dist/repositories/alerts/getAlertsReportByUser.js +5 -0
- package/dist/repositories/alerts/getAlertsReportByUser.js.map +1 -0
- package/dist/repositories/alerts/index.js +5 -4
- package/dist/repositories/alerts/index.js.map +1 -0
- package/dist/repositories/appFeatures/createAppFeatureType.js +1 -0
- package/dist/repositories/appFeatures/createAppFeatureType.js.map +1 -0
- package/dist/repositories/appFeatures/createClientAppFeature.js +1 -0
- package/dist/repositories/appFeatures/createClientAppFeature.js.map +1 -0
- package/dist/repositories/appFeatures/getClientAppFeatures.js +8 -2
- package/dist/repositories/appFeatures/getClientAppFeatures.js.map +1 -0
- package/dist/repositories/appFeatures/index.js +4 -3
- package/dist/repositories/appFeatures/index.js.map +1 -0
- package/dist/repositories/assetCategories/getAssetCategories.js +15 -4
- package/dist/repositories/assetCategories/getAssetCategories.js.map +1 -0
- package/dist/repositories/assetCategories/index.js +4 -3
- package/dist/repositories/assetCategories/index.js.map +1 -0
- package/dist/repositories/baseRepository.js +16 -1
- package/dist/repositories/baseRepository.js.map +1 -0
- package/dist/repositories/billing/createBilling.js +1 -0
- package/dist/repositories/billing/createBilling.js.map +1 -0
- package/dist/repositories/billing/createBillingDeviceHistory.js +2 -1
- package/dist/repositories/billing/createBillingDeviceHistory.js.map +1 -0
- package/dist/repositories/billing/createBillingHubspotPaymentLog.js +1 -0
- package/dist/repositories/billing/createBillingHubspotPaymentLog.js.map +1 -0
- package/dist/repositories/billing/createBillingStatusHistoryBraintree.js +1 -0
- package/dist/repositories/billing/createBillingStatusHistoryBraintree.js.map +1 -0
- package/dist/repositories/billing/getBillingCustomerBraintreeById.js +8 -2
- package/dist/repositories/billing/getBillingCustomerBraintreeById.js.map +1 -0
- package/dist/repositories/billing/getBillingDeviceTypePlans.js +22 -0
- package/dist/repositories/billing/getBillingDeviceTypePlans.js.map +1 -0
- package/dist/repositories/billing/getBillingKlarnaOrderByImei.js +8 -2
- package/dist/repositories/billing/getBillingKlarnaOrderByImei.js.map +1 -0
- package/dist/repositories/billing/getBillingPlans.js +68 -0
- package/dist/repositories/billing/getBillingPlans.js.map +1 -0
- package/dist/repositories/billing/getBillingSubscriptionBraintreeByImei.js +8 -2
- package/dist/repositories/billing/getBillingSubscriptionBraintreeByImei.js.map +1 -0
- package/dist/repositories/billing/getBillingSubscriptionsBraintree.js +10 -4
- package/dist/repositories/billing/getBillingSubscriptionsBraintree.js.map +1 -0
- package/dist/repositories/billing/getBillings.js +12 -6
- package/dist/repositories/billing/getBillings.js.map +1 -0
- package/dist/repositories/billing/getBraintreePastDueSubscriptions.js +49 -0
- package/dist/repositories/billing/getBraintreePastDueSubscriptions.js.map +1 -0
- package/dist/repositories/billing/getCanceledImeis.js +19 -7
- package/dist/repositories/billing/getCanceledImeis.js.map +1 -0
- package/dist/repositories/billing/getCanceledImeisMatchingMagentoData.js +39 -19
- package/dist/repositories/billing/getCanceledImeisMatchingMagentoData.js.map +1 -0
- package/dist/repositories/billing/getChurnStatusByClientId.js +14 -4
- package/dist/repositories/billing/getChurnStatusByClientId.js.map +1 -0
- package/dist/repositories/billing/getClientIdFromBraintreeCustomer.js +8 -2
- package/dist/repositories/billing/getClientIdFromBraintreeCustomer.js.map +1 -0
- package/dist/repositories/billing/getMagentoPlan.js +8 -2
- package/dist/repositories/billing/getMagentoPlan.js.map +1 -0
- package/dist/repositories/billing/getUserByBraintreeCustomerId.js +8 -2
- package/dist/repositories/billing/getUserByBraintreeCustomerId.js.map +1 -0
- package/dist/repositories/billing/index.js +93 -21
- package/dist/repositories/billing/index.js.map +1 -0
- package/dist/repositories/billing/updateBilling.js +1 -0
- package/dist/repositories/billing/updateBilling.js.map +1 -0
- package/dist/repositories/billing/updateBillingCustomerBraintree.js +1 -0
- package/dist/repositories/billing/updateBillingCustomerBraintree.js.map +1 -0
- package/dist/repositories/billing/upsertBillingCustomerBraintree.js +11 -1
- package/dist/repositories/billing/upsertBillingCustomerBraintree.js.map +1 -0
- package/dist/repositories/billing/upsertBillingDeviceTypePlan.js +67 -0
- package/dist/repositories/billing/upsertBillingDeviceTypePlan.js.map +1 -0
- package/dist/repositories/billing/upsertBillingKlarnaCustomer.js +1 -0
- package/dist/repositories/billing/upsertBillingKlarnaCustomer.js.map +1 -0
- package/dist/repositories/billing/upsertBillingKlarnaOrder.js +1 -0
- package/dist/repositories/billing/upsertBillingKlarnaOrder.js.map +1 -0
- package/dist/repositories/billing/upsertBillingPlans.js +54 -0
- package/dist/repositories/billing/upsertBillingPlans.js.map +1 -0
- package/dist/repositories/billing/upsertBillingSubscriptionBraintree.js +1 -0
- package/dist/repositories/billing/upsertBillingSubscriptionBraintree.js.map +1 -0
- package/dist/repositories/blacklist/deleteBlackList.js +20 -0
- package/dist/repositories/blacklist/deleteBlackList.js.map +1 -0
- package/dist/repositories/blacklist/getBlacklists.js +8 -2
- package/dist/repositories/blacklist/getBlacklists.js.map +1 -0
- package/dist/repositories/blacklist/index.js +53 -1
- package/dist/repositories/blacklist/index.js.map +1 -0
- package/dist/repositories/blacklist/updateBlackList.js +31 -0
- package/dist/repositories/blacklist/updateBlackList.js.map +1 -0
- package/dist/repositories/blacklist/upsertBlackList.js +41 -0
- package/dist/repositories/blacklist/upsertBlackList.js.map +1 -0
- package/dist/repositories/bleMesh/addBeaconBLEMesh.js +29 -0
- package/dist/repositories/bleMesh/addBeaconBLEMesh.js.map +1 -0
- package/dist/repositories/bleMesh/addDevicesToBLEMesh.js +38 -0
- package/dist/repositories/bleMesh/addDevicesToBLEMesh.js.map +1 -0
- package/dist/repositories/bleMesh/createBLEMesh.js +19 -0
- package/dist/repositories/bleMesh/createBLEMesh.js.map +1 -0
- package/dist/repositories/bleMesh/createDeviceBLEMeshUpdateTask.js +47 -0
- package/dist/repositories/bleMesh/createDeviceBLEMeshUpdateTask.js.map +1 -0
- package/dist/repositories/bleMesh/getBLEMeshes.js +46 -0
- package/dist/repositories/bleMesh/getBLEMeshes.js.map +1 -0
- package/dist/repositories/bleMesh/getBeaconBLEMeshes.js +44 -0
- package/dist/repositories/bleMesh/getBeaconBLEMeshes.js.map +1 -0
- package/dist/repositories/bleMesh/getDeviceBLEMeshUpdateTasks.js +56 -0
- package/dist/repositories/bleMesh/getDeviceBLEMeshUpdateTasks.js.map +1 -0
- package/dist/repositories/bleMesh/getDeviceBLEMeshes.js +50 -0
- package/dist/repositories/bleMesh/getDeviceBLEMeshes.js.map +1 -0
- package/dist/repositories/bleMesh/index.js +269 -0
- package/dist/repositories/bleMesh/index.js.map +1 -0
- package/dist/repositories/bleMesh/removeBLEMesh.js +22 -0
- package/dist/repositories/bleMesh/removeBLEMesh.js.map +1 -0
- package/dist/repositories/bleMesh/removeBeaconBLEMeshes.js +21 -0
- package/dist/repositories/bleMesh/removeBeaconBLEMeshes.js.map +1 -0
- package/dist/repositories/bleMesh/removeBeaconsFromBLEMesh.js +28 -0
- package/dist/repositories/bleMesh/removeBeaconsFromBLEMesh.js.map +1 -0
- package/dist/repositories/bleMesh/removeDevicesFromBLEMesh.js +25 -0
- package/dist/repositories/bleMesh/removeDevicesFromBLEMesh.js.map +1 -0
- package/dist/repositories/bleMesh/updateBLEMesh.js +32 -0
- package/dist/repositories/bleMesh/updateBLEMesh.js.map +1 -0
- package/dist/repositories/bleMesh/updateBeaconBLEMesh.js +27 -0
- package/dist/repositories/bleMesh/updateBeaconBLEMesh.js.map +1 -0
- package/dist/repositories/bleMesh/updateDevicesBLEMesh.js +30 -0
- package/dist/repositories/bleMesh/updateDevicesBLEMesh.js.map +1 -0
- package/dist/repositories/bleMesh/updateDevicesBLEMeshUpdateTask.js +27 -0
- package/dist/repositories/bleMesh/updateDevicesBLEMeshUpdateTask.js.map +1 -0
- package/dist/repositories/bleMeshConfiguration/createBLEMeshConfigurationParams.js +1 -0
- package/dist/repositories/bleMeshConfiguration/createBLEMeshConfigurationParams.js.map +1 -0
- package/dist/repositories/bleMeshConfiguration/deleteBLEMeshConfiguration.js +1 -0
- package/dist/repositories/bleMeshConfiguration/deleteBLEMeshConfiguration.js.map +1 -0
- package/dist/repositories/bleMeshConfiguration/getBLEMeshConfiguration.js +8 -2
- package/dist/repositories/bleMeshConfiguration/getBLEMeshConfiguration.js.map +1 -0
- package/dist/repositories/bleMeshConfiguration/index.js +8 -4
- package/dist/repositories/bleMeshConfiguration/index.js.map +1 -0
- package/dist/repositories/bleMeshConfiguration/updateBLEMeshConfiguration.js +1 -0
- package/dist/repositories/bleMeshConfiguration/updateBLEMeshConfiguration.js.map +1 -0
- package/dist/repositories/boundaries/createBoundary.js +1 -0
- package/dist/repositories/boundaries/createBoundary.js.map +1 -0
- package/dist/repositories/boundaries/deleteBoundary.js +1 -0
- package/dist/repositories/boundaries/deleteBoundary.js.map +1 -0
- package/dist/repositories/boundaries/getBoundariesByClientId.js +45 -8
- package/dist/repositories/boundaries/getBoundariesByClientId.js.map +1 -0
- package/dist/repositories/boundaries/getBoundariesIdsByClientId.js +12 -7
- package/dist/repositories/boundaries/getBoundariesIdsByClientId.js.map +1 -0
- package/dist/repositories/boundaries/getBoundariesReport.js +8 -2
- package/dist/repositories/boundaries/getBoundariesReport.js.map +1 -0
- package/dist/repositories/boundaries/getBoundaryById.js +14 -5
- package/dist/repositories/boundaries/getBoundaryById.js.map +1 -0
- package/dist/repositories/boundaries/index.js +10 -9
- package/dist/repositories/boundaries/index.js.map +1 -0
- package/dist/repositories/boundaries/processBoundaryEvent.js +1 -0
- package/dist/repositories/boundaries/processBoundaryEvent.js.map +1 -0
- package/dist/repositories/boundaries/updateBoundary.js +1 -0
- package/dist/repositories/boundaries/updateBoundary.js.map +1 -0
- package/dist/repositories/boundaries/upsertBoundaryEvent.js +1 -0
- package/dist/repositories/boundaries/upsertBoundaryEvent.js.map +1 -0
- package/dist/repositories/clientAlertConfiguration/createClientAlertConfiguration.js +25 -0
- package/dist/repositories/clientAlertConfiguration/createClientAlertConfiguration.js.map +1 -0
- package/dist/repositories/clientAlertConfiguration/deleteClientAlertConfiguration.js +25 -0
- package/dist/repositories/clientAlertConfiguration/deleteClientAlertConfiguration.js.map +1 -0
- package/dist/repositories/clientAlertConfiguration/getClientAlertConfigurations.js +44 -0
- package/dist/repositories/clientAlertConfiguration/getClientAlertConfigurations.js.map +1 -0
- package/dist/repositories/clientAlertConfiguration/getClientAlertRecipients.js +40 -0
- package/dist/repositories/clientAlertConfiguration/getClientAlertRecipients.js.map +1 -0
- package/dist/repositories/clientAlertConfiguration/getUsersDataForClientAlertConfig.js +73 -0
- package/dist/repositories/clientAlertConfiguration/getUsersDataForClientAlertConfig.js.map +1 -0
- package/dist/repositories/clientAlertConfiguration/index.js +139 -0
- package/dist/repositories/clientAlertConfiguration/index.js.map +1 -0
- package/dist/repositories/clientAlertConfiguration/isUserAllowedForAlertConfig.js +51 -0
- package/dist/repositories/clientAlertConfiguration/isUserAllowedForAlertConfig.js.map +1 -0
- package/dist/repositories/clientAlertConfiguration/setClientAlertRecipients.js +175 -0
- package/dist/repositories/clientAlertConfiguration/setClientAlertRecipients.js.map +1 -0
- package/dist/repositories/clientAlertConfiguration/updateClientAlertConfiguration.js +43 -0
- package/dist/repositories/clientAlertConfiguration/updateClientAlertConfiguration.js.map +1 -0
- package/dist/repositories/clients/createClient.js +1 -0
- package/dist/repositories/clients/createClient.js.map +1 -0
- package/dist/repositories/clients/createClientConfiguration.js +3 -0
- package/dist/repositories/clients/createClientConfiguration.js.map +1 -0
- package/dist/repositories/clients/createClientIngestorConfiguration.js +21 -0
- package/dist/repositories/clients/createClientIngestorConfiguration.js.map +1 -0
- package/dist/repositories/clients/createCustomerAttribute.js +7 -1
- package/dist/repositories/clients/createCustomerAttribute.js.map +1 -0
- package/dist/repositories/clients/deleteClientAndConfiguration.js +1 -0
- package/dist/repositories/clients/deleteClientAndConfiguration.js.map +1 -0
- package/dist/repositories/clients/getClient.js +8 -2
- package/dist/repositories/clients/getClient.js.map +1 -0
- package/dist/repositories/clients/getClientConfiguration.js +23 -6
- package/dist/repositories/clients/getClientConfiguration.js.map +1 -0
- package/dist/repositories/clients/getClientIngestorConfigurations.js +25 -0
- package/dist/repositories/clients/getClientIngestorConfigurations.js.map +1 -0
- package/dist/repositories/clients/getClients.js +8 -2
- package/dist/repositories/clients/getClients.js.map +1 -0
- package/dist/repositories/clients/getCustomerAttribute.js +13 -4
- package/dist/repositories/clients/getCustomerAttribute.js.map +1 -0
- package/dist/repositories/clients/index.js +47 -11
- package/dist/repositories/clients/index.js.map +1 -0
- package/dist/repositories/clients/updateClient.js +1 -0
- package/dist/repositories/clients/updateClient.js.map +1 -0
- package/dist/repositories/clients/updateClientConfiguration.js +8 -10
- package/dist/repositories/clients/updateClientConfiguration.js.map +1 -0
- package/dist/repositories/clients/updateCustomerAttribute.js +7 -7
- package/dist/repositories/clients/updateCustomerAttribute.js.map +1 -0
- package/dist/repositories/countries/getCountries.js +8 -2
- package/dist/repositories/countries/getCountries.js.map +1 -0
- package/dist/repositories/countries/getCountry.js +10 -4
- package/dist/repositories/countries/getCountry.js.map +1 -0
- package/dist/repositories/countries/index.js +3 -2
- package/dist/repositories/countries/index.js.map +1 -0
- package/dist/repositories/dataExports/createDataExports.js +32 -0
- package/dist/repositories/dataExports/createDataExports.js.map +1 -0
- package/dist/repositories/dataExports/getDataExports.js +47 -0
- package/dist/repositories/dataExports/getDataExports.js.map +1 -0
- package/dist/repositories/dataExports/index.js +59 -0
- package/dist/repositories/dataExports/index.js.map +1 -0
- package/dist/repositories/dataExports/updateDataExports.js +26 -0
- package/dist/repositories/dataExports/updateDataExports.js.map +1 -0
- package/dist/repositories/deactivations/createDeactivation.js +1 -0
- package/dist/repositories/deactivations/createDeactivation.js.map +1 -0
- package/dist/repositories/deactivations/getDeactivationReasons.js +8 -2
- package/dist/repositories/deactivations/getDeactivationReasons.js.map +1 -0
- package/dist/repositories/deactivations/getLatestDeactivationByImei.js +8 -2
- package/dist/repositories/deactivations/getLatestDeactivationByImei.js.map +1 -0
- package/dist/repositories/deactivations/index.js +4 -3
- package/dist/repositories/deactivations/index.js.map +1 -0
- package/dist/repositories/deviceBehaviors/createDeviceBehaviorTask.js +1 -0
- package/dist/repositories/deviceBehaviors/createDeviceBehaviorTask.js.map +1 -0
- package/dist/repositories/deviceBehaviors/getDeviceBehaviorTasks.js +8 -2
- package/dist/repositories/deviceBehaviors/getDeviceBehaviorTasks.js.map +1 -0
- package/dist/repositories/deviceBehaviors/getDeviceBehaviors.js +9 -3
- package/dist/repositories/deviceBehaviors/getDeviceBehaviors.js.map +1 -0
- package/dist/repositories/deviceBehaviors/getDeviceBehaviorsByIds.js +8 -2
- package/dist/repositories/deviceBehaviors/getDeviceBehaviorsByIds.js.map +1 -0
- package/dist/repositories/deviceBehaviors/index.js +7 -42
- package/dist/repositories/deviceBehaviors/index.js.map +1 -0
- package/dist/repositories/deviceBehaviors/updateDeviceBehaviorTask.js +1 -0
- package/dist/repositories/deviceBehaviors/updateDeviceBehaviorTask.js.map +1 -0
- package/dist/repositories/deviceBehaviors/upsertDeviceBehavior.js +1 -0
- package/dist/repositories/deviceBehaviors/upsertDeviceBehavior.js.map +1 -0
- package/dist/repositories/devicePairings/createDevicePairing.js +1 -0
- package/dist/repositories/devicePairings/createDevicePairing.js.map +1 -0
- package/dist/repositories/devicePairings/deleteDevicePairing.js +1 -0
- package/dist/repositories/devicePairings/deleteDevicePairing.js.map +1 -0
- package/dist/repositories/devicePairings/getDevicePairings.js +8 -2
- package/dist/repositories/devicePairings/getDevicePairings.js.map +1 -0
- package/dist/repositories/devicePairings/getDevicePairingsByClientId.js +28 -0
- package/dist/repositories/devicePairings/getDevicePairingsByClientId.js.map +1 -0
- package/dist/repositories/devicePairings/getDevicePairingsByImei.js +8 -2
- package/dist/repositories/devicePairings/getDevicePairingsByImei.js.map +1 -0
- package/dist/repositories/devicePairings/index.js +22 -5
- package/dist/repositories/devicePairings/index.js.map +1 -0
- package/dist/repositories/devicePairings/updateDevicePairing.js +5 -1
- package/dist/repositories/devicePairings/updateDevicePairing.js.map +1 -0
- package/dist/repositories/deviceStatus/extendedDeviceStatus.js +207 -0
- package/dist/repositories/deviceStatus/extendedDeviceStatus.js.map +1 -0
- package/dist/repositories/deviceStatus/getDeviceStatuses.js +88 -0
- package/dist/repositories/deviceStatus/getDeviceStatuses.js.map +1 -0
- package/dist/repositories/deviceStatus/getDeviceStatusesCount.js +42 -0
- package/dist/repositories/deviceStatus/getDeviceStatusesCount.js.map +1 -0
- package/dist/repositories/deviceStatus/index.js +63 -0
- package/dist/repositories/deviceStatus/index.js.map +1 -0
- package/dist/repositories/deviceStatus/upsertDeviceStatuses.js +47 -0
- package/dist/repositories/deviceStatus/upsertDeviceStatuses.js.map +1 -0
- package/dist/repositories/deviceTypeFeature/bulkCreateDeviceTypeFeature.js +20 -0
- package/dist/repositories/deviceTypeFeature/bulkCreateDeviceTypeFeature.js.map +1 -0
- package/dist/repositories/deviceTypeFeature/deleteDeviceTypeFeature.js +22 -0
- package/dist/repositories/deviceTypeFeature/deleteDeviceTypeFeature.js.map +1 -0
- package/dist/repositories/deviceTypeFeature/getDeviceTypeFeatures.js +25 -0
- package/dist/repositories/deviceTypeFeature/getDeviceTypeFeatures.js.map +1 -0
- package/dist/repositories/deviceTypeFeature/index.js +48 -0
- package/dist/repositories/deviceTypeFeature/index.js.map +1 -0
- package/dist/repositories/devices/addDeviceChangesHistory.js +35 -0
- package/dist/repositories/devices/addDeviceChangesHistory.js.map +1 -0
- package/dist/repositories/devices/allImeisAreActiveForClient.js +8 -2
- package/dist/repositories/devices/allImeisAreActiveForClient.js.map +1 -0
- package/dist/repositories/devices/createClientDeviceSetting.js +3 -1
- package/dist/repositories/devices/createClientDeviceSetting.js.map +1 -0
- package/dist/repositories/devices/createDevice.js +2 -1
- package/dist/repositories/devices/createDevice.js.map +1 -0
- package/dist/repositories/devices/createDeviceReplacement.js +2 -1
- package/dist/repositories/devices/createDeviceReplacement.js.map +1 -0
- package/dist/repositories/devices/createDeviceType.js +2 -1
- package/dist/repositories/devices/createDeviceType.js.map +1 -0
- package/dist/repositories/devices/createImeiIccidCarrier.js +19 -0
- package/dist/repositories/devices/createImeiIccidCarrier.js.map +1 -0
- package/dist/repositories/devices/deleteDevice.js +2 -1
- package/dist/repositories/devices/deleteDevice.js.map +1 -0
- package/dist/repositories/devices/generateDeviceIdentifierKey.js +2 -1
- package/dist/repositories/devices/generateDeviceIdentifierKey.js.map +1 -0
- package/dist/repositories/devices/getCanceledDevicesWithActiveSimCards.js +13 -3
- package/dist/repositories/devices/getCanceledDevicesWithActiveSimCards.js.map +1 -0
- package/dist/repositories/devices/getCarrierStatusUpdatedBefore.js +8 -2
- package/dist/repositories/devices/getCarrierStatusUpdatedBefore.js.map +1 -0
- package/dist/repositories/devices/getClientDeviceSetting.js +8 -2
- package/dist/repositories/devices/getClientDeviceSetting.js.map +1 -0
- package/dist/repositories/devices/getClientDeviceSettings.js +8 -2
- package/dist/repositories/devices/getClientDeviceSettings.js.map +1 -0
- package/dist/repositories/devices/getDevice.js +8 -2
- package/dist/repositories/devices/getDevice.js.map +1 -0
- package/dist/repositories/devices/getDeviceChangesHistory.js +28 -0
- package/dist/repositories/devices/getDeviceChangesHistory.js.map +1 -0
- package/dist/repositories/devices/getDeviceChangesHistoryAssignedToValuesByClient.js +24 -0
- package/dist/repositories/devices/getDeviceChangesHistoryAssignedToValuesByClient.js.map +1 -0
- package/dist/repositories/devices/getDeviceCustomConfig.js +8 -2
- package/dist/repositories/devices/getDeviceCustomConfig.js.map +1 -0
- package/dist/repositories/devices/getDeviceTypeByImei.js +8 -2
- package/dist/repositories/devices/getDeviceTypeByImei.js.map +1 -0
- package/dist/repositories/devices/getDeviceTypes.js +41 -18
- package/dist/repositories/devices/getDeviceTypes.js.map +1 -0
- package/dist/repositories/devices/getDeviceTypesModelsOrderedByDeviceCount.js +8 -2
- package/dist/repositories/devices/getDeviceTypesModelsOrderedByDeviceCount.js.map +1 -0
- package/dist/repositories/devices/getDeviceWithUsersInfo.js +8 -2
- package/dist/repositories/devices/getDeviceWithUsersInfo.js.map +1 -0
- package/dist/repositories/devices/getDevices.js +56 -7
- package/dist/repositories/devices/getDevices.js.map +1 -0
- package/dist/repositories/devices/getDevicesCountByStatus.js +34 -0
- package/dist/repositories/devices/getDevicesCountByStatus.js.map +1 -0
- package/dist/repositories/devices/getFilteredImeisWithStatus.js +8 -2
- package/dist/repositories/devices/getFilteredImeisWithStatus.js.map +1 -0
- package/dist/repositories/devices/getIccidStatus.js +8 -2
- package/dist/repositories/devices/getIccidStatus.js.map +1 -0
- package/dist/repositories/devices/getImeiIccidCarrier.js +8 -2
- package/dist/repositories/devices/getImeiIccidCarrier.js.map +1 -0
- package/dist/repositories/devices/getImeiIccidCarriers.js +8 -2
- package/dist/repositories/devices/getImeiIccidCarriers.js.map +1 -0
- package/dist/repositories/devices/getServiceProviderProduct.js +23 -0
- package/dist/repositories/devices/getServiceProviderProduct.js.map +1 -0
- package/dist/repositories/devices/index.js +143 -59
- package/dist/repositories/devices/index.js.map +1 -0
- package/dist/repositories/devices/updateClientDeviceSetting.js +5 -2
- package/dist/repositories/devices/updateClientDeviceSetting.js.map +1 -0
- package/dist/repositories/devices/updateDevice.js +5 -14
- package/dist/repositories/devices/updateDevice.js.map +1 -0
- package/dist/repositories/devices/updateDeviceType.js +2 -1
- package/dist/repositories/devices/updateDeviceType.js.map +1 -0
- package/dist/repositories/devices/updateIccidStatus.js +2 -1
- package/dist/repositories/devices/updateIccidStatus.js.map +1 -0
- package/dist/repositories/devices/updateImeiIccidCarrier.js +2 -1
- package/dist/repositories/devices/updateImeiIccidCarrier.js.map +1 -0
- package/dist/repositories/devices/upsertDeviceCustomConfig.js +15 -0
- package/dist/repositories/devices/upsertDeviceCustomConfig.js.map +1 -0
- package/dist/repositories/devices/upsertIccidStatus.js +2 -1
- package/dist/repositories/devices/upsertIccidStatus.js.map +1 -0
- package/dist/repositories/entityTags/bulkCreateEntityTag.js +21 -0
- package/dist/repositories/entityTags/bulkCreateEntityTag.js.map +1 -0
- package/dist/repositories/entityTags/bulkDeleteEntityTag.js +28 -0
- package/dist/repositories/entityTags/bulkDeleteEntityTag.js.map +1 -0
- package/dist/repositories/entityTags/createEntityTag.js +20 -0
- package/dist/repositories/entityTags/createEntityTag.js.map +1 -0
- package/dist/repositories/entityTags/deleteEntityTag.js +22 -0
- package/dist/repositories/entityTags/deleteEntityTag.js.map +1 -0
- package/dist/repositories/entityTags/deleteEntityTagById.js +13 -0
- package/dist/repositories/entityTags/deleteEntityTagById.js.map +1 -0
- package/dist/repositories/entityTags/enforceEntityTagsByEntity.js +38 -0
- package/dist/repositories/entityTags/enforceEntityTagsByEntity.js.map +1 -0
- package/dist/repositories/entityTags/getEntityTagById.js +23 -0
- package/dist/repositories/entityTags/getEntityTagById.js.map +1 -0
- package/dist/repositories/entityTags/index.js +104 -0
- package/dist/repositories/entityTags/index.js.map +1 -0
- package/dist/repositories/entityTags/searchEntityTags.js +46 -0
- package/dist/repositories/entityTags/searchEntityTags.js.map +1 -0
- package/dist/repositories/features/createFeature.js +21 -0
- package/dist/repositories/features/createFeature.js.map +1 -0
- package/dist/repositories/features/deleteFeature.js +17 -0
- package/dist/repositories/features/deleteFeature.js.map +1 -0
- package/dist/repositories/features/getFeatures.js +25 -0
- package/dist/repositories/features/getFeatures.js.map +1 -0
- package/dist/repositories/features/index.js +61 -0
- package/dist/repositories/features/index.js.map +1 -0
- package/dist/repositories/features/upsertFeature.js +23 -0
- package/dist/repositories/features/upsertFeature.js.map +1 -0
- package/dist/repositories/firmwares/createDeviceFirmware.js +1 -0
- package/dist/repositories/firmwares/createDeviceFirmware.js.map +1 -0
- package/dist/repositories/firmwares/createFirmwareAutoUpgradeBlacklist.js +1 -0
- package/dist/repositories/firmwares/createFirmwareAutoUpgradeBlacklist.js.map +1 -0
- package/dist/repositories/firmwares/createFirmwareUpgradeTask.js +1 -0
- package/dist/repositories/firmwares/createFirmwareUpgradeTask.js.map +1 -0
- package/dist/repositories/firmwares/getDeviceFirmwares.js +28 -20
- package/dist/repositories/firmwares/getDeviceFirmwares.js.map +1 -0
- package/dist/repositories/firmwares/getFirmwareAutoUpgradeBlacklist.js +8 -2
- package/dist/repositories/firmwares/getFirmwareAutoUpgradeBlacklist.js.map +1 -0
- package/dist/repositories/firmwares/getFirmwareUpgradeTasks.js +8 -2
- package/dist/repositories/firmwares/getFirmwareUpgradeTasks.js.map +1 -0
- package/dist/repositories/firmwares/getFirmwareUpgradeTasksCount.js +8 -2
- package/dist/repositories/firmwares/getFirmwareUpgradeTasksCount.js.map +1 -0
- package/dist/repositories/firmwares/index.js +10 -9
- package/dist/repositories/firmwares/index.js.map +1 -0
- package/dist/repositories/firmwares/updateDeviceFirmware.js +1 -0
- package/dist/repositories/firmwares/updateDeviceFirmware.js.map +1 -0
- package/dist/repositories/firmwares/updateFirmwareUpgradeTasks.js +1 -0
- package/dist/repositories/firmwares/updateFirmwareUpgradeTasks.js.map +1 -0
- package/dist/repositories/index.js +13 -1
- package/dist/repositories/index.js.map +1 -0
- package/dist/repositories/latestUserAppInfo/getLatestUserAppInfo.js +27 -0
- package/dist/repositories/latestUserAppInfo/getLatestUserAppInfo.js.map +1 -0
- package/dist/repositories/latestUserAppInfo/index.js +37 -0
- package/dist/repositories/latestUserAppInfo/index.js.map +1 -0
- package/dist/repositories/latestUserAppInfo/upsertLatestUserAppInfo.js +29 -0
- package/dist/repositories/latestUserAppInfo/upsertLatestUserAppInfo.js.map +1 -0
- package/dist/repositories/notificationRecipients/createNotificationRecipient.js +2 -0
- package/dist/repositories/notificationRecipients/createNotificationRecipient.js.map +1 -0
- package/dist/repositories/notificationRecipients/deleteNotificationRecipients.js +9 -3
- package/dist/repositories/notificationRecipients/deleteNotificationRecipients.js.map +1 -0
- package/dist/repositories/notificationRecipients/deleteNotificationRecipientsByEmailOrPhone.js +1 -0
- package/dist/repositories/notificationRecipients/deleteNotificationRecipientsByEmailOrPhone.js.map +1 -0
- package/dist/repositories/notificationRecipients/getNotificationRecipients.js +22 -2
- package/dist/repositories/notificationRecipients/getNotificationRecipients.js.map +1 -0
- package/dist/repositories/notificationRecipients/index.js +8 -7
- package/dist/repositories/notificationRecipients/index.js.map +1 -0
- package/dist/repositories/notificationRecipients/updateNotificationRecipient.js +1 -0
- package/dist/repositories/notificationRecipients/updateNotificationRecipient.js.map +1 -0
- package/dist/repositories/notificationRecipients/updateUsersNotificationsUnsubscribedInfoStatus.js +1 -0
- package/dist/repositories/notificationRecipients/updateUsersNotificationsUnsubscribedInfoStatus.js.map +1 -0
- package/dist/repositories/notificationRecipients/updateUsersNotificationsUnsuscribedStatus.js +1 -0
- package/dist/repositories/notificationRecipients/updateUsersNotificationsUnsuscribedStatus.js.map +1 -0
- package/dist/repositories/positions/createPosition.js +3 -0
- package/dist/repositories/positions/createPosition.js.map +1 -0
- package/dist/repositories/positions/getBatteryReportForDevice.js +47 -0
- package/dist/repositories/positions/getBatteryReportForDevice.js.map +1 -0
- package/dist/repositories/positions/getLatestPositionByImei.js +9 -2
- package/dist/repositories/positions/getLatestPositionByImei.js.map +1 -0
- package/dist/repositories/positions/getPositionsByImei.js +9 -2
- package/dist/repositories/positions/getPositionsByImei.js.map +1 -0
- package/dist/repositories/positions/getPositionsReportByClient.js +10 -1
- package/dist/repositories/positions/getPositionsReportByClient.js.map +1 -0
- package/dist/repositories/positions/index.js +17 -8
- package/dist/repositories/positions/index.js.map +1 -0
- package/dist/repositories/positions/mapping/mapToPositionReport.js +21 -0
- package/dist/repositories/positions/mapping/mapToPositionReport.js.map +1 -0
- package/dist/repositories/positions/upsertLatestPosition.js +1 -0
- package/dist/repositories/positions/upsertLatestPosition.js.map +1 -0
- package/dist/repositories/promotions/bulkInsertDeviceTypePromotion.js +15 -0
- package/dist/repositories/promotions/bulkInsertDeviceTypePromotion.js.map +1 -0
- package/dist/repositories/promotions/bulkInsertMarketplacePromotion.js +15 -0
- package/dist/repositories/promotions/bulkInsertMarketplacePromotion.js.map +1 -0
- package/dist/repositories/promotions/createPromotion.js +30 -0
- package/dist/repositories/promotions/createPromotion.js.map +1 -0
- package/dist/repositories/promotions/createPromotionHistory.js +18 -0
- package/dist/repositories/promotions/createPromotionHistory.js.map +1 -0
- package/dist/repositories/promotions/deleteDeviceTypePromotion.js +22 -0
- package/dist/repositories/promotions/deleteDeviceTypePromotion.js.map +1 -0
- package/dist/repositories/promotions/deleteMarketplacePromotion.js +24 -0
- package/dist/repositories/promotions/deleteMarketplacePromotion.js.map +1 -0
- package/dist/repositories/promotions/getDeviceTypePromotion.js +28 -0
- package/dist/repositories/promotions/getDeviceTypePromotion.js.map +1 -0
- package/dist/repositories/promotions/getMarketplacePromotion.js +28 -0
- package/dist/repositories/promotions/getMarketplacePromotion.js.map +1 -0
- package/dist/repositories/promotions/getPromotions.js +64 -0
- package/dist/repositories/promotions/getPromotions.js.map +1 -0
- package/dist/repositories/promotions/index.js +140 -0
- package/dist/repositories/promotions/index.js.map +1 -0
- package/dist/repositories/promotions/promotionValidator.js +17 -0
- package/dist/repositories/promotions/promotionValidator.js.map +1 -0
- package/dist/repositories/promotions/updatePromotion.js +36 -0
- package/dist/repositories/promotions/updatePromotion.js.map +1 -0
- package/dist/repositories/security/createUserRole.js +1 -0
- package/dist/repositories/security/createUserRole.js.map +1 -0
- package/dist/repositories/security/getAllRoles.js +15 -4
- package/dist/repositories/security/getAllRoles.js.map +1 -0
- package/dist/repositories/security/getUserRoles.js +14 -5
- package/dist/repositories/security/getUserRoles.js.map +1 -0
- package/dist/repositories/security/getUserRolesByClientId.js +17 -8
- package/dist/repositories/security/getUserRolesByClientId.js.map +1 -0
- package/dist/repositories/security/index.js +11 -10
- package/dist/repositories/security/index.js.map +1 -0
- package/dist/repositories/security/removeUserRoles.js +1 -0
- package/dist/repositories/security/removeUserRoles.js.map +1 -0
- package/dist/repositories/security/updateUserRole.js +1 -0
- package/dist/repositories/security/updateUserRole.js.map +1 -0
- package/dist/repositories/security/userIsAdminOrOwner.js +15 -9
- package/dist/repositories/security/userIsAdminOrOwner.js.map +1 -0
- package/dist/repositories/security/userIsInRole.js +13 -8
- package/dist/repositories/security/userIsInRole.js.map +1 -0
- package/dist/repositories/tags/bulkCreateTags.js +25 -0
- package/dist/repositories/tags/bulkCreateTags.js.map +1 -0
- package/dist/repositories/tags/createTag.js +21 -0
- package/dist/repositories/tags/createTag.js.map +1 -0
- package/dist/repositories/tags/deleteTag.js +20 -0
- package/dist/repositories/tags/deleteTag.js.map +1 -0
- package/dist/repositories/tags/index.js +83 -0
- package/dist/repositories/tags/index.js.map +1 -0
- package/dist/repositories/tags/searchTags.js +44 -0
- package/dist/repositories/tags/searchTags.js.map +1 -0
- package/dist/repositories/tags/searchTagsByUser.js +46 -0
- package/dist/repositories/tags/searchTagsByUser.js.map +1 -0
- package/dist/repositories/tags/updateTag.js +32 -0
- package/dist/repositories/tags/updateTag.js.map +1 -0
- package/dist/repositories/tasks/addTaskScheduleDevices.js +1 -0
- package/dist/repositories/tasks/addTaskScheduleDevices.js.map +1 -0
- package/dist/repositories/tasks/completeTask.js +12 -2
- package/dist/repositories/tasks/completeTask.js.map +1 -0
- package/dist/repositories/tasks/createTask.js +1 -0
- package/dist/repositories/tasks/createTask.js.map +1 -0
- package/dist/repositories/tasks/createTaskSchedule.js +1 -0
- package/dist/repositories/tasks/createTaskSchedule.js.map +1 -0
- package/dist/repositories/tasks/deleteTask.js +1 -0
- package/dist/repositories/tasks/deleteTask.js.map +1 -0
- package/dist/repositories/tasks/deleteTaskSchedule.js +1 -0
- package/dist/repositories/tasks/deleteTaskSchedule.js.map +1 -0
- package/dist/repositories/tasks/deleteTaskScheduleDevices.js +1 -0
- package/dist/repositories/tasks/deleteTaskScheduleDevices.js.map +1 -0
- package/dist/repositories/tasks/getDeviceTasks.js +8 -2
- package/dist/repositories/tasks/getDeviceTasks.js.map +1 -0
- package/dist/repositories/tasks/getTaskSchedule.js +22 -10
- package/dist/repositories/tasks/getTaskSchedule.js.map +1 -0
- package/dist/repositories/tasks/getTaskSchedules.js +35 -8
- package/dist/repositories/tasks/getTaskSchedules.js.map +1 -0
- package/dist/repositories/tasks/getTaskSchedulesCount.js +26 -7
- package/dist/repositories/tasks/getTaskSchedulesCount.js.map +1 -0
- package/dist/repositories/tasks/getTasks.js +70 -5
- package/dist/repositories/tasks/getTasks.js.map +1 -0
- package/dist/repositories/tasks/getTasksCount.js +18 -2
- package/dist/repositories/tasks/getTasksCount.js.map +1 -0
- package/dist/repositories/tasks/index.js +20 -17
- package/dist/repositories/tasks/index.js.map +1 -0
- package/dist/repositories/tasks/setTaskAsPastDue.js +1 -0
- package/dist/repositories/tasks/setTaskAsPastDue.js.map +1 -0
- package/dist/repositories/tasks/setTaskScheduleDevices.js +1 -0
- package/dist/repositories/tasks/setTaskScheduleDevices.js.map +1 -0
- package/dist/repositories/tasks/updateTask.js +1 -0
- package/dist/repositories/tasks/updateTask.js.map +1 -0
- package/dist/repositories/tasks/updateTaskSchedule.js +1 -0
- package/dist/repositories/tasks/updateTaskSchedule.js.map +1 -0
- package/dist/repositories/trips/createTrip.js +2 -1
- package/dist/repositories/trips/createTrip.js.map +1 -0
- package/dist/repositories/trips/getDeviceTripConfiguration.js +52 -0
- package/dist/repositories/trips/getDeviceTripConfiguration.js.map +1 -0
- package/dist/repositories/trips/getTripById.js +13 -6
- package/dist/repositories/trips/getTripById.js.map +1 -0
- package/dist/repositories/trips/getTrips.js +74 -14
- package/dist/repositories/trips/getTrips.js.map +1 -0
- package/dist/repositories/trips/index.js +19 -10
- package/dist/repositories/trips/index.js.map +1 -0
- package/dist/repositories/trips/updateTripEndValues.js +2 -1
- package/dist/repositories/trips/updateTripEndValues.js.map +1 -0
- package/dist/repositories/trips/upsertTrip.js +2 -1
- package/dist/repositories/trips/upsertTrip.js.map +1 -0
- package/dist/repositories/userActivations/createUserActivation.js +1 -0
- package/dist/repositories/userActivations/createUserActivation.js.map +1 -0
- package/dist/repositories/userActivations/createUserActivationDevice.js +1 -0
- package/dist/repositories/userActivations/createUserActivationDevice.js.map +1 -0
- package/dist/repositories/userActivations/createUserActivationEvent.js +1 -0
- package/dist/repositories/userActivations/createUserActivationEvent.js.map +1 -0
- package/dist/repositories/userActivations/createUserActivationMetric.js +1 -0
- package/dist/repositories/userActivations/createUserActivationMetric.js.map +1 -0
- package/dist/repositories/userActivations/deleteUserActivation.js +1 -0
- package/dist/repositories/userActivations/deleteUserActivation.js.map +1 -0
- package/dist/repositories/userActivations/getLastActivationDevice.js +8 -2
- package/dist/repositories/userActivations/getLastActivationDevice.js.map +1 -0
- package/dist/repositories/userActivations/getUserActivationById.js +22 -0
- package/dist/repositories/userActivations/getUserActivationById.js.map +1 -0
- package/dist/repositories/userActivations/getUserActivationDevices.js +8 -2
- package/dist/repositories/userActivations/getUserActivationDevices.js.map +1 -0
- package/dist/repositories/userActivations/getUserActivationDevicesByClientId.js +8 -3
- package/dist/repositories/userActivations/getUserActivationDevicesByClientId.js.map +1 -0
- package/dist/repositories/userActivations/getUserActivationMetrics.js +8 -2
- package/dist/repositories/userActivations/getUserActivationMetrics.js.map +1 -0
- package/dist/repositories/userActivations/getUserActivations.js +8 -2
- package/dist/repositories/userActivations/getUserActivations.js.map +1 -0
- package/dist/repositories/userActivations/index.js +21 -12
- package/dist/repositories/userActivations/index.js.map +1 -0
- package/dist/repositories/userActivations/updateUserActivationDevice.js +1 -0
- package/dist/repositories/userActivations/updateUserActivationDevice.js.map +1 -0
- package/dist/repositories/userActivations/updateUserActivationMetrics.js +1 -0
- package/dist/repositories/userActivations/updateUserActivationMetrics.js.map +1 -0
- package/dist/repositories/userAppFeedback/createUserAppFeedback.js +1 -0
- package/dist/repositories/userAppFeedback/createUserAppFeedback.js.map +1 -0
- package/dist/repositories/userAppFeedback/index.js +2 -1
- package/dist/repositories/userAppFeedback/index.js.map +1 -0
- package/dist/repositories/userAppIncidents/getUserAppIncidents.js +8 -2
- package/dist/repositories/userAppIncidents/getUserAppIncidents.js.map +1 -0
- package/dist/repositories/userAppIncidents/index.js +3 -2
- package/dist/repositories/userAppIncidents/index.js.map +1 -0
- package/dist/repositories/userAppIncidents/upsertUserAppIncident.js +1 -0
- package/dist/repositories/userAppIncidents/upsertUserAppIncident.js.map +1 -0
- package/dist/repositories/userConfigurations/bulkCreateUserAlertConfigurations.js +11 -11
- package/dist/repositories/userConfigurations/bulkCreateUserAlertConfigurations.js.map +1 -0
- package/dist/repositories/userConfigurations/createUserAlertConfiguration.js +34 -0
- package/dist/repositories/userConfigurations/createUserAlertConfiguration.js.map +1 -0
- package/dist/repositories/userConfigurations/createUserConfiguration.js +1 -0
- package/dist/repositories/userConfigurations/createUserConfiguration.js.map +1 -0
- package/dist/repositories/userConfigurations/deleteUserAlertConfigurations.js +11 -5
- package/dist/repositories/userConfigurations/deleteUserAlertConfigurations.js.map +1 -0
- package/dist/repositories/userConfigurations/deleteUserAlertNotificationsConfig.js +30 -0
- package/dist/repositories/userConfigurations/deleteUserAlertNotificationsConfig.js.map +1 -0
- package/dist/repositories/userConfigurations/deleteUserConfiguration.js +1 -0
- package/dist/repositories/userConfigurations/deleteUserConfiguration.js.map +1 -0
- package/dist/repositories/userConfigurations/getUserAlertConfigurations.js +11 -2
- package/dist/repositories/userConfigurations/getUserAlertConfigurations.js.map +1 -0
- package/dist/repositories/userConfigurations/getUserAlertNotificationsConfig.js +149 -0
- package/dist/repositories/userConfigurations/getUserAlertNotificationsConfig.js.map +1 -0
- package/dist/repositories/userConfigurations/getUserConfigurations.js +8 -2
- package/dist/repositories/userConfigurations/getUserConfigurations.js.map +1 -0
- package/dist/repositories/userConfigurations/index.js +99 -136
- package/dist/repositories/userConfigurations/index.js.map +1 -0
- package/dist/repositories/userConfigurations/updateUserAlertConfigurations.js +1 -0
- package/dist/repositories/userConfigurations/updateUserAlertConfigurations.js.map +1 -0
- package/dist/repositories/userConfigurations/updateUserAlertConfigurationsByIds.js +53 -0
- package/dist/repositories/userConfigurations/updateUserAlertConfigurationsByIds.js.map +1 -0
- package/dist/repositories/userConfigurations/updateUserConfiguration.js +1 -0
- package/dist/repositories/userConfigurations/updateUserConfiguration.js.map +1 -0
- package/dist/repositories/userConfigurations/upsertUserAlertNotificationsConfig.js +30 -0
- package/dist/repositories/userConfigurations/upsertUserAlertNotificationsConfig.js.map +1 -0
- package/dist/repositories/userDataDeletionRequests/createUserDataDeletionRequest.js +1 -0
- package/dist/repositories/userDataDeletionRequests/createUserDataDeletionRequest.js.map +1 -0
- package/dist/repositories/userDataDeletionRequests/getUserDataDeletionRequest.js +10 -4
- package/dist/repositories/userDataDeletionRequests/getUserDataDeletionRequest.js.map +1 -0
- package/dist/repositories/userDataDeletionRequests/index.js +5 -4
- package/dist/repositories/userDataDeletionRequests/index.js.map +1 -0
- package/dist/repositories/userDataDeletionRequests/removeUserDataDeletionRequest.js +1 -0
- package/dist/repositories/userDataDeletionRequests/removeUserDataDeletionRequest.js.map +1 -0
- package/dist/repositories/userDataDeletionRequests/updateUserDataDeletionRequest.js +1 -0
- package/dist/repositories/userDataDeletionRequests/updateUserDataDeletionRequest.js.map +1 -0
- package/dist/repositories/userInvitations/createUserInvitation.js +2 -0
- package/dist/repositories/userInvitations/createUserInvitation.js.map +1 -0
- package/dist/repositories/userInvitations/getUserInvitationById.js +8 -2
- package/dist/repositories/userInvitations/getUserInvitationById.js.map +1 -0
- package/dist/repositories/userInvitations/getUserInvitations.js +29 -4
- package/dist/repositories/userInvitations/getUserInvitations.js.map +1 -0
- package/dist/repositories/userInvitations/index.js +5 -4
- package/dist/repositories/userInvitations/index.js.map +1 -0
- package/dist/repositories/userInvitations/updateUserInvitation.js +4 -1
- package/dist/repositories/userInvitations/updateUserInvitation.js.map +1 -0
- package/dist/repositories/userRatingRequests/createUserRatingRequest.js +1 -0
- package/dist/repositories/userRatingRequests/createUserRatingRequest.js.map +1 -0
- package/dist/repositories/userRatingRequests/getUserRatingRequests.js +8 -2
- package/dist/repositories/userRatingRequests/getUserRatingRequests.js.map +1 -0
- package/dist/repositories/userRatingRequests/index.js +3 -2
- package/dist/repositories/userRatingRequests/index.js.map +1 -0
- package/dist/repositories/userRegistrationAttempts/createUserRegistrationAttempt.js +1 -0
- package/dist/repositories/userRegistrationAttempts/createUserRegistrationAttempt.js.map +1 -0
- package/dist/repositories/userRegistrationAttempts/getUserRegistrationAttempts.js +10 -4
- package/dist/repositories/userRegistrationAttempts/getUserRegistrationAttempts.js.map +1 -0
- package/dist/repositories/userRegistrationAttempts/index.js +4 -3
- package/dist/repositories/userRegistrationAttempts/index.js.map +1 -0
- package/dist/repositories/userRegistrationAttempts/updateUserRegistrationAttempt.js +1 -0
- package/dist/repositories/userRegistrationAttempts/updateUserRegistrationAttempt.js.map +1 -0
- package/dist/repositories/users/createUser.js +1 -0
- package/dist/repositories/users/createUser.js.map +1 -0
- package/dist/repositories/users/deleteAccount.js +1 -0
- package/dist/repositories/users/deleteAccount.js.map +1 -0
- package/dist/repositories/users/deleteUser.js +1 -0
- package/dist/repositories/users/deleteUser.js.map +1 -0
- package/dist/repositories/users/getUserById.js +26 -11
- package/dist/repositories/users/getUserById.js.map +1 -0
- package/dist/repositories/users/getUserClientRelatedEntitiesCount.js +64 -0
- package/dist/repositories/users/getUserClientRelatedEntitiesCount.js.map +1 -0
- package/dist/repositories/users/getUserData.js +12 -8
- package/dist/repositories/users/getUserData.js.map +1 -0
- package/dist/repositories/users/getUserInfoWithAmazonDevicesInfo.js +88 -0
- package/dist/repositories/users/getUserInfoWithAmazonDevicesInfo.js.map +1 -0
- package/dist/repositories/users/getUsers.js +59 -6
- package/dist/repositories/users/getUsers.js.map +1 -0
- package/dist/repositories/users/getUsersConfigurationByImei.js +15 -13
- package/dist/repositories/users/getUsersConfigurationByImei.js.map +1 -0
- package/dist/repositories/users/getUsersIdByPhoneAndCountryCode.js +8 -2
- package/dist/repositories/users/getUsersIdByPhoneAndCountryCode.js.map +1 -0
- package/dist/repositories/users/getUsersInfoWithActivationInfo.js +101 -0
- package/dist/repositories/users/getUsersInfoWithActivationInfo.js.map +1 -0
- package/dist/repositories/users/getUsersInfoWithDevicesInfo.js +59 -0
- package/dist/repositories/users/getUsersInfoWithDevicesInfo.js.map +1 -0
- package/dist/repositories/users/getUsersWithRoles.js +11 -3
- package/dist/repositories/users/getUsersWithRoles.js.map +1 -0
- package/dist/repositories/users/index.js +68 -11
- package/dist/repositories/users/index.js.map +1 -0
- package/dist/repositories/users/updateUser.js +1 -0
- package/dist/repositories/users/updateUser.js.map +1 -0
- package/dist/subscribers/allEntitiesSubscriber.js +1 -0
- package/dist/subscribers/allEntitiesSubscriber.js.map +1 -0
- package/dist/subscribers/index.js +1 -0
- package/dist/subscribers/index.js.map +1 -0
- package/dist/types/acumatica.js +1 -0
- package/dist/types/acumatica.js.map +1 -0
- package/dist/types/aempToken.js +1 -0
- package/dist/types/aempToken.js.map +1 -0
- package/dist/types/alert.d.ts +1 -0
- package/dist/types/alert.js +1 -0
- package/dist/types/alert.js.map +1 -0
- package/dist/types/alertTypes.js +1 -0
- package/dist/types/alertTypes.js.map +1 -0
- package/dist/types/appFeatures.js +1 -0
- package/dist/types/appFeatures.js.map +1 -0
- package/dist/types/billing.js +1 -0
- package/dist/types/billing.js.map +1 -0
- package/dist/types/blacklist.js +1 -0
- package/dist/types/blacklist.js.map +1 -0
- package/dist/types/bleMesh.js +2 -0
- package/dist/types/bleMesh.js.map +1 -0
- package/dist/types/bleMeshConfiguration.js +1 -0
- package/dist/types/bleMeshConfiguration.js.map +1 -0
- package/dist/types/boundaries.js +1 -0
- package/dist/types/boundaries.js.map +1 -0
- package/dist/types/clientAlertConfiguration.js +2 -0
- package/dist/types/clientAlertConfiguration.js.map +1 -0
- package/dist/types/clients.js +35 -1
- package/dist/types/clients.js.map +1 -0
- package/dist/types/common.js +1 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/countries.js +1 -0
- package/dist/types/countries.js.map +1 -0
- package/dist/types/dataExports.js +2 -0
- package/dist/types/dataExports.js.map +1 -0
- package/dist/types/deactivations.js +1 -0
- package/dist/types/deactivations.js.map +1 -0
- package/dist/types/deviceBehaviors.js +1 -0
- package/dist/types/deviceBehaviors.js.map +1 -0
- package/dist/types/devicePairings.js +1 -0
- package/dist/types/devicePairings.js.map +1 -0
- package/dist/types/deviceStatus.js +2 -0
- package/dist/types/deviceStatus.js.map +1 -0
- package/dist/types/deviceTypeFeature.js +4 -0
- package/dist/types/deviceTypeFeature.js.map +1 -0
- package/dist/types/devices.js +25 -1
- package/dist/types/devices.js.map +1 -0
- package/dist/types/entitiesTags.js +26 -0
- package/dist/types/entitiesTags.js.map +1 -0
- package/dist/types/enums.js +29 -0
- package/dist/types/enums.js.map +1 -0
- package/dist/types/feature.js +3 -0
- package/dist/types/feature.js.map +1 -0
- package/dist/types/firmwares.js +1 -0
- package/dist/types/firmwares.js.map +1 -0
- package/dist/types/index.js +9 -1
- package/dist/types/index.js.map +1 -0
- package/dist/types/latestUserAppInfo.js +2 -0
- package/dist/types/latestUserAppInfo.js.map +1 -0
- package/dist/types/liveLinks.js +2 -0
- package/dist/types/liveLinks.js.map +1 -0
- package/dist/types/logger.js +1 -0
- package/dist/types/logger.js.map +1 -0
- package/dist/types/notificationRecipients.js +1 -0
- package/dist/types/notificationRecipients.js.map +1 -0
- package/dist/types/position.js +1 -0
- package/dist/types/position.js.map +1 -0
- package/dist/types/promotion.js +42 -0
- package/dist/types/promotion.js.map +1 -0
- package/dist/types/security.js +1 -0
- package/dist/types/security.js.map +1 -0
- package/dist/types/tag.js +15 -0
- package/dist/types/tag.js.map +1 -0
- package/dist/types/tasks.js +1 -0
- package/dist/types/tasks.js.map +1 -0
- package/dist/types/trip.js +2 -0
- package/dist/types/trip.js.map +1 -0
- package/dist/types/user.js +2 -1
- package/dist/types/user.js.map +1 -0
- package/dist/types/userActivations.js +1 -0
- package/dist/types/userActivations.js.map +1 -0
- package/dist/types/userAppFeedback.js +1 -0
- package/dist/types/userAppFeedback.js.map +1 -0
- package/dist/types/userAppIncidents.js +1 -0
- package/dist/types/userAppIncidents.js.map +1 -0
- package/dist/types/userConfigurations.js +1 -0
- package/dist/types/userConfigurations.js.map +1 -0
- package/dist/types/userDataDeletionRequests.js +1 -0
- package/dist/types/userDataDeletionRequests.js.map +1 -0
- package/dist/types/userInvitations.js +1 -0
- package/dist/types/userInvitations.js.map +1 -0
- package/dist/types/userRatingRequests.js +1 -0
- package/dist/types/userRatingRequests.js.map +1 -0
- package/dist/types/userRegistrationAttempts.js +1 -0
- package/dist/types/userRegistrationAttempts.js.map +1 -0
- package/dist/utils/anyAttributeHasValue.js +1 -0
- package/dist/utils/anyAttributeHasValue.js.map +1 -0
- package/dist/utils/billingPlansHelper.js +50 -0
- package/dist/utils/billingPlansHelper.js.map +1 -0
- package/dist/utils/boolToNumberTransformer.js +1 -0
- package/dist/utils/boolToNumberTransformer.js.map +1 -0
- package/dist/utils/consoleLogger.js +1 -0
- package/dist/utils/consoleLogger.js.map +1 -0
- package/dist/utils/dateTool.js +9 -0
- package/dist/utils/dateTool.js.map +1 -0
- package/dist/utils/filterTools.js +1 -0
- package/dist/utils/filterTools.js.map +1 -0
- package/dist/utils/mapRawEntityToEntity.js +1 -0
- package/dist/utils/mapRawEntityToEntity.js.map +1 -0
- package/dist/utils/{anyAttributeIsNull.js → paramsValidators.js} +5 -0
- package/dist/utils/paramsValidators.js.map +1 -0
- package/dist/utils/parsingTools.js +22 -0
- package/dist/utils/parsingTools.js.map +1 -0
- package/dist/utils/queryLogger.js +3 -1
- package/dist/utils/queryLogger.js.map +1 -0
- package/dist/utils/randomizer.js +1 -0
- package/dist/utils/randomizer.js.map +1 -0
- package/dist/utils/stringToDateTransformer.js +1 -0
- package/dist/utils/stringToDateTransformer.js.map +1 -0
- package/dist/utils/uuidHelpers.js +1 -0
- package/dist/utils/uuidHelpers.js.map +1 -0
- package/dist/utils/uuidTransformer.js +38 -0
- package/dist/utils/uuidTransformer.js.map +1 -0
- package/package.json +1 -1
- package/dist/entities/alertMigration.d.ts +0 -22
- package/dist/entities/alertMigration.js +0 -115
- package/dist/entities/alertMigrationBatch.d.ts +0 -3
- package/dist/entities/alertMigrationBatch.js +0 -21
- package/dist/entities/alertTimeWindowConfiguration.d.ts +0 -12
- package/dist/entities/alertTimeWindowConfiguration.js +0 -61
- package/dist/entities/deviceAlertConfiguration.d.ts +0 -14
- package/dist/entities/deviceAlertConfiguration.js +0 -71
- package/dist/entities/deviceTypeEvent.d.ts +0 -5
- package/dist/entities/event.d.ts +0 -6
- package/dist/entities/svrPairingRequest.d.ts +0 -21
- package/dist/entities/svrPairingRequest.js +0 -174
- package/dist/repositories/deviceBehaviors/getDevicesLastBehaviorTask.d.ts +0 -5
- package/dist/repositories/deviceBehaviors/getDevicesLastBehaviorTask.js +0 -42
- package/dist/repositories/deviceBehaviors/getLatestDeviceBehaviorTasks.d.ts +0 -4
- package/dist/repositories/deviceBehaviors/getLatestDeviceBehaviorTasks.js +0 -40
- package/dist/repositories/userConfigurations/createDeviceAlertTimeWindows.d.ts +0 -5
- package/dist/repositories/userConfigurations/createDeviceAlertTimeWindows.js +0 -36
- package/dist/repositories/userConfigurations/createUserAlertTimeWindows.d.ts +0 -5
- package/dist/repositories/userConfigurations/createUserAlertTimeWindows.js +0 -33
- package/dist/repositories/userConfigurations/deleteDeviceAlertTimeWindows.d.ts +0 -4
- package/dist/repositories/userConfigurations/deleteDeviceAlertTimeWindows.js +0 -17
- package/dist/repositories/userConfigurations/deleteUserAlertTimeWindows.d.ts +0 -4
- package/dist/repositories/userConfigurations/deleteUserAlertTimeWindows.js +0 -17
- package/dist/repositories/userConfigurations/getDeviceAlertTimeWindows.d.ts +0 -5
- package/dist/repositories/userConfigurations/getDeviceAlertTimeWindows.js +0 -43
- package/dist/repositories/userConfigurations/getUserAlertTimeWindows.d.ts +0 -5
- package/dist/repositories/userConfigurations/getUserAlertTimeWindows.js +0 -35
- package/dist/repositories/userConfigurations/updateDeviceAlertTimeWindows.d.ts +0 -4
- package/dist/repositories/userConfigurations/updateDeviceAlertTimeWindows.js +0 -29
- package/dist/repositories/userConfigurations/updateUserAlertTimeWindows.d.ts +0 -4
- package/dist/repositories/userConfigurations/updateUserAlertTimeWindows.js +0 -28
- package/dist/utils/anyAttributeIsNull.d.ts +0 -1
|
@@ -1,22 +1,37 @@
|
|
|
1
1
|
import { User } from '../../entities';
|
|
2
|
+
import { oneRequiredGetUserByIdParams } from '../../types/user';
|
|
3
|
+
import { allAttributesAreNull } from '../../utils/paramsValidators';
|
|
2
4
|
import { uuidStringToBinaryBuffer } from '../../utils/uuidHelpers';
|
|
3
5
|
export const getUserById = async (novaDataSource, params, logger) => {
|
|
4
|
-
if (
|
|
6
|
+
if (allAttributesAreNull(params, oneRequiredGetUserByIdParams)) {
|
|
5
7
|
logger.warn({ params }, 'UsersRepository::getUserById - missing required parameters');
|
|
6
8
|
return null;
|
|
7
9
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
return novaDataSource.safeQuery(async (dataSource) => {
|
|
10
|
+
// Force the query to run on master or slave
|
|
11
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
12
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
14
13
|
const usersRepository = dataSource.getRepository(User);
|
|
15
14
|
let queryBuilder = usersRepository.createQueryBuilder('user');
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
15
|
+
if (queryRunner) {
|
|
16
|
+
queryBuilder = queryBuilder.setQueryRunner(queryRunner);
|
|
17
|
+
}
|
|
18
|
+
if (params.filters.id) {
|
|
19
|
+
const binaryBuffer = uuidStringToBinaryBuffer(params?.filters?.id);
|
|
20
|
+
if (!binaryBuffer?.length) {
|
|
21
|
+
logger.warn({ params }, 'UsersRepository::getUserById - user id should be a valid UUID');
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
queryBuilder = queryBuilder.where('user.id = :id', {
|
|
25
|
+
id: binaryBuffer,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
if (params.filters.numberId) {
|
|
29
|
+
queryBuilder = queryBuilder.andWhere('user.numberId = :numberId', {
|
|
30
|
+
numberId: params.filters.numberId,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
19
33
|
const result = await queryBuilder.getOne();
|
|
20
34
|
return result;
|
|
21
|
-
}, 'UsersRepository::getUserById');
|
|
35
|
+
}, 'UsersRepository::getUserById', dbQueryRunner);
|
|
22
36
|
};
|
|
37
|
+
//# sourceMappingURL=getUserById.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUserById.js","sourceRoot":"","sources":["../../../src/repositories/users/getUserById.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAGrC,OAAO,EAAqB,4BAA4B,EAAE,MAAM,kBAAkB,CAAA;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAElE,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,EAC9B,cAA8B,EAC9B,MAAyB,EACzB,MAAc,EACC,EAAE;IACjB,IAAI,oBAAoB,CAAC,MAAM,EAAE,4BAA4B,CAAC,EAAE;QAC9D,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,4DAA4D,CAAC,CAAA;QACrF,OAAO,IAAI,CAAA;KACZ;IAED,4CAA4C;IAC5C,MAAM,aAAa,GAAG,cAAc,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;IAExE,OAAO,cAAc,CAAC,SAAS,CAC7B,KAAK,EAAE,UAA0B,EAAE,WAAyB,EAAiB,EAAE;QAC7E,MAAM,eAAe,GAAG,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QAEtD,IAAI,YAAY,GAAG,eAAe,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;QAE7D,IAAI,WAAW,EAAE;YACf,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;SACxD;QAED,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE;YACrB,MAAM,YAAY,GAAG,wBAAwB,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,CAAA;YAElE,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE;gBACzB,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,+DAA+D,CAAC,CAAA;gBACxF,OAAO,IAAI,CAAA;aACZ;YAED,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,eAAe,EAAE;gBACjD,EAAE,EAAE,YAAY;aACjB,CAAC,CAAA;SACH;QAED,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE;YAC3B,YAAY,GAAG,YAAY,CAAC,QAAQ,CAAC,2BAA2B,EAAE;gBAChE,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ;aAClC,CAAC,CAAA;SACH;QAED,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,MAAM,EAAE,CAAA;QAE1C,OAAO,MAAM,CAAA;IACf,CAAC,EACD,8BAA8B,EAC9B,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Client } from '../../entities';
|
|
2
|
+
import { BoundaryStatus, DeviceStatus, UserStatus } from '../../types/enums';
|
|
3
|
+
import { uuidStringToBinaryBuffer } from '../../utils/uuidHelpers';
|
|
4
|
+
export const getUserClientRelatedEntitiesCount = async (novaDataSource, params, logger) => {
|
|
5
|
+
if (!params.filters.userId) {
|
|
6
|
+
logger.warn({ params }, 'UsersRepository::getUserClientRelatedEntitiesCount - missing required parameters');
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
const binaryBuffer = uuidStringToBinaryBuffer(params?.filters?.userId);
|
|
10
|
+
if (!binaryBuffer?.length) {
|
|
11
|
+
logger.warn({ params }, 'UsersRepository::getUserClientRelatedEntitiesCount - user id should be a valid UUID');
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
// Force the query to run on master or slave
|
|
15
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
16
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
17
|
+
const clientsRepository = dataSource.getRepository(Client);
|
|
18
|
+
const queryBuilder = clientsRepository
|
|
19
|
+
.createQueryBuilder('client')
|
|
20
|
+
.select('client.id', 'clientId');
|
|
21
|
+
if (queryRunner) {
|
|
22
|
+
queryBuilder.setQueryRunner(queryRunner);
|
|
23
|
+
}
|
|
24
|
+
if (params.projectionOptions?.withDevicesCount) {
|
|
25
|
+
queryBuilder.addSelect(subQuery => {
|
|
26
|
+
return subQuery
|
|
27
|
+
.select('COUNT(*)', 'devicesCount')
|
|
28
|
+
.from('device', 'd')
|
|
29
|
+
.where('client.id = d.clientId')
|
|
30
|
+
.andWhere('d.status = :deviceStatus', { deviceStatus: DeviceStatus.Active });
|
|
31
|
+
}, 'devicesCount');
|
|
32
|
+
}
|
|
33
|
+
if (params.projectionOptions?.withBoundariesCount) {
|
|
34
|
+
queryBuilder.addSelect(subQuery => {
|
|
35
|
+
return subQuery
|
|
36
|
+
.select('COUNT(*)', 'boundariesCount')
|
|
37
|
+
.from('boundary', 'b')
|
|
38
|
+
.where('client.id = b.clientId')
|
|
39
|
+
.andWhere('b.status = :boundaryStatus', { boundaryStatus: BoundaryStatus.Active });
|
|
40
|
+
}, 'boundariesCount');
|
|
41
|
+
}
|
|
42
|
+
if (params.projectionOptions?.withUsersCount) {
|
|
43
|
+
queryBuilder.addSelect(subQuery => {
|
|
44
|
+
return subQuery
|
|
45
|
+
.select('COUNT(*)', 'usersCount')
|
|
46
|
+
.from('user', 'u')
|
|
47
|
+
.where('client.id = u.clientId')
|
|
48
|
+
.andWhere('u.status = :userStatus', { userStatus: UserStatus.Active });
|
|
49
|
+
}, 'usersCount');
|
|
50
|
+
}
|
|
51
|
+
queryBuilder.where(`EXISTS (
|
|
52
|
+
SELECT 1
|
|
53
|
+
FROM user u2
|
|
54
|
+
WHERE client.id = u2.clientId
|
|
55
|
+
AND u2.id = :userId
|
|
56
|
+
LIMIT 1
|
|
57
|
+
)`, {
|
|
58
|
+
userId: binaryBuffer,
|
|
59
|
+
});
|
|
60
|
+
const result = await queryBuilder.getRawOne();
|
|
61
|
+
return result;
|
|
62
|
+
}, 'UsersRepository::getUserClientRelatedEntitiesCount', dbQueryRunner);
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=getUserClientRelatedEntitiesCount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUserClientRelatedEntitiesCount.js","sourceRoot":"","sources":["../../../src/repositories/users/getUserClientRelatedEntitiesCount.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEvC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAM5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAElE,MAAM,CAAC,MAAM,iCAAiC,GAAG,KAAK,EACpD,cAA8B,EAC9B,MAA+C,EAC/C,MAAc,EACwC,EAAE;IACxD,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE;QAC1B,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,kFAAkF,CACnF,CAAA;QAED,OAAO,IAAI,CAAA;KACZ;IAED,MAAM,YAAY,GAAG,wBAAwB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;IAEtE,IAAI,CAAC,YAAY,EAAE,MAAM,EAA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AAC,CAAA;YACtF,CAAC,EAAE,iBAAiB,CAAC,CAAA;SACtB;QAED,IAAI,MAAM,CAAC,iBAAiB,EAAE,cAAc,EAAE;YAC5C,YAAY,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;gBAChC,OAAO,QAAQ;qBACZ,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC;qBAChC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;qBACjB,KAAK,CAAC,wBAAwB,CAAC;qBAC/B,QAAQ,CAAC,wBAAwB,EAAE,EAAE,UAAU,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAA;YAC1E,CAAC,EAAE,YAAY,CAAC,CAAA;SACjB;QAED,YAAY,CAAC,KAAK,CAChB;;;;;;UAME,EACF;YACE,MAAM,EAAE,YAAY;SACrB,CACF,CAAA;QAED,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,SAAS,EAAE,CAAA;QAE7C,OAAO,MAAM,CAAA;IACf,CAAC,EACD,oDAAoD,EACpD,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { User } from '../../entities';
|
|
2
1
|
import { binaryBufferToUuidString } from '../../utils/uuidHelpers';
|
|
3
2
|
export const getUsersData = async (novaDataSource, params, logger) => {
|
|
4
3
|
if (!params?.filters?.imei) {
|
|
5
4
|
logger.warn({ params }, 'UsersRepository::getUsersData - missing required parameters');
|
|
6
5
|
return [];
|
|
7
6
|
}
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
// Force the query to run on master or slave
|
|
8
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
9
|
+
return novaDataSource.safeQuery(async (_dataSource, queryRunner) => {
|
|
10
10
|
const query = `SELECT U.id as userId, U.telephone, U.email
|
|
11
11
|
, UC.isMetric, coalesce (UC.timezone, '') as timezone, UC.alertsNotificationsOn, UC.speedUnits , UC.distanceUnits
|
|
12
12
|
, AC.alertTypeId, AC.smsNotification, AC.emailNotification, AC.alertValue, AC.pushNotification , AC.appNotification , AC.alertMetadata
|
|
13
|
+
, AC.id as userAlertConfigurationId, AC.name as alertName, AC.filter, AC.enabled
|
|
13
14
|
, D.name as deviceName, D.deviceTypeId
|
|
14
15
|
, C.id as clientId
|
|
15
16
|
, U.isAdmin
|
|
@@ -21,9 +22,10 @@ export const getUsersData = async (novaDataSource, params, logger) => {
|
|
|
21
22
|
from notificationRecipient as NR
|
|
22
23
|
where NR.clientId = C.id
|
|
23
24
|
and NR.userId = U.id
|
|
24
|
-
and
|
|
25
|
+
and NR.notificationType = 2
|
|
25
26
|
and NR.isEnabled = true
|
|
26
|
-
and NR.unsubscribed = false
|
|
27
|
+
and NR.unsubscribed = false
|
|
28
|
+
and (NR.userAlertConfigurationId IS NULL or NR.userAlertConfigurationId = AC.id )) as phoneNumbers
|
|
27
29
|
, ( SELECT CONCAT('[',
|
|
28
30
|
GROUP_CONCAT( distinct case when NR.isUserProfile = true
|
|
29
31
|
then CONCAT('"', U.email, '"') else CONCAT('"', NR.recipient, '"') end SEPARATOR ','),
|
|
@@ -33,7 +35,8 @@ export const getUsersData = async (novaDataSource, params, logger) => {
|
|
|
33
35
|
and NR.userId = U.id
|
|
34
36
|
and NR.notificationType = 1
|
|
35
37
|
and NR.isEnabled = true
|
|
36
|
-
and NR.unsubscribed = false
|
|
38
|
+
and NR.unsubscribed = false
|
|
39
|
+
and (NR.userAlertConfigurationId IS NULL or NR.userAlertConfigurationId = AC.id ) ) as emailAddresses
|
|
37
40
|
FROM device AS D
|
|
38
41
|
JOIN client AS C
|
|
39
42
|
ON D.clientId = C.id
|
|
@@ -48,7 +51,7 @@ export const getUsersData = async (novaDataSource, params, logger) => {
|
|
|
48
51
|
JOIN country AS CO
|
|
49
52
|
ON CO.id = CASE WHEN(U.countryId IS NULL OR U.countryId = 0) THEN 236 ELSE U.countryId END
|
|
50
53
|
WHERE D.imei = ?`;
|
|
51
|
-
const result = await
|
|
54
|
+
const result = await queryRunner.query(query, [params.filters.imei]);
|
|
52
55
|
return result.map(item => ({
|
|
53
56
|
...item,
|
|
54
57
|
userId: binaryBufferToUuidString(item.userId),
|
|
@@ -62,5 +65,6 @@ export const getUsersData = async (novaDataSource, params, logger) => {
|
|
|
62
65
|
phoneNumbers: item.phoneNumbers ? JSON.parse(item.phoneNumbers) : [],
|
|
63
66
|
emailAddresses: item.emailAddresses ? JSON.parse(item.emailAddresses) : [],
|
|
64
67
|
}));
|
|
65
|
-
}, 'UsersRepository::getUsersData');
|
|
68
|
+
}, 'UsersRepository::getUsersData', dbQueryRunner);
|
|
66
69
|
};
|
|
70
|
+
//# sourceMappingURL=getUserData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUserData.js","sourceRoot":"","sources":["../../../src/repositories/users/getUserData.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAElE,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,cAA8B,EAC9B,MAA0B,EAC1B,MAAc,EACO,EAAE;IACvB,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;QAC1B,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,6DAA6D,CAAC,CAAA;QACtF,OAAO,EAAE,CAAA;KACV;IAED,4CAA4C;IAC5C,MAAM,aAAa,GAAG,cAAc,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;IAExE,OAAO,cAAc,CAAC,SAAS,CAC7B,KAAK,EAAE,WAA2B,EAAE,WAAyB,EAAuB,EAAE;QACpF,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCA2Ce,CAAA;QAE7B,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;QAEpE,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACzB,GAAG,IAAI;YACP,MAAM,EAAE,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC;YAC7C,OAAO,EAAE,IAAI,CAAC,OAAO,KAAK,CAAC;YAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,KAAK,CAAC;YAC7B,oBAAoB,EAAE,IAAI,CAAC,qBAAqB,KAAK,CAAC;YACtD,eAAe,EAAE,IAAI,CAAC,eAAe,KAAK,CAAC;YAC3C,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,KAAK,CAAC;YAC/C,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,KAAK,CAAC;YAC7C,eAAe,EAAE,IAAI,CAAC,eAAe,KAAK,CAAC;YAC3C,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE;YACpE,cAAc,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE;SAC3E,CAAC,CAAC,CAAA;IACL,CAAC,EACD,+BAA+B,EAC/B,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { AcumaticaImeiIccidData, AcumaticaShipment, Client, Device, DeviceType, User, } from '../../entities';
|
|
2
|
+
import { Enums } from '../../types';
|
|
3
|
+
import { uuidStringToBinaryBuffer } from '../../utils/uuidHelpers';
|
|
4
|
+
export const getUserInfoWithAmazonDevicesInfo = async (novaDataSource, params, logger) => {
|
|
5
|
+
if (!params?.filters?.userId) {
|
|
6
|
+
logger.warn({ params }, 'UsersRepository::getUserInfoWithAmazonDevicesInfo - missing required parameters');
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
const userIdBinaryBuffer = uuidStringToBinaryBuffer(params.filters.userId);
|
|
10
|
+
if (!userIdBinaryBuffer) {
|
|
11
|
+
logger.warn({ params }, 'UsersRepository::getUserInfoWithAmazonDevicesInfo - invalid user ID');
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
// Force the query to run on master or slave
|
|
15
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
16
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
17
|
+
const usersRepository = dataSource.getRepository(User);
|
|
18
|
+
const queryBuilder = usersRepository
|
|
19
|
+
.createQueryBuilder('user')
|
|
20
|
+
.innerJoin(Client, 'client', 'client.id = user.clientId')
|
|
21
|
+
.innerJoin(Device, 'device', 'device.clientId = user.clientId and device.status = :deviceStatus', {
|
|
22
|
+
deviceStatus: Enums.DeviceStatus.Active,
|
|
23
|
+
})
|
|
24
|
+
.innerJoin(DeviceType, 'deviceType', 'device.deviceTypeId = deviceType.id')
|
|
25
|
+
.leftJoin(AcumaticaImeiIccidData, 'acumaticaImeiIccidData', 'device.imei = acumaticaImeiIccidData.imei')
|
|
26
|
+
.leftJoin(AcumaticaShipment, 'acumaticaShipment', `acumaticaImeiIccidData.amazonShipmentId = acumaticaShipment.shipmentId and
|
|
27
|
+
acumaticaShipment.location IS NOT NULL and acumaticaShipment.location <> ''`)
|
|
28
|
+
.where('user.id = :userId and user.status = :userStatus', {
|
|
29
|
+
userId: userIdBinaryBuffer,
|
|
30
|
+
userStatus: Enums.UserStatus.Active,
|
|
31
|
+
})
|
|
32
|
+
.distinct(true)
|
|
33
|
+
.select([
|
|
34
|
+
'user.id as userId',
|
|
35
|
+
'user.email as email',
|
|
36
|
+
'client.id as clientId',
|
|
37
|
+
'client.useType as useType',
|
|
38
|
+
'client.clientTypeId as clientTypeId',
|
|
39
|
+
'device.imei as imei',
|
|
40
|
+
'device.name as deviceName',
|
|
41
|
+
'device.status as deviceStatus',
|
|
42
|
+
'device.createdAt as deviceCreatedAt',
|
|
43
|
+
'deviceType.id as deviceTypeId',
|
|
44
|
+
'deviceType.brand as deviceBrand',
|
|
45
|
+
'deviceType.model as deviceModel',
|
|
46
|
+
'deviceType.name as deviceTypeName',
|
|
47
|
+
'deviceType.supported as deviceTypeSupported',
|
|
48
|
+
'deviceType.modelFamily as deviceTypeModelFamily',
|
|
49
|
+
'acumaticaShipment.location as amazonShipment',
|
|
50
|
+
`case when acumaticaShipment.location is not null and acumaticaShipment.location <> '' then true else false end as isAmazonDevice`,
|
|
51
|
+
]);
|
|
52
|
+
if (queryRunner) {
|
|
53
|
+
queryBuilder.setQueryRunner(queryRunner);
|
|
54
|
+
}
|
|
55
|
+
const queryResult = await queryBuilder.getRawMany();
|
|
56
|
+
let result;
|
|
57
|
+
queryResult.forEach(row => {
|
|
58
|
+
if (!result) {
|
|
59
|
+
result = {
|
|
60
|
+
userId: params.filters.userId,
|
|
61
|
+
email: row.email,
|
|
62
|
+
clientId: row.clientId,
|
|
63
|
+
useType: row.useType,
|
|
64
|
+
clientTypeId: row.clientTypeId,
|
|
65
|
+
devices: [],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
result.devices.push({
|
|
69
|
+
imei: row.imei,
|
|
70
|
+
name: row.deviceName,
|
|
71
|
+
status: row.deviceStatus,
|
|
72
|
+
createdAt: row.deviceCreatedAt,
|
|
73
|
+
amazonShipment: row.amazonShipment,
|
|
74
|
+
isAmazonDevice: row.isAmazonDevice == 1 ? true : false,
|
|
75
|
+
deviceType: {
|
|
76
|
+
id: row.deviceTypeId,
|
|
77
|
+
brand: row.deviceBrand,
|
|
78
|
+
model: row.deviceModel,
|
|
79
|
+
name: row.deviceTypeName,
|
|
80
|
+
supported: row.deviceTypeSupported == 1 ? true : false,
|
|
81
|
+
modelFamily: row.deviceTypeModelFamily,
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
return result;
|
|
86
|
+
}, 'UsersRepository::getUserInfoWithAmazonDevicesInfo', dbQueryRunner);
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=getUserInfoWithAmazonDevicesInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUserInfoWithAmazonDevicesInfo.js","sourceRoot":"","sources":["../../../src/repositories/users/getUserInfoWithAmazonDevicesInfo.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,UAAU,EACV,IAAI,GACL,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAMnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAElE,MAAM,CAAC,MAAM,gCAAgC,GAAG,KAAK,EACnD,cAA8B,EAC9B,MAA8C,EAC9C,MAAc,EAC0B,EAAE;IAC1C,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;QAC5B,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,iFAAiF,CAClF,CAAA;QACD,OAAO,IAAI,CAAA;KACZ;IAED,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IAE1E,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,qEAAqE,CAAC,CAAA;QAC9F,OAAO,IAAI,CAAA;KACZ;IAED,4CAA4C;IAC5C,MAAM,aAAa,GAAG,cAAc,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;IAExE,OAAO,cAAc,CAAC,SAAS,CAC7B,KAAK,EACH,UAA0B,EAC1B,WAAyB,EACe,EAAE;QAC1C,MAAM,eAAe,GAAG,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QAEtD,MAAM,YAAY,GAAG,eAAe;aACjC,kBAAkB,CAAC,MAAM,CAAC;aAC1B,SAAS,CAAC,MAAM,EAAE,QAAQ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EAAE;iBACZ,CAAA;aACF;YAED,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;gBAClB,IAAI,EAAE,GAAG,CAAC,IAAI;gBACd,IAAI,EAAE,GAAG,CAAC,UAAU;gBACpB,MAAM,EAAE,GAAG,CAAC,YAAY;gBACxB,SAAS,EAAE,GAAG,CAAC,eAAe;gBAC9B,cAAc,EAAE,GAAG,CAAC,cAAc;gBAClC,cAAc,EAAE,GAAG,CAAC,cAAc,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;gBACtD,UAAU,EAAE;oBACV,EAAE,EAAE,GAAG,CAAC,YAAY;oBACpB,KAAK,EAAE,GAAG,CAAC,WAAW;oBACtB,KAAK,EAAE,GAAG,CAAC,WAAW;oBACtB,IAAI,EAAE,GAAG,CAAC,cAAc;oBACxB,SAAS,EAAE,GAAG,CAAC,mBAAmB,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;oBACtD,WAAW,EAAE,GAAG,CAAC,qBAAqB;iBACvC;aACF,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC,EACD,mDAAmD,EACnD,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import { User } from '../../entities';
|
|
1
|
+
import { EntityTag, Tag, User } from '../../entities';
|
|
2
2
|
import { uuidStringToBinaryBuffer } from '../../utils/uuidHelpers';
|
|
3
3
|
export const getUsers = async (novaDataSource, params, logger) => {
|
|
4
4
|
if (!params?.filters?.emailList?.length &&
|
|
5
5
|
!params?.filters?.userName &&
|
|
6
6
|
!params?.filters?.clientId &&
|
|
7
7
|
!params?.filters?.search &&
|
|
8
|
-
!params?.filters?.status
|
|
8
|
+
!params?.filters?.status &&
|
|
9
|
+
!params?.filters?.tagIdList?.length) {
|
|
9
10
|
logger.warn({ params }, 'UsersRepository::getUsers - missing required parameters');
|
|
10
11
|
return [];
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
+
// Force the query to run on master or slave
|
|
14
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
15
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
13
16
|
const usersRepository = dataSource.getRepository(User);
|
|
14
17
|
let queryBuilder = usersRepository.createQueryBuilder('user');
|
|
18
|
+
if (queryRunner) {
|
|
19
|
+
queryBuilder = queryBuilder.setQueryRunner(queryRunner);
|
|
20
|
+
}
|
|
15
21
|
if (params.filters.emailList?.length) {
|
|
16
22
|
queryBuilder = queryBuilder.where('LOWER(user.email) IN (:...emailList)', {
|
|
17
23
|
emailList: params.filters.emailList.map(email => email.trim().toLowerCase()),
|
|
@@ -42,8 +48,55 @@ export const getUsers = async (novaDataSource, params, logger) => {
|
|
|
42
48
|
status: params.filters.status,
|
|
43
49
|
});
|
|
44
50
|
}
|
|
51
|
+
if (params.filters.tagIdList?.length) {
|
|
52
|
+
queryBuilder.innerJoin(EntityTag, 'entityTag', `entityTag.entityId = user.numberId
|
|
53
|
+
AND entityTag.entityType = 'User'
|
|
54
|
+
AND entityTag.tagId IN (:...tagIdList)`, {
|
|
55
|
+
tagIdList: params.filters.tagIdList,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
45
58
|
queryBuilder = queryBuilder.orderBy('user.lastname', 'DESC');
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
59
|
+
if (params.projectionOptions?.withSecurityRole) {
|
|
60
|
+
queryBuilder = queryBuilder
|
|
61
|
+
.leftJoinAndSelect('user.userSecurityRoles', 'userSecurityRoles')
|
|
62
|
+
.leftJoinAndSelect('userSecurityRoles.securityRole', 'securityRole');
|
|
63
|
+
}
|
|
64
|
+
if (params.projectionOptions?.withCountryInfo) {
|
|
65
|
+
queryBuilder = queryBuilder
|
|
66
|
+
.leftJoinAndSelect('user.telephoneCountry', 'telephoneCountry')
|
|
67
|
+
.leftJoinAndSelect('user.country', 'country');
|
|
68
|
+
}
|
|
69
|
+
if (params.projectionOptions?.withUserConfiguration) {
|
|
70
|
+
queryBuilder = queryBuilder.leftJoinAndSelect('user.userConfiguration', 'userConfiguration');
|
|
71
|
+
}
|
|
72
|
+
if (params.projectionOptions?.withClientAlertNotificationOverride) {
|
|
73
|
+
queryBuilder = queryBuilder.leftJoinAndSelect('user.clientAlertNotificationOverride', 'clientAlertNotificationOverride');
|
|
74
|
+
}
|
|
75
|
+
let users = await queryBuilder.getMany();
|
|
76
|
+
if (params.projectionOptions?.withSecurityGroupTag) {
|
|
77
|
+
//TODO: Refactor this to a common function,
|
|
78
|
+
// change the approach to get the security group tags for all the users in one query,
|
|
79
|
+
// then map them to the users. Target methods: getDevices, getBoundariesByClientId
|
|
80
|
+
const entityTagRepo = dataSource.getRepository(EntityTag);
|
|
81
|
+
users = await Promise.all(users.map(async (user) => {
|
|
82
|
+
const entityTagQueryBuilder = entityTagRepo.createQueryBuilder('entityTag');
|
|
83
|
+
if (queryRunner) {
|
|
84
|
+
entityTagQueryBuilder.setQueryRunner(queryRunner);
|
|
85
|
+
}
|
|
86
|
+
const securityGroupEntityTags = await entityTagQueryBuilder
|
|
87
|
+
.where('entityTag.entityId = :entityId AND entityTag.entityType = :entityType', {
|
|
88
|
+
entityId: user.numberId,
|
|
89
|
+
entityType: 'User',
|
|
90
|
+
})
|
|
91
|
+
.innerJoin(Tag, 'tag', `tag.id = entityTag.tagId AND JSON_CONTAINS(tag.metadata, :metadata)`, { metadata: JSON.stringify({ isSecurityGroup: true }) })
|
|
92
|
+
.getMany();
|
|
93
|
+
return {
|
|
94
|
+
...user,
|
|
95
|
+
securityGroupEntityTags,
|
|
96
|
+
};
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
return users;
|
|
100
|
+
}, 'UsersRepository::getUsers', dbQueryRunner);
|
|
49
101
|
};
|
|
102
|
+
//# sourceMappingURL=getUsers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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E,QAAQ,EAAE,IAAI,CAAC,QAAQ;oBACvB,UAAU,EAAE,MAAM;iBACnB,CAAC;qBACD,SAAS,CACR,GAAG,EACH,KAAK,EACL,qEAAqE,EACrE,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,EAAE,CACxD;qBACA,OAAO,EAAE,CAAA;gBAEZ,OAAO;oBACL,GAAG,IAAI;oBACP,uBAAuB;iBACxB,CAAA;YACH,CAAC,CAAC,CACH,CAAA;SACF;QAED,OAAO,KAAK,CAAA;IACd,CAAC,EACD,2BAA2B,EAC3B,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -5,11 +5,19 @@ import { User } from '../../entities';
|
|
|
5
5
|
//Device (name)
|
|
6
6
|
//Country (international dialing code)
|
|
7
7
|
export const getUsersConfigurationByImei = async (novaDataSource, params, logger) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
if (!params?.filters?.imei) {
|
|
9
|
+
logger.warn({ params }, 'UsersRepository::getUsersConfigurationByImei - missing required parameters');
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
12
|
+
// Force the query to run on master or slave
|
|
13
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
14
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
15
|
+
const usersRepository = dataSource.getRepository(User);
|
|
16
|
+
const queryBuilder = usersRepository.createQueryBuilder('user');
|
|
17
|
+
if (queryRunner) {
|
|
18
|
+
queryBuilder.setQueryRunner(queryRunner);
|
|
19
|
+
}
|
|
20
|
+
const userConfiguration = queryBuilder
|
|
13
21
|
.innerJoin('user.client', 'client')
|
|
14
22
|
.innerJoinAndSelect('client.devices', 'device')
|
|
15
23
|
.innerJoinAndSelect('user.userConfiguration', 'userConfiguration')
|
|
@@ -18,12 +26,6 @@ export const getUsersConfigurationByImei = async (novaDataSource, params, logger
|
|
|
18
26
|
.where('device.imei = :imei', { imei: params.filters.imei })
|
|
19
27
|
.getMany();
|
|
20
28
|
return userConfiguration;
|
|
21
|
-
}
|
|
22
|
-
catch (error) {
|
|
23
|
-
logger.error({ error }, 'UsersRepository::getUsersConfigurationByImei error');
|
|
24
|
-
throw error;
|
|
25
|
-
}
|
|
26
|
-
finally {
|
|
27
|
-
await novaDataSource.disconnect();
|
|
28
|
-
}
|
|
29
|
+
}, 'UsersRepository::getUsersConfigurationByImei', dbQueryRunner);
|
|
29
30
|
};
|
|
31
|
+
//# sourceMappingURL=getUsersConfigurationByImei.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUsersConfigurationByImei.js","sourceRoot":"","sources":["../../../src/repositories/users/getUsersConfigurationByImei.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAKrC,MAAM;AACN,oBAAoB;AACpB,qBAAqB;AACrB,eAAe;AACf,sCAAsC;AAEtC,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,EAC9C,cAA8B,EAC9B,MAAyC,EACzC,MAAc,EACG,EAAE;IACnB,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;QAC1B,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,4EAA4E,CAC7E,CAAA;QACD,OAAO,EAAE,CAAA;KACV;IAED,4CAA4C;IAC5C,MAAM,aAAa,GAAG,cAAc,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;IAExE,OAAO,cAAc,CAAC,SAAS,CAC7B,KAAK,EAAE,UAA0B,EAAE,WAAyB,EAAmB,EAAE;QAC/E,MAAM,eAAe,GAAG,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QAEtD,MAAM,YAAY,GAAG,eAAe,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;QAE/D,IAAI,WAAW,EAAE;YACf,YAAY,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;SACzC;QAED,MAAM,iBAAiB,GAAG,YAAY;aACnC,SAAS,CAAC,aAAa,EAAE,QAAQ,CAAC;aAClC,kBAAkB,CAAC,gBAAgB,EAAE,QAAQ,CAAC;aAC9C,kBAAkB,CAAC,wBAAwB,EAAE,mBAAmB,CAAC;aACjE,kBAAkB,CAAC,6BAA6B,EAAE,wBAAwB,CAAC;aAC3E,kBAAkB,CAAC,cAAc,EAAE,SAAS,CAAC;aAC7C,KAAK,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;aAC3D,OAAO,EAAE,CAAA;QAEZ,OAAO,iBAAiB,CAAA;IAC1B,CAAC,EACD,8CAA8C,EAC9C,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -5,7 +5,9 @@ export const getUsersIdsByPhoneAndCountryCode = async (novaDataSource, params, l
|
|
|
5
5
|
logger.warn({ params }, 'UsersRepository::getUsersIdsByPhoneAndCountryCode - missing required parameters');
|
|
6
6
|
return [];
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
// Force the query to run on master or slave
|
|
9
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
10
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
9
11
|
const usersRepository = dataSource.getRepository(User);
|
|
10
12
|
let queryBuilder = usersRepository
|
|
11
13
|
.createQueryBuilder('user')
|
|
@@ -14,8 +16,12 @@ export const getUsersIdsByPhoneAndCountryCode = async (novaDataSource, params, l
|
|
|
14
16
|
.andWhere(`user.telephone = REPLACE(:phone, country.internationalDirectDialing, '')`, {
|
|
15
17
|
phone: params.filters.phone,
|
|
16
18
|
});
|
|
19
|
+
if (queryRunner) {
|
|
20
|
+
queryBuilder = queryBuilder.setQueryRunner(queryRunner);
|
|
21
|
+
}
|
|
17
22
|
queryBuilder = queryBuilder.select('user.id as id');
|
|
18
23
|
const result = await queryBuilder.getRawMany();
|
|
19
24
|
return result?.map(item => binaryBufferToUuidString(item.id));
|
|
20
|
-
}, 'UsersRepository::getUsersIdsByPhoneAndCountryCode');
|
|
25
|
+
}, 'UsersRepository::getUsersIdsByPhoneAndCountryCode', dbQueryRunner);
|
|
21
26
|
};
|
|
27
|
+
//# sourceMappingURL=getUsersIdByPhoneAndCountryCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUsersIdByPhoneAndCountryCode.js","sourceRoot":"","sources":["../../../src/repositories/users/getUsersIdByPhoneAndCountryCode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAI9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAElE,MAAM,CAAC,MAAM,gCAAgC,GAAG,KAAK,EACnD,cAA8B,EAC9B,MAA8C,EAC9C,MAAc,EACK,EAAE;IACrB,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE;QAC5D,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,iFAAiF,CAClF,CAAA;QACD,OAAO,EAAE,CAAA;KACV;IAED,4CAA4C;IAC5C,MAAM,aAAa,GAAG,cAAc,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;IAExE,OAAO,cAAc,CAAC,SAAS,CAC7B,KAAK,EAAE,UAA0B,EAAE,WAAyB,EAAqB,EAAE;QACjF,MAAM,eAAe,GAAG,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QAEtD,IAAI,YAAY,GAAG,eAAe;aAC/B,kBAAkB,CAAC,MAAM,CAAC;aAC1B,SAAS,CAAC,OAAO,EAAE,SAAS,EAAE,6BAA6B,CAAC;aAC5D,KAAK,CAAC,mCAAmC,EAAE,EAAE,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;aACvF,QAAQ,CAAC,0EAA0E,EAAE;YACpF,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK;SAC5B,CAAC,CAAA;QAEJ,IAAI,WAAW,EAAE;YACf,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;SACxD;QAED,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC,eAAe,CAAC,CAAA;QAEnD,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,UAAU,EAAE,CAAA;QAE9C,OAAO,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;IAC/D,CAAC,EACD,mDAAmD,EACnD,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export const getUsersInfoWithActivationInfo = async (novaDataSource, params, logger) => {
|
|
2
|
+
if (!params?.filters?.userId) {
|
|
3
|
+
logger.warn({ params }, 'UsersRepository::getUsersInfoWithActivationInfo - missing required parameters');
|
|
4
|
+
return null;
|
|
5
|
+
}
|
|
6
|
+
// Force the query to run on master or slave
|
|
7
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
8
|
+
return novaDataSource.safeQuery(async (_dataSource, queryRunner) => {
|
|
9
|
+
const query = `
|
|
10
|
+
SELECT
|
|
11
|
+
subQuery.*,
|
|
12
|
+
CASE WHEN asd.location = 'FBA-US' THEN TRUE ELSE FALSE END AS amazonUSA,
|
|
13
|
+
CASE WHEN asd.location = 'FBA-CA' THEN TRUE ELSE FALSE END AS amazonCanada,
|
|
14
|
+
CASE WHEN asd.location = 'FBA-MX' THEN TRUE ELSE FALSE END AS amazonMexico
|
|
15
|
+
FROM (
|
|
16
|
+
SELECT DISTINCT
|
|
17
|
+
BIN_TO_UUID(u.id) as userId,
|
|
18
|
+
c.id as clientId,
|
|
19
|
+
c.useType,
|
|
20
|
+
c.clientTypeId,
|
|
21
|
+
ct.name AS clientType,
|
|
22
|
+
usr.securityRoleId AS userRoleId,
|
|
23
|
+
sr.name AS userRole,
|
|
24
|
+
u.email,
|
|
25
|
+
u.firstName,
|
|
26
|
+
u.lastName,
|
|
27
|
+
u.companyName,
|
|
28
|
+
COALESCE(ui.spyInvitesPending, 0) AS spyInvitesPending,
|
|
29
|
+
COALESCE(ui.spyInvitesRedeemed, 0) AS spyInvitesRedeemed,
|
|
30
|
+
COALESCE(ui.spyInvitesCancelled, 0) AS spyInvitesCancelled,
|
|
31
|
+
uam.firstName AS activationFirstName,
|
|
32
|
+
uam.lastName AS activationLastName,
|
|
33
|
+
uam.email AS activationEmail,
|
|
34
|
+
uam.phone AS activationPhone,
|
|
35
|
+
uam.trackingReason AS activationTrackingReason,
|
|
36
|
+
uam.companyName AS activationCompanyName,
|
|
37
|
+
uam.role AS activationRole,
|
|
38
|
+
uam.industry AS activationIndustry,
|
|
39
|
+
uam.devicesActivatingCategory AS activationDevicesActivatingCategory,
|
|
40
|
+
uam.devicesActivatingCount AS activationDevicesActivatingCount,
|
|
41
|
+
uam.plan AS activationPlan,
|
|
42
|
+
uam.usersInvitedCount AS activationUsersInvitedCount,
|
|
43
|
+
uam.meetingScheduled AS activationMeetingScheduled,
|
|
44
|
+
uam.assetsCountRange AS activationAssetsCountRange,
|
|
45
|
+
uam.createdAt AS activationCreated,
|
|
46
|
+
uam.modifiedAt AS activationModified,
|
|
47
|
+
uam.planAnnual AS activationPlanAnnual,
|
|
48
|
+
uam.planId AS activationPlanId,
|
|
49
|
+
d.devicesCount,
|
|
50
|
+
u.status
|
|
51
|
+
FROM user u
|
|
52
|
+
JOIN client c ON c.id = u.clientId
|
|
53
|
+
LEFT JOIN userActivationMetric uam ON uam.userId = u.id
|
|
54
|
+
LEFT JOIN clientType ct ON ct.id = c.clientTypeId
|
|
55
|
+
LEFT JOIN userSecurityRole usr ON usr.userId = u.id
|
|
56
|
+
LEFT JOIN securityRole sr ON sr.id = usr.securityRoleId
|
|
57
|
+
LEFT JOIN (
|
|
58
|
+
SELECT c.id as clientId, COUNT(*) AS devicesCount
|
|
59
|
+
FROM device d
|
|
60
|
+
JOIN client c ON c.id = d.clientId
|
|
61
|
+
WHERE d.status = 'A'
|
|
62
|
+
GROUP BY c.id
|
|
63
|
+
) d ON d.clientId = c.id
|
|
64
|
+
LEFT JOIN (
|
|
65
|
+
SELECT
|
|
66
|
+
ui.inviterUserId,
|
|
67
|
+
SUM(CASE WHEN ui.statusId = 1 THEN 1 ELSE 0 END) AS spyInvitesPending,
|
|
68
|
+
SUM(CASE WHEN ui.statusId = 2 THEN 1 ELSE 0 END) AS spyInvitesRedeemed,
|
|
69
|
+
SUM(CASE WHEN ui.statusId = 3 THEN 1 ELSE 0 END) AS spyInvitesCancelled
|
|
70
|
+
FROM userInvitation ui
|
|
71
|
+
GROUP BY ui.inviterUserId
|
|
72
|
+
) ui ON ui.inviterUserId = u.id
|
|
73
|
+
WHERE BIN_TO_UUID(u.id) = ?
|
|
74
|
+
) AS subQuery
|
|
75
|
+
LEFT JOIN (
|
|
76
|
+
SELECT DISTINCT
|
|
77
|
+
d.clientId,
|
|
78
|
+
as1.location
|
|
79
|
+
FROM device d
|
|
80
|
+
JOIN acumaticaImeiIccidData aiid ON aiid.imei = d.imei
|
|
81
|
+
JOIN acumaticaShipment as1 ON aiid.amazonShipmentId = as1.shipmentId
|
|
82
|
+
WHERE as1.location IS NOT NULL AND as1.location <> '' AND d.status = 'A'
|
|
83
|
+
GROUP BY as1.location, d.clientId
|
|
84
|
+
) AS asd ON asd.clientId = subQuery.clientId
|
|
85
|
+
`;
|
|
86
|
+
const queryResult = await queryRunner.query(query, [params.filters.userId]);
|
|
87
|
+
if (!queryResult?.length) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
const result = {
|
|
91
|
+
...queryResult[0],
|
|
92
|
+
userId: queryResult[0].userId,
|
|
93
|
+
activationMeetingScheduled: queryResult[0].activationMeetingScheduled === 1,
|
|
94
|
+
amazonUSA: queryResult[0].amazonUSA === 1,
|
|
95
|
+
amazonCanada: queryResult[0].amazonCanada === 1,
|
|
96
|
+
amazonMexico: queryResult[0].amazonMexico === 1,
|
|
97
|
+
};
|
|
98
|
+
return result;
|
|
99
|
+
}, 'UsersRepository::getUsersInfoWithActivationInfo', dbQueryRunner);
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=getUsersInfoWithActivationInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUsersInfoWithActivationInfo.js","sourceRoot":"","sources":["../../../src/repositories/users/getUsersInfoWithActivationInfo.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,EACjD,cAA8B,EAC9B,MAA2C,EAC3C,MAAc,EACuB,EAAE;IACvC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;QAC5B,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,+EAA+E,CAChF,CAAA;QACD,OAAO,IAAI,CAAA;KACZ;IAED,4CAA4C;IAC5C,MAAM,aAAa,GAAG,cAAc,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;IAExE,OAAO,cAAc,CAAC,SAAS,CAC7B,KAAK,EACH,WAA2B,EAC3B,WAAyB,EACY,EAAE;QACvC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4Eb,CAAA;QAED,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;QAE3E,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE;YACxB,OAAO,IAAI,CAAA;SACZ;QAED,MAAM,MAAM,GAAG;YACb,GAAG,WAAW,CAAC,CAAC,CAAC;YACjB,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM;YAC7B,0BAA0B,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,0BAA0B,KAAK,CAAC;YAC3E,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC;YACzC,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,YAAY,KAAK,CAAC;YAC/C,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,YAAY,KAAK,CAAC;SAChD,CAAA;QAED,OAAO,MAAM,CAAA;IACf,CAAC,EACD,iDAAiD,EACjD,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Device, User } from '../../entities';
|
|
2
|
+
import { Enums } from '../../types';
|
|
3
|
+
import { binaryBufferToUuidString } from '../../utils/uuidHelpers';
|
|
4
|
+
export const getUsersInfoWithDevicesInfo = async (novaDataSource, params, logger) => {
|
|
5
|
+
if (!params?.filters?.userName) {
|
|
6
|
+
logger.warn({ params }, 'UsersRepository::getUsersInfoWithDevicesInfo - missing required parameters');
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
// Force the query to run on master or slave
|
|
10
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
11
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
12
|
+
const usersRepository = dataSource.getRepository(User);
|
|
13
|
+
const queryBuilder = usersRepository
|
|
14
|
+
.createQueryBuilder('user')
|
|
15
|
+
.innerJoin(Device, 'device', 'device.clientId = user.clientId and device.status = :status', {
|
|
16
|
+
status: Enums.DeviceStatus.Active,
|
|
17
|
+
})
|
|
18
|
+
.where('LOWER(user.userName) = LOWER(:userName)', {
|
|
19
|
+
userName: params.filters.userName.trim(),
|
|
20
|
+
})
|
|
21
|
+
.orderBy('user.email', 'ASC')
|
|
22
|
+
.select([
|
|
23
|
+
'user.id as userId',
|
|
24
|
+
'user.firstName as firstName',
|
|
25
|
+
'user.lastName as lastName',
|
|
26
|
+
'user.email as email',
|
|
27
|
+
'user.userName as userName',
|
|
28
|
+
'device.imei as imei',
|
|
29
|
+
'device.name as deviceName',
|
|
30
|
+
]);
|
|
31
|
+
if (queryRunner) {
|
|
32
|
+
queryBuilder.setQueryRunner(queryRunner);
|
|
33
|
+
}
|
|
34
|
+
const queryResult = await queryBuilder.getRawMany();
|
|
35
|
+
const result = [];
|
|
36
|
+
const userIds = [];
|
|
37
|
+
queryResult.forEach(row => {
|
|
38
|
+
const userId = binaryBufferToUuidString(row.userId);
|
|
39
|
+
if (!userIds.includes(userId)) {
|
|
40
|
+
userIds.push(userId);
|
|
41
|
+
result.push({
|
|
42
|
+
userId,
|
|
43
|
+
firstName: row.firstName,
|
|
44
|
+
lastName: row.lastName,
|
|
45
|
+
email: row.email,
|
|
46
|
+
userName: row.userName,
|
|
47
|
+
devices: [],
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
const userIndex = result.findIndex(user => user.userId === userId);
|
|
51
|
+
result[userIndex].devices.push({
|
|
52
|
+
imei: row.imei,
|
|
53
|
+
name: row.deviceName,
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
return result;
|
|
57
|
+
}, 'UsersRepository::getUsersInfoWithDevicesInfo', dbQueryRunner);
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=getUsersInfoWithDevicesInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUsersInfoWithDevicesInfo.js","sourceRoot":"","sources":["../../../src/repositories/users/getUsersInfoWithDevicesInfo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAGnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAElE,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,EAC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