@antiphony/shared 0.1.0 → 0.4.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 (59) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/api-codecs.cjs +90 -787
  3. package/dist/cjs/api-codecs.d.cts +117 -290
  4. package/dist/cjs/index.cjs +102 -947
  5. package/dist/cjs/index.d.cts +89 -7
  6. package/dist/cjs/nsid.cjs +8 -18
  7. package/dist/cjs/nsid.d.cts +8 -17
  8. package/dist/cjs/types/audio.cjs +77 -662
  9. package/dist/cjs/types/audio.d.cts +285 -203
  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 -370
  13. package/dist/cjs/types/records.d.cts +1 -825
  14. package/dist/esm/api-codecs.d.ts +117 -290
  15. package/dist/esm/api-codecs.js +5 -6
  16. package/dist/esm/{chunk-ORMEWXMH.js → chunk-5JBD5THX.js} +1 -16
  17. package/dist/esm/{chunk-F2CANZZ7.js → chunk-BNNLHRH7.js} +1 -1
  18. package/dist/esm/chunk-D655OH2I.js +35 -0
  19. package/dist/esm/chunk-RUUHUNZ6.js +37 -0
  20. package/dist/esm/chunk-SBYNIQRZ.js +23 -0
  21. package/dist/esm/chunk-SMK4OZNU.js +17 -0
  22. package/dist/esm/{chunk-BUNMR4ZO.js → chunk-WL2GSPGC.js} +81 -12
  23. package/dist/esm/errors/index.js +1 -1
  24. package/dist/esm/index.d.ts +89 -7
  25. package/dist/esm/index.js +7 -9
  26. package/dist/esm/nsid.d.ts +8 -17
  27. package/dist/esm/nsid.js +2 -2
  28. package/dist/esm/observability/index.js +2 -2
  29. package/dist/esm/observability/report-error.js +2 -2
  30. package/dist/esm/types/audio.d.ts +285 -203
  31. package/dist/esm/types/audio.js +4 -5
  32. package/dist/esm/types/blob.d.ts +21 -21
  33. package/dist/esm/types/blob.js +2 -2
  34. package/dist/esm/types/records.d.ts +1 -825
  35. package/dist/esm/types/records.js +2 -3
  36. package/dist/esm/utils/index.js +1 -1
  37. package/package.json +90 -26
  38. package/dist/cjs/types/api.cjs +0 -726
  39. package/dist/cjs/types/api.d.cts +0 -494
  40. package/dist/cjs/types/channels.cjs +0 -170
  41. package/dist/cjs/types/channels.d.cts +0 -262
  42. package/dist/cjs/types/storage.cjs +0 -414
  43. package/dist/cjs/types/storage.d.cts +0 -197
  44. package/dist/cjs/types/views.cjs +0 -820
  45. package/dist/cjs/types/views.d.cts +0 -9806
  46. package/dist/esm/chunk-3WZJXJNU.js +0 -378
  47. package/dist/esm/chunk-5EHV73BA.js +0 -20
  48. package/dist/esm/chunk-7V44CPRR.js +0 -132
  49. package/dist/esm/chunk-EA4OONDV.js +0 -380
  50. package/dist/esm/chunk-TIZRJORN.js +0 -24
  51. package/dist/esm/chunk-XDBKR6LW.js +0 -32
  52. package/dist/esm/types/api.d.ts +0 -494
  53. package/dist/esm/types/api.js +0 -5
  54. package/dist/esm/types/channels.d.ts +0 -262
  55. package/dist/esm/types/channels.js +0 -162
  56. package/dist/esm/types/storage.d.ts +0 -197
  57. package/dist/esm/types/storage.js +0 -26
  58. package/dist/esm/types/views.d.ts +0 -9806
  59. package/dist/esm/types/views.js +0 -4
