dating-schema 0.45.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/onboarding-config.d.ts +14 -6
- package/dist/onboarding-config.d.ts.map +1 -1
- package/dist/onboarding-config.js +177 -203
- package/dist/onboarding-config.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":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,cAAc,EACd,KAAK,gBAAgB,EACrB,sBAAsB,GACvB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,KAAK,QAAQ,EAEb,cAAc,EACd,sBAAsB,EACtB,KAAK,MAAM,EAEX,YAAY,EACZ,KAAK,YAAY,EACjB,kBAAkB,EAClB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,UAAU,EACf,KAAK,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,KAAK,WAAW,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EACL,KAAK,SAAS,EACd,eAAe,EACf,KAAK,cAAc,EACnB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KA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B,KAAK,MAAM,EACX,YAAY,GACb,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
*
|
|
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,aAA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jB,cAAc,EACd,YAAY,EACZ,MAAM,GACP,MAAM,2BAA2B,CAAC;AACnC,+EAA+E;AAC/E,cAAc,sBAAsB,CAAC;AAErC,gFAAgF;AAChF,OAAO,EAEL,eAAe,EAIf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,gFAAgF;AAChF,OAAO,EAEL,4BAA4B,EAE5B,wBAAwB,EAExB,YAAY,GACb,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * dating-schema — Shared Zod schemas for the Dating feature\n *\n * Single source of truth consumed by both jansathi-frontend and reform-backend.\n * Guarantees identical validation logic and TypeScript types on both sides.\n *\n * @module dating-schema\n */\n\n// ─── 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"]}
|
|
@@ -2,25 +2,33 @@
|
|
|
2
2
|
* Onboarding Field Configuration
|
|
3
3
|
* ================================
|
|
4
4
|
* Single source of truth for all per-field onboarding metadata.
|
|
5
|
-
* Both frontend and backend import this
|
|
5
|
+
* Both frontend and backend import this.
|
|
6
|
+
*
|
|
7
|
+
* IMPORTANT: All string properties (title, subtitle, successMessage, visibilityLabel,
|
|
8
|
+
* step group label) are i18n KEYS, not display text. The frontend resolves them via
|
|
9
|
+
* useTranslations("datingOnboarding") → t(config.title).
|
|
10
|
+
*
|
|
11
|
+
* Translation files:
|
|
12
|
+
* - messages/en/dating-onboarding.json (English)
|
|
13
|
+
* - messages/hi/dating-onboarding.json (Hindi)
|
|
6
14
|
*
|
|
7
15
|
* @module dating-schema/onboarding-config
|
|
8
16
|
*/
|
|
9
17
|
export interface OnboardingFieldConfig {
|
|
10
|
-
/**
|
|
18
|
+
/** i18n key for the question heading (resolved via t(title)) */
|
|
11
19
|
title: string;
|
|
12
|
-
/**
|
|
20
|
+
/** i18n key for help text below the heading */
|
|
13
21
|
subtitle?: string;
|
|
14
|
-
/**
|
|
22
|
+
/** i18n key for toast message on successful save */
|
|
15
23
|
successMessage: string;
|
|
16
|
-
/** "Show on profile" toggle label (null = no toggle
|
|
24
|
+
/** i18n key for "Show on profile" toggle label (null = no toggle) */
|
|
17
25
|
visibilityLabel?: string;
|
|
18
26
|
/** Whether the field is required to proceed */
|
|
19
27
|
required: boolean;
|
|
20
28
|
}
|
|
21
29
|
/** Step grouping for the onboarding flow */
|
|
22
30
|
export interface OnboardingStepGroup {
|
|
23
|
-
/**
|
|
31
|
+
/** i18n key for section label */
|
|
24
32
|
label: string;
|
|
25
33
|
/** Icon name from lucide-react (resolved at runtime by frontend) */
|
|
26
34
|
icon: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding-config.d.ts","sourceRoot":"","sources":["../src/onboarding-config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"onboarding-config.d.ts","sourceRoot":"","sources":["../src/onboarding-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,MAAM,WAAW,qBAAqB;IACpC,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,cAAc,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAID,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CA+SnE,CAAC;AAIF,eAAO,MAAM,sBAAsB,EAAE,mBAAmB,EAavD,CAAC;AAIF,gDAAgD;AAChD,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,qBAAqB,GAAG,SAAS,CAGnC;AAED,kCAAkC;AAClC,eAAO,MAAM,2BAA2B,QAAgC,CAAC;AAEzE,uDAAuD;AACvD,eAAO,MAAM,0BAA0B,QAGtC,CAAC"}
|