dating-schema 0.45.0 → 0.46.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 +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/responses/common.d.ts +23 -12
- package/dist/responses/common.d.ts.map +1 -1
- package/dist/responses/common.js.map +1 -1
- package/dist/responses/discover.d.ts +39 -15
- package/dist/responses/discover.d.ts.map +1 -1
- package/dist/responses/discover.js +6 -1
- package/dist/responses/discover.js.map +1 -1
- package/dist/responses/index.d.ts +2 -2
- package/dist/responses/index.d.ts.map +1 -1
- package/dist/responses/index.js +2 -2
- package/dist/responses/index.js.map +1 -1
- package/dist/responses/monetization.d.ts +45 -13
- package/dist/responses/monetization.d.ts.map +1 -1
- package/dist/responses/monetization.js +2 -0
- package/dist/responses/monetization.js.map +1 -1
- package/dist/responses/profile.d.ts +161 -20
- package/dist/responses/profile.d.ts.map +1 -1
- package/dist/responses/profile.js +10 -0
- package/dist/responses/profile.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module dating-schema
|
|
8
8
|
*/
|
|
9
|
-
export * from './responses/index.js';
|
|
10
9
|
export { BADGE_DISPLAY, type BadgeDisplayInfo, type BadgeKey, badgeKeySchema, type UpdateBadgesBody, updateBadgesBodySchema, } from './badges.js';
|
|
11
10
|
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';
|
|
12
11
|
export { getFieldMeta, getFieldOptions } from './field-helpers.js';
|
|
@@ -15,6 +14,7 @@ export { getOnboardingFieldConfig, ONBOARDING_FIELDS, ONBOARDING_STEP_GROUPS, ON
|
|
|
15
14
|
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 PlanDisplayValue, type PlanId, type PlanLimits, PREMIUM_EXPLORE_CATEGORIES, PREMIUM_PLANS, renderPlanDisplayValue, type ScoreBreakdownLevel, TOP_PLANS, type WhoLikedYouLevel, } from './plan-limits.js';
|
|
16
15
|
export { type CreateProfileInput, createProfileSchema, type FullProfileData, fullProfileSchema, getCognitiveBandRank, type OnboardingFormData, onboardingFormSchema, type UpdateProfileInput, updateProfileSchema, } from './profile.js';
|
|
17
16
|
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, religionCommunity, type SelectField, selfAssessment, storyPrompts, values, } from './profile-fields/index.js';
|
|
17
|
+
export * from './responses/index.js';
|
|
18
18
|
export { type BlockBody, blockBodySchema, type ReportBody, type ReportReason, type ReportStatus, reportBodySchema, reportReasonSchema, reportStatusSchema, } from './safety.js';
|
|
19
19
|
export { type CreateSubscriptionBody, createSubscriptionBodySchema, type SubscriptionStatus, subscriptionStatusSchema, type Tenure, tenureSchema, } from './subscription.js';
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"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
*
|
|
7
7
|
* @module dating-schema
|
|
8
8
|
*/
|
|
9
|
-
// ─── API Response types (entities, results, params) ─────────────────────────
|
|
10
|
-
export * from './responses/index.js';
|
|
11
9
|
// ─── Badge schemas ──────────────────────────────────────────────────────────
|
|
12
10
|
export { BADGE_DISPLAY, badgeKeySchema, updateBadgesBodySchema, } from './badges.js';
|
|
13
11
|
// ─── Common helpers and enums ────────────────────────────────────────────────
|
|
@@ -26,6 +24,8 @@ export { getMinPlanForFeature, getPlanFeatureDisplay, getPlanLimit, getPlanLimit
|
|
|
26
24
|
export { createProfileSchema, fullProfileSchema, getCognitiveBandRank, onboardingFormSchema, updateProfileSchema, } from './profile.js';
|
|
27
25
|
// ─── Profile field configs (option arrays with labels for UI rendering) ──────
|
|
28
26
|
export { allFieldGroups, basics, career, cognitive, familyHome, favourites, financeLegal, healthWellness, heroIdentity, interestCategories, interests, lifestyle, lookingFor, personality, relationshipIntimacy, religionCommunity, selfAssessment, storyPrompts, values, } from './profile-fields/index.js';
|
|
27
|
+
// ─── API Response types (entities, results, params) ─────────────────────────
|
|
28
|
+
export * from './responses/index.js';
|
|
29
29
|
// ─── Safety schemas ──────────────────────────────────────────────────────────
|
|
30
30
|
export { blockBodySchema, reportBodySchema, reportReasonSchema, reportStatusSchema, } from './safety.js';
|
|
31
31
|
// ─── Subscription schemas ────────────────────────────────────────────────────
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+EAA+E;AAC/E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+EAA+E;AAC/E,OAAO,EACL,aAAa,EAGb,cAAc,EAEd,sBAAsB,GACvB,MAAM,aAAa,CAAC;AACrB,gFAAgF;AAChF,OAAO;AAEL,cAAc;AACd,cAAc,EACd,s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AAgF;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// ─── Badge schemas ──────────────────────────────────────────────────────────\nexport {\n BADGE_DISPLAY,\n type BadgeDisplayInfo,\n type BadgeKey,\n badgeKeySchema,\n type UpdateBadgesBody,\n updateBadgesBodySchema,\n} from './badges.js';\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 { getFieldMeta, 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';\nexport {\n getOnboardingFieldConfig,\n ONBOARDING_FIELDS,\n ONBOARDING_STEP_GROUPS,\n ONBOARDING_TOTAL_MAIN_STEPS,\n ONBOARDING_TOTAL_SUB_STEPS,\n type OnboardingFieldConfig,\n type OnboardingStepGroup,\n} from './onboarding-config.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 PlanDisplayValue,\n type PlanId,\n type PlanLimits,\n PREMIUM_EXPLORE_CATEGORIES,\n PREMIUM_PLANS,\n renderPlanDisplayValue,\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 religionCommunity,\n type SelectField,\n selfAssessment,\n storyPrompts,\n values,\n} from './profile-fields/index.js';\n// ─── API Response types (entities, results, params) ─────────────────────────\nexport * from './responses/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,23 +1,42 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Common API response types shared across all dating endpoints.
|
|
3
3
|
*/
|
|
4
|
-
/** Standard API response envelope. */
|
|
4
|
+
/** Standard API response envelope from reform-backend. */
|
|
5
5
|
export interface ApiResponse<T = unknown> {
|
|
6
6
|
success: boolean;
|
|
7
7
|
data: T;
|
|
8
8
|
message?: string;
|
|
9
9
|
}
|
|
10
|
-
/** Photo
|
|
10
|
+
/** Photo on a dating profile. */
|
|
11
11
|
export interface DatingPhoto {
|
|
12
12
|
url: string;
|
|
13
|
-
assetId?: string;
|
|
14
13
|
order: number;
|
|
14
|
+
assetId?: string;
|
|
15
|
+
mimeType?: string;
|
|
16
|
+
sizeBytes?: number;
|
|
17
|
+
}
|
|
18
|
+
/** Voice recording prompt. */
|
|
19
|
+
export interface VoicePrompt {
|
|
20
|
+
url: string;
|
|
21
|
+
assetId: string;
|
|
22
|
+
durationSeconds: number;
|
|
23
|
+
}
|
|
24
|
+
/** Text prompt with user's answer. */
|
|
25
|
+
export interface TextPrompt {
|
|
26
|
+
prompt: string;
|
|
27
|
+
answer: string;
|
|
28
|
+
}
|
|
29
|
+
/** Reference to an AreaEntity (state, district, etc.). */
|
|
30
|
+
export interface AreaRef {
|
|
31
|
+
_id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
type?: string;
|
|
15
34
|
}
|
|
16
35
|
/** Minimal profile info for lists, matches, and interactions. */
|
|
17
36
|
export interface ProfileSummary {
|
|
18
37
|
userId: string;
|
|
19
38
|
displayName: string;
|
|
20
|
-
photos: DatingPhoto[];
|
|
39
|
+
photos: Pick<DatingPhoto, 'url' | 'order'>[];
|
|
21
40
|
lastActiveAt?: string;
|
|
22
41
|
}
|
|
23
42
|
/** Standard pagination request params. */
|
|
@@ -25,12 +44,4 @@ export interface PaginationParams {
|
|
|
25
44
|
page?: number;
|
|
26
45
|
limit?: number;
|
|
27
46
|
}
|
|
28
|
-
/** Standard paginated response shape. */
|
|
29
|
-
export interface PaginatedResult<T> {
|
|
30
|
-
total: number;
|
|
31
|
-
page: number;
|
|
32
|
-
limit: number;
|
|
33
|
-
totalPages?: number;
|
|
34
|
-
items: T[];
|
|
35
|
-
}
|
|
36
47
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/responses/common.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/responses/common.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,0DAA0D;AAC1D,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,iCAAiC;AACjC,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,8BAA8B;AAC9B,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,sCAAsC;AACtC,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,0DAA0D;AAC1D,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,iEAAiE;AACjE,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,OAAO,CAAC,EAAE,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,0CAA0C;AAC1C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/responses/common.ts"],"names":[],"mappings":"AAAA;;GAEG","sourcesContent":["/**\n * Common API response types shared across all dating endpoints.\n */\n\n/** Standard API response envelope. */\nexport interface ApiResponse<T = unknown> {\n success: boolean;\n data: T;\n message?: string;\n}\n\n/** Photo
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/responses/common.ts"],"names":[],"mappings":"AAAA;;GAEG","sourcesContent":["/**\n * Common API response types shared across all dating endpoints.\n */\n\n/** Standard API response envelope from reform-backend. */\nexport interface ApiResponse<T = unknown> {\n success: boolean;\n data: T;\n message?: string;\n}\n\n/** Photo on a dating profile. */\nexport interface DatingPhoto {\n url: string;\n order: number;\n assetId?: string;\n mimeType?: string;\n sizeBytes?: number;\n}\n\n/** Voice recording prompt. */\nexport interface VoicePrompt {\n url: string;\n assetId: string;\n durationSeconds: number;\n}\n\n/** Text prompt with user's answer. */\nexport interface TextPrompt {\n prompt: string;\n answer: string;\n}\n\n/** Reference to an AreaEntity (state, district, etc.). */\nexport interface AreaRef {\n _id: string;\n name: string;\n type?: string;\n}\n\n/** Minimal profile info for lists, matches, and interactions. */\nexport interface ProfileSummary {\n userId: string;\n displayName: string;\n photos: Pick<DatingPhoto, 'url' | 'order'>[];\n lastActiveAt?: string;\n}\n\n/** Standard pagination request params. */\nexport interface PaginationParams {\n page?: number;\n limit?: number;\n}\n"]}
|
|
@@ -1,8 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Discover feed and explore category
|
|
2
|
+
* Discover feed, compatibility scoring, and explore category types.
|
|
3
|
+
*
|
|
4
|
+
* Compatibility uses 3 dimensions (each 0-50, total normalized to 0-100):
|
|
5
|
+
* - socialFit: demographics, location, religion, education, income (directional)
|
|
6
|
+
* - personality: OCEAN, attachment, humor, communication, hobbies, values (symmetric)
|
|
7
|
+
* - intimacy: relationship pace, love language, emotional intelligence (symmetric)
|
|
3
8
|
*/
|
|
4
|
-
import type { DatingProfile } from './profile.js';
|
|
5
9
|
import type { PaginationParams } from './common.js';
|
|
10
|
+
import type { DatingProfile } from './profile.js';
|
|
11
|
+
/** Per-dimension compatibility scores. Each dimension is 0-50. */
|
|
12
|
+
export interface CompatibilityDimensions {
|
|
13
|
+
socialFit: number;
|
|
14
|
+
personality: number;
|
|
15
|
+
intimacy: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Full compatibility result between two users.
|
|
19
|
+
*
|
|
20
|
+
* `total` is normalized 0-100: (socialFit + personality + intimacy) * 100 / 150.
|
|
21
|
+
* `bucket1`/`bucket2` are backward-compat aliases for older consumers.
|
|
22
|
+
* `bucket1_AtoB`/`bucket1_BtoA` are directional social-fit scores.
|
|
23
|
+
*/
|
|
24
|
+
export interface CompatibilityResult {
|
|
25
|
+
total: number;
|
|
26
|
+
dimensions: CompatibilityDimensions;
|
|
27
|
+
/** Backward compat: = dimensions.socialFit */
|
|
28
|
+
bucket1: number;
|
|
29
|
+
/** Backward compat: = (personality + intimacy) / 2 rescaled to 0-50 */
|
|
30
|
+
bucket2: number;
|
|
31
|
+
/** Social fit from A's perspective on B (0-50) */
|
|
32
|
+
bucket1_AtoB: number;
|
|
33
|
+
/** Social fit from B's perspective on A (0-50) */
|
|
34
|
+
bucket1_BtoA: number;
|
|
35
|
+
}
|
|
6
36
|
/** Discover feed query parameters. */
|
|
7
37
|
export interface DiscoverParams extends PaginationParams {
|
|
8
38
|
maxDistance?: number;
|
|
@@ -20,21 +50,13 @@ export interface DiscoverParams extends PaginationParams {
|
|
|
20
50
|
verifiedOnly?: boolean;
|
|
21
51
|
exploreCategory?: string;
|
|
22
52
|
}
|
|
23
|
-
/**
|
|
24
|
-
export interface CompatibilityBreakdown {
|
|
25
|
-
total: number;
|
|
26
|
-
intentAlignment: number;
|
|
27
|
-
lifestyleMatch: number;
|
|
28
|
-
interestOverlap: number;
|
|
29
|
-
personalityProximity: number;
|
|
30
|
-
valuesAlignment: number;
|
|
31
|
-
communicationCompat: number;
|
|
32
|
-
dealbreakerScore: number;
|
|
33
|
-
}
|
|
34
|
-
/** A profile in the discover feed (with compatibility data). */
|
|
53
|
+
/** A profile in the discover feed with compatibility data and badges. */
|
|
35
54
|
export interface DiscoverProfile extends Partial<DatingProfile> {
|
|
36
55
|
compatibilityScore?: number;
|
|
37
|
-
compatibilityBreakdown?:
|
|
56
|
+
compatibilityBreakdown?: CompatibilityResult;
|
|
57
|
+
/** True when the other user rates you highly (bucket1_BtoA > 40). */
|
|
58
|
+
reverseMatchStrong?: boolean;
|
|
59
|
+
badges?: import('../badges.js').BadgeKey[];
|
|
38
60
|
}
|
|
39
61
|
/** Paginated discover feed result. */
|
|
40
62
|
export interface DiscoverResult {
|
|
@@ -42,6 +64,8 @@ export interface DiscoverResult {
|
|
|
42
64
|
page: number;
|
|
43
65
|
totalPages: number;
|
|
44
66
|
total: number;
|
|
67
|
+
/** True when all profiles in the area have been swiped through. */
|
|
68
|
+
exhausted: boolean;
|
|
45
69
|
}
|
|
46
70
|
/** Single explore category count. */
|
|
47
71
|
export interface ExploreCategoryCount {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/responses/discover.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/responses/discover.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IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,OAAO,cAAc,EAAE,iBAAiB,EAAE,CAAC;IACrD,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Discover feed and explore category
|
|
2
|
+
* Discover feed, compatibility scoring, and explore category types.
|
|
3
|
+
*
|
|
4
|
+
* Compatibility uses 3 dimensions (each 0-50, total normalized to 0-100):
|
|
5
|
+
* - socialFit: demographics, location, religion, education, income (directional)
|
|
6
|
+
* - personality: OCEAN, attachment, humor, communication, hobbies, values (symmetric)
|
|
7
|
+
* - intimacy: relationship pace, love language, emotional intelligence (symmetric)
|
|
3
8
|
*/
|
|
4
9
|
export {};
|
|
5
10
|
//# sourceMappingURL=discover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/responses/discover.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/responses/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG","sourcesContent":["/**\n * Discover feed, compatibility scoring, and explore category types.\n *\n * Compatibility uses 3 dimensions (each 0-50, total normalized to 0-100):\n * - socialFit: demographics, location, religion, education, income (directional)\n * - personality: OCEAN, attachment, humor, communication, hobbies, values (symmetric)\n * - intimacy: relationship pace, love language, emotional intelligence (symmetric)\n */\n\nimport type { PaginationParams } from './common.js';\nimport type { DatingProfile } from './profile.js';\n\n// ── Compatibility Scoring ────────────────────────────────────────────────────\n\n/** Per-dimension compatibility scores. Each dimension is 0-50. */\nexport interface CompatibilityDimensions {\n socialFit: number;\n personality: number;\n intimacy: number;\n}\n\n/**\n * Full compatibility result between two users.\n *\n * `total` is normalized 0-100: (socialFit + personality + intimacy) * 100 / 150.\n * `bucket1`/`bucket2` are backward-compat aliases for older consumers.\n * `bucket1_AtoB`/`bucket1_BtoA` are directional social-fit scores.\n */\nexport interface CompatibilityResult {\n total: number;\n dimensions: CompatibilityDimensions;\n /** Backward compat: = dimensions.socialFit */\n bucket1: number;\n /** Backward compat: = (personality + intimacy) / 2 rescaled to 0-50 */\n bucket2: number;\n /** Social fit from A's perspective on B (0-50) */\n bucket1_AtoB: number;\n /** Social fit from B's perspective on A (0-50) */\n bucket1_BtoA: number;\n}\n\n// ── Discover Feed ────────────────────────────────────────────────────────────\n\n/** Discover feed query parameters. */\nexport interface DiscoverParams extends PaginationParams {\n maxDistance?: number;\n gender?: string;\n religion?: string;\n diet?: string;\n smoking?: string;\n alcohol?: string;\n educationLevel?: string;\n relationshipIntent?: string;\n sexualOrientation?: string;\n hobbies?: string;\n chronotype?: string;\n fitnessLevel?: string;\n verifiedOnly?: boolean;\n exploreCategory?: string;\n}\n\n/** A profile in the discover feed with compatibility data and badges. */\nexport interface DiscoverProfile extends Partial<DatingProfile> {\n compatibilityScore?: number;\n compatibilityBreakdown?: CompatibilityResult;\n /** True when the other user rates you highly (bucket1_BtoA > 40). */\n reverseMatchStrong?: boolean;\n badges?: import('../badges.js').BadgeKey[];\n}\n\n/** Paginated discover feed result. */\nexport interface DiscoverResult {\n profiles: DiscoverProfile[];\n page: number;\n totalPages: number;\n total: number;\n /** True when all profiles in the area have been swiped through. */\n exhausted: boolean;\n}\n\n// ── Explore Categories ───────────────────────────────────────────────────────\n\n/** Single explore category count. */\nexport interface ExploreCategoryCount {\n slug: string;\n count: number;\n}\n\n/** All explore category counts (grid + section breakdowns). */\nexport interface ExploreCountsResult {\n defaultDistanceKm: number;\n gridCounts: ExploreCategoryCount[];\n sectionCounts: {\n profession: ExploreCategoryCount[];\n language: ExploreCategoryCount[];\n religion: ExploreCategoryCount[];\n zodiac: ExploreCategoryCount[];\n diet: ExploreCategoryCount[];\n education: ExploreCategoryCount[];\n };\n}\n\n/** Query params for explore counts. */\nexport interface ExploreCountsParams {\n maxDistance?: number;\n}\n\n/** Query params for a single category count. */\nexport interface CategoryCountParams {\n category: string;\n maxDistance: number;\n}\n\n/** Single category count result. */\nexport interface CategoryCountResult {\n count: number;\n}\n\n// ── Moderation ───────────────────────────────────────────────────────────────\n\n/** Moderation list filter params. */\nexport interface ModerationListParams {\n page?: number;\n limit?: number;\n search?: string;\n isVerified?: string;\n isEliteInstitute?: string;\n isHighIq?: string;\n blackCircleStatus?: string;\n}\n\n/** Paginated moderation profile list. */\nexport interface ModerationListResult {\n profiles: import('./profile.js').ModerationProfile[];\n pagination: {\n page: number;\n limit: number;\n total: number;\n totalPages: number;\n };\n}\n"]}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* Response/entity types are here, organized by feature.
|
|
7
7
|
*/
|
|
8
8
|
export * from './common.js';
|
|
9
|
-
export * from './profile.js';
|
|
10
9
|
export * from './discover.js';
|
|
11
10
|
export * from './interactions.js';
|
|
12
11
|
export * from './matches.js';
|
|
13
|
-
export * from './safety.js';
|
|
14
12
|
export * from './monetization.js';
|
|
13
|
+
export * from './profile.js';
|
|
14
|
+
export * from './safety.js';
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
package/dist/responses/index.js
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* Response/entity types are here, organized by feature.
|
|
7
7
|
*/
|
|
8
8
|
export * from './common.js';
|
|
9
|
-
export * from './profile.js';
|
|
10
9
|
export * from './discover.js';
|
|
11
10
|
export * from './interactions.js';
|
|
12
11
|
export * from './matches.js';
|
|
13
|
-
export * from './safety.js';
|
|
14
12
|
export * from './monetization.js';
|
|
13
|
+
export * from './profile.js';
|
|
14
|
+
export * from './safety.js';
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC","sourcesContent":["/**\n * Dating API response types -- single source of truth.\n *\n * Consumed by both jansathi-frontend and reform-backend.\n * Request types (Zod schemas) are in the parent src/ directory.\n * Response/entity types are here, organized by feature.\n */\n\nexport * from './common.js';\nexport * from './discover.js';\nexport * from './interactions.js';\nexport * from './matches.js';\nexport * from './monetization.js';\nexport * from './profile.js';\nexport * from './safety.js';\n"]}
|
|
@@ -1,34 +1,65 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Boost, subscription, and pricing plan response types.
|
|
3
|
+
*
|
|
4
|
+
* These match the EXACT shapes returned by the reform-backend controllers.
|
|
3
5
|
* Request types (CreateSubscriptionBody) are in ../subscription.ts.
|
|
4
6
|
*/
|
|
5
7
|
import type { PlanId } from '../plan-limits.js';
|
|
6
|
-
|
|
7
|
-
/** Result of activating a profile boost. */
|
|
8
|
+
/** Result of activating a profile boost (POST /boosts). */
|
|
8
9
|
export interface BoostResult {
|
|
9
10
|
alreadyActive: boolean;
|
|
10
11
|
boostedUntil: string;
|
|
11
12
|
lastBoostedAt: string;
|
|
12
13
|
}
|
|
13
|
-
/** Current boost status. */
|
|
14
|
+
/** Current boost status (GET /boosts/status). */
|
|
14
15
|
export interface BoostStatus {
|
|
15
16
|
isActive: boolean;
|
|
16
17
|
boostedUntil: string | null;
|
|
17
18
|
lastBoostedAt: string | null;
|
|
18
19
|
}
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Subscription response from GET /subscriptions/me.
|
|
22
|
+
*
|
|
23
|
+
* Two shapes depending on whether user has an active subscription:
|
|
24
|
+
* - Free user: { planId: 'lite', isFreeTier: true, status: 'active', launchOfferEligible }
|
|
25
|
+
* - Paid user: full subscription fields from DB + launchOfferEligible
|
|
26
|
+
*/
|
|
27
|
+
export interface SubscriptionResponse {
|
|
23
28
|
planId: PlanId;
|
|
24
|
-
tenure?: Tenure;
|
|
25
29
|
status: 'active' | 'grace' | 'expired' | 'cancelled';
|
|
30
|
+
isFreeTier?: boolean;
|
|
31
|
+
launchOfferEligible: boolean;
|
|
32
|
+
tenure?: string;
|
|
26
33
|
startDate?: string;
|
|
27
34
|
endDate?: string;
|
|
28
35
|
autoRenew?: boolean;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
paymentReference?: string;
|
|
37
|
+
isLaunchOffer?: boolean;
|
|
38
|
+
razorpaySubscriptionId?: string;
|
|
39
|
+
}
|
|
40
|
+
/** @deprecated Use SubscriptionResponse instead */
|
|
41
|
+
export type Subscription = SubscriptionResponse;
|
|
42
|
+
/** Usage counter: current usage vs plan limit. */
|
|
43
|
+
export interface UsageCounter {
|
|
44
|
+
used: number;
|
|
45
|
+
limit: number;
|
|
46
|
+
}
|
|
47
|
+
/** Daily + monthly usage stats (GET /subscriptions/me/usage). */
|
|
48
|
+
export interface UsageStatsResponse {
|
|
49
|
+
plan: PlanId;
|
|
50
|
+
daily: {
|
|
51
|
+
swipes: UsageCounter;
|
|
52
|
+
compliments: UsageCounter;
|
|
53
|
+
rewinds: UsageCounter;
|
|
54
|
+
profileVisits: UsageCounter;
|
|
55
|
+
voiceCalls: UsageCounter;
|
|
56
|
+
videoCalls: UsageCounter;
|
|
57
|
+
};
|
|
58
|
+
monthly: {
|
|
59
|
+
newChatThreads: UsageCounter;
|
|
60
|
+
boosts: UsageCounter;
|
|
61
|
+
intentChanges: UsageCounter;
|
|
62
|
+
};
|
|
32
63
|
}
|
|
33
64
|
/** A pricing plan's tenure/duration variation with pricing. */
|
|
34
65
|
export interface TenureVariation {
|
|
@@ -39,8 +70,9 @@ export interface TenureVariation {
|
|
|
39
70
|
finalPrice: number;
|
|
40
71
|
effectiveLabel: string;
|
|
41
72
|
enabled: boolean;
|
|
73
|
+
razorpayPlanId?: string;
|
|
42
74
|
}
|
|
43
|
-
/** Launch offer details
|
|
75
|
+
/** Launch offer details attached to a pricing plan. */
|
|
44
76
|
export interface LaunchOfferResponse {
|
|
45
77
|
enabled: boolean;
|
|
46
78
|
price: number;
|
|
@@ -52,7 +84,7 @@ export interface LaunchOfferResponse {
|
|
|
52
84
|
redemptionCount: number;
|
|
53
85
|
oncePerUser: boolean;
|
|
54
86
|
}
|
|
55
|
-
/** Full pricing plan
|
|
87
|
+
/** Full pricing plan returned by GET /subscriptions/plans. */
|
|
56
88
|
export interface PricingPlanResponse {
|
|
57
89
|
planId: PlanId;
|
|
58
90
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monetization.d.ts","sourceRoot":"","sources":["../../src/responses/monetization.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"monetization.d.ts","sourceRoot":"","sources":["../../src/responses/monetization.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIhD,2DAA2D;AAC3D,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,iDAAiD;AACjD,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAID;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,mDAAmD;AACnD,MAAM,MAAM,YAAY,GAAG,oBAAoB,CAAC;AAIhD,kDAAkD;AAClD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAA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AChB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,mBAAmB,CAAC;CACnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monetization.js","sourceRoot":"","sources":["../../src/responses/monetization.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"monetization.js","sourceRoot":"","sources":["../../src/responses/monetization.ts"],"names":[],"mappings":"AAAA;;;;;GAKG","sourcesContent":["/**\n * Boost, subscription, and pricing plan response types.\n *\n * These match the EXACT shapes returned by the reform-backend controllers.\n * Request types (CreateSubscriptionBody) are in ../subscription.ts.\n */\n\nimport type { PlanId } from '../plan-limits.js';\n\n// ── Boost ────────────────────────────────────────────────────────────────────\n\n/** Result of activating a profile boost (POST /boosts). */\nexport interface BoostResult {\n alreadyActive: boolean;\n boostedUntil: string;\n lastBoostedAt: string;\n}\n\n/** Current boost status (GET /boosts/status). */\nexport interface BoostStatus {\n isActive: boolean;\n boostedUntil: string | null;\n lastBoostedAt: string | null;\n}\n\n// ── Subscription ─────────────────────────────────────────────────────────────\n\n/**\n * Subscription response from GET /subscriptions/me.\n *\n * Two shapes depending on whether user has an active subscription:\n * - Free user: { planId: 'lite', isFreeTier: true, status: 'active', launchOfferEligible }\n * - Paid user: full subscription fields from DB + launchOfferEligible\n */\nexport interface SubscriptionResponse {\n planId: PlanId;\n status: 'active' | 'grace' | 'expired' | 'cancelled';\n isFreeTier?: boolean;\n launchOfferEligible: boolean;\n tenure?: string;\n startDate?: string;\n endDate?: string;\n autoRenew?: boolean;\n paymentReference?: string;\n isLaunchOffer?: boolean;\n razorpaySubscriptionId?: string;\n}\n\n/** @deprecated Use SubscriptionResponse instead */\nexport type Subscription = SubscriptionResponse;\n\n// ── Usage Stats ──────────────────────────────────────────────────────────────\n\n/** Usage counter: current usage vs plan limit. */\nexport interface UsageCounter {\n used: number;\n limit: number;\n}\n\n/** Daily + monthly usage stats (GET /subscriptions/me/usage). */\nexport interface UsageStatsResponse {\n plan: PlanId;\n daily: {\n swipes: UsageCounter;\n compliments: UsageCounter;\n rewinds: UsageCounter;\n profileVisits: UsageCounter;\n voiceCalls: UsageCounter;\n videoCalls: UsageCounter;\n };\n monthly: {\n newChatThreads: UsageCounter;\n boosts: UsageCounter;\n intentChanges: UsageCounter;\n };\n}\n\n// ── Pricing Plans ────────────────────────────────────────────────────────────\n\n/** A pricing plan's tenure/duration variation with pricing. */\nexport interface TenureVariation {\n tenureId: string;\n label: string;\n basePrice: number;\n discountPct: number;\n finalPrice: number;\n effectiveLabel: string;\n enabled: boolean;\n razorpayPlanId?: string;\n}\n\n/** Launch offer details attached to a pricing plan. */\nexport interface LaunchOfferResponse {\n enabled: boolean;\n price: number;\n tenure: string;\n label: string;\n badge: string;\n validUntil?: string;\n maxRedemptions?: number;\n redemptionCount: number;\n oncePerUser: boolean;\n}\n\n/** Full pricing plan returned by GET /subscriptions/plans. */\nexport interface PricingPlanResponse {\n planId: PlanId;\n name: string;\n tagline: string;\n accentColor: string;\n bgColor: string;\n isPopular: boolean;\n sortOrder: number;\n baseMonthlyPrice: number;\n tenures: TenureVariation[];\n features: string[];\n cardFeatures: string[];\n isActive: boolean;\n launchOffer?: LaunchOfferResponse;\n}\n"]}
|
|
@@ -1,32 +1,58 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Dating profile entity and related response types.
|
|
3
|
+
*
|
|
4
|
+
* The DatingProfile interface covers the DISCOVER_PROJECTION fields (returned
|
|
5
|
+
* in the discover feed) plus commonly accessed fields in the full profile view.
|
|
6
|
+
* The index signature allows additional fields from the 190+ field model
|
|
7
|
+
* without requiring every field to be explicitly typed.
|
|
8
|
+
*
|
|
9
|
+
* Field visibility tiers (enforced by backend getProfileById):
|
|
10
|
+
* - TIER_1 (public): visible to anyone (discover feed fields)
|
|
11
|
+
* - TIER_2 (on_match): visible after matching (intimacy, family, detailed preferences)
|
|
12
|
+
* - TIER_3 (trust_gate): visible after 7+ days matched (finance, health, legal)
|
|
3
13
|
*/
|
|
4
14
|
import type { BadgeKey } from '../badges.js';
|
|
5
15
|
import type { PlanId } from '../plan-limits.js';
|
|
6
|
-
import type { DatingPhoto } from './common.js';
|
|
7
|
-
/**
|
|
16
|
+
import type { AreaRef, DatingPhoto, TextPrompt, VoicePrompt } from './common.js';
|
|
17
|
+
/** Structured current location with area entity references. */
|
|
18
|
+
export interface CurrentLocation {
|
|
19
|
+
displayName?: string;
|
|
20
|
+
country?: AreaRef;
|
|
21
|
+
state?: AreaRef;
|
|
22
|
+
district?: AreaRef;
|
|
23
|
+
areaType?: 'RURAL' | 'URBAN';
|
|
24
|
+
block?: AreaRef;
|
|
25
|
+
gramPanchayat?: AreaRef;
|
|
26
|
+
village?: AreaRef;
|
|
27
|
+
hamlet?: AreaRef;
|
|
28
|
+
urbanBodyType?: string;
|
|
29
|
+
urbanBody?: AreaRef;
|
|
30
|
+
urbanWard?: AreaRef;
|
|
31
|
+
locality?: AreaRef;
|
|
32
|
+
latitude?: number;
|
|
33
|
+
longitude?: number;
|
|
34
|
+
}
|
|
35
|
+
/** Family member in the family structure. */
|
|
36
|
+
export interface FamilyMember {
|
|
37
|
+
relation: string;
|
|
38
|
+
alive: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Full dating profile entity.
|
|
42
|
+
*
|
|
43
|
+
* Includes all DISCOVER_PROJECTION fields (returned in discover feed)
|
|
44
|
+
* and commonly accessed fields in the full profile view.
|
|
45
|
+
* Additional fields from the 190+ model are accessible via index signature.
|
|
46
|
+
*/
|
|
8
47
|
export interface DatingProfile {
|
|
9
48
|
_id: string;
|
|
10
49
|
userId: string;
|
|
11
|
-
displayName: string;
|
|
12
50
|
photos: DatingPhoto[];
|
|
51
|
+
displayName: string;
|
|
13
52
|
dateOfBirth: string;
|
|
14
53
|
gender: string;
|
|
15
54
|
pronouns?: string;
|
|
16
|
-
currentLocation?:
|
|
17
|
-
displayName?: string;
|
|
18
|
-
state?: {
|
|
19
|
-
_id: string;
|
|
20
|
-
name: string;
|
|
21
|
-
};
|
|
22
|
-
district?: {
|
|
23
|
-
_id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
};
|
|
26
|
-
latitude?: number;
|
|
27
|
-
longitude?: number;
|
|
28
|
-
};
|
|
29
|
-
hometown?: string;
|
|
55
|
+
currentLocation?: CurrentLocation;
|
|
30
56
|
relationshipIntent?: string;
|
|
31
57
|
sexualOrientation?: string;
|
|
32
58
|
relationshipStructure?: string;
|
|
@@ -35,17 +61,132 @@ export interface DatingProfile {
|
|
|
35
61
|
selfKeywords?: string[];
|
|
36
62
|
height?: number;
|
|
37
63
|
educationLevel?: string;
|
|
64
|
+
institutionTier?: string;
|
|
38
65
|
profession?: string;
|
|
39
66
|
diet?: string;
|
|
40
67
|
smoking?: string;
|
|
41
68
|
alcohol?: string;
|
|
42
69
|
hobbies?: string[];
|
|
70
|
+
personalReligion?: string;
|
|
71
|
+
motherTongue?: string;
|
|
72
|
+
hometownState?: string;
|
|
43
73
|
planId: PlanId;
|
|
44
|
-
isOnboarded: boolean;
|
|
45
|
-
isActive: boolean;
|
|
46
|
-
lastActiveAt?: string;
|
|
47
74
|
boostedUntil?: string;
|
|
75
|
+
lastActiveAt?: string;
|
|
76
|
+
blackCircleStatus?: string;
|
|
77
|
+
isVerified?: boolean;
|
|
78
|
+
isEliteInstitute?: boolean;
|
|
79
|
+
isHighIq?: boolean;
|
|
48
80
|
badges?: BadgeKey[];
|
|
81
|
+
myStory?: string;
|
|
82
|
+
prompts?: TextPrompt[];
|
|
83
|
+
voicePrompt?: VoicePrompt;
|
|
84
|
+
bornTo?: string;
|
|
85
|
+
senseOfSelf?: string;
|
|
86
|
+
othersKeywords?: string[];
|
|
87
|
+
familyReligion?: string;
|
|
88
|
+
religionPracticeLevel?: string;
|
|
89
|
+
religionPartnerPreference?: string;
|
|
90
|
+
caste?: string;
|
|
91
|
+
subCaste?: string;
|
|
92
|
+
culturalImportance?: string;
|
|
93
|
+
manglikStatus?: string;
|
|
94
|
+
gotra?: string;
|
|
95
|
+
languagesSpoken?: string[];
|
|
96
|
+
relationshipStatus?: string;
|
|
97
|
+
bodyBuild?: string;
|
|
98
|
+
complexion?: string;
|
|
99
|
+
weight?: number;
|
|
100
|
+
childrenPlans?: string;
|
|
101
|
+
numberOfChildren?: number;
|
|
102
|
+
previousMarriages?: number;
|
|
103
|
+
cannabis?: string;
|
|
104
|
+
whatImLookingFor?: string;
|
|
105
|
+
relationshipRole?: string[];
|
|
106
|
+
preferredGenders?: string[];
|
|
107
|
+
preferredAgeRange?: {
|
|
108
|
+
min: number;
|
|
109
|
+
max: number;
|
|
110
|
+
};
|
|
111
|
+
dealbreakers?: string[];
|
|
112
|
+
oceanOpenness?: number;
|
|
113
|
+
oceanConscientiousness?: number;
|
|
114
|
+
oceanExtraversion?: number;
|
|
115
|
+
oceanAgreeableness?: number;
|
|
116
|
+
oceanNeuroticism?: number;
|
|
117
|
+
attachmentStyle?: string;
|
|
118
|
+
loveLanguage?: string;
|
|
119
|
+
conflictStyle?: string;
|
|
120
|
+
communicationStyle?: string[];
|
|
121
|
+
humourStyle?: string[];
|
|
122
|
+
emotionalIntelligence?: number;
|
|
123
|
+
socialBattery?: string;
|
|
124
|
+
relationshipPace?: string;
|
|
125
|
+
ratePatience?: number;
|
|
126
|
+
rateRespect?: number;
|
|
127
|
+
rateHonestyWithSelf?: number;
|
|
128
|
+
rateHonestyWithOthers?: number;
|
|
129
|
+
rateTemper?: number;
|
|
130
|
+
rateSelfEsteem?: number;
|
|
131
|
+
rateHumour?: number;
|
|
132
|
+
rateBoredom?: number;
|
|
133
|
+
rateBeauty?: number;
|
|
134
|
+
rateBuild?: number;
|
|
135
|
+
ratePersonality?: number;
|
|
136
|
+
rateAbuseFrequency?: number;
|
|
137
|
+
musicGenres?: string[];
|
|
138
|
+
eventPreference?: string[];
|
|
139
|
+
knowledgeAreas?: string[];
|
|
140
|
+
vacationStyle?: string[];
|
|
141
|
+
gamingInterest?: string;
|
|
142
|
+
readingHabit?: string;
|
|
143
|
+
riskAppetite?: string;
|
|
144
|
+
favouriteBooks?: string[];
|
|
145
|
+
favouriteShows?: string[];
|
|
146
|
+
favouriteDocumentaries?: string[];
|
|
147
|
+
favouriteMusicArtists?: string[];
|
|
148
|
+
favouriteYoutubeChannels?: string[];
|
|
149
|
+
idols?: string[];
|
|
150
|
+
favouriteQuotes?: string[];
|
|
151
|
+
lifeGoals?: string[];
|
|
152
|
+
politicalOrientation?: string;
|
|
153
|
+
environmentalValues?: string;
|
|
154
|
+
spiritualPractice?: string;
|
|
155
|
+
outlookOnLife?: string;
|
|
156
|
+
careerStage?: string;
|
|
157
|
+
incomeRange?: string;
|
|
158
|
+
cognitiveBand?: string;
|
|
159
|
+
chronotype?: string;
|
|
160
|
+
fitnessLevel?: string;
|
|
161
|
+
sleepSchedule?: string;
|
|
162
|
+
cookingLevel?: string;
|
|
163
|
+
tidiness?: string;
|
|
164
|
+
petPreference?: string;
|
|
165
|
+
travelFrequency?: string;
|
|
166
|
+
urbanRural?: string;
|
|
167
|
+
sunSign?: string;
|
|
168
|
+
familyType?: string;
|
|
169
|
+
familyValues?: string;
|
|
170
|
+
familyMembers?: FamilyMember[];
|
|
171
|
+
familyAffluence?: string;
|
|
172
|
+
numberOfSiblings?: number;
|
|
173
|
+
phoneNumber?: string;
|
|
174
|
+
phoneVisible?: boolean;
|
|
175
|
+
guardianContact?: {
|
|
176
|
+
name?: string;
|
|
177
|
+
phoneNumber?: string;
|
|
178
|
+
relation?: string;
|
|
179
|
+
visible?: boolean;
|
|
180
|
+
};
|
|
181
|
+
incognitoEnabled?: boolean;
|
|
182
|
+
travelModeEnabled?: boolean;
|
|
183
|
+
discoverDimensions?: {
|
|
184
|
+
socialFit?: boolean;
|
|
185
|
+
personality?: boolean;
|
|
186
|
+
intimacy?: boolean;
|
|
187
|
+
};
|
|
188
|
+
isOnboarded: boolean;
|
|
189
|
+
isActive: boolean;
|
|
49
190
|
[key: string]: unknown;
|
|
50
191
|
}
|
|
51
192
|
/** Profile view for admin moderation panel. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/responses/profile.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/responses/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEjF,+DAA+D;AAC/D,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MA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AAO,CAAC;IACvB,eAAe,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAChG,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAGxF,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAGlB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,+CAA+C;AAC/C,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Dating profile entity and related response types.
|
|
3
|
+
*
|
|
4
|
+
* The DatingProfile interface covers the DISCOVER_PROJECTION fields (returned
|
|
5
|
+
* in the discover feed) plus commonly accessed fields in the full profile view.
|
|
6
|
+
* The index signature allows additional fields from the 190+ field model
|
|
7
|
+
* without requiring every field to be explicitly typed.
|
|
8
|
+
*
|
|
9
|
+
* Field visibility tiers (enforced by backend getProfileById):
|
|
10
|
+
* - TIER_1 (public): visible to anyone (discover feed fields)
|
|
11
|
+
* - TIER_2 (on_match): visible after matching (intimacy, family, detailed preferences)
|
|
12
|
+
* - TIER_3 (trust_gate): visible after 7+ days matched (finance, health, legal)
|
|
3
13
|
*/
|
|
4
14
|
export {};
|
|
5
15
|
//# sourceMappingURL=profile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/responses/profile.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/responses/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG","sourcesContent":["/**\n * Dating profile entity and related response types.\n *\n * The DatingProfile interface covers the DISCOVER_PROJECTION fields (returned\n * in the discover feed) plus commonly accessed fields in the full profile view.\n * The index signature allows additional fields from the 190+ field model\n * without requiring every field to be explicitly typed.\n *\n * Field visibility tiers (enforced by backend getProfileById):\n * - TIER_1 (public): visible to anyone (discover feed fields)\n * - TIER_2 (on_match): visible after matching (intimacy, family, detailed preferences)\n * - TIER_3 (trust_gate): visible after 7+ days matched (finance, health, legal)\n */\n\nimport type { BadgeKey } from '../badges.js';\nimport type { PlanId } from '../plan-limits.js';\nimport type { AreaRef, DatingPhoto, TextPrompt, VoicePrompt } from './common.js';\n\n/** Structured current location with area entity references. */\nexport interface CurrentLocation {\n displayName?: string;\n country?: AreaRef;\n state?: AreaRef;\n district?: AreaRef;\n areaType?: 'RURAL' | 'URBAN';\n block?: AreaRef;\n gramPanchayat?: AreaRef;\n village?: AreaRef;\n hamlet?: AreaRef;\n urbanBodyType?: string;\n urbanBody?: AreaRef;\n urbanWard?: AreaRef;\n locality?: AreaRef;\n latitude?: number;\n longitude?: number;\n}\n\n/** Family member in the family structure. */\nexport interface FamilyMember {\n relation: string;\n alive: boolean;\n}\n\n/**\n * Full dating profile entity.\n *\n * Includes all DISCOVER_PROJECTION fields (returned in discover feed)\n * and commonly accessed fields in the full profile view.\n * Additional fields from the 190+ model are accessible via index signature.\n */\nexport interface DatingProfile {\n _id: string;\n userId: string;\n\n // ── TIER 1: Public (discover feed) ─────────────────────\n photos: DatingPhoto[];\n displayName: string;\n dateOfBirth: string;\n gender: string;\n pronouns?: string;\n currentLocation?: CurrentLocation;\n relationshipIntent?: string;\n sexualOrientation?: string;\n relationshipStructure?: string;\n mbtiType?: string;\n bio?: string;\n selfKeywords?: string[];\n height?: number;\n educationLevel?: string;\n institutionTier?: string;\n profession?: string;\n diet?: string;\n smoking?: string;\n alcohol?: string;\n hobbies?: string[];\n personalReligion?: string;\n motherTongue?: string;\n hometownState?: string;\n planId: PlanId;\n boostedUntil?: string;\n lastActiveAt?: string;\n blackCircleStatus?: string;\n isVerified?: boolean;\n isEliteInstitute?: boolean;\n isHighIq?: boolean;\n badges?: BadgeKey[];\n\n // ── Story & prompts ────────────────────────────────────\n myStory?: string;\n prompts?: TextPrompt[];\n voicePrompt?: VoicePrompt;\n bornTo?: string;\n senseOfSelf?: string;\n othersKeywords?: string[];\n\n // ── Basics (demographics) ──────────────────────────────\n familyReligion?: string;\n religionPracticeLevel?: string;\n religionPartnerPreference?: string;\n caste?: string;\n subCaste?: string;\n culturalImportance?: string;\n manglikStatus?: string;\n gotra?: string;\n languagesSpoken?: string[];\n relationshipStatus?: string;\n bodyBuild?: string;\n complexion?: string;\n weight?: number;\n childrenPlans?: string;\n numberOfChildren?: number;\n previousMarriages?: number;\n cannabis?: string;\n\n // ── Looking for ────────────────────────────────────────\n whatImLookingFor?: string;\n relationshipRole?: string[];\n preferredGenders?: string[];\n preferredAgeRange?: { min: number; max: number };\n dealbreakers?: string[];\n\n // ── Personality ────────────────────────────────────────\n oceanOpenness?: number;\n oceanConscientiousness?: number;\n oceanExtraversion?: number;\n oceanAgreeableness?: number;\n oceanNeuroticism?: number;\n attachmentStyle?: string;\n loveLanguage?: string;\n conflictStyle?: string;\n communicationStyle?: string[];\n humourStyle?: string[];\n emotionalIntelligence?: number;\n socialBattery?: string;\n relationshipPace?: string;\n\n // ── Self-assessment (1-10 sliders) ─────────────────────\n ratePatience?: number;\n rateRespect?: number;\n rateHonestyWithSelf?: number;\n rateHonestyWithOthers?: number;\n rateTemper?: number;\n rateSelfEsteem?: number;\n rateHumour?: number;\n rateBoredom?: number;\n rateBeauty?: number;\n rateBuild?: number;\n ratePersonality?: number;\n rateAbuseFrequency?: number;\n\n // ── Interests & favourites ─────────────────────────────\n musicGenres?: string[];\n eventPreference?: string[];\n knowledgeAreas?: string[];\n vacationStyle?: string[];\n gamingInterest?: string;\n readingHabit?: string;\n riskAppetite?: string;\n favouriteBooks?: string[];\n favouriteShows?: string[];\n favouriteDocumentaries?: string[];\n favouriteMusicArtists?: string[];\n favouriteYoutubeChannels?: string[];\n idols?: string[];\n favouriteQuotes?: string[];\n\n // ── Values ─────────────────────────────────────────────\n lifeGoals?: string[];\n politicalOrientation?: string;\n environmentalValues?: string;\n spiritualPractice?: string;\n outlookOnLife?: string;\n\n // ── Career ─────────────────────────────────────────────\n careerStage?: string;\n incomeRange?: string;\n cognitiveBand?: string;\n\n // ── Lifestyle ──────────────────────────────────────────\n chronotype?: string;\n fitnessLevel?: string;\n sleepSchedule?: string;\n cookingLevel?: string;\n tidiness?: string;\n petPreference?: string;\n travelFrequency?: string;\n urbanRural?: string;\n sunSign?: string;\n\n // ── Family ─────────────────────────────────────────────\n familyType?: string;\n familyValues?: string;\n familyMembers?: FamilyMember[];\n familyAffluence?: string;\n numberOfSiblings?: number;\n\n // ── Privacy & features ─────────────────────────────────\n phoneNumber?: string;\n phoneVisible?: boolean;\n guardianContact?: { name?: string; phoneNumber?: string; relation?: string; visible?: boolean };\n incognitoEnabled?: boolean;\n travelModeEnabled?: boolean;\n discoverDimensions?: { socialFit?: boolean; personality?: boolean; intimacy?: boolean };\n\n // ── Meta ────────────────────────────────────────────────\n isOnboarded: boolean;\n isActive: boolean;\n\n // ── Index signature for 190+ model fields ──────────────\n [key: string]: unknown;\n}\n\n/** Profile view for admin moderation panel. */\nexport interface ModerationProfile {\n _id: string;\n userId: string;\n displayName: string;\n photos: DatingPhoto[];\n gender: string;\n dateOfBirth: string;\n planId: string;\n blackCircleStatus: string;\n isVerified: boolean;\n isEliteInstitute: boolean;\n isHighIq: boolean;\n isActive: boolean;\n createdAt: string;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dating-schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.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",
|