founder-schema 0.29.0 → 0.30.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.
@@ -130,7 +130,7 @@ export type EngagementTargetKind = z.infer<typeof engagementTargetKindSchema>;
130
130
  * MEMBER themself (`POST /founders/:userId/report`). Each has its own report
131
131
  * route; the answer and the moderation queue use this one list.
132
132
  */
133
- export declare const REPORT_TARGET_KIND_VALUES: readonly ["post", "poll", "comment", "product", "review", "member"];
133
+ export declare const REPORT_TARGET_KIND_VALUES: readonly ["post", "poll", "comment", "product", "review", "member", "product_comment"];
134
134
  export declare const reportTargetKindSchema: z.ZodEnum<{
135
135
  product: "product";
136
136
  member: "member";
@@ -138,6 +138,7 @@ export declare const reportTargetKindSchema: z.ZodEnum<{
138
138
  poll: "poll";
139
139
  comment: "comment";
140
140
  review: "review";
141
+ product_comment: "product_comment";
141
142
  }>;
142
143
  export type ReportTargetKind = z.infer<typeof reportTargetKindSchema>;
143
144
  /**
@@ -3071,6 +3072,7 @@ export declare const createReportResponseSchema: z.ZodObject<{
3071
3072
  poll: "poll";
3072
3073
  comment: "comment";
3073
3074
  review: "review";
3075
+ product_comment: "product_comment";
3074
3076
  }>;
3075
3077
  contentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
3076
3078
  alreadyReported: z.ZodBoolean;
@@ -1 +1 @@
1
- {"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../../../src/domains/feed/feed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,OAAO,CAAC;AACxC;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,sBAAsB,OAAO,C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132
132
  'review',
133
133
  'member',
134
+ // A comment ON a product (2026-11-24, `domains/products/product-comments.ts`).
135
+ 'product_comment',
134
136
  ];
135
137
  export const reportTargetKindSchema = z.enum(REPORT_TARGET_KIND_VALUES);
136
138
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"feed.js","sourceRoot":"","sources":["../../../src/domains/feed/feed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,sBAAsB,EACtB,cAAc,EACd,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,gFAAgF;AAEhF;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AACxC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AACjC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC;AAC5B,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAE3C,MAAM,CAAC,MAAM,uB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Ac;CACrB,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,sBAAsB,CAAC","sourcesContent":["/**\n * founder-schema — Feed wire shapes: post, poll, comment, reaction\n *\n * ADAPTED FROM `jansathi-community-schema`, NOT DEPENDENT ON IT.\n *\n * The user ruled on 2026-09-21 that Founder Circle is a standalone app, so\n * these shapes are copied and cut down rather than imported. The reason is\n * worth keeping: `jansathi-community-schema` encodes Jansathi's reach levels,\n * community designations, official-area kinds and crowdfunding audiences.\n * Depending on it would put all of that permanently inside our contract for a\n * feed that has none of those concepts, and would mean a Jansathi publish can\n * break this product.\n *\n * DELIBERATELY NOT PORTED, so nobody \"restores\" them:\n * - the five civic verticals (lost_found, suggestions_complaints,\n * donate_item, crowdfunding, event). `contentKind` here is post | poll\n * only; comment threads and bookmarks key off it, reactions off the same\n * union plus `comment`, and reports off that plus a product and a review\n * (`reportTargetKindSchema`, 0.6.0).\n * - official communities, designations, identity verification badges.\n * - social score, and the whole area-proximity ranking vocabulary\n * (local / district / state / national / global).\n * - `areaLineage` as a REQUIRED authorship snapshot. Jansathi gates its\n * composer on a declared residence resolving to Indian district level or\n * deeper; the user ruled location is never mandatory here, so nothing in\n * this file requires one.\n * - anonymous posting, which in Jansathi is gated on identity verification\n * we do not have. A founders' network is an identified network.\n *\n * @module founder-schema/domains/feed\n */\n\nimport { z } from 'zod';\nimport {\n eachOnce,\n emptyStringToUndefined,\n objectIdSchema,\n paginationQuerySchema,\n} from '../../core/common.js';\nimport { DAY_MS, MEDIA_ALT_MAX, REPORT_NOTE_MAX } from '../../core/limits.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { VALIDATION_MESSAGE } from '../../core/validation.js';\nimport { communityChipSchema } from '../communities/communities.js';\nimport { mediaImageSchema } from '../media/media.js';\nimport { topicSchema } from '../onboarding/onboarding.js';\nimport { productAskSchema, productChipSchema } from '../products/products.js';\nimport { memberBylineSchema } from '../profile/founder-profile.js';\nimport { mentionsSchema } from './mentions.js';\n\n// ─── Limits ──────────────────────────────────────────────────────────────────\n\n/**\n * Exported because the composer must count down to the SAME number the server\n * rejects at. A client-side limit that disagrees with the server is a message\n * a member cannot send and cannot see why.\n */\nexport const POST_MAX_BODY_CHARS = 5000;\n/**\n * Total attachments on one post, images and videos together.\n *\n * ONE cap over ONE ordered list, rather than Jansathi's separate image and\n * video arrays. A member who posts a screenshot, then a clip, then another\n * screenshot means that order, and two parallel arrays cannot express it: the\n * card would show both images and then the video, which is not what was\n * written.\n */\nexport const POST_MAX_MEDIA = 10;\n/**\n * Topics per post or poll.\n *\n * 5 since the user's ruling of 2026-11-23 (\"let user choose up to 5 topics for\n * poll and post, not just 3\"), which also made choosing at least one mandatory\n * on a NEW post or poll (`requiredTopicsSchema`). Still capped: a post tagged\n * with everything is about nothing, and one tagged with ten matches every\n * member, which is how a relevance feature turns back into a chronological one.\n *\n * Feed content only. A product's and a community's topics keep their own caps\n * (`PRODUCT_TOPICS_MAX`, `COMMUNITY_TOPICS_MAX`).\n */\nexport const MAX_TOPICS = 5;\nexport const COMMENT_MAX_BODY_CHARS = 2000;\n\nexport const POLL_QUESTION_MAX_CHARS = 280;\nexport const POLL_OPTION_MAX_CHARS = 80;\nexport const POLL_MIN_OPTIONS = 2;\nexport const POLL_MAX_OPTIONS = 6;\n/** 5 minutes. Below this a poll closes before anyone sees it. */\nexport const POLL_MIN_DURATION_MS = 5 * 60 * 1000;\n/** 30 days. */\nexport const POLL_MAX_DURATION_MS = 30 * DAY_MS;\n\n/**\n * How long after writing it the author may still edit a post or a comment.\n *\n * A window rather than forever: an edit after people have reacted changes what\n * they reacted to. Deletion has no window, because a member must always be able\n * to remove their own words. The server is the gate (`EDIT_WINDOW_CLOSED`);\n * a client uses this to stop offering Edit at the moment the server would\n * start refusing it, instead of on the next reload.\n */\nexport const EDIT_WINDOW_MS = 15 * 60 * 1000;\n\n// ─── Enums ───────────────────────────────────────────────────────────────────\n\n/**\n * What can appear in the feed. Two kinds, not seven.\n *\n * Engagement is keyed by `(contentKind, contentId)` so one engagement bar\n * serves both, and comments hang off the same pair. Adding a kind later is\n * additive; the union is deliberately narrow now so the client never has to\n * handle a kind this product does not have.\n */\nexport const CONTENT_KIND_VALUES = ['post', 'poll'] as const;\nexport const contentKindSchema = z.enum(CONTENT_KIND_VALUES);\nexport type ContentKind = z.infer<typeof contentKindSchema>;\n\n/** What a post's media item is: images only today. The backend's storage's own values, from here like every other list (0.20.0). */\nexport const CONTENT_MEDIA_KIND_VALUES = ['image'] as const;\nexport const contentMediaKindSchema = z.enum(CONTENT_MEDIA_KIND_VALUES);\nexport type ContentMediaKind = z.infer<typeof contentMediaKindSchema>;\n\n/**\n * What a reaction or a report can point at: a feed item, or a comment on one.\n *\n * Wider than `ContentKind` on purpose. A comment carries reaction counts and a\n * viewer reaction, and a comment can be abusive, so both reach it. A bookmark\n * and a comment thread cannot: they take `ContentKind`. Until 0.2.0 the\n * reaction and report RESPONSES were typed `ContentKind` while the routes\n * accepted comments, so every answer about a comment broke this contract.\n */\nexport const ENGAGEMENT_TARGET_KIND_VALUES = [...CONTENT_KIND_VALUES, 'comment'] as const;\n\n/**\n * An up or down vote (2026-11-23): one per member per post, poll or comment,\n * counted into the item's net `score`. See `setScoreVoteBodySchema`.\n */\nexport const SCORE_VOTE_VALUES = ['up', 'down'] as const;\nexport const scoreVoteSchema = z.enum(SCORE_VOTE_VALUES);\nexport type ScoreVote = z.infer<typeof scoreVoteSchema>;\nexport const engagementTargetKindSchema = z.enum(ENGAGEMENT_TARGET_KIND_VALUES);\nexport type EngagementTargetKind = z.infer<typeof engagementTargetKindSchema>;\n\n/**\n * What a member can REPORT (0.6.0): everything a reaction can reach, plus a\n * product page and a review, and (2026-11-23, Jansathi's user reports) a\n * MEMBER themself (`POST /founders/:userId/report`). Each has its own report\n * route; the answer and the moderation queue use this one list.\n */\nexport const REPORT_TARGET_KIND_VALUES = [\n ...ENGAGEMENT_TARGET_KIND_VALUES,\n 'product',\n 'review',\n 'member',\n] as const;\nexport const reportTargetKindSchema = z.enum(REPORT_TARGET_KIND_VALUES);\nexport type ReportTargetKind = z.infer<typeof reportTargetKindSchema>;\n\n/**\n * Every reaction a row can hold. The first four were Founder Circle's own;\n * `love`, `support` and `haha` came from Jansathi in 0.8.0 (the user's set,\n * 2026-10-07), so the feed feels like the community app members know.\n *\n * ⚠️ These values are stored per reaction row, so removing one orphans data.\n * Append only. A value that should no longer be OFFERED leaves\n * `REACTION_PICKER_VALUES` instead, and stays here so old rows still read.\n */\nexport const REACTION_TYPE_VALUES = [\n 'like',\n 'celebrate',\n 'insightful',\n 'curious',\n 'love',\n 'support',\n 'haha',\n] as const;\nexport const reactionTypeSchema = z.enum(REACTION_TYPE_VALUES);\nexport type ReactionType = z.infer<typeof reactionTypeSchema>;\n\n/**\n * What the picker offers, IN ORDER (the user's set, 2026-10-07). A member can\n * set only these; `curious` is no longer offered, but a member who chose it\n * keeps it, sees it as their reaction, and can clear it.\n *\n * The order is the schema's, not a client literal: the backend accepts only\n * these on a write (`setReactionBodySchema`), and two lists that must agree\n * belong in one place.\n */\nexport const REACTION_PICKER_VALUES = [\n 'like',\n 'love',\n 'celebrate',\n 'insightful',\n 'support',\n 'haha',\n] as const satisfies readonly ReactionType[];\nexport const pickableReactionSchema = z.enum(REACTION_PICKER_VALUES);\nexport type PickableReaction = z.infer<typeof pickableReactionSchema>;\n\n/**\n * Feed ordering.\n *\n * new newest first. Still the default here, unlike Jansathi where `hot`\n * leads: a brand-new network ranking a handful of posts by a blended\n * score mostly hides the newest thing somebody just wrote. (Home asks\n * for `ranked`, below, whose freshness term and own-post rule are the\n * answer to that.)\n * top highest net `score` (up minus down votes) first, all time; ties\n * newest first. Until 2026-11-23 it was \"most reacted\".\n * hot (2026-11-23, Jansathi's) a score that decays with age:\n * `(score + 2 * comments) / (hours + 2) ^ 1.5`, recomputed by the server\n * every few minutes for items under `HOT_WINDOW_DAYS` old; older items\n * sit at 0, below anything recent with a positive score.\n */\nexport const FEED_SORT_VALUES = ['new', 'top', 'hot'] as const;\n/** Items older than this are not re-scored for `hot`: by then the decay has taken them to ~0. */\nexport const HOT_WINDOW_DAYS = 7;\nexport const feedSortSchema = z.enum(FEED_SORT_VALUES);\nexport type FeedSort = z.infer<typeof feedSortSchema>;\n\n/**\n * Home's own order (2026-11-24, the user: \"you decide ... as per the best\n * industry standard practice\"). `GET /api/v1/feed` takes every sort above and\n * one more; a community's feed is already one subject and keeps the three.\n *\n * ranked what matters to this member first, as the large social feeds do.\n * Every item of the last `RANKED_FEED_WINDOW_DAYS` days gets one\n * score, the product of four things:\n *\n * affinity who it is from, for this member: someone they\n * follow, a community they joined, a topic they are\n * interested in. Each one met adds; anything else\n * counts as 1, so nothing scores 0.\n * engagement reposts, comments, net votes, reactions and poll\n * answers, each weighed by the effort behind it, with\n * diminishing returns (one viral item cannot camp at\n * the top); a downvoted item sinks. A poll's answer\n * counts what a post's reaction does, so posts and\n * polls stand on one scale.\n * freshness halves every 48 hours.\n * standing lower for what this member already acted on or\n * voted down, so a refresh brings up something new,\n * and lower for a closed poll, which only reports.\n *\n * The member's own post from the last hour leads, so what they just\n * wrote is where they look. No more than two in a row from one\n * member. Nothing the `new` order shows is left out: once the\n * ranked part runs out, everything older follows, newest first\n * (`FeedPage.section`). The weights are the server's\n * (`modules/feed/ranking.ts` in founder-circle-backend), not this\n * contract's.\n *\n * Each page is ranked as of the moment the first page was (the\n * cursor carries it), so new posts wait for the next refresh\n * instead of shifting the pages being read.\n */\nexport const HOME_FEED_SORT_VALUES = [...FEED_SORT_VALUES, 'ranked'] as const;\nexport const homeFeedSortSchema = z.enum(HOME_FEED_SORT_VALUES);\nexport type HomeFeedSort = z.infer<typeof homeFeedSortSchema>;\n\n/** How far back the `ranked` home feed scores items. Older ones follow it, newest first. */\nexport const RANKED_FEED_WINDOW_DAYS = 7;\n\n/**\n * Which part of the `ranked` home feed a page belongs to. Absent on every\n * other list (other sorts, a community's feed, a member's posts, Saved).\n *\n * ranked the scored items of the last `RANKED_FEED_WINDOW_DAYS` days\n * earlier everything older, newest first, once the ranked part has run out\n *\n * A page is never both, so a client can show where one part ends and the\n * next begins.\n */\nexport const FEED_SECTION_VALUES = ['ranked', 'earlier'] as const;\nexport const feedSectionSchema = z.enum(FEED_SECTION_VALUES);\nexport type FeedSection = z.infer<typeof feedSectionSchema>;\n\n/**\n * When a poll's results are shown (2026-11-23, from Jansathi), chosen by its\n * author when they make it and never changed after:\n *\n * live as people vote (the default, and every poll made before this)\n * after_close only once it has closed: until then every option's count is\n * sent as 0 and only how many have voted is shown, so early\n * votes do not sway later ones\n *\n * Applies to everyone, the author included: the author has no special view.\n */\nexport const POLL_RESULTS_VISIBILITY_VALUES = ['live', 'after_close'] as const;\nexport const pollResultsVisibilitySchema = z.enum(POLL_RESULTS_VISIBILITY_VALUES);\nexport type PollResultsVisibility = z.infer<typeof pollResultsVisibilitySchema>;\n\n/**\n * How a thread's comments are ordered (2026-11-23, from Jansathi), chosen by\n * the reader with a switch at the top of the thread:\n *\n * top most engaged first (reactions; ties newest first). The default.\n * newest newest first\n * oldest oldest first: the conversation as it happened (the only order\n * before this)\n *\n * Top-level comments only: replies under a comment always read oldest first.\n * Each order pages with its own cursor: a cursor from one order is not\n * accepted by another (the client starts again when the reader switches).\n */\nexport const COMMENT_SORT_VALUES = ['top', 'newest', 'oldest'] as const;\nexport const commentSortSchema = z.enum(COMMENT_SORT_VALUES);\nexport type CommentSort = z.infer<typeof commentSortSchema>;\n\n/**\n * Counts keyed by reaction type, e.g. `{ like: 4, celebrate: 1 }`. Only the\n * reactions an item actually has need appear.\n *\n * ⚠️ `partialRecord`, NOT `record`. In Zod 4 an enum-keyed `z.record` is\n * EXHAUSTIVE: it demands every key, so `{ like: 4 }` fails with three missing\n * keys and `{}` fails with four. That would force the server to ship a zero for\n * every reaction on every item, and the day a fifth reaction is added every\n * previously stored payload and every older client stops parsing.\n * `partialRecord` keeps the key validation without the exhaustiveness, so an\n * unknown key like Jansathi's `support` is still refused.\n */\nexport const reactionCountsSchema = z.partialRecord(\n reactionTypeSchema,\n z.number().int().nonnegative(),\n);\nexport type ReactionCounts = z.infer<typeof reactionCountsSchema>;\n\n// ─── Author byline ───────────────────────────────────────────────────────────\n\n/**\n * The author as a card renders them: the shared `memberBylineSchema` (0.6.0),\n * which products, reviews and notifications name members with too.\n *\n * Every field here is LIVE, joined against the profile at read time rather\n * than frozen onto the post at write time. So a renamed handle, a new avatar\n * or an edited headline updates on old posts, and the byline link always\n * targets the current username instead of 404ing on a handle that moved.\n *\n * Jansathi additionally snapshots `localName` (\"where the author was when\n * posting\"). Not ported: location is optional here, so a byline that depends\n * on one would be blank for anyone who never set it.\n */\nexport const feedAuthorSchema = memberBylineSchema;\nexport type FeedAuthor = z.infer<typeof feedAuthorSchema>;\n\n// ─── Media ───────────────────────────────────────────────────────────────────\n\n/**\n * A post's image: a processed `mediaImageSchema` (every stored size, ready for\n * `srcset`, plus a placeholder) with the post's own alt text.\n *\n * `width` and `height` are required so a card can reserve the right box before\n * the image loads. Without them every image arrival shifts the feed under the\n * reader's thumb.\n *\n * `thumbnailUrl` is the smallest stored size, for a grid or a notification.\n *\n * URLs here come from our own upload pipeline, so they take a plain `z.url()`\n * rather than `httpUrlSchema`. ⚠️ If a \"paste an image link\" path is ever\n * added, these become member-supplied and must move to `httpUrlSchema`.\n */\nexport const feedImageSchema = mediaImageSchema.extend({\n kind: z.literal('image'),\n thumbnailUrl: z.url().optional(),\n /** Author-supplied alt text. Optional, and worth asking for. */\n alt: z.string().max(MEDIA_ALT_MAX).optional(),\n});\nexport type FeedImage = z.infer<typeof feedImageSchema>;\n\n/**\n * What a post carries, in the order it was attached. IMAGES ONLY (0.18.0):\n * video is shared as a link in the post text (the user's decision,\n * 2026-09-21), and the uploaded-video shape this used to admit described a\n * server-made poster frame no server makes. `kind` stays, so a stored item\n * says what it is.\n */\nexport const feedMediaSchema = feedImageSchema;\nexport type FeedMedia = z.infer<typeof feedMediaSchema>;\n\n// ─── Viewer state ────────────────────────────────────────────────────────────\n\n/**\n * What THIS viewer has done to this item, computed per request.\n *\n * Optional as a block, because an unauthenticated or server-rendered read has\n * no viewer. ⚠️ A client must treat an absent `viewer` as \"no state known\",\n * never as \"has not reacted\": rendering an empty reaction button off a missing\n * block is how a member sees their own reaction disappear on reload.\n */\nexport const viewerStateSchema = z.object({\n reaction: reactionTypeSchema.nullable(),\n /** This viewer's up or down vote on it, or null (2026-11-23, `setScoreVoteBodySchema`). */\n myVote: scoreVoteSchema.nullable(),\n bookmarked: z.boolean(),\n isAuthor: z.boolean(),\n\n /**\n * What this viewer may DO, decided by the server and sent as plain answers.\n *\n * Not role data for the client to reason about. The moment a client derives\n * \"can I edit this\" from roles and ownership, that derivation is a second\n * implementation of the rule, it drifts from the server's, and the drift is\n * invisible until the two disagree: either a button that 403s or a button\n * that should not have been there. `isAuthor` stays because the byline reads\n * differently for your own post, not because the client should compute rights\n * from it.\n *\n * `canEdit` is false once the edit window closes, so it is not simply\n * `isAuthor`.\n */\n canEdit: z.boolean(),\n canDelete: z.boolean(),\n canReport: z.boolean(),\n});\nexport type ViewerState = z.infer<typeof viewerStateSchema>;\n\n/**\n * The viewer's state on a post or a poll: everything above, plus reposting\n * (0.8.0). Comments cannot be reposted, so they keep `viewerStateSchema`.\n */\nexport const contentViewerStateSchema = viewerStateSchema.extend({\n /**\n * The viewer's own ACTIVE repost of this item, or null. An id rather than a\n * boolean because undoing it is deleting that post (`DELETE\n * /api/v1/feed/:contentId`), and a client holding only \"true\" would have to\n * go and find it.\n */\n repostId: objectIdSchema.nullable(),\n /**\n * Whether a repost may be made now, decided by the server: false on your\n * own item, on a repost (repost the original instead), on an item hidden by\n * staff, while you already have one (undo it first), and for a member who\n * cannot write yet (no finished, active profile: `ONBOARDING_INCOMPLETE`).\n */\n canRepost: z.boolean(),\n /**\n * On content inside a community only (0.9.0): whether this viewer may take\n * part in it now (react, comment, vote, save, edit): an active member of a\n * community that is not archived. False for someone who can read it but has\n * not joined (a public community's reader, staff): offer Join instead of\n * the controls. `canEdit` is false too whenever this is.\n *\n * TAKING BACK needs only read access (0.18.0, the server's rule since\n * 0.9.0): someone who left, or a community since archived, may still remove\n * their reaction, their vote or their save, so a client gates only SETTING\n * one on this. Reporting is safety, open to any signed-in reader who did not\n * write it (`canReport`, 0.13.0), joined or not.\n */\n canTakePart: z.boolean().optional(),\n});\nexport type ContentViewerState = z.infer<typeof contentViewerStateSchema>;\n\n// ─── Repost ──────────────────────────────────────────────────────────────────\n\n/**\n * What a repost carries of the item it shares (0.8.0), computed when READ:\n * the byline is live, and an edit to the original shows in every repost of it.\n *\n * `unavailable` once the original is deleted, hidden by staff, or its\n * author's account is gone. The repost stays (it is its author's post, with\n * their words), and says the original is no longer there, rather than\n * vanishing from under the people who commented on it.\n */\nexport const repostedSourceSchema = z.discriminatedUnion('state', [\n z.object({\n state: z.literal('available'),\n contentKind: contentKindSchema,\n id: objectIdSchema,\n author: feedAuthorSchema,\n /** A post's whole text, or a poll's question. */\n text: z.string().max(POST_MAX_BODY_CHARS),\n /** The original's first attachment, for the card's thumbnail. */\n media: feedMediaSchema.optional(),\n /** The product the original is about, live, as on the original. */\n product: productChipSchema.optional(),\n createdAt: z.iso.datetime(),\n }),\n z.object({\n state: z.literal('unavailable'),\n contentKind: contentKindSchema,\n id: objectIdSchema,\n }),\n]);\nexport type RepostedSource = z.infer<typeof repostedSourceSchema>;\n\n// ─── Post ────────────────────────────────────────────────────────────────────\n\n/**\n * A post as the feed and the single-post page receive it.\n *\n * Counts are denormalised onto the row so one document serves a whole card.\n *\n * `score` (2026-11-23): the user decided to bring Jansathi's up and down votes\n * over, on posts, polls and comments. It is the NET count, up minus down, and\n * can be negative. It ranks the `top` and `hot` sorts; reactions stay the\n * expressive layer and rank nothing.\n */\nexport const feedPostSchema = z.object({\n id: objectIdSchema,\n contentKind: z.literal('post'),\n author: feedAuthorSchema,\n\n /**\n * The WHOLE body, never a server-side truncation.\n *\n * So there is no \"was this shortened\" flag and no second fetch to read the\n * rest: the card clamps visually and expands in place. At a 5,000 character\n * cap a page of twenty posts is small enough that trimming would cost a round\n * trip to save nothing. If that ever stops being true, a truncation flag is\n * an additive change; a client that has been guessing is not.\n */\n text: z.string().max(POST_MAX_BODY_CHARS),\n /** The `@handles` in `text` that are live members (2026-11-23, `mentions.ts`). */\n mentions: mentionsSchema,\n /** Ordered as the author attached them. */\n media: z.array(feedMediaSchema).max(POST_MAX_MEDIA),\n /**\n * What this post is ABOUT, from the same vocabulary a member picks as their\n * interests. This is the whole mechanism behind a relevant feed: matching is\n * an intersection of two lists drawn from one enum, not a guess from who\n * wrote it.\n *\n * ⚠️ An EMPTY array is still READ: a post written before 2026-11-23 (when\n * topics became mandatory on a new post) and every repost carry none, so\n * interest matching cannot reach them and they are only ever found\n * chronologically. A NEW post cannot be written without one\n * (`requiredTopicsSchema`).\n */\n topics: z.array(topicSchema).max(MAX_TOPICS),\n\n /**\n * The product this post is about, live-joined (0.6.0). Absent when it names\n * none, and when the product has since been deleted or hidden by staff: the\n * post stays, the chip goes. Every comment on a post with a product is that\n * product's feedback.\n */\n product: productChipSchema.optional(),\n /** What the post asks of the community about its product. Only with `product`. */\n ask: productAskSchema.optional(),\n\n /**\n * The community it was posted in (0.9.0): \"in AI Builders\". Absent on\n * general content. Never alongside `product`, `ask` or `repostOf`:\n * community content carries no product and is never reposted.\n */\n community: communityChipSchema.optional(),\n /** When a moderator pinned it as one of its community's announcements (0.9.0). */\n pinnedAt: z.iso.datetime().optional(),\n\n /**\n * Present only on a REPOST (0.8.0): the item this post shares, with `text`\n * as the reposter's own words above it (empty for a plain repost) and no\n * media of its own. A repost cannot be reposted; its own `repostCount` is\n * always 0.\n */\n repostOf: repostedSourceSchema.optional(),\n\n commentCount: z.number().int().nonnegative(),\n reactionCounts: reactionCountsSchema,\n /** Up votes minus down votes (2026-11-23). May be negative. */\n score: z.number().int(),\n /** Active reposts of this item (0.8.0); an undone or removed one no longer counts. */\n repostCount: z.number().int().nonnegative(),\n\n createdAt: z.iso.datetime(),\n /** Null when never edited. The edit window is the server's to enforce. */\n editedAt: z.iso.datetime().nullable(),\n\n viewer: contentViewerStateSchema.optional(),\n});\nexport type FeedPost = z.infer<typeof feedPostSchema>;\n\n// ─── Poll ────────────────────────────────────────────────────────────────────\n\n/**\n * One choice. `index` is the identifier a vote refers to, not the label:\n * sending indices avoids ambiguity between two options whose labels differ\n * only by case, spacing or an invisible character.\n */\nexport const pollOptionSchema = z.object({\n index: z\n .number()\n .int()\n .min(0)\n .max(POLL_MAX_OPTIONS - 1),\n label: z.string().min(1).max(POLL_OPTION_MAX_CHARS),\n voteCount: z.number().int().nonnegative(),\n});\nexport type PollOption = z.infer<typeof pollOptionSchema>;\n\n/**\n * A poll. Its own kind, not a post with extra fields, because votes are their\n * own records keyed by (poll, voter) and a post has nothing equivalent.\n *\n * Polls are not editable. Changing a question or an option after a vote has\n * been cast silently re-purposes that vote. A poll closes at its `closesAt`,\n * or earlier when its author closes it (2026-11-23, `POST\n * /feed/poll/:pollId/close`; staff may too, audited): `closesAt` becomes that\n * moment, so a closed poll reads the same however it closed.\n */\nexport const feedPollSchema = z.object({\n id: objectIdSchema,\n contentKind: z.literal('poll'),\n author: feedAuthorSchema,\n\n question: z.string().min(1).max(POLL_QUESTION_MAX_CHARS),\n /** As on a post: the `@handles` in `question` that are live members (2026-11-23). */\n mentions: mentionsSchema,\n options: z.array(pollOptionSchema).min(POLL_MIN_OPTIONS).max(POLL_MAX_OPTIONS),\n /** Unique voters, not votes: with multi-select the two differ. */\n totalVoters: z.number().int().nonnegative(),\n allowsMultipleChoices: z.boolean(),\n closesAt: z.iso.datetime(),\n /**\n * Whether the poll is closed, decided by the SERVER's clock.\n *\n * Derivable from `closesAt`, and deliberately sent anyway: a device with a\n * wrong clock would otherwise show a live poll as finished, or offer a vote\n * the server then rejects, and the member sees a control that lies. `closesAt`\n * stays for rendering \"closes in 2 days\"; this is what gates the control.\n */\n isClosed: z.boolean(),\n /**\n * When its results show (2026-11-23). `after_close` on an open poll: every\n * `voteCount` is 0 on the wire and `totalVoters` is real, so a client shows\n * \"N have voted\" and the results once `isClosed`. Defaults to `live` for an\n * answer from before the field.\n */\n resultsVisibility: pollResultsVisibilitySchema.default('live'),\n\n /** As on a post. A poll is feed content and is matched the same way. */\n topics: z.array(topicSchema).max(MAX_TOPICS),\n\n /** As on a post: \"which onboarding flow should we ship?\", about a product. */\n product: productChipSchema.optional(),\n ask: productAskSchema.optional(),\n /** As on a post (0.9.0). */\n community: communityChipSchema.optional(),\n pinnedAt: z.iso.datetime().optional(),\n\n commentCount: z.number().int().nonnegative(),\n reactionCounts: reactionCountsSchema,\n /** As on a post (2026-11-23). */\n score: z.number().int(),\n /** As on a post (0.8.0). */\n repostCount: z.number().int().nonnegative(),\n\n createdAt: z.iso.datetime(),\n /** Always null. Kept so one byline component renders both kinds. */\n editedAt: z.iso.datetime().nullable(),\n\n viewer: contentViewerStateSchema\n .extend({\n /** Indices this viewer chose. Empty means not voted yet, and it is\n * always populated for the viewer: a voter can always see their own\n * answer even where others' results are hidden. */\n votedOptionIndices: z.array(z.number().int().nonnegative()),\n /**\n * Whether this viewer may close it now (2026-11-23), decided by the\n * server: its author, or staff who may remove it, while it is open.\n * Absent from an answer from before the field: read as false.\n */\n canClose: z.boolean().optional(),\n })\n .optional(),\n});\nexport type FeedPoll = z.infer<typeof feedPollSchema>;\n\n// ─── The feed item union ─────────────────────────────────────────────────────\n\n/**\n * Discriminated on `contentKind`, so a client narrows with a switch and the\n * compiler catches an unhandled kind the day one is added. A plain union would\n * need every field checked by hand and would silently accept a hybrid.\n */\nexport const feedItemSchema = z.discriminatedUnion('contentKind', [feedPostSchema, feedPollSchema]);\nexport type FeedItem = z.infer<typeof feedItemSchema>;\n\n// ─── Comments ────────────────────────────────────────────────────────────────\n\n/**\n * A comment, one level of nesting only: a reply to a comment is allowed, a\n * reply to a reply is not. Two levels stay readable on a phone; three do not,\n * and the server is what enforces it.\n */\nexport const feedCommentSchema = z.object({\n id: objectIdSchema,\n contentKind: contentKindSchema,\n contentId: objectIdSchema,\n /** Null for a top-level comment. A non-null value may only name a top-level\n * comment, never a reply. */\n parentCommentId: objectIdSchema.nullable(),\n author: feedAuthorSchema,\n\n text: z.string().max(COMMENT_MAX_BODY_CHARS),\n /** As on a post: the `@handles` in `text` that are live members (2026-11-23). */\n mentions: mentionsSchema,\n\n /** Meaningful only on a top-level comment; always 0 on a reply. */\n replyCount: z.number().int().nonnegative(),\n reactionCounts: reactionCountsSchema,\n /** Up votes minus down votes, as on a post (2026-11-23). May be negative. */\n score: z.number().int(),\n\n /**\n * When the product's team marked this comment as feedback that helped\n * (0.6.0), or null. Only a comment on a post tagged with a product, written\n * by someone outside that product's team, can carry it; it earns its writer\n * contribution points.\n */\n helpfulAt: z.iso.datetime().nullable(),\n\n /**\n * Whether the person who wrote the post or poll wrote this comment\n * (2026-11-23): the thread marks it \"Author\", so their answers stand out.\n * False for an answer from before the field.\n */\n byItemAuthor: z.boolean().default(false),\n\n createdAt: z.iso.datetime(),\n editedAt: z.iso.datetime().nullable(),\n\n /** No `bookmarked`: the post is the right thing to save, not a comment. */\n viewer: viewerStateSchema\n .omit({ bookmarked: true })\n .extend({\n /**\n * The control is theirs now (0.12.0). On a comment from outside the\n * team of the post's product: unmarked, marking it is acting for the\n * product (a member on its team, the product open); marked, taking the\n * mark back needs only being on the team, member or not, whatever the\n * product's state.\n */\n canMarkHelpful: z.boolean(),\n })\n .optional(),\n});\nexport type FeedComment = z.infer<typeof feedCommentSchema>;\n\n// ─── Queries ─────────────────────────────────────────────────────────────────\n\n/**\n * `GET /api/v1/feed`. Inherits `limit` and `cursor`, which already tolerate an\n * emptied control rather than answering 400.\n *\n * `sort` is any of `HOME_FEED_SORT_VALUES`: `new` when omitted, as before;\n * Home asks for `ranked` (2026-11-24). A cursor from one sort is not accepted\n * by another: it reads as \"from the top\".\n *\n * `interests=true` narrows to the viewer's topics (falling back to the plain\n * feed when they have none). `z.stringbool`, so `true`/`false`/`1`/`0` all\n * read as a person means them; until 0.2.0 the backend read this parameter\n * raw, outside the schema, and only the exact string `true` counted. Not with\n * `ranked`, which weighs the viewer's interests instead of filtering by them:\n * there it is ignored.\n *\n * ⚠ NO `authorId`. It was accepted here and then ignored by the server, so a\n * profile page asking for one founder's posts silently got everybody's. A\n * member's own posts are `GET /api/v1/feed/by-author/:userId`.\n */\nexport const feedQuerySchema = paginationQuerySchema.extend({\n sort: z.preprocess(emptyStringToUndefined, homeFeedSortSchema.default('new')),\n interests: z.preprocess(emptyStringToUndefined, z.stringbool().default(false)),\n});\nexport type FeedQuery = z.infer<typeof feedQuerySchema>;\nexport type FeedQueryInput = z.input<typeof feedQuerySchema>;\n\n/**\n * `GET /api/v1/communities/:communityId/feed` (2026-11-23: it takes the\n * feed's `sort` too, `new` by default as before). No `interests`: a community\n * is already one subject.\n */\nexport const communityFeedQuerySchema = paginationQuerySchema.extend({\n sort: z.preprocess(emptyStringToUndefined, feedSortSchema.default('new')),\n});\nexport type CommunityFeedQuery = z.infer<typeof communityFeedQuerySchema>;\n\n/** `GET /api/v1/feed/:contentKind/:contentId/comments`. */\nexport const commentsQuerySchema = paginationQuerySchema.extend({\n /** Omitted lists top-level comments; set, it lists that comment's replies. */\n parentCommentId: z.preprocess(emptyStringToUndefined, objectIdSchema.optional()),\n /**\n * The order of top-level comments (2026-11-23), `top` when omitted. Ignored\n * for replies, which are always oldest first.\n */\n sort: z.preprocess(emptyStringToUndefined, commentSortSchema.default('top')),\n});\nexport type CommentsQuery = z.infer<typeof commentsQuerySchema>;\nexport type CommentsQueryInput = z.input<typeof commentsQuerySchema>;\n\n/**\n * `GET /api/v1/feed/:contentKind/:contentId/reactions` (0.8.0): who reacted,\n * newest first. `contentKind` is post, poll or comment, as for reacting.\n * `type` narrows to one reaction (a tab); absent lists every reaction (All).\n */\nexport const reactionsQuerySchema = paginationQuerySchema.extend({\n type: z.preprocess(emptyStringToUndefined, reactionTypeSchema.optional()),\n});\nexport type ReactionsQuery = z.infer<typeof reactionsQuerySchema>;\nexport type ReactionsQueryInput = z.input<typeof reactionsQuerySchema>;\n\n// ─── Route parameters ────────────────────────────────────────────────────────\n\n/**\n * Every id and kind in a feed URL, as a schema, so a bad one answers exactly\n * as a bad body field does: 400 `VALIDATION_ERROR`, the issue at\n * `location: 'params'`. Until 0.2.0 these were hand checks that answered\n * \"Invalid id.\" with no issues at all, and the comment routes never looked at\n * `:contentKind`.\n */\n\n/** `GET /feed/:id`, the permalink. */\nexport const feedItemParamsSchema = z.object({ id: objectIdSchema });\n\n/** `PATCH|DELETE /feed/:contentId`. */\nexport const contentParamsSchema = z.object({ contentId: objectIdSchema });\n\n/** A bookmark and a comment thread: a post or a poll. */\nexport const contentTargetParamsSchema = z.object({\n contentKind: contentKindSchema,\n contentId: objectIdSchema,\n});\n\n/** A reaction and a report: a post, a poll or a comment. */\nexport const engagementTargetParamsSchema = z.object({\n contentKind: engagementTargetKindSchema,\n contentId: objectIdSchema,\n});\n\n/** `POST|DELETE /feed/poll/:pollId/vote`. */\nexport const pollParamsSchema = z.object({ pollId: objectIdSchema });\n\n/** `DELETE /feed/comments/:commentId`. */\nexport const commentParamsSchema = z.object({ commentId: objectIdSchema });\n\n/** `GET /feed/by-author/:userId`. */\nexport const authorParamsSchema = z.object({ userId: objectIdSchema });\n\nexport type FeedItemParams = z.infer<typeof feedItemParamsSchema>;\nexport type ContentParams = z.infer<typeof contentParamsSchema>;\nexport type ContentTargetParams = z.infer<typeof contentTargetParamsSchema>;\nexport type EngagementTargetParams = z.infer<typeof engagementTargetParamsSchema>;\nexport type PollParams = z.infer<typeof pollParamsSchema>;\nexport type CommentParams = z.infer<typeof commentParamsSchema>;\nexport type AuthorParams = z.infer<typeof authorParamsSchema>;\n\n// ─── Pages ───────────────────────────────────────────────────────────────────\n\n/**\n * A page of the feed, and of one member's posts (`by-author`), which is the\n * same shape. `nextCursor` is null on the last page.\n *\n * `section` (2026-11-24) only on the `ranked` home feed: which part of it the\n * page is from (`FEED_SECTION_VALUES`). Optional, so every other list, and a\n * client that predates it, reads the page exactly as before.\n */\nexport const feedPageSchema = paginatedSchema(feedItemSchema).extend({\n section: feedSectionSchema.optional(),\n});\nexport type FeedPage = z.infer<typeof feedPageSchema>;\n\n/**\n * A community's pinned announcements (0.9.0), most recently pinned first, at\n * most `COMMUNITY_PINS_MAX` (domains/communities). Never paged.\n */\nexport const pinnedItemsSchema = z.object({ items: z.array(feedItemSchema) });\nexport type PinnedItems = z.infer<typeof pinnedItemsSchema>;\n\n/** A page of a thread: top-level comments, or one comment's replies. */\nexport const commentPageSchema = paginatedSchema(feedCommentSchema);\nexport type CommentPage = z.infer<typeof commentPageSchema>;\n\n/**\n * One row of \"who reacted\" (0.8.0).\n *\n * `reactedAt` is when they reacted, and the list's order: CHANGING a\n * reaction updates it in place, so the row keeps its position (and moves from\n * one tab to another) instead of jumping to the top under a reader's cursor.\n * Taking it back and reacting again is a new reaction, from then.\n *\n * Only members who can be shown are listed: an erased account's reactions are\n * withdrawn with it, and a paused, suspended or never-onboarded member is\n * left out of the list.\n * `reactionCounts` still counts every reaction, so a tab can list fewer\n * people than its number says. That is deliberate: dropping a suspended\n * member's reaction from the count would make it jump back on reinstatement.\n */\nexport const reactorSchema = z.object({\n member: memberBylineSchema,\n reaction: reactionTypeSchema,\n reactedAt: z.iso.datetime(),\n});\nexport type Reactor = z.infer<typeof reactorSchema>;\nexport const reactorPageSchema = paginatedSchema(reactorSchema);\nexport type ReactorPage = z.infer<typeof reactorPageSchema>;\n\n/**\n * A comment on a product's Feedback tab (`GET /products/:id/feedback`): the\n * comment as a thread shows it, plus whether its writer is already a\n * confirmed tester, so the team's \"Confirm as tester\" knows without paging\n * through `/testers`.\n */\nexport const productFeedbackItemSchema = feedCommentSchema.extend({\n authorIsTester: z.boolean(),\n});\nexport type ProductFeedbackItem = z.infer<typeof productFeedbackItemSchema>;\nexport const productFeedbackPageSchema = paginatedSchema(productFeedbackItemSchema);\nexport type ProductFeedbackPage = z.infer<typeof productFeedbackPageSchema>;\n\n// ─── Write bodies ────────────────────────────────────────────────────────────\n\n/**\n * ⚠️ Every write body below is its own object with NO defaults, and none of\n * them is built with `.pick().partial()`. `.partial()` does not switch off\n * `.default()`, so a patch body built that way rewrites defaulted fields on\n * every request. See `updateFounderProfileBodySchema` for the incident.\n */\n\n/**\n * An attachment on the way IN: the id of an image already uploaded and\n * completed (`media`), and deliberately not a URL.\n *\n * ⚠ The first draft of this took the full read shape, URL included. That is\n * the same hole that was closed on the profile: a URL in a write body is a\n * member-supplied URL, so a post could have carried `javascript:` in an image\n * source, and nothing downstream re-checks a value the server itself stored.\n * Taking an id instead removes the question rather than validating it.\n *\n * `width`, `height` and the URLs are NOT accepted either: the server measured\n * them when it processed the upload, and taking them from the client would let\n * a caller claim a 1x1 image and collapse the card.\n *\n * The server attaches each id only if it is the caller's, processed, uploaded\n * for a post, and not attached anywhere yet (`UPLOAD_NOT_ATTACHABLE`\n * otherwise), so one upload can never appear on two posts.\n */\nexport const attachedMediaSchema = z.object({\n mediaId: objectIdSchema,\n /** Author-supplied alt text, the one media field a member does write. */\n alt: z.string().trim().max(MEDIA_ALT_MAX).optional(),\n});\nexport type AttachedMedia = z.infer<typeof attachedMediaSchema>;\n\n/**\n * Which of the author's products a post or poll is about, and what it asks.\n * Set when it is written and NEVER EDITABLE afterwards: moving a post to\n * another product after people replied would move their feedback with it.\n * The server accepts only a product the author is on the team of\n * (`PRODUCT_NOT_YOURS`) and that is not archived (`PRODUCT_ARCHIVED`).\n */\nconst aboutAProduct = {\n productId: objectIdSchema.optional(),\n /** Only with `productId` (`askWithoutProduct`). */\n ask: productAskSchema.optional(),\n};\nconst askNeedsProduct = (b: { productId?: string; ask?: string }) =>\n b.ask === undefined || b.productId !== undefined;\n\n/**\n * Which community it is posted in (0.9.0), set when written and never moved.\n * The author must be an active member (`COMMUNITY_JOIN_REQUIRED`) and it must\n * not be archived (`COMMUNITY_ARCHIVED`). Community content carries no product\n * and no ask (`communityWithProduct`); the server checks that too.\n */\nconst inACommunity = { communityId: objectIdSchema.optional() };\nconst communityWithoutProduct = (b: { communityId?: string; productId?: string; ask?: string }) =>\n b.communityId === undefined || (b.productId === undefined && b.ask === undefined);\n\n/**\n * A post must carry something: text, media, or (a repost) the item it\n * reposts. ONE rule for writing and editing (0.18.0): an edit may clear the\n * text of a post that keeps its photos or its repost, and only a post that\n * would be left with nothing is refused (`postEmpty`, on `text`). The create\n * body checks it here; an edit can only be checked where the stored post is\n * known, so the server applies this same function there.\n */\nexport function postHasContent(post: {\n text?: string | null;\n mediaCount: number;\n isRepost: boolean;\n}): boolean {\n return Boolean(post.text?.trim().length) || post.mediaCount > 0 || post.isRepost;\n}\n\n/**\n * A NEW post's or poll's topics: 1 to `MAX_TOPICS` (the user's ruling,\n * 2026-11-23: \"make choosing the topics mandatory\"). Before it a post could be\n * written untagged, and an untagged post is one interest matching never finds.\n *\n * Absent, `null` or empty: `topicsRequired`, on `topics`. More than\n * `MAX_TOPICS`: Zod's `too_big` with `maximum`. The same topic twice:\n * `topicsDuplicate` (hary, 2026-11-23: as a community's topics), so two of one\n * cannot fill the count. Write bodies only: the read shapes keep allowing none\n * (older posts, and every repost).\n *\n * A REPOST takes no topics of its own (`createRepostBodySchema`, stored empty:\n * it stays out of interest matching so one item is not matched twice), and an\n * EDIT never touches them (`updatePostBodySchema` is the text alone).\n */\nexport const requiredTopicsSchema = z\n .array(topicSchema, {\n error: (issue) =>\n issue.input === undefined || issue.input === null\n ? VALIDATION_MESSAGE.topicsRequired\n : undefined,\n })\n .min(1, { error: VALIDATION_MESSAGE.topicsRequired })\n .max(MAX_TOPICS)\n .refine(eachOnce, { error: VALIDATION_MESSAGE.topicsDuplicate });\n\n/**\n * A create body's own rules run even while `topics` is the ONLY field that\n * failed (2026-11-23). Zod skips an object's refinements once any field has\n * failed, so an empty post with no topic said only \"choose a topic\", and\n * \"write something\" came a round later: two rounds for two mistakes made at\n * once. When any OTHER field fails they are still skipped, so a rule never\n * reads a value of the wrong type.\n */\nconst evenWithoutTopics = {\n when: (payload: { issues: readonly { path?: readonly PropertyKey[] }[] }) =>\n payload.issues.every((issue) => issue.path?.[0] === 'topics'),\n};\n\nexport const createPostBodySchema = z\n .object({\n text: z.string().trim().max(POST_MAX_BODY_CHARS).optional(),\n /** Already uploaded and completed. See `attachedMediaSchema`. Order is preserved. */\n media: z.array(attachedMediaSchema).max(POST_MAX_MEDIA).optional(),\n /** Required since 2026-11-23: see `requiredTopicsSchema`. */\n topics: requiredTopicsSchema,\n ...aboutAProduct,\n ...inACommunity,\n })\n .refine(\n (b) => postHasContent({ text: b.text, mediaCount: b.media?.length ?? 0, isRepost: false }),\n {\n error: VALIDATION_MESSAGE.postEmpty,\n path: ['text'],\n ...evenWithoutTopics,\n },\n )\n .refine((b) => eachOnce(b.media?.map((m) => m.mediaId) ?? []), {\n error: VALIDATION_MESSAGE.mediaDuplicate,\n path: ['media'],\n ...evenWithoutTopics,\n })\n .refine(askNeedsProduct, {\n error: VALIDATION_MESSAGE.askWithoutProduct,\n path: ['ask'],\n ...evenWithoutTopics,\n })\n .refine(communityWithoutProduct, {\n error: VALIDATION_MESSAGE.communityWithProduct,\n path: ['communityId'],\n ...evenWithoutTopics,\n });\nexport type CreatePostBody = z.infer<typeof createPostBodySchema>;\n\n/**\n * Only the text is editable. Changing media after the fact makes every\n * earlier reply look like a reply to something else. Empty text is allowed\n * here and refused by the server only when the post would carry nothing\n * (`postHasContent`): a photo's caption can be cleared, a text post's cannot.\n */\nexport const updatePostBodySchema = z.object({\n text: z.string().trim().max(POST_MAX_BODY_CHARS),\n});\nexport type UpdatePostBody = z.infer<typeof updatePostBodySchema>;\n\nexport const createPollBodySchema = z\n .object({\n question: z.string().trim().min(1).max(POLL_QUESTION_MAX_CHARS),\n options: z\n .array(z.object({ label: z.string().trim().min(1).max(POLL_OPTION_MAX_CHARS) }))\n .min(POLL_MIN_OPTIONS)\n .max(POLL_MAX_OPTIONS),\n /**\n * Duration from now, NOT an absolute closing time. A client whose clock is\n * wrong would otherwise open a poll that is already closed, and the member\n * would have no way to tell why.\n */\n durationMs: z.number().int().min(POLL_MIN_DURATION_MS).max(POLL_MAX_DURATION_MS),\n allowsMultipleChoices: z.boolean(),\n /** When its results show (2026-11-23); set once, here. Omitted: `live`. */\n resultsVisibility: pollResultsVisibilitySchema.default('live'),\n /** As on a post: required since 2026-11-23 (`requiredTopicsSchema`). */\n topics: requiredTopicsSchema,\n ...aboutAProduct,\n ...inACommunity,\n })\n .refine(askNeedsProduct, {\n error: VALIDATION_MESSAGE.askWithoutProduct,\n path: ['ask'],\n ...evenWithoutTopics,\n })\n .refine(communityWithoutProduct, {\n error: VALIDATION_MESSAGE.communityWithProduct,\n path: ['communityId'],\n ...evenWithoutTopics,\n })\n .refine(\n (b) => {\n const seen = new Set<string>();\n for (const o of b.options) {\n const key = o.label.trim().toLowerCase();\n if (seen.has(key)) return false;\n seen.add(key);\n }\n return true;\n },\n { error: VALIDATION_MESSAGE.pollOptionsDuplicate, path: ['options'], ...evenWithoutTopics },\n );\nexport type CreatePollBody = z.infer<typeof createPollBodySchema>;\n\n/**\n * Cast or change a vote. The server upserts on (poll, voter), so voting twice\n * replaces rather than doubles. Each option once (0.18.0: `[0, 0]` was taken\n * and silently cut to `[0]`).\n */\nexport const castVoteBodySchema = z.object({\n optionIndices: z\n .array(\n z\n .number()\n .int()\n .min(0)\n .max(POLL_MAX_OPTIONS - 1),\n )\n .min(1)\n .max(POLL_MAX_OPTIONS)\n .refine(eachOnce, { error: VALIDATION_MESSAGE.pollVoteDuplicate }),\n});\nexport type CastVoteBody = z.infer<typeof castVoteBodySchema>;\n\nexport const createCommentBodySchema = z.object({\n text: z.string().trim().min(1).max(COMMENT_MAX_BODY_CHARS),\n /** Null for a top-level comment. */\n parentCommentId: objectIdSchema.nullable(),\n});\nexport type CreateCommentBody = z.infer<typeof createCommentBodySchema>;\n\n/**\n * `PATCH /api/v1/feed/comments/:commentId` (route since 0.8.0): your own\n * comment, within `EDIT_WINDOW_MS` (`EDIT_WINDOW_CLOSED` after), answering\n * `IdResponse`. Sets `editedAt`.\n */\nexport const updateCommentBodySchema = z.object({\n text: z.string().trim().min(1).max(COMMENT_MAX_BODY_CHARS),\n});\nexport type UpdateCommentBody = z.infer<typeof updateCommentBodySchema>;\n\n/**\n * `POST /api/v1/feed/reposts` (0.8.0), answering `IdResponse`: the new repost,\n * which is a post of yours carrying `repostOf`. Undo it by deleting that post.\n *\n * One ACTIVE repost per member per item (`ALREADY_REPOSTED`). Refused on your\n * own item (`CANNOT_REPOST_OWN`), on a repost (`CANNOT_REPOST_A_REPOST`: share\n * the original), on anything deleted or hidden (404), and from a member who\n * cannot write yet (`ONBOARDING_INCOMPLETE`). Undo: `DELETE\n * /api/v1/feed/:contentId` on the repost.\n */\nexport const createRepostBodySchema = z.object({\n sourceKind: contentKindSchema,\n sourceId: objectIdSchema,\n /** Your own words above it. Absent or empty: a plain repost. */\n caption: z.string().trim().max(POST_MAX_BODY_CHARS).optional(),\n});\nexport type CreateRepostBody = z.infer<typeof createRepostBodySchema>;\n\n/**\n * Set or clear a reaction. `null` clears it; at most one per viewer per item.\n * Only an offered reaction can be SET (`REACTION_PICKER_VALUES`): a retired\n * one stays readable on old rows but is not chosen anew.\n */\nexport const setReactionBodySchema = z.object({\n reaction: pickableReactionSchema.nullable(),\n});\nexport type SetReactionBody = z.infer<typeof setReactionBodySchema>;\n\n// ─── Engagement responses ────────────────────────────────────────────────────\n\n/**\n * Returned by the reaction endpoint so the card can render the authoritative\n * result without a follow-up read. Without the fresh counts a client has to\n * guess the new total, and two quick taps leave it showing a number the server\n * never had.\n */\nexport const setReactionResponseSchema = z.object({\n contentKind: engagementTargetKindSchema,\n contentId: objectIdSchema,\n reaction: reactionTypeSchema.nullable(),\n reactionCounts: reactionCountsSchema,\n});\nexport type SetReactionResponse = z.infer<typeof setReactionResponseSchema>;\n\n/**\n * `POST /api/v1/feed/:contentKind/:contentId/score` (2026-11-23, the user:\n * Jansathi's up and down votes into FC), on a post, a poll or a comment;\n * answering `SetScoreVoteResponse`.\n *\n * `vote` is the viewer's vote AFTER the call: `up` or `down` sets it (the\n * other direction flips it), `null` clears it. Re-sending what they already\n * have changes nothing, so a retry is safe; the client's \"tap the same arrow\n * again to take it back\" sends `null`.\n *\n * Refused like a reaction: an item deleted, hidden or not visible to them is\n * 404; a viewer without membership is `MEMBERSHIP_REQUIRED`; in a community,\n * setting one needs membership of it, taking one back only read access. Your\n * OWN post, poll or comment is refused (`CANNOT_VOTE_OWN`, 400; hary's ruling,\n * 2026-11-23, stricter than Jansathi so Top and Hot stay honest): the viewer's\n * `isAuthor` says so, and the control shows the score without being pressable.\n *\n * Only a NEW up vote rings the author's bell (`post_upvote`, `comment_upvote`);\n * a down vote, a flip and a clear are silent. The bell names the voter to the\n * author, as Jansathi's does; the item itself shows only the net score.\n */\nexport const setScoreVoteBodySchema = z.object({\n vote: scoreVoteSchema.nullable(),\n});\nexport type SetScoreVoteBody = z.infer<typeof setScoreVoteBodySchema>;\n\n/** The authoritative result, so the arrows and the number render without a second read. */\nexport const setScoreVoteResponseSchema = z.object({\n contentKind: engagementTargetKindSchema,\n contentId: objectIdSchema,\n vote: scoreVoteSchema.nullable(),\n /** The item's net score after the write. May be negative. */\n score: z.number().int(),\n});\nexport type SetScoreVoteResponse = z.infer<typeof setScoreVoteResponseSchema>;\n\n// ─── Reporting ───────────────────────────────────────────────────────────────\n\n/**\n * Where a report stands (0.18.0: named here; the backend's model kept its own\n * list, and the permission rule that only an open report is decided checked a\n * plain string). Staff-only on the wire. Stored: append only.\n */\nexport const REPORT_STATUS_VALUES = ['open', 'actioned', 'dismissed'] as const;\nexport type ReportStatus = (typeof REPORT_STATUS_VALUES)[number];\n\n/**\n * Why a member reported something.\n *\n * ⚠️ Stored on every report row, so this is data, not a label: removing a value\n * orphans reports already filed under it, and the counts nobody can recover are\n * exactly the ones a moderation review needs. Append only.\n *\n * ⚠️ A REASON THAT IS MISSING DOES NOT DISAPPEAR, it lands in `other`. Whatever\n * is not named here becomes an undifferentiated pile that no aggregate can see\n * a pattern in, which is the one thing report categories exist for. Worth being\n * deliberate about the absences rather than discovering them later.\n */\nexport const REPORT_REASON_VALUES = [\n 'spam',\n 'harassment',\n 'misinformation',\n 'off_topic',\n 'impersonation',\n 'other',\n] as const;\nexport const reportReasonSchema = z.enum(REPORT_REASON_VALUES);\nexport type ReportReason = z.infer<typeof reportReasonSchema>;\n\n/**\n * What a member sends to report a post, poll or comment.\n *\n * The target is the URL's, not the body's: a report is filed against a specific\n * thing at a specific address, and taking the target from the body would let a\n * caller report one item while the route thinks it is another.\n *\n * `note` is free text and optional, which is the pressure valve for everything\n * the enum does not name. ⚠️ It is written by a member, so it is untrusted at\n * render: a moderation queue displays it, and a moderation queue is a screen\n * staff read quickly.\n */\nexport const createReportBodySchema = z.object({\n reason: reportReasonSchema,\n note: z.string().trim().max(REPORT_NOTE_MAX).optional(),\n});\nexport type CreateReportBody = z.infer<typeof createReportBodySchema>;\n\n/**\n * The answer to filing one.\n *\n * `alreadyReported` distinguishes \"we have taken this\" from \"you already told\n * us\", because one report per member per target means a second press is a\n * no-op, and a silent no-op reads as a failure to somebody who pressed twice\n * deliberately. It is NOT a count: how many OTHER people reported an item is\n * moderation's business and telling a reporter would turn the count into a\n * score anyone could farm.\n */\nexport const createReportResponseSchema = z.object({\n /** A post, poll or comment; since 0.6.0 also a product or a review. */\n contentKind: reportTargetKindSchema,\n contentId: objectIdSchema,\n alreadyReported: z.boolean(),\n});\nexport type CreateReportResponse = z.infer<typeof createReportResponseSchema>;\n\n/**\n * `PUT|DELETE /api/v1/feed/comments/:commentId/helpful`: the product's team\n * marks (or unmarks) a comment as feedback that helped. Answers the state it\n * settled on. `FEEDBACK_NOT_MARKABLE` when the comment is not feedback on a\n * product the caller is on the team of.\n */\nexport const commentHelpfulResponseSchema = z.object({\n commentId: objectIdSchema,\n helpfulAt: z.iso.datetime().nullable(),\n});\nexport type CommentHelpfulResponse = z.infer<typeof commentHelpfulResponseSchema>;\n\n/** The bookmark endpoint is a toggle and returns the state it settled on. */\nexport const toggleBookmarkResponseSchema = z.object({\n contentKind: contentKindSchema,\n contentId: objectIdSchema,\n bookmarked: z.boolean(),\n});\nexport type ToggleBookmarkResponse = z.infer<typeof toggleBookmarkResponseSchema>;\n\n/** A vote returns the whole poll: counts, totals and the viewer's own choices\n * all move together, and reassembling them client-side drifts. */\nexport const castVoteResponseSchema = z.object({\n poll: feedPollSchema,\n});\nexport type CastVoteResponse = z.infer<typeof castVoteResponseSchema>;\n\n/**\n * `POST /api/v1/feed/poll/:pollId/close` (2026-11-23): its author (or staff)\n * closes it now. Answers the whole poll, closed, as a vote does. Closing one\n * already closed changes nothing and answers it as it is.\n */\nexport const closePollResponseSchema = castVoteResponseSchema;\nexport type ClosePollResponse = CastVoteResponse;\n"]}
1
+ {"version":3,"file":"feed.js","sourceRoot":"","sources":["../../../src/domains/feed/feed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,sBAAsB,EACtB,cAAc,EACd,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACn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AAS,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC;AAGH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,WAAW,EAAE,iBAAiB;IAC9B,SAAS,EAAE,cAAc;IACzB,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;CACxB,CAAC,CAAC;AAGH;mEACmE;AACnE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,cAAc;CACrB,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,sBAAsB,CAAC","sourcesContent":["/**\n * founder-schema — Feed wire shapes: post, poll, comment, reaction\n *\n * ADAPTED FROM `jansathi-community-schema`, NOT DEPENDENT ON IT.\n *\n * The user ruled on 2026-09-21 that Founder Circle is a standalone app, so\n * these shapes are copied and cut down rather than imported. The reason is\n * worth keeping: `jansathi-community-schema` encodes Jansathi's reach levels,\n * community designations, official-area kinds and crowdfunding audiences.\n * Depending on it would put all of that permanently inside our contract for a\n * feed that has none of those concepts, and would mean a Jansathi publish can\n * break this product.\n *\n * DELIBERATELY NOT PORTED, so nobody \"restores\" them:\n * - the five civic verticals (lost_found, suggestions_complaints,\n * donate_item, crowdfunding, event). `contentKind` here is post | poll\n * only; comment threads and bookmarks key off it, reactions off the same\n * union plus `comment`, and reports off that plus a product and a review\n * (`reportTargetKindSchema`, 0.6.0).\n * - official communities, designations, identity verification badges.\n * - social score, and the whole area-proximity ranking vocabulary\n * (local / district / state / national / global).\n * - `areaLineage` as a REQUIRED authorship snapshot. Jansathi gates its\n * composer on a declared residence resolving to Indian district level or\n * deeper; the user ruled location is never mandatory here, so nothing in\n * this file requires one.\n * - anonymous posting, which in Jansathi is gated on identity verification\n * we do not have. A founders' network is an identified network.\n *\n * @module founder-schema/domains/feed\n */\n\nimport { z } from 'zod';\nimport {\n eachOnce,\n emptyStringToUndefined,\n objectIdSchema,\n paginationQuerySchema,\n} from '../../core/common.js';\nimport { DAY_MS, MEDIA_ALT_MAX, REPORT_NOTE_MAX } from '../../core/limits.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { VALIDATION_MESSAGE } from '../../core/validation.js';\nimport { communityChipSchema } from '../communities/communities.js';\nimport { mediaImageSchema } from '../media/media.js';\nimport { topicSchema } from '../onboarding/onboarding.js';\nimport { productAskSchema, productChipSchema } from '../products/products.js';\nimport { memberBylineSchema } from '../profile/founder-profile.js';\nimport { mentionsSchema } from './mentions.js';\n\n// ─── Limits ──────────────────────────────────────────────────────────────────\n\n/**\n * Exported because the composer must count down to the SAME number the server\n * rejects at. A client-side limit that disagrees with the server is a message\n * a member cannot send and cannot see why.\n */\nexport const POST_MAX_BODY_CHARS = 5000;\n/**\n * Total attachments on one post, images and videos together.\n *\n * ONE cap over ONE ordered list, rather than Jansathi's separate image and\n * video arrays. A member who posts a screenshot, then a clip, then another\n * screenshot means that order, and two parallel arrays cannot express it: the\n * card would show both images and then the video, which is not what was\n * written.\n */\nexport const POST_MAX_MEDIA = 10;\n/**\n * Topics per post or poll.\n *\n * 5 since the user's ruling of 2026-11-23 (\"let user choose up to 5 topics for\n * poll and post, not just 3\"), which also made choosing at least one mandatory\n * on a NEW post or poll (`requiredTopicsSchema`). Still capped: a post tagged\n * with everything is about nothing, and one tagged with ten matches every\n * member, which is how a relevance feature turns back into a chronological one.\n *\n * Feed content only. A product's and a community's topics keep their own caps\n * (`PRODUCT_TOPICS_MAX`, `COMMUNITY_TOPICS_MAX`).\n */\nexport const MAX_TOPICS = 5;\nexport const COMMENT_MAX_BODY_CHARS = 2000;\n\nexport const POLL_QUESTION_MAX_CHARS = 280;\nexport const POLL_OPTION_MAX_CHARS = 80;\nexport const POLL_MIN_OPTIONS = 2;\nexport const POLL_MAX_OPTIONS = 6;\n/** 5 minutes. Below this a poll closes before anyone sees it. */\nexport const POLL_MIN_DURATION_MS = 5 * 60 * 1000;\n/** 30 days. */\nexport const POLL_MAX_DURATION_MS = 30 * DAY_MS;\n\n/**\n * How long after writing it the author may still edit a post or a comment.\n *\n * A window rather than forever: an edit after people have reacted changes what\n * they reacted to. Deletion has no window, because a member must always be able\n * to remove their own words. The server is the gate (`EDIT_WINDOW_CLOSED`);\n * a client uses this to stop offering Edit at the moment the server would\n * start refusing it, instead of on the next reload.\n */\nexport const EDIT_WINDOW_MS = 15 * 60 * 1000;\n\n// ─── Enums ───────────────────────────────────────────────────────────────────\n\n/**\n * What can appear in the feed. Two kinds, not seven.\n *\n * Engagement is keyed by `(contentKind, contentId)` so one engagement bar\n * serves both, and comments hang off the same pair. Adding a kind later is\n * additive; the union is deliberately narrow now so the client never has to\n * handle a kind this product does not have.\n */\nexport const CONTENT_KIND_VALUES = ['post', 'poll'] as const;\nexport const contentKindSchema = z.enum(CONTENT_KIND_VALUES);\nexport type ContentKind = z.infer<typeof contentKindSchema>;\n\n/** What a post's media item is: images only today. The backend's storage's own values, from here like every other list (0.20.0). */\nexport const CONTENT_MEDIA_KIND_VALUES = ['image'] as const;\nexport const contentMediaKindSchema = z.enum(CONTENT_MEDIA_KIND_VALUES);\nexport type ContentMediaKind = z.infer<typeof contentMediaKindSchema>;\n\n/**\n * What a reaction or a report can point at: a feed item, or a comment on one.\n *\n * Wider than `ContentKind` on purpose. A comment carries reaction counts and a\n * viewer reaction, and a comment can be abusive, so both reach it. A bookmark\n * and a comment thread cannot: they take `ContentKind`. Until 0.2.0 the\n * reaction and report RESPONSES were typed `ContentKind` while the routes\n * accepted comments, so every answer about a comment broke this contract.\n */\nexport const ENGAGEMENT_TARGET_KIND_VALUES = [...CONTENT_KIND_VALUES, 'comment'] as const;\n\n/**\n * An up or down vote (2026-11-23): one per member per post, poll or comment,\n * counted into the item's net `score`. See `setScoreVoteBodySchema`.\n */\nexport const SCORE_VOTE_VALUES = ['up', 'down'] as const;\nexport const scoreVoteSchema = z.enum(SCORE_VOTE_VALUES);\nexport type ScoreVote = z.infer<typeof scoreVoteSchema>;\nexport const engagementTargetKindSchema = z.enum(ENGAGEMENT_TARGET_KIND_VALUES);\nexport type EngagementTargetKind = z.infer<typeof engagementTargetKindSchema>;\n\n/**\n * What a member can REPORT (0.6.0): everything a reaction can reach, plus a\n * product page and a review, and (2026-11-23, Jansathi's user reports) a\n * MEMBER themself (`POST /founders/:userId/report`). Each has its own report\n * route; the answer and the moderation queue use this one list.\n */\nexport const REPORT_TARGET_KIND_VALUES = [\n ...ENGAGEMENT_TARGET_KIND_VALUES,\n 'product',\n 'review',\n 'member',\n // A comment ON a product (2026-11-24, `domains/products/product-comments.ts`).\n 'product_comment',\n] as const;\nexport const reportTargetKindSchema = z.enum(REPORT_TARGET_KIND_VALUES);\nexport type ReportTargetKind = z.infer<typeof reportTargetKindSchema>;\n\n/**\n * Every reaction a row can hold. The first four were Founder Circle's own;\n * `love`, `support` and `haha` came from Jansathi in 0.8.0 (the user's set,\n * 2026-10-07), so the feed feels like the community app members know.\n *\n * ⚠️ These values are stored per reaction row, so removing one orphans data.\n * Append only. A value that should no longer be OFFERED leaves\n * `REACTION_PICKER_VALUES` instead, and stays here so old rows still read.\n */\nexport const REACTION_TYPE_VALUES = [\n 'like',\n 'celebrate',\n 'insightful',\n 'curious',\n 'love',\n 'support',\n 'haha',\n] as const;\nexport const reactionTypeSchema = z.enum(REACTION_TYPE_VALUES);\nexport type ReactionType = z.infer<typeof reactionTypeSchema>;\n\n/**\n * What the picker offers, IN ORDER (the user's set, 2026-10-07). A member can\n * set only these; `curious` is no longer offered, but a member who chose it\n * keeps it, sees it as their reaction, and can clear it.\n *\n * The order is the schema's, not a client literal: the backend accepts only\n * these on a write (`setReactionBodySchema`), and two lists that must agree\n * belong in one place.\n */\nexport const REACTION_PICKER_VALUES = [\n 'like',\n 'love',\n 'celebrate',\n 'insightful',\n 'support',\n 'haha',\n] as const satisfies readonly ReactionType[];\nexport const pickableReactionSchema = z.enum(REACTION_PICKER_VALUES);\nexport type PickableReaction = z.infer<typeof pickableReactionSchema>;\n\n/**\n * Feed ordering.\n *\n * new newest first. Still the default here, unlike Jansathi where `hot`\n * leads: a brand-new network ranking a handful of posts by a blended\n * score mostly hides the newest thing somebody just wrote. (Home asks\n * for `ranked`, below, whose freshness term and own-post rule are the\n * answer to that.)\n * top highest net `score` (up minus down votes) first, all time; ties\n * newest first. Until 2026-11-23 it was \"most reacted\".\n * hot (2026-11-23, Jansathi's) a score that decays with age:\n * `(score + 2 * comments) / (hours + 2) ^ 1.5`, recomputed by the server\n * every few minutes for items under `HOT_WINDOW_DAYS` old; older items\n * sit at 0, below anything recent with a positive score.\n */\nexport const FEED_SORT_VALUES = ['new', 'top', 'hot'] as const;\n/** Items older than this are not re-scored for `hot`: by then the decay has taken them to ~0. */\nexport const HOT_WINDOW_DAYS = 7;\nexport const feedSortSchema = z.enum(FEED_SORT_VALUES);\nexport type FeedSort = z.infer<typeof feedSortSchema>;\n\n/**\n * Home's own order (2026-11-24, the user: \"you decide ... as per the best\n * industry standard practice\"). `GET /api/v1/feed` takes every sort above and\n * one more; a community's feed is already one subject and keeps the three.\n *\n * ranked what matters to this member first, as the large social feeds do.\n * Every item of the last `RANKED_FEED_WINDOW_DAYS` days gets one\n * score, the product of four things:\n *\n * affinity who it is from, for this member: someone they\n * follow, a community they joined, a topic they are\n * interested in. Each one met adds; anything else\n * counts as 1, so nothing scores 0.\n * engagement reposts, comments, net votes, reactions and poll\n * answers, each weighed by the effort behind it, with\n * diminishing returns (one viral item cannot camp at\n * the top); a downvoted item sinks. A poll's answer\n * counts what a post's reaction does, so posts and\n * polls stand on one scale.\n * freshness halves every 48 hours.\n * standing lower for what this member already acted on or\n * voted down, so a refresh brings up something new,\n * and lower for a closed poll, which only reports.\n *\n * The member's own post from the last hour leads, so what they just\n * wrote is where they look. No more than two in a row from one\n * member. Nothing the `new` order shows is left out: once the\n * ranked part runs out, everything older follows, newest first\n * (`FeedPage.section`). The weights are the server's\n * (`modules/feed/ranking.ts` in founder-circle-backend), not this\n * contract's.\n *\n * Each page is ranked as of the moment the first page was (the\n * cursor carries it), so new posts wait for the next refresh\n * instead of shifting the pages being read.\n */\nexport const HOME_FEED_SORT_VALUES = [...FEED_SORT_VALUES, 'ranked'] as const;\nexport const homeFeedSortSchema = z.enum(HOME_FEED_SORT_VALUES);\nexport type HomeFeedSort = z.infer<typeof homeFeedSortSchema>;\n\n/** How far back the `ranked` home feed scores items. Older ones follow it, newest first. */\nexport const RANKED_FEED_WINDOW_DAYS = 7;\n\n/**\n * Which part of the `ranked` home feed a page belongs to. Absent on every\n * other list (other sorts, a community's feed, a member's posts, Saved).\n *\n * ranked the scored items of the last `RANKED_FEED_WINDOW_DAYS` days\n * earlier everything older, newest first, once the ranked part has run out\n *\n * A page is never both, so a client can show where one part ends and the\n * next begins.\n */\nexport const FEED_SECTION_VALUES = ['ranked', 'earlier'] as const;\nexport const feedSectionSchema = z.enum(FEED_SECTION_VALUES);\nexport type FeedSection = z.infer<typeof feedSectionSchema>;\n\n/**\n * When a poll's results are shown (2026-11-23, from Jansathi), chosen by its\n * author when they make it and never changed after:\n *\n * live as people vote (the default, and every poll made before this)\n * after_close only once it has closed: until then every option's count is\n * sent as 0 and only how many have voted is shown, so early\n * votes do not sway later ones\n *\n * Applies to everyone, the author included: the author has no special view.\n */\nexport const POLL_RESULTS_VISIBILITY_VALUES = ['live', 'after_close'] as const;\nexport const pollResultsVisibilitySchema = z.enum(POLL_RESULTS_VISIBILITY_VALUES);\nexport type PollResultsVisibility = z.infer<typeof pollResultsVisibilitySchema>;\n\n/**\n * How a thread's comments are ordered (2026-11-23, from Jansathi), chosen by\n * the reader with a switch at the top of the thread:\n *\n * top most engaged first (reactions; ties newest first). The default.\n * newest newest first\n * oldest oldest first: the conversation as it happened (the only order\n * before this)\n *\n * Top-level comments only: replies under a comment always read oldest first.\n * Each order pages with its own cursor: a cursor from one order is not\n * accepted by another (the client starts again when the reader switches).\n */\nexport const COMMENT_SORT_VALUES = ['top', 'newest', 'oldest'] as const;\nexport const commentSortSchema = z.enum(COMMENT_SORT_VALUES);\nexport type CommentSort = z.infer<typeof commentSortSchema>;\n\n/**\n * Counts keyed by reaction type, e.g. `{ like: 4, celebrate: 1 }`. Only the\n * reactions an item actually has need appear.\n *\n * ⚠️ `partialRecord`, NOT `record`. In Zod 4 an enum-keyed `z.record` is\n * EXHAUSTIVE: it demands every key, so `{ like: 4 }` fails with three missing\n * keys and `{}` fails with four. That would force the server to ship a zero for\n * every reaction on every item, and the day a fifth reaction is added every\n * previously stored payload and every older client stops parsing.\n * `partialRecord` keeps the key validation without the exhaustiveness, so an\n * unknown key like Jansathi's `support` is still refused.\n */\nexport const reactionCountsSchema = z.partialRecord(\n reactionTypeSchema,\n z.number().int().nonnegative(),\n);\nexport type ReactionCounts = z.infer<typeof reactionCountsSchema>;\n\n// ─── Author byline ───────────────────────────────────────────────────────────\n\n/**\n * The author as a card renders them: the shared `memberBylineSchema` (0.6.0),\n * which products, reviews and notifications name members with too.\n *\n * Every field here is LIVE, joined against the profile at read time rather\n * than frozen onto the post at write time. So a renamed handle, a new avatar\n * or an edited headline updates on old posts, and the byline link always\n * targets the current username instead of 404ing on a handle that moved.\n *\n * Jansathi additionally snapshots `localName` (\"where the author was when\n * posting\"). Not ported: location is optional here, so a byline that depends\n * on one would be blank for anyone who never set it.\n */\nexport const feedAuthorSchema = memberBylineSchema;\nexport type FeedAuthor = z.infer<typeof feedAuthorSchema>;\n\n// ─── Media ───────────────────────────────────────────────────────────────────\n\n/**\n * A post's image: a processed `mediaImageSchema` (every stored size, ready for\n * `srcset`, plus a placeholder) with the post's own alt text.\n *\n * `width` and `height` are required so a card can reserve the right box before\n * the image loads. Without them every image arrival shifts the feed under the\n * reader's thumb.\n *\n * `thumbnailUrl` is the smallest stored size, for a grid or a notification.\n *\n * URLs here come from our own upload pipeline, so they take a plain `z.url()`\n * rather than `httpUrlSchema`. ⚠️ If a \"paste an image link\" path is ever\n * added, these become member-supplied and must move to `httpUrlSchema`.\n */\nexport const feedImageSchema = mediaImageSchema.extend({\n kind: z.literal('image'),\n thumbnailUrl: z.url().optional(),\n /** Author-supplied alt text. Optional, and worth asking for. */\n alt: z.string().max(MEDIA_ALT_MAX).optional(),\n});\nexport type FeedImage = z.infer<typeof feedImageSchema>;\n\n/**\n * What a post carries, in the order it was attached. IMAGES ONLY (0.18.0):\n * video is shared as a link in the post text (the user's decision,\n * 2026-09-21), and the uploaded-video shape this used to admit described a\n * server-made poster frame no server makes. `kind` stays, so a stored item\n * says what it is.\n */\nexport const feedMediaSchema = feedImageSchema;\nexport type FeedMedia = z.infer<typeof feedMediaSchema>;\n\n// ─── Viewer state ────────────────────────────────────────────────────────────\n\n/**\n * What THIS viewer has done to this item, computed per request.\n *\n * Optional as a block, because an unauthenticated or server-rendered read has\n * no viewer. ⚠️ A client must treat an absent `viewer` as \"no state known\",\n * never as \"has not reacted\": rendering an empty reaction button off a missing\n * block is how a member sees their own reaction disappear on reload.\n */\nexport const viewerStateSchema = z.object({\n reaction: reactionTypeSchema.nullable(),\n /** This viewer's up or down vote on it, or null (2026-11-23, `setScoreVoteBodySchema`). */\n myVote: scoreVoteSchema.nullable(),\n bookmarked: z.boolean(),\n isAuthor: z.boolean(),\n\n /**\n * What this viewer may DO, decided by the server and sent as plain answers.\n *\n * Not role data for the client to reason about. The moment a client derives\n * \"can I edit this\" from roles and ownership, that derivation is a second\n * implementation of the rule, it drifts from the server's, and the drift is\n * invisible until the two disagree: either a button that 403s or a button\n * that should not have been there. `isAuthor` stays because the byline reads\n * differently for your own post, not because the client should compute rights\n * from it.\n *\n * `canEdit` is false once the edit window closes, so it is not simply\n * `isAuthor`.\n */\n canEdit: z.boolean(),\n canDelete: z.boolean(),\n canReport: z.boolean(),\n});\nexport type ViewerState = z.infer<typeof viewerStateSchema>;\n\n/**\n * The viewer's state on a post or a poll: everything above, plus reposting\n * (0.8.0). Comments cannot be reposted, so they keep `viewerStateSchema`.\n */\nexport const contentViewerStateSchema = viewerStateSchema.extend({\n /**\n * The viewer's own ACTIVE repost of this item, or null. An id rather than a\n * boolean because undoing it is deleting that post (`DELETE\n * /api/v1/feed/:contentId`), and a client holding only \"true\" would have to\n * go and find it.\n */\n repostId: objectIdSchema.nullable(),\n /**\n * Whether a repost may be made now, decided by the server: false on your\n * own item, on a repost (repost the original instead), on an item hidden by\n * staff, while you already have one (undo it first), and for a member who\n * cannot write yet (no finished, active profile: `ONBOARDING_INCOMPLETE`).\n */\n canRepost: z.boolean(),\n /**\n * On content inside a community only (0.9.0): whether this viewer may take\n * part in it now (react, comment, vote, save, edit): an active member of a\n * community that is not archived. False for someone who can read it but has\n * not joined (a public community's reader, staff): offer Join instead of\n * the controls. `canEdit` is false too whenever this is.\n *\n * TAKING BACK needs only read access (0.18.0, the server's rule since\n * 0.9.0): someone who left, or a community since archived, may still remove\n * their reaction, their vote or their save, so a client gates only SETTING\n * one on this. Reporting is safety, open to any signed-in reader who did not\n * write it (`canReport`, 0.13.0), joined or not.\n */\n canTakePart: z.boolean().optional(),\n});\nexport type ContentViewerState = z.infer<typeof contentViewerStateSchema>;\n\n// ─── Repost ──────────────────────────────────────────────────────────────────\n\n/**\n * What a repost carries of the item it shares (0.8.0), computed when READ:\n * the byline is live, and an edit to the original shows in every repost of it.\n *\n * `unavailable` once the original is deleted, hidden by staff, or its\n * author's account is gone. The repost stays (it is its author's post, with\n * their words), and says the original is no longer there, rather than\n * vanishing from under the people who commented on it.\n */\nexport const repostedSourceSchema = z.discriminatedUnion('state', [\n z.object({\n state: z.literal('available'),\n contentKind: contentKindSchema,\n id: objectIdSchema,\n author: feedAuthorSchema,\n /** A post's whole text, or a poll's question. */\n text: z.string().max(POST_MAX_BODY_CHARS),\n /** The original's first attachment, for the card's thumbnail. */\n media: feedMediaSchema.optional(),\n /** The product the original is about, live, as on the original. */\n product: productChipSchema.optional(),\n createdAt: z.iso.datetime(),\n }),\n z.object({\n state: z.literal('unavailable'),\n contentKind: contentKindSchema,\n id: objectIdSchema,\n }),\n]);\nexport type RepostedSource = z.infer<typeof repostedSourceSchema>;\n\n// ─── Post ────────────────────────────────────────────────────────────────────\n\n/**\n * A post as the feed and the single-post page receive it.\n *\n * Counts are denormalised onto the row so one document serves a whole card.\n *\n * `score` (2026-11-23): the user decided to bring Jansathi's up and down votes\n * over, on posts, polls and comments. It is the NET count, up minus down, and\n * can be negative. It ranks the `top` and `hot` sorts; reactions stay the\n * expressive layer and rank nothing.\n */\nexport const feedPostSchema = z.object({\n id: objectIdSchema,\n contentKind: z.literal('post'),\n author: feedAuthorSchema,\n\n /**\n * The WHOLE body, never a server-side truncation.\n *\n * So there is no \"was this shortened\" flag and no second fetch to read the\n * rest: the card clamps visually and expands in place. At a 5,000 character\n * cap a page of twenty posts is small enough that trimming would cost a round\n * trip to save nothing. If that ever stops being true, a truncation flag is\n * an additive change; a client that has been guessing is not.\n */\n text: z.string().max(POST_MAX_BODY_CHARS),\n /** The `@handles` in `text` that are live members (2026-11-23, `mentions.ts`). */\n mentions: mentionsSchema,\n /** Ordered as the author attached them. */\n media: z.array(feedMediaSchema).max(POST_MAX_MEDIA),\n /**\n * What this post is ABOUT, from the same vocabulary a member picks as their\n * interests. This is the whole mechanism behind a relevant feed: matching is\n * an intersection of two lists drawn from one enum, not a guess from who\n * wrote it.\n *\n * ⚠️ An EMPTY array is still READ: a post written before 2026-11-23 (when\n * topics became mandatory on a new post) and every repost carry none, so\n * interest matching cannot reach them and they are only ever found\n * chronologically. A NEW post cannot be written without one\n * (`requiredTopicsSchema`).\n */\n topics: z.array(topicSchema).max(MAX_TOPICS),\n\n /**\n * The product this post is about, live-joined (0.6.0). Absent when it names\n * none, and when the product has since been deleted or hidden by staff: the\n * post stays, the chip goes. Every comment on a post with a product is that\n * product's feedback.\n */\n product: productChipSchema.optional(),\n /** What the post asks of the community about its product. Only with `product`. */\n ask: productAskSchema.optional(),\n\n /**\n * The community it was posted in (0.9.0): \"in AI Builders\". Absent on\n * general content. Never alongside `product`, `ask` or `repostOf`:\n * community content carries no product and is never reposted.\n */\n community: communityChipSchema.optional(),\n /** When a moderator pinned it as one of its community's announcements (0.9.0). */\n pinnedAt: z.iso.datetime().optional(),\n\n /**\n * Present only on a REPOST (0.8.0): the item this post shares, with `text`\n * as the reposter's own words above it (empty for a plain repost) and no\n * media of its own. A repost cannot be reposted; its own `repostCount` is\n * always 0.\n */\n repostOf: repostedSourceSchema.optional(),\n\n commentCount: z.number().int().nonnegative(),\n reactionCounts: reactionCountsSchema,\n /** Up votes minus down votes (2026-11-23). May be negative. */\n score: z.number().int(),\n /** Active reposts of this item (0.8.0); an undone or removed one no longer counts. */\n repostCount: z.number().int().nonnegative(),\n\n createdAt: z.iso.datetime(),\n /** Null when never edited. The edit window is the server's to enforce. */\n editedAt: z.iso.datetime().nullable(),\n\n viewer: contentViewerStateSchema.optional(),\n});\nexport type FeedPost = z.infer<typeof feedPostSchema>;\n\n// ─── Poll ────────────────────────────────────────────────────────────────────\n\n/**\n * One choice. `index` is the identifier a vote refers to, not the label:\n * sending indices avoids ambiguity between two options whose labels differ\n * only by case, spacing or an invisible character.\n */\nexport const pollOptionSchema = z.object({\n index: z\n .number()\n .int()\n .min(0)\n .max(POLL_MAX_OPTIONS - 1),\n label: z.string().min(1).max(POLL_OPTION_MAX_CHARS),\n voteCount: z.number().int().nonnegative(),\n});\nexport type PollOption = z.infer<typeof pollOptionSchema>;\n\n/**\n * A poll. Its own kind, not a post with extra fields, because votes are their\n * own records keyed by (poll, voter) and a post has nothing equivalent.\n *\n * Polls are not editable. Changing a question or an option after a vote has\n * been cast silently re-purposes that vote. A poll closes at its `closesAt`,\n * or earlier when its author closes it (2026-11-23, `POST\n * /feed/poll/:pollId/close`; staff may too, audited): `closesAt` becomes that\n * moment, so a closed poll reads the same however it closed.\n */\nexport const feedPollSchema = z.object({\n id: objectIdSchema,\n contentKind: z.literal('poll'),\n author: feedAuthorSchema,\n\n question: z.string().min(1).max(POLL_QUESTION_MAX_CHARS),\n /** As on a post: the `@handles` in `question` that are live members (2026-11-23). */\n mentions: mentionsSchema,\n options: z.array(pollOptionSchema).min(POLL_MIN_OPTIONS).max(POLL_MAX_OPTIONS),\n /** Unique voters, not votes: with multi-select the two differ. */\n totalVoters: z.number().int().nonnegative(),\n allowsMultipleChoices: z.boolean(),\n closesAt: z.iso.datetime(),\n /**\n * Whether the poll is closed, decided by the SERVER's clock.\n *\n * Derivable from `closesAt`, and deliberately sent anyway: a device with a\n * wrong clock would otherwise show a live poll as finished, or offer a vote\n * the server then rejects, and the member sees a control that lies. `closesAt`\n * stays for rendering \"closes in 2 days\"; this is what gates the control.\n */\n isClosed: z.boolean(),\n /**\n * When its results show (2026-11-23). `after_close` on an open poll: every\n * `voteCount` is 0 on the wire and `totalVoters` is real, so a client shows\n * \"N have voted\" and the results once `isClosed`. Defaults to `live` for an\n * answer from before the field.\n */\n resultsVisibility: pollResultsVisibilitySchema.default('live'),\n\n /** As on a post. A poll is feed content and is matched the same way. */\n topics: z.array(topicSchema).max(MAX_TOPICS),\n\n /** As on a post: \"which onboarding flow should we ship?\", about a product. */\n product: productChipSchema.optional(),\n ask: productAskSchema.optional(),\n /** As on a post (0.9.0). */\n community: communityChipSchema.optional(),\n pinnedAt: z.iso.datetime().optional(),\n\n commentCount: z.number().int().nonnegative(),\n reactionCounts: reactionCountsSchema,\n /** As on a post (2026-11-23). */\n score: z.number().int(),\n /** As on a post (0.8.0). */\n repostCount: z.number().int().nonnegative(),\n\n createdAt: z.iso.datetime(),\n /** Always null. Kept so one byline component renders both kinds. */\n editedAt: z.iso.datetime().nullable(),\n\n viewer: contentViewerStateSchema\n .extend({\n /** Indices this viewer chose. Empty means not voted yet, and it is\n * always populated for the viewer: a voter can always see their own\n * answer even where others' results are hidden. */\n votedOptionIndices: z.array(z.number().int().nonnegative()),\n /**\n * Whether this viewer may close it now (2026-11-23), decided by the\n * server: its author, or staff who may remove it, while it is open.\n * Absent from an answer from before the field: read as false.\n */\n canClose: z.boolean().optional(),\n })\n .optional(),\n});\nexport type FeedPoll = z.infer<typeof feedPollSchema>;\n\n// ─── The feed item union ─────────────────────────────────────────────────────\n\n/**\n * Discriminated on `contentKind`, so a client narrows with a switch and the\n * compiler catches an unhandled kind the day one is added. A plain union would\n * need every field checked by hand and would silently accept a hybrid.\n */\nexport const feedItemSchema = z.discriminatedUnion('contentKind', [feedPostSchema, feedPollSchema]);\nexport type FeedItem = z.infer<typeof feedItemSchema>;\n\n// ─── Comments ────────────────────────────────────────────────────────────────\n\n/**\n * A comment, one level of nesting only: a reply to a comment is allowed, a\n * reply to a reply is not. Two levels stay readable on a phone; three do not,\n * and the server is what enforces it.\n */\nexport const feedCommentSchema = z.object({\n id: objectIdSchema,\n contentKind: contentKindSchema,\n contentId: objectIdSchema,\n /** Null for a top-level comment. A non-null value may only name a top-level\n * comment, never a reply. */\n parentCommentId: objectIdSchema.nullable(),\n author: feedAuthorSchema,\n\n text: z.string().max(COMMENT_MAX_BODY_CHARS),\n /** As on a post: the `@handles` in `text` that are live members (2026-11-23). */\n mentions: mentionsSchema,\n\n /** Meaningful only on a top-level comment; always 0 on a reply. */\n replyCount: z.number().int().nonnegative(),\n reactionCounts: reactionCountsSchema,\n /** Up votes minus down votes, as on a post (2026-11-23). May be negative. */\n score: z.number().int(),\n\n /**\n * When the product's team marked this comment as feedback that helped\n * (0.6.0), or null. Only a comment on a post tagged with a product, written\n * by someone outside that product's team, can carry it; it earns its writer\n * contribution points.\n */\n helpfulAt: z.iso.datetime().nullable(),\n\n /**\n * Whether the person who wrote the post or poll wrote this comment\n * (2026-11-23): the thread marks it \"Author\", so their answers stand out.\n * False for an answer from before the field.\n */\n byItemAuthor: z.boolean().default(false),\n\n createdAt: z.iso.datetime(),\n editedAt: z.iso.datetime().nullable(),\n\n /** No `bookmarked`: the post is the right thing to save, not a comment. */\n viewer: viewerStateSchema\n .omit({ bookmarked: true })\n .extend({\n /**\n * The control is theirs now (0.12.0). On a comment from outside the\n * team of the post's product: unmarked, marking it is acting for the\n * product (a member on its team, the product open); marked, taking the\n * mark back needs only being on the team, member or not, whatever the\n * product's state.\n */\n canMarkHelpful: z.boolean(),\n })\n .optional(),\n});\nexport type FeedComment = z.infer<typeof feedCommentSchema>;\n\n// ─── Queries ─────────────────────────────────────────────────────────────────\n\n/**\n * `GET /api/v1/feed`. Inherits `limit` and `cursor`, which already tolerate an\n * emptied control rather than answering 400.\n *\n * `sort` is any of `HOME_FEED_SORT_VALUES`: `new` when omitted, as before;\n * Home asks for `ranked` (2026-11-24). A cursor from one sort is not accepted\n * by another: it reads as \"from the top\".\n *\n * `interests=true` narrows to the viewer's topics (falling back to the plain\n * feed when they have none). `z.stringbool`, so `true`/`false`/`1`/`0` all\n * read as a person means them; until 0.2.0 the backend read this parameter\n * raw, outside the schema, and only the exact string `true` counted. Not with\n * `ranked`, which weighs the viewer's interests instead of filtering by them:\n * there it is ignored.\n *\n * ⚠ NO `authorId`. It was accepted here and then ignored by the server, so a\n * profile page asking for one founder's posts silently got everybody's. A\n * member's own posts are `GET /api/v1/feed/by-author/:userId`.\n */\nexport const feedQuerySchema = paginationQuerySchema.extend({\n sort: z.preprocess(emptyStringToUndefined, homeFeedSortSchema.default('new')),\n interests: z.preprocess(emptyStringToUndefined, z.stringbool().default(false)),\n});\nexport type FeedQuery = z.infer<typeof feedQuerySchema>;\nexport type FeedQueryInput = z.input<typeof feedQuerySchema>;\n\n/**\n * `GET /api/v1/communities/:communityId/feed` (2026-11-23: it takes the\n * feed's `sort` too, `new` by default as before). No `interests`: a community\n * is already one subject.\n */\nexport const communityFeedQuerySchema = paginationQuerySchema.extend({\n sort: z.preprocess(emptyStringToUndefined, feedSortSchema.default('new')),\n});\nexport type CommunityFeedQuery = z.infer<typeof communityFeedQuerySchema>;\n\n/** `GET /api/v1/feed/:contentKind/:contentId/comments`. */\nexport const commentsQuerySchema = paginationQuerySchema.extend({\n /** Omitted lists top-level comments; set, it lists that comment's replies. */\n parentCommentId: z.preprocess(emptyStringToUndefined, objectIdSchema.optional()),\n /**\n * The order of top-level comments (2026-11-23), `top` when omitted. Ignored\n * for replies, which are always oldest first.\n */\n sort: z.preprocess(emptyStringToUndefined, commentSortSchema.default('top')),\n});\nexport type CommentsQuery = z.infer<typeof commentsQuerySchema>;\nexport type CommentsQueryInput = z.input<typeof commentsQuerySchema>;\n\n/**\n * `GET /api/v1/feed/:contentKind/:contentId/reactions` (0.8.0): who reacted,\n * newest first. `contentKind` is post, poll or comment, as for reacting.\n * `type` narrows to one reaction (a tab); absent lists every reaction (All).\n */\nexport const reactionsQuerySchema = paginationQuerySchema.extend({\n type: z.preprocess(emptyStringToUndefined, reactionTypeSchema.optional()),\n});\nexport type ReactionsQuery = z.infer<typeof reactionsQuerySchema>;\nexport type ReactionsQueryInput = z.input<typeof reactionsQuerySchema>;\n\n// ─── Route parameters ────────────────────────────────────────────────────────\n\n/**\n * Every id and kind in a feed URL, as a schema, so a bad one answers exactly\n * as a bad body field does: 400 `VALIDATION_ERROR`, the issue at\n * `location: 'params'`. Until 0.2.0 these were hand checks that answered\n * \"Invalid id.\" with no issues at all, and the comment routes never looked at\n * `:contentKind`.\n */\n\n/** `GET /feed/:id`, the permalink. */\nexport const feedItemParamsSchema = z.object({ id: objectIdSchema });\n\n/** `PATCH|DELETE /feed/:contentId`. */\nexport const contentParamsSchema = z.object({ contentId: objectIdSchema });\n\n/** A bookmark and a comment thread: a post or a poll. */\nexport const contentTargetParamsSchema = z.object({\n contentKind: contentKindSchema,\n contentId: objectIdSchema,\n});\n\n/** A reaction and a report: a post, a poll or a comment. */\nexport const engagementTargetParamsSchema = z.object({\n contentKind: engagementTargetKindSchema,\n contentId: objectIdSchema,\n});\n\n/** `POST|DELETE /feed/poll/:pollId/vote`. */\nexport const pollParamsSchema = z.object({ pollId: objectIdSchema });\n\n/** `DELETE /feed/comments/:commentId`. */\nexport const commentParamsSchema = z.object({ commentId: objectIdSchema });\n\n/** `GET /feed/by-author/:userId`. */\nexport const authorParamsSchema = z.object({ userId: objectIdSchema });\n\nexport type FeedItemParams = z.infer<typeof feedItemParamsSchema>;\nexport type ContentParams = z.infer<typeof contentParamsSchema>;\nexport type ContentTargetParams = z.infer<typeof contentTargetParamsSchema>;\nexport type EngagementTargetParams = z.infer<typeof engagementTargetParamsSchema>;\nexport type PollParams = z.infer<typeof pollParamsSchema>;\nexport type CommentParams = z.infer<typeof commentParamsSchema>;\nexport type AuthorParams = z.infer<typeof authorParamsSchema>;\n\n// ─── Pages ───────────────────────────────────────────────────────────────────\n\n/**\n * A page of the feed, and of one member's posts (`by-author`), which is the\n * same shape. `nextCursor` is null on the last page.\n *\n * `section` (2026-11-24) only on the `ranked` home feed: which part of it the\n * page is from (`FEED_SECTION_VALUES`). Optional, so every other list, and a\n * client that predates it, reads the page exactly as before.\n */\nexport const feedPageSchema = paginatedSchema(feedItemSchema).extend({\n section: feedSectionSchema.optional(),\n});\nexport type FeedPage = z.infer<typeof feedPageSchema>;\n\n/**\n * A community's pinned announcements (0.9.0), most recently pinned first, at\n * most `COMMUNITY_PINS_MAX` (domains/communities). Never paged.\n */\nexport const pinnedItemsSchema = z.object({ items: z.array(feedItemSchema) });\nexport type PinnedItems = z.infer<typeof pinnedItemsSchema>;\n\n/** A page of a thread: top-level comments, or one comment's replies. */\nexport const commentPageSchema = paginatedSchema(feedCommentSchema);\nexport type CommentPage = z.infer<typeof commentPageSchema>;\n\n/**\n * One row of \"who reacted\" (0.8.0).\n *\n * `reactedAt` is when they reacted, and the list's order: CHANGING a\n * reaction updates it in place, so the row keeps its position (and moves from\n * one tab to another) instead of jumping to the top under a reader's cursor.\n * Taking it back and reacting again is a new reaction, from then.\n *\n * Only members who can be shown are listed: an erased account's reactions are\n * withdrawn with it, and a paused, suspended or never-onboarded member is\n * left out of the list.\n * `reactionCounts` still counts every reaction, so a tab can list fewer\n * people than its number says. That is deliberate: dropping a suspended\n * member's reaction from the count would make it jump back on reinstatement.\n */\nexport const reactorSchema = z.object({\n member: memberBylineSchema,\n reaction: reactionTypeSchema,\n reactedAt: z.iso.datetime(),\n});\nexport type Reactor = z.infer<typeof reactorSchema>;\nexport const reactorPageSchema = paginatedSchema(reactorSchema);\nexport type ReactorPage = z.infer<typeof reactorPageSchema>;\n\n/**\n * A comment on a product's Feedback tab (`GET /products/:id/feedback`): the\n * comment as a thread shows it, plus whether its writer is already a\n * confirmed tester, so the team's \"Confirm as tester\" knows without paging\n * through `/testers`.\n */\nexport const productFeedbackItemSchema = feedCommentSchema.extend({\n authorIsTester: z.boolean(),\n});\nexport type ProductFeedbackItem = z.infer<typeof productFeedbackItemSchema>;\nexport const productFeedbackPageSchema = paginatedSchema(productFeedbackItemSchema);\nexport type ProductFeedbackPage = z.infer<typeof productFeedbackPageSchema>;\n\n// ─── Write bodies ────────────────────────────────────────────────────────────\n\n/**\n * ⚠️ Every write body below is its own object with NO defaults, and none of\n * them is built with `.pick().partial()`. `.partial()` does not switch off\n * `.default()`, so a patch body built that way rewrites defaulted fields on\n * every request. See `updateFounderProfileBodySchema` for the incident.\n */\n\n/**\n * An attachment on the way IN: the id of an image already uploaded and\n * completed (`media`), and deliberately not a URL.\n *\n * ⚠ The first draft of this took the full read shape, URL included. That is\n * the same hole that was closed on the profile: a URL in a write body is a\n * member-supplied URL, so a post could have carried `javascript:` in an image\n * source, and nothing downstream re-checks a value the server itself stored.\n * Taking an id instead removes the question rather than validating it.\n *\n * `width`, `height` and the URLs are NOT accepted either: the server measured\n * them when it processed the upload, and taking them from the client would let\n * a caller claim a 1x1 image and collapse the card.\n *\n * The server attaches each id only if it is the caller's, processed, uploaded\n * for a post, and not attached anywhere yet (`UPLOAD_NOT_ATTACHABLE`\n * otherwise), so one upload can never appear on two posts.\n */\nexport const attachedMediaSchema = z.object({\n mediaId: objectIdSchema,\n /** Author-supplied alt text, the one media field a member does write. */\n alt: z.string().trim().max(MEDIA_ALT_MAX).optional(),\n});\nexport type AttachedMedia = z.infer<typeof attachedMediaSchema>;\n\n/**\n * Which of the author's products a post or poll is about, and what it asks.\n * Set when it is written and NEVER EDITABLE afterwards: moving a post to\n * another product after people replied would move their feedback with it.\n * The server accepts only a product the author is on the team of\n * (`PRODUCT_NOT_YOURS`) and that is not archived (`PRODUCT_ARCHIVED`).\n */\nconst aboutAProduct = {\n productId: objectIdSchema.optional(),\n /** Only with `productId` (`askWithoutProduct`). */\n ask: productAskSchema.optional(),\n};\nconst askNeedsProduct = (b: { productId?: string; ask?: string }) =>\n b.ask === undefined || b.productId !== undefined;\n\n/**\n * Which community it is posted in (0.9.0), set when written and never moved.\n * The author must be an active member (`COMMUNITY_JOIN_REQUIRED`) and it must\n * not be archived (`COMMUNITY_ARCHIVED`). Community content carries no product\n * and no ask (`communityWithProduct`); the server checks that too.\n */\nconst inACommunity = { communityId: objectIdSchema.optional() };\nconst communityWithoutProduct = (b: { communityId?: string; productId?: string; ask?: string }) =>\n b.communityId === undefined || (b.productId === undefined && b.ask === undefined);\n\n/**\n * A post must carry something: text, media, or (a repost) the item it\n * reposts. ONE rule for writing and editing (0.18.0): an edit may clear the\n * text of a post that keeps its photos or its repost, and only a post that\n * would be left with nothing is refused (`postEmpty`, on `text`). The create\n * body checks it here; an edit can only be checked where the stored post is\n * known, so the server applies this same function there.\n */\nexport function postHasContent(post: {\n text?: string | null;\n mediaCount: number;\n isRepost: boolean;\n}): boolean {\n return Boolean(post.text?.trim().length) || post.mediaCount > 0 || post.isRepost;\n}\n\n/**\n * A NEW post's or poll's topics: 1 to `MAX_TOPICS` (the user's ruling,\n * 2026-11-23: \"make choosing the topics mandatory\"). Before it a post could be\n * written untagged, and an untagged post is one interest matching never finds.\n *\n * Absent, `null` or empty: `topicsRequired`, on `topics`. More than\n * `MAX_TOPICS`: Zod's `too_big` with `maximum`. The same topic twice:\n * `topicsDuplicate` (hary, 2026-11-23: as a community's topics), so two of one\n * cannot fill the count. Write bodies only: the read shapes keep allowing none\n * (older posts, and every repost).\n *\n * A REPOST takes no topics of its own (`createRepostBodySchema`, stored empty:\n * it stays out of interest matching so one item is not matched twice), and an\n * EDIT never touches them (`updatePostBodySchema` is the text alone).\n */\nexport const requiredTopicsSchema = z\n .array(topicSchema, {\n error: (issue) =>\n issue.input === undefined || issue.input === null\n ? VALIDATION_MESSAGE.topicsRequired\n : undefined,\n })\n .min(1, { error: VALIDATION_MESSAGE.topicsRequired })\n .max(MAX_TOPICS)\n .refine(eachOnce, { error: VALIDATION_MESSAGE.topicsDuplicate });\n\n/**\n * A create body's own rules run even while `topics` is the ONLY field that\n * failed (2026-11-23). Zod skips an object's refinements once any field has\n * failed, so an empty post with no topic said only \"choose a topic\", and\n * \"write something\" came a round later: two rounds for two mistakes made at\n * once. When any OTHER field fails they are still skipped, so a rule never\n * reads a value of the wrong type.\n */\nconst evenWithoutTopics = {\n when: (payload: { issues: readonly { path?: readonly PropertyKey[] }[] }) =>\n payload.issues.every((issue) => issue.path?.[0] === 'topics'),\n};\n\nexport const createPostBodySchema = z\n .object({\n text: z.string().trim().max(POST_MAX_BODY_CHARS).optional(),\n /** Already uploaded and completed. See `attachedMediaSchema`. Order is preserved. */\n media: z.array(attachedMediaSchema).max(POST_MAX_MEDIA).optional(),\n /** Required since 2026-11-23: see `requiredTopicsSchema`. */\n topics: requiredTopicsSchema,\n ...aboutAProduct,\n ...inACommunity,\n })\n .refine(\n (b) => postHasContent({ text: b.text, mediaCount: b.media?.length ?? 0, isRepost: false }),\n {\n error: VALIDATION_MESSAGE.postEmpty,\n path: ['text'],\n ...evenWithoutTopics,\n },\n )\n .refine((b) => eachOnce(b.media?.map((m) => m.mediaId) ?? []), {\n error: VALIDATION_MESSAGE.mediaDuplicate,\n path: ['media'],\n ...evenWithoutTopics,\n })\n .refine(askNeedsProduct, {\n error: VALIDATION_MESSAGE.askWithoutProduct,\n path: ['ask'],\n ...evenWithoutTopics,\n })\n .refine(communityWithoutProduct, {\n error: VALIDATION_MESSAGE.communityWithProduct,\n path: ['communityId'],\n ...evenWithoutTopics,\n });\nexport type CreatePostBody = z.infer<typeof createPostBodySchema>;\n\n/**\n * Only the text is editable. Changing media after the fact makes every\n * earlier reply look like a reply to something else. Empty text is allowed\n * here and refused by the server only when the post would carry nothing\n * (`postHasContent`): a photo's caption can be cleared, a text post's cannot.\n */\nexport const updatePostBodySchema = z.object({\n text: z.string().trim().max(POST_MAX_BODY_CHARS),\n});\nexport type UpdatePostBody = z.infer<typeof updatePostBodySchema>;\n\nexport const createPollBodySchema = z\n .object({\n question: z.string().trim().min(1).max(POLL_QUESTION_MAX_CHARS),\n options: z\n .array(z.object({ label: z.string().trim().min(1).max(POLL_OPTION_MAX_CHARS) }))\n .min(POLL_MIN_OPTIONS)\n .max(POLL_MAX_OPTIONS),\n /**\n * Duration from now, NOT an absolute closing time. A client whose clock is\n * wrong would otherwise open a poll that is already closed, and the member\n * would have no way to tell why.\n */\n durationMs: z.number().int().min(POLL_MIN_DURATION_MS).max(POLL_MAX_DURATION_MS),\n allowsMultipleChoices: z.boolean(),\n /** When its results show (2026-11-23); set once, here. Omitted: `live`. */\n resultsVisibility: pollResultsVisibilitySchema.default('live'),\n /** As on a post: required since 2026-11-23 (`requiredTopicsSchema`). */\n topics: requiredTopicsSchema,\n ...aboutAProduct,\n ...inACommunity,\n })\n .refine(askNeedsProduct, {\n error: VALIDATION_MESSAGE.askWithoutProduct,\n path: ['ask'],\n ...evenWithoutTopics,\n })\n .refine(communityWithoutProduct, {\n error: VALIDATION_MESSAGE.communityWithProduct,\n path: ['communityId'],\n ...evenWithoutTopics,\n })\n .refine(\n (b) => {\n const seen = new Set<string>();\n for (const o of b.options) {\n const key = o.label.trim().toLowerCase();\n if (seen.has(key)) return false;\n seen.add(key);\n }\n return true;\n },\n { error: VALIDATION_MESSAGE.pollOptionsDuplicate, path: ['options'], ...evenWithoutTopics },\n );\nexport type CreatePollBody = z.infer<typeof createPollBodySchema>;\n\n/**\n * Cast or change a vote. The server upserts on (poll, voter), so voting twice\n * replaces rather than doubles. Each option once (0.18.0: `[0, 0]` was taken\n * and silently cut to `[0]`).\n */\nexport const castVoteBodySchema = z.object({\n optionIndices: z\n .array(\n z\n .number()\n .int()\n .min(0)\n .max(POLL_MAX_OPTIONS - 1),\n )\n .min(1)\n .max(POLL_MAX_OPTIONS)\n .refine(eachOnce, { error: VALIDATION_MESSAGE.pollVoteDuplicate }),\n});\nexport type CastVoteBody = z.infer<typeof castVoteBodySchema>;\n\nexport const createCommentBodySchema = z.object({\n text: z.string().trim().min(1).max(COMMENT_MAX_BODY_CHARS),\n /** Null for a top-level comment. */\n parentCommentId: objectIdSchema.nullable(),\n});\nexport type CreateCommentBody = z.infer<typeof createCommentBodySchema>;\n\n/**\n * `PATCH /api/v1/feed/comments/:commentId` (route since 0.8.0): your own\n * comment, within `EDIT_WINDOW_MS` (`EDIT_WINDOW_CLOSED` after), answering\n * `IdResponse`. Sets `editedAt`.\n */\nexport const updateCommentBodySchema = z.object({\n text: z.string().trim().min(1).max(COMMENT_MAX_BODY_CHARS),\n});\nexport type UpdateCommentBody = z.infer<typeof updateCommentBodySchema>;\n\n/**\n * `POST /api/v1/feed/reposts` (0.8.0), answering `IdResponse`: the new repost,\n * which is a post of yours carrying `repostOf`. Undo it by deleting that post.\n *\n * One ACTIVE repost per member per item (`ALREADY_REPOSTED`). Refused on your\n * own item (`CANNOT_REPOST_OWN`), on a repost (`CANNOT_REPOST_A_REPOST`: share\n * the original), on anything deleted or hidden (404), and from a member who\n * cannot write yet (`ONBOARDING_INCOMPLETE`). Undo: `DELETE\n * /api/v1/feed/:contentId` on the repost.\n */\nexport const createRepostBodySchema = z.object({\n sourceKind: contentKindSchema,\n sourceId: objectIdSchema,\n /** Your own words above it. Absent or empty: a plain repost. */\n caption: z.string().trim().max(POST_MAX_BODY_CHARS).optional(),\n});\nexport type CreateRepostBody = z.infer<typeof createRepostBodySchema>;\n\n/**\n * Set or clear a reaction. `null` clears it; at most one per viewer per item.\n * Only an offered reaction can be SET (`REACTION_PICKER_VALUES`): a retired\n * one stays readable on old rows but is not chosen anew.\n */\nexport const setReactionBodySchema = z.object({\n reaction: pickableReactionSchema.nullable(),\n});\nexport type SetReactionBody = z.infer<typeof setReactionBodySchema>;\n\n// ─── Engagement responses ────────────────────────────────────────────────────\n\n/**\n * Returned by the reaction endpoint so the card can render the authoritative\n * result without a follow-up read. Without the fresh counts a client has to\n * guess the new total, and two quick taps leave it showing a number the server\n * never had.\n */\nexport const setReactionResponseSchema = z.object({\n contentKind: engagementTargetKindSchema,\n contentId: objectIdSchema,\n reaction: reactionTypeSchema.nullable(),\n reactionCounts: reactionCountsSchema,\n});\nexport type SetReactionResponse = z.infer<typeof setReactionResponseSchema>;\n\n/**\n * `POST /api/v1/feed/:contentKind/:contentId/score` (2026-11-23, the user:\n * Jansathi's up and down votes into FC), on a post, a poll or a comment;\n * answering `SetScoreVoteResponse`.\n *\n * `vote` is the viewer's vote AFTER the call: `up` or `down` sets it (the\n * other direction flips it), `null` clears it. Re-sending what they already\n * have changes nothing, so a retry is safe; the client's \"tap the same arrow\n * again to take it back\" sends `null`.\n *\n * Refused like a reaction: an item deleted, hidden or not visible to them is\n * 404; a viewer without membership is `MEMBERSHIP_REQUIRED`; in a community,\n * setting one needs membership of it, taking one back only read access. Your\n * OWN post, poll or comment is refused (`CANNOT_VOTE_OWN`, 400; hary's ruling,\n * 2026-11-23, stricter than Jansathi so Top and Hot stay honest): the viewer's\n * `isAuthor` says so, and the control shows the score without being pressable.\n *\n * Only a NEW up vote rings the author's bell (`post_upvote`, `comment_upvote`);\n * a down vote, a flip and a clear are silent. The bell names the voter to the\n * author, as Jansathi's does; the item itself shows only the net score.\n */\nexport const setScoreVoteBodySchema = z.object({\n vote: scoreVoteSchema.nullable(),\n});\nexport type SetScoreVoteBody = z.infer<typeof setScoreVoteBodySchema>;\n\n/** The authoritative result, so the arrows and the number render without a second read. */\nexport const setScoreVoteResponseSchema = z.object({\n contentKind: engagementTargetKindSchema,\n contentId: objectIdSchema,\n vote: scoreVoteSchema.nullable(),\n /** The item's net score after the write. May be negative. */\n score: z.number().int(),\n});\nexport type SetScoreVoteResponse = z.infer<typeof setScoreVoteResponseSchema>;\n\n// ─── Reporting ───────────────────────────────────────────────────────────────\n\n/**\n * Where a report stands (0.18.0: named here; the backend's model kept its own\n * list, and the permission rule that only an open report is decided checked a\n * plain string). Staff-only on the wire. Stored: append only.\n */\nexport const REPORT_STATUS_VALUES = ['open', 'actioned', 'dismissed'] as const;\nexport type ReportStatus = (typeof REPORT_STATUS_VALUES)[number];\n\n/**\n * Why a member reported something.\n *\n * ⚠️ Stored on every report row, so this is data, not a label: removing a value\n * orphans reports already filed under it, and the counts nobody can recover are\n * exactly the ones a moderation review needs. Append only.\n *\n * ⚠️ A REASON THAT IS MISSING DOES NOT DISAPPEAR, it lands in `other`. Whatever\n * is not named here becomes an undifferentiated pile that no aggregate can see\n * a pattern in, which is the one thing report categories exist for. Worth being\n * deliberate about the absences rather than discovering them later.\n */\nexport const REPORT_REASON_VALUES = [\n 'spam',\n 'harassment',\n 'misinformation',\n 'off_topic',\n 'impersonation',\n 'other',\n] as const;\nexport const reportReasonSchema = z.enum(REPORT_REASON_VALUES);\nexport type ReportReason = z.infer<typeof reportReasonSchema>;\n\n/**\n * What a member sends to report a post, poll or comment.\n *\n * The target is the URL's, not the body's: a report is filed against a specific\n * thing at a specific address, and taking the target from the body would let a\n * caller report one item while the route thinks it is another.\n *\n * `note` is free text and optional, which is the pressure valve for everything\n * the enum does not name. ⚠️ It is written by a member, so it is untrusted at\n * render: a moderation queue displays it, and a moderation queue is a screen\n * staff read quickly.\n */\nexport const createReportBodySchema = z.object({\n reason: reportReasonSchema,\n note: z.string().trim().max(REPORT_NOTE_MAX).optional(),\n});\nexport type CreateReportBody = z.infer<typeof createReportBodySchema>;\n\n/**\n * The answer to filing one.\n *\n * `alreadyReported` distinguishes \"we have taken this\" from \"you already told\n * us\", because one report per member per target means a second press is a\n * no-op, and a silent no-op reads as a failure to somebody who pressed twice\n * deliberately. It is NOT a count: how many OTHER people reported an item is\n * moderation's business and telling a reporter would turn the count into a\n * score anyone could farm.\n */\nexport const createReportResponseSchema = z.object({\n /** A post, poll or comment; since 0.6.0 also a product or a review. */\n contentKind: reportTargetKindSchema,\n contentId: objectIdSchema,\n alreadyReported: z.boolean(),\n});\nexport type CreateReportResponse = z.infer<typeof createReportResponseSchema>;\n\n/**\n * `PUT|DELETE /api/v1/feed/comments/:commentId/helpful`: the product's team\n * marks (or unmarks) a comment as feedback that helped. Answers the state it\n * settled on. `FEEDBACK_NOT_MARKABLE` when the comment is not feedback on a\n * product the caller is on the team of.\n */\nexport const commentHelpfulResponseSchema = z.object({\n commentId: objectIdSchema,\n helpfulAt: z.iso.datetime().nullable(),\n});\nexport type CommentHelpfulResponse = z.infer<typeof commentHelpfulResponseSchema>;\n\n/** The bookmark endpoint is a toggle and returns the state it settled on. */\nexport const toggleBookmarkResponseSchema = z.object({\n contentKind: contentKindSchema,\n contentId: objectIdSchema,\n bookmarked: z.boolean(),\n});\nexport type ToggleBookmarkResponse = z.infer<typeof toggleBookmarkResponseSchema>;\n\n/** A vote returns the whole poll: counts, totals and the viewer's own choices\n * all move together, and reassembling them client-side drifts. */\nexport const castVoteResponseSchema = z.object({\n poll: feedPollSchema,\n});\nexport type CastVoteResponse = z.infer<typeof castVoteResponseSchema>;\n\n/**\n * `POST /api/v1/feed/poll/:pollId/close` (2026-11-23): its author (or staff)\n * closes it now. Answers the whole poll, closed, as a vote does. Closing one\n * already closed changes nothing and answers it as it is.\n */\nexport const closePollResponseSchema = castVoteResponseSchema;\nexport type ClosePollResponse = CastVoteResponse;\n"]}
@@ -79,6 +79,7 @@ export declare const MODERATION_ACTIONS_BY_TARGET_KIND: {
79
79
  readonly poll: readonly ["dismiss", "hide", "restore", "remove"];
80
80
  readonly comment: readonly ["dismiss", "hide", "restore", "remove"];
81
81
  readonly review: readonly ["dismiss", "hide", "restore", "remove"];
82
+ readonly product_comment: readonly ["dismiss", "hide", "restore", "remove"];
82
83
  readonly product: readonly ["dismiss", "hide", "restore"];
83
84
  readonly member: readonly ["dismiss"];
84
85
  };
@@ -92,6 +93,7 @@ export declare const moderationItemSchema: z.ZodObject<{
92
93
  poll: "poll";
93
94
  comment: "comment";
94
95
  review: "review";
96
+ product_comment: "product_comment";
95
97
  }>;
96
98
  id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
97
99
  }, z.core.$strip>;
@@ -155,6 +157,7 @@ export declare const moderationPageSchema: z.ZodObject<{
155
157
  poll: "poll";
156
158
  comment: "comment";
157
159
  review: "review";
160
+ product_comment: "product_comment";
158
161
  }>;
159
162
  id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
160
163
  }, z.core.$strip>;
