jansathi-community-schema 0.14.1 → 0.16.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.
@@ -159,7 +159,7 @@ export declare const communityCategorySchema: z.ZodEnum<{
159
159
  * Total: 112 tags spanning civic, health, education, sports, food,
160
160
  * arts/music/faith, business/tech, local issues, and lifestyle.
161
161
  */
162
- export declare const COMMUNITY_TAG_VALUES: readonly ["volunteer", "donation_drive", "blood_donation", "anti_corruption", "women_safety", "child_safety", "senior_care", "disability_support", "lgbtq_support", "environment", "cleanliness", "plant_trees", "waste_management", "legal_aid", "rti", "voter_awareness", "government_schemes", "ngo", "charity", "relief_work", "public_service", "fundraising", "awareness_campaign", "social_justice", "yoga", "meditation", "fitness", "running", "cycling", "walking", "nutrition", "mental_health", "ayurveda", "weight_loss", "womens_health", "mens_health", "dental_health", "eye_care", "jee", "neet", "upsc", "ssc", "ielts", "school_support", "college_support", "scholarship", "career_guidance", "coding", "mathematics", "science", "languages", "spoken_english", "tutoring", "study_abroad", "cricket", "football", "badminton", "tennis", "kabaddi", "hockey", "chess", "swimming", "marathon", "street_food", "home_cooking", "vegetarian", "vegan", "jain_food", "fasting_recipes", "north_indian", "south_indian", "baking", "desserts", "classical_music", "hindustani", "carnatic", "bhajan", "kirtan", "bollywood", "dance_classical", "dance_folk", "painting", "photography", "craft", "satsang", "festivals", "pilgrimage", "entrepreneurship", "startup", "small_business", "freelancing", "real_estate", "stocks_investing", "mutual_funds", "agriculture", "handicrafts", "job_postings", "web_development", "water_supply", "electricity", "road_repair", "garbage_collection", "drainage", "public_transport", "traffic", "parking", "local_healthcare", "movies", "tv_shows", "books_club", "trekking", "parenting"];
162
+ export declare const COMMUNITY_TAG_VALUES: readonly ["volunteer", "donation_drive", "blood_donation", "anti_corruption", "women_safety", "child_safety", "senior_care", "disability_support", "lgbtq_support", "environment", "cleanliness", "plant_trees", "waste_management", "legal_aid", "rti", "voter_awareness", "government_schemes", "ngo", "charity", "relief_work", "public_service", "fundraising", "awareness_campaign", "social_justice", "women_empowerment", "rural_development", "tribal_welfare", "homeless_support", "street_children", "community_growth", "residents_association", "housing_society", "gated_community", "apartment_living", "mohalla_committee", "newcomers_welcome", "neighborhood_safety", "yoga", "meditation", "fitness", "running", "cycling", "walking", "nutrition", "mental_health", "ayurveda", "weight_loss", "womens_health", "mens_health", "dental_health", "eye_care", "diabetes_support", "cancer_support", "heart_health", "addiction_recovery", "pregnancy_support", "jee", "neet", "upsc", "ssc", "ielts", "school_support", "college_support", "scholarship", "career_guidance", "coding", "mathematics", "science", "languages", "spoken_english", "tutoring", "study_abroad", "cricket", "football", "badminton", "tennis", "kabaddi", "hockey", "chess", "swimming", "marathon", "street_food", "home_cooking", "vegetarian", "vegan", "jain_food", "fasting_recipes", "north_indian", "south_indian", "baking", "desserts", "classical_music", "hindustani", "carnatic", "bhajan", "kirtan", "bollywood", "dance_classical", "dance_folk", "painting", "photography", "craft", "satsang", "festivals", "pilgrimage", "gita_study", "ramayan", "bhagwat", "vedanta", "sikh_satsang", "christian_fellowship", "jain_swadhyay", "entrepreneurship", "startup", "small_business", "freelancing", "real_estate", "stocks_investing", "mutual_funds", "agriculture", "handicrafts", "job_postings", "web_development", "artificial_intelligence", "data_science", "cybersecurity", "app_development", "ui_ux_design", "social_media_marketing", "content_creation", "gaming", "water_supply", "electricity", "road_repair", "garbage_collection", "drainage", "public_transport", "traffic", "parking", "local_healthcare", "tailoring", "carpentry", "electrical_work", "plumbing", "beauty_skills", "driving", "pets", "dog_lovers", "cat_lovers", "stray_animal_care", "veterinary_help", "movies", "tv_shows", "books_club", "trekking", "parenting", "gardening", "pottery", "diy", "home_decor"];
163
163
  export type CommunityTag = (typeof COMMUNITY_TAG_VALUES)[number];
164
164
  export declare const communityTagSchema: z.ZodEnum<{
165
165
  environment: "environment";
@@ -168,6 +168,7 @@ export declare const communityTagSchema: z.ZodEnum<{
168
168
  mental_health: "mental_health";
169
169
  photography: "photography";
170
170
  cricket: "cricket";
171
+ gaming: "gaming";
171
172
  entrepreneurship: "entrepreneurship";
172
173
  agriculture: "agriculture";
173
174
  volunteer: "volunteer";
@@ -193,6 +194,19 @@ export declare const communityTagSchema: z.ZodEnum<{
193
194
  fundraising: "fundraising";
194
195
  awareness_campaign: "awareness_campaign";
195
196
  social_justice: "social_justice";
197
+ women_empowerment: "women_empowerment";
198
+ rural_development: "rural_development";
199
+ tribal_welfare: "tribal_welfare";
200
+ homeless_support: "homeless_support";
201
+ street_children: "street_children";
202
+ community_growth: "community_growth";
203
+ residents_association: "residents_association";
204
+ housing_society: "housing_society";
205
+ gated_community: "gated_community";
206
+ apartment_living: "apartment_living";
207
+ mohalla_committee: "mohalla_committee";
208
+ newcomers_welcome: "newcomers_welcome";
209
+ neighborhood_safety: "neighborhood_safety";
196
210
  yoga: "yoga";
197
211
  meditation: "meditation";
198
212
  running: "running";
@@ -205,6 +219,11 @@ export declare const communityTagSchema: z.ZodEnum<{
205
219
  mens_health: "mens_health";
206
220
  dental_health: "dental_health";
207
221
  eye_care: "eye_care";
222
+ diabetes_support: "diabetes_support";
223
+ cancer_support: "cancer_support";
224
+ heart_health: "heart_health";
225
+ addiction_recovery: "addiction_recovery";
226
+ pregnancy_support: "pregnancy_support";
208
227
  jee: "jee";
209
228
  neet: "neet";
210
229
  upsc: "upsc";
@@ -251,6 +270,13 @@ export declare const communityTagSchema: z.ZodEnum<{
251
270
  satsang: "satsang";
252
271
  festivals: "festivals";
253
272
  pilgrimage: "pilgrimage";
273
+ gita_study: "gita_study";
274
+ ramayan: "ramayan";
275
+ bhagwat: "bhagwat";
276
+ vedanta: "vedanta";
277
+ sikh_satsang: "sikh_satsang";
278
+ christian_fellowship: "christian_fellowship";
279
+ jain_swadhyay: "jain_swadhyay";
254
280
  startup: "startup";
255
281
  small_business: "small_business";
256
282
  freelancing: "freelancing";
@@ -260,6 +286,13 @@ export declare const communityTagSchema: z.ZodEnum<{
260
286
  handicrafts: "handicrafts";
261
287
  job_postings: "job_postings";
262
288
  web_development: "web_development";
289
+ artificial_intelligence: "artificial_intelligence";
290
+ data_science: "data_science";
291
+ cybersecurity: "cybersecurity";
292
+ app_development: "app_development";
293
+ ui_ux_design: "ui_ux_design";
294
+ social_media_marketing: "social_media_marketing";
295
+ content_creation: "content_creation";
263
296
  water_supply: "water_supply";
264
297
  electricity: "electricity";
265
298
  road_repair: "road_repair";
@@ -269,11 +302,26 @@ export declare const communityTagSchema: z.ZodEnum<{
269
302
  traffic: "traffic";
270
303
  parking: "parking";
271
304
  local_healthcare: "local_healthcare";
305
+ tailoring: "tailoring";
306
+ carpentry: "carpentry";
307
+ electrical_work: "electrical_work";
308
+ plumbing: "plumbing";
309
+ beauty_skills: "beauty_skills";
310
+ driving: "driving";
311
+ pets: "pets";
312
+ dog_lovers: "dog_lovers";
313
+ cat_lovers: "cat_lovers";
314
+ stray_animal_care: "stray_animal_care";
315
+ veterinary_help: "veterinary_help";
272
316
  movies: "movies";
273
317
  tv_shows: "tv_shows";
274
318
  books_club: "books_club";
275
319
  trekking: "trekking";
276
320
  parenting: "parenting";
321
+ gardening: "gardening";
322
+ pottery: "pottery";
323
+ diy: "diy";
324
+ home_decor: "home_decor";
277
325
  }>;
278
326
  /**
279
327
  * Preset designation labels — purely **representation** (not
@@ -481,6 +529,7 @@ export declare const communityWireSchema: z.ZodObject<{
481
529
  mental_health: "mental_health";
482
530
  photography: "photography";
483
531
  cricket: "cricket";
532
+ gaming: "gaming";
484
533
  entrepreneurship: "entrepreneurship";
485
534
  agriculture: "agriculture";
486
535
  volunteer: "volunteer";
@@ -506,6 +555,19 @@ export declare const communityWireSchema: z.ZodObject<{
506
555
  fundraising: "fundraising";
507
556
  awareness_campaign: "awareness_campaign";
508
557
  social_justice: "social_justice";
558
+ women_empowerment: "women_empowerment";
559
+ rural_development: "rural_development";
560
+ tribal_welfare: "tribal_welfare";
561
+ homeless_support: "homeless_support";
562
+ street_children: "street_children";
563
+ community_growth: "community_growth";
564
+ residents_association: "residents_association";
565
+ housing_society: "housing_society";
566
+ gated_community: "gated_community";
567
+ apartment_living: "apartment_living";
568
+ mohalla_committee: "mohalla_committee";
569
+ newcomers_welcome: "newcomers_welcome";
570
+ neighborhood_safety: "neighborhood_safety";
509
571
  yoga: "yoga";
510
572
  meditation: "meditation";
511
573
  running: "running";
@@ -518,6 +580,11 @@ export declare const communityWireSchema: z.ZodObject<{
518
580
  mens_health: "mens_health";
519
581
  dental_health: "dental_health";
520
582
  eye_care: "eye_care";
583
+ diabetes_support: "diabetes_support";
584
+ cancer_support: "cancer_support";
585
+ heart_health: "heart_health";
586
+ addiction_recovery: "addiction_recovery";
587
+ pregnancy_support: "pregnancy_support";
521
588
  jee: "jee";
522
589
  neet: "neet";
523
590
  upsc: "upsc";
@@ -564,6 +631,13 @@ export declare const communityWireSchema: z.ZodObject<{
564
631
  satsang: "satsang";
565
632
  festivals: "festivals";
566
633
  pilgrimage: "pilgrimage";
634
+ gita_study: "gita_study";
635
+ ramayan: "ramayan";
636
+ bhagwat: "bhagwat";
637
+ vedanta: "vedanta";
638
+ sikh_satsang: "sikh_satsang";
639
+ christian_fellowship: "christian_fellowship";
640
+ jain_swadhyay: "jain_swadhyay";
567
641
  startup: "startup";
568
642
  small_business: "small_business";
569
643
  freelancing: "freelancing";
@@ -573,6 +647,13 @@ export declare const communityWireSchema: z.ZodObject<{
573
647
  handicrafts: "handicrafts";
574
648
  job_postings: "job_postings";
575
649
  web_development: "web_development";
650
+ artificial_intelligence: "artificial_intelligence";
651
+ data_science: "data_science";
652
+ cybersecurity: "cybersecurity";
653
+ app_development: "app_development";
654
+ ui_ux_design: "ui_ux_design";
655
+ social_media_marketing: "social_media_marketing";
656
+ content_creation: "content_creation";
576
657
  water_supply: "water_supply";
577
658
  electricity: "electricity";
578
659
  road_repair: "road_repair";
@@ -582,11 +663,26 @@ export declare const communityWireSchema: z.ZodObject<{
582
663
  traffic: "traffic";
583
664
  parking: "parking";
584
665
  local_healthcare: "local_healthcare";
666
+ tailoring: "tailoring";
667
+ carpentry: "carpentry";
668
+ electrical_work: "electrical_work";
669
+ plumbing: "plumbing";
670
+ beauty_skills: "beauty_skills";
671
+ driving: "driving";
672
+ pets: "pets";
673
+ dog_lovers: "dog_lovers";
674
+ cat_lovers: "cat_lovers";
675
+ stray_animal_care: "stray_animal_care";
676
+ veterinary_help: "veterinary_help";
585
677
  movies: "movies";
586
678
  tv_shows: "tv_shows";
587
679
  books_club: "books_club";
588
680
  trekking: "trekking";
589
681
  parenting: "parenting";
682
+ gardening: "gardening";
683
+ pottery: "pottery";
684
+ diy: "diy";
685
+ home_decor: "home_decor";
590
686
  }>>;
591
687
  mature: z.ZodBoolean;
592
688
  areaLineage: z.ZodNullable<z.ZodObject<{
@@ -686,6 +782,7 @@ export declare const communityMemberWireSchema: z.ZodObject<{
686
782
  }>>;
687
783
  custom: z.ZodNullable<z.ZodString>;
688
784
  }, z.core.$strip>>;
785
+ identityVerified: z.ZodOptional<z.ZodBoolean>;
689
786
  }, z.core.$strip>;
690
787
  export type CommunityMemberWire = z.infer<typeof communityMemberWireSchema>;
691
788
  /**
@@ -778,6 +875,7 @@ export declare const createCommunityBodySchema: z.ZodObject<{
778
875
  mental_health: "mental_health";
779
876
  photography: "photography";
780
877
  cricket: "cricket";
878
+ gaming: "gaming";
781
879
  entrepreneurship: "entrepreneurship";
782
880
  agriculture: "agriculture";
783
881
  volunteer: "volunteer";
@@ -803,6 +901,19 @@ export declare const createCommunityBodySchema: z.ZodObject<{
803
901
  fundraising: "fundraising";
804
902
  awareness_campaign: "awareness_campaign";
805
903
  social_justice: "social_justice";
904
+ women_empowerment: "women_empowerment";
905
+ rural_development: "rural_development";
906
+ tribal_welfare: "tribal_welfare";
907
+ homeless_support: "homeless_support";
908
+ street_children: "street_children";
909
+ community_growth: "community_growth";
910
+ residents_association: "residents_association";
911
+ housing_society: "housing_society";
912
+ gated_community: "gated_community";
913
+ apartment_living: "apartment_living";
914
+ mohalla_committee: "mohalla_committee";
915
+ newcomers_welcome: "newcomers_welcome";
916
+ neighborhood_safety: "neighborhood_safety";
806
917
  yoga: "yoga";
807
918
  meditation: "meditation";
808
919
  running: "running";
@@ -815,6 +926,11 @@ export declare const createCommunityBodySchema: z.ZodObject<{
815
926
  mens_health: "mens_health";
816
927
  dental_health: "dental_health";
817
928
  eye_care: "eye_care";
929
+ diabetes_support: "diabetes_support";
930
+ cancer_support: "cancer_support";
931
+ heart_health: "heart_health";
932
+ addiction_recovery: "addiction_recovery";
933
+ pregnancy_support: "pregnancy_support";
818
934
  jee: "jee";
819
935
  neet: "neet";
820
936
  upsc: "upsc";
@@ -861,6 +977,13 @@ export declare const createCommunityBodySchema: z.ZodObject<{
861
977
  satsang: "satsang";
862
978
  festivals: "festivals";
863
979
  pilgrimage: "pilgrimage";
980
+ gita_study: "gita_study";
981
+ ramayan: "ramayan";
982
+ bhagwat: "bhagwat";
983
+ vedanta: "vedanta";
984
+ sikh_satsang: "sikh_satsang";
985
+ christian_fellowship: "christian_fellowship";
986
+ jain_swadhyay: "jain_swadhyay";
864
987
  startup: "startup";
865
988
  small_business: "small_business";
866
989
  freelancing: "freelancing";
@@ -870,6 +993,13 @@ export declare const createCommunityBodySchema: z.ZodObject<{
870
993
  handicrafts: "handicrafts";
871
994
  job_postings: "job_postings";
872
995
  web_development: "web_development";
996
+ artificial_intelligence: "artificial_intelligence";
997
+ data_science: "data_science";
998
+ cybersecurity: "cybersecurity";
999
+ app_development: "app_development";
1000
+ ui_ux_design: "ui_ux_design";
1001
+ social_media_marketing: "social_media_marketing";
1002
+ content_creation: "content_creation";
873
1003
  water_supply: "water_supply";
874
1004
  electricity: "electricity";
875
1005
  road_repair: "road_repair";
@@ -879,11 +1009,26 @@ export declare const createCommunityBodySchema: z.ZodObject<{
879
1009
  traffic: "traffic";
880
1010
  parking: "parking";
881
1011
  local_healthcare: "local_healthcare";
1012
+ tailoring: "tailoring";
1013
+ carpentry: "carpentry";
1014
+ electrical_work: "electrical_work";
1015
+ plumbing: "plumbing";
1016
+ beauty_skills: "beauty_skills";
1017
+ driving: "driving";
1018
+ pets: "pets";
1019
+ dog_lovers: "dog_lovers";
1020
+ cat_lovers: "cat_lovers";
1021
+ stray_animal_care: "stray_animal_care";
1022
+ veterinary_help: "veterinary_help";
882
1023
  movies: "movies";
883
1024
  tv_shows: "tv_shows";
884
1025
  books_club: "books_club";
885
1026
  trekking: "trekking";
886
1027
  parenting: "parenting";
1028
+ gardening: "gardening";
1029
+ pottery: "pottery";
1030
+ diy: "diy";
1031
+ home_decor: "home_decor";
887
1032
  }>>>;
888
1033
  mature: z.ZodDefault<z.ZodBoolean>;
889
1034
  }, z.core.$strip>;
@@ -967,6 +1112,7 @@ export declare const updateCommunityBodySchema: z.ZodObject<{
967
1112
  mental_health: "mental_health";
968
1113
  photography: "photography";
969
1114
  cricket: "cricket";
1115
+ gaming: "gaming";
970
1116
  entrepreneurship: "entrepreneurship";
971
1117
  agriculture: "agriculture";
972
1118
  volunteer: "volunteer";
@@ -992,6 +1138,19 @@ export declare const updateCommunityBodySchema: z.ZodObject<{
992
1138
  fundraising: "fundraising";
993
1139
  awareness_campaign: "awareness_campaign";
994
1140
  social_justice: "social_justice";
1141
+ women_empowerment: "women_empowerment";
1142
+ rural_development: "rural_development";
1143
+ tribal_welfare: "tribal_welfare";
1144
+ homeless_support: "homeless_support";
1145
+ street_children: "street_children";
1146
+ community_growth: "community_growth";
1147
+ residents_association: "residents_association";
1148
+ housing_society: "housing_society";
1149
+ gated_community: "gated_community";
1150
+ apartment_living: "apartment_living";
1151
+ mohalla_committee: "mohalla_committee";
1152
+ newcomers_welcome: "newcomers_welcome";
1153
+ neighborhood_safety: "neighborhood_safety";
995
1154
  yoga: "yoga";
996
1155
  meditation: "meditation";
997
1156
  running: "running";
@@ -1004,6 +1163,11 @@ export declare const updateCommunityBodySchema: z.ZodObject<{
1004
1163
  mens_health: "mens_health";
1005
1164
  dental_health: "dental_health";
1006
1165
  eye_care: "eye_care";
1166
+ diabetes_support: "diabetes_support";
1167
+ cancer_support: "cancer_support";
1168
+ heart_health: "heart_health";
1169
+ addiction_recovery: "addiction_recovery";
1170
+ pregnancy_support: "pregnancy_support";
1007
1171
  jee: "jee";
1008
1172
  neet: "neet";
1009
1173
  upsc: "upsc";
@@ -1050,6 +1214,13 @@ export declare const updateCommunityBodySchema: z.ZodObject<{
1050
1214
  satsang: "satsang";
1051
1215
  festivals: "festivals";
1052
1216
  pilgrimage: "pilgrimage";
1217
+ gita_study: "gita_study";
1218
+ ramayan: "ramayan";
1219
+ bhagwat: "bhagwat";
1220
+ vedanta: "vedanta";
1221
+ sikh_satsang: "sikh_satsang";
1222
+ christian_fellowship: "christian_fellowship";
1223
+ jain_swadhyay: "jain_swadhyay";
1053
1224
  startup: "startup";
1054
1225
  small_business: "small_business";
1055
1226
  freelancing: "freelancing";
@@ -1059,6 +1230,13 @@ export declare const updateCommunityBodySchema: z.ZodObject<{
1059
1230
  handicrafts: "handicrafts";
1060
1231
  job_postings: "job_postings";
1061
1232
  web_development: "web_development";
1233
+ artificial_intelligence: "artificial_intelligence";
1234
+ data_science: "data_science";
1235
+ cybersecurity: "cybersecurity";
1236
+ app_development: "app_development";
1237
+ ui_ux_design: "ui_ux_design";
1238
+ social_media_marketing: "social_media_marketing";
1239
+ content_creation: "content_creation";
1062
1240
  water_supply: "water_supply";
1063
1241
  electricity: "electricity";
1064
1242
  road_repair: "road_repair";
@@ -1068,11 +1246,26 @@ export declare const updateCommunityBodySchema: z.ZodObject<{
1068
1246
  traffic: "traffic";
1069
1247
  parking: "parking";
1070
1248
  local_healthcare: "local_healthcare";
1249
+ tailoring: "tailoring";
1250
+ carpentry: "carpentry";
1251
+ electrical_work: "electrical_work";
1252
+ plumbing: "plumbing";
1253
+ beauty_skills: "beauty_skills";
1254
+ driving: "driving";
1255
+ pets: "pets";
1256
+ dog_lovers: "dog_lovers";
1257
+ cat_lovers: "cat_lovers";
1258
+ stray_animal_care: "stray_animal_care";
1259
+ veterinary_help: "veterinary_help";
1071
1260
  movies: "movies";
1072
1261
  tv_shows: "tv_shows";
1073
1262
  books_club: "books_club";
1074
1263
  trekking: "trekking";
1075
1264
  parenting: "parenting";
1265
+ gardening: "gardening";
1266
+ pottery: "pottery";
1267
+ diy: "diy";
1268
+ home_decor: "home_decor";
1076
1269
  }>>>;
1077
1270
  mature: z.ZodOptional<z.ZodBoolean>;
1078
1271
  }, z.core.$strip>;
@@ -1248,6 +1441,7 @@ export declare const communityListResponseSchema: z.ZodObject<{
1248
1441
  mental_health: "mental_health";
1249
1442
  photography: "photography";
1250
1443
  cricket: "cricket";
1444
+ gaming: "gaming";
1251
1445
  entrepreneurship: "entrepreneurship";
1252
1446
  agriculture: "agriculture";
1253
1447
  volunteer: "volunteer";
@@ -1273,6 +1467,19 @@ export declare const communityListResponseSchema: z.ZodObject<{
1273
1467
  fundraising: "fundraising";
1274
1468
  awareness_campaign: "awareness_campaign";
1275
1469
  social_justice: "social_justice";
1470
+ women_empowerment: "women_empowerment";
1471
+ rural_development: "rural_development";
1472
+ tribal_welfare: "tribal_welfare";
1473
+ homeless_support: "homeless_support";
1474
+ street_children: "street_children";
1475
+ community_growth: "community_growth";
1476
+ residents_association: "residents_association";
1477
+ housing_society: "housing_society";
1478
+ gated_community: "gated_community";
1479
+ apartment_living: "apartment_living";
1480
+ mohalla_committee: "mohalla_committee";
1481
+ newcomers_welcome: "newcomers_welcome";
1482
+ neighborhood_safety: "neighborhood_safety";
1276
1483
  yoga: "yoga";
1277
1484
  meditation: "meditation";
1278
1485
  running: "running";
@@ -1285,6 +1492,11 @@ export declare const communityListResponseSchema: z.ZodObject<{
1285
1492
  mens_health: "mens_health";
1286
1493
  dental_health: "dental_health";
1287
1494
  eye_care: "eye_care";
1495
+ diabetes_support: "diabetes_support";
1496
+ cancer_support: "cancer_support";
1497
+ heart_health: "heart_health";
1498
+ addiction_recovery: "addiction_recovery";
1499
+ pregnancy_support: "pregnancy_support";
1288
1500
  jee: "jee";
1289
1501
  neet: "neet";
1290
1502
  upsc: "upsc";
@@ -1331,6 +1543,13 @@ export declare const communityListResponseSchema: z.ZodObject<{
1331
1543
  satsang: "satsang";
1332
1544
  festivals: "festivals";
1333
1545
  pilgrimage: "pilgrimage";
1546
+ gita_study: "gita_study";
1547
+ ramayan: "ramayan";
1548
+ bhagwat: "bhagwat";
1549
+ vedanta: "vedanta";
1550
+ sikh_satsang: "sikh_satsang";
1551
+ christian_fellowship: "christian_fellowship";
1552
+ jain_swadhyay: "jain_swadhyay";
1334
1553
  startup: "startup";
1335
1554
  small_business: "small_business";
1336
1555
  freelancing: "freelancing";
@@ -1340,6 +1559,13 @@ export declare const communityListResponseSchema: z.ZodObject<{
1340
1559
  handicrafts: "handicrafts";
1341
1560
  job_postings: "job_postings";
1342
1561
  web_development: "web_development";
1562
+ artificial_intelligence: "artificial_intelligence";
1563
+ data_science: "data_science";
1564
+ cybersecurity: "cybersecurity";
1565
+ app_development: "app_development";
1566
+ ui_ux_design: "ui_ux_design";
1567
+ social_media_marketing: "social_media_marketing";
1568
+ content_creation: "content_creation";
1343
1569
  water_supply: "water_supply";
1344
1570
  electricity: "electricity";
1345
1571
  road_repair: "road_repair";
@@ -1349,11 +1575,26 @@ export declare const communityListResponseSchema: z.ZodObject<{
1349
1575
  traffic: "traffic";
1350
1576
  parking: "parking";
1351
1577
  local_healthcare: "local_healthcare";
1578
+ tailoring: "tailoring";
1579
+ carpentry: "carpentry";
1580
+ electrical_work: "electrical_work";
1581
+ plumbing: "plumbing";
1582
+ beauty_skills: "beauty_skills";
1583
+ driving: "driving";
1584
+ pets: "pets";
1585
+ dog_lovers: "dog_lovers";
1586
+ cat_lovers: "cat_lovers";
1587
+ stray_animal_care: "stray_animal_care";
1588
+ veterinary_help: "veterinary_help";
1352
1589
  movies: "movies";
1353
1590
  tv_shows: "tv_shows";
1354
1591
  books_club: "books_club";
1355
1592
  trekking: "trekking";
1356
1593
  parenting: "parenting";
1594
+ gardening: "gardening";
1595
+ pottery: "pottery";
1596
+ diy: "diy";
1597
+ home_decor: "home_decor";
1357
1598
  }>>;
1358
1599
  mature: z.ZodBoolean;
1359
1600
  areaLineage: z.ZodNullable<z.ZodObject<{
@@ -1478,6 +1719,7 @@ export declare const communityMembersListResponseSchema: z.ZodObject<{
1478
1719
  }>>;
1479
1720
  custom: z.ZodNullable<z.ZodString>;
1480
1721
  }, z.core.$strip>>;
1722
+ identityVerified: z.ZodOptional<z.ZodBoolean>;
1481
1723
  }, z.core.$strip>>;
1482
1724
  nextCursor: z.ZodNullable<z.ZodString>;
1483
1725
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"community.d.ts","sourceRoot":"","sources":["../src/community.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,8CAA+C,CAAC;AAClF,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AACnE,eAAO,MAAM,mBAAmB;;;;EAAgC,CAAC;AAEjE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB,kEAMzB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AACrE,eAAO,MAAM,oBAAoB;;;;;;EAAiC,CAAC;AAEnE;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,0CAA2C,CAAC;AACxF,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC;AACtF,eAAO,MAAM,4BAA4B;;;;EAA0C,CAAC;AAEpF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,yBAAyB,22BAgE5B,CAAC;AACX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;A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0B;;;;;iBAErC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAI9E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;iBAYvC,CAAC;AACL,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAItF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;iBAKpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAI5E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,yCAA0C,CAAC;AAChF,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AACxE,eAAO,MAAM,qBAAqB;;;;EAAmC,CAAC;AAEtE,eAAO,MAAM,qBAAqB;;;;;;;;iBAKhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,oBAAoB;;;;;;;;;iBAK/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,wBAAwB;;;;;;;;;;;iBAEnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
package/dist/community.js CHANGED
@@ -162,7 +162,7 @@ export const communityCategorySchema = z.enum(COMMUNITY_CATEGORY_VALUES);
162
162
  * arts/music/faith, business/tech, local issues, and lifestyle.
163
163
  */
164
164
  export const COMMUNITY_TAG_VALUES = [
165
- // Civic & social (24)
165
+ // Civic & social (29)
166
166
  'volunteer',
167
167
  'donation_drive',
168
168
  'blood_donation',
@@ -187,7 +187,21 @@ export const COMMUNITY_TAG_VALUES = [
187
187
  'fundraising',
188
188
  'awareness_campaign',
189
189
  'social_justice',
190
- // Health & wellness (14)
190
+ 'women_empowerment',
191
+ 'rural_development',
192
+ 'tribal_welfare',
193
+ 'homeless_support',
194
+ 'street_children',
195
+ // Community & neighborhood (8) — new theme
196
+ 'community_growth',
197
+ 'residents_association',
198
+ 'housing_society',
199
+ 'gated_community',
200
+ 'apartment_living',
201
+ 'mohalla_committee',
202
+ 'newcomers_welcome',
203
+ 'neighborhood_safety',
204
+ // Health & wellness (19)
191
205
  'yoga',
192
206
  'meditation',
193
207
  'fitness',
@@ -202,6 +216,11 @@ export const COMMUNITY_TAG_VALUES = [
202
216
  'mens_health',
203
217
  'dental_health',
204
218
  'eye_care',
219
+ 'diabetes_support',
220
+ 'cancer_support',
221
+ 'heart_health',
222
+ 'addiction_recovery',
223
+ 'pregnancy_support',
205
224
  // Education (16)
206
225
  'jee',
207
226
  'neet',
@@ -240,7 +259,7 @@ export const COMMUNITY_TAG_VALUES = [
240
259
  'south_indian',
241
260
  'baking',
242
261
  'desserts',
243
- // Arts, music, faith (14)
262
+ // Arts, music, faith (21)
244
263
  'classical_music',
245
264
  'hindustani',
246
265
  'carnatic',
@@ -255,7 +274,14 @@ export const COMMUNITY_TAG_VALUES = [
255
274
  'satsang',
256
275
  'festivals',
257
276
  'pilgrimage',
258
- // Business & tech (11)
277
+ 'gita_study',
278
+ 'ramayan',
279
+ 'bhagwat',
280
+ 'vedanta',
281
+ 'sikh_satsang',
282
+ 'christian_fellowship',
283
+ 'jain_swadhyay',
284
+ // Business & tech (19)
259
285
  'entrepreneurship',
260
286
  'startup',
261
287
  'small_business',
@@ -267,6 +293,14 @@ export const COMMUNITY_TAG_VALUES = [
267
293
  'handicrafts',
268
294
  'job_postings',
269
295
  'web_development',
296
+ 'artificial_intelligence',
297
+ 'data_science',
298
+ 'cybersecurity',
299
+ 'app_development',
300
+ 'ui_ux_design',
301
+ 'social_media_marketing',
302
+ 'content_creation',
303
+ 'gaming',
270
304
  // Local issues (9)
271
305
  'water_supply',
272
306
  'electricity',
@@ -277,12 +311,29 @@ export const COMMUNITY_TAG_VALUES = [
277
311
  'traffic',
278
312
  'parking',
279
313
  'local_healthcare',
280
- // Lifestyle (5)
314
+ // Skills & trades (6) — new theme
315
+ 'tailoring',
316
+ 'carpentry',
317
+ 'electrical_work',
318
+ 'plumbing',
319
+ 'beauty_skills',
320
+ 'driving',
321
+ // Pets & animals (5) — new theme
322
+ 'pets',
323
+ 'dog_lovers',
324
+ 'cat_lovers',
325
+ 'stray_animal_care',
326
+ 'veterinary_help',
327
+ // Lifestyle (9)
281
328
  'movies',
282
329
  'tv_shows',
283
330
  'books_club',
284
331
  'trekking',
285
332
  'parenting',
333
+ 'gardening',
334
+ 'pottery',
335
+ 'diy',
336
+ 'home_decor',
286
337
  ];
287
338
  export const communityTagSchema = z.enum(COMMUNITY_TAG_VALUES);
288
339
  /**
@@ -450,6 +501,11 @@ export const communityMemberWireSchema = z.object({
450
501
  /** Per-community representation label. See
451
502
  * `communityDesignationSchema` — null when none set. */
452
503
  designation: communityDesignationSchema.nullable(),
504
+ /** True when this user has been identity-verified by a Jansathi
505
+ * volunteer / leader. Drives the green check badge in the member
506
+ * roster row. Optional for forward-compat with un-migrated
507
+ * backends. */
508
+ identityVerified: z.boolean().optional(),
453
509
  });
454
510
  // ─── Create body ────────────────────────────────────────────────────────────
455
511
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"community.js","sourceRoot":"","sources":["../src/community.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,sCAAsC,EACtC,sCAAsC,EACtC,oCAAoC,EACpC,kBAAkB,EAClB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AAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC;CACrC,CAAC,CAAC","sourcesContent":["/**\n * Topical Community wire shapes.\n *\n * A Community is a Reddit-subreddit / Facebook-group style surface: a\n * named topic users can discover, join, and post into. Distinct from\n * the user-created `Group` (chat-bound, small, private) — each\n * Community auto-owns its own bound `Group` (so members get a\n * Community chat room for free) but they're conceptually different\n * objects with their own roster + permissions.\n *\n * Visibility model\n * ----------------\n * - `public` — anyone can join one-tap; posts are visible to all\n * viewers in the community feed.\n * - `private` — joining requires owner / admin approval; posts and\n * member list are hidden from non-members. Discovery\n * still lists the community card (name + description +\n * member count + join button) so users can request to\n * join.\n *\n * Posts inside a community do NOT participate in the geo cascade —\n * they live and die inside the community surface. Posts authored\n * from the global composer continue to flow through the geo\n * area-proximity cascade ranked by `tierBoost` (see\n * `reform-backend/src/services/community/services/visibility.service.ts`).\n *\n * @module community-schema/community\n */\n\nimport { z } from 'zod';\nimport { areaLineageSnapshotSchema } from './area.js';\nimport {\n COMMUNITIES_PAGE_SIZE,\n COMMUNITY_DESCRIPTION_MAX_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_MAX_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_MIN_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_PATTERN,\n COMMUNITY_MAX_TAGS,\n COMMUNITY_NAME_MAX_CHARS,\n COMMUNITY_NAME_MIN_CHARS,\n COMMUNITY_SLUG_MAX_CHARS,\n COMMUNITY_SLUG_MIN_CHARS,\n COMMUNITY_SLUG_PATTERN,\n} from './constants.js';\n\n// ─── Enums ──────────────────────────────────────────────────────────────────\n\n/**\n * public — anyone can read + post.\n * restricted — anyone can read; only approved members can post. The\n * middle option Reddit added so communities can be open\n * to browse but moderated on the write side.\n * private — only approved members can read or post. The roster\n * + post bodies are hidden from non-members.\n */\nexport const COMMUNITY_TYPE_VALUES = ['public', 'restricted', 'private'] as const;\nexport type CommunityType = (typeof COMMUNITY_TYPE_VALUES)[number];\nexport const communityTypeSchema = z.enum(COMMUNITY_TYPE_VALUES);\n\n/**\n * Geographic scope a community claims. Maps onto the existing\n * area-lineage tiers so discovery can match a viewer's `areaLineage`\n * one tier at a time.\n *\n * neighborhood — hyperlocal; carries `areaLineage.localId` +\n * `centerCoords`. Discovery uses the 5 km radius from\n * `COMMUNITY_HYPERLOCAL_RADIUS_KM`.\n * city — district-scoped; carries `areaLineage.districtId`.\n * state — carries `areaLineage.stateId`.\n * national — carries `areaLineage.countryId`.\n * global — area-agnostic; `areaLineage` is null.\n */\nexport const COMMUNITY_REACH_VALUES = [\n 'neighborhood',\n 'city',\n 'state',\n 'national',\n 'global',\n] as const;\nexport type CommunityReach = (typeof COMMUNITY_REACH_VALUES)[number];\nexport const communityReachSchema = z.enum(COMMUNITY_REACH_VALUES);\n\n/**\n * Verification scope on a verified community — which leader-tier\n * vouched for it.\n *\n * state — a state-level leader verified within their own state.\n * national — a national-level leader (or higher).\n * global — a global / platform-level leader.\n */\nexport const COMMUNITY_VERIFIED_SCOPE_VALUES = ['state', 'national', 'global'] as const;\nexport type CommunityVerifiedScope = (typeof COMMUNITY_VERIFIED_SCOPE_VALUES)[number];\nexport const communityVerifiedScopeSchema = z.enum(COMMUNITY_VERIFIED_SCOPE_VALUES);\n\n/**\n * Curated category enum. Slugs are **stable English keys** (snake_case);\n * the visible label is i18n'd on the frontend (en/hi message files).\n * Never store culturally-specific or transliterated names here — the\n * locale layer owns presentation.\n *\n * First 12 slugs are weighted toward the Indian civic / hyperlocal\n * context that Jansathi serves (Women's / Men's / Youth groups, RWA,\n * Social Welfare, Civic Reform). Remaining 30 are general-interest\n * categories adapted from Reddit's curated topic set + Facebook\n * Groups' top discovery categories.\n *\n * See `docs/community-create-v2.md` §2 in the jansathi-frontend repo\n * for the full label table.\n */\nexport const COMMUNITY_CATEGORY_VALUES = [\n // Indian civic / community (12)\n 'womens_group',\n 'mens_group',\n 'youth_group',\n 'senior_citizens',\n 'parenting_children',\n 'resident_welfare',\n 'social_welfare',\n 'social_awareness',\n 'volunteering',\n 'civic_reform',\n 'local_news_issues',\n 'environment',\n // Civic & legal (3)\n 'legal_law',\n 'politics_government',\n 'real_estate_housing',\n // Faith & culture (3)\n 'religion_spirituality',\n 'festivals_culture',\n 'devotional',\n // Education & sciences (5)\n 'education',\n 'competitive_exams',\n 'books_literature',\n 'language_learning',\n 'science',\n // Health & wellness (4)\n 'health_wellness',\n 'yoga_meditation',\n 'fitness',\n 'mental_health',\n // Identity & society (2)\n 'lgbtq_identity',\n 'mature_topics',\n // Lifestyle (7)\n 'food_cooking',\n 'travel',\n 'photography',\n 'fashion_beauty',\n 'home_garden',\n 'pets_animals',\n 'vehicles_automotive',\n // Sports & arts (5)\n 'sports',\n 'cricket',\n 'arts_crafts',\n 'music',\n 'dance',\n // Entertainment (4)\n 'movies_tv',\n 'gaming',\n 'entertainment',\n 'anime_cosplay',\n // Professional (5)\n 'business_career',\n 'entrepreneurship',\n 'technology',\n 'finance_investing',\n 'agriculture',\n // Information (1) + fallback (1)\n 'news_current_affairs',\n 'other',\n] as const;\nexport type CommunityCategory = (typeof COMMUNITY_CATEGORY_VALUES)[number];\nexport const communityCategorySchema = z.enum(COMMUNITY_CATEGORY_VALUES);\n\n/**\n * Curated tag enum. A community picks 0–`COMMUNITY_MAX_TAGS` from\n * this list. Tags are stable English snake_case slugs; the visible\n * label is i18n'd. The tag picker UI groups them by theme via a\n * separate theme-map on the frontend; the stored enum is flat.\n *\n * Total: 112 tags spanning civic, health, education, sports, food,\n * arts/music/faith, business/tech, local issues, and lifestyle.\n */\nexport const COMMUNITY_TAG_VALUES = [\n // Civic & social (24)\n 'volunteer',\n 'donation_drive',\n 'blood_donation',\n 'anti_corruption',\n 'women_safety',\n 'child_safety',\n 'senior_care',\n 'disability_support',\n 'lgbtq_support',\n 'environment',\n 'cleanliness',\n 'plant_trees',\n 'waste_management',\n 'legal_aid',\n 'rti',\n 'voter_awareness',\n 'government_schemes',\n 'ngo',\n 'charity',\n 'relief_work',\n 'public_service',\n 'fundraising',\n 'awareness_campaign',\n 'social_justice',\n // Health & wellness (14)\n 'yoga',\n 'meditation',\n 'fitness',\n 'running',\n 'cycling',\n 'walking',\n 'nutrition',\n 'mental_health',\n 'ayurveda',\n 'weight_loss',\n 'womens_health',\n 'mens_health',\n 'dental_health',\n 'eye_care',\n // Education (16)\n 'jee',\n 'neet',\n 'upsc',\n 'ssc',\n 'ielts',\n 'school_support',\n 'college_support',\n 'scholarship',\n 'career_guidance',\n 'coding',\n 'mathematics',\n 'science',\n 'languages',\n 'spoken_english',\n 'tutoring',\n 'study_abroad',\n // Sports (9)\n 'cricket',\n 'football',\n 'badminton',\n 'tennis',\n 'kabaddi',\n 'hockey',\n 'chess',\n 'swimming',\n 'marathon',\n // Food (10)\n 'street_food',\n 'home_cooking',\n 'vegetarian',\n 'vegan',\n 'jain_food',\n 'fasting_recipes',\n 'north_indian',\n 'south_indian',\n 'baking',\n 'desserts',\n // Arts, music, faith (14)\n 'classical_music',\n 'hindustani',\n 'carnatic',\n 'bhajan',\n 'kirtan',\n 'bollywood',\n 'dance_classical',\n 'dance_folk',\n 'painting',\n 'photography',\n 'craft',\n 'satsang',\n 'festivals',\n 'pilgrimage',\n // Business & tech (11)\n 'entrepreneurship',\n 'startup',\n 'small_business',\n 'freelancing',\n 'real_estate',\n 'stocks_investing',\n 'mutual_funds',\n 'agriculture',\n 'handicrafts',\n 'job_postings',\n 'web_development',\n // Local issues (9)\n 'water_supply',\n 'electricity',\n 'road_repair',\n 'garbage_collection',\n 'drainage',\n 'public_transport',\n 'traffic',\n 'parking',\n 'local_healthcare',\n // Lifestyle (5)\n 'movies',\n 'tv_shows',\n 'books_club',\n 'trekking',\n 'parenting',\n] as const;\nexport type CommunityTag = (typeof COMMUNITY_TAG_VALUES)[number];\nexport const communityTagSchema = z.enum(COMMUNITY_TAG_VALUES);\n\n/**\n * Preset designation labels — purely **representation** (not\n * permission-bearing). Renders in brackets after a member's display\n * name in a community context (e.g., \"Hari Joshi (Chairman) · 12h ago\").\n *\n * Permission still flows through `CommunityRole` (owner / admin /\n * member). A designation does NOT promote or restrict anything.\n *\n * Per-community: Hari can be \"Chairman\" in one community and\n * \"Member-at-Large\" in another. Custom designations (free text)\n * cover the long tail; presets are surfaced first in the picker.\n */\nexport const COMMUNITY_DESIGNATION_PRESETS = [\n 'chairman',\n 'vice_chairman',\n 'president',\n 'vice_president',\n 'secretary',\n 'joint_secretary',\n 'general_secretary',\n 'treasurer',\n 'joint_treasurer',\n 'organizer',\n 'coordinator',\n 'spokesperson',\n 'founder',\n 'co_founder',\n 'patron',\n 'advisor',\n 'mentor',\n 'committee_member',\n 'member_at_large',\n 'volunteer',\n] as const;\nexport type CommunityDesignationPreset = (typeof COMMUNITY_DESIGNATION_PRESETS)[number];\nexport const communityDesignationPresetSchema = z.enum(COMMUNITY_DESIGNATION_PRESETS);\n\n/**\n * Designation stored on a `CommunityMembership`. Exactly one of\n * `preset` / `custom` is non-null when a designation is set.\n *\n * { preset: 'chairman', custom: null } — picked from the preset enum.\n * { preset: null, custom: 'Press & Media' } — free text.\n * null — no designation.\n *\n * The picker UI surfaces the preset list first; the custom path is\n * for niche labels that don't fit a preset. Validation enforces\n * exactly-one via a refinement.\n */\nexport const communityDesignationSchema = z\n .object({\n preset: communityDesignationPresetSchema.nullable(),\n custom: z.string().nullable(),\n })\n .refine((d) => (d.preset == null) !== (d.custom == null), {\n message: 'Designation must have exactly one of `preset` or `custom` set.',\n });\nexport type CommunityDesignation = z.infer<typeof communityDesignationSchema>;\n\n/**\n * Latitude / longitude pair used for hyperlocal (`reach=neighborhood`)\n * communities. Stored at create time from either the picked area's\n * centroid (if the Area carries coordinates) or the creator's current\n * GPS as a fallback. Indexed 2dsphere on the backend; powers the\n * `$nearSphere` query inside the `?nearMe=true` listing filter.\n */\nexport const communityCenterCoordsSchema = z.object({\n lat: z.number().min(-90).max(90),\n lng: z.number().min(-180).max(180),\n});\nexport type CommunityCenterCoords = z.infer<typeof communityCenterCoordsSchema>;\n\n/** Role hierarchy within a single community.\n *\n * owner — creator; cannot be demoted by anyone, can transfer\n * ownership (deferred for v1) and delete the community.\n * admin — granted by owner; can edit metadata, kick members,\n * soft-delete posts authored in the community.\n * member — joined; can post and comment, can leave at any time.\n */\nexport const COMMUNITY_ROLE_VALUES = ['owner', 'admin', 'member'] as const;\nexport type CommunityRole = (typeof COMMUNITY_ROLE_VALUES)[number];\nexport const communityRoleSchema = z.enum(COMMUNITY_ROLE_VALUES);\n\n/** Membership lifecycle.\n *\n * active — currently in the community.\n * pending — for a `private` community: the join request is awaiting\n * owner/admin approval. Pending rows aren't counted toward\n * `memberCount` and the user can't post yet.\n */\nexport const COMMUNITY_MEMBERSHIP_STATUS_VALUES = ['active', 'pending'] as const;\nexport type CommunityMembershipStatus = (typeof COMMUNITY_MEMBERSHIP_STATUS_VALUES)[number];\nexport const communityMembershipStatusSchema = z.enum(COMMUNITY_MEMBERSHIP_STATUS_VALUES);\n\n// ─── Wire shape ─────────────────────────────────────────────────────────────\n\n/**\n * `GET /communities/:slug` / discovery card / search hit.\n *\n * `viewer` is included when the request is authenticated. It carries\n * the viewer's role + membership status so the UI can render the\n * right CTA (Join / Joined / Pending / Owner) without a follow-up\n * round trip.\n */\nexport const communityWireSchema = z.object({\n _id: z.string(),\n slug: z.string(),\n name: z.string().min(COMMUNITY_NAME_MIN_CHARS).max(COMMUNITY_NAME_MAX_CHARS),\n description: z.string().max(COMMUNITY_DESCRIPTION_MAX_CHARS).optional(),\n type: communityTypeSchema,\n coverImageUrl: z.string().url().optional(),\n ownerUserId: z.string(),\n /** Active members only. Pending join-requests don't count. */\n memberCount: z.number().int().nonnegative(),\n /** Denormalised post count. Increments on create, decrements on\n * soft-delete. */\n postCount: z.number().int().nonnegative(),\n /** Bound chat-group id. Auto-created when the Community is created;\n * members are added to both rosters in lockstep. */\n groupId: z.string(),\n createdAt: z.string().datetime(),\n\n // ─── v2 taxonomy + reach + verification ─────────────────────────────\n /** Curated subject category. Single source of truth in\n * `COMMUNITY_CATEGORY_VALUES`; visible label is i18n'd. */\n category: communityCategorySchema,\n /** Geographic scope. Drives discovery filtering and is the reason\n * `areaLineage` / `centerCoords` may be present. */\n reach: communityReachSchema,\n /** Up to `COMMUNITY_MAX_TAGS` (10) tags from the curated enum. */\n tags: z.array(communityTagSchema),\n /** Mature (18+) flag. Content-gates the surface (blur previews,\n * age-confirm) once the gate UI ships; the field is persisted\n * from create-time so the mature designation is permanent. */\n mature: z.boolean(),\n /** Area snapshot — present when `reach !== 'global'`. Mirrors the\n * post-area lineage pattern; written once at create time and\n * immutable thereafter. */\n areaLineage: areaLineageSnapshotSchema.nullable(),\n /** Lat/lng pair — present when `reach === 'neighborhood'`. Powers\n * the `?nearMe=true` 5 km geospatial filter on discovery. */\n centerCoords: communityCenterCoordsSchema.nullable(),\n /** ISO timestamp set by a state+ leader when verifying the\n * community. Null until verified; clearing reverts to null. */\n verifiedAt: z.string().datetime().nullable(),\n /** UserId of the leader who verified. */\n verifiedBy: z.string().nullable(),\n /** Which leader tier vouched — drives the badge tooltip (\"verified\n * by a state leader\" vs \"by a national leader\"). */\n verifiedScope: communityVerifiedScopeSchema.nullable(),\n\n viewer: z\n .object({\n role: communityRoleSchema.nullable(),\n status: communityMembershipStatusSchema.nullable(),\n joinedAt: z.string().datetime().nullable(),\n /** Viewer's designation in THIS community. Null when the\n * viewer is not a member or has no designation set. Returned\n * at the wire level (vs the roster level) so post-cards and\n * the byline can render `(Chairman)` without a separate\n * roster lookup. */\n designation: communityDesignationSchema.nullable(),\n })\n .optional(),\n});\nexport type CommunityWire = z.infer<typeof communityWireSchema>;\n\n// ─── Member roster row ──────────────────────────────────────────────────────\n\nexport const communityMemberWireSchema = z.object({\n userId: z.string(),\n displayName: z.string(),\n avatarUrl: z.string().url().optional(),\n localName: z.string().optional(),\n role: communityRoleSchema,\n status: communityMembershipStatusSchema,\n joinedAt: z.string().datetime(),\n /** Per-community representation label. See\n * `communityDesignationSchema` — null when none set. */\n designation: communityDesignationSchema.nullable(),\n});\nexport type CommunityMemberWire = z.infer<typeof communityMemberWireSchema>;\n\n// ─── Create body ────────────────────────────────────────────────────────────\n\n/**\n * `POST /communities` body. `slug` is optional — when omitted the\n * backend auto-generates one from the name (lowercased, hyphenated,\n * collision-suffixed). When provided it must match the slug pattern\n * and be unique.\n *\n * `areaId` is required when `reach !== 'global'` — it's the deepest-\n * matching area-entity id (`localId` for neighborhood, `districtId`\n * for city, etc.) the creator picked from the area picker. The\n * backend resolves the full `areaLineage` snapshot from this id.\n */\nexport const createCommunityBodySchema = z\n .object({\n name: z.string().min(COMMUNITY_NAME_MIN_CHARS).max(COMMUNITY_NAME_MAX_CHARS),\n slug: z\n .string()\n .min(COMMUNITY_SLUG_MIN_CHARS)\n .max(COMMUNITY_SLUG_MAX_CHARS)\n .regex(COMMUNITY_SLUG_PATTERN)\n .optional(),\n description: z.string().max(COMMUNITY_DESCRIPTION_MAX_CHARS).optional(),\n type: communityTypeSchema,\n coverImageUrl: z.string().url().optional(),\n // ── v2 fields ─────────────────────────────────────────────────\n category: communityCategorySchema,\n reach: communityReachSchema,\n /** ObjectId of the picked area at the reach's tier. Required iff\n * `reach !== 'global'`. */\n areaId: z.string().optional(),\n tags: z.array(communityTagSchema).max(COMMUNITY_MAX_TAGS).default([]),\n mature: z.boolean().default(false),\n })\n .superRefine((body, ctx) => {\n if (body.reach !== 'global' && !body.areaId) {\n ctx.addIssue({\n code: 'custom',\n path: ['areaId'],\n message: 'Area is required when reach is not Global.',\n });\n }\n });\nexport type CreateCommunityBody = z.infer<typeof createCommunityBodySchema>;\n\n// ─── Update body (owner / admin only) ───────────────────────────────────────\n\n/**\n * `PATCH /communities/:slug` body. All fields optional. Sending\n * `null` for `description` or `coverImageUrl` clears that field.\n *\n * Type changes between `public` / `restricted` / `private` are NOT\n * supported in v1 — the decision has implications for already-\n * published posts and pending join requests that we don't want to\n * silently handle. Recreate the community if you need to switch.\n *\n * `category`, `tags`, `mature` are editable post-create. `reach` and\n * `areaLineage` / `centerCoords` are NOT editable — moving a community\n * across geographic scopes would silently invalidate every existing\n * member's relationship with it.\n */\nexport const updateCommunityBodySchema = z.object({\n name: z.string().min(COMMUNITY_NAME_MIN_CHARS).max(COMMUNITY_NAME_MAX_CHARS).optional(),\n description: z.string().max(COMMUNITY_DESCRIPTION_MAX_CHARS).nullable().optional(),\n coverImageUrl: z.string().url().nullable().optional(),\n category: communityCategorySchema.optional(),\n tags: z.array(communityTagSchema).max(COMMUNITY_MAX_TAGS).optional(),\n mature: z.boolean().optional(),\n});\nexport type UpdateCommunityBody = z.infer<typeof updateCommunityBodySchema>;\n\n// ─── List + discover + search responses ─────────────────────────────────────\n\n/** Sort order on the discover page. `popular` ranks by active member\n * count, `new` by createdAt desc. `top` is reserved for a future\n * activity-weighted ranking and accepted as a no-op for now. */\nexport const COMMUNITY_DISCOVER_SORT_VALUES = ['popular', 'new', 'top'] as const;\nexport type CommunityDiscoverSort = (typeof COMMUNITY_DISCOVER_SORT_VALUES)[number];\nexport const communityDiscoverSortSchema = z.enum(COMMUNITY_DISCOVER_SORT_VALUES);\n\nexport const communityListQuerySchema = z.object({\n sort: communityDiscoverSortSchema.optional(),\n /** Free-text fragment matched case-insensitively against the\n * community name. */\n q: z.string().max(60).optional(),\n cursor: z.string().optional(),\n pageSize: z.number().int().min(1).max(COMMUNITIES_PAGE_SIZE).optional(),\n // ── v2 discovery filters ─────────────────────────────────────────\n /** Filter by curated subject category. */\n category: communityCategorySchema.optional(),\n /** Filter by geographic reach tier. */\n reach: communityReachSchema.optional(),\n /** Return only verified communities. */\n verified: z.boolean().optional(),\n /** Layered \"near me\" mode — when true, returns the union of:\n * • `reach=neighborhood` AND `centerCoords` within\n * `COMMUNITY_HYPERLOCAL_RADIUS_KM` of the supplied (lat, lng),\n * • `reach=city` AND `districtId = viewer.districtId`,\n * • `reach=state` AND `stateId = viewer.stateId`,\n * • `reach=national` AND `countryId = viewer.countryId`.\n * `lat` + `lng` must accompany the flag (typically from the\n * viewer's currentLocation GPS). */\n nearMe: z.boolean().optional(),\n lat: z.number().min(-90).max(90).optional(),\n lng: z.number().min(-180).max(180).optional(),\n});\nexport type CommunityListQuery = z.infer<typeof communityListQuerySchema>;\n\nexport const communityListResponseSchema = z.object({\n items: z.array(communityWireSchema),\n nextCursor: z.string().nullable(),\n});\nexport type CommunityListResponse = z.infer<typeof communityListResponseSchema>;\n\n// ─── Membership actions ────────────────────────────────────────────────────\n\n/**\n * `POST /communities/:slug/join`. Response carries the new viewer\n * state so the client can update the CTA without a follow-up GET.\n *\n * - public → returns `{ status: 'active', role: 'member' }`\n * - private → returns `{ status: 'pending', role: null }`; the\n * owner / admin approves via the moderation endpoint\n * (`POST /communities/:slug/members/:userId/approve`).\n */\nexport const joinCommunityResponseSchema = z.object({\n status: communityMembershipStatusSchema,\n role: communityRoleSchema.nullable(),\n joinedAt: z.string().datetime().nullable(),\n});\nexport type JoinCommunityResponse = z.infer<typeof joinCommunityResponseSchema>;\n\nexport const communityMembersListResponseSchema = z.object({\n items: z.array(communityMemberWireSchema),\n nextCursor: z.string().nullable(),\n});\nexport type CommunityMembersListResponse = z.infer<typeof communityMembersListResponseSchema>;\n\n/** Body for `POST /communities/:slug/members/:userId/role` — owner-\n * only. Used to promote a member to admin or demote an admin back\n * to plain member. Owner role can't be set via this endpoint;\n * transferring ownership has its own dedicated route (deferred). */\nexport const updateMemberRoleBodySchema = z.object({\n role: z.enum(['admin', 'member']),\n});\nexport type UpdateMemberRoleBody = z.infer<typeof updateMemberRoleBodySchema>;\n\n// ─── Designation (representation, not permission) ──────────────────────────\n\n/**\n * Body for `PUT /communities/:slug/members/:userId/designation`.\n * Owner / admin only. Exactly one of `preset` / `custom` must be set.\n *\n * Use the preset list first (one-tap pick from `CommunityDesignationPreset`);\n * fall through to `custom` for niche labels (\"Press & Media\",\n * \"Disaster Response Lead\", etc.) that don't fit a preset.\n *\n * To clear an existing designation, use `DELETE` on the same path —\n * there's no \"null\" mode on this body.\n */\nexport const setMemberDesignationBodySchema = z\n .object({\n preset: communityDesignationPresetSchema.optional(),\n custom: z\n .string()\n .min(COMMUNITY_DESIGNATION_CUSTOM_MIN_CHARS)\n .max(COMMUNITY_DESIGNATION_CUSTOM_MAX_CHARS)\n .regex(COMMUNITY_DESIGNATION_CUSTOM_PATTERN)\n .optional(),\n })\n .refine((b) => (b.preset != null) !== (b.custom != null), {\n message: 'Provide exactly one of `preset` or `custom`.',\n });\nexport type SetMemberDesignationBody = z.infer<typeof setMemberDesignationBodySchema>;\n\n// ─── Verification (state+ leader vouch) ────────────────────────────────────\n\n/**\n * Body for `POST /communities/:slug/verify`. Empty for now; the\n * verifier's scope (`state | national | global`) is derived from the\n * caller's leader role rather than supplied. Keeping a body object\n * leaves room for a `note` field later without a breaking change.\n */\nexport const verifyCommunityBodySchema = z.object({\n /** Optional free-text note the leader can attach to the verification\n * (visible in the verification audit trail; not surfaced in the\n * default badge tooltip). Capped at 200 chars. */\n note: z.string().max(200).optional(),\n});\nexport type VerifyCommunityBody = z.infer<typeof verifyCommunityBodySchema>;\n\n// ─── Area picker query (powers the cascading area sheet) ───────────────────\n\n/**\n * `GET /areas?level=...&parentId=...&q=...` — backs the area picker\n * inside the create-community wizard's step 3. Returns areas at the\n * specified `level` that sit under the given parent area:\n *\n * level=local → returns localities under a `districtId` parent.\n * level=district → returns districts under a `stateId` parent.\n * level=state → returns states under a `countryId` parent.\n *\n * The picker constrains the user to siblings under their own parent\n * area (so a Maharashtra creator can pick any locality in Maharashtra\n * for a neighborhood community, but not one in Tamil Nadu).\n */\nexport const AREA_PICKER_LEVEL_VALUES = ['local', 'district', 'state'] as const;\nexport type AreaPickerLevel = (typeof AREA_PICKER_LEVEL_VALUES)[number];\nexport const areaPickerLevelSchema = z.enum(AREA_PICKER_LEVEL_VALUES);\n\nexport const areaPickerQuerySchema = z.object({\n level: areaPickerLevelSchema,\n parentId: z.string(),\n /** Optional name prefix for debounced search inside the sheet. */\n q: z.string().max(60).optional(),\n});\nexport type AreaPickerQuery = z.infer<typeof areaPickerQuerySchema>;\n\nexport const areaPickerItemSchema = z.object({\n _id: z.string(),\n name: z.string(),\n level: areaPickerLevelSchema,\n parentId: z.string(),\n});\nexport type AreaPickerItem = z.infer<typeof areaPickerItemSchema>;\n\nexport const areaPickerResponseSchema = z.object({\n items: z.array(areaPickerItemSchema),\n});\nexport type AreaPickerResponse = z.infer<typeof areaPickerResponseSchema>;\n"]}
1
+ {"version":3,"file":"community.js","sourceRoot":"","sources":["../src/community.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,sCAAsC,EACtC,sCAAsC,EACtC,oCAAoC,EACpC,kBAAkB,EAClB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAExB,+EAA+E;AAE/E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,CAAU,CAAC;AAElF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AAEjE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,cAAc;IACd,MAAM;IACN,OAAO;IACP,UAAU;IACV,QAAQ;CACA,CAAC;AAEX,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAEnE;;;;;;;GAOG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E;CACjC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,qBAAqB;IAC5B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC;CACrC,CAAC,CAAC","sourcesContent":["/**\n * Topical Community wire shapes.\n *\n * A Community is a Reddit-subreddit / Facebook-group style surface: a\n * named topic users can discover, join, and post into. Distinct from\n * the user-created `Group` (chat-bound, small, private) — each\n * Community auto-owns its own bound `Group` (so members get a\n * Community chat room for free) but they're conceptually different\n * objects with their own roster + permissions.\n *\n * Visibility model\n * ----------------\n * - `public` — anyone can join one-tap; posts are visible to all\n * viewers in the community feed.\n * - `private` — joining requires owner / admin approval; posts and\n * member list are hidden from non-members. Discovery\n * still lists the community card (name + description +\n * member count + join button) so users can request to\n * join.\n *\n * Posts inside a community do NOT participate in the geo cascade —\n * they live and die inside the community surface. Posts authored\n * from the global composer continue to flow through the geo\n * area-proximity cascade ranked by `tierBoost` (see\n * `reform-backend/src/services/community/services/visibility.service.ts`).\n *\n * @module community-schema/community\n */\n\nimport { z } from 'zod';\nimport { areaLineageSnapshotSchema } from './area.js';\nimport {\n COMMUNITIES_PAGE_SIZE,\n COMMUNITY_DESCRIPTION_MAX_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_MAX_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_MIN_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_PATTERN,\n COMMUNITY_MAX_TAGS,\n COMMUNITY_NAME_MAX_CHARS,\n COMMUNITY_NAME_MIN_CHARS,\n COMMUNITY_SLUG_MAX_CHARS,\n COMMUNITY_SLUG_MIN_CHARS,\n COMMUNITY_SLUG_PATTERN,\n} from './constants.js';\n\n// ─── Enums ──────────────────────────────────────────────────────────────────\n\n/**\n * public — anyone can read + post.\n * restricted — anyone can read; only approved members can post. The\n * middle option Reddit added so communities can be open\n * to browse but moderated on the write side.\n * private — only approved members can read or post. The roster\n * + post bodies are hidden from non-members.\n */\nexport const COMMUNITY_TYPE_VALUES = ['public', 'restricted', 'private'] as const;\nexport type CommunityType = (typeof COMMUNITY_TYPE_VALUES)[number];\nexport const communityTypeSchema = z.enum(COMMUNITY_TYPE_VALUES);\n\n/**\n * Geographic scope a community claims. Maps onto the existing\n * area-lineage tiers so discovery can match a viewer's `areaLineage`\n * one tier at a time.\n *\n * neighborhood — hyperlocal; carries `areaLineage.localId` +\n * `centerCoords`. Discovery uses the 5 km radius from\n * `COMMUNITY_HYPERLOCAL_RADIUS_KM`.\n * city — district-scoped; carries `areaLineage.districtId`.\n * state — carries `areaLineage.stateId`.\n * national — carries `areaLineage.countryId`.\n * global — area-agnostic; `areaLineage` is null.\n */\nexport const COMMUNITY_REACH_VALUES = [\n 'neighborhood',\n 'city',\n 'state',\n 'national',\n 'global',\n] as const;\nexport type CommunityReach = (typeof COMMUNITY_REACH_VALUES)[number];\nexport const communityReachSchema = z.enum(COMMUNITY_REACH_VALUES);\n\n/**\n * Verification scope on a verified community — which leader-tier\n * vouched for it.\n *\n * state — a state-level leader verified within their own state.\n * national — a national-level leader (or higher).\n * global — a global / platform-level leader.\n */\nexport const COMMUNITY_VERIFIED_SCOPE_VALUES = ['state', 'national', 'global'] as const;\nexport type CommunityVerifiedScope = (typeof COMMUNITY_VERIFIED_SCOPE_VALUES)[number];\nexport const communityVerifiedScopeSchema = z.enum(COMMUNITY_VERIFIED_SCOPE_VALUES);\n\n/**\n * Curated category enum. Slugs are **stable English keys** (snake_case);\n * the visible label is i18n'd on the frontend (en/hi message files).\n * Never store culturally-specific or transliterated names here — the\n * locale layer owns presentation.\n *\n * First 12 slugs are weighted toward the Indian civic / hyperlocal\n * context that Jansathi serves (Women's / Men's / Youth groups, RWA,\n * Social Welfare, Civic Reform). Remaining 30 are general-interest\n * categories adapted from Reddit's curated topic set + Facebook\n * Groups' top discovery categories.\n *\n * See `docs/community-create-v2.md` §2 in the jansathi-frontend repo\n * for the full label table.\n */\nexport const COMMUNITY_CATEGORY_VALUES = [\n // Indian civic / community (12)\n 'womens_group',\n 'mens_group',\n 'youth_group',\n 'senior_citizens',\n 'parenting_children',\n 'resident_welfare',\n 'social_welfare',\n 'social_awareness',\n 'volunteering',\n 'civic_reform',\n 'local_news_issues',\n 'environment',\n // Civic & legal (3)\n 'legal_law',\n 'politics_government',\n 'real_estate_housing',\n // Faith & culture (3)\n 'religion_spirituality',\n 'festivals_culture',\n 'devotional',\n // Education & sciences (5)\n 'education',\n 'competitive_exams',\n 'books_literature',\n 'language_learning',\n 'science',\n // Health & wellness (4)\n 'health_wellness',\n 'yoga_meditation',\n 'fitness',\n 'mental_health',\n // Identity & society (2)\n 'lgbtq_identity',\n 'mature_topics',\n // Lifestyle (7)\n 'food_cooking',\n 'travel',\n 'photography',\n 'fashion_beauty',\n 'home_garden',\n 'pets_animals',\n 'vehicles_automotive',\n // Sports & arts (5)\n 'sports',\n 'cricket',\n 'arts_crafts',\n 'music',\n 'dance',\n // Entertainment (4)\n 'movies_tv',\n 'gaming',\n 'entertainment',\n 'anime_cosplay',\n // Professional (5)\n 'business_career',\n 'entrepreneurship',\n 'technology',\n 'finance_investing',\n 'agriculture',\n // Information (1) + fallback (1)\n 'news_current_affairs',\n 'other',\n] as const;\nexport type CommunityCategory = (typeof COMMUNITY_CATEGORY_VALUES)[number];\nexport const communityCategorySchema = z.enum(COMMUNITY_CATEGORY_VALUES);\n\n/**\n * Curated tag enum. A community picks 0–`COMMUNITY_MAX_TAGS` from\n * this list. Tags are stable English snake_case slugs; the visible\n * label is i18n'd. The tag picker UI groups them by theme via a\n * separate theme-map on the frontend; the stored enum is flat.\n *\n * Total: 112 tags spanning civic, health, education, sports, food,\n * arts/music/faith, business/tech, local issues, and lifestyle.\n */\nexport const COMMUNITY_TAG_VALUES = [\n // Civic & social (29)\n 'volunteer',\n 'donation_drive',\n 'blood_donation',\n 'anti_corruption',\n 'women_safety',\n 'child_safety',\n 'senior_care',\n 'disability_support',\n 'lgbtq_support',\n 'environment',\n 'cleanliness',\n 'plant_trees',\n 'waste_management',\n 'legal_aid',\n 'rti',\n 'voter_awareness',\n 'government_schemes',\n 'ngo',\n 'charity',\n 'relief_work',\n 'public_service',\n 'fundraising',\n 'awareness_campaign',\n 'social_justice',\n 'women_empowerment',\n 'rural_development',\n 'tribal_welfare',\n 'homeless_support',\n 'street_children',\n // Community & neighborhood (8) — new theme\n 'community_growth',\n 'residents_association',\n 'housing_society',\n 'gated_community',\n 'apartment_living',\n 'mohalla_committee',\n 'newcomers_welcome',\n 'neighborhood_safety',\n // Health & wellness (19)\n 'yoga',\n 'meditation',\n 'fitness',\n 'running',\n 'cycling',\n 'walking',\n 'nutrition',\n 'mental_health',\n 'ayurveda',\n 'weight_loss',\n 'womens_health',\n 'mens_health',\n 'dental_health',\n 'eye_care',\n 'diabetes_support',\n 'cancer_support',\n 'heart_health',\n 'addiction_recovery',\n 'pregnancy_support',\n // Education (16)\n 'jee',\n 'neet',\n 'upsc',\n 'ssc',\n 'ielts',\n 'school_support',\n 'college_support',\n 'scholarship',\n 'career_guidance',\n 'coding',\n 'mathematics',\n 'science',\n 'languages',\n 'spoken_english',\n 'tutoring',\n 'study_abroad',\n // Sports (9)\n 'cricket',\n 'football',\n 'badminton',\n 'tennis',\n 'kabaddi',\n 'hockey',\n 'chess',\n 'swimming',\n 'marathon',\n // Food (10)\n 'street_food',\n 'home_cooking',\n 'vegetarian',\n 'vegan',\n 'jain_food',\n 'fasting_recipes',\n 'north_indian',\n 'south_indian',\n 'baking',\n 'desserts',\n // Arts, music, faith (21)\n 'classical_music',\n 'hindustani',\n 'carnatic',\n 'bhajan',\n 'kirtan',\n 'bollywood',\n 'dance_classical',\n 'dance_folk',\n 'painting',\n 'photography',\n 'craft',\n 'satsang',\n 'festivals',\n 'pilgrimage',\n 'gita_study',\n 'ramayan',\n 'bhagwat',\n 'vedanta',\n 'sikh_satsang',\n 'christian_fellowship',\n 'jain_swadhyay',\n // Business & tech (19)\n 'entrepreneurship',\n 'startup',\n 'small_business',\n 'freelancing',\n 'real_estate',\n 'stocks_investing',\n 'mutual_funds',\n 'agriculture',\n 'handicrafts',\n 'job_postings',\n 'web_development',\n 'artificial_intelligence',\n 'data_science',\n 'cybersecurity',\n 'app_development',\n 'ui_ux_design',\n 'social_media_marketing',\n 'content_creation',\n 'gaming',\n // Local issues (9)\n 'water_supply',\n 'electricity',\n 'road_repair',\n 'garbage_collection',\n 'drainage',\n 'public_transport',\n 'traffic',\n 'parking',\n 'local_healthcare',\n // Skills & trades (6) — new theme\n 'tailoring',\n 'carpentry',\n 'electrical_work',\n 'plumbing',\n 'beauty_skills',\n 'driving',\n // Pets & animals (5) — new theme\n 'pets',\n 'dog_lovers',\n 'cat_lovers',\n 'stray_animal_care',\n 'veterinary_help',\n // Lifestyle (9)\n 'movies',\n 'tv_shows',\n 'books_club',\n 'trekking',\n 'parenting',\n 'gardening',\n 'pottery',\n 'diy',\n 'home_decor',\n] as const;\nexport type CommunityTag = (typeof COMMUNITY_TAG_VALUES)[number];\nexport const communityTagSchema = z.enum(COMMUNITY_TAG_VALUES);\n\n/**\n * Preset designation labels — purely **representation** (not\n * permission-bearing). Renders in brackets after a member's display\n * name in a community context (e.g., \"Hari Joshi (Chairman) · 12h ago\").\n *\n * Permission still flows through `CommunityRole` (owner / admin /\n * member). A designation does NOT promote or restrict anything.\n *\n * Per-community: Hari can be \"Chairman\" in one community and\n * \"Member-at-Large\" in another. Custom designations (free text)\n * cover the long tail; presets are surfaced first in the picker.\n */\nexport const COMMUNITY_DESIGNATION_PRESETS = [\n 'chairman',\n 'vice_chairman',\n 'president',\n 'vice_president',\n 'secretary',\n 'joint_secretary',\n 'general_secretary',\n 'treasurer',\n 'joint_treasurer',\n 'organizer',\n 'coordinator',\n 'spokesperson',\n 'founder',\n 'co_founder',\n 'patron',\n 'advisor',\n 'mentor',\n 'committee_member',\n 'member_at_large',\n 'volunteer',\n] as const;\nexport type CommunityDesignationPreset = (typeof COMMUNITY_DESIGNATION_PRESETS)[number];\nexport const communityDesignationPresetSchema = z.enum(COMMUNITY_DESIGNATION_PRESETS);\n\n/**\n * Designation stored on a `CommunityMembership`. Exactly one of\n * `preset` / `custom` is non-null when a designation is set.\n *\n * { preset: 'chairman', custom: null } — picked from the preset enum.\n * { preset: null, custom: 'Press & Media' } — free text.\n * null — no designation.\n *\n * The picker UI surfaces the preset list first; the custom path is\n * for niche labels that don't fit a preset. Validation enforces\n * exactly-one via a refinement.\n */\nexport const communityDesignationSchema = z\n .object({\n preset: communityDesignationPresetSchema.nullable(),\n custom: z.string().nullable(),\n })\n .refine((d) => (d.preset == null) !== (d.custom == null), {\n message: 'Designation must have exactly one of `preset` or `custom` set.',\n });\nexport type CommunityDesignation = z.infer<typeof communityDesignationSchema>;\n\n/**\n * Latitude / longitude pair used for hyperlocal (`reach=neighborhood`)\n * communities. Stored at create time from either the picked area's\n * centroid (if the Area carries coordinates) or the creator's current\n * GPS as a fallback. Indexed 2dsphere on the backend; powers the\n * `$nearSphere` query inside the `?nearMe=true` listing filter.\n */\nexport const communityCenterCoordsSchema = z.object({\n lat: z.number().min(-90).max(90),\n lng: z.number().min(-180).max(180),\n});\nexport type CommunityCenterCoords = z.infer<typeof communityCenterCoordsSchema>;\n\n/** Role hierarchy within a single community.\n *\n * owner — creator; cannot be demoted by anyone, can transfer\n * ownership (deferred for v1) and delete the community.\n * admin — granted by owner; can edit metadata, kick members,\n * soft-delete posts authored in the community.\n * member — joined; can post and comment, can leave at any time.\n */\nexport const COMMUNITY_ROLE_VALUES = ['owner', 'admin', 'member'] as const;\nexport type CommunityRole = (typeof COMMUNITY_ROLE_VALUES)[number];\nexport const communityRoleSchema = z.enum(COMMUNITY_ROLE_VALUES);\n\n/** Membership lifecycle.\n *\n * active — currently in the community.\n * pending — for a `private` community: the join request is awaiting\n * owner/admin approval. Pending rows aren't counted toward\n * `memberCount` and the user can't post yet.\n */\nexport const COMMUNITY_MEMBERSHIP_STATUS_VALUES = ['active', 'pending'] as const;\nexport type CommunityMembershipStatus = (typeof COMMUNITY_MEMBERSHIP_STATUS_VALUES)[number];\nexport const communityMembershipStatusSchema = z.enum(COMMUNITY_MEMBERSHIP_STATUS_VALUES);\n\n// ─── Wire shape ─────────────────────────────────────────────────────────────\n\n/**\n * `GET /communities/:slug` / discovery card / search hit.\n *\n * `viewer` is included when the request is authenticated. It carries\n * the viewer's role + membership status so the UI can render the\n * right CTA (Join / Joined / Pending / Owner) without a follow-up\n * round trip.\n */\nexport const communityWireSchema = z.object({\n _id: z.string(),\n slug: z.string(),\n name: z.string().min(COMMUNITY_NAME_MIN_CHARS).max(COMMUNITY_NAME_MAX_CHARS),\n description: z.string().max(COMMUNITY_DESCRIPTION_MAX_CHARS).optional(),\n type: communityTypeSchema,\n coverImageUrl: z.string().url().optional(),\n ownerUserId: z.string(),\n /** Active members only. Pending join-requests don't count. */\n memberCount: z.number().int().nonnegative(),\n /** Denormalised post count. Increments on create, decrements on\n * soft-delete. */\n postCount: z.number().int().nonnegative(),\n /** Bound chat-group id. Auto-created when the Community is created;\n * members are added to both rosters in lockstep. */\n groupId: z.string(),\n createdAt: z.string().datetime(),\n\n // ─── v2 taxonomy + reach + verification ─────────────────────────────\n /** Curated subject category. Single source of truth in\n * `COMMUNITY_CATEGORY_VALUES`; visible label is i18n'd. */\n category: communityCategorySchema,\n /** Geographic scope. Drives discovery filtering and is the reason\n * `areaLineage` / `centerCoords` may be present. */\n reach: communityReachSchema,\n /** Up to `COMMUNITY_MAX_TAGS` (10) tags from the curated enum. */\n tags: z.array(communityTagSchema),\n /** Mature (18+) flag. Content-gates the surface (blur previews,\n * age-confirm) once the gate UI ships; the field is persisted\n * from create-time so the mature designation is permanent. */\n mature: z.boolean(),\n /** Area snapshot — present when `reach !== 'global'`. Mirrors the\n * post-area lineage pattern; written once at create time and\n * immutable thereafter. */\n areaLineage: areaLineageSnapshotSchema.nullable(),\n /** Lat/lng pair — present when `reach === 'neighborhood'`. Powers\n * the `?nearMe=true` 5 km geospatial filter on discovery. */\n centerCoords: communityCenterCoordsSchema.nullable(),\n /** ISO timestamp set by a state+ leader when verifying the\n * community. Null until verified; clearing reverts to null. */\n verifiedAt: z.string().datetime().nullable(),\n /** UserId of the leader who verified. */\n verifiedBy: z.string().nullable(),\n /** Which leader tier vouched — drives the badge tooltip (\"verified\n * by a state leader\" vs \"by a national leader\"). */\n verifiedScope: communityVerifiedScopeSchema.nullable(),\n\n viewer: z\n .object({\n role: communityRoleSchema.nullable(),\n status: communityMembershipStatusSchema.nullable(),\n joinedAt: z.string().datetime().nullable(),\n /** Viewer's designation in THIS community. Null when the\n * viewer is not a member or has no designation set. Returned\n * at the wire level (vs the roster level) so post-cards and\n * the byline can render `(Chairman)` without a separate\n * roster lookup. */\n designation: communityDesignationSchema.nullable(),\n })\n .optional(),\n});\nexport type CommunityWire = z.infer<typeof communityWireSchema>;\n\n// ─── Member roster row ──────────────────────────────────────────────────────\n\nexport const communityMemberWireSchema = z.object({\n userId: z.string(),\n displayName: z.string(),\n avatarUrl: z.string().url().optional(),\n localName: z.string().optional(),\n role: communityRoleSchema,\n status: communityMembershipStatusSchema,\n joinedAt: z.string().datetime(),\n /** Per-community representation label. See\n * `communityDesignationSchema` — null when none set. */\n designation: communityDesignationSchema.nullable(),\n /** True when this user has been identity-verified by a Jansathi\n * volunteer / leader. Drives the green check badge in the member\n * roster row. Optional for forward-compat with un-migrated\n * backends. */\n identityVerified: z.boolean().optional(),\n});\nexport type CommunityMemberWire = z.infer<typeof communityMemberWireSchema>;\n\n// ─── Create body ────────────────────────────────────────────────────────────\n\n/**\n * `POST /communities` body. `slug` is optional — when omitted the\n * backend auto-generates one from the name (lowercased, hyphenated,\n * collision-suffixed). When provided it must match the slug pattern\n * and be unique.\n *\n * `areaId` is required when `reach !== 'global'` — it's the deepest-\n * matching area-entity id (`localId` for neighborhood, `districtId`\n * for city, etc.) the creator picked from the area picker. The\n * backend resolves the full `areaLineage` snapshot from this id.\n */\nexport const createCommunityBodySchema = z\n .object({\n name: z.string().min(COMMUNITY_NAME_MIN_CHARS).max(COMMUNITY_NAME_MAX_CHARS),\n slug: z\n .string()\n .min(COMMUNITY_SLUG_MIN_CHARS)\n .max(COMMUNITY_SLUG_MAX_CHARS)\n .regex(COMMUNITY_SLUG_PATTERN)\n .optional(),\n description: z.string().max(COMMUNITY_DESCRIPTION_MAX_CHARS).optional(),\n type: communityTypeSchema,\n coverImageUrl: z.string().url().optional(),\n // ── v2 fields ─────────────────────────────────────────────────\n category: communityCategorySchema,\n reach: communityReachSchema,\n /** ObjectId of the picked area at the reach's tier. Required iff\n * `reach !== 'global'`. */\n areaId: z.string().optional(),\n tags: z.array(communityTagSchema).max(COMMUNITY_MAX_TAGS).default([]),\n mature: z.boolean().default(false),\n })\n .superRefine((body, ctx) => {\n if (body.reach !== 'global' && !body.areaId) {\n ctx.addIssue({\n code: 'custom',\n path: ['areaId'],\n message: 'Area is required when reach is not Global.',\n });\n }\n });\nexport type CreateCommunityBody = z.infer<typeof createCommunityBodySchema>;\n\n// ─── Update body (owner / admin only) ───────────────────────────────────────\n\n/**\n * `PATCH /communities/:slug` body. All fields optional. Sending\n * `null` for `description` or `coverImageUrl` clears that field.\n *\n * Type changes between `public` / `restricted` / `private` are NOT\n * supported in v1 — the decision has implications for already-\n * published posts and pending join requests that we don't want to\n * silently handle. Recreate the community if you need to switch.\n *\n * `category`, `tags`, `mature` are editable post-create. `reach` and\n * `areaLineage` / `centerCoords` are NOT editable — moving a community\n * across geographic scopes would silently invalidate every existing\n * member's relationship with it.\n */\nexport const updateCommunityBodySchema = z.object({\n name: z.string().min(COMMUNITY_NAME_MIN_CHARS).max(COMMUNITY_NAME_MAX_CHARS).optional(),\n description: z.string().max(COMMUNITY_DESCRIPTION_MAX_CHARS).nullable().optional(),\n coverImageUrl: z.string().url().nullable().optional(),\n category: communityCategorySchema.optional(),\n tags: z.array(communityTagSchema).max(COMMUNITY_MAX_TAGS).optional(),\n mature: z.boolean().optional(),\n});\nexport type UpdateCommunityBody = z.infer<typeof updateCommunityBodySchema>;\n\n// ─── List + discover + search responses ─────────────────────────────────────\n\n/** Sort order on the discover page. `popular` ranks by active member\n * count, `new` by createdAt desc. `top` is reserved for a future\n * activity-weighted ranking and accepted as a no-op for now. */\nexport const COMMUNITY_DISCOVER_SORT_VALUES = ['popular', 'new', 'top'] as const;\nexport type CommunityDiscoverSort = (typeof COMMUNITY_DISCOVER_SORT_VALUES)[number];\nexport const communityDiscoverSortSchema = z.enum(COMMUNITY_DISCOVER_SORT_VALUES);\n\nexport const communityListQuerySchema = z.object({\n sort: communityDiscoverSortSchema.optional(),\n /** Free-text fragment matched case-insensitively against the\n * community name. */\n q: z.string().max(60).optional(),\n cursor: z.string().optional(),\n pageSize: z.number().int().min(1).max(COMMUNITIES_PAGE_SIZE).optional(),\n // ── v2 discovery filters ─────────────────────────────────────────\n /** Filter by curated subject category. */\n category: communityCategorySchema.optional(),\n /** Filter by geographic reach tier. */\n reach: communityReachSchema.optional(),\n /** Return only verified communities. */\n verified: z.boolean().optional(),\n /** Layered \"near me\" mode — when true, returns the union of:\n * • `reach=neighborhood` AND `centerCoords` within\n * `COMMUNITY_HYPERLOCAL_RADIUS_KM` of the supplied (lat, lng),\n * • `reach=city` AND `districtId = viewer.districtId`,\n * • `reach=state` AND `stateId = viewer.stateId`,\n * • `reach=national` AND `countryId = viewer.countryId`.\n * `lat` + `lng` must accompany the flag (typically from the\n * viewer's currentLocation GPS). */\n nearMe: z.boolean().optional(),\n lat: z.number().min(-90).max(90).optional(),\n lng: z.number().min(-180).max(180).optional(),\n});\nexport type CommunityListQuery = z.infer<typeof communityListQuerySchema>;\n\nexport const communityListResponseSchema = z.object({\n items: z.array(communityWireSchema),\n nextCursor: z.string().nullable(),\n});\nexport type CommunityListResponse = z.infer<typeof communityListResponseSchema>;\n\n// ─── Membership actions ────────────────────────────────────────────────────\n\n/**\n * `POST /communities/:slug/join`. Response carries the new viewer\n * state so the client can update the CTA without a follow-up GET.\n *\n * - public → returns `{ status: 'active', role: 'member' }`\n * - private → returns `{ status: 'pending', role: null }`; the\n * owner / admin approves via the moderation endpoint\n * (`POST /communities/:slug/members/:userId/approve`).\n */\nexport const joinCommunityResponseSchema = z.object({\n status: communityMembershipStatusSchema,\n role: communityRoleSchema.nullable(),\n joinedAt: z.string().datetime().nullable(),\n});\nexport type JoinCommunityResponse = z.infer<typeof joinCommunityResponseSchema>;\n\nexport const communityMembersListResponseSchema = z.object({\n items: z.array(communityMemberWireSchema),\n nextCursor: z.string().nullable(),\n});\nexport type CommunityMembersListResponse = z.infer<typeof communityMembersListResponseSchema>;\n\n/** Body for `POST /communities/:slug/members/:userId/role` — owner-\n * only. Used to promote a member to admin or demote an admin back\n * to plain member. Owner role can't be set via this endpoint;\n * transferring ownership has its own dedicated route (deferred). */\nexport const updateMemberRoleBodySchema = z.object({\n role: z.enum(['admin', 'member']),\n});\nexport type UpdateMemberRoleBody = z.infer<typeof updateMemberRoleBodySchema>;\n\n// ─── Designation (representation, not permission) ──────────────────────────\n\n/**\n * Body for `PUT /communities/:slug/members/:userId/designation`.\n * Owner / admin only. Exactly one of `preset` / `custom` must be set.\n *\n * Use the preset list first (one-tap pick from `CommunityDesignationPreset`);\n * fall through to `custom` for niche labels (\"Press & Media\",\n * \"Disaster Response Lead\", etc.) that don't fit a preset.\n *\n * To clear an existing designation, use `DELETE` on the same path —\n * there's no \"null\" mode on this body.\n */\nexport const setMemberDesignationBodySchema = z\n .object({\n preset: communityDesignationPresetSchema.optional(),\n custom: z\n .string()\n .min(COMMUNITY_DESIGNATION_CUSTOM_MIN_CHARS)\n .max(COMMUNITY_DESIGNATION_CUSTOM_MAX_CHARS)\n .regex(COMMUNITY_DESIGNATION_CUSTOM_PATTERN)\n .optional(),\n })\n .refine((b) => (b.preset != null) !== (b.custom != null), {\n message: 'Provide exactly one of `preset` or `custom`.',\n });\nexport type SetMemberDesignationBody = z.infer<typeof setMemberDesignationBodySchema>;\n\n// ─── Verification (state+ leader vouch) ────────────────────────────────────\n\n/**\n * Body for `POST /communities/:slug/verify`. Empty for now; the\n * verifier's scope (`state | national | global`) is derived from the\n * caller's leader role rather than supplied. Keeping a body object\n * leaves room for a `note` field later without a breaking change.\n */\nexport const verifyCommunityBodySchema = z.object({\n /** Optional free-text note the leader can attach to the verification\n * (visible in the verification audit trail; not surfaced in the\n * default badge tooltip). Capped at 200 chars. */\n note: z.string().max(200).optional(),\n});\nexport type VerifyCommunityBody = z.infer<typeof verifyCommunityBodySchema>;\n\n// ─── Area picker query (powers the cascading area sheet) ───────────────────\n\n/**\n * `GET /areas?level=...&parentId=...&q=...` — backs the area picker\n * inside the create-community wizard's step 3. Returns areas at the\n * specified `level` that sit under the given parent area:\n *\n * level=local → returns localities under a `districtId` parent.\n * level=district → returns districts under a `stateId` parent.\n * level=state → returns states under a `countryId` parent.\n *\n * The picker constrains the user to siblings under their own parent\n * area (so a Maharashtra creator can pick any locality in Maharashtra\n * for a neighborhood community, but not one in Tamil Nadu).\n */\nexport const AREA_PICKER_LEVEL_VALUES = ['local', 'district', 'state'] as const;\nexport type AreaPickerLevel = (typeof AREA_PICKER_LEVEL_VALUES)[number];\nexport const areaPickerLevelSchema = z.enum(AREA_PICKER_LEVEL_VALUES);\n\nexport const areaPickerQuerySchema = z.object({\n level: areaPickerLevelSchema,\n parentId: z.string(),\n /** Optional name prefix for debounced search inside the sheet. */\n q: z.string().max(60).optional(),\n});\nexport type AreaPickerQuery = z.infer<typeof areaPickerQuerySchema>;\n\nexport const areaPickerItemSchema = z.object({\n _id: z.string(),\n name: z.string(),\n level: areaPickerLevelSchema,\n parentId: z.string(),\n});\nexport type AreaPickerItem = z.infer<typeof areaPickerItemSchema>;\n\nexport const areaPickerResponseSchema = z.object({\n items: z.array(areaPickerItemSchema),\n});\nexport type AreaPickerResponse = z.infer<typeof areaPickerResponseSchema>;\n"]}
package/dist/profile.d.ts CHANGED
@@ -53,6 +53,7 @@ export declare const publicProfileWireSchema: z.ZodObject<{
53
53
  viewer: z.ZodObject<{
54
54
  following: z.ZodBoolean;
55
55
  }, z.core.$strip>;
56
+ identityVerified: z.ZodOptional<z.ZodBoolean>;
56
57
  }, z.core.$strip>;
57
58
  export type PublicProfileWire = z.infer<typeof publicProfileWireSchema>;
58
59
  /**
@@ -72,6 +73,7 @@ export declare const peopleListItemSchema: z.ZodObject<{
72
73
  viewer: z.ZodObject<{
73
74
  following: z.ZodBoolean;
74
75
  }, z.core.$strip>;
76
+ identityVerified: z.ZodOptional<z.ZodBoolean>;
75
77
  }, z.core.$strip>;
76
78
  export type PeopleListItem = z.infer<typeof peopleListItemSchema>;
77
79
  export declare const peopleQueryParamsSchema: z.ZodObject<{
@@ -101,6 +103,7 @@ export declare const peopleListResponseSchema: z.ZodObject<{
101
103
  viewer: z.ZodObject<{
102
104
  following: z.ZodBoolean;
103
105
  }, z.core.$strip>;
106
+ identityVerified: z.ZodOptional<z.ZodBoolean>;
104
107
  }, z.core.$strip>>;
105
108
  nextCursor: z.ZodNullable<z.ZodString>;
106
109
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;iBAW/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;iBAwClC,CAAC;AACH,MAAM,MAA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,MAAM,wBAAwB;;;;;;;;;;;;;;;;;iBAGnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
package/dist/profile.js CHANGED
@@ -73,6 +73,13 @@ export const publicProfileWireSchema = z.object({
73
73
  mutuals: profileMutualsSchema.optional(),
74
74
  /** Per-viewer relationship state. Always present (never gated). */
75
75
  viewer: viewerSocialStateSchema,
76
+ /** True when this user has been identity-verified by a Jansathi
77
+ * volunteer / leader (UDP step-1 `verifiedFields`). Surfaces the
78
+ * green check badge next to the display name on the profile
79
+ * header. Optional so backends not yet populating the field
80
+ * serialize a valid wire shape — readers treat undefined as
81
+ * unverified. Live-joined at read time, NOT a snapshot. */
82
+ identityVerified: z.boolean().optional(),
76
83
  });
77
84
  // ─── People list ────────────────────────────────────────────────────────────
78
85
  /**
@@ -89,6 +96,11 @@ export const peopleListItemSchema = z.object({
89
96
  localName: z.string().optional(),
90
97
  privacy: profilePrivacySchema,
91
98
  viewer: viewerSocialStateSchema,
99
+ /** True when this user has been identity-verified by a Jansathi
100
+ * volunteer / leader. Drives the green check badge next to the
101
+ * display name in the row. Optional for forward-compat with
102
+ * un-migrated backends. */
103
+ identityVerified: z.boolean().optional(),
92
104
  });
93
105
  export const peopleQueryParamsSchema = z.object({
94
106
  /** Free-text search across `displayName`. */
@@ -1 +1 @@
1
- {"version":3,"file":"profile.js","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C;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wire shape.\n *\n * What every viewer can see about another user's community presence.\n * Differs from the auth/UDP `User` shape — this view is purposely thin\n * and content-engagement-oriented (post count, follower count, …).\n *\n * Privacy gating:\n * - `public` profile: the full shape is returned to any signed-in viewer.\n * - `private` profile: only `userId`, `displayName`, `avatarUrl`, and\n * the viewer's follow state are returned to non-followers. Posts and\n * counters are hidden until the viewer follows the profile owner and\n * the owner has accepted (TODO: follow-approval lifecycle — currently\n * \"private\" simply hides counters/posts from anyone who isn't the\n * owner).\n *\n * @module community-schema/profile\n */\n\nimport { z } from 'zod';\nimport { PROFILE_MAX_BIO_CHARS } from './constants.js';\nimport { profilePrivacySchema, visibilityLevelSchema } from './enums.js';\nimport { viewerSocialStateSchema } from './social.js';\nimport { usernameSchema } from './username.js';\n\n/**\n * Mini-row used in the \"Followed by X, Y + N more\" mutuals line on the\n * profile header. The server picks up to 3 sample names + a count of\n * the remaining mutuals so the row reads naturally without paginating\n * the full mutuals list inline.\n */\nexport const profileMutualsSchema = z.object({\n /** Avatar URLs (or single-letter fallbacks via `null`) for the sample\n * mutuals — order is \"show first\" → \"show last\". Capped at 3. */\n avatars: z.array(z.string().url().nullable()).max(3),\n /** Display names matched 1:1 with `avatars` order. Empty when the\n * viewer has no mutuals with the profile owner. */\n sampleNames: z.array(z.string()).max(3),\n /** How many additional mutuals exist beyond the sample. Used to\n * render the trailing \"+ N more\" suffix. Zero when the sample IS\n * the full list. */\n extraCount: z.number().int().nonnegative(),\n});\nexport type ProfileMutuals = z.infer<typeof profileMutualsSchema>;\n\nexport const publicProfileWireSchema = z.object({\n userId: z.string(),\n /** Public URL handle. The profile page lives at `/<username>`; this\n * is the canonical identity surfaced to the viewer. Always present\n * — every user is auto-minted a username at provisioning time and\n * can change it from community Settings (14-day cooldown). */\n username: usernameSchema,\n displayName: z.string(),\n avatarUrl: z.string().url().optional(),\n\n /** Author area at view time (resolved server-side). Hidden when\n * privacy is `private` and the viewer is not the owner. */\n localName: z.string().optional(),\n\n /** Privacy of THIS profile (not the viewer's). Useful for the UI\n * to render a lock chip when the profile is private. */\n privacy: profilePrivacySchema,\n\n /** Short bio — present only when set by the user. */\n bio: z.string().max(PROFILE_MAX_BIO_CHARS).optional(),\n\n /** Engagement counters. Hidden on private profiles when the viewer is\n * not the owner. Three-tuple post-redesign: connections went away\n * when the connection-request feature was removed in v0.9.0. */\n counters: z\n .object({\n postCount: z.number().int().nonnegative(),\n followerCount: z.number().int().nonnegative(),\n followingCount: z.number().int().nonnegative(),\n })\n .optional(),\n\n /** Mutual followees between the viewer and the profile owner. Renders\n * the \"Followed by X, Y + N more\" line. Omitted for self-view (no\n * point telling you about yourself) and when the viewer has no\n * mutuals with the owner. */\n mutuals: profileMutualsSchema.optional(),\n\n /** Per-viewer relationship state. Always present (never gated). */\n viewer: viewerSocialStateSchema,\n});\nexport type PublicProfileWire = z.infer<typeof publicProfileWireSchema>;\n\n// ─── People list ────────────────────────────────────────────────────────────\n\n/**\n * Lightweight row used in the People tab list. Fewer fields than the\n * full profile to keep the list response small.\n */\nexport const peopleListItemSchema = z.object({\n userId: z.string(),\n /** Public URL handle (see `publicProfileWireSchema.username`). Always\n * present — the row's display + tap-to-profile link both depend on it. */\n username: usernameSchema,\n displayName: z.string(),\n avatarUrl: z.string().url().optional(),\n localName: z.string().optional(),\n privacy: profilePrivacySchema,\n viewer: viewerSocialStateSchema,\n});\nexport type PeopleListItem = z.infer<typeof peopleListItemSchema>;\n\nexport const peopleQueryParamsSchema = z.object({\n /** Free-text search across `displayName`. */\n q: z.string().optional(),\n /** Area-scope filter. When set, server filters to users whose primary\n * area lineage matches the viewer's lineage at the chosen level. */\n level: visibilityLevelSchema.optional(),\n cursor: z.string().optional(),\n pageSize: z.number().int().positive().max(50).optional(),\n});\nexport type PeopleQueryParams = z.infer<typeof peopleQueryParamsSchema>;\n\nexport const peopleListResponseSchema = z.object({\n items: z.array(peopleListItemSchema),\n nextCursor: z.string().nullable(),\n});\nexport type PeopleListResponse = z.infer<typeof peopleListResponseSchema>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AC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxB;yEACqE;IACrE,KAAK,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IACvC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC;IACpC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC","sourcesContent":["/**\n * Public community-profile wire shape.\n *\n * What every viewer can see about another user's community presence.\n * Differs from the auth/UDP `User` shape — this view is purposely thin\n * and content-engagement-oriented (post count, follower count, …).\n *\n * Privacy gating:\n * - `public` profile: the full shape is returned to any signed-in viewer.\n * - `private` profile: only `userId`, `displayName`, `avatarUrl`, and\n * the viewer's follow state are returned to non-followers. Posts and\n * counters are hidden until the viewer follows the profile owner and\n * the owner has accepted (TODO: follow-approval lifecycle — currently\n * \"private\" simply hides counters/posts from anyone who isn't the\n * owner).\n *\n * @module community-schema/profile\n */\n\nimport { z } from 'zod';\nimport { PROFILE_MAX_BIO_CHARS } from './constants.js';\nimport { profilePrivacySchema, visibilityLevelSchema } from './enums.js';\nimport { viewerSocialStateSchema } from './social.js';\nimport { usernameSchema } from './username.js';\n\n/**\n * Mini-row used in the \"Followed by X, Y + N more\" mutuals line on the\n * profile header. The server picks up to 3 sample names + a count of\n * the remaining mutuals so the row reads naturally without paginating\n * the full mutuals list inline.\n */\nexport const profileMutualsSchema = z.object({\n /** Avatar URLs (or single-letter fallbacks via `null`) for the sample\n * mutuals — order is \"show first\" → \"show last\". Capped at 3. */\n avatars: z.array(z.string().url().nullable()).max(3),\n /** Display names matched 1:1 with `avatars` order. Empty when the\n * viewer has no mutuals with the profile owner. */\n sampleNames: z.array(z.string()).max(3),\n /** How many additional mutuals exist beyond the sample. Used to\n * render the trailing \"+ N more\" suffix. Zero when the sample IS\n * the full list. */\n extraCount: z.number().int().nonnegative(),\n});\nexport type ProfileMutuals = z.infer<typeof profileMutualsSchema>;\n\nexport const publicProfileWireSchema = z.object({\n userId: z.string(),\n /** Public URL handle. The profile page lives at `/<username>`; this\n * is the canonical identity surfaced to the viewer. Always present\n * — every user is auto-minted a username at provisioning time and\n * can change it from community Settings (14-day cooldown). */\n username: usernameSchema,\n displayName: z.string(),\n avatarUrl: z.string().url().optional(),\n\n /** Author area at view time (resolved server-side). Hidden when\n * privacy is `private` and the viewer is not the owner. */\n localName: z.string().optional(),\n\n /** Privacy of THIS profile (not the viewer's). Useful for the UI\n * to render a lock chip when the profile is private. */\n privacy: profilePrivacySchema,\n\n /** Short bio — present only when set by the user. */\n bio: z.string().max(PROFILE_MAX_BIO_CHARS).optional(),\n\n /** Engagement counters. Hidden on private profiles when the viewer is\n * not the owner. Three-tuple post-redesign: connections went away\n * when the connection-request feature was removed in v0.9.0. */\n counters: z\n .object({\n postCount: z.number().int().nonnegative(),\n followerCount: z.number().int().nonnegative(),\n followingCount: z.number().int().nonnegative(),\n })\n .optional(),\n\n /** Mutual followees between the viewer and the profile owner. Renders\n * the \"Followed by X, Y + N more\" line. Omitted for self-view (no\n * point telling you about yourself) and when the viewer has no\n * mutuals with the owner. */\n mutuals: profileMutualsSchema.optional(),\n\n /** Per-viewer relationship state. Always present (never gated). */\n viewer: viewerSocialStateSchema,\n\n /** True when this user has been identity-verified by a Jansathi\n * volunteer / leader (UDP step-1 `verifiedFields`). Surfaces the\n * green check badge next to the display name on the profile\n * header. Optional so backends not yet populating the field\n * serialize a valid wire shape — readers treat undefined as\n * unverified. Live-joined at read time, NOT a snapshot. */\n identityVerified: z.boolean().optional(),\n});\nexport type PublicProfileWire = z.infer<typeof publicProfileWireSchema>;\n\n// ─── People list ────────────────────────────────────────────────────────────\n\n/**\n * Lightweight row used in the People tab list. Fewer fields than the\n * full profile to keep the list response small.\n */\nexport const peopleListItemSchema = z.object({\n userId: z.string(),\n /** Public URL handle (see `publicProfileWireSchema.username`). Always\n * present — the row's display + tap-to-profile link both depend on it. */\n username: usernameSchema,\n displayName: z.string(),\n avatarUrl: z.string().url().optional(),\n localName: z.string().optional(),\n privacy: profilePrivacySchema,\n viewer: viewerSocialStateSchema,\n /** True when this user has been identity-verified by a Jansathi\n * volunteer / leader. Drives the green check badge next to the\n * display name in the row. Optional for forward-compat with\n * un-migrated backends. */\n identityVerified: z.boolean().optional(),\n});\nexport type PeopleListItem = z.infer<typeof peopleListItemSchema>;\n\nexport const peopleQueryParamsSchema = z.object({\n /** Free-text search across `displayName`. */\n q: z.string().optional(),\n /** Area-scope filter. When set, server filters to users whose primary\n * area lineage matches the viewer's lineage at the chosen level. */\n level: visibilityLevelSchema.optional(),\n cursor: z.string().optional(),\n pageSize: z.number().int().positive().max(50).optional(),\n});\nexport type PeopleQueryParams = z.infer<typeof peopleQueryParamsSchema>;\n\nexport const peopleListResponseSchema = z.object({\n items: z.array(peopleListItemSchema),\n nextCursor: z.string().nullable(),\n});\nexport type PeopleListResponse = z.infer<typeof peopleListResponseSchema>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jansathi-community-schema",
3
- "version": "0.14.1",
3
+ "version": "0.16.0",
4
4
  "description": "Shared Zod schemas + TypeScript types for the Jansathi hyperlocal community feature (feed, posts, engagement, social graph, groups, communities).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",