@doctocar/tooling 0.3.1-16 → 0.3.1-17
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/emails/types/company/CompanyVatRejectedEmailData.type.d.ts +5 -0
- package/dist/emails/types/company/CompanyVatRejectedEmailData.type.js +2 -0
- package/dist/emails/types/company/CompanyVatVerifiedEmailData.type.d.ts +3 -0
- package/dist/emails/types/company/CompanyVatVerifiedEmailData.type.js +2 -0
- package/dist/emails/types/company/index.d.ts +2 -0
- package/dist/emails/types/company/index.js +18 -0
- package/dist/emails/types/customer/CustomerEntityCreatedEmailData.type.d.ts +1 -0
- package/dist/emails/types/customer/CustomerEntityCreatedEmailData.type.js +2 -0
- package/dist/emails/types/customer/CustomerWelcomeEmailData.type.d.ts +1 -0
- package/dist/emails/types/customer/CustomerWelcomeEmailData.type.js +2 -0
- package/dist/emails/types/entity/EntityCreatedEmailData.type.d.ts +1 -0
- package/dist/emails/types/entity/EntityCreatedEmailData.type.js +2 -0
- package/dist/emails/types/professional/ProfessionalOnboardingCompletedEmailData.type.d.ts +1 -0
- package/dist/emails/types/professional/ProfessionalOnboardingCompletedEmailData.type.js +2 -0
- package/dist/errors/enums/cloudFunctions/customers/CreateCustomerVehicleErrorCodes.enum.d.ts +14 -0
- package/dist/errors/enums/cloudFunctions/customers/CreateCustomerVehicleErrorCodes.enum.js +18 -0
- package/dist/errors/enums/cloudFunctions/customers/DeleteCustomerVehicleErrorCodes.enum.d.ts +7 -0
- package/dist/errors/enums/cloudFunctions/customers/DeleteCustomerVehicleErrorCodes.enum.js +11 -0
- package/dist/errors/enums/cloudFunctions/customers/ProcessCustomerUserOnboardingErrorCodes.enum.d.ts +22 -0
- package/dist/errors/enums/cloudFunctions/customers/ProcessCustomerUserOnboardingErrorCodes.enum.js +26 -0
- package/dist/errors/enums/cloudFunctions/customers/UpdateCustomerVehicleErrorCodes.enum.d.ts +14 -0
- package/dist/errors/enums/cloudFunctions/customers/UpdateCustomerVehicleErrorCodes.enum.js +18 -0
- package/dist/errors/enums/cloudFunctions/customers/index.d.ts +1 -0
- package/dist/errors/enums/cloudFunctions/customers/index.js +17 -0
- package/dist/errors/enums/cloudFunctions/entities/AcceptEntityMemberInviteErrorCodes.enum.d.ts +15 -0
- package/dist/errors/enums/cloudFunctions/entities/AcceptEntityMemberInviteErrorCodes.enum.js +19 -0
- package/dist/errors/enums/cloudFunctions/orders/ProfessionalUserDeleteOrderServicePhotosErrorCodes.enum.d.ts +9 -0
- package/dist/errors/enums/cloudFunctions/orders/ProfessionalUserDeleteOrderServicePhotosErrorCodes.enum.js +13 -0
- package/dist/errors/enums/cloudFunctions/orders/ProfessionalUserUploadOrderServicePhotosErrorCodes.enum.d.ts +13 -0
- package/dist/errors/enums/cloudFunctions/orders/ProfessionalUserUploadOrderServicePhotosErrorCodes.enum.js +17 -0
- package/dist/errors/enums/cloudFunctions/professionals/CreateProfessionalUserSlotDocumentErrorCodes.enum.d.ts +4 -0
- package/dist/errors/enums/cloudFunctions/professionals/CreateProfessionalUserSlotDocumentErrorCodes.enum.js +8 -0
- package/dist/errors/enums/cloudFunctions/professionals/ProcessProfessionalUserOnboardingBaseCompanyInfosErrorCodes.enum.d.ts +20 -0
- package/dist/errors/enums/cloudFunctions/professionals/ProcessProfessionalUserOnboardingBaseCompanyInfosErrorCodes.enum.js +24 -0
- package/dist/errors/enums/cloudFunctions/professionals/UpdateProfessionalUserLiabilityInsuranceErrorCodes.enum.d.ts +8 -0
- package/dist/errors/enums/cloudFunctions/professionals/UpdateProfessionalUserLiabilityInsuranceErrorCodes.enum.js +12 -0
- package/dist/errors/enums/cloudFunctions/professionals/UpdateProfessionalUserServicesLocationErrorCodes.enum.d.ts +8 -0
- package/dist/errors/enums/cloudFunctions/professionals/UpdateProfessionalUserServicesLocationErrorCodes.enum.js +12 -0
- package/dist/errors/enums/cloudFunctions/professionals/UpdateProfessionalUserSlotDocumentErrorCodes.enum.d.ts +4 -0
- package/dist/errors/enums/cloudFunctions/professionals/UpdateProfessionalUserSlotDocumentErrorCodes.enum.js +8 -0
- package/dist/errors/enums/cloudFunctions/professionals/index.d.ts +4 -0
- package/dist/errors/enums/cloudFunctions/professionals/index.js +20 -0
- package/dist/errors/enums/cloudFunctions/serviceProviderUsers/ProcessServiceProviderUserOnboardingBaseCompanyInfosErrorCodes.enum.d.ts +20 -0
- package/dist/errors/enums/cloudFunctions/serviceProviderUsers/ProcessServiceProviderUserOnboardingBaseCompanyInfosErrorCodes.enum.js +24 -0
- package/dist/firebase/cloudFunctions/types/entities/AcceptEntityMemberInviteRequestData.type.d.ts +4 -0
- package/dist/firebase/cloudFunctions/types/entities/AcceptEntityMemberInviteRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/entities/AcceptEntityMemberInviteResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/entities/AcceptEntityMemberInviteResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/entities/CreateEntityMemberInvitePayload.type.d.ts +8 -0
- package/dist/firebase/cloudFunctions/types/entities/CreateEntityMemberInvitePayload.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/googlePlace/autocomplete/GooglePlaceAutocompleteSuggestion.type.d.ts +11 -0
- package/dist/firebase/cloudFunctions/types/googlePlace/autocomplete/GooglePlaceAutocompleteSuggestion.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/orders/ProfessionalUserDeleteOrderServicePhotosRequestData.type.d.ts +8 -0
- package/dist/firebase/cloudFunctions/types/orders/ProfessionalUserDeleteOrderServicePhotosRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/orders/ProfessionalUserDeleteOrderServicePhotosResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/orders/ProfessionalUserDeleteOrderServicePhotosResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/orders/ProfessionalUserUploadOrderServicePhotosRequestData.type.d.ts +8 -0
- package/dist/firebase/cloudFunctions/types/orders/ProfessionalUserUploadOrderServicePhotosRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/orders/ProfessionalUserUploadOrderServicePhotosResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/orders/ProfessionalUserUploadOrderServicePhotosResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/stripe/CreateStripeUserAccountLinkRequestData.type.d.ts +5 -0
- package/dist/firebase/cloudFunctions/types/stripe/CreateStripeUserAccountLinkRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/stripe/CreateStripeUserAccountLinkResponseData.type.d.ts +8 -0
- package/dist/firebase/cloudFunctions/types/stripe/CreateStripeUserAccountLinkResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/AcceptEntityInviteRequestData.type.d.ts +4 -0
- package/dist/firebase/cloudFunctions/types/users/AcceptEntityInviteRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/AcceptEntityInviteResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/users/AcceptEntityInviteResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/customers/CreateCustomerVehicleRequestData.type.d.ts +11 -0
- package/dist/firebase/cloudFunctions/types/users/customers/CreateCustomerVehicleRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/customers/CreateCustomerVehicleResponseData.type.d.ts +3 -0
- package/dist/firebase/cloudFunctions/types/users/customers/CreateCustomerVehicleResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/customers/DeleteCustomerVehicleRequestData.type.d.ts +4 -0
- package/dist/firebase/cloudFunctions/types/users/customers/DeleteCustomerVehicleRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/customers/DeleteCustomerVehicleResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/users/customers/DeleteCustomerVehicleResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/customers/ProcessCustomerUserOnboardingRequestData.type.d.ts +15 -0
- package/dist/firebase/cloudFunctions/types/users/customers/ProcessCustomerUserOnboardingRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/customers/ProcessCustomerUserOnboardingResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/users/customers/ProcessCustomerUserOnboardingResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/customers/UpdateCustomerVehicleRequestData.type.d.ts +12 -0
- package/dist/firebase/cloudFunctions/types/users/customers/UpdateCustomerVehicleRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/customers/UpdateCustomerVehicleResponseData.type.d.ts +3 -0
- package/dist/firebase/cloudFunctions/types/users/customers/UpdateCustomerVehicleResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/customers/index.d.ts +6 -0
- package/dist/firebase/cloudFunctions/types/users/customers/index.js +22 -0
- package/dist/firebase/cloudFunctions/types/users/customers/processCustomerUserOnboarding/ProcessCustomerUserOnboardingPayload.type.d.ts +14 -0
- package/dist/firebase/cloudFunctions/types/users/customers/processCustomerUserOnboarding/ProcessCustomerUserOnboardingPayload.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/customers/processCustomerUserOnboarding/ProcessCustomerUserOnboardingRequestData.type.d.ts +3 -0
- package/dist/firebase/cloudFunctions/types/users/customers/processCustomerUserOnboarding/ProcessCustomerUserOnboardingRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/customers/processCustomerUserOnboarding/ProcessCustomerUserOnboardingResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/users/customers/processCustomerUserOnboarding/ProcessCustomerUserOnboardingResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/customers/processCustomerUserOnboarding/index.d.ts +3 -0
- package/dist/firebase/cloudFunctions/types/users/customers/processCustomerUserOnboarding/index.js +19 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/CreateProfessionalUserPublicDocumentRequestData.type.d.ts +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/CreateProfessionalUserPublicDocumentRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/CreateProfessionalUserPublicDocumentResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/CreateProfessionalUserPublicDocumentResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/DeleteProfessionalUserServiceRequestData.type.d.ts +5 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/DeleteProfessionalUserServiceRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/DeleteProfessionalUserServiceResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/DeleteProfessionalUserServiceResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/DeleteProfessionalUserSlotDocumentRequestData.type.d.ts +4 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/DeleteProfessionalUserSlotDocumentRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/DeleteProfessionalUserSlotDocumentResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/DeleteProfessionalUserSlotDocumentResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/ProcessProfessionalUserOnboardingBaseCompanyInfosRequestData.type.d.ts +14 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/ProcessProfessionalUserOnboardingBaseCompanyInfosRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/ProcessProfessionalUserOnboardingBaseCompanyInfosResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/ProcessProfessionalUserOnboardingBaseCompanyInfosResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserLiabilityInsuranceRequestData.type.d.ts +4 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserLiabilityInsuranceRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserLiabilityInsuranceResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserLiabilityInsuranceResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserServiceRequestData.type.d.ts +5 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserServiceRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserServiceResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserServiceResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserServicesLocationRequestData.type.d.ts +5 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserServicesLocationRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserServicesLocationResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserServicesLocationResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserTermsAcceptanceRequestData.type.d.ts +15 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserTermsAcceptanceRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserTermsAcceptanceResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/UpdateProfessionalUserTermsAcceptanceResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/index.d.ts +11 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/index.js +27 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/CreateProfessionalUserSlotDocumentRequestData.type.d.ts +5 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/CreateProfessionalUserSlotDocumentRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/CreateProfessionalUserSlotDocumentResponseData.type.d.ts +3 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/CreateProfessionalUserSlotDocumentResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/RequestOneTimeSlot.type.d.ts +8 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/RequestOneTimeSlot.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/RequestRecurringSlot.type.d.ts +6 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/RequestRecurringSlot.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/RequestSlotDocument.type.d.ts +4 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/RequestSlotDocument.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/RequestTimeOffSlot.type.d.ts +8 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/RequestTimeOffSlot.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/UpdateProfessionalUserSlotDocumentRequestData.type.d.ts +6 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/UpdateProfessionalUserSlotDocumentRequestData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/UpdateProfessionalUserSlotDocumentResponseData.type.d.ts +1 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/UpdateProfessionalUserSlotDocumentResponseData.type.js +2 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/index.d.ts +5 -0
- package/dist/firebase/cloudFunctions/types/users/professionals/slots/index.js +21 -0
- package/dist/firebase/firestore/constants/maximumCustomerVehicles.constant.d.ts +1 -0
- package/dist/firebase/firestore/constants/maximumCustomerVehicles.constant.js +4 -0
- package/dist/firebase/firestore/constants/minimumCustomerVehicles.constant.d.ts +1 -0
- package/dist/firebase/firestore/constants/minimumCustomerVehicles.constant.js +4 -0
- package/dist/firebase/firestore/constants/orders/index.d.ts +2 -0
- package/dist/firebase/firestore/constants/orders/index.js +18 -0
- package/dist/firebase/firestore/constants/orders/orderIdPrefix.constant.d.ts +1 -0
- package/dist/firebase/firestore/constants/orders/orderIdPrefix.constant.js +4 -0
- package/dist/firebase/firestore/constants/orders/productionOrderIdPrefix.constant.d.ts +1 -0
- package/dist/firebase/firestore/constants/orders/productionOrderIdPrefix.constant.js +4 -0
- package/dist/firebase/firestore/constants/orders/sandboxOrderIdPrefix.constant.d.ts +1 -0
- package/dist/firebase/firestore/constants/orders/sandboxOrderIdPrefix.constant.js +4 -0
- package/dist/firebase/firestore/enums/documents/DocumentValidationStatus.enum.d.ts +5 -0
- package/dist/firebase/firestore/enums/documents/DocumentValidationStatus.enum.js +9 -0
- package/dist/firebase/firestore/enums/documents/index.d.ts +1 -0
- package/dist/firebase/firestore/enums/documents/index.js +17 -0
- package/dist/firebase/firestore/enums/entities/EntityServiceProviderComplianceStatus.enum.d.ts +4 -0
- package/dist/firebase/firestore/enums/entities/EntityServiceProviderComplianceStatus.enum.js +8 -0
- package/dist/firebase/firestore/enums/entities/EntityServiceProviderNonBookableReason.enum.d.ts +16 -0
- package/dist/firebase/firestore/enums/entities/EntityServiceProviderNonBookableReason.enum.js +20 -0
- package/dist/firebase/firestore/enums/orders/OrderProfessionalServiceDetailsPhotoMoment.enum.d.ts +4 -0
- package/dist/firebase/firestore/enums/orders/OrderProfessionalServiceDetailsPhotoMoment.enum.js +8 -0
- package/dist/firebase/firestore/enums/orders/OrderServiceDetailsPhotoContext.enum.d.ts +4 -0
- package/dist/firebase/firestore/enums/orders/OrderServiceDetailsPhotoContext.enum.js +8 -0
- package/dist/firebase/firestore/enums/orders/OrderServiceProviderCancellationReason.enum.d.ts +9 -0
- package/dist/firebase/firestore/enums/orders/OrderServiceProviderCancellationReason.enum.js +13 -0
- package/dist/firebase/firestore/enums/professionalUser/ProfessionalNonBookableReason.enum.d.ts +13 -0
- package/dist/firebase/firestore/enums/professionalUser/ProfessionalNonBookableReason.enum.js +17 -0
- package/dist/firebase/firestore/enums/professionalUser/index.d.ts +1 -0
- package/dist/firebase/firestore/enums/professionalUser/index.js +17 -0
- package/dist/firebase/firestore/enums/serviceProviderUsers/ServiceProviderUserComplianceStatus.enum.d.ts +4 -0
- package/dist/firebase/firestore/enums/serviceProviderUsers/ServiceProviderUserComplianceStatus.enum.js +8 -0
- package/dist/firebase/firestore/enums/serviceProviderUsers/ServiceProviderUserNonBookableReason.enum.d.ts +6 -0
- package/dist/firebase/firestore/enums/serviceProviderUsers/ServiceProviderUserNonBookableReason.enum.js +10 -0
- package/dist/firebase/firestore/enums/services/ProfessionalServicesCategoryTypes.enum.d.ts +3 -0
- package/dist/firebase/firestore/enums/services/ProfessionalServicesCategoryTypes.enum.js +7 -0
- package/dist/firebase/firestore/enums/services/ProfessionalServicesTypes.enum.d.ts +10 -0
- package/dist/firebase/firestore/enums/services/ProfessionalServicesTypes.enum.js +16 -0
- package/dist/firebase/firestore/enums/users/customers/CustomerAccountTypes.enum.d.ts +4 -0
- package/dist/firebase/firestore/enums/users/customers/CustomerAccountTypes.enum.js +8 -0
- package/dist/firebase/firestore/enums/users/customers/index.d.ts +1 -0
- package/dist/firebase/firestore/enums/users/customers/index.js +17 -0
- package/dist/firebase/firestore/enums/users/professionals/ProfessionalOnboardingStepNames.enum.d.ts +6 -0
- package/dist/firebase/firestore/enums/users/professionals/ProfessionalOnboardingStepNames.enum.js +10 -0
- package/dist/firebase/firestore/enums/users/professionals/ProfessionalOnboardingStepStatus.enum.d.ts +5 -0
- package/dist/firebase/firestore/enums/users/professionals/ProfessionalOnboardingStepStatus.enum.js +9 -0
- package/dist/firebase/firestore/types/company/CompanyLegalRepresentative.type.d.ts +6 -0
- package/dist/firebase/firestore/types/company/CompanyLegalRepresentative.type.js +2 -0
- package/dist/firebase/firestore/types/company/CompanyRegistrationPerCountry.type.d.ts +5 -0
- package/dist/firebase/firestore/types/company/CompanyRegistrationPerCountry.type.js +2 -0
- package/dist/firebase/firestore/types/company/CompanyVATDetails.type.d.ts +15 -0
- package/dist/firebase/firestore/types/company/CompanyVATDetails.type.js +2 -0
- package/dist/firebase/firestore/types/company/CustomerCompanyDetails.type.d.ts +7 -0
- package/dist/firebase/firestore/types/company/CustomerCompanyDetails.type.js +2 -0
- package/dist/firebase/firestore/types/company/ProfessionalCompanyDetails.type.d.ts +11 -0
- package/dist/firebase/firestore/types/company/ProfessionalCompanyDetails.type.js +2 -0
- package/dist/firebase/firestore/types/companyUnique/FirestoreCompanyUniqueDocument.type.d.ts +6 -0
- package/dist/firebase/firestore/types/companyUnique/FirestoreCompanyUniqueDocument.type.js +2 -0
- package/dist/firebase/firestore/types/companyUnique/index.d.ts +1 -0
- package/dist/firebase/firestore/types/companyUnique/index.js +17 -0
- package/dist/firebase/firestore/types/entities/EntityRegistration.enum.d.ts +6 -0
- package/dist/firebase/firestore/types/entities/EntityRegistration.enum.js +2 -0
- package/dist/firebase/firestore/types/order/FirestoreOrderProfessionalServiceDetails.type.d.ts +10 -0
- package/dist/firebase/firestore/types/order/FirestoreOrderProfessionalServiceDetails.type.js +2 -0
- package/dist/firebase/firestore/types/order/publicAssets/FirestoreOrderClientProfessionalServicesDetailsPublicImagesUrls.type.d.ts +5 -0
- package/dist/firebase/firestore/types/order/publicAssets/FirestoreOrderClientProfessionalServicesDetailsPublicImagesUrls.type.js +2 -0
- package/dist/firebase/firestore/types/order/publicAssets/FirestoreOrderClientPublicImagesUrlsProfessionalServiceDetailPhotos.type.d.ts +3 -0
- package/dist/firebase/firestore/types/order/publicAssets/FirestoreOrderClientPublicImagesUrlsProfessionalServiceDetailPhotos.type.js +2 -0
- package/dist/firebase/firestore/types/order/snapshots/EntitySnapshotForOrder.type.d.ts +26 -0
- package/dist/firebase/firestore/types/order/snapshots/EntitySnapshotForOrder.type.js +2 -0
- package/dist/firebase/firestore/types/serviceProviderPublicDocument/FirestoreServiceProviderPublicDocument.type.d.ts +46 -0
- package/dist/firebase/firestore/types/serviceProviderPublicDocument/FirestoreServiceProviderPublicDocument.type.js +2 -0
- package/dist/firebase/firestore/types/serviceProviderPublicDocument/FirestoreServiceProviderPublicDocumentReviewAggregates.type.d.ts +4 -0
- package/dist/firebase/firestore/types/serviceProviderPublicDocument/FirestoreServiceProviderPublicDocumentReviewAggregates.type.js +2 -0
- package/dist/firebase/firestore/types/serviceProviderPublicDocument/FirestoreServiceProviderPublicDocumentServicesLocation.type.d.ts +4 -0
- package/dist/firebase/firestore/types/serviceProviderPublicDocument/FirestoreServiceProviderPublicDocumentServicesLocation.type.js +2 -0
- package/dist/firebase/firestore/types/serviceProviderPublicDocument/index.d.ts +3 -0
- package/dist/firebase/firestore/types/serviceProviderPublicDocument/index.js +19 -0
- package/dist/firebase/firestore/types/serviceProviderUsersPublicDocument/FirestoreServiceProviderUserPublicDocument.type.d.ts +46 -0
- package/dist/firebase/firestore/types/serviceProviderUsersPublicDocument/FirestoreServiceProviderUserPublicDocument.type.js +2 -0
- package/dist/firebase/firestore/types/serviceProviderUsersPublicDocument/FirestoreServiceProviderUserPublicDocumentReviewAggregates.type.d.ts +4 -0
- package/dist/firebase/firestore/types/serviceProviderUsersPublicDocument/FirestoreServiceProviderUserPublicDocumentReviewAggregates.type.js +2 -0
- package/dist/firebase/firestore/types/serviceProviderUsersPublicDocument/FirestoreServiceProviderUserPublicDocumentServicesLocation.type.d.ts +4 -0
- package/dist/firebase/firestore/types/serviceProviderUsersPublicDocument/FirestoreServiceProviderUserPublicDocumentServicesLocation.type.js +2 -0
- package/dist/firebase/firestore/types/serviceProviderUsersPublicDocument/index.d.ts +3 -0
- package/dist/firebase/firestore/types/serviceProviderUsersPublicDocument/index.js +19 -0
- package/dist/firebase/firestore/types/services/ServiceProviderServiceDetails.type.d.ts +8 -0
- package/dist/firebase/firestore/types/services/ServiceProviderServiceDetails.type.js +2 -0
- package/dist/firebase/firestore/types/userDocument/FirestoreUserDocumentCustomerInfos.type.d.ts +44 -0
- package/dist/firebase/firestore/types/userDocument/FirestoreUserDocumentCustomerInfos.type.js +2 -0
- package/dist/firebase/firestore/types/userDocument/FirestoreUserDocumentProfessionalInfos.type.d.ts +78 -0
- package/dist/firebase/firestore/types/userDocument/FirestoreUserDocumentProfessionalInfos.type.js +3 -0
- package/dist/firebase/firestore/types/userPublicDocument/FirestoreServiceProviderPublicDocument.type.d.ts +46 -0
- package/dist/firebase/firestore/types/userPublicDocument/FirestoreServiceProviderPublicDocument.type.js +2 -0
- package/dist/firebase/firestore/types/userPublicDocument/FirestoreServiceProviderPublicDocumentReviewAggregates.type.d.ts +4 -0
- package/dist/firebase/firestore/types/userPublicDocument/FirestoreServiceProviderPublicDocumentReviewAggregates.type.js +2 -0
- package/dist/firebase/firestore/types/userPublicDocument/FirestoreServiceProviderPublicDocumentServicesLocation.type.d.ts +4 -0
- package/dist/firebase/firestore/types/userPublicDocument/FirestoreServiceProviderPublicDocumentServicesLocation.type.js +2 -0
- package/dist/firebase/firestore/utils/company/__tests__/entityDocumentSupportsOrganizationMembers.util.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/company/__tests__/entityDocumentSupportsOrganizationMembers.util.test.js +56 -0
- package/dist/firebase/firestore/utils/company/__tests__/isIndividualCompany.util.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/company/__tests__/isIndividualCompany.util.test.js +52 -0
- package/dist/firebase/firestore/utils/company/entityDocumentSupportsOrganizationMembers.util.d.ts +6 -0
- package/dist/firebase/firestore/utils/company/entityDocumentSupportsOrganizationMembers.util.js +20 -0
- package/dist/firebase/firestore/utils/company/index.d.ts +1 -0
- package/dist/firebase/firestore/utils/company/index.js +17 -0
- package/dist/firebase/firestore/utils/company/isIndividualCompany.util.d.ts +2 -0
- package/dist/firebase/firestore/utils/company/isIndividualCompany.util.js +19 -0
- package/dist/firebase/firestore/utils/dataValidators/company/__tests__/isCompanyVatValid.util.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/dataValidators/company/__tests__/isCompanyVatValid.util.test.js +30 -0
- package/dist/firebase/firestore/utils/dataValidators/company/__tests__/isLegalAddressValid.util.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/dataValidators/company/__tests__/isLegalAddressValid.util.test.js +24 -0
- package/dist/firebase/firestore/utils/dataValidators/company/isCompanyVatValid.util.d.ts +2 -0
- package/dist/firebase/firestore/utils/dataValidators/company/isCompanyVatValid.util.js +10 -0
- package/dist/firebase/firestore/utils/dataValidators/company/isLegalAddressValid.util.d.ts +2 -0
- package/dist/firebase/firestore/utils/dataValidators/company/isLegalAddressValid.util.js +7 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/__tests__/isValidProfessionalService.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/__tests__/isValidProfessionalService.test.js +177 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/__tests__/isValidProfessionalServicePricingAndDurationForVehicle.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/__tests__/isValidProfessionalServicePricingAndDurationForVehicle.test.js +129 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/__tests__/isValidProfessionalServiceType.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/__tests__/isValidProfessionalServiceType.test.js +15 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/__tests__/isValidServicePricingAndDurationForVehicle.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/__tests__/isValidServicePricingAndDurationForVehicle.test.js +136 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/__tests__/isValidVehicleForProfessionalService.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/__tests__/isValidVehicleForProfessionalService.test.js +32 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/index.d.ts +3 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/index.js +19 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/isValidProfessionalService.d.ts +2 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/isValidProfessionalService.js +44 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/isValidProfessionalServicePricingAndDurationForVehicle.d.ts +2 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/isValidProfessionalServicePricingAndDurationForVehicle.js +25 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/isValidProfessionalServiceType.d.ts +2 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/isValidProfessionalServiceType.js +7 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/isValidServicePricingAndDurationForVehicle.d.ts +2 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/isValidServicePricingAndDurationForVehicle.js +29 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/isValidVehicleForProfessionalService.d.ts +2 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/isValidVehicleForProfessionalService.js +11 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/types/IsValidProfessionalServiceParams.type.d.ts +6 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/types/IsValidProfessionalServiceParams.type.js +2 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/types/IsValidProfessionalServicePricingAndDurationForVehicleParams.type.d.ts +5 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/types/IsValidProfessionalServicePricingAndDurationForVehicleParams.type.js +2 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/types/IsValidServicePricingAndDurationForVehicleParams.type.d.ts +5 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/types/IsValidServicePricingAndDurationForVehicleParams.type.js +2 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/types/IsValidVehicleForProfessionalServiceParams.type.d.ts +6 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/types/IsValidVehicleForProfessionalServiceParams.type.js +2 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/types/index.d.ts +3 -0
- package/dist/firebase/firestore/utils/dataValidators/professionalService/types/index.js +19 -0
- package/dist/firebase/firestore/utils/dataValidators/services/types/IsValidVehicleForProfessionalServiceParams.type.d.ts +6 -0
- package/dist/firebase/firestore/utils/dataValidators/services/types/IsValidVehicleForProfessionalServiceParams.type.js +2 -0
- package/dist/firebase/firestore/utils/entities/__tests__/entityDocumentSupportsOrganizationMembers.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/entities/__tests__/entityDocumentSupportsOrganizationMembers.test.js +56 -0
- package/dist/firebase/firestore/utils/entities/__tests__/entityDocumentSupportsOrganizationMembers.util.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/entities/__tests__/entityDocumentSupportsOrganizationMembers.util.test.js +56 -0
- package/dist/firebase/firestore/utils/entities/entityDocumentSupportsOrganizationMembers.d.ts +6 -0
- package/dist/firebase/firestore/utils/entities/entityDocumentSupportsOrganizationMembers.js +20 -0
- package/dist/firebase/firestore/utils/entities/entityDocumentSupportsOrganizationMembers.util.d.ts +6 -0
- package/dist/firebase/firestore/utils/entities/entityDocumentSupportsOrganizationMembers.util.js +20 -0
- package/dist/firebase/firestore/utils/order/__tests__/buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails.service.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/order/__tests__/buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails.service.test.js +261 -0
- package/dist/firebase/firestore/utils/order/__tests__/buildOrderServicePreTaxLinesAndProfessionalServicesDetails.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/order/__tests__/buildOrderServicePreTaxLinesAndProfessionalServicesDetails.test.js +259 -0
- package/dist/firebase/firestore/utils/order/__tests__/getOrderCustomerAndProfessionalIds.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/order/__tests__/getOrderCustomerAndProfessionalIds.test.js +27 -0
- package/dist/firebase/firestore/utils/order/buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails.utils.d.ts +2 -0
- package/dist/firebase/firestore/utils/order/buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails.utils.js +49 -0
- package/dist/firebase/firestore/utils/order/buildOrderServicePreTaxLinesAndProfessionalServicesDetails.d.ts +2 -0
- package/dist/firebase/firestore/utils/order/buildOrderServicePreTaxLinesAndProfessionalServicesDetails.js +48 -0
- package/dist/firebase/firestore/utils/order/getOrderCustomerAndProfessionalIds.d.ts +2 -0
- package/dist/firebase/firestore/utils/order/getOrderCustomerAndProfessionalIds.js +9 -0
- package/dist/firebase/firestore/utils/order/types/BuildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetailsProps.type.d.ts +8 -0
- package/dist/firebase/firestore/utils/order/types/BuildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetailsProps.type.js +2 -0
- package/dist/firebase/firestore/utils/order/types/BuildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetailsReturn.type.d.ts +6 -0
- package/dist/firebase/firestore/utils/order/types/BuildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetailsReturn.type.js +2 -0
- package/dist/firebase/firestore/utils/order/types/GetOrderCustomerAndProfessionalIdsParams.type.d.ts +4 -0
- package/dist/firebase/firestore/utils/order/types/GetOrderCustomerAndProfessionalIdsParams.type.js +2 -0
- package/dist/firebase/firestore/utils/order/types/GetOrderCustomerAndProfessionalIdsResult.type.d.ts +4 -0
- package/dist/firebase/firestore/utils/order/types/GetOrderCustomerAndProfessionalIdsResult.type.js +2 -0
- package/dist/firebase/firestore/utils/services/__tests__/areAllRequestedProfessionalUserServicesActiveForVehicleType.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/services/__tests__/areAllRequestedProfessionalUserServicesActiveForVehicleType.test.js +145 -0
- package/dist/firebase/firestore/utils/services/__tests__/createProfessionalServiceVehicleComboKey.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/services/__tests__/createProfessionalServiceVehicleComboKey.test.js +12 -0
- package/dist/firebase/firestore/utils/services/__tests__/createProfessionalServiceVehicleComboKey.util.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/services/__tests__/createProfessionalServiceVehicleComboKey.util.test.js +12 -0
- package/dist/firebase/firestore/utils/services/__tests__/getActiveProfessionalServicePricingAndDurationForVehicleOrThrow.util.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/services/__tests__/getActiveProfessionalServicePricingAndDurationForVehicleOrThrow.util.test.js +225 -0
- package/dist/firebase/firestore/utils/services/__tests__/getActiveServicePricingAndDurationForVehicleOrThrow.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/services/__tests__/getActiveServicePricingAndDurationForVehicleOrThrow.test.js +225 -0
- package/dist/firebase/firestore/utils/services/__tests__/getActiveServiceProviderServicePricingAndDurationForVehicleOrThrow.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/services/__tests__/getActiveServiceProviderServicePricingAndDurationForVehicleOrThrow.test.js +225 -0
- package/dist/firebase/firestore/utils/services/__tests__/getAvailableServiceProviderServicesForVehicleType.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/services/__tests__/getAvailableServiceProviderServicesForVehicleType.test.js +295 -0
- package/dist/firebase/firestore/utils/services/areAllRequestedProfessionalUserServicesActiveForVehicleType.d.ts +2 -0
- package/dist/firebase/firestore/utils/services/areAllRequestedProfessionalUserServicesActiveForVehicleType.js +14 -0
- package/dist/firebase/firestore/utils/services/areAllRequestedProfessionalUserServicesActiveForVehicleType.util.d.ts +2 -0
- package/dist/firebase/firestore/utils/services/areAllRequestedProfessionalUserServicesActiveForVehicleType.util.js +14 -0
- package/dist/firebase/firestore/utils/services/computeTotalProfessionalServiceDurationInMinutesForVehicleType.util.d.ts +2 -0
- package/dist/firebase/firestore/utils/services/computeTotalProfessionalServiceDurationInMinutesForVehicleType.util.js +16 -0
- package/dist/firebase/firestore/utils/services/createProfessionalServiceVehicleComboKey.d.ts +2 -0
- package/dist/firebase/firestore/utils/services/createProfessionalServiceVehicleComboKey.js +6 -0
- package/dist/firebase/firestore/utils/services/createProfessionalServiceVehicleComboKey.util.d.ts +2 -0
- package/dist/firebase/firestore/utils/services/createProfessionalServiceVehicleComboKey.util.js +6 -0
- package/dist/firebase/firestore/utils/services/getActiveProfessionalServicePricingAndDurationForVehicleOrThrow.d.ts +3 -0
- package/dist/firebase/firestore/utils/services/getActiveProfessionalServicePricingAndDurationForVehicleOrThrow.js +19 -0
- package/dist/firebase/firestore/utils/services/getActiveServicePricingAndDurationForVehicleOrThrow.d.ts +3 -0
- package/dist/firebase/firestore/utils/services/getActiveServicePricingAndDurationForVehicleOrThrow.js +19 -0
- package/dist/firebase/firestore/utils/services/getActiveServiceProviderServicePricingAndDurationForVehicleOrThrow.d.ts +3 -0
- package/dist/firebase/firestore/utils/services/getActiveServiceProviderServicePricingAndDurationForVehicleOrThrow.js +19 -0
- package/dist/firebase/firestore/utils/services/getAvailableServiceProviderServicesForVehicleType.d.ts +6 -0
- package/dist/firebase/firestore/utils/services/getAvailableServiceProviderServicesForVehicleType.js +29 -0
- package/dist/firebase/firestore/utils/services/getAvailableServiceProviderServicesTypesForVehicleType.d.ts +6 -0
- package/dist/firebase/firestore/utils/services/getAvailableServiceProviderServicesTypesForVehicleType.js +31 -0
- package/dist/firebase/firestore/utils/services/types/AreAllRequestedProfessionalUserServicesActiveForVehicleTypeArgs.type..d.ts +7 -0
- package/dist/firebase/firestore/utils/services/types/AreAllRequestedProfessionalUserServicesActiveForVehicleTypeArgs.type..js +2 -0
- package/dist/firebase/firestore/utils/services/types/GetActiveProfessionalServicePricingAndDurationForVehicleOrThrowParams.type.d.ts +7 -0
- package/dist/firebase/firestore/utils/services/types/GetActiveProfessionalServicePricingAndDurationForVehicleOrThrowParams.type.js +2 -0
- package/dist/firebase/firestore/utils/services/types/GetActiveServicePricingAndDurationForVehicleOrThrowParams.type.d.ts +7 -0
- package/dist/firebase/firestore/utils/services/types/GetActiveServicePricingAndDurationForVehicleOrThrowParams.type.js +2 -0
- package/dist/firebase/firestore/utils/services/types/GetActiveServiceProviderServicePricingAndDurationForVehicleOrThrowParams.type.d.ts +7 -0
- package/dist/firebase/firestore/utils/services/types/GetActiveServiceProviderServicePricingAndDurationForVehicleOrThrowParams.type.js +2 -0
- package/dist/firebase/firestore/utils/services/types/GetAvailableServiceProviderServicesForVehicleTypeParams.type.d.ts +7 -0
- package/dist/firebase/firestore/utils/services/types/GetAvailableServiceProviderServicesForVehicleTypeParams.type.js +2 -0
- package/dist/firebase/firestore/utils/services/types/GetAvailableServiceProviderServicesTypesForVehicleTypeParams.type.d.ts +7 -0
- package/dist/firebase/firestore/utils/services/types/GetAvailableServiceProviderServicesTypesForVehicleTypeParams.type.js +2 -0
- package/dist/firebase/firestore/utils/stubs/company/customerCompanyDetailsStub.d.ts +2 -0
- package/dist/firebase/firestore/utils/stubs/company/customerCompanyDetailsStub.js +21 -0
- package/dist/firebase/firestore/utils/stubs/company/professionalCompanyDetailsStub.d.ts +2 -0
- package/dist/firebase/firestore/utils/stubs/company/professionalCompanyDetailsStub.js +32 -0
- package/dist/firebase/firestore/utils/stubs/order/firestoreOrderClientProfessionalServicesDetailsPublicImagesUrlsStub.d.ts +2 -0
- package/dist/firebase/firestore/utils/stubs/order/firestoreOrderClientProfessionalServicesDetailsPublicImagesUrlsStub.js +25 -0
- package/dist/firebase/firestore/utils/stubs/order/firestoreOrderProfessionalServiceDetailsStub.d.ts +2 -0
- package/dist/firebase/firestore/utils/stubs/order/firestoreOrderProfessionalServiceDetailsStub.js +18 -0
- package/dist/firebase/firestore/utils/stubs/serviceProviderPublicDocument/firestoreServiceProviderPublicDocumentStub.d.ts +2 -0
- package/dist/firebase/firestore/utils/stubs/serviceProviderPublicDocument/firestoreServiceProviderPublicDocumentStub.js +36 -0
- package/dist/firebase/firestore/utils/stubs/serviceProviderPublicDocument/index.d.ts +1 -0
- package/dist/firebase/firestore/utils/stubs/serviceProviderPublicDocument/index.js +17 -0
- package/dist/firebase/firestore/utils/stubs/serviceProviderUsersPublicDocument/firestoreServiceProviderUserPublicDocumentStub.d.ts +2 -0
- package/dist/firebase/firestore/utils/stubs/serviceProviderUsersPublicDocument/firestoreServiceProviderUserPublicDocumentStub.js +36 -0
- package/dist/firebase/firestore/utils/stubs/serviceProviderUsersPublicDocument/index.d.ts +1 -0
- package/dist/firebase/firestore/utils/stubs/serviceProviderUsersPublicDocument/index.js +17 -0
- package/dist/firebase/firestore/utils/stubs/services/serviceProviderServiceDetailsStub.d.ts +5 -0
- package/dist/firebase/firestore/utils/stubs/services/serviceProviderServiceDetailsStub.js +21 -0
- package/dist/firebase/firestore/utils/stubs/userDocument/firestoreUserDocumentCustomerInfosStub.d.ts +2 -0
- package/dist/firebase/firestore/utils/stubs/userDocument/firestoreUserDocumentCustomerInfosStub.js +54 -0
- package/dist/firebase/firestore/utils/stubs/userDocument/firestoreUserDocumentProfessionalInfosStub.d.ts +2 -0
- package/dist/firebase/firestore/utils/stubs/userDocument/firestoreUserDocumentProfessionalInfosStub.js +60 -0
- package/dist/firebase/firestore/utils/users/__tests__/assertCustomerUserCanBookServices.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/users/__tests__/assertCustomerUserCanBookServices.test.js +257 -0
- package/dist/firebase/firestore/utils/users/__tests__/assertProfessionalUserIsBookable.util.test.d.ts +1 -0
- package/dist/firebase/firestore/utils/users/__tests__/assertProfessionalUserIsBookable.util.test.js +400 -0
- package/dist/firebase/firestore/utils/users/assertCustomerUserCanBookServices.d.ts +3 -0
- package/dist/firebase/firestore/utils/users/assertCustomerUserCanBookServices.js +58 -0
- package/dist/firebase/firestore/utils/users/assertProfessionalUserIsBookable.util.d.ts +3 -0
- package/dist/firebase/firestore/utils/users/assertProfessionalUserIsBookable.util.js +115 -0
- package/dist/firebase/firestore/utils/users/errors/enums/AssertCustomerUserCanBookServicesErrorCodes.enum.d.ts +7 -0
- package/dist/firebase/firestore/utils/users/errors/enums/AssertCustomerUserCanBookServicesErrorCodes.enum.js +11 -0
- package/dist/firebase/firestore/utils/users/errors/enums/index.d.ts +1 -0
- package/dist/firebase/firestore/utils/users/errors/enums/index.js +17 -0
- package/dist/firebase/firestore/utils/users/errors/index.d.ts +1 -0
- package/dist/firebase/firestore/utils/users/errors/index.js +17 -0
- package/dist/firebase/firestore/utils/users/index.d.ts +3 -0
- package/dist/firebase/firestore/utils/users/index.js +19 -0
- package/dist/firebase/firestore/utils/users/types/BookableProfessionalUserDocument.type.d.ts +35 -0
- package/dist/firebase/firestore/utils/users/types/BookableProfessionalUserDocument.type.js +2 -0
- package/dist/firebase/firestore/utils/users/types/BookingReadyCustomerUserDocument.type.d.ts +13 -0
- package/dist/firebase/firestore/utils/users/types/BookingReadyCustomerUserDocument.type.js +2 -0
- package/dist/firebase/firestore/utils/users/types/index.d.ts +2 -0
- package/dist/firebase/firestore/utils/users/types/index.js +18 -0
- package/dist/firebase/storage/enums/FirebaseStorageProfessionalUsersPublicSubPaths.enum.d.ts +3 -0
- package/dist/firebase/storage/enums/FirebaseStorageProfessionalUsersPublicSubPaths.enum.js +7 -0
- package/dist/gcp/cloudTask/types/OnTaskRecomputeProfessionalBookabilityEnvelope.type.d.ts +4 -0
- package/dist/gcp/cloudTask/types/OnTaskRecomputeProfessionalBookabilityEnvelope.type.js +2 -0
- package/dist/gcp/cloudTask/types/OnTaskRecomputeServiceProviderAvailabilityEnvelope.type.d.ts +4 -0
- package/dist/gcp/cloudTask/types/OnTaskRecomputeServiceProviderAvailabilityEnvelope.type.js +2 -0
- package/dist/gcp/cloudTask/utils/stubs/onTaskRecomputeProfessionalBookabilityEnvelopeStub.d.ts +2 -0
- package/dist/gcp/cloudTask/utils/stubs/onTaskRecomputeProfessionalBookabilityEnvelopeStub.js +19 -0
- package/dist/gcp/cloudTask/utils/stubs/onTaskRecomputeServiceProviderAvailabilityEnvelopeStub.d.ts +2 -0
- package/dist/gcp/cloudTask/utils/stubs/onTaskRecomputeServiceProviderAvailabilityEnvelopeStub.js +19 -0
- package/dist/gcp/enums/GoogleAddressComponentType.enum.d.ts +11 -0
- package/dist/gcp/enums/GoogleAddressComponentType.enum.js +15 -0
- package/dist/gcp/enums/index.d.ts +1 -0
- package/dist/gcp/enums/index.js +17 -0
- package/dist/gcp/geocode/utils/__tests__/getCountryISOCodeFromGoogleGeocodeAddressComponents.util.test.d.ts +1 -0
- package/dist/gcp/geocode/utils/__tests__/getCountryISOCodeFromGoogleGeocodeAddressComponents.util.test.js +34 -0
- package/dist/gcp/geocode/utils/getCountryISOCodeFromGoogleGeocodeAddressComponents.util.d.ts +2 -0
- package/dist/gcp/geocode/utils/getCountryISOCodeFromGoogleGeocodeAddressComponents.util.js +12 -0
- package/dist/gcp/place/enums/PlaceDetailsAddressType.enum.d.ts +11 -0
- package/dist/gcp/place/enums/PlaceDetailsAddressType.enum.js +15 -0
- package/dist/gcp/place/enums/index.d.ts +1 -0
- package/dist/gcp/place/enums/index.js +17 -0
- package/dist/gcp/place/types/PlaceDetailsAddressComponent.type.d.ts +6 -0
- package/dist/gcp/place/types/PlaceDetailsAddressComponent.type.js +2 -0
- package/dist/gcp/place/utils/__tests__/getComponentFromGooglePlaceDetailsAddressComponents.util.test.d.ts +1 -0
- package/dist/gcp/place/utils/__tests__/getComponentFromGooglePlaceDetailsAddressComponents.util.test.js +78 -0
- package/dist/gcp/place/utils/getComponentFromGooglePlaceDetailsAddressComponents.util.d.ts +3 -0
- package/dist/gcp/place/utils/getComponentFromGooglePlaceDetailsAddressComponents.util.js +7 -0
- package/dist/gcp/place/utils/index.d.ts +2 -0
- package/dist/gcp/place/utils/index.js +18 -0
- package/dist/gcp/place/utils/types/GetComponentFromGooglePlaceDetailsAddressComponentsParams.type.d.ts +6 -0
- package/dist/gcp/place/utils/types/GetComponentFromGooglePlaceDetailsAddressComponentsParams.type.js +2 -0
- package/dist/gcp/place/utils/types/index.d.ts +1 -0
- package/dist/gcp/place/utils/types/index.js +17 -0
- package/dist/gcp/pubsub/types/entities/PubSubServiceProviderEntityBookableChangedMessage.type.d.ts +3 -0
- package/dist/gcp/pubsub/types/entities/PubSubServiceProviderEntityBookableChangedMessage.type.js +2 -0
- package/dist/gcp/pubsub/types/entities/PubSubServiceProviderEntityIsNotCompliantAnymoreMessage.type.d.ts +3 -0
- package/dist/gcp/pubsub/types/entities/PubSubServiceProviderEntityIsNotCompliantAnymoreMessage.type.js +2 -0
- package/dist/gcp/pubsub/types/entities/PubSubServiceProviderEntityIsNowCompliantMessage.type.d.ts +3 -0
- package/dist/gcp/pubsub/types/entities/PubSubServiceProviderEntityIsNowCompliantMessage.type.js +2 -0
- package/dist/gcp/pubsub/types/entities/PubSubServiceProviderUserComplianceRecomputeRequestedMessage.type.d.ts +4 -0
- package/dist/gcp/pubsub/types/entities/PubSubServiceProviderUserComplianceRecomputeRequestedMessage.type.js +2 -0
- package/dist/gcp/pubsub/types/serviceProvider/PubSubServiceProviderPublicProfileRecomputeRequestedMessage.type.d.ts +3 -0
- package/dist/gcp/pubsub/types/serviceProvider/PubSubServiceProviderPublicProfileRecomputeRequestedMessage.type.js +2 -0
- package/dist/gcp/pubsub/utils/stubs/entities/pubSubServiceProviderEntityBookableChangedMessageStub.d.ts +2 -0
- package/dist/gcp/pubsub/utils/stubs/entities/pubSubServiceProviderEntityBookableChangedMessageStub.js +9 -0
- package/dist/gcp/pubsub/utils/stubs/entities/pubSubServiceProviderEntityIsNotCompliantAnymoreMessageStub.d.ts +2 -0
- package/dist/gcp/pubsub/utils/stubs/entities/pubSubServiceProviderEntityIsNotCompliantAnymoreMessageStub.js +9 -0
- package/dist/gcp/pubsub/utils/stubs/entities/pubSubServiceProviderEntityIsNowCompliantMessageStub.d.ts +2 -0
- package/dist/gcp/pubsub/utils/stubs/entities/pubSubServiceProviderEntityIsNowCompliantMessageStub.js +9 -0
- package/dist/gcp/pubsub/utils/stubs/entities/pubSubServiceProviderUserComplianceRecomputeRequestedMessageStub.d.ts +2 -0
- package/dist/gcp/pubsub/utils/stubs/entities/pubSubServiceProviderUserComplianceRecomputeRequestedMessageStub.js +10 -0
- package/dist/gcp/pubsub/utils/stubs/serviceProvider/pubSubServiceProviderPublicProfileRecomputeRequestedMessageStub.d.ts +2 -0
- package/dist/gcp/pubsub/utils/stubs/serviceProvider/pubSubServiceProviderPublicProfileRecomputeRequestedMessageStub.js +9 -0
- package/dist/gcp/types/GoogleAddressComponent.type.d.ts +6 -0
- package/dist/gcp/types/GoogleAddressComponent.type.js +2 -0
- package/dist/gcp/types/index.d.ts +1 -0
- package/dist/gcp/types/index.js +17 -0
- package/dist/gcp/utils/__tests__/getGoogleAddressComponentFromAddressComponentsList.test.d.ts +1 -0
- package/dist/gcp/utils/__tests__/getGoogleAddressComponentFromAddressComponentsList.test.js +78 -0
- package/dist/gcp/utils/getGoogleAddressComponentFromAddressComponentsList.d.ts +3 -0
- package/dist/gcp/utils/getGoogleAddressComponentFromAddressComponentsList.js +6 -0
- package/dist/gcp/utils/index.d.ts +2 -0
- package/dist/gcp/utils/index.js +18 -0
- package/dist/gcp/utils/types/GetGoogleAddressComponentFromAddressComponentsListParams.type.d.ts +6 -0
- package/dist/gcp/utils/types/GetGoogleAddressComponentFromAddressComponentsListParams.type.js +2 -0
- package/dist/gcp/utils/types/index.d.ts +1 -0
- package/dist/gcp/utils/types/index.js +17 -0
- package/dist/notifications/enums/CompanyNotificationEventType.d.ts +4 -0
- package/dist/notifications/enums/CompanyNotificationEventType.js +8 -0
- package/dist/notifications/enums/NotificationChannels.enum.d.ts +5 -0
- package/dist/notifications/enums/NotificationChannels.enum.js +9 -0
- package/dist/notifications/pushNotifications/enums/CompanyPushNotificationType.d.ts +4 -0
- package/dist/notifications/pushNotifications/enums/CompanyPushNotificationType.js +8 -0
- package/dist/notifications/pushNotifications/maps/CompanyPushNotificationDataMap.d.ts +1 -0
- package/dist/notifications/pushNotifications/maps/CompanyPushNotificationDataMap.js +2 -0
- package/dist/notifications/pushNotifications/types/company/CompanyVatVerificationFailedPushNotificationData.type.d.ts +4 -0
- package/dist/notifications/pushNotifications/types/company/CompanyVatVerificationFailedPushNotificationData.type.js +2 -0
- package/dist/notifications/pushNotifications/types/company/CompanyVatVerificationSucceededPushNotificationData.type.d.ts +4 -0
- package/dist/notifications/pushNotifications/types/company/CompanyVatVerificationSucceededPushNotificationData.type.js +2 -0
- package/dist/notifications/pushNotifications/types/company/index.d.ts +2 -0
- package/dist/notifications/pushNotifications/types/company/index.js +18 -0
- package/dist/notifications/pushNotifications/types/customer/CustomerEntityVatVerificationFailedPushNotificationData.type.d.ts +4 -0
- package/dist/notifications/pushNotifications/types/customer/CustomerEntityVatVerificationFailedPushNotificationData.type.js +2 -0
- package/dist/notifications/pushNotifications/types/customer/CustomerEntityVatVerificationSucceededPushNotificationData.type.d.ts +4 -0
- package/dist/notifications/pushNotifications/types/customer/CustomerEntityVatVerificationSucceededPushNotificationData.type.js +2 -0
- package/dist/notifications/pushNotifications/types/professional/ProfessionalEntityVatVerificationFailedPushNotificationData.type.d.ts +4 -0
- package/dist/notifications/pushNotifications/types/professional/ProfessionalEntityVatVerificationFailedPushNotificationData.type.js +2 -0
- package/dist/notifications/pushNotifications/types/professional/ProfessionalEntityVatVerificationSucceededPushNotificationData.type.d.ts +4 -0
- package/dist/notifications/pushNotifications/types/professional/ProfessionalEntityVatVerificationSucceededPushNotificationData.type.js +2 -0
- package/dist/utils/format/__tests__/escapeHtml.util.test.d.ts +1 -0
- package/dist/utils/format/__tests__/escapeHtml.util.test.js +32 -0
- package/dist/utils/format/__tests__/formatPriceInCents.util.test.d.ts +1 -0
- package/dist/utils/format/__tests__/formatPriceInCents.util.test.js +34 -0
- package/dist/utils/format/escapeHtml.util.d.ts +1 -0
- package/dist/utils/format/escapeHtml.util.js +11 -0
- package/dist/utils/format/formatPriceInCents.util.d.ts +2 -0
- package/dist/utils/format/formatPriceInCents.util.js +28 -0
- package/dist/utils/vat/__tests__/extractVATNumber.util.test.d.ts +1 -0
- package/dist/utils/vat/__tests__/extractVATNumber.util.test.js +39 -0
- package/dist/utils/vat/__tests__/validateVATFormat.util.test.d.ts +1 -0
- package/dist/utils/vat/__tests__/validateVATFormat.util.test.js +329 -0
- package/dist/utils/vat/extractVATNumber.util.d.ts +4 -0
- package/dist/utils/vat/extractVATNumber.util.js +10 -0
- package/dist/utils/vat/types/ValidateVATFormatArgs.type.d.ts +4 -0
- package/dist/utils/vat/types/ValidateVATFormatArgs.type.js +2 -0
- package/dist/utils/vat/validateVATFormat.util.d.ts +2 -0
- package/dist/utils/vat/validateVATFormat.util.js +24 -0
- package/package.json +1 -1
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const enums_1 = require("../../../../../enums");
|
|
4
|
+
const pricing_1 = require("../../../../../pricing");
|
|
5
|
+
const enums_2 = require("../../../enums");
|
|
6
|
+
const services_1 = require("../../services");
|
|
7
|
+
const stubs_1 = require("../../stubs");
|
|
8
|
+
const buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails_utils_1 = require("../buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails.utils");
|
|
9
|
+
jest.mock("../../services", () => {
|
|
10
|
+
return {
|
|
11
|
+
...jest.requireActual("../../services"),
|
|
12
|
+
getActiveProfessionalServicePricingAndDurationForVehicleOrThrow: jest.fn(),
|
|
13
|
+
};
|
|
14
|
+
});
|
|
15
|
+
describe("buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails", () => {
|
|
16
|
+
let getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock;
|
|
17
|
+
let getActiveProfessionalServicePricingAndDurationForVehicleOrThrowReturn;
|
|
18
|
+
let professionalUserPublicDocument;
|
|
19
|
+
let professionalServiceTypes;
|
|
20
|
+
let customerVehicleType;
|
|
21
|
+
let countryServicesPublicConfig;
|
|
22
|
+
beforeEach(() => {
|
|
23
|
+
getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock =
|
|
24
|
+
services_1.getActiveProfessionalServicePricingAndDurationForVehicleOrThrow;
|
|
25
|
+
getActiveProfessionalServicePricingAndDurationForVehicleOrThrowReturn = {
|
|
26
|
+
pricePreTaxInCents: 2500,
|
|
27
|
+
durationInMinutes: 45,
|
|
28
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
29
|
+
isActive: true,
|
|
30
|
+
type: enums_2.VehicleTypes.MOTORCYCLE,
|
|
31
|
+
};
|
|
32
|
+
getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock.mockReturnValue(getActiveProfessionalServicePricingAndDurationForVehicleOrThrowReturn);
|
|
33
|
+
professionalUserPublicDocument =
|
|
34
|
+
(0, stubs_1.firestoreProfessionalUserPublicDocumentStub)();
|
|
35
|
+
professionalServiceTypes = [
|
|
36
|
+
enums_2.ServicesTypes.EXTERIOR_CLEANING,
|
|
37
|
+
enums_2.ServicesTypes.INTERIOR_CLEANING,
|
|
38
|
+
enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT,
|
|
39
|
+
];
|
|
40
|
+
customerVehicleType = enums_2.VehicleTypes.CITY_CAR;
|
|
41
|
+
countryServicesPublicConfig = (0, stubs_1.countryServicesPublicConfigStub)({
|
|
42
|
+
[enums_2.ServicesTypes.EXTERIOR_CLEANING]: (0, stubs_1.firestoreServicesPublicConfigStub)({
|
|
43
|
+
parentsServices: [],
|
|
44
|
+
}),
|
|
45
|
+
[enums_2.ServicesTypes.INTERIOR_CLEANING]: (0, stubs_1.firestoreServicesPublicConfigStub)({
|
|
46
|
+
parentsServices: [],
|
|
47
|
+
}),
|
|
48
|
+
[enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT]: (0, stubs_1.firestoreServicesPublicConfigStub)({
|
|
49
|
+
parentsServices: [
|
|
50
|
+
enums_2.ServicesTypes.INTERIOR_CLEANING,
|
|
51
|
+
enums_2.ServicesTypes.EXTERIOR_CLEANING,
|
|
52
|
+
],
|
|
53
|
+
}),
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
afterEach(() => {
|
|
57
|
+
jest.clearAllMocks();
|
|
58
|
+
});
|
|
59
|
+
it("should map a single service type to pricing line and detail", () => {
|
|
60
|
+
professionalServiceTypes = [enums_2.ServicesTypes.EXTERIOR_CLEANING];
|
|
61
|
+
const pricingAndDuration = {
|
|
62
|
+
pricePreTaxInCents: 2500,
|
|
63
|
+
durationInMinutes: 45,
|
|
64
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
65
|
+
isActive: true,
|
|
66
|
+
type: enums_2.VehicleTypes.MOTORCYCLE,
|
|
67
|
+
};
|
|
68
|
+
getActiveProfessionalServicePricingAndDurationForVehicleOrThrowReturn =
|
|
69
|
+
pricingAndDuration;
|
|
70
|
+
getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock.mockReturnValue(getActiveProfessionalServicePricingAndDurationForVehicleOrThrowReturn);
|
|
71
|
+
const result = (0, buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails_utils_1.buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails)({
|
|
72
|
+
professionalServiceTypes,
|
|
73
|
+
professionalUserPublicDocument,
|
|
74
|
+
customerVehicleType,
|
|
75
|
+
countryServicesPublicConfig,
|
|
76
|
+
});
|
|
77
|
+
expect(getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenCalledTimes(1);
|
|
78
|
+
expect(getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenCalledWith({
|
|
79
|
+
professionalUserPublicDocument,
|
|
80
|
+
professionalServiceType: professionalServiceTypes[0],
|
|
81
|
+
vehicleType: customerVehicleType,
|
|
82
|
+
});
|
|
83
|
+
expect(result.professionalServicesPreTaxLines).toEqual([
|
|
84
|
+
{
|
|
85
|
+
id: `pricingLine0-${enums_2.ServicesTypes.EXTERIOR_CLEANING}`,
|
|
86
|
+
amountPreTaxInCents: 2500,
|
|
87
|
+
category: pricing_1.PricingLineCategories.SERVICE,
|
|
88
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
89
|
+
},
|
|
90
|
+
]);
|
|
91
|
+
expect(result.orderProfessionalServicesDetails).toEqual([
|
|
92
|
+
{
|
|
93
|
+
id: `professionalServiceDetails0-${enums_2.ServicesTypes.EXTERIOR_CLEANING}`,
|
|
94
|
+
pricingLineId: `pricingLine0-${enums_2.ServicesTypes.EXTERIOR_CLEANING}`,
|
|
95
|
+
type: enums_2.ServicesTypes.EXTERIOR_CLEANING,
|
|
96
|
+
photosStoragePaths: {
|
|
97
|
+
[enums_2.OrderProfessionalServiceDetailsPhotoContext.BEFORE_SERVICE]: [],
|
|
98
|
+
[enums_2.OrderProfessionalServiceDetailsPhotoContext.AFTER_SERVICE]: [],
|
|
99
|
+
},
|
|
100
|
+
durationInMinutes: 45,
|
|
101
|
+
},
|
|
102
|
+
]);
|
|
103
|
+
});
|
|
104
|
+
it("should map multiple service types and subservices correctly", () => {
|
|
105
|
+
const result = (0, buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails_utils_1.buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails)({
|
|
106
|
+
professionalServiceTypes,
|
|
107
|
+
professionalUserPublicDocument,
|
|
108
|
+
customerVehicleType,
|
|
109
|
+
countryServicesPublicConfig,
|
|
110
|
+
});
|
|
111
|
+
expect(getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenCalledTimes(3);
|
|
112
|
+
expect(getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenNthCalledWith(1, {
|
|
113
|
+
professionalUserPublicDocument,
|
|
114
|
+
professionalServiceType: enums_2.ServicesTypes.EXTERIOR_CLEANING,
|
|
115
|
+
vehicleType: customerVehicleType,
|
|
116
|
+
});
|
|
117
|
+
expect(getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenNthCalledWith(2, {
|
|
118
|
+
professionalUserPublicDocument,
|
|
119
|
+
professionalServiceType: enums_2.ServicesTypes.INTERIOR_CLEANING,
|
|
120
|
+
vehicleType: customerVehicleType,
|
|
121
|
+
});
|
|
122
|
+
expect(getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenNthCalledWith(3, {
|
|
123
|
+
professionalUserPublicDocument,
|
|
124
|
+
professionalServiceType: enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT,
|
|
125
|
+
vehicleType: customerVehicleType,
|
|
126
|
+
});
|
|
127
|
+
expect(result.professionalServicesPreTaxLines).toEqual([
|
|
128
|
+
{
|
|
129
|
+
id: `pricingLine0-${enums_2.ServicesTypes.EXTERIOR_CLEANING}`,
|
|
130
|
+
amountPreTaxInCents: 2500,
|
|
131
|
+
category: pricing_1.PricingLineCategories.SERVICE,
|
|
132
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: `pricingLine1-${enums_2.ServicesTypes.INTERIOR_CLEANING}`,
|
|
136
|
+
amountPreTaxInCents: 2500,
|
|
137
|
+
category: pricing_1.PricingLineCategories.SERVICE,
|
|
138
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: `pricingLine2-${enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT}`,
|
|
142
|
+
amountPreTaxInCents: 2500,
|
|
143
|
+
category: pricing_1.PricingLineCategories.SERVICE,
|
|
144
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
145
|
+
},
|
|
146
|
+
]);
|
|
147
|
+
expect(result.orderProfessionalServicesDetails).toEqual([
|
|
148
|
+
{
|
|
149
|
+
id: `professionalServiceDetails0-${enums_2.ServicesTypes.EXTERIOR_CLEANING}`,
|
|
150
|
+
pricingLineId: `pricingLine0-${enums_2.ServicesTypes.EXTERIOR_CLEANING}`,
|
|
151
|
+
type: enums_2.ServicesTypes.EXTERIOR_CLEANING,
|
|
152
|
+
photosStoragePaths: {
|
|
153
|
+
[enums_2.OrderProfessionalServiceDetailsPhotoContext.BEFORE_SERVICE]: [],
|
|
154
|
+
[enums_2.OrderProfessionalServiceDetailsPhotoContext.AFTER_SERVICE]: [],
|
|
155
|
+
},
|
|
156
|
+
durationInMinutes: 45,
|
|
157
|
+
scheduledAt: undefined,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: `professionalServiceDetails1-${enums_2.ServicesTypes.INTERIOR_CLEANING}`,
|
|
161
|
+
pricingLineId: `pricingLine1-${enums_2.ServicesTypes.INTERIOR_CLEANING}`,
|
|
162
|
+
type: enums_2.ServicesTypes.INTERIOR_CLEANING,
|
|
163
|
+
photosStoragePaths: {
|
|
164
|
+
[enums_2.OrderProfessionalServiceDetailsPhotoContext.BEFORE_SERVICE]: [],
|
|
165
|
+
[enums_2.OrderProfessionalServiceDetailsPhotoContext.AFTER_SERVICE]: [],
|
|
166
|
+
},
|
|
167
|
+
durationInMinutes: 45,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: `professionalServiceDetails2-${enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT}`,
|
|
171
|
+
pricingLineId: `pricingLine2-${enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT}`,
|
|
172
|
+
type: enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT,
|
|
173
|
+
photosStoragePaths: {
|
|
174
|
+
[enums_2.OrderProfessionalServiceDetailsPhotoContext.BEFORE_SERVICE]: [],
|
|
175
|
+
[enums_2.OrderProfessionalServiceDetailsPhotoContext.AFTER_SERVICE]: [],
|
|
176
|
+
},
|
|
177
|
+
durationInMinutes: 45,
|
|
178
|
+
isSubservice: true,
|
|
179
|
+
},
|
|
180
|
+
]);
|
|
181
|
+
});
|
|
182
|
+
it("Should add to orderProfessionalSubServicesDetails if is a subservice", () => {
|
|
183
|
+
professionalServiceTypes = [
|
|
184
|
+
enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT,
|
|
185
|
+
];
|
|
186
|
+
const pricingAndDuration = {
|
|
187
|
+
pricePreTaxInCents: 2500,
|
|
188
|
+
durationInMinutes: 45,
|
|
189
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
190
|
+
isActive: true,
|
|
191
|
+
type: enums_2.VehicleTypes.SEDAN,
|
|
192
|
+
};
|
|
193
|
+
getActiveProfessionalServicePricingAndDurationForVehicleOrThrowReturn =
|
|
194
|
+
pricingAndDuration;
|
|
195
|
+
getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock.mockReturnValue(getActiveProfessionalServicePricingAndDurationForVehicleOrThrowReturn);
|
|
196
|
+
const result = (0, buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails_utils_1.buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails)({
|
|
197
|
+
professionalServiceTypes,
|
|
198
|
+
professionalUserPublicDocument,
|
|
199
|
+
customerVehicleType,
|
|
200
|
+
countryServicesPublicConfig,
|
|
201
|
+
});
|
|
202
|
+
expect(getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenCalledTimes(1);
|
|
203
|
+
expect(getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenCalledWith({
|
|
204
|
+
professionalUserPublicDocument,
|
|
205
|
+
professionalServiceType: professionalServiceTypes[0],
|
|
206
|
+
vehicleType: customerVehicleType,
|
|
207
|
+
});
|
|
208
|
+
expect(result.professionalServicesPreTaxLines).toEqual([
|
|
209
|
+
{
|
|
210
|
+
id: `pricingLine0-${enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT}`,
|
|
211
|
+
amountPreTaxInCents: 2500,
|
|
212
|
+
category: pricing_1.PricingLineCategories.SERVICE,
|
|
213
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
214
|
+
},
|
|
215
|
+
]);
|
|
216
|
+
expect(result.orderProfessionalServicesDetails).toEqual([
|
|
217
|
+
{
|
|
218
|
+
id: `professionalServiceDetails0-${enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT}`,
|
|
219
|
+
pricingLineId: `pricingLine0-${enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT}`,
|
|
220
|
+
type: enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT,
|
|
221
|
+
photosStoragePaths: {
|
|
222
|
+
[enums_2.OrderProfessionalServiceDetailsPhotoContext.BEFORE_SERVICE]: [],
|
|
223
|
+
[enums_2.OrderProfessionalServiceDetailsPhotoContext.AFTER_SERVICE]: [],
|
|
224
|
+
},
|
|
225
|
+
durationInMinutes: 45,
|
|
226
|
+
isSubservice: true,
|
|
227
|
+
},
|
|
228
|
+
]);
|
|
229
|
+
});
|
|
230
|
+
it("should throw if getActiveProfessionalServicePricingAndDurationForVehicleOrThrow throws", () => {
|
|
231
|
+
getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock.mockImplementationOnce(() => {
|
|
232
|
+
throw new Error("Service pricing not found");
|
|
233
|
+
});
|
|
234
|
+
expect(() => (0, buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails_utils_1.buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails)({
|
|
235
|
+
professionalServiceTypes,
|
|
236
|
+
professionalUserPublicDocument,
|
|
237
|
+
customerVehicleType,
|
|
238
|
+
countryServicesPublicConfig,
|
|
239
|
+
})).toThrow("Service pricing not found");
|
|
240
|
+
expect(getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenCalledTimes(1);
|
|
241
|
+
});
|
|
242
|
+
it("should throw if a professional service type is not in country config", () => {
|
|
243
|
+
professionalServiceTypes = [
|
|
244
|
+
enums_2.ServicesTypes.EXTERIOR_CLEANING,
|
|
245
|
+
enums_2.ServicesTypes.INTERIOR_CLEANING,
|
|
246
|
+
enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT,
|
|
247
|
+
];
|
|
248
|
+
countryServicesPublicConfig = (0, stubs_1.countryServicesPublicConfigStub)({
|
|
249
|
+
[enums_2.ServicesTypes.EXTERIOR_CLEANING]: (0, stubs_1.firestoreServicesPublicConfigStub)(),
|
|
250
|
+
[enums_2.ServicesTypes.INTERIOR_CLEANING]: (0, stubs_1.firestoreServicesPublicConfigStub)(),
|
|
251
|
+
[enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT]: undefined,
|
|
252
|
+
});
|
|
253
|
+
expect(() => (0, buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails_utils_1.buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails)({
|
|
254
|
+
professionalServiceTypes,
|
|
255
|
+
professionalUserPublicDocument,
|
|
256
|
+
customerVehicleType,
|
|
257
|
+
countryServicesPublicConfig,
|
|
258
|
+
})).toThrow(`Professional service type ${enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT} is not available in the country configuration.`);
|
|
259
|
+
expect(getActiveProfessionalServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenCalledTimes(2);
|
|
260
|
+
});
|
|
261
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const enums_1 = require("../../../../../enums");
|
|
4
|
+
const pricing_1 = require("../../../../../pricing");
|
|
5
|
+
const enums_2 = require("../../../enums");
|
|
6
|
+
const services_1 = require("../../services");
|
|
7
|
+
const stubs_1 = require("../../stubs");
|
|
8
|
+
const buildOrderServicePreTaxLinesAndProfessionalServicesDetails_1 = require("../buildOrderServicePreTaxLinesAndProfessionalServicesDetails");
|
|
9
|
+
jest.mock("../../services", () => {
|
|
10
|
+
return {
|
|
11
|
+
...jest.requireActual("../../services"),
|
|
12
|
+
getActiveServiceProviderServicePricingAndDurationForVehicleOrThrow: jest.fn(),
|
|
13
|
+
};
|
|
14
|
+
});
|
|
15
|
+
describe("buildOrderServicePreTaxLinesAndProfessionalServicesDetails", () => {
|
|
16
|
+
let getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock;
|
|
17
|
+
let getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowReturn;
|
|
18
|
+
let professionalUserPublicDocument;
|
|
19
|
+
let serviceTypes;
|
|
20
|
+
let customerVehicleType;
|
|
21
|
+
let countryServicesPublicConfig;
|
|
22
|
+
beforeEach(() => {
|
|
23
|
+
getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock =
|
|
24
|
+
services_1.getActiveServiceProviderServicePricingAndDurationForVehicleOrThrow;
|
|
25
|
+
getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowReturn = {
|
|
26
|
+
pricePreTaxInCents: 2500,
|
|
27
|
+
durationInMinutes: 45,
|
|
28
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
29
|
+
isActive: true,
|
|
30
|
+
type: enums_2.VehicleTypes.MOTORCYCLE,
|
|
31
|
+
};
|
|
32
|
+
getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock.mockReturnValue(getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowReturn);
|
|
33
|
+
professionalUserPublicDocument =
|
|
34
|
+
(0, stubs_1.firestoreProfessionalUserPublicDocumentStub)();
|
|
35
|
+
serviceTypes = [
|
|
36
|
+
enums_2.ServicesTypes.EXTERIOR_CLEANING,
|
|
37
|
+
enums_2.ServicesTypes.INTERIOR_CLEANING,
|
|
38
|
+
enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT,
|
|
39
|
+
];
|
|
40
|
+
customerVehicleType = enums_2.VehicleTypes.CITY_CAR;
|
|
41
|
+
countryServicesPublicConfig = (0, stubs_1.countryServicesPublicConfigStub)({
|
|
42
|
+
[enums_2.ServicesTypes.EXTERIOR_CLEANING]: (0, stubs_1.firestoreServicesPublicConfigStub)({
|
|
43
|
+
parentsServices: [],
|
|
44
|
+
}),
|
|
45
|
+
[enums_2.ServicesTypes.INTERIOR_CLEANING]: (0, stubs_1.firestoreServicesPublicConfigStub)({
|
|
46
|
+
parentsServices: [],
|
|
47
|
+
}),
|
|
48
|
+
[enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT]: (0, stubs_1.firestoreServicesPublicConfigStub)({
|
|
49
|
+
parentsServices: [
|
|
50
|
+
enums_2.ServicesTypes.INTERIOR_CLEANING,
|
|
51
|
+
enums_2.ServicesTypes.EXTERIOR_CLEANING,
|
|
52
|
+
],
|
|
53
|
+
}),
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
afterEach(() => {
|
|
57
|
+
jest.clearAllMocks();
|
|
58
|
+
});
|
|
59
|
+
it("should map a single service type to pricing line and detail", () => {
|
|
60
|
+
serviceTypes = [enums_2.ServicesTypes.EXTERIOR_CLEANING];
|
|
61
|
+
const pricingAndDuration = {
|
|
62
|
+
pricePreTaxInCents: 2500,
|
|
63
|
+
durationInMinutes: 45,
|
|
64
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
65
|
+
isActive: true,
|
|
66
|
+
type: enums_2.VehicleTypes.MOTORCYCLE,
|
|
67
|
+
};
|
|
68
|
+
getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowReturn =
|
|
69
|
+
pricingAndDuration;
|
|
70
|
+
getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock.mockReturnValue(getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowReturn);
|
|
71
|
+
const result = (0, buildOrderServicePreTaxLinesAndProfessionalServicesDetails_1.buildOrderServicePreTaxLinesAndProfessionalServicesDetails)({
|
|
72
|
+
serviceTypes,
|
|
73
|
+
professionalUserPublicDocument,
|
|
74
|
+
vehicleType: customerVehicleType,
|
|
75
|
+
countryServicesPublicConfig,
|
|
76
|
+
});
|
|
77
|
+
expect(getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenCalledTimes(1);
|
|
78
|
+
expect(getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenCalledWith({
|
|
79
|
+
professionalUserPublicDocument,
|
|
80
|
+
serviceType: serviceTypes[0],
|
|
81
|
+
vehicleType: customerVehicleType,
|
|
82
|
+
});
|
|
83
|
+
expect(result.servicesPreTaxLines).toEqual([
|
|
84
|
+
{
|
|
85
|
+
id: `pricingLine0-${enums_2.ServicesTypes.EXTERIOR_CLEANING}`,
|
|
86
|
+
amountPreTaxInCents: 2500,
|
|
87
|
+
category: pricing_1.PricingLineCategories.SERVICE,
|
|
88
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
89
|
+
},
|
|
90
|
+
]);
|
|
91
|
+
expect(result.orderServicesDetails).toEqual([
|
|
92
|
+
{
|
|
93
|
+
id: `orderServiceDetails0-${enums_2.ServicesTypes.EXTERIOR_CLEANING}`,
|
|
94
|
+
pricingLineId: `pricingLine0-${enums_2.ServicesTypes.EXTERIOR_CLEANING}`,
|
|
95
|
+
type: enums_2.ServicesTypes.EXTERIOR_CLEANING,
|
|
96
|
+
photosStoragePaths: {
|
|
97
|
+
[enums_2.OrderServiceDetailsPhotoContext.BEFORE_SERVICE]: [],
|
|
98
|
+
[enums_2.OrderServiceDetailsPhotoContext.AFTER_SERVICE]: [],
|
|
99
|
+
},
|
|
100
|
+
durationInMinutes: 45,
|
|
101
|
+
},
|
|
102
|
+
]);
|
|
103
|
+
});
|
|
104
|
+
it("should map multiple service types and subservices correctly", () => {
|
|
105
|
+
const result = (0, buildOrderServicePreTaxLinesAndProfessionalServicesDetails_1.buildOrderServicePreTaxLinesAndProfessionalServicesDetails)({
|
|
106
|
+
serviceTypes,
|
|
107
|
+
professionalUserPublicDocument,
|
|
108
|
+
vehicleType: customerVehicleType,
|
|
109
|
+
countryServicesPublicConfig,
|
|
110
|
+
});
|
|
111
|
+
expect(getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenCalledTimes(3);
|
|
112
|
+
expect(getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenNthCalledWith(1, {
|
|
113
|
+
professionalUserPublicDocument,
|
|
114
|
+
serviceType: enums_2.ServicesTypes.EXTERIOR_CLEANING,
|
|
115
|
+
vehicleType: customerVehicleType,
|
|
116
|
+
});
|
|
117
|
+
expect(getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenNthCalledWith(2, {
|
|
118
|
+
professionalUserPublicDocument,
|
|
119
|
+
serviceType: enums_2.ServicesTypes.INTERIOR_CLEANING,
|
|
120
|
+
vehicleType: customerVehicleType,
|
|
121
|
+
});
|
|
122
|
+
expect(getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenNthCalledWith(3, {
|
|
123
|
+
professionalUserPublicDocument,
|
|
124
|
+
serviceType: enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT,
|
|
125
|
+
vehicleType: customerVehicleType,
|
|
126
|
+
});
|
|
127
|
+
expect(result.servicesPreTaxLines).toEqual([
|
|
128
|
+
{
|
|
129
|
+
id: `pricingLine0-${enums_2.ServicesTypes.EXTERIOR_CLEANING}`,
|
|
130
|
+
amountPreTaxInCents: 2500,
|
|
131
|
+
category: pricing_1.PricingLineCategories.SERVICE,
|
|
132
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: `pricingLine1-${enums_2.ServicesTypes.INTERIOR_CLEANING}`,
|
|
136
|
+
amountPreTaxInCents: 2500,
|
|
137
|
+
category: pricing_1.PricingLineCategories.SERVICE,
|
|
138
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: `pricingLine2-${enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT}`,
|
|
142
|
+
amountPreTaxInCents: 2500,
|
|
143
|
+
category: pricing_1.PricingLineCategories.SERVICE,
|
|
144
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
145
|
+
},
|
|
146
|
+
]);
|
|
147
|
+
expect(result.orderServicesDetails).toEqual([
|
|
148
|
+
{
|
|
149
|
+
id: `orderServiceDetails0-${enums_2.ServicesTypes.EXTERIOR_CLEANING}`,
|
|
150
|
+
pricingLineId: `pricingLine0-${enums_2.ServicesTypes.EXTERIOR_CLEANING}`,
|
|
151
|
+
type: enums_2.ServicesTypes.EXTERIOR_CLEANING,
|
|
152
|
+
photosStoragePaths: {
|
|
153
|
+
[enums_2.OrderServiceDetailsPhotoContext.BEFORE_SERVICE]: [],
|
|
154
|
+
[enums_2.OrderServiceDetailsPhotoContext.AFTER_SERVICE]: [],
|
|
155
|
+
},
|
|
156
|
+
durationInMinutes: 45,
|
|
157
|
+
scheduledAt: undefined,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: `orderServiceDetails1-${enums_2.ServicesTypes.INTERIOR_CLEANING}`,
|
|
161
|
+
pricingLineId: `pricingLine1-${enums_2.ServicesTypes.INTERIOR_CLEANING}`,
|
|
162
|
+
type: enums_2.ServicesTypes.INTERIOR_CLEANING,
|
|
163
|
+
photosStoragePaths: {
|
|
164
|
+
[enums_2.OrderServiceDetailsPhotoContext.BEFORE_SERVICE]: [],
|
|
165
|
+
[enums_2.OrderServiceDetailsPhotoContext.AFTER_SERVICE]: [],
|
|
166
|
+
},
|
|
167
|
+
durationInMinutes: 45,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: `orderServiceDetails2-${enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT}`,
|
|
171
|
+
pricingLineId: `pricingLine2-${enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT}`,
|
|
172
|
+
type: enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT,
|
|
173
|
+
photosStoragePaths: {
|
|
174
|
+
[enums_2.OrderServiceDetailsPhotoContext.BEFORE_SERVICE]: [],
|
|
175
|
+
[enums_2.OrderServiceDetailsPhotoContext.AFTER_SERVICE]: [],
|
|
176
|
+
},
|
|
177
|
+
durationInMinutes: 45,
|
|
178
|
+
isSubservice: true,
|
|
179
|
+
},
|
|
180
|
+
]);
|
|
181
|
+
});
|
|
182
|
+
it("Should add to orderProfessionalSubServicesDetails if is a subservice", () => {
|
|
183
|
+
serviceTypes = [enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT];
|
|
184
|
+
const pricingAndDuration = {
|
|
185
|
+
pricePreTaxInCents: 2500,
|
|
186
|
+
durationInMinutes: 45,
|
|
187
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
188
|
+
isActive: true,
|
|
189
|
+
type: enums_2.VehicleTypes.SEDAN,
|
|
190
|
+
};
|
|
191
|
+
getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowReturn =
|
|
192
|
+
pricingAndDuration;
|
|
193
|
+
getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock.mockReturnValue(getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowReturn);
|
|
194
|
+
const result = (0, buildOrderServicePreTaxLinesAndProfessionalServicesDetails_1.buildOrderServicePreTaxLinesAndProfessionalServicesDetails)({
|
|
195
|
+
serviceTypes,
|
|
196
|
+
professionalUserPublicDocument,
|
|
197
|
+
vehicleType: customerVehicleType,
|
|
198
|
+
countryServicesPublicConfig,
|
|
199
|
+
});
|
|
200
|
+
expect(getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenCalledTimes(1);
|
|
201
|
+
expect(getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenCalledWith({
|
|
202
|
+
professionalUserPublicDocument,
|
|
203
|
+
serviceType: serviceTypes[0],
|
|
204
|
+
vehicleType: customerVehicleType,
|
|
205
|
+
});
|
|
206
|
+
expect(result.servicesPreTaxLines).toEqual([
|
|
207
|
+
{
|
|
208
|
+
id: `pricingLine0-${enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT}`,
|
|
209
|
+
amountPreTaxInCents: 2500,
|
|
210
|
+
category: pricing_1.PricingLineCategories.SERVICE,
|
|
211
|
+
currency: enums_1.SupportedIsoCurrency.EUR,
|
|
212
|
+
},
|
|
213
|
+
]);
|
|
214
|
+
expect(result.orderServicesDetails).toEqual([
|
|
215
|
+
{
|
|
216
|
+
id: `orderServiceDetails0-${enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT}`,
|
|
217
|
+
pricingLineId: `pricingLine0-${enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT}`,
|
|
218
|
+
type: enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT,
|
|
219
|
+
photosStoragePaths: {
|
|
220
|
+
[enums_2.OrderServiceDetailsPhotoContext.BEFORE_SERVICE]: [],
|
|
221
|
+
[enums_2.OrderServiceDetailsPhotoContext.AFTER_SERVICE]: [],
|
|
222
|
+
},
|
|
223
|
+
durationInMinutes: 45,
|
|
224
|
+
isSubservice: true,
|
|
225
|
+
},
|
|
226
|
+
]);
|
|
227
|
+
});
|
|
228
|
+
it("should throw if getActiveServiceProviderServicePricingAndDurationForVehicleOrThrow throws", () => {
|
|
229
|
+
getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock.mockImplementationOnce(() => {
|
|
230
|
+
throw new Error("Service pricing not found");
|
|
231
|
+
});
|
|
232
|
+
expect(() => (0, buildOrderServicePreTaxLinesAndProfessionalServicesDetails_1.buildOrderServicePreTaxLinesAndProfessionalServicesDetails)({
|
|
233
|
+
serviceTypes,
|
|
234
|
+
professionalUserPublicDocument,
|
|
235
|
+
vehicleType: customerVehicleType,
|
|
236
|
+
countryServicesPublicConfig,
|
|
237
|
+
})).toThrow("Service pricing not found");
|
|
238
|
+
expect(getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenCalledTimes(1);
|
|
239
|
+
});
|
|
240
|
+
it("should throw if a professional service type is not in country config", () => {
|
|
241
|
+
serviceTypes = [
|
|
242
|
+
enums_2.ServicesTypes.EXTERIOR_CLEANING,
|
|
243
|
+
enums_2.ServicesTypes.INTERIOR_CLEANING,
|
|
244
|
+
enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT,
|
|
245
|
+
];
|
|
246
|
+
countryServicesPublicConfig = (0, stubs_1.countryServicesPublicConfigStub)({
|
|
247
|
+
[enums_2.ServicesTypes.EXTERIOR_CLEANING]: (0, stubs_1.firestoreServicesPublicConfigStub)(),
|
|
248
|
+
[enums_2.ServicesTypes.INTERIOR_CLEANING]: (0, stubs_1.firestoreServicesPublicConfigStub)(),
|
|
249
|
+
[enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT]: undefined,
|
|
250
|
+
});
|
|
251
|
+
expect(() => (0, buildOrderServicePreTaxLinesAndProfessionalServicesDetails_1.buildOrderServicePreTaxLinesAndProfessionalServicesDetails)({
|
|
252
|
+
serviceTypes,
|
|
253
|
+
professionalUserPublicDocument,
|
|
254
|
+
vehicleType: customerVehicleType,
|
|
255
|
+
countryServicesPublicConfig,
|
|
256
|
+
})).toThrow(`Service type ${enums_2.ServicesTypes.ANIMAL_HAIR_TREATMENT} is not available in the country configuration.`);
|
|
257
|
+
expect(getActiveServiceProviderServicePricingAndDurationForVehicleOrThrowMock).toHaveBeenCalledTimes(2);
|
|
258
|
+
});
|
|
259
|
+
});
|
package/dist/firebase/firestore/utils/order/__tests__/getOrderCustomerAndProfessionalIds.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/firebase/firestore/utils/order/__tests__/getOrderCustomerAndProfessionalIds.test.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const stubs_1 = require("../../stubs");
|
|
4
|
+
const getOrderCustomerAndProfessionalIds_1 = require("../getOrderCustomerAndProfessionalIds");
|
|
5
|
+
describe("getOrderCustomerAndProfessionalIds", () => {
|
|
6
|
+
let orderDocument;
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
orderDocument = (0, stubs_1.firestoreOrderDocumentStub)({
|
|
9
|
+
customerDetails: {
|
|
10
|
+
firestoreId: "customer-123",
|
|
11
|
+
},
|
|
12
|
+
professionalDetails: {
|
|
13
|
+
firestoreId: "professional-456",
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
afterEach(() => {
|
|
18
|
+
jest.clearAllMocks();
|
|
19
|
+
});
|
|
20
|
+
it("should return correct customerId and professionalId", () => {
|
|
21
|
+
const result = (0, getOrderCustomerAndProfessionalIds_1.getOrderCustomerAndProfessionalIds)({ orderDocument });
|
|
22
|
+
expect(result).toEqual({
|
|
23
|
+
customerId: "customer-123",
|
|
24
|
+
professionalId: "professional-456",
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { BuildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetailsProps, BuildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetailsReturn } from "./types";
|
|
2
|
+
export declare function buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails({ countryServicesPublicConfig, professionalServiceTypes, professionalUserPublicDocument, customerVehicleType, }: BuildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetailsProps): BuildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetailsReturn;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails = buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails;
|
|
4
|
+
const pricing_1 = require("../../../../pricing");
|
|
5
|
+
const enums_1 = require("../../enums");
|
|
6
|
+
const services_1 = require("../services");
|
|
7
|
+
function buildOrderProfessionalServicePreTaxLinesAndProfessionalServicesDetails({ countryServicesPublicConfig, professionalServiceTypes, professionalUserPublicDocument, customerVehicleType, }) {
|
|
8
|
+
const professionalServicesPreTaxLines = [];
|
|
9
|
+
const orderProfessionalServicesDetails = [];
|
|
10
|
+
professionalServiceTypes.forEach((professionalServiceType, index) => {
|
|
11
|
+
if (!countryServicesPublicConfig[professionalServiceType]) {
|
|
12
|
+
throw new Error(`Professional service type ${professionalServiceType} is not available in the country configuration.`);
|
|
13
|
+
}
|
|
14
|
+
const pricingAndDurationForVehicle = (0, services_1.getActiveProfessionalServicePricingAndDurationForVehicleOrThrow)({
|
|
15
|
+
professionalUserPublicDocument,
|
|
16
|
+
professionalServiceType,
|
|
17
|
+
vehicleType: customerVehicleType,
|
|
18
|
+
});
|
|
19
|
+
const pricingLineId = `pricingLine${index}-${professionalServiceType}`;
|
|
20
|
+
const professionalServiceDetailsId = `professionalServiceDetails${index}-${professionalServiceType}`;
|
|
21
|
+
const pricingPreTaxLine = {
|
|
22
|
+
id: pricingLineId,
|
|
23
|
+
amountPreTaxInCents: pricingAndDurationForVehicle.pricePreTaxInCents,
|
|
24
|
+
category: pricing_1.PricingLineCategories.SERVICE,
|
|
25
|
+
currency: pricingAndDurationForVehicle.currency,
|
|
26
|
+
};
|
|
27
|
+
professionalServicesPreTaxLines.push(pricingPreTaxLine);
|
|
28
|
+
const orderProfessionalServiceDetail = {
|
|
29
|
+
id: professionalServiceDetailsId,
|
|
30
|
+
pricingLineId: pricingLineId,
|
|
31
|
+
type: professionalServiceType,
|
|
32
|
+
photosStoragePaths: {
|
|
33
|
+
[enums_1.OrderProfessionalServiceDetailsPhotoContext.BEFORE_SERVICE]: [],
|
|
34
|
+
[enums_1.OrderProfessionalServiceDetailsPhotoContext.AFTER_SERVICE]: [],
|
|
35
|
+
},
|
|
36
|
+
durationInMinutes: pricingAndDurationForVehicle.durationInMinutes,
|
|
37
|
+
};
|
|
38
|
+
if (countryServicesPublicConfig[professionalServiceType].parentsServices &&
|
|
39
|
+
countryServicesPublicConfig[professionalServiceType].parentsServices
|
|
40
|
+
.length > 0) {
|
|
41
|
+
orderProfessionalServiceDetail.isSubservice = true;
|
|
42
|
+
}
|
|
43
|
+
orderProfessionalServicesDetails.push(orderProfessionalServiceDetail);
|
|
44
|
+
});
|
|
45
|
+
return {
|
|
46
|
+
professionalServicesPreTaxLines,
|
|
47
|
+
orderProfessionalServicesDetails,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { BuildOrderServicePreTaxLinesAndServicesDetailsProps, BuildOrderServicePreTaxLinesAndServicesDetailsReturn } from "./types";
|
|
2
|
+
export declare function buildOrderServicePreTaxLinesAndProfessionalServicesDetails({ countryServicesPublicConfig, serviceTypes, professionalUserPublicDocument, vehicleType, }: BuildOrderServicePreTaxLinesAndServicesDetailsProps): BuildOrderServicePreTaxLinesAndServicesDetailsReturn;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildOrderServicePreTaxLinesAndProfessionalServicesDetails = buildOrderServicePreTaxLinesAndProfessionalServicesDetails;
|
|
4
|
+
const pricing_1 = require("../../../../pricing");
|
|
5
|
+
const enums_1 = require("../../enums");
|
|
6
|
+
const services_1 = require("../services");
|
|
7
|
+
function buildOrderServicePreTaxLinesAndProfessionalServicesDetails({ countryServicesPublicConfig, serviceTypes, professionalUserPublicDocument, vehicleType, }) {
|
|
8
|
+
const servicesPreTaxLines = [];
|
|
9
|
+
const orderServicesDetails = [];
|
|
10
|
+
serviceTypes.forEach((serviceType, index) => {
|
|
11
|
+
if (!countryServicesPublicConfig[serviceType]) {
|
|
12
|
+
throw new Error(`Service type ${serviceType} is not available in the country configuration.`);
|
|
13
|
+
}
|
|
14
|
+
const pricingAndDurationForVehicle = (0, services_1.getActiveServiceProviderServicePricingAndDurationForVehicleOrThrow)({
|
|
15
|
+
professionalUserPublicDocument,
|
|
16
|
+
serviceType,
|
|
17
|
+
vehicleType,
|
|
18
|
+
});
|
|
19
|
+
const pricingLineId = `pricingLine${index}-${serviceType}`;
|
|
20
|
+
const serviceDetailsId = `orderServiceDetails${index}-${serviceType}`;
|
|
21
|
+
const pricingPreTaxLine = {
|
|
22
|
+
id: pricingLineId,
|
|
23
|
+
amountPreTaxInCents: pricingAndDurationForVehicle.pricePreTaxInCents,
|
|
24
|
+
category: pricing_1.PricingLineCategories.SERVICE,
|
|
25
|
+
currency: pricingAndDurationForVehicle.currency,
|
|
26
|
+
};
|
|
27
|
+
servicesPreTaxLines.push(pricingPreTaxLine);
|
|
28
|
+
const orderServiceDetail = {
|
|
29
|
+
id: serviceDetailsId,
|
|
30
|
+
pricingLineId: pricingLineId,
|
|
31
|
+
type: serviceType,
|
|
32
|
+
photosStoragePaths: {
|
|
33
|
+
[enums_1.OrderServiceDetailsPhotoContext.BEFORE_SERVICE]: [],
|
|
34
|
+
[enums_1.OrderServiceDetailsPhotoContext.AFTER_SERVICE]: [],
|
|
35
|
+
},
|
|
36
|
+
durationInMinutes: pricingAndDurationForVehicle.durationInMinutes,
|
|
37
|
+
};
|
|
38
|
+
if (countryServicesPublicConfig[serviceType].parentsServices &&
|
|
39
|
+
countryServicesPublicConfig[serviceType].parentsServices.length > 0) {
|
|
40
|
+
orderServiceDetail.isSubservice = true;
|
|
41
|
+
}
|
|
42
|
+
orderServicesDetails.push(orderServiceDetail);
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
servicesPreTaxLines,
|
|
46
|
+
orderServicesDetails,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { GetOrderCustomerAndProfessionalIdsParams, GetOrderCustomerAndProfessionalIdsResult } from "./types";
|
|
2
|
+
export declare function getOrderCustomerAndProfessionalIds({ orderDocument, }: GetOrderCustomerAndProfessionalIdsParams): GetOrderCustomerAndProfessionalIdsResult;
|