@antiphony/shared 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/api-codecs.cjs +149 -142
  3. package/dist/cjs/api-codecs.d.cts +157 -68
  4. package/dist/cjs/index.cjs +187 -192
  5. package/dist/cjs/index.d.cts +310 -7
  6. package/dist/cjs/nsid.cjs +6 -9
  7. package/dist/cjs/nsid.d.cts +7 -8
  8. package/dist/cjs/types/audio.cjs +133 -119
  9. package/dist/cjs/types/audio.d.cts +343 -199
  10. package/dist/cjs/types/blob.cjs +5 -9
  11. package/dist/cjs/types/blob.d.cts +21 -21
  12. package/dist/cjs/types/records.cjs +0 -45
  13. package/dist/cjs/types/records.d.cts +1 -103
  14. package/dist/esm/api-codecs.d.ts +187 -98
  15. package/dist/esm/api-codecs.js +4 -5
  16. package/dist/esm/chunk-D655OH2I.js +35 -0
  17. package/dist/esm/chunk-F5ZKFJL2.js +39 -0
  18. package/dist/esm/{chunk-6LROFBKK.js → chunk-SBYNIQRZ.js} +7 -9
  19. package/dist/esm/chunk-SMK4OZNU.js +17 -0
  20. package/dist/esm/chunk-TVOXIQKF.js +294 -0
  21. package/dist/esm/index.d.ts +310 -7
  22. package/dist/esm/index.js +5 -7
  23. package/dist/esm/nsid.d.ts +7 -8
  24. package/dist/esm/nsid.js +1 -1
  25. package/dist/esm/types/audio.d.ts +420 -276
  26. package/dist/esm/types/audio.js +3 -4
  27. package/dist/esm/types/blob.d.ts +21 -21
  28. package/dist/esm/types/blob.js +1 -1
  29. package/dist/esm/types/records.d.ts +1 -103
  30. package/dist/esm/types/records.js +1 -1
  31. package/package.json +94 -26
  32. package/dist/cjs/types/api.cjs +0 -166
  33. package/dist/cjs/types/api.d.cts +0 -242
  34. package/dist/cjs/types/views.cjs +0 -179
  35. package/dist/cjs/types/views.d.cts +0 -726
  36. package/dist/esm/chunk-5EHV73BA.js +0 -20
  37. package/dist/esm/chunk-F7IHVM34.js +0 -144
  38. package/dist/esm/chunk-FDM5FDN4.js +0 -46
  39. package/dist/esm/chunk-IHIBHQBJ.js +0 -78
  40. package/dist/esm/chunk-R6SBR3IG.js +0 -97
  41. package/dist/esm/chunk-Y6HNNRVD.js +0 -12
  42. package/dist/esm/types/api.d.ts +0 -242
  43. package/dist/esm/types/api.js +0 -4
  44. package/dist/esm/types/views.d.ts +0 -726
  45. package/dist/esm/types/views.js +0 -3
