founder-schema 0.1.0 → 0.3.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 (58) hide show
  1. package/README.md +112 -40
  2. package/dist/account.d.ts +40 -0
  3. package/dist/account.d.ts.map +1 -0
  4. package/dist/account.js +39 -0
  5. package/dist/account.js.map +1 -0
  6. package/dist/chat.d.ts +63 -15
  7. package/dist/chat.d.ts.map +1 -1
  8. package/dist/chat.js +55 -17
  9. package/dist/chat.js.map +1 -1
  10. package/dist/common.d.ts +84 -8
  11. package/dist/common.d.ts.map +1 -1
  12. package/dist/common.js +109 -17
  13. package/dist/common.js.map +1 -1
  14. package/dist/discover.d.ts +98 -6
  15. package/dist/discover.d.ts.map +1 -1
  16. package/dist/discover.js +25 -11
  17. package/dist/discover.js.map +1 -1
  18. package/dist/errors.d.ts +85 -0
  19. package/dist/errors.d.ts.map +1 -0
  20. package/dist/errors.js +89 -0
  21. package/dist/errors.js.map +1 -0
  22. package/dist/feed.d.ts +400 -52
  23. package/dist/feed.d.ts.map +1 -1
  24. package/dist/feed.js +98 -68
  25. package/dist/feed.js.map +1 -1
  26. package/dist/founder-profile.d.ts +76 -46
  27. package/dist/founder-profile.d.ts.map +1 -1
  28. package/dist/founder-profile.js +46 -46
  29. package/dist/founder-profile.js.map +1 -1
  30. package/dist/index.d.ts +15 -9
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +22 -10
  33. package/dist/index.js.map +1 -1
  34. package/dist/limits.d.ts +76 -0
  35. package/dist/limits.d.ts.map +1 -0
  36. package/dist/limits.js +84 -0
  37. package/dist/limits.js.map +1 -0
  38. package/dist/onboarding.d.ts +407 -53
  39. package/dist/onboarding.d.ts.map +1 -1
  40. package/dist/onboarding.js +281 -234
  41. package/dist/onboarding.js.map +1 -1
  42. package/dist/responses/common.d.ts +122 -4
  43. package/dist/responses/common.d.ts.map +1 -1
  44. package/dist/responses/common.js +26 -3
  45. package/dist/responses/common.js.map +1 -1
  46. package/dist/responses/index.d.ts +1 -1
  47. package/dist/responses/index.d.ts.map +1 -1
  48. package/dist/responses/index.js +1 -1
  49. package/dist/responses/index.js.map +1 -1
  50. package/dist/uploads.d.ts +113 -0
  51. package/dist/uploads.d.ts.map +1 -0
  52. package/dist/uploads.js +106 -0
  53. package/dist/uploads.js.map +1 -0
  54. package/dist/validation.d.ts +136 -0
  55. package/dist/validation.d.ts.map +1 -0
  56. package/dist/validation.js +142 -0
  57. package/dist/validation.js.map +1 -0
  58. package/package.json +4 -3
@@ -7,6 +7,14 @@
7
7
  * @module founder-schema/founder-profile
8
8
  */
9
9
  import { z } from 'zod';
10
+ /**
11
+ * ⚠ NUMBERS ARE NUMBERS, never coerced. This is a BODY, which arrives as JSON
12
+ * and already carries types. `z.coerce.number()` here accepted `teamSize: true`
13
+ * as 1 and `" "` as 0, and made the schema's input type `unknown`, so a form
14
+ * typed against it could put anything in the field. Coercion belongs to query
15
+ * strings, where everything is text; a form converts its text input before it
16
+ * builds the body.
17
+ */
10
18
  export declare const ventureSchema: z.ZodObject<{
11
19
  name: z.ZodString;
12
20
  tagline: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
@@ -44,10 +52,27 @@ export declare const ventureSchema: z.ZodObject<{
44
52
  profitable: "profitable";
45
53
  exited: "exited";
46
54
  }>;
47
- teamSize: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
48
- foundedYear: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
55
+ teamSize: z.ZodOptional<z.ZodNumber>;
56
+ foundedYear: z.ZodOptional<z.ZodNumber>;
49
57
  }, z.core.$strip>;
50
58
  export type Venture = z.infer<typeof ventureSchema>;
59
+ /**
60
+ * The founder's off-platform links. ONE shape: onboarding's contact step picks
61
+ * its three from this, so a link one side knows can never be missing on the
62
+ * other. (It was written twice until 0.2.0, and the profile side lacked
63
+ * Instagram, which onboarding collected.)
64
+ *
65
+ * Defined without a default, because the read side wants one and the write
66
+ * side must not have one; each adds its own.
67
+ */
68
+ export declare const founderLinksSchema: z.ZodObject<{
69
+ linkedin: z.ZodOptional<z.ZodURL>;
70
+ x: z.ZodOptional<z.ZodURL>;
71
+ instagram: z.ZodOptional<z.ZodURL>;
72
+ github: z.ZodOptional<z.ZodURL>;
73
+ website: z.ZodOptional<z.ZodURL>;
74
+ }, z.core.$strip>;
75
+ export type FounderLinks = z.infer<typeof founderLinksSchema>;
51
76
  /**
52
77
  * The profile as the owner sees it. A peer sees the redacted projection
53
78
  * (`founderCardSchema`), which is built on the server and never by dropping
@@ -64,7 +89,7 @@ export declare const founderProfileSchema: z.ZodObject<{
64
89
  location: z.ZodOptional<z.ZodObject<{
65
90
  city: z.ZodString;
66
91
  state: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
67
- country: z.ZodDefault<z.ZodString>;
92
+ country: z.ZodString;
68
93
  }, z.core.$strip>>;
69
94
  venture: z.ZodOptional<z.ZodObject<{
70
95
  name: z.ZodString;
@@ -103,8 +128,8 @@ export declare const founderProfileSchema: z.ZodObject<{
103
128
  profitable: "profitable";
104
129
  exited: "exited";
105
130
  }>;
106
- teamSize: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
107
- foundedYear: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
131
+ teamSize: z.ZodOptional<z.ZodNumber>;
132
+ foundedYear: z.ZodOptional<z.ZodNumber>;
108
133
  }, z.core.$strip>>;
109
134
  skills: z.ZodDefault<z.ZodArray<z.ZodEnum<{
110
135
  engineering: "engineering";
@@ -139,6 +164,7 @@ export declare const founderProfileSchema: z.ZodObject<{
139
164
  links: z.ZodDefault<z.ZodObject<{
140
165
  linkedin: z.ZodOptional<z.ZodURL>;
141
166
  x: z.ZodOptional<z.ZodURL>;
167
+ instagram: z.ZodOptional<z.ZodURL>;
142
168
  github: z.ZodOptional<z.ZodURL>;
143
169
  website: z.ZodOptional<z.ZodURL>;
144
170
  }, z.core.$strip>>;
@@ -156,43 +182,16 @@ export type FounderProfile = z.infer<typeof founderProfileSchema>;
156
182
  * accident of spreading the full document.
157
183
  */
158
184
  export declare const founderCardSchema: z.ZodObject<{
159
- skills: z.ZodDefault<z.ZodArray<z.ZodEnum<{
160
- engineering: "engineering";
161
- product: "product";
162
- design: "design";
163
- data: "data";
164
- growth: "growth";
165
- sales: "sales";
166
- marketing: "marketing";
167
- operations: "operations";
168
- finance: "finance";
169
- legal: "legal";
170
- hr_people: "hr_people";
171
- supply_chain: "supply_chain";
172
- research: "research";
173
- fundraising: "fundraising";
174
- community: "community";
175
- }>>>;
176
- displayName: z.ZodString;
177
- headline: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
178
185
  location: z.ZodOptional<z.ZodObject<{
179
186
  city: z.ZodString;
180
187
  state: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
181
- country: z.ZodDefault<z.ZodString>;
188
+ country: z.ZodString;
182
189
  }, z.core.$strip>>;
183
- goals: z.ZodDefault<z.ZodArray<z.ZodEnum<{
184
- find_cofounder: "find_cofounder";
185
- find_investors: "find_investors";
186
- find_customers: "find_customers";
187
- hiring: "hiring";
188
- partnerships: "partnerships";
189
- mentorship: "mentorship";
190
- grow_network: "grow_network";
191
- business_ideas: "business_ideas";
192
- market_insights: "market_insights";
193
- learn_startup: "learn_startup";
194
- start_company: "start_company";
195
- }>>>;
190
+ username: z.ZodString;
191
+ displayName: z.ZodString;
192
+ avatarUrl: z.ZodOptional<z.ZodURL>;
193
+ id: z.ZodString;
194
+ headline: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
196
195
  venture: z.ZodOptional<z.ZodObject<{
197
196
  name: z.ZodString;
198
197
  tagline: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
@@ -230,12 +229,39 @@ export declare const founderCardSchema: z.ZodObject<{
230
229
  profitable: "profitable";
231
230
  exited: "exited";
232
231
  }>;
233
- teamSize: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
234
- foundedYear: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
232
+ teamSize: z.ZodOptional<z.ZodNumber>;
233
+ foundedYear: z.ZodOptional<z.ZodNumber>;
235
234
  }, z.core.$strip>>;
236
- username: z.ZodString;
237
- avatarUrl: z.ZodOptional<z.ZodURL>;
238
- id: z.ZodString;
235
+ skills: z.ZodDefault<z.ZodArray<z.ZodEnum<{
236
+ engineering: "engineering";
237
+ product: "product";
238
+ design: "design";
239
+ data: "data";
240
+ growth: "growth";
241
+ sales: "sales";
242
+ marketing: "marketing";
243
+ operations: "operations";
244
+ finance: "finance";
245
+ legal: "legal";
246
+ hr_people: "hr_people";
247
+ supply_chain: "supply_chain";
248
+ research: "research";
249
+ fundraising: "fundraising";
250
+ community: "community";
251
+ }>>>;
252
+ goals: z.ZodDefault<z.ZodArray<z.ZodEnum<{
253
+ find_cofounder: "find_cofounder";
254
+ find_investors: "find_investors";
255
+ find_customers: "find_customers";
256
+ hiring: "hiring";
257
+ partnerships: "partnerships";
258
+ mentorship: "mentorship";
259
+ grow_network: "grow_network";
260
+ business_ideas: "business_ideas";
261
+ market_insights: "market_insights";
262
+ learn_startup: "learn_startup";
263
+ start_company: "start_company";
264
+ }>>>;
239
265
  }, z.core.$strip>;
240
266
  export type FounderCard = z.infer<typeof founderCardSchema>;
