founder-schema 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +29 -0
  2. package/dist/core/common.d.ts +8 -1
  3. package/dist/core/common.d.ts.map +1 -1
  4. package/dist/core/common.js +27 -0
  5. package/dist/core/common.js.map +1 -1
  6. package/dist/core/errors.d.ts +7 -1
  7. package/dist/core/errors.d.ts.map +1 -1
  8. package/dist/core/errors.js +11 -1
  9. package/dist/core/errors.js.map +1 -1
  10. package/dist/core/limits.d.ts +5 -1
  11. package/dist/core/limits.d.ts.map +1 -1
  12. package/dist/core/limits.js +5 -1
  13. package/dist/core/limits.js.map +1 -1
  14. package/dist/core/responses.d.ts +6 -0
  15. package/dist/core/responses.d.ts.map +1 -1
  16. package/dist/domains/contributions/contributions.d.ts +9 -2
  17. package/dist/domains/contributions/contributions.d.ts.map +1 -1
  18. package/dist/domains/contributions/contributions.js +14 -4
  19. package/dist/domains/contributions/contributions.js.map +1 -1
  20. package/dist/domains/feed/feed.d.ts +478 -6
  21. package/dist/domains/feed/feed.d.ts.map +1 -1
  22. package/dist/domains/feed/feed.js +152 -9
  23. package/dist/domains/feed/feed.js.map +1 -1
  24. package/dist/domains/moderation/moderation.d.ts +2 -0
  25. package/dist/domains/moderation/moderation.d.ts.map +1 -1
  26. package/dist/domains/moderation/moderation.js +9 -2
  27. package/dist/domains/moderation/moderation.js.map +1 -1
  28. package/dist/domains/notifications/notifications.d.ts +53 -4
  29. package/dist/domains/notifications/notifications.d.ts.map +1 -1
  30. package/dist/domains/notifications/notifications.js +40 -4
  31. package/dist/domains/notifications/notifications.js.map +1 -1
  32. package/dist/domains/products/products.d.ts +21 -6
  33. package/dist/domains/products/products.d.ts.map +1 -1
  34. package/dist/domains/products/products.js +31 -10
  35. package/dist/domains/products/products.js.map +1 -1
  36. package/dist/domains/profile/founder-profile.d.ts +2 -1
  37. package/dist/domains/profile/founder-profile.d.ts.map +1 -1
  38. package/dist/domains/profile/founder-profile.js +2 -1
  39. package/dist/domains/profile/founder-profile.js.map +1 -1
  40. package/dist/index.d.ts +3 -3
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +3 -3
  43. package/dist/index.js.map +1 -1
  44. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"products.js","sourceRoot":"","sources":["../../../src/domains/products/products.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;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,aAAa,GACd,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,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8B,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 YOUTUBE_HOSTS,\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 most recently listed first\n * top_rated best rated, weighted so a few reviews cannot beat many; only\n * 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(['apps.apple.com'], VALIDATION_MESSAGE.appStoreLinkHost).optional(),\n playStore: httpUrlOnHosts(['play.google.com'], VALIDATION_MESSAGE.playStoreLinkHost).optional(),\n github: httpUrlOnHosts(['github.com'], VALIDATION_MESSAGE.githubLinkHost).optional(),\n});\nexport type ProductLinks = z.infer<typeof productLinksSchema>;\n\n/** A demo video: a YouTube link, played in the page. Video is never uploaded. */\nexport const productVideoUrlSchema = httpUrlOnHosts(\n YOUTUBE_HOSTS,\n 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\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 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 */\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/** Newest 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;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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;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"]}
@@ -79,7 +79,8 @@ export type MemberByline = z.infer<typeof memberBylineSchema>;
79
79
  *
80
80
  * `score` is points earned from OTHER members' recognition only: a product's
81
81
  * team marking your feedback helpful, confirming you tested their product,
82
- * members finding your review helpful, and writing reviews. Nothing a member
82
+ * and members finding your review helpful (writing one earns nothing by
83
+ * itself). Nothing a member
83
84
  * does to their own product counts, so the score cannot be bought by having a
84
85
  * popular one. `helpedCount` is how many different founders recognised that
85
86
  * help ("Helped 12 founders"). See `domains/contributions`.