@@ -231,6 +234,7 @@ export declare const moderationTargetParamsSchema: z.ZodObject<{
231
234
  poll: "poll";
232
235
  comment: "comment";
233
236
  review: "review";
237
+ product_comment: "product_comment";
234
238
  }>;
235
239
  contentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
236
240
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"moderation.d.ts","sourceRoot":"","sources":["../../../src/domains/moderation/moderation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB;;;GAGG;AACH,eAAO,MAAM,8BAA8B,gDAAiD,CAAC;AAC7F,eAAO,MAAM,2BAA2B;;;;;EAAyC,CAAC;AAClF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,6DAA6D;AAC7D,eAAO,MAAM,uBAAuB,2CAA4C,CAAC;AACjF,eAAO,MAAM,qBAAqB;;;;EAAkC,CAAC;AACrE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,wBAAwB,mDAAoD,CAAC;AAC1F,eAAO,MAAM,sBAAsB;;;;;EAAmC,CAAC;AACvE,MA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AK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEvF,+EAA+E;AAC/E,eAAO,MAAM,4BAA4B;;;;;;;;;;;iBAGvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,2DAA2D;AAC3D,eAAO,MAAM,4BAA4B;;;;;;;;iBAIvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
@@ -67,6 +67,7 @@ export const MODERATION_ACTIONS_BY_TARGET_KIND = {
67
67
  poll: MODERATION_ACTION_VALUES,
68
68
  comment: MODERATION_ACTION_VALUES,
69
69
  review: MODERATION_ACTION_VALUES,
70
+ product_comment: MODERATION_ACTION_VALUES,
70
71
  product: ['dismiss', 'hide', 'restore'],
71
72
  // A member (2026-11-23): staff read the report and dismiss it here; a
72
73
  // suspension is the member directory's (`/members/:memberId/suspension`),
@@ -1 +1 @@
1
- {"version":3,"file":"moderation.js","sourceRoot":"","sources":["../../../src/domains/moderation/moderation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAyB,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAA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,SAAS,CAAC,CAAC;CACtF,CAAC,CAAC;AAIH,+EAA+E;AAC/E,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,WAAW,EAAE,sBAAsB;IACnC,SAAS,EAAE,cAAc;CAC1B,CAAC,CAAC;AAGH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,sBAAsB;IAC9B,gFAAgF;IAChF,IAAI,EAAE,qBAAqB,CAAC,mBAAmB,CAAC;CACjD,CAAC,CAAC","sourcesContent":["/**\n * founder-schema: moderation\n *\n * GET /api/v1/moderation/queue ?limit&cursor\n * what members reported and nobody has decided on, oldest report first\n * GET /api/v1/moderation/content ?state&limit&cursor\n * by state, newest first: visible is posts and polls by when posted;\n * hidden and removed also hold comments (so a hidden comment can be\n * found and put back), by when hidden or removed\n * A decision that changes nothing (hiding what is already hidden, removing\n * what its author deleted) leaves the reports open and writes nothing: for\n * those, dismiss.\n * POST /api/v1/moderation/:contentKind/:contentId/decision { action, note? }\n * decide on one post, poll, comment, product or review; answers the\n * item as it now is\n *\n * PRODUCTS AND REVIEWS (0.6.0) are reported and decided here too. A product is\n * hidden or restored, never removed by staff (it is its team's work; hiding\n * takes it out of Discover and off every page but its team's). A review is\n * hidden, restored or removed like a comment. The hidden and removed lists\n * hold them too, so a hidden product can be found and put back.\n *\n * ONE ITEM PER THING, NOT PER REPORT. Five members reporting one post is one\n * row with five reports, so a moderator decides once. The queue's order is\n * the oldest open report first: whoever has waited longest is seen first, and\n * a pile-on cannot jump the line.\n *\n * THE DECISIONS\n * dismiss it stays up; its open reports close as dismissed\n * hide out of every feed and thread, kept, restorable; reports actioned\n * restore a hidden item goes back up\n * remove deleted as its author deleting it would (counts move), not\n * restorable from here; reports actioned\n * Every decision on someone else's content is written to the audit log, with\n * the note when there is one.\n *\n * A report's `note` was written by a member: untrusted text, shown as text.\n *\n * @module founder-schema/domains/moderation\n */\n\nimport { z } from 'zod';\nimport {\n emptyStringToUndefined,\n objectIdSchema,\n optionalTrimmedString,\n paginationQuerySchema,\n} from '../../core/common.js';\nimport { MODERATION_EXCERPT_MAX, MODERATION_NOTE_MAX } from '../../core/limits.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { type ReportTargetKind, reportReasonSchema, reportTargetKindSchema } from '../feed/feed.js';\nimport { personSchema } from '../people/person.js';\n\n/**\n * Where something is read in the app: a post or poll, or a product page (for a\n * product, and for a review of it), or the member's page (for a member).\n */\nexport const MODERATION_CONTEXT_KIND_VALUES = ['post', 'poll', 'product', 'member'] as const;\nexport const moderationContextKindSchema = z.enum(MODERATION_CONTEXT_KIND_VALUES);\nexport type ModerationContextKind = z.infer<typeof moderationContextKindSchema>;\n\n/** Where a post, poll, comment, product or review stands. */\nexport const MODERATION_STATE_VALUES = ['visible', 'hidden', 'removed'] as const;\nexport const moderationStateSchema = z.enum(MODERATION_STATE_VALUES);\nexport type ModerationState = z.infer<typeof moderationStateSchema>;\n\nexport const MODERATION_ACTION_VALUES = ['dismiss', 'hide', 'restore', 'remove'] as const;\nexport const moderationActionSchema = z.enum(MODERATION_ACTION_VALUES);\nexport type ModerationAction = z.infer<typeof moderationActionSchema>;\n\n/**\n * Which decisions apply to which kind of thing: everything, except that a\n * product is never removed by staff (it is its team's work; hiding it takes it\n * out of Discover and off every page but its team's). The decision dialog\n * offers these, and the server refuses anything else with\n * `MODERATION_ACTION_INVALID`. Exhaustive by type.\n */\nexport const MODERATION_ACTIONS_BY_TARGET_KIND = {\n post: MODERATION_ACTION_VALUES,\n poll: MODERATION_ACTION_VALUES,\n comment: MODERATION_ACTION_VALUES,\n review: MODERATION_ACTION_VALUES,\n product: ['dismiss', 'hide', 'restore'],\n // A member (2026-11-23): staff read the report and dismiss it here; a\n // suspension is the member directory's (`/members/:memberId/suspension`),\n // which the queue links to. Nothing to hide or remove on a person.\n member: ['dismiss'],\n} as const satisfies Record<ReportTargetKind, readonly ModerationAction[]>;\n\nconst count = z.number().int().min(0);\n\n/** One post, poll, comment, product or review as moderation sees it. */\nexport const moderationItemSchema = z.object({\n target: z.object({ kind: reportTargetKindSchema, id: objectIdSchema }),\n /**\n * Where it is read in the app: the post or poll itself, or the one a comment\n * is on; the product page for a product or a review.\n */\n content: z.object({ kind: moderationContextKindSchema, id: objectIdSchema }),\n /**\n * Its first words AS THEY ARE NOW, cut to `MODERATION_EXCERPT_MAX`: a poll's\n * question, a product's name and tagline, a review's stars and text.\n */\n excerpt: z.string().max(MODERATION_EXCERPT_MAX),\n /**\n * The words as they were when first reported, when the author has edited\n * them since (0.8.0): both are shown, so an edit can neither hide what was\n * reported nor slip new words past a moderator judging the old ones.\n * Absent when unedited since the report.\n */\n asReported: z.string().max(MODERATION_EXCERPT_MAX).optional(),\n /** Who wrote it; for a product, its owner (0.20.0: the person, with a handle to link). */\n author: personSchema,\n createdAt: z.iso.datetime(),\n state: moderationStateSchema,\n reports: z.object({\n /** Reports nobody has decided on. */\n open: count,\n /** Every report ever filed about it. */\n total: count,\n /** Why it was reported, among the open ones, most-given first. */\n reasons: z.array(z.object({ reason: reportReasonSchema, count })),\n /** The reporters' notes, among the open ones, newest first (a few, not all). */\n notes: z.array(z.string()),\n /** When the oldest open report was filed. Null when none is open. */\n oldestOpenAt: z.iso.datetime().nullable(),\n }),\n /** What the asking staff member may do to it now. */\n viewer: z.object({\n canDismiss: z.boolean(),\n canHide: z.boolean(),\n canRestore: z.boolean(),\n canRemove: z.boolean(),\n }),\n});\nexport type ModerationItem = z.infer<typeof moderationItemSchema>;\n\nexport const moderationPageSchema = paginatedSchema(moderationItemSchema);\nexport type ModerationPage = z.infer<typeof moderationPageSchema>;\n\n/** `GET /moderation/content`. Visible when not said. */\nexport const moderationContentQuerySchema = paginationQuerySchema.extend({\n state: z.preprocess(emptyStringToUndefined, moderationStateSchema.default('visible')),\n});\nexport type ModerationContentQuery = z.infer<typeof moderationContentQuerySchema>;\nexport type ModerationContentQueryInput = z.input<typeof moderationContentQuerySchema>;\n\n/** `POST /moderation/:contentKind/:contentId/decision`: what is decided on. */\nexport const moderationTargetParamsSchema = z.object({\n contentKind: reportTargetKindSchema,\n contentId: objectIdSchema,\n});\nexport type ModerationTargetParams = z.infer<typeof moderationTargetParamsSchema>;\n\n/** `POST /moderation/:contentKind/:contentId/decision`. */\nexport const moderationDecisionBodySchema = z.object({\n action: moderationActionSchema,\n /** Why, for the audit log. Optional: an obvious spam removal needs no essay. */\n note: optionalTrimmedString(MODERATION_NOTE_MAX),\n});\nexport type ModerationDecisionBody = z.infer<typeof moderationDecisionBodySchema>;\n"]}
1
+ {"version":3,"file":"moderation.js","sourceRoot":"","sources":["../../../src/domains/moderation/moderation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAyB,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAC;AAC7F,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;AAGlF,6DAA6D;AAC7D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AACjF,MAAM,CAAC,MAAM,qBA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,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,sBAAsB;IAC9B,gFAAgF;IAChF,IAAI,EAAE,qBAAqB,CAAC,mBAAmB,CAAC;CACjD,CAAC,CAAC","sourcesContent":["/**\n * founder-schema: moderation\n *\n * GET /api/v1/moderation/queue ?limit&cursor\n * what members reported and nobody has decided on, oldest report first\n * GET /api/v1/moderation/content ?state&limit&cursor\n * by state, newest first: visible is posts and polls by when posted;\n * hidden and removed also hold comments (so a hidden comment can be\n * found and put back), by when hidden or removed\n * A decision that changes nothing (hiding what is already hidden, removing\n * what its author deleted) leaves the reports open and writes nothing: for\n * those, dismiss.\n * POST /api/v1/moderation/:contentKind/:contentId/decision { action, note? }\n * decide on one post, poll, comment, product or review; answers the\n * item as it now is\n *\n * PRODUCTS AND REVIEWS (0.6.0) are reported and decided here too. A product is\n * hidden or restored, never removed by staff (it is its team's work; hiding\n * takes it out of Discover and off every page but its team's). A review is\n * hidden, restored or removed like a comment. The hidden and removed lists\n * hold them too, so a hidden product can be found and put back.\n *\n * ONE ITEM PER THING, NOT PER REPORT. Five members reporting one post is one\n * row with five reports, so a moderator decides once. The queue's order is\n * the oldest open report first: whoever has waited longest is seen first, and\n * a pile-on cannot jump the line.\n *\n * THE DECISIONS\n * dismiss it stays up; its open reports close as dismissed\n * hide out of every feed and thread, kept, restorable; reports actioned\n * restore a hidden item goes back up\n * remove deleted as its author deleting it would (counts move), not\n * restorable from here; reports actioned\n * Every decision on someone else's content is written to the audit log, with\n * the note when there is one.\n *\n * A report's `note` was written by a member: untrusted text, shown as text.\n *\n * @module founder-schema/domains/moderation\n */\n\nimport { z } from 'zod';\nimport {\n emptyStringToUndefined,\n objectIdSchema,\n optionalTrimmedString,\n paginationQuerySchema,\n} from '../../core/common.js';\nimport { MODERATION_EXCERPT_MAX, MODERATION_NOTE_MAX } from '../../core/limits.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { type ReportTargetKind, reportReasonSchema, reportTargetKindSchema } from '../feed/feed.js';\nimport { personSchema } from '../people/person.js';\n\n/**\n * Where something is read in the app: a post or poll, or a product page (for a\n * product, and for a review of it), or the member's page (for a member).\n */\nexport const MODERATION_CONTEXT_KIND_VALUES = ['post', 'poll', 'product', 'member'] as const;\nexport const moderationContextKindSchema = z.enum(MODERATION_CONTEXT_KIND_VALUES);\nexport type ModerationContextKind = z.infer<typeof moderationContextKindSchema>;\n\n/** Where a post, poll, comment, product or review stands. */\nexport const MODERATION_STATE_VALUES = ['visible', 'hidden', 'removed'] as const;\nexport const moderationStateSchema = z.enum(MODERATION_STATE_VALUES);\nexport type ModerationState = z.infer<typeof moderationStateSchema>;\n\nexport const MODERATION_ACTION_VALUES = ['dismiss', 'hide', 'restore', 'remove'] as const;\nexport const moderationActionSchema = z.enum(MODERATION_ACTION_VALUES);\nexport type ModerationAction = z.infer<typeof moderationActionSchema>;\n\n/**\n * Which decisions apply to which kind of thing: everything, except that a\n * product is never removed by staff (it is its team's work; hiding it takes it\n * out of Discover and off every page but its team's). The decision dialog\n * offers these, and the server refuses anything else with\n * `MODERATION_ACTION_INVALID`. Exhaustive by type.\n */\nexport const MODERATION_ACTIONS_BY_TARGET_KIND = {\n post: MODERATION_ACTION_VALUES,\n poll: MODERATION_ACTION_VALUES,\n comment: MODERATION_ACTION_VALUES,\n review: MODERATION_ACTION_VALUES,\n product_comment: MODERATION_ACTION_VALUES,\n product: ['dismiss', 'hide', 'restore'],\n // A member (2026-11-23): staff read the report and dismiss it here; a\n // suspension is the member directory's (`/members/:memberId/suspension`),\n // which the queue links to. Nothing to hide or remove on a person.\n member: ['dismiss'],\n} as const satisfies Record<ReportTargetKind, readonly ModerationAction[]>;\n\nconst count = z.number().int().min(0);\n\n/** One post, poll, comment, product or review as moderation sees it. */\nexport const moderationItemSchema = z.object({\n target: z.object({ kind: reportTargetKindSchema, id: objectIdSchema }),\n /**\n * Where it is read in the app: the post or poll itself, or the one a comment\n * is on; the product page for a product or a review.\n */\n content: z.object({ kind: moderationContextKindSchema, id: objectIdSchema }),\n /**\n * Its first words AS THEY ARE NOW, cut to `MODERATION_EXCERPT_MAX`: a poll's\n * question, a product's name and tagline, a review's stars and text.\n */\n excerpt: z.string().max(MODERATION_EXCERPT_MAX),\n /**\n * The words as they were when first reported, when the author has edited\n * them since (0.8.0): both are shown, so an edit can neither hide what was\n * reported nor slip new words past a moderator judging the old ones.\n * Absent when unedited since the report.\n */\n asReported: z.string().max(MODERATION_EXCERPT_MAX).optional(),\n /** Who wrote it; for a product, its owner (0.20.0: the person, with a handle to link). */\n author: personSchema,\n createdAt: z.iso.datetime(),\n state: moderationStateSchema,\n reports: z.object({\n /** Reports nobody has decided on. */\n open: count,\n /** Every report ever filed about it. */\n total: count,\n /** Why it was reported, among the open ones, most-given first. */\n reasons: z.array(z.object({ reason: reportReasonSchema, count })),\n /** The reporters' notes, among the open ones, newest first (a few, not all). */\n notes: z.array(z.string()),\n /** When the oldest open report was filed. Null when none is open. */\n oldestOpenAt: z.iso.datetime().nullable(),\n }),\n /** What the asking staff member may do to it now. */\n viewer: z.object({\n canDismiss: z.boolean(),\n canHide: z.boolean(),\n canRestore: z.boolean(),\n canRemove: z.boolean(),\n }),\n});\nexport type ModerationItem = z.infer<typeof moderationItemSchema>;\n\nexport const moderationPageSchema = paginatedSchema(moderationItemSchema);\nexport type ModerationPage = z.infer<typeof moderationPageSchema>;\n\n/** `GET /moderation/content`. Visible when not said. */\nexport const moderationContentQuerySchema = paginationQuerySchema.extend({\n state: z.preprocess(emptyStringToUndefined, moderationStateSchema.default('visible')),\n});\nexport type ModerationContentQuery = z.infer<typeof moderationContentQuerySchema>;\nexport type ModerationContentQueryInput = z.input<typeof moderationContentQuerySchema>;\n\n/** `POST /moderation/:contentKind/:contentId/decision`: what is decided on. */\nexport const moderationTargetParamsSchema = z.object({\n contentKind: reportTargetKindSchema,\n contentId: objectIdSchema,\n});\nexport type ModerationTargetParams = z.infer<typeof moderationTargetParamsSchema>;\n\n/** `POST /moderation/:contentKind/:contentId/decision`. */\nexport const moderationDecisionBodySchema = z.object({\n action: moderationActionSchema,\n /** Why, for the audit log. Optional: an obvious spam removal needs no essay. */\n note: optionalTrimmedString(MODERATION_NOTE_MAX),\n});\nexport type ModerationDecisionBody = z.infer<typeof moderationDecisionBodySchema>;\n"]}