dating-schema 0.28.0 → 0.29.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/profile.d.ts +38 -643
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +41 -36
- package/dist/profile.js.map +1 -1
- package/package.json +1 -1
package/dist/profile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiiExB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACrE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/profile.js
CHANGED
|
@@ -2171,65 +2171,70 @@ export const fullProfileSchema = z.object({
|
|
|
2171
2171
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
2172
2172
|
// createProfileSchema — onboarding fields only (isOnboarding: true)
|
|
2173
2173
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
2174
|
+
/**
|
|
2175
|
+
* createProfileSchema — validation for profile creation API.
|
|
2176
|
+
*
|
|
2177
|
+
* Uses z.string() for all option fields (no enums) so that options can be
|
|
2178
|
+
* added/removed in field definitions without republishing the schema.
|
|
2179
|
+
* Valid options are defined in profile-fields/*.ts and enforced by the UI
|
|
2180
|
+
* via getFieldOptions(). Mongoose stores any string value.
|
|
2181
|
+
*/
|
|
2174
2182
|
export const createProfileSchema = z.object({
|
|
2175
|
-
// Required
|
|
2183
|
+
// Required fields
|
|
2176
2184
|
photos: z.array(photoSchema).min(2).max(6),
|
|
2177
2185
|
displayName: z.string().trim().max(50),
|
|
2178
2186
|
dateOfBirth: z.coerce.date(),
|
|
2179
|
-
gender:
|
|
2180
|
-
pronouns:
|
|
2187
|
+
gender: z.string(),
|
|
2188
|
+
pronouns: z.string(),
|
|
2181
2189
|
currentCity: locationSchema,
|
|
2182
2190
|
hometown: z.string().trim().max(100),
|
|
2183
|
-
relationshipIntent:
|
|
2184
|
-
sexualOrientation:
|
|
2185
|
-
relationshipStructure:
|
|
2191
|
+
relationshipIntent: z.string(),
|
|
2192
|
+
sexualOrientation: z.string(),
|
|
2193
|
+
relationshipStructure: z.string(),
|
|
2186
2194
|
bio: z.string().trim().max(500),
|
|
2187
|
-
preferredGenders: z.array(
|
|
2188
|
-
familyReligion:
|
|
2189
|
-
motherTongue:
|
|
2190
|
-
relationshipStatus:
|
|
2191
|
-
// Optional
|
|
2192
|
-
hometownState:
|
|
2195
|
+
preferredGenders: z.array(z.string()).min(1),
|
|
2196
|
+
familyReligion: z.string(),
|
|
2197
|
+
motherTongue: z.string(),
|
|
2198
|
+
relationshipStatus: z.string(),
|
|
2199
|
+
// Optional fields — all use z.string() (no enums)
|
|
2200
|
+
hometownState: z.string().optional(),
|
|
2193
2201
|
hometownStateId: z.string().optional(),
|
|
2194
2202
|
hometownDistrict: z.string().trim().max(100).optional(),
|
|
2195
2203
|
hometownDistrictId: z.string().optional(),
|
|
2196
2204
|
myStory: z.string().trim().max(2000).optional(),
|
|
2197
|
-
personalReligion:
|
|
2205
|
+
personalReligion: z.string().optional(),
|
|
2198
2206
|
height: z.number().min(100).max(220).optional(),
|
|
2199
2207
|
weight: z.number().min(30).max(200).optional(),
|
|
2200
|
-
bodyBuild:
|
|
2201
|
-
complexion:
|
|
2202
|
-
educationLevel:
|
|
2203
|
-
institutionTier:
|
|
2204
|
-
cognitiveBand:
|
|
2205
|
-
politicalOrientation:
|
|
2206
|
-
profession:
|
|
2207
|
-
careerStage:
|
|
2208
|
-
incomeRange:
|
|
2209
|
-
familyValues:
|
|
2210
|
-
scientificTemper:
|
|
2211
|
-
hobbies: z.array(
|
|
2212
|
-
diet:
|
|
2213
|
-
smoking:
|
|
2214
|
-
alcohol:
|
|
2208
|
+
bodyBuild: z.string().optional(),
|
|
2209
|
+
complexion: z.string().optional(),
|
|
2210
|
+
educationLevel: z.string().optional(),
|
|
2211
|
+
institutionTier: z.string().optional(),
|
|
2212
|
+
cognitiveBand: z.string().optional(),
|
|
2213
|
+
politicalOrientation: z.string().optional(),
|
|
2214
|
+
profession: z.string().optional(),
|
|
2215
|
+
careerStage: z.string().optional(),
|
|
2216
|
+
incomeRange: z.string().optional(),
|
|
2217
|
+
familyValues: z.string().optional(),
|
|
2218
|
+
scientificTemper: z.string().optional(),
|
|
2219
|
+
hobbies: z.array(z.string()).max(20).optional(),
|
|
2220
|
+
diet: z.string().optional(),
|
|
2221
|
+
smoking: z.string().optional(),
|
|
2222
|
+
alcohol: z.string().optional(),
|
|
2215
2223
|
favouriteBooks: z.array(z.string().trim().max(200)).max(5).optional(),
|
|
2216
2224
|
favouriteShows: z.array(z.string().trim().max(200)).max(5).optional(),
|
|
2217
2225
|
idols: z.array(z.string().trim().max(200)).max(5).optional(),
|
|
2218
2226
|
favouriteYoutubeChannels: z.array(z.string().trim().max(200)).max(5).optional(),
|
|
2219
|
-
mbtiType:
|
|
2220
|
-
attachmentStyle:
|
|
2221
|
-
loveLanguage:
|
|
2222
|
-
conflictStyle:
|
|
2227
|
+
mbtiType: z.string().optional(),
|
|
2228
|
+
attachmentStyle: z.string().optional(),
|
|
2229
|
+
loveLanguage: z.string().optional(),
|
|
2230
|
+
conflictStyle: z.string().optional(),
|
|
2223
2231
|
oceanOpenness: z.number().int().min(1).max(100).optional(),
|
|
2224
2232
|
oceanConscientiousness: z.number().int().min(1).max(100).optional(),
|
|
2225
2233
|
oceanExtraversion: z.number().int().min(1).max(100).optional(),
|
|
2226
2234
|
oceanAgreeableness: z.number().int().min(1).max(100).optional(),
|
|
2227
2235
|
oceanNeuroticism: z.number().int().min(1).max(100).optional(),
|
|
2228
2236
|
prompts: z
|
|
2229
|
-
.array(z.object({
|
|
2230
|
-
prompt: z.string(),
|
|
2231
|
-
answer: z.string().max(250),
|
|
2232
|
-
}))
|
|
2237
|
+
.array(z.object({ prompt: z.string(), answer: z.string().max(250) }))
|
|
2233
2238
|
.max(3)
|
|
2234
2239
|
.optional(),
|
|
2235
2240
|
preferredAgeRange: z.number().min(18).max(70).optional(),
|