founder-schema 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +200 -0
- package/dist/chat.d.ts +139 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +146 -0
- package/dist/chat.js.map +1 -0
- package/dist/common.d.ts +228 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/common.js +248 -0
- package/dist/common.js.map +1 -0
- package/dist/discover.d.ts +153 -0
- package/dist/discover.d.ts.map +1 -0
- package/dist/discover.js +54 -0
- package/dist/discover.js.map +1 -0
- package/dist/feed.d.ts +1310 -0
- package/dist/feed.d.ts.map +1 -0
- package/dist/feed.js +593 -0
- package/dist/feed.js.map +1 -0
- package/dist/founder-profile.d.ts +357 -0
- package/dist/founder-profile.d.ts.map +1 -0
- package/dist/founder-profile.js +180 -0
- package/dist/founder-profile.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/onboarding.d.ts +638 -0
- package/dist/onboarding.d.ts.map +1 -0
- package/dist/onboarding.js +547 -0
- package/dist/onboarding.js.map +1 -0
- package/dist/responses/common.d.ts +49 -0
- package/dist/responses/common.d.ts.map +1 -0
- package/dist/responses/common.js +44 -0
- package/dist/responses/common.js.map +1 -0
- package/dist/responses/index.d.ts +7 -0
- package/dist/responses/index.d.ts.map +1 -0
- package/dist/responses/index.js +7 -0
- package/dist/responses/index.js.map +1 -0
- package/package.json +51 -0
package/dist/feed.d.ts
ADDED
|
@@ -0,0 +1,1310 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* founder-schema — Feed wire shapes: post, poll, comment, reaction
|
|
3
|
+
*
|
|
4
|
+
* ADAPTED FROM `jansathi-community-schema`, NOT DEPENDENT ON IT.
|
|
5
|
+
*
|
|
6
|
+
* The user ruled on 2026-09-21 that Founder Circle is a standalone app, so
|
|
7
|
+
* these shapes are copied and cut down rather than imported. The reason is
|
|
8
|
+
* worth keeping: `jansathi-community-schema` encodes Jansathi's reach levels,
|
|
9
|
+
* community designations, official-area kinds and crowdfunding audiences.
|
|
10
|
+
* Depending on it would put all of that permanently inside our contract for a
|
|
11
|
+
* feed that has none of those concepts, and would mean a Jansathi publish can
|
|
12
|
+
* break this product.
|
|
13
|
+
*
|
|
14
|
+
* DELIBERATELY NOT PORTED, so nobody "restores" them:
|
|
15
|
+
* - the five civic verticals (lost_found, suggestions_complaints,
|
|
16
|
+
* donate_item, crowdfunding, event). `contentKind` here is post | poll
|
|
17
|
+
* only, and comments and reactions key off that narrower union.
|
|
18
|
+
* - official communities, designations, identity verification badges.
|
|
19
|
+
* - social score, and the whole area-proximity ranking vocabulary
|
|
20
|
+
* (local / district / state / national / global).
|
|
21
|
+
* - `areaLineage` as a REQUIRED authorship snapshot. Jansathi gates its
|
|
22
|
+
* composer on a declared residence resolving to Indian district level or
|
|
23
|
+
* deeper; the user ruled location is never mandatory here, so nothing in
|
|
24
|
+
* this file requires one.
|
|
25
|
+
* - anonymous posting, which in Jansathi is gated on identity verification
|
|
26
|
+
* we do not have. A founders' network is an identified network.
|
|
27
|
+
*
|
|
28
|
+
* @module founder-schema/feed
|
|
29
|
+
*/
|
|
30
|
+
import { z } from 'zod';
|
|
31
|
+
/**
|
|
32
|
+
* Exported because the composer must count down to the SAME number the server
|
|
33
|
+
* rejects at. A client-side limit that disagrees with the server is a message
|
|
34
|
+
* a member cannot send and cannot see why.
|
|
35
|
+
*/
|
|
36
|
+
export declare const POST_MAX_BODY_CHARS = 5000;
|
|
37
|
+
/**
|
|
38
|
+
* Total attachments on one post, images and videos together.
|
|
39
|
+
*
|
|
40
|
+
* ONE cap over ONE ordered list, rather than Jansathi's separate image and
|
|
41
|
+
* video arrays. A member who posts a screenshot, then a clip, then another
|
|
42
|
+
* screenshot means that order, and two parallel arrays cannot express it: the
|
|
43
|
+
* card would show both images and then the video, which is not what was
|
|
44
|
+
* written.
|
|
45
|
+
*/
|
|
46
|
+
export declare const POST_MAX_MEDIA = 10;
|
|
47
|
+
/**
|
|
48
|
+
* Topics per item.
|
|
49
|
+
*
|
|
50
|
+
* Capped low on purpose: a post tagged with everything is about nothing, and
|
|
51
|
+
* one tagged with ten matches every member, which is how a relevance feature
|
|
52
|
+
* turns back into a chronological one.
|
|
53
|
+
*/
|
|
54
|
+
export declare const MAX_TOPICS = 3;
|
|
55
|
+
export declare const COMMENT_MAX_BODY_CHARS = 2000;
|
|
56
|
+
export declare const POLL_QUESTION_MAX_CHARS = 280;
|
|
57
|
+
export declare const POLL_OPTION_MAX_CHARS = 80;
|
|
58
|
+
export declare const POLL_MIN_OPTIONS = 2;
|
|
59
|
+
export declare const POLL_MAX_OPTIONS = 6;
|
|
60
|
+
/** 5 minutes. Below this a poll closes before anyone sees it. */
|
|
61
|
+
export declare const POLL_MIN_DURATION_MS: number;
|
|
62
|
+
/** 30 days. */
|
|
63
|
+
export declare const POLL_MAX_DURATION_MS: number;
|
|
64
|
+
/**
|
|
65
|
+
* What can appear in the feed. Two kinds, not seven.
|
|
66
|
+
*
|
|
67
|
+
* Engagement is keyed by `(contentKind, contentId)` so one engagement bar
|
|
68
|
+
* serves both, and comments hang off the same pair. Adding a kind later is
|
|
69
|
+
* additive; the union is deliberately narrow now so the client never has to
|
|
70
|
+
* handle a kind this product does not have.
|
|
71
|
+
*/
|
|
72
|
+
export declare const CONTENT_KIND_VALUES: readonly ["post", "poll"];
|
|
73
|
+
export declare const contentKindSchema: z.ZodEnum<{
|
|
74
|
+
post: "post";
|
|
75
|
+
poll: "poll";
|
|
76
|
+
}>;
|
|
77
|
+
export type ContentKind = z.infer<typeof contentKindSchema>;
|
|
78
|
+
/**
|
|
79
|
+
* Reactions. Jansathi's `support` is dropped: it exists for reacting to a
|
|
80
|
+
* civic complaint or a lost-and-found notice, which this feed does not carry.
|
|
81
|
+
*
|
|
82
|
+
* ⚠️ These values are stored per reaction row, so removing one orphans data.
|
|
83
|
+
* Append only.
|
|
84
|
+
*/
|
|
85
|
+
export declare const REACTION_TYPE_VALUES: readonly ["like", "celebrate", "insightful", "curious"];
|
|
86
|
+
export declare const reactionTypeSchema: z.ZodEnum<{
|
|
87
|
+
like: "like";
|
|
88
|
+
celebrate: "celebrate";
|
|
89
|
+
insightful: "insightful";
|
|
90
|
+
curious: "curious";
|
|
91
|
+
}>;
|
|
92
|
+
export type ReactionType = z.infer<typeof reactionTypeSchema>;
|
|
93
|
+
/**
|
|
94
|
+
* Feed ordering.
|
|
95
|
+
*
|
|
96
|
+
* `new` is the default here, unlike Jansathi where `hot` leads. A hot ranking
|
|
97
|
+
* needs volume to be meaningful, and a brand-new network ranking a handful of
|
|
98
|
+
* posts by a blended score mostly hides the newest thing somebody just wrote.
|
|
99
|
+
* Revisit when there is enough content for `hot` to mean anything.
|
|
100
|
+
*/
|
|
101
|
+
export declare const FEED_SORT_VALUES: readonly ["new", "top"];
|
|
102
|
+
export declare const feedSortSchema: z.ZodEnum<{
|
|
103
|
+
new: "new";
|
|
104
|
+
top: "top";
|
|
105
|
+
}>;
|
|
106
|
+
export type FeedSort = z.infer<typeof feedSortSchema>;
|
|
107
|
+
/**
|
|
108
|
+
* Counts keyed by reaction type, e.g. `{ like: 4, celebrate: 1 }`. Only the
|
|
109
|
+
* reactions an item actually has need appear.
|
|
110
|
+
*
|
|
111
|
+
* ⚠️ `partialRecord`, NOT `record`. In Zod 4 an enum-keyed `z.record` is
|
|
112
|
+
* EXHAUSTIVE: it demands every key, so `{ like: 4 }` fails with three missing
|
|
113
|
+
* keys and `{}` fails with four. That would force the server to ship a zero for
|
|
114
|
+
* every reaction on every item, and the day a fifth reaction is added every
|
|
115
|
+
* previously stored payload and every older client stops parsing.
|
|
116
|
+
* `partialRecord` keeps the key validation without the exhaustiveness, so an
|
|
117
|
+
* unknown key like Jansathi's `support` is still refused.
|
|
118
|
+
*/
|
|
119
|
+
export declare const reactionCountsSchema: z.ZodRecord<z.ZodEnum<{
|
|
120
|
+
like: "like";
|
|
121
|
+
celebrate: "celebrate";
|
|
122
|
+
insightful: "insightful";
|
|
123
|
+
curious: "curious";
|
|
124
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
125
|
+
export type ReactionCounts = z.infer<typeof reactionCountsSchema>;
|
|
126
|
+
/**
|
|
127
|
+
* The author as a card renders them.
|
|
128
|
+
*
|
|
129
|
+
* Every field here is LIVE, joined against the profile at read time rather
|
|
130
|
+
* than frozen onto the post at write time. So a renamed handle, a new avatar
|
|
131
|
+
* or an edited headline updates on old posts, and the byline link always
|
|
132
|
+
* targets the current username instead of 404ing on a handle that moved.
|
|
133
|
+
*
|
|
134
|
+
* Jansathi additionally snapshots `localName` ("where the author was when
|
|
135
|
+
* posting"). Not ported: location is optional here, so a byline that depends
|
|
136
|
+
* on one would be blank for anyone who never set it.
|
|
137
|
+
*/
|
|
138
|
+
export declare const feedAuthorSchema: z.ZodObject<{
|
|
139
|
+
userId: z.ZodString;
|
|
140
|
+
username: z.ZodString;
|
|
141
|
+
displayName: z.ZodString;
|
|
142
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
143
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
export type FeedAuthor = z.infer<typeof feedAuthorSchema>;
|
|
146
|
+
/**
|
|
147
|
+
* `width` and `height` are required so a card can reserve the right box before
|
|
148
|
+
* the image loads. Without them every image arrival shifts the feed under the
|
|
149
|
+
* reader's thumb.
|
|
150
|
+
*
|
|
151
|
+
* URLs here come from our own upload pipeline, so they take a plain `z.url()`
|
|
152
|
+
* rather than `httpUrlSchema`. ⚠️ If a "paste an image link" path is ever
|
|
153
|
+
* added, these become member-supplied and must move to `httpUrlSchema`.
|
|
154
|
+
*/
|
|
155
|
+
export declare const feedImageSchema: z.ZodObject<{
|
|
156
|
+
kind: z.ZodLiteral<"image">;
|
|
157
|
+
url: z.ZodURL;
|
|
158
|
+
thumbnailUrl: z.ZodOptional<z.ZodURL>;
|
|
159
|
+
width: z.ZodNumber;
|
|
160
|
+
height: z.ZodNumber;
|
|
161
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
export type FeedImage = z.infer<typeof feedImageSchema>;
|
|
164
|
+
export declare const feedVideoSchema: z.ZodObject<{
|
|
165
|
+
kind: z.ZodLiteral<"video">;
|
|
166
|
+
url: z.ZodURL;
|
|
167
|
+
thumbnailUrl: z.ZodURL;
|
|
168
|
+
width: z.ZodNumber;
|
|
169
|
+
height: z.ZodNumber;
|
|
170
|
+
duration: z.ZodNumber;
|
|
171
|
+
}, z.core.$strip>;
|
|
172
|
+
export type FeedVideo = z.infer<typeof feedVideoSchema>;
|
|
173
|
+
/**
|
|
174
|
+
* One ordered list, discriminated on `kind`, so the carousel renders
|
|
175
|
+
* attachments in the order they were attached and can switch on the kind
|
|
176
|
+
* without inspecting fields.
|
|
177
|
+
*/
|
|
178
|
+
export declare const feedMediaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
179
|
+
kind: z.ZodLiteral<"image">;
|
|
180
|
+
url: z.ZodURL;
|
|
181
|
+
thumbnailUrl: z.ZodOptional<z.ZodURL>;
|
|
182
|
+
width: z.ZodNumber;
|
|
183
|
+
height: z.ZodNumber;
|
|
184
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
185
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
186
|
+
kind: z.ZodLiteral<"video">;
|
|
187
|
+
url: z.ZodURL;
|
|
188
|
+
thumbnailUrl: z.ZodURL;
|
|
189
|
+
width: z.ZodNumber;
|
|
190
|
+
height: z.ZodNumber;
|
|
191
|
+
duration: z.ZodNumber;
|
|
192
|
+
}, z.core.$strip>], "kind">;
|
|
193
|
+
export type FeedMedia = z.infer<typeof feedMediaSchema>;
|
|
194
|
+
/**
|
|
195
|
+
* Preview for the first link in a post body. Server-derived at write time and
|
|
196
|
+
* stored, never re-fetched at render: a card that fetches a third-party page
|
|
197
|
+
* per scroll leaks every reader's address to that site and blocks the feed on
|
|
198
|
+
* somebody else's latency.
|
|
199
|
+
*
|
|
200
|
+
* `url` takes `httpUrlSchema` because it came out of text a member typed.
|
|
201
|
+
* `imageUrl` is whatever the remote page advertised, so it is not ours either,
|
|
202
|
+
* and a consumer still treats it as untrusted at render.
|
|
203
|
+
*/
|
|
204
|
+
export declare const linkPreviewSchema: z.ZodObject<{
|
|
205
|
+
url: z.ZodURL;
|
|
206
|
+
title: z.ZodOptional<z.ZodString>;
|
|
207
|
+
description: z.ZodOptional<z.ZodString>;
|
|
208
|
+
imageUrl: z.ZodOptional<z.ZodURL>;
|
|
209
|
+
}, z.core.$strip>;
|
|
210
|
+
export type LinkPreview = z.infer<typeof linkPreviewSchema>;
|
|
211
|
+
/**
|
|
212
|
+
* What THIS viewer has done to this item, computed per request.
|
|
213
|
+
*
|
|
214
|
+
* Optional as a block, because an unauthenticated or server-rendered read has
|
|
215
|
+
* no viewer. ⚠️ A client must treat an absent `viewer` as "no state known",
|
|
216
|
+
* never as "has not reacted": rendering an empty reaction button off a missing
|
|
217
|
+
* block is how a member sees their own reaction disappear on reload.
|
|
218
|
+
*/
|
|
219
|
+
export declare const viewerStateSchema: z.ZodObject<{
|
|
220
|
+
reaction: z.ZodNullable<z.ZodEnum<{
|
|
221
|
+
like: "like";
|
|
222
|
+
celebrate: "celebrate";
|
|
223
|
+
insightful: "insightful";
|
|
224
|
+
curious: "curious";
|
|
225
|
+
}>>;
|
|
226
|
+
bookmarked: z.ZodBoolean;
|
|
227
|
+
isAuthor: z.ZodBoolean;
|
|
228
|
+
canEdit: z.ZodBoolean;
|
|
229
|
+
canDelete: z.ZodBoolean;
|
|
230
|
+
canReport: z.ZodBoolean;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
export type ViewerState = z.infer<typeof viewerStateSchema>;
|
|
233
|
+
/**
|
|
234
|
+
* A post as the feed and the single-post page receive it.
|
|
235
|
+
*
|
|
236
|
+
* Counts are denormalised onto the row so one document serves a whole card.
|
|
237
|
+
*
|
|
238
|
+
* No `score` and no up/down vote. Jansathi's signed score exists to rank civic
|
|
239
|
+
* content by community judgement, and a downvote arrow on a founder's first
|
|
240
|
+
* post is a different product. Reactions and comments are the engagement axes
|
|
241
|
+
* here. Adding a score later is additive; removing a visible downvote after
|
|
242
|
+
* members have used it is not.
|
|
243
|
+
*/
|
|
244
|
+
export declare const feedPostSchema: z.ZodObject<{
|
|
245
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
246
|
+
contentKind: z.ZodLiteral<"post">;
|
|
247
|
+
author: z.ZodObject<{
|
|
248
|
+
userId: z.ZodString;
|
|
249
|
+
username: z.ZodString;
|
|
250
|
+
displayName: z.ZodString;
|
|
251
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
252
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
253
|
+
}, z.core.$strip>;
|
|
254
|
+
text: z.ZodString;
|
|
255
|
+
media: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
256
|
+
kind: z.ZodLiteral<"image">;
|
|
257
|
+
url: z.ZodURL;
|
|
258
|
+
thumbnailUrl: z.ZodOptional<z.ZodURL>;
|
|
259
|
+
width: z.ZodNumber;
|
|
260
|
+
height: z.ZodNumber;
|
|
261
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
262
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
263
|
+
kind: z.ZodLiteral<"video">;
|
|
264
|
+
url: z.ZodURL;
|
|
265
|
+
thumbnailUrl: z.ZodURL;
|
|
266
|
+
width: z.ZodNumber;
|
|
267
|
+
height: z.ZodNumber;
|
|
268
|
+
duration: z.ZodNumber;
|
|
269
|
+
}, z.core.$strip>], "kind">>;
|
|
270
|
+
linkPreview: z.ZodOptional<z.ZodObject<{
|
|
271
|
+
url: z.ZodURL;
|
|
272
|
+
title: z.ZodOptional<z.ZodString>;
|
|
273
|
+
description: z.ZodOptional<z.ZodString>;
|
|
274
|
+
imageUrl: z.ZodOptional<z.ZodURL>;
|
|
275
|
+
}, z.core.$strip>>;
|
|
276
|
+
topics: z.ZodArray<z.ZodEnum<{
|
|
277
|
+
ai_ml: "ai_ml";
|
|
278
|
+
b2b_saas: "b2b_saas";
|
|
279
|
+
d2c: "d2c";
|
|
280
|
+
deeptech: "deeptech";
|
|
281
|
+
robotics: "robotics";
|
|
282
|
+
growth: "growth";
|
|
283
|
+
sales: "sales";
|
|
284
|
+
marketing: "marketing";
|
|
285
|
+
supply_chain: "supply_chain";
|
|
286
|
+
fundraising: "fundraising";
|
|
287
|
+
mentoring: "mentoring";
|
|
288
|
+
leadership: "leadership";
|
|
289
|
+
networking: "networking";
|
|
290
|
+
public_speaking: "public_speaking";
|
|
291
|
+
teaching: "teaching";
|
|
292
|
+
hiring_talent: "hiring_talent";
|
|
293
|
+
personal_branding: "personal_branding";
|
|
294
|
+
career_transition: "career_transition";
|
|
295
|
+
remote_work: "remote_work";
|
|
296
|
+
blockchain: "blockchain";
|
|
297
|
+
crypto_web3: "crypto_web3";
|
|
298
|
+
data_science: "data_science";
|
|
299
|
+
cybersecurity: "cybersecurity";
|
|
300
|
+
game_dev: "game_dev";
|
|
301
|
+
ux_design: "ux_design";
|
|
302
|
+
app_development: "app_development";
|
|
303
|
+
open_source: "open_source";
|
|
304
|
+
electronics: "electronics";
|
|
305
|
+
space_exploration: "space_exploration";
|
|
306
|
+
green_tech: "green_tech";
|
|
307
|
+
no_code: "no_code";
|
|
308
|
+
entrepreneurship: "entrepreneurship";
|
|
309
|
+
investing: "investing";
|
|
310
|
+
stock_trading: "stock_trading";
|
|
311
|
+
personal_finance: "personal_finance";
|
|
312
|
+
consulting: "consulting";
|
|
313
|
+
ecommerce: "ecommerce";
|
|
314
|
+
retail: "retail";
|
|
315
|
+
real_estate: "real_estate";
|
|
316
|
+
product_management: "product_management";
|
|
317
|
+
meditation: "meditation";
|
|
318
|
+
journaling: "journaling";
|
|
319
|
+
self_improvement: "self_improvement";
|
|
320
|
+
productivity: "productivity";
|
|
321
|
+
reading: "reading";
|
|
322
|
+
online_courses: "online_courses";
|
|
323
|
+
philosophy: "philosophy";
|
|
324
|
+
psychology: "psychology";
|
|
325
|
+
therapy: "therapy";
|
|
326
|
+
sleep_optimization: "sleep_optimization";
|
|
327
|
+
gym: "gym";
|
|
328
|
+
yoga: "yoga";
|
|
329
|
+
photography: "photography";
|
|
330
|
+
writing: "writing";
|
|
331
|
+
graphic_design: "graphic_design";
|
|
332
|
+
filmmaking: "filmmaking";
|
|
333
|
+
digital_art: "digital_art";
|
|
334
|
+
content_creation: "content_creation";
|
|
335
|
+
blogging: "blogging";
|
|
336
|
+
vlogging: "vlogging";
|
|
337
|
+
podcasts: "podcasts";
|
|
338
|
+
animation: "animation";
|
|
339
|
+
music_production: "music_production";
|
|
340
|
+
volunteering: "volunteering";
|
|
341
|
+
ngo_work: "ngo_work";
|
|
342
|
+
environmental: "environmental";
|
|
343
|
+
women_empowerment: "women_empowerment";
|
|
344
|
+
community_service: "community_service";
|
|
345
|
+
social_enterprise: "social_enterprise";
|
|
346
|
+
education_access: "education_access";
|
|
347
|
+
}>>;
|
|
348
|
+
commentCount: z.ZodNumber;
|
|
349
|
+
reactionCounts: z.ZodRecord<z.ZodEnum<{
|
|
350
|
+
like: "like";
|
|
351
|
+
celebrate: "celebrate";
|
|
352
|
+
insightful: "insightful";
|
|
353
|
+
curious: "curious";
|
|
354
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
355
|
+
createdAt: z.ZodISODateTime;
|
|
356
|
+
editedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
357
|
+
viewer: z.ZodOptional<z.ZodObject<{
|
|
358
|
+
reaction: z.ZodNullable<z.ZodEnum<{
|
|
359
|
+
like: "like";
|
|
360
|
+
celebrate: "celebrate";
|
|
361
|
+
insightful: "insightful";
|
|
362
|
+
curious: "curious";
|
|
363
|
+
}>>;
|
|
364
|
+
bookmarked: z.ZodBoolean;
|
|
365
|
+
isAuthor: z.ZodBoolean;
|
|
366
|
+
canEdit: z.ZodBoolean;
|
|
367
|
+
canDelete: z.ZodBoolean;
|
|
368
|
+
canReport: z.ZodBoolean;
|
|
369
|
+
}, z.core.$strip>>;
|
|
370
|
+
}, z.core.$strip>;
|
|
371
|
+
export type FeedPost = z.infer<typeof feedPostSchema>;
|
|
372
|
+
/**
|
|
373
|
+
* One choice. `index` is the identifier a vote refers to, not the label:
|
|
374
|
+
* sending indices avoids ambiguity between two options whose labels differ
|
|
375
|
+
* only by case, spacing or an invisible character.
|
|
376
|
+
*/
|
|
377
|
+
export declare const pollOptionSchema: z.ZodObject<{
|
|
378
|
+
index: z.ZodNumber;
|
|
379
|
+
label: z.ZodString;
|
|
380
|
+
voteCount: z.ZodNumber;
|
|
381
|
+
}, z.core.$strip>;
|
|
382
|
+
export type PollOption = z.infer<typeof pollOptionSchema>;
|
|
383
|
+
/**
|
|
384
|
+
* A poll. Its own kind, not a post with extra fields, because votes are their
|
|
385
|
+
* own records keyed by (poll, voter) and a post has nothing equivalent.
|
|
386
|
+
*
|
|
387
|
+
* Polls are not editable. Changing a question or an option after a vote has
|
|
388
|
+
* been cast silently re-purposes that vote. Closing early is allowed; editing
|
|
389
|
+
* is not.
|
|
390
|
+
*/
|
|
391
|
+
export declare const feedPollSchema: z.ZodObject<{
|
|
392
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
393
|
+
contentKind: z.ZodLiteral<"poll">;
|
|
394
|
+
author: z.ZodObject<{
|
|
395
|
+
userId: z.ZodString;
|
|
396
|
+
username: z.ZodString;
|
|
397
|
+
displayName: z.ZodString;
|
|
398
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
399
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
400
|
+
}, z.core.$strip>;
|
|
401
|
+
question: z.ZodString;
|
|
402
|
+
options: z.ZodArray<z.ZodObject<{
|
|
403
|
+
index: z.ZodNumber;
|
|
404
|
+
label: z.ZodString;
|
|
405
|
+
voteCount: z.ZodNumber;
|
|
406
|
+
}, z.core.$strip>>;
|
|
407
|
+
totalVoters: z.ZodNumber;
|
|
408
|
+
allowsMultipleChoices: z.ZodBoolean;
|
|
409
|
+
closesAt: z.ZodISODateTime;
|
|
410
|
+
isClosed: z.ZodBoolean;
|
|
411
|
+
topics: z.ZodArray<z.ZodEnum<{
|
|
412
|
+
ai_ml: "ai_ml";
|
|
413
|
+
b2b_saas: "b2b_saas";
|
|
414
|
+
d2c: "d2c";
|
|
415
|
+
deeptech: "deeptech";
|
|
416
|
+
robotics: "robotics";
|
|
417
|
+
growth: "growth";
|
|
418
|
+
sales: "sales";
|
|
419
|
+
marketing: "marketing";
|
|
420
|
+
supply_chain: "supply_chain";
|
|
421
|
+
fundraising: "fundraising";
|
|
422
|
+
mentoring: "mentoring";
|
|
423
|
+
leadership: "leadership";
|
|
424
|
+
networking: "networking";
|
|
425
|
+
public_speaking: "public_speaking";
|
|
426
|
+
teaching: "teaching";
|
|
427
|
+
hiring_talent: "hiring_talent";
|
|
428
|
+
personal_branding: "personal_branding";
|
|
429
|
+
career_transition: "career_transition";
|
|
430
|
+
remote_work: "remote_work";
|
|
431
|
+
blockchain: "blockchain";
|
|
432
|
+
crypto_web3: "crypto_web3";
|
|
433
|
+
data_science: "data_science";
|
|
434
|
+
cybersecurity: "cybersecurity";
|
|
435
|
+
game_dev: "game_dev";
|
|
436
|
+
ux_design: "ux_design";
|
|
437
|
+
app_development: "app_development";
|
|
438
|
+
open_source: "open_source";
|
|
439
|
+
electronics: "electronics";
|
|
440
|
+
space_exploration: "space_exploration";
|
|
441
|
+
green_tech: "green_tech";
|
|
442
|
+
no_code: "no_code";
|
|
443
|
+
entrepreneurship: "entrepreneurship";
|
|
444
|
+
investing: "investing";
|
|
445
|
+
stock_trading: "stock_trading";
|
|
446
|
+
personal_finance: "personal_finance";
|
|
447
|
+
consulting: "consulting";
|
|
448
|
+
ecommerce: "ecommerce";
|
|
449
|
+
retail: "retail";
|
|
450
|
+
real_estate: "real_estate";
|
|
451
|
+
product_management: "product_management";
|
|
452
|
+
meditation: "meditation";
|
|
453
|
+
journaling: "journaling";
|
|
454
|
+
self_improvement: "self_improvement";
|
|
455
|
+
productivity: "productivity";
|
|
456
|
+
reading: "reading";
|
|
457
|
+
online_courses: "online_courses";
|
|
458
|
+
philosophy: "philosophy";
|
|
459
|
+
psychology: "psychology";
|
|
460
|
+
therapy: "therapy";
|
|
461
|
+
sleep_optimization: "sleep_optimization";
|
|
462
|
+
gym: "gym";
|
|
463
|
+
yoga: "yoga";
|
|
464
|
+
photography: "photography";
|
|
465
|
+
writing: "writing";
|
|
466
|
+
graphic_design: "graphic_design";
|
|
467
|
+
filmmaking: "filmmaking";
|
|
468
|
+
digital_art: "digital_art";
|
|
469
|
+
content_creation: "content_creation";
|
|
470
|
+
blogging: "blogging";
|
|
471
|
+
vlogging: "vlogging";
|
|
472
|
+
podcasts: "podcasts";
|
|
473
|
+
animation: "animation";
|
|
474
|
+
music_production: "music_production";
|
|
475
|
+
volunteering: "volunteering";
|
|
476
|
+
ngo_work: "ngo_work";
|
|
477
|
+
environmental: "environmental";
|
|
478
|
+
women_empowerment: "women_empowerment";
|
|
479
|
+
community_service: "community_service";
|
|
480
|
+
social_enterprise: "social_enterprise";
|
|
481
|
+
education_access: "education_access";
|
|
482
|
+
}>>;
|
|
483
|
+
commentCount: z.ZodNumber;
|
|
484
|
+
reactionCounts: z.ZodRecord<z.ZodEnum<{
|
|
485
|
+
like: "like";
|
|
486
|
+
celebrate: "celebrate";
|
|
487
|
+
insightful: "insightful";
|
|
488
|
+
curious: "curious";
|
|
489
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
490
|
+
createdAt: z.ZodISODateTime;
|
|
491
|
+
editedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
492
|
+
viewer: z.ZodOptional<z.ZodObject<{
|
|
493
|
+
reaction: z.ZodNullable<z.ZodEnum<{
|
|
494
|
+
like: "like";
|
|
495
|
+
celebrate: "celebrate";
|
|
496
|
+
insightful: "insightful";
|
|
497
|
+
curious: "curious";
|
|
498
|
+
}>>;
|
|
499
|
+
bookmarked: z.ZodBoolean;
|
|
500
|
+
isAuthor: z.ZodBoolean;
|
|
501
|
+
canEdit: z.ZodBoolean;
|
|
502
|
+
canDelete: z.ZodBoolean;
|
|
503
|
+
canReport: z.ZodBoolean;
|
|
504
|
+
votedOptionIndices: z.ZodArray<z.ZodNumber>;
|
|
505
|
+
}, z.core.$strip>>;
|
|
506
|
+
}, z.core.$strip>;
|
|
507
|
+
export type FeedPoll = z.infer<typeof feedPollSchema>;
|
|
508
|
+
/**
|
|
509
|
+
* Discriminated on `contentKind`, so a client narrows with a switch and the
|
|
510
|
+
* compiler catches an unhandled kind the day one is added. A plain union would
|
|
511
|
+
* need every field checked by hand and would silently accept a hybrid.
|
|
512
|
+
*/
|
|
513
|
+
export declare const feedItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
514
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
515
|
+
contentKind: z.ZodLiteral<"post">;
|
|
516
|
+
author: z.ZodObject<{
|
|
517
|
+
userId: z.ZodString;
|
|
518
|
+
username: z.ZodString;
|
|
519
|
+
displayName: z.ZodString;
|
|
520
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
521
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
522
|
+
}, z.core.$strip>;
|
|
523
|
+
text: z.ZodString;
|
|
524
|
+
media: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
525
|
+
kind: z.ZodLiteral<"image">;
|
|
526
|
+
url: z.ZodURL;
|
|
527
|
+
thumbnailUrl: z.ZodOptional<z.ZodURL>;
|
|
528
|
+
width: z.ZodNumber;
|
|
529
|
+
height: z.ZodNumber;
|
|
530
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
531
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
532
|
+
kind: z.ZodLiteral<"video">;
|
|
533
|
+
url: z.ZodURL;
|
|
534
|
+
thumbnailUrl: z.ZodURL;
|
|
535
|
+
width: z.ZodNumber;
|
|
536
|
+
height: z.ZodNumber;
|
|
537
|
+
duration: z.ZodNumber;
|
|
538
|
+
}, z.core.$strip>], "kind">>;
|
|
539
|
+
linkPreview: z.ZodOptional<z.ZodObject<{
|
|
540
|
+
url: z.ZodURL;
|
|
541
|
+
title: z.ZodOptional<z.ZodString>;
|
|
542
|
+
description: z.ZodOptional<z.ZodString>;
|
|
543
|
+
imageUrl: z.ZodOptional<z.ZodURL>;
|
|
544
|
+
}, z.core.$strip>>;
|
|
545
|
+
topics: z.ZodArray<z.ZodEnum<{
|
|
546
|
+
ai_ml: "ai_ml";
|
|
547
|
+
b2b_saas: "b2b_saas";
|
|
548
|
+
d2c: "d2c";
|
|
549
|
+
deeptech: "deeptech";
|
|
550
|
+
robotics: "robotics";
|
|
551
|
+
growth: "growth";
|
|
552
|
+
sales: "sales";
|
|
553
|
+
marketing: "marketing";
|
|
554
|
+
supply_chain: "supply_chain";
|
|
555
|
+
fundraising: "fundraising";
|
|
556
|
+
mentoring: "mentoring";
|
|
557
|
+
leadership: "leadership";
|
|
558
|
+
networking: "networking";
|
|
559
|
+
public_speaking: "public_speaking";
|
|
560
|
+
teaching: "teaching";
|
|
561
|
+
hiring_talent: "hiring_talent";
|
|
562
|
+
personal_branding: "personal_branding";
|
|
563
|
+
career_transition: "career_transition";
|
|
564
|
+
remote_work: "remote_work";
|
|
565
|
+
blockchain: "blockchain";
|
|
566
|
+
crypto_web3: "crypto_web3";
|
|
567
|
+
data_science: "data_science";
|
|
568
|
+
cybersecurity: "cybersecurity";
|
|
569
|
+
game_dev: "game_dev";
|
|
570
|
+
ux_design: "ux_design";
|
|
571
|
+
app_development: "app_development";
|
|
572
|
+
open_source: "open_source";
|
|
573
|
+
electronics: "electronics";
|
|
574
|
+
space_exploration: "space_exploration";
|
|
575
|
+
green_tech: "green_tech";
|
|
576
|
+
no_code: "no_code";
|
|
577
|
+
entrepreneurship: "entrepreneurship";
|
|
578
|
+
investing: "investing";
|
|
579
|
+
stock_trading: "stock_trading";
|
|
580
|
+
personal_finance: "personal_finance";
|
|
581
|
+
consulting: "consulting";
|
|
582
|
+
ecommerce: "ecommerce";
|
|
583
|
+
retail: "retail";
|
|
584
|
+
real_estate: "real_estate";
|
|
585
|
+
product_management: "product_management";
|
|
586
|
+
meditation: "meditation";
|
|
587
|
+
journaling: "journaling";
|
|
588
|
+
self_improvement: "self_improvement";
|
|
589
|
+
productivity: "productivity";
|
|
590
|
+
reading: "reading";
|
|
591
|
+
online_courses: "online_courses";
|
|
592
|
+
philosophy: "philosophy";
|
|
593
|
+
psychology: "psychology";
|
|
594
|
+
therapy: "therapy";
|
|
595
|
+
sleep_optimization: "sleep_optimization";
|
|
596
|
+
gym: "gym";
|
|
597
|
+
yoga: "yoga";
|
|
598
|
+
photography: "photography";
|
|
599
|
+
writing: "writing";
|
|
600
|
+
graphic_design: "graphic_design";
|
|
601
|
+
filmmaking: "filmmaking";
|
|
602
|
+
digital_art: "digital_art";
|
|
603
|
+
content_creation: "content_creation";
|
|
604
|
+
blogging: "blogging";
|
|
605
|
+
vlogging: "vlogging";
|
|
606
|
+
podcasts: "podcasts";
|
|
607
|
+
animation: "animation";
|
|
608
|
+
music_production: "music_production";
|
|
609
|
+
volunteering: "volunteering";
|
|
610
|
+
ngo_work: "ngo_work";
|
|
611
|
+
environmental: "environmental";
|
|
612
|
+
women_empowerment: "women_empowerment";
|
|
613
|
+
community_service: "community_service";
|
|
614
|
+
social_enterprise: "social_enterprise";
|
|
615
|
+
education_access: "education_access";
|
|
616
|
+
}>>;
|
|
617
|
+
commentCount: z.ZodNumber;
|
|
618
|
+
reactionCounts: z.ZodRecord<z.ZodEnum<{
|
|
619
|
+
like: "like";
|
|
620
|
+
celebrate: "celebrate";
|
|
621
|
+
insightful: "insightful";
|
|
622
|
+
curious: "curious";
|
|
623
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
624
|
+
createdAt: z.ZodISODateTime;
|
|
625
|
+
editedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
626
|
+
viewer: z.ZodOptional<z.ZodObject<{
|
|
627
|
+
reaction: z.ZodNullable<z.ZodEnum<{
|
|
628
|
+
like: "like";
|
|
629
|
+
celebrate: "celebrate";
|
|
630
|
+
insightful: "insightful";
|
|
631
|
+
curious: "curious";
|
|
632
|
+
}>>;
|
|
633
|
+
bookmarked: z.ZodBoolean;
|
|
634
|
+
isAuthor: z.ZodBoolean;
|
|
635
|
+
canEdit: z.ZodBoolean;
|
|
636
|
+
canDelete: z.ZodBoolean;
|
|
637
|
+
canReport: z.ZodBoolean;
|
|
638
|
+
}, z.core.$strip>>;
|
|
639
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
640
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
641
|
+
contentKind: z.ZodLiteral<"poll">;
|
|
642
|
+
author: z.ZodObject<{
|
|
643
|
+
userId: z.ZodString;
|
|
644
|
+
username: z.ZodString;
|
|
645
|
+
displayName: z.ZodString;
|
|
646
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
647
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
648
|
+
}, z.core.$strip>;
|
|
649
|
+
question: z.ZodString;
|
|
650
|
+
options: z.ZodArray<z.ZodObject<{
|
|
651
|
+
index: z.ZodNumber;
|
|
652
|
+
label: z.ZodString;
|
|
653
|
+
voteCount: z.ZodNumber;
|
|
654
|
+
}, z.core.$strip>>;
|
|
655
|
+
totalVoters: z.ZodNumber;
|
|
656
|
+
allowsMultipleChoices: z.ZodBoolean;
|
|
657
|
+
closesAt: z.ZodISODateTime;
|
|
658
|
+
isClosed: z.ZodBoolean;
|
|
659
|
+
topics: z.ZodArray<z.ZodEnum<{
|
|
660
|
+
ai_ml: "ai_ml";
|
|
661
|
+
b2b_saas: "b2b_saas";
|
|
662
|
+
d2c: "d2c";
|
|
663
|
+
deeptech: "deeptech";
|
|
664
|
+
robotics: "robotics";
|
|
665
|
+
growth: "growth";
|
|
666
|
+
sales: "sales";
|
|
667
|
+
marketing: "marketing";
|
|
668
|
+
supply_chain: "supply_chain";
|
|
669
|
+
fundraising: "fundraising";
|
|
670
|
+
mentoring: "mentoring";
|
|
671
|
+
leadership: "leadership";
|
|
672
|
+
networking: "networking";
|
|
673
|
+
public_speaking: "public_speaking";
|
|
674
|
+
teaching: "teaching";
|
|
675
|
+
hiring_talent: "hiring_talent";
|
|
676
|
+
personal_branding: "personal_branding";
|
|
677
|
+
career_transition: "career_transition";
|
|
678
|
+
remote_work: "remote_work";
|
|
679
|
+
blockchain: "blockchain";
|
|
680
|
+
crypto_web3: "crypto_web3";
|
|
681
|
+
data_science: "data_science";
|
|
682
|
+
cybersecurity: "cybersecurity";
|
|
683
|
+
game_dev: "game_dev";
|
|
684
|
+
ux_design: "ux_design";
|
|
685
|
+
app_development: "app_development";
|
|
686
|
+
open_source: "open_source";
|
|
687
|
+
electronics: "electronics";
|
|
688
|
+
space_exploration: "space_exploration";
|
|
689
|
+
green_tech: "green_tech";
|
|
690
|
+
no_code: "no_code";
|
|
691
|
+
entrepreneurship: "entrepreneurship";
|
|
692
|
+
investing: "investing";
|
|
693
|
+
stock_trading: "stock_trading";
|
|
694
|
+
personal_finance: "personal_finance";
|
|
695
|
+
consulting: "consulting";
|
|
696
|
+
ecommerce: "ecommerce";
|
|
697
|
+
retail: "retail";
|
|
698
|
+
real_estate: "real_estate";
|
|
699
|
+
product_management: "product_management";
|
|
700
|
+
meditation: "meditation";
|
|
701
|
+
journaling: "journaling";
|
|
702
|
+
self_improvement: "self_improvement";
|
|
703
|
+
productivity: "productivity";
|
|
704
|
+
reading: "reading";
|
|
705
|
+
online_courses: "online_courses";
|
|
706
|
+
philosophy: "philosophy";
|
|
707
|
+
psychology: "psychology";
|
|
708
|
+
therapy: "therapy";
|
|
709
|
+
sleep_optimization: "sleep_optimization";
|
|
710
|
+
gym: "gym";
|
|
711
|
+
yoga: "yoga";
|
|
712
|
+
photography: "photography";
|
|
713
|
+
writing: "writing";
|
|
714
|
+
graphic_design: "graphic_design";
|
|
715
|
+
filmmaking: "filmmaking";
|
|
716
|
+
digital_art: "digital_art";
|
|
717
|
+
content_creation: "content_creation";
|
|
718
|
+
blogging: "blogging";
|
|
719
|
+
vlogging: "vlogging";
|
|
720
|
+
podcasts: "podcasts";
|
|
721
|
+
animation: "animation";
|
|
722
|
+
music_production: "music_production";
|
|
723
|
+
volunteering: "volunteering";
|
|
724
|
+
ngo_work: "ngo_work";
|
|
725
|
+
environmental: "environmental";
|
|
726
|
+
women_empowerment: "women_empowerment";
|
|
727
|
+
community_service: "community_service";
|
|
728
|
+
social_enterprise: "social_enterprise";
|
|
729
|
+
education_access: "education_access";
|
|
730
|
+
}>>;
|
|
731
|
+
commentCount: z.ZodNumber;
|
|
732
|
+
reactionCounts: z.ZodRecord<z.ZodEnum<{
|
|
733
|
+
like: "like";
|
|
734
|
+
celebrate: "celebrate";
|
|
735
|
+
insightful: "insightful";
|
|
736
|
+
curious: "curious";
|
|
737
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
738
|
+
createdAt: z.ZodISODateTime;
|
|
739
|
+
editedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
740
|
+
viewer: z.ZodOptional<z.ZodObject<{
|
|
741
|
+
reaction: z.ZodNullable<z.ZodEnum<{
|
|
742
|
+
like: "like";
|
|
743
|
+
celebrate: "celebrate";
|
|
744
|
+
insightful: "insightful";
|
|
745
|
+
curious: "curious";
|
|
746
|
+
}>>;
|
|
747
|
+
bookmarked: z.ZodBoolean;
|
|
748
|
+
isAuthor: z.ZodBoolean;
|
|
749
|
+
canEdit: z.ZodBoolean;
|
|
750
|
+
canDelete: z.ZodBoolean;
|
|
751
|
+
canReport: z.ZodBoolean;
|
|
752
|
+
votedOptionIndices: z.ZodArray<z.ZodNumber>;
|
|
753
|
+
}, z.core.$strip>>;
|
|
754
|
+
}, z.core.$strip>], "contentKind">;
|
|
755
|
+
export type FeedItem = z.infer<typeof feedItemSchema>;
|
|
756
|
+
/**
|
|
757
|
+
* A comment, one level of nesting only: a reply to a comment is allowed, a
|
|
758
|
+
* reply to a reply is not. Two levels stay readable on a phone; three do not,
|
|
759
|
+
* and the server is what enforces it.
|
|
760
|
+
*/
|
|
761
|
+
export declare const feedCommentSchema: z.ZodObject<{
|
|
762
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
763
|
+
contentKind: z.ZodEnum<{
|
|
764
|
+
post: "post";
|
|
765
|
+
poll: "poll";
|
|
766
|
+
}>;
|
|
767
|
+
contentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
768
|
+
parentCommentId: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
769
|
+
author: z.ZodObject<{
|
|
770
|
+
userId: z.ZodString;
|
|
771
|
+
username: z.ZodString;
|
|
772
|
+
displayName: z.ZodString;
|
|
773
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
774
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
775
|
+
}, z.core.$strip>;
|
|
776
|
+
text: z.ZodString;
|
|
777
|
+
replyCount: z.ZodNumber;
|
|
778
|
+
reactionCounts: z.ZodRecord<z.ZodEnum<{
|
|
779
|
+
like: "like";
|
|
780
|
+
celebrate: "celebrate";
|
|
781
|
+
insightful: "insightful";
|
|
782
|
+
curious: "curious";
|
|
783
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
784
|
+
createdAt: z.ZodISODateTime;
|
|
785
|
+
editedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
786
|
+
viewer: z.ZodOptional<z.ZodObject<{
|
|
787
|
+
reaction: z.ZodNullable<z.ZodEnum<{
|
|
788
|
+
like: "like";
|
|
789
|
+
celebrate: "celebrate";
|
|
790
|
+
insightful: "insightful";
|
|
791
|
+
curious: "curious";
|
|
792
|
+
}>>;
|
|
793
|
+
isAuthor: z.ZodBoolean;
|
|
794
|
+
canEdit: z.ZodBoolean;
|
|
795
|
+
canDelete: z.ZodBoolean;
|
|
796
|
+
canReport: z.ZodBoolean;
|
|
797
|
+
}, z.core.$strip>>;
|
|
798
|
+
}, z.core.$strip>;
|
|
799
|
+
export type FeedComment = z.infer<typeof feedCommentSchema>;
|
|
800
|
+
/**
|
|
801
|
+
* The feed query. Inherits `limit` and `cursor`, which already tolerate an
|
|
802
|
+
* emptied control rather than answering 400.
|
|
803
|
+
*
|
|
804
|
+
* `authorId` powers "posts by this founder" on a profile page, so the profile
|
|
805
|
+
* feed and the main feed are the same endpoint and cannot drift apart.
|
|
806
|
+
*/
|
|
807
|
+
export declare const feedQuerySchema: z.ZodObject<{
|
|
808
|
+
limit: z.ZodPreprocess<z.ZodDefault<z.ZodCoercedNumber<unknown>>, unknown>;
|
|
809
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
810
|
+
sort: z.ZodDefault<z.ZodEnum<{
|
|
811
|
+
new: "new";
|
|
812
|
+
top: "top";
|
|
813
|
+
}>>;
|
|
814
|
+
authorId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
815
|
+
}, z.core.$strip>;
|
|
816
|
+
export type FeedQuery = z.infer<typeof feedQuerySchema>;
|
|
817
|
+
export declare const commentsQuerySchema: z.ZodObject<{
|
|
818
|
+
limit: z.ZodPreprocess<z.ZodDefault<z.ZodCoercedNumber<unknown>>, unknown>;
|
|
819
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
820
|
+
parentCommentId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
821
|
+
}, z.core.$strip>;
|
|
822
|
+
export type CommentsQuery = z.infer<typeof commentsQuerySchema>;
|
|
823
|
+
/**
|
|
824
|
+
* ⚠️ Every write body below is its own object with NO defaults, and none of
|
|
825
|
+
* them is built with `.pick().partial()`. `.partial()` does not switch off
|
|
826
|
+
* `.default()`, so a patch body built that way rewrites defaulted fields on
|
|
827
|
+
* every request. See `updateFounderProfileBodySchema` for the incident.
|
|
828
|
+
*/
|
|
829
|
+
/**
|
|
830
|
+
* An attachment on the way IN: a reference to something already uploaded, and
|
|
831
|
+
* deliberately not a URL.
|
|
832
|
+
*
|
|
833
|
+
* Upload happens first, straight to storage, and the composer sends back the
|
|
834
|
+
* key it was given. The server resolves that key to the URL, dimensions and
|
|
835
|
+
* poster frame it already knows, and those become the read shape.
|
|
836
|
+
*
|
|
837
|
+
* ⚠️ The first draft of this took the full read shape, URL included. That is
|
|
838
|
+
* the same hole that was closed on the profile: a URL in a write body is a
|
|
839
|
+
* member-supplied URL, so a post could have carried `javascript:` in an image
|
|
840
|
+
* source, and nothing downstream re-checks a value the server itself stored.
|
|
841
|
+
* Taking a key instead removes the question rather than validating it, and it
|
|
842
|
+
* also stops a member pointing a post at somebody else's file.
|
|
843
|
+
*
|
|
844
|
+
* `width`, `height` and `duration` are NOT accepted here either. They are
|
|
845
|
+
* properties of the uploaded object, so the server reads them from the object;
|
|
846
|
+
* taking them from the client would let a caller claim a 1x1 image and collapse
|
|
847
|
+
* the card.
|
|
848
|
+
*
|
|
849
|
+
* FORMAT, set by the backend (hary, 2026-09-21), minted server-side and never
|
|
850
|
+
* by a client:
|
|
851
|
+
*
|
|
852
|
+
* media/<userId>/<uuid>.<ext>
|
|
853
|
+
*
|
|
854
|
+
* ⚠️ THIS SCHEMA IS THE FIRST OF THREE CHECKS AND THE WEAKEST. It proves the
|
|
855
|
+
* key is well FORMED. It cannot prove the two things that actually matter, and
|
|
856
|
+
* nobody should read a green parse as though it had:
|
|
857
|
+
*
|
|
858
|
+
* 1. OWNERSHIP. The `userId` segment is what makes "is this your object"
|
|
859
|
+
* checkable, and the backend compares it against the authenticated caller.
|
|
860
|
+
* A pattern happily accepts a perfectly well-formed key belonging to
|
|
861
|
+
* somebody else, which is the exact attack taking a key was meant to stop.
|
|
862
|
+
* 2. EXISTENCE. The backend calls HeadObject before writing the post, so a
|
|
863
|
+
* key for an object nobody uploaded cannot be committed.
|
|
864
|
+
*
|
|
865
|
+
* The length ceiling and the traversal refusal below are redundant against this
|
|
866
|
+
* pattern, which is anchored and admits no dots outside the extension. They are
|
|
867
|
+
* kept on purpose: they are what still holds if this pattern is ever loosened.
|
|
868
|
+
*/
|
|
869
|
+
export declare const UPLOAD_KEY_MAX_CHARS = 300;
|
|
870
|
+
/**
|
|
871
|
+
* ⚠️ IMAGES ONLY, and that is now a product decision rather than an oversight.
|
|
872
|
+
*
|
|
873
|
+
* The asymmetry was real and was raised: `feedVideoSchema` is in the read union
|
|
874
|
+
* and a card can render a video, while nothing could ever upload one. The user
|
|
875
|
+
* settled it on 2026-09-21: members upload images, and share video by putting a
|
|
876
|
+
* link in the post text, which the client renders inline. So the minter stays
|
|
877
|
+
* images-only by intent.
|
|
878
|
+
*
|
|
879
|
+
* `feedVideoSchema` is deliberately KEPT. Widening the write path later is
|
|
880
|
+
* additive; removing video from the read union once a client handles it is not.
|
|
881
|
+
* A test named for refusing a video key holds this visible, so whoever adds
|
|
882
|
+
* video uploads has to delete a test that says out loud why it exists.
|
|
883
|
+
*/
|
|
884
|
+
export declare const UPLOAD_KEY_EXTENSIONS: readonly ["jpg", "jpeg", "png", "webp", "gif"];
|
|
885
|
+
export declare const uploadKeySchema: z.ZodString;
|
|
886
|
+
export type UploadKey = z.infer<typeof uploadKeySchema>;
|
|
887
|
+
export declare const attachedMediaSchema: z.ZodObject<{
|
|
888
|
+
uploadKey: z.ZodString;
|
|
889
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
890
|
+
}, z.core.$strip>;
|
|
891
|
+
export type AttachedMedia = z.infer<typeof attachedMediaSchema>;
|
|
892
|
+
/**
|
|
893
|
+
* A post must carry something. Text alone, media alone, or both; empty is
|
|
894
|
+
* refused here rather than reaching the feed as a blank card.
|
|
895
|
+
*/
|
|
896
|
+
export declare const createPostBodySchema: z.ZodObject<{
|
|
897
|
+
text: z.ZodOptional<z.ZodString>;
|
|
898
|
+
media: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
899
|
+
uploadKey: z.ZodString;
|
|
900
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
901
|
+
}, z.core.$strip>>>;
|
|
902
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
903
|
+
ai_ml: "ai_ml";
|
|
904
|
+
b2b_saas: "b2b_saas";
|
|
905
|
+
d2c: "d2c";
|
|
906
|
+
deeptech: "deeptech";
|
|
907
|
+
robotics: "robotics";
|
|
908
|
+
growth: "growth";
|
|
909
|
+
sales: "sales";
|
|
910
|
+
marketing: "marketing";
|
|
911
|
+
supply_chain: "supply_chain";
|
|
912
|
+
fundraising: "fundraising";
|
|
913
|
+
mentoring: "mentoring";
|
|
914
|
+
leadership: "leadership";
|
|
915
|
+
networking: "networking";
|
|
916
|
+
public_speaking: "public_speaking";
|
|
917
|
+
teaching: "teaching";
|
|
918
|
+
hiring_talent: "hiring_talent";
|
|
919
|
+
personal_branding: "personal_branding";
|
|
920
|
+
career_transition: "career_transition";
|
|
921
|
+
remote_work: "remote_work";
|
|
922
|
+
blockchain: "blockchain";
|
|
923
|
+
crypto_web3: "crypto_web3";
|
|
924
|
+
data_science: "data_science";
|
|
925
|
+
cybersecurity: "cybersecurity";
|
|
926
|
+
game_dev: "game_dev";
|
|
927
|
+
ux_design: "ux_design";
|
|
928
|
+
app_development: "app_development";
|
|
929
|
+
open_source: "open_source";
|
|
930
|
+
electronics: "electronics";
|
|
931
|
+
space_exploration: "space_exploration";
|
|
932
|
+
green_tech: "green_tech";
|
|
933
|
+
no_code: "no_code";
|
|
934
|
+
entrepreneurship: "entrepreneurship";
|
|
935
|
+
investing: "investing";
|
|
936
|
+
stock_trading: "stock_trading";
|
|
937
|
+
personal_finance: "personal_finance";
|
|
938
|
+
consulting: "consulting";
|
|
939
|
+
ecommerce: "ecommerce";
|
|
940
|
+
retail: "retail";
|
|
941
|
+
real_estate: "real_estate";
|
|
942
|
+
product_management: "product_management";
|
|
943
|
+
meditation: "meditation";
|
|
944
|
+
journaling: "journaling";
|
|
945
|
+
self_improvement: "self_improvement";
|
|
946
|
+
productivity: "productivity";
|
|
947
|
+
reading: "reading";
|
|
948
|
+
online_courses: "online_courses";
|
|
949
|
+
philosophy: "philosophy";
|
|
950
|
+
psychology: "psychology";
|
|
951
|
+
therapy: "therapy";
|
|
952
|
+
sleep_optimization: "sleep_optimization";
|
|
953
|
+
gym: "gym";
|
|
954
|
+
yoga: "yoga";
|
|
955
|
+
photography: "photography";
|
|
956
|
+
writing: "writing";
|
|
957
|
+
graphic_design: "graphic_design";
|
|
958
|
+
filmmaking: "filmmaking";
|
|
959
|
+
digital_art: "digital_art";
|
|
960
|
+
content_creation: "content_creation";
|
|
961
|
+
blogging: "blogging";
|
|
962
|
+
vlogging: "vlogging";
|
|
963
|
+
podcasts: "podcasts";
|
|
964
|
+
animation: "animation";
|
|
965
|
+
music_production: "music_production";
|
|
966
|
+
volunteering: "volunteering";
|
|
967
|
+
ngo_work: "ngo_work";
|
|
968
|
+
environmental: "environmental";
|
|
969
|
+
women_empowerment: "women_empowerment";
|
|
970
|
+
community_service: "community_service";
|
|
971
|
+
social_enterprise: "social_enterprise";
|
|
972
|
+
education_access: "education_access";
|
|
973
|
+
}>>>;
|
|
974
|
+
}, z.core.$strip>;
|
|
975
|
+
export type CreatePostBody = z.infer<typeof createPostBodySchema>;
|
|
976
|
+
/** Only the text is editable. Changing media after the fact makes every
|
|
977
|
+
* earlier reply look like a reply to something else. */
|
|
978
|
+
export declare const updatePostBodySchema: z.ZodObject<{
|
|
979
|
+
text: z.ZodString;
|
|
980
|
+
}, z.core.$strip>;
|
|
981
|
+
export type UpdatePostBody = z.infer<typeof updatePostBodySchema>;
|
|
982
|
+
export declare const createPollBodySchema: z.ZodObject<{
|
|
983
|
+
question: z.ZodString;
|
|
984
|
+
options: z.ZodArray<z.ZodObject<{
|
|
985
|
+
label: z.ZodString;
|
|
986
|
+
}, z.core.$strip>>;
|
|
987
|
+
durationMs: z.ZodNumber;
|
|
988
|
+
allowsMultipleChoices: z.ZodBoolean;
|
|
989
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
990
|
+
ai_ml: "ai_ml";
|
|
991
|
+
b2b_saas: "b2b_saas";
|
|
992
|
+
d2c: "d2c";
|
|
993
|
+
deeptech: "deeptech";
|
|
994
|
+
robotics: "robotics";
|
|
995
|
+
growth: "growth";
|
|
996
|
+
sales: "sales";
|
|
997
|
+
marketing: "marketing";
|
|
998
|
+
supply_chain: "supply_chain";
|
|
999
|
+
fundraising: "fundraising";
|
|
1000
|
+
mentoring: "mentoring";
|
|
1001
|
+
leadership: "leadership";
|
|
1002
|
+
networking: "networking";
|
|
1003
|
+
public_speaking: "public_speaking";
|
|
1004
|
+
teaching: "teaching";
|
|
1005
|
+
hiring_talent: "hiring_talent";
|
|
1006
|
+
personal_branding: "personal_branding";
|
|
1007
|
+
career_transition: "career_transition";
|
|
1008
|
+
remote_work: "remote_work";
|
|
1009
|
+
blockchain: "blockchain";
|
|
1010
|
+
crypto_web3: "crypto_web3";
|
|
1011
|
+
data_science: "data_science";
|
|
1012
|
+
cybersecurity: "cybersecurity";
|
|
1013
|
+
game_dev: "game_dev";
|
|
1014
|
+
ux_design: "ux_design";
|
|
1015
|
+
app_development: "app_development";
|
|
1016
|
+
open_source: "open_source";
|
|
1017
|
+
electronics: "electronics";
|
|
1018
|
+
space_exploration: "space_exploration";
|
|
1019
|
+
green_tech: "green_tech";
|
|
1020
|
+
no_code: "no_code";
|
|
1021
|
+
entrepreneurship: "entrepreneurship";
|
|
1022
|
+
investing: "investing";
|
|
1023
|
+
stock_trading: "stock_trading";
|
|
1024
|
+
personal_finance: "personal_finance";
|
|
1025
|
+
consulting: "consulting";
|
|
1026
|
+
ecommerce: "ecommerce";
|
|
1027
|
+
retail: "retail";
|
|
1028
|
+
real_estate: "real_estate";
|
|
1029
|
+
product_management: "product_management";
|
|
1030
|
+
meditation: "meditation";
|
|
1031
|
+
journaling: "journaling";
|
|
1032
|
+
self_improvement: "self_improvement";
|
|
1033
|
+
productivity: "productivity";
|
|
1034
|
+
reading: "reading";
|
|
1035
|
+
online_courses: "online_courses";
|
|
1036
|
+
philosophy: "philosophy";
|
|
1037
|
+
psychology: "psychology";
|
|
1038
|
+
therapy: "therapy";
|
|
1039
|
+
sleep_optimization: "sleep_optimization";
|
|
1040
|
+
gym: "gym";
|
|
1041
|
+
yoga: "yoga";
|
|
1042
|
+
photography: "photography";
|
|
1043
|
+
writing: "writing";
|
|
1044
|
+
graphic_design: "graphic_design";
|
|
1045
|
+
filmmaking: "filmmaking";
|
|
1046
|
+
digital_art: "digital_art";
|
|
1047
|
+
content_creation: "content_creation";
|
|
1048
|
+
blogging: "blogging";
|
|
1049
|
+
vlogging: "vlogging";
|
|
1050
|
+
podcasts: "podcasts";
|
|
1051
|
+
animation: "animation";
|
|
1052
|
+
music_production: "music_production";
|
|
1053
|
+
volunteering: "volunteering";
|
|
1054
|
+
ngo_work: "ngo_work";
|
|
1055
|
+
environmental: "environmental";
|
|
1056
|
+
women_empowerment: "women_empowerment";
|
|
1057
|
+
community_service: "community_service";
|
|
1058
|
+
social_enterprise: "social_enterprise";
|
|
1059
|
+
education_access: "education_access";
|
|
1060
|
+
}>>>;
|
|
1061
|
+
}, z.core.$strip>;
|
|
1062
|
+
export type CreatePollBody = z.infer<typeof createPollBodySchema>;
|
|
1063
|
+
/** Cast or change a vote. The server upserts on (poll, voter), so voting
|
|
1064
|
+
* twice replaces rather than doubles. */
|
|
1065
|
+
export declare const castVoteBodySchema: z.ZodObject<{
|
|
1066
|
+
optionIndices: z.ZodArray<z.ZodNumber>;
|
|
1067
|
+
}, z.core.$strip>;
|
|
1068
|
+
export type CastVoteBody = z.infer<typeof castVoteBodySchema>;
|
|
1069
|
+
export declare const createCommentBodySchema: z.ZodObject<{
|
|
1070
|
+
text: z.ZodString;
|
|
1071
|
+
parentCommentId: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1072
|
+
}, z.core.$strip>;
|
|
1073
|
+
export type CreateCommentBody = z.infer<typeof createCommentBodySchema>;
|
|
1074
|
+
export declare const updateCommentBodySchema: z.ZodObject<{
|
|
1075
|
+
text: z.ZodString;
|
|
1076
|
+
}, z.core.$strip>;
|
|
1077
|
+
export type UpdateCommentBody = z.infer<typeof updateCommentBodySchema>;
|
|
1078
|
+
/** Set or clear a reaction. `null` clears it; at most one per viewer per item. */
|
|
1079
|
+
export declare const setReactionBodySchema: z.ZodObject<{
|
|
1080
|
+
reaction: z.ZodNullable<z.ZodEnum<{
|
|
1081
|
+
like: "like";
|
|
1082
|
+
celebrate: "celebrate";
|
|
1083
|
+
insightful: "insightful";
|
|
1084
|
+
curious: "curious";
|
|
1085
|
+
}>>;
|
|
1086
|
+
}, z.core.$strip>;
|
|
1087
|
+
export type SetReactionBody = z.infer<typeof setReactionBodySchema>;
|
|
1088
|
+
/**
|
|
1089
|
+
* Returned by the reaction endpoint so the card can render the authoritative
|
|
1090
|
+
* result without a follow-up read. Without the fresh counts a client has to
|
|
1091
|
+
* guess the new total, and two quick taps leave it showing a number the server
|
|
1092
|
+
* never had.
|
|
1093
|
+
*/
|
|
1094
|
+
export declare const setReactionResponseSchema: z.ZodObject<{
|
|
1095
|
+
contentKind: z.ZodEnum<{
|
|
1096
|
+
post: "post";
|
|
1097
|
+
poll: "poll";
|
|
1098
|
+
}>;
|
|
1099
|
+
contentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1100
|
+
reaction: z.ZodNullable<z.ZodEnum<{
|
|
1101
|
+
like: "like";
|
|
1102
|
+
celebrate: "celebrate";
|
|
1103
|
+
insightful: "insightful";
|
|
1104
|
+
curious: "curious";
|
|
1105
|
+
}>>;
|
|
1106
|
+
reactionCounts: z.ZodRecord<z.ZodEnum<{
|
|
1107
|
+
like: "like";
|
|
1108
|
+
celebrate: "celebrate";
|
|
1109
|
+
insightful: "insightful";
|
|
1110
|
+
curious: "curious";
|
|
1111
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
1112
|
+
}, z.core.$strip>;
|
|
1113
|
+
export type SetReactionResponse = z.infer<typeof setReactionResponseSchema>;
|
|
1114
|
+
/**
|
|
1115
|
+
* Why a member reported something.
|
|
1116
|
+
*
|
|
1117
|
+
* ⚠️ Stored on every report row, so this is data, not a label: removing a value
|
|
1118
|
+
* orphans reports already filed under it, and the counts nobody can recover are
|
|
1119
|
+
* exactly the ones a moderation review needs. Append only.
|
|
1120
|
+
*
|
|
1121
|
+
* ⚠️ A REASON THAT IS MISSING DOES NOT DISAPPEAR, it lands in `other`. Whatever
|
|
1122
|
+
* is not named here becomes an undifferentiated pile that no aggregate can see
|
|
1123
|
+
* a pattern in, which is the one thing report categories exist for. Worth being
|
|
1124
|
+
* deliberate about the absences rather than discovering them later.
|
|
1125
|
+
*/
|
|
1126
|
+
export declare const REPORT_REASON_VALUES: readonly ["spam", "harassment", "misinformation", "off_topic", "impersonation", "other"];
|
|
1127
|
+
export declare const reportReasonSchema: z.ZodEnum<{
|
|
1128
|
+
other: "other";
|
|
1129
|
+
spam: "spam";
|
|
1130
|
+
harassment: "harassment";
|
|
1131
|
+
misinformation: "misinformation";
|
|
1132
|
+
off_topic: "off_topic";
|
|
1133
|
+
impersonation: "impersonation";
|
|
1134
|
+
}>;
|
|
1135
|
+
export type ReportReason = z.infer<typeof reportReasonSchema>;
|
|
1136
|
+
/**
|
|
1137
|
+
* What a member sends to report a post, poll or comment.
|
|
1138
|
+
*
|
|
1139
|
+
* The target is the URL's, not the body's: a report is filed against a specific
|
|
1140
|
+
* thing at a specific address, and taking the target from the body would let a
|
|
1141
|
+
* caller report one item while the route thinks it is another.
|
|
1142
|
+
*
|
|
1143
|
+
* `note` is free text and optional, which is the pressure valve for everything
|
|
1144
|
+
* the enum does not name. ⚠️ It is written by a member, so it is untrusted at
|
|
1145
|
+
* render: a moderation queue displays it, and a moderation queue is a screen
|
|
1146
|
+
* staff read quickly.
|
|
1147
|
+
*/
|
|
1148
|
+
export declare const createReportBodySchema: z.ZodObject<{
|
|
1149
|
+
reason: z.ZodEnum<{
|
|
1150
|
+
other: "other";
|
|
1151
|
+
spam: "spam";
|
|
1152
|
+
harassment: "harassment";
|
|
1153
|
+
misinformation: "misinformation";
|
|
1154
|
+
off_topic: "off_topic";
|
|
1155
|
+
impersonation: "impersonation";
|
|
1156
|
+
}>;
|
|
1157
|
+
note: z.ZodOptional<z.ZodString>;
|
|
1158
|
+
}, z.core.$strip>;
|
|
1159
|
+
export type CreateReportBody = z.infer<typeof createReportBodySchema>;
|
|
1160
|
+
/**
|
|
1161
|
+
* The answer to filing one.
|
|
1162
|
+
*
|
|
1163
|
+
* `alreadyReported` distinguishes "we have taken this" from "you already told
|
|
1164
|
+
* us", because one report per member per target means a second press is a
|
|
1165
|
+
* no-op, and a silent no-op reads as a failure to somebody who pressed twice
|
|
1166
|
+
* deliberately. It is NOT a count: how many OTHER people reported an item is
|
|
1167
|
+
* moderation's business and telling a reporter would turn the count into a
|
|
1168
|
+
* score anyone could farm.
|
|
1169
|
+
*/
|
|
1170
|
+
export declare const createReportResponseSchema: z.ZodObject<{
|
|
1171
|
+
contentKind: z.ZodEnum<{
|
|
1172
|
+
post: "post";
|
|
1173
|
+
poll: "poll";
|
|
1174
|
+
}>;
|
|
1175
|
+
contentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1176
|
+
alreadyReported: z.ZodBoolean;
|
|
1177
|
+
}, z.core.$strip>;
|
|
1178
|
+
export type CreateReportResponse = z.infer<typeof createReportResponseSchema>;
|
|
1179
|
+
/** The bookmark endpoint is a toggle and returns the state it settled on. */
|
|
1180
|
+
export declare const toggleBookmarkResponseSchema: z.ZodObject<{
|
|
1181
|
+
contentKind: z.ZodEnum<{
|
|
1182
|
+
post: "post";
|
|
1183
|
+
poll: "poll";
|
|
1184
|
+
}>;
|
|
1185
|
+
contentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1186
|
+
bookmarked: z.ZodBoolean;
|
|
1187
|
+
}, z.core.$strip>;
|
|
1188
|
+
export type ToggleBookmarkResponse = z.infer<typeof toggleBookmarkResponseSchema>;
|
|
1189
|
+
/** A vote returns the whole poll: counts, totals and the viewer's own choices
|
|
1190
|
+
* all move together, and reassembling them client-side drifts. */
|
|
1191
|
+
export declare const castVoteResponseSchema: z.ZodObject<{
|
|
1192
|
+
poll: z.ZodObject<{
|
|
1193
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1194
|
+
contentKind: z.ZodLiteral<"poll">;
|
|
1195
|
+
author: z.ZodObject<{
|
|
1196
|
+
userId: z.ZodString;
|
|
1197
|
+
username: z.ZodString;
|
|
1198
|
+
displayName: z.ZodString;
|
|
1199
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
1200
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
1201
|
+
}, z.core.$strip>;
|
|
1202
|
+
question: z.ZodString;
|
|
1203
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1204
|
+
index: z.ZodNumber;
|
|
1205
|
+
label: z.ZodString;
|
|
1206
|
+
voteCount: z.ZodNumber;
|
|
1207
|
+
}, z.core.$strip>>;
|
|
1208
|
+
totalVoters: z.ZodNumber;
|
|
1209
|
+
allowsMultipleChoices: z.ZodBoolean;
|
|
1210
|
+
closesAt: z.ZodISODateTime;
|
|
1211
|
+
isClosed: z.ZodBoolean;
|
|
1212
|
+
topics: z.ZodArray<z.ZodEnum<{
|
|
1213
|
+
ai_ml: "ai_ml";
|
|
1214
|
+
b2b_saas: "b2b_saas";
|
|
1215
|
+
d2c: "d2c";
|
|
1216
|
+
deeptech: "deeptech";
|
|
1217
|
+
robotics: "robotics";
|
|
1218
|
+
growth: "growth";
|
|
1219
|
+
sales: "sales";
|
|
1220
|
+
marketing: "marketing";
|
|
1221
|
+
supply_chain: "supply_chain";
|
|
1222
|
+
fundraising: "fundraising";
|
|
1223
|
+
mentoring: "mentoring";
|
|
1224
|
+
leadership: "leadership";
|
|
1225
|
+
networking: "networking";
|
|
1226
|
+
public_speaking: "public_speaking";
|
|
1227
|
+
teaching: "teaching";
|
|
1228
|
+
hiring_talent: "hiring_talent";
|
|
1229
|
+
personal_branding: "personal_branding";
|
|
1230
|
+
career_transition: "career_transition";
|
|
1231
|
+
remote_work: "remote_work";
|
|
1232
|
+
blockchain: "blockchain";
|
|
1233
|
+
crypto_web3: "crypto_web3";
|
|
1234
|
+
data_science: "data_science";
|
|
1235
|
+
cybersecurity: "cybersecurity";
|
|
1236
|
+
game_dev: "game_dev";
|
|
1237
|
+
ux_design: "ux_design";
|
|
1238
|
+
app_development: "app_development";
|
|
1239
|
+
open_source: "open_source";
|
|
1240
|
+
electronics: "electronics";
|
|
1241
|
+
space_exploration: "space_exploration";
|
|
1242
|
+
green_tech: "green_tech";
|
|
1243
|
+
no_code: "no_code";
|
|
1244
|
+
entrepreneurship: "entrepreneurship";
|
|
1245
|
+
investing: "investing";
|
|
1246
|
+
stock_trading: "stock_trading";
|
|
1247
|
+
personal_finance: "personal_finance";
|
|
1248
|
+
consulting: "consulting";
|
|
1249
|
+
ecommerce: "ecommerce";
|
|
1250
|
+
retail: "retail";
|
|
1251
|
+
real_estate: "real_estate";
|
|
1252
|
+
product_management: "product_management";
|
|
1253
|
+
meditation: "meditation";
|
|
1254
|
+
journaling: "journaling";
|
|
1255
|
+
self_improvement: "self_improvement";
|
|
1256
|
+
productivity: "productivity";
|
|
1257
|
+
reading: "reading";
|
|
1258
|
+
online_courses: "online_courses";
|
|
1259
|
+
philosophy: "philosophy";
|
|
1260
|
+
psychology: "psychology";
|
|
1261
|
+
therapy: "therapy";
|
|
1262
|
+
sleep_optimization: "sleep_optimization";
|
|
1263
|
+
gym: "gym";
|
|
1264
|
+
yoga: "yoga";
|
|
1265
|
+
photography: "photography";
|
|
1266
|
+
writing: "writing";
|
|
1267
|
+
graphic_design: "graphic_design";
|
|
1268
|
+
filmmaking: "filmmaking";
|
|
1269
|
+
digital_art: "digital_art";
|
|
1270
|
+
content_creation: "content_creation";
|
|
1271
|
+
blogging: "blogging";
|
|
1272
|
+
vlogging: "vlogging";
|
|
1273
|
+
podcasts: "podcasts";
|
|
1274
|
+
animation: "animation";
|
|
1275
|
+
music_production: "music_production";
|
|
1276
|
+
volunteering: "volunteering";
|
|
1277
|
+
ngo_work: "ngo_work";
|
|
1278
|
+
environmental: "environmental";
|
|
1279
|
+
women_empowerment: "women_empowerment";
|
|
1280
|
+
community_service: "community_service";
|
|
1281
|
+
social_enterprise: "social_enterprise";
|
|
1282
|
+
education_access: "education_access";
|
|
1283
|
+
}>>;
|
|
1284
|
+
commentCount: z.ZodNumber;
|
|
1285
|
+
reactionCounts: z.ZodRecord<z.ZodEnum<{
|
|
1286
|
+
like: "like";
|
|
1287
|
+
celebrate: "celebrate";
|
|
1288
|
+
insightful: "insightful";
|
|
1289
|
+
curious: "curious";
|
|
1290
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
1291
|
+
createdAt: z.ZodISODateTime;
|
|
1292
|
+
editedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
1293
|
+
viewer: z.ZodOptional<z.ZodObject<{
|
|
1294
|
+
reaction: z.ZodNullable<z.ZodEnum<{
|
|
1295
|
+
like: "like";
|
|
1296
|
+
celebrate: "celebrate";
|
|
1297
|
+
insightful: "insightful";
|
|
1298
|
+
curious: "curious";
|
|
1299
|
+
}>>;
|
|
1300
|
+
bookmarked: z.ZodBoolean;
|
|
1301
|
+
isAuthor: z.ZodBoolean;
|
|
1302
|
+
canEdit: z.ZodBoolean;
|
|
1303
|
+
canDelete: z.ZodBoolean;
|
|
1304
|
+
canReport: z.ZodBoolean;
|
|
1305
|
+
votedOptionIndices: z.ZodArray<z.ZodNumber>;
|
|
1306
|
+
}, z.core.$strip>>;
|
|
1307
|
+
}, z.core.$strip>;
|
|
1308
|
+
}, z.core.$strip>;
|
|
1309
|
+
export type CastVoteResponse = z.infer<typeof castVoteResponseSchema>;
|
|
1310
|
+
//# sourceMappingURL=feed.d.ts.map
|