founder-schema 0.14.0 → 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.
Files changed (41) hide show
  1. package/README.md +90 -3
  2. package/dist/core/common.d.ts +30 -4
  3. package/dist/core/common.d.ts.map +1 -1
  4. package/dist/core/common.js +37 -3
  5. package/dist/core/common.js.map +1 -1
  6. package/dist/core/errors.d.ts +9 -1
  7. package/dist/core/errors.d.ts.map +1 -1
  8. package/dist/core/errors.js +19 -0
  9. package/dist/core/errors.js.map +1 -1
  10. package/dist/core/limits.d.ts +11 -0
  11. package/dist/core/limits.d.ts.map +1 -1
  12. package/dist/core/limits.js +18 -0
  13. package/dist/core/limits.js.map +1 -1
  14. package/dist/core/responses.d.ts +8 -0
  15. package/dist/core/responses.d.ts.map +1 -1
  16. package/dist/domains/communities/communities.d.ts +9 -9
  17. package/dist/domains/discover/discover.d.ts +7 -0
  18. package/dist/domains/discover/discover.d.ts.map +1 -1
  19. package/dist/domains/feed/feed.d.ts +11 -11
  20. package/dist/domains/onboarding/onboarding.d.ts +245 -21
  21. package/dist/domains/onboarding/onboarding.d.ts.map +1 -1
  22. package/dist/domains/onboarding/onboarding.js +104 -16
  23. package/dist/domains/onboarding/onboarding.js.map +1 -1
  24. package/dist/domains/products/products.d.ts +3 -3
  25. package/dist/domains/profile/founder-profile.d.ts +28 -0
  26. package/dist/domains/profile/founder-profile.d.ts.map +1 -1
  27. package/dist/domains/profile/founder-profile.js +3 -0
  28. package/dist/domains/profile/founder-profile.js.map +1 -1
  29. package/dist/domains/profile/my-profile.d.ts +386 -0
  30. package/dist/domains/profile/my-profile.d.ts.map +1 -0
  31. package/dist/domains/profile/my-profile.js +52 -0
  32. package/dist/domains/profile/my-profile.js.map +1 -0
  33. package/dist/domains/waitlist/waitlist.d.ts +68 -0
  34. package/dist/domains/waitlist/waitlist.d.ts.map +1 -0
  35. package/dist/domains/waitlist/waitlist.js +64 -0
  36. package/dist/domains/waitlist/waitlist.js.map +1 -0
  37. package/dist/index.d.ts +5 -3
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +7 -3
  40. package/dist/index.js.map +1 -1
  41. package/package.json +1 -1
@@ -52,13 +52,63 @@ export type IsoDate = z.infer<typeof isoDateSchema>;
52
52
  */
53
53
  export declare const dateOfBirthSchema: z.ZodString;
54
54
  export type DateOfBirth = z.infer<typeof dateOfBirthSchema>;
55
- export declare const BUSINESS_TYPE_VALUES: readonly ["startup", "sme", "enterprise"];
55
+ /**
56
+ * What KIND of business it is, which is not how it is registered
57
+ * (`LEGAL_STRUCTURE_VALUES`): a freelancer may be a sole proprietorship, a
58
+ * startup a private limited company, a social enterprise a Section 8 company.
59
+ *
60
+ * 0.16.0 (the user, 2026-10-18: "check what more business types we can use")
61
+ * added the kinds an Indian founder network meets beyond the three it had: the
62
+ * independent professional, the services firm, the social enterprise, the
63
+ * family business and the franchise. `sme` is India's MSME.
64
+ *
65
+ * ⚠ Stored on the profile's venture and a Mongoose enum. Append only.
66
+ */
67
+ export declare const BUSINESS_TYPE_VALUES: readonly ["startup", "sme", "enterprise", "freelancer", "agency", "social_enterprise", "family_business", "franchise"];
56
68
  export declare const businessTypeSchema: z.ZodEnum<{
57
69
  startup: "startup";
58
70
  sme: "sme";
59
71
  enterprise: "enterprise";
72
+ freelancer: "freelancer";
73
+ agency: "agency";
74
+ social_enterprise: "social_enterprise";
75
+ family_business: "family_business";
76
+ franchise: "franchise";
60
77
  }>;
61
78
  export type BusinessType = z.infer<typeof businessTypeSchema>;
