dating-schema 0.7.0 → 0.8.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.
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Convenience helpers for accessing profile field metadata.
3
+ *
4
+ * @module dating-schema/field-helpers
5
+ */
6
+ import type { FieldOption } from './profile-fields/types.js';
7
+ /**
8
+ * Get the `{ value, label }` options array for a profile field by its key.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * import { getFieldOptions } from 'dating-schema';
13
+ * const genderOptions = getFieldOptions('gender');
14
+ * // → [{ value: 'man', label: 'Man' }, { value: 'woman', label: 'Woman' }, ...]
15
+ * ```
16
+ */
17
+ export declare function getFieldOptions(fieldKey: string): readonly FieldOption[];
18
+ //# sourceMappingURL=field-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-helpers.d.ts","sourceRoot":"","sources":["../src/field-helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAY7D;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,WAAW,EAAE,CAExE"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Convenience helpers for accessing profile field metadata.
3
+ *
4
+ * @module dating-schema/field-helpers
5
+ */
6
+ import { allFieldGroups } from './profile-fields/index.js';
7
+ // Pre-build a flat lookup: fieldKey → options[]
8
+ const optionsMap = new Map();
9
+ for (const group of allFieldGroups) {
10
+ for (const field of group.fields) {
11
+ if ('options' in field && Array.isArray(field.options)) {
12
+ optionsMap.set(field.key, field.options);
13
+ }
14
+ }
15
+ }
16
+ /**
17
+ * Get the `{ value, label }` options array for a profile field by its key.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * import { getFieldOptions } from 'dating-schema';
22
+ * const genderOptions = getFieldOptions('gender');
23
+ * // → [{ value: 'man', label: 'Man' }, { value: 'woman', label: 'Woman' }, ...]
24
+ * ```
25
+ */
26
+ export function getFieldOptions(fieldKey) {
27
+ return optionsMap.get(fieldKey) ?? [];
28
+ }
29
+ //# sourceMappingURL=field-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-helpers.js","sourceRoot":"","sources":["../src/field-helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,gDAAgD;AAChD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAkC,CAAC;AAC7D,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE,CAAC;IACnC,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACjC,IAAI,SAAS,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;YACvD,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,OAAO,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;AACxC,CAAC","sourcesContent":["/**\r\n * Convenience helpers for accessing profile field metadata.\r\n *\r\n * @module dating-schema/field-helpers\r\n */\r\n\r\nimport { allFieldGroups } from './profile-fields/index.js';\r\nimport type { FieldOption } from './profile-fields/types.js';\r\n\r\n// Pre-build a flat lookup: fieldKey → options[]\r\nconst optionsMap = new Map<string, readonly FieldOption[]>();\r\nfor (const group of allFieldGroups) {\r\n for (const field of group.fields) {\r\n if ('options' in field && Array.isArray(field.options)) {\r\n optionsMap.set(field.key, field.options);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Get the `{ value, label }` options array for a profile field by its key.\r\n *\r\n * @example\r\n * ```ts\r\n * import { getFieldOptions } from 'dating-schema';\r\n * const genderOptions = getFieldOptions('gender');\r\n * // → [{ value: 'man', label: 'Man' }, { value: 'woman', label: 'Woman' }, ...]\r\n * ```\r\n */\r\nexport function getFieldOptions(fieldKey: string): readonly FieldOption[] {\r\n return optionsMap.get(fieldKey) ?? [];\r\n}\r\n"]}
package/dist/index.d.ts CHANGED
@@ -10,6 +10,8 @@ export { type AgeRange, ageRangeSchema, emptyStringToUndefined, type Gender, gen
10
10
  export { type BoostBody, boostBodySchema, type ComplimentBody, complimentBodySchema, type ImageLikeBody, type InteractionListQuery, type InteractionType, imageLikeBodySchema, interactionListQuerySchema, interactionTypeSchema, type RewindBody, rewindBodySchema, type SwipeBody, type SwipeResponse, swipeBodySchema, swipeResponseSchema, } from './interactions.js';
11
11
  export { type BooleanFeatureKey, type EnumFeatureKey, type FeatureKey, type FilterLevel, getMinPlanForFeature, getPlanLimit, getPlanLimits, hasRemainingQuota, isFeatureEnabled, type NumericFeatureKey, PLAN_IDS, PLAN_LIMITS, type PlanId, type PlanLimits, type WhoLikedYouLevel, } from './plan-limits.js';
12
12
  export { type CreateProfileInput, createProfileSchema, type FullProfileData, fullProfileSchema, type UpdateProfileInput, updateProfileSchema, } from './profile.js';
13
+ export { allFieldGroups, heroIdentity, storyPrompts, basics, lookingFor, personality, selfAssessment, interests, favourites, values, career, lifestyle, cognitive, relationshipIntimacy, familyHome, financeLegal, healthWellness, type FieldOption, type FieldGroup, type ProfileField, type SelectField, type MultiSelectField, } from './profile-fields/index.js';
14
+ export { getFieldOptions } from './field-helpers.js';
13
15
  export { type BlockBody, blockBodySchema, type ReportBody, type ReportReason, type ReportStatus, reportBodySchema, reportReasonSchema, reportStatusSchema, } from './safety.js';
14
16
  export { type CreateSubscriptionBody, createSubscriptionBodySchema, type SubscriptionStatus, subscriptionStatusSchema, type Tenure, tenureSchema, } from './subscription.js';
15
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,KAAK,QAAQ,EAEb,cAAc,EACd,sBAAsB,EACtB,KAAK,MAAM,EAEX,YAAY,EACZ,KAAK,YAAY,EACjB,kBAAkB,EAClB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,UAAU,EACf,KAAK,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,KAAK,WAAW,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,KAAK,SAAS,EACd,eAAe,EACf,KAAK,cAAc,EACnB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,oBAAoB,EACpB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,QAAQ,EACR,WAAW,EACX,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,gBAAgB,GACtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,KAAK,kBAAkB,EACvB,mBAAmB,EACnB,KAAK,eAAe,EACpB,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,KAAK,SAAS,EACd,eAAe,EACf,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,KAAK,sBAAsB,EAC3B,4BAA4B,EAC5B,KAAK,kBAAkB,EACvB,wBAAwB,EACxB,KAAK,MAAM,EACX,YAAY,GACb,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,KAAK,QAAQ,EAEb,cAAc,EACd,sBAAsB,EACtB,KAAK,MAAM,EAEX,YAAY,EACZ,KAAK,YAAY,EACjB,kBAAkB,EAClB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,UAAU,EACf,KAAK,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,KAAK,WAAW,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,KAAK,SAAS,EACd,eAAe,EACf,KAAK,cAAc,EACnB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,oBAAoB,EACpB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,QAAQ,EACR,WAAW,EACX,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,gBAAgB,GACtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,KAAK,kBAAkB,EACvB,mBAAmB,EACnB,KAAK,eAAe,EACpB,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,UAAU,EACV,WAAW,EACX,cAAc,EACd,SAAS,EACT,UAAU,EACV,MAAM,EACN,MAAM,EACN,SAAS,EACT,SAAS,EACT,oBAAoB,EACpB,UAAU,EACV,YAAY,EACZ,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,gBAAgB,GACtB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EACL,KAAK,SAAS,EACd,eAAe,EACf,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,KAAK,sBAAsB,EAC3B,4BAA4B,EAC5B,KAAK,kBAAkB,EACvB,wBAAwB,EACxB,KAAK,MAAM,EACX,YAAY,GACb,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -18,6 +18,9 @@ export { boostBodySchema, complimentBodySchema, imageLikeBodySchema, interaction
18
18
  export { getMinPlanForFeature, getPlanLimit, getPlanLimits, hasRemainingQuota, isFeatureEnabled, PLAN_IDS, PLAN_LIMITS, } from './plan-limits.js';
19
19
  // ─── Profile schemas ─────────────────────────────────────────────────────────
20
20
  export { createProfileSchema, fullProfileSchema, updateProfileSchema, } from './profile.js';
21
+ // ─── Profile field configs (option arrays with labels for UI rendering) ──────
22
+ export { allFieldGroups, heroIdentity, storyPrompts, basics, lookingFor, personality, selfAssessment, interests, favourites, values, career, lifestyle, cognitive, relationshipIntimacy, familyHome, financeLegal, healthWellness, } from './profile-fields/index.js';
23
+ export { getFieldOptions } from './field-helpers.js';
21
24
  // ─── Safety schemas ──────────────────────────────────────────────────────────
22
25
  export { blockBodySchema, reportBodySchema, reportReasonSchema, reportStatusSchema, } from './safety.js';
23
26
  // ─── 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,gFAAgF;AAChF,OAAO;AAEL,cAAc;AACd,cAAc,EACd,sBAAsB;AAEtB,QAAQ;AACR,YAAY,EAEZ,kBAAkB,EAElB,gBAAgB,EAIhB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EAGrB,gBAAgB,EAChB,WAAW,EAEX,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,gFAAgF;AAChF,OAAO,EAEL,eAAe,EAEf,oBAAoB,EAIpB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EAErB,gBAAgB,EAGhB,eAAe,EACf,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,gFAAgF;AAChF,OAAO,EAKL,oBAAoB,EACpB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAEhB,QAAQ,EACR,WAAW,GAIZ,MAAM,kBAAkB,CAAC;AAC1B,gFAAgF;AAChF,OAAO,EAEL,mBAAmB,EAEnB,iBAAiB,EAEjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,gFAAgF;AAChF,OAAO,EAEL,eAAe,EAIf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,gFAAgF;AAChF,OAAO,EAEL,4BAA4B,EAE5B,wBAAwB,EAExB,YAAY,GACb,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * dating-schema — Shared Zod schemas for the Dating feature\n *\n * Single source of truth consumed by both jansathi-frontend and reform-backend.\n * Guarantees identical validation logic and TypeScript types on both sides.\n *\n * @module dating-schema\n */\n\n// ─── Common helpers and enums ────────────────────────────────────────────────\nexport {\n type AgeRange,\n // sub-schemas\n ageRangeSchema,\n emptyStringToUndefined,\n type Gender,\n // enums\n genderSchema,\n type InterestedIn,\n interestedInSchema,\n type LookingFor,\n lookingForSchema,\n type MaritalStatus,\n type MatchStatus,\n type MessageType,\n maritalStatusSchema,\n matchStatusSchema,\n messageTypeSchema,\n optionalTrimmedString,\n type Pagination,\n type Photo,\n paginationSchema,\n photoSchema,\n type SwipeAction,\n swipeActionSchema,\n} from './common.js';\n// ─── Interaction schemas ─────────────────────────────────────────────────────\nexport {\n type BoostBody,\n boostBodySchema,\n type ComplimentBody,\n complimentBodySchema,\n type ImageLikeBody,\n type InteractionListQuery,\n type InteractionType,\n imageLikeBodySchema,\n interactionListQuerySchema,\n interactionTypeSchema,\n type RewindBody,\n rewindBodySchema,\n type SwipeBody,\n type SwipeResponse,\n swipeBodySchema,\n swipeResponseSchema,\n} from './interactions.js';\n// ─── Plan limits ─────────────────────────────────────────────────────────────\nexport {\n type BooleanFeatureKey,\n type EnumFeatureKey,\n type FeatureKey,\n type FilterLevel,\n getMinPlanForFeature,\n getPlanLimit,\n getPlanLimits,\n hasRemainingQuota,\n isFeatureEnabled,\n type NumericFeatureKey,\n PLAN_IDS,\n PLAN_LIMITS,\n type PlanId,\n type PlanLimits,\n type WhoLikedYouLevel,\n} from './plan-limits.js';\n// ─── Profile schemas ─────────────────────────────────────────────────────────\nexport {\n type CreateProfileInput,\n createProfileSchema,\n type FullProfileData,\n fullProfileSchema,\n type UpdateProfileInput,\n updateProfileSchema,\n} from './profile.js';\n\n// ─── Safety schemas ──────────────────────────────────────────────────────────\nexport {\n type BlockBody,\n blockBodySchema,\n type ReportBody,\n type ReportReason,\n type ReportStatus,\n reportBodySchema,\n reportReasonSchema,\n reportStatusSchema,\n} from './safety.js';\n\n// ─── Subscription schemas ────────────────────────────────────────────────────\nexport {\n type CreateSubscriptionBody,\n createSubscriptionBodySchema,\n type SubscriptionStatus,\n subscriptionStatusSchema,\n type Tenure,\n tenureSchema,\n} from './subscription.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,gFAAgF;AAChF,OAAO;AAEL,cAAc;AACd,cAAc,EACd,sBAAsB;AAEtB,QAAQ;AACR,YAAY,EAEZ,kBAAkB,EAElB,gBAAgB,EAIhB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EAGrB,gBAAgB,EAChB,WAAW,EAEX,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,gFAAgF;AAChF,OAAO,EAEL,eAAe,EAEf,oBAAoB,EAIpB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EAErB,gBAAgB,EAGhB,eAAe,EACf,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,gFAAgF;AAChF,OAAO,EAKL,oBAAoB,EACpB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAEhB,QAAQ,EACR,WAAW,GAIZ,MAAM,kBAAkB,CAAC;AAC1B,gFAAgF;AAChF,OAAO,EAEL,mBAAmB,EAEnB,iBAAiB,EAEjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,gFAAgF;AAChF,OAAO,EACL,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,UAAU,EACV,WAAW,EACX,cAAc,EACd,SAAS,EACT,UAAU,EACV,MAAM,EACN,MAAM,EACN,SAAS,EACT,SAAS,EACT,oBAAoB,EACpB,UAAU,EACV,YAAY,EACZ,cAAc,GAMf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,gFAAgF;AAChF,OAAO,EAEL,eAAe,EAIf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,gFAAgF;AAChF,OAAO,EAEL,4BAA4B,EAE5B,wBAAwB,EAExB,YAAY,GACb,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * dating-schema — Shared Zod schemas for the Dating feature\n *\n * Single source of truth consumed by both jansathi-frontend and reform-backend.\n * Guarantees identical validation logic and TypeScript types on both sides.\n *\n * @module dating-schema\n */\n\n// ─── Common helpers and enums ────────────────────────────────────────────────\nexport {\n type AgeRange,\n // sub-schemas\n ageRangeSchema,\n emptyStringToUndefined,\n type Gender,\n // enums\n genderSchema,\n type InterestedIn,\n interestedInSchema,\n type LookingFor,\n lookingForSchema,\n type MaritalStatus,\n type MatchStatus,\n type MessageType,\n maritalStatusSchema,\n matchStatusSchema,\n messageTypeSchema,\n optionalTrimmedString,\n type Pagination,\n type Photo,\n paginationSchema,\n photoSchema,\n type SwipeAction,\n swipeActionSchema,\n} from './common.js';\n// ─── Interaction schemas ─────────────────────────────────────────────────────\nexport {\n type BoostBody,\n boostBodySchema,\n type ComplimentBody,\n complimentBodySchema,\n type ImageLikeBody,\n type InteractionListQuery,\n type InteractionType,\n imageLikeBodySchema,\n interactionListQuerySchema,\n interactionTypeSchema,\n type RewindBody,\n rewindBodySchema,\n type SwipeBody,\n type SwipeResponse,\n swipeBodySchema,\n swipeResponseSchema,\n} from './interactions.js';\n// ─── Plan limits ─────────────────────────────────────────────────────────────\nexport {\n type BooleanFeatureKey,\n type EnumFeatureKey,\n type FeatureKey,\n type FilterLevel,\n getMinPlanForFeature,\n getPlanLimit,\n getPlanLimits,\n hasRemainingQuota,\n isFeatureEnabled,\n type NumericFeatureKey,\n PLAN_IDS,\n PLAN_LIMITS,\n type PlanId,\n type PlanLimits,\n type WhoLikedYouLevel,\n} from './plan-limits.js';\n// ─── Profile schemas ─────────────────────────────────────────────────────────\nexport {\n type CreateProfileInput,\n createProfileSchema,\n type FullProfileData,\n fullProfileSchema,\n type UpdateProfileInput,\n updateProfileSchema,\n} from './profile.js';\n\n// ─── Profile field configs (option arrays with labels for UI rendering) ──────\nexport {\n allFieldGroups,\n heroIdentity,\n storyPrompts,\n basics,\n lookingFor,\n personality,\n selfAssessment,\n interests,\n favourites,\n values,\n career,\n lifestyle,\n cognitive,\n relationshipIntimacy,\n familyHome,\n financeLegal,\n healthWellness,\n type FieldOption,\n type FieldGroup,\n type ProfileField,\n type SelectField,\n type MultiSelectField,\n} from './profile-fields/index.js';\n\nexport { getFieldOptions } from './field-helpers.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"]}
package/dist/profile.d.ts CHANGED
@@ -845,7 +845,6 @@ export declare const fullProfileSchema: z.ZodObject<{
845
845
  }>>;
846
846
  volunteerInterest: z.ZodOptional<z.ZodArray<z.ZodEnum<{
847
847
  prefer_not_to_say: "prefer_not_to_say";
848
- none: "none";
849
848
  environment: "environment";
850
849
  animal_welfare: "animal_welfare";
851
850
  education_literacy: "education_literacy";
@@ -860,6 +859,7 @@ export declare const fullProfileSchema: z.ZodObject<{
860
859
  disaster_relief: "disaster_relief";
861
860
  human_rights: "human_rights";
862
861
  tech_for_good: "tech_for_good";
862
+ none: "none";
863
863
  }>>>;
864
864
  socialCircleSize: z.ZodOptional<z.ZodEnum<{
865
865
  prefer_not_to_say: "prefer_not_to_say";
@@ -1028,10 +1028,10 @@ export declare const fullProfileSchema: z.ZodObject<{
1028
1028
  }>>;
1029
1029
  cookingLevel: z.ZodOptional<z.ZodEnum<{
1030
1030
  prefer_not_to_say: "prefer_not_to_say";
1031
+ basics: "basics";
1031
1032
  regular: "regular";
1032
1033
  chef_level: "chef_level";
1033
1034
  follow_recipe: "follow_recipe";
1034
- basics: "basics";
1035
1035
  takeout: "takeout";
1036
1036
  willing_to_learn: "willing_to_learn";
1037
1037
  }>>;
@@ -1145,8 +1145,8 @@ export declare const fullProfileSchema: z.ZodObject<{
1145
1145
  }>>;
1146
1146
  bodyModifications: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1147
1147
  prefer_not_to_say: "prefer_not_to_say";
1148
- none: "none";
1149
1148
  open_to_it: "open_to_it";
1149
+ none: "none";
1150
1150
  tattoos: "tattoos";
1151
1151
  piercings: "piercings";
1152
1152
  nose_piercing: "nose_piercing";
@@ -1239,8 +1239,8 @@ export declare const fullProfileSchema: z.ZodObject<{
1239
1239
  }>>>;
1240
1240
  intellectualExperience: z.ZodOptional<z.ZodEnum<{
1241
1241
  prefer_not_to_say: "prefer_not_to_say";
1242
- advanced: "advanced";
1243
1242
  expert: "expert";
1243
+ advanced: "advanced";
1244
1244
  intermediate: "intermediate";
1245
1245
  growing: "growing";
1246
1246
  beginner: "beginner";
@@ -1396,8 +1396,8 @@ export declare const fullProfileSchema: z.ZodObject<{
1396
1396
  }>>;
1397
1397
  caregivingResponsibility: z.ZodOptional<z.ZodEnum<{
1398
1398
  prefer_not_to_say: "prefer_not_to_say";
1399
- none: "none";
1400
1399
  children: "children";
1400
+ none: "none";
1401
1401
  elderly_parents: "elderly_parents";
1402
1402
  disabled_family: "disabled_family";
1403
1403
  shared: "shared";
@@ -1600,9 +1600,9 @@ export declare const fullProfileSchema: z.ZodObject<{
1600
1600
  }>>;
1601
1601
  healthInsurance: z.ZodOptional<z.ZodEnum<{
1602
1602
  prefer_not_to_say: "prefer_not_to_say";
1603
- basic: "basic";
1604
1603
  none: "none";
1605
1604
  comprehensive: "comprehensive";
1605
+ basic: "basic";
1606
1606
  employer: "employer";
1607
1607
  }>>;
1608
1608
  citizenship: z.ZodOptional<z.ZodEnum<{
@@ -1676,17 +1676,17 @@ export declare const fullProfileSchema: z.ZodObject<{
1676
1676
  prefer_not_to_say: "prefer_not_to_say";
1677
1677
  none: "none";
1678
1678
  multiple: "multiple";
1679
+ cognitive: "cognitive";
1679
1680
  physical: "physical";
1680
1681
  visual: "visual";
1681
1682
  hearing: "hearing";
1682
- cognitive: "cognitive";
1683
1683
  chronic_condition: "chronic_condition";
1684
1684
  }>>;
1685
1685
  chronicCondition: z.ZodOptional<z.ZodEnum<{
1686
1686
  prefer_not_to_say: "prefer_not_to_say";
1687
- none: "none";
1688
1687
  other: "other";
1689
1688
  mental_health: "mental_health";
1689
+ none: "none";
1690
1690
  multiple: "multiple";
1691
1691
  diabetes: "diabetes";
1692
1692
  hypertension: "hypertension";
@@ -3117,7 +3117,6 @@ export declare const updateProfileSchema: z.ZodObject<{
3117
3117
  }>>>;
3118
3118
  volunteerInterest: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodEnum<{
3119
3119
  prefer_not_to_say: "prefer_not_to_say";
3120
- none: "none";
3121
3120
  environment: "environment";
3122
3121
  animal_welfare: "animal_welfare";
3123
3122
  education_literacy: "education_literacy";
@@ -3132,6 +3131,7 @@ export declare const updateProfileSchema: z.ZodObject<{
3132
3131
  disaster_relief: "disaster_relief";
3133
3132
  human_rights: "human_rights";
3134
3133
  tech_for_good: "tech_for_good";
3134
+ none: "none";
3135
3135
  }>>>>;
3136
3136
  socialCircleSize: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
3137
3137
  prefer_not_to_say: "prefer_not_to_say";
@@ -3300,10 +3300,10 @@ export declare const updateProfileSchema: z.ZodObject<{
3300
3300
  }>>>;
3301
3301
  cookingLevel: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
3302
3302
  prefer_not_to_say: "prefer_not_to_say";
3303
+ basics: "basics";
3303
3304
  regular: "regular";
3304
3305
  chef_level: "chef_level";
3305
3306
  follow_recipe: "follow_recipe";
3306
- basics: "basics";
3307
3307
  takeout: "takeout";
3308
3308
  willing_to_learn: "willing_to_learn";
3309
3309
  }>>>;
@@ -3417,8 +3417,8 @@ export declare const updateProfileSchema: z.ZodObject<{
3417
3417
  }>>>;
3418
3418
  bodyModifications: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodEnum<{
3419
3419
  prefer_not_to_say: "prefer_not_to_say";
3420
- none: "none";
3421
3420
  open_to_it: "open_to_it";
3421
+ none: "none";
3422
3422
  tattoos: "tattoos";
3423
3423
  piercings: "piercings";
3424
3424
  nose_piercing: "nose_piercing";
@@ -3511,8 +3511,8 @@ export declare const updateProfileSchema: z.ZodObject<{
3511
3511
  }>>>>;
3512
3512
  intellectualExperience: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
3513
3513
  prefer_not_to_say: "prefer_not_to_say";
3514
- advanced: "advanced";
3515
3514
  expert: "expert";
3515
+ advanced: "advanced";
3516
3516
  intermediate: "intermediate";
3517
3517
  growing: "growing";
3518
3518
  beginner: "beginner";
@@ -3668,8 +3668,8 @@ export declare const updateProfileSchema: z.ZodObject<{
3668
3668
  }>>>;
3669
3669
  caregivingResponsibility: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
3670
3670
  prefer_not_to_say: "prefer_not_to_say";
3671
- none: "none";
3672
3671
  children: "children";
3672
+ none: "none";
3673
3673
  elderly_parents: "elderly_parents";
3674
3674
  disabled_family: "disabled_family";
3675
3675
  shared: "shared";
@@ -3872,9 +3872,9 @@ export declare const updateProfileSchema: z.ZodObject<{
3872
3872
  }>>>;
3873
3873
  healthInsurance: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
3874
3874
  prefer_not_to_say: "prefer_not_to_say";
3875
- basic: "basic";
3876
3875
  none: "none";
3877
3876
  comprehensive: "comprehensive";
3877
+ basic: "basic";
3878
3878
  employer: "employer";
3879
3879
  }>>>;
3880
3880
  citizenship: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
@@ -3948,17 +3948,17 @@ export declare const updateProfileSchema: z.ZodObject<{
3948
3948
  prefer_not_to_say: "prefer_not_to_say";
3949
3949
  none: "none";
3950
3950
  multiple: "multiple";
3951
+ cognitive: "cognitive";
3951
3952
  physical: "physical";
3952
3953
  visual: "visual";
3953
3954
  hearing: "hearing";
3954
- cognitive: "cognitive";
3955
3955
  chronic_condition: "chronic_condition";
3956
3956
  }>>>;
3957
3957
  chronicCondition: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
3958
3958
  prefer_not_to_say: "prefer_not_to_say";
3959
- none: "none";
3960
3959
  other: "other";
3961
3960
  mental_health: "mental_health";
3961
+ none: "none";
3962
3962
  multiple: "multiple";
3963
3963
  diabetes: "diabetes";
3964
3964
  hypertension: "hypertension";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dating-schema",
3
- "version": "0.7.0",
3
+ "version": "0.8.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",