@spytecgps/nova-orm 1.2.29-rc6 → 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.d.ts +2 -2
- 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/commaSeparatedTransformer.d.ts +9 -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,28 @@
|
|
|
1
|
+
import { DeviceTypePromotion } from '../../entities/deviceTypePromotion';
|
|
2
|
+
import { oneRequiredGetDeviceTypePromotionParams, } from '../../types/promotion';
|
|
3
|
+
import { allAttributesAreNull } from '../../utils/paramsValidators';
|
|
4
|
+
export const getDeviceTypePromotion = async (novaDataSource, params, logger) => {
|
|
5
|
+
if (allAttributesAreNull(params, oneRequiredGetDeviceTypePromotionParams)) {
|
|
6
|
+
logger.warn({ params }, 'PromotionRepository::getDeviceTypePromotion missing required parameters');
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
// Force the query to run on master or slave
|
|
10
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
11
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
12
|
+
const deviceTypePromotionRepository = dataSource.getRepository(DeviceTypePromotion);
|
|
13
|
+
const promotionQueryBuilder = deviceTypePromotionRepository.createQueryBuilder('deviceTypePromotion');
|
|
14
|
+
if (queryRunner) {
|
|
15
|
+
promotionQueryBuilder.setQueryRunner(queryRunner);
|
|
16
|
+
}
|
|
17
|
+
const result = await promotionQueryBuilder
|
|
18
|
+
.where('deviceTypePromotion.promotionId = :promotionId', {
|
|
19
|
+
promotionId: params.filters.promotionId,
|
|
20
|
+
})
|
|
21
|
+
.andWhere('deviceTypePromotion.deviceTypeId = :deviceTypeId', {
|
|
22
|
+
deviceTypeId: params.filters.deviceTypeId,
|
|
23
|
+
})
|
|
24
|
+
.getOne();
|
|
25
|
+
return result ?? null;
|
|
26
|
+
}, 'PromotionRepository::getDeviceTypePromotion', dbQueryRunner);
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=getDeviceTypePromotion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDeviceTypePromotion.js","sourceRoot":"","sources":["../../../src/repositories/promotions/getDeviceTypePromotion.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AAGxE,OAAO,EAEL,uCAAuC,GACxC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAEnE,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EACzC,cAA8B,EAC9B,MAAoC,EACpC,MAAc,EACgB,EAAE;IAChC,IAAI,oBAAoB,CAAC,MAAM,EAAE,uCAAuC,CAAC,EAAE;QACzE,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,yEAAyE,CAC1E,CAAA;QACD,OAAO,IAAI,CAAA;KACZ;IAED,4CAA4C;IAC5C,MAAM,aAAa,GAAG,cAAc,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;IAExE,OAAO,cAAc,CAAC,SAAS,CAC7B,KAAK,EAAE,UAA0B,EAAE,WAAyB,EAAgC,EAAE;QAC5F,MAAM,6BAA6B,GAAG,UAAU,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAA;QAEnF,MAAM,qBAAqB,GAAG,6BAA6B,CAAC,kBAAkB,CAC5E,qBAAqB,CACtB,CAAA;QAED,IAAI,WAAW,EAAE;YACf,qBAAqB,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;SAClD;QAED,MAAM,MAAM,GAAG,MAAM,qBAAqB;aACvC,KAAK,CAAC,gDAAgD,EAAE;YACvD,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW;SACxC,CAAC;aACD,QAAQ,CAAC,kDAAkD,EAAE;YAC5D,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,YAAY;SAC1C,CAAC;aACD,MAAM,EAAE,CAAA;QAEX,OAAO,MAAM,IAAI,IAAI,CAAA;IACvB,CAAC,EACD,6CAA6C,EAC7C,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MarketplacePromotion } from '../../entities/marketplacePromotion';
|
|
2
|
+
import { oneRequiredGetMarketplacePromotionParams, } from '../../types/promotion';
|
|
3
|
+
import { allAttributesAreNull } from '../../utils/paramsValidators';
|
|
4
|
+
export const getMarketplacePromotion = async (novaDataSource, params, logger) => {
|
|
5
|
+
if (allAttributesAreNull(params, oneRequiredGetMarketplacePromotionParams)) {
|
|
6
|
+
logger.warn({ params }, 'PromotionRepository::getMarketplacePromotion missing required parameters');
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
// Force the query to run on master or slave
|
|
10
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
11
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
12
|
+
const marketplacePromotionRepository = dataSource.getRepository(MarketplacePromotion);
|
|
13
|
+
const promotionQueryBuilder = marketplacePromotionRepository.createQueryBuilder('marketplacePromotion');
|
|
14
|
+
if (queryRunner) {
|
|
15
|
+
promotionQueryBuilder.setQueryRunner(queryRunner);
|
|
16
|
+
}
|
|
17
|
+
const result = await promotionQueryBuilder
|
|
18
|
+
.where('marketplacePromotion.promotionId = :promotionId', {
|
|
19
|
+
promotionId: params.filters.promotionId,
|
|
20
|
+
})
|
|
21
|
+
.andWhere('marketplacePromotion.marketplaceId = :marketplaceId', {
|
|
22
|
+
marketplaceId: params.filters.marketplaceId,
|
|
23
|
+
})
|
|
24
|
+
.getOne();
|
|
25
|
+
return result ?? null;
|
|
26
|
+
}, 'PromotionRepository::getMarketplacePromotion', dbQueryRunner);
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=getMarketplacePromotion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMarketplacePromotion.js","sourceRoot":"","sources":["../../../src/repositories/promotions/getMarketplacePromotion.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAG1E,OAAO,EAEL,wCAAwC,GACzC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAEnE,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,EAC1C,cAA8B,EAC9B,MAAqC,EACrC,MAAc,EACiB,EAAE;IACjC,IAAI,oBAAoB,CAAC,MAAM,EAAE,wCAAwC,CAAC,EAAE;QAC1E,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,0EAA0E,CAC3E,CAAA;QACD,OAAO,IAAI,CAAA;KACZ;IAED,4CAA4C;IAC5C,MAAM,aAAa,GAAG,cAAc,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;IAExE,OAAO,cAAc,CAAC,SAAS,CAC7B,KAAK,EACH,UAA0B,EAC1B,WAAyB,EACM,EAAE;QACjC,MAAM,8BAA8B,GAAG,UAAU,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAA;QAErF,MAAM,qBAAqB,GAAG,8BAA8B,CAAC,kBAAkB,CAC7E,sBAAsB,CACvB,CAAA;QAED,IAAI,WAAW,EAAE;YACf,qBAAqB,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;SAClD;QAED,MAAM,MAAM,GAAG,MAAM,qBAAqB;aACvC,KAAK,CAAC,iDAAiD,EAAE;YACxD,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW;SACxC,CAAC;aACD,QAAQ,CAAC,qDAAqD,EAAE;YAC/D,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,aAAa;SAC5C,CAAC;aACD,MAAM,EAAE,CAAA;QAEX,OAAO,MAAM,IAAI,IAAI,CAAA;IACvB,CAAC,EACD,8CAA8C,EAC9C,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { AsinPromotion, DevicePromotion, DeviceTypePromotion, MarketplacePromotion, Promotion, } from '../../entities';
|
|
2
|
+
import { oneRequiredGetPromotionsParams } from '../../types/promotion';
|
|
3
|
+
import { allAttributesAreNull } from '../../utils/paramsValidators';
|
|
4
|
+
export const getPromotions = async (novaDataSource, params, logger) => {
|
|
5
|
+
if (allAttributesAreNull(params, oneRequiredGetPromotionsParams)) {
|
|
6
|
+
logger.warn({ params }, 'PromotionRepository::getPromotions missing required parameters');
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
// Force the query to run on master or slave
|
|
10
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
11
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
12
|
+
const promotionRepository = dataSource.getRepository(Promotion);
|
|
13
|
+
const promotionQueryBuilder = promotionRepository.createQueryBuilder('promotion');
|
|
14
|
+
if (queryRunner) {
|
|
15
|
+
promotionQueryBuilder.setQueryRunner(queryRunner);
|
|
16
|
+
}
|
|
17
|
+
if (params.filters.id) {
|
|
18
|
+
promotionQueryBuilder.andWhere('promotion.id = :id', { id: params.filters.id });
|
|
19
|
+
}
|
|
20
|
+
if (params.filters.status) {
|
|
21
|
+
promotionQueryBuilder.andWhere('promotion.status = :status', {
|
|
22
|
+
status: params.filters.status,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
if (params.filters.onlyPromotionsWithinDateRange) {
|
|
26
|
+
promotionQueryBuilder.andWhere('NOW() BETWEEN promotion.startDate AND promotion.endDate');
|
|
27
|
+
}
|
|
28
|
+
if (params.projectionOptions?.withMarketplacePromotions || params.filters.marketplaceId) {
|
|
29
|
+
promotionQueryBuilder.leftJoinAndMapMany('promotion.marketplacePromotions', MarketplacePromotion, 'marketplacePromotion', 'marketplacePromotion.promotionId = promotion.id');
|
|
30
|
+
if (params.filters.marketplaceId) {
|
|
31
|
+
promotionQueryBuilder.andWhere('marketplacePromotion.marketplaceId = :marketplaceId', {
|
|
32
|
+
marketplaceId: params.filters.marketplaceId,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (params.projectionOptions?.withAsinPromotions || params.filters.asin) {
|
|
37
|
+
promotionQueryBuilder.leftJoinAndMapMany('promotion.asinPromotions', AsinPromotion, 'asinPromotion', 'asinPromotion.promotionId = promotion.id');
|
|
38
|
+
if (params.filters.asin) {
|
|
39
|
+
promotionQueryBuilder.andWhere('asinPromotion.asin = :asin', {
|
|
40
|
+
asin: params.filters.asin,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (params.projectionOptions?.withDevicePromotions || params.filters.imei) {
|
|
45
|
+
promotionQueryBuilder.leftJoinAndMapMany('promotion.devicePromotions', DevicePromotion, 'devicePromotion', 'devicePromotion.promotionId = promotion.id');
|
|
46
|
+
if (params.filters.imei) {
|
|
47
|
+
promotionQueryBuilder.andWhere('devicePromotion.imei = :imei', {
|
|
48
|
+
imei: params.filters.imei,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (params.projectionOptions?.withDeviceTypePromotions || params.filters.deviceTypeId) {
|
|
53
|
+
promotionQueryBuilder.leftJoinAndMapMany('promotion.deviceTypePromotions', DeviceTypePromotion, 'deviceTypePromotion', 'deviceTypePromotion.promotionId = promotion.id');
|
|
54
|
+
if (params.filters.deviceTypeId) {
|
|
55
|
+
promotionQueryBuilder.andWhere('deviceTypePromotion.deviceTypeId = :deviceTypeId', {
|
|
56
|
+
deviceTypeId: params.filters.deviceTypeId,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const result = await promotionQueryBuilder.orderBy('discount', 'DESC').getMany();
|
|
61
|
+
return result ?? [];
|
|
62
|
+
}, 'PromotionRepository::getPromotions', dbQueryRunner);
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=getPromotions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPromotions.js","sourceRoot":"","sources":["../../../src/repositories/promotions/getPromotions.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,SAAS,GACV,MAAM,gBAAgB,CAAA;AAGvB,OAAO,EAAuB,8BAA8B,EAAE,MAAM,uBAAuB,CAAA;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAEnE,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAChC,cAA8B,EAC9B,MAA2B,EAC3B,MAAc,EACQ,EAAE;IACxB,IAAI,oBAAoB,CAAC,MAAM,EAAE,8BAA8B,CAAC,EAAE;QAChE,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,gEAAgE,CAAC,CAAA;QACzF,OAAO,EAAE,CAAA;KACV;IAED,4CAA4C;IAC5C,MAAM,aAAa,GAAG,cAAc,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;IAExE,OAAO,cAAc,CAAC,SAAS,CAC7B,KAAK,EAAE,UAA0B,EAAE,WAAyB,EAAwB,EAAE;QACpF,MAAM,mBAAmB,GAAG,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC,CAAA;QAE/D,MAAM,qBAAqB,GAAG,mBAAmB,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAA;QAEjF,IAAI,WAAW,EAAE;YACf,qBAAqB,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;SAClD;QAED,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE;YACrB,qBAAqB,CAAC,QAAQ,CAAC,oBAAoB,EAAE,EAAE,EAAE,EAA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C7C,CAAA;YAED,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE;gBACvB,qBAAqB,CAAC,QAAQ,CAAC,8BAA8B,EAAE;oBAC7D,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI;iBAC1B,CAAC,CAAA;aACH;SACF;QAED,IAAI,MAAM,CAAC,iBAAiB,EAAE,wBAAwB,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE;YACrF,qBAAqB,CAAC,kBAAkB,CACtC,gCAAgC,EAChC,mBAAmB,EACnB,qBAAqB,EACrB,gDAAgD,CACjD,CAAA;YAED,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE;gBAC/B,qBAAqB,CAAC,QAAQ,CAAC,kDAAkD,EAAE;oBACjF,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,YAAY;iBAC1C,CAAC,CAAA;aACH;SACF;QAED,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,OAAO,EAAE,CAAA;QAEhF,OAAO,MAAM,IAAI,EAAE,CAAA;IACrB,CAAC,EACD,oCAAoC,EACpC,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { BaseRepository } from '../baseRepository';
|
|
3
|
+
import { bulkInsertDeviceTypePromotion } from './bulkInsertDeviceTypePromotion';
|
|
4
|
+
import { bulkInsertMarketplacePromotion } from './bulkInsertMarketplacePromotion';
|
|
5
|
+
import { createPromotion } from './createPromotion';
|
|
6
|
+
import { createPromotionHistory } from './createPromotionHistory';
|
|
7
|
+
import { deleteDeviceTypePromotion } from './deleteDeviceTypePromotion';
|
|
8
|
+
import { deleteMarketplacePromotion } from './deleteMarketplacePromotion';
|
|
9
|
+
import { getDeviceTypePromotion } from './getDeviceTypePromotion';
|
|
10
|
+
import { getMarketplacePromotion } from './getMarketplacePromotion';
|
|
11
|
+
import { getPromotions } from './getPromotions';
|
|
12
|
+
import { updatePromotion } from './updatePromotion';
|
|
13
|
+
export class PromotionRepository extends BaseRepository {
|
|
14
|
+
/**
|
|
15
|
+
* Create a promotion
|
|
16
|
+
* @param {CreatePromotionParams} params containing information to create a promotion
|
|
17
|
+
*/
|
|
18
|
+
async createPromotion(params) {
|
|
19
|
+
this.logger.trace(params, `PromotionRepository::this.createPromotion started with params`);
|
|
20
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
21
|
+
const result = await createPromotion(novaDataSource, params, this.logger);
|
|
22
|
+
this.logger.trace(result, 'PromotionRepository::createPromotion result');
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Update a promotion
|
|
27
|
+
* @param {UpdatePromotionParams} params containing information to update a promotion
|
|
28
|
+
*/
|
|
29
|
+
async updatePromotion(params) {
|
|
30
|
+
this.logger.trace(params, `PromotionRepository::this.updatePromotion started with params`);
|
|
31
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
32
|
+
const result = await updatePromotion(novaDataSource, params, this.logger);
|
|
33
|
+
this.logger.trace({ result }, 'PromotionRepository::updatePromotion result');
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Get a promotion
|
|
38
|
+
* @param {GetPromotionsParams} params containing information to get a promotion
|
|
39
|
+
*/
|
|
40
|
+
async getPromotions(params) {
|
|
41
|
+
this.logger.trace({ params }, `PromotionRepository::getPromotions started with params`);
|
|
42
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
43
|
+
const promotion = await getPromotions(novaDataSource, params, this.logger);
|
|
44
|
+
this.logger.trace({ promotion }, 'PromotionRepository::getPromotions result');
|
|
45
|
+
return promotion;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Create a marketplace promotion
|
|
49
|
+
* @param {CreateMarketplacePromotionParams} params containing information to create a marketplace promotion
|
|
50
|
+
*/
|
|
51
|
+
async bulkInsertMarketplacePromotion(params) {
|
|
52
|
+
this.logger.trace(params, `PromotionRepository.createMarketplacePromotion started with params`);
|
|
53
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
54
|
+
const result = await bulkInsertMarketplacePromotion(novaDataSource, params, this.logger);
|
|
55
|
+
this.logger.trace(result, 'PromotionRepository::createMarketplacePromotion result');
|
|
56
|
+
return result;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a device type promotion
|
|
60
|
+
* @param {CreateDeviceTypePromotionParams} params containing information to create a device type promotion
|
|
61
|
+
*/
|
|
62
|
+
async bulkInsertDeviceTypePromotion(params) {
|
|
63
|
+
this.logger.trace(params, `PromotionRepository.createDeviceTypePromotion started with params`);
|
|
64
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
65
|
+
const result = await bulkInsertDeviceTypePromotion(novaDataSource, params, this.logger);
|
|
66
|
+
this.logger.trace(result, 'PromotionRepository::createDeviceTypePromotion result');
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Delete a marketplace promotion
|
|
71
|
+
* @param params containing information to delete a marketplace promotion
|
|
72
|
+
* @returns boolean indicating if the marketplace promotion was deleted
|
|
73
|
+
*/
|
|
74
|
+
async deleteMarketplacePromotion(params) {
|
|
75
|
+
this.logger.trace(params, `PromotionRepository.deleteMarketplacePromotion started with params`);
|
|
76
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
77
|
+
const result = await deleteMarketplacePromotion(novaDataSource, params, this.logger);
|
|
78
|
+
this.logger.trace({ result }, 'PromotionRepository::deleteMarketplacePromotion result');
|
|
79
|
+
return result;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Delete a device type promotion
|
|
83
|
+
* @param params containing information to delete a device type promotion
|
|
84
|
+
* @returns boolean indicating if the device type promotion was deleted
|
|
85
|
+
*/
|
|
86
|
+
async deleteDeviceTypePromotion(params) {
|
|
87
|
+
this.logger.trace(params, `PromotionRepository.deleteDeviceTypePromotion started with params`);
|
|
88
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
89
|
+
const result = await deleteDeviceTypePromotion(novaDataSource, params, this.logger);
|
|
90
|
+
this.logger.trace({ result }, 'PromotionRepository::deleteDeviceTypePromotion result');
|
|
91
|
+
return result;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Get a device type promotion
|
|
95
|
+
* @param params containing information to get a device type promotion
|
|
96
|
+
* @returns DeviceTypePromotion object
|
|
97
|
+
*/
|
|
98
|
+
async getDeviceTypePromotion(params) {
|
|
99
|
+
this.logger.trace(params, `PromotionRepository.getDeviceTypePromotion started with params`);
|
|
100
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
101
|
+
const promotion = await getDeviceTypePromotion(novaDataSource, params, this.logger);
|
|
102
|
+
this.logger.trace({ promotion }, 'PromotionRepository::getDeviceTypePromotion result');
|
|
103
|
+
return promotion;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get a marketplace promotion
|
|
107
|
+
* @param params containing information to get a marketplace promotion
|
|
108
|
+
* @returns MarketplacePromotion object
|
|
109
|
+
*/
|
|
110
|
+
async getMarketplacePromotion(params) {
|
|
111
|
+
this.logger.trace(params, `PromotionRepository.getMarketplacePromotion started with params`);
|
|
112
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
113
|
+
const promotion = await getMarketplacePromotion(novaDataSource, params, this.logger);
|
|
114
|
+
this.logger.trace({ promotion }, 'PromotionRepository::getMarketplacePromotion result');
|
|
115
|
+
return promotion;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Create a promotion history
|
|
119
|
+
* @param params containing information to create a promotion history
|
|
120
|
+
* imei: imei of the device
|
|
121
|
+
* clientId: id of the client
|
|
122
|
+
* promotionId: id of the promotion
|
|
123
|
+
* marketplaceId: id of the marketplace
|
|
124
|
+
* asin: asin of the product
|
|
125
|
+
* promotionType: type of the promotion
|
|
126
|
+
* promotionDiscount: discount of the promotion
|
|
127
|
+
* promotionDiscountBillingCycles: billing cycles of the promotion
|
|
128
|
+
* promotionFreeServiceMonths: free service months of the promotion
|
|
129
|
+
* appliedAt: date when the promotion was applied
|
|
130
|
+
* @returns PromotionHistory object
|
|
131
|
+
*/
|
|
132
|
+
async createPromotionHistory(params) {
|
|
133
|
+
this.logger.trace(params, `PromotionRepository.createPromotionHistory started with params`);
|
|
134
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
135
|
+
const result = await createPromotionHistory(novaDataSource, params, this.logger);
|
|
136
|
+
this.logger.trace(result, 'PromotionRepository::createPromotionHistory result');
|
|
137
|
+
return result;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/repositories/promotions/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAarD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAA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AAE,IAAI,CAAC,MAAM,CAAC,CAAA;QAEhF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,oDAAoD,CAAC,CAAA;QAE/E,OAAO,MAAM,CAAA;IACf,CAAC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PromotionType } from '../../types/enums';
|
|
2
|
+
export const invalidPromotion = (params, logger) => {
|
|
3
|
+
const createParams = params;
|
|
4
|
+
const updateParams = params;
|
|
5
|
+
const type = createParams.type ?? updateParams.values.type;
|
|
6
|
+
if (type === PromotionType.Discount) {
|
|
7
|
+
const discount = createParams.discount ?? updateParams.values.discount;
|
|
8
|
+
return discount <= 0;
|
|
9
|
+
}
|
|
10
|
+
else if (type === PromotionType.FreeService) {
|
|
11
|
+
const freeServiceMonths = createParams.freeServiceMonths ?? updateParams.values.freeServiceMonths;
|
|
12
|
+
return freeServiceMonths <= 0;
|
|
13
|
+
}
|
|
14
|
+
logger.warn({ params }, 'PromotionRepository::invalidPromotion incorrect promotion type');
|
|
15
|
+
return false;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=promotionValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotionValidator.js","sourceRoot":"","sources":["../../../src/repositories/promotions/promotionValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAIjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,MAAqD,EACrD,MAAc,EACL,EAAE;IACX,MAAM,YAAY,GAAG,MAA+B,CAAA;IACpD,MAAM,YAAY,GAAG,MAA+B,CAAA;IAEpD,MAAM,IAAI,GAAkB,YAAY,CAAC,IAAI,IAAI,YAAY,CAAC,MAAM,CAAC,IAAI,CAAA;IAEzE,IAAI,IAAI,KAAK,aAAa,CAAC,QAAQ,EAAE;QACnC,MAAM,QAAQ,GAAW,YAAY,CAAC,QAAQ,IAAI,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAA;QAE9E,OAAO,QAAQ,IAAI,CAAC,CAAA;KACrB;SAAM,IAAI,IAAI,KAAK,aAAa,CAAC,WAAW,EAAE;QAC7C,MAAM,iBAAiB,GACrB,YAAY,CAAC,iBAAiB,IAAI,YAAY,CAAC,MAAM,CAAC,iBAAiB,CAAA;QAEzE,OAAO,iBAAiB,IAAI,CAAC,CAAA;KAC9B;IAED,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,gEAAgE,CAAC,CAAA;IACzF,OAAO,KAAK,CAAA;AACd,CAAC,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Promotion } from '../../entities';
|
|
2
|
+
import { oneRequiredUpdatePromotionParams, requiredUpdatePromotionParams, } from '../../types/promotion';
|
|
3
|
+
import { allAttributesAreNull, anyAttributeIsNull } from '../../utils/paramsValidators';
|
|
4
|
+
import { invalidPromotion } from './promotionValidator';
|
|
5
|
+
export const updatePromotion = async (novaDataSource, params, logger) => {
|
|
6
|
+
if (anyAttributeIsNull(params, requiredUpdatePromotionParams) ||
|
|
7
|
+
allAttributesAreNull(params, oneRequiredUpdatePromotionParams) ||
|
|
8
|
+
invalidPromotion(params, logger)) {
|
|
9
|
+
logger.warn({ params }, 'PromotionRepository::updatePromotion missing required parameters');
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
return novaDataSource.safeQuery(async (safeDataSource) => {
|
|
13
|
+
const promotionRepository = safeDataSource.getRepository(Promotion);
|
|
14
|
+
const { filters, values } = params;
|
|
15
|
+
const updateResult = await promotionRepository
|
|
16
|
+
.createQueryBuilder()
|
|
17
|
+
.update(Promotion)
|
|
18
|
+
.set({
|
|
19
|
+
bannerText: values.bannerText,
|
|
20
|
+
description: values.description,
|
|
21
|
+
discount: values.discount,
|
|
22
|
+
discountBillingCycles: values.discountBillingCycles,
|
|
23
|
+
endDate: values.endDate,
|
|
24
|
+
freeServiceMonths: values.freeServiceMonths,
|
|
25
|
+
name: values.name,
|
|
26
|
+
startDate: values.startDate,
|
|
27
|
+
status: values.status,
|
|
28
|
+
trackerText: values.trackerText,
|
|
29
|
+
type: values.type,
|
|
30
|
+
})
|
|
31
|
+
.where('id = :id', { id: filters.id })
|
|
32
|
+
.execute();
|
|
33
|
+
return updateResult.affected > 0;
|
|
34
|
+
}, 'PromotionRepository::updatePromotion error');
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=updatePromotion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updatePromotion.js","sourceRoot":"","sources":["../../../src/repositories/promotions/updatePromotion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAG1C,OAAO,EACL,gCAAgC,EAChC,6BAA6B,GAE9B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAClC,cAA8B,EAC9B,MAA6B,EAC7B,MAAc,EACI,EAAE;IACpB,IACE,kBAAkB,CAAwB,MAAM,EAAE,6BAA6B,CAAC;QAChF,oBAAoB,CAAwB,MAAM,EAAE,gCAAgC,CAAC;QACrF,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC;QACA,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,kEAAkE,CAAC,CAAA;QAC3F,OAAO,KAAK,CAAA;KACb;IAED,OAAO,cAAc,CAAC,SAAS,CAAC,KAAK,EAAE,cAA8B,EAAoB,EAAE;QACzF,MAAM,mBAAmB,GAAG,cAAc,CAAC,aAAa,CAAC,SAAS,CAAC,CAAA;QAEnE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;QAClC,MAAM,YAAY,GAAG,MAAM,mBAAmB;aAC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QAC9F,MAAM,2BAA2B,GAAG,UAAU,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAA;QAE9E,MAAM,QAAQ,GAAG,MAAM,2BAA2B,CAAC,OAAO,CAAC;YACzD,KAAK,EAAE;gBACL,MAAM,EAAE,wBAAwB,CAAC,MAAM,CAAC,MAAM,CAAC;aAChD;SACF,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,WAAW,GAAqB;gBACpC,MAAM,EAAE,wBAAwB,CAAC,MAAM,CAAC,MAAM,CAAC;gBAC/C,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,cAAc,EAAE,MAAM,CAAC,MAAM;aAC9B,CAAA;YAED,OAAO,MAAM,2BAA2B,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;SAC3D;QAED,IAAI,QAAQ,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,IAAI,QAAQ,CAAC,cAAc,KAAK,MAAM,CAAC,MAAM,EAAE;YACtF,OAAO,QAAQ,CAAA,CAAC,yCAAyC;SAC1D;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAA;SACnF;IACH,CAAC,EAAE,oCAAoC,CAAC,CAAA;AAC1C,CAAC,CAAA"}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { SecurityRole } from '../../entities';
|
|
2
|
-
export const getAllRoles = async (novaDataSource) => {
|
|
3
|
-
|
|
2
|
+
export const getAllRoles = async (novaDataSource, forceUseReplica) => {
|
|
3
|
+
// Force the query to run on master or slave
|
|
4
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams({
|
|
5
|
+
queryOptions: {
|
|
6
|
+
forceUseReplica,
|
|
7
|
+
},
|
|
8
|
+
});
|
|
9
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
4
10
|
const rolesRepository = dataSource.getRepository(SecurityRole);
|
|
5
|
-
const
|
|
11
|
+
const queryBuilder = rolesRepository.createQueryBuilder();
|
|
12
|
+
if (queryRunner) {
|
|
13
|
+
queryBuilder.setQueryRunner(queryRunner);
|
|
14
|
+
}
|
|
15
|
+
const roles = await queryBuilder.getMany();
|
|
6
16
|
return roles;
|
|
7
|
-
}, 'SecurityRepository::getAllRoles');
|
|
17
|
+
}, 'SecurityRepository::getAllRoles', dbQueryRunner);
|
|
8
18
|
};
|
|
19
|
+
//# sourceMappingURL=getAllRoles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAllRoles.js","sourceRoot":"","sources":["../../../src/repositories/security/getAllRoles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAG7C,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,EAC9B,cAA8B,EAC9B,eAAyB,EACA,EAAE;IAC3B,4CAA4C;IAC5C,MAAM,aAAa,GAAG,cAAc,CAAC,2BAA2B,CAAC;QAC/D,YAAY,EAAE;YACZ,eAAe;SAChB;KACF,CAAC,CAAA;IAEF,OAAO,cAAc,CAAC,SAAS,CAC7B,KAAK,EAAE,UAA0B,EAAE,WAAyB,EAA2B,EAAE;QACvF,MAAM,eAAe,GAAG,UAAU,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;QAE9D,MAAM,YAAY,GAAG,eAAe,CAAC,kBAAkB,EAAE,CAAA;QAEzD,IAAI,WAAW,EAAE;YACf,YAAY,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;SACzC;QAED,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,OAAO,EAAE,CAAA;QAE1C,OAAO,KAAK,CAAA;IACd,CAAC,EACD,iCAAiC,EACjC,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -5,11 +5,20 @@ export const getUserRoles = async (novaDataSource, params, logger) => {
|
|
|
5
5
|
logger.warn({ params }, 'SecurityRepository::getUserRoles - missing required parameters');
|
|
6
6
|
return [];
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
// Force the query to run on master or slave
|
|
9
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
10
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
9
11
|
const userSecurityRolesRepository = dataSource.getRepository(UserSecurityRole);
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
const queryBuilder = userSecurityRolesRepository.createQueryBuilder();
|
|
13
|
+
if (queryRunner) {
|
|
14
|
+
queryBuilder.setQueryRunner(queryRunner);
|
|
15
|
+
}
|
|
16
|
+
const userRoles = await queryBuilder
|
|
17
|
+
.where('userId = :userId', {
|
|
18
|
+
userId: uuidStringToBinaryBuffer(params.filters.userId),
|
|
19
|
+
})
|
|
20
|
+
.getMany();
|
|
13
21
|
return userRoles;
|
|
14
|
-
}, 'SecurityRepository::getUserRoles');
|
|
22
|
+
}, 'SecurityRepository::getUserRoles', dbQueryRunner);
|
|
15
23
|
};
|
|
24
|
+
//# sourceMappingURL=getUserRoles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUserRoles.js","sourceRoot":"","sources":["../../../src/repositories/security/getUserRoles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAIjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAElE,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,cAA8B,EAC9B,MAA0B,EAC1B,MAAc,EACe,EAAE;IAC/B,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;QAC5B,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,gEAAgE,CAAC,CAAA;QACzF,OAAO,EAAE,CAAA;KACV;IAED,4CAA4C;IAC5C,MAAM,aAAa,GAAG,cAAc,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;IAExE,OAAO,cAAc,CAAC,SAAS,CAC7B,KAAK,EAAE,UAA0B,EAAE,WAAyB,EAA+B,EAAE;QAC3F,MAAM,2BAA2B,GAAG,UAAU,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAA;QAE9E,MAAM,YAAY,GAAG,2BAA2B,CAAC,kBAAkB,EAAE,CAAA;QAErE,IAAI,WAAW,EAAE;YACf,YAAY,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;SACzC;QAED,MAAM,SAAS,GAAG,MAAM,YAAY;aACjC,KAAK,CAAC,kBAAkB,EAAE;YACzB,MAAM,EAAE,wBAAwB,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;SACxD,CAAC;aACD,OAAO,EAAE,CAAA;QAEZ,OAAO,SAAS,CAAA;IAClB,CAAC,EACD,kCAAkC,EAClC,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -4,14 +4,23 @@ export const getUserRolesByClientId = async (novaDataSource, params, logger) =>
|
|
|
4
4
|
logger.warn({ params }, 'SecurityRepository::getUserRolesByClientId - missing required parameters');
|
|
5
5
|
return [];
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
// Force the query to run on master or slave
|
|
8
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
9
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
8
10
|
const userSecurityRolesRepository = dataSource.getRepository(UserSecurityRole);
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
const queryBuilder = userSecurityRolesRepository
|
|
12
|
+
.createQueryBuilder()
|
|
13
|
+
.where('clientId = :clientId', { clientId: params.filters.clientId });
|
|
14
|
+
if (params.filters.role) {
|
|
15
|
+
queryBuilder.andWhere('securityRoleId = :securityRoleId', {
|
|
16
|
+
securityRoleId: params.filters.role,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
if (queryRunner) {
|
|
20
|
+
queryBuilder.setQueryRunner(queryRunner);
|
|
21
|
+
}
|
|
22
|
+
const userRoles = await queryBuilder.getMany();
|
|
15
23
|
return userRoles;
|
|
16
|
-
}, 'SecurityRepository::getUserRolesByClientId');
|
|
24
|
+
}, 'SecurityRepository::getUserRolesByClientId', dbQueryRunner);
|
|
17
25
|
};
|
|
26
|
+
//# sourceMappingURL=getUserRolesByClientId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUserRolesByClientId.js","sourceRoot":"","sources":["../../../src/repositories/security/getUserRolesByClientId.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAKjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EACzC,cAA8B,EAC9B,MAAoC,EACpC,MAAc,EACe,EAAE;IAC/B,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC9B,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,0EAA0E,CAC3E,CAAA;QACD,OAAO,EAAE,CAAA;KACV;IAED,4CAA4C;IAC5C,MAAM,aAAa,GAAG,cAAc,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;IAExE,OAAO,cAAc,CAAC,SAAS,CAC7B,KAAK,EAAE,UAA0B,EAAE,WAAyB,EAA+B,EAAE;QAC3F,MAAM,2BAA2B,GAAG,UAAU,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAA;QAE9E,MAAM,YAAY,GAAG,2BAA2B;aAC7C,kBAAkB,EAAE;aACpB,KAAK,CAAC,sBAAsB,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;QAEvE,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE;YACvB,YAAY,CAAC,QAAQ,CAAC,kCAAkC,EAAE;gBACxD,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI;aACpC,CAAC,CAAA;SACH;QAED,IAAI,WAAW,EAAE;YACf,YAAY,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;SACzC;QAED,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,OAAO,EAAE,CAAA;QAE9C,OAAO,SAAS,CAAA;IAClB,CAAC,EACD,4CAA4C,EAC5C,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -12,10 +12,10 @@ export class SecurityRepository extends BaseRepository {
|
|
|
12
12
|
/**
|
|
13
13
|
* Get all security roles
|
|
14
14
|
*/
|
|
15
|
-
async getAllRoles() {
|
|
15
|
+
async getAllRoles(forceUseReplica) {
|
|
16
16
|
this.logger.trace('SecurityRepository::getAllRoles started');
|
|
17
|
-
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
18
|
-
const result = await getAllRoles(novaDataSource);
|
|
17
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
18
|
+
const result = await getAllRoles(novaDataSource, forceUseReplica);
|
|
19
19
|
this.logger.trace(result, 'SecurityRepository::getAllRoles result');
|
|
20
20
|
return result;
|
|
21
21
|
}
|
|
@@ -26,7 +26,7 @@ export class SecurityRepository extends BaseRepository {
|
|
|
26
26
|
*/
|
|
27
27
|
async getUserRoles(params) {
|
|
28
28
|
this.logger.trace(params, 'SecurityRepository::getUserRoles started with params');
|
|
29
|
-
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
29
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
30
30
|
const result = await getUserRoles(novaDataSource, params, this.logger);
|
|
31
31
|
this.logger.trace(result, 'SecurityRepository::getUserRoles result');
|
|
32
32
|
return result;
|
|
@@ -39,7 +39,7 @@ export class SecurityRepository extends BaseRepository {
|
|
|
39
39
|
*/
|
|
40
40
|
async getUserRolesByClientId(params) {
|
|
41
41
|
this.logger.trace(params, 'SecurityRepository::getUserRolesByClientId started with params');
|
|
42
|
-
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
42
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
43
43
|
const result = await getUserRolesByClientId(novaDataSource, params, this.logger);
|
|
44
44
|
this.logger.trace(result, 'SecurityRepository::getUserRolesByClientId result');
|
|
45
45
|
return result;
|
|
@@ -52,7 +52,7 @@ export class SecurityRepository extends BaseRepository {
|
|
|
52
52
|
*/
|
|
53
53
|
async userIsInRole(params) {
|
|
54
54
|
this.logger.trace(params, 'SecurityRepository::userIsInRole started with params');
|
|
55
|
-
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
55
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
56
56
|
const result = await userIsInRole(novaDataSource, params, this.logger);
|
|
57
57
|
this.logger.trace({ result }, 'SecurityRepository::userIsInRole result');
|
|
58
58
|
return result;
|
|
@@ -64,7 +64,7 @@ export class SecurityRepository extends BaseRepository {
|
|
|
64
64
|
*/
|
|
65
65
|
async userIsAdminOrOwner(params) {
|
|
66
66
|
this.logger.trace(params, 'SecurityRepository::userIsAdminOrOwner started with params');
|
|
67
|
-
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
67
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
68
68
|
const result = await userIsAdminOrOwner(novaDataSource, params, this.logger);
|
|
69
69
|
this.logger.trace({ result }, 'SecurityRepository::userIsAdminOrOwner result');
|
|
70
70
|
return result;
|
|
@@ -78,7 +78,7 @@ export class SecurityRepository extends BaseRepository {
|
|
|
78
78
|
*/
|
|
79
79
|
async createUserRole(params) {
|
|
80
80
|
this.logger.trace(params, 'SecurityRepository::createUserRole started with params');
|
|
81
|
-
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
81
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
82
82
|
const result = await createUserRole(novaDataSource, params, this.logger);
|
|
83
83
|
this.logger.trace(result, 'SecurityRepository::createUserRole result');
|
|
84
84
|
return result;
|
|
@@ -91,7 +91,7 @@ export class SecurityRepository extends BaseRepository {
|
|
|
91
91
|
*/
|
|
92
92
|
async updateUserRole(params) {
|
|
93
93
|
this.logger.trace(params, 'SecurityRepository::updateUserRole started with params');
|
|
94
|
-
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
94
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
95
95
|
const result = await updateUserRole(novaDataSource, params, this.logger);
|
|
96
96
|
this.logger.trace({ result }, 'SecurityRepository::updateUserRole result');
|
|
97
97
|
return result;
|
|
@@ -103,9 +103,10 @@ export class SecurityRepository extends BaseRepository {
|
|
|
103
103
|
*/
|
|
104
104
|
async removeUserRoles(params) {
|
|
105
105
|
this.logger.trace(params, 'SecurityRepository::removeUserRoles started with params');
|
|
106
|
-
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger);
|
|
106
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
107
107
|
const result = await removeUserRoles(novaDataSource, params, this.logger);
|
|
108
108
|
this.logger.trace({ result }, 'SecurityRepository::removeUserRoles result');
|
|
109
109
|
return result;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/repositories/security/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAUrD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,cAAc,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AEzC,QAAQ,CAAC,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAA;QAE9C,MAAM,MAAM,GAAG,MAAM,2BAA2B,CAAC,MAAM,CACrD,EAAE,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,EACrC,QAAQ,CACT,CAAA;QAED,OAAO,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAA;IAC5B,CAAC,EAAE,oCAAoC,CAAC,CAAA;AAC1C,CAAC,CAAA"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { In } from 'typeorm';
|
|
2
1
|
import { UserSecurityRole } from '../../entities';
|
|
3
2
|
import { HapnSecurityRole } from '../../types/enums';
|
|
4
3
|
import { uuidStringToBinaryBuffer } from '../../utils/uuidHelpers';
|
|
@@ -7,14 +6,21 @@ export const userIsAdminOrOwner = async (novaDataSource, params, logger) => {
|
|
|
7
6
|
logger.warn({ params }, 'SecurityRepository::userIsAdminOrOwner - missing required parameters');
|
|
8
7
|
return false;
|
|
9
8
|
}
|
|
10
|
-
|
|
9
|
+
// Force the query to run on master or slave
|
|
10
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
11
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
11
12
|
const userSecurityRolesRepository = dataSource.getRepository(UserSecurityRole);
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const queryBuilder = userSecurityRolesRepository.createQueryBuilder();
|
|
14
|
+
if (queryRunner) {
|
|
15
|
+
queryBuilder.setQueryRunner(queryRunner);
|
|
16
|
+
}
|
|
17
|
+
const userRole = await queryBuilder
|
|
18
|
+
.where('userId = :userId', { userId: uuidStringToBinaryBuffer(params.filters.userId) })
|
|
19
|
+
.andWhere('securityRoleId IN (:...roles)', {
|
|
20
|
+
roles: [HapnSecurityRole.Admin, HapnSecurityRole.Owner],
|
|
21
|
+
})
|
|
22
|
+
.getOne();
|
|
18
23
|
return userRole !== null;
|
|
19
|
-
}, 'SecurityRepository::userIsAdminOrOwner');
|
|
24
|
+
}, 'SecurityRepository::userIsAdminOrOwner', dbQueryRunner);
|
|
20
25
|
};
|
|
26
|
+
//# sourceMappingURL=userIsAdminOrOwner.js.map
|