founder-schema 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +98 -0
- package/dist/access/access.d.ts +10 -6
- package/dist/access/access.d.ts.map +1 -1
- package/dist/access/access.js +8 -1
- package/dist/access/access.js.map +1 -1
- package/dist/access/permissions.d.ts +60 -3
- package/dist/access/permissions.d.ts.map +1 -1
- package/dist/access/permissions.js +24 -0
- package/dist/access/permissions.js.map +1 -1
- package/dist/access/roles.d.ts +3 -3
- package/dist/access/standing.d.ts +59 -0
- package/dist/access/standing.d.ts.map +1 -0
- package/dist/access/standing.js +52 -0
- package/dist/access/standing.js.map +1 -0
- package/dist/core/errors.d.ts +47 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +82 -1
- package/dist/core/errors.js.map +1 -1
- package/dist/core/limits.d.ts +39 -3
- package/dist/core/limits.d.ts.map +1 -1
- package/dist/core/limits.js +41 -3
- package/dist/core/limits.js.map +1 -1
- package/dist/core/responses.d.ts +55 -0
- package/dist/core/responses.d.ts.map +1 -1
- package/dist/core/responses.js +6 -0
- package/dist/core/responses.js.map +1 -1
- package/dist/core/validation.d.ts +14 -0
- package/dist/core/validation.d.ts.map +1 -1
- package/dist/core/validation.js +14 -0
- package/dist/core/validation.js.map +1 -1
- package/dist/domains/audit/audit.d.ts +28 -7
- package/dist/domains/audit/audit.d.ts.map +1 -1
- package/dist/domains/audit/audit.js +17 -0
- package/dist/domains/audit/audit.js.map +1 -1
- package/dist/domains/billing/billing.d.ts +1179 -0
- package/dist/domains/billing/billing.d.ts.map +1 -0
- package/dist/domains/billing/billing.js +393 -0
- package/dist/domains/billing/billing.js.map +1 -0
- package/dist/domains/billing/gst.d.ts +229 -0
- package/dist/domains/billing/gst.d.ts.map +1 -0
- package/dist/domains/billing/gst.js +117 -0
- package/dist/domains/billing/gst.js.map +1 -0
- package/dist/domains/chat/chat.d.ts +85 -0
- package/dist/domains/chat/chat.d.ts.map +1 -1
- package/dist/domains/chat/chat.js +62 -0
- package/dist/domains/chat/chat.js.map +1 -1
- package/dist/domains/communities/communities.d.ts +11 -11
- package/dist/domains/dashboard/dashboard.d.ts +9 -1
- package/dist/domains/dashboard/dashboard.d.ts.map +1 -1
- package/dist/domains/dashboard/dashboard.js +15 -0
- package/dist/domains/dashboard/dashboard.js.map +1 -1
- package/dist/domains/feed/feed.d.ts.map +1 -1
- package/dist/domains/feed/feed.js +7 -1
- package/dist/domains/feed/feed.js.map +1 -1
- package/dist/domains/members/members.d.ts +30 -5
- package/dist/domains/members/members.d.ts.map +1 -1
- package/dist/domains/members/members.js +23 -0
- package/dist/domains/members/members.js.map +1 -1
- package/dist/domains/membership/membership.d.ts +239 -0
- package/dist/domains/membership/membership.d.ts.map +1 -0
- package/dist/domains/membership/membership.js +153 -0
- package/dist/domains/membership/membership.js.map +1 -0
- package/dist/domains/notifications/notifications.d.ts +43 -1
- package/dist/domains/notifications/notifications.d.ts.map +1 -1
- package/dist/domains/notifications/notifications.js +19 -0
- package/dist/domains/notifications/notifications.js.map +1 -1
- package/dist/domains/products/products.d.ts +44 -12
- package/dist/domains/products/products.d.ts.map +1 -1
- package/dist/domains/products/products.js +33 -3
- package/dist/domains/products/products.js.map +1 -1
- package/dist/domains/profile/founder-profile.d.ts +178 -0
- package/dist/domains/profile/founder-profile.d.ts.map +1 -1
- package/dist/domains/profile/founder-profile.js +77 -0
- package/dist/domains/profile/founder-profile.js.map +1 -1
- package/dist/domains/reviews/reviews.d.ts +3 -0
- package/dist/domains/reviews/reviews.d.ts.map +1 -1
- package/dist/domains/reviews/reviews.js +6 -1
- package/dist/domains/reviews/reviews.js.map +1 -1
- package/dist/domains/team/team.d.ts +4 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.js","sour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B,EAAE,CAAC,CAAC;AAGjG,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,uBAAuB,EAAE,CAAC,CAAC;AAGhG,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,mBAAmB,EAAE,CAAC,CAAC;AAGpF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,MAAM,EAAE,cAAc;IACtB,IAAI,EAAE,0BAA0B;CACjC,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,0BAA0B,EAAE,CAAC,CAAC;AAG7F;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC","sourcesContent":["/**\n * founder-schema — Products: what founders build, and the help around it\n *\n * THE IDEA (the user, 2026-10-06): founders help each other with their\n * products. A founder adds what they build; a post or poll can say which of\n * their products it is about and what they want (\"testers wanted\"); every\n * comment on it becomes that product's feedback; the community reviews and\n * upvotes it; and the help a member gives is recognised in their contribution\n * score.\n *\n * THE COMPANY STAYS THE PROFILE'S `venture` (one per founder). There are no\n * company pages: co-founders join a PRODUCT's team, as Product Hunt lists a\n * product's makers. Revisit only if one team running many products finds\n * re-inviting each time tedious.\n *\n * VISIBILITY, two states (the user's ruling): `unlisted` by default, a page\n * anyone signed in can open by its link and that shows on its team's profiles;\n * `listed`, also in Discover. Listing needs a logo, a tagline and at least one\n * screenshot (`PRODUCT_NOT_LISTABLE` names what is missing), so Discover never\n * shows an empty card.\n *\n * THE TEAM: an owner, co-founders and team members, joined by invitation and\n * acceptance (nobody is put on a team without saying yes), with no limit on\n * its size (the user's ruling). Who may do what:\n *\n * owner co-founder team\n * edit, images, list, invite ✓ ✓\n * tag posts, reply to reviews, ✓ ✓ ✓\n * mark feedback, confirm testers\n * change roles, remove, hand over ✓\n * archive, delete ✓\n *\n * A product's images belong to the product, not to whoever uploaded them.\n * When the owner deletes their account the product passes to the longest-\n * standing co-founder (else team member); with nobody left it is deleted.\n *\n * Routes (all signed in):\n * GET /api/v1/products Discover: productDiscoverQuerySchema\n * GET /api/v1/products/facets productFacetsSchema\n * POST /api/v1/products createProductBodySchema -> IdResponse\n * GET /api/v1/products/mine myProductsSchema\n * GET /api/v1/products/invites productInvitesSchema\n * PUT /api/v1/products/invites/:productId accept -> productSchema\n * DELETE /api/v1/products/invites/:productId decline -> IdResponse\n * GET /api/v1/products/by-member/:userId productCardPageSchema (their teams)\n * GET /api/v1/products/:productId productSchema\n * PATCH /api/v1/products/:productId updateProductBodySchema -> productSchema\n * DELETE /api/v1/products/:productId -> IdResponse (owner)\n * PUT /api/v1/products/:productId/logo setProductLogoBodySchema -> productSchema\n * DELETE /api/v1/products/:productId/logo -> productSchema\n * PUT /api/v1/products/:productId/screenshots setProductScreenshotsBodySchema -> productSchema\n * PUT /api/v1/products/:productId/visibility setProductVisibilityBodySchema -> productSchema\n * PUT /api/v1/products/:productId/status setProductStatusBodySchema -> productSchema\n * GET /api/v1/products/:productId/team productTeamPageSchema\n * GET /api/v1/products/:productId/invites productPendingInvitePageSchema (managers)\n * POST /api/v1/products/:productId/invites inviteProductMemberBodySchema -> productPendingInviteSchema\n * PUT /api/v1/products/:productId/team/:userId setProductMemberRoleBodySchema -> IdResponse\n * (works on someone still invited too; refetch the team and the invites)\n * DELETE /api/v1/products/:productId/team/:userId remove, cancel an invite, or leave -> IdResponse\n * POST /api/v1/products/:productId/transfer transferProductBodySchema -> productSchema\n * PUT /api/v1/products/:productId/upvote -> productUpvoteResponseSchema\n * DELETE /api/v1/products/:productId/upvote -> productUpvoteResponseSchema\n * GET /api/v1/products/:productId/posts FeedPage (posts and polls tagged with it)\n * GET /api/v1/products/:productId/feedback productFeedbackQuerySchema -> productFeedbackPageSchema (feed)\n * GET /api/v1/products/:productId/testers productTesterPageSchema\n * PUT /api/v1/products/:productId/testers/:userId confirm -> productTesterSchema\n * DELETE /api/v1/products/:productId/testers/:userId withdraw -> IdResponse\n * POST /api/v1/products/:productId/report createReportBodySchema -> CreateReportResponse\n * (reviews: `domains/reviews`)\n *\n * @module founder-schema/domains/products\n */\n\nimport { z } from 'zod';\nimport {\n emptyStringToUndefined,\n httpUrlOnHosts,\n httpUrlSchema,\n industrySchema,\n multiValueQuery,\n objectIdSchema,\n optionalTrimmedString,\n paginationQuerySchema,\n productListingRequirementSchema,\n youtubeVideoId,\n} from '../../core/common.js';\nimport {\n DISCOVER_FILTER_VALUES_MAX,\n DISCOVER_TEXT_MAX,\n PRODUCT_CAPTION_MAX,\n PRODUCT_DESCRIPTION_MAX,\n PRODUCT_NAME_MAX,\n PRODUCT_SCREENSHOTS_MAX,\n PRODUCT_TAGLINE_MAX,\n} from '../../core/limits.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { VALIDATION_MESSAGE } from '../../core/validation.js';\nimport { mediaImageSchema } from '../media/media.js';\nimport { topicSchema } from '../onboarding/onboarding.js';\nimport { memberBylineSchema } from '../profile/founder-profile.js';\n\n/** Topics a product carries, as a post does: what interest matching reads. */\nexport const PRODUCT_TOPICS_MAX = 3;\n\n// ─── Vocabulary ──────────────────────────────────────────────────────────────\n// ⚠ Every list below is STORED. Append only; removing a value orphans rows.\n\n/**\n * Where the product is in its life. Its own list, deliberately not the\n * venture's funding stage (`startupStageSchema`): \"seed\" says how a company is\n * funded, \"beta\" says whether you can use the thing. Ordered earliest first.\n */\nexport const PRODUCT_STAGE_VALUES = ['idea', 'building', 'beta', 'live'] as const;\nexport const productStageSchema = z.enum(PRODUCT_STAGE_VALUES);\nexport type ProductStage = z.infer<typeof productStageSchema>;\n\nexport const PRODUCT_PLATFORM_VALUES = [\n 'web',\n 'ios',\n 'android',\n 'desktop',\n 'browser_extension',\n 'api',\n 'hardware',\n 'other',\n] as const;\nexport const productPlatformSchema = z.enum(PRODUCT_PLATFORM_VALUES);\nexport type ProductPlatform = z.infer<typeof productPlatformSchema>;\n\n/** `unlisted` (the default) or `listed` in Discover. See the module note. */\nexport const PRODUCT_VISIBILITY_VALUES = ['unlisted', 'listed'] as const;\nexport const productVisibilitySchema = z.enum(PRODUCT_VISIBILITY_VALUES);\nexport type ProductVisibility = z.infer<typeof productVisibilitySchema>;\n\n/**\n * `archived`: kept, readable and still on its team's profiles, but out of\n * Discover and closed to new posts, reviews and upvotes. Restorable.\n */\nexport const PRODUCT_STATUS_VALUES = ['active', 'archived'] as const;\nexport const productStatusSchema = z.enum(PRODUCT_STATUS_VALUES);\nexport type ProductStatus = z.infer<typeof productStatusSchema>;\n\n/** One owner per product; see the module note for what each role may do. */\nexport const PRODUCT_TEAM_ROLE_VALUES = ['owner', 'cofounder', 'team'] as const;\nexport const productTeamRoleSchema = z.enum(PRODUCT_TEAM_ROLE_VALUES);\nexport type ProductTeamRole = z.infer<typeof productTeamRoleSchema>;\n\n/** The roles an invitation (or a role change) may give. Ownership is handed over, never invited. */\nexport const PRODUCT_INVITABLE_ROLE_VALUES = ['cofounder', 'team'] as const;\nexport const productInvitableRoleSchema = z.enum(PRODUCT_INVITABLE_ROLE_VALUES);\nexport type ProductInvitableRole = z.infer<typeof productInvitableRoleSchema>;\n\n/**\n * What a post or poll about a product ASKS of the community. Optional, and\n * only with a product. Each ask keeps the product on that shelf of Discover\n * for `PRODUCT_ASK_OPEN_DAYS`.\n *\n * feedback \"tell me what you think\"\n * testers \"try it\": confirmed testers are recognised (`/testers`)\n * launch \"it is out\"\n * ideas \"what should it do next\"\n */\nexport const PRODUCT_ASK_VALUES = ['feedback', 'testers', 'launch', 'ideas'] as const;\nexport const productAskSchema = z.enum(PRODUCT_ASK_VALUES);\nexport type ProductAsk = z.infer<typeof productAskSchema>;\n\n/**\n * Discover's orders.\n *\n * trending recent upvotes, reviews and feedback, newer counting more\n * (recomputed every 15 minutes). The default.\n * new newest first by when it was FIRST listed (unlisting and\n * listing again does not move it back to the top)\n * top_rated best rated, pulled toward a neutral 3 stars by 5 imaginary\n * reviews so a few perfect ratings cannot beat many excellent\n * ones; only products with `REVIEW_AVERAGE_MIN_COUNT` reviews\n */\nexport const PRODUCT_SORT_VALUES = ['trending', 'new', 'top_rated'] as const;\nexport const productSortSchema = z.enum(PRODUCT_SORT_VALUES);\nexport type ProductSort = z.infer<typeof productSortSchema>;\n\n/**\n * What listing needs (defined in core, beside the error details that carry it:\n * `PRODUCT_NOT_LISTABLE` returns the missing ones in `details.missing`).\n */\nexport {\n PRODUCT_LISTING_REQUIREMENT_VALUES,\n type ProductListingRequirement,\n productListingRequirementSchema,\n} from '../../core/common.js';\n\n// ─── Fields ──────────────────────────────────────────────────────────────────\n\n/**\n * Where to get it. Every link is member-typed, so every one is\n * `httpUrlSchema`, and the store links must also be ON the store: the\n * hostname is parsed and compared exactly (`httpUrlOnHosts`).\n */\nexport const productLinksSchema = z.object({\n website: httpUrlSchema.optional(),\n appStore: httpUrlOnHosts(\n ['apps.apple.com', 'itunes.apple.com'],\n VALIDATION_MESSAGE.appStoreLinkHost,\n ).optional(),\n playStore: httpUrlOnHosts(['play.google.com'], VALIDATION_MESSAGE.playStoreLinkHost).optional(),\n github: httpUrlOnHosts(\n ['github.com', 'www.github.com'],\n VALIDATION_MESSAGE.githubLinkHost,\n ).optional(),\n});\nexport type ProductLinks = z.infer<typeof productLinksSchema>;\n\n/**\n * A demo video: a link to one YouTube VIDEO, played in the page (never\n * uploaded). A channel or playlist link is refused: the page cannot embed it\n * (`youtubeVideoId`, 0.7.0).\n */\nexport const productVideoUrlSchema = httpUrlSchema.refine((url) => youtubeVideoId(url) !== null, {\n error: VALIDATION_MESSAGE.videoLinkHost,\n});\n\nconst platformsSchema = z\n .array(productPlatformSchema)\n .max(PRODUCT_PLATFORM_VALUES.length)\n .refine((list) => new Set(list).size === list.length, {\n error: VALIDATION_MESSAGE.platformsDuplicate,\n });\n\n// ─── Read shapes ─────────────────────────────────────────────────────────────\n\n/**\n * A product named on something else: the chip on a post or poll, a\n * notification, a points entry. `logoUrl` is the logo's smallest size.\n */\nexport const productChipSchema = z.object({\n id: objectIdSchema,\n /** For a readable URL, `/products/<id>/<slug>`. The id is what resolves; a renamed product keeps its links. */\n slug: z.string(),\n name: z.string(),\n logoUrl: z.url().optional(),\n});\nexport type ProductChip = z.infer<typeof productChipSchema>;\n\n/**\n * How it is rated. `average` (one decimal) is null until the product has\n * `REVIEW_AVERAGE_MIN_COUNT` reviews: a client shows \"Not enough reviews yet\",\n * never a lone 5.0 from one friend.\n */\nexport const productRatingSchema = z.object({\n count: z.number().int().nonnegative(),\n average: z.number().min(1).max(5).nullable(),\n});\nexport type ProductRating = z.infer<typeof productRatingSchema>;\n\n/** One screenshot: a processed image (every size, ready for `srcset`) and its caption. */\nexport const productScreenshotSchema = mediaImageSchema.extend({\n caption: z.string().max(PRODUCT_CAPTION_MAX).optional(),\n});\nexport type ProductScreenshot = z.infer<typeof productScreenshotSchema>;\n\n/** What this viewer may do on a Discover card. */\nexport const productCardViewerSchema = z.object({\n upvoted: z.boolean(),\n /** Not on its team, and the product is open (not archived). */\n canUpvote: z.boolean(),\n /** Their role on its team, or null. */\n role: productTeamRoleSchema.nullable(),\n /**\n * They may act FOR it now (0.7.0): on its team, and it is neither archived\n * nor hidden by staff. The server's own rule, for a picker such as the\n * composer's \"about which product\" (the page's `viewer.canRepresent`).\n */\n canRepresent: z.boolean().optional(),\n});\n\n/**\n * A product on Discover, on a profile, in \"my products\". `cover` is the first\n * screenshot. `openAsks` are the asks whose window is open now, by the\n * server's clock (\"Testers wanted\").\n */\nexport const productCardSchema = z.object({\n id: objectIdSchema,\n slug: z.string(),\n name: z.string(),\n tagline: z.string().optional(),\n logo: mediaImageSchema.optional(),\n cover: mediaImageSchema.optional(),\n industry: industrySchema,\n stage: productStageSchema,\n platforms: z.array(productPlatformSchema),\n visibility: productVisibilitySchema,\n status: productStatusSchema,\n rating: productRatingSchema,\n upvoteCount: z.number().int().nonnegative(),\n openAsks: z.array(productAskSchema),\n /**\n * Staff hid it (0.7.0). Only ever on a card its team or staff can see (in\n * \"my products\", on a team member's profile): a \"Hidden by moderators\" badge.\n */\n hiddenByStaff: z.boolean().optional(),\n viewer: productCardViewerSchema.optional(),\n});\nexport type ProductCard = z.infer<typeof productCardSchema>;\n\n/** One person on a product's team, live-joined like every byline. */\nexport const productTeamMemberSchema = memberBylineSchema.extend({\n role: productTeamRoleSchema,\n /** When they accepted (or, for the owner, created the product). */\n joinedAt: z.iso.datetime(),\n});\nexport type ProductTeamMember = z.infer<typeof productTeamMemberSchema>;\n\n/**\n * What THIS viewer may do on the product page, decided by the server and sent\n * as plain answers (the same rule as `viewerStateSchema` on a post).\n */\nexport const productViewerSchema = productCardViewerSchema.extend({\n /** An invitation to the team is waiting for them: offer Accept / Decline. */\n invited: z.boolean(),\n /** Their own review of it, if any, so the page offers Edit instead of Write. */\n reviewId: objectIdSchema.nullable(),\n /** The team confirmed them as a tester. */\n tester: z.boolean(),\n /** Owner and co-founders: details, images, listing, invitations. */\n canEdit: z.boolean(),\n /** Owner: roles, removals, handing over. */\n canManageTeam: z.boolean(),\n /** Owner. */\n canDelete: z.boolean(),\n /** Anyone on the team: tag posts with it, reply to reviews, mark feedback, confirm testers. */\n canRepresent: z.boolean(),\n /** Not on its team, no review yet, and the product is open. */\n canReview: z.boolean(),\n canReport: z.boolean(),\n /**\n * For whoever may edit: what listing still needs. Empty means it can be\n * listed (or already is). Lets the page show a checklist before the member\n * tries and is refused.\n */\n missingForListing: z.array(productListingRequirementSchema),\n});\nexport type ProductViewer = z.infer<typeof productViewerSchema>;\n\n/** The product page. */\nexport const productSchema = productCardSchema.extend({\n description: z.string().optional(),\n links: productLinksSchema,\n videoUrl: z.string().optional(),\n topics: z.array(topicSchema).max(PRODUCT_TOPICS_MAX),\n screenshots: z.array(productScreenshotSchema).max(PRODUCT_SCREENSHOTS_MAX),\n /** The owner first, then co-founders, then the team, each by when they joined; at most `PRODUCT_TEAM_SHOWN`. */\n team: z.array(productTeamMemberSchema),\n teamCount: z.number().int().nonnegative(),\n counts: z.object({\n /** Posts and polls tagged with it. */\n posts: z.number().int().nonnegative(),\n /** Comments on those from people outside its team: what the Feedback tab lists. */\n feedback: z.number().int().nonnegative(),\n /** Members the team confirmed as testers. */\n testers: z.number().int().nonnegative(),\n }),\n listedAt: z.iso.datetime().nullable(),\n createdAt: z.iso.datetime(),\n updatedAt: z.iso.datetime(),\n /**\n * Only for its team and for staff: staff hid it, so everyone else gets 404.\n * The page tells the team why it vanished from Discover.\n */\n hiddenByStaff: z.boolean().optional(),\n viewer: productViewerSchema.optional(),\n});\nexport type Product = z.infer<typeof productSchema>;\n\n/**\n * An invitation the team sent and nobody has answered yet, as its managers see\n * it (`GET /products/:id/invites`): who, for what role, sent by whom. The owner\n * may change its role (`PUT /team/:userId`) or cancel it (`DELETE /team/:userId`).\n */\nexport const productPendingInviteSchema = z.object({\n member: memberBylineSchema,\n role: productInvitableRoleSchema,\n /** Null when whoever invited has since deleted their account. */\n invitedBy: memberBylineSchema.nullable(),\n invitedAt: z.iso.datetime(),\n});\nexport type ProductPendingInvite = z.infer<typeof productPendingInviteSchema>;\n\n/** A team invitation waiting for the viewer's answer. */\nexport const productInviteSchema = z.object({\n product: productChipSchema.extend({ tagline: z.string().optional() }),\n role: productInvitableRoleSchema,\n /** Null when whoever invited has since deleted their account. */\n invitedBy: memberBylineSchema.nullable(),\n invitedAt: z.iso.datetime(),\n});\nexport type ProductInvite = z.infer<typeof productInviteSchema>;\n\n/** `GET /products/invites`. Never paged: invitations are few, and each needs an answer. */\nexport const productInvitesSchema = z.object({ items: z.array(productInviteSchema) });\nexport type ProductInvites = z.infer<typeof productInvitesSchema>;\n\n/**\n * `GET /products/mine`: every product the viewer is on the team of, archived\n * included, owned first. Not paged: a founder owns at most `PRODUCTS_OWNED_MAX`,\n * and joins teams by accepting invitations one at a time, so the list stays\n * short in practice; there is no hard cap on teams joined.\n */\nexport const myProductsSchema = z.object({ items: z.array(productCardSchema) });\nexport type MyProducts = z.infer<typeof myProductsSchema>;\n\n/** A member the team confirmed tested the product. */\nexport const productTesterSchema = z.object({\n member: memberBylineSchema,\n confirmedAt: z.iso.datetime(),\n});\nexport type ProductTester = z.infer<typeof productTesterSchema>;\n\nexport const productCardPageSchema = paginatedSchema(productCardSchema);\nexport type ProductCardPage = z.infer<typeof productCardPageSchema>;\nexport const productTeamPageSchema = paginatedSchema(productTeamMemberSchema);\nexport type ProductTeamPage = z.infer<typeof productTeamPageSchema>;\nexport const productTesterPageSchema = paginatedSchema(productTesterSchema);\nexport type ProductTesterPage = z.infer<typeof productTesterPageSchema>;\n/** Co-founder invitations first, then team; within each, the oldest invitation first. */\nexport const productPendingInvitePageSchema = paginatedSchema(productPendingInviteSchema);\nexport type ProductPendingInvitePage = z.infer<typeof productPendingInvitePageSchema>;\n\n/** `PUT|DELETE /products/:id/upvote`: the state it settled on and the fresh count. */\nexport const productUpvoteResponseSchema = z.object({\n productId: objectIdSchema,\n upvoted: z.boolean(),\n upvoteCount: z.number().int().nonnegative(),\n});\nexport type ProductUpvoteResponse = z.infer<typeof productUpvoteResponseSchema>;\n\n/**\n * Discover's filter drawer for products: every value with how many LISTED\n * products match, zero counts included, in the list's own order.\n */\nconst facetSchema = <T extends z.ZodType>(value: T) =>\n z.array(z.object({ value, count: z.number().int().nonnegative() }));\nexport const productFacetsSchema = z.object({\n industries: facetSchema(industrySchema),\n stages: facetSchema(productStageSchema),\n platforms: facetSchema(productPlatformSchema),\n asks: facetSchema(productAskSchema),\n});\nexport type ProductFacets = z.infer<typeof productFacetsSchema>;\n\n// ─── Queries and params ──────────────────────────────────────────────────────\n\n/** A Discover multi-select (`?industry=a&industry=b`): see `multiValueQuery`. */\nconst multiValue = <T extends z.ZodType>(inner: T) =>\n multiValueQuery(inner, DISCOVER_FILTER_VALUES_MAX);\n\n/**\n * `GET /api/v1/products`: LISTED products only. Filters of one kind mean \"any\n * of\", different kinds combine (\"fintech AND beta\"). `ask` keeps products\n * whose ask is open now. `q` matches the start of the name; an emptied box\n * (`?q=`) is no search, never a 400.\n */\nexport const productDiscoverQuerySchema = paginationQuerySchema.extend({\n sort: z.preprocess(emptyStringToUndefined, productSortSchema.default('trending')),\n q: optionalTrimmedString(DISCOVER_TEXT_MAX),\n industry: multiValue(industrySchema),\n stage: multiValue(productStageSchema),\n platform: multiValue(productPlatformSchema),\n ask: z.preprocess(emptyStringToUndefined, productAskSchema.optional()),\n});\nexport type ProductDiscoverQuery = z.infer<typeof productDiscoverQuerySchema>;\nexport type ProductDiscoverQueryInput = z.input<typeof productDiscoverQuerySchema>;\n\n/**\n * `GET /products/:id/feedback`: comments from outside its team on the posts\n * and polls tagged with it, newest first. `helpful=true` narrows to the ones\n * the team marked as having helped.\n */\nexport const productFeedbackQuerySchema = paginationQuerySchema.extend({\n helpful: z.preprocess(emptyStringToUndefined, z.stringbool().default(false)),\n});\nexport type ProductFeedbackQuery = z.infer<typeof productFeedbackQuerySchema>;\nexport type ProductFeedbackQueryInput = z.input<typeof productFeedbackQuerySchema>;\n\nexport const productParamsSchema = z.object({ productId: objectIdSchema });\nexport type ProductParams = z.infer<typeof productParamsSchema>;\n/** `/products/:productId/team/:userId`, `/products/:productId/testers/:userId`. */\nexport const productMemberParamsSchema = z.object({\n productId: objectIdSchema,\n userId: objectIdSchema,\n});\nexport type ProductMemberParams = z.infer<typeof productMemberParamsSchema>;\n/** `/products/by-member/:userId`. */\nexport const productsByMemberParamsSchema = z.object({ userId: objectIdSchema });\nexport type ProductsByMemberParams = z.infer<typeof productsByMemberParamsSchema>;\n\n// ─── Write bodies ────────────────────────────────────────────────────────────\n// Each its own object with NO defaults (see `updateFounderProfileBodySchema`).\n\n/** A screenshot on the way in: an uploaded, processed image id, and its caption. */\nexport const productScreenshotInputSchema = z.object({\n mediaId: objectIdSchema,\n caption: z.string().trim().max(PRODUCT_CAPTION_MAX).optional(),\n});\nexport type ProductScreenshotInput = z.infer<typeof productScreenshotInputSchema>;\n\nconst screenshotsInputSchema = z\n .array(productScreenshotInputSchema)\n .max(PRODUCT_SCREENSHOTS_MAX)\n .refine((list) => new Set(list.map((s) => s.mediaId)).size === list.length, {\n error: VALIDATION_MESSAGE.screenshotsDuplicate,\n });\n\n/**\n * `POST /api/v1/products`. Starts `unlisted`, owned by the caller. The logo\n * and screenshots may come now or later (uploaded first, purpose\n * `product_logo` / `product_screenshot`, like a post's images).\n */\nexport const createProductBodySchema = z.object({\n name: z.string().trim().min(1).max(PRODUCT_NAME_MAX),\n tagline: z.string().trim().min(1).max(PRODUCT_TAGLINE_MAX).optional(),\n description: z.string().trim().min(1).max(PRODUCT_DESCRIPTION_MAX).optional(),\n industry: industrySchema,\n stage: productStageSchema,\n platforms: platformsSchema.optional(),\n topics: z.array(topicSchema).max(PRODUCT_TOPICS_MAX).optional(),\n links: productLinksSchema.optional(),\n videoUrl: productVideoUrlSchema.optional(),\n logoMediaId: objectIdSchema.optional(),\n screenshots: screenshotsInputSchema.optional(),\n});\nexport type CreateProductBody = z.infer<typeof createProductBodySchema>;\n\n/** Text the editor may empty: absent leaves it, `null` clears it, `\"\"` is refused. */\nconst clearable = <T extends z.ZodType>(inner: T) => inner.nullable().optional();\n\n/**\n * `PATCH /api/v1/products/:id`: only the keys that changed. Images, listing\n * and status have their own routes. `links` is sent whole.\n */\nexport const updateProductBodySchema = z.object({\n name: z.string().trim().min(1).max(PRODUCT_NAME_MAX).optional(),\n tagline: clearable(\n z.string().trim().min(1, VALIDATION_MESSAGE.clearWithNull).max(PRODUCT_TAGLINE_MAX),\n ),\n description: clearable(\n z.string().trim().min(1, VALIDATION_MESSAGE.clearWithNull).max(PRODUCT_DESCRIPTION_MAX),\n ),\n industry: industrySchema.optional(),\n stage: productStageSchema.optional(),\n platforms: platformsSchema.optional(),\n topics: z.array(topicSchema).max(PRODUCT_TOPICS_MAX).optional(),\n links: productLinksSchema.optional(),\n videoUrl: clearable(productVideoUrlSchema),\n});\nexport type UpdateProductBody = z.infer<typeof updateProductBodySchema>;\n\n/** `PUT /products/:id/logo`: a processed `product_logo` upload. The old logo's files are deleted. */\nexport const setProductLogoBodySchema = z.object({ mediaId: objectIdSchema });\nexport type SetProductLogoBody = z.infer<typeof setProductLogoBodySchema>;\n\n/**\n * `PUT /products/:id/screenshots`: the WHOLE gallery as it should now be, in\n * order. One call adds, removes, reorders and re-captions: screenshots already\n * on the product stay; new ids must be the caller's processed\n * `product_screenshot` uploads; any left out are deleted from storage.\n */\nexport const setProductScreenshotsBodySchema = z.object({ screenshots: screenshotsInputSchema });\nexport type SetProductScreenshotsBody = z.infer<typeof setProductScreenshotsBodySchema>;\n\nexport const setProductVisibilityBodySchema = z.object({ visibility: productVisibilitySchema });\nexport type SetProductVisibilityBody = z.infer<typeof setProductVisibilityBodySchema>;\n\nexport const setProductStatusBodySchema = z.object({ status: productStatusSchema });\nexport type SetProductStatusBody = z.infer<typeof setProductStatusBodySchema>;\n\n/**\n * Invite a member to the team; they must accept. `userId` is the member's id\n * as every card carries it (`founderCardSchema.userId`). Someone who cannot\n * join (has not finished onboarding, paused, suspended, deleted) is\n * `PRODUCT_MEMBER_NOT_INVITABLE`; someone already on it or invited,\n * `PRODUCT_ALREADY_MEMBER`.\n */\nexport const inviteProductMemberBodySchema = z.object({\n userId: objectIdSchema,\n role: productInvitableRoleSchema,\n});\nexport type InviteProductMemberBody = z.infer<typeof inviteProductMemberBodySchema>;\n\n/**\n * The owner changes someone's role (on the team or still invited). The\n * owner's own role changes only by handing over (`PRODUCT_OWNER_MUST_TRANSFER`);\n * someone not on the team or invited is `PRODUCT_NOT_ON_TEAM`.\n */\nexport const setProductMemberRoleBodySchema = z.object({ role: productInvitableRoleSchema });\nexport type SetProductMemberRoleBody = z.infer<typeof setProductMemberRoleBodySchema>;\n\n/**\n * The owner hands the product to someone already on its team (not merely\n * invited: `PRODUCT_NOT_ON_TEAM`), who must have room under\n * `PRODUCTS_OWNED_MAX` (`PRODUCT_LIMIT_REACHED`). The old owner becomes a co-founder.\n */\nexport const transferProductBodySchema = z.object({ userId: objectIdSchema });\nexport type TransferProductBody = z.infer<typeof transferProductBodySchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../../src/domains/products/products.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,+BAA+B,EAC/B,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,8EAA8E;AAC9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAEpC,gFAAgF;AAChF,4EAA4E;AAE5E;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAClF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC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MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC","sourcesContent":["/**\n * founder-schema — Products: what founders build, and the help around it\n *\n * THE IDEA (the user, 2026-10-06): founders help each other with their\n * products. A founder adds what they build; a post or poll can say which of\n * their products it is about and what they want (\"testers wanted\"); every\n * comment on it becomes that product's feedback; the community reviews and\n * upvotes it; and the help a member gives is recognised in their contribution\n * score.\n *\n * THE COMPANY STAYS THE PROFILE'S `venture` (one per founder). There are no\n * company pages: co-founders join a PRODUCT's team, as Product Hunt lists a\n * product's makers. Revisit only if one team running many products finds\n * re-inviting each time tedious.\n *\n * VISIBILITY, two states (the user's ruling): `unlisted` by default, a page\n * anyone signed in can open by its link and that shows on its team's profiles;\n * `listed`, also in Discover. Listing needs a logo, a tagline and at least one\n * screenshot (`PRODUCT_NOT_LISTABLE` names what is missing), so Discover never\n * shows an empty card.\n *\n * THE TEAM: an owner, co-founders and team members, joined by invitation and\n * acceptance (nobody is put on a team without saying yes), with no limit on\n * its size (the user's ruling). Who may do what:\n *\n * owner co-founder team\n * edit, images, list, invite ✓ ✓\n * tag posts, reply to reviews, ✓ ✓ ✓\n * mark feedback, confirm testers\n * change roles, remove, hand over ✓\n * archive, delete ✓\n *\n * A product's images belong to the product, not to whoever uploaded them.\n * When the owner deletes their account the product passes to the longest-\n * standing co-founder (else team member); with nobody left it is deleted.\n *\n * Routes (all signed in):\n * GET /api/v1/products Discover: productDiscoverQuerySchema\n * GET /api/v1/products/facets productFacetsSchema\n * POST /api/v1/products createProductBodySchema -> IdResponse\n * GET /api/v1/products/mine myProductsSchema\n * GET /api/v1/products/invites productInvitesSchema\n * PUT /api/v1/products/invites/:productId accept -> productSchema\n * DELETE /api/v1/products/invites/:productId decline -> IdResponse\n * GET /api/v1/products/by-member/:userId productCardPageSchema (their teams)\n * GET /api/v1/products/:productId productSchema\n * PATCH /api/v1/products/:productId updateProductBodySchema -> productSchema\n * DELETE /api/v1/products/:productId -> IdResponse (owner)\n * PUT /api/v1/products/:productId/logo setProductLogoBodySchema -> productSchema\n * DELETE /api/v1/products/:productId/logo -> productSchema\n * PUT /api/v1/products/:productId/screenshots setProductScreenshotsBodySchema -> productSchema\n * PUT /api/v1/products/:productId/visibility setProductVisibilityBodySchema -> productSchema\n * PUT /api/v1/products/:productId/status setProductStatusBodySchema -> productSchema\n * PUT /api/v1/products/:productId/live setProductLiveBodySchema -> productSchema (0.12.0)\n * GET /api/v1/products/:productId/team productTeamPageSchema\n * GET /api/v1/products/:productId/invites productPendingInvitePageSchema (managers)\n * POST /api/v1/products/:productId/invites inviteProductMemberBodySchema -> productPendingInviteSchema\n * PUT /api/v1/products/:productId/team/:userId setProductMemberRoleBodySchema -> IdResponse\n * (works on someone still invited too; refetch the team and the invites)\n * DELETE /api/v1/products/:productId/team/:userId remove, cancel an invite, or leave -> IdResponse\n * POST /api/v1/products/:productId/transfer transferProductBodySchema -> productSchema\n * PUT /api/v1/products/:productId/upvote -> productUpvoteResponseSchema\n * DELETE /api/v1/products/:productId/upvote -> productUpvoteResponseSchema\n * GET /api/v1/products/:productId/posts FeedPage (posts and polls tagged with it)\n * GET /api/v1/products/:productId/feedback productFeedbackQuerySchema -> productFeedbackPageSchema (feed)\n * GET /api/v1/products/:productId/testers productTesterPageSchema\n * PUT /api/v1/products/:productId/testers/:userId confirm -> productTesterSchema\n * DELETE /api/v1/products/:productId/testers/:userId withdraw -> IdResponse\n * POST /api/v1/products/:productId/report createReportBodySchema -> CreateReportResponse\n * (reviews: `domains/reviews`)\n *\n * @module founder-schema/domains/products\n */\n\nimport { z } from 'zod';\nimport {\n emptyStringToUndefined,\n httpUrlOnHosts,\n httpUrlSchema,\n industrySchema,\n multiValueQuery,\n objectIdSchema,\n optionalTrimmedString,\n paginationQuerySchema,\n productListingRequirementSchema,\n youtubeVideoId,\n} from '../../core/common.js';\nimport {\n DISCOVER_FILTER_VALUES_MAX,\n DISCOVER_TEXT_MAX,\n PRODUCT_CAPTION_MAX,\n PRODUCT_DESCRIPTION_MAX,\n PRODUCT_NAME_MAX,\n PRODUCT_SCREENSHOTS_MAX,\n PRODUCT_TAGLINE_MAX,\n} from '../../core/limits.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { VALIDATION_MESSAGE } from '../../core/validation.js';\nimport { mediaImageSchema } from '../media/media.js';\nimport { topicSchema } from '../onboarding/onboarding.js';\nimport { memberBylineSchema } from '../profile/founder-profile.js';\n\n/** Topics a product carries, as a post does: what interest matching reads. */\nexport const PRODUCT_TOPICS_MAX = 3;\n\n// ─── Vocabulary ──────────────────────────────────────────────────────────────\n// ⚠ Every list below is STORED. Append only; removing a value orphans rows.\n\n/**\n * Where the product is in its life. Its own list, deliberately not the\n * venture's funding stage (`startupStageSchema`): \"seed\" says how a company is\n * funded, \"beta\" says whether you can use the thing. Ordered earliest first.\n */\nexport const PRODUCT_STAGE_VALUES = ['idea', 'building', 'beta', 'live'] as const;\nexport const productStageSchema = z.enum(PRODUCT_STAGE_VALUES);\nexport type ProductStage = z.infer<typeof productStageSchema>;\n\nexport const PRODUCT_PLATFORM_VALUES = [\n 'web',\n 'ios',\n 'android',\n 'desktop',\n 'browser_extension',\n 'api',\n 'hardware',\n 'other',\n] as const;\nexport const productPlatformSchema = z.enum(PRODUCT_PLATFORM_VALUES);\nexport type ProductPlatform = z.infer<typeof productPlatformSchema>;\n\n/** `unlisted` (the default) or `listed` in Discover. See the module note. */\nexport const PRODUCT_VISIBILITY_VALUES = ['unlisted', 'listed'] as const;\nexport const productVisibilitySchema = z.enum(PRODUCT_VISIBILITY_VALUES);\nexport type ProductVisibility = z.infer<typeof productVisibilitySchema>;\n\n/**\n * `archived`: kept, readable and still on its team's profiles, but out of\n * Discover and closed to new posts, reviews and upvotes. Restorable.\n */\nexport const PRODUCT_STATUS_VALUES = ['active', 'archived'] as const;\nexport const productStatusSchema = z.enum(PRODUCT_STATUS_VALUES);\nexport type ProductStatus = z.infer<typeof productStatusSchema>;\n\n/** One owner per product; see the module note for what each role may do. */\nexport const PRODUCT_TEAM_ROLE_VALUES = ['owner', 'cofounder', 'team'] as const;\nexport const productTeamRoleSchema = z.enum(PRODUCT_TEAM_ROLE_VALUES);\nexport type ProductTeamRole = z.infer<typeof productTeamRoleSchema>;\n\n/** The roles an invitation (or a role change) may give. Ownership is handed over, never invited. */\nexport const PRODUCT_INVITABLE_ROLE_VALUES = ['cofounder', 'team'] as const;\nexport const productInvitableRoleSchema = z.enum(PRODUCT_INVITABLE_ROLE_VALUES);\nexport type ProductInvitableRole = z.infer<typeof productInvitableRoleSchema>;\n\n/**\n * What a post or poll about a product ASKS of the community. Optional, and\n * only with a product. Each ask keeps the product on that shelf of Discover\n * for `PRODUCT_ASK_OPEN_DAYS`.\n *\n * feedback \"tell me what you think\"\n * testers \"try it\": confirmed testers are recognised (`/testers`)\n * launch \"it is out\"\n * ideas \"what should it do next\"\n */\nexport const PRODUCT_ASK_VALUES = ['feedback', 'testers', 'launch', 'ideas'] as const;\nexport const productAskSchema = z.enum(PRODUCT_ASK_VALUES);\nexport type ProductAsk = z.infer<typeof productAskSchema>;\n\n/**\n * Discover's orders.\n *\n * trending recent upvotes, reviews and feedback, newer counting more\n * (recomputed every 15 minutes). The default.\n * new newest first by when it was FIRST listed (unlisting and\n * listing again does not move it back to the top)\n * top_rated best rated, pulled toward a neutral 3 stars by 5 imaginary\n * reviews so a few perfect ratings cannot beat many excellent\n * ones; only products with `REVIEW_AVERAGE_MIN_COUNT` reviews\n */\nexport const PRODUCT_SORT_VALUES = ['trending', 'new', 'top_rated'] as const;\nexport const productSortSchema = z.enum(PRODUCT_SORT_VALUES);\nexport type ProductSort = z.infer<typeof productSortSchema>;\n\n/**\n * What listing needs (defined in core, beside the error details that carry it:\n * `PRODUCT_NOT_LISTABLE` returns the missing ones in `details.missing`).\n */\nexport {\n PRODUCT_LISTING_REQUIREMENT_VALUES,\n type ProductListingRequirement,\n productListingRequirementSchema,\n} from '../../core/common.js';\n\n// ─── Fields ──────────────────────────────────────────────────────────────────\n\n/**\n * Where to get it. Every link is member-typed, so every one is\n * `httpUrlSchema`, and the store links must also be ON the store: the\n * hostname is parsed and compared exactly (`httpUrlOnHosts`).\n */\nexport const productLinksSchema = z.object({\n website: httpUrlSchema.optional(),\n appStore: httpUrlOnHosts(\n ['apps.apple.com', 'itunes.apple.com'],\n VALIDATION_MESSAGE.appStoreLinkHost,\n ).optional(),\n playStore: httpUrlOnHosts(['play.google.com'], VALIDATION_MESSAGE.playStoreLinkHost).optional(),\n github: httpUrlOnHosts(\n ['github.com', 'www.github.com'],\n VALIDATION_MESSAGE.githubLinkHost,\n ).optional(),\n});\nexport type ProductLinks = z.infer<typeof productLinksSchema>;\n\n/**\n * A demo video: a link to one YouTube VIDEO, played in the page (never\n * uploaded). A channel or playlist link is refused: the page cannot embed it\n * (`youtubeVideoId`, 0.7.0).\n */\nexport const productVideoUrlSchema = httpUrlSchema.refine((url) => youtubeVideoId(url) !== null, {\n error: VALIDATION_MESSAGE.videoLinkHost,\n});\n\nconst platformsSchema = z\n .array(productPlatformSchema)\n .max(PRODUCT_PLATFORM_VALUES.length)\n .refine((list) => new Set(list).size === list.length, {\n error: VALIDATION_MESSAGE.platformsDuplicate,\n });\n\n// ─── Read shapes ─────────────────────────────────────────────────────────────\n\n/**\n * A product named on something else: the chip on a post or poll, a\n * notification, a points entry. `logoUrl` is the logo's smallest size.\n */\nexport const productChipSchema = z.object({\n id: objectIdSchema,\n /** For a readable URL, `/products/<id>/<slug>`. The id is what resolves; a renamed product keeps its links. */\n slug: z.string(),\n name: z.string(),\n logoUrl: z.url().optional(),\n});\nexport type ProductChip = z.infer<typeof productChipSchema>;\n\n/**\n * How it is rated. `average` (one decimal) is null until the product has\n * `REVIEW_AVERAGE_MIN_COUNT` reviews: a client shows \"Not enough reviews yet\",\n * never a lone 5.0 from one friend.\n */\nexport const productRatingSchema = z.object({\n count: z.number().int().nonnegative(),\n average: z.number().min(1).max(5).nullable(),\n});\nexport type ProductRating = z.infer<typeof productRatingSchema>;\n\n/** One screenshot: a processed image (every size, ready for `srcset`) and its caption. */\nexport const productScreenshotSchema = mediaImageSchema.extend({\n caption: z.string().max(PRODUCT_CAPTION_MAX).optional(),\n});\nexport type ProductScreenshot = z.infer<typeof productScreenshotSchema>;\n\n/** What this viewer may do on a Discover card. */\nexport const productCardViewerSchema = z.object({\n upvoted: z.boolean(),\n /** Not on its team, and the product is open (not archived). */\n canUpvote: z.boolean(),\n /** Their role on its team, or null. */\n role: productTeamRoleSchema.nullable(),\n /**\n * They may act FOR it now (0.7.0): on its team, and it is neither archived\n * nor hidden by staff. The server's own rule, for a picker such as the\n * composer's \"about which product\" (the page's `viewer.canRepresent`).\n */\n canRepresent: z.boolean().optional(),\n});\n\n/**\n * A product on Discover, on a profile, in \"my products\". `cover` is the first\n * screenshot. `openAsks` are the asks whose window is open now, by the\n * server's clock (\"Testers wanted\").\n */\nexport const productCardSchema = z.object({\n id: objectIdSchema,\n slug: z.string(),\n name: z.string(),\n tagline: z.string().optional(),\n logo: mediaImageSchema.optional(),\n cover: mediaImageSchema.optional(),\n industry: industrySchema,\n stage: productStageSchema,\n platforms: z.array(productPlatformSchema),\n visibility: productVisibilitySchema,\n status: productStatusSchema,\n rating: productRatingSchema,\n upvoteCount: z.number().int().nonnegative(),\n openAsks: z.array(productAskSchema),\n /**\n * Staff hid it (0.7.0). Only ever on a card its team or staff can see (in\n * \"my products\", on a team member's profile): a \"Hidden by moderators\" badge.\n */\n hiddenByStaff: z.boolean().optional(),\n /**\n * Paused (0.12.0): its owner owns more products than their plan keeps\n * live. Like a hidden one, only its team and staff see it at all: a\n * \"Paused\" badge. The owner makes it live again (`PUT .../live`) when a\n * place is free.\n */\n paused: z.boolean().optional(),\n viewer: productCardViewerSchema.optional(),\n});\nexport type ProductCard = z.infer<typeof productCardSchema>;\n\n/**\n * Why a product is paused (0.12.0). ⚠ Stored: append only.\n * limit over its owner's live places (a plan ended, a refund, joining\n * without one): it comes back by itself when a place frees\n * owner its owner paused it, to free a place for another: it stays\n * paused until they make it live\n */\nexport const PRODUCT_PAUSED_BY_VALUES = ['limit', 'owner'] as const;\nexport const productPausedBySchema = z.enum(PRODUCT_PAUSED_BY_VALUES);\nexport type ProductPausedBy = z.infer<typeof productPausedBySchema>;\n\n/** One person on a product's team, live-joined like every byline. */\nexport const productTeamMemberSchema = memberBylineSchema.extend({\n role: productTeamRoleSchema,\n /** When they accepted (or, for the owner, created the product). */\n joinedAt: z.iso.datetime(),\n});\nexport type ProductTeamMember = z.infer<typeof productTeamMemberSchema>;\n\n/**\n * What THIS viewer may do on the product page, decided by the server and sent\n * as plain answers (the same rule as `viewerStateSchema` on a post).\n */\nexport const productViewerSchema = productCardViewerSchema.extend({\n /** An invitation to the team is waiting for them: offer Accept / Decline. */\n invited: z.boolean(),\n /** Their own review of it, if any, so the page offers Edit instead of Write. */\n reviewId: objectIdSchema.nullable(),\n /** The team confirmed them as a tester. */\n tester: z.boolean(),\n /** Owner and co-founders: details, images, listing, invitations. */\n canEdit: z.boolean(),\n /** Owner: roles, removals, handing over. */\n canManageTeam: z.boolean(),\n /** Owner. */\n canDelete: z.boolean(),\n /**\n * Owner (0.12.0): may pause it, or make it live again. Making it live is\n * refused with `PRODUCT_LIMIT_REACHED` when no live place is free; the page\n * says so from `GET /me/membership`.\n */\n canSetLive: z.boolean(),\n /** Anyone on the team: tag posts with it, reply to reviews, mark feedback, confirm testers. */\n canRepresent: z.boolean(),\n /** Not on its team, no review yet, and the product is open. */\n canReview: z.boolean(),\n canReport: z.boolean(),\n /**\n * For whoever may edit: what listing still needs. Empty means it can be\n * listed (or already is). Lets the page show a checklist before the member\n * tries and is refused.\n */\n missingForListing: z.array(productListingRequirementSchema),\n});\nexport type ProductViewer = z.infer<typeof productViewerSchema>;\n\n/** The product page. */\nexport const productSchema = productCardSchema.extend({\n /** Set with `paused` (0.12.0): who paused it, so the page says why. */\n pausedBy: productPausedBySchema.optional(),\n description: z.string().optional(),\n links: productLinksSchema,\n videoUrl: z.string().optional(),\n topics: z.array(topicSchema).max(PRODUCT_TOPICS_MAX),\n screenshots: z.array(productScreenshotSchema).max(PRODUCT_SCREENSHOTS_MAX),\n /** The owner first, then co-founders, then the team, each by when they joined; at most `PRODUCT_TEAM_SHOWN`. */\n team: z.array(productTeamMemberSchema),\n teamCount: z.number().int().nonnegative(),\n counts: z.object({\n /** Posts and polls tagged with it. */\n posts: z.number().int().nonnegative(),\n /** Comments on those from people outside its team: what the Feedback tab lists. */\n feedback: z.number().int().nonnegative(),\n /** Members the team confirmed as testers. */\n testers: z.number().int().nonnegative(),\n }),\n listedAt: z.iso.datetime().nullable(),\n createdAt: z.iso.datetime(),\n updatedAt: z.iso.datetime(),\n /**\n * Only for its team and for staff: staff hid it, so everyone else gets 404.\n * The page tells the team why it vanished from Discover.\n */\n hiddenByStaff: z.boolean().optional(),\n viewer: productViewerSchema.optional(),\n});\nexport type Product = z.infer<typeof productSchema>;\n\n/**\n * An invitation the team sent and nobody has answered yet, as its managers see\n * it (`GET /products/:id/invites`): who, for what role, sent by whom. The owner\n * may change its role (`PUT /team/:userId`) or cancel it (`DELETE /team/:userId`).\n */\nexport const productPendingInviteSchema = z.object({\n member: memberBylineSchema,\n role: productInvitableRoleSchema,\n /** Null when whoever invited has since deleted their account. */\n invitedBy: memberBylineSchema.nullable(),\n invitedAt: z.iso.datetime(),\n});\nexport type ProductPendingInvite = z.infer<typeof productPendingInviteSchema>;\n\n/** A team invitation waiting for the viewer's answer. */\nexport const productInviteSchema = z.object({\n product: productChipSchema.extend({ tagline: z.string().optional() }),\n role: productInvitableRoleSchema,\n /** Null when whoever invited has since deleted their account. */\n invitedBy: memberBylineSchema.nullable(),\n invitedAt: z.iso.datetime(),\n});\nexport type ProductInvite = z.infer<typeof productInviteSchema>;\n\n/** `GET /products/invites`. Never paged: invitations are few, and each needs an answer. */\nexport const productInvitesSchema = z.object({ items: z.array(productInviteSchema) });\nexport type ProductInvites = z.infer<typeof productInvitesSchema>;\n\n/**\n * `GET /products/mine`: every product the viewer is on the team of, archived\n * and paused included, owned first. Not paged: a founder lists few, and joins\n * teams by accepting invitations one at a time, so the list stays short in\n * practice; there is no hard cap on teams joined.\n */\nexport const myProductsSchema = z.object({ items: z.array(productCardSchema) });\nexport type MyProducts = z.infer<typeof myProductsSchema>;\n\n/** A member the team confirmed tested the product. */\nexport const productTesterSchema = z.object({\n member: memberBylineSchema,\n confirmedAt: z.iso.datetime(),\n});\nexport type ProductTester = z.infer<typeof productTesterSchema>;\n\nexport const productCardPageSchema = paginatedSchema(productCardSchema);\nexport type ProductCardPage = z.infer<typeof productCardPageSchema>;\nexport const productTeamPageSchema = paginatedSchema(productTeamMemberSchema);\nexport type ProductTeamPage = z.infer<typeof productTeamPageSchema>;\nexport const productTesterPageSchema = paginatedSchema(productTesterSchema);\nexport type ProductTesterPage = z.infer<typeof productTesterPageSchema>;\n/** Co-founder invitations first, then team; within each, the oldest invitation first. */\nexport const productPendingInvitePageSchema = paginatedSchema(productPendingInviteSchema);\nexport type ProductPendingInvitePage = z.infer<typeof productPendingInvitePageSchema>;\n\n/** `PUT|DELETE /products/:id/upvote`: the state it settled on and the fresh count. */\nexport const productUpvoteResponseSchema = z.object({\n productId: objectIdSchema,\n upvoted: z.boolean(),\n upvoteCount: z.number().int().nonnegative(),\n});\nexport type ProductUpvoteResponse = z.infer<typeof productUpvoteResponseSchema>;\n\n/**\n * Discover's filter drawer for products: every value with how many LISTED\n * products match, zero counts included, in the list's own order.\n */\nconst facetSchema = <T extends z.ZodType>(value: T) =>\n z.array(z.object({ value, count: z.number().int().nonnegative() }));\nexport const productFacetsSchema = z.object({\n industries: facetSchema(industrySchema),\n stages: facetSchema(productStageSchema),\n platforms: facetSchema(productPlatformSchema),\n asks: facetSchema(productAskSchema),\n});\nexport type ProductFacets = z.infer<typeof productFacetsSchema>;\n\n// ─── Queries and params ──────────────────────────────────────────────────────\n\n/** A Discover multi-select (`?industry=a&industry=b`): see `multiValueQuery`. */\nconst multiValue = <T extends z.ZodType>(inner: T) =>\n multiValueQuery(inner, DISCOVER_FILTER_VALUES_MAX);\n\n/**\n * `GET /api/v1/products`: LISTED products only. Filters of one kind mean \"any\n * of\", different kinds combine (\"fintech AND beta\"). `ask` keeps products\n * whose ask is open now. `q` matches the start of the name; an emptied box\n * (`?q=`) is no search, never a 400.\n */\nexport const productDiscoverQuerySchema = paginationQuerySchema.extend({\n sort: z.preprocess(emptyStringToUndefined, productSortSchema.default('trending')),\n q: optionalTrimmedString(DISCOVER_TEXT_MAX),\n industry: multiValue(industrySchema),\n stage: multiValue(productStageSchema),\n platform: multiValue(productPlatformSchema),\n ask: z.preprocess(emptyStringToUndefined, productAskSchema.optional()),\n});\nexport type ProductDiscoverQuery = z.infer<typeof productDiscoverQuerySchema>;\nexport type ProductDiscoverQueryInput = z.input<typeof productDiscoverQuerySchema>;\n\n/**\n * `GET /products/:id/feedback`: comments from outside its team on the posts\n * and polls tagged with it, newest first. `helpful=true` narrows to the ones\n * the team marked as having helped.\n */\nexport const productFeedbackQuerySchema = paginationQuerySchema.extend({\n helpful: z.preprocess(emptyStringToUndefined, z.stringbool().default(false)),\n});\nexport type ProductFeedbackQuery = z.infer<typeof productFeedbackQuerySchema>;\nexport type ProductFeedbackQueryInput = z.input<typeof productFeedbackQuerySchema>;\n\nexport const productParamsSchema = z.object({ productId: objectIdSchema });\nexport type ProductParams = z.infer<typeof productParamsSchema>;\n/** `/products/:productId/team/:userId`, `/products/:productId/testers/:userId`. */\nexport const productMemberParamsSchema = z.object({\n productId: objectIdSchema,\n userId: objectIdSchema,\n});\nexport type ProductMemberParams = z.infer<typeof productMemberParamsSchema>;\n/** `/products/by-member/:userId`. */\nexport const productsByMemberParamsSchema = z.object({ userId: objectIdSchema });\nexport type ProductsByMemberParams = z.infer<typeof productsByMemberParamsSchema>;\n\n// ─── Write bodies ────────────────────────────────────────────────────────────\n// Each its own object with NO defaults (see `updateFounderProfileBodySchema`).\n\n/** A screenshot on the way in: an uploaded, processed image id, and its caption. */\nexport const productScreenshotInputSchema = z.object({\n mediaId: objectIdSchema,\n caption: z.string().trim().max(PRODUCT_CAPTION_MAX).optional(),\n});\nexport type ProductScreenshotInput = z.infer<typeof productScreenshotInputSchema>;\n\nconst screenshotsInputSchema = z\n .array(productScreenshotInputSchema)\n .max(PRODUCT_SCREENSHOTS_MAX)\n .refine((list) => new Set(list.map((s) => s.mediaId)).size === list.length, {\n error: VALIDATION_MESSAGE.screenshotsDuplicate,\n });\n\n/**\n * `POST /api/v1/products`. Starts `unlisted`, owned by the caller. The logo\n * and screenshots may come now or later (uploaded first, purpose\n * `product_logo` / `product_screenshot`, like a post's images).\n */\nexport const createProductBodySchema = z.object({\n name: z.string().trim().min(1).max(PRODUCT_NAME_MAX),\n tagline: z.string().trim().min(1).max(PRODUCT_TAGLINE_MAX).optional(),\n description: z.string().trim().min(1).max(PRODUCT_DESCRIPTION_MAX).optional(),\n industry: industrySchema,\n stage: productStageSchema,\n platforms: platformsSchema.optional(),\n topics: z.array(topicSchema).max(PRODUCT_TOPICS_MAX).optional(),\n links: productLinksSchema.optional(),\n videoUrl: productVideoUrlSchema.optional(),\n logoMediaId: objectIdSchema.optional(),\n screenshots: screenshotsInputSchema.optional(),\n});\nexport type CreateProductBody = z.infer<typeof createProductBodySchema>;\n\n/** Text the editor may empty: absent leaves it, `null` clears it, `\"\"` is refused. */\nconst clearable = <T extends z.ZodType>(inner: T) => inner.nullable().optional();\n\n/**\n * `PATCH /api/v1/products/:id`: only the keys that changed. Images, listing\n * and status have their own routes. `links` is sent whole.\n */\nexport const updateProductBodySchema = z.object({\n name: z.string().trim().min(1).max(PRODUCT_NAME_MAX).optional(),\n tagline: clearable(\n z.string().trim().min(1, VALIDATION_MESSAGE.clearWithNull).max(PRODUCT_TAGLINE_MAX),\n ),\n description: clearable(\n z.string().trim().min(1, VALIDATION_MESSAGE.clearWithNull).max(PRODUCT_DESCRIPTION_MAX),\n ),\n industry: industrySchema.optional(),\n stage: productStageSchema.optional(),\n platforms: platformsSchema.optional(),\n topics: z.array(topicSchema).max(PRODUCT_TOPICS_MAX).optional(),\n links: productLinksSchema.optional(),\n videoUrl: clearable(productVideoUrlSchema),\n});\nexport type UpdateProductBody = z.infer<typeof updateProductBodySchema>;\n\n/** `PUT /products/:id/logo`: a processed `product_logo` upload. The old logo's files are deleted. */\nexport const setProductLogoBodySchema = z.object({ mediaId: objectIdSchema });\nexport type SetProductLogoBody = z.infer<typeof setProductLogoBodySchema>;\n\n/**\n * `PUT /products/:id/screenshots`: the WHOLE gallery as it should now be, in\n * order. One call adds, removes, reorders and re-captions: screenshots already\n * on the product stay; new ids must be the caller's processed\n * `product_screenshot` uploads; any left out are deleted from storage.\n */\nexport const setProductScreenshotsBodySchema = z.object({ screenshots: screenshotsInputSchema });\nexport type SetProductScreenshotsBody = z.infer<typeof setProductScreenshotsBodySchema>;\n\nexport const setProductVisibilityBodySchema = z.object({ visibility: productVisibilitySchema });\nexport type SetProductVisibilityBody = z.infer<typeof setProductVisibilityBodySchema>;\n\nexport const setProductStatusBodySchema = z.object({ status: productStatusSchema });\nexport type SetProductStatusBody = z.infer<typeof setProductStatusBodySchema>;\n\n/**\n * `PUT /products/:productId/live` (0.12.0, owner): `false` pauses it (to free\n * a live place for another), `true` makes a paused one live again.\n */\nexport const setProductLiveBodySchema = z.object({ live: z.boolean() });\nexport type SetProductLiveBody = z.infer<typeof setProductLiveBodySchema>;\n\n/**\n * Invite a member to the team; they must accept. `userId` is the member's id\n * as every card carries it (`founderCardSchema.userId`). Someone who cannot\n * join (has not finished onboarding, paused, suspended, deleted) is\n * `PRODUCT_MEMBER_NOT_INVITABLE`; someone already on it or invited,\n * `PRODUCT_ALREADY_MEMBER`.\n */\nexport const inviteProductMemberBodySchema = z.object({\n userId: objectIdSchema,\n role: productInvitableRoleSchema,\n});\nexport type InviteProductMemberBody = z.infer<typeof inviteProductMemberBodySchema>;\n\n/**\n * The owner changes someone's role (on the team or still invited). The\n * owner's own role changes only by handing over (`PRODUCT_OWNER_MUST_TRANSFER`);\n * someone not on the team or invited is `PRODUCT_NOT_ON_TEAM`.\n */\nexport const setProductMemberRoleBodySchema = z.object({ role: productInvitableRoleSchema });\nexport type SetProductMemberRoleBody = z.infer<typeof setProductMemberRoleBodySchema>;\n\n/**\n * The owner hands the product to someone already on its team (not merely\n * invited: `PRODUCT_NOT_ON_TEAM`), who must have room under\n * `PRODUCTS_OWNED_MAX` (`PRODUCT_LIMIT_REACHED`). The old owner becomes a co-founder.\n */\nexport const transferProductBodySchema = z.object({ userId: objectIdSchema });\nexport type TransferProductBody = z.infer<typeof transferProductBodySchema>;\n"]}
|
|
@@ -319,6 +319,167 @@ export declare const founderCardSchema: z.ZodObject<{
|
|
|
319
319
|
}>>>;
|
|
320
320
|
}, z.core.$strip>;
|
|
321
321
|
export type FounderCard = z.infer<typeof founderCardSchema>;
|
|
322
|
+
/**
|
|
323
|
+
* The four personal details a member MAY show on their profile page (the
|
|
324
|
+
* user's ruling, 2026-10-11). Each is PRIVATE until its owner turns it on;
|
|
325
|
+
* everything else on a profile is public as before. Changed only through
|
|
326
|
+
* `PATCH /profiles/me/personal`.
|
|
327
|
+
*/
|
|
328
|
+
export declare const CONTACT_VISIBILITY_FIELDS: readonly ["email", "phone", "gender", "birthday"];
|
|
329
|
+
export type ContactVisibilityField = (typeof CONTACT_VISIBILITY_FIELDS)[number];
|
|
330
|
+
/** Which of the four the member shows. Every key present on a read: false is private. */
|
|
331
|
+
export declare const contactVisibilitySchema: z.ZodObject<{
|
|
332
|
+
email: z.ZodBoolean;
|
|
333
|
+
phone: z.ZodBoolean;
|
|
334
|
+
gender: z.ZodBoolean;
|
|
335
|
+
birthday: z.ZodBoolean;
|
|
336
|
+
}, z.core.$strip>;
|
|
337
|
+
export type ContactVisibility = z.infer<typeof contactVisibilitySchema>;
|
|
338
|
+
/**
|
|
339
|
+
* A birthday as OTHERS see it: day and month, NEVER the year (the user's
|
|
340
|
+
* ruling). The year would give away the age and, with the name, the full date
|
|
341
|
+
* of birth that identity checks ask for. The year is never on the wire.
|
|
342
|
+
*/
|
|
343
|
+
export declare const publicBirthdaySchema: z.ZodObject<{
|
|
344
|
+
day: z.ZodNumber;
|
|
345
|
+
month: z.ZodNumber;
|
|
346
|
+
}, z.core.$strip>;
|
|
347
|
+
export type PublicBirthday = z.infer<typeof publicBirthdaySchema>;
|
|
348
|
+
/**
|
|
349
|
+
* `GET /api/v1/founders/by-username/:username` (0.11.0): one member's profile
|
|
350
|
+
* page, as a signed-in member (or the member themself) sees it.
|
|
351
|
+
*
|
|
352
|
+
* The card's fields, what only a page has room for (about, links, member
|
|
353
|
+
* since), and `shown`: the personal details this member has CHOSEN to show,
|
|
354
|
+
* and nothing else. Email and phone go to members only, never to an account
|
|
355
|
+
* without membership (the coming viewer tier); the server decides, and a
|
|
356
|
+
* client renders what arrives. Built field by field on the server
|
|
357
|
+
* (`toMemberPublic`), never by dropping fields from a fuller document.
|
|
358
|
+
*
|
|
359
|
+
* `viewer.canMessage` is the server's answer to "may I start a chat with
|
|
360
|
+
* them": who may message whom will follow membership and plans, so no client
|
|
361
|
+
* works it out.
|
|
362
|
+
*/
|
|
363
|
+
export declare const memberProfileSchema: z.ZodObject<{
|
|
364
|
+
id: z.ZodString;
|
|
365
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
366
|
+
city: z.ZodString;
|
|
367
|
+
state: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
|
|
368
|
+
country: z.ZodString;
|
|
369
|
+
}, z.core.$strip>>;
|
|
370
|
+
about: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
|
|
371
|
+
displayName: z.ZodString;
|
|
372
|
+
createdAt: z.ZodISODateTime;
|
|
373
|
+
userId: z.ZodString;
|
|
374
|
+
username: z.ZodString;
|
|
375
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
376
|
+
headline: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
|
|
377
|
+
contribution: z.ZodObject<{
|
|
378
|
+
score: z.ZodNumber;
|
|
379
|
+
helpedCount: z.ZodNumber;
|
|
380
|
+
}, z.core.$strip>;
|
|
381
|
+
venture: z.ZodOptional<z.ZodObject<{
|
|
382
|
+
name: z.ZodString;
|
|
383
|
+
tagline: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
|
|
384
|
+
website: z.ZodOptional<z.ZodURL>;
|
|
385
|
+
industry: z.ZodEnum<{
|
|
386
|
+
agritech: "agritech";
|
|
387
|
+
ai_ml: "ai_ml";
|
|
388
|
+
b2b_saas: "b2b_saas";
|
|
389
|
+
consumer: "consumer";
|
|
390
|
+
climate: "climate";
|
|
391
|
+
d2c: "d2c";
|
|
392
|
+
deeptech: "deeptech";
|
|
393
|
+
edtech: "edtech";
|
|
394
|
+
fintech: "fintech";
|
|
395
|
+
gaming: "gaming";
|
|
396
|
+
healthtech: "healthtech";
|
|
397
|
+
logistics: "logistics";
|
|
398
|
+
manufacturing: "manufacturing";
|
|
399
|
+
marketplace: "marketplace";
|
|
400
|
+
media: "media";
|
|
401
|
+
mobility: "mobility";
|
|
402
|
+
proptech: "proptech";
|
|
403
|
+
robotics: "robotics";
|
|
404
|
+
services: "services";
|
|
405
|
+
space: "space";
|
|
406
|
+
other: "other";
|
|
407
|
+
}>;
|
|
408
|
+
stage: z.ZodEnum<{
|
|
409
|
+
idea: "idea";
|
|
410
|
+
validation: "validation";
|
|
411
|
+
mvp: "mvp";
|
|
412
|
+
pre_seed: "pre_seed";
|
|
413
|
+
seed: "seed";
|
|
414
|
+
series_a_plus: "series_a_plus";
|
|
415
|
+
profitable: "profitable";
|
|
416
|
+
exited: "exited";
|
|
417
|
+
}>;
|
|
418
|
+
teamSize: z.ZodOptional<z.ZodNumber>;
|
|
419
|
+
foundedYear: z.ZodOptional<z.ZodNumber>;
|
|
420
|
+
}, z.core.$strip>>;
|
|
421
|
+
skills: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
422
|
+
engineering: "engineering";
|
|
423
|
+
product: "product";
|
|
424
|
+
design: "design";
|
|
425
|
+
data: "data";
|
|
426
|
+
growth: "growth";
|
|
427
|
+
sales: "sales";
|
|
428
|
+
marketing: "marketing";
|
|
429
|
+
operations: "operations";
|
|
430
|
+
finance: "finance";
|
|
431
|
+
legal: "legal";
|
|
432
|
+
hr_people: "hr_people";
|
|
433
|
+
supply_chain: "supply_chain";
|
|
434
|
+
research: "research";
|
|
435
|
+
fundraising: "fundraising";
|
|
436
|
+
community: "community";
|
|
437
|
+
}>>>;
|
|
438
|
+
goals: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
439
|
+
find_cofounder: "find_cofounder";
|
|
440
|
+
find_investors: "find_investors";
|
|
441
|
+
find_customers: "find_customers";
|
|
442
|
+
hiring: "hiring";
|
|
443
|
+
partnerships: "partnerships";
|
|
444
|
+
mentorship: "mentorship";
|
|
445
|
+
grow_network: "grow_network";
|
|
446
|
+
business_ideas: "business_ideas";
|
|
447
|
+
market_insights: "market_insights";
|
|
448
|
+
learn_startup: "learn_startup";
|
|
449
|
+
start_company: "start_company";
|
|
450
|
+
}>>>;
|
|
451
|
+
links: z.ZodDefault<z.ZodObject<{
|
|
452
|
+
linkedin: z.ZodOptional<z.ZodURL>;
|
|
453
|
+
x: z.ZodOptional<z.ZodURL>;
|
|
454
|
+
instagram: z.ZodOptional<z.ZodURL>;
|
|
455
|
+
github: z.ZodOptional<z.ZodURL>;
|
|
456
|
+
website: z.ZodOptional<z.ZodURL>;
|
|
457
|
+
}, z.core.$strip>>;
|
|
458
|
+
shown: z.ZodObject<{
|
|
459
|
+
email: z.ZodOptional<z.ZodString>;
|
|
460
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
461
|
+
gender: z.ZodOptional<z.ZodEnum<{
|
|
462
|
+
other: "other";
|
|
463
|
+
male: "male";
|
|
464
|
+
female: "female";
|
|
465
|
+
prefer_not_to_say: "prefer_not_to_say";
|
|
466
|
+
}>>;
|
|
467
|
+
birthday: z.ZodOptional<z.ZodObject<{
|
|
468
|
+
day: z.ZodNumber;
|
|
469
|
+
month: z.ZodNumber;
|
|
470
|
+
}, z.core.$strip>>;
|
|
471
|
+
}, z.core.$strip>;
|
|
472
|
+
viewer: z.ZodObject<{
|
|
473
|
+
isSelf: z.ZodBoolean;
|
|
474
|
+
canMessage: z.ZodBoolean;
|
|
475
|
+
}, z.core.$strip>;
|
|
476
|
+
}, z.core.$strip>;
|
|
477
|
+
export type MemberProfile = z.infer<typeof memberProfileSchema>;
|
|
478
|
+
/** The member page's address: `/discover/<username>`. */
|
|
479
|
+
export declare const memberHandleParamsSchema: z.ZodObject<{
|
|
480
|
+
username: z.ZodString;
|
|
481
|
+
}, z.core.$strip>;
|
|
482
|
+
export type MemberHandleParams = z.infer<typeof memberHandleParamsSchema>;
|
|
322
483
|
/**
|
|
323
484
|
* Patch body for the Me tab. Only the keys the member actually changed.
|
|
324
485
|
*
|
|
@@ -465,6 +626,12 @@ export declare const myPersonalDetailsSchema: z.ZodObject<{
|
|
|
465
626
|
prefer_not_to_say: "prefer_not_to_say";
|
|
466
627
|
}>>;
|
|
467
628
|
dateOfBirth: z.ZodOptional<z.ZodString>;
|
|
629
|
+
visibility: z.ZodObject<{
|
|
630
|
+
email: z.ZodBoolean;
|
|
631
|
+
phone: z.ZodBoolean;
|
|
632
|
+
gender: z.ZodBoolean;
|
|
633
|
+
birthday: z.ZodBoolean;
|
|
634
|
+
}, z.core.$strip>;
|
|
468
635
|
}, z.core.$strip>;
|
|
469
636
|
export type MyPersonalDetails = z.infer<typeof myPersonalDetailsSchema>;
|
|
470
637
|
/**
|
|
@@ -493,6 +660,17 @@ export declare const updateMyPersonalDetailsBodySchema: z.ZodObject<{
|
|
|
493
660
|
female: "female";
|
|
494
661
|
prefer_not_to_say: "prefer_not_to_say";
|
|
495
662
|
}>>;
|
|
663
|
+
location: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
664
|
+
city: z.ZodString;
|
|
665
|
+
state: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
|
|
666
|
+
country: z.ZodString;
|
|
667
|
+
}, z.core.$strip>>>;
|
|
668
|
+
visibility: z.ZodOptional<z.ZodObject<{
|
|
669
|
+
email: z.ZodOptional<z.ZodBoolean>;
|
|
670
|
+
phone: z.ZodOptional<z.ZodBoolean>;
|
|
671
|
+
gender: z.ZodOptional<z.ZodBoolean>;
|
|
672
|
+
birthday: z.ZodOptional<z.ZodBoolean>;
|
|
673
|
+
}, z.core.$strip>>;
|
|
496
674
|
}, z.core.$strip>;
|
|
497
675
|
export type UpdateMyPersonalDetailsBody = z.infer<typeof updateMyPersonalDetailsBodySchema>;
|
|
498
676
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"founder-profile.d.ts","sourceRoot":"","sources":["../../../src/domains/profile/founder-profile.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiCxB;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BxB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAIpD;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB;;;;;;iBAS7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB;;;iBAGpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAI5E;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB;;;;;;iBAM7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;GAI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Schema = founderProfileSchema.pick({
|
|
|
183
183
|
goals: true,
|
|
184
184
|
contribution: true,
|
|
185
185
|
});
|
|
186
|
+
// ─── What a member chooses to show (0.11.0) ──────────────────────────────────
|
|
187
|
+
/**
|
|
188
|
+
* The four personal details a member MAY show on their profile page (the
|
|
189
|
+
* user's ruling, 2026-10-11). Each is PRIVATE until its owner turns it on;
|
|
190
|
+
* everything else on a profile is public as before. Changed only through
|
|
191
|
+
* `PATCH /profiles/me/personal`.
|
|
192
|
+
*/
|
|
193
|
+
export const CONTACT_VISIBILITY_FIELDS = ['email', 'phone', 'gender', 'birthday'];
|
|
194
|
+
/** Which of the four the member shows. Every key present on a read: false is private. */
|
|
195
|
+
export const contactVisibilitySchema = z.object({
|
|
196
|
+
email: z.boolean(),
|
|
197
|
+
phone: z.boolean(),
|
|
198
|
+
gender: z.boolean(),
|
|
199
|
+
birthday: z.boolean(),
|
|
200
|
+
});
|
|
201
|
+
/**
|
|
202
|
+
* A birthday as OTHERS see it: day and month, NEVER the year (the user's
|
|
203
|
+
* ruling). The year would give away the age and, with the name, the full date
|
|
204
|
+
* of birth that identity checks ask for. The year is never on the wire.
|
|
205
|
+
*/
|
|
206
|
+
export const publicBirthdaySchema = z.object({
|
|
207
|
+
day: z.number().int().min(1).max(31),
|
|
208
|
+
month: z.number().int().min(1).max(12),
|
|
209
|
+
});
|
|
210
|
+
/**
|
|
211
|
+
* `GET /api/v1/founders/by-username/:username` (0.11.0): one member's profile
|
|
212
|
+
* page, as a signed-in member (or the member themself) sees it.
|
|
213
|
+
*
|
|
214
|
+
* The card's fields, what only a page has room for (about, links, member
|
|
215
|
+
* since), and `shown`: the personal details this member has CHOSEN to show,
|
|
216
|
+
* and nothing else. Email and phone go to members only, never to an account
|
|
217
|
+
* without membership (the coming viewer tier); the server decides, and a
|
|
218
|
+
* client renders what arrives. Built field by field on the server
|
|
219
|
+
* (`toMemberPublic`), never by dropping fields from a fuller document.
|
|
220
|
+
*
|
|
221
|
+
* `viewer.canMessage` is the server's answer to "may I start a chat with
|
|
222
|
+
* them": who may message whom will follow membership and plans, so no client
|
|
223
|
+
* works it out.
|
|
224
|
+
*/
|
|
225
|
+
export const memberProfileSchema = founderProfileSchema
|
|
226
|
+
.pick({
|
|
227
|
+
id: true,
|
|
228
|
+
userId: true,
|
|
229
|
+
username: true,
|
|
230
|
+
displayName: true,
|
|
231
|
+
headline: true,
|
|
232
|
+
about: true,
|
|
233
|
+
avatarUrl: true,
|
|
234
|
+
location: true,
|
|
235
|
+
venture: true,
|
|
236
|
+
skills: true,
|
|
237
|
+
goals: true,
|
|
238
|
+
links: true,
|
|
239
|
+
contribution: true,
|
|
240
|
+
createdAt: true,
|
|
241
|
+
})
|
|
242
|
+
.extend({
|
|
243
|
+
shown: z.object({
|
|
244
|
+
email: z.string().optional(),
|
|
245
|
+
phone: z.string().optional(),
|
|
246
|
+
gender: genderSchema.optional(),
|
|
247
|
+
birthday: publicBirthdaySchema.optional(),
|
|
248
|
+
}),
|
|
249
|
+
viewer: z.object({ isSelf: z.boolean(), canMessage: z.boolean() }),
|
|
250
|
+
});
|
|
251
|
+
/** The member page's address: `/discover/<username>`. */
|
|
252
|
+
export const memberHandleParamsSchema = z.object({ username: usernameSchema });
|
|
186
253
|
// ─── Write bodies ────────────────────────────────────────────────────────────
|
|
187
254
|
/**
|
|
188
255
|
* A text field the member is allowed to empty.
|
|
@@ -275,6 +342,8 @@ export const myPersonalDetailsSchema = z.object({
|
|
|
275
342
|
* gate anyone could walk around.
|
|
276
343
|
*/
|
|
277
344
|
dateOfBirth: z.string().optional(),
|
|
345
|
+
/** Which of email, phone, gender and birthday the member shows on their page (0.11.0). */
|
|
346
|
+
visibility: contactVisibilitySchema,
|
|
278
347
|
});
|
|
279
348
|
/**
|
|
280
349
|
* `PATCH /api/v1/profiles/me/personal` (0.10.0): name, phone and gender. Only
|
|
@@ -297,6 +366,14 @@ export const updateMyPersonalDetailsBodySchema = z.object({
|
|
|
297
366
|
displayName: displayNameSchema.optional(),
|
|
298
367
|
phone: phoneSchema.optional(),
|
|
299
368
|
gender: genderSchema.optional(),
|
|
369
|
+
/**
|
|
370
|
+
* The city, or `null` to remove it (0.11.0): it moved to the Personal
|
|
371
|
+
* Details card, so its editor saves it here, with the rest, in one
|
|
372
|
+
* transaction. `PATCH /profiles/me` still takes it too.
|
|
373
|
+
*/
|
|
374
|
+
location: locationSchema.nullable().optional(),
|
|
375
|
+
/** Only the switches that changed (0.11.0). */
|
|
376
|
+
visibility: contactVisibilitySchema.partial().optional(),
|
|
300
377
|
});
|
|
301
378
|
// ─── The member's own photo ──────────────────────────────────────────────────
|
|
302
379
|
/**
|