79
+ /**
80
+ * How the business is registered in India, or that it is not yet (0.16.0, the
81
+ * user, 2026-10-18: "the categories that we have in India like private
82
+ * limited, LLP or OPC or proprietorship").
83
+ *
84
+ * The forms Indian law provides: a sole proprietorship and a partnership firm
85
+ * (Indian Partnership Act, 1932), a limited liability partnership (LLP Act,
86
+ * 2008), a one person, private limited, public limited or Section 8 (not for
87
+ * profit) company (Companies Act, 2013), a trust or society, and a
88
+ * co-operative society. Two more are answers a founder often has: not
89
+ * registered yet (an idea, or a side project), and registered outside India
90
+ * (an Indian team whose company is incorporated abroad, often in the US).
91
+ *
92
+ * Optional, like the business type, and private to the member: nothing here
93
+ * verifies it (documents are a settings matter, by the user's ruling).
94
+ *
95
+ * ⚠ Stored on the profile's venture and a Mongoose enum. Append only.
96
+ */
97
+ export declare const LEGAL_STRUCTURE_VALUES: readonly ["not_registered", "sole_proprietorship", "partnership", "llp", "opc", "private_limited", "public_limited", "section_8", "trust_or_society", "cooperative", "registered_abroad"];
98
+ export declare const legalStructureSchema: z.ZodEnum<{
99
+ not_registered: "not_registered";
100
+ sole_proprietorship: "sole_proprietorship";
101
+ partnership: "partnership";
102
+ llp: "llp";
103
+ opc: "opc";
104
+ private_limited: "private_limited";
105
+ public_limited: "public_limited";
106
+ section_8: "section_8";
107
+ trust_or_society: "trust_or_society";
108
+ cooperative: "cooperative";
109
+ registered_abroad: "registered_abroad";
110
+ }>;
111
+ export type LegalStructure = z.infer<typeof legalStructureSchema>;
62
112
  /**
63
113
  * ONE vocabulary, used TWICE: a member picks these as their `interests`, and a
64
114
  * post carries them as its `topics`. That is what makes relevance an index
@@ -100,6 +150,7 @@ export declare const topicSchema: z.ZodEnum<{
100
150
  marketing: "marketing";
101
151
  supply_chain: "supply_chain";
102
152
  fundraising: "fundraising";
153
+ social_enterprise: "social_enterprise";
103
154
  mentoring: "mentoring";
104
155
  leadership: "leadership";
105
156
  networking: "networking";
@@ -158,7 +209,6 @@ export declare const topicSchema: z.ZodEnum<{
158
209
  environmental: "environmental";
159
210
  women_empowerment: "women_empowerment";
160
211
  community_service: "community_service";
161
- social_enterprise: "social_enterprise";
162
212
  education_access: "education_access";
163
213
  }>;
164
214
  export type Topic = z.infer<typeof topicSchema>;
@@ -193,13 +243,103 @@ export declare const TOPIC_CATEGORIES: readonly TopicCategory[];
193
243
  */
194
244
  export declare const INTERESTS_MIN = 3;
195
245
  export declare const INTERESTS_MAX = 10;
