@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
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { ClientAlertRecipient, User, UserSecurityRole } from '../../entities';
|
|
2
|
+
import { binaryBufferToUuidString } from '../../utils/uuidHelpers';
|
|
3
|
+
export const getUsersDataForClientAlertConfig = async (novaDataSource, params, logger) => {
|
|
4
|
+
if (!params?.clientAlertConfigurationId || !params?.clientId) {
|
|
5
|
+
logger.warn({ params }, 'ClientAlertConfigurationRepository::getUsersDataForClientAlertConfig - missing required parameters');
|
|
6
|
+
return [];
|
|
7
|
+
}
|
|
8
|
+
return novaDataSource.safeQuery(async (dataSource) => {
|
|
9
|
+
const clientAlertRecipientsRepository = dataSource.getRepository(ClientAlertRecipient);
|
|
10
|
+
const clientAlertRecipients = await clientAlertRecipientsRepository
|
|
11
|
+
.createQueryBuilder('clientAlertRecipient')
|
|
12
|
+
.where('clientAlertRecipient.clientAlertConfigurationId = :clientAlertConfigurationId', {
|
|
13
|
+
clientAlertConfigurationId: params.clientAlertConfigurationId,
|
|
14
|
+
})
|
|
15
|
+
.getMany();
|
|
16
|
+
if (!clientAlertRecipients?.length) {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
const allUsersRecipient = clientAlertRecipients?.find(recipient => recipient.userId == null && recipient.roleId == null);
|
|
20
|
+
if (allUsersRecipient) {
|
|
21
|
+
const allUsersInAccount = await dataSource
|
|
22
|
+
.getRepository(User)
|
|
23
|
+
.createQueryBuilder('user')
|
|
24
|
+
.where(`user.clientId = :clientId and user.status = 'A'`, { clientId: params.clientId })
|
|
25
|
+
.getMany();
|
|
26
|
+
return allUsersInAccount.map(user => ({
|
|
27
|
+
userId: binaryBufferToUuidString(user.id),
|
|
28
|
+
email: user.email,
|
|
29
|
+
phone: user.telephone,
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
const userIdsSet = new Set();
|
|
33
|
+
clientAlertRecipients
|
|
34
|
+
.filter(recipient => recipient.userId != null)
|
|
35
|
+
.forEach(recipient => {
|
|
36
|
+
userIdsSet.add(recipient.userId);
|
|
37
|
+
});
|
|
38
|
+
const roleRecipients = clientAlertRecipients.filter(recipient => recipient.roleId != null);
|
|
39
|
+
if (roleRecipients.length > 0) {
|
|
40
|
+
const usersFromRoles = (await dataSource
|
|
41
|
+
.getRepository(UserSecurityRole)
|
|
42
|
+
.createQueryBuilder('securityRole')
|
|
43
|
+
.where('securityRole.clientId = :clientId', { clientId: params.clientId })
|
|
44
|
+
.andWhere('securityRole.securityRoleId IN (:...roleIds)', {
|
|
45
|
+
roleIds: roleRecipients.map(r => r.roleId),
|
|
46
|
+
})
|
|
47
|
+
.select('securityRole.userId as userId')
|
|
48
|
+
.getRawMany()).map(userRole => userRole.userId);
|
|
49
|
+
usersFromRoles.forEach(userId => {
|
|
50
|
+
userIdsSet.add(userId);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const result = [];
|
|
54
|
+
const userIds = Array.from(userIdsSet);
|
|
55
|
+
if (userIds?.length) {
|
|
56
|
+
const usersFromRecipients = await dataSource
|
|
57
|
+
.getRepository(User)
|
|
58
|
+
.createQueryBuilder('user')
|
|
59
|
+
.where(`user.clientId = :clientId and user.status = 'A' and user.id in (:...userIds)`, {
|
|
60
|
+
clientId: params.clientId,
|
|
61
|
+
userIds,
|
|
62
|
+
})
|
|
63
|
+
.getMany();
|
|
64
|
+
result.push(...usersFromRecipients.map(user => ({
|
|
65
|
+
userId: binaryBufferToUuidString(user.id),
|
|
66
|
+
email: user.email,
|
|
67
|
+
phone: user.telephone,
|
|
68
|
+
})));
|
|
69
|
+
}
|
|
70
|
+
return result;
|
|
71
|
+
}, 'ClientAlertConfigurationRepository::getUsersDataForClientAlertConfig');
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=getUsersDataForClientAlertConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUsersDataForClientAlertConfig.js","sourceRoot":"","sources":["../../../src/repositories/clientAlertConfiguration/getUsersDataForClientAlertConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAO7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAElE,MAAM,CAAC,MAAM,gCAAgC,GAAG,KAAK,EACnD,cAA8B,EAC9B,MAA8C,EAC9C,MAAc,EAC2B,EAAE;IAC3C,IAAI,CAAC,MAAM,EAAE,0BAA0B,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE;QAC5D,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,oGAAoG,CACrG,CAAA;QACD,OAAO,EAAE,CAAA;KACV;IAED,OAAO,cAAc,CAAC,SAAS,CAAC,KAAK,EAAE,UAA0B,EAE/D,EAAE;QACF,MAAM,+BAA+B,GAAG,UAAU,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAA;QAEtF,MAAM,qBAAqB,GAAG,MAAM,+BAA+B;aAChE,kBAAkB,CAAC,sBAAsB,CAAC;aAC1C,KAAK,CAAC,+EAA+E,EAAE;YACtF,0BAA0B,EAAE,MAAM,CAAC,0BAA0B;SAC9D,CAAC;aACD,OAAO,EAAE,CAAA;QAEZ,IAAI,CAAC,qBAAqB,EAAE,MAAM,EAAE;YAClC,OAAO,EAAE,CAAA;SACV;QAED,MAAM,iBAAiB,GAAG,qBAAqB,EAAE,IAAI,CACnD,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,IAAI,IAAI,IAAI,SAAS,CAAC,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C,CAAC,MAAM,CAAC;aAC3C,CAAC;iBACD,MAAM,CAAC,+BAA+B,CAAC;iBACvC,UAAU,EAAE,CAChB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;YAElC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBAC9B,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;YACxB,CAAC,CAAC,CAAA;SACH;QAED,MAAM,MAAM,GAAmC,EAAE,CAAA;QACjD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QAEtC,IAAI,OAAO,EAAE,MAAM,EAAE;YACnB,MAAM,mBAAmB,GAAG,MAAM,UAAU;iBACzC,aAAa,CAAC,IAAI,CAAC;iBACnB,kBAAkB,CAAC,MAAM,CAAC;iBAC1B,KAAK,CAAC,8EAA8E,EAAE;gBACrF,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,OAAO;aACR,CAAC;iBACD,OAAO,EAAE,CAAA;YAEZ,MAAM,CAAC,IAAI,CACT,GAAG,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBAClC,MAAM,EAAE,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC;gBACzC,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,KAAK,EAAE,IAAI,CAAC,SAAS;aACtB,CAAC,CAAC,CACJ,CAAA;SACF;QAED,OAAO,MAAM,CAAA;IACf,CAAC,EAAE,sEAAsE,CAAC,CAAA;AAC5E,CAAC,CAAA"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { BaseRepository } from '../baseRepository';
|
|
3
|
+
import { createClientAlertConfiguration } from './createClientAlertConfiguration';
|
|
4
|
+
import { deleteClientAlertConfigurations } from './deleteClientAlertConfiguration';
|
|
5
|
+
import { getClientAlertConfigurations } from './getClientAlertConfigurations';
|
|
6
|
+
import { getClientAlertRecipients } from './getClientAlertRecipients';
|
|
7
|
+
import { getUsersDataForClientAlertConfig } from './getUsersDataForClientAlertConfig';
|
|
8
|
+
import { isUserAllowedForAlertConfig } from './isUserAllowedForAlertConfig';
|
|
9
|
+
import { setClientAlertRecipients } from './setClientAlertRecipients';
|
|
10
|
+
import { updateClientAlertConfiguration } from './updateClientAlertConfiguration';
|
|
11
|
+
export class ClientAlertConfigurationRepository extends BaseRepository {
|
|
12
|
+
/* Gets client alert configurations matching the filters
|
|
13
|
+
* @param params: Parameters to create a new client alert configuration
|
|
14
|
+
* - filters.clientId: The client ID, required
|
|
15
|
+
* - filters.alertTypeId: The alert type ID
|
|
16
|
+
* - filters.statusList: The status list
|
|
17
|
+
* - filters.configurationIdList: The configuration ID list
|
|
18
|
+
* - projectionOptions.withInternalRecipients: Whether to include internal recipients
|
|
19
|
+
* - projectionOptions.withExternalRecipients: Whether to include external recipients
|
|
20
|
+
* @returns The client alert configurations matching the filters
|
|
21
|
+
*/
|
|
22
|
+
async getClientAlertConfigurations(params) {
|
|
23
|
+
this.logger.trace(params, 'ClientAlertConfigurationRepository::getClientAlertConfigurations started with params');
|
|
24
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
25
|
+
const result = await getClientAlertConfigurations(novaDataSource, params, this.logger);
|
|
26
|
+
this.logger.trace(result, 'ClientAlertConfigurationRepository::getClientAlertConfigurations result');
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
/* Creates a new client alert configuration
|
|
30
|
+
* @param params: Parameters to create a new client alert configuration
|
|
31
|
+
* - clientId: The client ID, required
|
|
32
|
+
* - alertTypeId: The alert type ID, required
|
|
33
|
+
* - name: The name, required
|
|
34
|
+
* - description: The description, required
|
|
35
|
+
* - status: The status, default 'active'
|
|
36
|
+
* - alertValue: The alert value
|
|
37
|
+
* - alertMetadata: The alert metadata
|
|
38
|
+
* - filter: The filter
|
|
39
|
+
* - readOnly: Whether the configuration is read-only
|
|
40
|
+
* @returns The created client alert configuration
|
|
41
|
+
*/
|
|
42
|
+
async createClientAlertConfiguration(params) {
|
|
43
|
+
this.logger.trace(params, 'ClientAlertConfigurationRepository::createClientAlertConfiguration started with params');
|
|
44
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
45
|
+
const result = await createClientAlertConfiguration(novaDataSource, params, this.logger);
|
|
46
|
+
this.logger.trace(result, 'ClientAlertConfigurationRepository::createClientAlertConfiguration result');
|
|
47
|
+
return result;
|
|
48
|
+
}
|
|
49
|
+
/* Updates a client alert configuration
|
|
50
|
+
* @param params: Parameters to update a client alert configuration
|
|
51
|
+
* - filters.clientId: The client ID, required
|
|
52
|
+
* - filters.clientAlertConfigurationId: The client alert configuration ID, required
|
|
53
|
+
* - values.name: The name
|
|
54
|
+
* - values.description: The description
|
|
55
|
+
* - values.status: The status
|
|
56
|
+
* - values.alertValue: The alert value
|
|
57
|
+
* - values.alertMetadata: The alert metadata
|
|
58
|
+
* - values.filter: The filter
|
|
59
|
+
* - values.readOnly: Whether the configuration is read-only
|
|
60
|
+
* @returns Whether the client alert configuration was updated
|
|
61
|
+
*/
|
|
62
|
+
async updateClientAlertConfiguration(params) {
|
|
63
|
+
this.logger.trace(params, 'ClientAlertConfigurationRepository::updateClientAlertConfiguration started with params');
|
|
64
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
65
|
+
const result = await updateClientAlertConfiguration(novaDataSource, params, this.logger);
|
|
66
|
+
this.logger.trace({ result }, 'ClientAlertConfigurationRepository::updateClientAlertConfiguration result');
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
/* Deletes client alert configurations
|
|
70
|
+
* @param params: Parameters to delete client alert configurations
|
|
71
|
+
* - filters.clientId: The client ID, required
|
|
72
|
+
* - filters.clientAlertConfigurationIds: The client alert configuration IDs, required
|
|
73
|
+
* @returns Whether the client alert configurations were deleted
|
|
74
|
+
*/
|
|
75
|
+
async deleteClientAlertConfigurations(params) {
|
|
76
|
+
this.logger.trace(params, 'ClientAlertConfigurationRepository::deleteClientAlertConfigurations started with params');
|
|
77
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
78
|
+
const result = await deleteClientAlertConfigurations(novaDataSource, params, this.logger);
|
|
79
|
+
this.logger.trace({ result }, 'ClientAlertConfigurationRepository::deleteClientAlertConfigurations result');
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
/* Gets client alert recipients
|
|
83
|
+
* @param params: Parameters to get client alert recipients
|
|
84
|
+
* - filters.clientId: The client ID, required
|
|
85
|
+
* - filters.clientAlertConfigurationId: The client alert configuration ID, required
|
|
86
|
+
* @returns The client alert recipients
|
|
87
|
+
*/
|
|
88
|
+
async getClientAlertRecipients(params) {
|
|
89
|
+
this.logger.trace(params, 'ClientAlertConfigurationRepository::getClientAlertRecipients started with params');
|
|
90
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
91
|
+
const result = await getClientAlertRecipients(novaDataSource, params, this.logger);
|
|
92
|
+
this.logger.trace(result, 'ClientAlertConfigurationRepository::getClientAlertRecipients result');
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
/* Sets client alert recipients
|
|
96
|
+
* @param params: Parameters to set client alert recipients
|
|
97
|
+
* - filters.clientId: The client ID, required
|
|
98
|
+
* - filters.clientAlertConfigurationId: The client alert configuration ID, required
|
|
99
|
+
* - values.globalAccountConfig: Configuration to apply to all users in the account
|
|
100
|
+
* - values.userIdRecipients: User ID recipients
|
|
101
|
+
* - values.roleIdRecipients: Role ID recipients
|
|
102
|
+
* - values.externalRecipients: External recipients
|
|
103
|
+
* @returns Whether the client alert recipients were set
|
|
104
|
+
*/
|
|
105
|
+
async setClientAlertRecipients(params) {
|
|
106
|
+
this.logger.trace(params, 'ClientAlertConfigurationRepository::setClientAlertRecipients started with params');
|
|
107
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
108
|
+
const result = await setClientAlertRecipients(novaDataSource, params, this.logger);
|
|
109
|
+
this.logger.trace({ result }, 'ClientAlertConfigurationRepository::setClientAlertRecipients result');
|
|
110
|
+
return result;
|
|
111
|
+
}
|
|
112
|
+
/* Checks if a user is allowed for a client alert configuration
|
|
113
|
+
* @param params: Parameters to check if a user is allowed for a client alert configuration
|
|
114
|
+
* - clientAlertConfigurationId: The client alert configuration ID, required
|
|
115
|
+
* - userId: The user ID, required
|
|
116
|
+
* @returns Whether the user is allowed for the client alert configuration
|
|
117
|
+
*/
|
|
118
|
+
async isUserAllowedForAlertConfig(params) {
|
|
119
|
+
this.logger.trace(params, 'ClientAlertConfigurationRepository::isUserAllowedForAlertConfig started with params');
|
|
120
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
121
|
+
const result = await isUserAllowedForAlertConfig(novaDataSource, params, this.logger);
|
|
122
|
+
this.logger.trace({ result }, 'ClientAlertConfigurationRepository::isUserAllowedForAlertConfig result');
|
|
123
|
+
return result;
|
|
124
|
+
}
|
|
125
|
+
/* Gets users data for all users associated to a client alert configuration
|
|
126
|
+
* @param params: Parameters to get users data
|
|
127
|
+
* - clientAlertConfigurationId: The client alert configuration ID, required
|
|
128
|
+
* - clientId: The client ID, required
|
|
129
|
+
* @returns The users data for all users associated to a client alert configuration
|
|
130
|
+
*/
|
|
131
|
+
async getUsersDataForClientAlertConfig(params) {
|
|
132
|
+
this.logger.trace(params, 'ClientAlertConfigurationRepository::getUsersDataForClientAlertConfig started with params');
|
|
133
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
134
|
+
const result = await getUsersDataForClientAlertConfig(novaDataSource, params, this.logger);
|
|
135
|
+
this.logger.trace({ result }, 'ClientAlertConfigurationRepository::getUsersDataForClientAlertConfig result');
|
|
136
|
+
return result;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/repositories/clientAlertConfiguration/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAYrD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAA;AAClF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAA;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAA;AACrF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAA;AAEjF,MAAM,OAAO,kCAAmC,SAAQ,cAAc;IACpE;;;;;;;;;OASG;IACH,KAAK,CAAC,4BAA4B,CAChC,MAA0C;QAE1C,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,MAAM,EACN,sFAAsF,CACvF,CAAA;QAED,MAAM,cAAc,GAAG,IAAI,cAAc,CACvC,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,2BAA2B,CACjC,CAAA;QAED,MAAM,MAAM,GAAG,MAAM,4BAA4B,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QAEtF,IAAI,CAAC,MAAM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C,MAAyC;QACzE,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,MAAM,EACN,qFAAqF,CACtF,CAAA;QAED,MAAM,cAAc,GAAG,IAAI,cAAc,CACvC,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,2BAA2B,CACjC,CAAA;QAED,MAAM,MAAM,GAAG,MAAM,2BAA2B,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QAErF,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,EAAE,MAAM,EAAE,EACV,wEAAwE,CACzE,CAAA;QAED,OAAO,MAAM,CAAA;IACf,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,gCAAgC,CAAC,MAA8C;QACnF,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,MAAM,EACN,0FAA0F,CAC3F,CAAA;QAED,MAAM,cAAc,GAAG,IAAI,cAAc,CACvC,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,2BAA2B,CACjC,CAAA;QAED,MAAM,MAAM,GAAG,MAAM,gCAAgC,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QAE1F,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,EAAE,MAAM,EAAE,EACV,6EAA6E,CAC9E,CAAA;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CACF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ClientAlertRecipient, UserSecurityRole } from '../../entities';
|
|
2
|
+
import { uuidStringToBinaryBuffer } from '../../utils/uuidHelpers';
|
|
3
|
+
export const isUserAllowedForAlertConfig = async (novaDataSource, params, logger) => {
|
|
4
|
+
if (!params?.clientAlertConfigurationId || !params?.userId) {
|
|
5
|
+
logger.warn({ params }, 'ClientAlertConfigurationRepository::isUserAllowedForAlertConfig - missing required parameters');
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
const userIdBinaryBuffer = uuidStringToBinaryBuffer(params?.userId);
|
|
9
|
+
if (!userIdBinaryBuffer) {
|
|
10
|
+
logger.warn({ userId: params?.userId }, 'UserConfigurationsRepository::isUserAllowedForAlertConfig - user id should be a valid UUID');
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
return novaDataSource.safeQuery(async (dataSource) => {
|
|
14
|
+
const clientAlertRecipientsRepository = dataSource.getRepository(ClientAlertRecipient);
|
|
15
|
+
const clientAlertRecipients = await clientAlertRecipientsRepository
|
|
16
|
+
.createQueryBuilder('clientAlertRecipient')
|
|
17
|
+
.where('clientAlertRecipient.clientAlertConfigurationId = :clientAlertConfigurationId', {
|
|
18
|
+
clientAlertConfigurationId: params.clientAlertConfigurationId,
|
|
19
|
+
})
|
|
20
|
+
.getMany();
|
|
21
|
+
if (!clientAlertRecipients?.length) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
const allUsersRecipient = clientAlertRecipients?.find(recipient => recipient.userId == null && recipient.roleId == null);
|
|
25
|
+
if (allUsersRecipient) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
const userRecipients = clientAlertRecipients?.filter(recipient => recipient.userId != null);
|
|
29
|
+
const userRecipient = userRecipients?.find(recipient => recipient.userId.equals(userIdBinaryBuffer));
|
|
30
|
+
if (userRecipient) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
const roleRecipients = clientAlertRecipients
|
|
34
|
+
.filter(recipient => recipient.roleId != null)
|
|
35
|
+
.map(recipient => recipient.roleId);
|
|
36
|
+
if (roleRecipients.length > 0) {
|
|
37
|
+
const userSecurityRolesRepository = dataSource.getRepository(UserSecurityRole);
|
|
38
|
+
const userRoles = await userSecurityRolesRepository
|
|
39
|
+
.createQueryBuilder('securityRole')
|
|
40
|
+
.where('securityRole.userId = :userId', { userId: userIdBinaryBuffer })
|
|
41
|
+
.getMany();
|
|
42
|
+
for (const userRole of userRoles) {
|
|
43
|
+
if (roleRecipients.includes(userRole.securityRoleId)) {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}, 'ClientAlertConfigurationRepository::isUserAllowedForAlertConfig');
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=isUserAllowedForAlertConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isUserAllowedForAlertConfig.js","sourceRoot":"","sources":["../../../src/repositories/clientAlertConfiguration/isUserAllowedForAlertConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAIvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAElE,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,EAC9C,cAA8B,EAC9B,MAAyC,EACzC,MAAc,EACI,EAAE;IACpB,IAAI,CAAC,MAAM,EAAE,0BAA0B,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE;QAC1D,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,+FAA+F,CAChG,CAAA;QACD,OAAO,KAAK,CAAA;KACb;IAED,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAEnE,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAC1B,4FAA4F,CAC7F,CAAA;QACD,OAAO,KAAK,CAAA;KACb;IAED,OAAO,cAAc,CAAC,SAAS,CAAC,KAAK,EAAE,UAA0B,EAAoB,EAAE;QACrF,MAAM,+BAA+B,GAAG,UAAU,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAA;QAEtF,MAAM,qBAAqB,GAAG,MAAM,+BAA+B;aAChE,kBAAkB,CAAC,sBAAsB,CAAC;aAC1C,KAAK,CAAC,+EA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C,QAAQ,CAAC,cAAc,CAAC,EAAE;oBACpD,OAAO,IAAI,CAAA;iBACZ;aACF;SACF;QAED,OAAO,KAAK,CAAA;IACd,CAAC,EAAE,iEAAiE,CAAC,CAAA;AACvE,CAAC,CAAA"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { ClientAlertConfiguration, ClientAlertRecipient, NotificationRecipient, User, UserAlertNotificationsConfig, UserSecurityRole, } from '../../entities';
|
|
2
|
+
import { binaryBufferToUuidString, uuidStringToBinaryBuffer } from '../../utils/uuidHelpers';
|
|
3
|
+
export const setClientAlertRecipients = async (novaDataSource, params, logger) => {
|
|
4
|
+
if (!params?.filters?.clientId || !params?.filters?.clientAlertConfigurationId) {
|
|
5
|
+
logger.error('ClientAlertConfigurationRepository::setClientAlertRecipients - missing required parameters');
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
return novaDataSource.safeQuery(async (dataSource) => {
|
|
9
|
+
const clientAlertConfigurationsRepository = dataSource.getRepository(ClientAlertConfiguration);
|
|
10
|
+
const existentClientAlertConfiguration = await clientAlertConfigurationsRepository.findOne({
|
|
11
|
+
where: { id: params.filters.clientAlertConfigurationId, clientId: params.filters.clientId },
|
|
12
|
+
});
|
|
13
|
+
if (!existentClientAlertConfiguration) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
const setInternalRecipientsResult = await setInternalRecipients(dataSource, params.filters.clientAlertConfigurationId, params.filters.clientId, params.values.globalAccountConfig, params.values.userIdRecipients, params.values.roleIdRecipients);
|
|
17
|
+
if (!setInternalRecipientsResult) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
const setNotificationRecipientsResult = await setExternalRecipients(dataSource, params.filters.clientAlertConfigurationId, params.filters.clientId, params.values.externalRecipients);
|
|
21
|
+
return setNotificationRecipientsResult;
|
|
22
|
+
}, 'ClientAlertConfigurationRepository::setClientAlertRecipients');
|
|
23
|
+
};
|
|
24
|
+
const setInternalRecipients = async (dataSource, clientAlertConfigurationId, clientId, globalAccountConfig, userIdRecipients, roleIdRecipients) => {
|
|
25
|
+
const newClientAlertRecipients = globalAccountConfig
|
|
26
|
+
? [
|
|
27
|
+
{
|
|
28
|
+
id: null,
|
|
29
|
+
clientAlertConfigurationId,
|
|
30
|
+
userId: null,
|
|
31
|
+
roleId: null,
|
|
32
|
+
isEnabled: globalAccountConfig.isEnabled ?? true,
|
|
33
|
+
appNotification: globalAccountConfig.appNotification ?? false,
|
|
34
|
+
emailNotification: globalAccountConfig.emailNotification ?? false,
|
|
35
|
+
pushNotification: globalAccountConfig.pushNotification ?? false,
|
|
36
|
+
smsNotification: globalAccountConfig.smsNotification ?? false,
|
|
37
|
+
},
|
|
38
|
+
]
|
|
39
|
+
: [];
|
|
40
|
+
const roleRecipients = roleIdRecipients?.map(roleRecipient => ({
|
|
41
|
+
id: null,
|
|
42
|
+
clientAlertConfigurationId,
|
|
43
|
+
userId: null,
|
|
44
|
+
roleId: roleRecipient.roleId,
|
|
45
|
+
isEnabled: roleRecipient.isEnabled,
|
|
46
|
+
appNotification: roleRecipient.appNotification ?? false,
|
|
47
|
+
emailNotification: roleRecipient.emailNotification ?? false,
|
|
48
|
+
pushNotification: roleRecipient.pushNotification ?? false,
|
|
49
|
+
smsNotification: roleRecipient.smsNotification ?? false,
|
|
50
|
+
includeAllUsers: false,
|
|
51
|
+
})) ?? [];
|
|
52
|
+
newClientAlertRecipients.push(...roleRecipients);
|
|
53
|
+
const userRecipients = userIdRecipients?.map(userRecipient => ({
|
|
54
|
+
id: null,
|
|
55
|
+
clientAlertConfigurationId,
|
|
56
|
+
userId: uuidStringToBinaryBuffer(userRecipient.userId),
|
|
57
|
+
roleId: null,
|
|
58
|
+
isEnabled: userRecipient.isEnabled,
|
|
59
|
+
appNotification: userRecipient.appNotification ?? false,
|
|
60
|
+
emailNotification: userRecipient.emailNotification ?? false,
|
|
61
|
+
pushNotification: userRecipient.pushNotification ?? false,
|
|
62
|
+
smsNotification: userRecipient.smsNotification ?? false,
|
|
63
|
+
includeAllUsers: false,
|
|
64
|
+
})) ?? [];
|
|
65
|
+
newClientAlertRecipients.push(...userRecipients);
|
|
66
|
+
await removeNotificationsConfigFromMissingRecipients(dataSource, clientAlertConfigurationId, clientId, newClientAlertRecipients);
|
|
67
|
+
const clientAlertRecipientsRepository = dataSource.getRepository(ClientAlertRecipient);
|
|
68
|
+
// remove all existing recipients to insert again
|
|
69
|
+
await clientAlertRecipientsRepository
|
|
70
|
+
.createQueryBuilder()
|
|
71
|
+
.delete()
|
|
72
|
+
.where('clientAlertConfigurationId = :clientAlertConfigurationId', {
|
|
73
|
+
clientAlertConfigurationId: clientAlertConfigurationId,
|
|
74
|
+
})
|
|
75
|
+
.execute();
|
|
76
|
+
if (!newClientAlertRecipients.length) {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
const maxItemsPerQuery = 50;
|
|
80
|
+
const partitionedItems = [];
|
|
81
|
+
// We split the in groups of 50 to avoid having a query with too many items to insert
|
|
82
|
+
for (let i = 0; i < newClientAlertRecipients.length; i += maxItemsPerQuery) {
|
|
83
|
+
partitionedItems.push(newClientAlertRecipients.slice(i, i + maxItemsPerQuery));
|
|
84
|
+
}
|
|
85
|
+
for (const recipients of partitionedItems) {
|
|
86
|
+
const result = await clientAlertRecipientsRepository.insert(recipients);
|
|
87
|
+
if (!result?.raw?.affectedRows) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return true;
|
|
92
|
+
};
|
|
93
|
+
const setExternalRecipients = async (dataSource, clientAlertConfigurationId, clientId, externalRecipients) => {
|
|
94
|
+
const notificationRecipientsRepository = dataSource.getRepository(NotificationRecipient);
|
|
95
|
+
await notificationRecipientsRepository
|
|
96
|
+
.createQueryBuilder()
|
|
97
|
+
.delete()
|
|
98
|
+
.where('clientAlertConfigurationId = :clientAlertConfigurationId', {
|
|
99
|
+
clientAlertConfigurationId: clientAlertConfigurationId,
|
|
100
|
+
})
|
|
101
|
+
.execute();
|
|
102
|
+
if (!externalRecipients?.length) {
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
const now = new Date();
|
|
106
|
+
const notificationRecipients = externalRecipients?.map(recipient => ({
|
|
107
|
+
clientAlertConfigurationId,
|
|
108
|
+
clientId,
|
|
109
|
+
isEnabled: true,
|
|
110
|
+
isUserProfile: false,
|
|
111
|
+
notificationType: recipient.type === 'email' ? 1 : 2,
|
|
112
|
+
recipient: recipient.recipient,
|
|
113
|
+
createdAt: now,
|
|
114
|
+
}));
|
|
115
|
+
const maxItemsPerQuery = 50;
|
|
116
|
+
const partitionedItems = [];
|
|
117
|
+
// We split the users in groups of 50 to avoid having a query with too many items to insert
|
|
118
|
+
for (let i = 0; i < notificationRecipients.length; i += maxItemsPerQuery) {
|
|
119
|
+
partitionedItems.push(notificationRecipients.slice(i, i + maxItemsPerQuery));
|
|
120
|
+
}
|
|
121
|
+
for (const partitionedRecipients of partitionedItems) {
|
|
122
|
+
const result = await notificationRecipientsRepository.insert(partitionedRecipients);
|
|
123
|
+
if (!result?.raw?.affectedRows) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return true;
|
|
128
|
+
};
|
|
129
|
+
const getAllUsersFromInternalUserRecipients = async (dataSource, clientAlertRecipients, clientId) => {
|
|
130
|
+
const allUsersRecipient = clientAlertRecipients.find(recipient => recipient.userId == null && recipient.roleId == null);
|
|
131
|
+
const usersRepository = dataSource.getRepository(User);
|
|
132
|
+
if (allUsersRecipient) {
|
|
133
|
+
const users = await usersRepository
|
|
134
|
+
.createQueryBuilder('user')
|
|
135
|
+
.where('clientId = :clientId', { clientId })
|
|
136
|
+
.getMany();
|
|
137
|
+
return users.map(user => binaryBufferToUuidString(user.id));
|
|
138
|
+
}
|
|
139
|
+
const resultSet = new Set();
|
|
140
|
+
const userRecipients = clientAlertRecipients.filter(recipient => recipient.userId != null);
|
|
141
|
+
userRecipients.forEach(recipient => {
|
|
142
|
+
resultSet.add(binaryBufferToUuidString(recipient.userId));
|
|
143
|
+
});
|
|
144
|
+
const roleRecipients = clientAlertRecipients
|
|
145
|
+
.filter(recipient => recipient.roleId != null)
|
|
146
|
+
.map(recipient => recipient.roleId);
|
|
147
|
+
if (roleRecipients.length > 0) {
|
|
148
|
+
const usersWithRoles = await usersRepository
|
|
149
|
+
.createQueryBuilder('user')
|
|
150
|
+
.innerJoin(UserSecurityRole, 'userSecurityRole', 'userSecurityRole.userId = user.id')
|
|
151
|
+
.where('user.clientId = :clientId', { clientId })
|
|
152
|
+
.andWhere('userSecurityRole.securityRoleId IN (:...roleIds)', { roleIds: roleRecipients })
|
|
153
|
+
.getMany();
|
|
154
|
+
usersWithRoles.forEach(user => resultSet.add(binaryBufferToUuidString(user.id)));
|
|
155
|
+
}
|
|
156
|
+
const result = Array.from(resultSet);
|
|
157
|
+
return result;
|
|
158
|
+
};
|
|
159
|
+
const removeNotificationsConfigFromMissingRecipients = async (dataSource, clientAlertConfigurationId, clientId, newClientAlertRecipients) => {
|
|
160
|
+
const usersFromNewRecipients = await getAllUsersFromInternalUserRecipients(dataSource, newClientAlertRecipients, clientId);
|
|
161
|
+
const userAlertNotificationsConfigRepository = dataSource.getRepository(UserAlertNotificationsConfig);
|
|
162
|
+
const queryBuilder = userAlertNotificationsConfigRepository
|
|
163
|
+
.createQueryBuilder()
|
|
164
|
+
.delete()
|
|
165
|
+
.where('clientAlertConfigurationId = :clientAlertConfigurationId', {
|
|
166
|
+
clientAlertConfigurationId: clientAlertConfigurationId,
|
|
167
|
+
});
|
|
168
|
+
if (usersFromNewRecipients.length) {
|
|
169
|
+
queryBuilder.andWhere('userId NOT IN (:...userIds)', {
|
|
170
|
+
userIds: usersFromNewRecipients.map(userId => uuidStringToBinaryBuffer(userId)),
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
await queryBuilder.execute();
|
|
174
|
+
};
|
|
175
|
+
//# sourceMappingURL=setClientAlertRecipients.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setClientAlertRecipients.js","sourceRoot":"","sources":["../../../src/repositories/clientAlertConfiguration/setClientAlertRecipients.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,IAAI,EACJ,4BAA4B,EAC5B,gBAAgB,GACjB,MAAM,gBAAgB,CAAA;AAUvB,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAE5F,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EAC3C,cAA8B,EAC9B,MAAsC,EACtC,MAAc,EACI,EAAE;IACpB,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,0BAA0B,EAAE;QAC9E,MAAM,CAAC,KAAK,CACV,4FAA4F,CAC7F,CAAA;QACD,OAAO,KAAK,CAAA;KACb;IAED,OAAO,cAAc,CAAC,SAAS,CAAC,KAAK,EAAE,UAA0B,EAAoB,EAAE;QACrF,MAAM,mCAAmC,GAAG,UAAU,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAA;QAE9F,MAAM,gCAAgC,GAAG,MAAM,mCAAmC,CAAC,OAAO,CAAC;YACzF,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,0BAA0B,EAAE,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE;SAC5F,CAAC,CAAA;QAEF,IAAI,CAAC,gCAAgC,EAAE;YACrC,OAAO,KAAK,CAAA;SACb;QAED,MAAM,2BAA2B,GAAG,MAAM,qBAAqB,CAC7D,UAAU,EACV,MAAM,CAAC,OAAO,CAAC,0BAA0B,EACzC,MAAM,CAAC,OAAO,CAAC,QAAQ,EACvB,MAAM,CAAC,MAAM,CAAC,mBAAmB,EACjC,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAC9B,MAAM,CAAC,MAAM,CAAC,gB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AAsB,GAAG,MAAM,qCAAqC,CACxE,UAAU,EACV,wBAAwB,EACxB,QAAQ,CACT,CAAA;IAED,MAAM,sCAAsC,GAAG,UAAU,CAAC,aAAa,CACrE,4BAA4B,CAC7B,CAAA;IAED,MAAM,YAAY,GAAG,sCAAsC;SACxD,kBAAkB,EAAE;SACpB,MAAM,EAAE;SACR,KAAK,CAAC,0DAA0D,EAAE;QACjE,0BAA0B,EAAE,0BAA0B;KACvD,CAAC,CAAA;IAEJ,IAAI,sBAAsB,CAAC,MAAM,EAAE;QACjC,YAAY,CAAC,QAAQ,CAAC,6BAA6B,EAAE;YACnD,OAAO,EAAE,sBAAsB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC;SAChF,CAAC,CAAA;KACH;IAED,MAAM,YAAY,CAAC,OAAO,EAAE,CAAA;AAC9B,CAAC,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ClientAlertConfiguration } from '../../entities';
|
|
2
|
+
export const updateClientAlertConfiguration = async (novaDataSource, params, logger) => {
|
|
3
|
+
// userId filter is required
|
|
4
|
+
if (!params?.filters?.clientId && !params?.filters?.clientAlertConfigurationId) {
|
|
5
|
+
logger.warn({ params }, 'ClientAlertConfigurationRepository::updateClientAlertConfiguration - missing required parameters');
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
// at least one field to update is required
|
|
9
|
+
if (!params?.values?.status &&
|
|
10
|
+
!params?.values?.alertValue &&
|
|
11
|
+
!params?.values?.alertMetadata &&
|
|
12
|
+
!params?.values?.filter &&
|
|
13
|
+
!params?.values?.name &&
|
|
14
|
+
!params?.values?.description &&
|
|
15
|
+
params?.values?.readOnly == null) {
|
|
16
|
+
logger.warn({ params }, 'ClientAlertConfigurationRepository::updateClientAlertConfiguration - missing required parameters');
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return novaDataSource.safeQuery(async (dataSource) => {
|
|
20
|
+
const clientAlertConfigurationsRepository = dataSource.getRepository(ClientAlertConfiguration);
|
|
21
|
+
const queryBuilder = clientAlertConfigurationsRepository
|
|
22
|
+
.createQueryBuilder()
|
|
23
|
+
.update(ClientAlertConfiguration)
|
|
24
|
+
.set({
|
|
25
|
+
alertValue: params?.values?.alertValue,
|
|
26
|
+
alertMetadata: params?.values?.alertMetadata,
|
|
27
|
+
readOnly: params?.values?.readOnly,
|
|
28
|
+
filter: params?.values?.filter,
|
|
29
|
+
name: params?.values?.name,
|
|
30
|
+
description: params?.values?.description,
|
|
31
|
+
status: params?.values?.status,
|
|
32
|
+
})
|
|
33
|
+
.where('clientId = :clientId', {
|
|
34
|
+
clientId: params.filters.clientId,
|
|
35
|
+
})
|
|
36
|
+
.andWhere('id = :clientAlertConfigurationId', {
|
|
37
|
+
clientAlertConfigurationId: params.filters.clientAlertConfigurationId,
|
|
38
|
+
});
|
|
39
|
+
const result = await queryBuilder.execute();
|
|
40
|
+
return result.affected > 0;
|
|
41
|
+
}, 'ClientAlertConfigurationRepository::updateClientAlertConfiguration');
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=updateClientAlertConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateClientAlertConfiguration.js","sourceRoot":"","sources":["../../../src/repositories/clientAlertConfiguration/updateClientAlertConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAKzD,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,EACjD,cAA8B,EAC9B,MAA4C,EAC5C,MAAc,EACI,EAAE;IACpB,4BAA4B;IAC5B,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,0BAA0B,EAAE;QAC9E,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,kGAAkG,CACnG,CAAA;QACD,OAAO,KAAK,CAAA;KACb;IAED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AC,MAAM,CAAC,IAAI,CAAC;YAC3C,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;YACzC,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;YAC7C,cAAc,EAAE,MAAM,CAAC,cAAc;SACtC,CAAA;QAED,OAAO,MAAM,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IAChD,CAAC,EAAE,iCAAiC,CAAC,CAAA;AACvC,CAAC,CAAA"}
|
|
@@ -12,7 +12,10 @@ export const createClientConfiguration = async (novaDataSource, params, logger)
|
|
|
12
12
|
stopTripThreshold: params.stopTripThreshold,
|
|
13
13
|
mapUpdateMode: params.mapUpdateMode,
|
|
14
14
|
maxUsersAllowed: params.maxUsersAllowed,
|
|
15
|
+
ssoDomain: params.ssoDomain,
|
|
16
|
+
ssoMetadata: params.ssoMetadata,
|
|
15
17
|
};
|
|
16
18
|
return await clientConfigurationRepository.save(newClientConfiguration);
|
|
17
19
|
}, 'ClientsRepository::createClientConfiguration');
|
|
18
20
|
};
|
|
21
|
+
//# sourceMappingURL=createClientConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createClientConfiguration.js","sourceRoot":"","sources":["../../../src/repositories/clients/createClientConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAKpD,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,EAC5C,cAA8B,EAC9B,MAAuC,EACvC,MAAc,EACgB,EAAE;IAChC,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE;QACrB,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,4EAA4E,CAC7E,CAAA;QACD,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,cAAc,CAAC,SAAS,CAAC,KAAK,EAAE,UAA0B,EAE/D,EAAE;QACF,MAAM,6BAA6B,GAAG,UAAU,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAA;QAEnF,MAAM,sBAAsB,GAAG;YAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,qBAAqB,EAAE,MAAM,CAAC,qBAAqB;YACnD,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;YAC3C,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,eAAe,EAAE,MAAM,CAAC,eAAe;YACvC,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,WAAW,EAAE,MAAM,CAAC,WAAW;SAChC,CAAA;QAED,OAAO,MAAM,6BAA6B,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAA;IACzE,CAAC,EAAE,8CAA8C,CAAC,CAAA;AACpD,CAAC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ClientIngestorConfiguration } from '../../entities';
|
|
2
|
+
import { requireCreateClientIngestorConfigurationParamsAttributes, } from '../../types/clients';
|
|
3
|
+
import { anyAttributeIsNull } from '../../utils/paramsValidators';
|
|
4
|
+
export const createClientIngestorConfiguration = async (novaDataSource, params, logger) => {
|
|
5
|
+
if (anyAttributeIsNull(params, requireCreateClientIngestorConfigurationParamsAttributes)) {
|
|
6
|
+
logger.warn({ params }, 'ClientsRepository::createClientIngestorConfiguration - missing required parameters');
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
return novaDataSource.safeQuery(async (dataSource) => {
|
|
10
|
+
const clientIngestorConfigurationRepository = dataSource.getRepository(ClientIngestorConfiguration);
|
|
11
|
+
const newClientIngestorConfiguration = {
|
|
12
|
+
clientId: params.clientId,
|
|
13
|
+
userActivationId: params.userActivationId,
|
|
14
|
+
tokenUrl: params.tokenUrl,
|
|
15
|
+
fleetUrl: params.fleetUrl,
|
|
16
|
+
requestBody: params.requestBody,
|
|
17
|
+
};
|
|
18
|
+
return await clientIngestorConfigurationRepository.save(newClientIngestorConfiguration);
|
|
19
|
+
}, 'ClientsRepository::createClientIngestorConfiguration');
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=createClientIngestorConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createClientIngestorConfiguration.js","sourceRoot":"","sources":["../../../src/repositories/clients/createClientIngestorConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA;AAE5D,OAAO,EAEL,wDAAwD,GACzD,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAEjE,MAAM,CAAC,MAAM,iCAAiC,GAAG,KAAK,EACpD,cAA8B,EAC9B,MAA+C,EAC/C,MAAc,EACwB,EAAE;IACxC,IAAI,kBAAkB,CAAC,MAAM,EAAE,wDAAwD,CAAC,EAAE;QACxF,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,oFAAoF,CACrF,CAAA;QACD,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,cAAc,CAAC,SAAS,CAAC,KAAK,EAAE,UAA0B,EAE/D,EAAE;QACF,MAAM,qCAAqC,GAAG,UAAU,CAAC,aAAa,CACpE,2BAA2B,CAC5B,CAAA;QAED,MAAM,8BAA8B,GAAG;YACrC,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;YACzC,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,WAAW,EAAE,MAAM,CAAC,WAAW;SAChC,CAAA;QAED,OAAO,MAAM,qCAAqC,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAA;IACzF,CAAC,EAAE,sDAAsD,CAAC,CAAA;AAC5D,CAAC,CAAA"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { CustomerAttribute } from '../../entities/customerAttribute';
|
|
2
|
+
import { oneRequiredCreateCustomerAttributeParamsAttributes, requiredCreateCustomerAttributeParamsAttributes, } from '../../types/clients';
|
|
3
|
+
import { allAttributesAreNull, anyAttributeIsNull } from '../../utils/paramsValidators';
|
|
2
4
|
export const createCustomerAttribute = async (novaDataSource, params, logger) => {
|
|
3
|
-
if (
|
|
5
|
+
if (anyAttributeIsNull(params, requiredCreateCustomerAttributeParamsAttributes) ||
|
|
6
|
+
allAttributesAreNull(params, oneRequiredCreateCustomerAttributeParamsAttributes)) {
|
|
4
7
|
logger.warn({ params }, 'ClientsRepository::createCustomerAttribute - missing required parameters');
|
|
5
8
|
return null;
|
|
6
9
|
}
|
|
@@ -10,7 +13,10 @@ export const createCustomerAttribute = async (novaDataSource, params, logger) =>
|
|
|
10
13
|
clientId: params.clientId,
|
|
11
14
|
enterprise: params.enterprise,
|
|
12
15
|
maintenanceModule: params.maintenanceModule,
|
|
16
|
+
billingMethod: params.billingMethod,
|
|
17
|
+
customerSegment: params.customerSegment,
|
|
13
18
|
};
|
|
14
19
|
return await clientConfigurationRepository.save(newCustomerAttribute);
|
|
15
20
|
}, 'ClientsRepository::createCustomerAttribute');
|
|
16
21
|
};
|
|
22
|
+
//# sourceMappingURL=createCustomerAttribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCustomerAttribute.js","sourceRoot":"","sources":["../../../src/repositories/clients/createCustomerAttribute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AAEpE,OAAO,EAEL,kDAAkD,EAClD,+CAA+C,GAChD,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAEvF,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,EAC1C,cAA8B,EAC9B,MAAqC,EACrC,MAAc,EACc,EAAE;IAC9B,IACE,kBAAkB,CAChB,MAAM,EACN,+CAA+C,CAChD;QACD,oBAAoB,CAClB,MAAM,EACN,kDAAkD,CACnD,EACD;QACA,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,0EAA0E,CAC3E,CAAA;QACD,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,cAAc,CAAC,SAAS,CAAC,KAAK,EAAE,UAA0B,EAE/D,EAAE;QACF,MAAM,6BAA6B,GAAG,UAAU,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAA;QAEjF,MAAM,oBAAoB,GAAG;YAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;YAC3C,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC,CAAA;QAED,OAAO,MAAM,6BAA6B,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAA;IACvE,CAAC,EAAE,4CAA4C,CAAC,CAAA;AAClD,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteClientAndConfiguration.js","sourceRoot":"","sources":["../../../src/repositories/clients/deleteClientAndConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAK5D,MAAM,CAAC,MAAM,4BAA4B,GAAG,KAAK,EAC/C,cAA8B,EAC9B,MAA0B,EAC1B,MAAc,EACI,EAAE;IACpB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE;QAC5B,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,+EAA+E,CAChF,CAAA;QACD,OAAO,KAAK,CAAA;KACb;IAED,MAAM,cAAc,CAAC,OAAO,EAAE,CAAA;IAE9B,MAAM,WAAW,GAAG,cAAc,CAAC,iBAAiB,EAAE,CAAA;IAEtD,IAAI;QACF,MAAM,WAAW,CAAC,gBAAgB,EAAE,CAAA;QAEpC,MAAM,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QAC9E,MAAM,YAAY,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QAEtF,MAAM,WAAW,CAAC,iBAAiB,EAAE,CAAA;QAErC,OAAO,YAAY,CAAC,QAAQ,GAAG,CAAC,CAAA;KACjC;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,WAAW,CAAC,mBAAmB,EAAE,CAAA;QAEvC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,wDAAwD,CAAC,CAAA;QACjF,MAAM,KAAK,CAAA;KACZ;YAAS;QACR,MAAM,WAAW,CAAC,OAAO,EAAE,CAAA;QAC3B,MAAM,cAAc,CAAC,UAAU,EAAE,CAAA;KAClC;AACH,CAAC,CAAA"}
|