founder-schema 0.24.0 → 0.26.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/dist/access/permissions.d.ts +2 -1
- package/dist/access/permissions.d.ts.map +1 -1
- package/dist/access/permissions.js +2 -0
- package/dist/access/permissions.js.map +1 -1
- package/dist/domains/communities/communities.d.ts +9 -9
- package/dist/domains/discover/discover.d.ts +100 -1
- package/dist/domains/discover/discover.d.ts.map +1 -1
- package/dist/domains/discover/discover.js +6 -3
- package/dist/domains/discover/discover.js.map +1 -1
- package/dist/domains/feed/feed.d.ts +11 -11
- package/dist/domains/follows/follows.d.ts +431 -0
- package/dist/domains/follows/follows.d.ts.map +1 -0
- package/dist/domains/follows/follows.js +52 -0
- package/dist/domains/follows/follows.js.map +1 -0
- package/dist/domains/follows/relation.d.ts +59 -0
- package/dist/domains/follows/relation.d.ts.map +1 -0
- package/dist/domains/follows/relation.js +55 -0
- package/dist/domains/follows/relation.js.map +1 -0
- package/dist/domains/notifications/notifications.d.ts +20 -2
- package/dist/domains/notifications/notifications.d.ts.map +1 -1
- package/dist/domains/notifications/notifications.js +18 -0
- package/dist/domains/notifications/notifications.js.map +1 -1
- package/dist/domains/onboarding/onboarding-answers.d.ts +12 -8
- package/dist/domains/onboarding/onboarding-answers.d.ts.map +1 -1
- package/dist/domains/onboarding/onboarding-answers.js +20 -21
- package/dist/domains/onboarding/onboarding-answers.js.map +1 -1
- package/dist/domains/onboarding/onboarding.d.ts +210 -174
- package/dist/domains/onboarding/onboarding.d.ts.map +1 -1
- package/dist/domains/onboarding/onboarding.js +104 -70
- package/dist/domains/onboarding/onboarding.js.map +1 -1
- package/dist/domains/products/products.d.ts +3 -3
- package/dist/domains/profile/founder-profile.d.ts +155 -1
- package/dist/domains/profile/founder-profile.d.ts.map +1 -1
- package/dist/domains/profile/founder-profile.js +49 -1
- package/dist/domains/profile/founder-profile.js.map +1 -1
- package/dist/domains/profile/my-profile.d.ts +119 -40
- package/dist/domains/profile/my-profile.d.ts.map +1 -1
- package/dist/domains/profile/my-profile.js +28 -14
- package/dist/domains/profile/my-profile.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* founder-schema: following a member (2026-11-20; Jansathi's one-way follow)
|
|
3
|
+
*
|
|
4
|
+
* One way, no acceptance: following someone puts their posts in your home
|
|
5
|
+
* feed (the ones you may read) and tells you when they post; they hear that
|
|
6
|
+
* you followed them. Never yourself; never a deleted account. Following is
|
|
7
|
+
* taking part: a viewer is refused (MEMBERSHIP_REQUIRED).
|
|
8
|
+
*
|
|
9
|
+
* PUT /api/v1/founders/:userId/follow followTargetParamsSchema -> followAnswerSchema
|
|
10
|
+
* DELETE /api/v1/founders/:userId/follow followTargetParamsSchema -> followAnswerSchema
|
|
11
|
+
* GET /api/v1/founders/:userId/followers paginationQuerySchema -> personPageSchema
|
|
12
|
+
* GET /api/v1/founders/:userId/following paginationQuerySchema -> personPageSchema
|
|
13
|
+
*
|
|
14
|
+
* PUT and DELETE are idempotent (not a toggle): a double tap or a retry
|
|
15
|
+
* cannot flip it back. Both answer the state as it now stands.
|
|
16
|
+
*
|
|
17
|
+
* @module founder-schema/domains/follows
|
|
18
|
+
*/
|
|
19
|
+
import { z } from 'zod';
|
|
20
|
+
export { type FollowCounts, type FollowedBy, type FollowRelation, followCountsSchema, followedBySchema, followRelationSchema, MUTUALS_SAMPLE_SIZE, type Mutuals, mutualsSchema, } from './relation.js';
|
|
21
|
+
/** Whom to follow or stop following: the MEMBER's id (`userId`), as chats and bylines key on. */
|
|
22
|
+
export declare const followTargetParamsSchema: z.ZodObject<{
|
|
23
|
+
userId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type FollowTargetParams = z.infer<typeof followTargetParamsSchema>;
|
|
26
|
+
/** The answer to a follow or an unfollow: the state now, and their follower count now. */
|
|
27
|
+
export declare const followAnswerSchema: z.ZodObject<{
|
|
28
|
+
userId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
29
|
+
following: z.ZodBoolean;
|
|
30
|
+
followers: z.ZodNumber;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export type FollowAnswer = z.infer<typeof followAnswerSchema>;
|
|
33
|
+
/**
|
|
34
|
+
* A person on a list (Discover's People, someone's followers and following):
|
|
35
|
+
* their card, their interests, and how the viewer relates to them, for the
|
|
36
|
+
* card's mutuals line and its Follow button.
|
|
37
|
+
*
|
|
38
|
+
* `interests` (2026-11-22, the user's People card): the topics the member
|
|
39
|
+
* picked, in their order, each once. ON THIS CARD ONLY: not on
|
|
40
|
+
* `founderCardSchema` (other cards, the member page) and not on
|
|
41
|
+
* `founderProfileSchema` (the owner reads theirs from `GET /profiles/me/interests`).
|
|
42
|
+
* It lives here and not in `domains/profile` because the topics are
|
|
43
|
+
* onboarding's, and onboarding imports the profile.
|
|
44
|
+
*/
|
|
45
|
+
export declare const personCardSchema: z.ZodObject<{
|
|
46
|
+
id: z.ZodString;
|
|
47
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
city: z.ZodString;
|
|
49
|
+
state: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | undefined, string>>>;
|
|
50
|
+
country: z.ZodString;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
userId: z.ZodString;
|
|
53
|
+
username: z.ZodString;
|
|
54
|
+
displayName: z.ZodString;
|
|
55
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
56
|
+
headline: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | undefined, string>>>;
|
|
57
|
+
contribution: z.ZodObject<{
|
|
58
|
+
score: z.ZodNumber;
|
|
59
|
+
helpedCount: z.ZodNumber;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
venture: z.ZodOptional<z.ZodObject<{
|
|
62
|
+
name: z.ZodString;
|
|
63
|
+
tagline: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | undefined, string>>>;
|
|
64
|
+
website: z.ZodOptional<z.ZodURL>;
|
|
65
|
+
industry: z.ZodEnum<{
|
|
66
|
+
agritech: "agritech";
|
|
67
|
+
ai_ml: "ai_ml";
|
|
68
|
+
b2b_saas: "b2b_saas";
|
|
69
|
+
consumer: "consumer";
|
|
70
|
+
climate: "climate";
|
|
71
|
+
d2c: "d2c";
|
|
72
|
+
deeptech: "deeptech";
|
|
73
|
+
edtech: "edtech";
|
|
74
|
+
fintech: "fintech";
|
|
75
|
+
gaming: "gaming";
|
|
76
|
+
healthtech: "healthtech";
|
|
77
|
+
logistics: "logistics";
|
|
78
|
+
manufacturing: "manufacturing";
|
|
79
|
+
marketplace: "marketplace";
|
|
80
|
+
media: "media";
|
|
81
|
+
mobility: "mobility";
|
|
82
|
+
proptech: "proptech";
|
|
83
|
+
robotics: "robotics";
|
|
84
|
+
services: "services";
|
|
85
|
+
space: "space";
|
|
86
|
+
other: "other";
|
|
87
|
+
}>;
|
|
88
|
+
stage: z.ZodEnum<{
|
|
89
|
+
idea: "idea";
|
|
90
|
+
validation: "validation";
|
|
91
|
+
mvp: "mvp";
|
|
92
|
+
pre_seed: "pre_seed";
|
|
93
|
+
seed: "seed";
|
|
94
|
+
series_a_plus: "series_a_plus";
|
|
95
|
+
profitable: "profitable";
|
|
96
|
+
exited: "exited";
|
|
97
|
+
}>;
|
|
98
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
99
|
+
founder: "founder";
|
|
100
|
+
other: "other";
|
|
101
|
+
co_founder: "co_founder";
|
|
102
|
+
ceo: "ceo";
|
|
103
|
+
cto: "cto";
|
|
104
|
+
coo: "coo";
|
|
105
|
+
cfo: "cfo";
|
|
106
|
+
cmo: "cmo";
|
|
107
|
+
cpo: "cpo";
|
|
108
|
+
}>>>;
|
|
109
|
+
teamSize: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
foundedYear: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
skills: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
113
|
+
engineering: "engineering";
|
|
114
|
+
product: "product";
|
|
115
|
+
design: "design";
|
|
116
|
+
data: "data";
|
|
117
|
+
growth: "growth";
|
|
118
|
+
sales: "sales";
|
|
119
|
+
marketing: "marketing";
|
|
120
|
+
operations: "operations";
|
|
121
|
+
finance: "finance";
|
|
122
|
+
legal: "legal";
|
|
123
|
+
hr_people: "hr_people";
|
|
124
|
+
supply_chain: "supply_chain";
|
|
125
|
+
research: "research";
|
|
126
|
+
fundraising: "fundraising";
|
|
127
|
+
community: "community";
|
|
128
|
+
}>>>;
|
|
129
|
+
goals: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
130
|
+
find_cofounder: "find_cofounder";
|
|
131
|
+
find_investors: "find_investors";
|
|
132
|
+
find_customers: "find_customers";
|
|
133
|
+
hiring: "hiring";
|
|
134
|
+
partnerships: "partnerships";
|
|
135
|
+
mentorship: "mentorship";
|
|
136
|
+
grow_network: "grow_network";
|
|
137
|
+
business_ideas: "business_ideas";
|
|
138
|
+
market_insights: "market_insights";
|
|
139
|
+
learn_startup: "learn_startup";
|
|
140
|
+
start_company: "start_company";
|
|
141
|
+
get_feedback: "get_feedback";
|
|
142
|
+
find_testers: "find_testers";
|
|
143
|
+
mentor_others: "mentor_others";
|
|
144
|
+
invest_in_startups: "invest_in_startups";
|
|
145
|
+
join_startup: "join_startup";
|
|
146
|
+
find_service_providers: "find_service_providers";
|
|
147
|
+
attend_events: "attend_events";
|
|
148
|
+
}>>>;
|
|
149
|
+
interests: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
150
|
+
ai_ml: "ai_ml";
|
|
151
|
+
b2b_saas: "b2b_saas";
|
|
152
|
+
d2c: "d2c";
|
|
153
|
+
deeptech: "deeptech";
|
|
154
|
+
robotics: "robotics";
|
|
155
|
+
growth: "growth";
|
|
156
|
+
sales: "sales";
|
|
157
|
+
marketing: "marketing";
|
|
158
|
+
supply_chain: "supply_chain";
|
|
159
|
+
fundraising: "fundraising";
|
|
160
|
+
mentoring: "mentoring";
|
|
161
|
+
leadership: "leadership";
|
|
162
|
+
networking: "networking";
|
|
163
|
+
public_speaking: "public_speaking";
|
|
164
|
+
teaching: "teaching";
|
|
165
|
+
hiring_talent: "hiring_talent";
|
|
166
|
+
personal_branding: "personal_branding";
|
|
167
|
+
career_transition: "career_transition";
|
|
168
|
+
remote_work: "remote_work";
|
|
169
|
+
blockchain: "blockchain";
|
|
170
|
+
crypto_web3: "crypto_web3";
|
|
171
|
+
data_science: "data_science";
|
|
172
|
+
cybersecurity: "cybersecurity";
|
|
173
|
+
game_dev: "game_dev";
|
|
174
|
+
ux_design: "ux_design";
|
|
175
|
+
app_development: "app_development";
|
|
176
|
+
open_source: "open_source";
|
|
177
|
+
electronics: "electronics";
|
|
178
|
+
space_exploration: "space_exploration";
|
|
179
|
+
green_tech: "green_tech";
|
|
180
|
+
no_code: "no_code";
|
|
181
|
+
entrepreneurship: "entrepreneurship";
|
|
182
|
+
investing: "investing";
|
|
183
|
+
stock_trading: "stock_trading";
|
|
184
|
+
personal_finance: "personal_finance";
|
|
185
|
+
consulting: "consulting";
|
|
186
|
+
ecommerce: "ecommerce";
|
|
187
|
+
retail: "retail";
|
|
188
|
+
real_estate: "real_estate";
|
|
189
|
+
product_management: "product_management";
|
|
190
|
+
meditation: "meditation";
|
|
191
|
+
journaling: "journaling";
|
|
192
|
+
self_improvement: "self_improvement";
|
|
193
|
+
productivity: "productivity";
|
|
194
|
+
reading: "reading";
|
|
195
|
+
online_courses: "online_courses";
|
|
196
|
+
philosophy: "philosophy";
|
|
197
|
+
psychology: "psychology";
|
|
198
|
+
therapy: "therapy";
|
|
199
|
+
sleep_optimization: "sleep_optimization";
|
|
200
|
+
gym: "gym";
|
|
201
|
+
yoga: "yoga";
|
|
202
|
+
photography: "photography";
|
|
203
|
+
writing: "writing";
|
|
204
|
+
graphic_design: "graphic_design";
|
|
205
|
+
filmmaking: "filmmaking";
|
|
206
|
+
digital_art: "digital_art";
|
|
207
|
+
content_creation: "content_creation";
|
|
208
|
+
blogging: "blogging";
|
|
209
|
+
vlogging: "vlogging";
|
|
210
|
+
podcasts: "podcasts";
|
|
211
|
+
animation: "animation";
|
|
212
|
+
music_production: "music_production";
|
|
213
|
+
volunteering: "volunteering";
|
|
214
|
+
ngo_work: "ngo_work";
|
|
215
|
+
environmental: "environmental";
|
|
216
|
+
women_empowerment: "women_empowerment";
|
|
217
|
+
community_service: "community_service";
|
|
218
|
+
social_enterprise: "social_enterprise";
|
|
219
|
+
education_access: "education_access";
|
|
220
|
+
}>>>;
|
|
221
|
+
follow: z.ZodObject<{
|
|
222
|
+
following: z.ZodBoolean;
|
|
223
|
+
followsYou: z.ZodBoolean;
|
|
224
|
+
followedBy: z.ZodObject<{
|
|
225
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
226
|
+
others: z.ZodNumber;
|
|
227
|
+
}, z.core.$strip>;
|
|
228
|
+
mutuals: z.ZodOptional<z.ZodObject<{
|
|
229
|
+
count: z.ZodNumber;
|
|
230
|
+
sampleNames: z.ZodArray<z.ZodString>;
|
|
231
|
+
avatars: z.ZodArray<z.ZodNullable<z.ZodURL>>;
|
|
232
|
+
}, z.core.$strip>>;
|
|
233
|
+
}, z.core.$strip>;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
export type PersonCard = z.infer<typeof personCardSchema>;
|
|
236
|
+
/** A page of people, newest follow first on the followers and following lists. */
|
|
237
|
+
export declare const personPageSchema: z.ZodObject<{
|
|
238
|
+
items: z.ZodArray<z.ZodObject<{
|
|
239
|
+
id: z.ZodString;
|
|
240
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
241
|
+
city: z.ZodString;
|
|
242
|
+
state: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | undefined, string>>>;
|
|
243
|
+
country: z.ZodString;
|
|
244
|
+
}, z.core.$strip>>;
|
|
245
|
+
userId: z.ZodString;
|
|
246
|
+
username: z.ZodString;
|
|
247
|
+
displayName: z.ZodString;
|
|
248
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
249
|
+
headline: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | undefined, string>>>;
|
|
250
|
+
contribution: z.ZodObject<{
|
|
251
|
+
score: z.ZodNumber;
|
|
252
|
+
helpedCount: z.ZodNumber;
|
|
253
|
+
}, z.core.$strip>;
|
|
254
|
+
venture: z.ZodOptional<z.ZodObject<{
|
|
255
|
+
name: z.ZodString;
|
|
256
|
+
tagline: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | undefined, string>>>;
|
|
257
|
+
website: z.ZodOptional<z.ZodURL>;
|
|
258
|
+
industry: z.ZodEnum<{
|
|
259
|
+
agritech: "agritech";
|
|
260
|
+
ai_ml: "ai_ml";
|
|
261
|
+
b2b_saas: "b2b_saas";
|
|
262
|
+
consumer: "consumer";
|
|
263
|
+
climate: "climate";
|
|
264
|
+
d2c: "d2c";
|
|
265
|
+
deeptech: "deeptech";
|
|
266
|
+
edtech: "edtech";
|
|
267
|
+
fintech: "fintech";
|
|
268
|
+
gaming: "gaming";
|
|
269
|
+
healthtech: "healthtech";
|
|
270
|
+
logistics: "logistics";
|
|
271
|
+
manufacturing: "manufacturing";
|
|
272
|
+
marketplace: "marketplace";
|
|
273
|
+
media: "media";
|
|
274
|
+
mobility: "mobility";
|
|
275
|
+
proptech: "proptech";
|
|
276
|
+
robotics: "robotics";
|
|
277
|
+
services: "services";
|
|
278
|
+
space: "space";
|
|
279
|
+
other: "other";
|
|
280
|
+
}>;
|
|
281
|
+
stage: z.ZodEnum<{
|
|
282
|
+
idea: "idea";
|
|
283
|
+
validation: "validation";
|
|
284
|
+
mvp: "mvp";
|
|
285
|
+
pre_seed: "pre_seed";
|
|
286
|
+
seed: "seed";
|
|
287
|
+
series_a_plus: "series_a_plus";
|
|
288
|
+
profitable: "profitable";
|
|
289
|
+
exited: "exited";
|
|
290
|
+
}>;
|
|
291
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
292
|
+
founder: "founder";
|
|
293
|
+
other: "other";
|
|
294
|
+
co_founder: "co_founder";
|
|
295
|
+
ceo: "ceo";
|
|
296
|
+
cto: "cto";
|
|
297
|
+
coo: "coo";
|
|
298
|
+
cfo: "cfo";
|
|
299
|
+
cmo: "cmo";
|
|
300
|
+
cpo: "cpo";
|
|
301
|
+
}>>>;
|
|
302
|
+
teamSize: z.ZodOptional<z.ZodNumber>;
|
|
303
|
+
foundedYear: z.ZodOptional<z.ZodNumber>;
|
|
304
|
+
}, z.core.$strip>>;
|
|
305
|
+
skills: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
306
|
+
engineering: "engineering";
|
|
307
|
+
product: "product";
|
|
308
|
+
design: "design";
|
|
309
|
+
data: "data";
|
|
310
|
+
growth: "growth";
|
|
311
|
+
sales: "sales";
|
|
312
|
+
marketing: "marketing";
|
|
313
|
+
operations: "operations";
|
|
314
|
+
finance: "finance";
|
|
315
|
+
legal: "legal";
|
|
316
|
+
hr_people: "hr_people";
|
|
317
|
+
supply_chain: "supply_chain";
|
|
318
|
+
research: "research";
|
|
319
|
+
fundraising: "fundraising";
|
|
320
|
+
community: "community";
|
|
321
|
+
}>>>;
|
|
322
|
+
goals: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
323
|
+
find_cofounder: "find_cofounder";
|
|
324
|
+
find_investors: "find_investors";
|
|
325
|
+
find_customers: "find_customers";
|
|
326
|
+
hiring: "hiring";
|
|
327
|
+
partnerships: "partnerships";
|
|
328
|
+
mentorship: "mentorship";
|
|
329
|
+
grow_network: "grow_network";
|
|
330
|
+
business_ideas: "business_ideas";
|
|
331
|
+
market_insights: "market_insights";
|
|
332
|
+
learn_startup: "learn_startup";
|
|
333
|
+
start_company: "start_company";
|
|
334
|
+
get_feedback: "get_feedback";
|
|
335
|
+
find_testers: "find_testers";
|
|
336
|
+
mentor_others: "mentor_others";
|
|
337
|
+
invest_in_startups: "invest_in_startups";
|
|
338
|
+
join_startup: "join_startup";
|
|
339
|
+
find_service_providers: "find_service_providers";
|
|
340
|
+
attend_events: "attend_events";
|
|
341
|
+
}>>>;
|
|
342
|
+
interests: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
343
|
+
ai_ml: "ai_ml";
|
|
344
|
+
b2b_saas: "b2b_saas";
|
|
345
|
+
d2c: "d2c";
|
|
346
|
+
deeptech: "deeptech";
|
|
347
|
+
robotics: "robotics";
|
|
348
|
+
growth: "growth";
|
|
349
|
+
sales: "sales";
|
|
350
|
+
marketing: "marketing";
|
|
351
|
+
supply_chain: "supply_chain";
|
|
352
|
+
fundraising: "fundraising";
|
|
353
|
+
mentoring: "mentoring";
|
|
354
|
+
leadership: "leadership";
|
|
355
|
+
networking: "networking";
|
|
356
|
+
public_speaking: "public_speaking";
|
|
357
|
+
teaching: "teaching";
|
|
358
|
+
hiring_talent: "hiring_talent";
|
|
359
|
+
personal_branding: "personal_branding";
|
|
360
|
+
career_transition: "career_transition";
|
|
361
|
+
remote_work: "remote_work";
|
|
362
|
+
blockchain: "blockchain";
|
|
363
|
+
crypto_web3: "crypto_web3";
|
|
364
|
+
data_science: "data_science";
|
|
365
|
+
cybersecurity: "cybersecurity";
|
|
366
|
+
game_dev: "game_dev";
|
|
367
|
+
ux_design: "ux_design";
|
|
368
|
+
app_development: "app_development";
|
|
369
|
+
open_source: "open_source";
|
|
370
|
+
electronics: "electronics";
|
|
371
|
+
space_exploration: "space_exploration";
|
|
372
|
+
green_tech: "green_tech";
|
|
373
|
+
no_code: "no_code";
|
|
374
|
+
entrepreneurship: "entrepreneurship";
|
|
375
|
+
investing: "investing";
|
|
376
|
+
stock_trading: "stock_trading";
|
|
377
|
+
personal_finance: "personal_finance";
|
|
378
|
+
consulting: "consulting";
|
|
379
|
+
ecommerce: "ecommerce";
|
|
380
|
+
retail: "retail";
|
|
381
|
+
real_estate: "real_estate";
|
|
382
|
+
product_management: "product_management";
|
|
383
|
+
meditation: "meditation";
|
|
384
|
+
journaling: "journaling";
|
|
385
|
+
self_improvement: "self_improvement";
|
|
386
|
+
productivity: "productivity";
|
|
387
|
+
reading: "reading";
|
|
388
|
+
online_courses: "online_courses";
|
|
389
|
+
philosophy: "philosophy";
|
|
390
|
+
psychology: "psychology";
|
|
391
|
+
therapy: "therapy";
|
|
392
|
+
sleep_optimization: "sleep_optimization";
|
|
393
|
+
gym: "gym";
|
|
394
|
+
yoga: "yoga";
|
|
395
|
+
photography: "photography";
|
|
396
|
+
writing: "writing";
|
|
397
|
+
graphic_design: "graphic_design";
|
|
398
|
+
filmmaking: "filmmaking";
|
|
399
|
+
digital_art: "digital_art";
|
|
400
|
+
content_creation: "content_creation";
|
|
401
|
+
blogging: "blogging";
|
|
402
|
+
vlogging: "vlogging";
|
|
403
|
+
podcasts: "podcasts";
|
|
404
|
+
animation: "animation";
|
|
405
|
+
music_production: "music_production";
|
|
406
|
+
volunteering: "volunteering";
|
|
407
|
+
ngo_work: "ngo_work";
|
|
408
|
+
environmental: "environmental";
|
|
409
|
+
women_empowerment: "women_empowerment";
|
|
410
|
+
community_service: "community_service";
|
|
411
|
+
social_enterprise: "social_enterprise";
|
|
412
|
+
education_access: "education_access";
|
|
413
|
+
}>>>;
|
|
414
|
+
follow: z.ZodObject<{
|
|
415
|
+
following: z.ZodBoolean;
|
|
416
|
+
followsYou: z.ZodBoolean;
|
|
417
|
+
followedBy: z.ZodObject<{
|
|
418
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
419
|
+
others: z.ZodNumber;
|
|
420
|
+
}, z.core.$strip>;
|
|
421
|
+
mutuals: z.ZodOptional<z.ZodObject<{
|
|
422
|
+
count: z.ZodNumber;
|
|
423
|
+
sampleNames: z.ZodArray<z.ZodString>;
|
|
424
|
+
avatars: z.ZodArray<z.ZodNullable<z.ZodURL>>;
|
|
425
|
+
}, z.core.$strip>>;
|
|
426
|
+
}, z.core.$strip>;
|
|
427
|
+
}, z.core.$strip>>;
|
|
428
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
429
|
+
}, z.core.$strip>;
|
|
430
|
+
export type PersonPage = z.infer<typeof personPageSchema>;
|
|
431
|
+
//# sourceMappingURL=follows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"follows.d.ts","sourceRoot":"","sources":["../../../src/domains/follows/follows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,OAAO,EACZ,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,iGAAiG;AACjG,eAAO,MAAM,wBAAwB;;iBAAuC,CAAC;AAC7E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,kFAAkF;AAClF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAoC,CAAC;AAClE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* founder-schema: following a member (2026-11-20; Jansathi's one-way follow)
|
|
3
|
+
*
|
|
4
|
+
* One way, no acceptance: following someone puts their posts in your home
|
|
5
|
+
* feed (the ones you may read) and tells you when they post; they hear that
|
|
6
|
+
* you followed them. Never yourself; never a deleted account. Following is
|
|
7
|
+
* taking part: a viewer is refused (MEMBERSHIP_REQUIRED).
|
|
8
|
+
*
|
|
9
|
+
* PUT /api/v1/founders/:userId/follow followTargetParamsSchema -> followAnswerSchema
|
|
10
|
+
* DELETE /api/v1/founders/:userId/follow followTargetParamsSchema -> followAnswerSchema
|
|
11
|
+
* GET /api/v1/founders/:userId/followers paginationQuerySchema -> personPageSchema
|
|
12
|
+
* GET /api/v1/founders/:userId/following paginationQuerySchema -> personPageSchema
|
|
13
|
+
*
|
|
14
|
+
* PUT and DELETE are idempotent (not a toggle): a double tap or a retry
|
|
15
|
+
* cannot flip it back. Both answer the state as it now stands.
|
|
16
|
+
*
|
|
17
|
+
* @module founder-schema/domains/follows
|
|
18
|
+
*/
|
|
19
|
+
import { z } from 'zod';
|
|
20
|
+
import { objectIdSchema } from '../../core/common.js';
|
|
21
|
+
import { paginatedSchema } from '../../core/responses.js';
|
|
22
|
+
import { INTERESTS_MAX, topicSchema } from '../onboarding/onboarding.js';
|
|
23
|
+
import { founderCardSchema } from '../profile/founder-profile.js';
|
|
24
|
+
import { followRelationSchema } from './relation.js';
|
|
25
|
+
export { followCountsSchema, followedBySchema, followRelationSchema, MUTUALS_SAMPLE_SIZE, mutualsSchema, } from './relation.js';
|
|
26
|
+
/** Whom to follow or stop following: the MEMBER's id (`userId`), as chats and bylines key on. */
|
|
27
|
+
export const followTargetParamsSchema = z.object({ userId: objectIdSchema });
|
|
28
|
+
/** The answer to a follow or an unfollow: the state now, and their follower count now. */
|
|
29
|
+
export const followAnswerSchema = z.object({
|
|
30
|
+
userId: objectIdSchema,
|
|
31
|
+
following: z.boolean(),
|
|
32
|
+
followers: z.number().int().nonnegative(),
|
|
33
|
+
});
|
|
34
|
+
/**
|
|
35
|
+
* A person on a list (Discover's People, someone's followers and following):
|
|
36
|
+
* their card, their interests, and how the viewer relates to them, for the
|
|
37
|
+
* card's mutuals line and its Follow button.
|
|
38
|
+
*
|
|
39
|
+
* `interests` (2026-11-22, the user's People card): the topics the member
|
|
40
|
+
* picked, in their order, each once. ON THIS CARD ONLY: not on
|
|
41
|
+
* `founderCardSchema` (other cards, the member page) and not on
|
|
42
|
+
* `founderProfileSchema` (the owner reads theirs from `GET /profiles/me/interests`).
|
|
43
|
+
* It lives here and not in `domains/profile` because the topics are
|
|
44
|
+
* onboarding's, and onboarding imports the profile.
|
|
45
|
+
*/
|
|
46
|
+
export const personCardSchema = founderCardSchema.extend({
|
|
47
|
+
interests: z.array(topicSchema).max(INTERESTS_MAX).default([]),
|
|
48
|
+
follow: followRelationSchema,
|
|
49
|
+
});
|
|
50
|
+
/** A page of people, newest follow first on the followers and following lists. */
|
|
51
|
+
export const personPageSchema = paginatedSchema(personCardSchema);
|
|
52
|
+
//# sourceMappingURL=follows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"follows.js","sourceRoot":"","sources":["../../../src/domains/follows/follows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAIL,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EAEnB,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,iGAAiG;AACjG,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;AAG7E,0FAA0F;AAC1F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,cAAc;IACtB,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CAC1C,CAAC,CAAC;AAGH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,MAAM,CAAC;IACvD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9D,MAAM,EAAE,oBAAoB;CAC7B,CAAC,CAAC;AAGH,kFAAkF;AAClF,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["/**\n * founder-schema: following a member (2026-11-20; Jansathi's one-way follow)\n *\n * One way, no acceptance: following someone puts their posts in your home\n * feed (the ones you may read) and tells you when they post; they hear that\n * you followed them. Never yourself; never a deleted account. Following is\n * taking part: a viewer is refused (MEMBERSHIP_REQUIRED).\n *\n * PUT /api/v1/founders/:userId/follow followTargetParamsSchema -> followAnswerSchema\n * DELETE /api/v1/founders/:userId/follow followTargetParamsSchema -> followAnswerSchema\n * GET /api/v1/founders/:userId/followers paginationQuerySchema -> personPageSchema\n * GET /api/v1/founders/:userId/following paginationQuerySchema -> personPageSchema\n *\n * PUT and DELETE are idempotent (not a toggle): a double tap or a retry\n * cannot flip it back. Both answer the state as it now stands.\n *\n * @module founder-schema/domains/follows\n */\n\nimport { z } from 'zod';\nimport { objectIdSchema } from '../../core/common.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { INTERESTS_MAX, topicSchema } from '../onboarding/onboarding.js';\nimport { founderCardSchema } from '../profile/founder-profile.js';\nimport { followRelationSchema } from './relation.js';\n\nexport {\n type FollowCounts,\n type FollowedBy,\n type FollowRelation,\n followCountsSchema,\n followedBySchema,\n followRelationSchema,\n MUTUALS_SAMPLE_SIZE,\n type Mutuals,\n mutualsSchema,\n} from './relation.js';\n\n/** Whom to follow or stop following: the MEMBER's id (`userId`), as chats and bylines key on. */\nexport const followTargetParamsSchema = z.object({ userId: objectIdSchema });\nexport type FollowTargetParams = z.infer<typeof followTargetParamsSchema>;\n\n/** The answer to a follow or an unfollow: the state now, and their follower count now. */\nexport const followAnswerSchema = z.object({\n userId: objectIdSchema,\n following: z.boolean(),\n followers: z.number().int().nonnegative(),\n});\nexport type FollowAnswer = z.infer<typeof followAnswerSchema>;\n\n/**\n * A person on a list (Discover's People, someone's followers and following):\n * their card, their interests, and how the viewer relates to them, for the\n * card's mutuals line and its Follow button.\n *\n * `interests` (2026-11-22, the user's People card): the topics the member\n * picked, in their order, each once. ON THIS CARD ONLY: not on\n * `founderCardSchema` (other cards, the member page) and not on\n * `founderProfileSchema` (the owner reads theirs from `GET /profiles/me/interests`).\n * It lives here and not in `domains/profile` because the topics are\n * onboarding's, and onboarding imports the profile.\n */\nexport const personCardSchema = founderCardSchema.extend({\n interests: z.array(topicSchema).max(INTERESTS_MAX).default([]),\n follow: followRelationSchema,\n});\nexport type PersonCard = z.infer<typeof personCardSchema>;\n\n/** A page of people, newest follow first on the followers and following lists. */\nexport const personPageSchema = paginatedSchema(personCardSchema);\nexport type PersonPage = z.infer<typeof personPageSchema>;\n"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* founder-schema: one member's follow relation to another, as a viewer sees it
|
|
3
|
+
* (2026-11-20). A leaf module, imported by the member page (`domains/profile`)
|
|
4
|
+
* and the people lists (`domains/follows`), so neither imports the other.
|
|
5
|
+
*
|
|
6
|
+
* @module founder-schema/domains/follows/relation
|
|
7
|
+
*/
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
/**
|
|
10
|
+
* "Followed by Neha + 3": of the people the VIEWER follows, the ones who
|
|
11
|
+
* follow this person. `firstName` is one of them (null when none), `others`
|
|
12
|
+
* how many more.
|
|
13
|
+
*/
|
|
14
|
+
export declare const followedBySchema: z.ZodObject<{
|
|
15
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
16
|
+
others: z.ZodNumber;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type FollowedBy = z.infer<typeof followedBySchema>;
|
|
19
|
+
/** How many faces and names a mutuals line carries (GymMonk's `MUTUALS_SAMPLE_SIZE`). */
|
|
20
|
+
export declare const MUTUALS_SAMPLE_SIZE = 3;
|
|
21
|
+
/**
|
|
22
|
+
* "Followed by Neha, Rohit + 3 more" (2026-11-22, the People card; GymMonk's
|
|
23
|
+
* and Jansathi's mutuals line): the same people as `followedBy`, of the people
|
|
24
|
+
* the VIEWER follows the ones who follow this person, newest follow first,
|
|
25
|
+
* deleted accounts left out.
|
|
26
|
+
*
|
|
27
|
+
* `count` is ALL of them; `sampleNames` and `avatars` only the first
|
|
28
|
+
* `MUTUALS_SAMPLE_SIZE`, in the same order, so face `i` falls back to the
|
|
29
|
+
* initial of name `i`. The line names two and counts the rest. An avatar is
|
|
30
|
+
* null when that person has no photo.
|
|
31
|
+
*/
|
|
32
|
+
export declare const mutualsSchema: z.ZodObject<{
|
|
33
|
+
count: z.ZodNumber;
|
|
34
|
+
sampleNames: z.ZodArray<z.ZodString>;
|
|
35
|
+
avatars: z.ZodArray<z.ZodNullable<z.ZodURL>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export type Mutuals = z.infer<typeof mutualsSchema>;
|
|
38
|
+
/** The viewer and this person, both ways. Always all false / none for the viewer themselves. */
|
|
39
|
+
export declare const followRelationSchema: z.ZodObject<{
|
|
40
|
+
following: z.ZodBoolean;
|
|
41
|
+
followsYou: z.ZodBoolean;
|
|
42
|
+
followedBy: z.ZodObject<{
|
|
43
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
44
|
+
others: z.ZodNumber;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
mutuals: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
count: z.ZodNumber;
|
|
48
|
+
sampleNames: z.ZodArray<z.ZodString>;
|
|
49
|
+
avatars: z.ZodArray<z.ZodNullable<z.ZodURL>>;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
export type FollowRelation = z.infer<typeof followRelationSchema>;
|
|
53
|
+
/** How many follow this person, and how many they follow. Counted when read, never stored. */
|
|
54
|
+
export declare const followCountsSchema: z.ZodObject<{
|
|
55
|
+
followers: z.ZodNumber;
|
|
56
|
+
following: z.ZodNumber;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
export type FollowCounts = z.infer<typeof followCountsSchema>;
|
|
59
|
+
//# sourceMappingURL=relation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relation.d.ts","sourceRoot":"","sources":["../../../src/domains/follows/relation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,yFAAyF;AACzF,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa;;;;iBAIxB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,gGAAgG;AAChG,eAAO,MAAM,oBAAoB;;;;;;;;;;;;iBAY/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* founder-schema: one member's follow relation to another, as a viewer sees it
|
|
3
|
+
* (2026-11-20). A leaf module, imported by the member page (`domains/profile`)
|
|
4
|
+
* and the people lists (`domains/follows`), so neither imports the other.
|
|
5
|
+
*
|
|
6
|
+
* @module founder-schema/domains/follows/relation
|
|
7
|
+
*/
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
/**
|
|
10
|
+
* "Followed by Neha + 3": of the people the VIEWER follows, the ones who
|
|
11
|
+
* follow this person. `firstName` is one of them (null when none), `others`
|
|
12
|
+
* how many more.
|
|
13
|
+
*/
|
|
14
|
+
export const followedBySchema = z.object({
|
|
15
|
+
firstName: z.string().nullable(),
|
|
16
|
+
others: z.number().int().nonnegative(),
|
|
17
|
+
});
|
|
18
|
+
/** How many faces and names a mutuals line carries (GymMonk's `MUTUALS_SAMPLE_SIZE`). */
|
|
19
|
+
export const MUTUALS_SAMPLE_SIZE = 3;
|
|
20
|
+
/**
|
|
21
|
+
* "Followed by Neha, Rohit + 3 more" (2026-11-22, the People card; GymMonk's
|
|
22
|
+
* and Jansathi's mutuals line): the same people as `followedBy`, of the people
|
|
23
|
+
* the VIEWER follows the ones who follow this person, newest follow first,
|
|
24
|
+
* deleted accounts left out.
|
|
25
|
+
*
|
|
26
|
+
* `count` is ALL of them; `sampleNames` and `avatars` only the first
|
|
27
|
+
* `MUTUALS_SAMPLE_SIZE`, in the same order, so face `i` falls back to the
|
|
28
|
+
* initial of name `i`. The line names two and counts the rest. An avatar is
|
|
29
|
+
* null when that person has no photo.
|
|
30
|
+
*/
|
|
31
|
+
export const mutualsSchema = z.object({
|
|
32
|
+
count: z.number().int().nonnegative(),
|
|
33
|
+
sampleNames: z.array(z.string()).max(MUTUALS_SAMPLE_SIZE),
|
|
34
|
+
avatars: z.array(z.url().nullable()).max(MUTUALS_SAMPLE_SIZE),
|
|
35
|
+
});
|
|
36
|
+
/** The viewer and this person, both ways. Always all false / none for the viewer themselves. */
|
|
37
|
+
export const followRelationSchema = z.object({
|
|
38
|
+
/** The viewer follows them: the button reads "Following". */
|
|
39
|
+
following: z.boolean(),
|
|
40
|
+
/** They follow the viewer: "Follows you", and the button reads "Follow back". */
|
|
41
|
+
followsYou: z.boolean(),
|
|
42
|
+
followedBy: followedBySchema,
|
|
43
|
+
/**
|
|
44
|
+
* The People card's mutuals line (2026-11-22). OPTIONAL, and absent means
|
|
45
|
+
* none: added beside `followedBy` without changing it, so a page or a
|
|
46
|
+
* server from before still parses.
|
|
47
|
+
*/
|
|
48
|
+
mutuals: mutualsSchema.optional(),
|
|
49
|
+
});
|
|
50
|
+
/** How many follow this person, and how many they follow. Counted when read, never stored. */
|
|
51
|
+
export const followCountsSchema = z.object({
|
|
52
|
+
followers: z.number().int().nonnegative(),
|
|
53
|
+
following: z.number().int().nonnegative(),
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=relation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relation.js","sourceRoot":"","sources":["../../../src/domains/follows/relation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CACvC,CAAC,CAAC;AAGH,yFAAyF;AACzF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAErC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACrC,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,mBAAmB,CAAC;IACzD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,mBAAmB,CAAC;CAC9D,CAAC,CAAC;AAGH,gGAAgG;AAChG,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,6DAA6D;IAC7D,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,iFAAiF;IACjF,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;IACvB,UAAU,EAAE,gBAAgB;IAC5B;;;;OAIG;IACH,OAAO,EAAE,aAAa,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC;AAGH,8FAA8F;AAC9F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACzC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CAC1C,CAAC,CAAC","sourcesContent":["/**\n * founder-schema: one member's follow relation to another, as a viewer sees it\n * (2026-11-20). A leaf module, imported by the member page (`domains/profile`)\n * and the people lists (`domains/follows`), so neither imports the other.\n *\n * @module founder-schema/domains/follows/relation\n */\n\nimport { z } from 'zod';\n\n/**\n * \"Followed by Neha + 3\": of the people the VIEWER follows, the ones who\n * follow this person. `firstName` is one of them (null when none), `others`\n * how many more.\n */\nexport const followedBySchema = z.object({\n firstName: z.string().nullable(),\n others: z.number().int().nonnegative(),\n});\nexport type FollowedBy = z.infer<typeof followedBySchema>;\n\n/** How many faces and names a mutuals line carries (GymMonk's `MUTUALS_SAMPLE_SIZE`). */\nexport const MUTUALS_SAMPLE_SIZE = 3;\n\n/**\n * \"Followed by Neha, Rohit + 3 more\" (2026-11-22, the People card; GymMonk's\n * and Jansathi's mutuals line): the same people as `followedBy`, of the people\n * the VIEWER follows the ones who follow this person, newest follow first,\n * deleted accounts left out.\n *\n * `count` is ALL of them; `sampleNames` and `avatars` only the first\n * `MUTUALS_SAMPLE_SIZE`, in the same order, so face `i` falls back to the\n * initial of name `i`. The line names two and counts the rest. An avatar is\n * null when that person has no photo.\n */\nexport const mutualsSchema = z.object({\n count: z.number().int().nonnegative(),\n sampleNames: z.array(z.string()).max(MUTUALS_SAMPLE_SIZE),\n avatars: z.array(z.url().nullable()).max(MUTUALS_SAMPLE_SIZE),\n});\nexport type Mutuals = z.infer<typeof mutualsSchema>;\n\n/** The viewer and this person, both ways. Always all false / none for the viewer themselves. */\nexport const followRelationSchema = z.object({\n /** The viewer follows them: the button reads \"Following\". */\n following: z.boolean(),\n /** They follow the viewer: \"Follows you\", and the button reads \"Follow back\". */\n followsYou: z.boolean(),\n followedBy: followedBySchema,\n /**\n * The People card's mutuals line (2026-11-22). OPTIONAL, and absent means\n * none: added beside `followedBy` without changing it, so a page or a\n * server from before still parses.\n */\n mutuals: mutualsSchema.optional(),\n});\nexport type FollowRelation = z.infer<typeof followRelationSchema>;\n\n/** How many follow this person, and how many they follow. Counted when read, never stored. */\nexport const followCountsSchema = z.object({\n followers: z.number().int().nonnegative(),\n following: z.number().int().nonnegative(),\n});\nexport type FollowCounts = z.infer<typeof followCountsSchema>;\n"]}
|