import { EPlacementKeys } from "./api/resources/Paywall"; import { UserSubscriptionAction } from "./api/resources/UserSubscriptions"; import type { UserStatus } from "./types"; const environments = import.meta.env; const host = ""; export const apiHost = environments.AURA_API_HOST; const dApiHost = environments.AURA_DAPI_HOST; const dApiPrefix = environments.AURA_DAPI_PREFIX; const dApiPrefixV3 = environments.AURA_DAPI_PREFIX_V3; // const siteHost = environments.AURA_SITE_HOST; const prefix = environments.AURA_PREFIX; const openAIHost = environments.AURA_OPEN_AI_HOST; const openAiPrefix = environments.AURA_OPEN_AI_PREFIX; export const compatibilityV2Prefix = [host, "v2", "compatibility"].join("/") export const compatibilityV3Prefix = [host, "v3", "compatibility"].join("/") export const compatibilityV4Prefix = [host, "v4", "compatibility"].join("/") export const palmistryV1Prefix = [host, "v1", "palmistry"].join("/") export const palmistryV2Prefix = [host, "v2", "palmistry"].join("/") export const palmistryEmailMarketingV2Prefix = [palmistryV2Prefix, "email-marketing"].join("/") export const emailMarketingV1Prefix = [host, "v1", "email-marketing"].join("/") export const anonymousPrefix = [host, "anonymous"].join("/") export const profilePrefix = [host, "profile"].join("/") export const retainingFunnelPrefix = [host, "retaining"].join("/") export const chatsPrefix = [host, "chats"].join("/") export const oldBackendPrefix = [`${window.location.protocol}/`, window.location.host, "old-backend"].join("/") const routes = { client: { root: () => [host, ""].join("/"), palmistry: () => [host, "palmistry"].join("/"), palmistryWelcome: () => [host, "palmistry", "welcome"].join("/"), palmistryGender: () => [host, "palmistry", "gender"].join("/"), palmistryBirthdate: () => [host, "palmistry", "birthdate"].join("/"), palmistryPalmsHold: () => [host, "palmistry", "palms-hold"].join("/"), palmistryWish: () => [host, "palmistry", "wish"].join("/"), palmistryRelationship: () => [host, "palmistry", "relationship-status"].join("/"), palmistryResonatedElement: () => [host, "palmistry", "resonated-element"].join("/"), palmistryColorYouLike: () => [host, "palmistry", "color-you-like"].join("/"), palmistryDecisions: () => [host, "palmistry", "decisions"].join("/"), palmistryGuidancePlan: () => [host, "palmistry", "guidance-plan"].join("/"), palmistryPersonalStatement: () => [host, "palmistry", "personal-statement"].join("/"), palmistryScanInfo: () => [host, "palmistry", "scan-info"].join("/"), palmistryUpload: () => [host, "palmistry", "upload"].join("/"), palmistryScanPhoto: () => [host, "palmistry", "scan-photo"].join("/"), palmistryEmail: () => [host, "palmistry", "email"].join("/"), palmistrySubscriptionPlan: () => [host, "palmistry", "subscription-plan"].join("/"), palmistryPaywall: () => [host, "palmistry", "paywall"].join("/"), palmistryPayment: () => [host, "palmistry", "payment"].join("/"), palmistryDiscount: () => [host, "palmistry", "discount"].join("/"), palmistryPremiumBundle: () => [host, "palmistry", "premium-bundle"].join("/"), birthday: () => [host, "birthday"].join("/"), didYouKnow: () => [host, "did-you-know"].join("/"), freePeriodInfo: () => [host, "free-period"].join("/"), birthtime: () => [host, "birthtime"].join("/"), emailEnter: () => [host, "email"].join("/"), authResult: () => [host, "auth", "result"].join("/"), auth: () => [host, "auth"].join("/"), // subscription: () => [host, "subscription"].join("/"), createProfile: () => [host, "profile", "create"].join("/"), attention: () => [host, "attention"].join("/"), feedback: () => [host, "feedback"].join("/"), paymentMethod: () => [host, "payment", "method"].join("/"), paymentResult: () => [host, "payment", "result"].join("/"), paymentSuccess: () => [host, "payment", "success"].join("/"), paymentFail: () => [host, "payment", "fail"].join("/"), wallpaper: () => [host, "wallpaper"].join("/"), // static: () => [host, "static", ":typeId"].join("/"), legal: (type: string) => [host, "static", type].join("/"), compatibility: () => [host, "compatibility"].join("/"), compatibilityResult: () => [host, "compatibility", "result"].join("/"), breath: () => [host, "breath"].join("/"), priceList: () => [host, "price-list"].join("/"), home: () => [host, "home"].join("/"), breathResult: () => [host, "breath", "result"].join("/"), magicBall: () => [host, "magic-ball"].join("/"), horoscopeBestiesResult: () => [host, "horoscope-besties"].join("/"), predictionMoonResult: () => [host, "prediction-moon"].join("/"), myHoroscopeResult: () => [host, "my-horoscope"].join("/"), thermalResult: () => [host, "thermal"].join("/"), moonPhaseTracker: () => [host, "moon-phase-tracker"].join("/"), energyVampirismResult: () => [host, "energy-vampirism"].join("/"), nameHoroscopeResult: () => [host, "name-horoscope"].join("/"), gender: () => [host, "gender"].join("/"), questionnaire: () => [host, "questionnaire"].join("/"), goalSetup: () => [host, "goal-setup"].join("/"), hyperPersonalizedAstrology: () => [host, "hyper-personalized-astrology"].join("/"), noTime: () => [host, "no-time"].join("/"), loadingInRelationship: () => [host, "loading-in-relationship"].join("/"), worksRouter: () => [host, "works-router"].join("/"), worksForUs: () => [host, "works-for-us"].join("/"), worksTraits: () => [host, "works-traits"].join("/"), relationshipAlmostThere: () => [host, "relationship-almost-there"].join("/"), singleZodiacInfo: () => [host, "single-zodiac-info"].join("/"), problems: () => [host, "problems"].join("/"), notAlone: () => [host, "not-alone"].join("/"), allRight: () => [host, "all-right"].join("/"), almostThere: () => [host, "almost-there"].join("/"), partnerRightPlace: () => [host, "partner-right-place"].join("/"), partnerThing: () => [host, "partner-thing"].join("/"), partnerTotallyNormal: () => [host, "partner-totally-normal"].join("/"), withHeart: () => [host, "with-heart"].join("/"), withHead: () => [host, "with-head"].join("/"), both: () => [host, "both"].join("/"), relationshipZodiacInfo: () => [host, "relationship-zodiac-info"].join("/"), satisfiedResult: () => [host, "satisfied-result"].join("/"), aboutUs: () => [host, "about-us"].join("/"), loadingProfile: () => [host, "loading-profile"].join("/"), emailConfirm: () => [host, "email-confirm"].join("/"), onboarding: () => [host, "onboarding"].join("/"), trialChoice: () => [host, "trial-choice"].join("/"), trialPayment: () => [host, "trial-payment"].join("/"), additionalDiscount: () => [host, "additional-discount"].join("/"), trialPaymentWithDiscount: () => [host, "trial-payment-with-discount"].join("/"), tryApp: () => [host, "try-app"].join("/"), // Email letters email: (path: string) => [host, "email", path].join("/"), // Additional Purchases addReport: () => [host, "add-report"].join("/"), unlimitedReadings: () => [host, "unlimited-readings"].join("/"), addConsultation: () => [host, "add-consultation"].join("/"), // Additional Purchases Main skipTrial: () => [host, "skip-trial"].join("/"), addConsultant: () => [host, "add-consultant"].join("/"), addGuides: () => [host, "add-guides"].join("/"), // Additional Purchases PalmistryV1 palmistryV1SkipTrial: () => [palmistryV1Prefix, "skip-trial"].join("/"), palmistryV1AddConsultant: () => [palmistryV1Prefix, "add-consultant"].join("/"), palmistryV1AddGuides: () => [palmistryV1Prefix, "add-guides"].join("/"), // Additional Purchases CompatibilityV2 compatibilityV2SkipTrial: () => [compatibilityV2Prefix, "skip-trial"].join("/"), compatibilityV2AddConsultant: () => [compatibilityV2Prefix, "add-consultant"].join("/"), compatibilityV2AddGuides: () => [compatibilityV2Prefix, "add-guides"].join("/"), // Additional Purchases CompatibilityV3 compatibilityV3SkipTrial: () => [compatibilityV3Prefix, "skip-trial"].join("/"), compatibilityV3AddConsultant: () => [compatibilityV3Prefix, "add-consultant"].join("/"), compatibilityV3AddGuides: () => [compatibilityV3Prefix, "add-guides"].join("/"), // Additional Purchases CompatibilityV4 compatibilityV4SkipTrial: () => [compatibilityV4Prefix, "skip-trial"].join("/"), compatibilityV4AddConsultant: () => [compatibilityV4Prefix, "add-consultant"].join("/"), compatibilityV4AddGuides: () => [compatibilityV4Prefix, "add-guides"].join("/"), // Advisors advisors: () => [host, "advisors"].join("/"), advisorChat: (id: string) => [host, "advisors", id].join("/"), // Email - Pay - Email epeGender: () => [host, "epe", "gender"].join("/"), epeBirthdate: () => [host, "epe", "birthdate"].join("/"), epeEmail: () => [host, "epe", "email"].join("/"), epePayment: () => [host, "epe", "payment"].join("/"), epeSuccessPayment: () => [host, "epe", "success-payment"].join("/"), epeFailPayment: () => [host, "epe", "fail-payment"].join("/"), // Advisor short path advisorChatGender: () => [host, "advisor-chat", "gender"].join("/"), advisorChatBirthdate: () => [host, "advisor-chat", "birthdate"].join("/"), advisorChatBirthtime: () => [host, "advisor-chat", "birthtime"].join("/"), advisorChatBirthPlace: () => [host, "advisor-chat", "birth-place"].join("/"), advisorChatEmail: () => [host, "advisor-chat", "email"].join("/"), advisorChatPayment: () => [host, "advisor-chat", "payment"].join("/"), advisorChatSuccessPayment: () => [host, "advisor-chat", "success-payment"].join("/"), advisorChatFailPayment: () => [host, "advisor-chat", "fail-payment"].join("/"), advisorChatPrivate: (id?: string) => [host, "advisor-chat-private", id].join("/"), singlePaymentShortPath: (productId?: string) => [host, "single-payment", productId].join("/"), getInformationPartner: () => [host, "get-information-partner"].join("/"), mikeV1: () => [host, "v1", "mike"].join("/"), getBirthPlace: () => [host, "birthPlace"].join("/"), // PalmistryV1 palmistryV1Welcome: () => [palmistryV1Prefix, "welcome"].join("/"), palmistryV1Gender: () => [palmistryV1Prefix, "gender"].join("/"), palmistryV1Birthdate: () => [palmistryV1Prefix, "birthdate"].join("/"), palmistryV1PalmsInformation: () => [palmistryV1Prefix, "palms-information"].join("/"), palmistryV1WhatAspects: () => [palmistryV1Prefix, "what-aspects"].join("/"), palmistryV1RelationshipStatus: () => [palmistryV1Prefix, "relationship-status"].join("/"), palmistryV1ElementResonates: () => [palmistryV1Prefix, "element-resonates"].join("/"), palmistryV1FavoriteColor: () => [palmistryV1Prefix, "favorite-color"].join("/"), palmistryV1HeadOrHeart: () => [palmistryV1Prefix, "head-or-heart"].join("/"), palmistryV1HeadOrHeartResult: () => [palmistryV1Prefix, "head-or-heart-result"].join("/"), palmistryV1RelateFollowing: () => [palmistryV1Prefix, "relate-following"].join("/"), palmistryV1LetScan: () => [palmistryV1Prefix, "let-scan"].join("/"), palmistryV1ScanInstruction: () => [palmistryV1Prefix, "scan-instruction"].join("/"), palmistryV1Camera: () => [palmistryV1Prefix, "camera"].join("/"), palmistryV1ScannedPhoto: () => [palmistryV1Prefix, "scanned-photo"].join("/"), palmistryV1Email: () => [palmistryV1Prefix, "email"].join("/"), palmistryV1TrialChoice: () => [palmistryV1Prefix, "trial-choice"].join("/"), palmistryV1TrialChoiceVideo: () => [palmistryV1Prefix, "trial-choice-video"].join("/"), palmistryV1TrialPayment: () => [palmistryV1Prefix, "trial-payment"].join("/"), palmistryV1TryApp: () => [palmistryV1Prefix, "try-app"].join("/"), palmistryV1Payment: () => [palmistryV1Prefix, "payment"].join("/"), palmistryV1PaymentModal: () => [palmistryV1Prefix, "payment-modal"].join("/"), palmistryV1SecretDiscountPaymentModal: () => [palmistryV1Prefix, "secret-discount-payment-modal"].join("/"), palmistryV1SaveOff: () => [palmistryV1Prefix, "save-off"].join("/"), palmistryV1SecretDiscount: () => [palmistryV1Prefix, "secret-discount"].join("/"), palmistryOnboardingV1: () => [palmistryV1Prefix, "onboarding"].join("/"), // CompatibilityV2 compatibilityV2Welcome: () => [compatibilityV2Prefix, "welcome"].join("/"), compatibilityV2CompatibilityTest: () => [compatibilityV2Prefix, "compatibility-test"].join("/"), compatibilityV2Gender: () => [compatibilityV2Prefix, "gender"].join("/"), compatibilityV2GenderPartner: () => [compatibilityV2Prefix, "gender-partner"].join("/"), compatibilityV2Birthdate: () => [compatibilityV2Prefix, "birthdate"].join("/"), compatibilityV2BirthdatePartner: () => [compatibilityV2Prefix, "birthdate-partner"].join("/"), compatibilityV2PalmsInformation: () => [compatibilityV2Prefix, "palms-information"].join("/"), compatibilityV2PalmsInformationPartner: () => [compatibilityV2Prefix, "palms-information-partner"].join("/"), compatibilityV2DateEvent: () => [compatibilityV2Prefix, "date-event"].join("/"), compatibilityV2WhatAspects: () => [compatibilityV2Prefix, "what-aspects"].join("/"), compatibilityV2RelationshipStatus: () => [compatibilityV2Prefix, "relationship-status"].join("/"), compatibilityV2RelationshipStatusResult: () => [compatibilityV2Prefix, "relationship-status-result"].join("/"), compatibilityV2FearInRelationship: () => [compatibilityV2Prefix, "fear-in-relationship"].join("/"), compatibilityV2ImportantStep: () => [compatibilityV2Prefix, "important-step"].join("/"), compatibilityV2WhoMatter: () => [compatibilityV2Prefix, "who-matter"].join("/"), compatibilityV2YourPriority: () => [compatibilityV2Prefix, "your-priority"].join("/"), compatibilityV2ElementResonates: () => [compatibilityV2Prefix, "element-resonates"].join("/"), compatibilityV2FavoriteColor: () => [compatibilityV2Prefix, "favorite-color"].join("/"), compatibilityV2HeadOrHeart: () => [compatibilityV2Prefix, "head-or-heart"].join("/"), compatibilityV2HeadOrHeartResult: () => [compatibilityV2Prefix, "head-or-heart-result"].join("/"), compatibilityV2RelateFollowing: () => [compatibilityV2Prefix, "relate-following"].join("/"), compatibilityV2RomanticGestures: () => [compatibilityV2Prefix, "romantic-gestures"].join("/"), compatibilityV2CheckingPhone: () => [compatibilityV2Prefix, "checking-phone"].join("/"), compatibilityV2PersonalizedRelationshipAnalysis: () => [compatibilityV2Prefix, "personalized-relationship-analysis"].join("/"), compatibilityV2LetScan: () => [compatibilityV2Prefix, "let-scan"].join("/"), compatibilityV2ScanInstruction: () => [compatibilityV2Prefix, "scan-instruction"].join("/"), compatibilityV2Camera: () => [compatibilityV2Prefix, "camera"].join("/"), compatibilityV2ScanHand: () => [compatibilityV2Prefix, "scan-hand"].join("/"), compatibilityV2ScannedPhoto: () => [compatibilityV2Prefix, "scanned-photo"].join("/"), compatibilityV2Email: () => [compatibilityV2Prefix, "email"].join("/"), compatibilityV2TrialChoice: () => [compatibilityV2Prefix, "trial-choice"].join("/"), compatibilityV2TrialChoiceVideo: () => [compatibilityV2Prefix, "trial-choice-video"].join("/"), compatibilityV2TrialPayment: () => [compatibilityV2Prefix, "trial-payment"].join("/"), compatibilityV2TryApp: () => [compatibilityV2Prefix, "try-app"].join("/"), compatibilityV2Payment: () => [compatibilityV2Prefix, "payment"].join("/"), compatibilityV2PaymentModal: () => [compatibilityV2Prefix, "payment-modal"].join("/"), compatibilityV2SecretDiscountPaymentModal: () => [compatibilityV2Prefix, "secret-discount-payment-modal"].join("/"), compatibilityV2SaveOff: () => [compatibilityV2Prefix, "save-off"].join("/"), compatibilityV2SecretDiscount: () => [compatibilityV2Prefix, "secret-discount"].join("/"), compatibilityV2Onboarding: () => [compatibilityV2Prefix, "onboarding"].join("/"), compatibilityV2Review: () => [compatibilityV2Prefix, "review"].join("/"), compatibilityV2WheelOfFortune: () => [compatibilityV2Prefix, "wheel-of-fortune"].join("/"), compatibilityV2SpecialOffer: () => [compatibilityV2Prefix, "special-offer"].join("/"), // CompatibilityV3 compatibilityV3Welcome: () => [compatibilityV3Prefix, "welcome"].join("/"), compatibilityV3Gender: () => [compatibilityV3Prefix, "gender"].join("/"), compatibilityV3GenderPartner: () => [compatibilityV3Prefix, "gender-partner"].join("/"), compatibilityV3Birthdate: () => [compatibilityV3Prefix, "birthdate"].join("/"), compatibilityV3BirthdatePartner: () => [compatibilityV3Prefix, "birthdate-partner"].join("/"), compatibilityV3PalmsInformation: () => [compatibilityV3Prefix, "palms-information"].join("/"), compatibilityV3PalmsInformationPartner: () => [compatibilityV3Prefix, "palms-information-partner"].join("/"), compatibilityV3DateEvent: () => [compatibilityV3Prefix, "date-event"].join("/"), compatibilityV3WhatAspects: () => [compatibilityV3Prefix, "what-aspects"].join("/"), compatibilityV3RelationshipStatus: () => [compatibilityV3Prefix, "relationship-status"].join("/"), compatibilityV3ElementResonates: () => [compatibilityV3Prefix, "element-resonates"].join("/"), compatibilityV3FavoriteColor: () => [compatibilityV3Prefix, "favorite-color"].join("/"), compatibilityV3HeadOrHeart: () => [compatibilityV3Prefix, "head-or-heart"].join("/"), compatibilityV3HeadOrHeartResult: () => [compatibilityV3Prefix, "head-or-heart-result"].join("/"), compatibilityV3RelateFollowing: () => [compatibilityV3Prefix, "relate-following"].join("/"), compatibilityV3RomanticGestures: () => [compatibilityV3Prefix, "romantic-gestures"].join("/"), compatibilityV3CheckingPhone: () => [compatibilityV3Prefix, "checking-phone"].join("/"), compatibilityV3LetScan: () => [compatibilityV3Prefix, "let-scan"].join("/"), compatibilityV3ScanInstruction: () => [compatibilityV3Prefix, "scan-instruction"].join("/"), compatibilityV3Camera: () => [compatibilityV3Prefix, "camera"].join("/"), compatibilityV3ScannedPhoto: () => [compatibilityV3Prefix, "scanned-photo"].join("/"), compatibilityV3ChoosePlace: () => [compatibilityV3Prefix, "choose-place"].join("/"), compatibilityV3CodeInstruction: () => [compatibilityV3Prefix, "code-instruction"].join("/"), compatibilityV3Email: () => [compatibilityV3Prefix, "email"].join("/"), compatibilityV3TrialChoice: () => [compatibilityV3Prefix, "trial-choice"].join("/"), compatibilityV3TrialChoiceVideo: () => [compatibilityV3Prefix, "trial-choice-video"].join("/"), compatibilityV3TrialPayment: () => [compatibilityV3Prefix, "trial-payment"].join("/"), compatibilityV3TryApp: () => [compatibilityV3Prefix, "try-app"].join("/"), compatibilityV3Payment: () => [compatibilityV3Prefix, "payment"].join("/"), compatibilityV3PaymentModal: () => [compatibilityV3Prefix, "payment-modal"].join("/"), compatibilityV3SecretDiscountPaymentModal: () => [compatibilityV3Prefix, "secret-discount-payment-modal"].join("/"), compatibilityV3SaveOff: () => [compatibilityV3Prefix, "save-off"].join("/"), compatibilityV3SecretDiscount: () => [compatibilityV3Prefix, "secret-discount"].join("/"), compatibilityV3Onboarding: () => [compatibilityV3Prefix, "onboarding"].join("/"), // CompatibilityV4 compatibilityV4Welcome: () => [compatibilityV4Prefix, "welcome"].join("/"), compatibilityV4Gender: () => [compatibilityV4Prefix, "gender"].join("/"), compatibilityV4GenderPartner: () => [compatibilityV4Prefix, "gender-partner"].join("/"), compatibilityV4Birthdate: () => [compatibilityV4Prefix, "birthdate"].join("/"), compatibilityV4Birthplace: () => [compatibilityV4Prefix, "birthplace"].join("/"), compatibilityV4Birthtime: () => [compatibilityV4Prefix, "birthtime"].join("/"), compatibilityV4YourAnalysis: () => [compatibilityV4Prefix, "your-analysis"].join("/"), compatibilityV4PartnerAnalysis: () => [compatibilityV4Prefix, "partner-analysis"].join("/"), compatibilityV4BirthdatePartner: () => [compatibilityV4Prefix, "birthdate-partner"].join("/"), compatibilityV4PalmsInformation: () => [compatibilityV4Prefix, "palms-information"].join("/"), compatibilityV4PalmsInformationPartner: () => [compatibilityV4Prefix, "palms-information-partner"].join("/"), compatibilityV4DateEvent: () => [compatibilityV4Prefix, "date-event"].join("/"), compatibilityV4WhatAspects: () => [compatibilityV4Prefix, "what-aspects"].join("/"), compatibilityV4ResultAnalysis: () => [compatibilityV4Prefix, "result-analysis"].join("/"), compatibilityV4ResultAnalysisResult: () => [compatibilityV4Prefix, "result-analysis-result"].join("/"), compatibilityV4RelationshipStatus: () => [compatibilityV4Prefix, "relationship-status"].join("/"), compatibilityV4RelationshipStatusResult: () => [compatibilityV4Prefix, "relationship-status-result"].join("/"), compatibilityV4ElementResonates: () => [compatibilityV4Prefix, "element-resonates"].join("/"), compatibilityV4FavoriteColor: () => [compatibilityV4Prefix, "favorite-color"].join("/"), compatibilityV4HeadOrHeart: () => [compatibilityV4Prefix, "head-or-heart"].join("/"), compatibilityV4HeadOrHeartResult: () => [compatibilityV4Prefix, "head-or-heart-result"].join("/"), compatibilityV4RelateFollowing: () => [compatibilityV4Prefix, "relate-following"].join("/"), compatibilityV4RomanticGestures: () => [compatibilityV4Prefix, "romantic-gestures"].join("/"), compatibilityV4CheckingPhone: () => [compatibilityV4Prefix, "checking-phone"].join("/"), compatibilityV4PartnerPassword: () => [compatibilityV4Prefix, "partner-password"].join("/"), compatibilityV4YourFear: () => [compatibilityV4Prefix, "your-fear"].join("/"), compatibilityV4YourInclination: () => [compatibilityV4Prefix, "your-inclination"].join("/"), compatibilityV4LetScan: () => [compatibilityV4Prefix, "let-scan"].join("/"), compatibilityV4ScanInstruction: () => [compatibilityV4Prefix, "scan-instruction"].join("/"), compatibilityV4Camera: () => [compatibilityV4Prefix, "camera"].join("/"), compatibilityV4ScannedPhoto: () => [compatibilityV4Prefix, "scanned-photo"].join("/"), compatibilityV4ChoosePlace: () => [compatibilityV4Prefix, "choose-place"].join("/"), compatibilityV4CodeInstruction: () => [compatibilityV4Prefix, "code-instruction"].join("/"), compatibilityV4Email: () => [compatibilityV4Prefix, "email"].join("/"), compatibilityV4TrialChoice: () => [compatibilityV4Prefix, "trial-choice"].join("/"), compatibilityV4TrialChoiceVideo: () => [compatibilityV4Prefix, "trial-choice-video"].join("/"), compatibilityV4TrialPayment: () => [compatibilityV4Prefix, "trial-payment"].join("/"), compatibilityV4TryApp: () => [compatibilityV4Prefix, "try-app"].join("/"), compatibilityV4Payment: () => [compatibilityV4Prefix, "payment"].join("/"), compatibilityV4PaymentModal: () => [compatibilityV4Prefix, "payment-modal"].join("/"), compatibilityV4SecretDiscountPaymentModal: () => [compatibilityV4Prefix, "secret-discount-payment-modal"].join("/"), compatibilityV4SaveOff: () => [compatibilityV4Prefix, "save-off"].join("/"), compatibilityV4SecretDiscount: () => [compatibilityV4Prefix, "secret-discount"].join("/"), compatibilityV4Onboarding: () => [compatibilityV4Prefix, "onboarding"].join("/"), compatibilityV4CalculateInAdvance: () => [compatibilityV4Prefix, "calculate-in-advance"].join("/"), compatibilityV4CalculateInAdvanceResult: () => [compatibilityV4Prefix, "calculate-in-advance-result"].join("/"), compatibilityV4Review: () => [compatibilityV4Prefix, "review"].join("/"), compatibilityV4PartnerSimilarity: () => [compatibilityV4Prefix, "partner-similarity"].join("/"), compatibilityV4BirthplacePartner: () => [compatibilityV4Prefix, "birthplace-partner"].join("/"), compatibilityV4AlmostThere: () => [compatibilityV4Prefix, "almost-there"].join("/"), compatibilityV4ComplexRelationshipAspect: () => [compatibilityV4Prefix, "complex-relationship-aspect"].join("/"), compatibilityV4StressResponse: () => [compatibilityV4Prefix, "stress-response"].join("/"), compatibilityV4StressResponseResult: () => [compatibilityV4Prefix, "stress-response-result"].join("/"), compatibilityV4WhatAddToAnalysis: () => [compatibilityV4Prefix, "what-add-to-analysis"].join("/"), compatibilityV4PotentialPartnerName: () => [compatibilityV4Prefix, "potential-partner-name"].join("/"), compatibilityV4FormerPartnerName: () => [compatibilityV4Prefix, "former-partner-name"].join("/"), compatibilityV4PotentialPartnerBirthdate: () => [compatibilityV4Prefix, "potential-partner-birthdate"].join("/"), compatibilityV4FormerPartnerBirthdate: () => [compatibilityV4Prefix, "former-partner-birthdate"].join("/"), compatibilityV4Loading: () => [compatibilityV4Prefix, "loading"].join("/"), // PalmistryV2 palmistryV2TrialPayment: () => [palmistryEmailMarketingV2Prefix, "trial-payment"].join("/"), palmistryV2SaveOff: () => [palmistryEmailMarketingV2Prefix, "save-off"].join("/"), palmistryV2SecretDiscount: () => [palmistryEmailMarketingV2Prefix, "secret-discount"].join("/"), palmistryV2Onboarding: () => [palmistryEmailMarketingV2Prefix, "onboarding"].join("/"), palmistryV2SkipTrial: () => [palmistryEmailMarketingV2Prefix, "skip-trial"].join("/"), palmistryV2AddConsultant: () => [palmistryEmailMarketingV2Prefix, "add-consultant"].join("/"), palmistryV2AddGuides: () => [palmistryEmailMarketingV2Prefix, "add-guides"].join("/"), palmistryV2PaymentModal: () => [palmistryEmailMarketingV2Prefix, "payment-modal"].join("/"), palmistryV2SecretDiscountPaymentModal: () => [palmistryEmailMarketingV2Prefix, "secret-discount-payment-modal"].join("/"), // MarketingLandingV1 emailMarketingV1Landing: () => [emailMarketingV1Prefix, "marketing-landing"].join("/"), emailMarketingV1SpecialOffer: () => [emailMarketingV1Prefix, "special-offer"].join("/"), emailMarketingV1SaveOff: () => [emailMarketingV1Prefix, "save-off"].join("/"), emailMarketingV1SecretDiscount: () => [emailMarketingV1Prefix, "secret-discount"].join("/"), // Anonymous anonymousPayment: () => [anonymousPrefix, "payment"].join("/"), emailMarketingV1PaymentModal: () => [emailMarketingV1Prefix, "payment-modal"].join("/"), emailMarketingV1SecretDiscountPaymentModal: () => [emailMarketingV1Prefix, "secret-discount-payment-modal"].join("/"), emailMarketingV1SkipTrial: () => [emailMarketingV1Prefix, "skip-trial"].join("/"), emailMarketingV1AddConsultant: () => [emailMarketingV1Prefix, "add-consultant"].join("/"), emailMarketingV1AddGuides: () => [emailMarketingV1Prefix, "add-guides"].join("/"), emailMarketingV1Onboarding: () => [emailMarketingV1Prefix, "onboarding"].join("/"), // ABDesignV1 genderV1: () => [host, "v1", "gender"].join("/"), questionnaireV1: () => [host, "v1", "questionnaire"].join("/"), goalSetupV1: () => [host, "v1", "goal-setup"].join("/"), aboutUsV1: (key?: string) => { if (key === undefined) { return [host, "v1", "about-us"].join("/") } else { return [host, "v1", "about-us"].join("/") + `?key=${key}` } }, hyperPersonalizedAstrologyV1: () => [host, "v1", "hyper-personalized-astrology"].join("/"), singleZodiacInfoV1: () => [host, "v1", "single-zodiac-info"].join("/"), relationshipZodiacInfoV1: () => [host, "v1", "relationship-zodiac-info"].join("/"), noTimeV1: () => [host, "v1", "no-time"].join("/"), relationshipAlmostThereV1: () => [host, "v1", "relationship-almost-there"].join("/"), loadingInRelationshipV1: () => [host, "v1", "loading-in-relationship"].join("/"), problemsV1: () => [host, "v1", "problems"].join("/"), worksRouterV1: () => [host, "v1", "works-router"].join("/"), worksForUsV1: () => [host, "v1", "works-for-us"].join("/"), worksTraitsV1: () => [host, "v1", "works-traits"].join("/"), notAloneV1: () => [host, "v1", "not-alone"].join("/"), allRightV1: () => [host, "v1", "all-right"].join("/"), almostThereV1: () => [host, "v1", "almost-there"].join("/"), partnerRightPlaceV1: () => [host, "v1", "partner-right-place"].join("/"), partnerThingV1: () => [host, "v1", "partner-thing"].join("/"), partnerTotallyNormalV1: () => [host, "v1", "partner-totally-normal"].join("/"), withHeartV1: () => [host, "v1", "with-heart"].join("/"), withHeadV1: () => [host, "v1", "with-head"].join("/"), bothV1: () => [host, "v1", "both"].join("/"), satisfiedResultV1: () => [host, "v1", "satisfied-result"].join("/"), loadingProfileV1: () => [host, "v1", "loading-profile"].join("/"), emailEnterV1: () => [host, "v1", "email"].join("/"), emailConfirmV1: () => [host, "v1", "email-confirm"].join("/"), onboardingV1: () => [host, "v1", "onboarding"].join("/"), trialChoiceV1: () => [host, "v1", "trial-choice"].join("/"), trialChoiceVideoV1: () => [host, "v1", "trial-choice-video"].join("/"), trialPaymentV1: () => [host, "v1", "trial-payment"].join("/"), tryAppV1: () => [host, "v1", "try-app"].join("/"), trialPaymentWithDiscountV1: () => [host, "v1", "trial-payment-with-discount"].join("/"), additionalDiscountV1: () => [host, "v1", "additional-discount"].join("/"), mentionedInV1: () => [host, "v1", "mentionedIn"].join("/"), findHappinessV1: () => [host, "v1", "find-happiness"].join("/"), scanInstructionV1: () => [host, "v1", "scan-instruction"].join("/"), cameraV1: () => [host, "v1", "camera"].join("/"), scannedPhotoV1: () => [host, "v1", "scanned-photo"].join("/"), addReportV1: () => [host, "v1", "add-report"].join("/"), unlimitedReadingsV1: () => [host, "v1", "unlimited-readings"].join("/"), addConsultationV1: () => [host, "v1", "add-consultation"].join("/"), loadingPage: () => [host, "loading-page"].join("/"), notFound: () => [host, "404"].join("/"), chatsWelcome: () => [chatsPrefix, "welcome"].join("/"), chatsQuiz: () => [chatsPrefix, "quiz"].join("/"), chatsQuizPsychicReading: () => [chatsPrefix, "quiz", "psychicReading"].join("/"), chatsGuidance: () => [chatsPrefix, "guidance"].join("/"), chatsQuizGoal: () => [chatsPrefix, "quiz", "goal"].join("/"), chatsGoalSetup: () => [chatsPrefix, "goalSetup"].join("/"), chatsReviews: () => [chatsPrefix, "reviews"].join("/"), chatsQuizRelationshipStatus: () => [chatsPrefix, "quiz", "relationshipStatus"].join("/"), chatsQuizDate: () => [chatsPrefix, "quiz", "date"].join("/"), chatsQuizParentStatus: () => [chatsPrefix, "quiz", "parentStatus"].join("/"), chatsProfileIntro: () => [chatsPrefix, "profileIntro"].join("/"), chatsQuizSatisfiedWithLife: () => [chatsPrefix, "quiz", "satisfiedWithLife"].join("/"), chatsQuizWhatEmotion: () => [chatsPrefix, "quiz", "whatEmotion"].join("/"), chatsAnswerHub: () => [chatsPrefix, "answerHub"].join("/"), chatsQuizWhatYouWant: () => [chatsPrefix, "quiz", "whatYouWant"].join("/"), chatsQuizMissingInLife: () => [chatsPrefix, "quiz", "missingInLife"].join("/"), chatsRecognize: () => [chatsPrefix, "recognize"].join("/"), chatsQuizYourGoal: () => [chatsPrefix, "quiz", "yourGoal"].join("/"), chatsQuizSomethingWorrying: () => [chatsPrefix, "quiz", "somethingWorrying"].join("/"), chatsQuizProneToOverthinking: () => [chatsPrefix, "quiz", "proneToOverthinking"].join("/"), chatsQuizWorriesImpact: () => [chatsPrefix, "quiz", "worriesImpact"].join("/"), chatsQuizSensitiveToCriticism: () => [chatsPrefix, "quiz", "sensitiveToCriticism"].join("/"), chatsQuizHeadOrHeart: () => [chatsPrefix, "quiz", "headOrHeart"].join("/"), chatsQuizHowConfident: () => [chatsPrefix, "quiz", "howConfident"].join("/"), chatsQuizNeedGuidance: () => [chatsPrefix, "quiz", "needGuidance"].join("/"), chatsQuizDecisionGuidance: () => [chatsPrefix, "quiz", "decisionGuidance"].join("/"), chatsQuizResonateLove: () => [chatsPrefix, "quiz", "resonateLove"].join("/"), chatsQuizResonateLife: () => [chatsPrefix, "quiz", "resonateLife"].join("/"), chatsQuizResonateFuture: () => [chatsPrefix, "quiz", "resonateFuture"].join("/"), chatsPreferencesIntro: () => [chatsPrefix, "preferencesIntro"].join("/"), chatsQuizBelieveInSpirituality: () => [chatsPrefix, "quiz", "believeInSpirituality"].join("/"), chatsQuizReadingExperience: () => [chatsPrefix, "quiz", "readingExperience"].join("/"), chatsQuizInterestedHowLong: () => [chatsPrefix, "quiz", "interestedHowLong"].join("/"), chatsQuizMainReason: () => [chatsPrefix, "quiz", "mainReason"].join("/"), chatsQuizWhatToExpect: () => [chatsPrefix, "quiz", "whatToExpect"].join("/"), chatsQuizGuidanceArea: () => [chatsPrefix, "quiz", "guidanceArea"].join("/"), chatsQuizPsychicComfortable: () => [chatsPrefix, "quiz", "psychicComfortable"].join("/"), chatsQuizUserName: () => [chatsPrefix, "quiz", "userName"].join("/"), chatsQuizProcessing: () => [chatsPrefix, "quiz", "processing"].join("/"), chatsCategories: () => [chatsPrefix, "categories"].join("/"), chatsEmailConfirm: () => [chatsPrefix, "emailConfirm"].join("/"), chatsThankYou: () => [chatsPrefix, "thankYou"].join("/"), chatsConnecting: () => [chatsPrefix, "connecting"].join("/"), chatsExpert: () => [chatsPrefix, "expert"].join("/"), // Profile profile: () => [profilePrefix].join("/"), profileSubscriptions: () => [profilePrefix, "subscriptions"].join("/"), // Retaining Funnel retainingFunnelCancelSubscription: () => [retainingFunnelPrefix, "cancel-subscription"].join("/"), retainingFunnelAppreciateChoice: () => [retainingFunnelPrefix, "appreciate-choice"].join("/"), retainingFunnelWhatReason: () => [retainingFunnelPrefix, "what-reason"].join("/"), retainingFunnelSecondChance: () => [retainingFunnelPrefix, "second-chance"].join("/"), retainingFunnelPlanCancelled: () => [retainingFunnelPrefix, "plan-cancelled"].join("/"), retainingFunnelSubscriptionStopped: () => [retainingFunnelPrefix, "subscription-stopped"].join("/"), retainingFunnelChangeMind: () => [retainingFunnelPrefix, "change-mind"].join("/"), retainingFunnelStopFor30Days: () => [retainingFunnelPrefix, "stop-for-30-days"].join("/"), retainingFunnelCancellationOfSubscription: () => [retainingFunnelPrefix, "cancellation-of-subscription"].join("/"), retainingFunnelStay50Done: () => [retainingFunnelPrefix, "stay-50-done"].join("/"), }, server: { userLocale: () => ["https://ipapi.co", "json"].join("/"), // new method for getting user data me: () => [dApiHost, "users", "me"].join("/"), // token: () => [apiHost, prefix, "auth", "token.json"].join("/"), elements: () => [oldBackendPrefix, "elements.json"].join("/"), zodiacs: (zodiac: string) => [apiHost, prefix, "zodiacs", `${zodiac}.json`].join("/"), apps: (bundleId: string) => [oldBackendPrefix, `${bundleId}.json`].join("/"), assets: (category: string) => [apiHost, prefix, "assets", "categories", `${category}.json`].join("/"), assetCategories: () => [apiHost, prefix, "assets", "categories.json"].join("/"), dailyForecasts: () => [apiHost, prefix, "user", "daily_forecast.json"].join("/"), auras: () => [apiHost, prefix, "user", "aura.json"].join("/"), // subscriptionItems: () => // [apiHost, prefix, "user", "subscription", "item_prices.json"].join("/"), // subscriptionPlans: () => [apiHost, prefix, "sub_plans.json"].join("/"), // subscriptionCheckout: () => // [apiHost, prefix, "user", "subscription", "checkout", "new.json"].join( // "/" // ), // subscriptionReceipt: (id: string) => // [apiHost, prefix, "user", "subscription_receipts", `${id}.json`].join( // "/" // ), compatCategories: () => [apiHost, prefix, "ai", "compat_categories.json"].join("/"), compat: () => [apiHost, prefix, "ai", "compats.json"].join("/"), createUserCallbacks: () => [apiHost, prefix, "user", "callbacks.json"].join("/"), getUserCallbacks: (id: string) => [apiHost, prefix, "user", "callbacks", `${id}.json`].join("/"), getTranslations: () => [oldBackendPrefix, "t.json"].join("/"), // getTranslations: () => [siteHost, "api/v2", "t.json"].join("/"), aiRequestsV2: (promptKey: string) => [apiHost, "api/v2", "ai", "prompts", promptKey, "requests.json"].join( "/" ), getAiRequestsV2: (id: string) => [apiHost, "api/v2", "ai", "requests", `${id}.json`].join("/"), dApiTestPaymentProducts: () => [dApiHost, "payment", "test", "products"].join("/"), dApiPaymentCheckout: () => [dApiHost, "payment", "checkout"].join("/"), dApiCheckProductPurchased: (productKey: string) => [dApiHost, "payment", "products", `${productKey}`].join( "/" ), dApiAuth: () => [dApiHost, "users", "auth"].join("/"), dApiAnonymousAuth: () => [dApiHost, "users", "anonymous", "auth"].join("/"), dApiGetRealToken: () => [dApiHost, "users", "auth", "token"].join("/"), login: () => [dApiHost, "users", "auth", "login"].join("/"), resetPassword: () => [dApiHost, "users", "auth", "password"].join("/"), assistants: () => [apiHost, prefix, "ai", "assistants.json"].join("/"), setExternalChatIdAssistants: (chatId: string) => [apiHost, prefix, "ai", "assistants", chatId, "chats.json"].join("/"), // Palmistry getPalmistryLines: () => [dApiHost, dApiPrefix, "palmistry", "lines"].join("/"), // Paywall getPaywallByPlacementKey: (placementKey: EPlacementKeys) => [dApiHost, dApiPrefix, "placement", placementKey, "paywall"].join("/"), // Payment makePayment: () => [dApiHost, dApiPrefix, "payment", "checkout"].join("/"), makeAnonymousPayment: () => [dApiHost, dApiPrefix, "payment", "anonymous", "checkout"].join("/"), getPaymentConfig: () => [dApiHost, dApiPrefix, "payment", "config"].join("/"), // check payment method exist getPaymentMethods: () => [dApiHost, dApiPrefix, "payment", "method"].join("/"), // User videos getUserVideos: () => [dApiHost, "users", "videos", "combined"].join("/"), // User videos getUserPDF: (key: string) => [dApiHost, "users", "pdf", key].join("/"), // Session createSession: () => [dApiHost, dApiPrefix, "session"].join("/"), updateSession: (id: string) => [dApiHost, dApiPrefix, "session", id].join("/"), getLocale: () => [dApiHost, dApiPrefix, "session", "locale"].join("/"), getLocaleCDN: () => { const currentDomain = window.location.hostname; const isWitlabDomain = currentDomain.includes('witlab.app'); const cdnHost = isWitlabDomain ? "https://cdn.witlab.app" : "https://cdn.aura.witapps.us"; return [cdnHost, dApiPrefix, "session", "locale"].join("/"); }, getPixels: () => [dApiHost, dApiPrefix, "session", "pixels"].join("/"), getFunnel: () => [dApiHost, dApiPrefix, "session", "funnel"].join("/"), // Chats getChatsCategories: () => [dApiHost, "chats", "categories"].join("/"), getChatMessages: (chatId: string) => [dApiHost, "chats", chatId, "messages"].join("/"), // Chats socket chatSocket: () => [dApiHost].join("/"), createChat: (assistantId: string) => [dApiHost, "chats", "create", assistantId].join("/"), // Subscriptions subscriptionReceipts: () => [apiHost, prefix, "user", "subscription_receipts.json"].join("/"), subscriptionStatusNew: () => [dApiHost, "users", "subscription", "status"].join("/"), userSubscriptions: () => [dApiHost, dApiPrefixV3, "payment", "subscriptions"].join("/"), userSubscriptionAction: (subscriptionId: string, action: UserSubscriptionAction) => [dApiHost, dApiPrefixV3, "payment", "subscriptions", subscriptionId, action].join("/"), }, openAi: { createThread: () => [openAIHost, openAiPrefix, "threads"].join("/"), createMessage: (threadId: string) => [openAIHost, openAiPrefix, "threads", threadId, "messages"].join("/"), getListMessages: (threadId: string) => [openAIHost, openAiPrefix, "threads", threadId, "messages"].join("/"), runThread: (threadId: string) => [openAIHost, openAiPrefix, "threads", threadId, "runs"].join("/"), getStatusRunThread: (threadId: string, runId: string) => [openAIHost, openAiPrefix, "threads", threadId, "runs", runId].join("/"), getListRuns: (threadId: string) => [openAIHost, openAiPrefix, "threads", threadId, "runs"].join("/"), }, }; export const entrypoints = [ routes.client.root(), routes.client.birthday(), // routes.client.subscription(), routes.client.wallpaper(), routes.client.didYouKnow(), routes.client.attention(), routes.client.feedback(), routes.client.breath(), routes.client.compatibilityResult(), routes.client.home(), routes.client.breathResult(), routes.client.magicBall(), routes.client.trialChoice(), routes.client.palmistry(), routes.client.advisors(), routes.client.advisorChatGender(), routes.client.advisorChatSuccessPayment(), routes.client.advisorChatFailPayment(), ]; export const isEntrypoint = (path: string) => entrypoints.includes(path); export const isNotEntrypoint = (path: string) => !isEntrypoint(path); export const withNavigationRoutes = [ routes.client.wallpaper(), routes.client.home(), ]; export const hasNavigation = (path: string) => withNavigationRoutes.includes(path); export const hasNoNavigation = (path: string) => !hasNavigation(path); export const withCrossButtonRoutes = [ // routes.client.attention(), // routes.client.subscription(), routes.client.paymentMethod(), ]; /** * Checks if a given path has a cross button. * @param {string} path - The path to check. * @returns {boolean} - True if the path has a cross button, false otherwise. */ export const hasCrossButton = (path: string): boolean => { // Check if the path is included in the array of routes with cross buttons return withCrossButtonRoutes.includes(path); }; export const withoutFooterRoutes = [ routes.client.didYouKnow(), routes.client.freePeriodInfo(), routes.client.createProfile(), routes.client.attention(), routes.client.feedback(), routes.client.compatibility(), routes.client.breath(), routes.client.priceList(), routes.client.compatibilityResult(), routes.client.home(), routes.client.breathResult(), routes.client.paymentResult(), routes.client.paymentSuccess(), routes.client.paymentFail(), routes.client.magicBall(), routes.client.horoscopeBestiesResult(), routes.client.predictionMoonResult(), routes.client.myHoroscopeResult(), routes.client.thermalResult(), routes.client.moonPhaseTracker(), routes.client.energyVampirismResult(), routes.client.nameHoroscopeResult(), routes.client.goalSetup(), routes.client.hyperPersonalizedAstrology(), routes.client.noTime(), routes.client.loadingInRelationship(), routes.client.worksForUs(), routes.client.relationshipAlmostThere(), routes.client.singleZodiacInfo(), routes.client.worksTraits(), routes.client.notAlone(), routes.client.allRight(), routes.client.almostThere(), routes.client.partnerRightPlace(), routes.client.partnerThing(), routes.client.partnerTotallyNormal(), routes.client.withHeart(), routes.client.withHead(), routes.client.both(), routes.client.relationshipZodiacInfo(), routes.client.satisfiedResult(), routes.client.aboutUs(), routes.client.emailConfirm(), routes.client.onboarding(), routes.client.trialChoice(), routes.client.trialPayment(), routes.client.additionalDiscount(), routes.client.trialPaymentWithDiscount(), routes.client.palmistryPaywall(), routes.client.palmistryPayment(), routes.client.palmistryDiscount(), routes.client.email("marketing-landing"), routes.client.email("marketing-trial-payment"), routes.client.tryApp(), routes.client.addReport(), routes.client.unlimitedReadings(), routes.client.addConsultation(), routes.client.advisors(), routes.client.epeSuccessPayment(), routes.client.getInformationPartner(), routes.client.advisorChatBirthPlace(), routes.client.skipTrial(), routes.client.addConsultant(), routes.client.addGuides(), ]; export const withoutFooterPartOfRoutes = [ routes.client.questionnaire(), routes.client.advisors(), routes.client.advisorChatPrivate(), ]; export const hasNoFooter = (path: string) => { const targetRoute = withoutFooterPartOfRoutes.findIndex((route) => path.includes(route) ); return !withoutFooterRoutes.includes(path) && targetRoute === -1; }; export const withNavbarFooterRoutes = [ routes.client.home(), routes.client.compatibility(), routes.client.compatibilityResult(), routes.client.breath(), routes.client.breathResult(), routes.client.wallpaper(), routes.client.advisors(), ]; export const hasNavbarFooter = (path: string) => withNavbarFooterRoutes.includes(path); export const withoutHeaderRoutes = [ routes.client.palmistryPayment(), routes.client.palmistryDiscount(), routes.client.palmistryPremiumBundle(), routes.client.compatibility(), // routes.client.subscription(), routes.client.paymentMethod(), routes.client.paymentResult(), routes.client.paymentSuccess(), routes.client.paymentFail(), routes.client.magicBall(), routes.client.horoscopeBestiesResult(), routes.client.predictionMoonResult(), routes.client.myHoroscopeResult(), routes.client.myHoroscopeResult(), routes.client.thermalResult(), routes.client.moonPhaseTracker(), routes.client.energyVampirismResult(), routes.client.nameHoroscopeResult(), routes.client.goalSetup(), routes.client.hyperPersonalizedAstrology(), routes.client.noTime(), routes.client.loadingInRelationship(), routes.client.worksForUs(), routes.client.relationshipAlmostThere(), routes.client.singleZodiacInfo(), routes.client.worksTraits(), routes.client.notAlone(), routes.client.allRight(), routes.client.almostThere(), routes.client.partnerRightPlace(), routes.client.partnerThing(), routes.client.partnerTotallyNormal(), routes.client.withHeart(), routes.client.withHead(), routes.client.both(), routes.client.relationshipZodiacInfo(), routes.client.satisfiedResult(), routes.client.onboarding(), routes.client.trialPayment(), routes.client.additionalDiscount(), routes.client.trialPaymentWithDiscount(), routes.client.email("marketing-landing"), routes.client.email("marketing-trial-payment"), routes.client.tryApp(), routes.client.advisors(), routes.client.epeSuccessPayment(), routes.client.getInformationPartner(), routes.client.advisorChatPrivate(), routes.client.gender(), routes.client.skipTrial(), routes.client.addConsultant(), routes.client.addGuides(), ]; export const hasNoHeader = (path: string) => { let result = true; withoutHeaderRoutes.forEach((route) => { if ( (!path.includes("palmistry") && path.includes(route)) || (path.includes("palmistry") && path === route) ) { result = false; } }); return result; }; export const withFullDataModalRoutes = [routes.client.home()]; export const hasFullDataModal = (path: string) => { return withFullDataModalRoutes.includes(`/${path.split("/")[1]}`); }; export const getRouteBy = (status: UserStatus): string => { switch (status) { case "lead": // return routes.client.palmistryV1Welcome(); return routes.client.auth(); case "registred": case "unsubscribed": return routes.client.palmistryV1TrialPayment(); case "subscribed": return routes.client.home(); default: throw new Error(`Unknown user status, received status is "${status}"`); } }; export default routes;