@antiphony/shared 0.1.0 → 0.3.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/cjs/api-codecs.cjs +26 -650
- package/dist/cjs/api-codecs.d.cts +15 -233
- package/dist/cjs/index.cjs +29 -761
- package/dist/cjs/index.d.cts +4 -4
- package/dist/cjs/nsid.cjs +3 -10
- package/dist/cjs/nsid.d.cts +1 -9
- package/dist/cjs/types/api.cjs +11 -571
- package/dist/cjs/types/api.d.cts +13 -265
- package/dist/cjs/types/audio.cjs +26 -547
- package/dist/cjs/types/audio.d.cts +93 -52
- package/dist/cjs/types/records.cjs +3 -328
- package/dist/cjs/types/records.d.cts +7 -729
- package/dist/cjs/types/views.cjs +8 -649
- package/dist/cjs/types/views.d.cts +43 -9123
- package/dist/esm/api-codecs.d.ts +46 -264
- package/dist/esm/api-codecs.js +5 -5
- package/dist/esm/{chunk-ORMEWXMH.js → chunk-5JBD5THX.js} +1 -16
- package/dist/esm/{chunk-XDBKR6LW.js → chunk-6LROFBKK.js} +3 -10
- package/dist/esm/{chunk-F2CANZZ7.js → chunk-BNNLHRH7.js} +1 -1
- package/dist/esm/{chunk-BUNMR4ZO.js → chunk-F7IHVM34.js} +20 -3
- package/dist/esm/chunk-FDM5FDN4.js +46 -0
- package/dist/esm/chunk-IHIBHQBJ.js +78 -0
- package/dist/esm/chunk-R6SBR3IG.js +97 -0
- package/dist/esm/chunk-Y6HNNRVD.js +12 -0
- package/dist/esm/errors/index.js +1 -1
- package/dist/esm/index.d.ts +4 -4
- package/dist/esm/index.js +8 -8
- package/dist/esm/nsid.d.ts +1 -9
- package/dist/esm/nsid.js +2 -2
- package/dist/esm/observability/index.js +2 -2
- package/dist/esm/observability/report-error.js +2 -2
- package/dist/esm/types/api.d.ts +15 -267
- package/dist/esm/types/api.js +4 -5
- package/dist/esm/types/audio.d.ts +170 -129
- package/dist/esm/types/audio.js +4 -4
- package/dist/esm/types/blob.js +1 -1
- package/dist/esm/types/records.d.ts +10 -732
- package/dist/esm/types/records.js +2 -3
- package/dist/esm/types/views.d.ts +51 -9131
- package/dist/esm/types/views.js +3 -4
- package/dist/esm/utils/index.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/types/channels.cjs +0 -170
- package/dist/cjs/types/channels.d.cts +0 -262
- package/dist/cjs/types/storage.cjs +0 -414
- package/dist/cjs/types/storage.d.cts +0 -197
- package/dist/esm/chunk-3WZJXJNU.js +0 -378
- package/dist/esm/chunk-7V44CPRR.js +0 -132
- package/dist/esm/chunk-EA4OONDV.js +0 -380
- package/dist/esm/chunk-TIZRJORN.js +0 -24
- package/dist/esm/types/channels.d.ts +0 -262
- package/dist/esm/types/channels.js +0 -162
- package/dist/esm/types/storage.d.ts +0 -197
- package/dist/esm/types/storage.js +0 -26
|
@@ -140,21 +140,21 @@ declare const TranscriptSegmentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
140
140
|
endMs: z.ZodNumber;
|
|
141
141
|
text: z.ZodString;
|
|
142
142
|
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
text: string;
|
|
143
144
|
startMs: number;
|
|
144
145
|
endMs: number;
|
|
145
|
-
text: string;
|
|
146
146
|
}, {
|
|
147
|
+
text: string;
|
|
147
148
|
startMs: number;
|
|
148
149
|
endMs: number;
|
|
149
|
-
text: string;
|
|
150
150
|
}>, {
|
|
151
|
+
text: string;
|
|
151
152
|
startMs: number;
|
|
152
153
|
endMs: number;
|
|
153
|
-
text: string;
|
|
154
154
|
}, {
|
|
155
|
+
text: string;
|
|
155
156
|
startMs: number;
|
|
156
157
|
endMs: number;
|
|
157
|
-
text: string;
|
|
158
158
|
}>;
|
|
159
159
|
type TranscriptSegment = z.infer<typeof TranscriptSegmentSchema>;
|
|
160
160
|
/**
|
|
@@ -168,35 +168,35 @@ declare const TimedTranscriptSchema: z.ZodObject<{
|
|
|
168
168
|
endMs: z.ZodNumber;
|
|
169
169
|
text: z.ZodString;
|
|
170
170
|
}, "strip", z.ZodTypeAny, {
|
|
171
|
+
text: string;
|
|
171
172
|
startMs: number;
|
|
172
173
|
endMs: number;
|
|
173
|
-
text: string;
|
|
174
174
|
}, {
|
|
175
|
+
text: string;
|
|
175
176
|
startMs: number;
|
|
176
177
|
endMs: number;
|
|
177
|
-
text: string;
|
|
178
178
|
}>, {
|
|
179
|
+
text: string;
|
|
179
180
|
startMs: number;
|
|
180
181
|
endMs: number;
|
|
181
|
-
text: string;
|
|
182
182
|
}, {
|
|
183
|
+
text: string;
|
|
183
184
|
startMs: number;
|
|
184
185
|
endMs: number;
|
|
185
|
-
text: string;
|
|
186
186
|
}>, "many">;
|
|
187
187
|
text: z.ZodOptional<z.ZodString>;
|
|
188
188
|
}, "strip", z.ZodTypeAny, {
|
|
189
189
|
segments: {
|
|
190
|
+
text: string;
|
|
190
191
|
startMs: number;
|
|
191
192
|
endMs: number;
|
|
192
|
-
text: string;
|
|
193
193
|
}[];
|
|
194
194
|
text?: string | undefined;
|
|
195
195
|
}, {
|
|
196
196
|
segments: {
|
|
197
|
+
text: string;
|
|
197
198
|
startMs: number;
|
|
198
199
|
endMs: number;
|
|
199
|
-
text: string;
|
|
200
200
|
}[];
|
|
201
201
|
text?: string | undefined;
|
|
202
202
|
}>;
|
|
@@ -219,35 +219,35 @@ declare const AudioEmbedViewSchema: z.ZodObject<{
|
|
|
219
219
|
endMs: z.ZodNumber;
|
|
220
220
|
text: z.ZodString;
|
|
221
221
|
}, "strip", z.ZodTypeAny, {
|
|
222
|
+
text: string;
|
|
222
223
|
startMs: number;
|
|
223
224
|
endMs: number;
|
|
224
|
-
text: string;
|
|
225
225
|
}, {
|
|
226
|
+
text: string;
|
|
226
227
|
startMs: number;
|
|
227
228
|
endMs: number;
|
|
228
|
-
text: string;
|
|
229
229
|
}>, {
|
|
230
|
+
text: string;
|
|
230
231
|
startMs: number;
|
|
231
232
|
endMs: number;
|
|
232
|
-
text: string;
|
|
233
233
|
}, {
|
|
234
|
+
text: string;
|
|
234
235
|
startMs: number;
|
|
235
236
|
endMs: number;
|
|
236
|
-
text: string;
|
|
237
237
|
}>, "many">;
|
|
238
238
|
text: z.ZodOptional<z.ZodString>;
|
|
239
239
|
}, "strip", z.ZodTypeAny, {
|
|
240
240
|
segments: {
|
|
241
|
+
text: string;
|
|
241
242
|
startMs: number;
|
|
242
243
|
endMs: number;
|
|
243
|
-
text: string;
|
|
244
244
|
}[];
|
|
245
245
|
text?: string | undefined;
|
|
246
246
|
}, {
|
|
247
247
|
segments: {
|
|
248
|
+
text: string;
|
|
248
249
|
startMs: number;
|
|
249
250
|
endMs: number;
|
|
250
|
-
text: string;
|
|
251
251
|
}[];
|
|
252
252
|
text?: string | undefined;
|
|
253
253
|
}>>;
|
|
@@ -259,9 +259,9 @@ declare const AudioEmbedViewSchema: z.ZodObject<{
|
|
|
259
259
|
waveform?: number[] | undefined;
|
|
260
260
|
transcript?: {
|
|
261
261
|
segments: {
|
|
262
|
+
text: string;
|
|
262
263
|
startMs: number;
|
|
263
264
|
endMs: number;
|
|
264
|
-
text: string;
|
|
265
265
|
}[];
|
|
266
266
|
text?: string | undefined;
|
|
267
267
|
} | undefined;
|
|
@@ -273,9 +273,9 @@ declare const AudioEmbedViewSchema: z.ZodObject<{
|
|
|
273
273
|
waveform?: number[] | undefined;
|
|
274
274
|
transcript?: {
|
|
275
275
|
segments: {
|
|
276
|
+
text: string;
|
|
276
277
|
startMs: number;
|
|
277
278
|
endMs: number;
|
|
278
|
-
text: string;
|
|
279
279
|
}[];
|
|
280
280
|
text?: string | undefined;
|
|
281
281
|
} | undefined;
|
|
@@ -303,6 +303,15 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
303
303
|
orgId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
304
304
|
/** Denormalized from `reply` presence: `reply` set ⇒ 'reply', else 'prompt'. */
|
|
305
305
|
kind: z.ZodEnum<["prompt", "reply"]>;
|
|
306
|
+
/**
|
|
307
|
+
* Branch participant pair (author ids) for reply gating — the parties to a
|
|
308
|
+
* reply's sub-thread: the creator (thread-root author) + the responder who
|
|
309
|
+
* opened the branch. Set on replies (deduped, 1–2 ids); absent on prompts
|
|
310
|
+
* (a prompt's repliers are the app's audience policy, not a fixed pair).
|
|
311
|
+
* Inherited down the branch so reply gating is an O(1) field check, never a
|
|
312
|
+
* thread walk. See `specs/antiphony-data-model.md` §6 "Reply gating".
|
|
313
|
+
*/
|
|
314
|
+
threadParticipants: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
306
315
|
/** User-authored text (bsky-semantic). May be empty for pure-audio posts. NEVER the transcript. */
|
|
307
316
|
text: z.ZodString;
|
|
308
317
|
/** Optional headline; a prompt feature, not the discriminator. */
|
|
@@ -404,25 +413,13 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
404
413
|
selfLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
405
414
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
406
415
|
}, "strip", z.ZodTypeAny, {
|
|
416
|
+
text: string;
|
|
407
417
|
id: string;
|
|
408
418
|
createdAt: Date;
|
|
409
|
-
authorId: string;
|
|
410
|
-
text: string;
|
|
411
419
|
originAppId: string;
|
|
412
|
-
|
|
413
|
-
|
|
420
|
+
authorId: string;
|
|
421
|
+
kind: "reply" | "prompt";
|
|
414
422
|
title?: string | undefined;
|
|
415
|
-
authorDid?: string | undefined;
|
|
416
|
-
reply?: {
|
|
417
|
-
root: {
|
|
418
|
-
uri: string;
|
|
419
|
-
cid: string;
|
|
420
|
-
};
|
|
421
|
-
parent: {
|
|
422
|
-
uri: string;
|
|
423
|
-
cid: string;
|
|
424
|
-
};
|
|
425
|
-
} | undefined;
|
|
426
423
|
embed?: {
|
|
427
424
|
$type: "dev.antiphony.embed.audio";
|
|
428
425
|
audio: {
|
|
@@ -435,18 +432,6 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
435
432
|
alt?: string | undefined;
|
|
436
433
|
waveform?: number[] | undefined;
|
|
437
434
|
} | undefined;
|
|
438
|
-
langs?: string[] | undefined;
|
|
439
|
-
selfLabels?: string[] | undefined;
|
|
440
|
-
}, {
|
|
441
|
-
id: string;
|
|
442
|
-
authorId: string;
|
|
443
|
-
text: string;
|
|
444
|
-
originAppId: string;
|
|
445
|
-
kind: "prompt" | "reply";
|
|
446
|
-
createdAt?: unknown;
|
|
447
|
-
orgId?: string | null | undefined;
|
|
448
|
-
title?: string | undefined;
|
|
449
|
-
authorDid?: string | undefined;
|
|
450
435
|
reply?: {
|
|
451
436
|
root: {
|
|
452
437
|
uri: string;
|
|
@@ -457,6 +442,18 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
457
442
|
cid: string;
|
|
458
443
|
};
|
|
459
444
|
} | undefined;
|
|
445
|
+
langs?: string[] | undefined;
|
|
446
|
+
selfLabels?: string[] | undefined;
|
|
447
|
+
authorDid?: string | undefined;
|
|
448
|
+
orgId?: string | null | undefined;
|
|
449
|
+
threadParticipants?: string[] | undefined;
|
|
450
|
+
}, {
|
|
451
|
+
text: string;
|
|
452
|
+
id: string;
|
|
453
|
+
originAppId: string;
|
|
454
|
+
authorId: string;
|
|
455
|
+
kind: "reply" | "prompt";
|
|
456
|
+
title?: string | undefined;
|
|
460
457
|
embed?: {
|
|
461
458
|
$type: "dev.antiphony.embed.audio";
|
|
462
459
|
audio: {
|
|
@@ -469,18 +466,6 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
469
466
|
alt?: string | undefined;
|
|
470
467
|
waveform?: number[] | undefined;
|
|
471
468
|
} | undefined;
|
|
472
|
-
langs?: string[] | undefined;
|
|
473
|
-
selfLabels?: string[] | undefined;
|
|
474
|
-
}>, {
|
|
475
|
-
id: string;
|
|
476
|
-
createdAt: Date;
|
|
477
|
-
authorId: string;
|
|
478
|
-
text: string;
|
|
479
|
-
originAppId: string;
|
|
480
|
-
kind: "prompt" | "reply";
|
|
481
|
-
orgId?: string | null | undefined;
|
|
482
|
-
title?: string | undefined;
|
|
483
|
-
authorDid?: string | undefined;
|
|
484
469
|
reply?: {
|
|
485
470
|
root: {
|
|
486
471
|
uri: string;
|
|
@@ -491,6 +476,20 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
491
476
|
cid: string;
|
|
492
477
|
};
|
|
493
478
|
} | undefined;
|
|
479
|
+
langs?: string[] | undefined;
|
|
480
|
+
selfLabels?: string[] | undefined;
|
|
481
|
+
createdAt?: unknown;
|
|
482
|
+
authorDid?: string | undefined;
|
|
483
|
+
orgId?: string | null | undefined;
|
|
484
|
+
threadParticipants?: string[] | undefined;
|
|
485
|
+
}>, {
|
|
486
|
+
text: string;
|
|
487
|
+
id: string;
|
|
488
|
+
createdAt: Date;
|
|
489
|
+
originAppId: string;
|
|
490
|
+
authorId: string;
|
|
491
|
+
kind: "reply" | "prompt";
|
|
492
|
+
title?: string | undefined;
|
|
494
493
|
embed?: {
|
|
495
494
|
$type: "dev.antiphony.embed.audio";
|
|
496
495
|
audio: {
|
|
@@ -503,18 +502,6 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
503
502
|
alt?: string | undefined;
|
|
504
503
|
waveform?: number[] | undefined;
|
|
505
504
|
} | undefined;
|
|
506
|
-
langs?: string[] | undefined;
|
|
507
|
-
selfLabels?: string[] | undefined;
|
|
508
|
-
}, {
|
|
509
|
-
id: string;
|
|
510
|
-
authorId: string;
|
|
511
|
-
text: string;
|
|
512
|
-
originAppId: string;
|
|
513
|
-
kind: "prompt" | "reply";
|
|
514
|
-
createdAt?: unknown;
|
|
515
|
-
orgId?: string | null | undefined;
|
|
516
|
-
title?: string | undefined;
|
|
517
|
-
authorDid?: string | undefined;
|
|
518
505
|
reply?: {
|
|
519
506
|
root: {
|
|
520
507
|
uri: string;
|
|
@@ -525,6 +512,18 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
525
512
|
cid: string;
|
|
526
513
|
};
|
|
527
514
|
} | undefined;
|
|
515
|
+
langs?: string[] | undefined;
|
|
516
|
+
selfLabels?: string[] | undefined;
|
|
517
|
+
authorDid?: string | undefined;
|
|
518
|
+
orgId?: string | null | undefined;
|
|
519
|
+
threadParticipants?: string[] | undefined;
|
|
520
|
+
}, {
|
|
521
|
+
text: string;
|
|
522
|
+
id: string;
|
|
523
|
+
originAppId: string;
|
|
524
|
+
authorId: string;
|
|
525
|
+
kind: "reply" | "prompt";
|
|
526
|
+
title?: string | undefined;
|
|
528
527
|
embed?: {
|
|
529
528
|
$type: "dev.antiphony.embed.audio";
|
|
530
529
|
audio: {
|
|
@@ -537,8 +536,22 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
537
536
|
alt?: string | undefined;
|
|
538
537
|
waveform?: number[] | undefined;
|
|
539
538
|
} | undefined;
|
|
539
|
+
reply?: {
|
|
540
|
+
root: {
|
|
541
|
+
uri: string;
|
|
542
|
+
cid: string;
|
|
543
|
+
};
|
|
544
|
+
parent: {
|
|
545
|
+
uri: string;
|
|
546
|
+
cid: string;
|
|
547
|
+
};
|
|
548
|
+
} | undefined;
|
|
540
549
|
langs?: string[] | undefined;
|
|
541
550
|
selfLabels?: string[] | undefined;
|
|
551
|
+
createdAt?: unknown;
|
|
552
|
+
authorDid?: string | undefined;
|
|
553
|
+
orgId?: string | null | undefined;
|
|
554
|
+
threadParticipants?: string[] | undefined;
|
|
542
555
|
}>;
|
|
543
556
|
type AudioPostRecord = z.infer<typeof AudioPostRecordSchema>;
|
|
544
557
|
/**
|
|
@@ -565,35 +578,35 @@ declare const TranscriptEnrichmentRecordSchema: z.ZodObject<{
|
|
|
565
578
|
endMs: z.ZodNumber;
|
|
566
579
|
text: z.ZodString;
|
|
567
580
|
}, "strip", z.ZodTypeAny, {
|
|
581
|
+
text: string;
|
|
568
582
|
startMs: number;
|
|
569
583
|
endMs: number;
|
|
570
|
-
text: string;
|
|
571
584
|
}, {
|
|
585
|
+
text: string;
|
|
572
586
|
startMs: number;
|
|
573
587
|
endMs: number;
|
|
574
|
-
text: string;
|
|
575
588
|
}>, {
|
|
589
|
+
text: string;
|
|
576
590
|
startMs: number;
|
|
577
591
|
endMs: number;
|
|
578
|
-
text: string;
|
|
579
592
|
}, {
|
|
593
|
+
text: string;
|
|
580
594
|
startMs: number;
|
|
581
595
|
endMs: number;
|
|
582
|
-
text: string;
|
|
583
596
|
}>, "many">;
|
|
584
597
|
text: z.ZodOptional<z.ZodString>;
|
|
585
598
|
}, "strip", z.ZodTypeAny, {
|
|
586
599
|
segments: {
|
|
600
|
+
text: string;
|
|
587
601
|
startMs: number;
|
|
588
602
|
endMs: number;
|
|
589
|
-
text: string;
|
|
590
603
|
}[];
|
|
591
604
|
text?: string | undefined;
|
|
592
605
|
}, {
|
|
593
606
|
segments: {
|
|
607
|
+
text: string;
|
|
594
608
|
startMs: number;
|
|
595
609
|
endMs: number;
|
|
596
|
-
text: string;
|
|
597
610
|
}[];
|
|
598
611
|
text?: string | undefined;
|
|
599
612
|
}>;
|
|
@@ -607,9 +620,9 @@ declare const TranscriptEnrichmentRecordSchema: z.ZodObject<{
|
|
|
607
620
|
createdAt: Date;
|
|
608
621
|
transcript: {
|
|
609
622
|
segments: {
|
|
623
|
+
text: string;
|
|
610
624
|
startMs: number;
|
|
611
625
|
endMs: number;
|
|
612
|
-
text: string;
|
|
613
626
|
}[];
|
|
614
627
|
text?: string | undefined;
|
|
615
628
|
};
|
|
@@ -623,9 +636,9 @@ declare const TranscriptEnrichmentRecordSchema: z.ZodObject<{
|
|
|
623
636
|
id: string;
|
|
624
637
|
transcript: {
|
|
625
638
|
segments: {
|
|
639
|
+
text: string;
|
|
626
640
|
startMs: number;
|
|
627
641
|
endMs: number;
|
|
628
|
-
text: string;
|
|
629
642
|
}[];
|
|
630
643
|
text?: string | undefined;
|
|
631
644
|
};
|
|
@@ -663,10 +676,22 @@ type ActorProfileRecord = z.infer<typeof ActorProfileRecordSchema>;
|
|
|
663
676
|
declare const ViewerStateSchema: z.ZodObject<{
|
|
664
677
|
/** True when the authenticated caller authored this post. */
|
|
665
678
|
isAuthor: z.ZodDefault<z.ZodBoolean>;
|
|
679
|
+
/**
|
|
680
|
+
* Whether the caller may reply to this post (reply gating, §6). A prompt is
|
|
681
|
+
* repliable by any authenticated viewer (the app's audience-policy default);
|
|
682
|
+
* a reply only by its branch participants (`{ creator, branch responder }`).
|
|
683
|
+
*/
|
|
684
|
+
canReply: z.ZodDefault<z.ZodBoolean>;
|
|
685
|
+
/** Why `canReply` is false, when it is (omitted when the caller can reply). */
|
|
686
|
+
replyDisabledReason: z.ZodOptional<z.ZodEnum<["unauthenticated", "not_a_participant"]>>;
|
|
666
687
|
}, "strip", z.ZodTypeAny, {
|
|
667
688
|
isAuthor: boolean;
|
|
689
|
+
canReply: boolean;
|
|
690
|
+
replyDisabledReason?: "unauthenticated" | "not_a_participant" | undefined;
|
|
668
691
|
}, {
|
|
669
692
|
isAuthor?: boolean | undefined;
|
|
693
|
+
canReply?: boolean | undefined;
|
|
694
|
+
replyDisabledReason?: "unauthenticated" | "not_a_participant" | undefined;
|
|
670
695
|
}>;
|
|
671
696
|
type ViewerState = z.infer<typeof ViewerStateSchema>;
|
|
672
697
|
/**
|
|
@@ -720,8 +745,8 @@ declare const PostRecordPublicSchema: z.ZodObject<{
|
|
|
720
745
|
selfLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
721
746
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
722
747
|
}, "strip", z.ZodTypeAny, {
|
|
723
|
-
createdAt: Date;
|
|
724
748
|
text: string;
|
|
749
|
+
createdAt: Date;
|
|
725
750
|
title?: string | undefined;
|
|
726
751
|
reply?: {
|
|
727
752
|
root: {
|
|
@@ -737,7 +762,6 @@ declare const PostRecordPublicSchema: z.ZodObject<{
|
|
|
737
762
|
selfLabels?: string[] | undefined;
|
|
738
763
|
}, {
|
|
739
764
|
text: string;
|
|
740
|
-
createdAt?: unknown;
|
|
741
765
|
title?: string | undefined;
|
|
742
766
|
reply?: {
|
|
743
767
|
root: {
|
|
@@ -751,6 +775,7 @@ declare const PostRecordPublicSchema: z.ZodObject<{
|
|
|
751
775
|
} | undefined;
|
|
752
776
|
langs?: string[] | undefined;
|
|
753
777
|
selfLabels?: string[] | undefined;
|
|
778
|
+
createdAt?: unknown;
|
|
754
779
|
}>;
|
|
755
780
|
type PostRecordPublic = z.infer<typeof PostRecordPublicSchema>;
|
|
756
781
|
/**
|
|
@@ -902,8 +927,8 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
902
927
|
selfLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
903
928
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
904
929
|
}, "strip", z.ZodTypeAny, {
|
|
905
|
-
createdAt: Date;
|
|
906
930
|
text: string;
|
|
931
|
+
createdAt: Date;
|
|
907
932
|
title?: string | undefined;
|
|
908
933
|
reply?: {
|
|
909
934
|
root: {
|
|
@@ -919,7 +944,6 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
919
944
|
selfLabels?: string[] | undefined;
|
|
920
945
|
}, {
|
|
921
946
|
text: string;
|
|
922
|
-
createdAt?: unknown;
|
|
923
947
|
title?: string | undefined;
|
|
924
948
|
reply?: {
|
|
925
949
|
root: {
|
|
@@ -933,6 +957,7 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
933
957
|
} | undefined;
|
|
934
958
|
langs?: string[] | undefined;
|
|
935
959
|
selfLabels?: string[] | undefined;
|
|
960
|
+
createdAt?: unknown;
|
|
936
961
|
}>;
|
|
937
962
|
/** Hydrated audio embed (signed URL + lifted transcript). */
|
|
938
963
|
embed: z.ZodOptional<z.ZodObject<{
|
|
@@ -948,35 +973,35 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
948
973
|
endMs: z.ZodNumber;
|
|
949
974
|
text: z.ZodString;
|
|
950
975
|
}, "strip", z.ZodTypeAny, {
|
|
976
|
+
text: string;
|
|
951
977
|
startMs: number;
|
|
952
978
|
endMs: number;
|
|
953
|
-
text: string;
|
|
954
979
|
}, {
|
|
980
|
+
text: string;
|
|
955
981
|
startMs: number;
|
|
956
982
|
endMs: number;
|
|
957
|
-
text: string;
|
|
958
983
|
}>, {
|
|
984
|
+
text: string;
|
|
959
985
|
startMs: number;
|
|
960
986
|
endMs: number;
|
|
961
|
-
text: string;
|
|
962
987
|
}, {
|
|
988
|
+
text: string;
|
|
963
989
|
startMs: number;
|
|
964
990
|
endMs: number;
|
|
965
|
-
text: string;
|
|
966
991
|
}>, "many">;
|
|
967
992
|
text: z.ZodOptional<z.ZodString>;
|
|
968
993
|
}, "strip", z.ZodTypeAny, {
|
|
969
994
|
segments: {
|
|
995
|
+
text: string;
|
|
970
996
|
startMs: number;
|
|
971
997
|
endMs: number;
|
|
972
|
-
text: string;
|
|
973
998
|
}[];
|
|
974
999
|
text?: string | undefined;
|
|
975
1000
|
}, {
|
|
976
1001
|
segments: {
|
|
1002
|
+
text: string;
|
|
977
1003
|
startMs: number;
|
|
978
1004
|
endMs: number;
|
|
979
|
-
text: string;
|
|
980
1005
|
}[];
|
|
981
1006
|
text?: string | undefined;
|
|
982
1007
|
}>>;
|
|
@@ -988,9 +1013,9 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
988
1013
|
waveform?: number[] | undefined;
|
|
989
1014
|
transcript?: {
|
|
990
1015
|
segments: {
|
|
1016
|
+
text: string;
|
|
991
1017
|
startMs: number;
|
|
992
1018
|
endMs: number;
|
|
993
|
-
text: string;
|
|
994
1019
|
}[];
|
|
995
1020
|
text?: string | undefined;
|
|
996
1021
|
} | undefined;
|
|
@@ -1002,9 +1027,9 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1002
1027
|
waveform?: number[] | undefined;
|
|
1003
1028
|
transcript?: {
|
|
1004
1029
|
segments: {
|
|
1030
|
+
text: string;
|
|
1005
1031
|
startMs: number;
|
|
1006
1032
|
endMs: number;
|
|
1007
|
-
text: string;
|
|
1008
1033
|
}[];
|
|
1009
1034
|
text?: string | undefined;
|
|
1010
1035
|
} | undefined;
|
|
@@ -1012,30 +1037,26 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1012
1037
|
viewer: z.ZodObject<{
|
|
1013
1038
|
/** True when the authenticated caller authored this post. */
|
|
1014
1039
|
isAuthor: z.ZodDefault<z.ZodBoolean>;
|
|
1040
|
+
/**
|
|
1041
|
+
* Whether the caller may reply to this post (reply gating, §6). A prompt is
|
|
1042
|
+
* repliable by any authenticated viewer (the app's audience-policy default);
|
|
1043
|
+
* a reply only by its branch participants (`{ creator, branch responder }`).
|
|
1044
|
+
*/
|
|
1045
|
+
canReply: z.ZodDefault<z.ZodBoolean>;
|
|
1046
|
+
/** Why `canReply` is false, when it is (omitted when the caller can reply). */
|
|
1047
|
+
replyDisabledReason: z.ZodOptional<z.ZodEnum<["unauthenticated", "not_a_participant"]>>;
|
|
1015
1048
|
}, "strip", z.ZodTypeAny, {
|
|
1016
1049
|
isAuthor: boolean;
|
|
1050
|
+
canReply: boolean;
|
|
1051
|
+
replyDisabledReason?: "unauthenticated" | "not_a_participant" | undefined;
|
|
1017
1052
|
}, {
|
|
1018
1053
|
isAuthor?: boolean | undefined;
|
|
1054
|
+
canReply?: boolean | undefined;
|
|
1055
|
+
replyDisabledReason?: "unauthenticated" | "not_a_participant" | undefined;
|
|
1019
1056
|
}>;
|
|
1020
1057
|
}, "strip", z.ZodTypeAny, {
|
|
1021
1058
|
uri: string;
|
|
1022
|
-
|
|
1023
|
-
createdAt: Date;
|
|
1024
|
-
text: string;
|
|
1025
|
-
title?: string | undefined;
|
|
1026
|
-
reply?: {
|
|
1027
|
-
root: {
|
|
1028
|
-
uri: string;
|
|
1029
|
-
cid: string;
|
|
1030
|
-
};
|
|
1031
|
-
parent: {
|
|
1032
|
-
uri: string;
|
|
1033
|
-
cid: string;
|
|
1034
|
-
};
|
|
1035
|
-
} | undefined;
|
|
1036
|
-
langs?: string[] | undefined;
|
|
1037
|
-
selfLabels?: string[] | undefined;
|
|
1038
|
-
};
|
|
1059
|
+
kind: "reply" | "prompt";
|
|
1039
1060
|
author: {
|
|
1040
1061
|
id: string;
|
|
1041
1062
|
handle?: string | null | undefined;
|
|
@@ -1060,11 +1081,28 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1060
1081
|
badges?: string[] | undefined;
|
|
1061
1082
|
isVerified?: boolean | undefined;
|
|
1062
1083
|
};
|
|
1063
|
-
|
|
1084
|
+
record: {
|
|
1085
|
+
text: string;
|
|
1086
|
+
createdAt: Date;
|
|
1087
|
+
title?: string | undefined;
|
|
1088
|
+
reply?: {
|
|
1089
|
+
root: {
|
|
1090
|
+
uri: string;
|
|
1091
|
+
cid: string;
|
|
1092
|
+
};
|
|
1093
|
+
parent: {
|
|
1094
|
+
uri: string;
|
|
1095
|
+
cid: string;
|
|
1096
|
+
};
|
|
1097
|
+
} | undefined;
|
|
1098
|
+
langs?: string[] | undefined;
|
|
1099
|
+
selfLabels?: string[] | undefined;
|
|
1100
|
+
};
|
|
1064
1101
|
viewer: {
|
|
1065
1102
|
isAuthor: boolean;
|
|
1103
|
+
canReply: boolean;
|
|
1104
|
+
replyDisabledReason?: "unauthenticated" | "not_a_participant" | undefined;
|
|
1066
1105
|
};
|
|
1067
|
-
cid?: string | undefined;
|
|
1068
1106
|
embed?: {
|
|
1069
1107
|
$type: "dev.antiphony.embed.audio#view";
|
|
1070
1108
|
url: string;
|
|
@@ -1073,32 +1111,17 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1073
1111
|
waveform?: number[] | undefined;
|
|
1074
1112
|
transcript?: {
|
|
1075
1113
|
segments: {
|
|
1114
|
+
text: string;
|
|
1076
1115
|
startMs: number;
|
|
1077
1116
|
endMs: number;
|
|
1078
|
-
text: string;
|
|
1079
1117
|
}[];
|
|
1080
1118
|
text?: string | undefined;
|
|
1081
1119
|
} | undefined;
|
|
1082
1120
|
} | undefined;
|
|
1121
|
+
cid?: string | undefined;
|
|
1083
1122
|
}, {
|
|
1084
1123
|
uri: string;
|
|
1085
|
-
|
|
1086
|
-
text: string;
|
|
1087
|
-
createdAt?: unknown;
|
|
1088
|
-
title?: string | undefined;
|
|
1089
|
-
reply?: {
|
|
1090
|
-
root: {
|
|
1091
|
-
uri: string;
|
|
1092
|
-
cid: string;
|
|
1093
|
-
};
|
|
1094
|
-
parent: {
|
|
1095
|
-
uri: string;
|
|
1096
|
-
cid: string;
|
|
1097
|
-
};
|
|
1098
|
-
} | undefined;
|
|
1099
|
-
langs?: string[] | undefined;
|
|
1100
|
-
selfLabels?: string[] | undefined;
|
|
1101
|
-
};
|
|
1124
|
+
kind: "reply" | "prompt";
|
|
1102
1125
|
author: {
|
|
1103
1126
|
id: string;
|
|
1104
1127
|
handle?: string | null | undefined;
|
|
@@ -1123,11 +1146,28 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1123
1146
|
badges?: string[] | undefined;
|
|
1124
1147
|
isVerified?: boolean | undefined;
|
|
1125
1148
|
};
|
|
1126
|
-
|
|
1149
|
+
record: {
|
|
1150
|
+
text: string;
|
|
1151
|
+
title?: string | undefined;
|
|
1152
|
+
reply?: {
|
|
1153
|
+
root: {
|
|
1154
|
+
uri: string;
|
|
1155
|
+
cid: string;
|
|
1156
|
+
};
|
|
1157
|
+
parent: {
|
|
1158
|
+
uri: string;
|
|
1159
|
+
cid: string;
|
|
1160
|
+
};
|
|
1161
|
+
} | undefined;
|
|
1162
|
+
langs?: string[] | undefined;
|
|
1163
|
+
selfLabels?: string[] | undefined;
|
|
1164
|
+
createdAt?: unknown;
|
|
1165
|
+
};
|
|
1127
1166
|
viewer: {
|
|
1128
1167
|
isAuthor?: boolean | undefined;
|
|
1168
|
+
canReply?: boolean | undefined;
|
|
1169
|
+
replyDisabledReason?: "unauthenticated" | "not_a_participant" | undefined;
|
|
1129
1170
|
};
|
|
1130
|
-
cid?: string | undefined;
|
|
1131
1171
|
embed?: {
|
|
1132
1172
|
$type: "dev.antiphony.embed.audio#view";
|
|
1133
1173
|
url: string;
|
|
@@ -1136,13 +1176,14 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1136
1176
|
waveform?: number[] | undefined;
|
|
1137
1177
|
transcript?: {
|
|
1138
1178
|
segments: {
|
|
1179
|
+
text: string;
|
|
1139
1180
|
startMs: number;
|
|
1140
1181
|
endMs: number;
|
|
1141
|
-
text: string;
|
|
1142
1182
|
}[];
|
|
1143
1183
|
text?: string | undefined;
|
|
1144
1184
|
} | undefined;
|
|
1145
1185
|
} | undefined;
|
|
1186
|
+
cid?: string | undefined;
|
|
1146
1187
|
}>;
|
|
1147
1188
|
type AudioPostView = z.infer<typeof AudioPostViewSchema>;
|
|
1148
1189
|
|
package/dist/esm/types/audio.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ActorProfileRecordSchema, AudioEmbedSchema, AudioEmbedViewSchema, AudioPostRecordSchema, AudioPostViewSchema, PostRecordPublicSchema, ReplyRefSchema, StrongRefSchema, TimedTranscriptSchema, TranscriptEnrichmentRecordSchema, TranscriptSegmentSchema, ViewerStateSchema } from '../chunk-
|
|
2
|
-
import '../chunk-EA4OONDV.js';
|
|
3
|
-
import '../chunk-3WZJXJNU.js';
|
|
1
|
+
export { ActorProfileRecordSchema, AudioEmbedSchema, AudioEmbedViewSchema, AudioPostRecordSchema, AudioPostViewSchema, PostRecordPublicSchema, ReplyRefSchema, StrongRefSchema, TimedTranscriptSchema, TranscriptEnrichmentRecordSchema, TranscriptSegmentSchema, ViewerStateSchema } from '../chunk-F7IHVM34.js';
|
|
4
2
|
import '../chunk-5EHV73BA.js';
|
|
5
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-R6SBR3IG.js';
|
|
4
|
+
import '../chunk-IHIBHQBJ.js';
|
|
5
|
+
import '../chunk-5JBD5THX.js';
|
package/dist/esm/types/blob.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { BlobRefSchema, resolveAudioUrl } from '../chunk-5EHV73BA.js';
|
|
2
|
-
import '../chunk-
|
|
2
|
+
import '../chunk-5JBD5THX.js';
|