@@ -1,726 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- /**
4
- * Layered Profile Views
5
- * Each level extends the previous, adding more fields.
6
- * This ensures sensitive data is only included when appropriate.
7
- */
8
- /** Public profile — safe to return to any caller. */
9
- declare const ProfileViewBasicSchema: z.ZodObject<{
10
- id: z.ZodString;
11
- handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
- displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
- avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
- bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
- /** Personal website link surfaced on the public profile. */
16
- website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
- /** Public links (label + URL) shown under the bio. */
18
- links: z.ZodOptional<z.ZodArray<z.ZodObject<{
19
- label: z.ZodString;
20
- url: z.ZodString;
21
- }, "strip", z.ZodTypeAny, {
22
- label: string;
23
- url: string;
24
- }, {
25
- label: string;
26
- url: string;
27
- }>, "many">>;
28
- /**
29
- * AT Protocol identity, surfaced on the public profile only when the user
30
- * opts in (`UserRecord.showBlueskyPublicly === true`). Projection happens
31
- * in the user dependency layer; this schema simply allows the field.
32
- */
33
- bluesky: z.ZodOptional<z.ZodObject<{
34
- handle: z.ZodString;
35
- did: z.ZodString;
36
- }, "strip", z.ZodTypeAny, {
37
- handle: string;
38
- did: string;
39
- }, {
40
- handle: string;
41
- did: string;
42
- }>>;
43
- stats: z.ZodOptional<z.ZodObject<{
44
- followers: z.ZodDefault<z.ZodNumber>;
45
- following: z.ZodDefault<z.ZodNumber>;
46
- prompts: z.ZodDefault<z.ZodNumber>;
47
- }, "strip", z.ZodTypeAny, {
48
- followers: number;
49
- following: number;
50
- prompts: number;
51
- }, {
52
- followers?: number | undefined;
53
- following?: number | undefined;
54
- prompts?: number | undefined;
55
- }>>;
56
- badges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
57
- isVerified: z.ZodOptional<z.ZodBoolean>;
58
- createdAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
59
- }, "strip", z.ZodTypeAny, {
60
- id: string;
61
- handle?: string | null | undefined;
62
- displayName?: string | null | undefined;
63
- bio?: string | null | undefined;
64
- avatarUrl?: string | null | undefined;
65
- website?: string | null | undefined;
66
- links?: {
67
- label: string;
68
- url: string;
69
- }[] | undefined;
70
- createdAt?: Date | undefined;
71
- bluesky?: {
72
- handle: string;
73
- did: string;
74
- } | undefined;
75
- stats?: {
76
- followers: number;
77
- following: number;
78
- prompts: number;
79
- } | undefined;
80
- badges?: string[] | undefined;
81
- isVerified?: boolean | undefined;
82
- }, {
83
- id: string;
84
- handle?: string | null | undefined;
85
- displayName?: string | null | undefined;
86
- bio?: string | null | undefined;
87
- avatarUrl?: string | null | undefined;
88
- website?: string | null | undefined;
89
- links?: {
90
- label: string;
91
- url: string;
92
- }[] | undefined;
93
- createdAt?: unknown;
94
- bluesky?: {
95
- handle: string;
96
- did: string;
97
- } | undefined;
98
- stats?: {
99
- followers?: number | undefined;
100
- following?: number | undefined;
101
- prompts?: number | undefined;
102
- } | undefined;
103
- badges?: string[] | undefined;
104
- isVerified?: boolean | undefined;
105
- }>;
106
- type ProfileViewBasic = z.infer<typeof ProfileViewBasicSchema>;
107
- /**
108
- * Project a wider profile (detailed/self/admin) down to the ProfileViewBasic
109
- * shape. Use this wherever a public-facing response embeds a profile — it
110
- * keeps PII (email, phoneNumber, lastSeenAt, unreadReplyCount, settings) and
111
- * admin fields (blockedUsers, followers, following, reportCount, isBanned)
112
- * from crossing the public API boundary.
113
- */
114
- declare function toProfileViewBasic(profile: {
115
- id: string;
116
- handle?: string | null;
117
- displayName?: string | null;
118
- avatarUrl?: string | null;
119
- bio?: string | null;
120
- website?: string | null;
121
- links?: Array<{
122
- label: string;
123
- url: string;
124
- }>;
125
- bluesky?: {
126
- handle: string;
127
- did: string;
128
- };
129
- /**
130
- * When `false` or absent, `bluesky` is stripped from the public projection
131
- * even if it's linked on the underlying record — surfacing the AT Protocol
132
- * identity publicly is opt-in.
133
- */
134
- showBlueskyPublicly?: boolean;
135
- stats?: {
136
- followers: number;
137
- following: number;
138
- prompts: number;
139
- };
140
- badges?: string[];
141
- isVerified?: boolean;
142
- createdAt?: unknown;
143
- }): ProfileViewBasic;
144
- /** Authenticated viewer — includes enrichment data visible to other users. */
145
- declare const ProfileViewDetailedSchema: z.ZodObject<{
146
- id: z.ZodString;
147
- handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
148
- displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
149
- avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
150
- bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
151
- website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
152
- links: z.ZodOptional<z.ZodArray<z.ZodObject<{
153
- label: z.ZodString;
154
- url: z.ZodString;
155
- }, "strip", z.ZodTypeAny, {
156
- label: string;
157
- url: string;
158
- }, {
159
- label: string;
160
- url: string;
161
- }>, "many">>;
162
- stats: z.ZodOptional<z.ZodObject<{
163
- followers: z.ZodDefault<z.ZodNumber>;
164
- following: z.ZodDefault<z.ZodNumber>;
165
- prompts: z.ZodDefault<z.ZodNumber>;
166
- }, "strip", z.ZodTypeAny, {
167
- followers: number;
168
- following: number;
169
- prompts: number;
170
- }, {
171
- followers?: number | undefined;
172
- following?: number | undefined;
173
- prompts?: number | undefined;
174
- }>>;
175
- badges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
176
- isVerified: z.ZodOptional<z.ZodBoolean>;
177
- createdAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
178
- } & {
179
- bluesky: z.ZodOptional<z.ZodObject<{
180
- handle: z.ZodString;
181
- did: z.ZodString;
182
- }, "strip", z.ZodTypeAny, {
183
- handle: string;
184
- did: string;
185
- }, {
186
- handle: string;
187
- did: string;
188
- }>>;
189
- usageIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
190
- }, "strip", z.ZodTypeAny, {
191
- id: string;
192
- handle?: string | null | undefined;
193
- displayName?: string | null | undefined;
194
- bio?: string | null | undefined;
195
- avatarUrl?: string | null | undefined;
196
- usageIntent?: string | null | undefined;
197
- website?: string | null | undefined;
198
- links?: {
199
- label: string;
200
- url: string;
201
- }[] | undefined;
202
- createdAt?: Date | undefined;
203
- bluesky?: {
204
- handle: string;
205
- did: string;
206
- } | undefined;
207
- stats?: {
208
- followers: number;
209
- following: number;
210
- prompts: number;
211
- } | undefined;
212
- badges?: string[] | undefined;
213
- isVerified?: boolean | undefined;
214
- }, {
215
- id: string;
216
- handle?: string | null | undefined;
217
- displayName?: string | null | undefined;
218
- bio?: string | null | undefined;
219
- avatarUrl?: string | null | undefined;
220
- usageIntent?: string | null | undefined;
221
- website?: string | null | undefined;
222
- links?: {
223
- label: string;
224
- url: string;
225
- }[] | undefined;
226
- createdAt?: unknown;
227
- bluesky?: {
228
- handle: string;
229
- did: string;
230
- } | undefined;
231
- stats?: {
232
- followers?: number | undefined;
233
- following?: number | undefined;
234
- prompts?: number | undefined;
235
- } | undefined;
236
- badges?: string[] | undefined;
237
- isVerified?: boolean | undefined;
238
- }>;
239
- type ProfileViewDetailed = z.infer<typeof ProfileViewDetailedSchema>;
240
- /** Own profile — includes private settings and activity data. */
241
- declare const ProfileViewSelfSchema: z.ZodObject<{
242
- id: z.ZodString;
243
- handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
244
- displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
245
- avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
246
- bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
247
- website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
248
- links: z.ZodOptional<z.ZodArray<z.ZodObject<{
249
- label: z.ZodString;
250
- url: z.ZodString;
251
- }, "strip", z.ZodTypeAny, {
252
- label: string;
253
- url: string;
254
- }, {
255
- label: string;
256
- url: string;
257
- }>, "many">>;
258
- stats: z.ZodOptional<z.ZodObject<{
259
- followers: z.ZodDefault<z.ZodNumber>;
260
- following: z.ZodDefault<z.ZodNumber>;
261
- prompts: z.ZodDefault<z.ZodNumber>;
262
- }, "strip", z.ZodTypeAny, {
263
- followers: number;
264
- following: number;
265
- prompts: number;
266
- }, {
267
- followers?: number | undefined;
268
- following?: number | undefined;
269
- prompts?: number | undefined;
270
- }>>;
271
- badges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
272
- isVerified: z.ZodOptional<z.ZodBoolean>;
273
- createdAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
274
- } & {
275
- bluesky: z.ZodOptional<z.ZodObject<{
276
- handle: z.ZodString;
277
- did: z.ZodString;
278
- }, "strip", z.ZodTypeAny, {
279
- handle: string;
280
- did: string;
281
- }, {
282
- handle: string;
283
- did: string;
284
- }>>;
285
- usageIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
286
- } & {
287
- phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
288
- email: z.ZodOptional<z.ZodString>;
289
- lastSeenAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
290
- lastActiveAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
291
- unreadReplyCount: z.ZodDefault<z.ZodNumber>;
292
- newReplierCount: z.ZodDefault<z.ZodNumber>;
293
- /**
294
- * Account tier from UserRecord — surfaced on the self profile so the
295
- * client can gate paid features. Optional for legacy docs without the
296
- * field; consumers should treat missing as `'free'`.
297
- */
298
- tier: z.ZodOptional<z.ZodEnum<["free", "creator_pro"]>>;
299
- /**
300
- * Surfaces the linked Bluesky identity (handle + DID) on the public profile
301
- * when true. Persisted on UserRecord; exposed in self/detailed views so the
302
- * settings form can render the toggle's current state.
303
- */
304
- showBlueskyPublicly: z.ZodOptional<z.ZodBoolean>;
305
- settings: z.ZodOptional<z.ZodObject<{
306
- notifications: z.ZodOptional<z.ZodBoolean>;
307
- theme: z.ZodOptional<z.ZodString>;
308
- }, "strip", z.ZodTypeAny, {
309
- notifications?: boolean | undefined;
310
- theme?: string | undefined;
311
- }, {
312
- notifications?: boolean | undefined;
313
- theme?: string | undefined;
314
- }>>;
315
- }, "strip", z.ZodTypeAny, {
316
- id: string;
317
- unreadReplyCount: number;
318
- newReplierCount: number;
319
- handle?: string | null | undefined;
320
- displayName?: string | null | undefined;
321
- bio?: string | null | undefined;
322
- avatarUrl?: string | null | undefined;
323
- usageIntent?: string | null | undefined;
324
- website?: string | null | undefined;
325
- links?: {
326
- label: string;
327
- url: string;
328
- }[] | undefined;
329
- showBlueskyPublicly?: boolean | undefined;
330
- createdAt?: Date | undefined;
331
- tier?: "free" | "creator_pro" | undefined;
332
- bluesky?: {
333
- handle: string;
334
- did: string;
335
- } | undefined;
336
- stats?: {
337
- followers: number;
338
- following: number;
339
- prompts: number;
340
- } | undefined;
341
- badges?: string[] | undefined;
342
- isVerified?: boolean | undefined;
343
- phoneNumber?: string | null | undefined;
344
- email?: string | undefined;
345
- lastSeenAt?: Date | undefined;
346
- lastActiveAt?: Date | undefined;
347
- settings?: {
348
- notifications?: boolean | undefined;
349
- theme?: string | undefined;
350
- } | undefined;
351
- }, {
352
- id: string;
353
- handle?: string | null | undefined;
354
- displayName?: string | null | undefined;
355
- bio?: string | null | undefined;
356
- avatarUrl?: string | null | undefined;
357
- usageIntent?: string | null | undefined;
358
- website?: string | null | undefined;
359
- links?: {
360
- label: string;
361
- url: string;
362
- }[] | undefined;
363
- showBlueskyPublicly?: boolean | undefined;
364
- createdAt?: unknown;
365
- tier?: "free" | "creator_pro" | undefined;
366
- bluesky?: {
367
- handle: string;
368
- did: string;
369
- } | undefined;
370
- stats?: {
371
- followers?: number | undefined;
372
- following?: number | undefined;
373
- prompts?: number | undefined;
374
- } | undefined;
375
- badges?: string[] | undefined;
376
- isVerified?: boolean | undefined;
377
- phoneNumber?: string | null | undefined;
378
- email?: string | undefined;
379
- lastSeenAt?: unknown;
380
- lastActiveAt?: unknown;
381
- unreadReplyCount?: number | undefined;
382
- newReplierCount?: number | undefined;
383
- settings?: {
384
- notifications?: boolean | undefined;
385
- theme?: string | undefined;
386
- } | undefined;
387
- }>;
388
- type ProfileViewSelf = z.infer<typeof ProfileViewSelfSchema>;
389
- /** Admin profile — includes moderation and relationship data. */
390
- declare const ProfileViewAdminSchema: z.ZodObject<{
391
- id: z.ZodString;
392
- handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
393
- displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
394
- avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
395
- bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
396
- website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
397
- links: z.ZodOptional<z.ZodArray<z.ZodObject<{
398
- label: z.ZodString;
399
- url: z.ZodString;
400
- }, "strip", z.ZodTypeAny, {
401
- label: string;
402
- url: string;
403
- }, {
404
- label: string;
405
- url: string;
406
- }>, "many">>;
407
- stats: z.ZodOptional<z.ZodObject<{
408
- followers: z.ZodDefault<z.ZodNumber>;
409
- following: z.ZodDefault<z.ZodNumber>;
410
- prompts: z.ZodDefault<z.ZodNumber>;
411
- }, "strip", z.ZodTypeAny, {
412
- followers: number;
413
- following: number;
414
- prompts: number;
415
- }, {
416
- followers?: number | undefined;
417
- following?: number | undefined;
418
- prompts?: number | undefined;
419
- }>>;
420
- badges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
421
- isVerified: z.ZodOptional<z.ZodBoolean>;
422
- createdAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
423
- } & {
424
- bluesky: z.ZodOptional<z.ZodObject<{
425
- handle: z.ZodString;
426
- did: z.ZodString;
427
- }, "strip", z.ZodTypeAny, {
428
- handle: string;
429
- did: string;
430
- }, {
431
- handle: string;
432
- did: string;
433
- }>>;
434
- usageIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
435
- } & {
436
- phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
437
- email: z.ZodOptional<z.ZodString>;
438
- lastSeenAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
439
- lastActiveAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
440
- unreadReplyCount: z.ZodDefault<z.ZodNumber>;
441
- newReplierCount: z.ZodDefault<z.ZodNumber>;
442
- /**
443
- * Account tier from UserRecord — surfaced on the self profile so the
444
- * client can gate paid features. Optional for legacy docs without the
445
- * field; consumers should treat missing as `'free'`.
446
- */
447
- tier: z.ZodOptional<z.ZodEnum<["free", "creator_pro"]>>;
448
- /**
449
- * Surfaces the linked Bluesky identity (handle + DID) on the public profile
450
- * when true. Persisted on UserRecord; exposed in self/detailed views so the
451
- * settings form can render the toggle's current state.
452
- */
453
- showBlueskyPublicly: z.ZodOptional<z.ZodBoolean>;
454
- settings: z.ZodOptional<z.ZodObject<{
455
- notifications: z.ZodOptional<z.ZodBoolean>;
456
- theme: z.ZodOptional<z.ZodString>;
457
- }, "strip", z.ZodTypeAny, {
458
- notifications?: boolean | undefined;
459
- theme?: string | undefined;
460
- }, {
461
- notifications?: boolean | undefined;
462
- theme?: string | undefined;
463
- }>>;
464
- } & {
465
- blockedUsers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
466
- followers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
467
- following: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
468
- reportCount: z.ZodOptional<z.ZodNumber>;
469
- isBanned: z.ZodOptional<z.ZodBoolean>;
470
- }, "strip", z.ZodTypeAny, {
471
- id: string;
472
- unreadReplyCount: number;
473
- newReplierCount: number;
474
- handle?: string | null | undefined;
475
- displayName?: string | null | undefined;
476
- bio?: string | null | undefined;
477
- avatarUrl?: string | null | undefined;
478
- usageIntent?: string | null | undefined;
479
- website?: string | null | undefined;
480
- links?: {
481
- label: string;
482
- url: string;
483
- }[] | undefined;
484
- showBlueskyPublicly?: boolean | undefined;
485
- createdAt?: Date | undefined;
486
- tier?: "free" | "creator_pro" | undefined;
487
- bluesky?: {
488
- handle: string;
489
- did: string;
490
- } | undefined;
491
- followers?: string[] | undefined;
492
- following?: string[] | undefined;
493
- stats?: {
494
- followers: number;
495
- following: number;
496
- prompts: number;
497
- } | undefined;
498
- badges?: string[] | undefined;
499
- isVerified?: boolean | undefined;
500
- phoneNumber?: string | null | undefined;
501
- email?: string | undefined;
502
- lastSeenAt?: Date | undefined;
503
- lastActiveAt?: Date | undefined;
504
- settings?: {
505
- notifications?: boolean | undefined;
506
- theme?: string | undefined;
507
- } | undefined;
508
- blockedUsers?: string[] | undefined;
509
- reportCount?: number | undefined;
510
- isBanned?: boolean | undefined;
511
- }, {
512
- id: string;
513
- handle?: string | null | undefined;
514
- displayName?: string | null | undefined;
515
- bio?: string | null | undefined;
516
- avatarUrl?: string | null | undefined;
517
- usageIntent?: string | null | undefined;
518
- website?: string | null | undefined;
519
- links?: {
520
- label: string;
521
- url: string;
522
- }[] | undefined;
523
- showBlueskyPublicly?: boolean | undefined;
524
- createdAt?: unknown;
525
- tier?: "free" | "creator_pro" | undefined;
526
- bluesky?: {
527
- handle: string;
528
- did: string;
529
- } | undefined;
530
- followers?: string[] | undefined;
531
- following?: string[] | undefined;
532
- stats?: {
533
- followers?: number | undefined;
534
- following?: number | undefined;
535
- prompts?: number | undefined;
536
- } | undefined;
537
- badges?: string[] | undefined;
538
- isVerified?: boolean | undefined;
539
- phoneNumber?: string | null | undefined;
540
- email?: string | undefined;
541
- lastSeenAt?: unknown;
542
- lastActiveAt?: unknown;
543
- unreadReplyCount?: number | undefined;
544
- newReplierCount?: number | undefined;
545
- settings?: {
546
- notifications?: boolean | undefined;
547
- theme?: string | undefined;
548
- } | undefined;
549
- blockedUsers?: string[] | undefined;
550
- reportCount?: number | undefined;
551
- isBanned?: boolean | undefined;
552
- }>;
553
- type ProfileViewAdmin = z.infer<typeof ProfileViewAdminSchema>;
554
- /**
555
- * @deprecated Use the scoped view that matches your access level:
556
- * - ProfileViewBasicSchema (public)
557
- * - ProfileViewDetailedSchema (authenticated)
558
- * - ProfileViewSelfSchema (own profile / GET /users/me)
559
- * - ProfileViewAdminSchema (admin routes)
560
- */
561
- declare const ProfileViewSchema: z.ZodObject<{
562
- id: z.ZodString;
563
- handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
564
- displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
565
- avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
566
- bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
567
- website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
568
- links: z.ZodOptional<z.ZodArray<z.ZodObject<{
569
- label: z.ZodString;
570
- url: z.ZodString;
571
- }, "strip", z.ZodTypeAny, {
572
- label: string;
573
- url: string;
574
- }, {
575
- label: string;
576
- url: string;
577
- }>, "many">>;
578
- stats: z.ZodOptional<z.ZodObject<{
579
- followers: z.ZodDefault<z.ZodNumber>;
580
- following: z.ZodDefault<z.ZodNumber>;
581
- prompts: z.ZodDefault<z.ZodNumber>;
582
- }, "strip", z.ZodTypeAny, {
583
- followers: number;
584
- following: number;
585
- prompts: number;
586
- }, {
587
- followers?: number | undefined;
588
- following?: number | undefined;
589
- prompts?: number | undefined;
590
- }>>;
591
- badges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
592
- isVerified: z.ZodOptional<z.ZodBoolean>;
593
- createdAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
594
- } & {
595
- bluesky: z.ZodOptional<z.ZodObject<{
596
- handle: z.ZodString;
597
- did: z.ZodString;
598
- }, "strip", z.ZodTypeAny, {
599
- handle: string;
600
- did: string;
601
- }, {
602
- handle: string;
603
- did: string;
604
- }>>;
605
- usageIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
606
- } & {
607
- phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
608
- email: z.ZodOptional<z.ZodString>;
609
- lastSeenAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
610
- lastActiveAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
611
- unreadReplyCount: z.ZodDefault<z.ZodNumber>;
612
- newReplierCount: z.ZodDefault<z.ZodNumber>;
613
- /**
614
- * Account tier from UserRecord — surfaced on the self profile so the
615
- * client can gate paid features. Optional for legacy docs without the
616
- * field; consumers should treat missing as `'free'`.
617
- */
618
- tier: z.ZodOptional<z.ZodEnum<["free", "creator_pro"]>>;
619
- /**
620
- * Surfaces the linked Bluesky identity (handle + DID) on the public profile
621
- * when true. Persisted on UserRecord; exposed in self/detailed views so the
622
- * settings form can render the toggle's current state.
623
- */
624
- showBlueskyPublicly: z.ZodOptional<z.ZodBoolean>;
625
- settings: z.ZodOptional<z.ZodObject<{
626
- notifications: z.ZodOptional<z.ZodBoolean>;
627
- theme: z.ZodOptional<z.ZodString>;
628
- }, "strip", z.ZodTypeAny, {
629
- notifications?: boolean | undefined;
630
- theme?: string | undefined;
631
- }, {
632
- notifications?: boolean | undefined;
633
- theme?: string | undefined;
634
- }>>;
635
- } & {
636
- blockedUsers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
637
- followers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
638
- following: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
639
- reportCount: z.ZodOptional<z.ZodNumber>;
640
- isBanned: z.ZodOptional<z.ZodBoolean>;
641
- }, "strip", z.ZodTypeAny, {
642
- id: string;
643
- unreadReplyCount: number;
644
- newReplierCount: number;
645
- handle?: string | null | undefined;
646
- displayName?: string | null | undefined;
647
- bio?: string | null | undefined;
648
- avatarUrl?: string | null | undefined;
649
- usageIntent?: string | null | undefined;
650
- website?: string | null | undefined;
651
- links?: {
652
- label: string;
653
- url: string;
654
- }[] | undefined;
655
- showBlueskyPublicly?: boolean | undefined;
656
- createdAt?: Date | undefined;
657
- tier?: "free" | "creator_pro" | undefined;
658
- bluesky?: {
659
- handle: string;
660
- did: string;
661
- } | undefined;
662
- followers?: string[] | undefined;
663
- following?: string[] | undefined;
664
- stats?: {
665
- followers: number;
666
- following: number;
667
- prompts: number;
668
- } | undefined;
669
- badges?: string[] | undefined;
670
- isVerified?: boolean | undefined;
671
- phoneNumber?: string | null | undefined;
672
- email?: string | undefined;
673
- lastSeenAt?: Date | undefined;
674
- lastActiveAt?: Date | undefined;
675
- settings?: {
676
- notifications?: boolean | undefined;
677
- theme?: string | undefined;
678
- } | undefined;
679
- blockedUsers?: string[] | undefined;
680
- reportCount?: number | undefined;
681
- isBanned?: boolean | undefined;
682
- }, {
683
- id: string;
684
- handle?: string | null | undefined;
685
- displayName?: string | null | undefined;
686
- bio?: string | null | undefined;
687
- avatarUrl?: string | null | undefined;
688
- usageIntent?: string | null | undefined;
689
- website?: string | null | undefined;
690
- links?: {
691
- label: string;
692
- url: string;
693
- }[] | undefined;
694
- showBlueskyPublicly?: boolean | undefined;
695
- createdAt?: unknown;
696
- tier?: "free" | "creator_pro" | undefined;
697
- bluesky?: {
698
- handle: string;
699
- did: string;
700
- } | undefined;
701
- followers?: string[] | undefined;
702
- following?: string[] | undefined;
703
- stats?: {
704
- followers?: number | undefined;
705
- following?: number | undefined;
706
- prompts?: number | undefined;
707
- } | undefined;
708
- badges?: string[] | undefined;
709
- isVerified?: boolean | undefined;
710
- phoneNumber?: string | null | undefined;
711
- email?: string | undefined;
712
- lastSeenAt?: unknown;
713
- lastActiveAt?: unknown;
714
- unreadReplyCount?: number | undefined;
715
- newReplierCount?: number | undefined;
716
- settings?: {
717
- notifications?: boolean | undefined;
718
- theme?: string | undefined;
719
- } | undefined;
720
- blockedUsers?: string[] | undefined;
721
- reportCount?: number | undefined;
722
- isBanned?: boolean | undefined;
723
- }>;
724
- type ProfileView = z.infer<typeof ProfileViewSchema>;
725
-
726
- export { type ProfileView, type ProfileViewAdmin, ProfileViewAdminSchema, type ProfileViewBasic, ProfileViewBasicSchema, type ProfileViewDetailed, ProfileViewDetailedSchema, ProfileViewSchema, type ProfileViewSelf, ProfileViewSelfSchema, toProfileViewBasic };