241
267
  /**
@@ -298,8 +324,8 @@ export declare const updateFounderProfileBodySchema: z.ZodObject<{
298
324
  profitable: "profitable";
299
325
  exited: "exited";
300
326
  }>;
301
- teamSize: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
302
- foundedYear: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
327
+ teamSize: z.ZodOptional<z.ZodNumber>;
328
+ foundedYear: z.ZodOptional<z.ZodNumber>;
303
329
  }, z.core.$strip>>;
304
330
  skills: z.ZodOptional<z.ZodArray<z.ZodEnum<{
305
331
  engineering: "engineering";
@@ -334,12 +360,16 @@ export declare const updateFounderProfileBodySchema: z.ZodObject<{
334
360
  links: z.ZodOptional<z.ZodObject<{
335
361
  linkedin: z.ZodOptional<z.ZodURL>;
336
362
  x: z.ZodOptional<z.ZodURL>;
363
+ instagram: z.ZodOptional<z.ZodURL>;
337
364
  github: z.ZodOptional<z.ZodURL>;
338
365
  website: z.ZodOptional<z.ZodURL>;
339
366
  }, z.core.$strip>>;
340
367
  }, z.core.$strip>;
341
368
  export type UpdateFounderProfileBody = z.infer<typeof updateFounderProfileBodySchema>;
342
- /** Username change. Separate from the profile patch because it needs a uniqueness check. */
369
+ /**
370
+ * Username change. Separate from the profile patch because it needs a
371
+ * uniqueness check, and it refuses a reserved handle (`chosenUsernameSchema`).
372
+ */
343
373
  export declare const updateUsernameBodySchema: z.ZodObject<{
344
374
  username: z.ZodString;
345
375
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"founder-profile.d.ts","sourceRoot":"","sources":["../src/founder-profile.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BxB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAepD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoC/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAA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C,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAqB5D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAWzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;iBAA+C,CAAC;AACrF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,oDAAoD;AACpD,eAAO,MAAM,0BAA0B;;;;;;;iBAKrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -7,16 +7,26 @@
7
7
  * @module founder-schema/founder-profile
8
8
  */
9
9
  import { z } from 'zod';
10
- import { goalSchema, httpUrlSchema, industrySchema, locationSchema, optionalTrimmedString, skillSchema, startupStageSchema, usernameSchema, } from './common.js';
10
+ import { chosenUsernameSchema, GOAL_VALUES, goalSchema, httpUrlSchema, industrySchema, locationSchema, optionalTrimmedString, skillSchema, startupStageSchema, usernameSchema, } from './common.js';
11
+ import { ABOUT_MAX, DISPLAY_NAME_MAX, FOUNDED_YEAR_MIN, HEADLINE_MAX, SKILLS_MAX, TEAM_SIZE_MAX, TEAM_SIZE_MIN, VENTURE_NAME_MAX, VENTURE_TAGLINE_MAX, } from './limits.js';
12
+ import { VALIDATION_MESSAGE } from './validation.js';
11
13
  // ─── Venture ─────────────────────────────────────────────────────────────────
14
+ /**
15
+ * ⚠ NUMBERS ARE NUMBERS, never coerced. This is a BODY, which arrives as JSON
16
+ * and already carries types. `z.coerce.number()` here accepted `teamSize: true`
17
+ * as 1 and `" "` as 0, and made the schema's input type `unknown`, so a form
18
+ * typed against it could put anything in the field. Coercion belongs to query
19
+ * strings, where everything is text; a form converts its text input before it
20
+ * builds the body.
21
+ */
12
22
  export const ventureSchema = z.object({
13
- name: z.string().trim().min(1).max(120),
14
- tagline: optionalTrimmedString(160),
23
+ name: z.string().trim().min(1).max(VENTURE_NAME_MAX),
24
+ tagline: optionalTrimmedString(VENTURE_TAGLINE_MAX),
15
25
  website: httpUrlSchema.optional(),
16
26
  industry: industrySchema,
17
27
  stage: startupStageSchema,
18
28
  /** Team size including the founder. Optional: a solo pre-idea founder has none to report. */
19
- teamSize: z.coerce.number().int().min(1).max(100000).optional(),
29
+ teamSize: z.number().int().min(TEAM_SIZE_MIN).max(TEAM_SIZE_MAX).optional(),
20
30
  /**
21
31
  * Not in the future. The bound is read per parse, never captured once.
22
32
  *
@@ -27,23 +37,29 @@ export const ventureSchema = z.object({
27
37
  * `max` there being frozen at schema construction. This is where the ceiling
28
38
  * lives.
29
39
  */
30
- foundedYear: z.coerce
40
+ foundedYear: z
31
41
  .number()
32
42
  .int()
33
- .min(1900)
43
+ .min(FOUNDED_YEAR_MIN)
34
44
  .refine((year) => year <= new Date().getUTCFullYear(), {
35
- message: 'Founded year cannot be in the future',
45
+ error: VALIDATION_MESSAGE.foundedYearFuture,
36
46
  })
37
47
  .optional(),
38
48
  });
39
49
  // ─── Profile ─────────────────────────────────────────────────────────────────
40
50
  /**
41
- * The founder's off-platform links. Defined once, because the read side wants a
42
- * default and the write side must not have one.
51
+ * The founder's off-platform links. ONE shape: onboarding's contact step picks
52
+ * its three from this, so a link one side knows can never be missing on the
53
+ * other. (It was written twice until 0.2.0, and the profile side lacked
54
+ * Instagram, which onboarding collected.)
55
+ *
56
+ * Defined without a default, because the read side wants one and the write
57
+ * side must not have one; each adds its own.
43
58
  */
44
- const linksSchema = z.object({
59
+ export const founderLinksSchema = z.object({
45
60
  linkedin: httpUrlSchema.optional(),
46
61
  x: httpUrlSchema.optional(),
62
+ instagram: httpUrlSchema.optional(),
47
63
  github: httpUrlSchema.optional(),
48
64
  website: httpUrlSchema.optional(),
49
65
  });
@@ -56,9 +72,9 @@ export const founderProfileSchema = z.object({
56
72
  id: z.string(),
57
73
  userId: z.string(),
58
74
  username: usernameSchema,
59
- displayName: z.string().trim().min(1).max(80),
60
- headline: optionalTrimmedString(120),
61
- about: optionalTrimmedString(1000),
75
+ displayName: z.string().trim().min(1).max(DISPLAY_NAME_MAX),
76
+ headline: optionalTrimmedString(HEADLINE_MAX),
77
+ about: optionalTrimmedString(ABOUT_MAX),
62
78
  /**
63
79
  * Plain `z.url()`, NOT `httpUrlSchema`, and the difference is deliberate.
64
80
  *
@@ -79,9 +95,9 @@ export const founderProfileSchema = z.object({
79
95
  avatarUrl: z.url().optional(),
80
96
  location: locationSchema.optional(),
81
97
  venture: ventureSchema.optional(),
82
- skills: z.array(skillSchema).max(8).default([]),
83
- goals: z.array(goalSchema).max(11).default([]),
84
- links: linksSchema.default({}),
98
+ skills: z.array(skillSchema).max(SKILLS_MAX).default([]),
99
+ goals: z.array(goalSchema).max(GOAL_VALUES.length).default([]),
100
+ links: founderLinksSchema.default({}),
85
101
  /** Onboarding is finished and the member is visible in Discover. */
86
102
  isOnboarded: z.boolean().default(false),
87
103
  /** Member paused their own profile. Hidden from Discover, keeps their data. */
@@ -122,27 +138,7 @@ export const founderCardSchema = founderProfileSchema.pick({
122
138
  * `optionalTrimmedString` does the dropping, which is right for a create body
123
139
  * and wrong for a patch.
124
140
  */
125
- const clearableText = (maxLength) => z
126
- .string()
127
- .trim()
128
- .min(1, 'Send null to clear this field, not an empty string')
129
- .max(maxLength)
130
- .nullable()
131
- .optional();
132
- /**
133
- * Location as a PATCH sends it. Note what is missing: `country` has no default
134
- * here, and is required instead.
135
- *
136
- * `locationSchema` defaults country to India, which is correct on the read side
137
- * and destructive on the write side: a founder in Berlin who corrects only
138
- * their city would be moved to India by a default they never saw. A patch that
139
- * carries a location carries the whole location.
140
- */
141
- const patchLocationSchema = z.object({
142
- city: z.string().trim().min(1).max(80),
143
- state: optionalTrimmedString(80),
144
- country: z.string().trim().min(1).max(80),
145
- });
141
+ const clearableText = (maxLength) => z.string().trim().min(1, VALIDATION_MESSAGE.clearWithNull).max(maxLength).nullable().optional();
146
142
  /**
147
143
  * Patch body for the Me tab. Only the keys the member actually changed.
148
144
  *
@@ -158,18 +154,22 @@ const patchLocationSchema = z.object({
158
154
  * states what the caller sent and nothing else.
159
155
  */
160
156
  export const updateFounderProfileBodySchema = z.object({
161
- displayName: z.string().trim().min(1).max(80).optional(),
162
- headline: clearableText(120),
163
- about: clearableText(1000),
164
- location: patchLocationSchema.optional(),
157
+ displayName: z.string().trim().min(1).max(DISPLAY_NAME_MAX).optional(),
158
+ headline: clearableText(HEADLINE_MAX),
159
+ about: clearableText(ABOUT_MAX),
160
+ /** Carries the whole location; `locationSchema` has no default to fill a gap. */
161
+ location: locationSchema.optional(),
165
162
  venture: ventureSchema.optional(),
166
- skills: z.array(skillSchema).max(8).optional(),
167
- goals: z.array(goalSchema).max(11).optional(),
163
+ skills: z.array(skillSchema).max(SKILLS_MAX).optional(),
164
+ goals: z.array(goalSchema).max(GOAL_VALUES.length).optional(),
168
165
  /** Sent whole. To drop one link, send the object without that key. */
169
- links: linksSchema.optional(),
166
+ links: founderLinksSchema.optional(),
170
167
  });
171
- /** Username change. Separate from the profile patch because it needs a uniqueness check. */
172
- export const updateUsernameBodySchema = z.object({ username: usernameSchema });
168
+ /**
169
+ * Username change. Separate from the profile patch because it needs a
170
+ * uniqueness check, and it refuses a reserved handle (`chosenUsernameSchema`).
171
+ */
172
+ export const updateUsernameBodySchema = z.object({ username: chosenUsernameSchema });
173
173
  /** Availability probe behind the username field. */
174
174
  export const usernameAvailabilitySchema = z.object({
175
175
  username: usernameSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"founder-profile.js","sourceRoot":"","sources":["../src/founder-profile.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,UAAU,EACV,aAAa,EACb,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,WAAW,EACX,kBAAkB,EAClB,cAAc,GACf,MAAM,aAAa,CAAC;AAErB,gFAAgF;AAEhF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACvC,OAAO,EAAE,qBAAqB,CAAC,GAAG,CAAC;IACnC,OAAO,EAAE,aAAa,CAAC,QAAQ,EAAE;IACjC,QAAQ,EAAE,cAAc;IACxB,KAAK,EAAE,kBAAkB;IACzB,6FAA6F;IAC7F,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;IAC/D;;;;;;;;;OASG;IACH,WAAW,EAAE,CAAC,CAAC,MAAM;SAClB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,IAAI,CAAC;SACT,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC,cAAc,EAAE,EAAE;QACrD,OAAO,EAAE,sCAAsC;KAChD,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC;AAGH,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,WAAW,GAAG,CAAC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IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IACxD,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC;IAC5B,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC;IAC1B,QAAQ,EAAE,mBAAmB,CAAC,QAAQ,EAAE;IACxC,OAAO,EAAE,aAAa,CAAC,QAAQ,EAAE;IACjC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC9C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7C,sEAAsE;IACtE,KAAK,EAAE,WAAW,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAGH,4FAA4F;AAC5F,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,CAAC;AAG/E,oDAAoD;AACpD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,QAAQ,EAAE,cAAc;IACxB,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,uDAAuD;IACvD,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC","sourcesContent":["/**\n * founder-schema — The founder profile\n *\n * One member, one profile. The central auth account owns identity (email,\n * verification, deletion); this owns everything Founder Circle shows.\n *\n * @module founder-schema/founder-profile\n */\n\nimport { z } from 'zod';\nimport {\n goalSchema,\n httpUrlSchema,\n industrySchema,\n locationSchema,\n optionalTrimmedString,\n skillSchema,\n startupStageSchema,\n usernameSchema,\n} from './common.js';\n\n// ─── Venture ─────────────────────────────────────────────────────────────────\n\nexport const ventureSchema = z.object({\n name: z.string().trim().min(1).max(120),\n tagline: optionalTrimmedString(160),\n website: httpUrlSchema.optional(),\n industry: industrySchema,\n stage: startupStageSchema,\n /** Team size including the founder. Optional: a solo pre-idea founder has none to report. */\n teamSize: z.coerce.number().int().min(1).max(100000).optional(),\n /**\n * Not in the future. The bound is read per parse, never captured once.\n *\n * `.max(new Date().getUTCFullYear())` looks equivalent and is not: it is\n * evaluated when this module is imported, so a server process still up on\n * 1 January rejects the new year until somebody restarts it. The backend's\n * Mongoose model deliberately carries no upper bound for the same reason, a\n * `max` there being frozen at schema construction. This is where the ceiling\n * lives.\n */\n foundedYear: z.coerce\n .number()\n .int()\n .min(1900)\n .refine((year) => year <= new Date().getUTCFullYear(), {\n message: 'Founded year cannot be in the future',\n })\n .optional(),\n});\nexport type Venture = z.infer<typeof ventureSchema>;\n\n// ─── Profile ─────────────────────────────────────────────────────────────────\n\n/**\n * The founder's off-platform links. Defined once, because the read side wants a\n * default and the write side must not have one.\n */\nconst linksSchema = z.object({\n linkedin: httpUrlSchema.optional(),\n x: httpUrlSchema.optional(),\n github: httpUrlSchema.optional(),\n website: httpUrlSchema.optional(),\n});\n\n/**\n * The profile as the owner sees it. A peer sees the redacted projection\n * (`founderCardSchema`), which is built on the server and never by dropping\n * fields on the client.\n */\nexport const founderProfileSchema = z.object({\n id: z.string(),\n userId: z.string(),\n username: usernameSchema,\n displayName: z.string().trim().min(1).max(80),\n headline: optionalTrimmedString(120),\n about: optionalTrimmedString(1000),\n /**\n * Plain `z.url()`, NOT `httpUrlSchema`, and the difference is deliberate.\n *\n * No member can write this field: it appears in no write body, and\n * `public-surface.test.ts` asserts that and will fail the day somebody adds it\n * to a form. So the scheme restriction would be defending a field that takes\n * no member input, while refusing hosts we legitimately serve avatars from,\n * our own dev host among them. A read schema that rejects our own response is\n * a self-inflicted outage.\n *\n * ⚠️ That argument holds only while nothing member-supplied reaches this\n * field. Two sources write an avatar today and NEITHER is a member typing a\n * URL: our own upload path, and the central-auth `user.created` /\n * `user.updated` webhook, which carries the Google OAuth picture. If a\n * \"paste a link to your photo\" control is ever added, this goes back to\n * `httpUrlSchema` and the ruling behind it is void.\n */\n avatarUrl: z.url().optional(),\n location: locationSchema.optional(),\n venture: ventureSchema.optional(),\n skills: z.array(skillSchema).max(8).default([]),\n goals: z.array(goalSchema).max(11).default([]),\n links: linksSchema.default({}),\n /** Onboarding is finished and the member is visible in Discover. */\n isOnboarded: z.boolean().default(false),\n /** Member paused their own profile. Hidden from Discover, keeps their data. */\n isActive: z.boolean().default(true),\n createdAt: z.iso.datetime(),\n updatedAt: z.iso.datetime(),\n});\nexport type FounderProfile = z.infer<typeof founderProfileSchema>;\n\n/**\n * What one founder sees of another in Discover and on a profile page.\n *\n * Built server-side. Keep it a strict subset of `founderProfileSchema` — if a\n * private field ever needs to show here, that is a product decision, not an\n * accident of spreading the full document.\n */\nexport const founderCardSchema = founderProfileSchema.pick({\n id: true,\n username: true,\n displayName: true,\n headline: true,\n avatarUrl: true,\n location: true,\n venture: true,\n skills: true,\n goals: true,\n});\nexport type FounderCard = z.infer<typeof founderCardSchema>;\n\n// ─── Write bodies ────────────────────────────────────────────────────────────\n\n/**\n * A text field the member is allowed to empty.\n *\n * Three states, and they are deliberately distinct:\n * absent do not touch this field\n * null clear it (the backend turns this into an `$unset`)\n * \"\" REJECTED\n *\n * The empty string is refused on purpose. A form that forgets to convert a\n * cleared input to `null` then fails loudly at the boundary, instead of being\n * silently dropped and leaving the member staring at text they just deleted.\n * `optionalTrimmedString` does the dropping, which is right for a create body\n * and wrong for a patch.\n */\nconst clearableText = (maxLength: number) =>\n z\n .string()\n .trim()\n .min(1, 'Send null to clear this field, not an empty string')\n .max(maxLength)\n .nullable()\n .optional();\n\n/**\n * Location as a PATCH sends it. Note what is missing: `country` has no default\n * here, and is required instead.\n *\n * `locationSchema` defaults country to India, which is correct on the read side\n * and destructive on the write side: a founder in Berlin who corrects only\n * their city would be moved to India by a default they never saw. A patch that\n * carries a location carries the whole location.\n */\nconst patchLocationSchema = z.object({\n city: z.string().trim().min(1).max(80),\n state: optionalTrimmedString(80),\n country: z.string().trim().min(1).max(80),\n});\n\n/**\n * Patch body for the Me tab. Only the keys the member actually changed.\n *\n * ⚠️ Written as its own object ON PURPOSE. Do NOT rebuild it as\n * `founderProfileSchema.pick({...}).partial()`: `.partial()` does not switch\n * off `.default()`, so `skills`, `goals` and `links` would materialise as\n * `[]`, `[]` and `{}` on every request, including an empty one. Under a `$set`\n * that wipes a member's skills and every one of their links the moment they\n * edit their display name. `tsc` cannot see it and the request looks correct in\n * the network tab.\n *\n * The rule this comes from: defaults belong on the READ side. A write body\n * states what the caller sent and nothing else.\n */\nexport const updateFounderProfileBodySchema = z.object({\n displayName: z.string().trim().min(1).max(80).optional(),\n headline: clearableText(120),\n about: clearableText(1000),\n location: patchLocationSchema.optional(),\n venture: ventureSchema.optional(),\n skills: z.array(skillSchema).max(8).optional(),\n goals: z.array(goalSchema).max(11).optional(),\n /** Sent whole. To drop one link, send the object without that key. */\n links: linksSchema.optional(),\n});\nexport type UpdateFounderProfileBody = z.infer<typeof updateFounderProfileBodySchema>;\n\n/** Username change. Separate from the profile patch because it needs a uniqueness check. */\nexport const updateUsernameBodySchema = z.object({ username: usernameSchema });\nexport type UpdateUsernameBody = z.infer<typeof updateUsernameBodySchema>;\n\n/** Availability probe behind the username field. */\nexport const usernameAvailabilitySchema = z.object({\n username: usernameSchema,\n available: z.boolean(),\n /** Present when unavailable: `taken` or `reserved`. */\n reason: z.enum(['taken', 'reserved']).optional(),\n});\nexport type UsernameAvailability = z.infer<typeof usernameAvailabilitySchema>;\n"]}
1
+ {"version":3,"file":"founder-profile.js","sourceRoot":"","sources":["../src/founder-profile.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,UAAU,EACV,aAAa,EACb,cAAc,EACd,cAAc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AC,CAAC,QAAQ,EAAE;IACvD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;IAC7D,sEAAsE;IACtE,KAAK,EAAE,kBAAkB,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAGH;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC,CAAC;AAGrF,oDAAoD;AACpD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,QAAQ,EAAE,cAAc;IACxB,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,uDAAuD;IACvD,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC","sourcesContent":["/**\n * founder-schema — The founder profile\n *\n * One member, one profile. The central auth account owns identity (email,\n * verification, deletion); this owns everything Founder Circle shows.\n *\n * @module founder-schema/founder-profile\n */\n\nimport { z } from 'zod';\nimport {\n chosenUsernameSchema,\n GOAL_VALUES,\n goalSchema,\n httpUrlSchema,\n industrySchema,\n locationSchema,\n optionalTrimmedString,\n skillSchema,\n startupStageSchema,\n usernameSchema,\n} from './common.js';\nimport {\n ABOUT_MAX,\n DISPLAY_NAME_MAX,\n FOUNDED_YEAR_MIN,\n HEADLINE_MAX,\n SKILLS_MAX,\n TEAM_SIZE_MAX,\n TEAM_SIZE_MIN,\n VENTURE_NAME_MAX,\n VENTURE_TAGLINE_MAX,\n} from './limits.js';\nimport { VALIDATION_MESSAGE } from './validation.js';\n\n// ─── Venture ─────────────────────────────────────────────────────────────────\n\n/**\n * ⚠ NUMBERS ARE NUMBERS, never coerced. This is a BODY, which arrives as JSON\n * and already carries types. `z.coerce.number()` here accepted `teamSize: true`\n * as 1 and `\" \"` as 0, and made the schema's input type `unknown`, so a form\n * typed against it could put anything in the field. Coercion belongs to query\n * strings, where everything is text; a form converts its text input before it\n * builds the body.\n */\nexport const ventureSchema = z.object({\n name: z.string().trim().min(1).max(VENTURE_NAME_MAX),\n tagline: optionalTrimmedString(VENTURE_TAGLINE_MAX),\n website: httpUrlSchema.optional(),\n industry: industrySchema,\n stage: startupStageSchema,\n /** Team size including the founder. Optional: a solo pre-idea founder has none to report. */\n teamSize: z.number().int().min(TEAM_SIZE_MIN).max(TEAM_SIZE_MAX).optional(),\n /**\n * Not in the future. The bound is read per parse, never captured once.\n *\n * `.max(new Date().getUTCFullYear())` looks equivalent and is not: it is\n * evaluated when this module is imported, so a server process still up on\n * 1 January rejects the new year until somebody restarts it. The backend's\n * Mongoose model deliberately carries no upper bound for the same reason, a\n * `max` there being frozen at schema construction. This is where the ceiling\n * lives.\n */\n foundedYear: z\n .number()\n .int()\n .min(FOUNDED_YEAR_MIN)\n .refine((year) => year <= new Date().getUTCFullYear(), {\n error: VALIDATION_MESSAGE.foundedYearFuture,\n })\n .optional(),\n});\nexport type Venture = z.infer<typeof ventureSchema>;\n\n// ─── Profile ─────────────────────────────────────────────────────────────────\n\n/**\n * The founder's off-platform links. ONE shape: onboarding's contact step picks\n * its three from this, so a link one side knows can never be missing on the\n * other. (It was written twice until 0.2.0, and the profile side lacked\n * Instagram, which onboarding collected.)\n *\n * Defined without a default, because the read side wants one and the write\n * side must not have one; each adds its own.\n */\nexport const founderLinksSchema = z.object({\n linkedin: httpUrlSchema.optional(),\n x: httpUrlSchema.optional(),\n instagram: httpUrlSchema.optional(),\n github: httpUrlSchema.optional(),\n website: httpUrlSchema.optional(),\n});\nexport type FounderLinks = z.infer<typeof founderLinksSchema>;\n\n/**\n * The profile as the owner sees it. A peer sees the redacted projection\n * (`founderCardSchema`), which is built on the server and never by dropping\n * fields on the client.\n */\nexport const founderProfileSchema = z.object({\n id: z.string(),\n userId: z.string(),\n username: usernameSchema,\n displayName: z.string().trim().min(1).max(DISPLAY_NAME_MAX),\n headline: optionalTrimmedString(HEADLINE_MAX),\n about: optionalTrimmedString(ABOUT_MAX),\n /**\n * Plain `z.url()`, NOT `httpUrlSchema`, and the difference is deliberate.\n *\n * No member can write this field: it appears in no write body, and\n * `public-surface.test.ts` asserts that and will fail the day somebody adds it\n * to a form. So the scheme restriction would be defending a field that takes\n * no member input, while refusing hosts we legitimately serve avatars from,\n * our own dev host among them. A read schema that rejects our own response is\n * a self-inflicted outage.\n *\n * ⚠️ That argument holds only while nothing member-supplied reaches this\n * field. Two sources write an avatar today and NEITHER is a member typing a\n * URL: our own upload path, and the central-auth `user.created` /\n * `user.updated` webhook, which carries the Google OAuth picture. If a\n * \"paste a link to your photo\" control is ever added, this goes back to\n * `httpUrlSchema` and the ruling behind it is void.\n */\n avatarUrl: z.url().optional(),\n location: locationSchema.optional(),\n venture: ventureSchema.optional(),\n skills: z.array(skillSchema).max(SKILLS_MAX).default([]),\n goals: z.array(goalSchema).max(GOAL_VALUES.length).default([]),\n links: founderLinksSchema.default({}),\n /** Onboarding is finished and the member is visible in Discover. */\n isOnboarded: z.boolean().default(false),\n /** Member paused their own profile. Hidden from Discover, keeps their data. */\n isActive: z.boolean().default(true),\n createdAt: z.iso.datetime(),\n updatedAt: z.iso.datetime(),\n});\nexport type FounderProfile = z.infer<typeof founderProfileSchema>;\n\n/**\n * What one founder sees of another in Discover and on a profile page.\n *\n * Built server-side. Keep it a strict subset of `founderProfileSchema` — if a\n * private field ever needs to show here, that is a product decision, not an\n * accident of spreading the full document.\n */\nexport const founderCardSchema = founderProfileSchema.pick({\n id: true,\n username: true,\n displayName: true,\n headline: true,\n avatarUrl: true,\n location: true,\n venture: true,\n skills: true,\n goals: true,\n});\nexport type FounderCard = z.infer<typeof founderCardSchema>;\n\n// ─── Write bodies ────────────────────────────────────────────────────────────\n\n/**\n * A text field the member is allowed to empty.\n *\n * Three states, and they are deliberately distinct:\n * absent do not touch this field\n * null clear it (the backend turns this into an `$unset`)\n * \"\" REJECTED\n *\n * The empty string is refused on purpose. A form that forgets to convert a\n * cleared input to `null` then fails loudly at the boundary, instead of being\n * silently dropped and leaving the member staring at text they just deleted.\n * `optionalTrimmedString` does the dropping, which is right for a create body\n * and wrong for a patch.\n */\nconst clearableText = (maxLength: number) =>\n z.string().trim().min(1, VALIDATION_MESSAGE.clearWithNull).max(maxLength).nullable().optional();\n\n/**\n * Patch body for the Me tab. Only the keys the member actually changed.\n *\n * ⚠️ Written as its own object ON PURPOSE. Do NOT rebuild it as\n * `founderProfileSchema.pick({...}).partial()`: `.partial()` does not switch\n * off `.default()`, so `skills`, `goals` and `links` would materialise as\n * `[]`, `[]` and `{}` on every request, including an empty one. Under a `$set`\n * that wipes a member's skills and every one of their links the moment they\n * edit their display name. `tsc` cannot see it and the request looks correct in\n * the network tab.\n *\n * The rule this comes from: defaults belong on the READ side. A write body\n * states what the caller sent and nothing else.\n */\nexport const updateFounderProfileBodySchema = z.object({\n displayName: z.string().trim().min(1).max(DISPLAY_NAME_MAX).optional(),\n headline: clearableText(HEADLINE_MAX),\n about: clearableText(ABOUT_MAX),\n /** Carries the whole location; `locationSchema` has no default to fill a gap. */\n location: locationSchema.optional(),\n venture: ventureSchema.optional(),\n skills: z.array(skillSchema).max(SKILLS_MAX).optional(),\n goals: z.array(goalSchema).max(GOAL_VALUES.length).optional(),\n /** Sent whole. To drop one link, send the object without that key. */\n links: founderLinksSchema.optional(),\n});\nexport type UpdateFounderProfileBody = z.infer<typeof updateFounderProfileBodySchema>;\n\n/**\n * Username change. Separate from the profile patch because it needs a\n * uniqueness check, and it refuses a reserved handle (`chosenUsernameSchema`).\n */\nexport const updateUsernameBodySchema = z.object({ username: chosenUsernameSchema });\nexport type UpdateUsernameBody = z.infer<typeof updateUsernameBodySchema>;\n\n/** Availability probe behind the username field. */\nexport const usernameAvailabilitySchema = z.object({\n username: usernameSchema,\n available: z.boolean(),\n /** Present when unavailable: `taken` or `reserved`. */\n reason: z.enum(['taken', 'reserved']).optional(),\n});\nexport type UsernameAvailability = z.infer<typeof usernameAvailabilitySchema>;\n"]}
package/dist/index.d.ts CHANGED
@@ -2,16 +2,22 @@
2
2
  * founder-schema — Shared Zod schemas for Founder Circle
3
3
  *
4
4
  * The single source of truth consumed by founder-circle-backend, the web
5
- * client and the app client. Publishing rule (TEAM.md 5a): the version only
6
- * ever moves on `dev`, never on a feat branch.
5
+ * client and the app client: every request, every response, every limit,
6
+ * every error code. Publishing rule (TEAM.md 5a): the version only ever moves
7
+ * on `dev`, never on a feat branch.
7
8
  *
8
9
  * @module founder-schema
9
10
  */
10
- export { CHAT_PRODUCT_ID, CHAT_SOCKET_REAUTH_SECONDS, CHAT_TOKEN_REFRESH_MARGIN_SECONDS, type ChatAuthToken, type ChatConfig, type ChatInvitation, type ChatInvitationBody, chatAuthTokenSchema, chatConfigSchema, chatInvitationBodySchema, chatInvitationSchema, chatProductIdSchema, } from './chat.js';
11
- export { emptyStringToUndefined, type FounderLocation, GENDER_VALUES, type Gender, GOAL_VALUES, type Goal, genderSchema, goalSchema, httpUrlSchema, INDUSTRY_VALUES, type Industry, industrySchema, locationSchema, objectIdSchema, optionalTrimmedString, type PaginationQuery, paginationQuerySchema, phoneSchema, SKILL_VALUES, type Skill, STARTUP_STAGE_VALUES, type StartupStage, skillSchema, startupStageSchema, USERNAME_MAX, USERNAME_MIN, type Username, usernameSchema, } from './common.js';
12
- export { type DiscoverFacets, type DiscoverQuery, discoverFacetsSchema, discoverQuerySchema, } from './discover.js';
13
- export { type AttachedMedia, attachedMediaSchema, type CastVoteBody, type CastVoteResponse, COMMENT_MAX_BODY_CHARS, CONTENT_KIND_VALUES, type CommentsQuery, type ContentKind, type CreateCommentBody, type CreatePollBody, type CreatePostBody, type CreateReportBody, type CreateReportResponse, castVoteBodySchema, castVoteResponseSchema, commentsQuerySchema, contentKindSchema, createCommentBodySchema, createPollBodySchema, createPostBodySchema, createReportBodySchema, createReportResponseSchema, FEED_SORT_VALUES, type FeedAuthor, type FeedComment, type FeedImage, type FeedItem, type FeedMedia, type FeedPoll, type FeedPost, type FeedQuery, type FeedSort, type FeedVideo, feedAuthorSchema, feedCommentSchema, feedImageSchema, feedItemSchema, feedMediaSchema, feedPollSchema, feedPostSchema, feedQuerySchema, feedSortSchema, feedVideoSchema, type LinkPreview, linkPreviewSchema, MAX_TOPICS, POLL_MAX_DURATION_MS, POLL_MAX_OPTIONS, POLL_MIN_DURATION_MS, POLL_MIN_OPTIONS, POLL_OPTION_MAX_CHARS, POLL_QUESTION_MAX_CHARS, POST_MAX_BODY_CHARS, POST_MAX_MEDIA, type PollOption, pollOptionSchema, REACTION_TYPE_VALUES, REPORT_REASON_VALUES, type ReactionCounts, type ReactionType, type ReportReason, reactionCountsSchema, reactionTypeSchema, reportReasonSchema, type SetReactionBody, type SetReactionResponse, setReactionBodySchema, setReactionResponseSchema, type ToggleBookmarkResponse, toggleBookmarkResponseSchema, UPLOAD_KEY_EXTENSIONS, UPLOAD_KEY_MAX_CHARS, type UpdateCommentBody, type UpdatePostBody, type UploadKey, updateCommentBodySchema, updatePostBodySchema, uploadKeySchema, type ViewerState, viewerStateSchema, } from './feed.js';
14
- export { type FounderCard, type FounderProfile, founderCardSchema, founderProfileSchema, type UpdateFounderProfileBody, type UpdateUsernameBody, type UsernameAvailability, updateFounderProfileBodySchema, updateUsernameBodySchema, usernameAvailabilitySchema, type Venture, ventureSchema, } from './founder-profile.js';
15
- export { ageInYears, BUSINESS_TYPE_VALUES, type BusinessType, businessTypeSchema, type CompleteOnboardingBody, completeOnboardingBodySchema, contactLinksSchema, dateOfBirthSchema, FOUNDER_ONBOARDING_STEPS, INTERESTS_MAX, INTERESTS_MIN, isoDateSchema, MAX_AGE_YEARS, MIN_AGE_YEARS, ONBOARDING_STEP_FIELDS, ONBOARDING_TOTAL_STEPS, type OnboardingForm, type OnboardingProgress, type OnboardingProgressUpdate, type OnboardingStatus, type OnboardingStepConfig, onboardingDraftSchema, onboardingFormSchema, onboardingProgressSchema, onboardingProgressUpdateSchema, onboardingStatusSchema, TOPIC_CATEGORIES, TOPIC_VALUES, type Topic, type TopicCategory, topicSchema, } from './onboarding.js';
16
- export { type ApiError, apiErrorSchema, type ErrorResponse, errorResponseSchema, paginatedSchema, successResponseSchema, } from './responses/index.js';
11
+ export { type DeleteAccountResponse, deleteAccountResponseSchema } from './account.js';
12
+ export { CHAT_PRODUCT_ID, CHAT_SOCKET_REAUTH_SECONDS, CHAT_TOKEN_REFRESH_MARGIN_SECONDS, type ChatAuthToken, type ChatConfig, type ChatInvitation, type ChatInvitationBody, type ChatParticipant, type ChatParticipantsBody, type ChatParticipantsResponse, type ChatProductId, chatAuthTokenSchema, chatConfigSchema, chatInvitationBodySchema, chatInvitationSchema, chatParticipantSchema, chatParticipantsBodySchema, chatParticipantsResponseSchema, chatProductIdSchema, type OpenChatBody, type OpenChatResponse, openChatBodySchema, openChatResponseSchema, } from './chat.js';
13
+ export { type CoordinatesQuery, type CoordinatesQueryInput, chosenUsernameSchema, coordinatesQuerySchema, emptyStringToUndefined, type FounderLocation, GENDER_VALUES, type Gender, GOAL_VALUES, type Goal, genderSchema, goalSchema, type HttpUrl, httpUrlSchema, INDUSTRY_VALUES, type Industry, industrySchema, isReservedUsername, locationSchema, type ObjectIdString, objectIdSchema, optionalTrimmedString, type PaginationQuery, type PaginationQueryInput, type Phone, paginationQuerySchema, phoneSchema, RESERVED_USERNAMES, type SafeUrl, SKILL_VALUES, type Skill, STARTUP_STAGE_VALUES, type StartupStage, type SuggestedLocation, safeUrlSchema, skillSchema, startupStageSchema, suggestedLocationSchema, USERNAME_MAX, USERNAME_MIN, type Username, usernameSchema, } from './common.js';
14
+ export { type DiscoverFacets, type DiscoverPage, type DiscoverQuery, type DiscoverQueryInput, discoverFacetsSchema, discoverPageSchema, discoverQuerySchema, } from './discover.js';
15
+ export { API_ERROR_CODE, API_ERROR_CODE_VALUES, type ApiErrorCode, apiErrorCodeSchema, } from './errors.js';
16
+ export { type AttachedMedia, type AuthorParams, attachedMediaSchema, authorParamsSchema, type CastVoteBody, type CastVoteResponse, COMMENT_MAX_BODY_CHARS, CONTENT_KIND_VALUES, type CommentPage, type CommentParams, type CommentsQuery, type CommentsQueryInput, type ContentKind, type ContentParams, type ContentTargetParams, type CreateCommentBody, type CreatePollBody, type CreatePostBody, type CreateReportBody, type CreateReportResponse, castVoteBodySchema, castVoteResponseSchema, commentPageSchema, commentParamsSchema, commentsQuerySchema, contentKindSchema, contentParamsSchema, contentTargetParamsSchema, createCommentBodySchema, createPollBodySchema, createPostBodySchema, createReportBodySchema, createReportResponseSchema, EDIT_WINDOW_MS, ENGAGEMENT_TARGET_KIND_VALUES, type EngagementTargetKind, type EngagementTargetParams, engagementTargetKindSchema, engagementTargetParamsSchema, FEED_SORT_VALUES, type FeedAuthor, type FeedComment, type FeedImage, type FeedItem, type FeedItemParams, type FeedMedia, type FeedPage, type FeedPoll, type FeedPost, type FeedQuery, type FeedQueryInput, type FeedSort, type FeedVideo, feedAuthorSchema, feedCommentSchema, feedImageSchema, feedItemParamsSchema, feedItemSchema, feedMediaSchema, feedPageSchema, feedPollSchema, feedPostSchema, feedQuerySchema, feedSortSchema, feedVideoSchema, type LinkPreview, linkPreviewSchema, MAX_TOPICS, POLL_MAX_DURATION_MS, POLL_MAX_OPTIONS, POLL_MIN_DURATION_MS, POLL_MIN_OPTIONS, POLL_OPTION_MAX_CHARS, POLL_QUESTION_MAX_CHARS, POST_MAX_BODY_CHARS, POST_MAX_MEDIA, type PollOption, type PollParams, pollOptionSchema, pollParamsSchema, REACTION_TYPE_VALUES, REPORT_REASON_VALUES, type ReactionCounts, type ReactionType, type ReportReason, reactionCountsSchema, reactionTypeSchema, reportReasonSchema, type SetReactionBody, type SetReactionResponse, setReactionBodySchema, setReactionResponseSchema, type ToggleBookmarkResponse, toggleBookmarkResponseSchema, type UpdateCommentBody, type UpdatePostBody, updateCommentBodySchema, updatePostBodySchema, type ViewerState, viewerStateSchema, } from './feed.js';
17
+ export { type FounderCard, type FounderLinks, type FounderProfile, founderCardSchema, founderLinksSchema, founderProfileSchema, type UpdateFounderProfileBody, type UpdateUsernameBody, type UsernameAvailability, updateFounderProfileBodySchema, updateUsernameBodySchema, usernameAvailabilitySchema, type Venture, ventureSchema, } from './founder-profile.js';
18
+ export { ABOUT_MAX, CHAT_PARTICIPANTS_MAX, CITY_MAX, COUNTRY_MAX, DISCOVER_FILTER_VALUES_MAX, DISCOVER_TEXT_MAX, DISPLAY_NAME_MAX, FOUNDED_YEAR_MIN, GOALS_MIN, HEADLINE_MAX, LINK_PREVIEW_DESCRIPTION_MAX, LINK_PREVIEW_TITLE_MAX, LINK_URL_MAX, MEDIA_ALT_MAX, PAGE_SIZE_DEFAULT, PAGE_SIZE_MAX, REPORT_NOTE_MAX, SKILLS_MAX, STATE_MAX, TEAM_SIZE_MAX, TEAM_SIZE_MIN, UPLOAD_MAX_BYTES, VENTURE_NAME_MAX, VENTURE_TAGLINE_MAX, } from './limits.js';
19
+ export { ageInYears, BUSINESS_TYPE_VALUES, type BusinessType, businessTypeSchema, type CompleteOnboardingBody, type CompleteOnboardingBodyInput, type CompleteOnboardingResponse, type ContactLinks, completeOnboardingBodySchema, completeOnboardingResponseSchema, contactLinksSchema, type DateOfBirth, dateOfBirthSchema, FOUNDER_ONBOARDING_STEPS, GUIDELINES_VERSION, guidelinesVersionSchema, INTERESTS_MAX, INTERESTS_MIN, type IsoDate, isoDateSchema, MAX_AGE_YEARS, MIN_AGE_YEARS, ONBOARDING_DRAFT_KEYS, ONBOARDING_STEP_FIELDS, ONBOARDING_STEP_KEYS, ONBOARDING_STEP_SCHEMAS, ONBOARDING_TOTAL_STEPS, type OnboardingDraft, type OnboardingDraftKey, type OnboardingField, type OnboardingForm, type OnboardingProgress, type OnboardingProgressUpdate, type OnboardingStatus, type OnboardingStepBody, type OnboardingStepConfig, type OnboardingStepKey, onboardingDraftKeySchema, onboardingDraftSchema, onboardingFormSchema, onboardingProgressSchema, onboardingProgressUpdateSchema, onboardingStatusSchema, TOPIC_CATEGORIES, TOPIC_CATEGORY_KEYS, TOPIC_VALUES, type Topic, type TopicCategory, type TopicCategoryKey, topicSchema, } from './onboarding.js';
20
+ export { type ApiError, type ApiErrorDetails, apiErrorDetailsSchema, apiErrorSchema, type ErrorResponse, errorResponseSchema, type IdResponse, idResponseSchema, paginatedSchema, successResponseSchema, } from './responses/index.js';
21
+ export { UPLOAD_CONTENT_TYPES, UPLOAD_KEY_EXTENSIONS, UPLOAD_KEY_MAX_CHARS, UPLOAD_KEY_PATTERN, type UploadKey, type UploadKeyExtension, type UploadPresignBody, type UploadPresignResponse, uploadKeyExtensionSchema, uploadKeySchema, uploadPresignBodySchema, uploadPresignResponseSchema, } from './uploads.js';
22
+ export { REQUEST_PART_VALUES, type RequestPart, requestPartSchema, toValidationIssues, VALIDATION_MESSAGE, type ValidationIssue, type ValidationMessageKey, validationIssueSchema, } from './validation.js';
17
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,iCAAiC,EACjC,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,sBAAsB,EACtB,KAAK,eAAe,EACpB,aAAa,EACb,KAAK,MAAM,EACX,WAAW,EACX,KAAK,IAAI,EACT,YAAY,EACZ,UAAU,EACV,aAAa,EACb,eAAe,EACf,KAAK,QAAQ,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,KAAK,eAAe,EACpB,qBAAqB,EACrB,WAAW,EACX,YAAY,EACZ,KAAK,KAAK,EACV,oBAAoB,EACpB,KAAK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,mBAAmB,EACxB,qBAAqB,EACrB,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EACf,KAAK,WAAW,EAChB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,8BAA8B,EAC9B,wBAAwB,EACxB,0BAA0B,EAC1B,KAAK,OAAO,EACZ,aAAa,GACd,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,KAAK,YAAY,EACjB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,4BAA4B,EAC5B,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACtB,gBAAgB,EAChB,YAAY,EACZ,KAAK,KAAK,EACV,KAAK,aAAa,EAClB,WAAW,GACZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,KAAK,QAAQ,EACb,cAAc,EACd,KAAK,aAAa,EAClB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,GACtB,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EA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,EAClB,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -2,22 +2,34 @@
2
2
  * founder-schema — Shared Zod schemas for Founder Circle
3
3
  *
4
4
  * The single source of truth consumed by founder-circle-backend, the web
5
- * client and the app client. Publishing rule (TEAM.md 5a): the version only
6
- * ever moves on `dev`, never on a feat branch.
5
+ * client and the app client: every request, every response, every limit,
6
+ * every error code. Publishing rule (TEAM.md 5a): the version only ever moves
7
+ * on `dev`, never on a feat branch.
7
8
  *
8
9
  * @module founder-schema
9
10
  */
11
+ // ─── Account ─────────────────────────────────────────────────────────────────
12
+ export { deleteAccountResponseSchema } from './account.js';
10
13
  // ─── Chat ────────────────────────────────────────────────────────────────────
11
- export { CHAT_PRODUCT_ID, CHAT_SOCKET_REAUTH_SECONDS, CHAT_TOKEN_REFRESH_MARGIN_SECONDS, chatAuthTokenSchema, chatConfigSchema, chatInvitationBodySchema, chatInvitationSchema, chatProductIdSchema, } from './chat.js';
14
+ export { CHAT_PRODUCT_ID, CHAT_SOCKET_REAUTH_SECONDS, CHAT_TOKEN_REFRESH_MARGIN_SECONDS, chatAuthTokenSchema, chatConfigSchema, chatInvitationBodySchema, chatInvitationSchema, chatParticipantSchema, chatParticipantsBodySchema, chatParticipantsResponseSchema, chatProductIdSchema, openChatBodySchema, openChatResponseSchema, } from './chat.js';
12
15
  // ─── Common helpers and enums ────────────────────────────────────────────────
13
- export { emptyStringToUndefined, GENDER_VALUES, GOAL_VALUES, genderSchema, goalSchema, httpUrlSchema, INDUSTRY_VALUES, industrySchema, locationSchema, objectIdSchema, optionalTrimmedString, paginationQuerySchema, phoneSchema, SKILL_VALUES, STARTUP_STAGE_VALUES, skillSchema, startupStageSchema, USERNAME_MAX, USERNAME_MIN, usernameSchema, } from './common.js';
14
- export { discoverFacetsSchema, discoverQuerySchema, } from './discover.js';
16
+ export { chosenUsernameSchema, coordinatesQuerySchema, emptyStringToUndefined, GENDER_VALUES, GOAL_VALUES, genderSchema, goalSchema, httpUrlSchema, INDUSTRY_VALUES, industrySchema, isReservedUsername, locationSchema, objectIdSchema, optionalTrimmedString, paginationQuerySchema, phoneSchema, RESERVED_USERNAMES, SKILL_VALUES, STARTUP_STAGE_VALUES, safeUrlSchema, skillSchema, startupStageSchema, suggestedLocationSchema, USERNAME_MAX, USERNAME_MIN, usernameSchema, } from './common.js';
17
+ // ─── Discover ────────────────────────────────────────────────────────────────
18
+ export { discoverFacetsSchema, discoverPageSchema, discoverQuerySchema, } from './discover.js';
19
+ // ─── Error codes ─────────────────────────────────────────────────────────────
20
+ export { API_ERROR_CODE, API_ERROR_CODE_VALUES, apiErrorCodeSchema, } from './errors.js';
15
21
  // ─── Feed: post, poll, comment, reaction ─────────────────────────────────────
16
- export { attachedMediaSchema, COMMENT_MAX_BODY_CHARS, CONTENT_KIND_VALUES, castVoteBodySchema, castVoteResponseSchema, commentsQuerySchema, contentKindSchema, createCommentBodySchema, createPollBodySchema, createPostBodySchema, createReportBodySchema, createReportResponseSchema, FEED_SORT_VALUES, feedAuthorSchema, feedCommentSchema, feedImageSchema, feedItemSchema, feedMediaSchema, feedPollSchema, feedPostSchema, feedQuerySchema, feedSortSchema, feedVideoSchema, linkPreviewSchema, MAX_TOPICS, POLL_MAX_DURATION_MS, POLL_MAX_OPTIONS, POLL_MIN_DURATION_MS, POLL_MIN_OPTIONS, POLL_OPTION_MAX_CHARS, POLL_QUESTION_MAX_CHARS, POST_MAX_BODY_CHARS, POST_MAX_MEDIA, pollOptionSchema, REACTION_TYPE_VALUES, REPORT_REASON_VALUES, reactionCountsSchema, reactionTypeSchema, reportReasonSchema, setReactionBodySchema, setReactionResponseSchema, toggleBookmarkResponseSchema, UPLOAD_KEY_EXTENSIONS, UPLOAD_KEY_MAX_CHARS, updateCommentBodySchema, updatePostBodySchema, uploadKeySchema, viewerStateSchema, } from './feed.js';
22
+ export { attachedMediaSchema, authorParamsSchema, COMMENT_MAX_BODY_CHARS, CONTENT_KIND_VALUES, castVoteBodySchema, castVoteResponseSchema, commentPageSchema, commentParamsSchema, commentsQuerySchema, contentKindSchema, contentParamsSchema, contentTargetParamsSchema, createCommentBodySchema, createPollBodySchema, createPostBodySchema, createReportBodySchema, createReportResponseSchema, EDIT_WINDOW_MS, ENGAGEMENT_TARGET_KIND_VALUES, engagementTargetKindSchema, engagementTargetParamsSchema, FEED_SORT_VALUES, feedAuthorSchema, feedCommentSchema, feedImageSchema, feedItemParamsSchema, feedItemSchema, feedMediaSchema, feedPageSchema, feedPollSchema, feedPostSchema, feedQuerySchema, feedSortSchema, feedVideoSchema, linkPreviewSchema, MAX_TOPICS, POLL_MAX_DURATION_MS, POLL_MAX_OPTIONS, POLL_MIN_DURATION_MS, POLL_MIN_OPTIONS, POLL_OPTION_MAX_CHARS, POLL_QUESTION_MAX_CHARS, POST_MAX_BODY_CHARS, POST_MAX_MEDIA, pollOptionSchema, pollParamsSchema, REACTION_TYPE_VALUES, REPORT_REASON_VALUES, reactionCountsSchema, reactionTypeSchema, reportReasonSchema, setReactionBodySchema, setReactionResponseSchema, toggleBookmarkResponseSchema, updateCommentBodySchema, updatePostBodySchema, viewerStateSchema, } from './feed.js';
17
23
  // ─── Founder profile ─────────────────────────────────────────────────────────
18
- export { founderCardSchema, founderProfileSchema, updateFounderProfileBodySchema, updateUsernameBodySchema, usernameAvailabilitySchema, ventureSchema, } from './founder-profile.js';
19
- // ─── Discover ────────────────────────────────────────────────────────────────
20
- export { ageInYears, BUSINESS_TYPE_VALUES, businessTypeSchema, completeOnboardingBodySchema, contactLinksSchema, dateOfBirthSchema, FOUNDER_ONBOARDING_STEPS, INTERESTS_MAX, INTERESTS_MIN, isoDateSchema, MAX_AGE_YEARS, MIN_AGE_YEARS, ONBOARDING_STEP_FIELDS, ONBOARDING_TOTAL_STEPS, onboardingDraftSchema, onboardingFormSchema, onboardingProgressSchema, onboardingProgressUpdateSchema, onboardingStatusSchema, TOPIC_CATEGORIES, TOPIC_VALUES, topicSchema, } from './onboarding.js';
24
+ export { founderCardSchema, founderLinksSchema, founderProfileSchema, updateFounderProfileBodySchema, updateUsernameBodySchema, usernameAvailabilitySchema, ventureSchema, } from './founder-profile.js';
25
+ // ─── Limits: every length, size and count, by name ──────────────────────────
26
+ export { ABOUT_MAX, CHAT_PARTICIPANTS_MAX, CITY_MAX, COUNTRY_MAX, DISCOVER_FILTER_VALUES_MAX, DISCOVER_TEXT_MAX, DISPLAY_NAME_MAX, FOUNDED_YEAR_MIN, GOALS_MIN, HEADLINE_MAX, LINK_PREVIEW_DESCRIPTION_MAX, LINK_PREVIEW_TITLE_MAX, LINK_URL_MAX, MEDIA_ALT_MAX, PAGE_SIZE_DEFAULT, PAGE_SIZE_MAX, REPORT_NOTE_MAX, SKILLS_MAX, STATE_MAX, TEAM_SIZE_MAX, TEAM_SIZE_MIN, UPLOAD_MAX_BYTES, VENTURE_NAME_MAX, VENTURE_TAGLINE_MAX, } from './limits.js';
27
+ // ─── Onboarding ──────────────────────────────────────────────────────────────
28
+ export { ageInYears, BUSINESS_TYPE_VALUES, businessTypeSchema, completeOnboardingBodySchema, completeOnboardingResponseSchema, contactLinksSchema, dateOfBirthSchema, FOUNDER_ONBOARDING_STEPS, GUIDELINES_VERSION, guidelinesVersionSchema, INTERESTS_MAX, INTERESTS_MIN, isoDateSchema, MAX_AGE_YEARS, MIN_AGE_YEARS, ONBOARDING_DRAFT_KEYS, ONBOARDING_STEP_FIELDS, ONBOARDING_STEP_KEYS, ONBOARDING_STEP_SCHEMAS, ONBOARDING_TOTAL_STEPS, onboardingDraftKeySchema, onboardingDraftSchema, onboardingFormSchema, onboardingProgressSchema, onboardingProgressUpdateSchema, onboardingStatusSchema, TOPIC_CATEGORIES, TOPIC_CATEGORY_KEYS, TOPIC_VALUES, topicSchema, } from './onboarding.js';
21
29
  // ─── Response envelopes ──────────────────────────────────────────────────────
22
- export { apiErrorSchema, errorResponseSchema, paginatedSchema, successResponseSchema, } from './responses/index.js';
30
+ export { apiErrorDetailsSchema, apiErrorSchema, errorResponseSchema, idResponseSchema, paginatedSchema, successResponseSchema, } from './responses/index.js';
31
+ // ─── Uploads: the key, the extensions, asking for a slot ────────────────────
32
+ export { UPLOAD_CONTENT_TYPES, UPLOAD_KEY_EXTENSIONS, UPLOAD_KEY_MAX_CHARS, UPLOAD_KEY_PATTERN, uploadKeyExtensionSchema, uploadKeySchema, uploadPresignBodySchema, uploadPresignResponseSchema, } from './uploads.js';
33
+ // ─── Validation: message keys and the wire shape of a failure ───────────────
34
+ export { REQUEST_PART_VALUES, requestPartSchema, toValidationIssues, VALIDATION_MESSAGE, validationIssueSchema, } from './validation.js';
23
35
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,gFAAgF;AAChF,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,iCAAiC,EAKjC,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AACnB,gFAAgF;AAChF,OAAO,EACL,sBAAsB,EAEtB,aAAa,EAEb,WAAW,EAEX,YAAY,EACZ,UAAU,EACV,aAAa,EACb,eAAe,EAEf,cAAc,EACd,cAAc,EACd,cAAc,EACd,qBAAqB,EAErB,qBAAqB,EACrB,WAAW,EACX,YAAY,EAEZ,oBAAoB,EAEpB,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,YAAY,EAEZ,cAAc,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAGL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AACvB,gFAAgF;AAChF,OAAO,EAEL,mBAAmB,EAGnB,sBAAsB,EACtB,mBAAmB,EAQnB,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,gBAAgB,EAWhB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,eAAe,EACf,cAAc,EACd,eAAe,EAEf,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,cAAc,EAEd,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EAIpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAGlB,qBAAqB,EACrB,yBAAyB,EAEzB,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EAIpB,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EAEf,iBAAiB,GAClB,MAAM,WAAW,CAAC;AACnB,gFAAgF;AAChF,OAAO,EAGL,iBAAiB,EACjB,oBAAoB,EAIpB,8BAA8B,EAC9B,wBAAwB,EACxB,0BAA0B,EAE1B,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,gFAAgF;AAChF,OAAO,EACL,UAAU,EACV,oBAAoB,EAEpB,kBAAkB,EAElB,4BAA4B,EAC5B,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EAMtB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACtB,gBAAgB,EAChB,YAAY,EAGZ,WAAW,GACZ,MAAM,iBAAiB,CAAC;AACzB,gFAAgF;AAChF,OAAO,EAEL,cAAc,EAEd,mBAAmB,EACnB,eAAe,EACf,qBAAqB,GACtB,MAAM,sBAAsB,CAAC","sourcesContent":["/**\n * founder-schema — Shared Zod schemas for Founder Circle\n *\n * The single source of truth consumed by founder-circle-backend, the web\n * client and the app client. Publishing rule (TEAM.md 5a): the version only\n * ever moves on `dev`, never on a feat branch.\n *\n * @module founder-schema\n */\n\n// ─── Chat ────────────────────────────────────────────────────────────────────\nexport {\n CHAT_PRODUCT_ID,\n CHAT_SOCKET_REAUTH_SECONDS,\n CHAT_TOKEN_REFRESH_MARGIN_SECONDS,\n type ChatAuthToken,\n type ChatConfig,\n type ChatInvitation,\n type ChatInvitationBody,\n chatAuthTokenSchema,\n chatConfigSchema,\n chatInvitationBodySchema,\n chatInvitationSchema,\n chatProductIdSchema,\n} from './chat.js';\n// ─── Common helpers and enums ────────────────────────────────────────────────\nexport {\n emptyStringToUndefined,\n type FounderLocation,\n GENDER_VALUES,\n type Gender,\n GOAL_VALUES,\n type Goal,\n genderSchema,\n goalSchema,\n httpUrlSchema,\n INDUSTRY_VALUES,\n type Industry,\n industrySchema,\n locationSchema,\n objectIdSchema,\n optionalTrimmedString,\n type PaginationQuery,\n paginationQuerySchema,\n phoneSchema,\n SKILL_VALUES,\n type Skill,\n STARTUP_STAGE_VALUES,\n type StartupStage,\n skillSchema,\n startupStageSchema,\n USERNAME_MAX,\n USERNAME_MIN,\n type Username,\n usernameSchema,\n} from './common.js';\nexport {\n type DiscoverFacets,\n type DiscoverQuery,\n discoverFacetsSchema,\n discoverQuerySchema,\n} from './discover.js';\n// ─── Feed: post, poll, comment, reaction ─────────────────────────────────────\nexport {\n type AttachedMedia,\n attachedMediaSchema,\n type CastVoteBody,\n type CastVoteResponse,\n COMMENT_MAX_BODY_CHARS,\n CONTENT_KIND_VALUES,\n type CommentsQuery,\n type ContentKind,\n type CreateCommentBody,\n type CreatePollBody,\n type CreatePostBody,\n type CreateReportBody,\n type CreateReportResponse,\n castVoteBodySchema,\n castVoteResponseSchema,\n commentsQuerySchema,\n contentKindSchema,\n createCommentBodySchema,\n createPollBodySchema,\n createPostBodySchema,\n createReportBodySchema,\n createReportResponseSchema,\n FEED_SORT_VALUES,\n type FeedAuthor,\n type FeedComment,\n type FeedImage,\n type FeedItem,\n type FeedMedia,\n type FeedPoll,\n type FeedPost,\n type FeedQuery,\n type FeedSort,\n type FeedVideo,\n feedAuthorSchema,\n feedCommentSchema,\n feedImageSchema,\n feedItemSchema,\n feedMediaSchema,\n feedPollSchema,\n feedPostSchema,\n feedQuerySchema,\n feedSortSchema,\n feedVideoSchema,\n type LinkPreview,\n linkPreviewSchema,\n MAX_TOPICS,\n POLL_MAX_DURATION_MS,\n POLL_MAX_OPTIONS,\n POLL_MIN_DURATION_MS,\n POLL_MIN_OPTIONS,\n POLL_OPTION_MAX_CHARS,\n POLL_QUESTION_MAX_CHARS,\n POST_MAX_BODY_CHARS,\n POST_MAX_MEDIA,\n type PollOption,\n pollOptionSchema,\n REACTION_TYPE_VALUES,\n REPORT_REASON_VALUES,\n type ReactionCounts,\n type ReactionType,\n type ReportReason,\n reactionCountsSchema,\n reactionTypeSchema,\n reportReasonSchema,\n type SetReactionBody,\n type SetReactionResponse,\n setReactionBodySchema,\n setReactionResponseSchema,\n type ToggleBookmarkResponse,\n toggleBookmarkResponseSchema,\n UPLOAD_KEY_EXTENSIONS,\n UPLOAD_KEY_MAX_CHARS,\n type UpdateCommentBody,\n type UpdatePostBody,\n type UploadKey,\n updateCommentBodySchema,\n updatePostBodySchema,\n uploadKeySchema,\n type ViewerState,\n viewerStateSchema,\n} from './feed.js';\n// ─── Founder profile ─────────────────────────────────────────────────────────\nexport {\n type FounderCard,\n type FounderProfile,\n founderCardSchema,\n founderProfileSchema,\n type UpdateFounderProfileBody,\n type UpdateUsernameBody,\n type UsernameAvailability,\n updateFounderProfileBodySchema,\n updateUsernameBodySchema,\n usernameAvailabilitySchema,\n type Venture,\n ventureSchema,\n} from './founder-profile.js';\n// ─── Discover ────────────────────────────────────────────────────────────────\nexport {\n ageInYears,\n BUSINESS_TYPE_VALUES,\n type BusinessType,\n businessTypeSchema,\n type CompleteOnboardingBody,\n completeOnboardingBodySchema,\n contactLinksSchema,\n dateOfBirthSchema,\n FOUNDER_ONBOARDING_STEPS,\n INTERESTS_MAX,\n INTERESTS_MIN,\n isoDateSchema,\n MAX_AGE_YEARS,\n MIN_AGE_YEARS,\n ONBOARDING_STEP_FIELDS,\n ONBOARDING_TOTAL_STEPS,\n type OnboardingForm,\n type OnboardingProgress,\n type OnboardingProgressUpdate,\n type OnboardingStatus,\n type OnboardingStepConfig,\n onboardingDraftSchema,\n onboardingFormSchema,\n onboardingProgressSchema,\n onboardingProgressUpdateSchema,\n onboardingStatusSchema,\n TOPIC_CATEGORIES,\n TOPIC_VALUES,\n type Topic,\n type TopicCategory,\n topicSchema,\n} from './onboarding.js';\n// ─── Response envelopes ──────────────────────────────────────────────────────\nexport {\n type ApiError,\n apiErrorSchema,\n type ErrorResponse,\n errorResponseSchema,\n paginatedSchema,\n successResponseSchema,\n} from './responses/index.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,gFAAgF;AAChF,OAAO,EAA8B,2BAA2B,EAAE,MAAM,cAAc,CAAC;AACvF,gFAAgF;AAChF,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,iCAAiC,EASjC,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,8BAA8B,EAC9B,mBAAmB,EAGnB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,WAAW,CAAC;AACnB,gFAAgF;AAChF,OAAO,EAGL,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EAEtB,aAAa,EAEb,WAAW,EAEX,YAAY,EACZ,UAAU,EAEV,aAAa,EACb,eAAe,EAEf,cAAc,EACd,kBAAkB,EAClB,cAAc,EAEd,cAAc,EACd,qBAAqB,EAIrB,qBAAqB,EACrB,WAAW,EACX,kBAAkB,EAElB,YAAY,EAEZ,oBAAoB,EAGpB,aAAa,EACb,WAAW,EACX,kBAAk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AkB,EAGlB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC","sourcesContent":["/**\n * founder-schema — Shared Zod schemas for Founder Circle\n *\n * The single source of truth consumed by founder-circle-backend, the web\n * client and the app client: every request, every response, every limit,\n * every error code. Publishing rule (TEAM.md 5a): the version only ever moves\n * on `dev`, never on a feat branch.\n *\n * @module founder-schema\n */\n\n// ─── Account ─────────────────────────────────────────────────────────────────\nexport { type DeleteAccountResponse, deleteAccountResponseSchema } from './account.js';\n// ─── Chat ────────────────────────────────────────────────────────────────────\nexport {\n CHAT_PRODUCT_ID,\n CHAT_SOCKET_REAUTH_SECONDS,\n CHAT_TOKEN_REFRESH_MARGIN_SECONDS,\n type ChatAuthToken,\n type ChatConfig,\n type ChatInvitation,\n type ChatInvitationBody,\n type ChatParticipant,\n type ChatParticipantsBody,\n type ChatParticipantsResponse,\n type ChatProductId,\n chatAuthTokenSchema,\n chatConfigSchema,\n chatInvitationBodySchema,\n chatInvitationSchema,\n chatParticipantSchema,\n chatParticipantsBodySchema,\n chatParticipantsResponseSchema,\n chatProductIdSchema,\n type OpenChatBody,\n type OpenChatResponse,\n openChatBodySchema,\n openChatResponseSchema,\n} from './chat.js';\n// ─── Common helpers and enums ────────────────────────────────────────────────\nexport {\n type CoordinatesQuery,\n type CoordinatesQueryInput,\n chosenUsernameSchema,\n coordinatesQuerySchema,\n emptyStringToUndefined,\n type FounderLocation,\n GENDER_VALUES,\n type Gender,\n GOAL_VALUES,\n type Goal,\n genderSchema,\n goalSchema,\n type HttpUrl,\n httpUrlSchema,\n INDUSTRY_VALUES,\n type Industry,\n industrySchema,\n isReservedUsername,\n locationSchema,\n type ObjectIdString,\n objectIdSchema,\n optionalTrimmedString,\n type PaginationQuery,\n type PaginationQueryInput,\n type Phone,\n paginationQuerySchema,\n phoneSchema,\n RESERVED_USERNAMES,\n type SafeUrl,\n SKILL_VALUES,\n type Skill,\n STARTUP_STAGE_VALUES,\n type StartupStage,\n type SuggestedLocation,\n safeUrlSchema,\n skillSchema,\n startupStageSchema,\n suggestedLocationSchema,\n USERNAME_MAX,\n USERNAME_MIN,\n type Username,\n usernameSchema,\n} from './common.js';\n// ─── Discover ────────────────────────────────────────────────────────────────\nexport {\n type DiscoverFacets,\n type DiscoverPage,\n type DiscoverQuery,\n type DiscoverQueryInput,\n discoverFacetsSchema,\n discoverPageSchema,\n discoverQuerySchema,\n} from './discover.js';\n// ─── Error codes ─────────────────────────────────────────────────────────────\nexport {\n API_ERROR_CODE,\n API_ERROR_CODE_VALUES,\n type ApiErrorCode,\n apiErrorCodeSchema,\n} from './errors.js';\n// ─── Feed: post, poll, comment, reaction ─────────────────────────────────────\nexport {\n type AttachedMedia,\n type AuthorParams,\n attachedMediaSchema,\n authorParamsSchema,\n type CastVoteBody,\n type CastVoteResponse,\n COMMENT_MAX_BODY_CHARS,\n CONTENT_KIND_VALUES,\n type CommentPage,\n type CommentParams,\n type CommentsQuery,\n type CommentsQueryInput,\n type ContentKind,\n type ContentParams,\n type ContentTargetParams,\n type CreateCommentBody,\n type CreatePollBody,\n type CreatePostBody,\n type CreateReportBody,\n type CreateReportResponse,\n castVoteBodySchema,\n castVoteResponseSchema,\n commentPageSchema,\n commentParamsSchema,\n commentsQuerySchema,\n contentKindSchema,\n contentParamsSchema,\n contentTargetParamsSchema,\n createCommentBodySchema,\n createPollBodySchema,\n createPostBodySchema,\n createReportBodySchema,\n createReportResponseSchema,\n EDIT_WINDOW_MS,\n ENGAGEMENT_TARGET_KIND_VALUES,\n type EngagementTargetKind,\n type EngagementTargetParams,\n engagementTargetKindSchema,\n engagementTargetParamsSchema,\n FEED_SORT_VALUES,\n type FeedAuthor,\n type FeedComment,\n type FeedImage,\n type FeedItem,\n type FeedItemParams,\n type FeedMedia,\n type FeedPage,\n type FeedPoll,\n type FeedPost,\n type FeedQuery,\n type FeedQueryInput,\n type FeedSort,\n type FeedVideo,\n feedAuthorSchema,\n feedCommentSchema,\n feedImageSchema,\n feedItemParamsSchema,\n feedItemSchema,\n feedMediaSchema,\n feedPageSchema,\n feedPollSchema,\n feedPostSchema,\n feedQuerySchema,\n feedSortSchema,\n feedVideoSchema,\n type LinkPreview,\n linkPreviewSchema,\n MAX_TOPICS,\n POLL_MAX_DURATION_MS,\n POLL_MAX_OPTIONS,\n POLL_MIN_DURATION_MS,\n POLL_MIN_OPTIONS,\n POLL_OPTION_MAX_CHARS,\n POLL_QUESTION_MAX_CHARS,\n POST_MAX_BODY_CHARS,\n POST_MAX_MEDIA,\n type PollOption,\n type PollParams,\n pollOptionSchema,\n pollParamsSchema,\n REACTION_TYPE_VALUES,\n REPORT_REASON_VALUES,\n type ReactionCounts,\n type ReactionType,\n type ReportReason,\n reactionCountsSchema,\n reactionTypeSchema,\n reportReasonSchema,\n type SetReactionBody,\n type SetReactionResponse,\n setReactionBodySchema,\n setReactionResponseSchema,\n type ToggleBookmarkResponse,\n toggleBookmarkResponseSchema,\n type UpdateCommentBody,\n type UpdatePostBody,\n updateCommentBodySchema,\n updatePostBodySchema,\n type ViewerState,\n viewerStateSchema,\n} from './feed.js';\n// ─── Founder profile ─────────────────────────────────────────────────────────\nexport {\n type FounderCard,\n type FounderLinks,\n type FounderProfile,\n founderCardSchema,\n founderLinksSchema,\n founderProfileSchema,\n type UpdateFounderProfileBody,\n type UpdateUsernameBody,\n type UsernameAvailability,\n updateFounderProfileBodySchema,\n updateUsernameBodySchema,\n usernameAvailabilitySchema,\n type Venture,\n ventureSchema,\n} from './founder-profile.js';\n// ─── Limits: every length, size and count, by name ──────────────────────────\nexport {\n ABOUT_MAX,\n CHAT_PARTICIPANTS_MAX,\n CITY_MAX,\n COUNTRY_MAX,\n DISCOVER_FILTER_VALUES_MAX,\n DISCOVER_TEXT_MAX,\n DISPLAY_NAME_MAX,\n FOUNDED_YEAR_MIN,\n GOALS_MIN,\n HEADLINE_MAX,\n LINK_PREVIEW_DESCRIPTION_MAX,\n LINK_PREVIEW_TITLE_MAX,\n LINK_URL_MAX,\n MEDIA_ALT_MAX,\n PAGE_SIZE_DEFAULT,\n PAGE_SIZE_MAX,\n REPORT_NOTE_MAX,\n SKILLS_MAX,\n STATE_MAX,\n TEAM_SIZE_MAX,\n TEAM_SIZE_MIN,\n UPLOAD_MAX_BYTES,\n VENTURE_NAME_MAX,\n VENTURE_TAGLINE_MAX,\n} from './limits.js';\n// ─── Onboarding ──────────────────────────────────────────────────────────────\nexport {\n ageInYears,\n BUSINESS_TYPE_VALUES,\n type BusinessType,\n businessTypeSchema,\n type CompleteOnboardingBody,\n type CompleteOnboardingBodyInput,\n type CompleteOnboardingResponse,\n type ContactLinks,\n completeOnboardingBodySchema,\n completeOnboardingResponseSchema,\n contactLinksSchema,\n type DateOfBirth,\n dateOfBirthSchema,\n FOUNDER_ONBOARDING_STEPS,\n GUIDELINES_VERSION,\n guidelinesVersionSchema,\n INTERESTS_MAX,\n INTERESTS_MIN,\n type IsoDate,\n isoDateSchema,\n MAX_AGE_YEARS,\n MIN_AGE_YEARS,\n ONBOARDING_DRAFT_KEYS,\n ONBOARDING_STEP_FIELDS,\n ONBOARDING_STEP_KEYS,\n ONBOARDING_STEP_SCHEMAS,\n ONBOARDING_TOTAL_STEPS,\n type OnboardingDraft,\n type OnboardingDraftKey,\n type OnboardingField,\n type OnboardingForm,\n type OnboardingProgress,\n type OnboardingProgressUpdate,\n type OnboardingStatus,\n type OnboardingStepBody,\n type OnboardingStepConfig,\n type OnboardingStepKey,\n onboardingDraftKeySchema,\n onboardingDraftSchema,\n onboardingFormSchema,\n onboardingProgressSchema,\n onboardingProgressUpdateSchema,\n onboardingStatusSchema,\n TOPIC_CATEGORIES,\n TOPIC_CATEGORY_KEYS,\n TOPIC_VALUES,\n type Topic,\n type TopicCategory,\n type TopicCategoryKey,\n topicSchema,\n} from './onboarding.js';\n// ─── Response envelopes ──────────────────────────────────────────────────────\nexport {\n type ApiError,\n type ApiErrorDetails,\n apiErrorDetailsSchema,\n apiErrorSchema,\n type ErrorResponse,\n errorResponseSchema,\n type IdResponse,\n idResponseSchema,\n paginatedSchema,\n successResponseSchema,\n} from './responses/index.js';\n// ─── Uploads: the key, the extensions, asking for a slot ────────────────────\nexport {\n UPLOAD_CONTENT_TYPES,\n UPLOAD_KEY_EXTENSIONS,\n UPLOAD_KEY_MAX_CHARS,\n UPLOAD_KEY_PATTERN,\n type UploadKey,\n type UploadKeyExtension,\n type UploadPresignBody,\n type UploadPresignResponse,\n uploadKeyExtensionSchema,\n uploadKeySchema,\n uploadPresignBodySchema,\n uploadPresignResponseSchema,\n} from './uploads.js';\n// ─── Validation: message keys and the wire shape of a failure ───────────────\nexport {\n REQUEST_PART_VALUES,\n type RequestPart,\n requestPartSchema,\n toValidationIssues,\n VALIDATION_MESSAGE,\n type ValidationIssue,\n type ValidationMessageKey,\n validationIssueSchema,\n} from './validation.js';\n"]}