@hyper.software/common-helpers 2.2.45 → 2.2.47
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/README.md +0 -0
- package/lib/errors/CriticalError.d.ts +0 -0
- package/lib/errors/CriticalError.js +0 -0
- package/lib/errors/CriticalError.js.map +0 -0
- package/lib/errors/ValidationError.d.ts +0 -0
- package/lib/errors/ValidationError.js +0 -0
- package/lib/errors/ValidationError.js.map +0 -0
- package/lib/errors/ValidationErrorSilent.d.ts +0 -0
- package/lib/errors/ValidationErrorSilent.js +0 -0
- package/lib/errors/ValidationErrorSilent.js.map +0 -0
- package/lib/errors/ValidationErrorWithStatus.d.ts +0 -0
- package/lib/errors/ValidationErrorWithStatus.js +0 -0
- package/lib/errors/ValidationErrorWithStatus.js.map +0 -0
- package/lib/errors/ValidationErrorWithStatusSilent.d.ts +0 -0
- package/lib/errors/ValidationErrorWithStatusSilent.js +0 -0
- package/lib/errors/ValidationErrorWithStatusSilent.js.map +0 -0
- package/lib/errors/__mocks__/errors.mock.d.ts +0 -0
- package/lib/errors/__mocks__/errors.mock.js +0 -0
- package/lib/errors/__mocks__/errors.mock.js.map +0 -0
- package/lib/errors/__tests__/errorMappers.test.d.ts +0 -0
- package/lib/errors/__tests__/errorMappers.test.js +0 -0
- package/lib/errors/__tests__/errorMappers.test.js.map +0 -0
- package/lib/errors/__tests__/errors.test.d.ts +0 -0
- package/lib/errors/__tests__/errors.test.js +0 -0
- package/lib/errors/__tests__/errors.test.js.map +0 -0
- package/lib/errors/errorMappers.d.ts +0 -0
- package/lib/errors/errorMappers.js +0 -0
- package/lib/errors/errorMappers.js.map +0 -0
- package/lib/errors/errors.types.d.ts +0 -0
- package/lib/errors/errors.types.js +0 -0
- package/lib/errors/errors.types.js.map +0 -0
- package/lib/errors/index.d.ts +0 -0
- package/lib/errors/index.js +0 -0
- package/lib/errors/index.js.map +0 -0
- package/lib/express/__tests__/swaggerHelpers.test.d.ts +0 -0
- package/lib/express/__tests__/swaggerHelpers.test.js +0 -0
- package/lib/express/__tests__/swaggerHelpers.test.js.map +0 -0
- package/lib/express/middleware/aliveMiddleware/index.d.ts +0 -0
- package/lib/express/middleware/aliveMiddleware/index.js +0 -0
- package/lib/express/middleware/aliveMiddleware/index.js.map +0 -0
- package/lib/express/middleware/companyMiddleware/company.d.ts +0 -0
- package/lib/express/middleware/companyMiddleware/company.js +0 -0
- package/lib/express/middleware/companyMiddleware/company.js.map +0 -0
- package/lib/express/middleware/companyMiddleware/companyApiRequest.d.ts +0 -0
- package/lib/express/middleware/companyMiddleware/companyApiRequest.js +0 -0
- package/lib/express/middleware/companyMiddleware/companyApiRequest.js.map +0 -0
- package/lib/express/middleware/companyMiddleware/index.d.ts +0 -0
- package/lib/express/middleware/companyMiddleware/index.js +0 -0
- package/lib/express/middleware/companyMiddleware/index.js.map +0 -0
- package/lib/express/middleware/companyMiddleware/index.types.d.ts +0 -0
- package/lib/express/middleware/companyMiddleware/index.types.js +0 -0
- package/lib/express/middleware/companyMiddleware/index.types.js.map +0 -0
- package/lib/express/middleware/expressErrorHandlerMiddleware/__tests__/expressErrorHandlerMiddleware.test.d.ts +0 -0
- package/lib/express/middleware/expressErrorHandlerMiddleware/__tests__/expressErrorHandlerMiddleware.test.js +0 -0
- package/lib/express/middleware/expressErrorHandlerMiddleware/__tests__/expressErrorHandlerMiddleware.test.js.map +0 -0
- package/lib/express/middleware/expressErrorHandlerMiddleware/index.d.ts +0 -0
- package/lib/express/middleware/expressErrorHandlerMiddleware/index.js +0 -0
- package/lib/express/middleware/expressErrorHandlerMiddleware/index.js.map +0 -0
- package/lib/express/middleware/index.d.ts +0 -0
- package/lib/express/middleware/index.js +0 -0
- package/lib/express/middleware/index.js.map +0 -0
- package/lib/express/middleware/languageMiddleware/index.d.ts +0 -0
- package/lib/express/middleware/languageMiddleware/index.js +0 -0
- package/lib/express/middleware/languageMiddleware/index.js.map +0 -0
- package/lib/express/middleware/partnerMiddleware/index.d.ts +0 -0
- package/lib/express/middleware/partnerMiddleware/index.js +0 -0
- package/lib/express/middleware/partnerMiddleware/index.js.map +0 -0
- package/lib/express/middleware/partnerMiddleware/index.types.d.ts +0 -0
- package/lib/express/middleware/partnerMiddleware/index.types.js +0 -0
- package/lib/express/middleware/partnerMiddleware/index.types.js.map +0 -0
- package/lib/express/middleware/partnerMiddleware/partner.d.ts +0 -0
- package/lib/express/middleware/partnerMiddleware/partner.js +0 -0
- package/lib/express/middleware/partnerMiddleware/partner.js.map +0 -0
- package/lib/express/middleware/partnerMiddleware/partnerServiceRequest.d.ts +0 -0
- package/lib/express/middleware/partnerMiddleware/partnerServiceRequest.js +0 -0
- package/lib/express/middleware/partnerMiddleware/partnerServiceRequest.js.map +0 -0
- package/lib/express/middleware/responseHelpersMiddleware/index.d.ts +0 -0
- package/lib/express/middleware/responseHelpersMiddleware/index.js +0 -0
- package/lib/express/middleware/responseHelpersMiddleware/index.js.map +0 -0
- package/lib/express/middleware/responseHelpersMiddleware/types.d.ts +0 -0
- package/lib/express/middleware/responseHelpersMiddleware/types.js +0 -0
- package/lib/express/middleware/responseHelpersMiddleware/types.js.map +0 -0
- package/lib/express/middleware/translationsMiddleware/index.d.ts +0 -0
- package/lib/express/middleware/translationsMiddleware/index.js +0 -0
- package/lib/express/middleware/translationsMiddleware/index.js.map +0 -0
- package/lib/express/swaggerControllersConfig.d.ts +0 -0
- package/lib/express/swaggerControllersConfig.js +0 -0
- package/lib/express/swaggerControllersConfig.js.map +0 -0
- package/lib/express/swaggerHelpers.d.ts +0 -0
- package/lib/express/swaggerHelpers.js +0 -0
- package/lib/express/swaggerHelpers.js.map +0 -0
- package/lib/express/swaggerUiController.d.ts +0 -0
- package/lib/express/swaggerUiController.js +0 -0
- package/lib/express/swaggerUiController.js.map +0 -0
- package/lib/express/swaggerUiTemplate.d.ts +0 -0
- package/lib/express/swaggerUiTemplate.js +0 -0
- package/lib/express/swaggerUiTemplate.js.map +0 -0
- package/lib/helpers/ExecuteOnce.d.ts +0 -0
- package/lib/helpers/ExecuteOnce.js +0 -0
- package/lib/helpers/ExecuteOnce.js.map +0 -0
- package/lib/helpers/UniversalConfig.d.ts +0 -0
- package/lib/helpers/UniversalConfig.js +0 -0
- package/lib/helpers/UniversalConfig.js.map +0 -0
- package/lib/helpers/__tests__/arrays.test.d.ts +0 -0
- package/lib/helpers/__tests__/arrays.test.js +0 -0
- package/lib/helpers/__tests__/arrays.test.js.map +0 -0
- package/lib/helpers/__tests__/emptyValues.test.d.ts +0 -0
- package/lib/helpers/__tests__/emptyValues.test.js +0 -0
- package/lib/helpers/__tests__/emptyValues.test.js.map +0 -0
- package/lib/helpers/__tests__/formatters.formatCurrency.test.d.ts +0 -0
- package/lib/helpers/__tests__/formatters.formatCurrency.test.js +0 -0
- package/lib/helpers/__tests__/formatters.formatCurrency.test.js.map +0 -0
- package/lib/helpers/__tests__/formatters.formatDate.test.d.ts +0 -0
- package/lib/helpers/__tests__/formatters.formatDate.test.js +0 -0
- package/lib/helpers/__tests__/formatters.formatDate.test.js.map +0 -0
- package/lib/helpers/__tests__/formatters.formatDouble.test.d.ts +0 -0
- package/lib/helpers/__tests__/formatters.formatDouble.test.js +0 -0
- package/lib/helpers/__tests__/formatters.formatDouble.test.js.map +0 -0
- package/lib/helpers/__tests__/navigation.getUrlWithSubdomain.test.d.ts +0 -0
- package/lib/helpers/__tests__/navigation.getUrlWithSubdomain.test.js +0 -0
- package/lib/helpers/__tests__/navigation.getUrlWithSubdomain.test.js.map +0 -0
- package/lib/helpers/__tests__/navigation.test.d.ts +0 -0
- package/lib/helpers/__tests__/navigation.test.js +0 -0
- package/lib/helpers/__tests__/navigation.test.js.map +0 -0
- package/lib/helpers/__tests__/strings.test.d.ts +0 -0
- package/lib/helpers/__tests__/strings.test.js +0 -0
- package/lib/helpers/__tests__/strings.test.js.map +0 -0
- package/lib/helpers/__tests__/validation.test.d.ts +0 -0
- package/lib/helpers/__tests__/validation.test.js +0 -0
- package/lib/helpers/__tests__/validation.test.js.map +0 -0
- package/lib/helpers/arrays.d.ts +0 -0
- package/lib/helpers/arrays.js +0 -0
- package/lib/helpers/arrays.js.map +0 -0
- package/lib/helpers/clientLogger.d.ts +0 -0
- package/lib/helpers/clientLogger.js +0 -0
- package/lib/helpers/clientLogger.js.map +0 -0
- package/lib/helpers/constants/common.d.ts +0 -0
- package/lib/helpers/constants/common.js +0 -0
- package/lib/helpers/constants/common.js.map +0 -0
- package/lib/helpers/constants/fileUploads.d.ts +0 -0
- package/lib/helpers/constants/fileUploads.js +0 -0
- package/lib/helpers/constants/fileUploads.js.map +0 -0
- package/lib/helpers/constants/index.d.ts +0 -0
- package/lib/helpers/constants/index.js +0 -0
- package/lib/helpers/constants/index.js.map +0 -0
- package/lib/helpers/constants/integrations.d.ts +0 -0
- package/lib/helpers/constants/integrations.js +0 -0
- package/lib/helpers/constants/integrations.js.map +0 -0
- package/lib/helpers/constants/language.d.ts +0 -0
- package/lib/helpers/constants/language.js +0 -0
- package/lib/helpers/constants/language.js.map +0 -0
- package/lib/helpers/constants/supportUsers.d.ts +0 -0
- package/lib/helpers/constants/supportUsers.js +0 -0
- package/lib/helpers/constants/supportUsers.js.map +0 -0
- package/lib/helpers/constants/swagger.d.ts +0 -0
- package/lib/helpers/constants/swagger.js +0 -0
- package/lib/helpers/constants/swagger.js.map +0 -0
- package/lib/helpers/constants/urls.d.ts +0 -0
- package/lib/helpers/constants/urls.js +0 -0
- package/lib/helpers/constants/urls.js.map +0 -0
- package/lib/helpers/constants/user.d.ts +0 -0
- package/lib/helpers/constants/user.js +0 -0
- package/lib/helpers/constants/user.js.map +0 -0
- package/lib/helpers/constants/validators.d.ts +0 -0
- package/lib/helpers/constants/validators.js +0 -0
- package/lib/helpers/constants/validators.js.map +0 -0
- package/lib/helpers/emptyValues.d.ts +0 -0
- package/lib/helpers/emptyValues.js +0 -0
- package/lib/helpers/emptyValues.js.map +0 -0
- package/lib/helpers/formatters.d.ts +0 -0
- package/lib/helpers/formatters.js +0 -0
- package/lib/helpers/formatters.js.map +0 -0
- package/lib/helpers/guards.d.ts +0 -0
- package/lib/helpers/guards.js +0 -0
- package/lib/helpers/guards.js.map +0 -0
- package/lib/helpers/index.d.ts +0 -0
- package/lib/helpers/index.js +0 -0
- package/lib/helpers/index.js.map +0 -0
- package/lib/helpers/isBrowser.d.ts +0 -0
- package/lib/helpers/isBrowser.js +0 -0
- package/lib/helpers/isBrowser.js.map +0 -0
- package/lib/helpers/math.d.ts +0 -0
- package/lib/helpers/math.js +0 -0
- package/lib/helpers/math.js.map +0 -0
- package/lib/helpers/moment.d.ts +0 -0
- package/lib/helpers/moment.js +0 -0
- package/lib/helpers/moment.js.map +0 -0
- package/lib/helpers/navigation.d.ts +0 -0
- package/lib/helpers/navigation.js +0 -0
- package/lib/helpers/navigation.js.map +0 -0
- package/lib/helpers/stringifySafe.d.ts +0 -0
- package/lib/helpers/stringifySafe.js +0 -0
- package/lib/helpers/stringifySafe.js.map +0 -0
- package/lib/helpers/strings.d.ts +0 -0
- package/lib/helpers/strings.js +0 -0
- package/lib/helpers/strings.js.map +0 -0
- package/lib/helpers/validation.d.ts +0 -0
- package/lib/helpers/validation.js +0 -0
- package/lib/helpers/validation.js.map +0 -0
- package/lib/index.d.ts +0 -0
- package/lib/index.js +0 -0
- package/lib/index.js.map +0 -0
- package/lib/interfaces.d.ts +0 -0
- package/lib/interfaces.js +0 -0
- package/lib/interfaces.js.map +0 -0
- package/lib/redux/analyticsMiddleware.d.ts +0 -0
- package/lib/redux/analyticsMiddleware.js +0 -0
- package/lib/redux/analyticsMiddleware.js.map +0 -0
- package/lib/redux/clientMiddleware.d.ts +0 -0
- package/lib/redux/clientMiddleware.js +0 -0
- package/lib/redux/clientMiddleware.js.map +0 -0
- package/lib/redux/emptyMiddleware.d.ts +0 -0
- package/lib/redux/emptyMiddleware.js +0 -0
- package/lib/redux/emptyMiddleware.js.map +0 -0
- package/lib/redux/index.d.ts +0 -0
- package/lib/redux/index.js +0 -0
- package/lib/redux/index.js.map +0 -0
- package/lib/services/bookingService/__tests__/bookingInvoiceService.getAdultAndChildrenCount.test.d.ts +0 -0
- package/lib/services/bookingService/__tests__/bookingInvoiceService.getAdultAndChildrenCount.test.js +0 -0
- package/lib/services/bookingService/__tests__/bookingInvoiceService.getAdultAndChildrenCount.test.js.map +0 -0
- package/lib/services/bookingService/__tests__/bookingInvoiceService.test.d.ts +0 -0
- package/lib/services/bookingService/__tests__/bookingInvoiceService.test.js +0 -0
- package/lib/services/bookingService/__tests__/bookingInvoiceService.test.js.map +0 -0
- package/lib/services/bookingService/__tests__/bookingService.calculateDynamic.test.d.ts +0 -0
- package/lib/services/bookingService/__tests__/bookingService.calculateDynamic.test.js +0 -0
- package/lib/services/bookingService/__tests__/bookingService.calculateDynamic.test.js.map +0 -0
- package/lib/services/bookingService/__tests__/bookingService.initialiseProducts.test.d.ts +0 -0
- package/lib/services/bookingService/__tests__/bookingService.initialiseProducts.test.js +0 -0
- package/lib/services/bookingService/__tests__/bookingService.initialiseProducts.test.js.map +0 -0
- package/lib/services/bookingService/__tests__/bookingServicesService.getBookingServiceTotalCost.test.d.ts +0 -0
- package/lib/services/bookingService/__tests__/bookingServicesService.getBookingServiceTotalCost.test.js +0 -0
- package/lib/services/bookingService/__tests__/bookingServicesService.getBookingServiceTotalCost.test.js.map +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getAccommodationCost.test.d.ts +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getAccommodationCost.test.js +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getAccommodationCost.test.js.map +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getBookingServiceQuantity.test.d.ts +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getBookingServiceQuantity.test.js +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getBookingServiceQuantity.test.js.map +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getChildrenCost.test.d.ts +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getChildrenCost.test.js +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getChildrenCost.test.js.map +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getLengthOfStay.test.d.ts +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getLengthOfStay.test.js +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getLengthOfStay.test.js.map +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getSeasonalNights.test.d.ts +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getSeasonalNights.test.js +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getSeasonalNights.test.js.map +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getServicesCost.test.d.ts +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getServicesCost.test.js +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getServicesCost.test.js.map +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getTotalCost.test.d.ts +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getTotalCost.test.js +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.getTotalCost.test.js.map +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.manualComputeTotalCost.test.d.ts +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.manualComputeTotalCost.test.js +0 -0
- package/lib/services/bookingService/__tests__/bookingsService.manualComputeTotalCost.test.js.map +0 -0
- package/lib/services/bookingService/bookingInvoiceService.d.ts +0 -0
- package/lib/services/bookingService/bookingInvoiceService.js +0 -0
- package/lib/services/bookingService/bookingInvoiceService.js.map +0 -0
- package/lib/services/bookingService/bookingServicesService.d.ts +0 -0
- package/lib/services/bookingService/bookingServicesService.js +0 -0
- package/lib/services/bookingService/bookingServicesService.js.map +0 -0
- package/lib/services/bookingService/bookingsService.d.ts +0 -0
- package/lib/services/bookingService/bookingsService.getOccupancyBasedPricingDiscount.test.d.ts +0 -0
- package/lib/services/bookingService/bookingsService.getOccupancyBasedPricingDiscount.test.js +0 -0
- package/lib/services/bookingService/bookingsService.getOccupancyBasedPricingDiscount.test.js.map +0 -0
- package/lib/services/bookingService/bookingsService.js +0 -0
- package/lib/services/bookingService/bookingsService.js.map +0 -0
- package/lib/services/cookieService/cookieService.d.ts +0 -0
- package/lib/services/cookieService/cookieService.js +0 -0
- package/lib/services/cookieService/cookieService.js.map +0 -0
- package/lib/services/dateService/dateService.d.ts +0 -0
- package/lib/services/dateService/dateService.js +0 -0
- package/lib/services/dateService/dateService.js.map +0 -0
- package/lib/services/dynamicPricingService/dynamicPricingService.d.ts +8 -0
- package/lib/services/dynamicPricingService/dynamicPricingService.js +25 -34
- package/lib/services/dynamicPricingService/dynamicPricingService.js.map +1 -1
- package/lib/services/googleAnalyticsService/googleAnalyticsService.d.ts +0 -0
- package/lib/services/googleAnalyticsService/googleAnalyticsService.js +0 -0
- package/lib/services/googleAnalyticsService/googleAnalyticsService.js.map +0 -0
- package/lib/services/imageService/imageService.d.ts +0 -0
- package/lib/services/imageService/imageService.js +0 -0
- package/lib/services/imageService/imageService.js.map +0 -0
- package/lib/services/index.d.ts +0 -0
- package/lib/services/index.js +0 -0
- package/lib/services/index.js.map +0 -0
- package/lib/services/languageService/languageService.d.ts +0 -0
- package/lib/services/languageService/languageService.js +0 -0
- package/lib/services/languageService/languageService.js.map +0 -0
- package/lib/services/localstorageService/localstorageService.d.ts +0 -0
- package/lib/services/localstorageService/localstorageService.js +0 -0
- package/lib/services/localstorageService/localstorageService.js.map +0 -0
- package/lib/services/roomBookingService/__tests__/roomBookingService.distributeGuests.test.d.ts +0 -0
- package/lib/services/roomBookingService/__tests__/roomBookingService.distributeGuests.test.js +0 -0
- package/lib/services/roomBookingService/__tests__/roomBookingService.distributeGuests.test.js.map +0 -0
- package/lib/services/roomBookingService/index.d.ts +0 -0
- package/lib/services/roomBookingService/index.js +0 -0
- package/lib/services/roomBookingService/index.js.map +0 -0
- package/lib/services/sessionStorageService/index.d.ts +0 -0
- package/lib/services/sessionStorageService/index.js +0 -0
- package/lib/services/sessionStorageService/index.js.map +0 -0
- package/lib/testingData/bookingData.d.ts +0 -0
- package/lib/testingData/bookingData.js +0 -0
- package/lib/testingData/bookingData.js.map +0 -0
- package/lib/testingData/companyData.d.ts +0 -0
- package/lib/testingData/companyData.js +0 -0
- package/lib/testingData/companyData.js.map +0 -0
- package/lib/testingData/roomsData.d.ts +0 -0
- package/lib/testingData/roomsData.js +0 -0
- package/lib/testingData/roomsData.js.map +0 -0
- package/lib/translations/getAllTranslations.d.ts +0 -0
- package/lib/translations/getAllTranslations.js +0 -0
- package/lib/translations/getAllTranslations.js.map +0 -0
- package/package.json +1 -1
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/services/bookingService/__tests__/bookingsService.getAccommodationCost.test.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/services/bookingService/__tests__/bookingsService.getAccommodationCost.test.js.map
CHANGED
|
File without changes
|
package/lib/services/bookingService/__tests__/bookingsService.getBookingServiceQuantity.test.d.ts
CHANGED
|
File without changes
|
package/lib/services/bookingService/__tests__/bookingsService.getBookingServiceQuantity.test.js
CHANGED
|
File without changes
|
package/lib/services/bookingService/__tests__/bookingsService.getBookingServiceQuantity.test.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/services/bookingService/__tests__/bookingsService.manualComputeTotalCost.test.d.ts
CHANGED
|
File without changes
|
package/lib/services/bookingService/__tests__/bookingsService.manualComputeTotalCost.test.js
CHANGED
|
File without changes
|
package/lib/services/bookingService/__tests__/bookingsService.manualComputeTotalCost.test.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/services/bookingService/bookingsService.getOccupancyBasedPricingDiscount.test.d.ts
CHANGED
|
File without changes
|
package/lib/services/bookingService/bookingsService.getOccupancyBasedPricingDiscount.test.js
CHANGED
|
File without changes
|
package/lib/services/bookingService/bookingsService.getOccupancyBasedPricingDiscount.test.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,6 +4,14 @@ export declare const calculateDynamicPricing: ({ currentPricing, dynamicPricing,
|
|
|
4
4
|
dynamicPricing: IDynamicPricing;
|
|
5
5
|
existingBasePriceMap: Record<string, number>;
|
|
6
6
|
company: ICompany;
|
|
7
|
+
roomTypeId: string;
|
|
8
|
+
companyId: string;
|
|
9
|
+
getRoomTypesAvailability: (companyId: string, roomTypeIds: string[], options: {
|
|
10
|
+
period: string[];
|
|
11
|
+
}) => Promise<any>;
|
|
12
|
+
getRoomsByCompanyId: (companyId: string) => Promise<{
|
|
13
|
+
list: any[];
|
|
14
|
+
}>;
|
|
7
15
|
}) => Promise<{
|
|
8
16
|
updatedPricing: IRoomTypePricePlanPricingInformation;
|
|
9
17
|
updatedBasePriceMap: Record<string, number>;
|
|
@@ -52,53 +52,44 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
52
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
53
|
exports.calculateDynamicPricing = void 0;
|
|
54
54
|
var moment_1 = __importDefault(require("moment"));
|
|
55
|
-
var dateService_1 = require("../dateService/dateService");
|
|
56
55
|
var calculateDynamicPricing = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
57
|
-
var basePriceMap,
|
|
58
|
-
var
|
|
56
|
+
var basePriceMap, updatedPricing, period, affectedDates, _i, period_1, dateStr, manualPrice, basePrice, isAffected, dynamicPrice, isManuallyOverridden;
|
|
57
|
+
var _c;
|
|
59
58
|
var currentPricing = _b.currentPricing, dynamicPricing = _b.dynamicPricing, existingBasePriceMap = _b.existingBasePriceMap, company = _b.company;
|
|
60
|
-
return __generator(this, function (
|
|
61
|
-
basePriceMap = __assign(
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
return __generator(this, function (_d) {
|
|
60
|
+
basePriceMap = __assign({}, existingBasePriceMap);
|
|
61
|
+
updatedPricing = {};
|
|
62
|
+
period = Object.keys(currentPricing);
|
|
63
|
+
affectedDates = new Set((company.holidays || [])
|
|
64
64
|
.filter(function (h) { return h.enableDynamicPricing; })
|
|
65
65
|
.flatMap(function (h) { return [
|
|
66
66
|
(0, moment_1.default)(h.date).subtract(1, 'day').format('YYYY-MM-DD'),
|
|
67
67
|
(0, moment_1.default)(h.date).format('YYYY-MM-DD'),
|
|
68
68
|
(0, moment_1.default)(h.date).add(1, 'day').format('YYYY-MM-DD'),
|
|
69
69
|
]; }));
|
|
70
|
-
for (_i = 0,
|
|
71
|
-
dateStr =
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
for (_i = 0, period_1 = period; _i < period_1.length; _i++) {
|
|
71
|
+
dateStr = period_1[_i];
|
|
72
|
+
manualPrice = currentPricing[dateStr];
|
|
73
|
+
basePrice = (_c = basePriceMap[dateStr]) !== null && _c !== void 0 ? _c : manualPrice;
|
|
74
|
+
basePriceMap[dateStr] = basePrice;
|
|
75
|
+
isAffected = affectedDates.has(dateStr);
|
|
76
|
+
if (!isAffected) {
|
|
77
|
+
updatedPricing[dateStr] = manualPrice;
|
|
74
78
|
continue;
|
|
75
|
-
current = currentPricing[dateStr];
|
|
76
|
-
base = (_d = basePriceMap[dateStr]) !== null && _d !== void 0 ? _d : current;
|
|
77
|
-
if (!(dateStr in basePriceMap)) {
|
|
78
|
-
basePriceMap[dateStr] = base;
|
|
79
79
|
}
|
|
80
|
-
if (dynamicPricing.isActive
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if (dynamicPricing.amount) {
|
|
84
|
-
if (dynamicPricing.type === 'INCREASE') {
|
|
85
|
-
increasedPrice = baseForToday + dynamicPricing.amount;
|
|
86
|
-
}
|
|
87
|
-
else if (dynamicPricing.type === 'DECREASE') {
|
|
88
|
-
increasedPrice = Math.max(0, baseForToday - dynamicPricing.amount);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
increasedPrice = Math.round(baseForToday * 1.05);
|
|
93
|
-
}
|
|
94
|
-
resultPricing[dateStr] = increasedPrice;
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
resultPricing[dateStr] = base;
|
|
80
|
+
if (!dynamicPricing.isActive) {
|
|
81
|
+
updatedPricing[dateStr] = basePrice;
|
|
82
|
+
continue;
|
|
98
83
|
}
|
|
84
|
+
dynamicPrice = basePrice + (dynamicPricing.amount || Math.round(basePrice * 0.05));
|
|
85
|
+
if (dynamicPrice > basePrice + 70)
|
|
86
|
+
dynamicPrice = basePrice + 70;
|
|
87
|
+
dynamicPrice = Math.round(dynamicPrice);
|
|
88
|
+
isManuallyOverridden = manualPrice !== dynamicPrice;
|
|
89
|
+
updatedPricing[dateStr] = isManuallyOverridden ? manualPrice : dynamicPrice;
|
|
99
90
|
}
|
|
100
91
|
return [2 /*return*/, {
|
|
101
|
-
updatedPricing:
|
|
92
|
+
updatedPricing: updatedPricing,
|
|
102
93
|
updatedBasePriceMap: basePriceMap,
|
|
103
94
|
}];
|
|
104
95
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamicPricingService.js","sourceRoot":"","sources":["../../../src/services/dynamicPricingService/dynamicPricingService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA2B;
|
|
1
|
+
{"version":3,"file":"dynamicPricingService.js","sourceRoot":"","sources":["../../../src/services/dynamicPricingService/dynamicPricingService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA2B;AAGpB,IAAM,uBAAuB,GAAG,iEAAO,EAc7C;;;QAbC,cAAc,oBAAA,EACd,cAAc,oBAAA,EACd,oBAAoB,0BAAA,EACpB,OAAO,aAAA;;QAcD,YAAY,gBAAQ,oBAAoB,CAAE,CAAA;QAC1C,cAAc,GAAyC,EAAE,CAAA;QACzD,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;QAEpC,aAAa,GAAG,IAAI,GAAG,CAC3B,CAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC;aACrB,MAAM,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,oBAAoB,EAAtB,CAAsB,CAAC;aACrC,OAAO,CAAC,UAAC,CAAC,IAAK,OAAA;YACd,IAAA,gBAAM,EAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;YACtD,IAAA,gBAAM,EAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;YACnC,IAAA,gBAAM,EAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;SAClD,EAJe,CAIf,CAAC,CACL,CAAA;QAED,WAA4B,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,EAAE,CAAC;YAApB,OAAO;YACV,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;YACrC,SAAS,GAAG,MAAA,YAAY,CAAC,OAAO,CAAC,mCAAI,WAAW,CAAA;YACtD,YAAY,CAAC,OAAO,CAAC,GAAG,SAAS,CAAA;YAE3B,UAAU,GAAG,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;YAE7C,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,cAAc,CAAC,OAAO,CAAC,GAAG,WAAW,CAAA;gBACrC,SAAQ;YACV,CAAC;YAED,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;gBAC7B,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,CAAA;gBACnC,SAAQ;YACV,CAAC;YAEG,YAAY,GAAG,SAAS,GAAG,CAAC,cAAc,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,CAAA;YACtF,IAAI,YAAY,GAAG,SAAS,GAAG,EAAE;gBAAE,YAAY,GAAG,SAAS,GAAG,EAAE,CAAA;YAChE,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;YAEjC,oBAAoB,GAAG,WAAW,KAAK,YAAY,CAAA;YAEzD,cAAc,CAAC,OAAO,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAA;QAC7E,CAAC;QAED,sBAAO;gBACL,cAAc,gBAAA;gBACd,mBAAmB,EAAE,YAAY;aAClC,EAAA;;KACF,CAAA;AA9DY,QAAA,uBAAuB,2BA8DnC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/services/index.d.ts
CHANGED
|
File without changes
|
package/lib/services/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/services/roomBookingService/__tests__/roomBookingService.distributeGuests.test.d.ts
CHANGED
|
File without changes
|
package/lib/services/roomBookingService/__tests__/roomBookingService.distributeGuests.test.js
CHANGED
|
File without changes
|
package/lib/services/roomBookingService/__tests__/roomBookingService.distributeGuests.test.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|