dating-schema 0.35.1 → 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/plan-features-data.d.ts +7 -0
- package/dist/plan-features-data.d.ts.map +1 -0
- package/dist/plan-features-data.js +71 -0
- package/dist/plan-features-data.js.map +1 -0
- package/dist/plan-limits.d.ts +5 -3
- package/dist/plan-limits.d.ts.map +1 -1
- package/dist/plan-limits.js +42 -135
- package/dist/plan-limits.js.map +1 -1
- package/package.json +1 -1
|
@@ -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,iGAAiG;QAC3G,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,OA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E,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"]}
|
package/dist/plan-limits.d.ts
CHANGED
|
@@ -85,18 +85,20 @@ export interface FeatureDisplayItem {
|
|
|
85
85
|
label: string;
|
|
86
86
|
/** Tooltip help text explaining what this feature does */
|
|
87
87
|
helpText: string;
|
|
88
|
+
/** Whether this feature is live. If false, hidden from UI entirely (not yet rolled out). */
|
|
89
|
+
available: boolean;
|
|
88
90
|
/** Per-plan display value: string = show text, true = checkmark, false = locked/unavailable */
|
|
89
91
|
plans: Record<PlanId, string | boolean>;
|
|
90
92
|
}
|
|
91
93
|
/**
|
|
92
94
|
* Master feature list for plan comparison UI.
|
|
93
|
-
*
|
|
94
|
-
* This is the single source of truth for what features each plan shows.
|
|
95
|
+
* Now in plan-features-data.ts for cleaner separation.
|
|
95
96
|
*/
|
|
96
|
-
export
|
|
97
|
+
export { PLAN_FEATURE_DISPLAY_DATA as PLAN_FEATURE_DISPLAY } from './plan-features-data.js';
|
|
97
98
|
/**
|
|
98
99
|
* Get features for a plan, split into included (with values) and locked.
|
|
99
100
|
* Included features come first, locked features last.
|
|
101
|
+
* Only includes features where `available: true` (hides unreleased features).
|
|
100
102
|
*/
|
|
101
103
|
export declare function getPlanFeatureDisplay(planId: PlanId): {
|
|
102
104
|
included: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-limits.d.ts","sourceRoot":"","sources":["../src/plan-limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"plan-limits.d.ts","sourceRoot":"","sources":["../src/plan-limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,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,iDAAiD;AACjD,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;AAExE,8CAA8C;AAC9C,MAAM,MAAM,kBAAkB,GAAG,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_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) —
|
|
18
|
+
// ── Spark (Free) — Generous enough to hook, limited enough to upgrade ──
|
|
18
19
|
spark: {
|
|
19
|
-
dailySwipes:
|
|
20
|
+
dailySwipes: 150,
|
|
20
21
|
dailyCompliments: 1,
|
|
21
22
|
dailyRewinds: 0,
|
|
22
|
-
dailyProfileVisits:
|
|
23
|
-
monthlyNewChatThreads:
|
|
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 —
|
|
52
|
+
// ── Gold — Removes all friction, more generous than Tinder Plus ──
|
|
52
53
|
gold: {
|
|
53
|
-
dailySwipes:
|
|
54
|
-
dailyCompliments:
|
|
55
|
-
dailyRewinds:
|
|
56
|
-
dailyProfileVisits:
|
|
57
|
-
monthlyNewChatThreads:
|
|
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:
|
|
61
|
-
dailyVideoCalls:
|
|
62
|
-
voiceCallDurationMin:
|
|
63
|
-
videoCallDurationMin:
|
|
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:
|
|
73
|
-
voiceCalls:
|
|
74
|
-
videoCalls:
|
|
73
|
+
voiceMessages: false,
|
|
74
|
+
voiceCalls: false,
|
|
75
|
+
videoCalls: false,
|
|
75
76
|
showAds: false,
|
|
76
77
|
priorityVisibility: false,
|
|
77
78
|
autoBoost: false,
|
|
78
|
-
seeProfileViewers:
|
|
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) —
|
|
86
|
+
// ── Diamond (DECOY) — Almost Platinum but capped, pushes upgrade ──
|
|
86
87
|
diamond: {
|
|
87
|
-
dailySwipes:
|
|
88
|
-
dailyCompliments:
|
|
89
|
-
dailyRewinds:
|
|
90
|
-
dailyProfileVisits:
|
|
91
|
-
monthlyNewChatThreads:
|
|
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:
|
|
95
|
-
dailyVideoCalls:
|
|
96
|
-
voiceCallDurationMin:
|
|
97
|
-
videoCallDurationMin:
|
|
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:
|
|
117
|
+
photoInsights: false,
|
|
117
118
|
exclusiveLeague: false,
|
|
118
119
|
},
|
|
119
|
-
// ── Platinum —
|
|
120
|
+
// ── Platinum — The aspirational tier, everything unlocked ──
|
|
120
121
|
platinum: {
|
|
121
122
|
dailySwipes: Infinity,
|
|
122
|
-
dailyCompliments:
|
|
123
|
+
dailyCompliments: 10,
|
|
123
124
|
dailyRewinds: Infinity,
|
|
124
125
|
dailyProfileVisits: Infinity,
|
|
125
126
|
monthlyNewChatThreads: Infinity,
|
|
126
|
-
monthlyBoosts:
|
|
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:
|
|
157
|
+
dailyCompliments: 15,
|
|
158
158
|
dailyRewinds: Infinity,
|
|
159
159
|
dailyProfileVisits: Infinity,
|
|
160
160
|
monthlyNewChatThreads: Infinity,
|
|
161
|
-
monthlyBoosts:
|
|
161
|
+
monthlyBoosts: 5,
|
|
162
162
|
weeklyAutoBoost: 1,
|
|
163
163
|
dailyVoiceCalls: Infinity,
|
|
164
164
|
dailyVideoCalls: Infinity,
|
|
@@ -212,114 +212,21 @@ export const PREMIUM_EXPLORE_CATEGORIES = [
|
|
|
212
212
|
];
|
|
213
213
|
/**
|
|
214
214
|
* Master feature list for plan comparison UI.
|
|
215
|
-
*
|
|
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
|
|
219
|
-
{
|
|
220
|
-
key: 'dailySwipes', label: 'Swipes per day',
|
|
221
|
-
helpText: 'How many profiles you can like or pass on each day.',
|
|
222
|
-
plans: { spark: '20', gold: '80', diamond: '200', platinum: 'Unlimited', black: 'Unlimited' },
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
key: 'dailyCompliments', label: 'Compliments per day',
|
|
226
|
-
helpText: 'Send a compliment with a personal note — they always see it, even without matching.',
|
|
227
|
-
plans: { spark: '1', gold: '5', diamond: '15', platinum: 'Unlimited', black: 'Unlimited' },
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
key: 'dailyRewinds', label: 'Undo swipes',
|
|
231
|
-
helpText: 'Accidentally passed on someone? Rewind to bring them back.',
|
|
232
|
-
plans: { spark: false, gold: '3/day', diamond: '10/day', platinum: 'Unlimited', black: 'Unlimited' },
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
key: 'calls', label: 'Voice & video calls',
|
|
236
|
-
helpText: 'Talk face-to-face or voice-only with your matches — right inside the app.',
|
|
237
|
-
plans: { spark: false, gold: 'Limited', diamond: 'Limited', platinum: 'Unlimited', black: 'Unlimited' },
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
key: 'whoLikedYou', label: 'See who likes you',
|
|
241
|
-
helpText: 'Find out who already liked your profile so you can match instantly.',
|
|
242
|
-
plans: { spark: false, gold: 'Blurred', diamond: 'Full list', platinum: 'Real-time', black: 'Real-time' },
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
key: 'filterLevel', label: 'Search filters',
|
|
246
|
-
helpText: 'Narrow down profiles by age, location, religion, profession, and 140+ more options.',
|
|
247
|
-
plans: { spark: 'Basic', gold: 'Advanced', diamond: 'All 147', platinum: 'All 147', black: 'All 147' },
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
key: 'monthlyBoosts', label: 'Profile boosts',
|
|
251
|
-
helpText: 'Push your profile to the top of the discover feed for 30 minutes — get seen by more people.',
|
|
252
|
-
plans: { spark: false, gold: '1/month', diamond: '3/month', platinum: '7/month', black: '7/month' },
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
key: 'monthlyNewChatThreads', label: 'New conversations',
|
|
256
|
-
helpText: 'Start new chat conversations with your matches each month. Existing chats always stay open.',
|
|
257
|
-
plans: { spark: '5/month', gold: '15/month', diamond: '50/month', platinum: 'Unlimited', black: 'Unlimited' },
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
key: 'readReceipts', label: 'Read receipts',
|
|
261
|
-
helpText: 'See when your messages have been read by the other person.',
|
|
262
|
-
plans: { spark: false, gold: false, diamond: true, platinum: true, black: true },
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
key: 'seeProfileViewers', label: 'See who viewed you',
|
|
266
|
-
helpText: 'Find out who visited your profile — even if they didn\'t swipe.',
|
|
267
|
-
plans: { spark: false, gold: true, diamond: true, platinum: true, black: true },
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
key: 'photoInsights', label: 'Photo insights',
|
|
271
|
-
helpText: 'See which of your photos gets the most attention and likes.',
|
|
272
|
-
plans: { spark: false, gold: false, diamond: true, platinum: true, black: true },
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
key: 'priorityVisibility', label: 'Show up first',
|
|
276
|
-
helpText: 'Your profile appears higher in other people\'s discover feed.',
|
|
277
|
-
plans: { spark: false, gold: false, diamond: true, platinum: true, black: true },
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
key: 'autoBoost', label: 'Weekly auto-boost',
|
|
281
|
-
helpText: 'Your profile is automatically boosted every week — no need to remember.',
|
|
282
|
-
plans: { spark: false, gold: false, diamond: false, platinum: true, black: true },
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
key: 'incognitoMode', label: 'Browse privately',
|
|
286
|
-
helpText: 'Hide your profile from everyone. Only people you like can see you.',
|
|
287
|
-
plans: { spark: false, gold: false, diamond: false, platinum: true, black: true },
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
key: 'travelMode', label: 'Travel mode',
|
|
291
|
-
helpText: 'Browse profiles in any city or district — without being there physically.',
|
|
292
|
-
plans: { spark: false, gold: false, diamond: false, platinum: true, black: true },
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
key: 'messageBeforeMatch', label: 'Message first',
|
|
296
|
-
helpText: 'Send a message to someone before they swipe on you.',
|
|
297
|
-
plans: { spark: false, gold: false, diamond: false, platinum: true, black: true },
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
key: 'exclusiveLeague', label: 'Exclusive league',
|
|
301
|
-
helpText: 'Your profile is only shown to other Black members. A private, curated experience.',
|
|
302
|
-
plans: { spark: false, gold: false, diamond: false, platinum: false, black: true },
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
key: 'vipSupport', label: 'VIP support',
|
|
306
|
-
helpText: 'Get priority help from a dedicated support team.',
|
|
307
|
-
plans: { spark: false, gold: false, diamond: false, platinum: false, black: true },
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
key: 'showAds', label: 'No ads',
|
|
311
|
-
helpText: 'Enjoy a clean, ad-free experience throughout the app.',
|
|
312
|
-
plans: { spark: false, gold: true, diamond: true, platinum: true, black: true },
|
|
313
|
-
},
|
|
314
|
-
];
|
|
217
|
+
export { PLAN_FEATURE_DISPLAY_DATA as PLAN_FEATURE_DISPLAY } from './plan-features-data.js';
|
|
315
218
|
/**
|
|
316
219
|
* Get features for a plan, split into included (with values) and locked.
|
|
317
220
|
* Included features come first, locked features last.
|
|
221
|
+
* Only includes features where `available: true` (hides unreleased features).
|
|
318
222
|
*/
|
|
319
223
|
export function getPlanFeatureDisplay(planId) {
|
|
320
224
|
const included = [];
|
|
321
225
|
const locked = [];
|
|
322
|
-
for (const f of
|
|
226
|
+
for (const f of PLAN_FEATURE_DISPLAY_ITEMS) {
|
|
227
|
+
// Skip features not yet rolled out
|
|
228
|
+
if (!f.available)
|
|
229
|
+
continue;
|
|
323
230
|
const val = f.plans[planId];
|
|
324
231
|
if (val === false) {
|
|
325
232
|
locked.push({ key: f.key, label: f.label, helpText: f.helpText });
|
package/dist/plan-limits.js.map
CHANGED
|
@@ -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,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,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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\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 /** Short, clear label shown on the card */\n label: string;\n /** Tooltip help text explaining what this feature does */\n helpText: 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 {\n key: 'dailySwipes', label: 'Swipes per day',\n helpText: 'How many profiles you can like or pass on each day.',\n plans: { spark: '20', gold: '80', diamond: '200', platinum: 'Unlimited', black: 'Unlimited' },\n },\n {\n key: 'dailyCompliments', label: 'Compliments per day',\n helpText: 'Send a compliment with a personal note — they always see it, even without matching.',\n plans: { spark: '1', gold: '5', diamond: '15', platinum: 'Unlimited', black: 'Unlimited' },\n },\n {\n key: 'dailyRewinds', label: 'Undo swipes',\n helpText: 'Accidentally passed on someone? Rewind to bring them back.',\n plans: { spark: false, gold: '3/day', diamond: '10/day', platinum: 'Unlimited', black: 'Unlimited' },\n },\n {\n key: 'calls', label: 'Voice & video calls',\n helpText: 'Talk face-to-face or voice-only with your matches — right inside the app.',\n plans: { spark: false, gold: 'Limited', diamond: 'Limited', platinum: 'Unlimited', black: 'Unlimited' },\n },\n {\n key: 'whoLikedYou', label: 'See who likes you',\n helpText: 'Find out who already liked your profile so you can match instantly.',\n plans: { spark: false, gold: 'Blurred', diamond: 'Full list', platinum: 'Real-time', black: 'Real-time' },\n },\n {\n key: 'filterLevel', label: 'Search filters',\n helpText: 'Narrow down profiles by age, location, religion, profession, and 140+ more options.',\n plans: { spark: 'Basic', gold: 'Advanced', diamond: 'All 147', platinum: 'All 147', black: 'All 147' },\n },\n {\n key: 'monthlyBoosts', label: 'Profile boosts',\n helpText: 'Push your profile to the top of the discover feed for 30 minutes — get seen by more people.',\n plans: { spark: false, gold: '1/month', diamond: '3/month', platinum: '7/month', black: '7/month' },\n },\n {\n key: 'monthlyNewChatThreads', label: 'New conversations',\n helpText: 'Start new chat conversations with your matches each month. Existing chats always stay open.',\n plans: { spark: '5/month', gold: '15/month', diamond: '50/month', platinum: 'Unlimited', black: 'Unlimited' },\n },\n {\n key: 'readReceipts', label: 'Read receipts',\n helpText: 'See when your messages have been read by the other person.',\n plans: { spark: false, gold: false, diamond: true, platinum: true, black: true },\n },\n {\n key: 'seeProfileViewers', label: 'See who viewed you',\n helpText: 'Find out who visited your profile — even if they didn\\'t swipe.',\n plans: { spark: false, gold: true, diamond: true, platinum: true, black: true },\n },\n {\n key: 'photoInsights', label: 'Photo insights',\n helpText: 'See which of your photos gets the most attention and likes.',\n plans: { spark: false, gold: false, diamond: true, platinum: true, black: true },\n },\n {\n key: 'priorityVisibility', label: 'Show up first',\n helpText: 'Your profile appears higher in other people\\'s discover feed.',\n plans: { spark: false, gold: false, diamond: true, platinum: true, black: true },\n },\n {\n key: 'autoBoost', label: 'Weekly auto-boost',\n helpText: 'Your profile is automatically boosted every week — no need to remember.',\n plans: { spark: false, gold: false, diamond: false, platinum: true, black: true },\n },\n {\n key: 'incognitoMode', label: 'Browse privately',\n helpText: 'Hide your profile from everyone. Only people you like can see you.',\n plans: { spark: false, gold: false, diamond: false, platinum: true, black: true },\n },\n {\n key: 'travelMode', label: 'Travel mode',\n helpText: 'Browse profiles in any city or district — without being there physically.',\n plans: { spark: false, gold: false, diamond: false, platinum: true, black: true },\n },\n {\n key: 'messageBeforeMatch', label: 'Message first',\n helpText: 'Send a message to someone before they swipe on you.',\n plans: { spark: false, gold: false, diamond: false, platinum: true, black: true },\n },\n {\n key: 'exclusiveLeague', label: 'Exclusive league',\n helpText: 'Your profile is only shown to other Black members. A private, curated experience.',\n plans: { spark: false, gold: false, diamond: false, platinum: false, black: true },\n },\n {\n key: 'vipSupport', label: 'VIP support',\n helpText: 'Get priority help from a dedicated support team.',\n plans: { spark: false, gold: false, diamond: false, platinum: false, black: true },\n },\n {\n key: 'showAds', label: 'No ads',\n helpText: 'Enjoy a clean, ad-free experience throughout the app.',\n plans: { spark: false, gold: true, diamond: true, platinum: true, black: true },\n },\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; 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) {\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"]}
|
|
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,QAAQ,EAAE,+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,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.
|
|
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",
|