246
+ /**
247
+ * A member's interests, by ONE rule (0.16.0): onboarding's finish and the Me
248
+ * tab's editor (`putMyInterestsBodySchema`) both apply this very schema, so a
249
+ * list one accepts the other can never refuse.
250
+ *
251
+ * Each topic only once: without that, three copies of one topic met the
252
+ * minimum of three while meaning one interest.
253
+ */
254
+ export declare const interestsSchema: z.ZodArray<z.ZodEnum<{
255
+ ai_ml: "ai_ml";
256
+ b2b_saas: "b2b_saas";
257
+ d2c: "d2c";
258
+ deeptech: "deeptech";
259
+ robotics: "robotics";
260
+ growth: "growth";
261
+ sales: "sales";
262
+ marketing: "marketing";
263
+ supply_chain: "supply_chain";
264
+ fundraising: "fundraising";
265
+ social_enterprise: "social_enterprise";
266
+ mentoring: "mentoring";
267
+ leadership: "leadership";
268
+ networking: "networking";
269
+ public_speaking: "public_speaking";
270
+ teaching: "teaching";
271
+ hiring_talent: "hiring_talent";
272
+ personal_branding: "personal_branding";
273
+ career_transition: "career_transition";
274
+ remote_work: "remote_work";
275
+ blockchain: "blockchain";
276
+ crypto_web3: "crypto_web3";
277
+ data_science: "data_science";
278
+ cybersecurity: "cybersecurity";
279
+ game_dev: "game_dev";
280
+ ux_design: "ux_design";
281
+ app_development: "app_development";
282
+ open_source: "open_source";
283
+ electronics: "electronics";
284
+ space_exploration: "space_exploration";
285
+ green_tech: "green_tech";
286
+ no_code: "no_code";
287
+ entrepreneurship: "entrepreneurship";
288
+ investing: "investing";
289
+ stock_trading: "stock_trading";
290
+ personal_finance: "personal_finance";
291
+ consulting: "consulting";
292
+ ecommerce: "ecommerce";
293
+ retail: "retail";
294
+ real_estate: "real_estate";
295
+ product_management: "product_management";
296
+ meditation: "meditation";
297
+ journaling: "journaling";
298
+ self_improvement: "self_improvement";
299
+ productivity: "productivity";
300
+ reading: "reading";
301
+ online_courses: "online_courses";
302
+ philosophy: "philosophy";
303
+ psychology: "psychology";
304
+ therapy: "therapy";
305
+ sleep_optimization: "sleep_optimization";
306
+ gym: "gym";
307
+ yoga: "yoga";
308
+ photography: "photography";
309
+ writing: "writing";
310
+ graphic_design: "graphic_design";
311
+ filmmaking: "filmmaking";
312
+ digital_art: "digital_art";
313
+ content_creation: "content_creation";
314
+ blogging: "blogging";
315
+ vlogging: "vlogging";
316
+ podcasts: "podcasts";
317
+ animation: "animation";
318
+ music_production: "music_production";
319
+ volunteering: "volunteering";
320
+ ngo_work: "ngo_work";
321
+ environmental: "environmental";
322
+ women_empowerment: "women_empowerment";
323
+ community_service: "community_service";
324
+ education_access: "education_access";
325
+ }>>;
196
326
  /**
197
327
  * The step keys, in order, as a literal union, so a consumer can key a table by
198
328
  * step and have TypeScript insist on every one. Before 0.2.0 `key` was a plain
199
329
  * string and the web client kept its own copy of this list to get the same
200
330
  * check; a test there held the two together. Now there is one list.
331
+ *
332
+ * 0.16.0 (the user, 2026-10-18) split the old first step, `identity`, into
333
+ * three: `basics` (full name, gender, date of birth, nothing else), `photo`
334
+ * (the photo alone) and `professional` (title, about, skills). Nine steps, up
335
+ * from seven.
336
+ *
337
+ * ⚠ THE SERVER'S RESUME CURSOR IS AN INDEX INTO THIS LIST, so re-ordering it
338
+ * moves every member who stopped part-way. A cursor saved under the old seven
339
+ * is translated by the backend (its progress rows carry the list's version);
340
+ * any further change needs the same.
201
341
  */
202
- export declare const ONBOARDING_STEP_KEYS: readonly ["identity", "contact", "location", "goals", "interests", "business", "guidelines"];
342
+ export declare const ONBOARDING_STEP_KEYS: readonly ["basics", "photo", "professional", "contact", "location", "goals", "interests", "business", "guidelines"];
203
343
  export type OnboardingStepKey = (typeof ONBOARDING_STEP_KEYS)[number];