@@ -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;AA8BxB;;;;;;;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;;;;;;;;;GASG;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;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqD/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,oDAAoD;AACpD,eAAO,MAAM,0BAA0B;;;;;;;iBAKrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAI9E;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;iBAAwC,CAAC;AACzE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -73,7 +73,8 @@ export const memberBylineSchema = z.object({
73
73
  *
74
74
  * `score` is points earned from OTHER members' recognition only: a product's
75
75
  * team marking your feedback helpful, confirming you tested their product,
76
- * members finding your review helpful, and writing reviews. Nothing a member
76
+ * and members finding your review helpful (writing one earns nothing by
77
+ * itself). Nothing a member
77
78
  * does to their own product counts, so the score cannot be bought by having a
78
79
  * popular one. `helpedCount` is how many different founders recognised that
79
80
  * help ("Helped 12 founders"). See `domains/contributions`.
@@ -1 +1 @@
1
- {"version":3,"file":"founder-profile.js","sourceRoot":"","sources":["../../../src/domains/profile/founder-profile.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,UAAU,EACV,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,WAAW,EACX,kBAAkB,EAClB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,gFAAgF;AAEhF;;;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cAAc,EAAE,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/domains/profile\n */\n\nimport { z } from 'zod';\nimport {\n chosenUsernameSchema,\n GOAL_VALUES,\n goalSchema,\n httpUrlSchema,\n industrySchema,\n locationSchema,\n objectIdSchema,\n optionalTrimmedString,\n skillSchema,\n startupStageSchema,\n usernameSchema,\n} from '../../core/common.js';\nimport {\n ABOUT_MAX,\n DISPLAY_NAME_MAX,\n FOUNDED_YEAR_MIN,\n HEADLINE_MAX,\n SKILLS_MAX,\n TEAM_SIZE_MAX,\n TEAM_SIZE_MIN,\n VENTURE_NAME_MAX,\n VENTURE_TAGLINE_MAX,\n} from '../../core/limits.js';\nimport { VALIDATION_MESSAGE } from '../../core/validation.js';\nimport { mediaImageSchema } from '../media/media.js';\n\n// ─── Venture ─────────────────────────────────────────────────────────────────\n\n/**\n * ⚠ NUMBERS ARE NUMBERS, never coerced. This is a BODY, which arrives as JSON\n * and already carries types. `z.coerce.number()` here accepted `teamSize: true`\n * as 1 and `\" \"` as 0, and made the schema's input type `unknown`, so a form\n * typed against it could put anything in the field. Coercion belongs to query\n * strings, where everything is text; a form converts its text input before it\n * builds the body.\n */\nexport const ventureSchema = z.object({\n name: z.string().trim().min(1).max(VENTURE_NAME_MAX),\n tagline: optionalTrimmedString(VENTURE_TAGLINE_MAX),\n website: httpUrlSchema.optional(),\n industry: industrySchema,\n stage: startupStageSchema,\n /** Team size including the founder. Optional: a solo pre-idea founder has none to report. */\n teamSize: z.number().int().min(TEAM_SIZE_MIN).max(TEAM_SIZE_MAX).optional(),\n /**\n * Not in the future. The bound is read per parse, never captured once.\n *\n * `.max(new Date().getUTCFullYear())` looks equivalent and is not: it is\n * evaluated when this module is imported, so a server process still up on\n * 1 January rejects the new year until somebody restarts it. The backend's\n * Mongoose model deliberately carries no upper bound for the same reason, a\n * `max` there being frozen at schema construction. This is where the ceiling\n * lives.\n */\n foundedYear: z\n .number()\n .int()\n .min(FOUNDED_YEAR_MIN)\n .refine((year) => year <= new Date().getUTCFullYear(), {\n error: VALIDATION_MESSAGE.foundedYearFuture,\n })\n .optional(),\n});\nexport type Venture = z.infer<typeof ventureSchema>;\n\n// ─── A member as other surfaces name them ────────────────────────────────────\n\n/**\n * A member as a byline renders them: on a post (`feedAuthorSchema` is this), a\n * product's team, a review, a notification, the top-helpers list.\n *\n * Every field is LIVE, joined against the profile at read time rather than\n * frozen onto the post or review at write time. So a renamed handle, a new\n * photo or an edited headline updates everywhere, the link always targets the\n * current username, and nothing personal survives in other people's rows once\n * an account is deleted.\n */\nexport const memberBylineSchema = z.object({\n userId: z.string(),\n username: usernameSchema,\n displayName: z.string(),\n /** Server-generated or from the login provider, never member-typed, so a\n * plain URL check. Same reasoning as `avatarUrl` on the profile. */\n avatarUrl: z.url().optional(),\n /** The member's one-line headline, live-joined. */\n headline: z.string().optional(),\n});\nexport type MemberByline = z.infer<typeof memberBylineSchema>;\n\n/**\n * What a member has given the community, on their profile and card.\n *\n * `score` is points earned from OTHER members' recognition only: a product's\n * team marking your feedback helpful, confirming you tested their product,\n * members finding your review helpful, and writing reviews. Nothing a member\n * does to their own product counts, so the score cannot be bought by having a\n * popular one. `helpedCount` is how many different founders recognised that\n * help (\"Helped 12 founders\"). See `domains/contributions`.\n */\nexport const contributionSummarySchema = z.object({\n score: z.number().int().nonnegative(),\n helpedCount: z.number().int().nonnegative(),\n});\nexport type ContributionSummary = z.infer<typeof contributionSummarySchema>;\n\n// ─── Profile ─────────────────────────────────────────────────────────────────\n\n/**\n * The founder's off-platform links. ONE shape: onboarding's contact step picks\n * its three from this, so a link one side knows can never be missing on the\n * other. (It was written twice until 0.2.0, and the profile side lacked\n * Instagram, which onboarding collected.)\n *\n * Defined without a default, because the read side wants one and the write\n * side must not have one; each adds its own.\n */\nexport const founderLinksSchema = z.object({\n linkedin: httpUrlSchema.optional(),\n x: httpUrlSchema.optional(),\n instagram: httpUrlSchema.optional(),\n github: httpUrlSchema.optional(),\n website: httpUrlSchema.optional(),\n});\nexport type FounderLinks = z.infer<typeof founderLinksSchema>;\n\n/**\n * The profile as the owner sees it. A peer sees the redacted projection\n * (`founderCardSchema`), which is built on the server and never by dropping\n * fields on the client.\n */\nexport const founderProfileSchema = z.object({\n id: z.string(),\n userId: z.string(),\n username: usernameSchema,\n displayName: z.string().trim().min(1).max(DISPLAY_NAME_MAX),\n headline: optionalTrimmedString(HEADLINE_MAX),\n about: optionalTrimmedString(ABOUT_MAX),\n /**\n * Plain `z.url()`, NOT `httpUrlSchema`, and the difference is deliberate.\n *\n * No member can write this field: it appears in no write body, and\n * `public-surface.test.ts` asserts that and will fail the day somebody adds it\n * to a form. So the scheme restriction would be defending a field that takes\n * no member input, while refusing hosts we legitimately serve avatars from,\n * our own dev host among them. A read schema that rejects our own response is\n * a self-inflicted outage.\n *\n * ⚠️ That argument holds only while nothing member-supplied reaches this\n * field. Two sources write an avatar today and NEITHER is a member typing a\n * URL: our own upload path, and the central-auth `user.created` /\n * `user.updated` webhook, which carries the Google OAuth picture. If a\n * \"paste a link to your photo\" control is ever added, this goes back to\n * `httpUrlSchema` and the ruling behind it is void.\n *\n * WHICH picture: the member's uploaded photo at its small size (192, see\n * `MEDIA_SIZES.avatar`), else their sign-in provider's picture, else absent.\n * Every surface that shows this member resolves it the same way.\n */\n avatarUrl: z.url().optional(),\n /**\n * The uploaded photo itself, every size, when the member has one. Absent\n * means `avatarUrl` (if any) is the sign-in provider's picture, so a client\n * offers \"Remove photo\" only when this is present. Not on `founderCardSchema`:\n * a card needs one small picture, not the set.\n */\n avatar: mediaImageSchema.optional(),\n location: locationSchema.optional(),\n venture: ventureSchema.optional(),\n skills: z.array(skillSchema).max(SKILLS_MAX).default([]),\n goals: z.array(goalSchema).max(GOAL_VALUES.length).default([]),\n links: founderLinksSchema.default({}),\n /**\n * Their contribution to other founders. Server-computed, never written by a\n * member. REQUIRED, no default: a read-side default would let a server that\n * forgot the field pass as a real zero.\n */\n contribution: contributionSummarySchema,\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 /**\n * The MEMBER's id (0.6.0): what a team invitation, a chat and every byline\n * key on. `id` is the profile's own id, which nothing takes as input.\n */\n userId: 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 contribution: true,\n});\nexport type FounderCard = z.infer<typeof founderCardSchema>;\n\n// ─── Write bodies ────────────────────────────────────────────────────────────\n\n/**\n * A text field the member is allowed to empty.\n *\n * Three states, and they are deliberately distinct:\n * absent do not touch this field\n * null clear it (the backend turns this into an `$unset`)\n * \"\" REJECTED\n *\n * The empty string is refused on purpose. A form that forgets to convert a\n * cleared input to `null` then fails loudly at the boundary, instead of being\n * silently dropped and leaving the member staring at text they just deleted.\n * `optionalTrimmedString` does the dropping, which is right for a create body\n * and wrong for a patch.\n */\nconst clearableText = (maxLength: number) =>\n z.string().trim().min(1, VALIDATION_MESSAGE.clearWithNull).max(maxLength).nullable().optional();\n\n/**\n * Patch body for the Me tab. Only the keys the member actually changed.\n *\n * ⚠️ Written as its own object ON PURPOSE. Do NOT rebuild it as\n * `founderProfileSchema.pick({...}).partial()`: `.partial()` does not switch\n * off `.default()`, so `skills`, `goals` and `links` would materialise as\n * `[]`, `[]` and `{}` on every request, including an empty one. Under a `$set`\n * that wipes a member's skills and every one of their links the moment they\n * edit their display name. `tsc` cannot see it and the request looks correct in\n * the network tab.\n *\n * The rule this comes from: defaults belong on the READ side. A write body\n * states what the caller sent and nothing else.\n */\nexport const updateFounderProfileBodySchema = z.object({\n displayName: z.string().trim().min(1).max(DISPLAY_NAME_MAX).optional(),\n headline: clearableText(HEADLINE_MAX),\n about: clearableText(ABOUT_MAX),\n /** Carries the whole location; `locationSchema` has no default to fill a gap. */\n location: locationSchema.optional(),\n venture: ventureSchema.optional(),\n skills: z.array(skillSchema).max(SKILLS_MAX).optional(),\n goals: z.array(goalSchema).max(GOAL_VALUES.length).optional(),\n /** Sent whole. To drop one link, send the object without that key. */\n links: founderLinksSchema.optional(),\n});\nexport type UpdateFounderProfileBody = z.infer<typeof updateFounderProfileBodySchema>;\n\n/**\n * Username change. Separate from the profile patch because it needs a\n * uniqueness check, and it refuses a reserved handle (`chosenUsernameSchema`).\n */\nexport const updateUsernameBodySchema = z.object({ username: chosenUsernameSchema });\nexport type UpdateUsernameBody = z.infer<typeof updateUsernameBodySchema>;\n\n/** Availability probe behind the username field. */\nexport const usernameAvailabilitySchema = z.object({\n username: usernameSchema,\n available: z.boolean(),\n /** Present when unavailable: `taken` or `reserved`. */\n reason: z.enum(['taken', 'reserved']).optional(),\n});\nexport type UsernameAvailability = z.infer<typeof usernameAvailabilitySchema>;\n\n// ─── The member's own photo ──────────────────────────────────────────────────\n\n/**\n * `PUT /api/v1/profiles/me/avatar`: use a completed upload (purpose `avatar`)\n * as the member's photo. Answers with the updated `founderProfileSchema`.\n *\n * The previous photo is deleted from storage, not merely unlinked, so its old\n * address stops working. `DELETE /api/v1/profiles/me/avatar` removes the photo\n * the same way and the member falls back to their sign-in provider's picture.\n */\nexport const setAvatarBodySchema = z.object({ mediaId: objectIdSchema });\nexport type SetAvatarBody = z.infer<typeof setAvatarBodySchema>;\n"]}
1
+ {"version":3,"file":"founder-profile.js","sourceRoot":"","sources":["../../../src/domains/profile/founder-profile.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE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BAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC,CAAC;AAGrF,oDAAoD;AACpD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,QAAQ,EAAE,cAAc;IACxB,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,uDAAuD;IACvD,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC;AAGH,gFAAgF;AAEhF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,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/domains/profile\n */\n\nimport { z } from 'zod';\nimport {\n chosenUsernameSchema,\n GOAL_VALUES,\n goalSchema,\n httpUrlSchema,\n industrySchema,\n locationSchema,\n objectIdSchema,\n optionalTrimmedString,\n skillSchema,\n startupStageSchema,\n usernameSchema,\n} from '../../core/common.js';\nimport {\n ABOUT_MAX,\n DISPLAY_NAME_MAX,\n FOUNDED_YEAR_MIN,\n HEADLINE_MAX,\n SKILLS_MAX,\n TEAM_SIZE_MAX,\n TEAM_SIZE_MIN,\n VENTURE_NAME_MAX,\n VENTURE_TAGLINE_MAX,\n} from '../../core/limits.js';\nimport { VALIDATION_MESSAGE } from '../../core/validation.js';\nimport { mediaImageSchema } from '../media/media.js';\n\n// ─── Venture ─────────────────────────────────────────────────────────────────\n\n/**\n * ⚠ NUMBERS ARE NUMBERS, never coerced. This is a BODY, which arrives as JSON\n * and already carries types. `z.coerce.number()` here accepted `teamSize: true`\n * as 1 and `\" \"` as 0, and made the schema's input type `unknown`, so a form\n * typed against it could put anything in the field. Coercion belongs to query\n * strings, where everything is text; a form converts its text input before it\n * builds the body.\n */\nexport const ventureSchema = z.object({\n name: z.string().trim().min(1).max(VENTURE_NAME_MAX),\n tagline: optionalTrimmedString(VENTURE_TAGLINE_MAX),\n website: httpUrlSchema.optional(),\n industry: industrySchema,\n stage: startupStageSchema,\n /** Team size including the founder. Optional: a solo pre-idea founder has none to report. */\n teamSize: z.number().int().min(TEAM_SIZE_MIN).max(TEAM_SIZE_MAX).optional(),\n /**\n * Not in the future. The bound is read per parse, never captured once.\n *\n * `.max(new Date().getUTCFullYear())` looks equivalent and is not: it is\n * evaluated when this module is imported, so a server process still up on\n * 1 January rejects the new year until somebody restarts it. The backend's\n * Mongoose model deliberately carries no upper bound for the same reason, a\n * `max` there being frozen at schema construction. This is where the ceiling\n * lives.\n */\n foundedYear: z\n .number()\n .int()\n .min(FOUNDED_YEAR_MIN)\n .refine((year) => year <= new Date().getUTCFullYear(), {\n error: VALIDATION_MESSAGE.foundedYearFuture,\n })\n .optional(),\n});\nexport type Venture = z.infer<typeof ventureSchema>;\n\n// ─── A member as other surfaces name them ────────────────────────────────────\n\n/**\n * A member as a byline renders them: on a post (`feedAuthorSchema` is this), a\n * product's team, a review, a notification, the top-helpers list.\n *\n * Every field is LIVE, joined against the profile at read time rather than\n * frozen onto the post or review at write time. So a renamed handle, a new\n * photo or an edited headline updates everywhere, the link always targets the\n * current username, and nothing personal survives in other people's rows once\n * an account is deleted.\n */\nexport const memberBylineSchema = z.object({\n userId: z.string(),\n username: usernameSchema,\n displayName: z.string(),\n /** Server-generated or from the login provider, never member-typed, so a\n * plain URL check. Same reasoning as `avatarUrl` on the profile. */\n avatarUrl: z.url().optional(),\n /** The member's one-line headline, live-joined. */\n headline: z.string().optional(),\n});\nexport type MemberByline = z.infer<typeof memberBylineSchema>;\n\n/**\n * What a member has given the community, on their profile and card.\n *\n * `score` is points earned from OTHER members' recognition only: a product's\n * team marking your feedback helpful, confirming you tested their product,\n * and members finding your review helpful (writing one earns nothing by\n * itself). Nothing a member\n * does to their own product counts, so the score cannot be bought by having a\n * popular one. `helpedCount` is how many different founders recognised that\n * help (\"Helped 12 founders\"). See `domains/contributions`.\n */\nexport const contributionSummarySchema = z.object({\n score: z.number().int().nonnegative(),\n helpedCount: z.number().int().nonnegative(),\n});\nexport type ContributionSummary = z.infer<typeof contributionSummarySchema>;\n\n// ─── Profile ─────────────────────────────────────────────────────────────────\n\n/**\n * The founder's off-platform links. ONE shape: onboarding's contact step picks\n * its three from this, so a link one side knows can never be missing on the\n * other. (It was written twice until 0.2.0, and the profile side lacked\n * Instagram, which onboarding collected.)\n *\n * Defined without a default, because the read side wants one and the write\n * side must not have one; each adds its own.\n */\nexport const founderLinksSchema = z.object({\n linkedin: httpUrlSchema.optional(),\n x: httpUrlSchema.optional(),\n instagram: httpUrlSchema.optional(),\n github: httpUrlSchema.optional(),\n website: httpUrlSchema.optional(),\n});\nexport type FounderLinks = z.infer<typeof founderLinksSchema>;\n\n/**\n * The profile as the owner sees it. A peer sees the redacted projection\n * (`founderCardSchema`), which is built on the server and never by dropping\n * fields on the client.\n */\nexport const founderProfileSchema = z.object({\n id: z.string(),\n userId: z.string(),\n username: usernameSchema,\n displayName: z.string().trim().min(1).max(DISPLAY_NAME_MAX),\n headline: optionalTrimmedString(HEADLINE_MAX),\n about: optionalTrimmedString(ABOUT_MAX),\n /**\n * Plain `z.url()`, NOT `httpUrlSchema`, and the difference is deliberate.\n *\n * No member can write this field: it appears in no write body, and\n * `public-surface.test.ts` asserts that and will fail the day somebody adds it\n * to a form. So the scheme restriction would be defending a field that takes\n * no member input, while refusing hosts we legitimately serve avatars from,\n * our own dev host among them. A read schema that rejects our own response is\n * a self-inflicted outage.\n *\n * ⚠️ That argument holds only while nothing member-supplied reaches this\n * field. Two sources write an avatar today and NEITHER is a member typing a\n * URL: our own upload path, and the central-auth `user.created` /\n * `user.updated` webhook, which carries the Google OAuth picture. If a\n * \"paste a link to your photo\" control is ever added, this goes back to\n * `httpUrlSchema` and the ruling behind it is void.\n *\n * WHICH picture: the member's uploaded photo at its small size (192, see\n * `MEDIA_SIZES.avatar`), else their sign-in provider's picture, else absent.\n * Every surface that shows this member resolves it the same way.\n */\n avatarUrl: z.url().optional(),\n /**\n * The uploaded photo itself, every size, when the member has one. Absent\n * means `avatarUrl` (if any) is the sign-in provider's picture, so a client\n * offers \"Remove photo\" only when this is present. Not on `founderCardSchema`:\n * a card needs one small picture, not the set.\n */\n avatar: mediaImageSchema.optional(),\n location: locationSchema.optional(),\n venture: ventureSchema.optional(),\n skills: z.array(skillSchema).max(SKILLS_MAX).default([]),\n goals: z.array(goalSchema).max(GOAL_VALUES.length).default([]),\n links: founderLinksSchema.default({}),\n /**\n * Their contribution to other founders. Server-computed, never written by a\n * member. REQUIRED, no default: a read-side default would let a server that\n * forgot the field pass as a real zero.\n */\n contribution: contributionSummarySchema,\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 /**\n * The MEMBER's id (0.6.0): what a team invitation, a chat and every byline\n * key on. `id` is the profile's own id, which nothing takes as input.\n */\n userId: 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 contribution: true,\n});\nexport type FounderCard = z.infer<typeof founderCardSchema>;\n\n// ─── Write bodies ────────────────────────────────────────────────────────────\n\n/**\n * A text field the member is allowed to empty.\n *\n * Three states, and they are deliberately distinct:\n * absent do not touch this field\n * null clear it (the backend turns this into an `$unset`)\n * \"\" REJECTED\n *\n * The empty string is refused on purpose. A form that forgets to convert a\n * cleared input to `null` then fails loudly at the boundary, instead of being\n * silently dropped and leaving the member staring at text they just deleted.\n * `optionalTrimmedString` does the dropping, which is right for a create body\n * and wrong for a patch.\n */\nconst clearableText = (maxLength: number) =>\n z.string().trim().min(1, VALIDATION_MESSAGE.clearWithNull).max(maxLength).nullable().optional();\n\n/**\n * Patch body for the Me tab. Only the keys the member actually changed.\n *\n * ⚠️ Written as its own object ON PURPOSE. Do NOT rebuild it as\n * `founderProfileSchema.pick({...}).partial()`: `.partial()` does not switch\n * off `.default()`, so `skills`, `goals` and `links` would materialise as\n * `[]`, `[]` and `{}` on every request, including an empty one. Under a `$set`\n * that wipes a member's skills and every one of their links the moment they\n * edit their display name. `tsc` cannot see it and the request looks correct in\n * the network tab.\n *\n * The rule this comes from: defaults belong on the READ side. A write body\n * states what the caller sent and nothing else.\n */\nexport const updateFounderProfileBodySchema = z.object({\n displayName: z.string().trim().min(1).max(DISPLAY_NAME_MAX).optional(),\n headline: clearableText(HEADLINE_MAX),\n about: clearableText(ABOUT_MAX),\n /** Carries the whole location; `locationSchema` has no default to fill a gap. */\n location: locationSchema.optional(),\n venture: ventureSchema.optional(),\n skills: z.array(skillSchema).max(SKILLS_MAX).optional(),\n goals: z.array(goalSchema).max(GOAL_VALUES.length).optional(),\n /** Sent whole. To drop one link, send the object without that key. */\n links: founderLinksSchema.optional(),\n});\nexport type UpdateFounderProfileBody = z.infer<typeof updateFounderProfileBodySchema>;\n\n/**\n * Username change. Separate from the profile patch because it needs a\n * uniqueness check, and it refuses a reserved handle (`chosenUsernameSchema`).\n */\nexport const updateUsernameBodySchema = z.object({ username: chosenUsernameSchema });\nexport type UpdateUsernameBody = z.infer<typeof updateUsernameBodySchema>;\n\n/** Availability probe behind the username field. */\nexport const usernameAvailabilitySchema = z.object({\n username: usernameSchema,\n available: z.boolean(),\n /** Present when unavailable: `taken` or `reserved`. */\n reason: z.enum(['taken', 'reserved']).optional(),\n});\nexport type UsernameAvailability = z.infer<typeof usernameAvailabilitySchema>;\n\n// ─── The member's own photo ──────────────────────────────────────────────────\n\n/**\n * `PUT /api/v1/profiles/me/avatar`: use a completed upload (purpose `avatar`)\n * as the member's photo. Answers with the updated `founderProfileSchema`.\n *\n * The previous photo is deleted from storage, not merely unlinked, so its old\n * address stops working. `DELETE /api/v1/profiles/me/avatar` removes the photo\n * the same way and the member falls back to their sign-in provider's picture.\n */\nexport const setAvatarBodySchema = z.object({ mediaId: objectIdSchema });\nexport type SetAvatarBody = z.infer<typeof setAvatarBodySchema>;\n"]}
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@
11
11
  export { type ChangeMpinBody, changeMpinBodySchema, type MeAccessResponse, MPIN_LENGTH, MPIN_LOCK_MS, MPIN_MAX_ATTEMPTS, meAccessResponseSchema, mpinSchema, type SetMpinBody, type SwitchRoleBody, setMpinBodySchema, switchRoleBodySchema, } from './access/access.js';
12
12
  export { ACTION_VALUES, type Action, type AppAbility, actionSchema, type PackedRules, packedRulesSchema, SUBJECT_VALUES, type Subject, type SubjectFields, type SubjectInstance, subjectSchema, } from './access/permissions.js';
13
13
  export { ACTIVE_ROLE_TTL_MS, canGrantRole, isPlatformRole, MEMBER_ROLE, PLATFORM_ROLE_VALUES, type PlatformRole, platformRoleSchema, ROLE_GRANTED_BY, ROLE_VALUES, type Role, roleSchema, } from './access/roles.js';
14
- export { type CoordinatesQuery, type CoordinatesQueryInput, chosenUsernameSchema, coordinatesQuerySchema, emptyStringToUndefined, type FounderLocation, GENDER_VALUES, type Gender, GOAL_VALUES, type Goal, genderSchema, goalSchema, type HttpUrl, httpUrlOnHosts, httpUrlSchema, INDUSTRY_VALUES, type Industry, industrySchema, isReservedUsername, isUrlOnHost, locationSchema, multiValueQuery, type ObjectIdString, objectIdSchema, optionalTrimmedString, type PaginationQuery, type PaginationQueryInput, type Phone, paginationQuerySchema, phoneSchema, RESERVED_USERNAMES, type SafeUrl, SKILL_VALUES, type Skill, STARTUP_STAGE_VALUES, type StartupStage, type SuggestedLocation, safeUrlSchema, skillSchema, startupStageSchema, suggestedLocationSchema, USERNAME_MAX, USERNAME_MIN, type Username, usernameSchema, YOUTUBE_HOSTS, } from './core/common.js';
14
+ export { type CoordinatesQuery, type CoordinatesQueryInput, chosenUsernameSchema, coordinatesQuerySchema, emptyStringToUndefined, type FounderLocation, GENDER_VALUES, type Gender, GOAL_VALUES, type Goal, genderSchema, goalSchema, type HttpUrl, httpUrlOnHosts, httpUrlSchema, INDUSTRY_VALUES, type Industry, industrySchema, isReservedUsername, isUrlOnHost, locationSchema, multiValueQuery, type ObjectIdString, objectIdSchema, optionalTrimmedString, type PaginationQuery, type PaginationQueryInput, type Phone, paginationQuerySchema, phoneSchema, RESERVED_USERNAMES, type SafeUrl, SKILL_VALUES, type Skill, STARTUP_STAGE_VALUES, type StartupStage, type SuggestedLocation, safeUrlSchema, skillSchema, startupStageSchema, suggestedLocationSchema, USERNAME_MAX, USERNAME_MIN, type Username, usernameSchema, YOUTUBE_HOSTS, youtubeVideoId, } from './core/common.js';
15
15
  export { API_ERROR_CODE, API_ERROR_CODE_VALUES, type ApiErrorCode, apiErrorCodeSchema, } from './core/errors.js';
16
16
  export { ABOUT_MAX, CHAT_PARTICIPANTS_MAX, CITY_MAX, CONTRIBUTION_LEADERBOARD_SIZE, CONTRIBUTION_PAIR_POINTS_MAX, CONTRIBUTION_RECENT_DAYS, COUNTRY_MAX, DISCOVER_FILTER_VALUES_MAX, DISCOVER_TEXT_MAX, DISPLAY_NAME_MAX, FOUNDED_YEAR_MIN, GOALS_MIN, HEADLINE_MAX, LINK_PREVIEW_DESCRIPTION_MAX, LINK_PREVIEW_TITLE_MAX, LINK_URL_MAX, MEDIA_ALT_MAX, MEDIA_MAX_INPUT_PIXELS, MEDIA_PENDING_MAX, MEDIA_PLACEHOLDER_MAX, MEDIA_UNATTACHED_TTL_HOURS, MEMBER_SEARCH_MAX, MODERATION_EXCERPT_MAX, MODERATION_NOTE_MAX, NOTIFICATION_EXCERPT_MAX, NOTIFICATION_RETENTION_DAYS, PAGE_SIZE_DEFAULT, PAGE_SIZE_MAX, PRODUCT_ASK_OPEN_DAYS, PRODUCT_CAPTION_MAX, PRODUCT_DESCRIPTION_MAX, PRODUCT_NAME_MAX, PRODUCT_SCREENSHOTS_MAX, PRODUCT_TAGLINE_MAX, PRODUCT_TEAM_SHOWN, PRODUCTS_OWNED_MAX, REPORT_NOTE_MAX, REVIEW_AVERAGE_MIN_COUNT, REVIEW_HELPFUL_POINTS_MAX, REVIEW_REPLY_MAX, REVIEW_TEXT_MAX, REVIEW_TEXT_MIN, REVIEWS_REWARDED_PER_DAY, SAVED_REPLIES_MAX, SAVED_REPLY_BODY_MAX, SAVED_REPLY_TITLE_MAX, SKILLS_MAX, STATE_MAX, SUSPENSION_REASON_MAX, SUSPENSION_REASON_MIN, TEAM_SIZE_MAX, TEAM_SIZE_MIN, TICKET_MESSAGE_MAX, TICKET_MESSAGES_MAX, TICKET_SUBJECT_MAX, TICKET_SUBJECT_MIN, UPLOAD_MAX_BYTES, VENTURE_NAME_MAX, VENTURE_TAGLINE_MAX, } from './core/limits.js';
17
17
  export { type ApiError, type ApiErrorDetails, apiErrorDetailsSchema, apiErrorSchema, type ErrorResponse, errorResponseSchema, type IdResponse, idResponseSchema, paginatedSchema, successResponseSchema, } from './core/responses.js';
@@ -19,10 +19,10 @@ export { REQUEST_PART_VALUES, type RequestPart, requestPartSchema, toValidationI
19
19
  export { type DeleteAccountResponse, deleteAccountResponseSchema, } from './domains/account/account.js';
20
20
  export { AUDIT_ACTION_VALUES, type AuditAction, type AuditActor, type AuditEntry, type AuditPage, auditActionSchema, auditActorSchema, auditEntrySchema, auditPageSchema, } from './domains/audit/audit.js';
21
21
  export { CHAT_PRODUCT_ID, CHAT_SOCKET_REAUTH_SECONDS, CHAT_TOKEN_REFRESH_MARGIN_SECONDS, type ChatAuthToken, type ChatConfig, type ChatInvitation, type ChatInvitationBody, type ChatParticipant, type ChatParticipantsBody, type ChatParticipantsResponse, type ChatProductId, chatAuthTokenSchema, chatConfigSchema, chatInvitationBodySchema, chatInvitationSchema, chatParticipantSchema, chatParticipantsBodySchema, chatParticipantsResponseSchema, chatProductIdSchema, type OpenChatBody, type OpenChatResponse, openChatBodySchema, openChatResponseSchema, } from './domains/chat/chat.js';
22
- export { CONTRIBUTION_KIND_VALUES, CONTRIBUTION_POINTS, type ContributionEntry, type ContributionKind, type ContributionLeaderboard, type ContributionLeaderEntry, type ContributionPage, contributionEntrySchema, contributionKindSchema, contributionLeaderboardSchema, contributionLeaderEntrySchema, contributionPageSchema, } from './domains/contributions/contributions.js';
22
+ export { CONTRIBUTION_AWARDED_KIND_VALUES, CONTRIBUTION_KIND_VALUES, CONTRIBUTION_POINTS, type ContributionEntry, type ContributionKind, type ContributionLeaderboard, type ContributionLeaderEntry, type ContributionPage, contributionEntrySchema, contributionKindSchema, contributionLeaderboardSchema, contributionLeaderEntrySchema, contributionPageSchema, } from './domains/contributions/contributions.js';
23
23
  export { type Dashboard, dashboardSchema } from './domains/dashboard/dashboard.js';
24
24
  export { type DiscoverFacets, type DiscoverPage, type DiscoverQuery, type DiscoverQueryInput, discoverFacetsSchema, discoverPageSchema, discoverQuerySchema, } from './domains/discover/discover.js';
25
- export { type AttachedMedia, type AuthorParams, attachedMediaSchema, authorParamsSchema, type CastVoteBody, type CastVoteResponse, COMMENT_MAX_BODY_CHARS, CONTENT_KIND_VALUES, type CommentHelpfulResponse, type CommentPage, type CommentParams, type CommentsQuery, type CommentsQueryInput, type ContentKind, type ContentParams, type ContentTargetParams, type CreateCommentBody, type CreatePollBody, type CreatePostBody, type CreateReportBody, type CreateReportResponse, castVoteBodySchema, castVoteResponseSchema, commentHelpfulResponseSchema, commentPageSchema, commentParamsSchema, commentsQuerySchema, contentKindSchema, contentParamsSchema, contentTargetParamsSchema, createCommentBodySchema, createPollBodySchema, createPostBodySchema, createReportBodySchema, createReportResponseSchema, EDIT_WINDOW_MS, ENGAGEMENT_TARGET_KIND_VALUES, type EngagementTargetKind, type EngagementTargetParams, engagementTargetKindSchema, engagementTargetParamsSchema, FEED_SORT_VALUES, type FeedAuthor, type FeedComment, type FeedImage, type FeedItem, type FeedItemParams, type FeedMedia, type FeedPage, type FeedPoll, type FeedPost, type FeedQuery, type FeedQueryInput, type FeedSort, type FeedVideo, feedAuthorSchema, feedCommentSchema, feedImageSchema, feedItemParamsSchema, feedItemSchema, feedMediaSchema, feedPageSchema, feedPollSchema, feedPostSchema, feedQuerySchema, feedSortSchema, feedVideoSchema, type LinkPreview, linkPreviewSchema, MAX_TOPICS, POLL_MAX_DURATION_MS, POLL_MAX_OPTIONS, POLL_MIN_DURATION_MS, POLL_MIN_OPTIONS, POLL_OPTION_MAX_CHARS, POLL_QUESTION_MAX_CHARS, POST_MAX_BODY_CHARS, POST_MAX_MEDIA, type PollOption, type PollParams, type ProductFeedbackItem, type ProductFeedbackPage, pollOptionSchema, pollParamsSchema, productFeedbackItemSchema, productFeedbackPageSchema, REACTION_TYPE_VALUES, REPORT_REASON_VALUES, REPORT_TARGET_KIND_VALUES, type ReactionCounts, type ReactionType, type ReportReason, type ReportTargetKind, reactionCountsSchema, reactionTypeSchema, reportReasonSchema, reportTargetKindSchema, type SetReactionBody, type SetReactionResponse, setReactionBodySchema, setReactionResponseSchema, type ToggleBookmarkResponse, toggleBookmarkResponseSchema, type UpdateCommentBody, type UpdatePostBody, updateCommentBodySchema, updatePostBodySchema, type ViewerState, viewerStateSchema, } from './domains/feed/feed.js';
25
+ export { type AttachedMedia, type AuthorParams, attachedMediaSchema, authorParamsSchema, type CastVoteBody, type CastVoteResponse, COMMENT_MAX_BODY_CHARS, CONTENT_KIND_VALUES, type CommentHelpfulResponse, type CommentPage, type CommentParams, type CommentsQuery, type CommentsQueryInput, type ContentKind, type ContentParams, type ContentTargetParams, type ContentViewerState, type CreateCommentBody, type CreatePollBody, type CreatePostBody, type CreateReportBody, type CreateReportResponse, type CreateRepostBody, castVoteBodySchema, castVoteResponseSchema, commentHelpfulResponseSchema, commentPageSchema, commentParamsSchema, commentsQuerySchema, contentKindSchema, contentParamsSchema, contentTargetParamsSchema, contentViewerStateSchema, createCommentBodySchema, createPollBodySchema, createPostBodySchema, createReportBodySchema, createReportResponseSchema, createRepostBodySchema, EDIT_WINDOW_MS, ENGAGEMENT_TARGET_KIND_VALUES, type EngagementTargetKind, type EngagementTargetParams, engagementTargetKindSchema, engagementTargetParamsSchema, FEED_SORT_VALUES, type FeedAuthor, type FeedComment, type FeedImage, type FeedItem, type FeedItemParams, type FeedMedia, type FeedPage, type FeedPoll, type FeedPost, type FeedQuery, type FeedQueryInput, type FeedSort, type FeedVideo, feedAuthorSchema, feedCommentSchema, feedImageSchema, feedItemParamsSchema, feedItemSchema, feedMediaSchema, feedPageSchema, feedPollSchema, feedPostSchema, feedQuerySchema, feedSortSchema, feedVideoSchema, type LinkPreview, linkPreviewSchema, MAX_TOPICS, type PickableReaction, POLL_MAX_DURATION_MS, POLL_MAX_OPTIONS, POLL_MIN_DURATION_MS, POLL_MIN_OPTIONS, POLL_OPTION_MAX_CHARS, POLL_QUESTION_MAX_CHARS, POST_MAX_BODY_CHARS, POST_MAX_MEDIA, type PollOption, type PollParams, type ProductFeedbackItem, type ProductFeedbackPage, pickableReactionSchema, pollOptionSchema, pollParamsSchema, productFeedbackItemSchema, productFeedbackPageSchema, REACTION_PICKER_VALUES, REACTION_TYPE_VALUES, REPORT_REASON_VALUES, REPORT_TARGET_KIND_VALUES, type ReactionCounts, type ReactionsQuery, type ReactionsQueryInput, type ReactionType, type Reactor, type ReactorPage, type ReportReason, type ReportTargetKind, type RepostedSource, reactionCountsSchema, reactionsQuerySchema, reactionTypeSchema, reactorPageSchema, reactorSchema, reportReasonSchema, reportTargetKindSchema, repostedSourceSchema, type SetReactionBody, type SetReactionResponse, setReactionBodySchema, setReactionResponseSchema, type ToggleBookmarkResponse, toggleBookmarkResponseSchema, type UpdateCommentBody, type UpdatePostBody, updateCommentBodySchema, updatePostBodySchema, type ViewerState, viewerStateSchema, } from './domains/feed/feed.js';
26
26
  export { MEDIA_PURPOSE_VALUES, MEDIA_SIZES, MEDIA_UPLOAD_CONTENT_TYPES, MEDIA_VARIANTS_MAX, type MediaImage, type MediaPurpose, type MediaUploadContentType, type MediaVariant, mediaImageSchema, mediaPurposeSchema, mediaUploadContentTypeSchema, mediaVariantSchema, type UploadedMedia, uploadedMediaSchema, } from './domains/media/media.js';
27
27
  export { MEMBER_STATUS_VALUES, type MemberDetail, type MemberDirectoryPage, type MemberDirectoryQuery, type MemberDirectoryQueryInput, type MemberParams, type MemberStatus, type MemberSummary, memberDetailSchema, memberDirectoryPageSchema, memberDirectoryQuerySchema, memberParamsSchema, memberStatusSchema, memberSummarySchema, type SuspendMemberBody, type Suspension, suspendMemberBodySchema, suspensionSchema, } from './domains/members/members.js';
28
28
  export { MODERATION_ACTION_VALUES, MODERATION_ACTIONS_BY_TARGET_KIND, MODERATION_CONTEXT_KIND_VALUES, MODERATION_STATE_VALUES, type ModerationAction, type ModerationContentQuery, type ModerationContentQueryInput, type ModerationContextKind, type ModerationDecisionBody, type ModerationItem, type ModerationPage, type ModerationState, type ModerationTargetParams, moderationActionSchema, moderationContentQuerySchema, moderationContextKindSchema, moderationDecisionBodySchema, moderationItemSchema, moderationPageSchema, moderationStateSchema, moderationTargetParamsSchema, } from './domains/moderation/moderation.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,KAAK,cAAc,EACnB,oBAAoB,EACpB,KAAK,gBAAgB,EACrB,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,aAAa,EACb,KAAK,MAAM,EACX,KAAK,UAAU,EACf,YAAY,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EACf,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,KAAK,cAAc,EACnB,oBAAoB,EACpB,KAAK,gBAAgB,EACrB,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,aAAa,EACb,KAAK,MAAM,EACX,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,WAAW,EAChB,iBAAiB,EACjB,cAAc,EACd,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,KAAK,YAAY,EACjB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,KAAK,IAAI,EACT,UAAU,GACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,KAAK,eAAe,EACpB,aAAa,EACb,KAAK,MAAM,EACX,WAAW,EACX,KAAK,IAAI,EACT,YAAY,EACZ,UAAU,EACV,KAAK,OAAO,EACZ,cAAc,EACd,aAAa,EACb,eAAe,EACf,KAAK,QAAQ,EACb,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,eAAe,EACf,KAAK,cAAc,EACnB,cAAc,EACd,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,KAAK,EACV,qBAAqB,EACrB,WAAW,EACX,kBAAkB,EAClB,KAAK,O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,EACnB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,wBAAwB,EACxB,4BAA4B,EAC5B,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,GACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,wBAAwB,EACxB,eAAe,EACf,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,8BAA8B,CAAC"}
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ export { changeMpinBodySchema, MPIN_LENGTH, MPIN_LOCK_MS, MPIN_MAX_ATTEMPTS, meA
13
13
  export { ACTION_VALUES, actionSchema, packedRulesSchema, SUBJECT_VALUES, subjectSchema, } from './access/permissions.js';
14
14
  export { ACTIVE_ROLE_TTL_MS, canGrantRole, isPlatformRole, MEMBER_ROLE, PLATFORM_ROLE_VALUES, platformRoleSchema, ROLE_GRANTED_BY, ROLE_VALUES, roleSchema, } from './access/roles.js';
15
15
  // ─── Common helpers and enums ────────────────────────────────────────────────
16
- export { chosenUsernameSchema, coordinatesQuerySchema, emptyStringToUndefined, GENDER_VALUES, GOAL_VALUES, genderSchema, goalSchema, httpUrlOnHosts, httpUrlSchema, INDUSTRY_VALUES, industrySchema, isReservedUsername, isUrlOnHost, locationSchema, multiValueQuery, objectIdSchema, optionalTrimmedString, paginationQuerySchema, phoneSchema, RESERVED_USERNAMES, SKILL_VALUES, STARTUP_STAGE_VALUES, safeUrlSchema, skillSchema, startupStageSchema, suggestedLocationSchema, USERNAME_MAX, USERNAME_MIN, usernameSchema, YOUTUBE_HOSTS, } from './core/common.js';
16
+ export { chosenUsernameSchema, coordinatesQuerySchema, emptyStringToUndefined, GENDER_VALUES, GOAL_VALUES, genderSchema, goalSchema, httpUrlOnHosts, httpUrlSchema, INDUSTRY_VALUES, industrySchema, isReservedUsername, isUrlOnHost, locationSchema, multiValueQuery, objectIdSchema, optionalTrimmedString, paginationQuerySchema, phoneSchema, RESERVED_USERNAMES, SKILL_VALUES, STARTUP_STAGE_VALUES, safeUrlSchema, skillSchema, startupStageSchema, suggestedLocationSchema, USERNAME_MAX, USERNAME_MIN, usernameSchema, YOUTUBE_HOSTS, youtubeVideoId, } from './core/common.js';
17
17
  // ─── Error codes ─────────────────────────────────────────────────────────────
18
18
  export { API_ERROR_CODE, API_ERROR_CODE_VALUES, apiErrorCodeSchema, } from './core/errors.js';
19
19
  // ─── Limits: every length, size and count, by name ──────────────────────────
@@ -28,13 +28,13 @@ export { AUDIT_ACTION_VALUES, auditActionSchema, auditActorSchema, auditEntrySch
28
28
  // ─── Chat ────────────────────────────────────────────────────────────────────
29
29
  export { CHAT_PRODUCT_ID, CHAT_SOCKET_REAUTH_SECONDS, CHAT_TOKEN_REFRESH_MARGIN_SECONDS, chatAuthTokenSchema, chatConfigSchema, chatInvitationBodySchema, chatInvitationSchema, chatParticipantSchema, chatParticipantsBodySchema, chatParticipantsResponseSchema, chatProductIdSchema, openChatBodySchema, openChatResponseSchema, } from './domains/chat/chat.js';
30
30
  // ─── Contribution: the help a member gives, recognised ───────────────────────
31
- export { CONTRIBUTION_KIND_VALUES, CONTRIBUTION_POINTS, contributionEntrySchema, contributionKindSchema, contributionLeaderboardSchema, contributionLeaderEntrySchema, contributionPageSchema, } from './domains/contributions/contributions.js';
31
+ export { CONTRIBUTION_AWARDED_KIND_VALUES, CONTRIBUTION_KIND_VALUES, CONTRIBUTION_POINTS, contributionEntrySchema, contributionKindSchema, contributionLeaderboardSchema, contributionLeaderEntrySchema, contributionPageSchema, } from './domains/contributions/contributions.js';
32
32
  // ─── Staff: overview, members, moderation, support, the team, the audit log ─
33
33
  export { dashboardSchema } from './domains/dashboard/dashboard.js';
34
34
  // ─── Discover ────────────────────────────────────────────────────────────────
35
35
  export { discoverFacetsSchema, discoverPageSchema, discoverQuerySchema, } from './domains/discover/discover.js';
36
36
  // ─── Feed: post, poll, comment, reaction ─────────────────────────────────────
37
- export { attachedMediaSchema, authorParamsSchema, COMMENT_MAX_BODY_CHARS, CONTENT_KIND_VALUES, castVoteBodySchema, castVoteResponseSchema, commentHelpfulResponseSchema, commentPageSchema, commentParamsSchema, commentsQuerySchema, contentKindSchema, contentParamsSchema, contentTargetParamsSchema, createCommentBodySchema, createPollBodySchema, createPostBodySchema, createReportBodySchema, createReportResponseSchema, EDIT_WINDOW_MS, ENGAGEMENT_TARGET_KIND_VALUES, engagementTargetKindSchema, engagementTargetParamsSchema, FEED_SORT_VALUES, feedAuthorSchema, feedCommentSchema, feedImageSchema, feedItemParamsSchema, feedItemSchema, feedMediaSchema, feedPageSchema, feedPollSchema, feedPostSchema, feedQuerySchema, feedSortSchema, feedVideoSchema, linkPreviewSchema, MAX_TOPICS, POLL_MAX_DURATION_MS, POLL_MAX_OPTIONS, POLL_MIN_DURATION_MS, POLL_MIN_OPTIONS, POLL_OPTION_MAX_CHARS, POLL_QUESTION_MAX_CHARS, POST_MAX_BODY_CHARS, POST_MAX_MEDIA, pollOptionSchema, pollParamsSchema, productFeedbackItemSchema, productFeedbackPageSchema, REACTION_TYPE_VALUES, REPORT_REASON_VALUES, REPORT_TARGET_KIND_VALUES, reactionCountsSchema, reactionTypeSchema, reportReasonSchema, reportTargetKindSchema, setReactionBodySchema, setReactionResponseSchema, toggleBookmarkResponseSchema, updateCommentBodySchema, updatePostBodySchema, viewerStateSchema, } from './domains/feed/feed.js';
37
+ export { attachedMediaSchema, authorParamsSchema, COMMENT_MAX_BODY_CHARS, CONTENT_KIND_VALUES, castVoteBodySchema, castVoteResponseSchema, commentHelpfulResponseSchema, commentPageSchema, commentParamsSchema, commentsQuerySchema, contentKindSchema, contentParamsSchema, contentTargetParamsSchema, contentViewerStateSchema, createCommentBodySchema, createPollBodySchema, createPostBodySchema, createReportBodySchema, createReportResponseSchema, createRepostBodySchema, EDIT_WINDOW_MS, ENGAGEMENT_TARGET_KIND_VALUES, engagementTargetKindSchema, engagementTargetParamsSchema, FEED_SORT_VALUES, feedAuthorSchema, feedCommentSchema, feedImageSchema, feedItemParamsSchema, feedItemSchema, feedMediaSchema, feedPageSchema, feedPollSchema, feedPostSchema, feedQuerySchema, feedSortSchema, feedVideoSchema, linkPreviewSchema, MAX_TOPICS, POLL_MAX_DURATION_MS, POLL_MAX_OPTIONS, POLL_MIN_DURATION_MS, POLL_MIN_OPTIONS, POLL_OPTION_MAX_CHARS, POLL_QUESTION_MAX_CHARS, POST_MAX_BODY_CHARS, POST_MAX_MEDIA, pickableReactionSchema, pollOptionSchema, pollParamsSchema, productFeedbackItemSchema, productFeedbackPageSchema, REACTION_PICKER_VALUES, REACTION_TYPE_VALUES, REPORT_REASON_VALUES, REPORT_TARGET_KIND_VALUES, reactionCountsSchema, reactionsQuerySchema, reactionTypeSchema, reactorPageSchema, reactorSchema, reportReasonSchema, reportTargetKindSchema, repostedSourceSchema, setReactionBodySchema, setReactionResponseSchema, toggleBookmarkResponseSchema, updateCommentBodySchema, updatePostBodySchema, viewerStateSchema, } from './domains/feed/feed.js';
38
38
  // ─── Media: what an uploaded image becomes ──────────────────────────────────
39
39
  export { MEDIA_PURPOSE_VALUES, MEDIA_SIZES, MEDIA_UPLOAD_CONTENT_TYPES, MEDIA_VARIANTS_MAX, mediaImageSchema, mediaPurposeSchema, mediaUploadContentTypeSchema, mediaVariantSchema, uploadedMediaSchema, } from './domains/media/media.js';
40
40
  export { MEMBER_STATUS_VALUES, memberDetailSchema, memberDirectoryPageSchema, memberDirectoryQuerySchema, memberParamsSchema, memberStatusSchema, memberSummarySchema, suspendMemberBodySchema, suspensionSchema, } from './domains/members/members.js';