From 921d16da9ac0391203401aa2cf5f65cf56a8bb6b Mon Sep 17 00:00:00 2001 From: Davi Rodrigues <30713947+daviirodrig@users.noreply.github.com> Date: Wed, 3 Dec 2025 01:18:28 -0300 Subject: [PATCH] some fixes for sounds (#52) * url * add .dockerignore * hydration thing * refactor routes to hydration ctx thing * consistancy (problem was present from before this pr) * use new lexgen, fix lint and check errs --------- Co-authored-by: Roscoe Rubin-Rottenberg --- .dockerignore | 5 + api/so/sprk/sound/getActorAudios.ts | 265 ++++---- api/so/sprk/sound/getAudioPosts.ts | 269 ++++---- api/so/sprk/sound/getAudios.ts | 238 +++---- api/so/sprk/sound/getTrendingAudios.ts | 167 +++-- deno.json | 2 +- hydration/index.ts | 10 + lex/index.ts | 586 +++++++++--------- lex/lexicons.ts | 5 + lex/types/app/bsky/actor/defs.ts | 3 +- lex/types/app/bsky/actor/profile.ts | 7 +- lex/types/app/bsky/actor/status.ts | 5 +- lex/types/app/bsky/ageassurance/defs.ts | 3 +- lex/types/app/bsky/bookmark/defs.ts | 3 +- lex/types/app/bsky/embed/external.ts | 2 +- lex/types/app/bsky/embed/images.ts | 2 +- lex/types/app/bsky/embed/record.ts | 3 +- lex/types/app/bsky/embed/recordWithMedia.ts | 3 +- lex/types/app/bsky/embed/video.ts | 2 +- lex/types/app/bsky/feed/defs.ts | 3 +- lex/types/app/bsky/feed/generator.ts | 7 +- lex/types/app/bsky/feed/getPostThread.ts | 2 +- lex/types/app/bsky/feed/like.ts | 2 + lex/types/app/bsky/feed/post.ts | 5 +- lex/types/app/bsky/feed/postgate.ts | 5 +- lex/types/app/bsky/feed/repost.ts | 2 + lex/types/app/bsky/feed/threadgate.ts | 5 +- lex/types/app/bsky/graph/block.ts | 2 + lex/types/app/bsky/graph/follow.ts | 2 + lex/types/app/bsky/graph/getRelationships.ts | 2 +- lex/types/app/bsky/graph/list.ts | 7 +- lex/types/app/bsky/graph/listblock.ts | 2 + lex/types/app/bsky/graph/listitem.ts | 2 + lex/types/app/bsky/graph/starterpack.ts | 2 + lex/types/app/bsky/graph/verification.ts | 2 + lex/types/app/bsky/labeler/getServices.ts | 2 +- lex/types/app/bsky/labeler/service.ts | 5 +- .../app/bsky/notification/declaration.ts | 2 + lex/types/app/bsky/richtext/facet.ts | 3 +- .../bsky/unspecced/getPostThreadOtherV2.ts | 3 +- .../app/bsky/unspecced/getPostThreadV2.ts | 3 +- lex/types/app/bsky/video/defs.ts | 2 +- lex/types/app/bsky/video/uploadVideo.ts | 3 +- lex/types/chat/bsky/actor/declaration.ts | 2 + .../chat/bsky/actor/exportAccountData.ts | 4 +- lex/types/chat/bsky/convo/defs.ts | 3 +- lex/types/chat/bsky/convo/getLog.ts | 2 +- lex/types/chat/bsky/convo/getMessages.ts | 2 +- .../chat/bsky/moderation/getMessageContext.ts | 2 +- .../com/atproto/admin/getSubjectStatus.ts | 2 +- .../com/atproto/admin/updateSubjectStatus.ts | 2 +- .../com/atproto/label/subscribeLabels.ts | 5 +- lex/types/com/atproto/lexicon/schema.ts | 2 + .../com/atproto/moderation/createReport.ts | 3 +- lex/types/com/atproto/repo/applyWrites.ts | 3 +- lex/types/com/atproto/repo/importRepo.ts | 4 +- lex/types/com/atproto/repo/uploadBlob.ts | 5 +- lex/types/com/atproto/sync/defs.ts | 2 - lex/types/com/atproto/sync/getBlob.ts | 4 +- lex/types/com/atproto/sync/getBlocks.ts | 4 +- lex/types/com/atproto/sync/getCheckout.ts | 4 +- lex/types/com/atproto/sync/getRecord.ts | 4 +- lex/types/com/atproto/sync/getRepo.ts | 4 +- lex/types/com/atproto/sync/subscribeRepos.ts | 7 +- .../atproto/temp/checkHandleAvailability.ts | 3 +- lex/types/so/sprk/actor/defs.ts | 3 +- lex/types/so/sprk/actor/profile.ts | 7 +- lex/types/so/sprk/feed/defs.ts | 3 +- lex/types/so/sprk/feed/generator.ts | 7 +- lex/types/so/sprk/feed/getPostThread.ts | 3 +- lex/types/so/sprk/feed/like.ts | 2 + lex/types/so/sprk/feed/post.ts | 5 +- lex/types/so/sprk/feed/postgate.ts | 5 +- lex/types/so/sprk/feed/reply.ts | 5 +- lex/types/so/sprk/feed/repost.ts | 2 + lex/types/so/sprk/feed/threadgate.ts | 5 +- lex/types/so/sprk/graph/block.ts | 2 + lex/types/so/sprk/graph/follow.ts | 2 + lex/types/so/sprk/graph/getRelationships.ts | 2 +- lex/types/so/sprk/labeler/getServices.ts | 2 +- lex/types/so/sprk/labeler/service.ts | 5 +- lex/types/so/sprk/media/image.ts | 2 +- lex/types/so/sprk/media/video.ts | 2 +- lex/types/so/sprk/richtext/facet.ts | 3 +- lex/types/so/sprk/sound/audio.ts | 7 +- lex/types/so/sprk/sound/defs.ts | 1 + lex/types/so/sprk/story/defs.ts | 3 +- lex/types/so/sprk/story/post.ts | 5 +- lex/types/so/sprk/video/defs.ts | 2 +- lex/types/so/sprk/video/uploadVideo.ts | 3 +- .../tools/ozone/hosting/getAccountHistory.ts | 3 +- lex/types/tools/ozone/moderation/defs.ts | 3 +- lex/types/tools/ozone/moderation/emitEvent.ts | 2 +- .../tools/ozone/moderation/getRecords.ts | 2 +- lex/types/tools/ozone/moderation/getRepos.ts | 2 +- .../ozone/moderation/listScheduledActions.ts | 2 +- .../tools/ozone/moderation/scheduleAction.ts | 3 +- lex/types/tools/ozone/safelink/queryEvents.ts | 4 +- lex/types/tools/ozone/safelink/queryRules.ts | 4 +- lex/types/tools/ozone/verification/defs.ts | 3 +- lex/util.ts | 2 +- lexicons/so/sprk/sound/defs.json | 3 +- utils/audio-transformer.ts | 108 ---- utils/media-transformer.ts | 116 ---- utils/post-transformer.ts | 154 ----- utils/story-transformer.ts | 91 --- views/index.ts | 72 ++- 107 files changed, 1013 insertions(+), 1377 deletions(-) create mode 100644 .dockerignore delete mode 100644 utils/audio-transformer.ts delete mode 100644 utils/media-transformer.ts delete mode 100644 utils/post-transformer.ts delete mode 100644 utils/story-transformer.ts diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9ec2198 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +devdb/ +.git +.github +.vscode +.env diff --git a/api/so/sprk/sound/getActorAudios.ts b/api/so/sprk/sound/getActorAudios.ts index 1c99a99..d42d1e8 100644 --- a/api/so/sprk/sound/getActorAudios.ts +++ b/api/so/sprk/sound/getActorAudios.ts @@ -1,7 +1,135 @@ -import { Server } from "../../../../lex/index.ts"; -import { AppContext } from "../../../../context.ts"; -import { transformAudiosToAudioViews } from "../../../../utils/audio-transformer.ts"; +import { mapDefined } from "@atp/common"; import { decodeBase64, encodeBase64 } from "@std/encoding"; +import { AppContext } from "../../../../context.ts"; +import { + HydrateCtx, + HydrationState, + Hydrator, +} from "../../../../hydration/index.ts"; +import { Server } from "../../../../lex/index.ts"; +import { QueryParams } from "../../../../lex/types/so/sprk/sound/getActorAudios.ts"; +import { createPipeline } from "../../../../pipeline.ts"; +import { uriToDid as creatorFromUri } from "../../../../utils/uris.ts"; +import { Views } from "../../../../views/index.ts"; +import { resHeaders } from "../../../util.ts"; +import { InvalidRequestError } from "@atp/xrpc-server"; + +export default function (server: Server, ctx: AppContext) { + const getActorAudios = createPipeline( + skeleton, + hydration, + noBlocks, + presentation, + ); + server.so.sprk.sound.getActorAudios({ + auth: ctx.authVerifier.standardOptional, + handler: async ({ params, auth }) => { + const viewer = auth.credentials.type === "standard" + ? auth.credentials.iss + : undefined; + const hydrateCtx = ctx.hydrator.createContext({ viewer: viewer ?? null }); + + const results = await getActorAudios({ ...params, hydrateCtx }, ctx); + + return { + encoding: "application/json", + body: results, + headers: resHeaders({}), + }; + }, + }); +} + +const skeleton = async (inputs: { + ctx: AppContext; + params: Params; +}) => { + const { ctx, params } = inputs; + const { actor, limit = 50, cursor } = params; + + // Resolve handle to DID + let actorDid = actor; + if (!actor.startsWith("did:")) { + try { + const didDoc = await ctx.idResolver.did.resolveAtprotoData(actor); + actorDid = didDoc.did; + } catch { + throw new InvalidRequestError("Could not resolve actor handle"); + } + } + + // Parse cursor + let cursorData: CursorData | undefined; + if (cursor) { + try { + cursorData = parseCursor(cursor); + } catch { + throw new InvalidRequestError("The provided cursor is invalid"); + } + } + + // Build query + const query: Record = { authorDid: actorDid }; + if (cursorData) { + query.$or = [ + { createdAt: { $lt: cursorData.createdAt } }, + { createdAt: cursorData.createdAt, _id: { $lt: cursorData.id } }, + ]; + } + + const audios = await ctx.db.models.Audio.find(query) + .sort({ createdAt: -1, _id: -1 }) + .limit(limit + 1); + + const hasMore = audios.length > limit; + if (hasMore) audios.pop(); + + const uris = audios.map((a) => a.uri); + + let nextCursor: string | undefined; + if (hasMore && audios.length > 0) { + const last = audios[audios.length - 1]; + nextCursor = generateCursor(String(last.createdAt), String(last._id)); + } + + return { audios: uris, cursor: nextCursor }; +}; + +const hydration = (inputs: { + ctx: Context; + params: Params; + skeleton: Skeleton; +}) => { + const { ctx, params, skeleton } = inputs; + return ctx.hydrator.hydrateSounds(skeleton.audios, params.hydrateCtx); +}; + +const noBlocks = (inputs: { + ctx: Context; + skeleton: Skeleton; + hydration: HydrationState; +}) => { + const { ctx, skeleton, hydration } = inputs; + skeleton.audios = skeleton.audios.filter((uri) => { + const creator = creatorFromUri(uri); + return !ctx.views.viewerBlockExists(creator, hydration); + }); + return skeleton; +}; + +const presentation = (inputs: { + ctx: Context; + params: Params; + skeleton: Skeleton; + hydration: HydrationState; +}) => { + const { ctx, skeleton, hydration } = inputs; + const audios = mapDefined( + skeleton.audios, + (uri) => ctx.views.soundView(uri, hydration), + ); + return { audios, cursor: skeleton.cursor }; +}; interface CursorData { createdAt: string; @@ -9,123 +137,26 @@ interface CursorData { } function parseCursor(cursor: string): CursorData { - try { - const decoded = new TextDecoder().decode(decodeBase64(cursor)); - const [createdAt, id] = decoded.split("::"); - if (!createdAt || !id) throw new Error("Invalid cursor format"); - return { createdAt, id }; - } catch { - throw new Error("Invalid cursor format"); - } + const decoded = new TextDecoder().decode(decodeBase64(cursor)); + const [createdAt, id] = decoded.split("::"); + if (!createdAt || !id) throw new Error("Invalid cursor format"); + return { createdAt, id }; } function generateCursor(createdAt: string, id: string): string { return encodeBase64(new TextEncoder().encode(`${createdAt}::${id}`)); } -export default function (server: Server, ctx: AppContext) { - server.so.sprk.sound.getActorAudios({ - auth: ctx.authVerifier.standardOptional, - handler: async ({ params, auth }) => { - try { - const { actor, limit = 50, cursor } = params; - const userDid = auth.credentials.type === "standard" - ? auth.credentials.iss - : undefined; - - // Resolve handle to DID if necessary - let actorDid = actor; - if (!actor.startsWith("did:")) { - try { - const didDoc = await ctx.idResolver.did.resolveAtprotoData(actor); - actorDid = didDoc.did; - } catch (err) { - console.error("Failed to resolve handle:", err); - return { status: 400, message: "Could not resolve actor handle" }; - } - } - - // Block checks when authed - if (userDid) { - const [blockedByActor, blockingActor] = await Promise.all([ - ctx.db.models.Block.findOne({ - authorDid: actorDid, - subject: userDid, - }).lean(), - ctx.db.models.Block.findOne({ - authorDid: userDid, - subject: actorDid, - }).lean(), - ]); - if (blockedByActor) { - return { - status: 400, - error: "BlockedByActor" as const, - message: "The requesting account is blocked by the actor", - }; - } - if (blockingActor) { - return { - status: 400, - error: "BlockedActor" as const, - message: "The requesting account has blocked the actor", - }; - } - } - - // Parse cursor - let cursorData: CursorData | undefined; - if (cursor) { - try { - cursorData = parseCursor(cursor); - } catch { - return { status: 400, message: "The provided cursor is invalid" }; - } - } - - // Build query with keyset pagination - const query: Record = { authorDid: actorDid }; - if (cursorData) { - query.$or = [ - { createdAt: { $lt: cursorData.createdAt } }, - { createdAt: cursorData.createdAt, _id: { $lt: cursorData.id } }, - ]; - } - - const audios = await ctx.db.models.Audio.find(query) - .sort({ createdAt: -1, _id: -1 }) - .limit(limit + 1); - - const hasMore = audios.length > limit; - if (hasMore) audios.pop(); - - const audioViews = await transformAudiosToAudioViews(audios, ctx); - - let nextCursor: string | undefined; - if (hasMore && audios.length > 0) { - const last = audios[audios.length - 1]; - nextCursor = generateCursor(String(last.createdAt), String(last._id)); - } - - const body = { - audios: audioViews, - ...(nextCursor ? { cursor: nextCursor } : {}), - }; - - return { encoding: "application/json", body }; - } catch (error) { - console.error("Unexpected error in getActorAudios:", error); - if (error instanceof Error) { - const msg = error.message.toLowerCase(); - if (msg.includes("cursor")) { - return { status: 400, message: "The provided cursor is invalid" }; - } - if (msg.includes("limit")) { - return { status: 400, message: "Limit must be between 1 and 100" }; - } - } - return { status: 500, message: "Internal server error" }; - } - }, - }); -} +type Context = { + db: AppContext["db"]; + idResolver: AppContext["idResolver"]; + hydrator: Hydrator; + views: Views; +}; + +type Params = QueryParams & { hydrateCtx: HydrateCtx }; + +type Skeleton = { + audios: string[]; + cursor?: string; +}; diff --git a/api/so/sprk/sound/getAudioPosts.ts b/api/so/sprk/sound/getAudioPosts.ts index 5aa97e0..bbe450a 100644 --- a/api/so/sprk/sound/getAudioPosts.ts +++ b/api/so/sprk/sound/getAudioPosts.ts @@ -1,121 +1,180 @@ -import { Server } from "../../../../lex/index.ts"; -import { AppContext } from "../../../../context.ts"; -import { transformPostsToPostViews } from "../../../../utils/post-transformer.ts"; +import { mapDefined } from "@atp/common"; import { decodeBase64, encodeBase64 } from "@std/encoding"; -import { transformAudioToAudioView } from "../../../../utils/audio-transformer.ts"; +import { AppContext } from "../../../../context.ts"; +import { + HydrateCtx, + HydrationState, + Hydrator, + mergeManyStates, +} from "../../../../hydration/index.ts"; +import { Server } from "../../../../lex/index.ts"; +import { QueryParams } from "../../../../lex/types/so/sprk/sound/getAudioPosts.ts"; +import { createPipeline } from "../../../../pipeline.ts"; +import { uriToDid as creatorFromUri } from "../../../../utils/uris.ts"; +import { Views } from "../../../../views/index.ts"; +import { resHeaders } from "../../../util.ts"; +import { InvalidRequestError } from "@atp/xrpc-server"; import { RootFilterQuery } from "mongoose"; import { PostDocument } from "../../../../data-plane/db/models.ts"; +export default function (server: Server, ctx: AppContext) { + const getAudioPosts = createPipeline( + skeleton, + hydration, + noBlocks, + presentation, + ); + server.so.sprk.sound.getAudioPosts({ + auth: ctx.authVerifier.standardOptional, + handler: async ({ params, auth }) => { + const viewer = auth.credentials.type === "standard" + ? auth.credentials.iss + : undefined; + const hydrateCtx = ctx.hydrator.createContext({ viewer: viewer ?? null }); + + const results = await getAudioPosts({ ...params, hydrateCtx }, ctx); + + return { + encoding: "application/json", + body: results, + headers: resHeaders({}), + }; + }, + }); +} + +const skeleton = async (inputs: { + ctx: AppContext; + params: Params; +}) => { + const { ctx, params } = inputs; + const { uri, limit = 50, cursor } = params; + + const dbAudio = await ctx.db.models.Audio.findOne({ + uri: uri, + }).exec(); + + if (!dbAudio) { + throw new InvalidRequestError("Audio not found", "NotFound"); + } + + let cursorData: CursorData | undefined; + if (cursor) { + try { + cursorData = parseCursor(cursor); + } catch { + throw new InvalidRequestError("The provided cursor is invalid"); + } + } + + const query: RootFilterQuery = { + "sound.uri": uri, + reply: null, + }; + + if (cursorData) { + query.$or = [ + { createdAt: { $lt: cursorData.createdAt } }, + { createdAt: cursorData.createdAt, _id: { $lt: cursorData.id } }, + ]; + } + + const posts = await ctx.db.models.Post + .find(query) + .sort({ createdAt: -1, _id: -1 }) + .limit(limit + 1); + + const hasMore = posts.length > limit; + if (hasMore) posts.pop(); + + const postUris = posts.map((p) => p.uri); + + let nextCursor: string | undefined; + if (hasMore && posts.length > 0) { + const last = posts[posts.length - 1]; + nextCursor = generateCursor(String(last.createdAt), String(last._id)); + } + + return { posts: postUris, audioUri: uri, cursor: nextCursor }; +}; + +const hydration = async (inputs: { + ctx: Context; + params: Params; + skeleton: Skeleton; +}) => { + const { ctx, params, skeleton } = inputs; + const [postState, soundState] = await Promise.all([ + ctx.hydrator.hydratePosts( + skeleton.posts.map((uri) => ({ uri })), + params.hydrateCtx, + ), + ctx.hydrator.hydrateSounds([skeleton.audioUri], params.hydrateCtx), + ]); + return mergeManyStates(postState, soundState); +}; + +const noBlocks = (inputs: { + ctx: Context; + skeleton: Skeleton; + hydration: HydrationState; +}) => { + const { ctx, skeleton, hydration } = inputs; + skeleton.posts = skeleton.posts.filter((uri) => { + const creator = creatorFromUri(uri); + return !ctx.views.viewerBlockExists(creator, hydration); + }); + return skeleton; +}; + +const presentation = (inputs: { + ctx: Context; + params: Params; + skeleton: Skeleton; + hydration: HydrationState; +}) => { + const { ctx, skeleton, hydration } = inputs; + const posts = mapDefined( + skeleton.posts, + (uri) => ctx.views.post(uri, hydration), + ); + const audio = ctx.views.soundView(skeleton.audioUri, hydration); + + // If audio hydration failed, return stub or empty? + // The schema likely requires the audio field. + // If hydration fails, soundView returns undefined. + // We should probably handle this, but since we checked existence in skeleton, it implies DB record exists. + // Views handles it. + + return { audio: audio!, posts, cursor: skeleton.cursor }; +}; + interface CursorData { createdAt: string; id: string; } function parseCursor(cursor: string): CursorData { - try { - const decoded = new TextDecoder().decode(decodeBase64(cursor)); - const [createdAt, id] = decoded.split("::"); - if (!createdAt || !id) throw new Error("Invalid cursor format"); - return { createdAt, id }; - } catch { - throw new Error("Invalid cursor format"); - } + const decoded = new TextDecoder().decode(decodeBase64(cursor)); + const [createdAt, id] = decoded.split("::"); + if (!createdAt || !id) throw new Error("Invalid cursor format"); + return { createdAt, id }; } function generateCursor(createdAt: string, id: string): string { return encodeBase64(new TextEncoder().encode(`${createdAt}::${id}`)); } -export default function (server: Server, ctx: AppContext) { - server.so.sprk.sound.getAudioPosts({ - auth: ctx.authVerifier.standardOptional, - handler: async ({ params, auth }) => { - try { - const { uri, limit = 50, cursor } = params; - const userDid = auth.credentials.type === "standard" - ? auth.credentials.iss - : undefined; - - let cursorData: CursorData | undefined; - if (cursor) { - try { - cursorData = parseCursor(cursor); - } catch { - return { status: 400, message: "The provided cursor is invalid" }; - } - } - - const dbAudio = await ctx.db.models.Audio.findOne({ - uri: uri, - }) - .exec(); - - if (!dbAudio) { - return { status: 404, message: "Audio not found" }; - } - - const audioView = await transformAudioToAudioView(dbAudio, ctx); - - const query: RootFilterQuery = { - "sound.uri": uri, - reply: null, - }; - - if (cursorData) { - query.$or = [ - { createdAt: { $lt: cursorData.createdAt } }, - { createdAt: cursorData.createdAt, _id: { $lt: cursorData.id } }, - ]; - } - - const posts = await ctx.db.models.Post - .find(query) - .sort({ createdAt: -1, _id: -1 }) - .limit(limit + 1); - - const hasMore = posts.length > limit; - if (hasMore) posts.pop(); - - // Block relationships: filter out posts by authors blocked by or blocking user - if (userDid && posts.length > 0) { - const authorDids = [...new Set(posts.map((p) => p.authorDid))]; - const [userBlocking, userBlocked] = await Promise.all([ - ctx.db.models.Block.find({ - authorDid: userDid, - subject: { $in: authorDids }, - }), - ctx.db.models.Block.find({ - authorDid: { $in: authorDids }, - subject: userDid, - }), - ]); - const blockedAuthorDids = new Set([ - ...userBlocking.map((b) => b.subject), - ...userBlocked.map((b) => b.authorDid), - ]); - for (let i = posts.length - 1; i >= 0; i--) { - if (blockedAuthorDids.has(posts[i].authorDid)) posts.splice(i, 1); - } - } - - const postViews = await transformPostsToPostViews(posts, ctx, userDid); - - let nextCursor: string | undefined; - if (hasMore && posts.length > 0) { - const last = posts[posts.length - 1]; - nextCursor = generateCursor(String(last.createdAt), String(last._id)); - } - - const body = { - audio: audioView, - posts: postViews, - ...(nextCursor ? { cursor: nextCursor } : {}), - }; - return { encoding: "application/json", body }; - } catch (error) { - console.error("Unexpected error in getAudioPosts:", error); - return { status: 500, message: "Internal server error" }; - } - }, - }); -} +type Context = { + db: AppContext["db"]; + hydrator: Hydrator; + views: Views; +}; + +type Params = QueryParams & { hydrateCtx: HydrateCtx }; + +type Skeleton = { + posts: string[]; + audioUri: string; + cursor?: string; +}; diff --git a/api/so/sprk/sound/getAudios.ts b/api/so/sprk/sound/getAudios.ts index f303dbe..2303517 100644 --- a/api/so/sprk/sound/getAudios.ts +++ b/api/so/sprk/sound/getAudios.ts @@ -1,170 +1,88 @@ -import { Server } from "../../../../lex/index.ts"; +import { dedupeStrs, mapDefined } from "@atp/common"; import { AppContext } from "../../../../context.ts"; -import { transformAudiosToAudioViews } from "../../../../utils/audio-transformer.ts"; -import { AudioDocument } from "../../../../data-plane/db/models.ts"; - -// Constants -const MAX_URI_LENGTH = 3000; - -// Helper function to validate URIs -function validateUris(uris: string[]): { valid: string[]; invalid: string[] } { - const valid: string[] = []; - const invalid: string[] = []; - - for (const uri of uris) { - if (typeof uri !== "string" || uri.length === 0) { - invalid.push(uri); - continue; - } - - if (uri.length > MAX_URI_LENGTH) { - invalid.push(uri); - continue; - } - - if (!uri.startsWith("at://")) { - invalid.push(uri); - continue; - } - - valid.push(uri); - } - - return { valid, invalid }; -} - -// Helper function to deduplicate URIs while preserving order -function deduplicateUris(uris: string[]): string[] { - const seen = new Set(); - return uris.filter((uri) => { - if (seen.has(uri)) return false; - seen.add(uri); - return true; - }); -} - -// Helper function to check for blocked relationships -async function checkBlockedAudios( - ctx: AppContext, - audios: AudioDocument[], - userDid?: string, -): Promise> { - if (!userDid || audios.length === 0) return new Set(); - - const authorDids = [...new Set(audios.map((a) => a.authorDid))]; - - const [userBlocking, userBlocked] = await Promise.all([ - ctx.db.models.Block.find({ - authorDid: userDid, - subject: { $in: authorDids }, - }).lean(), - ctx.db.models.Block.find({ - authorDid: { $in: authorDids }, - subject: userDid, - }).lean(), - ]); - - const blockedAuthorDids = new Set([ - ...userBlocking.map((b) => b.subject), - ...userBlocked.map((b) => b.authorDid), - ]); - - return new Set( - audios.filter((a) => blockedAuthorDids.has(a.authorDid)).map((a) => a.uri), - ); -} - -// Helper function to sort audios by original URI order -function sortAudiosByUriOrder( - audios: AudioDocument[], - originalUris: string[], -): AudioDocument[] { - const map = new Map(audios.map((a) => [a.uri, a] as const)); - const sorted: AudioDocument[] = []; - for (const uri of originalUris) { - const audio = map.get(uri); - if (audio) sorted.push(audio); - } - return sorted; -} +import { + HydrateCtx, + HydrationState, + Hydrator, +} from "../../../../hydration/index.ts"; +import { Server } from "../../../../lex/index.ts"; +import { QueryParams } from "../../../../lex/types/so/sprk/sound/getAudios.ts"; +import { createPipeline } from "../../../../pipeline.ts"; +import { uriToDid as creatorFromUri } from "../../../../utils/uris.ts"; +import { Views } from "../../../../views/index.ts"; +import { resHeaders } from "../../../util.ts"; export default function (server: Server, ctx: AppContext) { + const getAudios = createPipeline(skeleton, hydration, noBlocks, presentation); server.so.sprk.sound.getAudios({ auth: ctx.authVerifier.standardOptional, handler: async ({ params, auth }) => { - try { - const { uris } = params; - const userDid = auth.credentials.type === "standard" - ? auth.credentials.iss - : undefined; - - const { valid: validUris, invalid: invalidUris } = validateUris( - uris, - ); - if (invalidUris.length > 0) { - console.warn( - `Invalid URIs provided: ${invalidUris.slice(0, 5).join(", ")}${ - invalidUris.length > 5 ? "..." : "" - }`, - ); - } - if (validUris.length === 0) { - return { - encoding: "application/json", - body: { audios: [] }, - }; - } - - const uniqueUris = deduplicateUris(validUris); - - const dbAudios = await ctx.db.models.Audio.find({ - uri: { $in: uniqueUris }, - }) - .exec(); + const viewer = auth.credentials.type === "standard" + ? auth.credentials.iss + : undefined; + const hydrateCtx = ctx.hydrator.createContext({ viewer: viewer ?? null }); + + const results = await getAudios({ ...params, hydrateCtx }, ctx); + + return { + encoding: "application/json", + body: results, + headers: resHeaders({}), + }; + }, + }); +} - if (dbAudios.length === 0) { - return { - encoding: "application/json", - body: { audios: [] }, - }; - } +const skeleton = (inputs: { params: Params }) => { + return { audios: dedupeStrs(inputs.params.uris) }; +}; + +const hydration = (inputs: { + ctx: Context; + params: Params; + skeleton: Skeleton; +}) => { + const { ctx, params, skeleton } = inputs; + return ctx.hydrator.hydrateSounds( + skeleton.audios, + params.hydrateCtx, + ); +}; + +const noBlocks = (inputs: { + ctx: Context; + skeleton: Skeleton; + hydration: HydrationState; +}) => { + const { ctx, skeleton, hydration } = inputs; + skeleton.audios = skeleton.audios.filter((uri) => { + const creator = creatorFromUri(uri); + return !ctx.views.viewerBlockExists(creator, hydration); + }); + return skeleton; +}; + +const presentation = (inputs: { + ctx: Context; + params: Params; + skeleton: Skeleton; + hydration: HydrationState; +}) => { + const { ctx, skeleton, hydration } = inputs; + const audios = mapDefined( + skeleton.audios, + (uri) => ctx.views.soundView(uri, hydration), + ); + return { audios }; +}; - const blockedAudioUris = await checkBlockedAudios( - ctx, - dbAudios, - userDid, - ); - const accessibleAudios = dbAudios.filter((a) => - !blockedAudioUris.has(a.uri) - ); - if (accessibleAudios.length === 0) { - return { - encoding: "application/json", - body: { audios: [] }, - }; - } +type Context = { + hydrator: Hydrator; + views: Views; +}; - const sorted = sortAudiosByUriOrder(accessibleAudios, uniqueUris); - const views = await transformAudiosToAudioViews(sorted, ctx); +type Params = QueryParams & { hydrateCtx: HydrateCtx }; - const response = { audios: views }; - return { encoding: "application/json", body: response }; - } catch (error) { - console.error("Error in getAudios:", error); - if (error instanceof Error) { - const message = error.message; - if (message.includes("connection") || message.includes("timeout")) { - return { status: 503, message: "Database temporarily unavailable" }; - } - if (message.includes("validation") || message.includes("invalid")) { - return { status: 400, message: "Invalid request parameters" }; - } - if (message.includes("limit") || message.includes("quota")) { - return { status: 429, message: "Rate limit exceeded" }; - } - } - return { status: 500, message: "Internal server error" }; - } - }, - }); -} +type Skeleton = { + audios: string[]; +}; diff --git a/api/so/sprk/sound/getTrendingAudios.ts b/api/so/sprk/sound/getTrendingAudios.ts index 5a144df..0b7ad54 100644 --- a/api/so/sprk/sound/getTrendingAudios.ts +++ b/api/so/sprk/sound/getTrendingAudios.ts @@ -1,84 +1,117 @@ -import { Server } from "../../../../lex/index.ts"; +import { mapDefined } from "@atp/common"; import { AppContext } from "../../../../context.ts"; -import { transformAudiosToAudioViews } from "../../../../utils/audio-transformer.ts"; -import { AudioDocument } from "../../../../data-plane/db/models.ts"; - -interface AudioAggDoc { - uri: string; - createdAt: string | Date; -} -interface BlockDoc { - authorDid: string; - subject: string; -} +import { + HydrateCtx, + HydrationState, + Hydrator, +} from "../../../../hydration/index.ts"; +import { Server } from "../../../../lex/index.ts"; +import { QueryParams } from "../../../../lex/types/so/sprk/sound/getTrendingAudios.ts"; +import { createPipeline } from "../../../../pipeline.ts"; +import { uriToDid as creatorFromUri } from "../../../../utils/uris.ts"; +import { Views } from "../../../../views/index.ts"; +import { resHeaders } from "../../../util.ts"; export default function (server: Server, ctx: AppContext) { + const getTrendingAudios = createPipeline( + skeleton, + hydration, + noBlocks, + presentation, + ); server.so.sprk.sound.getTrendingAudios({ auth: ctx.authVerifier.standardOptional, handler: async ({ params, auth }) => { - const { limit = 25, cursor } = params; - const userDid = auth.credentials.type === "standard" + const viewer = auth.credentials.type === "standard" ? auth.credentials.iss : undefined; + const hydrateCtx = ctx.hydrator.createContext({ viewer: viewer ?? null }); + + const results = await getTrendingAudios({ ...params, hydrateCtx }, ctx); + + return { + encoding: "application/json", + body: results, + headers: resHeaders({}), + }; + }, + }); +} - let skip = 0; - if (cursor) { - const parsed = parseInt(cursor, 10); - if (!isNaN(parsed) && parsed > 0) skip = parsed; - } +const skeleton = async (inputs: { + ctx: AppContext; + params: Params; +}) => { + const { ctx, params } = inputs; + const { limit = 25, cursor } = params; - // Rank by: useCount desc, then createdAt desc - const docsPage = await ctx.db.models.Audio.find({}) - .sort({ useCount: -1, createdAt: -1 }) - .skip(skip) - .limit(limit) - .lean(); - const uris = docsPage.map((a) => a.uri); + let skip = 0; + if (cursor) { + const parsed = parseInt(cursor, 10); + if (!isNaN(parsed) && parsed > 0) skip = parsed; + } - // Fetch full audio documents and preserve order - const docs = await ctx.db.models.Audio.find({ uri: { $in: uris } }); - const byUri = new Map(docs.map((d) => [d.uri, d] as const)); - let audiosOrdered: AudioDocument[] = []; - for (const uri of uris) { - const doc = byUri.get(uri); - if (doc) audiosOrdered.push(doc); - } + const docsPage = await ctx.db.models.Audio.find({}) + .sort({ useCount: -1, createdAt: -1 }) + .skip(skip) + .limit(limit) + .lean(); - // Block filtering like other endpoints: when authed, filter out audios authored by blocked accounts - if (userDid && audiosOrdered.length > 0) { - const authorDids = [...new Set(audiosOrdered.map((a) => a.authorDid))]; - const [blocking, blockedBy] = await Promise.all([ - ctx.db.models.Block.find({ - authorDid: userDid, - subject: { $in: authorDids }, - }).lean(), - ctx.db.models.Block.find({ - authorDid: { $in: authorDids }, - subject: userDid, - }).lean(), - ]) satisfies [BlockDoc[], BlockDoc[]]; - const blockedSet = new Set([ - ...blocking.map((b) => b.subject), - ...blockedBy.map((b) => b.authorDid), - ]); - audiosOrdered = audiosOrdered.filter((a) => - !blockedSet.has(a.authorDid) - ); - } + const uris = docsPage.map((a) => a.uri); - const views = await transformAudiosToAudioViews(audiosOrdered, ctx); + let nextCursor: string | undefined; + if (uris.length === limit) { + nextCursor = (skip + limit).toString(); + } - let nextCursor: string | undefined; - if (views.length === limit) { - nextCursor = (skip + limit).toString(); - } + return { audios: uris, cursor: nextCursor }; +}; - const body = { - audios: views, - ...(nextCursor ? { cursor: nextCursor } : {}), - }; +const hydration = (inputs: { + ctx: Context; + params: Params; + skeleton: Skeleton; +}) => { + const { ctx, params, skeleton } = inputs; + return ctx.hydrator.hydrateSounds(skeleton.audios, params.hydrateCtx); +}; - return { encoding: "application/json", body }; - }, +const noBlocks = (inputs: { + ctx: Context; + skeleton: Skeleton; + hydration: HydrationState; +}) => { + const { ctx, skeleton, hydration } = inputs; + skeleton.audios = skeleton.audios.filter((uri) => { + const creator = creatorFromUri(uri); + return !ctx.views.viewerBlockExists(creator, hydration); }); -} + return skeleton; +}; + +const presentation = (inputs: { + ctx: Context; + params: Params; + skeleton: Skeleton; + hydration: HydrationState; +}) => { + const { ctx, skeleton, hydration } = inputs; + const audios = mapDefined( + skeleton.audios, + (uri) => ctx.views.soundView(uri, hydration), + ); + return { audios, cursor: skeleton.cursor }; +}; + +type Context = { + db: AppContext["db"]; + hydrator: Hydrator; + views: Views; +}; + +type Params = QueryParams & { hydrateCtx: HydrateCtx }; + +type Skeleton = { + audios: string[]; + cursor?: string; +}; diff --git a/deno.json b/deno.json index 1fcff20..dea15e2 100644 --- a/deno.json +++ b/deno.json @@ -6,7 +6,7 @@ "dev": { "dependencies": ["dev:db", "dev:api", "dev:ingest"] }, - "codegen": "deno run -A jsr:@atp/lex-cli@^0.1.0-alpha.1 gen-server -o ./lex -i ./lexicons", + "codegen": "deno run -A jsr:@atp/lex-gen@^0.1.0-alpha.2 server -o ./lex -i ./lexicons", "start": "deno run -A --env-file main.ts", "docker-dev": "docker compose -f compose.dev.yaml up --build --watch" }, diff --git a/hydration/index.ts b/hydration/index.ts index f6c8919..a62a1d8 100644 --- a/hydration/index.ts +++ b/hydration/index.ts @@ -328,6 +328,13 @@ export class Hydrator { ); const authorDids = authorUris.map(didFromUri); + const soundUris = new Set(); + for (const post of state.posts!.values()) { + if (post && post.record.sound) { + soundUris.add(post.record.sound.uri); + } + } + const [ postAggs, replyAggs, @@ -336,6 +343,7 @@ export class Hydrator { profileState, feedGenState, threadContexts, + soundState, ] = await Promise.all([ this.feed.getPostAggregates(postRefs), this.feed.getReplyAggregates(replyRefs), @@ -346,11 +354,13 @@ export class Hydrator { this.hydrateProfiles(authorDids, ctx), this.hydrateFeedGens([], ctx), this.feed.getThreadContexts(threadRefs), + this.hydrateSounds(Array.from(soundUris), ctx), ]); return mergeManyStates( profileState, feedGenState, + soundState, { posts: state.posts, replies: state.replies, diff --git a/lex/index.ts b/lex/index.ts index 764b696..e218ee3 100644 --- a/lex/index.ts +++ b/lex/index.ts @@ -6,302 +6,302 @@ import { createServer as createXrpcServer, type MethodConfigOrHandler, type Options as XrpcOptions, - Server as XrpcServer, + type Server as XrpcServer, type StreamConfigOrHandler, } from "@atp/xrpc-server"; import { schemas } from "./lexicons.ts"; -import * as ToolsOzoneSignatureFindCorrelation from "./types/tools/ozone/signature/findCorrelation.ts"; -import * as ToolsOzoneSignatureSearchAccounts from "./types/tools/ozone/signature/searchAccounts.ts"; -import * as ToolsOzoneSignatureFindRelatedAccounts from "./types/tools/ozone/signature/findRelatedAccounts.ts"; -import * as ToolsOzoneServerGetConfig from "./types/tools/ozone/server/getConfig.ts"; -import * as ToolsOzoneVerificationRevokeVerifications from "./types/tools/ozone/verification/revokeVerifications.ts"; -import * as ToolsOzoneVerificationGrantVerifications from "./types/tools/ozone/verification/grantVerifications.ts"; -import * as ToolsOzoneVerificationListVerifications from "./types/tools/ozone/verification/listVerifications.ts"; -import * as ToolsOzoneSafelinkAddRule from "./types/tools/ozone/safelink/addRule.ts"; -import * as ToolsOzoneSafelinkRemoveRule from "./types/tools/ozone/safelink/removeRule.ts"; -import * as ToolsOzoneSafelinkUpdateRule from "./types/tools/ozone/safelink/updateRule.ts"; -import * as ToolsOzoneSafelinkQueryEvents from "./types/tools/ozone/safelink/queryEvents.ts"; -import * as ToolsOzoneSafelinkQueryRules from "./types/tools/ozone/safelink/queryRules.ts"; -import * as ToolsOzoneTeamListMembers from "./types/tools/ozone/team/listMembers.ts"; -import * as ToolsOzoneTeamDeleteMember from "./types/tools/ozone/team/deleteMember.ts"; -import * as ToolsOzoneTeamUpdateMember from "./types/tools/ozone/team/updateMember.ts"; -import * as ToolsOzoneTeamAddMember from "./types/tools/ozone/team/addMember.ts"; -import * as ToolsOzoneHostingGetAccountHistory from "./types/tools/ozone/hosting/getAccountHistory.ts"; -import * as ToolsOzoneCommunicationUpdateTemplate from "./types/tools/ozone/communication/updateTemplate.ts"; -import * as ToolsOzoneCommunicationCreateTemplate from "./types/tools/ozone/communication/createTemplate.ts"; -import * as ToolsOzoneCommunicationListTemplates from "./types/tools/ozone/communication/listTemplates.ts"; -import * as ToolsOzoneCommunicationDeleteTemplate from "./types/tools/ozone/communication/deleteTemplate.ts"; -import * as ToolsOzoneSetAddValues from "./types/tools/ozone/set/addValues.ts"; -import * as ToolsOzoneSetGetValues from "./types/tools/ozone/set/getValues.ts"; -import * as ToolsOzoneSetDeleteSet from "./types/tools/ozone/set/deleteSet.ts"; -import * as ToolsOzoneSetUpsertSet from "./types/tools/ozone/set/upsertSet.ts"; -import * as ToolsOzoneSetDeleteValues from "./types/tools/ozone/set/deleteValues.ts"; -import * as ToolsOzoneSetQuerySets from "./types/tools/ozone/set/querySets.ts"; -import * as ToolsOzoneSettingListOptions from "./types/tools/ozone/setting/listOptions.ts"; -import * as ToolsOzoneSettingRemoveOptions from "./types/tools/ozone/setting/removeOptions.ts"; -import * as ToolsOzoneSettingUpsertOption from "./types/tools/ozone/setting/upsertOption.ts"; -import * as ToolsOzoneModerationGetReporterStats from "./types/tools/ozone/moderation/getReporterStats.ts"; -import * as ToolsOzoneModerationCancelScheduledActions from "./types/tools/ozone/moderation/cancelScheduledActions.ts"; -import * as ToolsOzoneModerationListScheduledActions from "./types/tools/ozone/moderation/listScheduledActions.ts"; -import * as ToolsOzoneModerationQueryStatuses from "./types/tools/ozone/moderation/queryStatuses.ts"; -import * as ToolsOzoneModerationGetRepo from "./types/tools/ozone/moderation/getRepo.ts"; -import * as ToolsOzoneModerationGetSubjects from "./types/tools/ozone/moderation/getSubjects.ts"; -import * as ToolsOzoneModerationGetRecords from "./types/tools/ozone/moderation/getRecords.ts"; -import * as ToolsOzoneModerationScheduleAction from "./types/tools/ozone/moderation/scheduleAction.ts"; -import * as ToolsOzoneModerationGetEvent from "./types/tools/ozone/moderation/getEvent.ts"; -import * as ToolsOzoneModerationQueryEvents from "./types/tools/ozone/moderation/queryEvents.ts"; -import * as ToolsOzoneModerationGetRecord from "./types/tools/ozone/moderation/getRecord.ts"; -import * as ToolsOzoneModerationEmitEvent from "./types/tools/ozone/moderation/emitEvent.ts"; -import * as ToolsOzoneModerationSearchRepos from "./types/tools/ozone/moderation/searchRepos.ts"; -import * as ToolsOzoneModerationGetAccountTimeline from "./types/tools/ozone/moderation/getAccountTimeline.ts"; -import * as ToolsOzoneModerationGetRepos from "./types/tools/ozone/moderation/getRepos.ts"; -import * as AppBskyVideoUploadVideo from "./types/app/bsky/video/uploadVideo.ts"; -import * as AppBskyVideoGetJobStatus from "./types/app/bsky/video/getJobStatus.ts"; -import * as AppBskyVideoGetUploadLimits from "./types/app/bsky/video/getUploadLimits.ts"; -import * as AppBskyBookmarkDeleteBookmark from "./types/app/bsky/bookmark/deleteBookmark.ts"; -import * as AppBskyBookmarkGetBookmarks from "./types/app/bsky/bookmark/getBookmarks.ts"; -import * as AppBskyBookmarkCreateBookmark from "./types/app/bsky/bookmark/createBookmark.ts"; -import * as AppBskyNotificationRegisterPush from "./types/app/bsky/notification/registerPush.ts"; -import * as AppBskyNotificationPutPreferences from "./types/app/bsky/notification/putPreferences.ts"; -import * as AppBskyNotificationPutActivitySubscription from "./types/app/bsky/notification/putActivitySubscription.ts"; -import * as AppBskyNotificationPutPreferencesV2 from "./types/app/bsky/notification/putPreferencesV2.ts"; -import * as AppBskyNotificationUpdateSeen from "./types/app/bsky/notification/updateSeen.ts"; -import * as AppBskyNotificationListActivitySubscriptions from "./types/app/bsky/notification/listActivitySubscriptions.ts"; -import * as AppBskyNotificationUnregisterPush from "./types/app/bsky/notification/unregisterPush.ts"; -import * as AppBskyNotificationGetPreferences from "./types/app/bsky/notification/getPreferences.ts"; -import * as AppBskyNotificationListNotifications from "./types/app/bsky/notification/listNotifications.ts"; -import * as AppBskyNotificationGetUnreadCount from "./types/app/bsky/notification/getUnreadCount.ts"; -import * as AppBskyUnspeccedGetSuggestedFeedsSkeleton from "./types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts"; -import * as AppBskyUnspeccedSearchStarterPacksSkeleton from "./types/app/bsky/unspecced/searchStarterPacksSkeleton.ts"; -import * as AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton from "./types/app/bsky/unspecced/getOnboardingSuggestedStarterPacksSkeleton.ts"; -import * as AppBskyUnspeccedGetSuggestedUsers from "./types/app/bsky/unspecced/getSuggestedUsers.ts"; -import * as AppBskyUnspeccedGetPostThreadOtherV2 from "./types/app/bsky/unspecced/getPostThreadOtherV2.ts"; -import * as AppBskyUnspeccedGetSuggestedStarterPacks from "./types/app/bsky/unspecced/getSuggestedStarterPacks.ts"; -import * as AppBskyUnspeccedGetSuggestedStarterPacksSkeleton from "./types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.ts"; -import * as AppBskyUnspeccedGetOnboardingSuggestedStarterPacks from "./types/app/bsky/unspecced/getOnboardingSuggestedStarterPacks.ts"; -import * as AppBskyUnspeccedGetSuggestedUsersSkeleton from "./types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts"; -import * as AppBskyUnspeccedGetPostThreadV2 from "./types/app/bsky/unspecced/getPostThreadV2.ts"; -import * as AppBskyUnspeccedGetTrends from "./types/app/bsky/unspecced/getTrends.ts"; -import * as AppBskyUnspeccedSearchActorsSkeleton from "./types/app/bsky/unspecced/searchActorsSkeleton.ts"; -import * as AppBskyUnspeccedGetSuggestionsSkeleton from "./types/app/bsky/unspecced/getSuggestionsSkeleton.ts"; -import * as AppBskyUnspeccedSearchPostsSkeleton from "./types/app/bsky/unspecced/searchPostsSkeleton.ts"; -import * as AppBskyUnspeccedGetAgeAssuranceState from "./types/app/bsky/unspecced/getAgeAssuranceState.ts"; -import * as AppBskyUnspeccedGetPopularFeedGenerators from "./types/app/bsky/unspecced/getPopularFeedGenerators.ts"; -import * as AppBskyUnspeccedInitAgeAssurance from "./types/app/bsky/unspecced/initAgeAssurance.ts"; -import * as AppBskyUnspeccedGetTrendingTopics from "./types/app/bsky/unspecced/getTrendingTopics.ts"; -import * as AppBskyUnspeccedGetTaggedSuggestions from "./types/app/bsky/unspecced/getTaggedSuggestions.ts"; -import * as AppBskyUnspeccedGetSuggestedFeeds from "./types/app/bsky/unspecced/getSuggestedFeeds.ts"; -import * as AppBskyUnspeccedGetTrendsSkeleton from "./types/app/bsky/unspecced/getTrendsSkeleton.ts"; -import * as AppBskyUnspeccedGetConfig from "./types/app/bsky/unspecced/getConfig.ts"; -import * as AppBskyGraphGetStarterPacks from "./types/app/bsky/graph/getStarterPacks.ts"; -import * as AppBskyGraphGetSuggestedFollowsByActor from "./types/app/bsky/graph/getSuggestedFollowsByActor.ts"; -import * as AppBskyGraphGetStarterPacksWithMembership from "./types/app/bsky/graph/getStarterPacksWithMembership.ts"; -import * as AppBskyGraphGetListsWithMembership from "./types/app/bsky/graph/getListsWithMembership.ts"; -import * as AppBskyGraphUnmuteActorList from "./types/app/bsky/graph/unmuteActorList.ts"; -import * as AppBskyGraphGetListBlocks from "./types/app/bsky/graph/getListBlocks.ts"; -import * as AppBskyGraphGetStarterPack from "./types/app/bsky/graph/getStarterPack.ts"; -import * as AppBskyGraphMuteActorList from "./types/app/bsky/graph/muteActorList.ts"; -import * as AppBskyGraphMuteThread from "./types/app/bsky/graph/muteThread.ts"; -import * as AppBskyGraphSearchStarterPacks from "./types/app/bsky/graph/searchStarterPacks.ts"; -import * as AppBskyGraphGetActorStarterPacks from "./types/app/bsky/graph/getActorStarterPacks.ts"; -import * as AppBskyGraphGetLists from "./types/app/bsky/graph/getLists.ts"; -import * as AppBskyGraphGetFollowers from "./types/app/bsky/graph/getFollowers.ts"; -import * as AppBskyGraphUnmuteThread from "./types/app/bsky/graph/unmuteThread.ts"; -import * as AppBskyGraphMuteActor from "./types/app/bsky/graph/muteActor.ts"; -import * as AppBskyGraphGetMutes from "./types/app/bsky/graph/getMutes.ts"; -import * as AppBskyGraphGetKnownFollowers from "./types/app/bsky/graph/getKnownFollowers.ts"; -import * as AppBskyGraphGetListMutes from "./types/app/bsky/graph/getListMutes.ts"; -import * as AppBskyGraphGetFollows from "./types/app/bsky/graph/getFollows.ts"; -import * as AppBskyGraphGetBlocks from "./types/app/bsky/graph/getBlocks.ts"; -import * as AppBskyGraphGetRelationships from "./types/app/bsky/graph/getRelationships.ts"; -import * as AppBskyGraphUnmuteActor from "./types/app/bsky/graph/unmuteActor.ts"; -import * as AppBskyGraphGetList from "./types/app/bsky/graph/getList.ts"; -import * as AppBskyFeedSendInteractions from "./types/app/bsky/feed/sendInteractions.ts"; -import * as AppBskyFeedGetFeedGenerators from "./types/app/bsky/feed/getFeedGenerators.ts"; -import * as AppBskyFeedGetTimeline from "./types/app/bsky/feed/getTimeline.ts"; -import * as AppBskyFeedGetFeedGenerator from "./types/app/bsky/feed/getFeedGenerator.ts"; -import * as AppBskyFeedGetAuthorFeed from "./types/app/bsky/feed/getAuthorFeed.ts"; -import * as AppBskyFeedGetLikes from "./types/app/bsky/feed/getLikes.ts"; -import * as AppBskyFeedGetPostThread from "./types/app/bsky/feed/getPostThread.ts"; -import * as AppBskyFeedGetActorLikes from "./types/app/bsky/feed/getActorLikes.ts"; -import * as AppBskyFeedGetRepostedBy from "./types/app/bsky/feed/getRepostedBy.ts"; -import * as AppBskyFeedDescribeFeedGenerator from "./types/app/bsky/feed/describeFeedGenerator.ts"; -import * as AppBskyFeedSearchPosts from "./types/app/bsky/feed/searchPosts.ts"; -import * as AppBskyFeedGetPosts from "./types/app/bsky/feed/getPosts.ts"; -import * as AppBskyFeedGetFeed from "./types/app/bsky/feed/getFeed.ts"; -import * as AppBskyFeedGetQuotes from "./types/app/bsky/feed/getQuotes.ts"; -import * as AppBskyFeedGetFeedSkeleton from "./types/app/bsky/feed/getFeedSkeleton.ts"; -import * as AppBskyFeedGetListFeed from "./types/app/bsky/feed/getListFeed.ts"; -import * as AppBskyFeedGetSuggestedFeeds from "./types/app/bsky/feed/getSuggestedFeeds.ts"; -import * as AppBskyFeedGetActorFeeds from "./types/app/bsky/feed/getActorFeeds.ts"; -import * as AppBskyAgeassuranceBegin from "./types/app/bsky/ageassurance/begin.ts"; -import * as AppBskyAgeassuranceGetState from "./types/app/bsky/ageassurance/getState.ts"; -import * as AppBskyAgeassuranceGetConfig from "./types/app/bsky/ageassurance/getConfig.ts"; -import * as AppBskyActorSearchActorsTypeahead from "./types/app/bsky/actor/searchActorsTypeahead.ts"; -import * as AppBskyActorPutPreferences from "./types/app/bsky/actor/putPreferences.ts"; -import * as AppBskyActorGetProfile from "./types/app/bsky/actor/getProfile.ts"; -import * as AppBskyActorGetSuggestions from "./types/app/bsky/actor/getSuggestions.ts"; -import * as AppBskyActorSearchActors from "./types/app/bsky/actor/searchActors.ts"; -import * as AppBskyActorGetProfiles from "./types/app/bsky/actor/getProfiles.ts"; -import * as AppBskyActorGetPreferences from "./types/app/bsky/actor/getPreferences.ts"; -import * as AppBskyLabelerGetServices from "./types/app/bsky/labeler/getServices.ts"; -import * as ChatBskyConvoListConvos from "./types/chat/bsky/convo/listConvos.ts"; -import * as ChatBskyConvoUnmuteConvo from "./types/chat/bsky/convo/unmuteConvo.ts"; -import * as ChatBskyConvoGetConvoAvailability from "./types/chat/bsky/convo/getConvoAvailability.ts"; -import * as ChatBskyConvoGetLog from "./types/chat/bsky/convo/getLog.ts"; -import * as ChatBskyConvoSendMessage from "./types/chat/bsky/convo/sendMessage.ts"; -import * as ChatBskyConvoLeaveConvo from "./types/chat/bsky/convo/leaveConvo.ts"; -import * as ChatBskyConvoAddReaction from "./types/chat/bsky/convo/addReaction.ts"; -import * as ChatBskyConvoAcceptConvo from "./types/chat/bsky/convo/acceptConvo.ts"; -import * as ChatBskyConvoMuteConvo from "./types/chat/bsky/convo/muteConvo.ts"; -import * as ChatBskyConvoDeleteMessageForSelf from "./types/chat/bsky/convo/deleteMessageForSelf.ts"; -import * as ChatBskyConvoRemoveReaction from "./types/chat/bsky/convo/removeReaction.ts"; -import * as ChatBskyConvoUpdateRead from "./types/chat/bsky/convo/updateRead.ts"; -import * as ChatBskyConvoUpdateAllRead from "./types/chat/bsky/convo/updateAllRead.ts"; -import * as ChatBskyConvoGetConvo from "./types/chat/bsky/convo/getConvo.ts"; -import * as ChatBskyConvoGetMessages from "./types/chat/bsky/convo/getMessages.ts"; -import * as ChatBskyConvoGetConvoForMembers from "./types/chat/bsky/convo/getConvoForMembers.ts"; -import * as ChatBskyConvoSendMessageBatch from "./types/chat/bsky/convo/sendMessageBatch.ts"; -import * as ChatBskyActorExportAccountData from "./types/chat/bsky/actor/exportAccountData.ts"; -import * as ChatBskyActorDeleteAccount from "./types/chat/bsky/actor/deleteAccount.ts"; -import * as ChatBskyModerationGetActorMetadata from "./types/chat/bsky/moderation/getActorMetadata.ts"; -import * as ChatBskyModerationGetMessageContext from "./types/chat/bsky/moderation/getMessageContext.ts"; -import * as ChatBskyModerationUpdateActorAccess from "./types/chat/bsky/moderation/updateActorAccess.ts"; -import * as SoSprkVideoUploadVideo from "./types/so/sprk/video/uploadVideo.ts"; -import * as SoSprkVideoGetJobStatus from "./types/so/sprk/video/getJobStatus.ts"; -import * as SoSprkVideoGetUploadLimits from "./types/so/sprk/video/getUploadLimits.ts"; -import * as SoSprkNotificationRegisterPush from "./types/so/sprk/notification/registerPush.ts"; -import * as SoSprkNotificationPutPreferences from "./types/so/sprk/notification/putPreferences.ts"; -import * as SoSprkNotificationUpdateSeen from "./types/so/sprk/notification/updateSeen.ts"; -import * as SoSprkNotificationListNotifications from "./types/so/sprk/notification/listNotifications.ts"; -import * as SoSprkNotificationGetUnreadCount from "./types/so/sprk/notification/getUnreadCount.ts"; -import * as SoSprkGraphGetSuggestedFollowsByActor from "./types/so/sprk/graph/getSuggestedFollowsByActor.ts"; -import * as SoSprkGraphMuteThread from "./types/so/sprk/graph/muteThread.ts"; -import * as SoSprkGraphGetFollowers from "./types/so/sprk/graph/getFollowers.ts"; -import * as SoSprkGraphUnmuteThread from "./types/so/sprk/graph/unmuteThread.ts"; -import * as SoSprkGraphMuteActor from "./types/so/sprk/graph/muteActor.ts"; -import * as SoSprkGraphGetMutes from "./types/so/sprk/graph/getMutes.ts"; -import * as SoSprkGraphGetKnownFollowers from "./types/so/sprk/graph/getKnownFollowers.ts"; -import * as SoSprkGraphGetFollows from "./types/so/sprk/graph/getFollows.ts"; -import * as SoSprkGraphGetBlocks from "./types/so/sprk/graph/getBlocks.ts"; -import * as SoSprkGraphGetRelationships from "./types/so/sprk/graph/getRelationships.ts"; -import * as SoSprkGraphUnmuteActor from "./types/so/sprk/graph/unmuteActor.ts"; -import * as SoSprkFeedSendInteractions from "./types/so/sprk/feed/sendInteractions.ts"; -import * as SoSprkFeedGetFeedGenerators from "./types/so/sprk/feed/getFeedGenerators.ts"; -import * as SoSprkFeedGetTimeline from "./types/so/sprk/feed/getTimeline.ts"; -import * as SoSprkFeedGetFeedGenerator from "./types/so/sprk/feed/getFeedGenerator.ts"; -import * as SoSprkFeedGetAuthorFeed from "./types/so/sprk/feed/getAuthorFeed.ts"; -import * as SoSprkFeedGetLikes from "./types/so/sprk/feed/getLikes.ts"; -import * as SoSprkFeedGetPostThread from "./types/so/sprk/feed/getPostThread.ts"; -import * as SoSprkFeedGetActorLikes from "./types/so/sprk/feed/getActorLikes.ts"; -import * as SoSprkFeedGetRepostedBy from "./types/so/sprk/feed/getRepostedBy.ts"; -import * as SoSprkFeedDescribeFeedGenerator from "./types/so/sprk/feed/describeFeedGenerator.ts"; -import * as SoSprkFeedSearchPosts from "./types/so/sprk/feed/searchPosts.ts"; -import * as SoSprkFeedGetPosts from "./types/so/sprk/feed/getPosts.ts"; -import * as SoSprkFeedGetFeed from "./types/so/sprk/feed/getFeed.ts"; -import * as SoSprkFeedGetFeedSkeleton from "./types/so/sprk/feed/getFeedSkeleton.ts"; -import * as SoSprkFeedGetSuggestedFeeds from "./types/so/sprk/feed/getSuggestedFeeds.ts"; -import * as SoSprkFeedGetActorFeeds from "./types/so/sprk/feed/getActorFeeds.ts"; -import * as SoSprkSoundGetActorAudios from "./types/so/sprk/sound/getActorAudios.ts"; -import * as SoSprkSoundGetAudioPosts from "./types/so/sprk/sound/getAudioPosts.ts"; -import * as SoSprkSoundGetAudios from "./types/so/sprk/sound/getAudios.ts"; -import * as SoSprkSoundGetTrendingAudios from "./types/so/sprk/sound/getTrendingAudios.ts"; -import * as SoSprkActorSearchActorsTypeahead from "./types/so/sprk/actor/searchActorsTypeahead.ts"; -import * as SoSprkActorPutPreferences from "./types/so/sprk/actor/putPreferences.ts"; -import * as SoSprkActorGetProfile from "./types/so/sprk/actor/getProfile.ts"; -import * as SoSprkActorGetSuggestions from "./types/so/sprk/actor/getSuggestions.ts"; -import * as SoSprkActorSearchActors from "./types/so/sprk/actor/searchActors.ts"; -import * as SoSprkActorGetProfiles from "./types/so/sprk/actor/getProfiles.ts"; -import * as SoSprkActorGetPreferences from "./types/so/sprk/actor/getPreferences.ts"; -import * as SoSprkStoryGetTimeline from "./types/so/sprk/story/getTimeline.ts"; -import * as SoSprkStoryGetStories from "./types/so/sprk/story/getStories.ts"; -import * as SoSprkLabelerGetServices from "./types/so/sprk/labeler/getServices.ts"; -import * as ComAtprotoTempDereferenceScope from "./types/com/atproto/temp/dereferenceScope.ts"; -import * as ComAtprotoTempAddReservedHandle from "./types/com/atproto/temp/addReservedHandle.ts"; -import * as ComAtprotoTempCheckSignupQueue from "./types/com/atproto/temp/checkSignupQueue.ts"; -import * as ComAtprotoTempCheckHandleAvailability from "./types/com/atproto/temp/checkHandleAvailability.ts"; -import * as ComAtprotoTempRequestPhoneVerification from "./types/com/atproto/temp/requestPhoneVerification.ts"; -import * as ComAtprotoTempRevokeAccountCredentials from "./types/com/atproto/temp/revokeAccountCredentials.ts"; -import * as ComAtprotoTempFetchLabels from "./types/com/atproto/temp/fetchLabels.ts"; -import * as ComAtprotoIdentityUpdateHandle from "./types/com/atproto/identity/updateHandle.ts"; -import * as ComAtprotoIdentitySignPlcOperation from "./types/com/atproto/identity/signPlcOperation.ts"; -import * as ComAtprotoIdentitySubmitPlcOperation from "./types/com/atproto/identity/submitPlcOperation.ts"; -import * as ComAtprotoIdentityResolveIdentity from "./types/com/atproto/identity/resolveIdentity.ts"; -import * as ComAtprotoIdentityRefreshIdentity from "./types/com/atproto/identity/refreshIdentity.ts"; -import * as ComAtprotoIdentityResolveHandle from "./types/com/atproto/identity/resolveHandle.ts"; -import * as ComAtprotoIdentityRequestPlcOperationSignature from "./types/com/atproto/identity/requestPlcOperationSignature.ts"; -import * as ComAtprotoIdentityGetRecommendedDidCredentials from "./types/com/atproto/identity/getRecommendedDidCredentials.ts"; -import * as ComAtprotoIdentityResolveDid from "./types/com/atproto/identity/resolveDid.ts"; -import * as ComAtprotoAdminUpdateAccountEmail from "./types/com/atproto/admin/updateAccountEmail.ts"; -import * as ComAtprotoAdminGetAccountInfo from "./types/com/atproto/admin/getAccountInfo.ts"; -import * as ComAtprotoAdminGetSubjectStatus from "./types/com/atproto/admin/getSubjectStatus.ts"; -import * as ComAtprotoAdminSearchAccounts from "./types/com/atproto/admin/searchAccounts.ts"; -import * as ComAtprotoAdminUpdateAccountPassword from "./types/com/atproto/admin/updateAccountPassword.ts"; -import * as ComAtprotoAdminUpdateAccountHandle from "./types/com/atproto/admin/updateAccountHandle.ts"; -import * as ComAtprotoAdminGetInviteCodes from "./types/com/atproto/admin/getInviteCodes.ts"; -import * as ComAtprotoAdminUpdateAccountSigningKey from "./types/com/atproto/admin/updateAccountSigningKey.ts"; -import * as ComAtprotoAdminEnableAccountInvites from "./types/com/atproto/admin/enableAccountInvites.ts"; -import * as ComAtprotoAdminDisableAccountInvites from "./types/com/atproto/admin/disableAccountInvites.ts"; -import * as ComAtprotoAdminDisableInviteCodes from "./types/com/atproto/admin/disableInviteCodes.ts"; -import * as ComAtprotoAdminUpdateSubjectStatus from "./types/com/atproto/admin/updateSubjectStatus.ts"; -import * as ComAtprotoAdminSendEmail from "./types/com/atproto/admin/sendEmail.ts"; -import * as ComAtprotoAdminGetAccountInfos from "./types/com/atproto/admin/getAccountInfos.ts"; -import * as ComAtprotoAdminDeleteAccount from "./types/com/atproto/admin/deleteAccount.ts"; -import * as ComAtprotoLabelSubscribeLabels from "./types/com/atproto/label/subscribeLabels.ts"; -import * as ComAtprotoLabelQueryLabels from "./types/com/atproto/label/queryLabels.ts"; -import * as ComAtprotoServerRequestEmailConfirmation from "./types/com/atproto/server/requestEmailConfirmation.ts"; -import * as ComAtprotoServerReserveSigningKey from "./types/com/atproto/server/reserveSigningKey.ts"; -import * as ComAtprotoServerGetServiceAuth from "./types/com/atproto/server/getServiceAuth.ts"; -import * as ComAtprotoServerGetAccountInviteCodes from "./types/com/atproto/server/getAccountInviteCodes.ts"; -import * as ComAtprotoServerCreateSession from "./types/com/atproto/server/createSession.ts"; -import * as ComAtprotoServerListAppPasswords from "./types/com/atproto/server/listAppPasswords.ts"; -import * as ComAtprotoServerCreateInviteCodes from "./types/com/atproto/server/createInviteCodes.ts"; -import * as ComAtprotoServerDeleteSession from "./types/com/atproto/server/deleteSession.ts"; -import * as ComAtprotoServerRevokeAppPassword from "./types/com/atproto/server/revokeAppPassword.ts"; -import * as ComAtprotoServerCreateAppPassword from "./types/com/atproto/server/createAppPassword.ts"; -import * as ComAtprotoServerActivateAccount from "./types/com/atproto/server/activateAccount.ts"; -import * as ComAtprotoServerDescribeServer from "./types/com/atproto/server/describeServer.ts"; -import * as ComAtprotoServerConfirmEmail from "./types/com/atproto/server/confirmEmail.ts"; -import * as ComAtprotoServerGetSession from "./types/com/atproto/server/getSession.ts"; -import * as ComAtprotoServerRefreshSession from "./types/com/atproto/server/refreshSession.ts"; -import * as ComAtprotoServerDeactivateAccount from "./types/com/atproto/server/deactivateAccount.ts"; -import * as ComAtprotoServerUpdateEmail from "./types/com/atproto/server/updateEmail.ts"; -import * as ComAtprotoServerResetPassword from "./types/com/atproto/server/resetPassword.ts"; -import * as ComAtprotoServerCheckAccountStatus from "./types/com/atproto/server/checkAccountStatus.ts"; -import * as ComAtprotoServerRequestEmailUpdate from "./types/com/atproto/server/requestEmailUpdate.ts"; -import * as ComAtprotoServerRequestPasswordReset from "./types/com/atproto/server/requestPasswordReset.ts"; -import * as ComAtprotoServerRequestAccountDelete from "./types/com/atproto/server/requestAccountDelete.ts"; -import * as ComAtprotoServerCreateAccount from "./types/com/atproto/server/createAccount.ts"; -import * as ComAtprotoServerDeleteAccount from "./types/com/atproto/server/deleteAccount.ts"; -import * as ComAtprotoServerCreateInviteCode from "./types/com/atproto/server/createInviteCode.ts"; -import * as ComAtprotoLexiconResolveLexicon from "./types/com/atproto/lexicon/resolveLexicon.ts"; -import * as ComAtprotoSyncGetHead from "./types/com/atproto/sync/getHead.ts"; -import * as ComAtprotoSyncGetBlob from "./types/com/atproto/sync/getBlob.ts"; -import * as ComAtprotoSyncGetRepo from "./types/com/atproto/sync/getRepo.ts"; -import * as ComAtprotoSyncNotifyOfUpdate from "./types/com/atproto/sync/notifyOfUpdate.ts"; -import * as ComAtprotoSyncRequestCrawl from "./types/com/atproto/sync/requestCrawl.ts"; -import * as ComAtprotoSyncListBlobs from "./types/com/atproto/sync/listBlobs.ts"; -import * as ComAtprotoSyncGetLatestCommit from "./types/com/atproto/sync/getLatestCommit.ts"; -import * as ComAtprotoSyncSubscribeRepos from "./types/com/atproto/sync/subscribeRepos.ts"; -import * as ComAtprotoSyncGetRepoStatus from "./types/com/atproto/sync/getRepoStatus.ts"; -import * as ComAtprotoSyncGetRecord from "./types/com/atproto/sync/getRecord.ts"; -import * as ComAtprotoSyncListHosts from "./types/com/atproto/sync/listHosts.ts"; -import * as ComAtprotoSyncListRepos from "./types/com/atproto/sync/listRepos.ts"; -import * as ComAtprotoSyncGetHostStatus from "./types/com/atproto/sync/getHostStatus.ts"; -import * as ComAtprotoSyncGetBlocks from "./types/com/atproto/sync/getBlocks.ts"; -import * as ComAtprotoSyncListReposByCollection from "./types/com/atproto/sync/listReposByCollection.ts"; -import * as ComAtprotoSyncGetCheckout from "./types/com/atproto/sync/getCheckout.ts"; -import * as ComAtprotoRepoListMissingBlobs from "./types/com/atproto/repo/listMissingBlobs.ts"; -import * as ComAtprotoRepoCreateRecord from "./types/com/atproto/repo/createRecord.ts"; -import * as ComAtprotoRepoDeleteRecord from "./types/com/atproto/repo/deleteRecord.ts"; -import * as ComAtprotoRepoPutRecord from "./types/com/atproto/repo/putRecord.ts"; -import * as ComAtprotoRepoUploadBlob from "./types/com/atproto/repo/uploadBlob.ts"; -import * as ComAtprotoRepoImportRepo from "./types/com/atproto/repo/importRepo.ts"; -import * as ComAtprotoRepoDescribeRepo from "./types/com/atproto/repo/describeRepo.ts"; -import * as ComAtprotoRepoGetRecord from "./types/com/atproto/repo/getRecord.ts"; -import * as ComAtprotoRepoApplyWrites from "./types/com/atproto/repo/applyWrites.ts"; -import * as ComAtprotoRepoListRecords from "./types/com/atproto/repo/listRecords.ts"; -import * as ComAtprotoModerationCreateReport from "./types/com/atproto/moderation/createReport.ts"; +import type * as ToolsOzoneSignatureFindCorrelation from "./types/tools/ozone/signature/findCorrelation.ts"; +import type * as ToolsOzoneSignatureSearchAccounts from "./types/tools/ozone/signature/searchAccounts.ts"; +import type * as ToolsOzoneSignatureFindRelatedAccounts from "./types/tools/ozone/signature/findRelatedAccounts.ts"; +import type * as ToolsOzoneServerGetConfig from "./types/tools/ozone/server/getConfig.ts"; +import type * as ToolsOzoneVerificationRevokeVerifications from "./types/tools/ozone/verification/revokeVerifications.ts"; +import type * as ToolsOzoneVerificationGrantVerifications from "./types/tools/ozone/verification/grantVerifications.ts"; +import type * as ToolsOzoneVerificationListVerifications from "./types/tools/ozone/verification/listVerifications.ts"; +import type * as ToolsOzoneSafelinkAddRule from "./types/tools/ozone/safelink/addRule.ts"; +import type * as ToolsOzoneSafelinkRemoveRule from "./types/tools/ozone/safelink/removeRule.ts"; +import type * as ToolsOzoneSafelinkUpdateRule from "./types/tools/ozone/safelink/updateRule.ts"; +import type * as ToolsOzoneSafelinkQueryEvents from "./types/tools/ozone/safelink/queryEvents.ts"; +import type * as ToolsOzoneSafelinkQueryRules from "./types/tools/ozone/safelink/queryRules.ts"; +import type * as ToolsOzoneTeamListMembers from "./types/tools/ozone/team/listMembers.ts"; +import type * as ToolsOzoneTeamDeleteMember from "./types/tools/ozone/team/deleteMember.ts"; +import type * as ToolsOzoneTeamUpdateMember from "./types/tools/ozone/team/updateMember.ts"; +import type * as ToolsOzoneTeamAddMember from "./types/tools/ozone/team/addMember.ts"; +import type * as ToolsOzoneHostingGetAccountHistory from "./types/tools/ozone/hosting/getAccountHistory.ts"; +import type * as ToolsOzoneCommunicationUpdateTemplate from "./types/tools/ozone/communication/updateTemplate.ts"; +import type * as ToolsOzoneCommunicationCreateTemplate from "./types/tools/ozone/communication/createTemplate.ts"; +import type * as ToolsOzoneCommunicationListTemplates from "./types/tools/ozone/communication/listTemplates.ts"; +import type * as ToolsOzoneCommunicationDeleteTemplate from "./types/tools/ozone/communication/deleteTemplate.ts"; +import type * as ToolsOzoneSetAddValues from "./types/tools/ozone/set/addValues.ts"; +import type * as ToolsOzoneSetGetValues from "./types/tools/ozone/set/getValues.ts"; +import type * as ToolsOzoneSetDeleteSet from "./types/tools/ozone/set/deleteSet.ts"; +import type * as ToolsOzoneSetUpsertSet from "./types/tools/ozone/set/upsertSet.ts"; +import type * as ToolsOzoneSetDeleteValues from "./types/tools/ozone/set/deleteValues.ts"; +import type * as ToolsOzoneSetQuerySets from "./types/tools/ozone/set/querySets.ts"; +import type * as ToolsOzoneSettingListOptions from "./types/tools/ozone/setting/listOptions.ts"; +import type * as ToolsOzoneSettingRemoveOptions from "./types/tools/ozone/setting/removeOptions.ts"; +import type * as ToolsOzoneSettingUpsertOption from "./types/tools/ozone/setting/upsertOption.ts"; +import type * as ToolsOzoneModerationGetReporterStats from "./types/tools/ozone/moderation/getReporterStats.ts"; +import type * as ToolsOzoneModerationCancelScheduledActions from "./types/tools/ozone/moderation/cancelScheduledActions.ts"; +import type * as ToolsOzoneModerationListScheduledActions from "./types/tools/ozone/moderation/listScheduledActions.ts"; +import type * as ToolsOzoneModerationQueryStatuses from "./types/tools/ozone/moderation/queryStatuses.ts"; +import type * as ToolsOzoneModerationGetRepo from "./types/tools/ozone/moderation/getRepo.ts"; +import type * as ToolsOzoneModerationGetSubjects from "./types/tools/ozone/moderation/getSubjects.ts"; +import type * as ToolsOzoneModerationGetRecords from "./types/tools/ozone/moderation/getRecords.ts"; +import type * as ToolsOzoneModerationScheduleAction from "./types/tools/ozone/moderation/scheduleAction.ts"; +import type * as ToolsOzoneModerationGetEvent from "./types/tools/ozone/moderation/getEvent.ts"; +import type * as ToolsOzoneModerationQueryEvents from "./types/tools/ozone/moderation/queryEvents.ts"; +import type * as ToolsOzoneModerationGetRecord from "./types/tools/ozone/moderation/getRecord.ts"; +import type * as ToolsOzoneModerationEmitEvent from "./types/tools/ozone/moderation/emitEvent.ts"; +import type * as ToolsOzoneModerationSearchRepos from "./types/tools/ozone/moderation/searchRepos.ts"; +import type * as ToolsOzoneModerationGetAccountTimeline from "./types/tools/ozone/moderation/getAccountTimeline.ts"; +import type * as ToolsOzoneModerationGetRepos from "./types/tools/ozone/moderation/getRepos.ts"; +import type * as AppBskyVideoUploadVideo from "./types/app/bsky/video/uploadVideo.ts"; +import type * as AppBskyVideoGetJobStatus from "./types/app/bsky/video/getJobStatus.ts"; +import type * as AppBskyVideoGetUploadLimits from "./types/app/bsky/video/getUploadLimits.ts"; +import type * as AppBskyBookmarkDeleteBookmark from "./types/app/bsky/bookmark/deleteBookmark.ts"; +import type * as AppBskyBookmarkGetBookmarks from "./types/app/bsky/bookmark/getBookmarks.ts"; +import type * as AppBskyBookmarkCreateBookmark from "./types/app/bsky/bookmark/createBookmark.ts"; +import type * as AppBskyNotificationRegisterPush from "./types/app/bsky/notification/registerPush.ts"; +import type * as AppBskyNotificationPutPreferences from "./types/app/bsky/notification/putPreferences.ts"; +import type * as AppBskyNotificationPutActivitySubscription from "./types/app/bsky/notification/putActivitySubscription.ts"; +import type * as AppBskyNotificationPutPreferencesV2 from "./types/app/bsky/notification/putPreferencesV2.ts"; +import type * as AppBskyNotificationUpdateSeen from "./types/app/bsky/notification/updateSeen.ts"; +import type * as AppBskyNotificationListActivitySubscriptions from "./types/app/bsky/notification/listActivitySubscriptions.ts"; +import type * as AppBskyNotificationUnregisterPush from "./types/app/bsky/notification/unregisterPush.ts"; +import type * as AppBskyNotificationGetPreferences from "./types/app/bsky/notification/getPreferences.ts"; +import type * as AppBskyNotificationListNotifications from "./types/app/bsky/notification/listNotifications.ts"; +import type * as AppBskyNotificationGetUnreadCount from "./types/app/bsky/notification/getUnreadCount.ts"; +import type * as AppBskyUnspeccedGetSuggestedFeedsSkeleton from "./types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts"; +import type * as AppBskyUnspeccedSearchStarterPacksSkeleton from "./types/app/bsky/unspecced/searchStarterPacksSkeleton.ts"; +import type * as AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton from "./types/app/bsky/unspecced/getOnboardingSuggestedStarterPacksSkeleton.ts"; +import type * as AppBskyUnspeccedGetSuggestedUsers from "./types/app/bsky/unspecced/getSuggestedUsers.ts"; +import type * as AppBskyUnspeccedGetPostThreadOtherV2 from "./types/app/bsky/unspecced/getPostThreadOtherV2.ts"; +import type * as AppBskyUnspeccedGetSuggestedStarterPacks from "./types/app/bsky/unspecced/getSuggestedStarterPacks.ts"; +import type * as AppBskyUnspeccedGetSuggestedStarterPacksSkeleton from "./types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.ts"; +import type * as AppBskyUnspeccedGetOnboardingSuggestedStarterPacks from "./types/app/bsky/unspecced/getOnboardingSuggestedStarterPacks.ts"; +import type * as AppBskyUnspeccedGetSuggestedUsersSkeleton from "./types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts"; +import type * as AppBskyUnspeccedGetPostThreadV2 from "./types/app/bsky/unspecced/getPostThreadV2.ts"; +import type * as AppBskyUnspeccedGetTrends from "./types/app/bsky/unspecced/getTrends.ts"; +import type * as AppBskyUnspeccedSearchActorsSkeleton from "./types/app/bsky/unspecced/searchActorsSkeleton.ts"; +import type * as AppBskyUnspeccedGetSuggestionsSkeleton from "./types/app/bsky/unspecced/getSuggestionsSkeleton.ts"; +import type * as AppBskyUnspeccedSearchPostsSkeleton from "./types/app/bsky/unspecced/searchPostsSkeleton.ts"; +import type * as AppBskyUnspeccedGetAgeAssuranceState from "./types/app/bsky/unspecced/getAgeAssuranceState.ts"; +import type * as AppBskyUnspeccedGetPopularFeedGenerators from "./types/app/bsky/unspecced/getPopularFeedGenerators.ts"; +import type * as AppBskyUnspeccedInitAgeAssurance from "./types/app/bsky/unspecced/initAgeAssurance.ts"; +import type * as AppBskyUnspeccedGetTrendingTopics from "./types/app/bsky/unspecced/getTrendingTopics.ts"; +import type * as AppBskyUnspeccedGetTaggedSuggestions from "./types/app/bsky/unspecced/getTaggedSuggestions.ts"; +import type * as AppBskyUnspeccedGetSuggestedFeeds from "./types/app/bsky/unspecced/getSuggestedFeeds.ts"; +import type * as AppBskyUnspeccedGetTrendsSkeleton from "./types/app/bsky/unspecced/getTrendsSkeleton.ts"; +import type * as AppBskyUnspeccedGetConfig from "./types/app/bsky/unspecced/getConfig.ts"; +import type * as AppBskyGraphGetStarterPacks from "./types/app/bsky/graph/getStarterPacks.ts"; +import type * as AppBskyGraphGetSuggestedFollowsByActor from "./types/app/bsky/graph/getSuggestedFollowsByActor.ts"; +import type * as AppBskyGraphGetStarterPacksWithMembership from "./types/app/bsky/graph/getStarterPacksWithMembership.ts"; +import type * as AppBskyGraphGetListsWithMembership from "./types/app/bsky/graph/getListsWithMembership.ts"; +import type * as AppBskyGraphUnmuteActorList from "./types/app/bsky/graph/unmuteActorList.ts"; +import type * as AppBskyGraphGetListBlocks from "./types/app/bsky/graph/getListBlocks.ts"; +import type * as AppBskyGraphGetStarterPack from "./types/app/bsky/graph/getStarterPack.ts"; +import type * as AppBskyGraphMuteActorList from "./types/app/bsky/graph/muteActorList.ts"; +import type * as AppBskyGraphMuteThread from "./types/app/bsky/graph/muteThread.ts"; +import type * as AppBskyGraphSearchStarterPacks from "./types/app/bsky/graph/searchStarterPacks.ts"; +import type * as AppBskyGraphGetActorStarterPacks from "./types/app/bsky/graph/getActorStarterPacks.ts"; +import type * as AppBskyGraphGetLists from "./types/app/bsky/graph/getLists.ts"; +import type * as AppBskyGraphGetFollowers from "./types/app/bsky/graph/getFollowers.ts"; +import type * as AppBskyGraphUnmuteThread from "./types/app/bsky/graph/unmuteThread.ts"; +import type * as AppBskyGraphMuteActor from "./types/app/bsky/graph/muteActor.ts"; +import type * as AppBskyGraphGetMutes from "./types/app/bsky/graph/getMutes.ts"; +import type * as AppBskyGraphGetKnownFollowers from "./types/app/bsky/graph/getKnownFollowers.ts"; +import type * as AppBskyGraphGetListMutes from "./types/app/bsky/graph/getListMutes.ts"; +import type * as AppBskyGraphGetFollows from "./types/app/bsky/graph/getFollows.ts"; +import type * as AppBskyGraphGetBlocks from "./types/app/bsky/graph/getBlocks.ts"; +import type * as AppBskyGraphGetRelationships from "./types/app/bsky/graph/getRelationships.ts"; +import type * as AppBskyGraphUnmuteActor from "./types/app/bsky/graph/unmuteActor.ts"; +import type * as AppBskyGraphGetList from "./types/app/bsky/graph/getList.ts"; +import type * as AppBskyFeedSendInteractions from "./types/app/bsky/feed/sendInteractions.ts"; +import type * as AppBskyFeedGetFeedGenerators from "./types/app/bsky/feed/getFeedGenerators.ts"; +import type * as AppBskyFeedGetTimeline from "./types/app/bsky/feed/getTimeline.ts"; +import type * as AppBskyFeedGetFeedGenerator from "./types/app/bsky/feed/getFeedGenerator.ts"; +import type * as AppBskyFeedGetAuthorFeed from "./types/app/bsky/feed/getAuthorFeed.ts"; +import type * as AppBskyFeedGetLikes from "./types/app/bsky/feed/getLikes.ts"; +import type * as AppBskyFeedGetPostThread from "./types/app/bsky/feed/getPostThread.ts"; +import type * as AppBskyFeedGetActorLikes from "./types/app/bsky/feed/getActorLikes.ts"; +import type * as AppBskyFeedGetRepostedBy from "./types/app/bsky/feed/getRepostedBy.ts"; +import type * as AppBskyFeedDescribeFeedGenerator from "./types/app/bsky/feed/describeFeedGenerator.ts"; +import type * as AppBskyFeedSearchPosts from "./types/app/bsky/feed/searchPosts.ts"; +import type * as AppBskyFeedGetPosts from "./types/app/bsky/feed/getPosts.ts"; +import type * as AppBskyFeedGetFeed from "./types/app/bsky/feed/getFeed.ts"; +import type * as AppBskyFeedGetQuotes from "./types/app/bsky/feed/getQuotes.ts"; +import type * as AppBskyFeedGetFeedSkeleton from "./types/app/bsky/feed/getFeedSkeleton.ts"; +import type * as AppBskyFeedGetListFeed from "./types/app/bsky/feed/getListFeed.ts"; +import type * as AppBskyFeedGetSuggestedFeeds from "./types/app/bsky/feed/getSuggestedFeeds.ts"; +import type * as AppBskyFeedGetActorFeeds from "./types/app/bsky/feed/getActorFeeds.ts"; +import type * as AppBskyAgeassuranceBegin from "./types/app/bsky/ageassurance/begin.ts"; +import type * as AppBskyAgeassuranceGetState from "./types/app/bsky/ageassurance/getState.ts"; +import type * as AppBskyAgeassuranceGetConfig from "./types/app/bsky/ageassurance/getConfig.ts"; +import type * as AppBskyActorSearchActorsTypeahead from "./types/app/bsky/actor/searchActorsTypeahead.ts"; +import type * as AppBskyActorPutPreferences from "./types/app/bsky/actor/putPreferences.ts"; +import type * as AppBskyActorGetProfile from "./types/app/bsky/actor/getProfile.ts"; +import type * as AppBskyActorGetSuggestions from "./types/app/bsky/actor/getSuggestions.ts"; +import type * as AppBskyActorSearchActors from "./types/app/bsky/actor/searchActors.ts"; +import type * as AppBskyActorGetProfiles from "./types/app/bsky/actor/getProfiles.ts"; +import type * as AppBskyActorGetPreferences from "./types/app/bsky/actor/getPreferences.ts"; +import type * as AppBskyLabelerGetServices from "./types/app/bsky/labeler/getServices.ts"; +import type * as ChatBskyConvoListConvos from "./types/chat/bsky/convo/listConvos.ts"; +import type * as ChatBskyConvoUnmuteConvo from "./types/chat/bsky/convo/unmuteConvo.ts"; +import type * as ChatBskyConvoGetConvoAvailability from "./types/chat/bsky/convo/getConvoAvailability.ts"; +import type * as ChatBskyConvoGetLog from "./types/chat/bsky/convo/getLog.ts"; +import type * as ChatBskyConvoSendMessage from "./types/chat/bsky/convo/sendMessage.ts"; +import type * as ChatBskyConvoLeaveConvo from "./types/chat/bsky/convo/leaveConvo.ts"; +import type * as ChatBskyConvoAddReaction from "./types/chat/bsky/convo/addReaction.ts"; +import type * as ChatBskyConvoAcceptConvo from "./types/chat/bsky/convo/acceptConvo.ts"; +import type * as ChatBskyConvoMuteConvo from "./types/chat/bsky/convo/muteConvo.ts"; +import type * as ChatBskyConvoDeleteMessageForSelf from "./types/chat/bsky/convo/deleteMessageForSelf.ts"; +import type * as ChatBskyConvoRemoveReaction from "./types/chat/bsky/convo/removeReaction.ts"; +import type * as ChatBskyConvoUpdateRead from "./types/chat/bsky/convo/updateRead.ts"; +import type * as ChatBskyConvoUpdateAllRead from "./types/chat/bsky/convo/updateAllRead.ts"; +import type * as ChatBskyConvoGetConvo from "./types/chat/bsky/convo/getConvo.ts"; +import type * as ChatBskyConvoGetMessages from "./types/chat/bsky/convo/getMessages.ts"; +import type * as ChatBskyConvoGetConvoForMembers from "./types/chat/bsky/convo/getConvoForMembers.ts"; +import type * as ChatBskyConvoSendMessageBatch from "./types/chat/bsky/convo/sendMessageBatch.ts"; +import type * as ChatBskyActorExportAccountData from "./types/chat/bsky/actor/exportAccountData.ts"; +import type * as ChatBskyActorDeleteAccount from "./types/chat/bsky/actor/deleteAccount.ts"; +import type * as ChatBskyModerationGetActorMetadata from "./types/chat/bsky/moderation/getActorMetadata.ts"; +import type * as ChatBskyModerationGetMessageContext from "./types/chat/bsky/moderation/getMessageContext.ts"; +import type * as ChatBskyModerationUpdateActorAccess from "./types/chat/bsky/moderation/updateActorAccess.ts"; +import type * as SoSprkVideoUploadVideo from "./types/so/sprk/video/uploadVideo.ts"; +import type * as SoSprkVideoGetJobStatus from "./types/so/sprk/video/getJobStatus.ts"; +import type * as SoSprkVideoGetUploadLimits from "./types/so/sprk/video/getUploadLimits.ts"; +import type * as SoSprkNotificationRegisterPush from "./types/so/sprk/notification/registerPush.ts"; +import type * as SoSprkNotificationPutPreferences from "./types/so/sprk/notification/putPreferences.ts"; +import type * as SoSprkNotificationUpdateSeen from "./types/so/sprk/notification/updateSeen.ts"; +import type * as SoSprkNotificationListNotifications from "./types/so/sprk/notification/listNotifications.ts"; +import type * as SoSprkNotificationGetUnreadCount from "./types/so/sprk/notification/getUnreadCount.ts"; +import type * as SoSprkGraphGetSuggestedFollowsByActor from "./types/so/sprk/graph/getSuggestedFollowsByActor.ts"; +import type * as SoSprkGraphMuteThread from "./types/so/sprk/graph/muteThread.ts"; +import type * as SoSprkGraphGetFollowers from "./types/so/sprk/graph/getFollowers.ts"; +import type * as SoSprkGraphUnmuteThread from "./types/so/sprk/graph/unmuteThread.ts"; +import type * as SoSprkGraphMuteActor from "./types/so/sprk/graph/muteActor.ts"; +import type * as SoSprkGraphGetMutes from "./types/so/sprk/graph/getMutes.ts"; +import type * as SoSprkGraphGetKnownFollowers from "./types/so/sprk/graph/getKnownFollowers.ts"; +import type * as SoSprkGraphGetFollows from "./types/so/sprk/graph/getFollows.ts"; +import type * as SoSprkGraphGetBlocks from "./types/so/sprk/graph/getBlocks.ts"; +import type * as SoSprkGraphGetRelationships from "./types/so/sprk/graph/getRelationships.ts"; +import type * as SoSprkGraphUnmuteActor from "./types/so/sprk/graph/unmuteActor.ts"; +import type * as SoSprkFeedSendInteractions from "./types/so/sprk/feed/sendInteractions.ts"; +import type * as SoSprkFeedGetFeedGenerators from "./types/so/sprk/feed/getFeedGenerators.ts"; +import type * as SoSprkFeedGetTimeline from "./types/so/sprk/feed/getTimeline.ts"; +import type * as SoSprkFeedGetFeedGenerator from "./types/so/sprk/feed/getFeedGenerator.ts"; +import type * as SoSprkFeedGetAuthorFeed from "./types/so/sprk/feed/getAuthorFeed.ts"; +import type * as SoSprkFeedGetLikes from "./types/so/sprk/feed/getLikes.ts"; +import type * as SoSprkFeedGetPostThread from "./types/so/sprk/feed/getPostThread.ts"; +import type * as SoSprkFeedGetActorLikes from "./types/so/sprk/feed/getActorLikes.ts"; +import type * as SoSprkFeedGetRepostedBy from "./types/so/sprk/feed/getRepostedBy.ts"; +import type * as SoSprkFeedDescribeFeedGenerator from "./types/so/sprk/feed/describeFeedGenerator.ts"; +import type * as SoSprkFeedSearchPosts from "./types/so/sprk/feed/searchPosts.ts"; +import type * as SoSprkFeedGetPosts from "./types/so/sprk/feed/getPosts.ts"; +import type * as SoSprkFeedGetFeed from "./types/so/sprk/feed/getFeed.ts"; +import type * as SoSprkFeedGetFeedSkeleton from "./types/so/sprk/feed/getFeedSkeleton.ts"; +import type * as SoSprkFeedGetSuggestedFeeds from "./types/so/sprk/feed/getSuggestedFeeds.ts"; +import type * as SoSprkFeedGetActorFeeds from "./types/so/sprk/feed/getActorFeeds.ts"; +import type * as SoSprkSoundGetActorAudios from "./types/so/sprk/sound/getActorAudios.ts"; +import type * as SoSprkSoundGetAudioPosts from "./types/so/sprk/sound/getAudioPosts.ts"; +import type * as SoSprkSoundGetAudios from "./types/so/sprk/sound/getAudios.ts"; +import type * as SoSprkSoundGetTrendingAudios from "./types/so/sprk/sound/getTrendingAudios.ts"; +import type * as SoSprkActorSearchActorsTypeahead from "./types/so/sprk/actor/searchActorsTypeahead.ts"; +import type * as SoSprkActorPutPreferences from "./types/so/sprk/actor/putPreferences.ts"; +import type * as SoSprkActorGetProfile from "./types/so/sprk/actor/getProfile.ts"; +import type * as SoSprkActorGetSuggestions from "./types/so/sprk/actor/getSuggestions.ts"; +import type * as SoSprkActorSearchActors from "./types/so/sprk/actor/searchActors.ts"; +import type * as SoSprkActorGetProfiles from "./types/so/sprk/actor/getProfiles.ts"; +import type * as SoSprkActorGetPreferences from "./types/so/sprk/actor/getPreferences.ts"; +import type * as SoSprkStoryGetTimeline from "./types/so/sprk/story/getTimeline.ts"; +import type * as SoSprkStoryGetStories from "./types/so/sprk/story/getStories.ts"; +import type * as SoSprkLabelerGetServices from "./types/so/sprk/labeler/getServices.ts"; +import type * as ComAtprotoTempDereferenceScope from "./types/com/atproto/temp/dereferenceScope.ts"; +import type * as ComAtprotoTempAddReservedHandle from "./types/com/atproto/temp/addReservedHandle.ts"; +import type * as ComAtprotoTempCheckSignupQueue from "./types/com/atproto/temp/checkSignupQueue.ts"; +import type * as ComAtprotoTempCheckHandleAvailability from "./types/com/atproto/temp/checkHandleAvailability.ts"; +import type * as ComAtprotoTempRequestPhoneVerification from "./types/com/atproto/temp/requestPhoneVerification.ts"; +import type * as ComAtprotoTempRevokeAccountCredentials from "./types/com/atproto/temp/revokeAccountCredentials.ts"; +import type * as ComAtprotoTempFetchLabels from "./types/com/atproto/temp/fetchLabels.ts"; +import type * as ComAtprotoIdentityUpdateHandle from "./types/com/atproto/identity/updateHandle.ts"; +import type * as ComAtprotoIdentitySignPlcOperation from "./types/com/atproto/identity/signPlcOperation.ts"; +import type * as ComAtprotoIdentitySubmitPlcOperation from "./types/com/atproto/identity/submitPlcOperation.ts"; +import type * as ComAtprotoIdentityResolveIdentity from "./types/com/atproto/identity/resolveIdentity.ts"; +import type * as ComAtprotoIdentityRefreshIdentity from "./types/com/atproto/identity/refreshIdentity.ts"; +import type * as ComAtprotoIdentityResolveHandle from "./types/com/atproto/identity/resolveHandle.ts"; +import type * as ComAtprotoIdentityRequestPlcOperationSignature from "./types/com/atproto/identity/requestPlcOperationSignature.ts"; +import type * as ComAtprotoIdentityGetRecommendedDidCredentials from "./types/com/atproto/identity/getRecommendedDidCredentials.ts"; +import type * as ComAtprotoIdentityResolveDid from "./types/com/atproto/identity/resolveDid.ts"; +import type * as ComAtprotoAdminUpdateAccountEmail from "./types/com/atproto/admin/updateAccountEmail.ts"; +import type * as ComAtprotoAdminGetAccountInfo from "./types/com/atproto/admin/getAccountInfo.ts"; +import type * as ComAtprotoAdminGetSubjectStatus from "./types/com/atproto/admin/getSubjectStatus.ts"; +import type * as ComAtprotoAdminSearchAccounts from "./types/com/atproto/admin/searchAccounts.ts"; +import type * as ComAtprotoAdminUpdateAccountPassword from "./types/com/atproto/admin/updateAccountPassword.ts"; +import type * as ComAtprotoAdminUpdateAccountHandle from "./types/com/atproto/admin/updateAccountHandle.ts"; +import type * as ComAtprotoAdminGetInviteCodes from "./types/com/atproto/admin/getInviteCodes.ts"; +import type * as ComAtprotoAdminUpdateAccountSigningKey from "./types/com/atproto/admin/updateAccountSigningKey.ts"; +import type * as ComAtprotoAdminEnableAccountInvites from "./types/com/atproto/admin/enableAccountInvites.ts"; +import type * as ComAtprotoAdminDisableAccountInvites from "./types/com/atproto/admin/disableAccountInvites.ts"; +import type * as ComAtprotoAdminDisableInviteCodes from "./types/com/atproto/admin/disableInviteCodes.ts"; +import type * as ComAtprotoAdminUpdateSubjectStatus from "./types/com/atproto/admin/updateSubjectStatus.ts"; +import type * as ComAtprotoAdminSendEmail from "./types/com/atproto/admin/sendEmail.ts"; +import type * as ComAtprotoAdminGetAccountInfos from "./types/com/atproto/admin/getAccountInfos.ts"; +import type * as ComAtprotoAdminDeleteAccount from "./types/com/atproto/admin/deleteAccount.ts"; +import type * as ComAtprotoLabelSubscribeLabels from "./types/com/atproto/label/subscribeLabels.ts"; +import type * as ComAtprotoLabelQueryLabels from "./types/com/atproto/label/queryLabels.ts"; +import type * as ComAtprotoServerRequestEmailConfirmation from "./types/com/atproto/server/requestEmailConfirmation.ts"; +import type * as ComAtprotoServerReserveSigningKey from "./types/com/atproto/server/reserveSigningKey.ts"; +import type * as ComAtprotoServerGetServiceAuth from "./types/com/atproto/server/getServiceAuth.ts"; +import type * as ComAtprotoServerGetAccountInviteCodes from "./types/com/atproto/server/getAccountInviteCodes.ts"; +import type * as ComAtprotoServerCreateSession from "./types/com/atproto/server/createSession.ts"; +import type * as ComAtprotoServerListAppPasswords from "./types/com/atproto/server/listAppPasswords.ts"; +import type * as ComAtprotoServerCreateInviteCodes from "./types/com/atproto/server/createInviteCodes.ts"; +import type * as ComAtprotoServerDeleteSession from "./types/com/atproto/server/deleteSession.ts"; +import type * as ComAtprotoServerRevokeAppPassword from "./types/com/atproto/server/revokeAppPassword.ts"; +import type * as ComAtprotoServerCreateAppPassword from "./types/com/atproto/server/createAppPassword.ts"; +import type * as ComAtprotoServerActivateAccount from "./types/com/atproto/server/activateAccount.ts"; +import type * as ComAtprotoServerDescribeServer from "./types/com/atproto/server/describeServer.ts"; +import type * as ComAtprotoServerConfirmEmail from "./types/com/atproto/server/confirmEmail.ts"; +import type * as ComAtprotoServerGetSession from "./types/com/atproto/server/getSession.ts"; +import type * as ComAtprotoServerRefreshSession from "./types/com/atproto/server/refreshSession.ts"; +import type * as ComAtprotoServerDeactivateAccount from "./types/com/atproto/server/deactivateAccount.ts"; +import type * as ComAtprotoServerUpdateEmail from "./types/com/atproto/server/updateEmail.ts"; +import type * as ComAtprotoServerResetPassword from "./types/com/atproto/server/resetPassword.ts"; +import type * as ComAtprotoServerCheckAccountStatus from "./types/com/atproto/server/checkAccountStatus.ts"; +import type * as ComAtprotoServerRequestEmailUpdate from "./types/com/atproto/server/requestEmailUpdate.ts"; +import type * as ComAtprotoServerRequestPasswordReset from "./types/com/atproto/server/requestPasswordReset.ts"; +import type * as ComAtprotoServerRequestAccountDelete from "./types/com/atproto/server/requestAccountDelete.ts"; +import type * as ComAtprotoServerCreateAccount from "./types/com/atproto/server/createAccount.ts"; +import type * as ComAtprotoServerDeleteAccount from "./types/com/atproto/server/deleteAccount.ts"; +import type * as ComAtprotoServerCreateInviteCode from "./types/com/atproto/server/createInviteCode.ts"; +import type * as ComAtprotoLexiconResolveLexicon from "./types/com/atproto/lexicon/resolveLexicon.ts"; +import type * as ComAtprotoSyncGetHead from "./types/com/atproto/sync/getHead.ts"; +import type * as ComAtprotoSyncGetBlob from "./types/com/atproto/sync/getBlob.ts"; +import type * as ComAtprotoSyncGetRepo from "./types/com/atproto/sync/getRepo.ts"; +import type * as ComAtprotoSyncNotifyOfUpdate from "./types/com/atproto/sync/notifyOfUpdate.ts"; +import type * as ComAtprotoSyncRequestCrawl from "./types/com/atproto/sync/requestCrawl.ts"; +import type * as ComAtprotoSyncListBlobs from "./types/com/atproto/sync/listBlobs.ts"; +import type * as ComAtprotoSyncGetLatestCommit from "./types/com/atproto/sync/getLatestCommit.ts"; +import type * as ComAtprotoSyncSubscribeRepos from "./types/com/atproto/sync/subscribeRepos.ts"; +import type * as ComAtprotoSyncGetRepoStatus from "./types/com/atproto/sync/getRepoStatus.ts"; +import type * as ComAtprotoSyncGetRecord from "./types/com/atproto/sync/getRecord.ts"; +import type * as ComAtprotoSyncListHosts from "./types/com/atproto/sync/listHosts.ts"; +import type * as ComAtprotoSyncListRepos from "./types/com/atproto/sync/listRepos.ts"; +import type * as ComAtprotoSyncGetHostStatus from "./types/com/atproto/sync/getHostStatus.ts"; +import type * as ComAtprotoSyncGetBlocks from "./types/com/atproto/sync/getBlocks.ts"; +import type * as ComAtprotoSyncListReposByCollection from "./types/com/atproto/sync/listReposByCollection.ts"; +import type * as ComAtprotoSyncGetCheckout from "./types/com/atproto/sync/getCheckout.ts"; +import type * as ComAtprotoRepoListMissingBlobs from "./types/com/atproto/repo/listMissingBlobs.ts"; +import type * as ComAtprotoRepoCreateRecord from "./types/com/atproto/repo/createRecord.ts"; +import type * as ComAtprotoRepoDeleteRecord from "./types/com/atproto/repo/deleteRecord.ts"; +import type * as ComAtprotoRepoPutRecord from "./types/com/atproto/repo/putRecord.ts"; +import type * as ComAtprotoRepoUploadBlob from "./types/com/atproto/repo/uploadBlob.ts"; +import type * as ComAtprotoRepoImportRepo from "./types/com/atproto/repo/importRepo.ts"; +import type * as ComAtprotoRepoDescribeRepo from "./types/com/atproto/repo/describeRepo.ts"; +import type * as ComAtprotoRepoGetRecord from "./types/com/atproto/repo/getRecord.ts"; +import type * as ComAtprotoRepoApplyWrites from "./types/com/atproto/repo/applyWrites.ts"; +import type * as ComAtprotoRepoListRecords from "./types/com/atproto/repo/listRecords.ts"; +import type * as ComAtprotoModerationCreateReport from "./types/com/atproto/moderation/createReport.ts"; export const TOOLS_OZONE_TEAM = { DefsRoleAdmin: "tools.ozone.team.defs#roleAdmin", diff --git a/lex/lexicons.ts b/lex/lexicons.ts index 9ea9ba4..1c3fceb 100644 --- a/lex/lexicons.ts +++ b/lex/lexicons.ts @@ -19245,6 +19245,7 @@ export const schemaDict = { }, "coverArt": { "type": "string", + "format": "uri", }, "details": { "type": "ref", @@ -19254,6 +19255,10 @@ export const schemaDict = { "type": "string", "format": "datetime", }, + "audio": { + "type": "string", + "format": "uri", + }, "labels": { "type": "array", "items": { diff --git a/lex/types/app/bsky/actor/defs.ts b/lex/types/app/bsky/actor/defs.ts index 53e38b1..efeb816 100644 --- a/lex/types/app/bsky/actor/defs.ts +++ b/lex/types/app/bsky/actor/defs.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; import type * as AppBskyGraphDefs from "../graph/defs.ts"; import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; diff --git a/lex/types/app/bsky/actor/profile.ts b/lex/types/app/bsky/actor/profile.ts index 5f27b31..874b304 100644 --- a/lex/types/app/bsky/actor/profile.ts +++ b/lex/types/app/bsky/actor/profile.ts @@ -1,10 +1,9 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { BlobRef } from "@atp/lexicon"; +import type { BlobRef } from "@atp/lexicon"; import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; @@ -39,3 +38,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/app/bsky/actor/status.ts b/lex/types/app/bsky/actor/status.ts index 3fc019c..d45238f 100644 --- a/lex/types/app/bsky/actor/status.ts +++ b/lex/types/app/bsky/actor/status.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as AppBskyEmbedExternal from "../embed/external.ts"; const is$typed = _is$typed, validate = _validate; @@ -32,5 +31,7 @@ export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } +export type Main = Record; + /** Advertises an account as currently offering live content. */ export const LIVE = `${id}#live`; diff --git a/lex/types/app/bsky/ageassurance/defs.ts b/lex/types/app/bsky/ageassurance/defs.ts index b7a1cf3..169529b 100644 --- a/lex/types/app/bsky/ageassurance/defs.ts +++ b/lex/types/app/bsky/ageassurance/defs.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; const is$typed = _is$typed, validate = _validate; const id = "app.bsky.ageassurance.defs"; diff --git a/lex/types/app/bsky/bookmark/defs.ts b/lex/types/app/bsky/bookmark/defs.ts index 626b85f..a8a50f4 100644 --- a/lex/types/app/bsky/bookmark/defs.ts +++ b/lex/types/app/bsky/bookmark/defs.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; import type * as AppBskyFeedDefs from "../feed/defs.ts"; diff --git a/lex/types/app/bsky/embed/external.ts b/lex/types/app/bsky/embed/external.ts index e7f4548..af89f69 100644 --- a/lex/types/app/bsky/embed/external.ts +++ b/lex/types/app/bsky/embed/external.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { BlobRef } from "@atp/lexicon"; +import type { BlobRef } from "@atp/lexicon"; import { validate as _validate } from "../../../../lexicons.ts"; import { is$typed as _is$typed } from "../../../../util.ts"; diff --git a/lex/types/app/bsky/embed/images.ts b/lex/types/app/bsky/embed/images.ts index 959ad2a..de85c7c 100644 --- a/lex/types/app/bsky/embed/images.ts +++ b/lex/types/app/bsky/embed/images.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { BlobRef } from "@atp/lexicon"; +import type { BlobRef } from "@atp/lexicon"; import { validate as _validate } from "../../../../lexicons.ts"; import { is$typed as _is$typed } from "../../../../util.ts"; import type * as AppBskyEmbedDefs from "./defs.ts"; diff --git a/lex/types/app/bsky/embed/record.ts b/lex/types/app/bsky/embed/record.ts index 2b337e8..ff66829 100644 --- a/lex/types/app/bsky/embed/record.ts +++ b/lex/types/app/bsky/embed/record.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; import type * as AppBskyFeedDefs from "../feed/defs.ts"; import type * as AppBskyGraphDefs from "../graph/defs.ts"; diff --git a/lex/types/app/bsky/embed/recordWithMedia.ts b/lex/types/app/bsky/embed/recordWithMedia.ts index da13f10..ec50656 100644 --- a/lex/types/app/bsky/embed/recordWithMedia.ts +++ b/lex/types/app/bsky/embed/recordWithMedia.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as AppBskyEmbedRecord from "./record.ts"; import type * as AppBskyEmbedImages from "./images.ts"; import type * as AppBskyEmbedVideo from "./video.ts"; diff --git a/lex/types/app/bsky/embed/video.ts b/lex/types/app/bsky/embed/video.ts index 4511537..e0bad5b 100644 --- a/lex/types/app/bsky/embed/video.ts +++ b/lex/types/app/bsky/embed/video.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { BlobRef } from "@atp/lexicon"; +import type { BlobRef } from "@atp/lexicon"; import { validate as _validate } from "../../../../lexicons.ts"; import { is$typed as _is$typed } from "../../../../util.ts"; import type * as AppBskyEmbedDefs from "./defs.ts"; diff --git a/lex/types/app/bsky/feed/defs.ts b/lex/types/app/bsky/feed/defs.ts index 4913164..e9977e8 100644 --- a/lex/types/app/bsky/feed/defs.ts +++ b/lex/types/app/bsky/feed/defs.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as AppBskyActorDefs from "../actor/defs.ts"; import type * as AppBskyEmbedImages from "../embed/images.ts"; import type * as AppBskyEmbedVideo from "../embed/video.ts"; diff --git a/lex/types/app/bsky/feed/generator.ts b/lex/types/app/bsky/feed/generator.ts index 4e988fa..7368028 100644 --- a/lex/types/app/bsky/feed/generator.ts +++ b/lex/types/app/bsky/feed/generator.ts @@ -1,10 +1,9 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { BlobRef } from "@atp/lexicon"; +import type { BlobRef } from "@atp/lexicon"; import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; @@ -38,3 +37,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/app/bsky/feed/getPostThread.ts b/lex/types/app/bsky/feed/getPostThread.ts index 9e4763c..62cd67b 100644 --- a/lex/types/app/bsky/feed/getPostThread.ts +++ b/lex/types/app/bsky/feed/getPostThread.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { type $Typed } from "../../../../util.ts"; +import type { $Typed } from "../../../../util.ts"; import type * as AppBskyFeedDefs from "./defs.ts"; export type QueryParams = { diff --git a/lex/types/app/bsky/feed/like.ts b/lex/types/app/bsky/feed/like.ts index cb655b2..77f9352 100644 --- a/lex/types/app/bsky/feed/like.ts +++ b/lex/types/app/bsky/feed/like.ts @@ -25,3 +25,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/app/bsky/feed/post.ts b/lex/types/app/bsky/feed/post.ts index 1db8977..b3055ec 100644 --- a/lex/types/app/bsky/feed/post.ts +++ b/lex/types/app/bsky/feed/post.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; import type * as AppBskyEmbedImages from "../embed/images.ts"; import type * as AppBskyEmbedVideo from "../embed/video.ts"; @@ -52,6 +51,8 @@ export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } +export type Main = Record; + export interface ReplyRef { $type?: "app.bsky.feed.post#replyRef"; root: ComAtprotoRepoStrongRef.Main; diff --git a/lex/types/app/bsky/feed/postgate.ts b/lex/types/app/bsky/feed/postgate.ts index 6dc59a8..e8b87a4 100644 --- a/lex/types/app/bsky/feed/postgate.ts +++ b/lex/types/app/bsky/feed/postgate.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; const is$typed = _is$typed, validate = _validate; const id = "app.bsky.feed.postgate"; @@ -30,6 +29,8 @@ export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } +export type Main = Record; + /** Disables embedding of this post. */ export interface DisableRule { $type?: "app.bsky.feed.postgate#disableRule"; diff --git a/lex/types/app/bsky/feed/repost.ts b/lex/types/app/bsky/feed/repost.ts index 8196fed..9741045 100644 --- a/lex/types/app/bsky/feed/repost.ts +++ b/lex/types/app/bsky/feed/repost.ts @@ -25,3 +25,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/app/bsky/feed/threadgate.ts b/lex/types/app/bsky/feed/threadgate.ts index 65f5967..f7fe014 100644 --- a/lex/types/app/bsky/feed/threadgate.ts +++ b/lex/types/app/bsky/feed/threadgate.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; const is$typed = _is$typed, validate = _validate; const id = "app.bsky.feed.threadgate"; @@ -36,6 +35,8 @@ export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } +export type Main = Record; + /** Allow replies from actors mentioned in your post. */ export interface MentionRule { $type?: "app.bsky.feed.threadgate#mentionRule"; diff --git a/lex/types/app/bsky/graph/block.ts b/lex/types/app/bsky/graph/block.ts index c71b026..89754ac 100644 --- a/lex/types/app/bsky/graph/block.ts +++ b/lex/types/app/bsky/graph/block.ts @@ -24,3 +24,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/app/bsky/graph/follow.ts b/lex/types/app/bsky/graph/follow.ts index 0552874..00dd3aa 100644 --- a/lex/types/app/bsky/graph/follow.ts +++ b/lex/types/app/bsky/graph/follow.ts @@ -25,3 +25,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/app/bsky/graph/getRelationships.ts b/lex/types/app/bsky/graph/getRelationships.ts index ddc472f..69b01f3 100644 --- a/lex/types/app/bsky/graph/getRelationships.ts +++ b/lex/types/app/bsky/graph/getRelationships.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { type $Typed } from "../../../../util.ts"; +import type { $Typed } from "../../../../util.ts"; import type * as AppBskyGraphDefs from "./defs.ts"; export type QueryParams = { diff --git a/lex/types/app/bsky/graph/list.ts b/lex/types/app/bsky/graph/list.ts index 2006076..9caa3ec 100644 --- a/lex/types/app/bsky/graph/list.ts +++ b/lex/types/app/bsky/graph/list.ts @@ -1,10 +1,9 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { BlobRef } from "@atp/lexicon"; +import type { BlobRef } from "@atp/lexicon"; import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as AppBskyGraphDefs from "./defs.ts"; import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; @@ -34,3 +33,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/app/bsky/graph/listblock.ts b/lex/types/app/bsky/graph/listblock.ts index 9ca1333..c264df2 100644 --- a/lex/types/app/bsky/graph/listblock.ts +++ b/lex/types/app/bsky/graph/listblock.ts @@ -24,3 +24,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/app/bsky/graph/listitem.ts b/lex/types/app/bsky/graph/listitem.ts index 4309ab7..1ae4680 100644 --- a/lex/types/app/bsky/graph/listitem.ts +++ b/lex/types/app/bsky/graph/listitem.ts @@ -26,3 +26,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/app/bsky/graph/starterpack.ts b/lex/types/app/bsky/graph/starterpack.ts index 0848037..c1d3218 100644 --- a/lex/types/app/bsky/graph/starterpack.ts +++ b/lex/types/app/bsky/graph/starterpack.ts @@ -31,6 +31,8 @@ export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } +export type Main = Record; + export interface FeedItem { $type?: "app.bsky.graph.starterpack#feedItem"; uri: string; diff --git a/lex/types/app/bsky/graph/verification.ts b/lex/types/app/bsky/graph/verification.ts index 078981a..3e92ccd 100644 --- a/lex/types/app/bsky/graph/verification.ts +++ b/lex/types/app/bsky/graph/verification.ts @@ -29,3 +29,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/app/bsky/labeler/getServices.ts b/lex/types/app/bsky/labeler/getServices.ts index dda8a03..ffdc3f2 100644 --- a/lex/types/app/bsky/labeler/getServices.ts +++ b/lex/types/app/bsky/labeler/getServices.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { type $Typed } from "../../../../util.ts"; +import type { $Typed } from "../../../../util.ts"; import type * as AppBskyLabelerDefs from "./defs.ts"; export type QueryParams = { diff --git a/lex/types/app/bsky/labeler/service.ts b/lex/types/app/bsky/labeler/service.ts index de0ff53..6b05ce0 100644 --- a/lex/types/app/bsky/labeler/service.ts +++ b/lex/types/app/bsky/labeler/service.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as AppBskyLabelerDefs from "./defs.ts"; import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; import type * as ComAtprotoModerationDefs from "../../../com/atproto/moderation/defs.ts"; @@ -34,3 +33,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/app/bsky/notification/declaration.ts b/lex/types/app/bsky/notification/declaration.ts index cf7a35f..cde1ff4 100644 --- a/lex/types/app/bsky/notification/declaration.ts +++ b/lex/types/app/bsky/notification/declaration.ts @@ -27,3 +27,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/app/bsky/richtext/facet.ts b/lex/types/app/bsky/richtext/facet.ts index c5dad2b..61194be 100644 --- a/lex/types/app/bsky/richtext/facet.ts +++ b/lex/types/app/bsky/richtext/facet.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; const is$typed = _is$typed, validate = _validate; const id = "app.bsky.richtext.facet"; diff --git a/lex/types/app/bsky/unspecced/getPostThreadOtherV2.ts b/lex/types/app/bsky/unspecced/getPostThreadOtherV2.ts index e16f978..652d787 100644 --- a/lex/types/app/bsky/unspecced/getPostThreadOtherV2.ts +++ b/lex/types/app/bsky/unspecced/getPostThreadOtherV2.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as AppBskyUnspeccedDefs from "./defs.ts"; const is$typed = _is$typed, validate = _validate; diff --git a/lex/types/app/bsky/unspecced/getPostThreadV2.ts b/lex/types/app/bsky/unspecced/getPostThreadV2.ts index 9b9cfd5..24d8cd9 100644 --- a/lex/types/app/bsky/unspecced/getPostThreadV2.ts +++ b/lex/types/app/bsky/unspecced/getPostThreadV2.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as AppBskyFeedDefs from "../feed/defs.ts"; import type * as AppBskyUnspeccedDefs from "./defs.ts"; diff --git a/lex/types/app/bsky/video/defs.ts b/lex/types/app/bsky/video/defs.ts index ad8b59b..8860a84 100644 --- a/lex/types/app/bsky/video/defs.ts +++ b/lex/types/app/bsky/video/defs.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { BlobRef } from "@atp/lexicon"; +import type { BlobRef } from "@atp/lexicon"; import { validate as _validate } from "../../../../lexicons.ts"; import { is$typed as _is$typed } from "../../../../util.ts"; diff --git a/lex/types/app/bsky/video/uploadVideo.ts b/lex/types/app/bsky/video/uploadVideo.ts index 515906a..12dca2c 100644 --- a/lex/types/app/bsky/video/uploadVideo.ts +++ b/lex/types/app/bsky/video/uploadVideo.ts @@ -1,7 +1,6 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import stream from "node:stream"; import type * as AppBskyVideoDefs from "./defs.ts"; export type QueryParams = globalThis.Record; @@ -13,7 +12,7 @@ export interface OutputSchema { export interface HandlerInput { encoding: "video/mp4"; - body: stream.Readable; + body: ReadableStream; } export interface HandlerSuccess { diff --git a/lex/types/chat/bsky/actor/declaration.ts b/lex/types/chat/bsky/actor/declaration.ts index 3620e21..afe13c6 100644 --- a/lex/types/chat/bsky/actor/declaration.ts +++ b/lex/types/chat/bsky/actor/declaration.ts @@ -26,3 +26,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/chat/bsky/actor/exportAccountData.ts b/lex/types/chat/bsky/actor/exportAccountData.ts index 8c84c76..c15b0b6 100644 --- a/lex/types/chat/bsky/actor/exportAccountData.ts +++ b/lex/types/chat/bsky/actor/exportAccountData.ts @@ -1,15 +1,13 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import stream from "node:stream"; - export type QueryParams = globalThis.Record; export type InputSchema = undefined; export type HandlerInput = void; export interface HandlerSuccess { encoding: "application/jsonl"; - body: Uint8Array | stream.Readable; + body: Uint8Array | ReadableStream; headers?: { [key: string]: string }; } diff --git a/lex/types/chat/bsky/convo/defs.ts b/lex/types/chat/bsky/convo/defs.ts index 3504cfe..c15ef48 100644 --- a/lex/types/chat/bsky/convo/defs.ts +++ b/lex/types/chat/bsky/convo/defs.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as AppBskyRichtextFacet from "../../../app/bsky/richtext/facet.ts"; import type * as AppBskyEmbedRecord from "../../../app/bsky/embed/record.ts"; import type * as ChatBskyActorDefs from "../actor/defs.ts"; diff --git a/lex/types/chat/bsky/convo/getLog.ts b/lex/types/chat/bsky/convo/getLog.ts index ef033a2..78f0316 100644 --- a/lex/types/chat/bsky/convo/getLog.ts +++ b/lex/types/chat/bsky/convo/getLog.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { type $Typed } from "../../../../util.ts"; +import type { $Typed } from "../../../../util.ts"; import type * as ChatBskyConvoDefs from "./defs.ts"; export type QueryParams = { diff --git a/lex/types/chat/bsky/convo/getMessages.ts b/lex/types/chat/bsky/convo/getMessages.ts index d7f34fa..66b4343 100644 --- a/lex/types/chat/bsky/convo/getMessages.ts +++ b/lex/types/chat/bsky/convo/getMessages.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { type $Typed } from "../../../../util.ts"; +import type { $Typed } from "../../../../util.ts"; import type * as ChatBskyConvoDefs from "./defs.ts"; export type QueryParams = { diff --git a/lex/types/chat/bsky/moderation/getMessageContext.ts b/lex/types/chat/bsky/moderation/getMessageContext.ts index 998850e..4d3304e 100644 --- a/lex/types/chat/bsky/moderation/getMessageContext.ts +++ b/lex/types/chat/bsky/moderation/getMessageContext.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { type $Typed } from "../../../../util.ts"; +import type { $Typed } from "../../../../util.ts"; import type * as ChatBskyConvoDefs from "../convo/defs.ts"; export type QueryParams = { diff --git a/lex/types/com/atproto/admin/getSubjectStatus.ts b/lex/types/com/atproto/admin/getSubjectStatus.ts index 2367a9d..a01860f 100644 --- a/lex/types/com/atproto/admin/getSubjectStatus.ts +++ b/lex/types/com/atproto/admin/getSubjectStatus.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { type $Typed } from "../../../../util.ts"; +import type { $Typed } from "../../../../util.ts"; import type * as ComAtprotoAdminDefs from "./defs.ts"; import type * as ComAtprotoRepoStrongRef from "../repo/strongRef.ts"; diff --git a/lex/types/com/atproto/admin/updateSubjectStatus.ts b/lex/types/com/atproto/admin/updateSubjectStatus.ts index 7068deb..190f53e 100644 --- a/lex/types/com/atproto/admin/updateSubjectStatus.ts +++ b/lex/types/com/atproto/admin/updateSubjectStatus.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { type $Typed } from "../../../../util.ts"; +import type { $Typed } from "../../../../util.ts"; import type * as ComAtprotoAdminDefs from "./defs.ts"; import type * as ComAtprotoRepoStrongRef from "../repo/strongRef.ts"; diff --git a/lex/types/com/atproto/label/subscribeLabels.ts b/lex/types/com/atproto/label/subscribeLabels.ts index b5de64a..2948d58 100644 --- a/lex/types/com/atproto/label/subscribeLabels.ts +++ b/lex/types/com/atproto/label/subscribeLabels.ts @@ -2,9 +2,8 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; -import { ErrorFrame } from "@atp/xrpc-server"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; +import type { ErrorFrame } from "@atp/xrpc-server"; import type * as ComAtprotoLabelDefs from "./defs.ts"; const is$typed = _is$typed, validate = _validate; diff --git a/lex/types/com/atproto/lexicon/schema.ts b/lex/types/com/atproto/lexicon/schema.ts index a25d6dd..b459f79 100644 --- a/lex/types/com/atproto/lexicon/schema.ts +++ b/lex/types/com/atproto/lexicon/schema.ts @@ -23,3 +23,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/com/atproto/moderation/createReport.ts b/lex/types/com/atproto/moderation/createReport.ts index 331a870..b04bd58 100644 --- a/lex/types/com/atproto/moderation/createReport.ts +++ b/lex/types/com/atproto/moderation/createReport.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as ComAtprotoModerationDefs from "./defs.ts"; import type * as ComAtprotoAdminDefs from "../admin/defs.ts"; import type * as ComAtprotoRepoStrongRef from "../repo/strongRef.ts"; diff --git a/lex/types/com/atproto/repo/applyWrites.ts b/lex/types/com/atproto/repo/applyWrites.ts index ed70cb8..8cd3829 100644 --- a/lex/types/com/atproto/repo/applyWrites.ts +++ b/lex/types/com/atproto/repo/applyWrites.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as ComAtprotoRepoDefs from "./defs.ts"; const is$typed = _is$typed, validate = _validate; diff --git a/lex/types/com/atproto/repo/importRepo.ts b/lex/types/com/atproto/repo/importRepo.ts index c39eeab..d6d2fff 100644 --- a/lex/types/com/atproto/repo/importRepo.ts +++ b/lex/types/com/atproto/repo/importRepo.ts @@ -1,14 +1,12 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import stream from "node:stream"; - export type QueryParams = globalThis.Record; export type InputSchema = string | Uint8Array | Blob; export interface HandlerInput { encoding: "application/vnd.ipld.car"; - body: stream.Readable; + body: ReadableStream; } export interface HandlerError { diff --git a/lex/types/com/atproto/repo/uploadBlob.ts b/lex/types/com/atproto/repo/uploadBlob.ts index 431b1a4..a75b06a 100644 --- a/lex/types/com/atproto/repo/uploadBlob.ts +++ b/lex/types/com/atproto/repo/uploadBlob.ts @@ -1,8 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import stream from "node:stream"; -import { BlobRef } from "@atp/lexicon"; +import type { BlobRef } from "@atp/lexicon"; export type QueryParams = globalThis.Record; export type InputSchema = string | Uint8Array | Blob; @@ -13,7 +12,7 @@ export interface OutputSchema { export interface HandlerInput { encoding: "*/*"; - body: stream.Readable; + body: ReadableStream; } export interface HandlerSuccess { diff --git a/lex/types/com/atproto/sync/defs.ts b/lex/types/com/atproto/sync/defs.ts index e182a61..034b2b9 100644 --- a/lex/types/com/atproto/sync/defs.ts +++ b/lex/types/com/atproto/sync/defs.ts @@ -1,8 +1,6 @@ /** * GENERATED CODE - DO NOT MODIFY */ -const id = "com.atproto.sync.defs"; - export type HostStatus = | "active" | "idle" diff --git a/lex/types/com/atproto/sync/getBlob.ts b/lex/types/com/atproto/sync/getBlob.ts index 80dc0a1..04ff8ce 100644 --- a/lex/types/com/atproto/sync/getBlob.ts +++ b/lex/types/com/atproto/sync/getBlob.ts @@ -1,8 +1,6 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import stream from "node:stream"; - export type QueryParams = { /** The DID of the account. */ did: string; @@ -14,7 +12,7 @@ export type HandlerInput = void; export interface HandlerSuccess { encoding: "*/*"; - body: Uint8Array | stream.Readable; + body: Uint8Array | ReadableStream; headers?: { [key: string]: string }; } diff --git a/lex/types/com/atproto/sync/getBlocks.ts b/lex/types/com/atproto/sync/getBlocks.ts index ff3a3a4..a47732f 100644 --- a/lex/types/com/atproto/sync/getBlocks.ts +++ b/lex/types/com/atproto/sync/getBlocks.ts @@ -1,8 +1,6 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import stream from "node:stream"; - export type QueryParams = { /** The DID of the repo. */ did: string; @@ -13,7 +11,7 @@ export type HandlerInput = void; export interface HandlerSuccess { encoding: "application/vnd.ipld.car"; - body: Uint8Array | stream.Readable; + body: Uint8Array | ReadableStream; headers?: { [key: string]: string }; } diff --git a/lex/types/com/atproto/sync/getCheckout.ts b/lex/types/com/atproto/sync/getCheckout.ts index 7cb8b2c..b749bcc 100644 --- a/lex/types/com/atproto/sync/getCheckout.ts +++ b/lex/types/com/atproto/sync/getCheckout.ts @@ -1,8 +1,6 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import stream from "node:stream"; - export type QueryParams = { /** The DID of the repo. */ did: string; @@ -12,7 +10,7 @@ export type HandlerInput = void; export interface HandlerSuccess { encoding: "application/vnd.ipld.car"; - body: Uint8Array | stream.Readable; + body: Uint8Array | ReadableStream; headers?: { [key: string]: string }; } diff --git a/lex/types/com/atproto/sync/getRecord.ts b/lex/types/com/atproto/sync/getRecord.ts index c85ee13..78910db 100644 --- a/lex/types/com/atproto/sync/getRecord.ts +++ b/lex/types/com/atproto/sync/getRecord.ts @@ -1,8 +1,6 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import stream from "node:stream"; - export type QueryParams = { /** The DID of the repo. */ did: string; @@ -15,7 +13,7 @@ export type HandlerInput = void; export interface HandlerSuccess { encoding: "application/vnd.ipld.car"; - body: Uint8Array | stream.Readable; + body: Uint8Array | ReadableStream; headers?: { [key: string]: string }; } diff --git a/lex/types/com/atproto/sync/getRepo.ts b/lex/types/com/atproto/sync/getRepo.ts index 1395ed8..038ec45 100644 --- a/lex/types/com/atproto/sync/getRepo.ts +++ b/lex/types/com/atproto/sync/getRepo.ts @@ -1,8 +1,6 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import stream from "node:stream"; - export type QueryParams = { /** The DID of the repo. */ did: string; @@ -14,7 +12,7 @@ export type HandlerInput = void; export interface HandlerSuccess { encoding: "application/vnd.ipld.car"; - body: Uint8Array | stream.Readable; + body: Uint8Array | ReadableStream; headers?: { [key: string]: string }; } diff --git a/lex/types/com/atproto/sync/subscribeRepos.ts b/lex/types/com/atproto/sync/subscribeRepos.ts index f47cde3..ccfa133 100644 --- a/lex/types/com/atproto/sync/subscribeRepos.ts +++ b/lex/types/com/atproto/sync/subscribeRepos.ts @@ -1,11 +1,10 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { CID } from "multiformats/cid"; +import type { CID } from "multiformats/cid"; import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; -import { ErrorFrame } from "@atp/xrpc-server"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; +import type { ErrorFrame } from "@atp/xrpc-server"; const is$typed = _is$typed, validate = _validate; const id = "com.atproto.sync.subscribeRepos"; diff --git a/lex/types/com/atproto/temp/checkHandleAvailability.ts b/lex/types/com/atproto/temp/checkHandleAvailability.ts index 34b01f3..3d464bb 100644 --- a/lex/types/com/atproto/temp/checkHandleAvailability.ts +++ b/lex/types/com/atproto/temp/checkHandleAvailability.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; const is$typed = _is$typed, validate = _validate; const id = "com.atproto.temp.checkHandleAvailability"; diff --git a/lex/types/so/sprk/actor/defs.ts b/lex/types/so/sprk/actor/defs.ts index 604ed60..0c5670b 100644 --- a/lex/types/so/sprk/actor/defs.ts +++ b/lex/types/so/sprk/actor/defs.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; import type * as SoSprkFeedThreadgate from "../feed/threadgate.ts"; diff --git a/lex/types/so/sprk/actor/profile.ts b/lex/types/so/sprk/actor/profile.ts index 2710e22..0ac9172 100644 --- a/lex/types/so/sprk/actor/profile.ts +++ b/lex/types/so/sprk/actor/profile.ts @@ -1,10 +1,9 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { BlobRef } from "@atp/lexicon"; +import type { BlobRef } from "@atp/lexicon"; import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; @@ -36,3 +35,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/so/sprk/feed/defs.ts b/lex/types/so/sprk/feed/defs.ts index 992e82c..f244a90 100644 --- a/lex/types/so/sprk/feed/defs.ts +++ b/lex/types/so/sprk/feed/defs.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as SoSprkActorDefs from "../actor/defs.ts"; import type * as SoSprkMediaImages from "../media/images.ts"; import type * as SoSprkMediaVideo from "../media/video.ts"; diff --git a/lex/types/so/sprk/feed/generator.ts b/lex/types/so/sprk/feed/generator.ts index c7f86d6..8443655 100644 --- a/lex/types/so/sprk/feed/generator.ts +++ b/lex/types/so/sprk/feed/generator.ts @@ -1,10 +1,9 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { BlobRef } from "@atp/lexicon"; +import type { BlobRef } from "@atp/lexicon"; import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as SoSprkRichtextFacet from "../richtext/facet.ts"; import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; @@ -34,3 +33,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/so/sprk/feed/getPostThread.ts b/lex/types/so/sprk/feed/getPostThread.ts index a452e9c..9fb6c91 100644 --- a/lex/types/so/sprk/feed/getPostThread.ts +++ b/lex/types/so/sprk/feed/getPostThread.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as SoSprkFeedDefs from "./defs.ts"; const is$typed = _is$typed, validate = _validate; diff --git a/lex/types/so/sprk/feed/like.ts b/lex/types/so/sprk/feed/like.ts index 8b78725..0d5634f 100644 --- a/lex/types/so/sprk/feed/like.ts +++ b/lex/types/so/sprk/feed/like.ts @@ -25,3 +25,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/so/sprk/feed/post.ts b/lex/types/so/sprk/feed/post.ts index 5fa0c80..520e0bb 100644 --- a/lex/types/so/sprk/feed/post.ts +++ b/lex/types/so/sprk/feed/post.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as SoSprkMediaImages from "../media/images.ts"; import type * as SoSprkMediaVideo from "../media/video.ts"; import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; @@ -40,6 +39,8 @@ export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } +export type Main = Record; + export interface CaptionRef { $type?: "so.sprk.feed.post#captionRef"; /** The post description. */ diff --git a/lex/types/so/sprk/feed/postgate.ts b/lex/types/so/sprk/feed/postgate.ts index 830c858..dec90da 100644 --- a/lex/types/so/sprk/feed/postgate.ts +++ b/lex/types/so/sprk/feed/postgate.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; const is$typed = _is$typed, validate = _validate; const id = "so.sprk.feed.postgate"; @@ -30,6 +29,8 @@ export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } +export type Main = Record; + /** Disables embedding of this post. */ export interface DisableRule { $type?: "so.sprk.feed.postgate#disableRule"; diff --git a/lex/types/so/sprk/feed/reply.ts b/lex/types/so/sprk/feed/reply.ts index 62bede9..f96da3b 100644 --- a/lex/types/so/sprk/feed/reply.ts +++ b/lex/types/so/sprk/feed/reply.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as SoSprkRichtextFacet from "../richtext/facet.ts"; import type * as SoSprkMediaImage from "../media/image.ts"; import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; @@ -38,6 +37,8 @@ export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } +export type Main = Record; + export interface ReplyRef { $type?: "so.sprk.feed.reply#replyRef"; root: ComAtprotoRepoStrongRef.Main; diff --git a/lex/types/so/sprk/feed/repost.ts b/lex/types/so/sprk/feed/repost.ts index 746c9c8..a84efd0 100644 --- a/lex/types/so/sprk/feed/repost.ts +++ b/lex/types/so/sprk/feed/repost.ts @@ -25,3 +25,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/so/sprk/feed/threadgate.ts b/lex/types/so/sprk/feed/threadgate.ts index f80fbef..3597244 100644 --- a/lex/types/so/sprk/feed/threadgate.ts +++ b/lex/types/so/sprk/feed/threadgate.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; const is$typed = _is$typed, validate = _validate; const id = "so.sprk.feed.threadgate"; @@ -33,6 +32,8 @@ export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } +export type Main = Record; + /** Allow replies from actors mentioned in your post. */ export interface MentionRule { $type?: "so.sprk.feed.threadgate#mentionRule"; diff --git a/lex/types/so/sprk/graph/block.ts b/lex/types/so/sprk/graph/block.ts index c26e29d..93c32b8 100644 --- a/lex/types/so/sprk/graph/block.ts +++ b/lex/types/so/sprk/graph/block.ts @@ -24,3 +24,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/so/sprk/graph/follow.ts b/lex/types/so/sprk/graph/follow.ts index aa49879..ab48324 100644 --- a/lex/types/so/sprk/graph/follow.ts +++ b/lex/types/so/sprk/graph/follow.ts @@ -23,3 +23,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/so/sprk/graph/getRelationships.ts b/lex/types/so/sprk/graph/getRelationships.ts index ef25978..ea98173 100644 --- a/lex/types/so/sprk/graph/getRelationships.ts +++ b/lex/types/so/sprk/graph/getRelationships.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { type $Typed } from "../../../../util.ts"; +import type { $Typed } from "../../../../util.ts"; import type * as SoSprkGraphDefs from "./defs.ts"; export type QueryParams = { diff --git a/lex/types/so/sprk/labeler/getServices.ts b/lex/types/so/sprk/labeler/getServices.ts index 368f395..6f1ee6f 100644 --- a/lex/types/so/sprk/labeler/getServices.ts +++ b/lex/types/so/sprk/labeler/getServices.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { type $Typed } from "../../../../util.ts"; +import type { $Typed } from "../../../../util.ts"; import type * as SoSprkLabelerDefs from "./defs.ts"; export type QueryParams = { diff --git a/lex/types/so/sprk/labeler/service.ts b/lex/types/so/sprk/labeler/service.ts index cf49197..26e3d9a 100644 --- a/lex/types/so/sprk/labeler/service.ts +++ b/lex/types/so/sprk/labeler/service.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as SoSprkLabelerDefs from "./defs.ts"; import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; @@ -27,3 +26,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/so/sprk/media/image.ts b/lex/types/so/sprk/media/image.ts index 7e3bdc0..f21252b 100644 --- a/lex/types/so/sprk/media/image.ts +++ b/lex/types/so/sprk/media/image.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { BlobRef } from "@atp/lexicon"; +import type { BlobRef } from "@atp/lexicon"; import { validate as _validate } from "../../../../lexicons.ts"; import { is$typed as _is$typed } from "../../../../util.ts"; import type * as SoSprkMediaDefs from "./defs.ts"; diff --git a/lex/types/so/sprk/media/video.ts b/lex/types/so/sprk/media/video.ts index 4d61248..99859ea 100644 --- a/lex/types/so/sprk/media/video.ts +++ b/lex/types/so/sprk/media/video.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { BlobRef } from "@atp/lexicon"; +import type { BlobRef } from "@atp/lexicon"; import { validate as _validate } from "../../../../lexicons.ts"; import { is$typed as _is$typed } from "../../../../util.ts"; import type * as SoSprkMediaDefs from "./defs.ts"; diff --git a/lex/types/so/sprk/richtext/facet.ts b/lex/types/so/sprk/richtext/facet.ts index debfa39..c2e2474 100644 --- a/lex/types/so/sprk/richtext/facet.ts +++ b/lex/types/so/sprk/richtext/facet.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; const is$typed = _is$typed, validate = _validate; const id = "so.sprk.richtext.facet"; diff --git a/lex/types/so/sprk/sound/audio.ts b/lex/types/so/sprk/sound/audio.ts index f3ec0fa..b8bd9f3 100644 --- a/lex/types/so/sprk/sound/audio.ts +++ b/lex/types/so/sprk/sound/audio.ts @@ -1,10 +1,9 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { BlobRef } from "@atp/lexicon"; +import type { BlobRef } from "@atp/lexicon"; import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; import type * as SoSprkSoundDefs from "./defs.ts"; import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; @@ -34,3 +33,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/so/sprk/sound/defs.ts b/lex/types/so/sprk/sound/defs.ts index 7d1dd87..330cf2e 100644 --- a/lex/types/so/sprk/sound/defs.ts +++ b/lex/types/so/sprk/sound/defs.ts @@ -20,6 +20,7 @@ export interface AudioView { coverArt: string; details?: AudioDetails; indexedAt: string; + audio?: string; labels?: (ComAtprotoLabelDefs.Label)[]; } diff --git a/lex/types/so/sprk/story/defs.ts b/lex/types/so/sprk/story/defs.ts index f4ff2be..79caafe 100644 --- a/lex/types/so/sprk/story/defs.ts +++ b/lex/types/so/sprk/story/defs.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as SoSprkActorDefs from "../actor/defs.ts"; import type * as SoSprkMediaImage from "../media/image.ts"; import type * as SoSprkMediaVideo from "../media/video.ts"; diff --git a/lex/types/so/sprk/story/post.ts b/lex/types/so/sprk/story/post.ts index 90d2f57..5e4a404 100644 --- a/lex/types/so/sprk/story/post.ts +++ b/lex/types/so/sprk/story/post.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as SoSprkMediaImage from "../media/image.ts"; import type * as SoSprkMediaVideo from "../media/video.ts"; import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; @@ -33,3 +32,5 @@ export function isRecord(v: V) { export function validateRecord(v: V) { return validate(v, id, hashRecord, true); } + +export type Main = Record; diff --git a/lex/types/so/sprk/video/defs.ts b/lex/types/so/sprk/video/defs.ts index c44fba8..8974bf4 100644 --- a/lex/types/so/sprk/video/defs.ts +++ b/lex/types/so/sprk/video/defs.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { BlobRef } from "@atp/lexicon"; +import type { BlobRef } from "@atp/lexicon"; import { validate as _validate } from "../../../../lexicons.ts"; import { is$typed as _is$typed } from "../../../../util.ts"; import type * as SoSprkSoundDefs from "../sound/defs.ts"; diff --git a/lex/types/so/sprk/video/uploadVideo.ts b/lex/types/so/sprk/video/uploadVideo.ts index 0060a26..5ec97ce 100644 --- a/lex/types/so/sprk/video/uploadVideo.ts +++ b/lex/types/so/sprk/video/uploadVideo.ts @@ -1,7 +1,6 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import stream from "node:stream"; import type * as SoSprkVideoDefs from "./defs.ts"; export type QueryParams = globalThis.Record; @@ -13,7 +12,7 @@ export interface OutputSchema { export interface HandlerInput { encoding: "video/mp4"; - body: stream.Readable; + body: ReadableStream; } export interface HandlerSuccess { diff --git a/lex/types/tools/ozone/hosting/getAccountHistory.ts b/lex/types/tools/ozone/hosting/getAccountHistory.ts index c5c105b..7d1040e 100644 --- a/lex/types/tools/ozone/hosting/getAccountHistory.ts +++ b/lex/types/tools/ozone/hosting/getAccountHistory.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; const is$typed = _is$typed, validate = _validate; const id = "tools.ozone.hosting.getAccountHistory"; diff --git a/lex/types/tools/ozone/moderation/defs.ts b/lex/types/tools/ozone/moderation/defs.ts index f544db0..28aaf9e 100644 --- a/lex/types/tools/ozone/moderation/defs.ts +++ b/lex/types/tools/ozone/moderation/defs.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as ComAtprotoAdminDefs from "../../../com/atproto/admin/defs.ts"; import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; import type * as ChatBskyConvoDefs from "../../../chat/bsky/convo/defs.ts"; diff --git a/lex/types/tools/ozone/moderation/emitEvent.ts b/lex/types/tools/ozone/moderation/emitEvent.ts index 880a825..bf6eb38 100644 --- a/lex/types/tools/ozone/moderation/emitEvent.ts +++ b/lex/types/tools/ozone/moderation/emitEvent.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { type $Typed } from "../../../../util.ts"; +import type { $Typed } from "../../../../util.ts"; import type * as ToolsOzoneModerationDefs from "./defs.ts"; import type * as ComAtprotoAdminDefs from "../../../com/atproto/admin/defs.ts"; import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; diff --git a/lex/types/tools/ozone/moderation/getRecords.ts b/lex/types/tools/ozone/moderation/getRecords.ts index 1d9db42..1b5ae52 100644 --- a/lex/types/tools/ozone/moderation/getRecords.ts +++ b/lex/types/tools/ozone/moderation/getRecords.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { type $Typed } from "../../../../util.ts"; +import type { $Typed } from "../../../../util.ts"; import type * as ToolsOzoneModerationDefs from "./defs.ts"; export type QueryParams = { diff --git a/lex/types/tools/ozone/moderation/getRepos.ts b/lex/types/tools/ozone/moderation/getRepos.ts index 2dd383c..9eed082 100644 --- a/lex/types/tools/ozone/moderation/getRepos.ts +++ b/lex/types/tools/ozone/moderation/getRepos.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { type $Typed } from "../../../../util.ts"; +import type { $Typed } from "../../../../util.ts"; import type * as ToolsOzoneModerationDefs from "./defs.ts"; export type QueryParams = { diff --git a/lex/types/tools/ozone/moderation/listScheduledActions.ts b/lex/types/tools/ozone/moderation/listScheduledActions.ts index aa27684..c9dd017 100644 --- a/lex/types/tools/ozone/moderation/listScheduledActions.ts +++ b/lex/types/tools/ozone/moderation/listScheduledActions.ts @@ -21,7 +21,7 @@ export interface InputSchema { | (string & globalThis.Record) )[]; /** Maximum number of results to return */ - limit: number; + limit?: number; /** Cursor for pagination */ cursor?: string; } diff --git a/lex/types/tools/ozone/moderation/scheduleAction.ts b/lex/types/tools/ozone/moderation/scheduleAction.ts index 93b5ccb..34406a3 100644 --- a/lex/types/tools/ozone/moderation/scheduleAction.ts +++ b/lex/types/tools/ozone/moderation/scheduleAction.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as ToolsOzoneModerationDefs from "./defs.ts"; const is$typed = _is$typed, validate = _validate; diff --git a/lex/types/tools/ozone/safelink/queryEvents.ts b/lex/types/tools/ozone/safelink/queryEvents.ts index 3d3d488..53f2b6e 100644 --- a/lex/types/tools/ozone/safelink/queryEvents.ts +++ b/lex/types/tools/ozone/safelink/queryEvents.ts @@ -9,13 +9,13 @@ export interface InputSchema { /** Cursor for pagination */ cursor?: string; /** Maximum number of results to return */ - limit: number; + limit?: number; /** Filter by specific URLs or domains */ urls?: (string)[]; /** Filter by pattern type */ patternType?: string; /** Sort direction */ - sortDirection: + sortDirection?: | "asc" | "desc" | (string & globalThis.Record); diff --git a/lex/types/tools/ozone/safelink/queryRules.ts b/lex/types/tools/ozone/safelink/queryRules.ts index 8ee2940..b4dfa85 100644 --- a/lex/types/tools/ozone/safelink/queryRules.ts +++ b/lex/types/tools/ozone/safelink/queryRules.ts @@ -9,7 +9,7 @@ export interface InputSchema { /** Cursor for pagination */ cursor?: string; /** Maximum number of results to return */ - limit: number; + limit?: number; /** Filter by specific URLs or domains */ urls?: (string)[]; /** Filter by pattern type */ @@ -21,7 +21,7 @@ export interface InputSchema { /** Filter by rule creator */ createdBy?: string; /** Sort direction */ - sortDirection: + sortDirection?: | "asc" | "desc" | (string & globalThis.Record); diff --git a/lex/types/tools/ozone/verification/defs.ts b/lex/types/tools/ozone/verification/defs.ts index 4444f65..bc9793f 100644 --- a/lex/types/tools/ozone/verification/defs.ts +++ b/lex/types/tools/ozone/verification/defs.ts @@ -2,8 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ import { validate as _validate } from "../../../../lexicons.ts"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import { type $Typed } from "../../../../util.ts"; +import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; import type * as ToolsOzoneModerationDefs from "../moderation/defs.ts"; const is$typed = _is$typed, validate = _validate; diff --git a/lex/util.ts b/lex/util.ts index 42fe1f4..a42351e 100644 --- a/lex/util.ts +++ b/lex/util.ts @@ -2,7 +2,7 @@ * GENERATED CODE - DO NOT MODIFY */ -import { type ValidationResult } from "@atp/lexicon"; +import type { ValidationResult } from "@atp/lexicon"; export type OmitKey = { [K2 in keyof T as K2 extends K ? never : K2]: T[K2]; diff --git a/lexicons/so/sprk/sound/defs.json b/lexicons/so/sprk/sound/defs.json index 9c550d7..c5fa136 100644 --- a/lexicons/so/sprk/sound/defs.json +++ b/lexicons/so/sprk/sound/defs.json @@ -23,9 +23,10 @@ "record": { "type": "unknown" }, "useCount": { "type": "integer" }, "title": { "type": "string" }, - "coverArt": { "type": "string" }, + "coverArt": { "type": "string", "format": "uri" }, "details": { "type": "ref", "ref": "#audioDetails" }, "indexedAt": { "type": "string", "format": "datetime" }, + "audio": { "type": "string", "format": "uri" }, "labels": { "type": "array", "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } diff --git a/utils/audio-transformer.ts b/utils/audio-transformer.ts deleted file mode 100644 index 0c45e10..0000000 --- a/utils/audio-transformer.ts +++ /dev/null @@ -1,108 +0,0 @@ -import type * as SoSprkSoundDefs from "../lex/types/so/sprk/sound/defs.ts"; -import { AudioDocument } from "../data-plane/db/models.ts"; -import { AppContext } from "../context.ts"; -import { createProfileViewBasic } from "./profile-helper.ts"; -import type { Label } from "../lex/types/com/atproto/label/defs.ts"; - -// Transform a single DB audio to AudioView format -export async function transformAudioToAudioView( - audio: AudioDocument, - ctx: AppContext, - usageCount?: number, -): Promise { - const authorView = await createProfileViewBasic(audio.authorDid, ctx); - - const labels = audio.labels - ? Array.isArray(audio.labels) ? (audio.labels as Label[]) : undefined - : undefined; - const details = audio.details ? { ...audio.details } : undefined; - - const isMusic = !!details; - const musicTitle = details?.title; - const musicArtist = details?.artist; - const baseTitle = isMusic ? audio.title : "Original Audio"; - const musicSuffix = isMusic - ? ` contains music of ${musicTitle ?? "Unknown"} - ${ - musicArtist ?? "Unknown" - }` - : ""; - const computedTitle = `${baseTitle}${musicSuffix}`; - - const record = { - title: computedTitle, - origin: audio.origin ?? undefined, - sound: audio.sound ?? undefined, - labels: audio.labels ?? undefined, - createdAt: audio.createdAt, - } as Record; - - return { - uri: audio.uri, - cid: audio.cid, - author: authorView, - title: computedTitle, - coverArt: isMusic ? "" : (authorView.avatar ?? ""), - record, - useCount: usageCount ?? 0, - details, - indexedAt: audio.indexedAt, - labels, - }; -} - -// Batch transform DB audios to AudioView format -export async function transformAudiosToAudioViews( - audios: AudioDocument[], - ctx: AppContext, -): Promise { - if (audios.length === 0) return []; - - // Prefetch authors - const authorDids = [...new Set(audios.map((a) => a.authorDid))]; - const authors = await Promise.all( - authorDids.map((did) => createProfileViewBasic(did, ctx)), - ); - const authorsMap = new Map(authors.map((a) => [a.did, a])); - - // Usage count: how many posts reference this audio record - const audioUris = audios.map((a) => a.uri); - const usageAgg = await ctx.db.models.Post.aggregate([ - { $match: { "sound.uri": { $in: audioUris } } }, - { $group: { _id: "$sound.uri", count: { $sum: 1 } } }, - ]); - const usageMap = new Map( - usageAgg.map((u: { _id: string; count: number }) => [u._id, u.count]), - ); - - return audios.map((audio) => { - const labels = audio.labels - ? Array.isArray(audio.labels) ? (audio.labels as Label[]) : undefined - : undefined; - - const details = audio.details ? { ...audio.details } : undefined; - - const record = { - title: audio.title, - origin: audio.origin ?? undefined, - sound: audio.sound ?? undefined, - labels: audio.labels ?? undefined, - details: audio.details ?? undefined, - createdAt: audio.createdAt, - } satisfies Record; - - const coverArt = authorsMap.get(audio.authorDid)?.avatar ?? ""; - - return { - uri: audio.uri, - cid: audio.cid, - author: authorsMap.get(audio.authorDid)!, - title: audio.title, - coverArt, - record, - useCount: usageMap.get(audio.uri) ?? 0, - details, - indexedAt: audio.indexedAt, - labels, - } satisfies SoSprkSoundDefs.AudioView; - }); -} diff --git a/utils/media-transformer.ts b/utils/media-transformer.ts deleted file mode 100644 index 94983ce..0000000 --- a/utils/media-transformer.ts +++ /dev/null @@ -1,116 +0,0 @@ -import type * as SoSprkMediaImage from "../lex/types/so/sprk/media/image.ts"; -import { ImageMedia, PostMedia, StoryMedia } from "../data-plane/db/models.ts"; -import { ServerConfig } from "../config.ts"; - -interface ImageTransformOptions { - /** If true, only return the first image (useful for stories) */ - firstImageOnly?: boolean; -} - -export function transformImagesMedia( - media: PostMedia, - authorDid: string, - options: ImageTransformOptions = {}, -) { - const { firstImageOnly = false } = options; - - if (!media.images) { - return undefined; - } - - const imagesToProcess = firstImageOnly - ? [media.images[0]].filter(Boolean) - : media.images; - - return { - $type: "so.sprk.media.images#view", - images: imagesToProcess.map( - (img: ImageMedia): SoSprkMediaImage.View => ({ - thumb: - `https://media.sprk.so/img/medium/${authorDid}/${img.ref.$link}/webp`, - fullsize: - `https://media.sprk.so/img/full/${authorDid}/${img.ref.$link}/webp`, - alt: img.alt ?? "", - aspectRatio: img.aspectRatio || undefined, - }), - ), - } as const; -} - -export function transformVideoMedia( - media: PostMedia, - authorDid: string, - cfg: ServerConfig, - isStory = false, -) { - if (!media.video) { - return undefined; - } - - let playlist: string; - let thumbnail: string; - - if (isStory) { - playlist = `${cfg.mediaCdn}/video/${authorDid}/${media.video.ref.$link}`; - thumbnail = - `${cfg.thumbCdn}/${authorDid}/${media.video.ref.$link}/thumbnail`; - } else { - playlist = - `${cfg.videoCdn}/watch/${authorDid}/${media.video.ref.$link}/playlist.m3u8`; - thumbnail = - `${cfg.thumbCdn}/${authorDid}/${media.video.ref.$link}/thumbnail`; - } - - return { - $type: "so.sprk.media.video#view", - cid: media.video.ref.$link, - alt: media.video.alt, - playlist, - thumbnail, - } as const; -} - -export function transformMedia( - media: PostMedia | StoryMedia | undefined, - authorDid: string, - cfg: ServerConfig, - options: ImageTransformOptions = {}, - isStory = false, -) { - if (!media) { - return undefined; - } - - if (media.$type === "so.sprk.media.images") { - return transformImagesMedia(media as PostMedia, authorDid, options); - } - - if (media.$type === "so.sprk.media.image") { - // Handle single image (used in stories and replies) - const singleImageMedia = media as StoryMedia; - if (!singleImageMedia.image) { - return undefined; - } - - return { - $type: "so.sprk.media.image#view", - thumb: - `https://media.sprk.so/img/medium/${authorDid}/${singleImageMedia.image.ref.$link}/webp`, - fullsize: - `https://media.sprk.so/img/full/${authorDid}/${singleImageMedia.image.ref.$link}/webp`, - alt: singleImageMedia.image.alt ?? "", - aspectRatio: singleImageMedia.image.aspectRatio || undefined, - } as const; - } - - if (media.$type === "so.sprk.media.video") { - return transformVideoMedia( - media as PostMedia, - authorDid, - cfg, - isStory, - ); - } - - return undefined; -} diff --git a/utils/post-transformer.ts b/utils/post-transformer.ts deleted file mode 100644 index c14aeab..0000000 --- a/utils/post-transformer.ts +++ /dev/null @@ -1,154 +0,0 @@ -import { PostDocument } from "../data-plane/db/models.ts"; -import type { Label } from "../lex/types/com/atproto/label/defs.ts"; -import type * as SoSprkFeedDefs from "../lex/types/so/sprk/feed/defs.ts"; -import type * as SoSprkFeedPost from "../lex/types/so/sprk/feed/post.ts"; -import { AppContext } from "../context.ts"; -import { transformAudiosToAudioViews } from "./audio-transformer.ts"; -import { transformMedia } from "./media-transformer.ts"; -import { createProfileViewBasic } from "./profile-helper.ts"; - -// Transform DB posts to PostView format -export async function transformPostsToPostViews( - posts: PostDocument[], - ctx: AppContext, - userDid?: string, -): Promise { - if (posts.length === 0) { - return []; - } - - const postUris = posts.map((p) => p.uri); - const authorDids = [...new Set(posts.map((p) => p.authorDid))]; - const soundUris = posts - .map((p) => p.sound?.uri) - .filter((u): u is string => typeof u === "string"); - - const [ - likeCounts, - replyCounts, - repostCounts, - authors, - viewerLikes, - viewerReposts, - ] = await Promise.all([ - // Get like counts - ctx.db.models.Like.aggregate([ - { $match: { subject: { $in: postUris } } }, - { $group: { _id: "$subject", count: { $sum: 1 } } }, - ]), - // Get reply counts - ctx.db.models.Post.aggregate([ - { $match: { "reply.parent.uri": { $in: postUris } } }, - { $group: { _id: "$reply.parent.uri", count: { $sum: 1 } } }, - ]), - // Get repost counts - ctx.db.models.Repost.aggregate([ - { $match: { subject: { $in: postUris } } }, - { $group: { _id: "$subject", count: { $sum: 1 } } }, - ]), - - // Get authors - Promise.all( - authorDids.map((did) => { - return createProfileViewBasic( - did, - ctx, - ); - }), - ), - // Get viewer likes - userDid - ? ctx.db.models.Like.find({ - subject: { $in: postUris }, - authorDid: userDid, - }) - .lean() - : Promise.resolve([]), - // Get viewer reposts - userDid - ? ctx.db.models.Repost.find({ - subject: { $in: postUris }, - authorDid: userDid, - }).lean() - : Promise.resolve([]), - ]); - - const likeCountsMap = new Map( - likeCounts.map((item) => [item._id, item.count]), - ); - const replyCountsMap = new Map( - replyCounts.map((item) => [item._id, item.count]), - ); - const repostCountsMap = new Map( - repostCounts.map((item) => [item._id, item.count]), - ); - - const authorsMap = new Map(authors.map((author) => [author.did, author])); - - const viewerLikesMap = new Map( - viewerLikes.map((like) => [like.subject, like.uri]), - ); - const viewerRepostsMap = new Map( - viewerReposts.map((repost: { subject: string; uri: string }) => [ - repost.subject, - repost.uri, - ]), - ); - - const audios = await ctx.db.models.Audio.find({ uri: { $in: soundUris } }); - const audioViews = await transformAudiosToAudioViews(audios, ctx); - const audioViewsMap = new Map(audioViews.map((av) => [av.uri, av])); - - return posts.map((post) => { - const embed = transformMedia( - post.media, - post.authorDid, - ctx.cfg, - ); - - const labels = post.labels - ? Array.isArray(post.labels) ? (post.labels as Label[]) : undefined - : undefined; - - const viewer: SoSprkFeedDefs.ViewerState = {}; - if (userDid) { - viewer.like = viewerLikesMap.get(post.uri); - viewer.repost = viewerRepostsMap.get(post.uri); - } - - return { - uri: post.uri, - cid: post.cid, - author: authorsMap.get(post.authorDid)!, - record: { - $type: "so.sprk.feed.post", - caption: { - text: post.caption?.text, - facets: post.caption?.facets, - }, - media: post.media as SoSprkFeedPost.Record["media"], - langs: post.langs, - tags: post.tags, - createdAt: post.createdAt, - } satisfies SoSprkFeedPost.Record, - embed: embed, - viewer, - replyCount: replyCountsMap.get(post.uri) || 0, - repostCount: repostCountsMap.get(post.uri) || 0, - likeCount: likeCountsMap.get(post.uri) || 0, - indexedAt: post.indexedAt, - labels, - sound: post.sound?.uri ? audioViewsMap.get(post.sound.uri) : undefined, - }; - }); -} - -// Transform DB post to PostView format -export async function transformPostToPostView( - post: PostDocument, - ctx: AppContext, - userDid?: string, -): Promise { - const postViews = await transformPostsToPostViews([post], ctx, userDid); - return postViews[0]; -} diff --git a/utils/story-transformer.ts b/utils/story-transformer.ts deleted file mode 100644 index 8165245..0000000 --- a/utils/story-transformer.ts +++ /dev/null @@ -1,91 +0,0 @@ -import type * as SoSprkStoryDefs from "../lex/types/so/sprk/story/defs.ts"; -import { StoryDocument } from "../data-plane/db/models.ts"; -import { transformMedia } from "./media-transformer.ts"; -import { createProfileViewBasic } from "./profile-helper.ts"; -import { AppContext } from "../context.ts"; - -// Transform DB story to StoryView format -export async function transformStoryToStoryView( - story: StoryDocument, - ctx: AppContext, -): Promise { - // Create the author object with stories - const authorView = await createProfileViewBasic( - story.authorDid, - ctx, - ); - - const embedView = transformMedia( - story.media, - story.authorDid, - ctx.cfg, - { - firstImageOnly: true, - }, - true, - ); - - return { - uri: story.uri, - cid: story.cid, - author: authorView, - media: embedView, - record: { - media: story.media, - sound: story.sound, - labels: story.labels, - createdAt: story.createdAt, - }, - indexedAt: story.indexedAt, - }; -} - -// Batch transform DB stories to StoryView format for optimal performance -export async function transformStoriesToStoryViews( - stories: StoryDocument[], - ctx: AppContext, -): Promise { - if (stories.length === 0) { - return []; - } - - // Get unique author DIDs - const authorDids = [...new Set(stories.map((s) => s.authorDid))]; - - // Batch fetch all author profiles - const authors = await Promise.all( - authorDids.map((did) => createProfileViewBasic(did, ctx)), - ); - - // Create author map for quick lookup - const authorsMap = new Map(authors.map((author) => [author.did, author])); - - // Transform all stories in parallel - return stories.map((story) => { - const authorView = authorsMap.get(story.authorDid)!; - - const embedView = transformMedia( - story.media, - story.authorDid, - ctx.cfg, - { - firstImageOnly: true, - }, - true, - ); - - return { - uri: story.uri, - cid: story.cid, - author: authorView, - media: embedView, - record: { - media: story.media, - sound: story.sound, - labels: story.labels, - createdAt: story.createdAt, - }, - indexedAt: story.indexedAt, - }; - }); -} diff --git a/views/index.ts b/views/index.ts index 701b197..b9726a9 100644 --- a/views/index.ts +++ b/views/index.ts @@ -1,4 +1,3 @@ -import { AtUri } from "@atproto/api"; import { HydrationState } from "../hydration/index.ts"; import { FeedViewPost, @@ -49,7 +48,8 @@ import { } from "../lex/types/so/sprk/media/video.ts"; import type { Main as VideoMediaMainType } from "../lex/types/so/sprk/media/video.ts"; import { AudioView } from "../lex/types/so/sprk/sound/defs.ts"; -import { INVALID_HANDLE } from "@atp/syntax"; +import { AtUri, INVALID_HANDLE } from "@atp/syntax"; +import { Main as StrongRef } from "../lex/types/com/atproto/repo/strongRef.ts"; import { cidFromBlobJson } from "./util.ts"; import { uriToDid } from "../utils/uris.ts"; import { mapDefined } from "@atp/common"; @@ -216,12 +216,17 @@ export class Views { ? recordInfo.record.media : undefined; + const soundRecord = "sound" in recordInfo.record + ? recordInfo.record.sound as StrongRef + : undefined; + return { uri, cid: recordInfo.cid, author, record: recordInfo.record, media: mediaRecord ? this.media(uri, mediaRecord as Media) : undefined, + sound: soundRecord ? this.soundView(soundRecord.uri, state) : undefined, replyCount: repliesCount, repostCount, likeCount, @@ -728,33 +733,66 @@ export class Views { state: HydrationState, ): Un$Typed | undefined { const soundInfo = state.sounds?.get(uri); - if (!soundInfo) return; + if (!soundInfo) { + return; + } const parsedUri = new AtUri(uri); const authorDid = parsedUri.hostname; const author = this.profileBasic(authorDid, state); - if (!author) return; + if (!author) { + return; + } const soundAgg = state.soundAggs?.get(uri); - const coverArtCid = cidFromBlobJson(soundInfo.record.coverArt as BlobRef); - return { + let coverArtUrl: string; + if (soundInfo.record.coverArt) { + const coverArtCid = cidFromBlobJson(soundInfo.record.coverArt as BlobRef); + coverArtUrl = + `${this.mediaCdn}/img/medium/${authorDid}/${coverArtCid}/webp`; + } else { + coverArtUrl = author.avatar ?? ""; + } + + const details = soundInfo.record.details + ? { + artist: soundInfo.record.details.artist, + title: soundInfo.record.details.title, + } + : undefined; + + const record = { + title: soundInfo.record.title, + origin: soundInfo.record.origin ?? undefined, + sound: soundInfo.record.sound ?? undefined, + labels: soundInfo.record.labels ?? undefined, + createdAt: soundInfo.record.createdAt, + } as Record; + + const audioCid = cidFromBlobJson(soundInfo.record.sound); + const audioUrl = `https://media.sprk.so/sound/${ + encodeURIComponent(authorDid) + }/${encodeURIComponent(audioCid)}`; + + const indexedAt = this.indexedAt(soundInfo)?.toISOString() ?? + new Date().toISOString(); + + const audioView = { uri, cid: soundInfo.cid, author, - record: soundInfo.record, - useCount: soundAgg?.uses ?? 0, title: soundInfo.record.title, - coverArt: `${this.mediaCdn}/img/medium/${authorDid}/${coverArtCid}/webp`, - details: soundInfo.record.details - ? { - artist: soundInfo.record.details.artist, - title: soundInfo.record.details.title, - } - : undefined, - indexedAt: this.indexedAt(soundInfo)?.toISOString() ?? - new Date().toISOString(), + coverArt: coverArtUrl, + record, + useCount: soundAgg?.uses ?? 0, + details, + indexedAt, + audio: audioUrl, + labels: undefined, }; + + return audioView; } generator( -- 2.51.2