204
344
  /**
205
345
  * The community guidelines a member agrees to at the last step, by version.
@@ -241,10 +381,10 @@ export declare const TEAM_SIZE_DIGITS_MAX: number;
241
381
  * `completeOnboardingBodySchema`'s decision, and the client builds that body
242
382
  * from these answers.
243
383
  *
244
- * Screens may hold a different shape on top of this one (the web draws first
245
- * and last name as two fields and joins them into `displayName`). Derive that
246
- * type from `OnboardingForm` rather than writing it out, so a field added here
247
- * reaches every screen.
384
+ * Screens may hold a different shape on top of this one. Derive that type from
385
+ * `OnboardingForm` rather than writing it out, so a field added here reaches
386
+ * every screen. (Since 0.16.0 the name is asked as one full name, which is
387
+ * `displayName` as typed; first and last name are deduced by `splitFullName`.)
248
388
  *
249
389
  * A stored draft is UNTRUSTED when it comes back: an older client, or another
250
390
  * one, wrote it, and the server stores values opaquely. Read it with
@@ -302,6 +442,13 @@ export declare const onboardingFormSchema: z.ZodObject<{
302
442
  market_insights: "market_insights";
303
443
  learn_startup: "learn_startup";
304
444
  start_company: "start_company";
445
+ get_feedback: "get_feedback";
446
+ find_testers: "find_testers";
447
+ mentor_others: "mentor_others";
448
+ invest_in_startups: "invest_in_startups";
449
+ join_startup: "join_startup";
450
+ find_service_providers: "find_service_providers";
451
+ attend_events: "attend_events";
305
452
  }>>;
306
453
  interests: z.ZodArray<z.ZodEnum<{
307
454
  ai_ml: "ai_ml";
@@ -314,6 +461,7 @@ export declare const onboardingFormSchema: z.ZodObject<{
314
461
  marketing: "marketing";
315
462
  supply_chain: "supply_chain";
316
463
  fundraising: "fundraising";
464
+ social_enterprise: "social_enterprise";
317
465
  mentoring: "mentoring";
318
466
  leadership: "leadership";
319
467
  networking: "networking";
@@ -372,7 +520,6 @@ export declare const onboardingFormSchema: z.ZodObject<{
372
520
  environmental: "environmental";
373
521
  women_empowerment: "women_empowerment";
374
522
  community_service: "community_service";
375
- social_enterprise: "social_enterprise";
376
523
  education_access: "education_access";
377
524
  }>>;
378
525
  venture: z.ZodObject<{
@@ -417,6 +564,24 @@ export declare const onboardingFormSchema: z.ZodObject<{
417
564
  startup: "startup";
418
565
  sme: "sme";
419
566
  enterprise: "enterprise";
567
+ freelancer: "freelancer";
568
+ agency: "agency";
569
+ social_enterprise: "social_enterprise";
570
+ family_business: "family_business";
571
+ franchise: "franchise";
572
+ }>>;
573
+ legalStructure: z.ZodNullable<z.ZodEnum<{
574
+ not_registered: "not_registered";
575
+ sole_proprietorship: "sole_proprietorship";
576
+ partnership: "partnership";
577
+ llp: "llp";
578
+ opc: "opc";
579
+ private_limited: "private_limited";
580
+ public_limited: "public_limited";
581
+ section_8: "section_8";
582
+ trust_or_society: "trust_or_society";
583
+ cooperative: "cooperative";
584
+ registered_abroad: "registered_abroad";
420
585
  }>>;
421
586
  guidelinesVersion: z.ZodNullable<z.ZodString>;
422
587
  }, z.core.$strip>;
@@ -489,6 +654,13 @@ export declare const completeOnboardingBodySchema: z.ZodObject<{
489
654
  market_insights: "market_insights";
490
655
  learn_startup: "learn_startup";
491
656
  start_company: "start_company";
657
+ get_feedback: "get_feedback";
658
+ find_testers: "find_testers";
659
+ mentor_others: "mentor_others";
660
+ invest_in_startups: "invest_in_startups";
661
+ join_startup: "join_startup";
662
+ find_service_providers: "find_service_providers";
663
+ attend_events: "attend_events";
492
664
  }>>;
493
665
  interests: z.ZodArray<z.ZodEnum<{
494
666
  ai_ml: "ai_ml";
@@ -501,6 +673,7 @@ export declare const completeOnboardingBodySchema: z.ZodObject<{
501
673
  marketing: "marketing";
502
674
  supply_chain: "supply_chain";
503
675
  fundraising: "fundraising";
676
+ social_enterprise: "social_enterprise";
504
677
  mentoring: "mentoring";
505
678
  leadership: "leadership";
506
679
  networking: "networking";
@@ -559,7 +732,6 @@ export declare const completeOnboardingBodySchema: z.ZodObject<{
559
732
  environmental: "environmental";
560
733
  women_empowerment: "women_empowerment";
561
734
  community_service: "community_service";
562
- social_enterprise: "social_enterprise";
563
735
  education_access: "education_access";
564
736
  }>>;
565
737
  skills: z.ZodOptional<z.ZodArray<z.ZodEnum<{
@@ -622,6 +794,24 @@ export declare const completeOnboardingBodySchema: z.ZodObject<{
622
794
  startup: "startup";
623
795
  sme: "sme";
624
796
  enterprise: "enterprise";
797
+ freelancer: "freelancer";
798
+ agency: "agency";
799
+ social_enterprise: "social_enterprise";
800
+ family_business: "family_business";
801
+ franchise: "franchise";
802
+ }>>;
803
+ legalStructure: z.ZodOptional<z.ZodEnum<{
804
+ not_registered: "not_registered";
805
+ sole_proprietorship: "sole_proprietorship";
806
+ partnership: "partnership";
807
+ llp: "llp";
808
+ opc: "opc";
809
+ private_limited: "private_limited";
810
+ public_limited: "public_limited";
811
+ section_8: "section_8";
812
+ trust_or_society: "trust_or_society";
813
+ cooperative: "cooperative";
814
+ registered_abroad: "registered_abroad";
625
815
  }>>;
626
816
  guidelinesVersion: z.ZodLiteral<"2026-10-03">;
627
817
  }, z.core.$strip>;
@@ -643,9 +833,21 @@ export type CompleteOnboardingBodyInput = z.input<typeof completeOnboardingBodyS
643
833
  * on a draft save, because a half-answered step must be storable.
644
834
  */
