@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.
- package/README.md +4 -4
- package/dist/cjs/api-codecs.cjs +90 -787
- package/dist/cjs/api-codecs.d.cts +117 -290
- package/dist/cjs/index.cjs +102 -947
- package/dist/cjs/index.d.cts +89 -7
- package/dist/cjs/nsid.cjs +8 -18
- package/dist/cjs/nsid.d.cts +8 -17
- package/dist/cjs/types/audio.cjs +77 -662
- package/dist/cjs/types/audio.d.cts +285 -203
- package/dist/cjs/types/blob.cjs +5 -9
- package/dist/cjs/types/blob.d.cts +21 -21
- package/dist/cjs/types/records.cjs +0 -370
- package/dist/cjs/types/records.d.cts +1 -825
- package/dist/esm/api-codecs.d.ts +117 -290
- package/dist/esm/api-codecs.js +5 -6
- package/dist/esm/{chunk-ORMEWXMH.js → chunk-5JBD5THX.js} +1 -16
- package/dist/esm/{chunk-F2CANZZ7.js → chunk-BNNLHRH7.js} +1 -1
- package/dist/esm/chunk-D655OH2I.js +35 -0
- package/dist/esm/chunk-RUUHUNZ6.js +37 -0
- package/dist/esm/chunk-SBYNIQRZ.js +23 -0
- package/dist/esm/chunk-SMK4OZNU.js +17 -0
- package/dist/esm/{chunk-BUNMR4ZO.js → chunk-WL2GSPGC.js} +81 -12
- package/dist/esm/errors/index.js +1 -1
- package/dist/esm/index.d.ts +89 -7
- package/dist/esm/index.js +7 -9
- package/dist/esm/nsid.d.ts +8 -17
- 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/audio.d.ts +285 -203
- package/dist/esm/types/audio.js +4 -5
- package/dist/esm/types/blob.d.ts +21 -21
- package/dist/esm/types/blob.js +2 -2
- package/dist/esm/types/records.d.ts +1 -825
- package/dist/esm/types/records.js +2 -3
- package/dist/esm/utils/index.js +1 -1
- package/package.json +90 -26
- package/dist/cjs/types/api.cjs +0 -726
- package/dist/cjs/types/api.d.cts +0 -494
- 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/cjs/types/views.cjs +0 -820
- package/dist/cjs/types/views.d.cts +0 -9806
- package/dist/esm/chunk-3WZJXJNU.js +0 -378
- package/dist/esm/chunk-5EHV73BA.js +0 -20
- 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/chunk-XDBKR6LW.js +0 -32
- package/dist/esm/types/api.d.ts +0 -494
- package/dist/esm/types/api.js +0 -5
- 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
- package/dist/esm/types/views.d.ts +0 -9806
- package/dist/esm/types/views.js +0 -4
package/dist/esm/types/audio.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { ActorProfileRecordSchema, AudioEmbedSchema, AudioEmbedViewSchema, AudioPostRecordSchema, AudioPostViewSchema, PostRecordPublicSchema, ReplyRefSchema, StrongRefSchema, TimedTranscriptSchema, TranscriptEnrichmentRecordSchema, TranscriptSegmentSchema, ViewerStateSchema } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-ORMEWXMH.js';
|
|
1
|
+
export { ActorProfileRecordSchema, AudioEmbedSchema, AudioEmbedViewSchema, AudioPostRecordSchema, AudioPostViewSchema, PostRecordPublicSchema, ReplyRefSchema, StrongRefSchema, TimedTranscriptSchema, TranscriptEnrichmentRecordSchema, TranscriptSegmentSchema, ViewerStateSchema } from '../chunk-WL2GSPGC.js';
|
|
2
|
+
import '../chunk-D655OH2I.js';
|
|
3
|
+
import '../chunk-SMK4OZNU.js';
|
|
4
|
+
import '../chunk-5JBD5THX.js';
|
package/dist/esm/types/blob.d.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* AT Protocol Blob Reference
|
|
4
|
+
* AT Protocol Blob Reference — the canonical atproto JSON shape:
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* outside the record itself. This aligns with AT Protocol's blob handling
|
|
8
|
-
* where binary data is stored in the PDS blob store with a CID reference.
|
|
6
|
+
* { "$type": "blob", "ref": { "$link": "<cid>" }, "mimeType", "size" }
|
|
9
7
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* `ref.$link` is a REAL content CID (CIDv1, raw codec, sha2-256 over the
|
|
9
|
+
* blob bytes), computed at upload time. Storage location is derived from the
|
|
10
|
+
* CID (`blobs/{originAppId}/{cid}`), never stored on the record — records
|
|
11
|
+
* carry content addresses, not provider URLs, so they stay portable.
|
|
12
12
|
*/
|
|
13
13
|
declare const BlobRefSchema: z.ZodObject<{
|
|
14
14
|
/** Discriminator for AT Protocol type system */
|
|
15
15
|
$type: z.ZodLiteral<"blob">;
|
|
16
|
-
/**
|
|
17
|
-
ref: z.
|
|
16
|
+
/** IPLD link to the blob bytes: the content CID. */
|
|
17
|
+
ref: z.ZodObject<{
|
|
18
|
+
$link: z.ZodString;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
$link: string;
|
|
21
|
+
}, {
|
|
22
|
+
$link: string;
|
|
23
|
+
}>;
|
|
18
24
|
/** MIME type of the blob (e.g., 'audio/webm') */
|
|
19
25
|
mimeType: z.ZodString;
|
|
20
26
|
/** Size of the blob in bytes */
|
|
21
27
|
size: z.ZodNumber;
|
|
22
28
|
}, "strip", z.ZodTypeAny, {
|
|
23
29
|
$type: "blob";
|
|
24
|
-
ref:
|
|
30
|
+
ref: {
|
|
31
|
+
$link: string;
|
|
32
|
+
};
|
|
25
33
|
mimeType: string;
|
|
26
34
|
size: number;
|
|
27
35
|
}, {
|
|
28
36
|
$type: "blob";
|
|
29
|
-
ref:
|
|
37
|
+
ref: {
|
|
38
|
+
$link: string;
|
|
39
|
+
};
|
|
30
40
|
mimeType: string;
|
|
31
41
|
size: number;
|
|
32
42
|
}>;
|
|
33
43
|
type BlobRef = z.infer<typeof BlobRefSchema>;
|
|
34
|
-
/**
|
|
35
|
-
* Resolve the audio URL from a record that may have either `audio` (BlobRef)
|
|
36
|
-
* or `audioUrl` (legacy string) field.
|
|
37
|
-
*
|
|
38
|
-
* Prefers BlobRef.ref if present, falls back to audioUrl.
|
|
39
|
-
*/
|
|
40
|
-
declare function resolveAudioUrl(record: {
|
|
41
|
-
audio?: BlobRef;
|
|
42
|
-
audioUrl?: string;
|
|
43
|
-
}): string | undefined;
|
|
44
44
|
|
|
45
|
-
export { type BlobRef, BlobRefSchema
|
|
45
|
+
export { type BlobRef, BlobRefSchema };
|
package/dist/esm/types/blob.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BlobRefSchema
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { BlobRefSchema } from '../chunk-SMK4OZNU.js';
|
|
2
|
+
import '../chunk-5JBD5THX.js';
|