dating-schema 0.35.0 → 0.36.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.
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  export { type AgeRange, ageRangeSchema, emptyStringToUndefined, type Gender, genderSchema, type InterestedIn, interestedInSchema, type LookingFor, lookingForSchema, type MaritalStatus, type MatchStatus, type MessageType, maritalStatusSchema, matchStatusSchema, messageTypeSchema, optionalTrimmedString, type Pagination, type Photo, paginationSchema, photoSchema, type SwipeAction, swipeActionSchema, } from './common.js';
10
10
  export { getFieldOptions } from './field-helpers.js';
11
11
  export { type BoostBody, boostBodySchema, type ComplimentBody, complimentBodySchema, type ImageLikeBody, type InteractionListQuery, type InteractionType, imageLikeBodySchema, interactionListQuerySchema, interactionTypeSchema, type RewindBody, rewindBodySchema, type SwipeBody, type SwipeResponse, swipeBodySchema, swipeResponseSchema, } from './interactions.js';
12
- export { type BooleanFeatureKey, type EnumFeatureKey, type ExploreAccessLevel, type FeatureKey, type FilterLevel, getMinPlanForFeature, getPlanLimit, getPlanLimits, hasRemainingQuota, isFeatureEnabled, isPaidPlan, type NumericFeatureKey, PAID_PLANS, PLAN_IDS, PLAN_LIMITS, type PlanId, type PlanLimits, PREMIUM_EXPLORE_CATEGORIES, PREMIUM_PLANS, type ScoreBreakdownLevel, TOP_PLANS, type FeatureDisplayItem, getPlanFeatureDisplay, PLAN_FEATURE_DISPLAY, type WhoLikedYouLevel, } from './plan-limits.js';
12
+ export { type BooleanFeatureKey, type EnumFeatureKey, type ExploreAccessLevel, type FeatureDisplayItem, type FeatureKey, type FilterLevel, getMinPlanForFeature, getPlanFeatureDisplay, getPlanLimit, getPlanLimits, hasRemainingQuota, isFeatureEnabled, isPaidPlan, type NumericFeatureKey, PAID_PLANS, PLAN_FEATURE_DISPLAY, PLAN_IDS, PLAN_LIMITS, type PlanId, type PlanLimits, PREMIUM_EXPLORE_CATEGORIES, PREMIUM_PLANS, type ScoreBreakdownLevel, TOP_PLANS, type WhoLikedYouLevel, } from './plan-limits.js';
13
13
  export { type CreateProfileInput, createProfileSchema, type FullProfileData, fullProfileSchema, getCognitiveBandRank, type OnboardingFormData, onboardingFormSchema, type UpdateProfileInput, updateProfileSchema, } from './profile.js';
14
14
  export { allFieldGroups, basics, career, cognitive, type FieldGroup, type FieldOption, familyHome, favourites, financeLegal, healthWellness, heroIdentity, interestCategories, interests, lifestyle, lookingFor, type MultiSelectField, type OptionCategory, type ProfileField, personality, relationshipIntimacy, type SelectField, selfAssessment, storyPrompts, values, } from './profile-fields/index.js';
15
15
  export { type BlockBody, blockBodySchema, type ReportBody, type ReportReason, type ReportStatus, reportBodySchema, reportReasonSchema, reportStatusSchema, } from './safety.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,KAAK,QAAQ,EAEb,cAAc,EACd,sBAAsB,EACtB,KAAK,MAAM,EAEX,YAAY,EACZ,KAAK,YAAY,EACjB,kBAAkB,EAClB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,UAAU,EACf,KAAK,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,KAAK,WAAW,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EACL,KAAK,SAAS,EACd,eAAe,EACf,KAAK,cAAc,EACnB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,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EAC5B,KAAK,kBAAkB,EACvB,wBAAwB,EACxB,KAAK,MAAM,EACX,YAAY,GACb,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,KAAK,QAAQ,EAEb,cAAc,EACd,sBAAsB,EACtB,KAAK,MAAM,EAEX,YAAY,EACZ,KAAK,YAAY,EACjB,kBAAkB,EAClB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,UAAU,EACf,KAAK,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,KAAK,WAAW,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EACL,KAAK,SAAS,EACd,eAAe,EACf,KAAK,cAAc,EACnB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,KAAK,iBAAiB,EACtB,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACR,WAAW,EACX,KAAK,MAAM,EACX,KAAK,UAAU,EACf,0BAA0B,EAC1B,aAAa,EACb,KAAK,mBAAmB,EACxB,SAAS,EACT,KAAK,gBAAgB,GACtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,KAAK,kBAAkB,EACvB,mBAAmB,EACnB,KAAK,eAAe,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,cAAc,EACd,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,WAAW,EACX,oBAAoB,EACpB,KAAK,WAAW,EAChB,cAAc,EACd,YAAY,EACZ,MAAM,GACP,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,KAAK,SAAS,EACd,eAAe,EACf,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,KAAK,sBAAsB,EAC3B,4BAA4B,EAC5B,KAAK,kBAAkB,EACvB,wBAAwB,EACxB,KAAK,MAAM,EACX,YAAY,GACb,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ export { getFieldOptions } from './field-helpers.js';
16
16
  // ─── Interaction schemas ─────────────────────────────────────────────────────
17
17
  export { boostBodySchema, complimentBodySchema, imageLikeBodySchema, interactionListQuerySchema, interactionTypeSchema, rewindBodySchema, swipeBodySchema, swipeResponseSchema, } from './interactions.js';
18
18
  // ─── Plan limits ─────────────────────────────────────────────────────────────
19
- export { getMinPlanForFeature, getPlanLimit, getPlanLimits, hasRemainingQuota, isFeatureEnabled, isPaidPlan, PAID_PLANS, PLAN_IDS, PLAN_LIMITS, PREMIUM_EXPLORE_CATEGORIES, PREMIUM_PLANS, TOP_PLANS, getPlanFeatureDisplay, PLAN_FEATURE_DISPLAY, } from './plan-limits.js';
19
+ export { getMinPlanForFeature, getPlanFeatureDisplay, getPlanLimit, getPlanLimits, hasRemainingQuota, isFeatureEnabled, isPaidPlan, PAID_PLANS, PLAN_FEATURE_DISPLAY, PLAN_IDS, PLAN_LIMITS, PREMIUM_EXPLORE_CATEGORIES, PREMIUM_PLANS, TOP_PLANS, } from './plan-limits.js';
20
20
  // ─── Profile schemas ─────────────────────────────────────────────────────────
21
21
  export { createProfileSchema, fullProfileSchema, getCognitiveBandRank, onboardingFormSchema, updateProfileSchema, } from './profile.js';
