dating-schema 0.45.0 → 0.47.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"onboarding-config.js","sourceRoot":"","sources":["../src/onboarding-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA2BH,+EAA+E;AAE/E,MAAM,CAAC,MAAM,iBAAiB,GAA0C;IACtE,uBAAuB;IACvB,WAAW,EAAE;QACX,KAAK,EAAE,0BAA0B;QACjC,QAAQ,EAAE,kDAAkD;QAC5D,cAAc,EAAE,qBAAqB;QACrC,eAAe,EAAE,oBAAoB;QACrC,QAAQ,EAAE,IAAI;KACf;IACD,WAAW,EAAE;QACX,KAAK,EAAE,uBAAuB;QAC9B,QAAQ,EAAE,kEAAkE;QAC5E,cAAc,EAAE,iBAAiB;QACjC,eAAe,EAAE,2BAA2B;QAC5C,QAAQ,EAAE,IAAI;KACf;IACD,MAAM,EAAE;QACN,KAAK,EAAE,qBAAqB;QAC5B,QAAQ,EAAE,4CAA4C;QACtD,cAAc,EAAE,eAAe;QAC/B,eAAe,EAAE,8BAA8B;QAC/C,QAAQ,EAAE,IAAI;KACf;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,iBAAiB;QACxB,QAAQ,EACN,4FAA4F;QAC9F,cAAc,EAAE,wBAAwB;QACxC,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,yBAAyB;QAChC,QAAQ,EAAE,qCAAqC;QAC/C,cAAc,EAAE,iBAAiB;QACjC,eAAe,EAAE,gCAAgC;QACjD,QAAQ,EAAE,IAAI;KACf;IAED,6BAA6B;IAC7B,kBAAkB,EAAE;QAClB,KAAK,EAAE,0CAA0C;QACjD,QAAQ,EAAE,2CAA2C;QACrD,cAAc,EAAE,4BAA4B;QAC5C,eAAe,EAAE,oBAAoB;QACrC,QAAQ,EAAE,IAAI;KACf;IACD,kBAAkB,EAAE;QAClB,K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AAC,MAAM,CAAC,MAAM,EACjC,CAAC,CACF,CAAC","sourcesContent":["/**\n * Onboarding Field Configuration\n * ================================\n * Single source of truth for all per-field onboarding metadata.\n * Both frontend and backend import this — NO hardcoded strings elsewhere.\n *\n * @module dating-schema/onboarding-config\n */\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\nexport interface OnboardingFieldConfig {\n /** Question heading shown to user */\n title: string;\n /** Help text below the heading */\n subtitle?: string;\n /** Toast message on successful save */\n successMessage: string;\n /** \"Show on profile\" toggle label (null = no toggle for this field) */\n visibilityLabel?: string;\n /** Whether the field is required to proceed */\n required: boolean;\n}\n\n/** Step grouping for the onboarding flow */\nexport interface OnboardingStepGroup {\n /** Section label (e.g. \"Basics\") */\n label: string;\n /** Icon name from lucide-react (resolved at runtime by frontend) */\n icon: string;\n /** Ordered list of field keys in this section */\n fields: string[];\n}\n\n// ─── Per-field onboarding metadata ──────────────────────────────────────────\n\nexport const ONBOARDING_FIELDS: Record<string, OnboardingFieldConfig> = {\n // ── Step 1: Basics ──\n displayName: {\n title: 'What should we call you?',\n subtitle: 'This is the name others will see on your profile',\n successMessage: 'Display name saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n dateOfBirth: {\n title: \"When's your birthday?\",\n subtitle: 'You must be at least 18. Your age will be shown on your profile.',\n successMessage: 'Birthday saved!',\n visibilityLabel: 'Show my age on my profile',\n required: true,\n },\n gender: {\n title: \"What's your gender?\",\n subtitle: 'This helps us show you to the right people',\n successMessage: 'Gender saved!',\n visibilityLabel: 'Show my gender on my profile',\n required: true,\n },\n phoneNumbers: {\n title: 'Contact numbers',\n subtitle:\n 'Interested matches can contact you or your family on these numbers — only if you allow it.',\n successMessage: 'Contact numbers saved!',\n required: true,\n },\n pronouns: {\n title: 'What are your pronouns?',\n subtitle: 'Let people know how to refer to you',\n successMessage: 'Pronouns saved!',\n visibilityLabel: 'Show my pronouns on my profile',\n required: true,\n },\n\n // ── Step 2: Relationship ──\n relationshipStatus: {\n title: \"What's your current relationship status?\",\n subtitle: 'Helps us understand your situation better',\n successMessage: 'Relationship status saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n relationshipIntent: {\n title: 'What are you looking for?',\n subtitle: 'Be honest — it helps us find better matches',\n successMessage: 'Relationship intent saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n sexualOrientation: {\n title: \"What's your sexual orientation?\",\n subtitle: 'Used to show you relevant profiles',\n successMessage: 'Orientation saved!',\n visibilityLabel: 'Show my orientation on my profile',\n required: false,\n },\n preferredGenders: {\n title: 'Who are you interested in?',\n subtitle: \"Select one or more genders you'd like to see\",\n successMessage: 'Gender preference saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n relationshipStructure: {\n title: 'What relationship structure works for you?',\n subtitle: 'How do you prefer to structure your relationships?',\n successMessage: 'Relationship structure saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n\n // ── Step 3: Mind & Education ──\n educationLevel: {\n title: \"What's your highest education level?\",\n subtitle: 'Your academic background',\n successMessage: 'Education level saved!',\n visibilityLabel: 'Show my education on my profile',\n required: false,\n },\n institutionTier: {\n title: \"What's your institution's prestige tier?\",\n subtitle: 'The tier of your most recent educational institution',\n successMessage: 'Institution tier saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n cognitiveBand: {\n title: 'How do you approach truth & decisions?',\n subtitle: 'From tradition-based to evidence-based — where do you fall?',\n successMessage: 'Cognitive approach saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n politicalOrientation: {\n title: 'Where do you fall on the political spectrum?',\n subtitle: 'Understanding your worldview helps us find compatible matches',\n successMessage: 'Political orientation saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n\n // ── Step 4: Career & Finance ──\n profession: {\n title: 'What is your profession or occupation?',\n subtitle: 'Select the field that best describes what you do',\n successMessage: 'Profession saved!',\n visibilityLabel: 'Show my profession on my profile',\n required: false,\n },\n careerStage: {\n title: 'What stage is your career at?',\n subtitle: 'Where are you in your professional journey right now?',\n successMessage: 'Career stage saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n incomeRange: {\n title: \"What's your annual income range?\",\n subtitle: 'This is kept private by default — only shared when you choose',\n successMessage: 'Income range saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n\n // ── Step 5: Appearance ──\n height: {\n title: 'How tall are you?',\n subtitle: 'Drag the slider to set your height',\n successMessage: 'Height saved!',\n visibilityLabel: 'Show my height on my profile',\n required: false,\n },\n weight: {\n title: \"What's your weight?\",\n subtitle: 'Only you control who sees this',\n successMessage: 'Weight saved!',\n visibilityLabel: 'Show my weight on my profile',\n required: false,\n },\n bodyBuild: {\n title: \"What's your body type?\",\n subtitle: 'How would you describe your build?',\n successMessage: 'Body type saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n complexion: {\n title: \"What's your complexion?\",\n subtitle: 'Your skin tone',\n successMessage: 'Complexion saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n\n // ── Step 6: Photos ──\n photos: {\n title: 'Add your best photos',\n subtitle: 'Upload at least 2 photos. Profiles with 4+ photos get 3x more likes.',\n successMessage: 'Photos saved!',\n required: true,\n },\n\n // ── Step 7: Your Roots ──\n hometown: {\n title: 'Where is your hometown?',\n subtitle: 'Select your home state and district',\n successMessage: 'Hometown saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n familyReligion: {\n title: \"What's your family's religion?\",\n subtitle: 'The religion you were raised in',\n successMessage: 'Family religion saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n personalReligion: {\n title: \"What's your personal faith?\",\n subtitle: \"This can be different from your family's religion\",\n successMessage: 'Personal faith saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n motherTongue: {\n title: \"What's your mother tongue?\",\n subtitle: 'The primary language spoken at home',\n successMessage: 'Mother tongue saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n familyValues: {\n title: 'How would you describe your family values?',\n subtitle: 'How traditional or progressive is your family?',\n successMessage: 'Family values saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n\n // ── Step 8: Interests ──\n hobbies: {\n title: 'What are your interests & hobbies?',\n subtitle: 'Select up to 20 — these help us find compatible matches',\n successMessage: 'Interests saved!',\n required: false,\n },\n\n // ── Step 9: Habits ──\n diet: {\n title: \"What's your diet preference?\",\n subtitle: 'Your food habits',\n successMessage: 'Diet preference saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n smoking: {\n title: 'Do you smoke?',\n subtitle: 'Your smoking habits',\n successMessage: 'Smoking habit saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n alcohol: {\n title: 'Do you drink alcohol?',\n subtitle: 'Your drinking habits',\n successMessage: 'Drinking habit saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n\n // ── Step 10: Bio ──\n bio: {\n title: 'Write a short bio',\n subtitle: 'Like a WhatsApp status — a quick, catchy line about you (10–150 characters)',\n successMessage: 'Bio saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n myStory: {\n title: 'Tell us your story',\n subtitle: 'Share your journey, personality, what shaped you — help people truly know you',\n successMessage: 'Story saved!',\n required: false,\n },\n\n // ── Step 11: Favourites ──\n favouriteBooks: {\n title: 'What are your favourite books?',\n subtitle: 'Add up to 5 — search or type your own. Great conversation starters!',\n successMessage: 'Favourite books saved!',\n required: false,\n },\n favouriteShows: {\n title: 'What are your favourite shows?',\n subtitle: 'Movies, TV shows, anime — anything you love watching',\n successMessage: 'Favourite shows saved!',\n required: false,\n },\n idols: {\n title: 'Who are your idols?',\n subtitle: 'People who inspire you — living or historic',\n successMessage: 'Idols saved!',\n required: false,\n },\n\n // ── Step 12: Personality ──\n mbtiType: {\n title: \"What's your MBTI personality type?\",\n subtitle: \"Don't know? No worries — you can skip this\",\n successMessage: 'MBTI type saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n attachmentStyle: {\n title: \"What's your attachment style?\",\n subtitle: 'The #1 predictor of relationship success',\n successMessage: 'Attachment style saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n loveLanguage: {\n title: \"What's your love language?\",\n subtitle:\n 'How you prefer to give and receive love — willingness to adapt matters more than matching (Chapman research)',\n successMessage: 'Love language saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n oceanScores: {\n title: \"What's your Big Five personality?\",\n subtitle: \"Rate yourself on each trait (1-100). Don't know? Take a free test first!\",\n successMessage: 'Big Five scores saved!',\n required: false,\n },\n conflictStyle: {\n title: 'How do you handle conflicts?',\n subtitle:\n \"Gottman's research predicts relationship outcomes with 94% accuracy based on conflict style\",\n successMessage: 'Conflict style saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n};\n\n// ─── Step grouping ──────────────────────────────────────────────────────────\n\nexport const ONBOARDING_STEP_GROUPS: OnboardingStepGroup[] = [\n {\n label: 'Basics',\n icon: 'User',\n fields: ['displayName', 'dateOfBirth', 'gender', 'phoneNumbers', 'pronouns'],\n },\n {\n label: 'Relationship',\n icon: 'Heart',\n fields: [\n 'relationshipStatus',\n 'relationshipIntent',\n 'sexualOrientation',\n 'preferredGenders',\n 'relationshipStructure',\n ],\n },\n {\n label: 'Mind & Education',\n icon: 'Brain',\n fields: ['educationLevel', 'institutionTier', 'cognitiveBand', 'politicalOrientation'],\n },\n {\n label: 'Career & Finance',\n icon: 'Briefcase',\n fields: ['profession', 'careerStage', 'incomeRange'],\n },\n {\n label: 'Appearance',\n icon: 'Ruler',\n fields: ['height', 'weight', 'bodyBuild', 'complexion'],\n },\n { label: 'Photos', icon: 'Camera', fields: ['photos'] },\n {\n label: 'Your Roots',\n icon: 'TreePine',\n fields: ['hometown', 'familyReligion', 'personalReligion', 'motherTongue', 'familyValues'],\n },\n { label: 'Interests', icon: 'Sparkles', fields: ['hobbies'] },\n { label: 'Habits', icon: 'Cigarette', fields: ['diet', 'smoking', 'alcohol'] },\n { label: 'Bio', icon: 'PenLine', fields: ['bio', 'myStory'] },\n { label: 'Favourites', icon: 'Star', fields: ['favouriteBooks', 'favouriteShows', 'idols'] },\n {\n label: 'Personality',\n icon: 'Puzzle',\n fields: ['mbtiType', 'attachmentStyle', 'loveLanguage', 'oceanScores', 'conflictStyle'],\n },\n];\n\n// ─── Helpers ─────────────────────────────────────────────────────────────────\n\n/** Get onboarding config for a single field. */\nexport function getOnboardingFieldConfig(\n fieldKey: string | undefined,\n): OnboardingFieldConfig | undefined {\n if (!fieldKey) return undefined;\n return ONBOARDING_FIELDS[fieldKey];\n}\n\n/** Total number of main steps. */\nexport const ONBOARDING_TOTAL_MAIN_STEPS = ONBOARDING_STEP_GROUPS.length;\n\n/** Total number of sub-steps across all main steps. */\nexport const ONBOARDING_TOTAL_SUB_STEPS = ONBOARDING_STEP_GROUPS.reduce(\n (sum, g) => sum + g.fields.length,\n 0,\n);\n"]}
1
+ {"version":3,"file":"onboarding-config.js","sourceRoot":"","sources":["../src/onboarding-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA2BH,+EAA+E;AAE/E,MAAM,CAAC,MAAM,iBAAiB,GAA0C;IACtE,uBAAuB;IACvB,WAAW,EAAE;QACX,KAAK,EAAE,mBAAmB;QAC1B,QAAQ,EAAE,sBAAsB;QAChC,cAAc,EAAE,qBAAqB;QACrC,eAAe,EAAE,sBAAsB;QACvC,QAAQ,EAAE,IAAI;KACf;IACD,WAAW,EAAE;QACX,KAAK,EAAE,mBAAmB;QAC1B,QAAQ,EAAE,sBAAsB;QAChC,cAAc,EAAE,qBAAqB;QACrC,eAAe,EAAE,wBAAwB;QACzC,QAAQ,EAAE,IAAI;KACf;IACD,MAAM,EAAE;QACN,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,iBAAiB;QAC3B,cAAc,EAAE,gBAAgB;QAChC,eAAe,EAAE,mBAAmB;QACpC,QAAQ,EAAE,IAAI;KACf;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,oBAAoB;QAC3B,QAAQ,EAAE,uBAAuB;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,CAAC,EAAE;CACxI,CAAC;AAEF,gFAAgF;AAEhF,gDAAgD;AAChD,MAAM,UAAU,wBAAwB,CACtC,QAA4B;IAE5B,IAAI,CAAC,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChC,OAAO,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC;AAED,kCAAkC;AAClC,MAAM,CAAC,MAAM,2BAA2B,GAAG,sBAAsB,CAAC,MAAM,CAAC;AAEzE,uDAAuD;AACvD,MAAM,CAAC,MAAM,0BAA0B,GAAG,sBAAsB,CAAC,MAAM,CACrE,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,MAAM,EACjC,CAAC,CACF,CAAC","sourcesContent":["/**\n * Onboarding Field Configuration\n * ================================\n * Single source of truth for all per-field onboarding metadata.\n * Both frontend and backend import this.\n *\n * IMPORTANT: All string properties (title, subtitle, successMessage, visibilityLabel,\n * step group label) are i18n KEYS, not display text. The frontend resolves them via\n * useTranslations(\"datingOnboarding\") → t(config.title).\n *\n * Translation files:\n * - messages/en/dating-onboarding.json (English)\n * - messages/hi/dating-onboarding.json (Hindi)\n *\n * @module dating-schema/onboarding-config\n */\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\nexport interface OnboardingFieldConfig {\n /** i18n key for the question heading (resolved via t(title)) */\n title: string;\n /** i18n key for help text below the heading */\n subtitle?: string;\n /** i18n key for toast message on successful save */\n successMessage: string;\n /** i18n key for \"Show on profile\" toggle label (null = no toggle) */\n visibilityLabel?: string;\n /** Whether the field is required to proceed */\n required: boolean;\n}\n\n/** Step grouping for the onboarding flow */\nexport interface OnboardingStepGroup {\n /** i18n key for section label */\n label: string;\n /** Icon name from lucide-react (resolved at runtime by frontend) */\n icon: string;\n /** Ordered list of field keys in this section */\n fields: string[];\n}\n\n// ─── Per-field onboarding metadata ──────────────────────────────────────────\n\nexport const ONBOARDING_FIELDS: Record<string, OnboardingFieldConfig> = {\n // ── Step 1: Basics ──\n displayName: {\n title: 'displayName.title',\n subtitle: 'displayName.subtitle',\n successMessage: 'displayName.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n dateOfBirth: {\n title: 'dateOfBirth.title',\n subtitle: 'dateOfBirth.subtitle',\n successMessage: 'dateOfBirth.success',\n visibilityLabel: 'dateOfBirth.visibility',\n required: true,\n },\n gender: {\n title: 'gender.title',\n subtitle: 'gender.subtitle',\n successMessage: 'gender.success',\n visibilityLabel: 'gender.visibility',\n required: true,\n },\n phoneNumbers: {\n title: 'phoneNumbers.title',\n subtitle: 'phoneNumbers.subtitle',\n successMessage: 'phoneNumbers.success',\n required: true,\n },\n pronouns: {\n title: 'pronouns.title',\n subtitle: 'pronouns.subtitle',\n successMessage: 'pronouns.success',\n visibilityLabel: 'pronouns.visibility',\n required: true,\n },\n\n // ── Step 2: Relationship ──\n relationshipStatus: {\n title: 'relationshipStatus.title',\n subtitle: 'relationshipStatus.subtitle',\n successMessage: 'relationshipStatus.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n relationshipIntent: {\n title: 'relationshipIntent.title',\n subtitle: 'relationshipIntent.subtitle',\n successMessage: 'relationshipIntent.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n sexualOrientation: {\n title: 'sexualOrientation.title',\n subtitle: 'sexualOrientation.subtitle',\n successMessage: 'sexualOrientation.success',\n visibilityLabel: 'sexualOrientation.visibility',\n required: false,\n },\n preferredGenders: {\n title: 'preferredGenders.title',\n subtitle: 'preferredGenders.subtitle',\n successMessage: 'preferredGenders.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n relationshipStructure: {\n title: 'relationshipStructure.title',\n subtitle: 'relationshipStructure.subtitle',\n successMessage: 'relationshipStructure.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n\n // ── Step 3: Mind & Education ──\n educationLevel: {\n title: 'educationLevel.title',\n subtitle: 'educationLevel.subtitle',\n successMessage: 'educationLevel.success',\n visibilityLabel: 'educationLevel.visibility',\n required: false,\n },\n institutionTier: {\n title: 'institutionTier.title',\n subtitle: 'institutionTier.subtitle',\n successMessage: 'institutionTier.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n cognitiveBand: {\n title: 'cognitiveBand.title',\n subtitle: 'cognitiveBand.subtitle',\n successMessage: 'cognitiveBand.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n politicalOrientation: {\n title: 'politicalOrientation.title',\n subtitle: 'politicalOrientation.subtitle',\n successMessage: 'politicalOrientation.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n\n // ── Step 4: Career & Finance ──\n profession: {\n title: 'profession.title',\n subtitle: 'profession.subtitle',\n successMessage: 'profession.success',\n visibilityLabel: 'profession.visibility',\n required: false,\n },\n careerStage: {\n title: 'careerStage.title',\n subtitle: 'careerStage.subtitle',\n successMessage: 'careerStage.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n incomeRange: {\n title: 'incomeRange.title',\n subtitle: 'incomeRange.subtitle',\n successMessage: 'incomeRange.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n\n // ── Step 5: Appearance ──\n height: {\n title: 'height.title',\n subtitle: 'height.subtitle',\n successMessage: 'height.success',\n visibilityLabel: 'height.visibility',\n required: false,\n },\n weight: {\n title: 'weight.title',\n subtitle: 'weight.subtitle',\n successMessage: 'weight.success',\n visibilityLabel: 'weight.visibility',\n required: false,\n },\n bodyBuild: {\n title: 'bodyBuild.title',\n subtitle: 'bodyBuild.subtitle',\n successMessage: 'bodyBuild.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n complexion: {\n title: 'complexion.title',\n subtitle: 'complexion.subtitle',\n successMessage: 'complexion.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n\n // ── Step 6: Photos ──\n photos: {\n title: 'photos.title',\n subtitle: 'photos.subtitle',\n successMessage: 'photos.success',\n required: true,\n },\n\n // ── Step 7: Your Roots ──\n hometown: {\n title: 'hometown.title',\n subtitle: 'hometown.subtitle',\n successMessage: 'hometown.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n familyReligion: {\n title: 'familyReligion.title',\n subtitle: 'familyReligion.subtitle',\n successMessage: 'familyReligion.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n personalReligion: {\n title: 'personalReligion.title',\n subtitle: 'personalReligion.subtitle',\n successMessage: 'personalReligion.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n motherTongue: {\n title: 'motherTongue.title',\n subtitle: 'motherTongue.subtitle',\n successMessage: 'motherTongue.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n familyValues: {\n title: 'familyValues.title',\n subtitle: 'familyValues.subtitle',\n successMessage: 'familyValues.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n\n // ── Step 8: Interests ──\n hobbies: {\n title: 'hobbies.title',\n subtitle: 'hobbies.subtitle',\n successMessage: 'hobbies.success',\n required: false,\n },\n\n // ── Step 9: Habits ──\n diet: {\n title: 'diet.title',\n subtitle: 'diet.subtitle',\n successMessage: 'diet.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n smoking: {\n title: 'smoking.title',\n subtitle: 'smoking.subtitle',\n successMessage: 'smoking.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n alcohol: {\n title: 'alcohol.title',\n subtitle: 'alcohol.subtitle',\n successMessage: 'alcohol.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n\n // ── Step 10: Bio ──\n bio: {\n title: 'bio.title',\n subtitle: 'bio.subtitle',\n successMessage: 'bio.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n myStory: {\n title: 'myStory.title',\n subtitle: 'myStory.subtitle',\n successMessage: 'myStory.success',\n required: false,\n },\n\n // ── Step 11: Favourites ──\n favouriteBooks: {\n title: 'favouriteBooks.title',\n subtitle: 'favouriteBooks.subtitle',\n successMessage: 'favouriteBooks.success',\n required: false,\n },\n favouriteShows: {\n title: 'favouriteShows.title',\n subtitle: 'favouriteShows.subtitle',\n successMessage: 'favouriteShows.success',\n required: false,\n },\n idols: {\n title: 'idols.title',\n subtitle: 'idols.subtitle',\n successMessage: 'idols.success',\n required: false,\n },\n\n // ── Step 12: Personality ──\n mbtiType: {\n title: 'mbtiType.title',\n subtitle: 'mbtiType.subtitle',\n successMessage: 'mbtiType.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n attachmentStyle: {\n title: 'attachmentStyle.title',\n subtitle: 'attachmentStyle.subtitle',\n successMessage: 'attachmentStyle.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n loveLanguage: {\n title: 'loveLanguage.title',\n subtitle: 'loveLanguage.subtitle',\n successMessage: 'loveLanguage.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n oceanScores: {\n title: 'oceanScores.title',\n subtitle: 'oceanScores.subtitle',\n successMessage: 'oceanScores.success',\n required: false,\n },\n conflictStyle: {\n title: 'conflictStyle.title',\n subtitle: 'conflictStyle.subtitle',\n successMessage: 'conflictStyle.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n};\n\n// ─── Step grouping ──────────────────────────────────────────────────────────\n\nexport const ONBOARDING_STEP_GROUPS: OnboardingStepGroup[] = [\n { label: 'steps.basics', icon: 'User', fields: ['displayName', 'dateOfBirth', 'gender', 'phoneNumbers', 'pronouns'] },\n { label: 'steps.relationship', icon: 'Heart', fields: ['relationshipStatus', 'relationshipIntent', 'sexualOrientation', 'preferredGenders', 'relationshipStructure'] },\n { label: 'steps.mindEducation', icon: 'Brain', fields: ['educationLevel', 'institutionTier', 'cognitiveBand', 'politicalOrientation'] },\n { label: 'steps.careerFinance', icon: 'Briefcase', fields: ['profession', 'careerStage', 'incomeRange'] },\n { label: 'steps.appearance', icon: 'Ruler', fields: ['height', 'weight', 'bodyBuild', 'complexion'] },\n { label: 'steps.photos', icon: 'Camera', fields: ['photos'] },\n { label: 'steps.yourRoots', icon: 'TreePine', fields: ['hometown', 'familyReligion', 'personalReligion', 'motherTongue', 'familyValues'] },\n { label: 'steps.interests', icon: 'Sparkles', fields: ['hobbies'] },\n { label: 'steps.habits', icon: 'Cigarette', fields: ['diet', 'smoking', 'alcohol'] },\n { label: 'steps.bio', icon: 'PenLine', fields: ['bio', 'myStory'] },\n { label: 'steps.favourites', icon: 'Star', fields: ['favouriteBooks', 'favouriteShows', 'idols'] },\n { label: 'steps.personality', icon: 'Puzzle', fields: ['mbtiType', 'attachmentStyle', 'loveLanguage', 'oceanScores', 'conflictStyle'] },\n];\n\n// ─── Helpers ─────────────────────────────────────────────────────────────────\n\n/** Get onboarding config for a single field. */\nexport function getOnboardingFieldConfig(\n fieldKey: string | undefined,\n): OnboardingFieldConfig | undefined {\n if (!fieldKey) return undefined;\n return ONBOARDING_FIELDS[fieldKey];\n}\n\n/** Total number of main steps. */\nexport const ONBOARDING_TOTAL_MAIN_STEPS = ONBOARDING_STEP_GROUPS.length;\n\n/** Total number of sub-steps across all main steps. */\nexport const ONBOARDING_TOTAL_SUB_STEPS = ONBOARDING_STEP_GROUPS.reduce(\n (sum, g) => sum + g.fields.length,\n 0,\n);\n"]}
@@ -1,23 +1,42 @@
1
1
  /**
2
2
  * Common API response types shared across all dating endpoints.
3
3
  */
4
- /** Standard API response envelope. */
4
+ /** Standard API response envelope from reform-backend. */
5
5
  export interface ApiResponse<T = unknown> {
6
6
  success: boolean;
7
7
  data: T;
8
8
  message?: string;
9
9
  }
10
- /** Photo attached to a dating profile. */
10
+ /** Photo on a dating profile. */
11
11
  export interface DatingPhoto {
12
12
  url: string;
13
- assetId?: string;
14
13
  order: number;
14
+ assetId?: string;
15
+ mimeType?: string;
16
+ sizeBytes?: number;
17
+ }
18
+ /** Voice recording prompt. */
19
+ export interface VoicePrompt {
20
+ url: string;
21
+ assetId: string;
22
+ durationSeconds: number;
23
+ }
24
+ /** Text prompt with user's answer. */
25
+ export interface TextPrompt {
26
+ prompt: string;
27
+ answer: string;
28
+ }
29
+ /** Reference to an AreaEntity (state, district, etc.). */
30
+ export interface AreaRef {
31
+ _id: string;
32
+ name: string;
33
+ type?: string;
15
34
  }
16
35
  /** Minimal profile info for lists, matches, and interactions. */
17
36
  export interface ProfileSummary {
18
37
  userId: string;
19
38
  displayName: string;
20
- photos: DatingPhoto[];
39
+ photos: Pick<DatingPhoto, 'url' | 'order'>[];
21
40
  lastActiveAt?: string;
22
41
  }
23
42
  /** Standard pagination request params. */
@@ -25,12 +44,4 @@ export interface PaginationParams {
25
44
  page?: number;
26
45
  limit?: number;
27
46
  }
28
- /** Standard paginated response shape. */
29
- export interface PaginatedResult<T> {
30
- total: number;
31
- page: number;
32
- limit: number;
33
- totalPages?: number;
34
- items: T[];
35
- }
36
47
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/responses/common.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,sCAAsC;AACtC,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,0CAA0C;AAC1C,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,iEAAiE;AACjE,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,0CAA0C;AAC1C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,yCAAyC;AACzC,MAAM,WAAW,eAA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CACvB;AAED,0CAA0C;AAC1C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/responses/common.ts"],"names":[],"mappings":"AAAA;;GAEG","sourcesContent":["/**\n * Common API response types shared across all dating endpoints.\n */\n\n/** Standard API response envelope. */\nexport interface ApiResponse<T = unknown> {\n success: boolean;\n data: T;\n message?: string;\n}\n\n/** Photo attached to a dating profile. */\nexport interface DatingPhoto {\n url: string;\n assetId?: string;\n order: number;\n}\n\n/** Minimal profile info for lists, matches, and interactions. */\nexport interface ProfileSummary {\n userId: string;\n displayName: string;\n photos: DatingPhoto[];\n lastActiveAt?: string;\n}\n\n/** Standard pagination request params. */\nexport interface PaginationParams {\n page?: number;\n limit?: number;\n}\n\n/** Standard paginated response shape. */\nexport interface PaginatedResult<T> {\n total: number;\n page: number;\n limit: number;\n totalPages?: number;\n items: T[];\n}\n"]}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/responses/common.ts"],"names":[],"mappings":"AAAA;;GAEG","sourcesContent":["/**\n * Common API response types shared across all dating endpoints.\n */\n\n/** Standard API response envelope from reform-backend. */\nexport interface ApiResponse<T = unknown> {\n success: boolean;\n data: T;\n message?: string;\n}\n\n/** Photo on a dating profile. */\nexport interface DatingPhoto {\n url: string;\n order: number;\n assetId?: string;\n mimeType?: string;\n sizeBytes?: number;\n}\n\n/** Voice recording prompt. */\nexport interface VoicePrompt {\n url: string;\n assetId: string;\n durationSeconds: number;\n}\n\n/** Text prompt with user's answer. */\nexport interface TextPrompt {\n prompt: string;\n answer: string;\n}\n\n/** Reference to an AreaEntity (state, district, etc.). */\nexport interface AreaRef {\n _id: string;\n name: string;\n type?: string;\n}\n\n/** Minimal profile info for lists, matches, and interactions. */\nexport interface ProfileSummary {\n userId: string;\n displayName: string;\n photos: Pick<DatingPhoto, 'url' | 'order'>[];\n lastActiveAt?: string;\n}\n\n/** Standard pagination request params. */\nexport interface PaginationParams {\n page?: number;\n limit?: number;\n}\n"]}
@@ -1,8 +1,38 @@
1
1
  /**
2
- * Discover feed and explore category response types.
2
+ * Discover feed, compatibility scoring, and explore category types.
3
+ *
4
+ * Compatibility uses 3 dimensions (each 0-50, total normalized to 0-100):
5
+ * - socialFit: demographics, location, religion, education, income (directional)
6
+ * - personality: OCEAN, attachment, humor, communication, hobbies, values (symmetric)
7
+ * - intimacy: relationship pace, love language, emotional intelligence (symmetric)
3
8
  */
