founder-schema 0.1.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.
@@ -0,0 +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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CAAC,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"]}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * founder-schema — Shared Zod schemas for Founder Circle
3
+ *
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.
7
+ *
8
+ * @module founder-schema
9
+ */
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';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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,E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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"}
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ /**
2
+ * founder-schema — Shared Zod schemas for Founder Circle
3
+ *
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.
7
+ *
8
+ * @module founder-schema
9
+ */
10
+ // ─── Chat ────────────────────────────────────────────────────────────────────
11
+ export { CHAT_PRODUCT_ID, CHAT_SOCKET_REAUTH_SECONDS, CHAT_TOKEN_REFRESH_MARGIN_SECONDS, chatAuthTokenSchema, chatConfigSchema, chatInvitationBodySchema, chatInvitationSchema, chatProductIdSchema, } from './chat.js';
12
+ // ─── 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';
15
+ // ─── 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';
17
+ // ─── 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';
21
+ // ─── Response envelopes ──────────────────────────────────────────────────────
22
+ export { apiErrorSchema, errorResponseSchema, paginatedSchema, successResponseSchema, } from './responses/index.js';
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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"]}