dating-schema 0.33.0 → 0.35.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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/plan-limits.d.ts +30 -0
- package/dist/plan-limits.d.ts.map +1 -1
- package/dist/plan-limits.js +47 -0
- package/dist/plan-limits.js.map +1 -1
- package/dist/profile-fields/01-hero-identity.js +2 -2
- package/dist/profile-fields/01-hero-identity.js.map +1 -1
- package/dist/profile.d.ts +176 -17
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +30 -13
- package/dist/profile.js.map +1 -1
- package/package.json +1 -1
package/dist/profile.d.ts
CHANGED
|
@@ -49,12 +49,65 @@ export declare const fullProfileSchema: z.ZodObject<{
|
|
|
49
49
|
any_pronouns: "any_pronouns";
|
|
50
50
|
ask_me: "ask_me";
|
|
51
51
|
}>>;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
currentLocation: z.ZodOptional<z.ZodObject<{
|
|
53
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
54
|
+
country: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
_id: z.ZodString;
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
type: z.ZodOptional<z.ZodString>;
|
|
57
58
|
}, z.core.$strip>>;
|
|
59
|
+
state: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
_id: z.ZodString;
|
|
61
|
+
name: z.ZodString;
|
|
62
|
+
type: z.ZodOptional<z.ZodString>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
district: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
_id: z.ZodString;
|
|
66
|
+
name: z.ZodString;
|
|
67
|
+
type: z.ZodOptional<z.ZodString>;
|
|
68
|
+
}, z.core.$strip>>;
|
|
69
|
+
areaType: z.ZodOptional<z.ZodEnum<{
|
|
70
|
+
RURAL: "RURAL";
|
|
71
|
+
URBAN: "URBAN";
|
|
72
|
+
}>>;
|
|
73
|
+
block: z.ZodOptional<z.ZodObject<{
|
|
74
|
+
_id: z.ZodString;
|
|
75
|
+
name: z.ZodString;
|
|
76
|
+
type: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>>;
|
|
78
|
+
gramPanchayat: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
_id: z.ZodString;
|
|
80
|
+
name: z.ZodString;
|
|
81
|
+
type: z.ZodOptional<z.ZodString>;
|
|
82
|
+
}, z.core.$strip>>;
|
|
83
|
+
village: z.ZodOptional<z.ZodObject<{
|
|
84
|
+
_id: z.ZodString;
|
|
85
|
+
name: z.ZodString;
|
|
86
|
+
type: z.ZodOptional<z.ZodString>;
|
|
87
|
+
}, z.core.$strip>>;
|
|
88
|
+
hamlet: z.ZodOptional<z.ZodObject<{
|
|
89
|
+
_id: z.ZodString;
|
|
90
|
+
name: z.ZodString;
|
|
91
|
+
type: z.ZodOptional<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>>;
|
|
93
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
94
|
+
urbanBody: z.ZodOptional<z.ZodObject<{
|
|
95
|
+
_id: z.ZodString;
|
|
96
|
+
name: z.ZodString;
|
|
97
|
+
type: z.ZodOptional<z.ZodString>;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
urbanWard: z.ZodOptional<z.ZodObject<{
|
|
100
|
+
_id: z.ZodString;
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
type: z.ZodOptional<z.ZodString>;
|
|
103
|
+
}, z.core.$strip>>;
|
|
104
|
+
locality: z.ZodOptional<z.ZodObject<{
|
|
105
|
+
_id: z.ZodString;
|
|
106
|
+
name: z.ZodString;
|
|
107
|
+
type: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
latitude: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
longitude: z.ZodOptional<z.ZodNumber>;
|
|
58
111
|
}, z.core.$strip>>;
|
|
59
112
|
hometown: z.ZodOptional<z.ZodString>;
|
|
60
113
|
searchRadius: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2049,12 +2102,65 @@ export declare const createProfileSchema: z.ZodObject<{
|
|
|
2049
2102
|
dateOfBirth: z.ZodCoercedDate<unknown>;
|
|
2050
2103
|
gender: z.ZodString;
|
|
2051
2104
|
pronouns: z.ZodString;
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2105
|
+
currentLocation: z.ZodObject<{
|
|
2106
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
2107
|
+
country: z.ZodOptional<z.ZodObject<{
|
|
2108
|
+
_id: z.ZodString;
|
|
2109
|
+
name: z.ZodString;
|
|
2110
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2111
|
+
}, z.core.$strip>>;
|
|
2112
|
+
state: z.ZodOptional<z.ZodObject<{
|
|
2113
|
+
_id: z.ZodString;
|
|
2114
|
+
name: z.ZodString;
|
|
2115
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2116
|
+
}, z.core.$strip>>;
|
|
2117
|
+
district: z.ZodOptional<z.ZodObject<{
|
|
2118
|
+
_id: z.ZodString;
|
|
2119
|
+
name: z.ZodString;
|
|
2120
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2121
|
+
}, z.core.$strip>>;
|
|
2122
|
+
areaType: z.ZodOptional<z.ZodEnum<{
|
|
2123
|
+
RURAL: "RURAL";
|
|
2124
|
+
URBAN: "URBAN";
|
|
2125
|
+
}>>;
|
|
2126
|
+
block: z.ZodOptional<z.ZodObject<{
|
|
2127
|
+
_id: z.ZodString;
|
|
2128
|
+
name: z.ZodString;
|
|
2129
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2130
|
+
}, z.core.$strip>>;
|
|
2131
|
+
gramPanchayat: z.ZodOptional<z.ZodObject<{
|
|
2132
|
+
_id: z.ZodString;
|
|
2133
|
+
name: z.ZodString;
|
|
2134
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2135
|
+
}, z.core.$strip>>;
|
|
2136
|
+
village: z.ZodOptional<z.ZodObject<{
|
|
2137
|
+
_id: z.ZodString;
|
|
2138
|
+
name: z.ZodString;
|
|
2139
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2057
2140
|
}, z.core.$strip>>;
|
|
2141
|
+
hamlet: z.ZodOptional<z.ZodObject<{
|
|
2142
|
+
_id: z.ZodString;
|
|
2143
|
+
name: z.ZodString;
|
|
2144
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2145
|
+
}, z.core.$strip>>;
|
|
2146
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
2147
|
+
urbanBody: z.ZodOptional<z.ZodObject<{
|
|
2148
|
+
_id: z.ZodString;
|
|
2149
|
+
name: z.ZodString;
|
|
2150
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2151
|
+
}, z.core.$strip>>;
|
|
2152
|
+
urbanWard: z.ZodOptional<z.ZodObject<{
|
|
2153
|
+
_id: z.ZodString;
|
|
2154
|
+
name: z.ZodString;
|
|
2155
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2156
|
+
}, z.core.$strip>>;
|
|
2157
|
+
locality: z.ZodOptional<z.ZodObject<{
|
|
2158
|
+
_id: z.ZodString;
|
|
2159
|
+
name: z.ZodString;
|
|
2160
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2161
|
+
}, z.core.$strip>>;
|
|
2162
|
+
latitude: z.ZodOptional<z.ZodNumber>;
|
|
2163
|
+
longitude: z.ZodOptional<z.ZodNumber>;
|
|
2058
2164
|
}, z.core.$strip>;
|
|
2059
2165
|
hometown: z.ZodString;
|
|
2060
2166
|
relationshipIntent: z.ZodString;
|
|
@@ -2155,12 +2261,65 @@ export declare const updateProfileSchema: z.ZodObject<{
|
|
|
2155
2261
|
any_pronouns: "any_pronouns";
|
|
2156
2262
|
ask_me: "ask_me";
|
|
2157
2263
|
}>>>;
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2264
|
+
currentLocation: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2265
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
2266
|
+
country: z.ZodOptional<z.ZodObject<{
|
|
2267
|
+
_id: z.ZodString;
|
|
2268
|
+
name: z.ZodString;
|
|
2269
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2270
|
+
}, z.core.$strip>>;
|
|
2271
|
+
state: z.ZodOptional<z.ZodObject<{
|
|
2272
|
+
_id: z.ZodString;
|
|
2273
|
+
name: z.ZodString;
|
|
2274
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2275
|
+
}, z.core.$strip>>;
|
|
2276
|
+
district: z.ZodOptional<z.ZodObject<{
|
|
2277
|
+
_id: z.ZodString;
|
|
2278
|
+
name: z.ZodString;
|
|
2279
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2280
|
+
}, z.core.$strip>>;
|
|
2281
|
+
areaType: z.ZodOptional<z.ZodEnum<{
|
|
2282
|
+
RURAL: "RURAL";
|
|
2283
|
+
URBAN: "URBAN";
|
|
2284
|
+
}>>;
|
|
2285
|
+
block: z.ZodOptional<z.ZodObject<{
|
|
2286
|
+
_id: z.ZodString;
|
|
2287
|
+
name: z.ZodString;
|
|
2288
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2289
|
+
}, z.core.$strip>>;
|
|
2290
|
+
gramPanchayat: z.ZodOptional<z.ZodObject<{
|
|
2291
|
+
_id: z.ZodString;
|
|
2292
|
+
name: z.ZodString;
|
|
2293
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2294
|
+
}, z.core.$strip>>;
|
|
2295
|
+
village: z.ZodOptional<z.ZodObject<{
|
|
2296
|
+
_id: z.ZodString;
|
|
2297
|
+
name: z.ZodString;
|
|
2298
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2299
|
+
}, z.core.$strip>>;
|
|
2300
|
+
hamlet: z.ZodOptional<z.ZodObject<{
|
|
2301
|
+
_id: z.ZodString;
|
|
2302
|
+
name: z.ZodString;
|
|
2303
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2304
|
+
}, z.core.$strip>>;
|
|
2305
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
2306
|
+
urbanBody: z.ZodOptional<z.ZodObject<{
|
|
2307
|
+
_id: z.ZodString;
|
|
2308
|
+
name: z.ZodString;
|
|
2309
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2310
|
+
}, z.core.$strip>>;
|
|
2311
|
+
urbanWard: z.ZodOptional<z.ZodObject<{
|
|
2312
|
+
_id: z.ZodString;
|
|
2313
|
+
name: z.ZodString;
|
|
2314
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2315
|
+
}, z.core.$strip>>;
|
|
2316
|
+
locality: z.ZodOptional<z.ZodObject<{
|
|
2317
|
+
_id: z.ZodString;
|
|
2318
|
+
name: z.ZodString;
|
|
2319
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2163
2320
|
}, z.core.$strip>>;
|
|
2321
|
+
latitude: z.ZodOptional<z.ZodNumber>;
|
|
2322
|
+
longitude: z.ZodOptional<z.ZodNumber>;
|
|
2164
2323
|
}, z.core.$strip>>>;
|
|
2165
2324
|
hometown: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2166
2325
|
searchRadius: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -4144,7 +4303,7 @@ export declare const updateProfileSchema: z.ZodObject<{
|
|
|
4144
4303
|
* 3. Strict enum validation happens ONLY at final submit via createProfileSchema.parse()
|
|
4145
4304
|
*
|
|
4146
4305
|
* This schema mirrors createProfileSchema's field names but with relaxed types.
|
|
4147
|
-
* Photos and
|
|
4306
|
+
* Photos and currentLocation are managed outside RHF (separate state).
|
|
4148
4307
|
*/
|
|
4149
4308
|
export declare const onboardingFormSchema: z.ZodObject<{
|
|
4150
4309
|
displayName: z.ZodString;
|
|
@@ -4178,7 +4337,7 @@ export declare const onboardingFormSchema: z.ZodObject<{
|
|
|
4178
4337
|
conflictStyle: z.ZodString;
|
|
4179
4338
|
height: z.ZodString;
|
|
4180
4339
|
weight: z.ZodString;
|
|
4181
|
-
|
|
4340
|
+
currentLocation: z.ZodString;
|
|
4182
4341
|
hometown: z.ZodString;
|
|
4183
4342
|
bio: z.ZodString;
|
|
4184
4343
|
myStory: z.ZodString;
|
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;
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4gExB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ChE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAIpF;AAED,MAAM,MAAM,kBAAkB,GAAG,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
|
@@ -1853,14 +1853,31 @@ const stressManagementOpts = opts([
|
|
|
1853
1853
|
'prefer_not_to_say',
|
|
1854
1854
|
]);
|
|
1855
1855
|
// ─── Location sub-schema ─────────────────────────────────────────────────────
|
|
1856
|
-
const
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1856
|
+
const areaRefSchema = z.object({
|
|
1857
|
+
_id: z.string(),
|
|
1858
|
+
name: z.string(),
|
|
1859
|
+
type: z.string().optional(),
|
|
1860
|
+
});
|
|
1861
|
+
const currentLocationSchema = z.object({
|
|
1862
|
+
displayName: z.string().optional(),
|
|
1863
|
+
country: areaRefSchema.optional(),
|
|
1864
|
+
// Full area hierarchy — each { _id, name, type } traces back to AreaEntity in survey-db
|
|
1865
|
+
state: areaRefSchema.optional(),
|
|
1866
|
+
district: areaRefSchema.optional(),
|
|
1867
|
+
areaType: z.enum(['RURAL', 'URBAN']).optional(),
|
|
1868
|
+
// Rural lineage
|
|
1869
|
+
block: areaRefSchema.optional(),
|
|
1870
|
+
gramPanchayat: areaRefSchema.optional(),
|
|
1871
|
+
village: areaRefSchema.optional(),
|
|
1872
|
+
hamlet: areaRefSchema.optional(),
|
|
1873
|
+
// Urban lineage
|
|
1874
|
+
urbanBodyType: z.string().optional(),
|
|
1875
|
+
urbanBody: areaRefSchema.optional(),
|
|
1876
|
+
urbanWard: areaRefSchema.optional(),
|
|
1877
|
+
locality: areaRefSchema.optional(),
|
|
1878
|
+
// Geo coordinates
|
|
1879
|
+
latitude: z.number().optional(),
|
|
1880
|
+
longitude: z.number().optional(),
|
|
1864
1881
|
});
|
|
1865
1882
|
// ─── Family member sub-schema (object_array itemShape) ───────────────────────
|
|
1866
1883
|
const familyMemberSchema = z.object({
|
|
@@ -1877,7 +1894,7 @@ export const fullProfileSchema = z.object({
|
|
|
1877
1894
|
dateOfBirth: z.coerce.date().optional(),
|
|
1878
1895
|
gender: genderOpts.optional(),
|
|
1879
1896
|
pronouns: pronounsOpts.optional(),
|
|
1880
|
-
|
|
1897
|
+
currentLocation: currentLocationSchema.optional(),
|
|
1881
1898
|
hometown: z.string().trim().max(100).optional(),
|
|
1882
1899
|
searchRadius: z.number().min(1).max(500).optional(),
|
|
1883
1900
|
relationshipIntent: relationshipIntentOpts.optional(),
|
|
@@ -2147,7 +2164,7 @@ export const createProfileSchema = z.object({
|
|
|
2147
2164
|
dateOfBirth: z.coerce.date(),
|
|
2148
2165
|
gender: z.string(),
|
|
2149
2166
|
pronouns: z.string(),
|
|
2150
|
-
|
|
2167
|
+
currentLocation: currentLocationSchema,
|
|
2151
2168
|
hometown: z.string().trim().max(100),
|
|
2152
2169
|
relationshipIntent: z.string(),
|
|
2153
2170
|
sexualOrientation: z.string(),
|
|
@@ -2212,7 +2229,7 @@ export const updateProfileSchema = fullProfileSchema.partial();
|
|
|
2212
2229
|
// onboardingFormSchema — derived from createProfileSchema for React Hook Form
|
|
2213
2230
|
//
|
|
2214
2231
|
// All fields from createProfileSchema made optional (form starts empty).
|
|
2215
|
-
// Omits photos (managed outside RHF) and
|
|
2232
|
+
// Omits photos (managed outside RHF) and currentLocation (built at submit from
|
|
2216
2233
|
// existing user data). Adds UI-only fields for the hometown cascade.
|
|
2217
2234
|
// dateOfBirth stored as ISO string in form (converted to Date at submit).
|
|
2218
2235
|
//
|
|
@@ -2227,7 +2244,7 @@ export const updateProfileSchema = fullProfileSchema.partial();
|
|
|
2227
2244
|
* 3. Strict enum validation happens ONLY at final submit via createProfileSchema.parse()
|
|
2228
2245
|
*
|
|
2229
2246
|
* This schema mirrors createProfileSchema's field names but with relaxed types.
|
|
2230
|
-
* Photos and
|
|
2247
|
+
* Photos and currentLocation are managed outside RHF (separate state).
|
|
2231
2248
|
*/
|
|
2232
2249
|
export const onboardingFormSchema = z.object({
|
|
2233
2250
|
// Required — has min validation
|
|
@@ -2264,7 +2281,7 @@ export const onboardingFormSchema = z.object({
|
|
|
2264
2281
|
// Type overrides (form stores as string, converted at submit)
|
|
2265
2282
|
height: z.string(),
|
|
2266
2283
|
weight: z.string(),
|
|
2267
|
-
|
|
2284
|
+
currentLocation: z.string(),
|
|
2268
2285
|
hometown: z.string(),
|
|
2269
2286
|
bio: z.string(),
|
|
2270
2287
|
myStory: z.string(),
|