4
- import type { DatingProfile } from './profile.js';
5
9
  import type { PaginationParams } from './common.js';
10
+ import type { DatingProfile } from './profile.js';
11
+ /** Per-dimension compatibility scores. Each dimension is 0-50. */
12
+ export interface CompatibilityDimensions {
13
+ socialFit: number;
14
+ personality: number;
15
+ intimacy: number;
16
+ }
17
+ /**
18
+ * Full compatibility result between two users.
19
+ *
20
+ * `total` is normalized 0-100: (socialFit + personality + intimacy) * 100 / 150.
21
+ * `bucket1`/`bucket2` are backward-compat aliases for older consumers.
22
+ * `bucket1_AtoB`/`bucket1_BtoA` are directional social-fit scores.
23
+ */
24
+ export interface CompatibilityResult {
25
+ total: number;
26
+ dimensions: CompatibilityDimensions;
27
+ /** Backward compat: = dimensions.socialFit */
28
+ bucket1: number;
29
+ /** Backward compat: = (personality + intimacy) / 2 rescaled to 0-50 */
30
+ bucket2: number;
31
+ /** Social fit from A's perspective on B (0-50) */
32
+ bucket1_AtoB: number;
33
+ /** Social fit from B's perspective on A (0-50) */
34
+ bucket1_BtoA: number;
35
+ }
6
36
  /** Discover feed query parameters. */