22
22
  // ─── Profile field configs (option arrays with labels for UI rendering) ──────
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,gFAAgF;AAChF,OAAO;AAEL,cAAc;AACd,cAAc,EACd,sBAAsB;AAEtB,QAAQ;AACR,YAAY,EAEZ,kBAAkB,EAElB,gBAAgB,EAIhB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EAGrB,gBAAgB,EAChB,WAAW,EAEX,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,gFAAgF;AAChF,OAAO,EAEL,eAAe,EAEf,oBAAoB,EAIpB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EAErB,gBAAgB,EAGhB,eAAe,EACf,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,gFAAgF;AAChF,OAAO,EAML,oBAAoB,EACpB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EAEV,UAAU,EACV,QAAQ,EACR,WAAW,EAGX,0BAA0B,EAC1B,aAAa,EAEb,SAAS,EAET,qBAAqB,EACrB,oBAAoB,GAErB,MAAM,kBAAkB,CAAC;AAC1B,gFAAgF;AAChF,OAAO,EAEL,mBAAmB,EAEnB,iBAAiB,EACjB,oBAAoB,EAEpB,oBAAoB,EAEpB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,gFAAgF;AAChF,OAAO,EACL,cAAc,EACd,MAAM,EACN,MAAM,EACN,SAAS,EAGT,UAAU,EACV,UAAU,EACV,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,UAAU,EAIV,WAAW,EACX,oBAAoB,EAEpB,cAAc,EACd,YAAY,EACZ,MAAM,GACP,MAAM,2BAA2B,CAAC;AAEnC,gFAAgF;AAChF,OAAO,EAEL,eAAe,EAIf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,gFAAgF;AAChF,OAAO,EAEL,4BAA4B,EAE5B,wBAAwB,EAExB,YAAY,GACb,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * dating-schema — Shared Zod schemas for the Dating feature\n *\n * Single source of truth consumed by both jansathi-frontend and reform-backend.\n * Guarantees identical validation logic and TypeScript types on both sides.\n *\n * @module dating-schema\n */\n\n// ─── Common helpers and enums ────────────────────────────────────────────────\nexport {\n type AgeRange,\n // sub-schemas\n ageRangeSchema,\n emptyStringToUndefined,\n type Gender,\n // enums\n genderSchema,\n type InterestedIn,\n interestedInSchema,\n type LookingFor,\n lookingForSchema,\n type MaritalStatus,\n type MatchStatus,\n type MessageType,\n maritalStatusSchema,\n matchStatusSchema,\n messageTypeSchema,\n optionalTrimmedString,\n type Pagination,\n type Photo,\n paginationSchema,\n photoSchema,\n type SwipeAction,\n swipeActionSchema,\n} from './common.js';\nexport { getFieldOptions } from './field-helpers.js';\n// ─── Interaction schemas ─────────────────────────────────────────────────────\nexport {\n type BoostBody,\n boostBodySchema,\n type ComplimentBody,\n complimentBodySchema,\n type ImageLikeBody,\n type InteractionListQuery,\n type InteractionType,\n imageLikeBodySchema,\n interactionListQuerySchema,\n interactionTypeSchema,\n type RewindBody,\n rewindBodySchema,\n type SwipeBody,\n type SwipeResponse,\n swipeBodySchema,\n swipeResponseSchema,\n} from './interactions.js';\n// ─── Plan limits ─────────────────────────────────────────────────────────────\nexport {\n type BooleanFeatureKey,\n type EnumFeatureKey,\n type ExploreAccessLevel,\n type FeatureKey,\n type FilterLevel,\n getMinPlanForFeature,\n getPlanLimit,\n getPlanLimits,\n hasRemainingQuota,\n isFeatureEnabled,\n isPaidPlan,\n type NumericFeatureKey,\n PAID_PLANS,\n PLAN_IDS,\n PLAN_LIMITS,\n type PlanId,\n type PlanLimits,\n PREMIUM_EXPLORE_CATEGORIES,\n PREMIUM_PLANS,\n type ScoreBreakdownLevel,\n TOP_PLANS,\n type FeatureDisplayItem,\n getPlanFeatureDisplay,\n PLAN_FEATURE_DISPLAY,\n type WhoLikedYouLevel,\n} from './plan-limits.js';\n// ─── Profile schemas ─────────────────────────────────────────────────────────\nexport {\n type CreateProfileInput,\n createProfileSchema,\n type FullProfileData,\n fullProfileSchema,\n getCognitiveBandRank,\n type OnboardingFormData,\n onboardingFormSchema,\n type UpdateProfileInput,\n updateProfileSchema,\n} from './profile.js';\n// ─── Profile field configs (option arrays with labels for UI rendering) ──────\nexport {\n allFieldGroups,\n basics,\n career,\n cognitive,\n type FieldGroup,\n type FieldOption,\n familyHome,\n favourites,\n financeLegal,\n healthWellness,\n heroIdentity,\n interestCategories,\n interests,\n lifestyle,\n lookingFor,\n type MultiSelectField,\n type OptionCategory,\n type ProfileField,\n personality,\n relationshipIntimacy,\n type SelectField,\n selfAssessment,\n storyPrompts,\n values,\n} from './profile-fields/index.js';\n\n// ─── Safety schemas ──────────────────────────────────────────────────────────\nexport {\n type BlockBody,\n blockBodySchema,\n type ReportBody,\n type ReportReason,\n type ReportStatus,\n reportBodySchema,\n reportReasonSchema,\n reportStatusSchema,\n} from './safety.js';\n\n// ─── Subscription schemas ────────────────────────────────────────────────────\nexport {\n type CreateSubscriptionBody,\n createSubscriptionBodySchema,\n type SubscriptionStatus,\n subscriptionStatusSchema,\n type Tenure,\n tenureSchema,\n} from './subscription.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,gFAAgF;AAChF,OAAO;AAEL,cAAc;AACd,cAAc,EACd,sBAAsB;AAEtB,QAAQ;AACR,YAAY,EAEZ,kBAAkB,EAElB,gBAAgB,EAIhB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EAGrB,gBAAgB,EAChB,WAAW,EAEX,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,gFAAgF;AAChF,OAAO,EAEL,eAAe,EAEf,oBAAoB,EAIpB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EAErB,gBAAgB,EAGhB,eAAe,EACf,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,gFAAgF;AAChF,OAAO,EAOL,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EAEV,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACR,WAAW,EAGX,0BAA0B,EAC1B,aAAa,EAEb,SAAS,GAEV,MAAM,kBAAkB,CAAC;AAC1B,gFAAgF;AAChF,OAAO,EAEL,mBAAmB,EAEnB,iBAAiB,EACjB,oBAAoB,EAEpB,oBAAoB,EAEpB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,gFAAgF;AAChF,OAAO,EACL,cAAc,EACd,MAAM,EACN,MAAM,EACN,SAAS,EAGT,UAAU,EACV,UAAU,EACV,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,UAAU,EAIV,WAAW,EACX,oBAAoB,EAEpB,cAAc,EACd,YAAY,EACZ,MAAM,GACP,MAAM,2BAA2B,CAAC;AAEnC,gFAAgF;AAChF,OAAO,EAEL,eAAe,EAIf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,gFAAgF;AAChF,OAAO,EAEL,4BAA4B,EAE5B,wBAAwB,EAExB,YAAY,GACb,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * dating-schema — Shared Zod schemas for the Dating feature\n *\n * Single source of truth consumed by both jansathi-frontend and reform-backend.\n * Guarantees identical validation logic and TypeScript types on both sides.\n *\n * @module dating-schema\n */\n\n// ─── Common helpers and enums ────────────────────────────────────────────────\nexport {\n type AgeRange,\n // sub-schemas\n ageRangeSchema,\n emptyStringToUndefined,\n type Gender,\n // enums\n genderSchema,\n type InterestedIn,\n interestedInSchema,\n type LookingFor,\n lookingForSchema,\n type MaritalStatus,\n type MatchStatus,\n type MessageType,\n maritalStatusSchema,\n matchStatusSchema,\n messageTypeSchema,\n optionalTrimmedString,\n type Pagination,\n type Photo,\n paginationSchema,\n photoSchema,\n type SwipeAction,\n swipeActionSchema,\n} from './common.js';\nexport { getFieldOptions } from './field-helpers.js';\n// ─── Interaction schemas ─────────────────────────────────────────────────────\nexport {\n type BoostBody,\n boostBodySchema,\n type ComplimentBody,\n complimentBodySchema,\n type ImageLikeBody,\n type InteractionListQuery,\n type InteractionType,\n imageLikeBodySchema,\n interactionListQuerySchema,\n interactionTypeSchema,\n type RewindBody,\n rewindBodySchema,\n type SwipeBody,\n type SwipeResponse,\n swipeBodySchema,\n swipeResponseSchema,\n} from './interactions.js';\n// ─── Plan limits ─────────────────────────────────────────────────────────────\nexport {\n type BooleanFeatureKey,\n type EnumFeatureKey,\n type ExploreAccessLevel,\n type FeatureDisplayItem,\n type FeatureKey,\n type FilterLevel,\n getMinPlanForFeature,\n getPlanFeatureDisplay,\n getPlanLimit,\n getPlanLimits,\n hasRemainingQuota,\n isFeatureEnabled,\n isPaidPlan,\n type NumericFeatureKey,\n PAID_PLANS,\n PLAN_FEATURE_DISPLAY,\n PLAN_IDS,\n PLAN_LIMITS,\n type PlanId,\n type PlanLimits,\n PREMIUM_EXPLORE_CATEGORIES,\n PREMIUM_PLANS,\n type ScoreBreakdownLevel,\n TOP_PLANS,\n type WhoLikedYouLevel,\n} from './plan-limits.js';\n// ─── Profile schemas ─────────────────────────────────────────────────────────\nexport {\n type CreateProfileInput,\n createProfileSchema,\n type FullProfileData,\n fullProfileSchema,\n getCognitiveBandRank,\n type OnboardingFormData,\n onboardingFormSchema,\n type UpdateProfileInput,\n updateProfileSchema,\n} from './profile.js';\n// ─── Profile field configs (option arrays with labels for UI rendering) ──────\nexport {\n allFieldGroups,\n basics,\n career,\n cognitive,\n type FieldGroup,\n type FieldOption,\n familyHome,\n favourites,\n financeLegal,\n healthWellness,\n heroIdentity,\n interestCategories,\n interests,\n lifestyle,\n lookingFor,\n type MultiSelectField,\n type OptionCategory,\n type ProfileField,\n personality,\n relationshipIntimacy,\n type SelectField,\n selfAssessment,\n storyPrompts,\n values,\n} from './profile-fields/index.js';\n\n// ─── Safety schemas ──────────────────────────────────────────────────────────\nexport {\n type BlockBody,\n blockBodySchema,\n type ReportBody,\n type ReportReason,\n type ReportStatus,\n reportBodySchema,\n reportReasonSchema,\n reportStatusSchema,\n} from './safety.js';\n\n// ─── Subscription schemas ────────────────────────────────────────────────────\nexport {\n type CreateSubscriptionBody,\n createSubscriptionBodySchema,\n type SubscriptionStatus,\n subscriptionStatusSchema,\n type Tenure,\n tenureSchema,\n} from './subscription.js';\n"]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Plan feature display data — separated to keep plan-limits.ts clean.
3
+ * Imported by plan-limits.ts.
4
+ */
5
+ import type { FeatureDisplayItem } from './plan-limits.js';
6
+ export declare const PLAN_FEATURE_DISPLAY_DATA: FeatureDisplayItem[];
7
+ //# sourceMappingURL=plan-features-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-features-data.d.ts","sourceRoot":"","sources":["../src/plan-features-data.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAG3D,eAAO,MAAM,yBAAyB,EAAE,kBAAkB,EAgEzD,CAAC"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Plan feature display data — separated to keep plan-limits.ts clean.
3
+ * Imported by plan-limits.ts.
4
+ */
5
+ // prettier-ignore
6
+ export const PLAN_FEATURE_DISPLAY_DATA = [
7
+ // ── Core actions ──
8
+ { key: 'dailySwipes', label: 'Swipes per day', available: true,
9
+ helpText: 'The number of profiles you can like or pass on each day. Swipe right to like, left to pass.',
10
+ plans: { spark: '150 per day', gold: 'Unlimited', diamond: 'Unlimited', platinum: 'Unlimited', black: 'Unlimited' } },
11
+ { key: 'dailyCompliments', label: 'Compliments per day', available: true,
12
+ helpText: 'Send a compliment with a personal note to stand out. They see it even before matching with you.',
13
+ plans: { spark: '1 per day', gold: '3 per day', diamond: '5 per day', platinum: '10 per day', black: '15 per day' } },
14
+ { key: 'dailyRewinds', label: 'Undo a swipe', available: true,
15
+ helpText: 'Accidentally passed on someone? Tap undo to bring their profile back instantly.',
16
+ plans: { spark: false, gold: 'Unlimited', diamond: 'Unlimited', platinum: 'Unlimited', black: 'Unlimited' } },
17
+ // ── Visibility & discovery ──
18
+ { key: 'showAds', label: 'Ad-free experience', available: true,
19
+ helpText: 'Browse profiles, chat, and explore without any ads interrupting your experience.',
20
+ plans: { spark: false, gold: true, diamond: true, platinum: true, black: true } },
21
+ { key: 'whoLikedYou', label: 'See who likes you', available: true,
22
+ helpText: 'See the list of people who already liked your profile, so you can match with them instantly.',
23
+ plans: { spark: false, gold: 'Blurred preview', diamond: 'Full list', platinum: 'Real-time alerts', black: 'Real-time alerts' } },
24
+ { key: 'filterLevel', label: 'Search filters', available: true,
25
+ helpText: 'Filter profiles by age, location, religion, education, profession, and 140+ more preferences.',
26
+ plans: { spark: 'Basic', gold: 'Advanced', diamond: 'All 147 filters', platinum: 'All 147 filters', black: 'All 147 filters' } },
27
+ { key: 'monthlyBoosts', label: 'Profile boosts', available: true,
28
+ helpText: 'Boost your profile to the top of the discover feed for 30 minutes and get seen by more people.',
29
+ plans: { spark: false, gold: '1 per month', diamond: '3 per month', platinum: '5 per month', black: '5 per month' } },
30
+ // ── Communication ──
31
+ { key: 'readReceipts', label: 'Read receipts', available: true,
32
+ helpText: 'Know exactly when someone has read your message. No more guessing.',
33
+ plans: { spark: false, gold: false, diamond: true, platinum: true, black: true } },
34
+ { key: 'calls', label: 'Voice & video calls', available: false,
35
+ helpText: 'Talk face-to-face or voice-only with your matches — directly inside the app, no phone number needed.',
36
+ plans: { spark: false, gold: false, diamond: '3 voice + 2 video per day', platinum: 'Unlimited', black: 'Unlimited' } },
37
+ { key: 'voiceMessages', label: 'Voice messages in chat', available: false,
38
+ helpText: 'Record and send short voice clips in chat instead of typing.',
39
+ plans: { spark: false, gold: false, diamond: true, platinum: true, black: true } },
40
+ { key: 'messageBeforeMatch', label: 'Send a message first', available: false,
41
+ helpText: 'Introduce yourself with a message before the other person swipes on you.',
42
+ plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },
43
+ // ── Insights ──
44
+ { key: 'seeProfileViewers', label: 'See who viewed your profile', available: true,
45
+ helpText: "Find out who visited your profile — even if they haven't swiped yet.",
46
+ plans: { spark: false, gold: false, diamond: true, platinum: true, black: true } },
47
+ { key: 'photoInsights', label: 'Photo performance insights', available: true,
48
+ helpText: 'See which of your photos gets the most likes and attention, and get tips to improve.',
49
+ plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },
50
+ // ── Premium perks ──
51
+ { key: 'priorityVisibility', label: 'Appear higher in search', available: true,
52
+ helpText: 'Your profile is shown before others in the discover feed, so more people see you first.',
53
+ plans: { spark: false, gold: false, diamond: true, platinum: true, black: true } },
54
+ { key: 'autoBoost', label: 'Automatic weekly boost', available: true,
55
+ helpText: "Your profile is automatically boosted every week — you don't have to do anything.",
56
+ plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },
57
+ { key: 'incognitoMode', label: 'Browse privately', available: true,
58
+ helpText: 'Go invisible. Your profile is hidden from everyone except the people you choose to like.',
59
+ plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },
60
+ { key: 'travelMode', label: 'Explore any location', available: true,
61
+ helpText: 'Browse profiles in any city, district, or state — without physically being there.',
62
+ plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },
63
+ // ── Exclusive ──
64
+ { key: 'exclusiveLeague', label: 'Exclusive members-only league', available: true,
65
+ helpText: 'Your profile is only visible to other Black members. A private, curated matchmaking experience.',
66
+ plans: { spark: false, gold: false, diamond: false, platinum: false, black: true } },
67
+ { key: 'vipSupport', label: 'Dedicated VIP support', available: true,
68
+ helpText: 'Get fast, priority help from a dedicated support team whenever you need it.',
69
+ plans: { spark: false, gold: false, diamond: false, platinum: false, black: true } },
70
+ ];
71
+ //# sourceMappingURL=plan-features-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-features-data.js","sourceRoot":"","sources":["../src/plan-features-data.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,kBAAkB;AAClB,MAAM,CAAC,MAAM,yBAAyB,GAAyB;IAC7D,qBAAqB;IACrB,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,IAAI;QAC5D,QAAQ,EAAE,6FAA6F;QACvG,KAAK,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE;IACvH,EAAE,GAAG,EAAE,kBAAkB,EAAE,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,IAAI;QACtE,QAAQ,EAAE,i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AE,SAAS,EAAE,IAAI;QAChE,QAAQ,EAAE,0FAA0F;QACpG,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IACrF,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,IAAI;QACjE,QAAQ,EAAE,mFAAmF;QAC7F,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IACrF,kBAAkB;IAClB,EAAE,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,+BAA+B,EAAE,SAAS,EAAE,IAAI;QAC/E,QAAQ,EAAE,iGAAiG;QAC3G,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IACtF,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,uBAAuB,EAAE,SAAS,EAAE,IAAI;QAClE,QAAQ,EAAE,6EAA6E;QACvF,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;CACvF,CAAC","sourcesContent":["/**\n * Plan feature display data — separated to keep plan-limits.ts clean.\n * Imported by plan-limits.ts.\n */\n\nimport type { FeatureDisplayItem } from './plan-limits.js';\n\n// prettier-ignore\nexport const PLAN_FEATURE_DISPLAY_DATA: FeatureDisplayItem[] = [\n // ── Core actions ──\n { key: 'dailySwipes', label: 'Swipes per day', available: true,\n helpText: 'The number of profiles you can like or pass on each day. Swipe right to like, left to pass.',\n plans: { spark: '150 per day', gold: 'Unlimited', diamond: 'Unlimited', platinum: 'Unlimited', black: 'Unlimited' } },\n { key: 'dailyCompliments', label: 'Compliments per day', available: true,\n helpText: 'Send a compliment with a personal note to stand out. They see it even before matching with you.',\n plans: { spark: '1 per day', gold: '3 per day', diamond: '5 per day', platinum: '10 per day', black: '15 per day' } },\n { key: 'dailyRewinds', label: 'Undo a swipe', available: true,\n helpText: 'Accidentally passed on someone? Tap undo to bring their profile back instantly.',\n plans: { spark: false, gold: 'Unlimited', diamond: 'Unlimited', platinum: 'Unlimited', black: 'Unlimited' } },\n // ── Visibility & discovery ──\n { key: 'showAds', label: 'Ad-free experience', available: true,\n helpText: 'Browse profiles, chat, and explore without any ads interrupting your experience.',\n plans: { spark: false, gold: true, diamond: true, platinum: true, black: true } },\n { key: 'whoLikedYou', label: 'See who likes you', available: true,\n helpText: 'See the list of people who already liked your profile, so you can match with them instantly.',\n plans: { spark: false, gold: 'Blurred preview', diamond: 'Full list', platinum: 'Real-time alerts', black: 'Real-time alerts' } },\n { key: 'filterLevel', label: 'Search filters', available: true,\n helpText: 'Filter profiles by age, location, religion, education, profession, and 140+ more preferences.',\n plans: { spark: 'Basic', gold: 'Advanced', diamond: 'All 147 filters', platinum: 'All 147 filters', black: 'All 147 filters' } },\n { key: 'monthlyBoosts', label: 'Profile boosts', available: true,\n helpText: 'Boost your profile to the top of the discover feed for 30 minutes and get seen by more people.',\n plans: { spark: false, gold: '1 per month', diamond: '3 per month', platinum: '5 per month', black: '5 per month' } },\n // ── Communication ──\n { key: 'readReceipts', label: 'Read receipts', available: true,\n helpText: 'Know exactly when someone has read your message. No more guessing.',\n plans: { spark: false, gold: false, diamond: true, platinum: true, black: true } },\n { key: 'calls', label: 'Voice & video calls', available: false,\n helpText: 'Talk face-to-face or voice-only with your matches — directly inside the app, no phone number needed.',\n plans: { spark: false, gold: false, diamond: '3 voice + 2 video per day', platinum: 'Unlimited', black: 'Unlimited' } },\n { key: 'voiceMessages', label: 'Voice messages in chat', available: false,\n helpText: 'Record and send short voice clips in chat instead of typing.',\n plans: { spark: false, gold: false, diamond: true, platinum: true, black: true } },\n { key: 'messageBeforeMatch', label: 'Send a message first', available: false,\n helpText: 'Introduce yourself with a message before the other person swipes on you.',\n plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },\n // ── Insights ──\n { key: 'seeProfileViewers', label: 'See who viewed your profile', available: true,\n helpText: \"Find out who visited your profile — even if they haven't swiped yet.\",\n plans: { spark: false, gold: false, diamond: true, platinum: true, black: true } },\n { key: 'photoInsights', label: 'Photo performance insights', available: true,\n helpText: 'See which of your photos gets the most likes and attention, and get tips to improve.',\n plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },\n // ── Premium perks ──\n { key: 'priorityVisibility', label: 'Appear higher in search', available: true,\n helpText: 'Your profile is shown before others in the discover feed, so more people see you first.',\n plans: { spark: false, gold: false, diamond: true, platinum: true, black: true } },\n { key: 'autoBoost', label: 'Automatic weekly boost', available: true,\n helpText: \"Your profile is automatically boosted every week — you don't have to do anything.\",\n plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },\n { key: 'incognitoMode', label: 'Browse privately', available: true,\n helpText: 'Go invisible. Your profile is hidden from everyone except the people you choose to like.',\n plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },\n { key: 'travelMode', label: 'Explore any location', available: true,\n helpText: 'Browse profiles in any city, district, or state — without physically being there.',\n plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },\n // ── Exclusive ──\n { key: 'exclusiveLeague', label: 'Exclusive members-only league', available: true,\n helpText: 'Your profile is only visible to other Black members. A private, curated matchmaking experience.',\n plans: { spark: false, gold: false, diamond: false, platinum: false, black: true } },\n { key: 'vipSupport', label: 'Dedicated VIP support', available: true,\n helpText: 'Get fast, priority help from a dedicated support team whenever you need it.',\n plans: { spark: false, gold: false, diamond: false, platinum: false, black: true } },\n];\n"]}
@@ -81,30 +81,36 @@ export declare const PREMIUM_EXPLORE_CATEGORIES: readonly ["high-iq", "elite-ins
81
81
  export interface FeatureDisplayItem {
82
82
  /** Unique key matching a FeatureKey or custom display key */
83
83
  key: string;
84
- /** Human-readable label */
84
+ /** Short, clear label shown on the card */
85
85
  label: string;
86
+ /** Tooltip help text explaining what this feature does */
87
+ helpText: string;
88
+ /** Whether this feature is live. If false, hidden from UI entirely (not yet rolled out). */
89
+ available: boolean;
86
90
  /** Per-plan display value: string = show text, true = checkmark, false = locked/unavailable */
87
91
  plans: Record<PlanId, string | boolean>;
88
92
  }
89
93
  /**
90
94
  * Master feature list for plan comparison UI.
91
- * Derived from PLAN_LIMITS but with human-readable labels and display values.
92
- * This is the single source of truth for what features each plan shows.
95
+ * Now in plan-features-data.ts for cleaner separation.
93
96
  */
94
- export declare const PLAN_FEATURE_DISPLAY: FeatureDisplayItem[];
97
+ export { PLAN_FEATURE_DISPLAY_DATA as PLAN_FEATURE_DISPLAY } from './plan-features-data.js';
95
98
  /**
96
99
  * Get features for a plan, split into included (with values) and locked.
97
100
  * Included features come first, locked features last.
101
+ * Only includes features where `available: true` (hides unreleased features).
98
102
  */
99
103
  export declare function getPlanFeatureDisplay(planId: PlanId): {
100
104
  included: {
101
105
  key: string;
102
106
  label: string;
107
+ helpText: string;
103
108
  value: string | true;
104
109
  }[];
105
110
  locked: {
106
111
  key: string;
107
112
  label: string;
113
+ helpText: string;
108
114
  }[];
109
115
  };
110
116
  /** Get the limits object for a plan. */
@@ -1 +1 @@
1
- {"version":3,"file":"plan-limits.d.ts","sourceRoot":"","sources":["../src/plan-limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,sEAAsE;AACtE,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;AAEzE,wCAAwC;AACxC,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;AAExD,iD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EAAE,MAAM,GACnB,OAAO,CAGT;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAEnF"}
@@ -12,15 +12,16 @@
12
12
  *
13
13
  * @module dating-schema/plan-limits
14
14
  */
15
+ import { PLAN_FEATURE_DISPLAY_DATA as PLAN_FEATURE_DISPLAY_ITEMS } from './plan-features-data.js';
15
16
  // ─── Plan Limits Config ──────────────────────────────────────────────────────
16
17
  export const PLAN_LIMITS = {
17
- // ── Spark (Free) — Enough to hook, heavily limited ──
18
+ // ── Spark (Free) — Generous enough to hook, limited enough to upgrade ──
18
19
  spark: {
19
- dailySwipes: 20,
20
+ dailySwipes: 150,
20
21
  dailyCompliments: 1,
21
22
  dailyRewinds: 0,
22
- dailyProfileVisits: 10,
23
- monthlyNewChatThreads: 5,
23
+ dailyProfileVisits: 20,
24
+ monthlyNewChatThreads: Infinity, // no chat cap — matches can always chat
24
25
  monthlyBoosts: 0,
25
26
  weeklyAutoBoost: 0,
26
27
  dailyVoiceCalls: 0,
@@ -48,19 +49,19 @@ export const PLAN_LIMITS = {
48
49
  photoInsights: false,
49
50
  exclusiveLeague: false,
50
51
  },
51
- // ── Gold — Good value, removes major pain points ──
52
+ // ── Gold — Removes all friction, more generous than Tinder Plus ──
52
53
  gold: {
53
- dailySwipes: 80,
54
- dailyCompliments: 5,
55
- dailyRewinds: 3,
56
- dailyProfileVisits: 30,
57
- monthlyNewChatThreads: 15,
54
+ dailySwipes: Infinity, // no swipe cap for paid users
55
+ dailyCompliments: 3,
56
+ dailyRewinds: Infinity, // no rewind cap for paid users
57
+ dailyProfileVisits: Infinity,
58
+ monthlyNewChatThreads: Infinity,
58
59
  monthlyBoosts: 1,
59
60
  weeklyAutoBoost: 0,
60
- dailyVoiceCalls: 2,
61
- dailyVideoCalls: 1,
62
- voiceCallDurationMin: 10,
63
- videoCallDurationMin: 10,
61
+ dailyVoiceCalls: 0, // voice/video starts at Diamond
62
+ dailyVideoCalls: 0,
63
+ voiceCallDurationMin: 0,
64
+ videoCallDurationMin: 0,
64
65
  monthlyIntentChanges: 4,
65
66
  scoreVisibleProfiles: Infinity,
66
67
  filterLevel: 'advanced',
@@ -69,32 +70,32 @@ export const PLAN_LIMITS = {
69
70
  scoreBreakdown: 'score',
70
71
  readReceipts: false,
71
72
  incognitoMode: false,
72
- voiceMessages: true,
73
- voiceCalls: true,
74
- videoCalls: true,
73
+ voiceMessages: false,
74
+ voiceCalls: false,
75
+ videoCalls: false,
75
76
  showAds: false,
76
77
  priorityVisibility: false,
77
78
  autoBoost: false,
78
- seeProfileViewers: true,
79
+ seeProfileViewers: false,
79
80
  messageBeforeMatch: false,
80
81
  travelMode: false,
81
82
  profileContentUnlock: true,
82
83
  photoInsights: false,
83
84
  exclusiveLeague: false,
84
85
  },
85
- // ── Diamond (DECOY) — Generous but capped, pushes to Platinum ──
86
+ // ── Diamond (DECOY) — Almost Platinum but capped, pushes upgrade ──
86
87
  diamond: {
87
- dailySwipes: 200,
88
- dailyCompliments: 15,
89
- dailyRewinds: 10,
90
- dailyProfileVisits: 100,
91
- monthlyNewChatThreads: 50,
88
+ dailySwipes: Infinity,
89
+ dailyCompliments: 5,
90
+ dailyRewinds: Infinity,
91
+ dailyProfileVisits: Infinity,
92
+ monthlyNewChatThreads: Infinity,
92
93
  monthlyBoosts: 3,
93
94
  weeklyAutoBoost: 0,
94
- dailyVoiceCalls: 5,
95
- dailyVideoCalls: 3,
96
- voiceCallDurationMin: 20,
97
- videoCallDurationMin: 15,
95
+ dailyVoiceCalls: 3,
96
+ dailyVideoCalls: 2,
97
+ voiceCallDurationMin: 15,
98
+ videoCallDurationMin: 10,
98
99
  monthlyIntentChanges: 8,
99
100
  scoreVisibleProfiles: Infinity,
100
101
  filterLevel: 'full',
@@ -113,17 +114,17 @@ export const PLAN_LIMITS = {
113
114
  messageBeforeMatch: false,
114
115
  travelMode: false,
115
116
  profileContentUnlock: true,
116
- photoInsights: true,
117
+ photoInsights: false,
117
118
  exclusiveLeague: false,
118
119
  },
119
- // ── Platinum — Unlimited everything, the aspirational tier ──
120
+ // ── Platinum — The aspirational tier, everything unlocked ──
120
121
  platinum: {
121
122
  dailySwipes: Infinity,
122
- dailyCompliments: Infinity,
123
+ dailyCompliments: 10,
123
124
  dailyRewinds: Infinity,
124
125
  dailyProfileVisits: Infinity,
125
126
  monthlyNewChatThreads: Infinity,
126
- monthlyBoosts: 7,
127
+ monthlyBoosts: 5,
127
128
  weeklyAutoBoost: 1,
128
129
  dailyVoiceCalls: Infinity,
129
130
  dailyVideoCalls: Infinity,
@@ -151,14 +152,13 @@ export const PLAN_LIMITS = {
151
152
  exclusiveLeague: false,
152
153
  },
153
154
  // ── Black — Exclusive league for celebrities & HNIs ──
154
- // All Platinum features + exclusive league (only Black users see each other)
155
155
  black: {
156
156
  dailySwipes: Infinity,
157
- dailyCompliments: Infinity,
157
+ dailyCompliments: 15,
158
158
  dailyRewinds: Infinity,
159
159
  dailyProfileVisits: Infinity,
160
160
  monthlyNewChatThreads: Infinity,
161
- monthlyBoosts: 7,
161
+ monthlyBoosts: 5,
162
162
  weeklyAutoBoost: 1,
163
163
  dailyVoiceCalls: Infinity,
164
164
  dailyVideoCalls: Infinity,
@@ -212,47 +212,30 @@ export const PREMIUM_EXPLORE_CATEGORIES = [
212
212
  ];
213
213
  /**
214
214
  * Master feature list for plan comparison UI.
215
- * Derived from PLAN_LIMITS but with human-readable labels and display values.
216
- * This is the single source of truth for what features each plan shows.
215
+ * Now in plan-features-data.ts for cleaner separation.
217
216
  */
218
- export const PLAN_FEATURE_DISPLAY = [
219
- { key: 'dailySwipes', label: 'Daily swipes', plans: { spark: '20/day', gold: '80/day', diamond: '200/day', platinum: 'Unlimited', black: 'Unlimited' } },
220
- { key: 'dailyCompliments', label: 'Daily compliments', plans: { spark: '1/day', gold: '5/day', diamond: '15/day', platinum: 'Unlimited', black: 'Unlimited' } },
221
- { key: 'dailyRewinds', label: 'Rewinds', plans: { spark: false, gold: '3/day', diamond: '10/day', platinum: 'Unlimited', black: 'Unlimited' } },
222
- { key: 'calls', label: 'Voice & video calls', plans: { spark: false, gold: 'Limited', diamond: 'Limited', platinum: 'Unlimited', black: 'Unlimited' } },
223
- { key: 'whoLikedYou', label: 'Who Liked You', plans: { spark: false, gold: 'Blurred', diamond: 'Full list', platinum: 'Real-time', black: 'Real-time' } },
224
- { key: 'filterLevel', label: 'Filters', plans: { spark: 'Basic', gold: 'Advanced', diamond: 'Full (147)', platinum: 'Full (147)', black: 'Full (147)' } },
225
- { key: 'monthlyBoosts', label: 'Monthly boosts', plans: { spark: false, gold: '1/month', diamond: '3/month', platinum: '7/month', black: '7/month' } },
226
- { key: 'monthlyNewChatThreads', label: 'New chat threads', plans: { spark: '5/month', gold: '15/month', diamond: '50/month', platinum: 'Unlimited', black: 'Unlimited' } },
227
- { key: 'readReceipts', label: 'Read receipts', plans: { spark: false, gold: false, diamond: true, platinum: true, black: true } },
228
- { key: 'seeProfileViewers', label: 'Profile viewers', plans: { spark: false, gold: true, diamond: true, platinum: true, black: true } },
229
- { key: 'photoInsights', label: 'Photo insights', plans: { spark: false, gold: false, diamond: true, platinum: true, black: true } },
230
- { key: 'priorityVisibility', label: 'Priority visibility', plans: { spark: false, gold: false, diamond: true, platinum: true, black: true } },
231
- { key: 'autoBoost', label: 'Auto-boost weekly', plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },
232
- { key: 'incognitoMode', label: 'Incognito mode', plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },
233
- { key: 'travelMode', label: 'Travel mode', plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },
234
- { key: 'messageBeforeMatch', label: 'Message before match', plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },
235
- { key: 'exclusiveLeague', label: 'Exclusive League', plans: { spark: false, gold: false, diamond: false, platinum: false, black: true } },
236
- { key: 'vipSupport', label: 'VIP support', plans: { spark: false, gold: false, diamond: false, platinum: false, black: true } },
237
- { key: 'showAds', label: 'Ad-free', plans: { spark: false, gold: true, diamond: true, platinum: true, black: true } },
238
- ];
217
+ export { PLAN_FEATURE_DISPLAY_DATA as PLAN_FEATURE_DISPLAY } from './plan-features-data.js';
239
218
  /**
240
219
  * Get features for a plan, split into included (with values) and locked.
241
220
  * Included features come first, locked features last.
221
+ * Only includes features where `available: true` (hides unreleased features).
242
222
  */
243
223
  export function getPlanFeatureDisplay(planId) {
244
224
  const included = [];
245
225
  const locked = [];
246
- for (const f of PLAN_FEATURE_DISPLAY) {
226
+ for (const f of PLAN_FEATURE_DISPLAY_ITEMS) {
227
+ // Skip features not yet rolled out
228
+ if (!f.available)
229
+ continue;
247
230
  const val = f.plans[planId];
248
231
  if (val === false) {
249
- locked.push({ key: f.key, label: f.label });
232
+ locked.push({ key: f.key, label: f.label, helpText: f.helpText });
250
233
  }
251
234
  else if (val === true) {
252
- included.push({ key: f.key, label: f.label, value: true });
235
+ included.push({ key: f.key, label: f.label, helpText: f.helpText, value: true });
253
236
  }
254
237
  else {
255
- included.push({ key: f.key, label: f.label, value: val });
238
+ included.push({ key: f.key, label: f.label, helpText: f.helpText, value: val });
256
239
  }
257
240
  }
258
241
  return { included, locked };
@@ -1 +1 @@
1
- {"version":3,"file":"plan-limits.js","sourceRoot":"","sources":["../src/plan-limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAkGH,gFAAgF;AAEhF,MAAM,CAAC,MAAM,WAAW,GAA+B;IACrD,uDAAuD;IACvD,KAAK,EAAE;QACL,WAAW,EAAE,EAAE;QACf,gBAAgB,EAAE,CAAC;QACnB,YAAY,EAAE,CAAC;QACf,kBAAkB,EAAE,EAAE;QACtB,qBAAqB,EAAE,CAAC;QACxB,aAAa,EAAE,CAAC;QAChB,eAAe,EAAE,CAAC;QAClB,eAAe,EAAE,CAAC;QAClB,eAAe,EAAE,CAAC;QAClB,oBAAoB,EAAE,CAAC;QACvB,oBAAoB,EAAE,CAAC;QACvB,oBAAoB,EA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EAC1B,YAAoB;IAEpB,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,KAAK,KAAK,QAAQ,IAAI,YAAY,GAAG,KAAK,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAA0B;IAC7D,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC;AAClE,CAAC","sourcesContent":["/**\n * dating-schema — Plan limits configuration\n *\n * Single source of truth for feature gating by pricing plan.\n * Both backend middleware and frontend UI read from this config.\n *\n * To add/remove a gated feature:\n * 1. Add/remove the key in PlanLimits interface\n * 2. Set values for each plan in PLAN_LIMITS\n * 3. Backend: add enforceDatingPlanLimit('featureKey') middleware to the route\n * That's it — no scattered if-checks needed.\n *\n * @module dating-schema/plan-limits\n */\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\n/** The 5 pricing plans. Black is the exclusive celebrity/HNI tier. */\nexport type PlanId = 'spark' | 'gold' | 'diamond' | 'platinum' | 'black';\n\n/** Filter capability levels by plan. */\nexport type FilterLevel = 'basic' | 'advanced' | 'full';\n\n/** \"Who liked you\" visibility levels by plan. */\nexport type WhoLikedYouLevel = 'none' | 'blurred' | 'full' | 'realtime';\n\n/** Explore category access levels by plan. */\nexport type ExploreAccessLevel = 'basic' | 'premium';\n\n/** Compatibility score breakdown visibility by plan. */\nexport type ScoreBreakdownLevel = 'none' | 'score' | 'breakdown';\n\n/** All numeric limit keys (daily/periodic counters enforced server-side). */\nexport type NumericFeatureKey =\n | 'dailySwipes'\n | 'dailyCompliments'\n | 'dailyRewinds'\n | 'dailyProfileVisits'\n | 'monthlyNewChatThreads'\n | 'monthlyBoosts'\n | 'weeklyAutoBoost'\n | 'dailyVoiceCalls'\n | 'dailyVideoCalls'\n | 'voiceCallDurationMin'\n | 'videoCallDurationMin'\n | 'monthlyIntentChanges'\n | 'scoreVisibleProfiles';\n\n/** All boolean feature keys (on/off per plan). */\nexport type BooleanFeatureKey =\n | 'readReceipts'\n | 'incognitoMode'\n | 'voiceMessages'\n | 'voiceCalls'\n | 'videoCalls'\n | 'showAds'\n | 'priorityVisibility'\n | 'autoBoost'\n | 'seeProfileViewers'\n | 'messageBeforeMatch'\n | 'travelMode'\n | 'profileContentUnlock'\n | 'photoInsights'\n | 'exclusiveLeague';\n\n/** All string-enum feature keys. */\nexport type EnumFeatureKey = 'filterLevel' | 'whoLikedYou' | 'exploreAccess' | 'scoreBreakdown';\n\n/** Union of all feature keys that can be gated. */\nexport type FeatureKey = NumericFeatureKey | BooleanFeatureKey | EnumFeatureKey;\n\n/** Complete plan limits definition. */\nexport interface PlanLimits {\n // ── Numeric limits (daily/periodic) ──\n dailySwipes: number;\n dailyCompliments: number;\n dailyRewinds: number;\n dailyProfileVisits: number;\n monthlyNewChatThreads: number;\n monthlyBoosts: number;\n weeklyAutoBoost: number;\n dailyVoiceCalls: number;\n dailyVideoCalls: number;\n voiceCallDurationMin: number;\n videoCallDurationMin: number;\n monthlyIntentChanges: number;\n scoreVisibleProfiles: number;\n\n // ── Enum limits ──\n filterLevel: FilterLevel;\n whoLikedYou: WhoLikedYouLevel;\n exploreAccess: ExploreAccessLevel;\n scoreBreakdown: ScoreBreakdownLevel;\n\n // ── Boolean flags ──\n readReceipts: boolean;\n incognitoMode: boolean;\n voiceMessages: boolean;\n voiceCalls: boolean;\n videoCalls: boolean;\n showAds: boolean;\n priorityVisibility: boolean;\n autoBoost: boolean;\n seeProfileViewers: boolean;\n messageBeforeMatch: boolean;\n travelMode: boolean;\n profileContentUnlock: boolean;\n photoInsights: boolean;\n exclusiveLeague: boolean;\n}\n\n// ─── Plan Limits Config ──────────────────────────────────────────────────────\n\nexport const PLAN_LIMITS: Record<PlanId, PlanLimits> = {\n // ── Spark (Free) — Enough to hook, heavily limited ──\n spark: {\n dailySwipes: 20,\n dailyCompliments: 1,\n dailyRewinds: 0,\n dailyProfileVisits: 10,\n monthlyNewChatThreads: 5,\n monthlyBoosts: 0,\n weeklyAutoBoost: 0,\n dailyVoiceCalls: 0,\n dailyVideoCalls: 0,\n voiceCallDurationMin: 0,\n videoCallDurationMin: 0,\n monthlyIntentChanges: 2,\n scoreVisibleProfiles: 3,\n filterLevel: 'basic',\n whoLikedYou: 'none',\n exploreAccess: 'basic',\n scoreBreakdown: 'none',\n readReceipts: false,\n incognitoMode: false,\n voiceMessages: false,\n voiceCalls: false,\n videoCalls: false,\n showAds: true,\n priorityVisibility: false,\n autoBoost: false,\n seeProfileViewers: false,\n messageBeforeMatch: false,\n travelMode: false,\n profileContentUnlock: false,\n photoInsights: false,\n exclusiveLeague: false,\n },\n\n // ── Gold — Good value, removes major pain points ──\n gold: {\n dailySwipes: 80,\n dailyCompliments: 5,\n dailyRewinds: 3,\n dailyProfileVisits: 30,\n monthlyNewChatThreads: 15,\n monthlyBoosts: 1,\n weeklyAutoBoost: 0,\n dailyVoiceCalls: 2,\n dailyVideoCalls: 1,\n voiceCallDurationMin: 10,\n videoCallDurationMin: 10,\n monthlyIntentChanges: 4,\n scoreVisibleProfiles: Infinity,\n filterLevel: 'advanced',\n whoLikedYou: 'blurred',\n exploreAccess: 'premium',\n scoreBreakdown: 'score',\n readReceipts: false,\n incognitoMode: false,\n voiceMessages: true,\n voiceCalls: true,\n videoCalls: true,\n showAds: false,\n priorityVisibility: false,\n autoBoost: false,\n seeProfileViewers: true,\n messageBeforeMatch: false,\n travelMode: false,\n profileContentUnlock: true,\n photoInsights: false,\n exclusiveLeague: false,\n },\n\n // ── Diamond (DECOY) — Generous but capped, pushes to Platinum ──\n diamond: {\n dailySwipes: 200,\n dailyCompliments: 15,\n dailyRewinds: 10,\n dailyProfileVisits: 100,\n monthlyNewChatThreads: 50,\n monthlyBoosts: 3,\n weeklyAutoBoost: 0,\n dailyVoiceCalls: 5,\n dailyVideoCalls: 3,\n voiceCallDurationMin: 20,\n videoCallDurationMin: 15,\n monthlyIntentChanges: 8,\n scoreVisibleProfiles: Infinity,\n filterLevel: 'full',\n whoLikedYou: 'full',\n exploreAccess: 'premium',\n scoreBreakdown: 'score',\n readReceipts: true,\n incognitoMode: false,\n voiceMessages: true,\n voiceCalls: true,\n videoCalls: true,\n showAds: false,\n priorityVisibility: true,\n autoBoost: false,\n seeProfileViewers: true,\n messageBeforeMatch: false,\n travelMode: false,\n profileContentUnlock: true,\n photoInsights: true,\n exclusiveLeague: false,\n },\n\n // ── Platinum — Unlimited everything, the aspirational tier ──\n platinum: {\n dailySwipes: Infinity,\n dailyCompliments: Infinity,\n dailyRewinds: Infinity,\n dailyProfileVisits: Infinity,\n monthlyNewChatThreads: Infinity,\n monthlyBoosts: 7,\n weeklyAutoBoost: 1,\n dailyVoiceCalls: Infinity,\n dailyVideoCalls: Infinity,\n voiceCallDurationMin: Infinity,\n videoCallDurationMin: Infinity,\n monthlyIntentChanges: Infinity,\n scoreVisibleProfiles: Infinity,\n filterLevel: 'full',\n whoLikedYou: 'realtime',\n exploreAccess: 'premium',\n scoreBreakdown: 'breakdown',\n readReceipts: true,\n incognitoMode: true,\n voiceMessages: true,\n voiceCalls: true,\n videoCalls: true,\n showAds: false,\n priorityVisibility: true,\n autoBoost: true,\n seeProfileViewers: true,\n messageBeforeMatch: true,\n travelMode: true,\n profileContentUnlock: true,\n photoInsights: true,\n exclusiveLeague: false,\n },\n\n // ── Black — Exclusive league for celebrities & HNIs ──\n // All Platinum features + exclusive league (only Black users see each other)\n black: {\n dailySwipes: Infinity,\n dailyCompliments: Infinity,\n dailyRewinds: Infinity,\n dailyProfileVisits: Infinity,\n monthlyNewChatThreads: Infinity,\n monthlyBoosts: 7,\n weeklyAutoBoost: 1,\n dailyVoiceCalls: Infinity,\n dailyVideoCalls: Infinity,\n voiceCallDurationMin: Infinity,\n videoCallDurationMin: Infinity,\n monthlyIntentChanges: Infinity,\n scoreVisibleProfiles: Infinity,\n filterLevel: 'full',\n whoLikedYou: 'realtime',\n exploreAccess: 'premium',\n scoreBreakdown: 'breakdown',\n readReceipts: true,\n incognitoMode: true,\n voiceMessages: true,\n voiceCalls: true,\n videoCalls: true,\n showAds: false,\n priorityVisibility: true,\n autoBoost: true,\n seeProfileViewers: true,\n messageBeforeMatch: true,\n travelMode: true,\n profileContentUnlock: true,\n photoInsights: true,\n exclusiveLeague: true,\n },\n} as const;\n\n// ─── Plan Tier Helpers ──────────────────────────────────────────────────────\n\n/** All valid plan IDs in tier order. */\nexport const PLAN_IDS: PlanId[] = ['spark', 'gold', 'diamond', 'platinum', 'black'];\n\n/** Paid plans (Gold and above). */\nexport const PAID_PLANS: PlanId[] = ['gold', 'diamond', 'platinum', 'black'];\n\n/** Premium plans (Diamond and above). */\nexport const PREMIUM_PLANS: PlanId[] = ['diamond', 'platinum', 'black'];\n\n/** Top-tier plans (Platinum and Black). */\nexport const TOP_PLANS: PlanId[] = ['platinum', 'black'];\n\n/** Check if a plan is paid (not Spark). */\nexport function isPaidPlan(planId: PlanId): boolean {\n return planId !== 'spark';\n}\n\n/** Premium explore categories that require Gold+ to access. */\nexport const PREMIUM_EXPLORE_CATEGORIES = [\n 'high-iq',\n 'elite-institute',\n 'wealth-dating',\n 'casual',\n 'nri-dating',\n 'senior-dating',\n 'lgbtq',\n 'second-innings',\n] as const;\n\n// ─── Feature Display Config (UI source of truth) ────────────────────────────\n\n/** How a feature appears in UI — per-plan value can be a string (quantity), true (check), or false (locked). */\nexport interface FeatureDisplayItem {\n /** Unique key matching a FeatureKey or custom display key */\n key: string;\n /** Human-readable label */\n label: string;\n /** Per-plan display value: string = show text, true = checkmark, false = locked/unavailable */\n plans: Record<PlanId, string | boolean>;\n}\n\n/**\n * Master feature list for plan comparison UI.\n * Derived from PLAN_LIMITS but with human-readable labels and display values.\n * This is the single source of truth for what features each plan shows.\n */\nexport const PLAN_FEATURE_DISPLAY: FeatureDisplayItem[] = [\n { key: 'dailySwipes', label: 'Daily swipes', plans: { spark: '20/day', gold: '80/day', diamond: '200/day', platinum: 'Unlimited', black: 'Unlimited' } },\n { key: 'dailyCompliments', label: 'Daily compliments', plans: { spark: '1/day', gold: '5/day', diamond: '15/day', platinum: 'Unlimited', black: 'Unlimited' } },\n { key: 'dailyRewinds', label: 'Rewinds', plans: { spark: false, gold: '3/day', diamond: '10/day', platinum: 'Unlimited', black: 'Unlimited' } },\n { key: 'calls', label: 'Voice & video calls', plans: { spark: false, gold: 'Limited', diamond: 'Limited', platinum: 'Unlimited', black: 'Unlimited' } },\n { key: 'whoLikedYou', label: 'Who Liked You', plans: { spark: false, gold: 'Blurred', diamond: 'Full list', platinum: 'Real-time', black: 'Real-time' } },\n { key: 'filterLevel', label: 'Filters', plans: { spark: 'Basic', gold: 'Advanced', diamond: 'Full (147)', platinum: 'Full (147)', black: 'Full (147)' } },\n { key: 'monthlyBoosts', label: 'Monthly boosts', plans: { spark: false, gold: '1/month', diamond: '3/month', platinum: '7/month', black: '7/month' } },\n { key: 'monthlyNewChatThreads', label: 'New chat threads', plans: { spark: '5/month', gold: '15/month', diamond: '50/month', platinum: 'Unlimited', black: 'Unlimited' } },\n { key: 'readReceipts', label: 'Read receipts', plans: { spark: false, gold: false, diamond: true, platinum: true, black: true } },\n { key: 'seeProfileViewers', label: 'Profile viewers', plans: { spark: false, gold: true, diamond: true, platinum: true, black: true } },\n { key: 'photoInsights', label: 'Photo insights', plans: { spark: false, gold: false, diamond: true, platinum: true, black: true } },\n { key: 'priorityVisibility', label: 'Priority visibility', plans: { spark: false, gold: false, diamond: true, platinum: true, black: true } },\n { key: 'autoBoost', label: 'Auto-boost weekly', plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },\n { key: 'incognitoMode', label: 'Incognito mode', plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },\n { key: 'travelMode', label: 'Travel mode', plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },\n { key: 'messageBeforeMatch', label: 'Message before match', plans: { spark: false, gold: false, diamond: false, platinum: true, black: true } },\n { key: 'exclusiveLeague', label: 'Exclusive League', plans: { spark: false, gold: false, diamond: false, platinum: false, black: true } },\n { key: 'vipSupport', label: 'VIP support', plans: { spark: false, gold: false, diamond: false, platinum: false, black: true } },\n { key: 'showAds', label: 'Ad-free', plans: { spark: false, gold: true, diamond: true, platinum: true, black: true } },\n];\n\n/**\n * Get features for a plan, split into included (with values) and locked.\n * Included features come first, locked features last.\n */\nexport function getPlanFeatureDisplay(planId: PlanId): {\n included: { key: string; label: string; value: string | true }[];\n locked: { key: string; label: string }[];\n} {\n const included: { key: string; label: string; value: string | true }[] = [];\n const locked: { key: string; label: string }[] = [];\n\n for (const f of PLAN_FEATURE_DISPLAY) {\n const val = f.plans[planId];\n if (val === false) {\n locked.push({ key: f.key, label: f.label });\n } else if (val === true) {\n included.push({ key: f.key, label: f.label, value: true });\n } else {\n included.push({ key: f.key, label: f.label, value: val });\n }\n }\n\n return { included, locked };\n}\n\n// ─── Helpers ─────────────────────────────────────────────────────────────────\n\n/** Get the limits object for a plan. */\nexport function getPlanLimits(planId: PlanId): PlanLimits {\n return PLAN_LIMITS[planId];\n}\n\n/** Get a specific limit value for a plan + feature. */\nexport function getPlanLimit<K extends FeatureKey>(planId: PlanId, feature: K): PlanLimits[K] {\n return PLAN_LIMITS[planId][feature];\n}\n\n/**\n * Check if a boolean feature is enabled for a plan.\n * Returns `false` for non-boolean features.\n */\nexport function isFeatureEnabled(planId: PlanId, feature: BooleanFeatureKey): boolean {\n return PLAN_LIMITS[planId][feature];\n}\n\n/**\n * Check if a numeric feature has remaining capacity.\n * Returns `true` if the limit is Infinity or greater than current usage.\n */\nexport function hasRemainingQuota(\n planId: PlanId,\n feature: NumericFeatureKey,\n currentUsage: number,\n): boolean {\n const limit = PLAN_LIMITS[planId][feature];\n return limit === Infinity || currentUsage < limit;\n}\n\n/**\n * Get the minimum plan required for a boolean feature.\n * Returns undefined if no plan enables it.\n */\nexport function getMinPlanForFeature(feature: BooleanFeatureKey): PlanId | undefined {\n return PLAN_IDS.find((id) => PLAN_LIMITS[id][feature] === true);\n}\n"]}
1
+ {"version":3,"file":"plan-limits.js","sourceRoot":"","sources":["../src/plan-limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,yBAAyB,IAAI,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAkGlG,gFAAgF;AAEhF,MAAM,CAAC,MAAM,WAAW,GAA+B;IACrD,0EAA0E;IAC1E,KAAK,EAAE;QACL,WAAW,EAAE,GAAG;QAChB,gBAAgB,EAAE,CAAC;QACnB,YAAY,EAAE,CAAC;QACf,kBAAkB,EAAE,EAAE;QACtB,qBAAqB,EAAE,QAAQ,EAAE,wCAAwC;QACzE,aAAa,EAAE,CAAC;QAChB,eAAe,EAAE,CAAC;QAClB,eAAe,EAAE,CAAC;QAClB,eAAe,EAAE,CAAC;QAClB,oBAAoB,EAAE,CAAC;QACvB,oBAAoB,EAAE,CAAC;QACvB,oBAAoB,EAAE,CAAC;QACvB,oBAAoB,EAAE,CAAC;QACvB,WAAW,EAAE,OAAO;QACpB,WAAW,EAAE,MAAM;QACnB,aAAa,EAAE,OAAO;QACtB,cAAc,EAAE,MAAM;QACtB,YAAY,EAAE,KAAK;QACnB,aAAa,EAAE,KAAK;QACpB,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,IAAI;QACb,kBAAkB,EAAE,KAAK;QACzB,SAAS,EAAE,KAAK;QAChB,iBAAiB,EAAE,KAAK;QACxB,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,KAAK;QACjB,oBAAoB,EAAE,KAAK;QAC3B,aAAa,EAAE,KAAK;QACpB,eAAe,EAAE,KAAK;KACvB;IAED,oEAAoE;IACpE,IAAI,EAAE;QACJ,WAAW,EAAE,QAAQ,EAAE,8BAA8B;QACrD,gBAAgB,EAAE,CAAC;QACnB,YAAY,EAAE,QAA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AAQ,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;QAClF,CAAC;IACH,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAC9B,CAAC;AAED,gFAAgF;AAEhF,wCAAwC;AACxC,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;AAC7B,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,YAAY,CAAuB,MAAc,EAAE,OAAU;IAC3E,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAc,EAAE,OAA0B;IACzE,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAc,EACd,OAA0B,EAC1B,YAAoB;IAEpB,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,KAAK,KAAK,QAAQ,IAAI,YAAY,GAAG,KAAK,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAA0B;IAC7D,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC;AAClE,CAAC","sourcesContent":["/**\n * dating-schema — Plan limits configuration\n *\n * Single source of truth for feature gating by pricing plan.\n * Both backend middleware and frontend UI read from this config.\n *\n * To add/remove a gated feature:\n * 1. Add/remove the key in PlanLimits interface\n * 2. Set values for each plan in PLAN_LIMITS\n * 3. Backend: add enforceDatingPlanLimit('featureKey') middleware to the route\n * That's it — no scattered if-checks needed.\n *\n * @module dating-schema/plan-limits\n */\n\nimport { PLAN_FEATURE_DISPLAY_DATA as PLAN_FEATURE_DISPLAY_ITEMS } from './plan-features-data.js';\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\n/** The 5 pricing plans. Black is the exclusive celebrity/HNI tier. */\nexport type PlanId = 'spark' | 'gold' | 'diamond' | 'platinum' | 'black';\n\n/** Filter capability levels by plan. */\nexport type FilterLevel = 'basic' | 'advanced' | 'full';\n\n/** \"Who liked you\" visibility levels by plan. */\nexport type WhoLikedYouLevel = 'none' | 'blurred' | 'full' | 'realtime';\n\n/** Explore category access levels by plan. */\nexport type ExploreAccessLevel = 'basic' | 'premium';\n\n/** Compatibility score breakdown visibility by plan. */\nexport type ScoreBreakdownLevel = 'none' | 'score' | 'breakdown';\n\n/** All numeric limit keys (daily/periodic counters enforced server-side). */\nexport type NumericFeatureKey =\n | 'dailySwipes'\n | 'dailyCompliments'\n | 'dailyRewinds'\n | 'dailyProfileVisits'\n | 'monthlyNewChatThreads'\n | 'monthlyBoosts'\n | 'weeklyAutoBoost'\n | 'dailyVoiceCalls'\n | 'dailyVideoCalls'\n | 'voiceCallDurationMin'\n | 'videoCallDurationMin'\n | 'monthlyIntentChanges'\n | 'scoreVisibleProfiles';\n\n/** All boolean feature keys (on/off per plan). */\nexport type BooleanFeatureKey =\n | 'readReceipts'\n | 'incognitoMode'\n | 'voiceMessages'\n | 'voiceCalls'\n | 'videoCalls'\n | 'showAds'\n | 'priorityVisibility'\n | 'autoBoost'\n | 'seeProfileViewers'\n | 'messageBeforeMatch'\n | 'travelMode'\n | 'profileContentUnlock'\n | 'photoInsights'\n | 'exclusiveLeague';\n\n/** All string-enum feature keys. */\nexport type EnumFeatureKey = 'filterLevel' | 'whoLikedYou' | 'exploreAccess' | 'scoreBreakdown';\n\n/** Union of all feature keys that can be gated. */\nexport type FeatureKey = NumericFeatureKey | BooleanFeatureKey | EnumFeatureKey;\n\n/** Complete plan limits definition. */\nexport interface PlanLimits {\n // ── Numeric limits (daily/periodic) ──\n dailySwipes: number;\n dailyCompliments: number;\n dailyRewinds: number;\n dailyProfileVisits: number;\n monthlyNewChatThreads: number;\n monthlyBoosts: number;\n weeklyAutoBoost: number;\n dailyVoiceCalls: number;\n dailyVideoCalls: number;\n voiceCallDurationMin: number;\n videoCallDurationMin: number;\n monthlyIntentChanges: number;\n scoreVisibleProfiles: number;\n\n // ── Enum limits ──\n filterLevel: FilterLevel;\n whoLikedYou: WhoLikedYouLevel;\n exploreAccess: ExploreAccessLevel;\n scoreBreakdown: ScoreBreakdownLevel;\n\n // ── Boolean flags ──\n readReceipts: boolean;\n incognitoMode: boolean;\n voiceMessages: boolean;\n voiceCalls: boolean;\n videoCalls: boolean;\n showAds: boolean;\n priorityVisibility: boolean;\n autoBoost: boolean;\n seeProfileViewers: boolean;\n messageBeforeMatch: boolean;\n travelMode: boolean;\n profileContentUnlock: boolean;\n photoInsights: boolean;\n exclusiveLeague: boolean;\n}\n\n// ─── Plan Limits Config ──────────────────────────────────────────────────────\n\nexport const PLAN_LIMITS: Record<PlanId, PlanLimits> = {\n // ── Spark (Free) — Generous enough to hook, limited enough to upgrade ──\n spark: {\n dailySwipes: 150,\n dailyCompliments: 1,\n dailyRewinds: 0,\n dailyProfileVisits: 20,\n monthlyNewChatThreads: Infinity, // no chat cap — matches can always chat\n monthlyBoosts: 0,\n weeklyAutoBoost: 0,\n dailyVoiceCalls: 0,\n dailyVideoCalls: 0,\n voiceCallDurationMin: 0,\n videoCallDurationMin: 0,\n monthlyIntentChanges: 2,\n scoreVisibleProfiles: 3,\n filterLevel: 'basic',\n whoLikedYou: 'none',\n exploreAccess: 'basic',\n scoreBreakdown: 'none',\n readReceipts: false,\n incognitoMode: false,\n voiceMessages: false,\n voiceCalls: false,\n videoCalls: false,\n showAds: true,\n priorityVisibility: false,\n autoBoost: false,\n seeProfileViewers: false,\n messageBeforeMatch: false,\n travelMode: false,\n profileContentUnlock: false,\n photoInsights: false,\n exclusiveLeague: false,\n },\n\n // ── Gold — Removes all friction, more generous than Tinder Plus ──\n gold: {\n dailySwipes: Infinity, // no swipe cap for paid users\n dailyCompliments: 3,\n dailyRewinds: Infinity, // no rewind cap for paid users\n dailyProfileVisits: Infinity,\n monthlyNewChatThreads: Infinity,\n monthlyBoosts: 1,\n weeklyAutoBoost: 0,\n dailyVoiceCalls: 0, // voice/video starts at Diamond\n dailyVideoCalls: 0,\n voiceCallDurationMin: 0,\n videoCallDurationMin: 0,\n monthlyIntentChanges: 4,\n scoreVisibleProfiles: Infinity,\n filterLevel: 'advanced',\n whoLikedYou: 'blurred',\n exploreAccess: 'premium',\n scoreBreakdown: 'score',\n readReceipts: false,\n incognitoMode: false,\n voiceMessages: false,\n voiceCalls: false,\n videoCalls: false,\n showAds: false,\n priorityVisibility: false,\n autoBoost: false,\n seeProfileViewers: false,\n messageBeforeMatch: false,\n travelMode: false,\n profileContentUnlock: true,\n photoInsights: false,\n exclusiveLeague: false,\n },\n\n // ── Diamond (DECOY) — Almost Platinum but capped, pushes upgrade ──\n diamond: {\n dailySwipes: Infinity,\n dailyCompliments: 5,\n dailyRewinds: Infinity,\n dailyProfileVisits: Infinity,\n monthlyNewChatThreads: Infinity,\n monthlyBoosts: 3,\n weeklyAutoBoost: 0,\n dailyVoiceCalls: 3,\n dailyVideoCalls: 2,\n voiceCallDurationMin: 15,\n videoCallDurationMin: 10,\n monthlyIntentChanges: 8,\n scoreVisibleProfiles: Infinity,\n filterLevel: 'full',\n whoLikedYou: 'full',\n exploreAccess: 'premium',\n scoreBreakdown: 'score',\n readReceipts: true,\n incognitoMode: false,\n voiceMessages: true,\n voiceCalls: true,\n videoCalls: true,\n showAds: false,\n priorityVisibility: true,\n autoBoost: false,\n seeProfileViewers: true,\n messageBeforeMatch: false,\n travelMode: false,\n profileContentUnlock: true,\n photoInsights: false,\n exclusiveLeague: false,\n },\n\n // ── Platinum — The aspirational tier, everything unlocked ──\n platinum: {\n dailySwipes: Infinity,\n dailyCompliments: 10,\n dailyRewinds: Infinity,\n dailyProfileVisits: Infinity,\n monthlyNewChatThreads: Infinity,\n monthlyBoosts: 5,\n weeklyAutoBoost: 1,\n dailyVoiceCalls: Infinity,\n dailyVideoCalls: Infinity,\n voiceCallDurationMin: Infinity,\n videoCallDurationMin: Infinity,\n monthlyIntentChanges: Infinity,\n scoreVisibleProfiles: Infinity,\n filterLevel: 'full',\n whoLikedYou: 'realtime',\n exploreAccess: 'premium',\n scoreBreakdown: 'breakdown',\n readReceipts: true,\n incognitoMode: true,\n voiceMessages: true,\n voiceCalls: true,\n videoCalls: true,\n showAds: false,\n priorityVisibility: true,\n autoBoost: true,\n seeProfileViewers: true,\n messageBeforeMatch: true,\n travelMode: true,\n profileContentUnlock: true,\n photoInsights: true,\n exclusiveLeague: false,\n },\n\n // ── Black — Exclusive league for celebrities & HNIs ──\n black: {\n dailySwipes: Infinity,\n dailyCompliments: 15,\n dailyRewinds: Infinity,\n dailyProfileVisits: Infinity,\n monthlyNewChatThreads: Infinity,\n monthlyBoosts: 5,\n weeklyAutoBoost: 1,\n dailyVoiceCalls: Infinity,\n dailyVideoCalls: Infinity,\n voiceCallDurationMin: Infinity,\n videoCallDurationMin: Infinity,\n monthlyIntentChanges: Infinity,\n scoreVisibleProfiles: Infinity,\n filterLevel: 'full',\n whoLikedYou: 'realtime',\n exploreAccess: 'premium',\n scoreBreakdown: 'breakdown',\n readReceipts: true,\n incognitoMode: true,\n voiceMessages: true,\n voiceCalls: true,\n videoCalls: true,\n showAds: false,\n priorityVisibility: true,\n autoBoost: true,\n seeProfileViewers: true,\n messageBeforeMatch: true,\n travelMode: true,\n profileContentUnlock: true,\n photoInsights: true,\n exclusiveLeague: true,\n },\n} as const;\n\n// ─── Plan Tier Helpers ──────────────────────────────────────────────────────\n\n/** All valid plan IDs in tier order. */\nexport const PLAN_IDS: PlanId[] = ['spark', 'gold', 'diamond', 'platinum', 'black'];\n\n/** Paid plans (Gold and above). */\nexport const PAID_PLANS: PlanId[] = ['gold', 'diamond', 'platinum', 'black'];\n\n/** Premium plans (Diamond and above). */\nexport const PREMIUM_PLANS: PlanId[] = ['diamond', 'platinum', 'black'];\n\n/** Top-tier plans (Platinum and Black). */\nexport const TOP_PLANS: PlanId[] = ['platinum', 'black'];\n\n/** Check if a plan is paid (not Spark). */\nexport function isPaidPlan(planId: PlanId): boolean {\n return planId !== 'spark';\n}\n\n/** Premium explore categories that require Gold+ to access. */\nexport const PREMIUM_EXPLORE_CATEGORIES = [\n 'high-iq',\n 'elite-institute',\n 'wealth-dating',\n 'casual',\n 'nri-dating',\n 'senior-dating',\n 'lgbtq',\n 'second-innings',\n] as const;\n\n// ─── Feature Display Config (UI source of truth) ────────────────────────────\n\n/** How a feature appears in UI — per-plan value can be a string (quantity), true (check), or false (locked). */\nexport interface FeatureDisplayItem {\n /** Unique key matching a FeatureKey or custom display key */\n key: string;\n /** Short, clear label shown on the card */\n label: string;\n /** Tooltip help text explaining what this feature does */\n helpText: string;\n /** Whether this feature is live. If false, hidden from UI entirely (not yet rolled out). */\n available: boolean;\n /** Per-plan display value: string = show text, true = checkmark, false = locked/unavailable */\n plans: Record<PlanId, string | boolean>;\n}\n\n/**\n * Master feature list for plan comparison UI.\n * Now in plan-features-data.ts for cleaner separation.\n */\nexport { PLAN_FEATURE_DISPLAY_DATA as PLAN_FEATURE_DISPLAY } from './plan-features-data.js';\n\n/**\n * Get features for a plan, split into included (with values) and locked.\n * Included features come first, locked features last.\n * Only includes features where `available: true` (hides unreleased features).\n */\nexport function getPlanFeatureDisplay(planId: PlanId): {\n included: { key: string; label: string; helpText: string; value: string | true }[];\n locked: { key: string; label: string; helpText: string }[];\n} {\n const included: { key: string; label: string; helpText: string; value: string | true }[] = [];\n const locked: { key: string; label: string; helpText: string }[] = [];\n\n for (const f of PLAN_FEATURE_DISPLAY_ITEMS) {\n // Skip features not yet rolled out\n if (!f.available) continue;\n\n const val = f.plans[planId];\n if (val === false) {\n locked.push({ key: f.key, label: f.label, helpText: f.helpText });\n } else if (val === true) {\n included.push({ key: f.key, label: f.label, helpText: f.helpText, value: true });\n } else {\n included.push({ key: f.key, label: f.label, helpText: f.helpText, value: val });\n }\n }\n\n return { included, locked };\n}\n\n// ─── Helpers ─────────────────────────────────────────────────────────────────\n\n/** Get the limits object for a plan. */\nexport function getPlanLimits(planId: PlanId): PlanLimits {\n return PLAN_LIMITS[planId];\n}\n\n/** Get a specific limit value for a plan + feature. */\nexport function getPlanLimit<K extends FeatureKey>(planId: PlanId, feature: K): PlanLimits[K] {\n return PLAN_LIMITS[planId][feature];\n}\n\n/**\n * Check if a boolean feature is enabled for a plan.\n * Returns `false` for non-boolean features.\n */\nexport function isFeatureEnabled(planId: PlanId, feature: BooleanFeatureKey): boolean {\n return PLAN_LIMITS[planId][feature];\n}\n\n/**\n * Check if a numeric feature has remaining capacity.\n * Returns `true` if the limit is Infinity or greater than current usage.\n */\nexport function hasRemainingQuota(\n planId: PlanId,\n feature: NumericFeatureKey,\n currentUsage: number,\n): boolean {\n const limit = PLAN_LIMITS[planId][feature];\n return limit === Infinity || currentUsage < limit;\n}\n\n/**\n * Get the minimum plan required for a boolean feature.\n * Returns undefined if no plan enables it.\n */\nexport function getMinPlanForFeature(feature: BooleanFeatureKey): PlanId | undefined {\n return PLAN_IDS.find((id) => PLAN_LIMITS[id][feature] === true);\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dating-schema",
3
- "version": "0.35.0",
3
+ "version": "0.36.0",
4
4
  "description": "Shared Zod schemas for the Dating feature — single source of truth for API contracts, validation, and TypeScript types (frontend + backend).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",