@antiphony/shared 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +50 -0
- package/dist/cjs/api-codecs.cjs +971 -0
- package/dist/cjs/api-codecs.d.cts +542 -0
- package/dist/cjs/errors/index.cjs +56 -0
- package/dist/cjs/errors/index.d.cts +45 -0
- package/dist/cjs/index.cjs +1276 -0
- package/dist/cjs/index.d.cts +11 -0
- package/dist/cjs/nsid.cjs +37 -0
- package/dist/cjs/nsid.d.cts +42 -0
- package/dist/cjs/observability/index.cjs +58 -0
- package/dist/cjs/observability/index.d.cts +1 -0
- package/dist/cjs/observability/report-error.cjs +58 -0
- package/dist/cjs/observability/report-error.d.cts +48 -0
- package/dist/cjs/types/api.cjs +726 -0
- package/dist/cjs/types/api.d.cts +494 -0
- package/dist/cjs/types/audio.cjs +835 -0
- package/dist/cjs/types/audio.d.cts +1149 -0
- package/dist/cjs/types/blob.cjs +23 -0
- package/dist/cjs/types/blob.d.cts +45 -0
- package/dist/cjs/types/channels.cjs +170 -0
- package/dist/cjs/types/channels.d.cts +262 -0
- package/dist/cjs/types/records.cjs +407 -0
- package/dist/cjs/types/records.d.cts +840 -0
- package/dist/cjs/types/storage.cjs +414 -0
- package/dist/cjs/types/storage.d.cts +197 -0
- package/dist/cjs/types/views.cjs +820 -0
- package/dist/cjs/types/views.d.cts +9806 -0
- package/dist/cjs/utils/index.cjs +8 -0
- package/dist/cjs/utils/index.d.cts +7 -0
- package/dist/esm/api-codecs.d.ts +542 -0
- package/dist/esm/api-codecs.js +6 -0
- package/dist/esm/chunk-24KIXQZK.js +6 -0
- package/dist/esm/chunk-3WZJXJNU.js +378 -0
- package/dist/esm/chunk-5EHV73BA.js +20 -0
- package/dist/esm/chunk-72G3LBUQ.js +1 -0
- package/dist/esm/chunk-7LW2FHLD.js +48 -0
- package/dist/esm/chunk-7V44CPRR.js +132 -0
- package/dist/esm/chunk-BUNMR4ZO.js +127 -0
- package/dist/esm/chunk-EA4OONDV.js +380 -0
- package/dist/esm/chunk-F2CANZZ7.js +40 -0
- package/dist/esm/chunk-ORMEWXMH.js +33 -0
- package/dist/esm/chunk-TIZRJORN.js +24 -0
- package/dist/esm/chunk-XDBKR6LW.js +32 -0
- package/dist/esm/errors/index.d.ts +45 -0
- package/dist/esm/errors/index.js +2 -0
- package/dist/esm/index.d.ts +11 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/nsid.d.ts +42 -0
- package/dist/esm/nsid.js +2 -0
- package/dist/esm/observability/index.d.ts +1 -0
- package/dist/esm/observability/index.js +3 -0
- package/dist/esm/observability/report-error.d.ts +48 -0
- package/dist/esm/observability/report-error.js +2 -0
- package/dist/esm/types/api.d.ts +494 -0
- package/dist/esm/types/api.js +5 -0
- package/dist/esm/types/audio.d.ts +1149 -0
- package/dist/esm/types/audio.js +5 -0
- package/dist/esm/types/blob.d.ts +45 -0
- package/dist/esm/types/blob.js +2 -0
- package/dist/esm/types/channels.d.ts +262 -0
- package/dist/esm/types/channels.js +162 -0
- package/dist/esm/types/records.d.ts +840 -0
- package/dist/esm/types/records.js +3 -0
- package/dist/esm/types/storage.d.ts +197 -0
- package/dist/esm/types/storage.js +26 -0
- package/dist/esm/types/views.d.ts +9806 -0
- package/dist/esm/types/views.js +4 -0
- package/dist/esm/utils/index.d.ts +7 -0
- package/dist/esm/utils/index.js +2 -0
- package/package.json +82 -0
|
@@ -0,0 +1,1149 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Antiphony canonical audio-post contract (`dev.antiphony.*`).
|
|
5
|
+
*
|
|
6
|
+
* This is the NEW data model from `specs/antiphony-data-model.md`, added
|
|
7
|
+
* ADDITIVELY alongside the legacy `PromptRecord`/`ReplyRecord` (Stream 1).
|
|
8
|
+
* Nothing here touches the old shapes; Vox Pop keeps running on them until the
|
|
9
|
+
* Stream 4 migration deletes the legacy schemas + `com.voxpop.*` lexicons.
|
|
10
|
+
*
|
|
11
|
+
* Mirrors the lexicons in `lexicons/dev/antiphony/`. Key model decisions:
|
|
12
|
+
* - ONE post collection; `reply` presence discriminates prompt-vs-reply.
|
|
13
|
+
* - The audio is a standard `embed.audio`; transcript is platform enrichment
|
|
14
|
+
* (separate record), lifted into the embed *view* at read time.
|
|
15
|
+
* - "blob" in the lexicon ⇒ a storage ref on the record (`BlobRef`); the view
|
|
16
|
+
* carries a resolved/signed playback URL.
|
|
17
|
+
* - Tenancy (`originAppId`) + facets (`authorId`, `orgId`) are storage-layer
|
|
18
|
+
* indexed fields, NOT part of the public lexicon.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* AT Protocol StrongRef — a content-addressed, portable pointer to another
|
|
22
|
+
* record (`com.atproto.repo.strongRef`). Replaces the legacy flat `promptId`.
|
|
23
|
+
*/
|
|
24
|
+
declare const StrongRefSchema: z.ZodObject<{
|
|
25
|
+
uri: z.ZodString;
|
|
26
|
+
cid: z.ZodString;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
uri: string;
|
|
29
|
+
cid: string;
|
|
30
|
+
}, {
|
|
31
|
+
uri: string;
|
|
32
|
+
cid: string;
|
|
33
|
+
}>;
|
|
34
|
+
type StrongRef = z.infer<typeof StrongRefSchema>;
|
|
35
|
+
/**
|
|
36
|
+
* Threading pointers for a reply. `root` = the prompt at the top of the
|
|
37
|
+
* thread; `parent` = the post being directly answered. Presence on a post is
|
|
38
|
+
* the prompt-vs-reply discriminator.
|
|
39
|
+
*/
|
|
40
|
+
declare const ReplyRefSchema: z.ZodObject<{
|
|
41
|
+
root: z.ZodObject<{
|
|
42
|
+
uri: z.ZodString;
|
|
43
|
+
cid: z.ZodString;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
uri: string;
|
|
46
|
+
cid: string;
|
|
47
|
+
}, {
|
|
48
|
+
uri: string;
|
|
49
|
+
cid: string;
|
|
50
|
+
}>;
|
|
51
|
+
parent: z.ZodObject<{
|
|
52
|
+
uri: z.ZodString;
|
|
53
|
+
cid: z.ZodString;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
uri: string;
|
|
56
|
+
cid: string;
|
|
57
|
+
}, {
|
|
58
|
+
uri: string;
|
|
59
|
+
cid: string;
|
|
60
|
+
}>;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
root: {
|
|
63
|
+
uri: string;
|
|
64
|
+
cid: string;
|
|
65
|
+
};
|
|
66
|
+
parent: {
|
|
67
|
+
uri: string;
|
|
68
|
+
cid: string;
|
|
69
|
+
};
|
|
70
|
+
}, {
|
|
71
|
+
root: {
|
|
72
|
+
uri: string;
|
|
73
|
+
cid: string;
|
|
74
|
+
};
|
|
75
|
+
parent: {
|
|
76
|
+
uri: string;
|
|
77
|
+
cid: string;
|
|
78
|
+
};
|
|
79
|
+
}>;
|
|
80
|
+
type ReplyRef = z.infer<typeof ReplyRefSchema>;
|
|
81
|
+
/**
|
|
82
|
+
* `dev.antiphony.embed.audio` — STORED shape. Holds the audio blob and its
|
|
83
|
+
* render-independent metadata. Does NOT carry the transcript (that's the
|
|
84
|
+
* enrichment record, lifted into the view).
|
|
85
|
+
*/
|
|
86
|
+
declare const AudioEmbedSchema: z.ZodObject<{
|
|
87
|
+
$type: z.ZodLiteral<"dev.antiphony.embed.audio">;
|
|
88
|
+
/** The audio bytes as a content-addressed storage ref (CID/path). */
|
|
89
|
+
audio: z.ZodObject<{
|
|
90
|
+
$type: z.ZodLiteral<"blob">;
|
|
91
|
+
ref: z.ZodString;
|
|
92
|
+
mimeType: z.ZodString;
|
|
93
|
+
size: z.ZodNumber;
|
|
94
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
|
+
$type: "blob";
|
|
96
|
+
ref: string;
|
|
97
|
+
mimeType: string;
|
|
98
|
+
size: number;
|
|
99
|
+
}, {
|
|
100
|
+
$type: "blob";
|
|
101
|
+
ref: string;
|
|
102
|
+
mimeType: string;
|
|
103
|
+
size: number;
|
|
104
|
+
}>;
|
|
105
|
+
/** Duration in MILLISECONDS (platform-wide unit; not seconds). */
|
|
106
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
/** User-authored short description (audio analogue of image alt). NOT the transcript. */
|
|
108
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
109
|
+
/** Pre-computed waveform peaks (normalized 0–100) for instant rendering. */
|
|
110
|
+
waveform: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
$type: "dev.antiphony.embed.audio";
|
|
113
|
+
audio: {
|
|
114
|
+
$type: "blob";
|
|
115
|
+
ref: string;
|
|
116
|
+
mimeType: string;
|
|
117
|
+
size: number;
|
|
118
|
+
};
|
|
119
|
+
durationMs?: number | undefined;
|
|
120
|
+
alt?: string | undefined;
|
|
121
|
+
waveform?: number[] | undefined;
|
|
122
|
+
}, {
|
|
123
|
+
$type: "dev.antiphony.embed.audio";
|
|
124
|
+
audio: {
|
|
125
|
+
$type: "blob";
|
|
126
|
+
ref: string;
|
|
127
|
+
mimeType: string;
|
|
128
|
+
size: number;
|
|
129
|
+
};
|
|
130
|
+
durationMs?: number | undefined;
|
|
131
|
+
alt?: string | undefined;
|
|
132
|
+
waveform?: number[] | undefined;
|
|
133
|
+
}>;
|
|
134
|
+
type AudioEmbed = z.infer<typeof AudioEmbedSchema>;
|
|
135
|
+
/**
|
|
136
|
+
* One time-coded transcript segment (the audio analogue of a WebVTT cue).
|
|
137
|
+
*/
|
|
138
|
+
declare const TranscriptSegmentSchema: z.ZodEffects<z.ZodObject<{
|
|
139
|
+
startMs: z.ZodNumber;
|
|
140
|
+
endMs: z.ZodNumber;
|
|
141
|
+
text: z.ZodString;
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
startMs: number;
|
|
144
|
+
endMs: number;
|
|
145
|
+
text: string;
|
|
146
|
+
}, {
|
|
147
|
+
startMs: number;
|
|
148
|
+
endMs: number;
|
|
149
|
+
text: string;
|
|
150
|
+
}>, {
|
|
151
|
+
startMs: number;
|
|
152
|
+
endMs: number;
|
|
153
|
+
text: string;
|
|
154
|
+
}, {
|
|
155
|
+
startMs: number;
|
|
156
|
+
endMs: number;
|
|
157
|
+
text: string;
|
|
158
|
+
}>;
|
|
159
|
+
type TranscriptSegment = z.infer<typeof TranscriptSegmentSchema>;
|
|
160
|
+
/**
|
|
161
|
+
* A timed transcript: ordered segments + an optional concatenated rollup for
|
|
162
|
+
* consumers that don't need timing. The shape both the enrichment record and
|
|
163
|
+
* the embed view carry.
|
|
164
|
+
*/
|
|
165
|
+
declare const TimedTranscriptSchema: z.ZodObject<{
|
|
166
|
+
segments: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
167
|
+
startMs: z.ZodNumber;
|
|
168
|
+
endMs: z.ZodNumber;
|
|
169
|
+
text: z.ZodString;
|
|
170
|
+
}, "strip", z.ZodTypeAny, {
|
|
171
|
+
startMs: number;
|
|
172
|
+
endMs: number;
|
|
173
|
+
text: string;
|
|
174
|
+
}, {
|
|
175
|
+
startMs: number;
|
|
176
|
+
endMs: number;
|
|
177
|
+
text: string;
|
|
178
|
+
}>, {
|
|
179
|
+
startMs: number;
|
|
180
|
+
endMs: number;
|
|
181
|
+
text: string;
|
|
182
|
+
}, {
|
|
183
|
+
startMs: number;
|
|
184
|
+
endMs: number;
|
|
185
|
+
text: string;
|
|
186
|
+
}>, "many">;
|
|
187
|
+
text: z.ZodOptional<z.ZodString>;
|
|
188
|
+
}, "strip", z.ZodTypeAny, {
|
|
189
|
+
segments: {
|
|
190
|
+
startMs: number;
|
|
191
|
+
endMs: number;
|
|
192
|
+
text: string;
|
|
193
|
+
}[];
|
|
194
|
+
text?: string | undefined;
|
|
195
|
+
}, {
|
|
196
|
+
segments: {
|
|
197
|
+
startMs: number;
|
|
198
|
+
endMs: number;
|
|
199
|
+
text: string;
|
|
200
|
+
}[];
|
|
201
|
+
text?: string | undefined;
|
|
202
|
+
}>;
|
|
203
|
+
type TimedTranscript = z.infer<typeof TimedTranscriptSchema>;
|
|
204
|
+
/**
|
|
205
|
+
* `dev.antiphony.embed.audio#view` — HYDRATED shape. Carries a resolved,
|
|
206
|
+
* playable URL (a signed Storage URL in the centralized deployment) and the
|
|
207
|
+
* transcript lifted from the enrichment record at read time.
|
|
208
|
+
*/
|
|
209
|
+
declare const AudioEmbedViewSchema: z.ZodObject<{
|
|
210
|
+
$type: z.ZodLiteral<"dev.antiphony.embed.audio#view">;
|
|
211
|
+
url: z.ZodString;
|
|
212
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
213
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
214
|
+
waveform: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
215
|
+
/** Lifted from the transcript enrichment record; absent until transcription completes. */
|
|
216
|
+
transcript: z.ZodOptional<z.ZodObject<{
|
|
217
|
+
segments: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
218
|
+
startMs: z.ZodNumber;
|
|
219
|
+
endMs: z.ZodNumber;
|
|
220
|
+
text: z.ZodString;
|
|
221
|
+
}, "strip", z.ZodTypeAny, {
|
|
222
|
+
startMs: number;
|
|
223
|
+
endMs: number;
|
|
224
|
+
text: string;
|
|
225
|
+
}, {
|
|
226
|
+
startMs: number;
|
|
227
|
+
endMs: number;
|
|
228
|
+
text: string;
|
|
229
|
+
}>, {
|
|
230
|
+
startMs: number;
|
|
231
|
+
endMs: number;
|
|
232
|
+
text: string;
|
|
233
|
+
}, {
|
|
234
|
+
startMs: number;
|
|
235
|
+
endMs: number;
|
|
236
|
+
text: string;
|
|
237
|
+
}>, "many">;
|
|
238
|
+
text: z.ZodOptional<z.ZodString>;
|
|
239
|
+
}, "strip", z.ZodTypeAny, {
|
|
240
|
+
segments: {
|
|
241
|
+
startMs: number;
|
|
242
|
+
endMs: number;
|
|
243
|
+
text: string;
|
|
244
|
+
}[];
|
|
245
|
+
text?: string | undefined;
|
|
246
|
+
}, {
|
|
247
|
+
segments: {
|
|
248
|
+
startMs: number;
|
|
249
|
+
endMs: number;
|
|
250
|
+
text: string;
|
|
251
|
+
}[];
|
|
252
|
+
text?: string | undefined;
|
|
253
|
+
}>>;
|
|
254
|
+
}, "strip", z.ZodTypeAny, {
|
|
255
|
+
$type: "dev.antiphony.embed.audio#view";
|
|
256
|
+
url: string;
|
|
257
|
+
durationMs?: number | undefined;
|
|
258
|
+
alt?: string | undefined;
|
|
259
|
+
waveform?: number[] | undefined;
|
|
260
|
+
transcript?: {
|
|
261
|
+
segments: {
|
|
262
|
+
startMs: number;
|
|
263
|
+
endMs: number;
|
|
264
|
+
text: string;
|
|
265
|
+
}[];
|
|
266
|
+
text?: string | undefined;
|
|
267
|
+
} | undefined;
|
|
268
|
+
}, {
|
|
269
|
+
$type: "dev.antiphony.embed.audio#view";
|
|
270
|
+
url: string;
|
|
271
|
+
durationMs?: number | undefined;
|
|
272
|
+
alt?: string | undefined;
|
|
273
|
+
waveform?: number[] | undefined;
|
|
274
|
+
transcript?: {
|
|
275
|
+
segments: {
|
|
276
|
+
startMs: number;
|
|
277
|
+
endMs: number;
|
|
278
|
+
text: string;
|
|
279
|
+
}[];
|
|
280
|
+
text?: string | undefined;
|
|
281
|
+
} | undefined;
|
|
282
|
+
}>;
|
|
283
|
+
type AudioEmbedView = z.infer<typeof AudioEmbedViewSchema>;
|
|
284
|
+
/**
|
|
285
|
+
* `dev.antiphony.audio.post` — the single canonical content record, as stored.
|
|
286
|
+
*
|
|
287
|
+
* = the lexicon fields (`text`, `title?`, `embed?`, `reply?`, `langs?`,
|
|
288
|
+
* `selfLabels?`, `createdAt`) PLUS storage-layer indexed fields that are NOT
|
|
289
|
+
* in the public lexicon (`id`, `originAppId`, `authorId`, `authorDid?`,
|
|
290
|
+
* `orgId?`, `kind`). `kind` is denormalized from `reply` presence at write
|
|
291
|
+
* time so "list an author's prompts" is a cheap composite-index query.
|
|
292
|
+
*/
|
|
293
|
+
declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
294
|
+
/** Storage id (rkey/doc id). */
|
|
295
|
+
id: z.ZodString;
|
|
296
|
+
/** Origin app that created this record — the multi-tenant isolation key. */
|
|
297
|
+
originAppId: z.ZodString;
|
|
298
|
+
/** Authoring user. A queryable facet, not the tenancy boundary. */
|
|
299
|
+
authorId: z.ZodString;
|
|
300
|
+
/** Optional AT Protocol identity of the author (facet). */
|
|
301
|
+
authorDid: z.ZodOptional<z.ZodString>;
|
|
302
|
+
/** Optional org context (facet). */
|
|
303
|
+
orgId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
304
|
+
/** Denormalized from `reply` presence: `reply` set ⇒ 'reply', else 'prompt'. */
|
|
305
|
+
kind: z.ZodEnum<["prompt", "reply"]>;
|
|
306
|
+
/** User-authored text (bsky-semantic). May be empty for pure-audio posts. NEVER the transcript. */
|
|
307
|
+
text: z.ZodString;
|
|
308
|
+
/** Optional headline; a prompt feature, not the discriminator. */
|
|
309
|
+
title: z.ZodOptional<z.ZodString>;
|
|
310
|
+
/** Audio (or other) attachment. Audio posts carry an `AudioEmbed`. */
|
|
311
|
+
embed: z.ZodOptional<z.ZodObject<{
|
|
312
|
+
$type: z.ZodLiteral<"dev.antiphony.embed.audio">;
|
|
313
|
+
/** The audio bytes as a content-addressed storage ref (CID/path). */
|
|
314
|
+
audio: z.ZodObject<{
|
|
315
|
+
$type: z.ZodLiteral<"blob">;
|
|
316
|
+
ref: z.ZodString;
|
|
317
|
+
mimeType: z.ZodString;
|
|
318
|
+
size: z.ZodNumber;
|
|
319
|
+
}, "strip", z.ZodTypeAny, {
|
|
320
|
+
$type: "blob";
|
|
321
|
+
ref: string;
|
|
322
|
+
mimeType: string;
|
|
323
|
+
size: number;
|
|
324
|
+
}, {
|
|
325
|
+
$type: "blob";
|
|
326
|
+
ref: string;
|
|
327
|
+
mimeType: string;
|
|
328
|
+
size: number;
|
|
329
|
+
}>;
|
|
330
|
+
/** Duration in MILLISECONDS (platform-wide unit; not seconds). */
|
|
331
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
332
|
+
/** User-authored short description (audio analogue of image alt). NOT the transcript. */
|
|
333
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
334
|
+
/** Pre-computed waveform peaks (normalized 0–100) for instant rendering. */
|
|
335
|
+
waveform: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
336
|
+
}, "strip", z.ZodTypeAny, {
|
|
337
|
+
$type: "dev.antiphony.embed.audio";
|
|
338
|
+
audio: {
|
|
339
|
+
$type: "blob";
|
|
340
|
+
ref: string;
|
|
341
|
+
mimeType: string;
|
|
342
|
+
size: number;
|
|
343
|
+
};
|
|
344
|
+
durationMs?: number | undefined;
|
|
345
|
+
alt?: string | undefined;
|
|
346
|
+
waveform?: number[] | undefined;
|
|
347
|
+
}, {
|
|
348
|
+
$type: "dev.antiphony.embed.audio";
|
|
349
|
+
audio: {
|
|
350
|
+
$type: "blob";
|
|
351
|
+
ref: string;
|
|
352
|
+
mimeType: string;
|
|
353
|
+
size: number;
|
|
354
|
+
};
|
|
355
|
+
durationMs?: number | undefined;
|
|
356
|
+
alt?: string | undefined;
|
|
357
|
+
waveform?: number[] | undefined;
|
|
358
|
+
}>>;
|
|
359
|
+
/** Present iff this post is a reply (StrongRef root + parent). */
|
|
360
|
+
reply: z.ZodOptional<z.ZodObject<{
|
|
361
|
+
root: z.ZodObject<{
|
|
362
|
+
uri: z.ZodString;
|
|
363
|
+
cid: z.ZodString;
|
|
364
|
+
}, "strip", z.ZodTypeAny, {
|
|
365
|
+
uri: string;
|
|
366
|
+
cid: string;
|
|
367
|
+
}, {
|
|
368
|
+
uri: string;
|
|
369
|
+
cid: string;
|
|
370
|
+
}>;
|
|
371
|
+
parent: z.ZodObject<{
|
|
372
|
+
uri: z.ZodString;
|
|
373
|
+
cid: z.ZodString;
|
|
374
|
+
}, "strip", z.ZodTypeAny, {
|
|
375
|
+
uri: string;
|
|
376
|
+
cid: string;
|
|
377
|
+
}, {
|
|
378
|
+
uri: string;
|
|
379
|
+
cid: string;
|
|
380
|
+
}>;
|
|
381
|
+
}, "strip", z.ZodTypeAny, {
|
|
382
|
+
root: {
|
|
383
|
+
uri: string;
|
|
384
|
+
cid: string;
|
|
385
|
+
};
|
|
386
|
+
parent: {
|
|
387
|
+
uri: string;
|
|
388
|
+
cid: string;
|
|
389
|
+
};
|
|
390
|
+
}, {
|
|
391
|
+
root: {
|
|
392
|
+
uri: string;
|
|
393
|
+
cid: string;
|
|
394
|
+
};
|
|
395
|
+
parent: {
|
|
396
|
+
uri: string;
|
|
397
|
+
cid: string;
|
|
398
|
+
};
|
|
399
|
+
}>>;
|
|
400
|
+
/** BCP-47 language tags for the text. */
|
|
401
|
+
langs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
402
|
+
/** Author-applied self-label values (content warnings). Simplified from the
|
|
403
|
+
* lexicon's `com.atproto.label.defs#selfLabels` to the bare value strings. */
|
|
404
|
+
selfLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
405
|
+
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
406
|
+
}, "strip", z.ZodTypeAny, {
|
|
407
|
+
id: string;
|
|
408
|
+
createdAt: Date;
|
|
409
|
+
authorId: string;
|
|
410
|
+
text: string;
|
|
411
|
+
originAppId: string;
|
|
412
|
+
kind: "prompt" | "reply";
|
|
413
|
+
orgId?: string | null | undefined;
|
|
414
|
+
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
|
+
embed?: {
|
|
427
|
+
$type: "dev.antiphony.embed.audio";
|
|
428
|
+
audio: {
|
|
429
|
+
$type: "blob";
|
|
430
|
+
ref: string;
|
|
431
|
+
mimeType: string;
|
|
432
|
+
size: number;
|
|
433
|
+
};
|
|
434
|
+
durationMs?: number | undefined;
|
|
435
|
+
alt?: string | undefined;
|
|
436
|
+
waveform?: number[] | undefined;
|
|
437
|
+
} | 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
|
+
reply?: {
|
|
451
|
+
root: {
|
|
452
|
+
uri: string;
|
|
453
|
+
cid: string;
|
|
454
|
+
};
|
|
455
|
+
parent: {
|
|
456
|
+
uri: string;
|
|
457
|
+
cid: string;
|
|
458
|
+
};
|
|
459
|
+
} | undefined;
|
|
460
|
+
embed?: {
|
|
461
|
+
$type: "dev.antiphony.embed.audio";
|
|
462
|
+
audio: {
|
|
463
|
+
$type: "blob";
|
|
464
|
+
ref: string;
|
|
465
|
+
mimeType: string;
|
|
466
|
+
size: number;
|
|
467
|
+
};
|
|
468
|
+
durationMs?: number | undefined;
|
|
469
|
+
alt?: string | undefined;
|
|
470
|
+
waveform?: number[] | undefined;
|
|
471
|
+
} | 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
|
+
reply?: {
|
|
485
|
+
root: {
|
|
486
|
+
uri: string;
|
|
487
|
+
cid: string;
|
|
488
|
+
};
|
|
489
|
+
parent: {
|
|
490
|
+
uri: string;
|
|
491
|
+
cid: string;
|
|
492
|
+
};
|
|
493
|
+
} | undefined;
|
|
494
|
+
embed?: {
|
|
495
|
+
$type: "dev.antiphony.embed.audio";
|
|
496
|
+
audio: {
|
|
497
|
+
$type: "blob";
|
|
498
|
+
ref: string;
|
|
499
|
+
mimeType: string;
|
|
500
|
+
size: number;
|
|
501
|
+
};
|
|
502
|
+
durationMs?: number | undefined;
|
|
503
|
+
alt?: string | undefined;
|
|
504
|
+
waveform?: number[] | undefined;
|
|
505
|
+
} | 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
|
+
reply?: {
|
|
519
|
+
root: {
|
|
520
|
+
uri: string;
|
|
521
|
+
cid: string;
|
|
522
|
+
};
|
|
523
|
+
parent: {
|
|
524
|
+
uri: string;
|
|
525
|
+
cid: string;
|
|
526
|
+
};
|
|
527
|
+
} | undefined;
|
|
528
|
+
embed?: {
|
|
529
|
+
$type: "dev.antiphony.embed.audio";
|
|
530
|
+
audio: {
|
|
531
|
+
$type: "blob";
|
|
532
|
+
ref: string;
|
|
533
|
+
mimeType: string;
|
|
534
|
+
size: number;
|
|
535
|
+
};
|
|
536
|
+
durationMs?: number | undefined;
|
|
537
|
+
alt?: string | undefined;
|
|
538
|
+
waveform?: number[] | undefined;
|
|
539
|
+
} | undefined;
|
|
540
|
+
langs?: string[] | undefined;
|
|
541
|
+
selfLabels?: string[] | undefined;
|
|
542
|
+
}>;
|
|
543
|
+
type AudioPostRecord = z.infer<typeof AudioPostRecordSchema>;
|
|
544
|
+
/**
|
|
545
|
+
* `dev.antiphony.audio.transcript` — platform-enrichment record. Stored in the
|
|
546
|
+
* Antiphony enrichment namespace, referencing the post by StrongRef. Lifted
|
|
547
|
+
* into `AudioEmbedView.transcript` during hydration; never on the post.
|
|
548
|
+
*/
|
|
549
|
+
declare const TranscriptEnrichmentRecordSchema: z.ZodObject<{
|
|
550
|
+
id: z.ZodString;
|
|
551
|
+
/** The post whose audio this transcribes. */
|
|
552
|
+
subject: z.ZodObject<{
|
|
553
|
+
uri: z.ZodString;
|
|
554
|
+
cid: z.ZodString;
|
|
555
|
+
}, "strip", z.ZodTypeAny, {
|
|
556
|
+
uri: string;
|
|
557
|
+
cid: string;
|
|
558
|
+
}, {
|
|
559
|
+
uri: string;
|
|
560
|
+
cid: string;
|
|
561
|
+
}>;
|
|
562
|
+
transcript: z.ZodObject<{
|
|
563
|
+
segments: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
564
|
+
startMs: z.ZodNumber;
|
|
565
|
+
endMs: z.ZodNumber;
|
|
566
|
+
text: z.ZodString;
|
|
567
|
+
}, "strip", z.ZodTypeAny, {
|
|
568
|
+
startMs: number;
|
|
569
|
+
endMs: number;
|
|
570
|
+
text: string;
|
|
571
|
+
}, {
|
|
572
|
+
startMs: number;
|
|
573
|
+
endMs: number;
|
|
574
|
+
text: string;
|
|
575
|
+
}>, {
|
|
576
|
+
startMs: number;
|
|
577
|
+
endMs: number;
|
|
578
|
+
text: string;
|
|
579
|
+
}, {
|
|
580
|
+
startMs: number;
|
|
581
|
+
endMs: number;
|
|
582
|
+
text: string;
|
|
583
|
+
}>, "many">;
|
|
584
|
+
text: z.ZodOptional<z.ZodString>;
|
|
585
|
+
}, "strip", z.ZodTypeAny, {
|
|
586
|
+
segments: {
|
|
587
|
+
startMs: number;
|
|
588
|
+
endMs: number;
|
|
589
|
+
text: string;
|
|
590
|
+
}[];
|
|
591
|
+
text?: string | undefined;
|
|
592
|
+
}, {
|
|
593
|
+
segments: {
|
|
594
|
+
startMs: number;
|
|
595
|
+
endMs: number;
|
|
596
|
+
text: string;
|
|
597
|
+
}[];
|
|
598
|
+
text?: string | undefined;
|
|
599
|
+
}>;
|
|
600
|
+
/** BCP-47 language tag of the transcript. */
|
|
601
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
602
|
+
/** Model/provider provenance (the generator is a pluggable port). */
|
|
603
|
+
model: z.ZodOptional<z.ZodString>;
|
|
604
|
+
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
605
|
+
}, "strip", z.ZodTypeAny, {
|
|
606
|
+
id: string;
|
|
607
|
+
createdAt: Date;
|
|
608
|
+
transcript: {
|
|
609
|
+
segments: {
|
|
610
|
+
startMs: number;
|
|
611
|
+
endMs: number;
|
|
612
|
+
text: string;
|
|
613
|
+
}[];
|
|
614
|
+
text?: string | undefined;
|
|
615
|
+
};
|
|
616
|
+
subject: {
|
|
617
|
+
uri: string;
|
|
618
|
+
cid: string;
|
|
619
|
+
};
|
|
620
|
+
lang?: string | undefined;
|
|
621
|
+
model?: string | undefined;
|
|
622
|
+
}, {
|
|
623
|
+
id: string;
|
|
624
|
+
transcript: {
|
|
625
|
+
segments: {
|
|
626
|
+
startMs: number;
|
|
627
|
+
endMs: number;
|
|
628
|
+
text: string;
|
|
629
|
+
}[];
|
|
630
|
+
text?: string | undefined;
|
|
631
|
+
};
|
|
632
|
+
subject: {
|
|
633
|
+
uri: string;
|
|
634
|
+
cid: string;
|
|
635
|
+
};
|
|
636
|
+
createdAt?: unknown;
|
|
637
|
+
lang?: string | undefined;
|
|
638
|
+
model?: string | undefined;
|
|
639
|
+
}>;
|
|
640
|
+
type TranscriptEnrichmentRecord = z.infer<typeof TranscriptEnrichmentRecordSchema>;
|
|
641
|
+
/**
|
|
642
|
+
* `dev.antiphony.actor.profile` — port of `com.voxpop.actor.profile`.
|
|
643
|
+
*/
|
|
644
|
+
declare const ActorProfileRecordSchema: z.ZodObject<{
|
|
645
|
+
handle: z.ZodOptional<z.ZodString>;
|
|
646
|
+
usageIntent: z.ZodOptional<z.ZodString>;
|
|
647
|
+
rssFeed: z.ZodOptional<z.ZodString>;
|
|
648
|
+
}, "strip", z.ZodTypeAny, {
|
|
649
|
+
handle?: string | undefined;
|
|
650
|
+
usageIntent?: string | undefined;
|
|
651
|
+
rssFeed?: string | undefined;
|
|
652
|
+
}, {
|
|
653
|
+
handle?: string | undefined;
|
|
654
|
+
usageIntent?: string | undefined;
|
|
655
|
+
rssFeed?: string | undefined;
|
|
656
|
+
}>;
|
|
657
|
+
type ActorProfileRecord = z.infer<typeof ActorProfileRecordSchema>;
|
|
658
|
+
/**
|
|
659
|
+
* Per-viewer relationship to a post, computed from the caller's auth (the
|
|
660
|
+
* bsky `#viewerState` pattern). Lives on the VIEW, never the record. Starts
|
|
661
|
+
* minimal; like/seen are added when those features exist.
|
|
662
|
+
*/
|
|
663
|
+
declare const ViewerStateSchema: z.ZodObject<{
|
|
664
|
+
/** True when the authenticated caller authored this post. */
|
|
665
|
+
isAuthor: z.ZodDefault<z.ZodBoolean>;
|
|
666
|
+
}, "strip", z.ZodTypeAny, {
|
|
667
|
+
isAuthor: boolean;
|
|
668
|
+
}, {
|
|
669
|
+
isAuthor?: boolean | undefined;
|
|
670
|
+
}>;
|
|
671
|
+
type ViewerState = z.infer<typeof ViewerStateSchema>;
|
|
672
|
+
/**
|
|
673
|
+
* The public, hydrated lexicon fields of a post (no storage/tenancy fields,
|
|
674
|
+
* no stored embed — the embed comes hydrated on the view).
|
|
675
|
+
*/
|
|
676
|
+
declare const PostRecordPublicSchema: z.ZodObject<{
|
|
677
|
+
text: z.ZodString;
|
|
678
|
+
title: z.ZodOptional<z.ZodString>;
|
|
679
|
+
reply: z.ZodOptional<z.ZodObject<{
|
|
680
|
+
root: z.ZodObject<{
|
|
681
|
+
uri: z.ZodString;
|
|
682
|
+
cid: z.ZodString;
|
|
683
|
+
}, "strip", z.ZodTypeAny, {
|
|
684
|
+
uri: string;
|
|
685
|
+
cid: string;
|
|
686
|
+
}, {
|
|
687
|
+
uri: string;
|
|
688
|
+
cid: string;
|
|
689
|
+
}>;
|
|
690
|
+
parent: z.ZodObject<{
|
|
691
|
+
uri: z.ZodString;
|
|
692
|
+
cid: z.ZodString;
|
|
693
|
+
}, "strip", z.ZodTypeAny, {
|
|
694
|
+
uri: string;
|
|
695
|
+
cid: string;
|
|
696
|
+
}, {
|
|
697
|
+
uri: string;
|
|
698
|
+
cid: string;
|
|
699
|
+
}>;
|
|
700
|
+
}, "strip", z.ZodTypeAny, {
|
|
701
|
+
root: {
|
|
702
|
+
uri: string;
|
|
703
|
+
cid: string;
|
|
704
|
+
};
|
|
705
|
+
parent: {
|
|
706
|
+
uri: string;
|
|
707
|
+
cid: string;
|
|
708
|
+
};
|
|
709
|
+
}, {
|
|
710
|
+
root: {
|
|
711
|
+
uri: string;
|
|
712
|
+
cid: string;
|
|
713
|
+
};
|
|
714
|
+
parent: {
|
|
715
|
+
uri: string;
|
|
716
|
+
cid: string;
|
|
717
|
+
};
|
|
718
|
+
}>>;
|
|
719
|
+
langs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
720
|
+
selfLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
721
|
+
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
722
|
+
}, "strip", z.ZodTypeAny, {
|
|
723
|
+
createdAt: Date;
|
|
724
|
+
text: string;
|
|
725
|
+
title?: string | undefined;
|
|
726
|
+
reply?: {
|
|
727
|
+
root: {
|
|
728
|
+
uri: string;
|
|
729
|
+
cid: string;
|
|
730
|
+
};
|
|
731
|
+
parent: {
|
|
732
|
+
uri: string;
|
|
733
|
+
cid: string;
|
|
734
|
+
};
|
|
735
|
+
} | undefined;
|
|
736
|
+
langs?: string[] | undefined;
|
|
737
|
+
selfLabels?: string[] | undefined;
|
|
738
|
+
}, {
|
|
739
|
+
text: string;
|
|
740
|
+
createdAt?: unknown;
|
|
741
|
+
title?: string | undefined;
|
|
742
|
+
reply?: {
|
|
743
|
+
root: {
|
|
744
|
+
uri: string;
|
|
745
|
+
cid: string;
|
|
746
|
+
};
|
|
747
|
+
parent: {
|
|
748
|
+
uri: string;
|
|
749
|
+
cid: string;
|
|
750
|
+
};
|
|
751
|
+
} | undefined;
|
|
752
|
+
langs?: string[] | undefined;
|
|
753
|
+
selfLabels?: string[] | undefined;
|
|
754
|
+
}>;
|
|
755
|
+
type PostRecordPublic = z.infer<typeof PostRecordPublicSchema>;
|
|
756
|
+
/**
|
|
757
|
+
* `AudioPostView` — the hydrated, client-facing shape (the bsky `postView`
|
|
758
|
+
* analogue): record content + author + hydrated embed + per-viewer state.
|
|
759
|
+
* Produced by the (batched) hydrator; the default/public view, with
|
|
760
|
+
* owner-extra arriving via `viewer` + separate authed endpoints, not fat
|
|
761
|
+
* records.
|
|
762
|
+
*/
|
|
763
|
+
declare const AudioPostViewSchema: z.ZodObject<{
|
|
764
|
+
/** at:// URI (or internal ref) identifying the post. */
|
|
765
|
+
uri: z.ZodString;
|
|
766
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
767
|
+
kind: z.ZodEnum<["prompt", "reply"]>;
|
|
768
|
+
author: z.ZodObject<{
|
|
769
|
+
id: z.ZodString;
|
|
770
|
+
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
771
|
+
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
772
|
+
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
773
|
+
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
774
|
+
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
775
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
776
|
+
label: z.ZodString;
|
|
777
|
+
url: z.ZodString;
|
|
778
|
+
}, "strip", z.ZodTypeAny, {
|
|
779
|
+
label: string;
|
|
780
|
+
url: string;
|
|
781
|
+
}, {
|
|
782
|
+
label: string;
|
|
783
|
+
url: string;
|
|
784
|
+
}>, "many">>;
|
|
785
|
+
bluesky: z.ZodOptional<z.ZodObject<{
|
|
786
|
+
handle: z.ZodString;
|
|
787
|
+
did: z.ZodString;
|
|
788
|
+
}, "strip", z.ZodTypeAny, {
|
|
789
|
+
handle: string;
|
|
790
|
+
did: string;
|
|
791
|
+
}, {
|
|
792
|
+
handle: string;
|
|
793
|
+
did: string;
|
|
794
|
+
}>>;
|
|
795
|
+
stats: z.ZodOptional<z.ZodObject<{
|
|
796
|
+
followers: z.ZodDefault<z.ZodNumber>;
|
|
797
|
+
following: z.ZodDefault<z.ZodNumber>;
|
|
798
|
+
prompts: z.ZodDefault<z.ZodNumber>;
|
|
799
|
+
}, "strip", z.ZodTypeAny, {
|
|
800
|
+
followers: number;
|
|
801
|
+
following: number;
|
|
802
|
+
prompts: number;
|
|
803
|
+
}, {
|
|
804
|
+
followers?: number | undefined;
|
|
805
|
+
following?: number | undefined;
|
|
806
|
+
prompts?: number | undefined;
|
|
807
|
+
}>>;
|
|
808
|
+
badges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
809
|
+
isVerified: z.ZodOptional<z.ZodBoolean>;
|
|
810
|
+
createdAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
|
|
811
|
+
}, "strip", z.ZodTypeAny, {
|
|
812
|
+
id: string;
|
|
813
|
+
handle?: string | null | undefined;
|
|
814
|
+
displayName?: string | null | undefined;
|
|
815
|
+
bio?: string | null | undefined;
|
|
816
|
+
avatarUrl?: string | null | undefined;
|
|
817
|
+
website?: string | null | undefined;
|
|
818
|
+
links?: {
|
|
819
|
+
label: string;
|
|
820
|
+
url: string;
|
|
821
|
+
}[] | undefined;
|
|
822
|
+
createdAt?: Date | undefined;
|
|
823
|
+
bluesky?: {
|
|
824
|
+
handle: string;
|
|
825
|
+
did: string;
|
|
826
|
+
} | undefined;
|
|
827
|
+
stats?: {
|
|
828
|
+
followers: number;
|
|
829
|
+
following: number;
|
|
830
|
+
prompts: number;
|
|
831
|
+
} | undefined;
|
|
832
|
+
badges?: string[] | undefined;
|
|
833
|
+
isVerified?: boolean | undefined;
|
|
834
|
+
}, {
|
|
835
|
+
id: string;
|
|
836
|
+
handle?: string | null | undefined;
|
|
837
|
+
displayName?: string | null | undefined;
|
|
838
|
+
bio?: string | null | undefined;
|
|
839
|
+
avatarUrl?: string | null | undefined;
|
|
840
|
+
website?: string | null | undefined;
|
|
841
|
+
links?: {
|
|
842
|
+
label: string;
|
|
843
|
+
url: string;
|
|
844
|
+
}[] | undefined;
|
|
845
|
+
createdAt?: unknown;
|
|
846
|
+
bluesky?: {
|
|
847
|
+
handle: string;
|
|
848
|
+
did: string;
|
|
849
|
+
} | undefined;
|
|
850
|
+
stats?: {
|
|
851
|
+
followers?: number | undefined;
|
|
852
|
+
following?: number | undefined;
|
|
853
|
+
prompts?: number | undefined;
|
|
854
|
+
} | undefined;
|
|
855
|
+
badges?: string[] | undefined;
|
|
856
|
+
isVerified?: boolean | undefined;
|
|
857
|
+
}>;
|
|
858
|
+
record: z.ZodObject<{
|
|
859
|
+
text: z.ZodString;
|
|
860
|
+
title: z.ZodOptional<z.ZodString>;
|
|
861
|
+
reply: z.ZodOptional<z.ZodObject<{
|
|
862
|
+
root: z.ZodObject<{
|
|
863
|
+
uri: z.ZodString;
|
|
864
|
+
cid: z.ZodString;
|
|
865
|
+
}, "strip", z.ZodTypeAny, {
|
|
866
|
+
uri: string;
|
|
867
|
+
cid: string;
|
|
868
|
+
}, {
|
|
869
|
+
uri: string;
|
|
870
|
+
cid: string;
|
|
871
|
+
}>;
|
|
872
|
+
parent: z.ZodObject<{
|
|
873
|
+
uri: z.ZodString;
|
|
874
|
+
cid: z.ZodString;
|
|
875
|
+
}, "strip", z.ZodTypeAny, {
|
|
876
|
+
uri: string;
|
|
877
|
+
cid: string;
|
|
878
|
+
}, {
|
|
879
|
+
uri: string;
|
|
880
|
+
cid: string;
|
|
881
|
+
}>;
|
|
882
|
+
}, "strip", z.ZodTypeAny, {
|
|
883
|
+
root: {
|
|
884
|
+
uri: string;
|
|
885
|
+
cid: string;
|
|
886
|
+
};
|
|
887
|
+
parent: {
|
|
888
|
+
uri: string;
|
|
889
|
+
cid: string;
|
|
890
|
+
};
|
|
891
|
+
}, {
|
|
892
|
+
root: {
|
|
893
|
+
uri: string;
|
|
894
|
+
cid: string;
|
|
895
|
+
};
|
|
896
|
+
parent: {
|
|
897
|
+
uri: string;
|
|
898
|
+
cid: string;
|
|
899
|
+
};
|
|
900
|
+
}>>;
|
|
901
|
+
langs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
902
|
+
selfLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
903
|
+
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
904
|
+
}, "strip", z.ZodTypeAny, {
|
|
905
|
+
createdAt: Date;
|
|
906
|
+
text: string;
|
|
907
|
+
title?: string | undefined;
|
|
908
|
+
reply?: {
|
|
909
|
+
root: {
|
|
910
|
+
uri: string;
|
|
911
|
+
cid: string;
|
|
912
|
+
};
|
|
913
|
+
parent: {
|
|
914
|
+
uri: string;
|
|
915
|
+
cid: string;
|
|
916
|
+
};
|
|
917
|
+
} | undefined;
|
|
918
|
+
langs?: string[] | undefined;
|
|
919
|
+
selfLabels?: string[] | undefined;
|
|
920
|
+
}, {
|
|
921
|
+
text: string;
|
|
922
|
+
createdAt?: unknown;
|
|
923
|
+
title?: string | undefined;
|
|
924
|
+
reply?: {
|
|
925
|
+
root: {
|
|
926
|
+
uri: string;
|
|
927
|
+
cid: string;
|
|
928
|
+
};
|
|
929
|
+
parent: {
|
|
930
|
+
uri: string;
|
|
931
|
+
cid: string;
|
|
932
|
+
};
|
|
933
|
+
} | undefined;
|
|
934
|
+
langs?: string[] | undefined;
|
|
935
|
+
selfLabels?: string[] | undefined;
|
|
936
|
+
}>;
|
|
937
|
+
/** Hydrated audio embed (signed URL + lifted transcript). */
|
|
938
|
+
embed: z.ZodOptional<z.ZodObject<{
|
|
939
|
+
$type: z.ZodLiteral<"dev.antiphony.embed.audio#view">;
|
|
940
|
+
url: z.ZodString;
|
|
941
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
942
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
943
|
+
waveform: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
944
|
+
/** Lifted from the transcript enrichment record; absent until transcription completes. */
|
|
945
|
+
transcript: z.ZodOptional<z.ZodObject<{
|
|
946
|
+
segments: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
947
|
+
startMs: z.ZodNumber;
|
|
948
|
+
endMs: z.ZodNumber;
|
|
949
|
+
text: z.ZodString;
|
|
950
|
+
}, "strip", z.ZodTypeAny, {
|
|
951
|
+
startMs: number;
|
|
952
|
+
endMs: number;
|
|
953
|
+
text: string;
|
|
954
|
+
}, {
|
|
955
|
+
startMs: number;
|
|
956
|
+
endMs: number;
|
|
957
|
+
text: string;
|
|
958
|
+
}>, {
|
|
959
|
+
startMs: number;
|
|
960
|
+
endMs: number;
|
|
961
|
+
text: string;
|
|
962
|
+
}, {
|
|
963
|
+
startMs: number;
|
|
964
|
+
endMs: number;
|
|
965
|
+
text: string;
|
|
966
|
+
}>, "many">;
|
|
967
|
+
text: z.ZodOptional<z.ZodString>;
|
|
968
|
+
}, "strip", z.ZodTypeAny, {
|
|
969
|
+
segments: {
|
|
970
|
+
startMs: number;
|
|
971
|
+
endMs: number;
|
|
972
|
+
text: string;
|
|
973
|
+
}[];
|
|
974
|
+
text?: string | undefined;
|
|
975
|
+
}, {
|
|
976
|
+
segments: {
|
|
977
|
+
startMs: number;
|
|
978
|
+
endMs: number;
|
|
979
|
+
text: string;
|
|
980
|
+
}[];
|
|
981
|
+
text?: string | undefined;
|
|
982
|
+
}>>;
|
|
983
|
+
}, "strip", z.ZodTypeAny, {
|
|
984
|
+
$type: "dev.antiphony.embed.audio#view";
|
|
985
|
+
url: string;
|
|
986
|
+
durationMs?: number | undefined;
|
|
987
|
+
alt?: string | undefined;
|
|
988
|
+
waveform?: number[] | undefined;
|
|
989
|
+
transcript?: {
|
|
990
|
+
segments: {
|
|
991
|
+
startMs: number;
|
|
992
|
+
endMs: number;
|
|
993
|
+
text: string;
|
|
994
|
+
}[];
|
|
995
|
+
text?: string | undefined;
|
|
996
|
+
} | undefined;
|
|
997
|
+
}, {
|
|
998
|
+
$type: "dev.antiphony.embed.audio#view";
|
|
999
|
+
url: string;
|
|
1000
|
+
durationMs?: number | undefined;
|
|
1001
|
+
alt?: string | undefined;
|
|
1002
|
+
waveform?: number[] | undefined;
|
|
1003
|
+
transcript?: {
|
|
1004
|
+
segments: {
|
|
1005
|
+
startMs: number;
|
|
1006
|
+
endMs: number;
|
|
1007
|
+
text: string;
|
|
1008
|
+
}[];
|
|
1009
|
+
text?: string | undefined;
|
|
1010
|
+
} | undefined;
|
|
1011
|
+
}>>;
|
|
1012
|
+
viewer: z.ZodObject<{
|
|
1013
|
+
/** True when the authenticated caller authored this post. */
|
|
1014
|
+
isAuthor: z.ZodDefault<z.ZodBoolean>;
|
|
1015
|
+
}, "strip", z.ZodTypeAny, {
|
|
1016
|
+
isAuthor: boolean;
|
|
1017
|
+
}, {
|
|
1018
|
+
isAuthor?: boolean | undefined;
|
|
1019
|
+
}>;
|
|
1020
|
+
}, "strip", z.ZodTypeAny, {
|
|
1021
|
+
uri: string;
|
|
1022
|
+
record: {
|
|
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
|
+
};
|
|
1039
|
+
author: {
|
|
1040
|
+
id: string;
|
|
1041
|
+
handle?: string | null | undefined;
|
|
1042
|
+
displayName?: string | null | undefined;
|
|
1043
|
+
bio?: string | null | undefined;
|
|
1044
|
+
avatarUrl?: string | null | undefined;
|
|
1045
|
+
website?: string | null | undefined;
|
|
1046
|
+
links?: {
|
|
1047
|
+
label: string;
|
|
1048
|
+
url: string;
|
|
1049
|
+
}[] | undefined;
|
|
1050
|
+
createdAt?: Date | undefined;
|
|
1051
|
+
bluesky?: {
|
|
1052
|
+
handle: string;
|
|
1053
|
+
did: string;
|
|
1054
|
+
} | undefined;
|
|
1055
|
+
stats?: {
|
|
1056
|
+
followers: number;
|
|
1057
|
+
following: number;
|
|
1058
|
+
prompts: number;
|
|
1059
|
+
} | undefined;
|
|
1060
|
+
badges?: string[] | undefined;
|
|
1061
|
+
isVerified?: boolean | undefined;
|
|
1062
|
+
};
|
|
1063
|
+
kind: "prompt" | "reply";
|
|
1064
|
+
viewer: {
|
|
1065
|
+
isAuthor: boolean;
|
|
1066
|
+
};
|
|
1067
|
+
cid?: string | undefined;
|
|
1068
|
+
embed?: {
|
|
1069
|
+
$type: "dev.antiphony.embed.audio#view";
|
|
1070
|
+
url: string;
|
|
1071
|
+
durationMs?: number | undefined;
|
|
1072
|
+
alt?: string | undefined;
|
|
1073
|
+
waveform?: number[] | undefined;
|
|
1074
|
+
transcript?: {
|
|
1075
|
+
segments: {
|
|
1076
|
+
startMs: number;
|
|
1077
|
+
endMs: number;
|
|
1078
|
+
text: string;
|
|
1079
|
+
}[];
|
|
1080
|
+
text?: string | undefined;
|
|
1081
|
+
} | undefined;
|
|
1082
|
+
} | undefined;
|
|
1083
|
+
}, {
|
|
1084
|
+
uri: string;
|
|
1085
|
+
record: {
|
|
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
|
+
};
|
|
1102
|
+
author: {
|
|
1103
|
+
id: string;
|
|
1104
|
+
handle?: string | null | undefined;
|
|
1105
|
+
displayName?: string | null | undefined;
|
|
1106
|
+
bio?: string | null | undefined;
|
|
1107
|
+
avatarUrl?: string | null | undefined;
|
|
1108
|
+
website?: string | null | undefined;
|
|
1109
|
+
links?: {
|
|
1110
|
+
label: string;
|
|
1111
|
+
url: string;
|
|
1112
|
+
}[] | undefined;
|
|
1113
|
+
createdAt?: unknown;
|
|
1114
|
+
bluesky?: {
|
|
1115
|
+
handle: string;
|
|
1116
|
+
did: string;
|
|
1117
|
+
} | undefined;
|
|
1118
|
+
stats?: {
|
|
1119
|
+
followers?: number | undefined;
|
|
1120
|
+
following?: number | undefined;
|
|
1121
|
+
prompts?: number | undefined;
|
|
1122
|
+
} | undefined;
|
|
1123
|
+
badges?: string[] | undefined;
|
|
1124
|
+
isVerified?: boolean | undefined;
|
|
1125
|
+
};
|
|
1126
|
+
kind: "prompt" | "reply";
|
|
1127
|
+
viewer: {
|
|
1128
|
+
isAuthor?: boolean | undefined;
|
|
1129
|
+
};
|
|
1130
|
+
cid?: string | undefined;
|
|
1131
|
+
embed?: {
|
|
1132
|
+
$type: "dev.antiphony.embed.audio#view";
|
|
1133
|
+
url: string;
|
|
1134
|
+
durationMs?: number | undefined;
|
|
1135
|
+
alt?: string | undefined;
|
|
1136
|
+
waveform?: number[] | undefined;
|
|
1137
|
+
transcript?: {
|
|
1138
|
+
segments: {
|
|
1139
|
+
startMs: number;
|
|
1140
|
+
endMs: number;
|
|
1141
|
+
text: string;
|
|
1142
|
+
}[];
|
|
1143
|
+
text?: string | undefined;
|
|
1144
|
+
} | undefined;
|
|
1145
|
+
} | undefined;
|
|
1146
|
+
}>;
|
|
1147
|
+
type AudioPostView = z.infer<typeof AudioPostViewSchema>;
|
|
1148
|
+
|
|
1149
|
+
export { type ActorProfileRecord, ActorProfileRecordSchema, type AudioEmbed, AudioEmbedSchema, type AudioEmbedView, AudioEmbedViewSchema, type AudioPostRecord, AudioPostRecordSchema, type AudioPostView, AudioPostViewSchema, type PostRecordPublic, PostRecordPublicSchema, type ReplyRef, ReplyRefSchema, type StrongRef, StrongRefSchema, type TimedTranscript, TimedTranscriptSchema, type TranscriptEnrichmentRecord, TranscriptEnrichmentRecordSchema, type TranscriptSegment, TranscriptSegmentSchema, type ViewerState, ViewerStateSchema };
|