@@ -1,494 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- /**
4
- * Public Profile DTO — the public-facing profile shape.
5
- * Equivalent to ProfileViewBasicSchema plus a few enrichment fields.
6
- */
7
- declare const PublicProfileDtoSchema: z.ZodObject<{
8
- id: z.ZodString;
9
- handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
- displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
- avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
- bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
- website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
- links: z.ZodOptional<z.ZodArray<z.ZodObject<{
15
- label: z.ZodString;
16
- url: z.ZodString;
17
- }, "strip", z.ZodTypeAny, {
18
- label: string;
19
- url: string;
20
- }, {
21
- label: string;
22
- url: string;
23
- }>, "many">>;
24
- stats: z.ZodOptional<z.ZodObject<{
25
- followers: z.ZodDefault<z.ZodNumber>;
26
- following: z.ZodDefault<z.ZodNumber>;
27
- prompts: z.ZodDefault<z.ZodNumber>;
28
- }, "strip", z.ZodTypeAny, {
29
- followers: number;
30
- following: number;
31
- prompts: number;
32
- }, {
33
- followers?: number | undefined;
34
- following?: number | undefined;
35
- prompts?: number | undefined;
36
- }>>;
37
- badges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
38
- isVerified: z.ZodOptional<z.ZodBoolean>;
39
- createdAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
40
- } & {
41
- bluesky: z.ZodOptional<z.ZodObject<{
42
- handle: z.ZodString;
43
- did: z.ZodString;
44
- }, "strip", z.ZodTypeAny, {
45
- handle: string;
46
- did: string;
47
- }, {
48
- handle: string;
49
- did: string;
50
- }>>;
51
- rssFeedUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
- }, "strip", z.ZodTypeAny, {
53
- id: string;
54
- handle?: string | null | undefined;
55
- displayName?: string | null | undefined;
56
- bio?: string | null | undefined;
57
- avatarUrl?: string | null | undefined;
58
- website?: string | null | undefined;
59
- links?: {
60
- label: string;
61
- url: string;
62
- }[] | undefined;
63
- createdAt?: Date | undefined;
64
- rssFeedUrl?: string | null | undefined;
65
- bluesky?: {
66
- handle: string;
67
- did: string;
68
- } | undefined;
69
- stats?: {
70
- followers: number;
71
- following: number;
72
- prompts: number;
73
- } | undefined;
74
- badges?: string[] | undefined;
75
- isVerified?: boolean | undefined;
76
- }, {
77
- id: string;
78
- handle?: string | null | undefined;
79
- displayName?: string | null | undefined;
80
- bio?: string | null | undefined;
81
- avatarUrl?: string | null | undefined;
82
- website?: string | null | undefined;
83
- links?: {
84
- label: string;
85
- url: string;
86
- }[] | undefined;
87
- createdAt?: unknown;
88
- rssFeedUrl?: string | null | undefined;
89
- bluesky?: {
90
- handle: string;
91
- did: string;
92
- } | undefined;
93
- stats?: {
94
- followers?: number | undefined;
95
- following?: number | undefined;
96
- prompts?: number | undefined;
97
- } | undefined;
98
- badges?: string[] | undefined;
99
- isVerified?: boolean | undefined;
100
- }>;
101
- type PublicProfileDto = z.infer<typeof PublicProfileDtoSchema>;
102
- /**
103
- * Public Reply DTO
104
- * Excludes internal fields or sensitive metadata if any.
105
- */
106
- declare const PublicReplyDtoSchema: z.ZodObject<{
107
- id: z.ZodString;
108
- audioUrl: z.ZodString;
109
- duration: z.ZodOptional<z.ZodNumber>;
110
- createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
111
- transcription: z.ZodOptional<z.ZodString>;
112
- sentiment: z.ZodOptional<z.ZodEnum<["Positive", "Negative", "Neutral"]>>;
113
- aiSummary: z.ZodOptional<z.ZodString>;
114
- author: z.ZodObject<{
115
- id: z.ZodString;
116
- handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
117
- displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
- avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
- bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
120
- website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
- links: z.ZodOptional<z.ZodArray<z.ZodObject<{
122
- label: z.ZodString;
123
- url: z.ZodString;
124
- }, "strip", z.ZodTypeAny, {
125
- label: string;
126
- url: string;
127
- }, {
128
- label: string;
129
- url: string;
130
- }>, "many">>;
131
- stats: z.ZodOptional<z.ZodObject<{
132
- followers: z.ZodDefault<z.ZodNumber>;
133
- following: z.ZodDefault<z.ZodNumber>;
134
- prompts: z.ZodDefault<z.ZodNumber>;
135
- }, "strip", z.ZodTypeAny, {
136
- followers: number;
137
- following: number;
138
- prompts: number;
139
- }, {
140
- followers?: number | undefined;
141
- following?: number | undefined;
142
- prompts?: number | undefined;
143
- }>>;
144
- badges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
145
- isVerified: z.ZodOptional<z.ZodBoolean>;
146
- createdAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
147
- } & {
148
- bluesky: z.ZodOptional<z.ZodObject<{
149
- handle: z.ZodString;
150
- did: z.ZodString;
151
- }, "strip", z.ZodTypeAny, {
152
- handle: string;
153
- did: string;
154
- }, {
155
- handle: string;
156
- did: string;
157
- }>>;
158
- rssFeedUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
159
- }, "strip", z.ZodTypeAny, {
160
- id: string;
161
- handle?: string | null | undefined;
162
- displayName?: string | null | undefined;
163
- bio?: string | null | undefined;
164
- avatarUrl?: string | null | undefined;
165
- website?: string | null | undefined;
166
- links?: {
167
- label: string;
168
- url: string;
169
- }[] | undefined;
170
- createdAt?: Date | undefined;
171
- rssFeedUrl?: string | null | undefined;
172
- bluesky?: {
173
- handle: string;
174
- did: string;
175
- } | undefined;
176
- stats?: {
177
- followers: number;
178
- following: number;
179
- prompts: number;
180
- } | undefined;
181
- badges?: string[] | undefined;
182
- isVerified?: boolean | undefined;
183
- }, {
184
- id: string;
185
- handle?: string | null | undefined;
186
- displayName?: string | null | undefined;
187
- bio?: string | null | undefined;
188
- avatarUrl?: string | null | undefined;
189
- website?: string | null | undefined;
190
- links?: {
191
- label: string;
192
- url: string;
193
- }[] | undefined;
194
- createdAt?: unknown;
195
- rssFeedUrl?: string | null | undefined;
196
- bluesky?: {
197
- handle: string;
198
- did: string;
199
- } | undefined;
200
- stats?: {
201
- followers?: number | undefined;
202
- following?: number | undefined;
203
- prompts?: number | undefined;
204
- } | undefined;
205
- badges?: string[] | undefined;
206
- isVerified?: boolean | undefined;
207
- }>;
208
- }, "strip", z.ZodTypeAny, {
209
- id: string;
210
- createdAt: Date;
211
- audioUrl: string;
212
- author: {
213
- id: string;
214
- handle?: string | null | undefined;
215
- displayName?: string | null | undefined;
216
- bio?: string | null | undefined;
217
- avatarUrl?: string | null | undefined;
218
- website?: string | null | undefined;
219
- links?: {
220
- label: string;
221
- url: string;
222
- }[] | undefined;
223
- createdAt?: Date | undefined;
224
- rssFeedUrl?: string | null | undefined;
225
- bluesky?: {
226
- handle: string;
227
- did: string;
228
- } | undefined;
229
- stats?: {
230
- followers: number;
231
- following: number;
232
- prompts: number;
233
- } | undefined;
234
- badges?: string[] | undefined;
235
- isVerified?: boolean | undefined;
236
- };
237
- aiSummary?: string | undefined;
238
- transcription?: string | undefined;
239
- sentiment?: "Positive" | "Negative" | "Neutral" | undefined;
240
- duration?: number | undefined;
241
- }, {
242
- id: string;
243
- audioUrl: string;
244
- author: {
245
- id: string;
246
- handle?: string | null | undefined;
247
- displayName?: string | null | undefined;
248
- bio?: string | null | undefined;
249
- avatarUrl?: string | null | undefined;
250
- website?: string | null | undefined;
251
- links?: {
252
- label: string;
253
- url: string;
254
- }[] | undefined;
255
- createdAt?: unknown;
256
- rssFeedUrl?: string | null | undefined;
257
- bluesky?: {
258
- handle: string;
259
- did: string;
260
- } | undefined;
261
- stats?: {
262
- followers?: number | undefined;
263
- following?: number | undefined;
264
- prompts?: number | undefined;
265
- } | undefined;
266
- badges?: string[] | undefined;
267
- isVerified?: boolean | undefined;
268
- };
269
- createdAt?: unknown;
270
- aiSummary?: string | undefined;
271
- transcription?: string | undefined;
272
- sentiment?: "Positive" | "Negative" | "Neutral" | undefined;
273
- duration?: number | undefined;
274
- }>;
275
- type PublicReplyDto = z.infer<typeof PublicReplyDtoSchema>;
276
- /**
277
- * Actor View — the full view returned to the authenticated user about themselves.
278
- * Uses ProfileViewSelfSchema which includes private settings but not admin fields.
279
- */
280
- declare const ActorViewSchema: z.ZodObject<{
281
- id: z.ZodString;
282
- handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
283
- displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
284
- avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
285
- bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
286
- website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
287
- links: z.ZodOptional<z.ZodArray<z.ZodObject<{
288
- label: z.ZodString;
289
- url: z.ZodString;
290
- }, "strip", z.ZodTypeAny, {
291
- label: string;
292
- url: string;
293
- }, {
294
- label: string;
295
- url: string;
296
- }>, "many">>;
297
- stats: z.ZodOptional<z.ZodObject<{
298
- followers: z.ZodDefault<z.ZodNumber>;
299
- following: z.ZodDefault<z.ZodNumber>;
300
- prompts: z.ZodDefault<z.ZodNumber>;
301
- }, "strip", z.ZodTypeAny, {
302
- followers: number;
303
- following: number;
304
- prompts: number;
305
- }, {
306
- followers?: number | undefined;
307
- following?: number | undefined;
308
- prompts?: number | undefined;
309
- }>>;
310
- badges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
311
- isVerified: z.ZodOptional<z.ZodBoolean>;
312
- createdAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
313
- } & {
314
- bluesky: z.ZodOptional<z.ZodObject<{
315
- handle: z.ZodString;
316
- did: z.ZodString;
317
- }, "strip", z.ZodTypeAny, {
318
- handle: string;
319
- did: string;
320
- }, {
321
- handle: string;
322
- did: string;
323
- }>>;
324
- usageIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
325
- rssSummary: z.ZodOptional<z.ZodObject<{
326
- title: z.ZodOptional<z.ZodString>;
327
- description: z.ZodOptional<z.ZodString>;
328
- items: z.ZodOptional<z.ZodArray<z.ZodObject<{
329
- title: z.ZodOptional<z.ZodString>;
330
- link: z.ZodOptional<z.ZodString>;
331
- content: z.ZodOptional<z.ZodString>;
332
- pubDate: z.ZodOptional<z.ZodString>;
333
- }, "strip", z.ZodTypeAny, {
334
- title?: string | undefined;
335
- link?: string | undefined;
336
- content?: string | undefined;
337
- pubDate?: string | undefined;
338
- }, {
339
- title?: string | undefined;
340
- link?: string | undefined;
341
- content?: string | undefined;
342
- pubDate?: string | undefined;
343
- }>, "many">>;
344
- lastFetchedAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
345
- }, "strip", z.ZodTypeAny, {
346
- title?: string | undefined;
347
- description?: string | undefined;
348
- items?: {
349
- title?: string | undefined;
350
- link?: string | undefined;
351
- content?: string | undefined;
352
- pubDate?: string | undefined;
353
- }[] | undefined;
354
- lastFetchedAt?: Date | undefined;
355
- }, {
356
- title?: string | undefined;
357
- description?: string | undefined;
358
- items?: {
359
- title?: string | undefined;
360
- link?: string | undefined;
361
- content?: string | undefined;
362
- pubDate?: string | undefined;
363
- }[] | undefined;
364
- lastFetchedAt?: unknown;
365
- }>>;
366
- promptAudioUrl: z.ZodOptional<z.ZodString>;
367
- totalPrompts: z.ZodOptional<z.ZodNumber>;
368
- totalReplies: z.ZodOptional<z.ZodNumber>;
369
- favoritePromptId: z.ZodOptional<z.ZodString>;
370
- } & {
371
- phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
372
- email: z.ZodOptional<z.ZodString>;
373
- lastSeenAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
374
- lastActiveAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
375
- unreadReplyCount: z.ZodDefault<z.ZodNumber>;
376
- newReplierCount: z.ZodDefault<z.ZodNumber>;
377
- tier: z.ZodOptional<z.ZodEnum<["free", "creator_pro"]>>;
378
- showBlueskyPublicly: z.ZodOptional<z.ZodBoolean>;
379
- settings: z.ZodOptional<z.ZodObject<{
380
- notifications: z.ZodOptional<z.ZodBoolean>;
381
- theme: z.ZodOptional<z.ZodString>;
382
- }, "strip", z.ZodTypeAny, {
383
- notifications?: boolean | undefined;
384
- theme?: string | undefined;
385
- }, {
386
- notifications?: boolean | undefined;
387
- theme?: string | undefined;
388
- }>>;
389
- }, "strip", z.ZodTypeAny, {
390
- id: string;
391
- unreadReplyCount: number;
392
- newReplierCount: number;
393
- handle?: string | null | undefined;
394
- usageIntent?: string | null | undefined;
395
- displayName?: string | null | undefined;
396
- bio?: string | null | undefined;
397
- avatarUrl?: string | null | undefined;
398
- website?: string | null | undefined;
399
- links?: {
400
- label: string;
401
- url: string;
402
- }[] | undefined;
403
- showBlueskyPublicly?: boolean | undefined;
404
- createdAt?: Date | undefined;
405
- tier?: "free" | "creator_pro" | undefined;
406
- phoneNumber?: string | null | undefined;
407
- settings?: {
408
- notifications?: boolean | undefined;
409
- theme?: string | undefined;
410
- } | undefined;
411
- email?: string | undefined;
412
- bluesky?: {
413
- handle: string;
414
- did: string;
415
- } | undefined;
416
- stats?: {
417
- followers: number;
418
- following: number;
419
- prompts: number;
420
- } | undefined;
421
- badges?: string[] | undefined;
422
- isVerified?: boolean | undefined;
423
- rssSummary?: {
424
- title?: string | undefined;
425
- description?: string | undefined;
426
- items?: {
427
- title?: string | undefined;
428
- link?: string | undefined;
429
- content?: string | undefined;
430
- pubDate?: string | undefined;
431
- }[] | undefined;
432
- lastFetchedAt?: Date | undefined;
433
- } | undefined;
434
- promptAudioUrl?: string | undefined;
435
- totalPrompts?: number | undefined;
436
- totalReplies?: number | undefined;
437
- favoritePromptId?: string | undefined;
438
- lastSeenAt?: Date | undefined;
439
- lastActiveAt?: Date | undefined;
440
- }, {
441
- id: string;
442
- handle?: string | null | undefined;
443
- usageIntent?: string | null | undefined;
444
- displayName?: string | null | undefined;
445
- bio?: string | null | undefined;
446
- avatarUrl?: string | null | undefined;
447
- website?: string | null | undefined;
448
- links?: {
449
- label: string;
450
- url: string;
451
- }[] | undefined;
452
- showBlueskyPublicly?: boolean | undefined;
453
- createdAt?: unknown;
454
- tier?: "free" | "creator_pro" | undefined;
455
- phoneNumber?: string | null | undefined;
456
- settings?: {
457
- notifications?: boolean | undefined;
458
- theme?: string | undefined;
459
- } | undefined;
460
- email?: string | undefined;
461
- bluesky?: {
462
- handle: string;
463
- did: string;
464
- } | undefined;
465
- stats?: {
466
- followers?: number | undefined;
467
- following?: number | undefined;
468
- prompts?: number | undefined;
469
- } | undefined;
470
- badges?: string[] | undefined;
471
- isVerified?: boolean | undefined;
472
- rssSummary?: {
473
- title?: string | undefined;
474
- description?: string | undefined;
475
- items?: {
476
- title?: string | undefined;
477
- link?: string | undefined;
478
- content?: string | undefined;
479
- pubDate?: string | undefined;
480
- }[] | undefined;
481
- lastFetchedAt?: unknown;
482
- } | undefined;
483
- promptAudioUrl?: string | undefined;
484
- totalPrompts?: number | undefined;
485
- totalReplies?: number | undefined;
486
- favoritePromptId?: string | undefined;
487
- lastSeenAt?: unknown;
488
- lastActiveAt?: unknown;
489
- unreadReplyCount?: number | undefined;
490
- newReplierCount?: number | undefined;
491
- }>;
492
- type ActorView = z.infer<typeof ActorViewSchema>;
493
-
494
- export { type ActorView, ActorViewSchema, type PublicProfileDto, PublicProfileDtoSchema, type PublicReplyDto, PublicReplyDtoSchema };
@@ -1,5 +0,0 @@
1
- export { ActorViewSchema, PublicProfileDtoSchema, PublicReplyDtoSchema } from '../chunk-TIZRJORN.js';
2
- import '../chunk-EA4OONDV.js';
3
- import '../chunk-3WZJXJNU.js';
4
- import '../chunk-5EHV73BA.js';
5
- import '../chunk-ORMEWXMH.js';