7
37
  export interface DiscoverParams extends PaginationParams {
8
38
  maxDistance?: number;
@@ -20,21 +50,13 @@ export interface DiscoverParams extends PaginationParams {
20
50
  verifiedOnly?: boolean;
21
51
  exploreCategory?: string;
22
52
  }
23
- /** Compatibility score breakdown dimensions. */
24
- export interface CompatibilityBreakdown {
25
- total: number;
26
- intentAlignment: number;
27
- lifestyleMatch: number;
28
- interestOverlap: number;
29
- personalityProximity: number;
30
- valuesAlignment: number;
31
- communicationCompat: number;
32
- dealbreakerScore: number;
33
- }
34
- /** A profile in the discover feed (with compatibility data). */
53
+ /** A profile in the discover feed with compatibility data and badges. */
35
54
  export interface DiscoverProfile extends Partial<DatingProfile> {
36
55
  compatibilityScore?: number;
37
- compatibilityBreakdown?: CompatibilityBreakdown;
56
+ compatibilityBreakdown?: CompatibilityResult;
57
+ /** True when the other user rates you highly (bucket1_BtoA > 40). */
58
+ reverseMatchStrong?: boolean;
59
+ badges?: import('../badges.js').BadgeKey[];
38
60
  }
39
61
  /** Paginated discover feed result. */
40
62
  export interface DiscoverResult {
@@ -42,6 +64,8 @@ export interface DiscoverResult {
42
64
  page: number;
43
65
  totalPages: number;
44
66
  total: number;
67
+ /** True when all profiles in the area have been swiped through. */
68
+ exhausted: boolean;
45
69
  }
46
70
  /** Single explore category count. */
47
71
  export interface ExploreCategoryCount {
@@ -1 +1 @@
1
- {"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/responses/discover.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,sCAAsC;AACtC,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAA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CAAC;IACrD,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH"}
@@ -1,5 +1,10 @@
1
1
  /**
2
- * Discover feed and explore category response types.
2
+ * Discover feed, compatibility scoring, and explore category types.
3
+ *
4
+ * Compatibility uses 3 dimensions (each 0-50, total normalized to 0-100):
5
+ * - socialFit: demographics, location, religion, education, income (directional)
6
+ * - personality: OCEAN, attachment, humor, communication, hobbies, values (symmetric)
7
+ * - intimacy: relationship pace, love language, emotional intelligence (symmetric)
3
8
  */
4
9
  export {};
5
10
  //# sourceMappingURL=discover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/responses/discover.ts"],"names":[],"mappings":"AAAA;;GAEG","sourcesContent":["/**\n * Discover feed and explore category response types.\n */\n\nimport type { DatingProfile } from './profile.js';\nimport type { PaginationParams } from './common.js';\n\n/** Discover feed query parameters. */\nexport interface DiscoverParams extends PaginationParams {\n maxDistance?: number;\n gender?: string;\n religion?: string;\n diet?: string;\n smoking?: string;\n alcohol?: string;\n educationLevel?: string;\n relationshipIntent?: string;\n sexualOrientation?: string;\n hobbies?: string;\n chronotype?: string;\n fitnessLevel?: string;\n verifiedOnly?: boolean;\n exploreCategory?: string;\n}\n\n/** Compatibility score breakdown dimensions. */\nexport interface CompatibilityBreakdown {\n total: number;\n intentAlignment: number;\n lifestyleMatch: number;\n interestOverlap: number;\n personalityProximity: number;\n valuesAlignment: number;\n communicationCompat: number;\n dealbreakerScore: number;\n}\n\n/** A profile in the discover feed (with compatibility data). */\nexport interface DiscoverProfile extends Partial<DatingProfile> {\n compatibilityScore?: number;\n compatibilityBreakdown?: CompatibilityBreakdown;\n}\n\n/** Paginated discover feed result. */\nexport interface DiscoverResult {\n profiles: DiscoverProfile[];\n page: number;\n totalPages: number;\n total: number;\n}\n\n/** Single explore category count. */\nexport interface ExploreCategoryCount {\n slug: string;\n count: number;\n}\n\n/** All explore category counts (grid + section breakdowns). */\nexport interface ExploreCountsResult {\n defaultDistanceKm: number;\n gridCounts: ExploreCategoryCount[];\n sectionCounts: {\n profession: ExploreCategoryCount[];\n language: ExploreCategoryCount[];\n religion: ExploreCategoryCount[];\n zodiac: ExploreCategoryCount[];\n diet: ExploreCategoryCount[];\n education: ExploreCategoryCount[];\n };\n}\n\n/** Query params for explore counts. */\nexport interface ExploreCountsParams {\n maxDistance?: number;\n}\n\n/** Query params for a single category count. */\nexport interface CategoryCountParams {\n category: string;\n maxDistance: number;\n}\n\n/** Single category count result. */\nexport interface CategoryCountResult {\n count: number;\n}\n\n/** Moderation list filter params. */\nexport interface ModerationListParams {\n page?: number;\n limit?: number;\n search?: string;\n isVerified?: string;\n isEliteInstitute?: string;\n isHighIq?: string;\n blackCircleStatus?: string;\n}\n\n/** Paginated moderation profile list. */\nexport interface ModerationListResult {\n profiles: import('./profile.js').ModerationProfile[];\n pagination: {\n page: number;\n limit: number;\n total: number;\n totalPages: number;\n };\n}\n"]}
1
+ {"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/responses/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG","sourcesContent":["/**\n * Discover feed, compatibility scoring, and explore category types.\n *\n * Compatibility uses 3 dimensions (each 0-50, total normalized to 0-100):\n * - socialFit: demographics, location, religion, education, income (directional)\n * - personality: OCEAN, attachment, humor, communication, hobbies, values (symmetric)\n * - intimacy: relationship pace, love language, emotional intelligence (symmetric)\n */\n\nimport type { PaginationParams } from './common.js';\nimport type { DatingProfile } from './profile.js';\n\n// ── Compatibility Scoring ────────────────────────────────────────────────────\n\n/** Per-dimension compatibility scores. Each dimension is 0-50. */\nexport interface CompatibilityDimensions {\n socialFit: number;\n personality: number;\n intimacy: number;\n}\n\n/**\n * Full compatibility result between two users.\n *\n * `total` is normalized 0-100: (socialFit + personality + intimacy) * 100 / 150.\n * `bucket1`/`bucket2` are backward-compat aliases for older consumers.\n * `bucket1_AtoB`/`bucket1_BtoA` are directional social-fit scores.\n */\nexport interface CompatibilityResult {\n total: number;\n dimensions: CompatibilityDimensions;\n /** Backward compat: = dimensions.socialFit */\n bucket1: number;\n /** Backward compat: = (personality + intimacy) / 2 rescaled to 0-50 */\n bucket2: number;\n /** Social fit from A's perspective on B (0-50) */\n bucket1_AtoB: number;\n /** Social fit from B's perspective on A (0-50) */\n bucket1_BtoA: number;\n}\n\n// ── Discover Feed ────────────────────────────────────────────────────────────\n\n/** Discover feed query parameters. */\nexport interface DiscoverParams extends PaginationParams {\n maxDistance?: number;\n gender?: string;\n religion?: string;\n diet?: string;\n smoking?: string;\n alcohol?: string;\n educationLevel?: string;\n relationshipIntent?: string;\n sexualOrientation?: string;\n hobbies?: string;\n chronotype?: string;\n fitnessLevel?: string;\n verifiedOnly?: boolean;\n exploreCategory?: string;\n}\n\n/** A profile in the discover feed with compatibility data and badges. */\nexport interface DiscoverProfile extends Partial<DatingProfile> {\n compatibilityScore?: number;\n compatibilityBreakdown?: CompatibilityResult;\n /** True when the other user rates you highly (bucket1_BtoA > 40). */\n reverseMatchStrong?: boolean;\n badges?: import('../badges.js').BadgeKey[];\n}\n\n/** Paginated discover feed result. */\nexport interface DiscoverResult {\n profiles: DiscoverProfile[];\n page: number;\n totalPages: number;\n total: number;\n /** True when all profiles in the area have been swiped through. */\n exhausted: boolean;\n}\n\n// ── Explore Categories ───────────────────────────────────────────────────────\n\n/** Single explore category count. */\nexport interface ExploreCategoryCount {\n slug: string;\n count: number;\n}\n\n/** All explore category counts (grid + section breakdowns). */\nexport interface ExploreCountsResult {\n defaultDistanceKm: number;\n gridCounts: ExploreCategoryCount[];\n sectionCounts: {\n profession: ExploreCategoryCount[];\n language: ExploreCategoryCount[];\n religion: ExploreCategoryCount[];\n zodiac: ExploreCategoryCount[];\n diet: ExploreCategoryCount[];\n education: ExploreCategoryCount[];\n };\n}\n\n/** Query params for explore counts. */\nexport interface ExploreCountsParams {\n maxDistance?: number;\n}\n\n/** Query params for a single category count. */\nexport interface CategoryCountParams {\n category: string;\n maxDistance: number;\n}\n\n/** Single category count result. */\nexport interface CategoryCountResult {\n count: number;\n}\n\n// ── Moderation ───────────────────────────────────────────────────────────────\n\n/** Moderation list filter params. */\nexport interface ModerationListParams {\n page?: number;\n limit?: number;\n search?: string;\n isVerified?: string;\n isEliteInstitute?: string;\n isHighIq?: string;\n blackCircleStatus?: string;\n}\n\n/** Paginated moderation profile list. */\nexport interface ModerationListResult {\n profiles: import('./profile.js').ModerationProfile[];\n pagination: {\n page: number;\n limit: number;\n total: number;\n totalPages: number;\n };\n}\n"]}
@@ -6,10 +6,10 @@
6
6
  * Response/entity types are here, organized by feature.
7
7
  */
8
8
  export * from './common.js';
9
- export * from './profile.js';
10
9
  export * from './discover.js';
11
10
  export * from './interactions.js';
12
11
  export * from './matches.js';
13
- export * from './safety.js';
14
12
  export * from './monetization.js';
13
+ export * from './profile.js';
14
+ export * from './safety.js';
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
@@ -6,10 +6,10 @@
6
6
  * Response/entity types are here, organized by feature.
7
7
  */
8
8
  export * from './common.js';
9
- export * from './profile.js';
10
9
  export * from './discover.js';
11
10
  export * from './interactions.js';
12
11
  export * from './matches.js';
13
- export * from './safety.js';
14
12
  export * from './monetization.js';
13
+ export * from './profile.js';
14
+ export * from './safety.js';
15
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC","sourcesContent":["/**\n * Dating API response types -- single source of truth.\n *\n * Consumed by both jansathi-frontend and reform-backend.\n * Request types (Zod schemas) are in the parent src/ directory.\n * Response/entity types are here, organized by feature.\n */\n\nexport * from './common.js';\nexport * from './profile.js';\nexport * from './discover.js';\nexport * from './interactions.js';\nexport * from './matches.js';\nexport * from './safety.js';\nexport * from './monetization.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC","sourcesContent":["/**\n * Dating API response types -- single source of truth.\n *\n * Consumed by both jansathi-frontend and reform-backend.\n * Request types (Zod schemas) are in the parent src/ directory.\n * Response/entity types are here, organized by feature.\n */\n\nexport * from './common.js';\nexport * from './discover.js';\nexport * from './interactions.js';\nexport * from './matches.js';\nexport * from './monetization.js';\nexport * from './profile.js';\nexport * from './safety.js';\n"]}
@@ -1,34 +1,65 @@
1
1
  /**
2
2
  * Boost, subscription, and pricing plan response types.
3
+ *
4
+ * These match the EXACT shapes returned by the reform-backend controllers.
3
5
  * Request types (CreateSubscriptionBody) are in ../subscription.ts.
4
6
  */
5
7
  import type { PlanId } from '../plan-limits.js';
6
- import type { Tenure } from '../subscription.js';
7
- /** Result of activating a profile boost. */
8
+ /** Result of activating a profile boost (POST /boosts). */
8
9
  export interface BoostResult {
9
10
  alreadyActive: boolean;
10
11
  boostedUntil: string;
11
12
  lastBoostedAt: string;
12
13
  }
13
- /** Current boost status. */
14
+ /** Current boost status (GET /boosts/status). */
14
15
  export interface BoostStatus {
15
16
  isActive: boolean;
16
17
  boostedUntil: string | null;
17
18
  lastBoostedAt: string | null;
18
19
  }
19
- /** User's subscription entity. */
20
- export interface Subscription {
21
- _id?: string;
22
- userId?: string;
20
+ /**
21
+ * Subscription response from GET /subscriptions/me.
22
+ *
23
+ * Two shapes depending on whether user has an active subscription:
24
+ * - Free user: { planId: 'lite', isFreeTier: true, status: 'active', launchOfferEligible }
25
+ * - Paid user: full subscription fields from DB + launchOfferEligible
26
+ */
27
+ export interface SubscriptionResponse {
23
28
  planId: PlanId;
24
- tenure?: Tenure;
25
29
  status: 'active' | 'grace' | 'expired' | 'cancelled';
30
+ isFreeTier?: boolean;
31
+ launchOfferEligible: boolean;
32
+ tenure?: string;
26
33
  startDate?: string;
27
34
  endDate?: string;
28
35
  autoRenew?: boolean;
29
- isFreeTier?: boolean;
30
- /** True when user is eligible for the launch offer. */
31
- launchOfferEligible?: boolean;
36
+ paymentReference?: string;
37
+ isLaunchOffer?: boolean;
38
+ razorpaySubscriptionId?: string;
39
+ }
40
+ /** @deprecated Use SubscriptionResponse instead */
41
+ export type Subscription = SubscriptionResponse;
42
+ /** Usage counter: current usage vs plan limit. */
43
+ export interface UsageCounter {
44
+ used: number;
45
+ limit: number;
46
+ }
47
+ /** Daily + monthly usage stats (GET /subscriptions/me/usage). */
48
+ export interface UsageStatsResponse {
49
+ plan: PlanId;
50
+ daily: {
51
+ swipes: UsageCounter;
52
+ compliments: UsageCounter;
53
+ rewinds: UsageCounter;
54
+ profileVisits: UsageCounter;
55
+ voiceCalls: UsageCounter;
56
+ videoCalls: UsageCounter;
57
+ };
58
+ monthly: {
59
+ newChatThreads: UsageCounter;
60
+ boosts: UsageCounter;
61
+ intentChanges: UsageCounter;
62
+ };
32
63
  }
33
64
  /** A pricing plan's tenure/duration variation with pricing. */
34
65
  export interface TenureVariation {
@@ -39,8 +70,9 @@ export interface TenureVariation {
39
70
  finalPrice: number;
40
71
  effectiveLabel: string;
41
72
  enabled: boolean;
73
+ razorpayPlanId?: string;
42
74
  }
43
- /** Launch offer details for a pricing plan. */
75
+ /** Launch offer details attached to a pricing plan. */
44
76
  export interface LaunchOfferResponse {
45
77
  enabled: boolean;
46
78
  price: number;
@@ -52,7 +84,7 @@ export interface LaunchOfferResponse {
52
84
  redemptionCount: number;
53
85
  oncePerUser: boolean;
54
86
  }
55
- /** Full pricing plan with tenures and launch offer. */
87
+ /** Full pricing plan returned by GET /subscriptions/plans. */
56
88
  export interface PricingPlanResponse {
57
89
  planId: PlanId;
58
90
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"monetization.d.ts","sourceRoot":"","sources":["../../src/responses/monetization.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,4CAA4C;AAC5C,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,4BAA4B;AAC5B,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;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,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,mBAAmB,CAAC;CACnC"}
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * Boost, subscription, and pricing plan response types.
3
+ *
4
+ * These match the EXACT shapes returned by the reform-backend controllers.
3
5
  * Request types (CreateSubscriptionBody) are in ../subscription.ts.
4
6
  */
5
7
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"monetization.js","sourceRoot":"","sources":["../../src/responses/monetization.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * Boost, subscription, and pricing plan response types.\n * Request types (CreateSubscriptionBody) are in ../subscription.ts.\n */\n\nimport type { PlanId } from '../plan-limits.js';\nimport type { Tenure } from '../subscription.js';\n\n/** Result of activating a profile boost. */\nexport interface BoostResult {\n alreadyActive: boolean;\n boostedUntil: string;\n lastBoostedAt: string;\n}\n\n/** Current boost status. */\nexport interface BoostStatus {\n isActive: boolean;\n boostedUntil: string | null;\n lastBoostedAt: string | null;\n}\n\n/** User's subscription entity. */\nexport interface Subscription {\n _id?: string;\n userId?: string;\n planId: PlanId;\n tenure?: Tenure;\n status: 'active' | 'grace' | 'expired' | 'cancelled';\n startDate?: string;\n endDate?: string;\n autoRenew?: boolean;\n isFreeTier?: boolean;\n /** True when user is eligible for the launch offer. */\n launchOfferEligible?: boolean;\n}\n\n/** A pricing plan's tenure/duration variation with pricing. */\nexport interface TenureVariation {\n tenureId: string;\n label: string;\n basePrice: number;\n discountPct: number;\n finalPrice: number;\n effectiveLabel: string;\n enabled: boolean;\n}\n\n/** Launch offer details for a pricing plan. */\nexport interface LaunchOfferResponse {\n enabled: boolean;\n price: number;\n tenure: string;\n label: string;\n badge: string;\n validUntil?: string;\n maxRedemptions?: number;\n redemptionCount: number;\n oncePerUser: boolean;\n}\n\n/** Full pricing plan with tenures and launch offer. */\nexport interface PricingPlanResponse {\n planId: PlanId;\n name: string;\n tagline: string;\n accentColor: string;\n bgColor: string;\n isPopular: boolean;\n sortOrder: number;\n baseMonthlyPrice: number;\n tenures: TenureVariation[];\n features: string[];\n cardFeatures: string[];\n isActive: boolean;\n launchOffer?: LaunchOfferResponse;\n}\n"]}
1
+ {"version":3,"file":"monetization.js","sourceRoot":"","sources":["../../src/responses/monetization.ts"],"names":[],"mappings":"AAAA;;;;;GAKG","sourcesContent":["/**\n * Boost, subscription, and pricing plan response types.\n *\n * These match the EXACT shapes returned by the reform-backend controllers.\n * Request types (CreateSubscriptionBody) are in ../subscription.ts.\n */\n\nimport type { PlanId } from '../plan-limits.js';\n\n// ── Boost ────────────────────────────────────────────────────────────────────\n\n/** Result of activating a profile boost (POST /boosts). */\nexport interface BoostResult {\n alreadyActive: boolean;\n boostedUntil: string;\n lastBoostedAt: string;\n}\n\n/** Current boost status (GET /boosts/status). */\nexport interface BoostStatus {\n isActive: boolean;\n boostedUntil: string | null;\n lastBoostedAt: string | null;\n}\n\n// ── Subscription ─────────────────────────────────────────────────────────────\n\n/**\n * Subscription response from GET /subscriptions/me.\n *\n * Two shapes depending on whether user has an active subscription:\n * - Free user: { planId: 'lite', isFreeTier: true, status: 'active', launchOfferEligible }\n * - Paid user: full subscription fields from DB + launchOfferEligible\n */\nexport interface SubscriptionResponse {\n planId: PlanId;\n status: 'active' | 'grace' | 'expired' | 'cancelled';\n isFreeTier?: boolean;\n launchOfferEligible: boolean;\n tenure?: string;\n startDate?: string;\n endDate?: string;\n autoRenew?: boolean;\n paymentReference?: string;\n isLaunchOffer?: boolean;\n razorpaySubscriptionId?: string;\n}\n\n/** @deprecated Use SubscriptionResponse instead */\nexport type Subscription = SubscriptionResponse;\n\n// ── Usage Stats ──────────────────────────────────────────────────────────────\n\n/** Usage counter: current usage vs plan limit. */\nexport interface UsageCounter {\n used: number;\n limit: number;\n}\n\n/** Daily + monthly usage stats (GET /subscriptions/me/usage). */\nexport interface UsageStatsResponse {\n plan: PlanId;\n daily: {\n swipes: UsageCounter;\n compliments: UsageCounter;\n rewinds: UsageCounter;\n profileVisits: UsageCounter;\n voiceCalls: UsageCounter;\n videoCalls: UsageCounter;\n };\n monthly: {\n newChatThreads: UsageCounter;\n boosts: UsageCounter;\n intentChanges: UsageCounter;\n };\n}\n\n// ── Pricing Plans ────────────────────────────────────────────────────────────\n\n/** A pricing plan's tenure/duration variation with pricing. */\nexport interface TenureVariation {\n tenureId: string;\n label: string;\n basePrice: number;\n discountPct: number;\n finalPrice: number;\n effectiveLabel: string;\n enabled: boolean;\n razorpayPlanId?: string;\n}\n\n/** Launch offer details attached to a pricing plan. */\nexport interface LaunchOfferResponse {\n enabled: boolean;\n price: number;\n tenure: string;\n label: string;\n badge: string;\n validUntil?: string;\n maxRedemptions?: number;\n redemptionCount: number;\n oncePerUser: boolean;\n}\n\n/** Full pricing plan returned by GET /subscriptions/plans. */\nexport interface PricingPlanResponse {\n planId: PlanId;\n name: string;\n tagline: string;\n accentColor: string;\n bgColor: string;\n isPopular: boolean;\n sortOrder: number;\n baseMonthlyPrice: number;\n tenures: TenureVariation[];\n features: string[];\n cardFeatures: string[];\n isActive: boolean;\n launchOffer?: LaunchOfferResponse;\n}\n"]}