645
835
  export declare const ONBOARDING_STEP_SCHEMAS: {
646
- readonly identity: z.ZodObject<{
647
- about: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
836
+ readonly basics: z.ZodObject<{
648
837
  displayName: z.ZodString;
838
+ gender: z.ZodEnum<{
839
+ other: "other";
840
+ male: "male";
841
+ female: "female";
842
+ prefer_not_to_say: "prefer_not_to_say";
843
+ }>;
844
+ dateOfBirth: z.ZodString;
845
+ }, z.core.$strip>;
846
+ readonly photo: z.ZodObject<{
847
+ avatarMediaId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
848
+ }, z.core.$strip>;
849
+ readonly professional: z.ZodObject<{
850
+ about: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
649
851
  headline: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
650
852
  skills: z.ZodOptional<z.ZodArray<z.ZodEnum<{
651
853
  engineering: "engineering";
@@ -664,14 +866,6 @@ export declare const ONBOARDING_STEP_SCHEMAS: {
664
866
  fundraising: "fundraising";
665
867
  community: "community";
666
868
  }>>>;
667
- gender: z.ZodEnum<{
668
- other: "other";
669
- male: "male";
670
- female: "female";
671
- prefer_not_to_say: "prefer_not_to_say";
672
- }>;
673
- dateOfBirth: z.ZodString;
674
- avatarMediaId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
675
869
  }, z.core.$strip>;
676
870
  readonly contact: z.ZodObject<{
677
871
  links: z.ZodOptional<z.ZodObject<{
@@ -701,6 +895,13 @@ export declare const ONBOARDING_STEP_SCHEMAS: {
701
895
  market_insights: "market_insights";
702
896
  learn_startup: "learn_startup";
703
897
  start_company: "start_company";
898
+ get_feedback: "get_feedback";
899
+ find_testers: "find_testers";
900
+ mentor_others: "mentor_others";
901
+ invest_in_startups: "invest_in_startups";
902
+ join_startup: "join_startup";
903
+ find_service_providers: "find_service_providers";
904
+ attend_events: "attend_events";
704
905
  }>>;
705
906
  }, z.core.$strip>;
706
907
  readonly interests: z.ZodObject<{
@@ -715,6 +916,7 @@ export declare const ONBOARDING_STEP_SCHEMAS: {
715
916
  marketing: "marketing";
716
917
  supply_chain: "supply_chain";
717
918
  fundraising: "fundraising";
919
+ social_enterprise: "social_enterprise";
718
920
  mentoring: "mentoring";
719
921
  leadership: "leadership";
720
922
  networking: "networking";
@@ -773,7 +975,6 @@ export declare const ONBOARDING_STEP_SCHEMAS: {
773
975
  environmental: "environmental";
774
976
  women_empowerment: "women_empowerment";
775
977
  community_service: "community_service";
776
- social_enterprise: "social_enterprise";
777
978
  education_access: "education_access";
778
979
  }>>;
779
980
  }, z.core.$strip>;
@@ -821,6 +1022,24 @@ export declare const ONBOARDING_STEP_SCHEMAS: {
821
1022
  startup: "startup";
822
1023
  sme: "sme";
823
1024
  enterprise: "enterprise";
1025
+ freelancer: "freelancer";
1026
+ agency: "agency";
1027
+ social_enterprise: "social_enterprise";
1028
+ family_business: "family_business";
1029
+ franchise: "franchise";
1030
+ }>>;
1031
+ legalStructure: z.ZodOptional<z.ZodEnum<{
1032
+ not_registered: "not_registered";
1033
+ sole_proprietorship: "sole_proprietorship";
1034
+ partnership: "partnership";
1035
+ llp: "llp";
1036
+ opc: "opc";
1037
+ private_limited: "private_limited";
1038
+ public_limited: "public_limited";
1039
+ section_8: "section_8";
1040
+ trust_or_society: "trust_or_society";
1041
+ cooperative: "cooperative";
1042
+ registered_abroad: "registered_abroad";
824
1043
  }>>;
825
1044
  }, z.core.$strip>;
826
1045
  readonly guidelines: z.ZodObject<{
@@ -888,9 +1107,10 @@ export declare const onboardingDraftKeySchema: z.ZodEnum<{
888
1107
  interests: "interests";
889
1108
  avatarMediaId: "avatarMediaId";
890
1109
  businessType: "businessType";
1110
+ legalStructure: "legalStructure";
891
1111
  guidelinesVersion: "guidelinesVersion";
892
1112
  }>;
893
- export declare const ONBOARDING_DRAFT_KEYS: ("location" | "about" | "displayName" | "headline" | "venture" | "skills" | "goals" | "links" | "phone" | "gender" | "dateOfBirth" | "interests" | "avatarMediaId" | "businessType" | "guidelinesVersion")[];
1113
+ export declare const ONBOARDING_DRAFT_KEYS: ("location" | "about" | "displayName" | "headline" | "venture" | "skills" | "goals" | "links" | "phone" | "gender" | "dateOfBirth" | "interests" | "avatarMediaId" | "businessType" | "legalStructure" | "guidelinesVersion")[];
894
1114
  export type OnboardingDraftKey = z.infer<typeof onboardingDraftKeySchema>;
895
1115
  /**
896
1116
  * Where the member got to, kept in its own collection, separate from the
@@ -922,6 +1142,7 @@ export declare const onboardingDraftSchema: z.ZodRecord<z.ZodEnum<{
922
1142
  interests: "interests";
923
1143
  avatarMediaId: "avatarMediaId";
924
1144
  businessType: "businessType";
1145
+ legalStructure: "legalStructure";
925
1146
  guidelinesVersion: "guidelinesVersion";
926
1147
  }> & z.core.$partial, z.ZodUnknown>;
927
1148
  export type OnboardingDraft = z.infer<typeof onboardingDraftSchema>;
@@ -942,6 +1163,7 @@ export declare const onboardingProgressSchema: z.ZodObject<{
942
1163
  interests: "interests";
943
1164
  avatarMediaId: "avatarMediaId";
944
1165
  businessType: "businessType";
1166
+ legalStructure: "legalStructure";
945
1167
  guidelinesVersion: "guidelinesVersion";
946
1168
  }> & z.core.$partial, z.ZodUnknown>>;
947
1169
  }, z.core.$strip>;
@@ -968,6 +1190,7 @@ export declare const onboardingProgressUpdateSchema: z.ZodObject<{
968
1190
  interests: "interests";
969
1191
  avatarMediaId: "avatarMediaId";
970
1192
  businessType: "businessType";
1193
+ legalStructure: "legalStructure";
971
1194
  guidelinesVersion: "guidelinesVersion";
972
1195
  }> & z.core.$partial, z.ZodUnknown>>;
973
1196
  }, z.core.$strip>;
@@ -998,6 +1221,7 @@ export declare const onboardingStatusSchema: z.ZodObject<{
998
1221
  interests: "interests";
999
1222
  avatarMediaId: "avatarMediaId";
1000
1223
  businessType: "businessType";
1224
+ legalStructure: "legalStructure";
1001
1225
  guidelinesVersion: "guidelinesVersion";
1002
1226
  }> & z.core.$partial, z.ZodUnknown>>;
1003
1227
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../../src/domains/onboarding/onboarding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoCxB;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,qEAAqE;AACrE,eAAO,MAAM,aAAa,MAAM,CAAC;AAejC,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,GAAE,IAAiB,GAAG,MAAM,CAoB1E;AAED,4DAA4D;AAC5D,eAAO,MAAM,aAAa,aAGqC,CAAC;AAChE,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAYpD;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,aAG2D,CAAC;AAC1F,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAI5D,eAAO,MAAM,oBAAoB,2CAA4C,CAAC;AAC9E,eAAO,MAAM,kBAAkB;;;;EAA+B,CAAC;AAC/D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D;;;;;;;;;;;;;;;;;;;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,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAI1F;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;EAA+B,CAAC;AACrE,eAAO,MAAM,qBAAqB,iOAAmC,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;mCAAyD,CAAC;AAC5F,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;iBAGnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;iBAGzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;iBAIjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -101,8 +101,61 @@ export const dateOfBirthSchema = isoDateSchema
101
101
  .refine((v) => ageInYears(v) >= MIN_AGE_YEARS, { error: VALIDATION_MESSAGE.dobUnderAge })
102
102
  .refine((v) => ageInYears(v) <= MAX_AGE_YEARS, { error: VALIDATION_MESSAGE.dobTooOld });
103
103
  // ─── Business ────────────────────────────────────────────────────────────────
104
- export const BUSINESS_TYPE_VALUES = ['startup', 'sme', 'enterprise'];
104
+ /**
105
+ * What KIND of business it is, which is not how it is registered
106
+ * (`LEGAL_STRUCTURE_VALUES`): a freelancer may be a sole proprietorship, a
107
+ * startup a private limited company, a social enterprise a Section 8 company.
108
+ *
109
+ * 0.16.0 (the user, 2026-10-18: "check what more business types we can use")
110
+ * added the kinds an Indian founder network meets beyond the three it had: the
111
+ * independent professional, the services firm, the social enterprise, the
112
+ * family business and the franchise. `sme` is India's MSME.
113
+ *
114
+ * ⚠ Stored on the profile's venture and a Mongoose enum. Append only.
115
+ */
116
+ export const BUSINESS_TYPE_VALUES = [
117
+ 'startup',
118
+ 'sme',
119
+ 'enterprise',
120
+ 'freelancer',
121
+ 'agency',
122
+ 'social_enterprise',
123
+ 'family_business',
124
+ 'franchise',
125
+ ];
105
126
  export const businessTypeSchema = z.enum(BUSINESS_TYPE_VALUES);
127
+ /**
128
+ * How the business is registered in India, or that it is not yet (0.16.0, the
129
+ * user, 2026-10-18: "the categories that we have in India like private
130
+ * limited, LLP or OPC or proprietorship").
131
+ *
132
+ * The forms Indian law provides: a sole proprietorship and a partnership firm
133
+ * (Indian Partnership Act, 1932), a limited liability partnership (LLP Act,
134
+ * 2008), a one person, private limited, public limited or Section 8 (not for
135
+ * profit) company (Companies Act, 2013), a trust or society, and a
136
+ * co-operative society. Two more are answers a founder often has: not
137
+ * registered yet (an idea, or a side project), and registered outside India
138
+ * (an Indian team whose company is incorporated abroad, often in the US).
139
+ *
140
+ * Optional, like the business type, and private to the member: nothing here
141
+ * verifies it (documents are a settings matter, by the user's ruling).
142
+ *
143
+ * ⚠ Stored on the profile's venture and a Mongoose enum. Append only.
144
+ */
145
+ export const LEGAL_STRUCTURE_VALUES = [
146
+ 'not_registered',
147
+ 'sole_proprietorship',
148
+ 'partnership',
149
+ 'llp',
150
+ 'opc',
151
+ 'private_limited',
152
+ 'public_limited',
153
+ 'section_8',
154
+ 'trust_or_society',
155
+ 'cooperative',
156
+ 'registered_abroad',
157
+ ];
158
+ export const legalStructureSchema = z.enum(LEGAL_STRUCTURE_VALUES);
106
159
  // ─── Topics: the shared vocabulary ───────────────────────────────────────────────────────────────
107
160
  /**
108
161
  * ONE vocabulary, used TWICE: a member picks these as their `interests`, and a
@@ -328,15 +381,42 @@ export const TOPIC_CATEGORIES = [
328
381
  */
329
382
  export const INTERESTS_MIN = 3;
330
383
  export const INTERESTS_MAX = 10;
384
+ /**
385
+ * A member's interests, by ONE rule (0.16.0): onboarding's finish and the Me
386
+ * tab's editor (`putMyInterestsBodySchema`) both apply this very schema, so a
387
+ * list one accepts the other can never refuse.
388
+ *
389
+ * Each topic only once: without that, three copies of one topic met the
390
+ * minimum of three while meaning one interest.
391
+ */
392
+ export const interestsSchema = z
393
+ .array(topicSchema)
394
+ .min(INTERESTS_MIN)
395
+ .max(INTERESTS_MAX)
396
+ .refine((topics) => new Set(topics).size === topics.length, {
397
+ error: VALIDATION_MESSAGE.topicsDuplicate,
398
+ });
331
399
  // ─── The step keys ───────────────────────────────────────────────────────────
332
400
  /**
333
401
  * The step keys, in order, as a literal union, so a consumer can key a table by
334
402
  * step and have TypeScript insist on every one. Before 0.2.0 `key` was a plain
335
403
  * string and the web client kept its own copy of this list to get the same
336
404
  * check; a test there held the two together. Now there is one list.
405
+ *
406
+ * 0.16.0 (the user, 2026-10-18) split the old first step, `identity`, into
407
+ * three: `basics` (full name, gender, date of birth, nothing else), `photo`
408
+ * (the photo alone) and `professional` (title, about, skills). Nine steps, up
409
+ * from seven.
410
+ *
411
+ * ⚠ THE SERVER'S RESUME CURSOR IS AN INDEX INTO THIS LIST, so re-ordering it
412
+ * moves every member who stopped part-way. A cursor saved under the old seven
413
+ * is translated by the backend (its progress rows carry the list's version);
414
+ * any further change needs the same.
337
415
  */
338
416
  export const ONBOARDING_STEP_KEYS = [
339
- 'identity',
417
+ 'basics',
418
+ 'photo',
419
+ 'professional',
340
420
  'contact',
341
421
  'location',
342
422
  'goals',
@@ -388,10 +468,10 @@ export const TEAM_SIZE_DIGITS_MAX = String(TEAM_SIZE_MAX).length;
388
468
  * `completeOnboardingBodySchema`'s decision, and the client builds that body
389
469
  * from these answers.
390
470
  *
391
- * Screens may hold a different shape on top of this one (the web draws first
392
- * and last name as two fields and joins them into `displayName`). Derive that
393
- * type from `OnboardingForm` rather than writing it out, so a field added here
394
- * reaches every screen.
471
+ * Screens may hold a different shape on top of this one. Derive that type from
472
+ * `OnboardingForm` rather than writing it out, so a field added here reaches
473
+ * every screen. (Since 0.16.0 the name is asked as one full name, which is
474
+ * `displayName` as typed; first and last name are deduced by `splitFullName`.)
395
475
  *
396
476
  * A stored draft is UNTRUSTED when it comes back: an older client, or another
397
477
  * one, wrote it, and the server stores values opaquely. Read it with
@@ -444,6 +524,7 @@ export const onboardingFormSchema = z.object({
444
524
  teamSize: z.string().max(TEAM_SIZE_DIGITS_MAX),
445
525
  }),
446
526
  businessType: businessTypeSchema.nullable(),
527
+ legalStructure: legalStructureSchema.nullable(),
447
528
  /** The guidelines text the member agreed to, or `null`. */
448
529
  guidelinesVersion: z.string().nullable(),
449
530
  });
@@ -512,6 +593,7 @@ const draftReaderSchema = z.object({
512
593
  .transform((v) => v.replace(/\D/g, '').slice(0, TEAM_SIZE_DIGITS_MAX)),
513
594
  }).transform((venture) => venture ?? { ...EMPTY_ONBOARDING_VENTURE }),
514
595
  businessType: draftChoice(BUSINESS_TYPE_VALUES),
596
+ legalStructure: draftChoice(LEGAL_STRUCTURE_VALUES),
515
597
  /** Agreement to an OLDER text is not agreement to this one. */
516
598
  guidelinesVersion: z
517
599
  .unknown()
@@ -595,7 +677,7 @@ export const completeOnboardingBodySchema = z.object({
595
677
  /** Absent when the member skipped the step or refused the permission. */
596
678
  location: locationSchema.optional(),
597
679
  goals: z.array(goalSchema).min(GOALS_MIN).max(GOAL_VALUES.length),
598
- interests: z.array(topicSchema).min(INTERESTS_MIN).max(INTERESTS_MAX),
680
+ interests: interestsSchema,
599
681
  skills: z.array(skillSchema).max(SKILLS_MAX).optional(),
600
682
  /**
601
683
  * Absent when the member skipped the business step. The profile's venture
@@ -603,6 +685,8 @@ export const completeOnboardingBodySchema = z.object({
603
685
  */
604
686
  venture: ventureSchema.omit({ foundedYear: true }).optional(),
605
687
  businessType: businessTypeSchema.optional(),
688
+ /** How the venture is registered, if the member says. Stored on the venture, like the type. */
689
+ legalStructure: legalStructureSchema.optional(),
606
690
  /**
607
691
  * The version of the guidelines this member read: `GUIDELINES_VERSION`,
608
692
  * exactly.
@@ -630,23 +714,27 @@ export const completeOnboardingBodySchema = z.object({
630
714
  * on a draft save, because a half-answered step must be storable.
631
715
  */
632
716
  export const ONBOARDING_STEP_SCHEMAS = {
633
- identity: completeOnboardingBodySchema.pick({
634
- displayName: true,
635
- gender: true,
636
- dateOfBirth: true,
717
+ // 0.16.0: the old `identity` step, split three ways by the user. The basics
718
+ // are the step's only required answers; the photo and the professional
719
+ // details may each be passed over.
720
+ basics: completeOnboardingBodySchema.pick({ displayName: true, gender: true, dateOfBirth: true }),
721
+ photo: completeOnboardingBodySchema.pick({ avatarMediaId: true }),
722
+ professional: completeOnboardingBodySchema.pick({
637
723
  headline: true,
638
724
  about: true,
639
- avatarMediaId: true,
640
- // Here because ruling D8 folded the design's orphan "title, achievements,
641
- // skills" screen into step one. It was on no step until 0.2.0, which made
642
- // it the one finish field no step owned.
725
+ // Ruling D8 folded the design's "title, achievements, skills" screen into
726
+ // the profile's first questions; it now has a step of its own again.
643
727
  skills: true,
644
728
  }),
645
729
  contact: completeOnboardingBodySchema.pick({ phone: true, links: true }),
646
730
  location: completeOnboardingBodySchema.pick({ location: true }),
647
731
  goals: completeOnboardingBodySchema.pick({ goals: true }),
648
732
  interests: completeOnboardingBodySchema.pick({ interests: true }),
649
- business: completeOnboardingBodySchema.pick({ venture: true, businessType: true }),
733
+ business: completeOnboardingBodySchema.pick({
734
+ venture: true,
735
+ businessType: true,
736
+ legalStructure: true,
737
+ }),
650
738
  guidelines: completeOnboardingBodySchema.pick({ guidelinesVersion: true }),
651
739
  };
652
740
  export const FOUNDER_ONBOARDING_STEPS = ONBOARDING_STEP_KEYS.map((key) => {