diff --git a/.github/workflows/lint-prs.yaml b/.github/workflows/lint-prs.yaml index f56f96d..4b2554b 100644 --- a/.github/workflows/lint-prs.yaml +++ b/.github/workflows/lint-prs.yaml @@ -58,6 +58,10 @@ jobs: deno-version: v2.x cache: true + - name: Generate lex bindings + if: steps.changed_files.outputs.all_changed_files != '' + run: deno task codegen + - name: Lint if: steps.changed_files.outputs.all_changed_files != '' run: deno lint @@ -86,6 +90,10 @@ jobs: deno-version: v2.x cache: true + - name: Generate lex bindings + if: steps.changed_files.outputs.all_changed_files != '' + run: deno task codegen + - name: Test if: steps.changed_files.outputs.all_changed_files != '' run: deno test --allow-all diff --git a/.gitignore b/.gitignore index 85de87e..942ba47 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ test.sqlite **/*.bun /devdb mongo-keyfile +/lex/ diff --git a/Dockerfile b/Dockerfile index af1f407..732ece6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,9 @@ WORKDIR /app COPY . . +RUN deno task codegen RUN deno install EXPOSE 3000 -CMD ["deno", "task", "start"] +CMD ["deno", "run", "-A", "main.ts"] diff --git a/README.md b/README.md index a02ea7e..3e55f43 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ This runs three parallel services: - `hydration/` - Data enrichment layer (actors, feeds, graphs) - `views/` - Presentation layer transforming hydrated data to API responses - `lexicons/` - AT Protocol lexicon definitions (JSON) -- `lex/` - Generated TypeScript types from lexicons +- `lex/` - Generated TypeScript types from lexicons (`deno task codegen`) - `utils/` - Shared utilities (transformers, logger, retry logic) ### Data Flow diff --git a/api/com/atproto/admin/getAccountInfos.ts b/api/com/atproto/admin/getAccountInfos.ts index badfb89..d84bac7 100644 --- a/api/com/atproto/admin/getAccountInfos.ts +++ b/api/com/atproto/admin/getAccountInfos.ts @@ -1,10 +1,14 @@ import { mapDefined } from "@atp/common"; +import type { DatetimeString, HandleString, UnknownObject } from "@atp/lex"; import { INVALID_HANDLE } from "@atp/syntax"; +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; -import { Server } from "../../../../lex/index.ts"; +import * as com from "../../../../lex/com.ts"; +import type { $OutputBody } from "../../../../lex/com/atproto/admin/getAccountInfos.ts"; export default function (server: Server, ctx: AppContext) { - server.com.atproto.admin.getAccountInfos({ + server.add(com.atproto.admin.getAccountInfos, { auth: ctx.authVerifier.optionalStandardOrRole, handler: async ({ params, auth }) => { const { dids } = params; @@ -14,7 +18,7 @@ export default function (server: Server, ctx: AppContext) { includeTakedowns: true, }); - const infos = mapDefined(dids, (did) => { + const infos: $OutputBody["infos"] = mapDefined(dids, (did) => { const info = actors.get(did); if (!info) return; if (info.takedownRef && !includeTakedowns) return; @@ -24,9 +28,12 @@ export default function (server: Server, ctx: AppContext) { return { did, - handle: info.handle ?? INVALID_HANDLE, - relatedRecords: profileRecord ? [profileRecord] : undefined, - indexedAt: (info.sortedAt ?? new Date(0)).toISOString(), + handle: (info.handle ?? INVALID_HANDLE) as HandleString, + relatedRecords: profileRecord + ? [profileRecord as UnknownObject] + : undefined, + indexedAt: (info.sortedAt ?? new Date(0)) + .toISOString() as DatetimeString, }; }); diff --git a/api/com/atproto/admin/getSubjectStatus.ts b/api/com/atproto/admin/getSubjectStatus.ts index 87228f9..62e52ec 100644 --- a/api/com/atproto/admin/getSubjectStatus.ts +++ b/api/com/atproto/admin/getSubjectStatus.ts @@ -1,15 +1,17 @@ -import { InvalidRequestError } from "@atp/xrpc-server"; +import type { CidString } from "@atp/lex"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; -import { Server } from "../../../../lex/index.ts"; -import { OutputSchema } from "../../../../lex/types/com/atproto/admin/getSubjectStatus.ts"; +import * as com from "../../../../lex/com.ts"; +import { $OutputBody } from "../../../../lex/com/atproto/admin/getSubjectStatus.ts"; export default function (server: Server, ctx: AppContext) { - server.com.atproto.admin.getSubjectStatus({ + server.add(com.atproto.admin.getSubjectStatus, { auth: ctx.authVerifier.roleOrModService, handler: async ({ params }) => { const { did, uri, blob } = params; - let body: OutputSchema | null = null; + let body: $OutputBody | null = null; if (blob) { if (!did) { throw new InvalidRequestError( @@ -38,7 +40,7 @@ export default function (server: Server, ctx: AppContext) { subject: { $type: "com.atproto.repo.strongRef", uri, - cid: res.cid, + cid: res.cid as CidString, }, takedown: { applied: !!res.takedownRef, diff --git a/api/com/atproto/admin/updateSubjectStatus.ts b/api/com/atproto/admin/updateSubjectStatus.ts index cdfd661..57f6a7c 100644 --- a/api/com/atproto/admin/updateSubjectStatus.ts +++ b/api/com/atproto/admin/updateSubjectStatus.ts @@ -1,14 +1,43 @@ -import { AuthRequiredError, InvalidRequestError } from "@atp/xrpc-server"; +import { + AuthRequiredError, + InvalidRequestError, + Server, +} from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; -import { Server } from "../../../../lex/index.ts"; +import * as com from "../../../../lex/com.ts"; import { - isRepoBlobRef, - isRepoRef, -} from "../../../../lex/types/com/atproto/admin/defs.ts"; -import { isMain as isStrongRef } from "../../../../lex/types/com/atproto/repo/strongRef.ts"; + repoBlobRef, + repoRef, +} from "../../../../lex/com/atproto/admin/defs.ts"; +import { main as strongRef } from "../../../../lex/com/atproto/repo/strongRef.ts"; +import type { $InputBody } from "../../../../lex/com/atproto/admin/updateSubjectStatus.ts"; + +type Subject = $InputBody["subject"]; +type RepoRefSubject = Extract< + Subject, + { $type: "com.atproto.admin.defs#repoRef" } +>; +type StrongRefSubject = Extract< + Subject, + { $type: "com.atproto.repo.strongRef" } +>; +type RepoBlobRefSubject = Extract< + Subject, + { $type: "com.atproto.admin.defs#repoBlobRef" } +>; + +const isRepoRef = (subject: Subject): subject is RepoRefSubject => + repoRef.isTypeOf(subject as Record); + +const isStrongRef = (subject: Subject): subject is StrongRefSubject => + strongRef.isTypeOf(subject as Record); + +const isRepoBlobRef = (subject: Subject): subject is RepoBlobRefSubject => + repoBlobRef.isTypeOf(subject as Record); export default function (server: Server, ctx: AppContext) { - server.com.atproto.admin.updateSubjectStatus({ + server.add(com.atproto.admin.updateSubjectStatus, { auth: ctx.authVerifier.roleOrModService, handler: async ({ input, auth }) => { const { canPerformTakedown } = ctx.authVerifier.parseCreds(auth); diff --git a/api/com/atproto/identity/resolveHandle.ts b/api/com/atproto/identity/resolveHandle.ts index 0d67a3d..34d2f7d 100644 --- a/api/com/atproto/identity/resolveHandle.ts +++ b/api/com/atproto/identity/resolveHandle.ts @@ -1,10 +1,12 @@ +import type { DidString } from "@atp/lex"; import * as ident from "@atp/syntax"; -import { InvalidRequestError } from "@atp/xrpc-server"; -import { Server } from "../../../../lex/index.ts"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; +import * as com from "../../../../lex/com.ts"; export default function (server: Server, ctx: AppContext) { - server.com.atproto.identity.resolveHandle({ + server.add(com.atproto.identity.resolveHandle, { handler: async ({ params }) => { const { handle } = params; if (!handle) { @@ -21,7 +23,7 @@ export default function (server: Server, ctx: AppContext) { return { encoding: "application/json", - body: { did: actor.did }, + body: { did: actor.did as DidString }, }; }, }); diff --git a/api/com/atproto/repo/getRecord.ts b/api/com/atproto/repo/getRecord.ts index 9f427d6..ef82e71 100644 --- a/api/com/atproto/repo/getRecord.ts +++ b/api/com/atproto/repo/getRecord.ts @@ -1,10 +1,12 @@ +import type { AtUriString, CidString, UnknownObject } from "@atp/lex"; import { AtUri } from "@atp/syntax"; -import { InvalidRequestError } from "@atp/xrpc-server"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; -import { Server } from "../../../../lex/index.ts"; +import * as com from "../../../../lex/com.ts"; export default function (server: Server, ctx: AppContext) { - server.com.atproto.repo.getRecord({ + server.add(com.atproto.repo.getRecord, { auth: ctx.authVerifier.optionalStandardOrRole, handler: async ({ auth, params }) => { const { repo, collection, rkey, cid } = params; @@ -34,9 +36,9 @@ export default function (server: Server, ctx: AppContext) { return { encoding: "application/json" as const, body: { - uri: uri, - cid: result.cid, - value: result.record, + uri: uri as AtUriString, + cid: result.cid as CidString, + value: result.record as UnknownObject, }, }; }, diff --git a/api/index.ts b/api/index.ts index 4c5d370..7539b13 100644 --- a/api/index.ts +++ b/api/index.ts @@ -1,4 +1,5 @@ -import { Server } from "../lex/index.ts"; +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../context.ts"; import getAccountInfos from "./com/atproto/admin/getAccountInfos.ts"; import getSubjectStatus from "./com/atproto/admin/getSubjectStatus.ts"; diff --git a/api/so/sprk/actor/getPreferences.ts b/api/so/sprk/actor/getPreferences.ts index 2d78ad3..4228191 100644 --- a/api/so/sprk/actor/getPreferences.ts +++ b/api/so/sprk/actor/getPreferences.ts @@ -1,15 +1,18 @@ -import { Server } from "../../../../lex/index.ts"; +import type { AtUriString, DatetimeString, DidString } from "@atp/lex"; +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; +import * as so from "../../../../lex/so.ts"; import { ContentLabelPref, MutedWord, Preferences, SavedFeed, ThreadViewPref, -} from "../../../../lex/types/so/sprk/actor/defs.ts"; +} from "../../../../lex/so/sprk/actor/defs.ts"; export default function (server: Server, ctx: AppContext) { - server.so.sprk.actor.getPreferences({ + server.add(so.sprk.actor.getPreferences, { auth: ctx.authVerifier.standard, handler: async ({ auth }) => { const userDid = auth.credentials.iss; @@ -32,7 +35,7 @@ export default function (server: Server, ctx: AppContext) { for (const pref of userPref.contentLabelPrefs) { preferences.push({ $type: "so.sprk.actor.defs#contentLabelPref", - labelerDid: pref.labelerDid, + labelerDid: pref.labelerDid as DidString | undefined, label: pref.label, visibility: pref.visibility as ContentLabelPref["visibility"], }); @@ -52,7 +55,9 @@ export default function (server: Server, ctx: AppContext) { if (userPref.personalDetailsPref) { preferences.push({ $type: "so.sprk.actor.defs#personalDetailsPref", - birthDate: userPref.personalDetailsPref.birthDate, + birthDate: userPref.personalDetailsPref.birthDate as + | DatetimeString + | undefined, }); } @@ -91,6 +96,7 @@ export default function (server: Server, ctx: AppContext) { ...item, targets: item.targets as MutedWord["targets"], actorTarget: item.actorTarget as MutedWord["actorTarget"], + expiresAt: item.expiresAt as DatetimeString | undefined, })), }); } @@ -98,14 +104,17 @@ export default function (server: Server, ctx: AppContext) { if (userPref.hiddenPostsPref) { preferences.push({ $type: "so.sprk.actor.defs#hiddenPostsPref", - items: userPref.hiddenPostsPref.items, + items: userPref.hiddenPostsPref.items as AtUriString[], }); } if (userPref.labelersPref) { preferences.push({ $type: "so.sprk.actor.defs#labelersPref", - labelers: userPref.labelersPref.labelers, + labelers: userPref.labelersPref.labelers.map((item) => ({ + ...item, + did: item.did as DidString, + })), }); } diff --git a/api/so/sprk/actor/getProfile.ts b/api/so/sprk/actor/getProfile.ts index 40f32d1..99a7799 100644 --- a/api/so/sprk/actor/getProfile.ts +++ b/api/so/sprk/actor/getProfile.ts @@ -1,12 +1,13 @@ -import { InvalidRequestError } from "@atp/xrpc-server"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + 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/actor/getProfile.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/actor/getProfile.ts"; import { createPipeline } from "../../../../pipeline.ts"; import { Views } from "../../../../views/index.ts"; import { createHydrateCtxFromAuth, resHeaders } from "../../../util.ts"; @@ -17,7 +18,7 @@ export default function (server: Server, ctx: AppContext) { hydration, presentation, }); - server.so.sprk.actor.getProfile({ + server.add(so.sprk.actor.getProfile, { auth: ctx.authVerifier.optionalStandardOrRole, handler: async ({ auth, params, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -95,7 +96,7 @@ type Context = { views: Views; }; -type Params = QueryParams & { +type Params = $Params & { hydrateCtx: HydrateCtx; }; diff --git a/api/so/sprk/actor/getProfiles.ts b/api/so/sprk/actor/getProfiles.ts index 0138a85..d7a6fcd 100644 --- a/api/so/sprk/actor/getProfiles.ts +++ b/api/so/sprk/actor/getProfiles.ts @@ -1,7 +1,9 @@ +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { HydrateCtx, Hydrator } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/actor/getProfiles.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/actor/getProfiles.ts"; import { createPipeline, mapSkeletonList, @@ -17,7 +19,7 @@ export default function (server: Server, ctx: AppContext) { hydration, presentation, }); - server.so.sprk.actor.getProfiles({ + server.add(so.sprk.actor.getProfiles, { auth: ctx.authVerifier.standardOptional, handler: async ({ auth, params, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -74,7 +76,7 @@ type Context = { views: Views; }; -type Params = QueryParams & { +type Params = $Params & { hydrateCtx: HydrateCtx; }; diff --git a/api/so/sprk/actor/putPreferences.ts b/api/so/sprk/actor/putPreferences.ts index 5350cfc..6e59ffb 100644 --- a/api/so/sprk/actor/putPreferences.ts +++ b/api/so/sprk/actor/putPreferences.ts @@ -1,4 +1,8 @@ -import { Server } from "../../../../lex/index.ts"; +import { Server } from "@atp/xrpc-server"; + +import { PreferenceDocument } from "../../../../data-plane/db/models.ts"; +import { AppContext } from "../../../../context.ts"; +import * as so from "../../../../lex/so.ts"; import { ContentLabelPref, FeedViewPref, @@ -9,12 +13,10 @@ import { PersonalDetailsPref, SavedFeedsPref, ThreadViewPref, -} from "../../../../lex/types/so/sprk/actor/defs.ts"; -import { PreferenceDocument } from "../../../../data-plane/db/models.ts"; -import { AppContext } from "../../../../context.ts"; +} from "../../../../lex/so/sprk/actor/defs.ts"; export default function (server: Server, ctx: AppContext) { - server.so.sprk.actor.putPreferences({ + server.add(so.sprk.actor.putPreferences, { auth: ctx.authVerifier.standard, handler: async ({ input, auth }) => { const userDid = auth.credentials.iss; @@ -63,7 +65,7 @@ export default function (server: Server, ctx: AppContext) { feedViewPrefs.push({ feed: p.feed, hideReplies: p.hideReplies, - hideRepliesByUnfollowed: p.hideRepliesByUnfollowed, + hideRepliesByUnfollowed: p.hideRepliesByUnfollowed ?? true, hideRepliesByLikeCount: p.hideRepliesByLikeCount, hideReposts: p.hideReposts, hideQuotePosts: p.hideQuotePosts, @@ -87,7 +89,10 @@ export default function (server: Server, ctx: AppContext) { case "so.sprk.actor.defs#mutedWordsPref": { const p = pref as MutedWordsPref; updateData.mutedWordsPref = { - items: p.items ?? [], + items: (p.items ?? []).map((item) => ({ + ...item, + actorTarget: item.actorTarget ?? "all", + })), }; break; } diff --git a/api/so/sprk/actor/searchActors.ts b/api/so/sprk/actor/searchActors.ts index 7a1c7a2..7e87c7b 100644 --- a/api/so/sprk/actor/searchActors.ts +++ b/api/so/sprk/actor/searchActors.ts @@ -1,9 +1,11 @@ +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { DataPlane } from "../../../../data-plane/index.ts"; import { HydrateCtx, Hydrator } from "../../../../hydration/index.ts"; import { parseString } from "../../../../hydration/util.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/actor/searchActors.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/actor/searchActors.ts"; import { createPipeline, filterSkeletonList, @@ -23,7 +25,7 @@ export default function (server: Server, ctx: AppContext) { rules: noBlocks, presentation, }); - server.so.sprk.actor.searchActors({ + server.add(so.sprk.actor.searchActors, { auth: ctx.authVerifier.standardOptional, handler: async ({ auth, params, req }) => { const cleanedQuery = params.q?.trim() ?? ""; @@ -112,7 +114,7 @@ type Context = { views: Views; }; -type Params = QueryParams & { hydrateCtx: HydrateCtx }; +type Params = $Params & { hydrateCtx: HydrateCtx }; type Skeleton = { dids: string[]; diff --git a/api/so/sprk/actor/searchActorsTypeahead.ts b/api/so/sprk/actor/searchActorsTypeahead.ts index 2d29f0b..1138989 100644 --- a/api/so/sprk/actor/searchActorsTypeahead.ts +++ b/api/so/sprk/actor/searchActorsTypeahead.ts @@ -1,8 +1,10 @@ +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { DataPlane } from "../../../../data-plane/index.ts"; import { HydrateCtx, Hydrator } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/actor/searchActorsTypeahead.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/actor/searchActorsTypeahead.ts"; import { createPipeline, filterSkeletonList, @@ -23,7 +25,7 @@ export default function (server: Server, ctx: AppContext) { presentation, }); - server.so.sprk.actor.searchActorsTypeahead({ + server.add(so.sprk.actor.searchActorsTypeahead, { auth: ctx.authVerifier.standardOptional, handler: async ({ auth, params, req }) => { const cleanedQuery = params.q?.trim() ?? ""; @@ -115,7 +117,7 @@ type Context = { views: Views; }; -type Params = QueryParams & { hydrateCtx: HydrateCtx }; +type Params = $Params & { hydrateCtx: HydrateCtx }; type Skeleton = { dids: string[]; diff --git a/api/so/sprk/feed/getActorLikes.ts b/api/so/sprk/feed/getActorLikes.ts index 0b4dd97..77c09b4 100644 --- a/api/so/sprk/feed/getActorLikes.ts +++ b/api/so/sprk/feed/getActorLikes.ts @@ -1,11 +1,12 @@ -import { InvalidRequestError } from "@atp/xrpc-server"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { DataPlane } from "../../../../data-plane/index.ts"; import { FeedItem } from "../../../../hydration/feed.ts"; import { HydrateCtx, Hydrator } from "../../../../hydration/index.ts"; import { parseString } from "../../../../hydration/util.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/feed/getActorLikes.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/feed/getActorLikes.ts"; import { createPipeline, filterSkeletonList, @@ -28,7 +29,7 @@ export default function (server: Server, ctx: AppContext) { rules: noPostBlocks, presentation, }); - server.so.sprk.feed.getActorLikes({ + server.add(so.sprk.feed.getActorLikes, { auth: ctx.authVerifier.standardOptional, handler: async ({ params, auth, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -116,7 +117,7 @@ type Context = { dataplane: DataPlane; }; -type Params = QueryParams & { hydrateCtx: HydrateCtx }; +type Params = $Params & { hydrateCtx: HydrateCtx }; type Skeleton = { items: FeedItem[]; diff --git a/api/so/sprk/feed/getActorReposts.ts b/api/so/sprk/feed/getActorReposts.ts index dccb55f..bc0aaae 100644 --- a/api/so/sprk/feed/getActorReposts.ts +++ b/api/so/sprk/feed/getActorReposts.ts @@ -1,4 +1,5 @@ -import { InvalidRequestError } from "@atp/xrpc-server"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { DataPlane } from "../../../../data-plane/index.ts"; import { FeedItem } from "../../../../hydration/feed.ts"; @@ -8,8 +9,8 @@ import { mergeManyStates, } from "../../../../hydration/index.ts"; import { parseString } from "../../../../hydration/util.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/feed/getActorLikes.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/feed/getActorReposts.ts"; import { createPipeline, filterSkeletonList, @@ -32,7 +33,7 @@ export default function (server: Server, ctx: AppContext) { rules: noPostBlocks, presentation, }); - server.so.sprk.feed.getActorReposts({ + server.add(so.sprk.feed.getActorReposts, { auth: ctx.authVerifier.standardOptional, handler: async ({ params, auth, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -175,7 +176,7 @@ type Context = { dataplane: DataPlane; }; -type Params = QueryParams & { hydrateCtx: HydrateCtx }; +type Params = $Params & { hydrateCtx: HydrateCtx }; type Skeleton = { actorDid: string; diff --git a/api/so/sprk/feed/getAuthorFeed.ts b/api/so/sprk/feed/getAuthorFeed.ts index 1213592..8a6ce02 100644 --- a/api/so/sprk/feed/getAuthorFeed.ts +++ b/api/so/sprk/feed/getAuthorFeed.ts @@ -1,4 +1,5 @@ -import { InvalidRequestError } from "@atp/xrpc-server"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { DataPlane } from "../../../../data-plane/index.ts"; import { Actor } from "../../../../hydration/actor.ts"; @@ -10,8 +11,8 @@ import { mergeStates, } from "../../../../hydration/index.ts"; import { parseString } from "../../../../hydration/util.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/feed/getAuthorFeed.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/feed/getAuthorFeed.ts"; import { createPipeline, filterSkeletonList, @@ -32,7 +33,7 @@ export default function (server: Server, ctx: AppContext) { rules: noBlocksOrMutes, presentation, }); - server.so.sprk.feed.getAuthorFeed({ + server.add(so.sprk.feed.getAuthorFeed, { auth: ctx.authVerifier.optionalStandardOrRole, handler: async ({ params, auth, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -181,13 +182,13 @@ type Context = { dataplane: DataPlane; }; -type Params = QueryParams & { +type Params = $Params & { hydrateCtx: HydrateCtx; }; type Skeleton = { actor: Actor; items: FeedItem[]; - filter: QueryParams["filter"]; + filter: $Params["filter"]; cursor?: string; }; diff --git a/api/so/sprk/feed/getCrosspostThread.ts b/api/so/sprk/feed/getCrosspostThread.ts index b208d3b..20c7285 100644 --- a/api/so/sprk/feed/getCrosspostThread.ts +++ b/api/so/sprk/feed/getCrosspostThread.ts @@ -1,4 +1,6 @@ -import { InvalidRequestError } from "@atp/xrpc-server"; +import type { AtUriString, CidString, DatetimeString } from "@atp/lex"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { ServerConfig } from "../../../../config.ts"; import { AppContext } from "../../../../context.ts"; import { DataPlane } from "../../../../data-plane/index.ts"; @@ -11,12 +13,12 @@ import { PostBlock, } from "../../../../hydration/index.ts"; import { HydrationMap } from "../../../../hydration/util.ts"; -import { Server } from "../../../../lex/index.ts"; +import * as so from "../../../../lex/so.ts"; import { - OutputSchema, - QueryParams, + $OutputBody, + $Params, ThreadItem, -} from "../../../../lex/types/so/sprk/feed/getCrosspostThread.ts"; +} from "../../../../lex/so/sprk/feed/getCrosspostThread.ts"; import { createPipeline } from "../../../../pipeline.ts"; import { uriToDid } from "../../../../utils/uris.ts"; import { Views } from "../../../../views/index.ts"; @@ -34,7 +36,7 @@ export default function (server: Server, ctx: AppContext) { presentation, }); - server.so.sprk.feed.getCrosspostThread({ + server.add(so.sprk.feed.getCrosspostThread, { auth: ctx.authVerifier.optionalStandardOrRole, handler: async ({ params, auth, req, res }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -42,7 +44,7 @@ export default function (server: Server, ctx: AppContext) { const repoRevPromise = ctx.hydrator.actor.getRepoRevSafe( hydrateCtx.viewer, ); - let result: OutputSchema; + let result: $OutputBody; try { result = await getCrosspostThread({ ...params, hydrateCtx }, ctx); } catch (err) { @@ -71,6 +73,8 @@ const skeleton = async ( ): Promise => { const { ctx, params } = inputs; const anchor = await ctx.hydrator.resolveUri(params.anchor); + const depth = params.depth ?? 6; + const limit = params.limit ?? 50; try { const result = await ctx.dataplane.crosspostThread.getThread( @@ -78,7 +82,7 @@ const skeleton = async ( params.parentHeight, getThreadDepth({ anchor, - depth: params.depth, + depth, maxThreadDepth: ctx.cfg.maxThreadDepth, bigThreadUris: ctx.cfg.bigThreadUris, bigThreadDepth: ctx.cfg.bigThreadDepth, @@ -89,7 +93,7 @@ const skeleton = async ( ? result.items : await filterTakenDownItems(ctx.dataplane, result.items); const anchorFound = visibleItems.some((item) => item.uri === anchor); - const page = paginateThreadItems(visibleItems, params.limit, params.cursor); + const page = paginateThreadItems(visibleItems, limit, params.cursor); return { anchor, anchorFound, @@ -140,7 +144,7 @@ const presentation = ( skeleton: Skeleton; hydration: HydrationState; }, -): OutputSchema => { +): $OutputBody => { const { ctx, skeleton, hydration } = inputs; if (!skeleton.anchorFound) { @@ -153,7 +157,7 @@ const presentation = ( const thread = skeleton.items.map((item) => { return { $type: "so.sprk.feed.getCrosspostThread#threadItem", - uri: item.uri, + uri: item.uri as AtUriString, depth: item.depth, value: toThreadValue(ctx, hydration, item), } as ThreadItem; @@ -193,14 +197,14 @@ const toThreadValue = ( $type: "so.sprk.feed.defs#threadViewPost", post: { $type: "so.sprk.feed.defs#postView", - uri: item.uri, - cid: item.cid, + uri: item.uri as AtUriString, + cid: item.cid as CidString, author, record, replyCount: item.replyCount, repostCount: item.repostCount, likeCount: item.likeCount, - indexedAt: item.indexedAt, + indexedAt: item.indexedAt as DatetimeString, }, }; } @@ -209,13 +213,13 @@ const toThreadValue = ( $type: "so.sprk.feed.defs#threadViewPost", post: { $type: "so.sprk.feed.defs#replyView", - uri: item.uri, - cid: item.cid, + uri: item.uri as AtUriString, + cid: item.cid as CidString, author, record, replyCount: item.replyCount, likeCount: item.likeCount, - indexedAt: item.indexedAt, + indexedAt: item.indexedAt as DatetimeString, }, }; }; @@ -359,7 +363,7 @@ type Context = { cfg: ServerConfig; }; -type Params = QueryParams & { hydrateCtx: HydrateCtx }; +type Params = $Params & { hydrateCtx: HydrateCtx }; type Skeleton = { anchor: string; diff --git a/api/so/sprk/feed/getFeed.ts b/api/so/sprk/feed/getFeed.ts index 602b6c1..60a0e67 100644 --- a/api/so/sprk/feed/getFeed.ts +++ b/api/so/sprk/feed/getFeed.ts @@ -2,6 +2,7 @@ import { noUndefinedVals } from "@atp/common"; import { ResponseType, XrpcClient, XRPCError } from "@atp/xrpc"; import { InvalidRequestError, + Server, ServerTimer, serverTimingHeader, UpstreamFailureError, @@ -14,10 +15,9 @@ import { } from "../../../../data-plane/util.ts"; import { FeedItem } from "../../../../hydration/feed.ts"; import { HydrateCtx } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; -import { ids, lexicons } from "../../../../lex/lexicons.ts"; -import { QueryParams as GetFeedParams } from "../../../../lex/types/so/sprk/feed/getFeed.ts"; -import { OutputSchema as SkeletonOutput } from "../../../../lex/types/so/sprk/feed/getFeedSkeleton.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params as GetFeedParams } from "../../../../lex/so/sprk/feed/getFeed.ts"; +import { $OutputBody as SkeletonOutput } from "../../../../lex/so/sprk/feed/getFeedSkeleton.ts"; import { createPipeline, filterSkeletonList, @@ -48,12 +48,12 @@ export default function (server: Server, ctx: AppContext) { rules: noBlocksOrMutes, presentation, }); - server.so.sprk.feed.getFeed({ + server.add(so.sprk.feed.getFeed, { auth: ctx.authVerifier.standardOptionalParameterized({ lxmCheck: (method) => { return ( - method === ids.SoSprkFeedGetFeedSkeleton || - method === ids.SoSprkFeedGetFeed + method === so.sprk.feed.getFeedSkeleton.$lxm || + method === so.sprk.feed.getFeed.$lxm ); }, skipAudCheck: true, @@ -206,25 +206,21 @@ const skeletonFromFeedGen = async ( ); } - const client = new XrpcClient(fgEndpoint, lexicons); + const client = new XrpcClient(fgEndpoint); let skeleton: SkeletonOutput; let resHeaders: Record | undefined = undefined; try { // @TODO currently passthrough auth headers from pds - const result = await client.call( - "so.sprk.feed.getFeedSkeleton", - { + const result = await client.call(so.sprk.feed.getFeedSkeleton, { + params: { feed: params.feed, // The feedgen is not guaranteed to honor the limit, but we try it. limit: params.limit, cursor: params.cursor, }, - undefined, - { - headers, - }, - ); + headers, + }); skeleton = result.data; diff --git a/api/so/sprk/feed/getFeedGenerator.ts b/api/so/sprk/feed/getFeedGenerator.ts index 640ff95..4658001 100644 --- a/api/so/sprk/feed/getFeedGenerator.ts +++ b/api/so/sprk/feed/getFeedGenerator.ts @@ -1,9 +1,11 @@ +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; -import { Server } from "../../../../lex/index.ts"; +import * as so from "../../../../lex/so.ts"; import { createHydrateCtxFromAuth, resHeaders } from "../../../util.ts"; export default function (server: Server, ctx: AppContext) { - server.so.sprk.feed.getFeedGenerator({ + server.add(so.sprk.feed.getFeedGenerator, { auth: ctx.authVerifier.optionalStandardOrRole, handler: async ({ params, auth, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); diff --git a/api/so/sprk/feed/getFeedGenerators.ts b/api/so/sprk/feed/getFeedGenerators.ts index 75dc83d..1ded982 100644 --- a/api/so/sprk/feed/getFeedGenerators.ts +++ b/api/so/sprk/feed/getFeedGenerators.ts @@ -1,9 +1,11 @@ +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; -import { Server } from "../../../../lex/index.ts"; +import * as so from "../../../../lex/so.ts"; import { createHydrateCtxFromAuth, resHeaders } from "../../../util.ts"; export default function (server: Server, ctx: AppContext) { - server.so.sprk.feed.getFeedGenerators({ + server.add(so.sprk.feed.getFeedGenerators, { auth: ctx.authVerifier.optionalStandardOrRole, handler: async ({ params, auth, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); diff --git a/api/so/sprk/feed/getPostThread.ts b/api/so/sprk/feed/getPostThread.ts index ea06690..f0cedb2 100644 --- a/api/so/sprk/feed/getPostThread.ts +++ b/api/so/sprk/feed/getPostThread.ts @@ -1,15 +1,15 @@ -import { InvalidRequestError } from "@atp/xrpc-server"; +import { Server } from "@atp/xrpc-server"; + import { ServerConfig } from "../../../../config.ts"; import { AppContext } from "../../../../context.ts"; import { DataPlane } from "../../../../data-plane/index.ts"; import { Code, isDataPlaneError } from "../../../../data-plane/util.ts"; import { HydrateCtx, Hydrator } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; -import { isNotFoundPost } from "../../../../lex/types/app/bsky/feed/defs.ts"; +import * as so from "../../../../lex/so.ts"; import { - OutputSchema, - QueryParams, -} from "../../../../lex/types/so/sprk/feed/getPostThread.ts"; + $OutputBody, + $Params, +} from "../../../../lex/so/sprk/feed/getPostThread.ts"; import { createPipeline, HydrationFnInput, @@ -30,7 +30,7 @@ export default function (server: Server, ctx: AppContext) { hydration, presentation, }); - server.so.sprk.feed.getPostThread({ + server.add(so.sprk.feed.getPostThread, { auth: ctx.authVerifier.optionalStandardOrRole, handler: async ({ params, auth, req, res }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -40,7 +40,7 @@ export default function (server: Server, ctx: AppContext) { hydrateCtx.viewer, ); - let result: OutputSchema; + let result: $OutputBody; try { result = await getPostThread({ ...params, hydrateCtx }, ctx); } catch (err) { @@ -67,13 +67,14 @@ export default function (server: Server, ctx: AppContext) { const skeleton = async (inputs: SkeletonFnInput) => { const { ctx, params } = inputs; const anchor = await ctx.hydrator.resolveUri(params.anchor); + const depth = params.depth ?? 6; try { const res = await ctx.dataplane.threads.getThread( anchor, params.parentHeight, getThreadDepth({ anchor, - depth: params.depth, + depth, maxThreadDepth: ctx.cfg.maxThreadDepth, bigThreadUris: ctx.cfg.bigThreadUris, bigThreadDepth: ctx.cfg.bigThreadDepth, @@ -112,19 +113,12 @@ const presentation = ( const thread = ctx.views.thread(skeleton, hydration, { depth: getThreadDepth({ anchor: skeleton.anchor, - depth: params.depth, + depth: params.depth ?? 6, maxThreadDepth: ctx.cfg.maxThreadDepth, bigThreadUris: ctx.cfg.bigThreadUris, bigThreadDepth: ctx.cfg.bigThreadDepth, }), }); - if (isNotFoundPost(thread)) { - // @TODO technically this could be returned as a NotFoundPost based on lexicon - throw new InvalidRequestError( - `Post not found: ${skeleton.anchor}`, - "NotFound", - ); - } return { thread }; }; @@ -135,7 +129,7 @@ type Context = { cfg: ServerConfig; }; -type Params = QueryParams & { hydrateCtx: HydrateCtx }; +type Params = $Params & { hydrateCtx: HydrateCtx }; type Skeleton = { anchor: string; diff --git a/api/so/sprk/feed/getPosts.ts b/api/so/sprk/feed/getPosts.ts index ec79dee..82820d0 100644 --- a/api/so/sprk/feed/getPosts.ts +++ b/api/so/sprk/feed/getPosts.ts @@ -1,8 +1,10 @@ import { dedupeStrs } from "@atp/common"; +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { HydrateCtx, Hydrator } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/feed/getPosts.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/feed/getPosts.ts"; import { createPipeline, filterSkeletonList, @@ -21,7 +23,7 @@ export default function (server: Server, ctx: AppContext) { rules: noBlocks, presentation, }); - server.so.sprk.feed.getPosts({ + server.add(so.sprk.feed.getPosts, { auth: ctx.authVerifier.standardOptional, handler: async ({ params, auth, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -81,7 +83,7 @@ type Context = { views: Views; }; -type Params = QueryParams & { hydrateCtx: HydrateCtx }; +type Params = $Params & { hydrateCtx: HydrateCtx }; type Skeleton = { posts: string[]; diff --git a/api/so/sprk/feed/getSuggestedFeeds.ts b/api/so/sprk/feed/getSuggestedFeeds.ts index 753a5c1..67433fb 100644 --- a/api/so/sprk/feed/getSuggestedFeeds.ts +++ b/api/so/sprk/feed/getSuggestedFeeds.ts @@ -1,11 +1,13 @@ import { mapDefined } from "@atp/common"; +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { parseString } from "../../../../hydration/util.ts"; -import { Server } from "../../../../lex/index.ts"; +import * as so from "../../../../lex/so.ts"; import { createHydrateCtxFromAuth, resHeaders } from "../../../util.ts"; export default function (server: Server, ctx: AppContext) { - server.so.sprk.feed.getSuggestedFeeds({ + server.add(so.sprk.feed.getSuggestedFeeds, { auth: ctx.authVerifier.standardOptional, handler: async ({ auth, params, req }) => { // @NOTE no need to coordinate the cursor for appview swap, as v1 doesn't use the cursor diff --git a/api/so/sprk/feed/getTimeline.ts b/api/so/sprk/feed/getTimeline.ts index d2d1806..e65a09b 100644 --- a/api/so/sprk/feed/getTimeline.ts +++ b/api/so/sprk/feed/getTimeline.ts @@ -1,3 +1,5 @@ +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { DataPlane } from "../../../../data-plane/index.ts"; import { FeedItem } from "../../../../hydration/feed.ts"; @@ -7,8 +9,8 @@ import { Hydrator, } from "../../../../hydration/index.ts"; import { parseString } from "../../../../hydration/util.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/feed/getTimeline.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/feed/getTimeline.ts"; import { createPipeline, filterSkeletonList, @@ -28,7 +30,7 @@ export default function (server: Server, ctx: AppContext) { rules: noBlocksOrMutes, presentation, }); - server.so.sprk.feed.getTimeline({ + server.add(so.sprk.feed.getTimeline, { auth: ctx.authVerifier.standard, handler: async ({ params, auth, req }) => { const viewer = auth.credentials.iss; @@ -124,7 +126,7 @@ type Context = { dataplane: DataPlane; }; -type Params = QueryParams & { hydrateCtx: HydrateCtx & { viewer: string } }; +type Params = $Params & { hydrateCtx: HydrateCtx & { viewer: string } }; type Skeleton = { items: FeedItem[]; diff --git a/api/so/sprk/feed/searchPosts.ts b/api/so/sprk/feed/searchPosts.ts index c7b6eae..03bcadd 100644 --- a/api/so/sprk/feed/searchPosts.ts +++ b/api/so/sprk/feed/searchPosts.ts @@ -1,10 +1,12 @@ +import { Server } from "@atp/xrpc-server"; + import { ServerConfig } from "../../../../config.ts"; import { AppContext } from "../../../../context.ts"; import { DataPlane } from "../../../../data-plane/index.ts"; import { HydrateCtx, Hydrator } from "../../../../hydration/index.ts"; import { parseString } from "../../../../hydration/util.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/feed/searchPosts.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/feed/searchPosts.ts"; import { createPipeline, filterSkeletonList, @@ -25,7 +27,7 @@ export default function (server: Server, ctx: AppContext) { rules: noBlocksOrTagged, presentation, }); - server.so.sprk.feed.searchPosts({ + server.add(so.sprk.feed.searchPosts, { auth: ctx.authVerifier.standardOptional, handler: async ({ auth, params, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -111,7 +113,7 @@ type Context = { views: Views; }; -type Params = QueryParams & { +type Params = $Params & { hydrateCtx: HydrateCtx; }; diff --git a/api/so/sprk/graph/getBlocks.ts b/api/so/sprk/graph/getBlocks.ts index 99758a1..2a9d2e3 100644 --- a/api/so/sprk/graph/getBlocks.ts +++ b/api/so/sprk/graph/getBlocks.ts @@ -1,8 +1,10 @@ import { mapDefined } from "@atp/common"; +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { HydrateCtx, Hydrator } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/graph/getBlocks.ts"; +import { $Params } from "../../../../lex/so/sprk/graph/getBlocks.ts"; +import * as so from "../../../../lex/so.ts"; import { createPipeline, HydrationFnInput, @@ -23,7 +25,7 @@ export default function (server: Server, ctx: AppContext) { hydration, presentation, }); - server.so.sprk.graph.getBlocks({ + server.add(so.sprk.graph.getBlocks, { auth: ctx.authVerifier.standard, handler: async ({ params, auth, req }) => { const viewer = auth.credentials.iss; @@ -92,7 +94,7 @@ type Context = { views: Views; }; -type Params = QueryParams & { +type Params = $Params & { hydrateCtx: HydrateCtx & { viewer: string }; }; diff --git a/api/so/sprk/graph/getFollowers.ts b/api/so/sprk/graph/getFollowers.ts index bfccac0..d26c352 100644 --- a/api/so/sprk/graph/getFollowers.ts +++ b/api/so/sprk/graph/getFollowers.ts @@ -1,12 +1,13 @@ -import { InvalidRequestError } from "@atp/xrpc-server"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { HydrateCtx, Hydrator, mergeStates, } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/graph/getFollowers.ts"; +import { $Params } from "../../../../lex/so/sprk/graph/getFollowers.ts"; +import * as so from "../../../../lex/so.ts"; import { createPipeline, filterSkeletonList, @@ -31,7 +32,7 @@ export default function (server: Server, ctx: AppContext) { rules: noBlocks, presentation, }); - server.so.sprk.graph.getFollowers({ + server.add(so.sprk.graph.getFollowers, { auth: ctx.authVerifier.optionalStandardOrRole, handler: async ({ params, auth, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -128,7 +129,7 @@ type Context = { views: Views; }; -type Params = QueryParams & { +type Params = $Params & { hydrateCtx: HydrateCtx; }; diff --git a/api/so/sprk/graph/getFollows.ts b/api/so/sprk/graph/getFollows.ts index feef7b0..0d315b3 100644 --- a/api/so/sprk/graph/getFollows.ts +++ b/api/so/sprk/graph/getFollows.ts @@ -1,12 +1,13 @@ -import { InvalidRequestError } from "@atp/xrpc-server"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { HydrateCtx, Hydrator, mergeStates, } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/graph/getFollowers.ts"; +import { $Params } from "../../../../lex/so/sprk/graph/getFollows.ts"; +import * as so from "../../../../lex/so.ts"; import { createPipeline, filterSkeletonList, @@ -30,7 +31,7 @@ export default function (server: Server, ctx: AppContext) { rules: noBlocks, presentation, }); - server.so.sprk.graph.getFollows({ + server.add(so.sprk.graph.getFollows, { auth: ctx.authVerifier.optionalStandardOrRole, handler: async ({ params, auth, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -138,7 +139,7 @@ type Context = { views: Views; }; -type Params = QueryParams & { +type Params = $Params & { hydrateCtx: HydrateCtx; }; diff --git a/api/so/sprk/labeler/getServices.ts b/api/so/sprk/labeler/getServices.ts index 79bf757..b3daf63 100644 --- a/api/so/sprk/labeler/getServices.ts +++ b/api/so/sprk/labeler/getServices.ts @@ -1,10 +1,11 @@ import { mapDefined } from "@atp/common"; import { AppContext } from "../../../../context.ts"; -import { Server } from "../../../../lex/index.ts"; +import { Server } from "@atp/xrpc-server"; +import * as so from "../../../../lex/so.ts"; import { createHydrateCtxFromAuth, resHeaders } from "../../../util.ts"; export default function (server: Server, ctx: AppContext) { - server.so.sprk.labeler.getServices({ + server.add(so.sprk.labeler.getServices, { auth: ctx.authVerifier.standardOptional, handler: async ({ params, auth, req }) => { const { dids, detailed } = params; @@ -13,19 +14,9 @@ export default function (server: Server, ctx: AppContext) { const views = mapDefined(dids, (did) => { if (detailed) { - const view = ctx.views.labelerDetailed(did, hydration); - if (!view) return; - return { - ...view, - $type: "so.sprk.labeler.defs#labelerViewDetailed", - }; + return ctx.views.labelerDetailed(did, hydration); } else { - const view = ctx.views.labeler(did, hydration); - if (!view) return; - return { - ...view, - $type: "so.sprk.labeler.defs#labelerView", - }; + return ctx.views.labeler(did, hydration); } }); diff --git a/api/so/sprk/notification/getUnreadCount.ts b/api/so/sprk/notification/getUnreadCount.ts index 513ca06..e8e855c 100644 --- a/api/so/sprk/notification/getUnreadCount.ts +++ b/api/so/sprk/notification/getUnreadCount.ts @@ -1,8 +1,9 @@ -import { InvalidRequestError } from "@atp/xrpc-server"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { Hydrator } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/notification/getUnreadCount.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/notification/getUnreadCount.ts"; import { createPipeline, HydrationFnInput, @@ -16,7 +17,7 @@ export default function (server: Server, ctx: AppContext) { hydration, presentation, }); - server.so.sprk.notification.getUnreadCount({ + server.add(so.sprk.notification.getUnreadCount, { auth: ctx.authVerifier.standard, handler: async ({ auth, params }) => { const viewer = auth.credentials.iss; @@ -70,7 +71,7 @@ type Context = { hydrator: Hydrator; }; -type Params = QueryParams & { +type Params = $Params & { viewer: string; }; diff --git a/api/so/sprk/notification/listNotifications.ts b/api/so/sprk/notification/listNotifications.ts index c17819d..4a2c86e 100644 --- a/api/so/sprk/notification/listNotifications.ts +++ b/api/so/sprk/notification/listNotifications.ts @@ -1,10 +1,12 @@ -import { InvalidRequestError } from "@atp/xrpc-server"; +import type { DatetimeString } from "@atp/lex"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { ServerConfig } from "../../../../config.ts"; import { AppContext } from "../../../../context.ts"; import { Notification } from "../../../../data-plane/routes/notifs.ts"; import { HydrateCtx, Hydrator } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/notification/listNotifications.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/notification/listNotifications.ts"; import { createPipeline, filterSkeletonList, @@ -24,7 +26,7 @@ export default function (server: Server, ctx: AppContext) { rules: noBlockOrMutesOrNeedsFiltering, presentation, }); - server.so.sprk.notification.listNotifications({ + server.add(so.sprk.notification.listNotifications, { auth: ctx.authVerifier.standard, handler: async ({ params, auth, req }) => { const viewer = auth.credentials.iss; @@ -135,7 +137,7 @@ const skeleton = async ( priority, reasons: params.reasons, cursor: delayedCursor, - limit: params.limit, + limit: params.limit ?? 50, viewer, }), ctx.hydrator.dataplane.notifications.getNotificationSeen( @@ -220,7 +222,7 @@ const presentation = ( notifications, cursor, priority: skeleton.priority, - seenAt: skeleton.lastSeenNotifs, + seenAt: skeleton.lastSeenNotifs as DatetimeString | undefined, }; }; @@ -230,7 +232,7 @@ type Context = { cfg: ServerConfig; }; -type Params = QueryParams & { +type Params = $Params & { hydrateCtx: HydrateCtx & { viewer: string }; }; diff --git a/api/so/sprk/notification/registerPush.ts b/api/so/sprk/notification/registerPush.ts index 6551ddb..ae719b4 100644 --- a/api/so/sprk/notification/registerPush.ts +++ b/api/so/sprk/notification/registerPush.ts @@ -1,8 +1,10 @@ +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; -import { Server } from "../../../../lex/index.ts"; +import * as so from "../../../../lex/so.ts"; export default function (server: Server, ctx: AppContext) { - server.so.sprk.notification.registerPush({ + server.add(so.sprk.notification.registerPush, { auth: ctx.authVerifier.standard, handler: async ({ input, auth }) => { const viewer = auth.credentials.iss; diff --git a/api/so/sprk/notification/unregisterPush.ts b/api/so/sprk/notification/unregisterPush.ts index 351c50c..e603d89 100644 --- a/api/so/sprk/notification/unregisterPush.ts +++ b/api/so/sprk/notification/unregisterPush.ts @@ -1,8 +1,10 @@ +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; -import { Server } from "../../../../lex/index.ts"; +import * as so from "../../../../lex/so.ts"; export default function (server: Server, ctx: AppContext) { - server.so.sprk.notification.unregisterPush({ + server.add(so.sprk.notification.unregisterPush, { auth: ctx.authVerifier.standard, handler: async ({ input, auth }) => { const viewer = auth.credentials.iss; diff --git a/api/so/sprk/notification/updateSeen.ts b/api/so/sprk/notification/updateSeen.ts index 19aeb3f..68abb75 100644 --- a/api/so/sprk/notification/updateSeen.ts +++ b/api/so/sprk/notification/updateSeen.ts @@ -1,8 +1,10 @@ +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; -import { Server } from "../../../../lex/index.ts"; +import * as so from "../../../../lex/so.ts"; export default function (server: Server, ctx: AppContext) { - server.so.sprk.notification.updateSeen({ + server.add(so.sprk.notification.updateSeen, { auth: ctx.authVerifier.standard, handler: async ({ input, auth }) => { const viewer = auth.credentials.iss; diff --git a/api/so/sprk/sound/getActorAudios.ts b/api/so/sprk/sound/getActorAudios.ts index 908e65a..1e9cb32 100644 --- a/api/so/sprk/sound/getActorAudios.ts +++ b/api/so/sprk/sound/getActorAudios.ts @@ -1,9 +1,10 @@ -import { InvalidRequestError } from "@atp/xrpc-server"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { DataPlane } from "../../../../data-plane/index.ts"; import { HydrateCtx, Hydrator } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/sound/getActorAudios.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/sound/getActorAudios.ts"; import { createPipeline, filterSkeletonList, @@ -22,7 +23,7 @@ export default function (server: Server, ctx: AppContext) { rules: noBlocks, presentation, }); - server.so.sprk.sound.getActorAudios({ + server.add(so.sprk.sound.getActorAudios, { auth: ctx.authVerifier.standardOptional, handler: async ({ params, auth, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -102,7 +103,7 @@ type Context = { views: Views; }; -type Params = QueryParams & { hydrateCtx: HydrateCtx }; +type Params = $Params & { hydrateCtx: HydrateCtx }; type Skeleton = { audios: string[]; diff --git a/api/so/sprk/sound/getAudioPosts.ts b/api/so/sprk/sound/getAudioPosts.ts index 818b4f8..681fae9 100644 --- a/api/so/sprk/sound/getAudioPosts.ts +++ b/api/so/sprk/sound/getAudioPosts.ts @@ -1,4 +1,5 @@ -import { InvalidRequestError } from "@atp/xrpc-server"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { DataPlane } from "../../../../data-plane/index.ts"; import { @@ -6,8 +7,8 @@ import { Hydrator, mergeManyStates, } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/sound/getAudioPosts.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/sound/getAudioPosts.ts"; import { createPipeline, filterSkeletonList, @@ -26,7 +27,7 @@ export default function (server: Server, ctx: AppContext) { rules: noBlocks, presentation, }); - server.so.sprk.sound.getAudioPosts({ + server.add(so.sprk.sound.getAudioPosts, { auth: ctx.authVerifier.standardOptional, handler: async ({ params, auth, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -105,7 +106,7 @@ type Context = { views: Views; }; -type Params = QueryParams & { hydrateCtx: HydrateCtx }; +type Params = $Params & { hydrateCtx: HydrateCtx }; type Skeleton = { posts: string[]; diff --git a/api/so/sprk/sound/getAudios.ts b/api/so/sprk/sound/getAudios.ts index 8008bf4..1332c55 100644 --- a/api/so/sprk/sound/getAudios.ts +++ b/api/so/sprk/sound/getAudios.ts @@ -1,8 +1,10 @@ import { dedupeStrs } from "@atp/common"; +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { HydrateCtx, Hydrator } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/sound/getAudios.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/sound/getAudios.ts"; import { createPipeline, filterSkeletonList, @@ -21,7 +23,7 @@ export default function (server: Server, ctx: AppContext) { rules: noBlocks, presentation, }); - server.so.sprk.sound.getAudios({ + server.add(so.sprk.sound.getAudios, { auth: ctx.authVerifier.standardOptional, handler: async ({ params, auth, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -79,7 +81,7 @@ type Context = { views: Views; }; -type Params = QueryParams & { hydrateCtx: HydrateCtx }; +type Params = $Params & { hydrateCtx: HydrateCtx }; type Skeleton = { audios: string[]; diff --git a/api/so/sprk/sound/getTrendingAudios.ts b/api/so/sprk/sound/getTrendingAudios.ts index 770306d..785a846 100644 --- a/api/so/sprk/sound/getTrendingAudios.ts +++ b/api/so/sprk/sound/getTrendingAudios.ts @@ -1,8 +1,10 @@ +import { Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { DataPlane } from "../../../../data-plane/index.ts"; import { HydrateCtx, Hydrator } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; -import { QueryParams } from "../../../../lex/types/so/sprk/sound/getTrendingAudios.ts"; +import * as so from "../../../../lex/so.ts"; +import { $Params } from "../../../../lex/so/sprk/sound/getTrendingAudios.ts"; import { createPipeline, filterSkeletonList, @@ -21,7 +23,7 @@ export default function (server: Server, ctx: AppContext) { rules: noBlocks, presentation, }); - server.so.sprk.sound.getTrendingAudios({ + server.add(so.sprk.sound.getTrendingAudios, { auth: ctx.authVerifier.standardOptional, handler: async ({ params, auth, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -88,7 +90,7 @@ type Context = { views: Views; }; -type Params = QueryParams & { hydrateCtx: HydrateCtx }; +type Params = $Params & { hydrateCtx: HydrateCtx }; type Skeleton = { audios: string[]; diff --git a/api/so/sprk/story/getStories.ts b/api/so/sprk/story/getStories.ts index 3422820..6bf355c 100644 --- a/api/so/sprk/story/getStories.ts +++ b/api/so/sprk/story/getStories.ts @@ -1,15 +1,17 @@ import { dedupeStrs } from "@atp/common"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { HydrateCtx, HydrationState, Hydrator, } from "../../../../hydration/index.ts"; -import { Server } from "../../../../lex/index.ts"; +import * as so from "../../../../lex/so.ts"; import { - OutputSchema, - QueryParams, -} from "../../../../lex/types/so/sprk/story/getStories.ts"; + $OutputBody, + $Params, +} from "../../../../lex/so/sprk/story/getStories.ts"; import { createPipeline, filterSkeletonList, @@ -62,7 +64,7 @@ export default function (server: Server, ctx: AppContext) { rules, presentation, }); - server.so.sprk.story.getStories({ + server.add(so.sprk.story.getStories, { auth: ctx.authVerifier.standardOptional, handler: async ({ params, auth, req }) => { const hydrateCtx = await createHydrateCtxFromAuth(ctx, req, auth); @@ -74,16 +76,15 @@ export default function (server: Server, ctx: AppContext) { if (uriArray.length === 0) { return { encoding: "application/json", - body: { stories: [] } as OutputSchema, + body: { stories: [] } as $OutputBody, }; } // Enforce maximum limit if (uriArray.length > MAX_STORIES_LIMIT) { - return { - status: 400, - message: `Too many URIs requested. Maximum is ${MAX_STORIES_LIMIT}`, - }; + throw new InvalidRequestError( + `Too many URIs requested. Maximum is ${MAX_STORIES_LIMIT}`, + ); } // Validate URIs @@ -100,12 +101,17 @@ export default function (server: Server, ctx: AppContext) { if (validUris.length === 0) { return { encoding: "application/json", - body: { stories: [] } as OutputSchema, + body: { stories: [] } as $OutputBody, }; } const result = await getStories( - { ...params, uris: validUris, hydrateCtx, viewer: hydrateCtx.viewer }, + { + ...params, + uris: validUris as $Params["uris"], + hydrateCtx, + viewer: hydrateCtx.viewer, + }, ctx, ); @@ -153,7 +159,7 @@ const rules = (inputs: RulesFnInput): Skeleton => { const presentation = ( inputs: PresentationFnInput, -): OutputSchema => { +): $OutputBody => { const { ctx, skeleton, hydration } = inputs; const storyViews = mapSkeletonList( skeleton, @@ -169,7 +175,7 @@ type Context = { views: Views; }; -type Params = QueryParams & { +type Params = $Params & { hydrateCtx: HydrateCtx; viewer: string | null; }; diff --git a/api/so/sprk/story/getTimeline.ts b/api/so/sprk/story/getTimeline.ts index 7a4b97b..8faa12e 100644 --- a/api/so/sprk/story/getTimeline.ts +++ b/api/so/sprk/story/getTimeline.ts @@ -1,12 +1,13 @@ -import { InvalidRequestError } from "@atp/xrpc-server"; +import { InvalidRequestError, Server } from "@atp/xrpc-server"; + import { AppContext } from "../../../../context.ts"; import { HydrateCtx, HydrationState } from "../../../../hydration/index.ts"; import { parseString } from "../../../../hydration/util.ts"; -import { Server } from "../../../../lex/index.ts"; +import * as so from "../../../../lex/so.ts"; import { - OutputSchema, - QueryParams, -} from "../../../../lex/types/so/sprk/story/getTimeline.ts"; + $OutputBody, + $Params, +} from "../../../../lex/so/sprk/story/getTimeline.ts"; import { createPipeline, filterSkeletonList, @@ -30,7 +31,7 @@ export default function (server: Server, ctx: AppContext) { rules, presentation, }); - server.so.sprk.story.getTimeline({ + server.add(so.sprk.story.getTimeline, { auth: ctx.authVerifier.standard, handler: async ({ params, auth, req }) => { const viewer = auth.credentials.iss; @@ -129,7 +130,7 @@ const rules = (inputs: RulesFnInput): Skeleton => { const presentation = ( inputs: PresentationFnInput, -): OutputSchema => { +): $OutputBody => { const { ctx, skeleton, hydration } = inputs; const storyViews = mapSkeletonList( skeleton, @@ -148,7 +149,7 @@ const presentation = ( type Context = AppContext; -type Params = QueryParams & { +type Params = $Params & { hydrateCtx: HydrateCtx & { viewer: string }; limit: number; }; diff --git a/compose.dev.yaml b/compose.dev.yaml index ef7549c..ab4c655 100644 --- a/compose.dev.yaml +++ b/compose.dev.yaml @@ -40,9 +40,8 @@ services: - path: ./api action: sync target: /app/api - - path: ./lexicon - action: sync - target: /app/lexicon + - path: ./lexicons + action: rebuild - path: ./services action: sync target: /app/services @@ -87,9 +86,8 @@ services: - path: ./api action: sync target: /app/api - - path: ./lexicon - action: sync - target: /app/lexicon + - path: ./lexicons + action: rebuild - path: ./services action: sync target: /app/services diff --git a/data-plane/index.ts b/data-plane/index.ts index 493745e..81ed03d 100644 --- a/data-plane/index.ts +++ b/data-plane/index.ts @@ -23,8 +23,6 @@ import { Labels } from "./routes/labels.ts"; import { PushTokens } from "./routes/push-tokens.ts"; import { CrosspostThread } from "./routes/crosspost-threads.ts"; -export { RepoSubscription } from "./subscription.ts"; - export type ServerContext = { db: Database; idResolver?: IdResolver; diff --git a/data-plane/indexing/index.ts b/data-plane/indexing/index.ts index 00a992c..0949494 100644 --- a/data-plane/indexing/index.ts +++ b/data-plane/indexing/index.ts @@ -1,11 +1,13 @@ -import { CID } from "multiformats/cid"; import { AtpAgent, ComAtprotoSyncGetLatestCommit } from "@atproto/api"; import { DAY, HOUR } from "@atp/common"; import { getPds, IdResolver } from "@atp/identity"; -import { RepoRecord, ValidationError } from "@atp/lexicon"; +import { Cid, l } from "@atp/lex"; +import { parseCid } from "@atp/lex/data"; + import { getAndParseRecord, readCarWithRoot, + type RepoRecord, VerifiedRepo, verifyRepo, WriteOpAction, @@ -88,7 +90,7 @@ export class IndexingService { async indexRecord( uri: AtUri, - cid: CID, + cid: Cid, obj: RepoRecord, action: WriteOpAction.Create | WriteOpAction.Update, timestamp: string, @@ -208,7 +210,7 @@ export class IndexingService { ); } } catch (err) { - if (err instanceof ValidationError) { + if (err instanceof l.ValidationError) { console.warn( "skipping indexing of invalid record", { did, commit, uri: uri.toString(), cid: cid.toString() }, @@ -234,15 +236,15 @@ export class IndexingService { (acc, cur) => { acc[cur.uri] = { uri: new AtUri(cur.uri), - cid: CID.parse(cur.cid), + cid: parseCid(cur.cid), }; return acc; }, - {} as Record, + {} as Record, ); } - async setCommitLastSeen(did: string, commit: CID, rev: string) { + async setCommitLastSeen(did: string, commit: Cid, rev: string) { await this.db.models.ActorSync.findOneAndUpdate( { did }, { @@ -256,7 +258,7 @@ export class IndexingService { findIndexerForCollection(collection: string) { const indexers = Object.values( - this.records as Record>, + this.records as Record>, ); return indexers.find((indexer) => indexer.collection === collection); } @@ -327,7 +329,7 @@ export class IndexingService { type UriAndCid = { uri: AtUri; - cid: CID; + cid: Cid; }; type IndexOp = diff --git a/data-plane/indexing/plugins/audio.ts b/data-plane/indexing/plugins/audio.ts index 602c64a..524a398 100644 --- a/data-plane/indexing/plugins/audio.ts +++ b/data-plane/indexing/plugins/audio.ts @@ -1,20 +1,20 @@ -import { CID } from "multiformats/cid"; +import { Cid } from "@atp/lex"; import { AtUri, normalizeDatetimeAlways } from "@atp/syntax"; -import * as lex from "../../../lex/lexicons.ts"; -import * as Audio from "../../../lex/types/so/sprk/sound/audio.ts"; +import * as so from "../../../lex/so.ts"; import { BackgroundQueue } from "../../background.ts"; import { Database } from "../../db/index.ts"; import { AudioDocument } from "../../db/models.ts"; import { RecordProcessor } from "../processor.ts"; -const lexId = lex.ids.SoSprkSoundAudio; +const schema = so.sprk.sound.audio.main; +type AudioRecord = so.sprk.sound.audio.Main; type IndexedAudio = AudioDocument; const insertFn = async ( db: Database, uri: AtUri, - cid: CID, - obj: Audio.Record, + cid: Cid, + obj: AudioRecord, timestamp: string, ): Promise => { const audio: Record = { @@ -61,14 +61,14 @@ const notifsForDelete = () => { return { notifs: [], toDelete: [] }; }; -export type PluginType = RecordProcessor; +export type PluginType = RecordProcessor; export const makePlugin = ( db: Database, background: BackgroundQueue, ): PluginType => { return new RecordProcessor(db, background, { - lexId, + schema, insertFn, findDuplicate, deleteFn, diff --git a/data-plane/indexing/plugins/block.ts b/data-plane/indexing/plugins/block.ts index e33516d..8e1ebcf 100644 --- a/data-plane/indexing/plugins/block.ts +++ b/data-plane/indexing/plugins/block.ts @@ -1,20 +1,20 @@ -import { CID } from "multiformats/cid"; +import { Cid } from "@atp/lex"; import { AtUri, normalizeDatetimeAlways } from "@atp/syntax"; -import * as lex from "../../../lex/lexicons.ts"; -import * as Block from "../../../lex/types/so/sprk/graph/block.ts"; +import * as so from "../../../lex/so.ts"; import { BackgroundQueue } from "../../background.ts"; import { Database } from "../../db/index.ts"; import { BlockDocument } from "../../db/models.ts"; import { RecordProcessor } from "../processor.ts"; -const lexId = lex.ids.SoSprkGraphBlock; +const schema = so.sprk.graph.block.main; +type BlockRecord = so.sprk.graph.block.Main; type IndexedBlock = BlockDocument; const insertFn = async ( db: Database, uri: AtUri, - cid: CID, - obj: Block.Record, + cid: Cid, + obj: BlockRecord, timestamp: string, ): Promise => { const block = { @@ -37,7 +37,7 @@ const insertFn = async ( const findDuplicate = async ( db: Database, uri: AtUri, - obj: Block.Record, + obj: BlockRecord, ): Promise => { const found = await db.models.Block.findOne({ authorDid: uri.host, @@ -64,14 +64,14 @@ const notifsForDelete = () => { return { notifs: [], toDelete: [] }; }; -export type PluginType = RecordProcessor; +export type PluginType = RecordProcessor; export const makePlugin = ( db: Database, background: BackgroundQueue, ): PluginType => { return new RecordProcessor(db, background, { - lexId, + schema, insertFn, findDuplicate, deleteFn, diff --git a/data-plane/indexing/plugins/follow.ts b/data-plane/indexing/plugins/follow.ts index 525a65d..3ed0f01 100644 --- a/data-plane/indexing/plugins/follow.ts +++ b/data-plane/indexing/plugins/follow.ts @@ -1,20 +1,20 @@ -import { CID } from "multiformats/cid"; +import { Cid } from "@atp/lex"; import { AtUri, normalizeDatetimeAlways } from "@atp/syntax"; -import * as lex from "../../../lex/lexicons.ts"; -import * as Follow from "../../../lex/types/so/sprk/graph/follow.ts"; +import * as so from "../../../lex/so.ts"; import { BackgroundQueue } from "../../background.ts"; import { Database } from "../../db/index.ts"; import { FollowDocument } from "../../db/models.ts"; import { RecordProcessor } from "../processor.ts"; -const lexId = lex.ids.SoSprkGraphFollow; +const schema = so.sprk.graph.follow.main; +type FollowRecord = so.sprk.graph.follow.Main; type IndexedFollow = FollowDocument; const insertFn = async ( db: Database, uri: AtUri, - cid: CID, - obj: Follow.Record, + cid: Cid, + obj: FollowRecord, timestamp: string, ): Promise => { const follow = { @@ -37,7 +37,7 @@ const insertFn = async ( const findDuplicate = async ( db: Database, uri: AtUri, - obj: Follow.Record, + obj: FollowRecord, ): Promise => { const found = await db.models.Follow.findOne({ authorDid: uri.host, @@ -118,14 +118,14 @@ const updateAggregates = async (db: Database, follow: IndexedFollow) => { } }; -export type PluginType = RecordProcessor; +export type PluginType = RecordProcessor; export const makePlugin = ( db: Database, background: BackgroundQueue, ): PluginType => { return new RecordProcessor(db, background, { - lexId, + schema, insertFn, findDuplicate, deleteFn, diff --git a/data-plane/indexing/plugins/generator.ts b/data-plane/indexing/plugins/generator.ts index 461604c..74fe651 100644 --- a/data-plane/indexing/plugins/generator.ts +++ b/data-plane/indexing/plugins/generator.ts @@ -1,20 +1,20 @@ -import { CID } from "multiformats/cid"; +import { Cid } from "@atp/lex"; import { AtUri, normalizeDatetimeAlways } from "@atp/syntax"; -import * as lex from "../../../lex/lexicons.ts"; -import * as FeedGenerator from "../../../lex/types/so/sprk/feed/generator.ts"; +import * as so from "../../../lex/so.ts"; import { BackgroundQueue } from "../../background.ts"; import { Database } from "../../db/index.ts"; import { GeneratorDocument } from "../../db/models.ts"; import { RecordProcessor } from "../processor.ts"; -const lexId = lex.ids.SoSprkFeedGenerator; +const schema = so.sprk.feed.generator.main; +type FeedGeneratorRecord = so.sprk.feed.generator.Main; type IndexedFeedGenerator = GeneratorDocument; const insertFn = async ( db: Database, uri: AtUri, - cid: CID, - obj: FeedGenerator.Record, + cid: Cid, + obj: FeedGeneratorRecord, timestamp: string, ): Promise => { // Extract and clean avatar to ensure it matches MediaRef format @@ -71,7 +71,7 @@ const notifsForDelete = () => { }; export type PluginType = RecordProcessor< - FeedGenerator.Record, + typeof schema, IndexedFeedGenerator >; @@ -80,7 +80,7 @@ export const makePlugin = ( background: BackgroundQueue, ): PluginType => { return new RecordProcessor(db, background, { - lexId, + schema, insertFn, findDuplicate, deleteFn, diff --git a/data-plane/indexing/plugins/labeler.ts b/data-plane/indexing/plugins/labeler.ts index 0ec6421..b640177 100644 --- a/data-plane/indexing/plugins/labeler.ts +++ b/data-plane/indexing/plugins/labeler.ts @@ -1,20 +1,20 @@ -import { CID } from "multiformats/cid"; +import { Cid } from "@atp/lex"; import { AtUri, normalizeDatetimeAlways } from "@atp/syntax"; -import * as lex from "../../../lex/lexicons.ts"; -import * as Labeler from "../../../lex/types/so/sprk/labeler/service.ts"; +import * as so from "../../../lex/so.ts"; import { BackgroundQueue } from "../../background.ts"; import { Database } from "../../db/index.ts"; import { LabelerDocument } from "../../db/models.ts"; import { RecordProcessor } from "../processor.ts"; -const lexId = lex.ids.SoSprkLabelerService; +const schema = so.sprk.labeler.service.main; +type LabelerRecord = so.sprk.labeler.service.Main; type IndexedLabeler = LabelerDocument; const insertFn = async ( db: Database, uri: AtUri, - cid: CID, - obj: Labeler.Record, + cid: Cid, + obj: LabelerRecord, timestamp: string, ): Promise => { if (uri.rkey !== "self") return null; @@ -57,14 +57,14 @@ const notifsForDelete = () => { return { notifs: [], toDelete: [] }; }; -export type PluginType = RecordProcessor; +export type PluginType = RecordProcessor; export const makePlugin = ( db: Database, background: BackgroundQueue, ): PluginType => { return new RecordProcessor(db, background, { - lexId, + schema, insertFn, findDuplicate, deleteFn, diff --git a/data-plane/indexing/plugins/like.ts b/data-plane/indexing/plugins/like.ts index c554f7d..86934e7 100644 --- a/data-plane/indexing/plugins/like.ts +++ b/data-plane/indexing/plugins/like.ts @@ -1,20 +1,20 @@ -import { CID } from "multiformats/cid"; +import { Cid } from "@atp/lex"; import { AtUri, normalizeDatetimeAlways } from "@atp/syntax"; -import * as lex from "../../../lex/lexicons.ts"; -import * as Like from "../../../lex/types/so/sprk/feed/like.ts"; +import * as so from "../../../lex/so.ts"; import { BackgroundQueue } from "../../background.ts"; import { Database } from "../../db/index.ts"; import { LikeDocument } from "../../db/models.ts"; import { RecordProcessor } from "../processor.ts"; -const lexId = lex.ids.SoSprkFeedLike; +const schema = so.sprk.feed.like.main; +type LikeRecord = so.sprk.feed.like.Main; type IndexedLike = LikeDocument; const insertFn = async ( db: Database, uri: AtUri, - cid: CID, - obj: Like.Record, + cid: Cid, + obj: LikeRecord, timestamp: string, ): Promise => { // Handle via property safely with type assertion @@ -45,7 +45,7 @@ const insertFn = async ( const findDuplicate = async ( db: Database, uri: AtUri, - obj: Like.Record, + obj: LikeRecord, ): Promise => { const found = await db.models.Like.findOne({ authorDid: uri.host, @@ -182,14 +182,14 @@ const updateAggregates = async (db: Database, like: IndexedLike) => { } }; -export type PluginType = RecordProcessor; +export type PluginType = RecordProcessor; export const makePlugin = ( db: Database, background: BackgroundQueue, ): PluginType => { return new RecordProcessor(db, background, { - lexId, + schema, insertFn, findDuplicate, deleteFn, diff --git a/data-plane/indexing/plugins/post.ts b/data-plane/indexing/plugins/post.ts index 8683dad..f70db48 100644 --- a/data-plane/indexing/plugins/post.ts +++ b/data-plane/indexing/plugins/post.ts @@ -1,21 +1,6 @@ -import { CID } from "multiformats/cid"; +import { Cid } from "@atp/lex"; import { AtUri } from "@atp/syntax"; -import * as lex from "../../../lex/lexicons.ts"; -import { - isMain as isMediaImages, - Main as MediaImages, -} from "../../../lex/types/so/sprk/media/images.ts"; -import { Main as MediaImage } from "../../../lex/types/so/sprk/media/image.ts"; -import { - isMain as isMediaVideo, - Main as MediaVideo, -} from "../../../lex/types/so/sprk/media/video.ts"; -import { Record as PostRecord } from "../../../lex/types/so/sprk/feed/post.ts"; -import { Record as GateRecord } from "../../../lex/types/so/sprk/feed/threadgate.ts"; -import { - isLink, - isMention, -} from "../../../lex/types/so/sprk/richtext/facet.ts"; +import * as so from "../../../lex/so.ts"; import { BackgroundQueue } from "../../background.ts"; import { Database } from "../../db/index.ts"; import { PostDocument } from "../../db/models.ts"; @@ -33,6 +18,11 @@ type PostDescendent = { creator: string; sortAt: string; }; +type MediaImages = so.sprk.media.images.Main; +type MediaImage = so.sprk.media.image.Main; +type MediaVideo = so.sprk.media.video.Main; +type PostRecord = so.sprk.feed.post.Main; +type GateRecord = so.sprk.feed.threadgate.Main; type IndexedPost = { post: PostDocument; facets?: { type: "mention" | "link"; value: string }[]; @@ -48,14 +38,18 @@ type IndexedPost = { threadgate?: GateRecord; }; -const lexId = lex.ids.SoSprkFeedPost; +const schema = so.sprk.feed.post.main; +const isMediaImages = so.sprk.media.images.$matches; +const isMediaVideo = so.sprk.media.video.$matches; +const isMention = so.sprk.richtext.facet.mention.$matches; +const isLink = so.sprk.richtext.facet.link.$matches; const REPLY_NOTIF_DEPTH = 5; const insertFn = async ( db: Database, uri: AtUri, - cid: CID, + cid: Cid, obj: PostRecord, timestamp: string, ): Promise => { @@ -190,7 +184,8 @@ const notifsForInsert = (obj: IndexedPost) => { } } - const threadgateHiddenReplies = obj.threadgate?.hiddenReplies || []; + const threadgateHiddenReplies = (obj.threadgate?.hiddenReplies || []) + .map(String); // reply notifications for (const ancestor of obj.ancestors ?? []) { @@ -283,14 +278,14 @@ const updateAggregates = async (db: Database, postIdx: IndexedPost) => { } }; -export type PluginType = RecordProcessor; +export type PluginType = RecordProcessor; export const makePlugin = ( db: Database, background: BackgroundQueue, ): PluginType => { return new RecordProcessor(db, background, { - lexId, + schema, insertFn, findDuplicate, deleteFn, diff --git a/data-plane/indexing/plugins/profile.ts b/data-plane/indexing/plugins/profile.ts index 3019683..a3bba6d 100644 --- a/data-plane/indexing/plugins/profile.ts +++ b/data-plane/indexing/plugins/profile.ts @@ -1,20 +1,20 @@ -import { CID } from "multiformats/cid"; +import { Cid } from "@atp/lex"; import { AtUri } from "@atp/syntax"; -import * as lex from "../../../lex/lexicons.ts"; -import * as Profile from "../../../lex/types/so/sprk/actor/profile.ts"; +import * as so from "../../../lex/so.ts"; import { BackgroundQueue } from "../../background.ts"; import { Database } from "../../db/index.ts"; import { ProfileDocument } from "../../db/models.ts"; import { RecordProcessor } from "../processor.ts"; -const lexId = lex.ids.SoSprkActorProfile; +const schema = so.sprk.actor.profile.main; +type ProfileRecord = so.sprk.actor.profile.Main; type IndexedProfile = ProfileDocument; const insertFn = async ( db: Database, uri: AtUri, - cid: CID, - obj: Profile.Record, + cid: Cid, + obj: ProfileRecord, timestamp: string, ): Promise => { if (uri.rkey !== "self") return null; @@ -62,14 +62,14 @@ const notifsForDelete = () => { return { notifs: [], toDelete: [] }; }; -export type PluginType = RecordProcessor; +export type PluginType = RecordProcessor; export const makePlugin = ( db: Database, background: BackgroundQueue, ): PluginType => { return new RecordProcessor(db, background, { - lexId, + schema, insertFn, findDuplicate, deleteFn, diff --git a/data-plane/indexing/plugins/reply.ts b/data-plane/indexing/plugins/reply.ts index fdac905..672ef76 100644 --- a/data-plane/indexing/plugins/reply.ts +++ b/data-plane/indexing/plugins/reply.ts @@ -1,16 +1,6 @@ -import { CID } from "multiformats/cid"; +import { Cid, lexParse } from "@atp/lex"; import { AtUri } from "@atp/syntax"; -import * as lex from "../../../lex/lexicons.ts"; -import { isMain as isMediaImage } from "../../../lex/types/so/sprk/media/image.ts"; -import { - Record as ReplyRecord, - ReplyRef, -} from "../../../lex/types/so/sprk/feed/reply.ts"; -import { Record as GateRecord } from "../../../lex/types/so/sprk/feed/threadgate.ts"; -import { - isLink, - isMention, -} from "../../../lex/types/so/sprk/richtext/facet.ts"; +import * as so from "../../../lex/so.ts"; import { BackgroundQueue } from "../../background.ts"; import { Database } from "../../db/index.ts"; import { ReplyDocument } from "../../db/models.ts"; @@ -20,7 +10,6 @@ import { invalidReplyRoot as checkInvalidReplyRoot, } from "../../util.ts"; import { RecordProcessor } from "../processor.ts"; -import { jsonToLex } from "@atp/lexicon"; type Ancestor = { uri: string; @@ -33,6 +22,9 @@ type Descendent = { creator: string; sortAt: string; }; +type ReplyRecord = so.sprk.feed.reply.Main; +type ReplyRef = so.sprk.feed.reply.ReplyRef; +type GateRecord = so.sprk.feed.threadgate.Main; type IndexedReply = { reply: ReplyDocument; facets?: { type: "mention" | "link"; value: string }[]; @@ -45,14 +37,17 @@ type IndexedReply = { threadgate?: GateRecord; }; -const lexId = lex.ids.SoSprkFeedReply; +const schema = so.sprk.feed.reply.main; +const isMediaImage = so.sprk.media.image.$matches; +const isMention = so.sprk.richtext.facet.mention.$matches; +const isLink = so.sprk.richtext.facet.link.$matches; const REPLY_NOTIF_DEPTH = 5; const insertFn = async ( db: Database, uri: AtUri, - cid: CID, + cid: Cid, obj: ReplyRecord, timestamp: string, ): Promise => { @@ -77,7 +72,7 @@ const insertFn = async ( media: obj.media, langs: obj.langs || [], labels: obj.labels || null, - tags: obj.tags || [], + tags: (obj as { tags?: string[] }).tags || [], createdAt: obj.createdAt, indexedAt: timestamp, }; @@ -196,7 +191,8 @@ const notifsForInsert = (obj: IndexedReply) => { } } - const threadgateHiddenReplies = obj.threadgate?.hiddenReplies || []; + const threadgateHiddenReplies = (obj.threadgate?.hiddenReplies || []) + .map(String); // reply notifications for (const ancestor of obj.ancestors ?? []) { @@ -309,14 +305,14 @@ const updateAggregates = async (db: Database, replyIdx: IndexedReply) => { } }; -export type PluginType = RecordProcessor; +export type PluginType = RecordProcessor; export const makePlugin = ( db: Database, background: BackgroundQueue, ): PluginType => { return new RecordProcessor(db, background, { - lexId, + schema, insertFn, findDuplicate, deleteFn, @@ -354,14 +350,14 @@ async function getReplyRefs(db: Database, reply: ReplyRef) { ? { uri: root.uri, invalidReplyRoot: root.invalidReplyRoot ?? null, - record: jsonToLex(root.json) as ReplyRecord, + record: lexParse(root.json, { strict: false }) as ReplyRecord, } : null, parent: parent && parent.json ? { uri: parent.uri, invalidReplyRoot: parent.invalidReplyRoot ?? null, - record: jsonToLex(parent.json) as ReplyRecord, + record: lexParse(parent.json, { strict: false }) as ReplyRecord, } : null, }; diff --git a/data-plane/indexing/plugins/repost.ts b/data-plane/indexing/plugins/repost.ts index 6498deb..434e04e 100644 --- a/data-plane/indexing/plugins/repost.ts +++ b/data-plane/indexing/plugins/repost.ts @@ -1,20 +1,20 @@ -import { CID } from "multiformats/cid"; +import { Cid } from "@atp/lex"; import { AtUri, normalizeDatetimeAlways } from "@atp/syntax"; -import * as lex from "../../../lex/lexicons.ts"; -import * as Repost from "../../../lex/types/so/sprk/feed/repost.ts"; +import * as so from "../../../lex/so.ts"; import { BackgroundQueue } from "../../background.ts"; import { Database } from "../../db/index.ts"; import { RepostDocument } from "../../db/models.ts"; import { RecordProcessor } from "../processor.ts"; -const lexId = lex.ids.SoSprkFeedRepost; +const schema = so.sprk.feed.repost.main; +type RepostRecord = so.sprk.feed.repost.Main; type IndexedRepost = RepostDocument; const insertFn = async ( db: Database, uri: AtUri, - cid: CID, - obj: Repost.Record, + cid: Cid, + obj: RepostRecord, timestamp: string, ): Promise => { const viaObj = obj.via as { uri: string; cid: string } | undefined; @@ -45,7 +45,7 @@ const insertFn = async ( const findDuplicate = async ( db: Database, uri: AtUri, - obj: Repost.Record, + obj: RepostRecord, ): Promise => { const found = await db.models.Repost.findOne({ authorDid: uri.host, @@ -158,14 +158,14 @@ const updateAggregates = async (db: Database, repost: IndexedRepost) => { } }; -export type PluginType = RecordProcessor; +export type PluginType = RecordProcessor; export const makePlugin = ( db: Database, background: BackgroundQueue, ): PluginType => { return new RecordProcessor(db, background, { - lexId, + schema, insertFn, findDuplicate, deleteFn, diff --git a/data-plane/indexing/plugins/story.ts b/data-plane/indexing/plugins/story.ts index 8392a67..ecf8f5b 100644 --- a/data-plane/indexing/plugins/story.ts +++ b/data-plane/indexing/plugins/story.ts @@ -1,20 +1,20 @@ -import { CID } from "multiformats/cid"; +import { Cid } from "@atp/lex"; import { AtUri, normalizeDatetimeAlways } from "@atp/syntax"; -import * as lex from "../../../lex/lexicons.ts"; -import * as Story from "../../../lex/types/so/sprk/story/post.ts"; +import * as so from "../../../lex/so.ts"; import { BackgroundQueue } from "../../background.ts"; import { Database } from "../../db/index.ts"; import { StoryDocument } from "../../db/models.ts"; import { RecordProcessor } from "../processor.ts"; -const lexId = lex.ids.SoSprkStoryPost; +const schema = so.sprk.story.post.main; +type StoryRecord = so.sprk.story.post.Main; type IndexedStory = StoryDocument; const insertFn = async ( db: Database, uri: AtUri, - cid: CID, - obj: Story.Record, + cid: Cid, + obj: StoryRecord, timestamp: string, ): Promise => { const story = { @@ -59,14 +59,14 @@ const notifsForDelete = () => { return { notifs: [], toDelete: [] }; }; -export type PluginType = RecordProcessor; +export type PluginType = RecordProcessor; export const makePlugin = ( db: Database, background: BackgroundQueue, ): PluginType => { return new RecordProcessor(db, background, { - lexId, + schema, insertFn, findDuplicate, deleteFn, diff --git a/data-plane/indexing/processor.ts b/data-plane/indexing/processor.ts index d0d466e..affbc2d 100644 --- a/data-plane/indexing/processor.ts +++ b/data-plane/indexing/processor.ts @@ -1,7 +1,6 @@ -import { CID } from "multiformats/cid"; -import { jsonStringToLex, stringifyLex } from "@atp/lexicon"; +import { Cid, l, lexParse, lexStringify } from "@atp/lex"; +import { parseCid } from "@atp/lex/data"; import { AtUri } from "@atp/syntax"; -import { lexicons } from "../../lex/lexicons.ts"; import { BackgroundQueue } from "../background.ts"; import { Database } from "../db/index.ts"; import { chunkArray } from "@atp/common"; @@ -9,27 +8,27 @@ import { PushService } from "../../utils/push.ts"; // @NOTE re: insertions and deletions. Due to how record updates are handled, // (insertFn) should have the same effect as (insertFn -> deleteFn -> insertFn). -type RecordProcessorParams = { - lexId: string; +type RecordProcessorOptions = { + schema: TSchema; insertFn: ( db: Database, uri: AtUri, - cid: CID, - obj: T, + cid: Cid, + obj: l.Infer, timestamp: string, - ) => Promise; + ) => Promise; findDuplicate: ( db: Database, uri: AtUri, - obj: T, + obj: l.Infer, ) => Promise | AtUri | null; - deleteFn: (db: Database, uri: AtUri) => Promise; - notifsForInsert: (obj: S) => Notif[]; + deleteFn: (db: Database, uri: AtUri) => Promise; + notifsForInsert: (obj: TRow) => Notif[]; notifsForDelete: ( - prev: S, - replacedBy: S | null, + prev: TRow, + replacedBy: TRow | null, ) => { notifs: Notif[]; toDelete: string[] }; - updateAggregates?: (db: Database, obj: S) => Promise; + updateAggregates?: (db: Database, obj: TRow) => Promise; deleteRecordIfInsertReturnsNull?: boolean; }; @@ -43,37 +42,39 @@ type Notif = { reasonSubject?: string; }; -export class RecordProcessor { - collection: string; +export class RecordProcessor { db: Database; private pushService: PushService | null = null; /** * RecordProcessor for handling a single AT Protocol collection. * - * This processor handles exactly one lexId: - * - Validates records against the specific lexId (e.g., "app.bsky.graph.follow") + * This processor handles exactly one generated record schema: + * - Validates records against the specific schema (e.g., so.sprk.graph.follow) * - Only processes records that match the exact collection NSID * - Rejects records from other collections, even similar ones * * Example usage: * ```typescript * const processor = new RecordProcessor(db, background, { - * lexId: "app.bsky.graph.follow", + * schema: so.sprk.graph.follow.main, * // ... other params * }); * - * // This will only process records with collection "app.bsky.graph.follow" + * // This will only process records with collection "so.sprk.graph.follow" * await processor.insertRecord(uri, cid, obj, timestamp); * ``` */ constructor( private appDb: Database, private background: BackgroundQueue, - private params: RecordProcessorParams, + private options: RecordProcessorOptions, ) { this.db = appDb; - this.collection = this.params.lexId; + } + + get collection(): TSchema["$type"] { + return this.options.schema.$type; } setPushService(pushService: PushService) { @@ -84,27 +85,22 @@ export class RecordProcessor { return uri.collection === this.collection; } - matchesSchema(obj: unknown): obj is T { - try { - lexicons.assertValidRecord(this.collection, obj); - return true; - } catch { - return false; - } + matchesSchema(obj: I): obj is I & l.Infer { + return this.options.schema.matches(obj); } - assertValidRecord(obj: unknown): asserts obj is T { - lexicons.assertValidRecord(this.collection, obj); + assertValidRecord(obj: unknown): asserts obj is l.Infer { + this.options.schema.assert(obj); } - // Helper method to get the lexId this processor handles - getLexId(): string { + // Helper method to get the collection this processor handles + getLexId(): TSchema["$type"] { return this.collection; } async insertRecord( uri: AtUri, - cid: CID, + cid: Cid, obj: unknown, timestamp: string, opts?: { disableNotifs?: boolean }, @@ -118,7 +114,7 @@ export class RecordProcessor { : timestamp; // Check for duplicates first before attempting insert - const found = await this.params.findDuplicate(this.db, uri, obj); + const found = await this.options.findDuplicate(this.db, uri, obj); if (found && found.toString() !== uri.toString()) { // Duplicate exists with different URI, store in duplicates table with no events await this.db.models.DuplicateRecord.findOneAndUpdate( @@ -143,14 +139,14 @@ export class RecordProcessor { did: uri.host, collectionName: uri.collection, rkey: uri.rkey, - json: stringifyLex(obj), + json: lexStringify(obj), createdAt, indexedAt: timestamp, }, { upsert: true, returnDocument: "after" }, ); - const inserted = await this.params.insertFn( + const inserted = await this.options.insertFn( this.db, uri, cid, @@ -158,7 +154,7 @@ export class RecordProcessor { timestamp, ); if (!inserted) { - if (this.params.deleteRecordIfInsertReturnsNull) { + if (this.options.deleteRecordIfInsertReturnsNull) { await this.db.models.Record.deleteOne({ uri: uri.toString() }); await this.db.models.DuplicateRecord.deleteOne({ uri: uri.toString(), @@ -169,7 +165,7 @@ export class RecordProcessor { this.aggregateOnCommit(inserted); if (!opts?.disableNotifs) { - this.handleNotifs({ inserted }); + await this.handleNotifs({ inserted }); } } @@ -179,7 +175,7 @@ export class RecordProcessor { // straightforward in the general case. We still get nice control over notifications. async updateRecord( uri: AtUri, - cid: CID, + cid: Cid, obj: unknown, timestamp: string, opts?: { disableNotifs?: boolean }, @@ -200,7 +196,7 @@ export class RecordProcessor { createdAt?: string; } = { cid: cid.toString(), - json: stringifyLex(obj), + json: lexStringify(obj), indexedAt: timestamp, }; if (createdAt) { @@ -214,7 +210,7 @@ export class RecordProcessor { ); // If the updated record was a dupe, update dupe info for it - const dupe = await this.params.findDuplicate(this.db, uri, obj); + const dupe = await this.options.findDuplicate(this.db, uri, obj); if (dupe) { await this.db.models.DuplicateRecord.findOneAndUpdate( { uri: uri.toString() }, @@ -229,13 +225,13 @@ export class RecordProcessor { await this.db.models.DuplicateRecord.deleteOne({ uri: uri.toString() }); } - const deleted = await this.params.deleteFn(this.db, uri); + const deleted = await this.options.deleteFn(this.db, uri); if (!deleted) { // If a record was updated but hadn't been indexed yet, treat it like a plain insert. return this.insertRecord(uri, cid, obj, timestamp); } this.aggregateOnCommit(deleted); - const inserted = await this.params.insertFn( + const inserted = await this.options.insertFn( this.db, uri, cid, @@ -243,7 +239,7 @@ export class RecordProcessor { timestamp, ); if (!inserted) { - if (this.params.deleteRecordIfInsertReturnsNull) { + if (this.options.deleteRecordIfInsertReturnsNull) { await this.db.models.Record.deleteOne({ uri: uri.toString() }); await this.db.models.DuplicateRecord.deleteOne({ uri: uri.toString(), @@ -259,7 +255,7 @@ export class RecordProcessor { } this.aggregateOnCommit(inserted); if (!opts?.disableNotifs) { - this.handleNotifs({ inserted, deleted }); + await this.handleNotifs({ inserted, deleted }); } } @@ -269,7 +265,7 @@ export class RecordProcessor { await this.db.models.Record.deleteOne({ uri: uriStr }); await this.db.models.DuplicateRecord.deleteOne({ uri: uriStr }); - const deleted = await this.params.deleteFn(this.db, uri); + const deleted = await this.options.deleteFn(this.db, uri); if (!deleted) return; this.aggregateOnCommit(deleted); @@ -301,30 +297,35 @@ export class RecordProcessor { return this.handleNotifs({ deleted }); } - const record = jsonStringToLex(recordDoc.json); + let record: unknown; + try { + record = lexParse(recordDoc.json, { strict: false }); + } catch { + return this.handleNotifs({ deleted }); + } if (!this.matchesSchema(record)) { return this.handleNotifs({ deleted }); } - const inserted = await this.params.insertFn( + const inserted = await this.options.insertFn( this.db, foundUri, - CID.parse(found.cid), + parseCid(found.cid), record, found.indexedAt, ); if (inserted) { this.aggregateOnCommit(inserted); } - this.handleNotifs({ deleted, inserted: inserted ?? undefined }); + await this.handleNotifs({ deleted, inserted: inserted ?? undefined }); } } - async handleNotifs(op: { deleted?: S; inserted?: S }) { + async handleNotifs(op: { deleted?: TRow; inserted?: TRow }) { let notifs: Notif[] = []; const runOnCommit: ((db: Database) => Promise)[] = []; if (op.deleted) { - const forDelete = this.params.notifsForDelete( + const forDelete = this.options.notifsForDelete( op.deleted, op.inserted ?? null, ); @@ -339,7 +340,7 @@ export class RecordProcessor { } notifs = forDelete.notifs; } else if (op.inserted) { - notifs = this.params.notifsForInsert(op.inserted); + notifs = this.options.notifsForInsert(op.inserted); } for (const chunk of chunkArray(notifs, 500)) { runOnCommit.push(async (db) => { @@ -387,8 +388,8 @@ export class RecordProcessor { return Promise.resolve(notifs); } - aggregateOnCommit(indexed: S) { - const { updateAggregates } = this.params; + aggregateOnCommit(indexed: TRow) { + const { updateAggregates } = this.options; if (!updateAggregates) return; // Note: MongoDB doesn't have transactions in the same way, so we'll run aggregates immediately // In a production system, you might want to use MongoDB transactions or a different approach diff --git a/data-plane/routes/records.ts b/data-plane/routes/records.ts index 3acfa4b..79ad221 100644 --- a/data-plane/routes/records.ts +++ b/data-plane/routes/records.ts @@ -1,8 +1,8 @@ import { Database } from "../db/index.ts"; import { AtUri } from "@atp/syntax"; -import { ids } from "../../lex/lexicons.ts"; import { keyBy } from "@atp/common"; import { Code, compositeTime, DataPlaneError } from "../util.ts"; +import * as so from "../../lex/so.ts"; export type Record = { record: string; @@ -68,7 +68,7 @@ async function getPostRecords( records: Array; }> { const [{ records }] = await Promise.all([ - getRecords(db, uris, ids.SoSprkFeedPost), + getRecords(db, uris, so.sprk.feed.post.$type), uris.length ? db.models.Post.find({ uri: { $in: uris }, @@ -87,7 +87,7 @@ async function getReplyRecords( records: Array; }> { const [{ records }] = await Promise.all([ - getRecords(db, uris, ids.SoSprkFeedReply), + getRecords(db, uris, so.sprk.feed.reply.$type), uris.length ? db.models.Reply.find({ uri: { $in: uris }, @@ -106,13 +106,17 @@ export class Records { } async getBlockRecords(uris: string[]) { - const result = await getRecords(this.db, uris, ids.SoSprkGraphBlock); + const result = await getRecords(this.db, uris, so.sprk.graph.block.$type); return result; } async getFeedGeneratorRecords(uris: string[]) { try { - const result = await getRecords(this.db, uris, ids.SoSprkFeedGenerator); + const result = await getRecords( + this.db, + uris, + so.sprk.feed.generator.$type, + ); return result; } catch (error) { console.error("Error fetching feed generator records:", error); @@ -121,12 +125,12 @@ export class Records { } async getFollowRecords(uris: string[]) { - const result = await getRecords(this.db, uris, ids.SoSprkGraphFollow); + const result = await getRecords(this.db, uris, so.sprk.graph.follow.$type); return result; } async getLikeRecords(uris: string[]) { - const result = await getRecords(this.db, uris, ids.SoSprkFeedLike); + const result = await getRecords(this.db, uris, so.sprk.feed.like.$type); return result; } @@ -141,12 +145,12 @@ export class Records { } async getProfileRecords(uris: string[]) { - const result = await getRecords(this.db, uris, ids.SoSprkActorProfile); + const result = await getRecords(this.db, uris, so.sprk.actor.profile.$type); return result; } async getRepostRecords(uris: string[]) { - const result = await getRecords(this.db, uris, ids.SoSprkFeedRepost); + const result = await getRecords(this.db, uris, so.sprk.feed.repost.$type); return result; } @@ -156,7 +160,7 @@ export class Records { } async getStoryRecords(uris: string[]) { - const result = await getRecords(this.db, uris, ids.SoSprkStoryPost); + const result = await getRecords(this.db, uris, so.sprk.story.post.$type); return result; } } diff --git a/data-plane/subscription.ts b/data-plane/subscription.ts index 453d6ed..1445667 100644 --- a/data-plane/subscription.ts +++ b/data-plane/subscription.ts @@ -1,5 +1,5 @@ import { IdResolver } from "@atp/identity"; -import { WriteOpAction } from "@atp/repo"; +import { type RepoRecord, WriteOpAction } from "@atp/repo"; import { Event as FirehoseEvent, Firehose, MemoryRunner } from "@atp/sync"; import { BackgroundQueue } from "./background.ts"; import { Database } from "./db/index.ts"; @@ -191,7 +191,7 @@ function createFirehose(opts: { : indexingSvc.indexRecord( evt.uri, evt.cid, - evt.record, + evt.record as unknown as RepoRecord, evt.event === "create" ? WriteOpAction.Create : WriteOpAction.Update, diff --git a/data-plane/util.ts b/data-plane/util.ts index 724067b..b52f458 100644 --- a/data-plane/util.ts +++ b/data-plane/util.ts @@ -1,10 +1,10 @@ -import { - Record as ReplyRecord, - ReplyRef, -} from "../lex/types/so/sprk/feed/reply.ts"; import { Database } from "./db/index.ts"; import { DidDocument } from "@atp/identity"; import * as bytes from "@atp/bytes"; +import * as so from "../lex/so.ts"; + +type ReplyRecord = so.sprk.feed.reply.Main; +type ReplyRef = so.sprk.feed.reply.ReplyRef; export const getDescendents = async ( db: Database, diff --git a/deno.json b/deno.json index 4ee6d0a..3fa226e 100644 --- a/deno.json +++ b/deno.json @@ -9,30 +9,30 @@ "dev": { "dependencies": ["dev:db", "dev:api", "dev:ingest"] }, - "codegen": "deno run -A jsr:@atp/lex-gen@^0.1.0-alpha.2 server -o ./lex -i ./lexicons", + "codegen": "deno run -A jsr:@atp/lex@^0.1.0-alpha.5 build --clear", "start": "deno run -A main.ts", "docker-dev": "docker compose -f compose.dev.yaml up --build --watch" }, "imports": { "@atp/bytes": "jsr:@atp/bytes@^0.1.0-alpha.3", - "@atp/common": "jsr:@atp/common@^0.1.0-alpha.9", + "@atp/common": "jsr:@atp/common@^0.1.0-alpha.11", "@atp/crypto": "jsr:@atp/crypto@^0.1.0-alpha.3", "@atp/identity": "jsr:@atp/identity@^0.1.0-alpha.2", + "@atp/lex": "jsr:@atp/lex@^0.1.0-alpha.8", "@atp/lexicon": "jsr:@atp/lexicon@^0.1.0-alpha.4", - "@atp/repo": "jsr:@atp/repo@^0.1.0-alpha.5", + "@atp/repo": "jsr:@atp/repo@^0.1.0-alpha.6", "@atp/sync": "jsr:@atp/sync@^0.1.0-alpha.10", "@atp/syntax": "jsr:@atp/syntax@^0.1.0-alpha.2", - "@atp/xrpc": "jsr:@atp/xrpc@^0.1.0-alpha.4", - "@atp/xrpc-server": "jsr:@atp/xrpc-server@^0.1.0-alpha.9", + "@atp/xrpc": "jsr:@atp/xrpc@^0.1.0-alpha.6", + "@atp/xrpc-server": "jsr:@atp/xrpc-server@^0.1.0-alpha.11", "@std/assert": "jsr:@std/assert@^1.0.19", - "dotenv": "npm:dotenv@^17.3.1", - "hono": "jsr:@hono/hono@^4.12.9", + "dotenv": "npm:dotenv@^17.4.2", + "hono": "jsr:@hono/hono@^4.12.14", "@std/encoding": "jsr:@std/encoding@^1.0.10", "@atproto/api": "npm:@atproto/api@^0.18.21", "jose": "npm:jose@^6.2.2", - "mongoose": "npm:mongoose@^9.3.3", - "multiformats": "npm:multiformats@^13.4.2", - "p-queue": "npm:p-queue@^9.1.0", + "mongoose": "npm:mongoose@^9.5.0", + "p-queue": "npm:p-queue@^9.1.2", "mongodb-memory-server-core": "npm:mongodb-memory-server-core@^11.0.1", "structured-headers": "npm:structured-headers@^2.0.2" }, diff --git a/deno.lock b/deno.lock index c6f530a..adcc44d 100644 --- a/deno.lock +++ b/deno.lock @@ -2,47 +2,67 @@ "version": "5", "specifiers": { "jsr:@atp/bytes@~0.1.0-alpha.3": "0.1.0-alpha.3", - "jsr:@atp/common@~0.1.0-alpha.7": "0.1.0-alpha.9", - "jsr:@atp/common@~0.1.0-alpha.9": "0.1.0-alpha.9", + "jsr:@atp/common-web@~0.1.0-alpha.1": "0.1.0-alpha.1", + "jsr:@atp/common@~0.1.0-alpha.10": "0.1.0-alpha.11", + "jsr:@atp/common@~0.1.0-alpha.11": "0.1.0-alpha.11", + "jsr:@atp/common@~0.1.0-alpha.7": "0.1.0-alpha.11", + "jsr:@atp/common@~0.1.0-alpha.9": "0.1.0-alpha.11", "jsr:@atp/crypto@~0.1.0-alpha.3": "0.1.0-alpha.3", "jsr:@atp/identity@~0.1.0-alpha.2": "0.1.0-alpha.2", + "jsr:@atp/lex@~0.1.0-alpha.2": "0.1.0-alpha.8", + "jsr:@atp/lex@~0.1.0-alpha.4": "0.1.0-alpha.8", + "jsr:@atp/lex@~0.1.0-alpha.5": "0.1.0-alpha.8", + "jsr:@atp/lex@~0.1.0-alpha.6": "0.1.0-alpha.8", + "jsr:@atp/lex@~0.1.0-alpha.8": "0.1.0-alpha.8", "jsr:@atp/lexicon@~0.1.0-alpha.4": "0.1.0-alpha.4", - "jsr:@atp/repo@~0.1.0-alpha.5": "0.1.0-alpha.5", + "jsr:@atp/repo@~0.1.0-alpha.5": "0.1.0-alpha.6", + "jsr:@atp/repo@~0.1.0-alpha.6": "0.1.0-alpha.6", "jsr:@atp/sync@~0.1.0-alpha.10": "0.1.0-alpha.10", "jsr:@atp/syntax@~0.1.0-alpha.2": "0.1.0-alpha.2", - "jsr:@atp/xrpc-server@~0.1.0-alpha.9": "0.1.0-alpha.9", - "jsr:@atp/xrpc@~0.1.0-alpha.4": "0.1.0-alpha.4", - "jsr:@hono/hono@^4.10.8": "4.12.9", - "jsr:@hono/hono@^4.12.9": "4.12.9", + "jsr:@atp/xrpc-server@~0.1.0-alpha.11": "0.1.0-alpha.11", + "jsr:@atp/xrpc-server@~0.1.0-alpha.9": "0.1.0-alpha.11", + "jsr:@atp/xrpc@~0.1.0-alpha.6": "0.1.0-alpha.6", + "jsr:@cliffy/command@^1.0.0-rc.8": "1.0.1", + "jsr:@cliffy/flags@1.0.1": "1.0.1", + "jsr:@cliffy/internal@1.0.1": "1.0.1", + "jsr:@cliffy/table@1.0.1": "1.0.1", + "jsr:@david/code-block-writer@13": "13.0.3", + "jsr:@hono/hono@^4.10.8": "4.12.14", + "jsr:@hono/hono@^4.12.14": "4.12.14", "jsr:@logtape/file@^1.2.2": "1.3.7", "jsr:@logtape/logtape@^1.2.2": "1.3.7", "jsr:@logtape/logtape@^1.3.7": "1.3.7", - "jsr:@noble/curves@^2.0.1": "2.0.1", - "jsr:@noble/hashes@2": "2.0.1", - "jsr:@noble/hashes@^2.0.1": "2.0.1", - "jsr:@std/assert@^1.0.16": "1.0.19", + "jsr:@noble/curves@^2.0.1": "2.2.0", + "jsr:@noble/hashes@2.2.0": "2.2.0", + "jsr:@noble/hashes@^2.0.1": "2.2.0", "jsr:@std/assert@^1.0.19": "1.0.19", - "jsr:@std/bytes@^1.0.6": "1.0.6", - "jsr:@std/cbor@~0.1.9": "0.1.9", "jsr:@std/encoding@^1.0.10": "1.0.10", + "jsr:@std/fmt@^1.0.9": "1.0.9", + "jsr:@std/fs@1": "1.0.23", "jsr:@std/fs@^1.0.20": "1.0.23", "jsr:@std/internal@^1.0.12": "1.0.12", - "jsr:@std/streams@^1.0.14": "1.0.17", + "jsr:@std/path@1": "1.1.4", + "jsr:@std/path@^1.1.4": "1.1.4", + "jsr:@std/text@^1.0.17": "1.0.17", + "jsr:@ts-morph/common@0.27": "0.27.0", + "jsr:@ts-morph/ts-morph@26": "26.0.0", "jsr:@zod/zod@^4.1.13": "4.3.6", "npm:@atproto/api@~0.18.21": "0.18.21", "npm:@atproto/sync@*": "0.1.39", "npm:@bufbuild/protobuf@1.5.0": "1.5.0", - "npm:@ipld/dag-cbor@^9.2.5": "9.2.5", + "npm:@dprint/formatter@~0.5.1": "0.5.1", + "npm:@dprint/typescript@~0.95.15": "0.95.15", + "npm:@ipld/dag-cbor@^9.2.5": "9.2.6", "npm:@opentelemetry/api@^1.9.0": "1.9.1", - "npm:dotenv@^17.3.1": "17.3.1", + "npm:cborg@^4.2.15": "4.5.8", + "npm:dotenv@^17.4.2": "17.4.2", "npm:jose@^6.2.2": "6.2.2", "npm:lodash@*": "4.17.21", "npm:mongodb-memory-server-core@^11.0.1": "11.0.1", - "npm:mongoose@^9.3.3": "9.3.3", + "npm:mongoose@^9.5.0": "9.5.0", "npm:multiformats@^13.4.1": "13.4.2", - "npm:multiformats@^13.4.2": "13.4.2", "npm:p-queue@^8.1.1": "8.1.1", - "npm:p-queue@^9.1.0": "9.1.0", + "npm:p-queue@^9.1.2": "9.1.2", "npm:rate-limiter-flexible@9": "9.1.1", "npm:structured-headers@^2.0.2": "2.0.2" }, @@ -50,21 +70,27 @@ "@atp/bytes@0.1.0-alpha.3": { "integrity": "f47a93c5731cc4885170df128470616b64f66fe47f29740653b2769e9afe4c60", "dependencies": [ - "npm:multiformats@^13.4.1" + "npm:multiformats" ] }, - "@atp/common@0.1.0-alpha.9": { - "integrity": "b0b234bdf4d2cae3a5f7af1a44c71b3a9de88483c7a4aadf26c52a7f47a35254", + "@atp/common@0.1.0-alpha.11": { + "integrity": "18aed022d21e644ba3147546b76a67eab357f8239ab72266a4d2b3c777df7f1b", "dependencies": [ "jsr:@atp/bytes", + "jsr:@atp/common-web", + "jsr:@atp/lex@~0.1.0-alpha.5", "jsr:@logtape/file", "jsr:@logtape/logtape@^1.2.2", - "jsr:@std/cbor", "jsr:@std/encoding", - "jsr:@std/fs", + "jsr:@std/fs@^1.0.20", "jsr:@zod/zod", - "npm:@ipld/dag-cbor", - "npm:multiformats@^13.4.1" + "npm:multiformats" + ] + }, + "@atp/common-web@0.1.0-alpha.1": { + "integrity": "e2ac250a40e50e15134ca8c3a1568fd8099ca06849932640a7b2e0eaa93a63f3", + "dependencies": [ + "jsr:@zod/zod" ] }, "@atp/crypto@0.1.0-alpha.3": { @@ -83,26 +109,41 @@ "jsr:@atp/crypto" ] }, + "@atp/lex@0.1.0-alpha.8": { + "integrity": "1572a0e47aacf5ddea79cc8eb5542637959ef891b011234bbc70bff7e7fa625b", + "dependencies": [ + "jsr:@atp/bytes", + "jsr:@atp/crypto", + "jsr:@atp/identity", + "jsr:@atp/syntax", + "jsr:@cliffy/command", + "jsr:@ts-morph/ts-morph", + "npm:@dprint/formatter", + "npm:@dprint/typescript", + "npm:cborg", + "npm:multiformats" + ] + }, "@atp/lexicon@0.1.0-alpha.4": { "integrity": "802dcd6b93edd897fe1e4946269bc7a8f7f1c97f03b10ae6e268925325f4fc12", "dependencies": [ "jsr:@atp/common@~0.1.0-alpha.7", "jsr:@atp/syntax", "jsr:@zod/zod", - "npm:multiformats@^13.4.1" + "npm:multiformats" ] }, - "@atp/repo@0.1.0-alpha.5": { - "integrity": "1c351872f1b3310573ec112e05e49302c98ab2f600def46f4e4cb4126ca809ae", + "@atp/repo@0.1.0-alpha.6": { + "integrity": "f0873b0c600dc7eecf60359b390f2f4cdf5087c4f2ebb6865fa2081d90d612a9", "dependencies": [ "jsr:@atp/bytes", - "jsr:@atp/common@~0.1.0-alpha.7", + "jsr:@atp/common@~0.1.0-alpha.10", "jsr:@atp/crypto", + "jsr:@atp/lex@~0.1.0-alpha.4", "jsr:@atp/lexicon", "jsr:@std/encoding", "jsr:@zod/zod", - "npm:@ipld/dag-cbor", - "npm:multiformats@^13.4.1" + "npm:@ipld/dag-cbor" ] }, "@atp/sync@0.1.0-alpha.10": { @@ -111,43 +152,74 @@ "jsr:@atp/common@~0.1.0-alpha.9", "jsr:@atp/identity", "jsr:@atp/lexicon", - "jsr:@atp/repo", + "jsr:@atp/repo@~0.1.0-alpha.5", "jsr:@atp/syntax", - "jsr:@atp/xrpc-server", + "jsr:@atp/xrpc-server@~0.1.0-alpha.9", "npm:@opentelemetry/api", - "npm:multiformats@^13.4.1", + "npm:multiformats", "npm:p-queue@^8.1.1" ] }, "@atp/syntax@0.1.0-alpha.2": { "integrity": "f7ab598b6b3c3b01dc446077b4c57acc1f1cb8a45f91bd3eb394997408a712a2" }, - "@atp/xrpc@0.1.0-alpha.4": { - "integrity": "3dc2d76e08529635f2e385c73d5dbad9bb5c282b0c34b212d7157139ae9c4a1c", + "@atp/xrpc@0.1.0-alpha.6": { + "integrity": "9c63b51a0ce6f4a35ba49bebeec308dd05d558b946cd0f795ccb372f85e4f46a", "dependencies": [ + "jsr:@atp/lex@~0.1.0-alpha.2", "jsr:@atp/lexicon", "jsr:@zod/zod" ] }, - "@atp/xrpc-server@0.1.0-alpha.9": { - "integrity": "bffe6984ac0cab96bb56d866c665d2192cbbddc0df228f3055b2499a8058af97", + "@atp/xrpc-server@0.1.0-alpha.11": { + "integrity": "77726f73bfd90c882ab16b500eb6ac4eea40bcbf44d324366ecafac3e5723ccc", "dependencies": [ "jsr:@atp/bytes", - "jsr:@atp/common@~0.1.0-alpha.9", + "jsr:@atp/common@~0.1.0-alpha.11", "jsr:@atp/crypto", + "jsr:@atp/lex@~0.1.0-alpha.6", "jsr:@atp/lexicon", "jsr:@atp/xrpc", "jsr:@hono/hono@^4.10.8", - "jsr:@std/assert@^1.0.16", + "jsr:@std/assert", "jsr:@zod/zod", "npm:rate-limiter-flexible" ] }, + "@cliffy/command@1.0.1": { + "integrity": "0172d9c7d8aeb26b8f4f44ffa833247e4fbab707e258ee271e10a2a2f87b531d", + "dependencies": [ + "jsr:@cliffy/flags", + "jsr:@cliffy/internal", + "jsr:@cliffy/table", + "jsr:@std/fmt", + "jsr:@std/text" + ] + }, + "@cliffy/flags@1.0.1": { + "integrity": "468dcf65acb33b51ecb2e232c30603209c528b1d1bd9e065921b57fcb342cb01", + "dependencies": [ + "jsr:@cliffy/internal", + "jsr:@std/text" + ] + }, + "@cliffy/internal@1.0.1": { + "integrity": "9e2bba59ad559b790f09c57219c727a69f0179ebabc07f1bf9db25232b606760" + }, + "@cliffy/table@1.0.1": { + "integrity": "2b1baa3ef9e16ecb7f3fdcf1deb9f5fa5ffa308ea0e68478224a4c2d44d58166", + "dependencies": [ + "jsr:@std/fmt" + ] + }, + "@david/code-block-writer@13.0.3": { + "integrity": "f98c77d320f5957899a61bfb7a9bead7c6d83ad1515daee92dbacc861e13bb7f" + }, "@hono/hono@4.9.8": { "integrity": "908150f13e90181a051a3af3bf15203aff00190682afedfd38824d0cb9299a95" }, - "@hono/hono@4.12.9": { - "integrity": "53c2b0a721c1d782e6a347ad5bf15a3235ff624b98859c21f779b7ee2f5e040e" + "@hono/hono@4.12.14": { + "integrity": "4eedba4b53f27c8e0db683d515e11ec3b88b8fdc1748e229cd7988d243ca018d" }, "@logtape/file@1.3.7": { "integrity": "8cacd752ac49671135e80abc8cf4a843c377ab80906d075ece0e9105fc24677e", @@ -158,14 +230,14 @@ "@logtape/logtape@1.3.7": { "integrity": "d9dc1f8c7e2e1e4e3998006ea84eaf4054e40ad39325b056b3f517c013286bed" }, - "@noble/curves@2.0.1": { - "integrity": "21ef41d207a203f60ba37a4fdcbc4f4a545b10c5dab7f293889f18292f81ab23", + "@noble/curves@2.2.0": { + "integrity": "3eae7794c79c03fc92b082e988393369960cf998cbd9622d328720ca8adad6c3", "dependencies": [ - "jsr:@noble/hashes@2" + "jsr:@noble/hashes@2.2.0" ] }, - "@noble/hashes@2.0.1": { - "integrity": "e0e908292a0bf91099cf8ba0720a1647cef82ab38b588815b5e9535b4ff4d7bb" + "@noble/hashes@2.2.0": { + "integrity": "984d0f07d004ac13a6029ef2b200651b1572fcc952be4b313ef4e312ad696189" }, "@std/assert@1.0.19": { "integrity": "eaada96ee120cb980bc47e040f82814d786fe8162ecc53c91d8df60b8755991e", @@ -173,33 +245,50 @@ "jsr:@std/internal" ] }, - "@std/bytes@1.0.6": { - "integrity": "f6ac6adbd8ccd99314045f5703e23af0a68d7f7e58364b47d2c7f408aeb5820a" - }, - "@std/cbor@0.1.9": { - "integrity": "fe1f61f445a34c8f97973b58fecbfb24e48fcc88df7b1253d9b6fe5d2ea16936", - "dependencies": [ - "jsr:@std/bytes", - "jsr:@std/streams" - ] - }, "@std/encoding@1.0.10": { "integrity": "8783c6384a2d13abd5e9e87a7ae0520a30e9f56aeeaa3bdf910a3eaaf5c811a1" }, + "@std/fmt@1.0.9": { + "integrity": "2487343e8899fb2be5d0e3d35013e54477ada198854e52dd05ed0422eddcabe0" + }, "@std/fs@1.0.21": { "integrity": "d720fe1056d78d43065a4d6e0eeb2b19f34adb8a0bc7caf3a4dbf1d4178252cd" }, "@std/fs@1.0.23": { - "integrity": "3ecbae4ce4fee03b180fa710caff36bb5adb66631c46a6460aaad49515565a37" + "integrity": "3ecbae4ce4fee03b180fa710caff36bb5adb66631c46a6460aaad49515565a37", + "dependencies": [ + "jsr:@std/internal", + "jsr:@std/path@^1.1.4" + ] }, "@std/internal@1.0.12": { "integrity": "972a634fd5bc34b242024402972cd5143eac68d8dffaca5eaa4dba30ce17b027" }, + "@std/path@1.1.4": { + "integrity": "1d2d43f39efb1b42f0b1882a25486647cb851481862dc7313390b2bb044314b5", + "dependencies": [ + "jsr:@std/internal" + ] + }, "@std/streams@1.0.16": { "integrity": "85030627befb1767c60d4f65cb30fa2f94af1d6ee6e5b2515b76157a542e89c4" }, - "@std/streams@1.0.17": { - "integrity": "7859f3d9deed83cf4b41f19223d4a67661b3d3819e9fc117698f493bf5992140" + "@std/text@1.0.17": { + "integrity": "4b2c4ef67ae5b6c1dfd447c81c83a43718f52e3c7e748d8b33f694aba9895f95" + }, + "@ts-morph/common@0.27.0": { + "integrity": "c7b73592d78ce8479b356fd4f3d6ec3c460d77753a8680ff196effea7a939052", + "dependencies": [ + "jsr:@std/fs@1", + "jsr:@std/path@1" + ] + }, + "@ts-morph/ts-morph@26.0.0": { + "integrity": "f2b1ca67b4d1a6332d00c00dd48496b20879c899a702c1b92bcce1c552a168df", + "dependencies": [ + "jsr:@david/code-block-writer", + "jsr:@ts-morph/common" + ] }, "@zod/zod@4.2.1": { "integrity": "693a557fccaf73bfcbcd132ca286929f3343cda9efb56e9780985aa41d229b38" @@ -368,6 +457,12 @@ "@bufbuild/protobuf@1.5.0": { "integrity": "sha512-0Jg+B7Vl8YGCi7c3iZ8/38iTbZrwdU7or6QZlsA9lhSrhumaXOTMsGO8gqwDuus/THEkTiY3Uxn+PEJwgsLt0w==" }, + "@dprint/formatter@0.5.1": { + "integrity": "sha512-cdZUrm0iv/FnnY3CKE2dEcVhNEzrC551aE2h2mTFwQCRBrqyARLDnb7D+3PlXTUVp3s34ftlnGOVCmhLT9DeKA==" + }, + "@dprint/typescript@0.95.15": { + "integrity": "sha512-PQGYicsjlv7Eq+5BzpI04Ow2N9xeHkjr9O1TG3lDebK2B48IvXFQz0RwO4OhkKj22o7YLcjVIFM6WL7zVuM2ng==" + }, "@ipld/dag-cbor@7.0.3": { "integrity": "sha512-1VVh2huHsuohdXC1bGJNE8WR72slZ9XE2T3wbBBq31dm7ZBatmKLLxrB+XAqafxfRFjv08RZmj/W/ZqaM13AuA==", "dependencies": [ @@ -375,10 +470,10 @@ "multiformats@9.9.0" ] }, - "@ipld/dag-cbor@9.2.5": { - "integrity": "sha512-84wSr4jv30biui7endhobYhXBQzQE4c/wdoWlFrKcfiwH+ofaPg8fwsM8okX9cOzkkrsAsNdDyH3ou+kiLquwQ==", + "@ipld/dag-cbor@9.2.6": { + "integrity": "sha512-vZGJ84Em2jCVAS7td5gc08YTVN8/s4bTQxg4pU77PAXDAR/yLYOthOvkCu01fdl1lrZwz47RdUterxdkrs3p5A==", "dependencies": [ - "cborg@4.5.8", + "cborg@5.1.0", "multiformats@13.4.2" ] }, @@ -507,6 +602,10 @@ "integrity": "sha512-6/viltD51JklRhq4L7jC3zgy6gryuG5xfZ3kzpE+PravtyeQLeQmCYLREhQH7pWENg5pY4Yu/XCd6a7dKScVlw==", "bin": true }, + "cborg@5.1.0": { + "integrity": "sha512-OwailRORD5pIyxaLKKVdGHQ2OXWmYW7YsjDXnl64cIwWdQiyXRffVFsL34JR5c+BEeeSOHADM3cy/QNERH1SUw==", + "bin": true + }, "commondir@1.0.1": { "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" }, @@ -543,8 +642,8 @@ "destroy@1.2.0": { "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" }, - "dotenv@17.3.1": { - "integrity": "sha512-IO8C/dzEb6O3F9/twg6ZLXz164a2fhTnEWb95H23Dm4OuN+92NmEAlTrupP9VW6Jm3sO26tQlqyvyi4CsnY9GA==" + "dotenv@17.4.2": { + "integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==" }, "dunder-proto@1.0.1": { "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", @@ -749,8 +848,8 @@ "jose@6.2.2": { "integrity": "sha512-d7kPDd34KO/YnzaDOlikGpOurfF0ByC2sEV4cANCtdqLlTfBlw2p14O/5d/zv40gJPbIQxfES3nSx1/oYNyuZQ==" }, - "kareem@3.2.0": { - "integrity": "sha512-VS8MWZz/cT+SqBCpVfNN4zoVz5VskR3N4+sTmUXme55e9avQHntpwpNq0yjnosISXqwJ3AQVjlbI4Dyzv//JtA==" + "kareem@3.3.0": { + "integrity": "sha512-kpSuLD3/7RenBnjnJdOHXCKC8dTd1JzeOiJhN0necWWci6cC+qX+VuwPnMVgb+a4+KNJSfgqahpnfWaeDXCimw==" }, "locate-path@5.0.0": { "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", @@ -827,8 +926,8 @@ "mongodb-connection-string-url" ] }, - "mongoose@9.3.3": { - "integrity": "sha512-sfv5LOIPWeN5o/281kp4Rx9ZnuXb0g8CtvBTi7trYQs2PYYx8LWXegXxG3ar7VEns1o+d4h9LI/Dtc7dTTyYmA==", + "mongoose@9.5.0": { + "integrity": "sha512-B4blGFkFL1s0G24URuMvx0qTlx+gRVLmfO7WcSz8NcmW/XHEJ3G69capdyW1iRsGKiycp1tkwKHnxHbnwjwmPw==", "dependencies": [ "kareem", "mongodb", @@ -906,8 +1005,8 @@ "p-timeout@6.1.4" ] }, - "p-queue@9.1.0": { - "integrity": "sha512-O/ZPaXuQV29uSLbxWBGGZO1mCQXV2BLIwUr59JUU9SoH76mnYvtms7aafH/isNSNGwuEfP6W/4xD0/TJXxrizw==", + "p-queue@9.1.2": { + "integrity": "sha512-ktsDOALzTYTWWF1PbkNVg2rOt+HaOaMWJMUnt7T3qf5tvZ1L8dBW3tObzprBcXNMKkwj+yFSLqHso0x+UFcJXw==", "dependencies": [ "eventemitter3@5.0.4", "p-timeout@7.0.1" @@ -1241,25 +1340,25 @@ "workspace": { "dependencies": [ "jsr:@atp/bytes@~0.1.0-alpha.3", - "jsr:@atp/common@~0.1.0-alpha.9", + "jsr:@atp/common@~0.1.0-alpha.11", "jsr:@atp/crypto@~0.1.0-alpha.3", "jsr:@atp/identity@~0.1.0-alpha.2", + "jsr:@atp/lex@~0.1.0-alpha.8", "jsr:@atp/lexicon@~0.1.0-alpha.4", - "jsr:@atp/repo@~0.1.0-alpha.5", + "jsr:@atp/repo@~0.1.0-alpha.6", "jsr:@atp/sync@~0.1.0-alpha.10", "jsr:@atp/syntax@~0.1.0-alpha.2", - "jsr:@atp/xrpc-server@~0.1.0-alpha.9", - "jsr:@atp/xrpc@~0.1.0-alpha.4", - "jsr:@hono/hono@^4.12.9", + "jsr:@atp/xrpc-server@~0.1.0-alpha.11", + "jsr:@atp/xrpc@~0.1.0-alpha.6", + "jsr:@hono/hono@^4.12.14", "jsr:@std/assert@^1.0.19", "jsr:@std/encoding@^1.0.10", "npm:@atproto/api@~0.18.21", - "npm:dotenv@^17.3.1", + "npm:dotenv@^17.4.2", "npm:jose@^6.2.2", "npm:mongodb-memory-server-core@^11.0.1", - "npm:mongoose@^9.3.3", - "npm:multiformats@^13.4.2", - "npm:p-queue@^9.1.0", + "npm:mongoose@^9.5.0", + "npm:p-queue@^9.1.2", "npm:structured-headers@^2.0.2" ] } diff --git a/hydration/actor.ts b/hydration/actor.ts index 9aff2d8..2cd7335 100644 --- a/hydration/actor.ts +++ b/hydration/actor.ts @@ -1,5 +1,5 @@ import { DataPlane } from "../data-plane/index.ts"; -import { Record as ProfileRecord } from "../lex/types/so/sprk/actor/profile.ts"; +import * as so from "../lex/so.ts"; import { HydrationMap, parseRecord, @@ -7,6 +7,8 @@ import { safeTakedownRef, } from "./util.ts"; +export type ProfileRecord = so.sprk.actor.profile.Main; + export type Actor = { did: string; handle?: string; @@ -121,7 +123,11 @@ export class ActorHydrator { } const profile = actor.profile - ? parseRecord(actor.profile, includeTakedowns) + ? parseRecord( + so.sprk.actor.profile.main, + actor.profile, + includeTakedowns, + ) : undefined; return acc.set(did, { diff --git a/hydration/feed.ts b/hydration/feed.ts index 128e23b..8b4a62d 100644 --- a/hydration/feed.ts +++ b/hydration/feed.ts @@ -1,9 +1,4 @@ -import { Record as FeedGenRecord } from "../lex/types/so/sprk/feed/generator.ts"; -import { Record as LikeRecord } from "../lex/types/so/sprk/feed/like.ts"; -import { Record as PostRecord } from "../lex/types/so/sprk/feed/post.ts"; -import { Record as ReplyRecord } from "../lex/types/so/sprk/feed/reply.ts"; -import { Record as RepostRecord } from "../lex/types/app/bsky/feed/repost.ts"; -import { Record as AudioRecord } from "../lex/types/so/sprk/sound/audio.ts"; +import * as so from "../lex/so.ts"; import { uriToDid as didFromUri } from "../utils/uris.ts"; import { HydrationMap, @@ -15,6 +10,13 @@ import { } from "./util.ts"; import { DataPlane } from "../data-plane/index.ts"; +export type FeedGenRecord = so.sprk.feed.generator.Main; +export type LikeRecord = so.sprk.feed.like.Main; +export type PostRecord = so.sprk.feed.post.Main; +export type ReplyRecord = so.sprk.feed.reply.Main; +export type RepostRecord = so.sprk.feed.repost.Main; +export type AudioRecord = so.sprk.sound.audio.Main; + export type Post = RecordInfo; export type Posts = HydrationMap; export type Reply = RecordInfo; @@ -114,7 +116,11 @@ export class FeedHydrator { const res = await this.dataplane.records.getPostRecords(need); return need.reduce((acc, uri, i) => { - const record = parseRecord(res.records[i], includeTakedowns); + const record = parseRecord( + so.sprk.feed.post.main, + res.records[i], + includeTakedowns, + ); return acc.set( uri, record ? record : null, @@ -136,7 +142,11 @@ export class FeedHydrator { const res = await this.dataplane.records.getReplyRecords(need); return need.reduce((acc, uri, i) => { - const record = parseRecord(res.records[i], includeTakedowns); + const record = parseRecord( + so.sprk.feed.reply.main, + res.records[i], + includeTakedowns, + ); return acc.set( uri, record ? record : null, @@ -158,7 +168,11 @@ export class FeedHydrator { const res = await this.dataplane.records.getRecords(need); return need.reduce((acc, uri, i) => { - const record = parseRecord(res.records[i], includeTakedowns); + const record = parseRecord( + so.sprk.sound.audio.main, + res.records[i], + includeTakedowns, + ); return acc.set( uri, record ? record : null, @@ -273,6 +287,7 @@ export class FeedHydrator { const res = await this.dataplane.records.getFeedGeneratorRecords(uris); return uris.reduce((acc, uri, i) => { const record = parseRecord( + so.sprk.feed.generator.main, res.records[i], includeTakedowns, ); @@ -312,7 +327,11 @@ export class FeedHydrator { if (!uris.length) return new HydrationMap(); const res = await this.dataplane.records.getLikeRecords(uris); return uris.reduce((acc, uri, i) => { - const record = parseRecord(res.records[i], includeTakedowns); + const record = parseRecord( + so.sprk.feed.like.main, + res.records[i], + includeTakedowns, + ); return acc.set(uri, record ?? null); }, new HydrationMap()); } @@ -322,6 +341,7 @@ export class FeedHydrator { const res = await this.dataplane.records.getRepostRecords(uris); return uris.reduce((acc, uri, i) => { const record = parseRecord( + so.sprk.feed.repost.main, res.records[i], includeTakedowns, ); diff --git a/hydration/graph.ts b/hydration/graph.ts index 371e372..00cdc38 100644 --- a/hydration/graph.ts +++ b/hydration/graph.ts @@ -1,8 +1,10 @@ import { DataPlane } from "../data-plane/index.ts"; -import { Record as BlockRecord } from "../lex/types/app/bsky/graph/block.ts"; -import { Record as FollowRecord } from "../lex/types/app/bsky/graph/follow.ts"; +import * as so from "../lex/so.ts"; import { HydrationMap, parseRecord, RecordInfo } from "./util.ts"; +export type BlockRecord = so.sprk.graph.block.Main; +export type FollowRecord = so.sprk.graph.follow.Main; + export type Follow = RecordInfo; export type Follows = HydrationMap; @@ -79,6 +81,7 @@ export class GraphHydrator { const res = await this.dataplane.records.getFollowRecords(uris); return uris.reduce((acc, uri, i) => { const record = parseRecord( + so.sprk.graph.follow.main, res.records[i], includeTakedowns, ); @@ -93,7 +96,11 @@ export class GraphHydrator { if (!uris.length) return new HydrationMap(); const res = await this.dataplane.records.getBlockRecords(uris); return uris.reduce((acc, uri, i) => { - const record = parseRecord(res.records[i], includeTakedowns); + const record = parseRecord( + so.sprk.graph.block.main, + res.records[i], + includeTakedowns, + ); return acc.set(uri, record ?? null); }, new HydrationMap()); } diff --git a/hydration/index.ts b/hydration/index.ts index 50190af..19f8d36 100644 --- a/hydration/index.ts +++ b/hydration/index.ts @@ -1,9 +1,7 @@ import { assert } from "@std/assert"; import { AtUri } from "@atp/syntax"; import { DataPlane } from "../data-plane/index.ts"; -import { ids } from "../lex/lexicons.ts"; -import { Record as ProfileRecord } from "../lex/types/so/sprk/actor/profile.ts"; -import { Record as StoryRecord } from "../lex/types/so/sprk/story/post.ts"; +import * as so from "../lex/so.ts"; import { uriToDid as didFromUri } from "../utils/uris.ts"; import { ActivitySubscriptionStates, @@ -11,6 +9,7 @@ import { Actors, KnownFollowersStates, ProfileAggs, + ProfileRecord, ProfileViewerStates, } from "./actor.ts"; import { @@ -34,7 +33,7 @@ import { ThreadContexts, ThreadRef, } from "./feed.ts"; -import { Stories, StoryHydrator } from "./story.ts"; +import { Stories, StoryHydrator, StoryRecord } from "./story.ts"; import { BlockEntry, @@ -46,6 +45,7 @@ import { HydrationMap, ItemRef, mergeMaps, + parseRecord, RecordInfo, urisByCollection, } from "./util.ts"; @@ -319,10 +319,10 @@ export class Hydrator { state: HydrationState = {}, ): Promise { const postRefs = refs.filter((ref) => - new AtUri(ref.uri).collection === ids.SoSprkFeedPost + new AtUri(ref.uri).collection === so.sprk.feed.post.$type ); const replyRefs = refs.filter((ref) => - new AtUri(ref.uri).collection === ids.SoSprkFeedReply + new AtUri(ref.uri).collection === so.sprk.feed.reply.$type ); const allUris = refs.map((ref) => ref.uri); @@ -366,7 +366,7 @@ export class Hydrator { const threadRefs: ThreadRef[] = []; for (const ref of refs) { const collection = new AtUri(ref.uri).collection; - if (collection === ids.SoSprkFeedPost) { + if (collection === so.sprk.feed.post.$type) { const post = state.posts!.get(ref.uri); if (!post) continue; threadRefs.push({ @@ -374,7 +374,7 @@ export class Hydrator { cid: post.cid, threadRoot: ref.uri, }); - } else if (collection === ids.SoSprkFeedReply) { + } else if (collection === so.sprk.feed.reply.$type) { const reply = state.replies!.get(ref.uri); if (!reply) continue; const rootUri = reply.record.reply?.root.uri ?? ref.uri; @@ -553,9 +553,9 @@ export class Hydrator { for (const { post } of items) { const collection = new AtUri(post.uri).collection; - if (collection === ids.SoSprkFeedPost) { + if (collection === so.sprk.feed.post.$type) { postUris.push(post.uri); - } else if (collection === ids.SoSprkFeedReply) { + } else if (collection === so.sprk.feed.reply.$type) { replyUris.push(post.uri); replyRefs.push(post); } @@ -770,11 +770,11 @@ export class Hydrator { ): Promise { const uris = notifs.map((notif) => notif.uri); const collections = urisByCollection(uris); - const postUris = collections.get(ids.SoSprkFeedPost) ?? []; - const replyUris = collections.get(ids.SoSprkFeedReply) ?? []; - const likeUris = collections.get(ids.SoSprkFeedLike) ?? []; - const repostUris = collections.get(ids.SoSprkFeedRepost) ?? []; - const followUris = collections.get(ids.SoSprkGraphFollow) ?? []; + const postUris = collections.get(so.sprk.feed.post.$type) ?? []; + const replyUris = collections.get(so.sprk.feed.reply.$type) ?? []; + const likeUris = collections.get(so.sprk.feed.like.$type) ?? []; + const repostUris = collections.get(so.sprk.feed.repost.$type) ?? []; + const followUris = collections.get(so.sprk.graph.follow.$type) ?? []; // Collect subject URIs for like/repost/reply notifications to hydrate their content const subjectPostUris: string[] = []; @@ -787,9 +787,9 @@ export class Hydrator { notif.reason === "reply") ) { const subjectUri = new AtUri(notif.reasonSubject); - if (subjectUri.collection === ids.SoSprkFeedPost) { + if (subjectUri.collection === so.sprk.feed.post.$type) { subjectPostUris.push(notif.reasonSubject); - } else if (subjectUri.collection === ids.SoSprkFeedReply) { + } else if (subjectUri.collection === so.sprk.feed.reply.$type) { subjectReplyUris.push(notif.reasonSubject); } } @@ -955,54 +955,54 @@ export class Hydrator { async getRecord(uri: string, includeTakedowns = false) { const parsed = new AtUri(uri); const collection = parsed.collection; - if (collection === ids.SoSprkFeedPost) { + if (collection === so.sprk.feed.post.$type) { return ( (await this.feed.getPosts([uri], includeTakedowns)).get(uri) ?? undefined ); - } else if (collection === ids.SoSprkFeedReply) { + } else if (collection === so.sprk.feed.reply.$type) { return ( (await this.feed.getReplies([uri], includeTakedowns)).get(uri) ?? undefined ); - } else if (collection === ids.SoSprkFeedRepost) { + } else if (collection === so.sprk.feed.repost.$type) { return ( (await this.feed.getReposts([uri], includeTakedowns)).get(uri) ?? undefined ); - } else if (collection === ids.SoSprkFeedLike) { + } else if (collection === so.sprk.feed.like.$type) { return ( (await this.feed.getLikes([uri], includeTakedowns)).get(uri) ?? undefined ); - } else if (collection === ids.SoSprkSoundAudio) { + } else if (collection === so.sprk.sound.audio.$type) { return ( (await this.feed.getSounds([uri], includeTakedowns)).get(uri) ?? undefined ); - } else if (collection === ids.SoSprkGraphFollow) { + } else if (collection === so.sprk.graph.follow.$type) { return ( (await this.graph.getFollows([uri], includeTakedowns)).get(uri) ?? undefined ); - } else if (collection === ids.SoSprkGraphBlock) { + } else if (collection === so.sprk.graph.block.$type) { return ( (await this.graph.getBlocks([uri], includeTakedowns)).get(uri) ?? undefined ); - } else if (collection === ids.SoSprkFeedGenerator) { + } else if (collection === so.sprk.feed.generator.$type) { return ( (await this.feed.getFeedGens([uri], includeTakedowns)).get(uri) ?? undefined ); - } else if (collection === ids.SoSprkLabelerService) { + } else if (collection === so.sprk.labeler.service.$type) { if (parsed.rkey !== "self") return; const did = parsed.hostname; return ( (await this.label.getLabelers([did], includeTakedowns)).get(did) ?? undefined ); - } else if (collection === ids.SoSprkActorProfile) { + } else if (collection === so.sprk.actor.profile.$type) { const did = parsed.hostname; const actor = ( await this.actor.getActors([did], { includeTakedowns }) @@ -1017,30 +1017,18 @@ export class Hydrator { }; return recordInfo; - } else if (collection === ids.SoSprkStoryPost) { + } else if (collection === so.sprk.story.post.$type) { // Get story records through dataplane const res = await this.dataplane.records.getStoryRecords([uri]); const storyRecord = res.records[0]; if (!storyRecord || !storyRecord.cid) return undefined; - // Parse the record JSON - const record = JSON.parse(storyRecord.record); - if (!record) return undefined; - - const recordInfo: RecordInfo = { - record, - cid: storyRecord.cid, - sortedAt: storyRecord.sortedAt - ? new Date(storyRecord.sortedAt) - : new Date(storyRecord.createdAt || storyRecord.indexedAt || 0), - indexedAt: storyRecord.indexedAt - ? new Date(storyRecord.indexedAt) - : new Date(0), - takedownRef: storyRecord.takedownRef, - }; - - return recordInfo; + return parseRecord( + so.sprk.story.post.main, + storyRecord, + includeTakedowns, + ); } } @@ -1087,7 +1075,7 @@ const labelSubjectsForDid = (dids: string[]) => { return [ ...dids, ...dids.map((did) => - AtUri.make(did, ids.SoSprkActorProfile, "self").toString() + AtUri.make(did, so.sprk.actor.profile.$type, "self").toString() ), ]; }; diff --git a/hydration/label.ts b/hydration/label.ts index 0810e74..0476232 100644 --- a/hydration/label.ts +++ b/hydration/label.ts @@ -1,8 +1,7 @@ import { AtUri } from "@atp/syntax"; import { DataPlane } from "../data-plane/index.ts"; -import { ids } from "../lex/lexicons.ts"; -import { Record as LabelerRecord } from "../lex/types/so/sprk/labeler/service.ts"; -import { Label } from "../lex/types/com/atproto/label/defs.ts"; +import * as com from "../lex/com.ts"; +import * as so from "../lex/so.ts"; import { ParsedLabelers } from "../util.ts"; import { HydrationMap, @@ -12,7 +11,8 @@ import { RecordInfo, } from "./util.ts"; -export type { Label } from "../lex/types/com/atproto/label/defs.ts"; +export type Label = com.atproto.label.defs.Label; +export type LabelerRecord = so.sprk.labeler.service.Main; export type SubjectLabels = { isImpersonation: boolean; @@ -131,6 +131,7 @@ export class LabelHydrator { const res = await this.dataplane.records.getRecords(uris); return dids.reduce((acc, did, i) => { const record = parseRecord( + so.sprk.labeler.service.main, res.records[i], includeTakedowns, ); @@ -166,7 +167,7 @@ export class LabelHydrator { } const labelerDidToUri = (did: string): string => { - return AtUri.make(did, ids.SoSprkLabelerService, "self").toString(); + return AtUri.make(did, so.sprk.labeler.service.$type, "self").toString(); }; const IMPERSONATION_LABEL = "impersonation"; diff --git a/hydration/story.ts b/hydration/story.ts index 4bc2499..1decba2 100644 --- a/hydration/story.ts +++ b/hydration/story.ts @@ -1,4 +1,4 @@ -import { Record as StoryRecord } from "../lex/types/so/sprk/story/post.ts"; +import * as so from "../lex/so.ts"; import { HydrationMap, ItemRef, @@ -8,6 +8,8 @@ import { } from "./util.ts"; import { DataPlane } from "../data-plane/index.ts"; +export type StoryRecord = so.sprk.story.post.Main; + export type Story = RecordInfo; export type Stories = HydrationMap; @@ -39,7 +41,11 @@ export class StoryHydrator { const res = await this.dataplane.records.getStoryRecords(need); return need.reduce((acc, uri, i) => { - const record = parseRecord(res.records[i], includeTakedowns); + const record = parseRecord( + so.sprk.story.post.main, + res.records[i], + includeTakedowns, + ); return acc.set( uri, record ?? null, diff --git a/hydration/util.ts b/hydration/util.ts index dc62b30..f7d1764 100644 --- a/hydration/util.ts +++ b/hydration/util.ts @@ -1,9 +1,6 @@ -import { CID } from "multiformats/cid"; - +import { l, lexParse } from "@atp/lex"; import { AtUri } from "@atp/syntax"; -import { lexicons } from "../lex/lexicons.ts"; import { Record } from "../data-plane/routes/records.ts"; -import { jsonStringToLex, RepoRecord } from "@atp/lexicon"; export class HydrationMap extends Map implements Merges { merge(map: HydrationMap): this { @@ -59,18 +56,24 @@ export const mergeManyMaps = (...maps: HydrationMap[]) => { export type ItemRef = { uri: string; cid?: string }; export const parseRecord = ( + recordSchema: l.RecordSchema, entry: Record, includeTakedowns: boolean, ): RecordInfo | undefined => { if (!includeTakedowns && entry.takenDown) { return undefined; } - const record = JSON.parse(entry.record); + let record: unknown; + try { + record = lexParse(entry.record, { strict: false }); + } catch { + return; + } const cid = entry.cid; const sortedAt = new Date(entry.sortedAt ?? 0); const indexedAt = new Date(entry.indexedAt ?? 0); if (!record || !cid) return; - if (!isValidRecord(entry.record)) { + if (!recordSchema.$matches(record)) { return; } return { @@ -82,33 +85,10 @@ export const parseRecord = ( }; }; -const isValidRecord = (record: string) => { - const lex = jsonStringToLex(record); - const lexRecord = lex as RepoRecord; - if (typeof lexRecord["$type"] !== "string") { - return false; - } - try { - lexicons.assertValidRecord(lexRecord["$type"], lexRecord); - return true; - } catch { - return false; - } -}; - export const parseString = (str: string | undefined): string | undefined => { return str && str.length > 0 ? str : undefined; }; -export const parseCid = (cidStr: string | undefined): CID | undefined => { - if (!cidStr || cidStr.length === 0) return; - try { - return CID.parse(cidStr); - } catch { - return; - } -}; - export const urisByCollection = (uris: string[]): Map => { const result = new Map(); for (const uri of uris) { diff --git a/lex/index.ts b/lex/index.ts deleted file mode 100644 index 74061f8..0000000 --- a/lex/index.ts +++ /dev/null @@ -1,4799 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { - type Auth, - createServer as createXrpcServer, - type MethodConfigOrHandler, - type Options as XrpcOptions, - type Server as XrpcServer, - type StreamConfigOrHandler, -} from "@atp/xrpc-server"; -import { schemas } from "./lexicons.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 AppBskyDraftCreateDraft from "./types/app/bsky/draft/createDraft.ts"; -import type * as AppBskyDraftUpdateDraft from "./types/app/bsky/draft/updateDraft.ts"; -import type * as AppBskyDraftGetDrafts from "./types/app/bsky/draft/getDrafts.ts"; -import type * as AppBskyDraftDeleteDraft from "./types/app/bsky/draft/deleteDraft.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 AppBskyContactSendNotification from "./types/app/bsky/contact/sendNotification.ts"; -import type * as AppBskyContactGetSyncStatus from "./types/app/bsky/contact/getSyncStatus.ts"; -import type * as AppBskyContactStartPhoneVerification from "./types/app/bsky/contact/startPhoneVerification.ts"; -import type * as AppBskyContactGetMatches from "./types/app/bsky/contact/getMatches.ts"; -import type * as AppBskyContactImportContacts from "./types/app/bsky/contact/importContacts.ts"; -import type * as AppBskyContactDismissMatch from "./types/app/bsky/contact/dismissMatch.ts"; -import type * as AppBskyContactRemoveData from "./types/app/bsky/contact/removeData.ts"; -import type * as AppBskyContactVerifyPhone from "./types/app/bsky/contact/verifyPhone.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 AppBskyUnspeccedGetSuggestedUsersForExplore from "./types/app/bsky/unspecced/getSuggestedUsersForExplore.ts"; -import type * as AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton from "./types/app/bsky/unspecced/getOnboardingSuggestedStarterPacksSkeleton.ts"; -import type * as AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton from "./types/app/bsky/unspecced/getSuggestedUsersForExploreSkeleton.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 AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton from "./types/app/bsky/unspecced/getOnboardingSuggestedUsersSkeleton.ts"; -import type * as AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton from "./types/app/bsky/unspecced/getSuggestedUsersForDiscoverSkeleton.ts"; -import type * as AppBskyUnspeccedGetSuggestedUsersForDiscover from "./types/app/bsky/unspecced/getSuggestedUsersForDiscover.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 AppBskyUnspeccedGetSuggestedOnboardingUsers from "./types/app/bsky/unspecced/getSuggestedOnboardingUsers.ts"; -import type * as AppBskyUnspeccedGetSuggestedUsersForSeeMore from "./types/app/bsky/unspecced/getSuggestedUsersForSeeMore.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 AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton from "./types/app/bsky/unspecced/getSuggestedUsersForSeeMoreSkeleton.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 SoSprkNotificationUnregisterPush from "./types/so/sprk/notification/unregisterPush.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 SoSprkFeedGetCrosspostThread from "./types/so/sprk/feed/getCrosspostThread.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 SoSprkFeedGetActorReposts from "./types/so/sprk/feed/getActorReposts.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", - DefsRoleModerator: "tools.ozone.team.defs#roleModerator", - DefsRoleTriage: "tools.ozone.team.defs#roleTriage", - DefsRoleVerifier: "tools.ozone.team.defs#roleVerifier", -}; -export const TOOLS_OZONE_REPORT = { - DefsReasonAppeal: "tools.ozone.report.defs#reasonAppeal", - DefsReasonOther: "tools.ozone.report.defs#reasonOther", - DefsReasonViolenceAnimal: "tools.ozone.report.defs#reasonViolenceAnimal", - DefsReasonViolenceThreats: "tools.ozone.report.defs#reasonViolenceThreats", - DefsReasonViolenceGraphicContent: - "tools.ozone.report.defs#reasonViolenceGraphicContent", - DefsReasonViolenceGlorification: - "tools.ozone.report.defs#reasonViolenceGlorification", - DefsReasonViolenceExtremistContent: - "tools.ozone.report.defs#reasonViolenceExtremistContent", - DefsReasonViolenceTrafficking: - "tools.ozone.report.defs#reasonViolenceTrafficking", - DefsReasonViolenceOther: "tools.ozone.report.defs#reasonViolenceOther", - DefsReasonSexualAbuseContent: - "tools.ozone.report.defs#reasonSexualAbuseContent", - DefsReasonSexualNCII: "tools.ozone.report.defs#reasonSexualNCII", - DefsReasonSexualDeepfake: "tools.ozone.report.defs#reasonSexualDeepfake", - DefsReasonSexualAnimal: "tools.ozone.report.defs#reasonSexualAnimal", - DefsReasonSexualUnlabeled: "tools.ozone.report.defs#reasonSexualUnlabeled", - DefsReasonSexualOther: "tools.ozone.report.defs#reasonSexualOther", - DefsReasonChildSafetyCSAM: "tools.ozone.report.defs#reasonChildSafetyCSAM", - DefsReasonChildSafetyGroom: "tools.ozone.report.defs#reasonChildSafetyGroom", - DefsReasonChildSafetyPrivacy: - "tools.ozone.report.defs#reasonChildSafetyPrivacy", - DefsReasonChildSafetyHarassment: - "tools.ozone.report.defs#reasonChildSafetyHarassment", - DefsReasonChildSafetyOther: "tools.ozone.report.defs#reasonChildSafetyOther", - DefsReasonHarassmentTroll: "tools.ozone.report.defs#reasonHarassmentTroll", - DefsReasonHarassmentTargeted: - "tools.ozone.report.defs#reasonHarassmentTargeted", - DefsReasonHarassmentHateSpeech: - "tools.ozone.report.defs#reasonHarassmentHateSpeech", - DefsReasonHarassmentDoxxing: - "tools.ozone.report.defs#reasonHarassmentDoxxing", - DefsReasonHarassmentOther: "tools.ozone.report.defs#reasonHarassmentOther", - DefsReasonMisleadingBot: "tools.ozone.report.defs#reasonMisleadingBot", - DefsReasonMisleadingImpersonation: - "tools.ozone.report.defs#reasonMisleadingImpersonation", - DefsReasonMisleadingSpam: "tools.ozone.report.defs#reasonMisleadingSpam", - DefsReasonMisleadingScam: "tools.ozone.report.defs#reasonMisleadingScam", - DefsReasonMisleadingElections: - "tools.ozone.report.defs#reasonMisleadingElections", - DefsReasonMisleadingOther: "tools.ozone.report.defs#reasonMisleadingOther", - DefsReasonRuleSiteSecurity: "tools.ozone.report.defs#reasonRuleSiteSecurity", - DefsReasonRuleProhibitedSales: - "tools.ozone.report.defs#reasonRuleProhibitedSales", - DefsReasonRuleBanEvasion: "tools.ozone.report.defs#reasonRuleBanEvasion", - DefsReasonRuleOther: "tools.ozone.report.defs#reasonRuleOther", - DefsReasonSelfHarmContent: "tools.ozone.report.defs#reasonSelfHarmContent", - DefsReasonSelfHarmED: "tools.ozone.report.defs#reasonSelfHarmED", - DefsReasonSelfHarmStunts: "tools.ozone.report.defs#reasonSelfHarmStunts", - DefsReasonSelfHarmSubstances: - "tools.ozone.report.defs#reasonSelfHarmSubstances", - DefsReasonSelfHarmOther: "tools.ozone.report.defs#reasonSelfHarmOther", -}; -export const TOOLS_OZONE_MODERATION = { - DefsReviewOpen: "tools.ozone.moderation.defs#reviewOpen", - DefsReviewEscalated: "tools.ozone.moderation.defs#reviewEscalated", - DefsReviewClosed: "tools.ozone.moderation.defs#reviewClosed", - DefsReviewNone: "tools.ozone.moderation.defs#reviewNone", - DefsTimelineEventPlcCreate: - "tools.ozone.moderation.defs#timelineEventPlcCreate", - DefsTimelineEventPlcOperation: - "tools.ozone.moderation.defs#timelineEventPlcOperation", - DefsTimelineEventPlcTombstone: - "tools.ozone.moderation.defs#timelineEventPlcTombstone", -}; -export const APP_BSKY_GRAPH = { - DefsModlist: "app.bsky.graph.defs#modlist", - DefsCuratelist: "app.bsky.graph.defs#curatelist", - DefsReferencelist: "app.bsky.graph.defs#referencelist", -}; -export const APP_BSKY_FEED = { - DefsRequestLess: "app.bsky.feed.defs#requestLess", - DefsRequestMore: "app.bsky.feed.defs#requestMore", - DefsClickthroughItem: "app.bsky.feed.defs#clickthroughItem", - DefsClickthroughAuthor: "app.bsky.feed.defs#clickthroughAuthor", - DefsClickthroughReposter: "app.bsky.feed.defs#clickthroughReposter", - DefsClickthroughEmbed: "app.bsky.feed.defs#clickthroughEmbed", - DefsContentModeUnspecified: "app.bsky.feed.defs#contentModeUnspecified", - DefsContentModeVideo: "app.bsky.feed.defs#contentModeVideo", - DefsInteractionSeen: "app.bsky.feed.defs#interactionSeen", - DefsInteractionLike: "app.bsky.feed.defs#interactionLike", - DefsInteractionRepost: "app.bsky.feed.defs#interactionRepost", - DefsInteractionReply: "app.bsky.feed.defs#interactionReply", - DefsInteractionQuote: "app.bsky.feed.defs#interactionQuote", - DefsInteractionShare: "app.bsky.feed.defs#interactionShare", -}; -export const APP_BSKY_ACTOR = { - StatusLive: "app.bsky.actor.status#live", -}; -export const SO_SPRK_FEED = { - DefsRequestLess: "so.sprk.feed.defs#requestLess", - DefsRequestMore: "so.sprk.feed.defs#requestMore", - DefsClickthroughItem: "so.sprk.feed.defs#clickthroughItem", - DefsClickthroughAuthor: "so.sprk.feed.defs#clickthroughAuthor", - DefsClickthroughReposter: "so.sprk.feed.defs#clickthroughReposter", - DefsClickthroughEmbed: "so.sprk.feed.defs#clickthroughEmbed", - DefsInteractionSeen: "so.sprk.feed.defs#interactionSeen", - DefsInteractionLike: "so.sprk.feed.defs#interactionLike", - DefsInteractionRepost: "so.sprk.feed.defs#interactionRepost", - DefsInteractionReply: "so.sprk.feed.defs#interactionReply", - DefsInteractionShare: "so.sprk.feed.defs#interactionShare", -}; -export const COM_ATPROTO_MODERATION = { - DefsReasonSpam: "com.atproto.moderation.defs#reasonSpam", - DefsReasonViolation: "com.atproto.moderation.defs#reasonViolation", - DefsReasonMisleading: "com.atproto.moderation.defs#reasonMisleading", - DefsReasonSexual: "com.atproto.moderation.defs#reasonSexual", - DefsReasonRude: "com.atproto.moderation.defs#reasonRude", - DefsReasonOther: "com.atproto.moderation.defs#reasonOther", - DefsReasonAppeal: "com.atproto.moderation.defs#reasonAppeal", -}; - -export function createServer(options?: XrpcOptions): Server { - return new Server(options); -} - -export class Server { - xrpc: XrpcServer; - tools: ToolsNS; - app: AppNS; - chat: ChatNS; - so: SoNS; - com: ComNS; - - constructor(options?: XrpcOptions) { - this.xrpc = createXrpcServer(schemas, options); - this.tools = new ToolsNS(this); - this.app = new AppNS(this); - this.chat = new ChatNS(this); - this.so = new SoNS(this); - this.com = new ComNS(this); - } -} - -export class ToolsNS { - _server: Server; - ozone: ToolsOzoneNS; - - constructor(server: Server) { - this._server = server; - this.ozone = new ToolsOzoneNS(server); - } -} - -export class ToolsOzoneNS { - _server: Server; - signature: ToolsOzoneSignatureNS; - server: ToolsOzoneServerNS; - verification: ToolsOzoneVerificationNS; - safelink: ToolsOzoneSafelinkNS; - team: ToolsOzoneTeamNS; - hosting: ToolsOzoneHostingNS; - communication: ToolsOzoneCommunicationNS; - set: ToolsOzoneSetNS; - setting: ToolsOzoneSettingNS; - moderation: ToolsOzoneModerationNS; - - constructor(server: Server) { - this._server = server; - this.signature = new ToolsOzoneSignatureNS(server); - this.server = new ToolsOzoneServerNS(server); - this.verification = new ToolsOzoneVerificationNS(server); - this.safelink = new ToolsOzoneSafelinkNS(server); - this.team = new ToolsOzoneTeamNS(server); - this.hosting = new ToolsOzoneHostingNS(server); - this.communication = new ToolsOzoneCommunicationNS(server); - this.set = new ToolsOzoneSetNS(server); - this.setting = new ToolsOzoneSettingNS(server); - this.moderation = new ToolsOzoneModerationNS(server); - } -} - -export class ToolsOzoneSignatureNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - findCorrelation( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSignatureFindCorrelation.QueryParams, - ToolsOzoneSignatureFindCorrelation.HandlerInput, - ToolsOzoneSignatureFindCorrelation.HandlerOutput - >, - ) { - const nsid = "tools.ozone.signature.findCorrelation"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - searchAccounts( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSignatureSearchAccounts.QueryParams, - ToolsOzoneSignatureSearchAccounts.HandlerInput, - ToolsOzoneSignatureSearchAccounts.HandlerOutput - >, - ) { - const nsid = "tools.ozone.signature.searchAccounts"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - findRelatedAccounts( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSignatureFindRelatedAccounts.QueryParams, - ToolsOzoneSignatureFindRelatedAccounts.HandlerInput, - ToolsOzoneSignatureFindRelatedAccounts.HandlerOutput - >, - ) { - const nsid = "tools.ozone.signature.findRelatedAccounts"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ToolsOzoneServerNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - getConfig( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneServerGetConfig.QueryParams, - ToolsOzoneServerGetConfig.HandlerInput, - ToolsOzoneServerGetConfig.HandlerOutput - >, - ) { - const nsid = "tools.ozone.server.getConfig"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ToolsOzoneVerificationNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - revokeVerifications( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneVerificationRevokeVerifications.QueryParams, - ToolsOzoneVerificationRevokeVerifications.HandlerInput, - ToolsOzoneVerificationRevokeVerifications.HandlerOutput - >, - ) { - const nsid = "tools.ozone.verification.revokeVerifications"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - grantVerifications( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneVerificationGrantVerifications.QueryParams, - ToolsOzoneVerificationGrantVerifications.HandlerInput, - ToolsOzoneVerificationGrantVerifications.HandlerOutput - >, - ) { - const nsid = "tools.ozone.verification.grantVerifications"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - listVerifications( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneVerificationListVerifications.QueryParams, - ToolsOzoneVerificationListVerifications.HandlerInput, - ToolsOzoneVerificationListVerifications.HandlerOutput - >, - ) { - const nsid = "tools.ozone.verification.listVerifications"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ToolsOzoneSafelinkNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - addRule( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSafelinkAddRule.QueryParams, - ToolsOzoneSafelinkAddRule.HandlerInput, - ToolsOzoneSafelinkAddRule.HandlerOutput - >, - ) { - const nsid = "tools.ozone.safelink.addRule"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - removeRule( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSafelinkRemoveRule.QueryParams, - ToolsOzoneSafelinkRemoveRule.HandlerInput, - ToolsOzoneSafelinkRemoveRule.HandlerOutput - >, - ) { - const nsid = "tools.ozone.safelink.removeRule"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - updateRule( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSafelinkUpdateRule.QueryParams, - ToolsOzoneSafelinkUpdateRule.HandlerInput, - ToolsOzoneSafelinkUpdateRule.HandlerOutput - >, - ) { - const nsid = "tools.ozone.safelink.updateRule"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - queryEvents( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSafelinkQueryEvents.QueryParams, - ToolsOzoneSafelinkQueryEvents.HandlerInput, - ToolsOzoneSafelinkQueryEvents.HandlerOutput - >, - ) { - const nsid = "tools.ozone.safelink.queryEvents"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - queryRules( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSafelinkQueryRules.QueryParams, - ToolsOzoneSafelinkQueryRules.HandlerInput, - ToolsOzoneSafelinkQueryRules.HandlerOutput - >, - ) { - const nsid = "tools.ozone.safelink.queryRules"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ToolsOzoneTeamNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - listMembers( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneTeamListMembers.QueryParams, - ToolsOzoneTeamListMembers.HandlerInput, - ToolsOzoneTeamListMembers.HandlerOutput - >, - ) { - const nsid = "tools.ozone.team.listMembers"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - deleteMember( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneTeamDeleteMember.QueryParams, - ToolsOzoneTeamDeleteMember.HandlerInput, - ToolsOzoneTeamDeleteMember.HandlerOutput - >, - ) { - const nsid = "tools.ozone.team.deleteMember"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - updateMember( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneTeamUpdateMember.QueryParams, - ToolsOzoneTeamUpdateMember.HandlerInput, - ToolsOzoneTeamUpdateMember.HandlerOutput - >, - ) { - const nsid = "tools.ozone.team.updateMember"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - addMember( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneTeamAddMember.QueryParams, - ToolsOzoneTeamAddMember.HandlerInput, - ToolsOzoneTeamAddMember.HandlerOutput - >, - ) { - const nsid = "tools.ozone.team.addMember"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ToolsOzoneHostingNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - getAccountHistory( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneHostingGetAccountHistory.QueryParams, - ToolsOzoneHostingGetAccountHistory.HandlerInput, - ToolsOzoneHostingGetAccountHistory.HandlerOutput - >, - ) { - const nsid = "tools.ozone.hosting.getAccountHistory"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ToolsOzoneCommunicationNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - updateTemplate( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneCommunicationUpdateTemplate.QueryParams, - ToolsOzoneCommunicationUpdateTemplate.HandlerInput, - ToolsOzoneCommunicationUpdateTemplate.HandlerOutput - >, - ) { - const nsid = "tools.ozone.communication.updateTemplate"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - createTemplate( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneCommunicationCreateTemplate.QueryParams, - ToolsOzoneCommunicationCreateTemplate.HandlerInput, - ToolsOzoneCommunicationCreateTemplate.HandlerOutput - >, - ) { - const nsid = "tools.ozone.communication.createTemplate"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - listTemplates( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneCommunicationListTemplates.QueryParams, - ToolsOzoneCommunicationListTemplates.HandlerInput, - ToolsOzoneCommunicationListTemplates.HandlerOutput - >, - ) { - const nsid = "tools.ozone.communication.listTemplates"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - deleteTemplate( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneCommunicationDeleteTemplate.QueryParams, - ToolsOzoneCommunicationDeleteTemplate.HandlerInput, - ToolsOzoneCommunicationDeleteTemplate.HandlerOutput - >, - ) { - const nsid = "tools.ozone.communication.deleteTemplate"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ToolsOzoneSetNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - addValues( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSetAddValues.QueryParams, - ToolsOzoneSetAddValues.HandlerInput, - ToolsOzoneSetAddValues.HandlerOutput - >, - ) { - const nsid = "tools.ozone.set.addValues"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getValues( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSetGetValues.QueryParams, - ToolsOzoneSetGetValues.HandlerInput, - ToolsOzoneSetGetValues.HandlerOutput - >, - ) { - const nsid = "tools.ozone.set.getValues"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - deleteSet( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSetDeleteSet.QueryParams, - ToolsOzoneSetDeleteSet.HandlerInput, - ToolsOzoneSetDeleteSet.HandlerOutput - >, - ) { - const nsid = "tools.ozone.set.deleteSet"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - upsertSet( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSetUpsertSet.QueryParams, - ToolsOzoneSetUpsertSet.HandlerInput, - ToolsOzoneSetUpsertSet.HandlerOutput - >, - ) { - const nsid = "tools.ozone.set.upsertSet"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - deleteValues( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSetDeleteValues.QueryParams, - ToolsOzoneSetDeleteValues.HandlerInput, - ToolsOzoneSetDeleteValues.HandlerOutput - >, - ) { - const nsid = "tools.ozone.set.deleteValues"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - querySets( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSetQuerySets.QueryParams, - ToolsOzoneSetQuerySets.HandlerInput, - ToolsOzoneSetQuerySets.HandlerOutput - >, - ) { - const nsid = "tools.ozone.set.querySets"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ToolsOzoneSettingNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - listOptions( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSettingListOptions.QueryParams, - ToolsOzoneSettingListOptions.HandlerInput, - ToolsOzoneSettingListOptions.HandlerOutput - >, - ) { - const nsid = "tools.ozone.setting.listOptions"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - removeOptions( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSettingRemoveOptions.QueryParams, - ToolsOzoneSettingRemoveOptions.HandlerInput, - ToolsOzoneSettingRemoveOptions.HandlerOutput - >, - ) { - const nsid = "tools.ozone.setting.removeOptions"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - upsertOption( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneSettingUpsertOption.QueryParams, - ToolsOzoneSettingUpsertOption.HandlerInput, - ToolsOzoneSettingUpsertOption.HandlerOutput - >, - ) { - const nsid = "tools.ozone.setting.upsertOption"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ToolsOzoneModerationNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - getReporterStats( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationGetReporterStats.QueryParams, - ToolsOzoneModerationGetReporterStats.HandlerInput, - ToolsOzoneModerationGetReporterStats.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.getReporterStats"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - cancelScheduledActions( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationCancelScheduledActions.QueryParams, - ToolsOzoneModerationCancelScheduledActions.HandlerInput, - ToolsOzoneModerationCancelScheduledActions.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.cancelScheduledActions"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - listScheduledActions( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationListScheduledActions.QueryParams, - ToolsOzoneModerationListScheduledActions.HandlerInput, - ToolsOzoneModerationListScheduledActions.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.listScheduledActions"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - queryStatuses( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationQueryStatuses.QueryParams, - ToolsOzoneModerationQueryStatuses.HandlerInput, - ToolsOzoneModerationQueryStatuses.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.queryStatuses"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getRepo( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationGetRepo.QueryParams, - ToolsOzoneModerationGetRepo.HandlerInput, - ToolsOzoneModerationGetRepo.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.getRepo"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSubjects( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationGetSubjects.QueryParams, - ToolsOzoneModerationGetSubjects.HandlerInput, - ToolsOzoneModerationGetSubjects.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.getSubjects"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getRecords( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationGetRecords.QueryParams, - ToolsOzoneModerationGetRecords.HandlerInput, - ToolsOzoneModerationGetRecords.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.getRecords"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - scheduleAction( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationScheduleAction.QueryParams, - ToolsOzoneModerationScheduleAction.HandlerInput, - ToolsOzoneModerationScheduleAction.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.scheduleAction"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getEvent( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationGetEvent.QueryParams, - ToolsOzoneModerationGetEvent.HandlerInput, - ToolsOzoneModerationGetEvent.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.getEvent"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - queryEvents( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationQueryEvents.QueryParams, - ToolsOzoneModerationQueryEvents.HandlerInput, - ToolsOzoneModerationQueryEvents.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.queryEvents"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getRecord( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationGetRecord.QueryParams, - ToolsOzoneModerationGetRecord.HandlerInput, - ToolsOzoneModerationGetRecord.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.getRecord"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - emitEvent( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationEmitEvent.QueryParams, - ToolsOzoneModerationEmitEvent.HandlerInput, - ToolsOzoneModerationEmitEvent.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.emitEvent"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - searchRepos( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationSearchRepos.QueryParams, - ToolsOzoneModerationSearchRepos.HandlerInput, - ToolsOzoneModerationSearchRepos.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.searchRepos"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getAccountTimeline( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationGetAccountTimeline.QueryParams, - ToolsOzoneModerationGetAccountTimeline.HandlerInput, - ToolsOzoneModerationGetAccountTimeline.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.getAccountTimeline"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getRepos( - cfg: MethodConfigOrHandler< - A, - ToolsOzoneModerationGetRepos.QueryParams, - ToolsOzoneModerationGetRepos.HandlerInput, - ToolsOzoneModerationGetRepos.HandlerOutput - >, - ) { - const nsid = "tools.ozone.moderation.getRepos"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class AppNS { - _server: Server; - bsky: AppBskyNS; - - constructor(server: Server) { - this._server = server; - this.bsky = new AppBskyNS(server); - } -} - -export class AppBskyNS { - _server: Server; - draft: AppBskyDraftNS; - video: AppBskyVideoNS; - contact: AppBskyContactNS; - bookmark: AppBskyBookmarkNS; - embed: AppBskyEmbedNS; - notification: AppBskyNotificationNS; - unspecced: AppBskyUnspeccedNS; - graph: AppBskyGraphNS; - feed: AppBskyFeedNS; - richtext: AppBskyRichtextNS; - ageassurance: AppBskyAgeassuranceNS; - actor: AppBskyActorNS; - labeler: AppBskyLabelerNS; - - constructor(server: Server) { - this._server = server; - this.draft = new AppBskyDraftNS(server); - this.video = new AppBskyVideoNS(server); - this.contact = new AppBskyContactNS(server); - this.bookmark = new AppBskyBookmarkNS(server); - this.embed = new AppBskyEmbedNS(server); - this.notification = new AppBskyNotificationNS(server); - this.unspecced = new AppBskyUnspeccedNS(server); - this.graph = new AppBskyGraphNS(server); - this.feed = new AppBskyFeedNS(server); - this.richtext = new AppBskyRichtextNS(server); - this.ageassurance = new AppBskyAgeassuranceNS(server); - this.actor = new AppBskyActorNS(server); - this.labeler = new AppBskyLabelerNS(server); - } -} - -export class AppBskyDraftNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - createDraft( - cfg: MethodConfigOrHandler< - A, - AppBskyDraftCreateDraft.QueryParams, - AppBskyDraftCreateDraft.HandlerInput, - AppBskyDraftCreateDraft.HandlerOutput - >, - ) { - const nsid = "app.bsky.draft.createDraft"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - updateDraft( - cfg: MethodConfigOrHandler< - A, - AppBskyDraftUpdateDraft.QueryParams, - AppBskyDraftUpdateDraft.HandlerInput, - AppBskyDraftUpdateDraft.HandlerOutput - >, - ) { - const nsid = "app.bsky.draft.updateDraft"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getDrafts( - cfg: MethodConfigOrHandler< - A, - AppBskyDraftGetDrafts.QueryParams, - AppBskyDraftGetDrafts.HandlerInput, - AppBskyDraftGetDrafts.HandlerOutput - >, - ) { - const nsid = "app.bsky.draft.getDrafts"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - deleteDraft( - cfg: MethodConfigOrHandler< - A, - AppBskyDraftDeleteDraft.QueryParams, - AppBskyDraftDeleteDraft.HandlerInput, - AppBskyDraftDeleteDraft.HandlerOutput - >, - ) { - const nsid = "app.bsky.draft.deleteDraft"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class AppBskyVideoNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - uploadVideo( - cfg: MethodConfigOrHandler< - A, - AppBskyVideoUploadVideo.QueryParams, - AppBskyVideoUploadVideo.HandlerInput, - AppBskyVideoUploadVideo.HandlerOutput - >, - ) { - const nsid = "app.bsky.video.uploadVideo"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getJobStatus( - cfg: MethodConfigOrHandler< - A, - AppBskyVideoGetJobStatus.QueryParams, - AppBskyVideoGetJobStatus.HandlerInput, - AppBskyVideoGetJobStatus.HandlerOutput - >, - ) { - const nsid = "app.bsky.video.getJobStatus"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getUploadLimits( - cfg: MethodConfigOrHandler< - A, - AppBskyVideoGetUploadLimits.QueryParams, - AppBskyVideoGetUploadLimits.HandlerInput, - AppBskyVideoGetUploadLimits.HandlerOutput - >, - ) { - const nsid = "app.bsky.video.getUploadLimits"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class AppBskyContactNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - sendNotification( - cfg: MethodConfigOrHandler< - A, - AppBskyContactSendNotification.QueryParams, - AppBskyContactSendNotification.HandlerInput, - AppBskyContactSendNotification.HandlerOutput - >, - ) { - const nsid = "app.bsky.contact.sendNotification"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSyncStatus( - cfg: MethodConfigOrHandler< - A, - AppBskyContactGetSyncStatus.QueryParams, - AppBskyContactGetSyncStatus.HandlerInput, - AppBskyContactGetSyncStatus.HandlerOutput - >, - ) { - const nsid = "app.bsky.contact.getSyncStatus"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - startPhoneVerification( - cfg: MethodConfigOrHandler< - A, - AppBskyContactStartPhoneVerification.QueryParams, - AppBskyContactStartPhoneVerification.HandlerInput, - AppBskyContactStartPhoneVerification.HandlerOutput - >, - ) { - const nsid = "app.bsky.contact.startPhoneVerification"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getMatches( - cfg: MethodConfigOrHandler< - A, - AppBskyContactGetMatches.QueryParams, - AppBskyContactGetMatches.HandlerInput, - AppBskyContactGetMatches.HandlerOutput - >, - ) { - const nsid = "app.bsky.contact.getMatches"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - importContacts( - cfg: MethodConfigOrHandler< - A, - AppBskyContactImportContacts.QueryParams, - AppBskyContactImportContacts.HandlerInput, - AppBskyContactImportContacts.HandlerOutput - >, - ) { - const nsid = "app.bsky.contact.importContacts"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - dismissMatch( - cfg: MethodConfigOrHandler< - A, - AppBskyContactDismissMatch.QueryParams, - AppBskyContactDismissMatch.HandlerInput, - AppBskyContactDismissMatch.HandlerOutput - >, - ) { - const nsid = "app.bsky.contact.dismissMatch"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - removeData( - cfg: MethodConfigOrHandler< - A, - AppBskyContactRemoveData.QueryParams, - AppBskyContactRemoveData.HandlerInput, - AppBskyContactRemoveData.HandlerOutput - >, - ) { - const nsid = "app.bsky.contact.removeData"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - verifyPhone( - cfg: MethodConfigOrHandler< - A, - AppBskyContactVerifyPhone.QueryParams, - AppBskyContactVerifyPhone.HandlerInput, - AppBskyContactVerifyPhone.HandlerOutput - >, - ) { - const nsid = "app.bsky.contact.verifyPhone"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class AppBskyBookmarkNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - deleteBookmark( - cfg: MethodConfigOrHandler< - A, - AppBskyBookmarkDeleteBookmark.QueryParams, - AppBskyBookmarkDeleteBookmark.HandlerInput, - AppBskyBookmarkDeleteBookmark.HandlerOutput - >, - ) { - const nsid = "app.bsky.bookmark.deleteBookmark"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getBookmarks( - cfg: MethodConfigOrHandler< - A, - AppBskyBookmarkGetBookmarks.QueryParams, - AppBskyBookmarkGetBookmarks.HandlerInput, - AppBskyBookmarkGetBookmarks.HandlerOutput - >, - ) { - const nsid = "app.bsky.bookmark.getBookmarks"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - createBookmark( - cfg: MethodConfigOrHandler< - A, - AppBskyBookmarkCreateBookmark.QueryParams, - AppBskyBookmarkCreateBookmark.HandlerInput, - AppBskyBookmarkCreateBookmark.HandlerOutput - >, - ) { - const nsid = "app.bsky.bookmark.createBookmark"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class AppBskyEmbedNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } -} - -export class AppBskyNotificationNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - registerPush( - cfg: MethodConfigOrHandler< - A, - AppBskyNotificationRegisterPush.QueryParams, - AppBskyNotificationRegisterPush.HandlerInput, - AppBskyNotificationRegisterPush.HandlerOutput - >, - ) { - const nsid = "app.bsky.notification.registerPush"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - putPreferences( - cfg: MethodConfigOrHandler< - A, - AppBskyNotificationPutPreferences.QueryParams, - AppBskyNotificationPutPreferences.HandlerInput, - AppBskyNotificationPutPreferences.HandlerOutput - >, - ) { - const nsid = "app.bsky.notification.putPreferences"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - putActivitySubscription( - cfg: MethodConfigOrHandler< - A, - AppBskyNotificationPutActivitySubscription.QueryParams, - AppBskyNotificationPutActivitySubscription.HandlerInput, - AppBskyNotificationPutActivitySubscription.HandlerOutput - >, - ) { - const nsid = "app.bsky.notification.putActivitySubscription"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - putPreferencesV2( - cfg: MethodConfigOrHandler< - A, - AppBskyNotificationPutPreferencesV2.QueryParams, - AppBskyNotificationPutPreferencesV2.HandlerInput, - AppBskyNotificationPutPreferencesV2.HandlerOutput - >, - ) { - const nsid = "app.bsky.notification.putPreferencesV2"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - updateSeen( - cfg: MethodConfigOrHandler< - A, - AppBskyNotificationUpdateSeen.QueryParams, - AppBskyNotificationUpdateSeen.HandlerInput, - AppBskyNotificationUpdateSeen.HandlerOutput - >, - ) { - const nsid = "app.bsky.notification.updateSeen"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - listActivitySubscriptions( - cfg: MethodConfigOrHandler< - A, - AppBskyNotificationListActivitySubscriptions.QueryParams, - AppBskyNotificationListActivitySubscriptions.HandlerInput, - AppBskyNotificationListActivitySubscriptions.HandlerOutput - >, - ) { - const nsid = "app.bsky.notification.listActivitySubscriptions"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - unregisterPush( - cfg: MethodConfigOrHandler< - A, - AppBskyNotificationUnregisterPush.QueryParams, - AppBskyNotificationUnregisterPush.HandlerInput, - AppBskyNotificationUnregisterPush.HandlerOutput - >, - ) { - const nsid = "app.bsky.notification.unregisterPush"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getPreferences( - cfg: MethodConfigOrHandler< - A, - AppBskyNotificationGetPreferences.QueryParams, - AppBskyNotificationGetPreferences.HandlerInput, - AppBskyNotificationGetPreferences.HandlerOutput - >, - ) { - const nsid = "app.bsky.notification.getPreferences"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - listNotifications( - cfg: MethodConfigOrHandler< - A, - AppBskyNotificationListNotifications.QueryParams, - AppBskyNotificationListNotifications.HandlerInput, - AppBskyNotificationListNotifications.HandlerOutput - >, - ) { - const nsid = "app.bsky.notification.listNotifications"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getUnreadCount( - cfg: MethodConfigOrHandler< - A, - AppBskyNotificationGetUnreadCount.QueryParams, - AppBskyNotificationGetUnreadCount.HandlerInput, - AppBskyNotificationGetUnreadCount.HandlerOutput - >, - ) { - const nsid = "app.bsky.notification.getUnreadCount"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class AppBskyUnspeccedNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - getSuggestedFeedsSkeleton( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetSuggestedFeedsSkeleton.QueryParams, - AppBskyUnspeccedGetSuggestedFeedsSkeleton.HandlerInput, - AppBskyUnspeccedGetSuggestedFeedsSkeleton.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getSuggestedFeedsSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - searchStarterPacksSkeleton( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedSearchStarterPacksSkeleton.QueryParams, - AppBskyUnspeccedSearchStarterPacksSkeleton.HandlerInput, - AppBskyUnspeccedSearchStarterPacksSkeleton.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.searchStarterPacksSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedUsersForExplore( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetSuggestedUsersForExplore.QueryParams, - AppBskyUnspeccedGetSuggestedUsersForExplore.HandlerInput, - AppBskyUnspeccedGetSuggestedUsersForExplore.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getSuggestedUsersForExplore"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getOnboardingSuggestedStarterPacksSkeleton( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton.QueryParams, - AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton.HandlerInput, - AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton.HandlerOutput - >, - ) { - const nsid = - "app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedUsersForExploreSkeleton( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton.QueryParams, - AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton.HandlerInput, - AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getSuggestedUsersForExploreSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedUsers( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetSuggestedUsers.QueryParams, - AppBskyUnspeccedGetSuggestedUsers.HandlerInput, - AppBskyUnspeccedGetSuggestedUsers.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getSuggestedUsers"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getPostThreadOtherV2( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetPostThreadOtherV2.QueryParams, - AppBskyUnspeccedGetPostThreadOtherV2.HandlerInput, - AppBskyUnspeccedGetPostThreadOtherV2.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getPostThreadOtherV2"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedStarterPacks( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetSuggestedStarterPacks.QueryParams, - AppBskyUnspeccedGetSuggestedStarterPacks.HandlerInput, - AppBskyUnspeccedGetSuggestedStarterPacks.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getSuggestedStarterPacks"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedStarterPacksSkeleton( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetSuggestedStarterPacksSkeleton.QueryParams, - AppBskyUnspeccedGetSuggestedStarterPacksSkeleton.HandlerInput, - AppBskyUnspeccedGetSuggestedStarterPacksSkeleton.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getSuggestedStarterPacksSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getOnboardingSuggestedStarterPacks( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetOnboardingSuggestedStarterPacks.QueryParams, - AppBskyUnspeccedGetOnboardingSuggestedStarterPacks.HandlerInput, - AppBskyUnspeccedGetOnboardingSuggestedStarterPacks.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getOnboardingSuggestedStarterPacks"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedUsersSkeleton( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetSuggestedUsersSkeleton.QueryParams, - AppBskyUnspeccedGetSuggestedUsersSkeleton.HandlerInput, - AppBskyUnspeccedGetSuggestedUsersSkeleton.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getSuggestedUsersSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getPostThreadV2( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetPostThreadV2.QueryParams, - AppBskyUnspeccedGetPostThreadV2.HandlerInput, - AppBskyUnspeccedGetPostThreadV2.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getPostThreadV2"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getTrends( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetTrends.QueryParams, - AppBskyUnspeccedGetTrends.HandlerInput, - AppBskyUnspeccedGetTrends.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getTrends"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - searchActorsSkeleton( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedSearchActorsSkeleton.QueryParams, - AppBskyUnspeccedSearchActorsSkeleton.HandlerInput, - AppBskyUnspeccedSearchActorsSkeleton.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.searchActorsSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestionsSkeleton( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetSuggestionsSkeleton.QueryParams, - AppBskyUnspeccedGetSuggestionsSkeleton.HandlerInput, - AppBskyUnspeccedGetSuggestionsSkeleton.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getSuggestionsSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - searchPostsSkeleton( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedSearchPostsSkeleton.QueryParams, - AppBskyUnspeccedSearchPostsSkeleton.HandlerInput, - AppBskyUnspeccedSearchPostsSkeleton.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.searchPostsSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getOnboardingSuggestedUsersSkeleton( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton.QueryParams, - AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton.HandlerInput, - AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getOnboardingSuggestedUsersSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedUsersForDiscoverSkeleton( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton.QueryParams, - AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton.HandlerInput, - AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getSuggestedUsersForDiscoverSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedUsersForDiscover( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetSuggestedUsersForDiscover.QueryParams, - AppBskyUnspeccedGetSuggestedUsersForDiscover.HandlerInput, - AppBskyUnspeccedGetSuggestedUsersForDiscover.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getSuggestedUsersForDiscover"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getAgeAssuranceState( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetAgeAssuranceState.QueryParams, - AppBskyUnspeccedGetAgeAssuranceState.HandlerInput, - AppBskyUnspeccedGetAgeAssuranceState.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getAgeAssuranceState"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getPopularFeedGenerators( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetPopularFeedGenerators.QueryParams, - AppBskyUnspeccedGetPopularFeedGenerators.HandlerInput, - AppBskyUnspeccedGetPopularFeedGenerators.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getPopularFeedGenerators"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedOnboardingUsers( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetSuggestedOnboardingUsers.QueryParams, - AppBskyUnspeccedGetSuggestedOnboardingUsers.HandlerInput, - AppBskyUnspeccedGetSuggestedOnboardingUsers.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getSuggestedOnboardingUsers"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedUsersForSeeMore( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetSuggestedUsersForSeeMore.QueryParams, - AppBskyUnspeccedGetSuggestedUsersForSeeMore.HandlerInput, - AppBskyUnspeccedGetSuggestedUsersForSeeMore.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getSuggestedUsersForSeeMore"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - initAgeAssurance( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedInitAgeAssurance.QueryParams, - AppBskyUnspeccedInitAgeAssurance.HandlerInput, - AppBskyUnspeccedInitAgeAssurance.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.initAgeAssurance"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getTrendingTopics( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetTrendingTopics.QueryParams, - AppBskyUnspeccedGetTrendingTopics.HandlerInput, - AppBskyUnspeccedGetTrendingTopics.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getTrendingTopics"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getTaggedSuggestions( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetTaggedSuggestions.QueryParams, - AppBskyUnspeccedGetTaggedSuggestions.HandlerInput, - AppBskyUnspeccedGetTaggedSuggestions.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getTaggedSuggestions"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedUsersForSeeMoreSkeleton( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton.QueryParams, - AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton.HandlerInput, - AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getSuggestedUsersForSeeMoreSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedFeeds( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetSuggestedFeeds.QueryParams, - AppBskyUnspeccedGetSuggestedFeeds.HandlerInput, - AppBskyUnspeccedGetSuggestedFeeds.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getSuggestedFeeds"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getTrendsSkeleton( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetTrendsSkeleton.QueryParams, - AppBskyUnspeccedGetTrendsSkeleton.HandlerInput, - AppBskyUnspeccedGetTrendsSkeleton.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getTrendsSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getConfig( - cfg: MethodConfigOrHandler< - A, - AppBskyUnspeccedGetConfig.QueryParams, - AppBskyUnspeccedGetConfig.HandlerInput, - AppBskyUnspeccedGetConfig.HandlerOutput - >, - ) { - const nsid = "app.bsky.unspecced.getConfig"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class AppBskyGraphNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - getStarterPacks( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetStarterPacks.QueryParams, - AppBskyGraphGetStarterPacks.HandlerInput, - AppBskyGraphGetStarterPacks.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getStarterPacks"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedFollowsByActor( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetSuggestedFollowsByActor.QueryParams, - AppBskyGraphGetSuggestedFollowsByActor.HandlerInput, - AppBskyGraphGetSuggestedFollowsByActor.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getSuggestedFollowsByActor"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getStarterPacksWithMembership( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetStarterPacksWithMembership.QueryParams, - AppBskyGraphGetStarterPacksWithMembership.HandlerInput, - AppBskyGraphGetStarterPacksWithMembership.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getStarterPacksWithMembership"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getListsWithMembership( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetListsWithMembership.QueryParams, - AppBskyGraphGetListsWithMembership.HandlerInput, - AppBskyGraphGetListsWithMembership.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getListsWithMembership"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - unmuteActorList( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphUnmuteActorList.QueryParams, - AppBskyGraphUnmuteActorList.HandlerInput, - AppBskyGraphUnmuteActorList.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.unmuteActorList"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getListBlocks( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetListBlocks.QueryParams, - AppBskyGraphGetListBlocks.HandlerInput, - AppBskyGraphGetListBlocks.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getListBlocks"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getStarterPack( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetStarterPack.QueryParams, - AppBskyGraphGetStarterPack.HandlerInput, - AppBskyGraphGetStarterPack.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getStarterPack"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - muteActorList( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphMuteActorList.QueryParams, - AppBskyGraphMuteActorList.HandlerInput, - AppBskyGraphMuteActorList.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.muteActorList"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - muteThread( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphMuteThread.QueryParams, - AppBskyGraphMuteThread.HandlerInput, - AppBskyGraphMuteThread.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.muteThread"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - searchStarterPacks( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphSearchStarterPacks.QueryParams, - AppBskyGraphSearchStarterPacks.HandlerInput, - AppBskyGraphSearchStarterPacks.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.searchStarterPacks"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getActorStarterPacks( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetActorStarterPacks.QueryParams, - AppBskyGraphGetActorStarterPacks.HandlerInput, - AppBskyGraphGetActorStarterPacks.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getActorStarterPacks"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getLists( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetLists.QueryParams, - AppBskyGraphGetLists.HandlerInput, - AppBskyGraphGetLists.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getLists"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getFollowers( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetFollowers.QueryParams, - AppBskyGraphGetFollowers.HandlerInput, - AppBskyGraphGetFollowers.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getFollowers"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - unmuteThread( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphUnmuteThread.QueryParams, - AppBskyGraphUnmuteThread.HandlerInput, - AppBskyGraphUnmuteThread.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.unmuteThread"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - muteActor( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphMuteActor.QueryParams, - AppBskyGraphMuteActor.HandlerInput, - AppBskyGraphMuteActor.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.muteActor"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getMutes( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetMutes.QueryParams, - AppBskyGraphGetMutes.HandlerInput, - AppBskyGraphGetMutes.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getMutes"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getKnownFollowers( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetKnownFollowers.QueryParams, - AppBskyGraphGetKnownFollowers.HandlerInput, - AppBskyGraphGetKnownFollowers.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getKnownFollowers"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getListMutes( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetListMutes.QueryParams, - AppBskyGraphGetListMutes.HandlerInput, - AppBskyGraphGetListMutes.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getListMutes"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getFollows( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetFollows.QueryParams, - AppBskyGraphGetFollows.HandlerInput, - AppBskyGraphGetFollows.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getFollows"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getBlocks( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetBlocks.QueryParams, - AppBskyGraphGetBlocks.HandlerInput, - AppBskyGraphGetBlocks.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getBlocks"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getRelationships( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetRelationships.QueryParams, - AppBskyGraphGetRelationships.HandlerInput, - AppBskyGraphGetRelationships.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getRelationships"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - unmuteActor( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphUnmuteActor.QueryParams, - AppBskyGraphUnmuteActor.HandlerInput, - AppBskyGraphUnmuteActor.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.unmuteActor"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getList( - cfg: MethodConfigOrHandler< - A, - AppBskyGraphGetList.QueryParams, - AppBskyGraphGetList.HandlerInput, - AppBskyGraphGetList.HandlerOutput - >, - ) { - const nsid = "app.bsky.graph.getList"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class AppBskyFeedNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - sendInteractions( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedSendInteractions.QueryParams, - AppBskyFeedSendInteractions.HandlerInput, - AppBskyFeedSendInteractions.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.sendInteractions"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getFeedGenerators( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetFeedGenerators.QueryParams, - AppBskyFeedGetFeedGenerators.HandlerInput, - AppBskyFeedGetFeedGenerators.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getFeedGenerators"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getTimeline( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetTimeline.QueryParams, - AppBskyFeedGetTimeline.HandlerInput, - AppBskyFeedGetTimeline.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getTimeline"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getFeedGenerator( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetFeedGenerator.QueryParams, - AppBskyFeedGetFeedGenerator.HandlerInput, - AppBskyFeedGetFeedGenerator.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getFeedGenerator"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getAuthorFeed( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetAuthorFeed.QueryParams, - AppBskyFeedGetAuthorFeed.HandlerInput, - AppBskyFeedGetAuthorFeed.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getAuthorFeed"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getLikes( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetLikes.QueryParams, - AppBskyFeedGetLikes.HandlerInput, - AppBskyFeedGetLikes.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getLikes"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getPostThread( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetPostThread.QueryParams, - AppBskyFeedGetPostThread.HandlerInput, - AppBskyFeedGetPostThread.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getPostThread"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getActorLikes( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetActorLikes.QueryParams, - AppBskyFeedGetActorLikes.HandlerInput, - AppBskyFeedGetActorLikes.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getActorLikes"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getRepostedBy( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetRepostedBy.QueryParams, - AppBskyFeedGetRepostedBy.HandlerInput, - AppBskyFeedGetRepostedBy.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getRepostedBy"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - describeFeedGenerator( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedDescribeFeedGenerator.QueryParams, - AppBskyFeedDescribeFeedGenerator.HandlerInput, - AppBskyFeedDescribeFeedGenerator.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.describeFeedGenerator"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - searchPosts( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedSearchPosts.QueryParams, - AppBskyFeedSearchPosts.HandlerInput, - AppBskyFeedSearchPosts.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.searchPosts"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getPosts( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetPosts.QueryParams, - AppBskyFeedGetPosts.HandlerInput, - AppBskyFeedGetPosts.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getPosts"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getFeed( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetFeed.QueryParams, - AppBskyFeedGetFeed.HandlerInput, - AppBskyFeedGetFeed.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getFeed"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getQuotes( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetQuotes.QueryParams, - AppBskyFeedGetQuotes.HandlerInput, - AppBskyFeedGetQuotes.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getQuotes"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getFeedSkeleton( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetFeedSkeleton.QueryParams, - AppBskyFeedGetFeedSkeleton.HandlerInput, - AppBskyFeedGetFeedSkeleton.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getFeedSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getListFeed( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetListFeed.QueryParams, - AppBskyFeedGetListFeed.HandlerInput, - AppBskyFeedGetListFeed.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getListFeed"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedFeeds( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetSuggestedFeeds.QueryParams, - AppBskyFeedGetSuggestedFeeds.HandlerInput, - AppBskyFeedGetSuggestedFeeds.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getSuggestedFeeds"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getActorFeeds( - cfg: MethodConfigOrHandler< - A, - AppBskyFeedGetActorFeeds.QueryParams, - AppBskyFeedGetActorFeeds.HandlerInput, - AppBskyFeedGetActorFeeds.HandlerOutput - >, - ) { - const nsid = "app.bsky.feed.getActorFeeds"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class AppBskyRichtextNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } -} - -export class AppBskyAgeassuranceNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - begin( - cfg: MethodConfigOrHandler< - A, - AppBskyAgeassuranceBegin.QueryParams, - AppBskyAgeassuranceBegin.HandlerInput, - AppBskyAgeassuranceBegin.HandlerOutput - >, - ) { - const nsid = "app.bsky.ageassurance.begin"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getState( - cfg: MethodConfigOrHandler< - A, - AppBskyAgeassuranceGetState.QueryParams, - AppBskyAgeassuranceGetState.HandlerInput, - AppBskyAgeassuranceGetState.HandlerOutput - >, - ) { - const nsid = "app.bsky.ageassurance.getState"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getConfig( - cfg: MethodConfigOrHandler< - A, - AppBskyAgeassuranceGetConfig.QueryParams, - AppBskyAgeassuranceGetConfig.HandlerInput, - AppBskyAgeassuranceGetConfig.HandlerOutput - >, - ) { - const nsid = "app.bsky.ageassurance.getConfig"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class AppBskyActorNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - searchActorsTypeahead( - cfg: MethodConfigOrHandler< - A, - AppBskyActorSearchActorsTypeahead.QueryParams, - AppBskyActorSearchActorsTypeahead.HandlerInput, - AppBskyActorSearchActorsTypeahead.HandlerOutput - >, - ) { - const nsid = "app.bsky.actor.searchActorsTypeahead"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - putPreferences( - cfg: MethodConfigOrHandler< - A, - AppBskyActorPutPreferences.QueryParams, - AppBskyActorPutPreferences.HandlerInput, - AppBskyActorPutPreferences.HandlerOutput - >, - ) { - const nsid = "app.bsky.actor.putPreferences"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getProfile( - cfg: MethodConfigOrHandler< - A, - AppBskyActorGetProfile.QueryParams, - AppBskyActorGetProfile.HandlerInput, - AppBskyActorGetProfile.HandlerOutput - >, - ) { - const nsid = "app.bsky.actor.getProfile"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestions( - cfg: MethodConfigOrHandler< - A, - AppBskyActorGetSuggestions.QueryParams, - AppBskyActorGetSuggestions.HandlerInput, - AppBskyActorGetSuggestions.HandlerOutput - >, - ) { - const nsid = "app.bsky.actor.getSuggestions"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - searchActors( - cfg: MethodConfigOrHandler< - A, - AppBskyActorSearchActors.QueryParams, - AppBskyActorSearchActors.HandlerInput, - AppBskyActorSearchActors.HandlerOutput - >, - ) { - const nsid = "app.bsky.actor.searchActors"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getProfiles( - cfg: MethodConfigOrHandler< - A, - AppBskyActorGetProfiles.QueryParams, - AppBskyActorGetProfiles.HandlerInput, - AppBskyActorGetProfiles.HandlerOutput - >, - ) { - const nsid = "app.bsky.actor.getProfiles"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getPreferences( - cfg: MethodConfigOrHandler< - A, - AppBskyActorGetPreferences.QueryParams, - AppBskyActorGetPreferences.HandlerInput, - AppBskyActorGetPreferences.HandlerOutput - >, - ) { - const nsid = "app.bsky.actor.getPreferences"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class AppBskyLabelerNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - getServices( - cfg: MethodConfigOrHandler< - A, - AppBskyLabelerGetServices.QueryParams, - AppBskyLabelerGetServices.HandlerInput, - AppBskyLabelerGetServices.HandlerOutput - >, - ) { - const nsid = "app.bsky.labeler.getServices"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ChatNS { - _server: Server; - bsky: ChatBskyNS; - - constructor(server: Server) { - this._server = server; - this.bsky = new ChatBskyNS(server); - } -} - -export class ChatBskyNS { - _server: Server; - convo: ChatBskyConvoNS; - actor: ChatBskyActorNS; - moderation: ChatBskyModerationNS; - - constructor(server: Server) { - this._server = server; - this.convo = new ChatBskyConvoNS(server); - this.actor = new ChatBskyActorNS(server); - this.moderation = new ChatBskyModerationNS(server); - } -} - -export class ChatBskyConvoNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - listConvos( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoListConvos.QueryParams, - ChatBskyConvoListConvos.HandlerInput, - ChatBskyConvoListConvos.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.listConvos"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - unmuteConvo( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoUnmuteConvo.QueryParams, - ChatBskyConvoUnmuteConvo.HandlerInput, - ChatBskyConvoUnmuteConvo.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.unmuteConvo"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getConvoAvailability( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoGetConvoAvailability.QueryParams, - ChatBskyConvoGetConvoAvailability.HandlerInput, - ChatBskyConvoGetConvoAvailability.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.getConvoAvailability"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getLog( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoGetLog.QueryParams, - ChatBskyConvoGetLog.HandlerInput, - ChatBskyConvoGetLog.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.getLog"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - sendMessage( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoSendMessage.QueryParams, - ChatBskyConvoSendMessage.HandlerInput, - ChatBskyConvoSendMessage.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.sendMessage"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - leaveConvo( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoLeaveConvo.QueryParams, - ChatBskyConvoLeaveConvo.HandlerInput, - ChatBskyConvoLeaveConvo.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.leaveConvo"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - addReaction( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoAddReaction.QueryParams, - ChatBskyConvoAddReaction.HandlerInput, - ChatBskyConvoAddReaction.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.addReaction"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - acceptConvo( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoAcceptConvo.QueryParams, - ChatBskyConvoAcceptConvo.HandlerInput, - ChatBskyConvoAcceptConvo.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.acceptConvo"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - muteConvo( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoMuteConvo.QueryParams, - ChatBskyConvoMuteConvo.HandlerInput, - ChatBskyConvoMuteConvo.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.muteConvo"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - deleteMessageForSelf( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoDeleteMessageForSelf.QueryParams, - ChatBskyConvoDeleteMessageForSelf.HandlerInput, - ChatBskyConvoDeleteMessageForSelf.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.deleteMessageForSelf"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - removeReaction( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoRemoveReaction.QueryParams, - ChatBskyConvoRemoveReaction.HandlerInput, - ChatBskyConvoRemoveReaction.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.removeReaction"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - updateRead( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoUpdateRead.QueryParams, - ChatBskyConvoUpdateRead.HandlerInput, - ChatBskyConvoUpdateRead.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.updateRead"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - updateAllRead( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoUpdateAllRead.QueryParams, - ChatBskyConvoUpdateAllRead.HandlerInput, - ChatBskyConvoUpdateAllRead.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.updateAllRead"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getConvo( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoGetConvo.QueryParams, - ChatBskyConvoGetConvo.HandlerInput, - ChatBskyConvoGetConvo.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.getConvo"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getMessages( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoGetMessages.QueryParams, - ChatBskyConvoGetMessages.HandlerInput, - ChatBskyConvoGetMessages.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.getMessages"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getConvoForMembers( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoGetConvoForMembers.QueryParams, - ChatBskyConvoGetConvoForMembers.HandlerInput, - ChatBskyConvoGetConvoForMembers.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.getConvoForMembers"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - sendMessageBatch( - cfg: MethodConfigOrHandler< - A, - ChatBskyConvoSendMessageBatch.QueryParams, - ChatBskyConvoSendMessageBatch.HandlerInput, - ChatBskyConvoSendMessageBatch.HandlerOutput - >, - ) { - const nsid = "chat.bsky.convo.sendMessageBatch"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ChatBskyActorNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - exportAccountData( - cfg: MethodConfigOrHandler< - A, - ChatBskyActorExportAccountData.QueryParams, - ChatBskyActorExportAccountData.HandlerInput, - ChatBskyActorExportAccountData.HandlerOutput - >, - ) { - const nsid = "chat.bsky.actor.exportAccountData"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - deleteAccount( - cfg: MethodConfigOrHandler< - A, - ChatBskyActorDeleteAccount.QueryParams, - ChatBskyActorDeleteAccount.HandlerInput, - ChatBskyActorDeleteAccount.HandlerOutput - >, - ) { - const nsid = "chat.bsky.actor.deleteAccount"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ChatBskyModerationNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - getActorMetadata( - cfg: MethodConfigOrHandler< - A, - ChatBskyModerationGetActorMetadata.QueryParams, - ChatBskyModerationGetActorMetadata.HandlerInput, - ChatBskyModerationGetActorMetadata.HandlerOutput - >, - ) { - const nsid = "chat.bsky.moderation.getActorMetadata"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getMessageContext( - cfg: MethodConfigOrHandler< - A, - ChatBskyModerationGetMessageContext.QueryParams, - ChatBskyModerationGetMessageContext.HandlerInput, - ChatBskyModerationGetMessageContext.HandlerOutput - >, - ) { - const nsid = "chat.bsky.moderation.getMessageContext"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - updateActorAccess( - cfg: MethodConfigOrHandler< - A, - ChatBskyModerationUpdateActorAccess.QueryParams, - ChatBskyModerationUpdateActorAccess.HandlerInput, - ChatBskyModerationUpdateActorAccess.HandlerOutput - >, - ) { - const nsid = "chat.bsky.moderation.updateActorAccess"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class SoNS { - _server: Server; - sprk: SoSprkNS; - - constructor(server: Server) { - this._server = server; - this.sprk = new SoSprkNS(server); - } -} - -export class SoSprkNS { - _server: Server; - video: SoSprkVideoNS; - embed: SoSprkEmbedNS; - notification: SoSprkNotificationNS; - graph: SoSprkGraphNS; - feed: SoSprkFeedNS; - richtext: SoSprkRichtextNS; - sound: SoSprkSoundNS; - actor: SoSprkActorNS; - story: SoSprkStoryNS; - labeler: SoSprkLabelerNS; - media: SoSprkMediaNS; - - constructor(server: Server) { - this._server = server; - this.video = new SoSprkVideoNS(server); - this.embed = new SoSprkEmbedNS(server); - this.notification = new SoSprkNotificationNS(server); - this.graph = new SoSprkGraphNS(server); - this.feed = new SoSprkFeedNS(server); - this.richtext = new SoSprkRichtextNS(server); - this.sound = new SoSprkSoundNS(server); - this.actor = new SoSprkActorNS(server); - this.story = new SoSprkStoryNS(server); - this.labeler = new SoSprkLabelerNS(server); - this.media = new SoSprkMediaNS(server); - } -} - -export class SoSprkVideoNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - uploadVideo( - cfg: MethodConfigOrHandler< - A, - SoSprkVideoUploadVideo.QueryParams, - SoSprkVideoUploadVideo.HandlerInput, - SoSprkVideoUploadVideo.HandlerOutput - >, - ) { - const nsid = "so.sprk.video.uploadVideo"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getJobStatus( - cfg: MethodConfigOrHandler< - A, - SoSprkVideoGetJobStatus.QueryParams, - SoSprkVideoGetJobStatus.HandlerInput, - SoSprkVideoGetJobStatus.HandlerOutput - >, - ) { - const nsid = "so.sprk.video.getJobStatus"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getUploadLimits( - cfg: MethodConfigOrHandler< - A, - SoSprkVideoGetUploadLimits.QueryParams, - SoSprkVideoGetUploadLimits.HandlerInput, - SoSprkVideoGetUploadLimits.HandlerOutput - >, - ) { - const nsid = "so.sprk.video.getUploadLimits"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class SoSprkEmbedNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } -} - -export class SoSprkNotificationNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - registerPush( - cfg: MethodConfigOrHandler< - A, - SoSprkNotificationRegisterPush.QueryParams, - SoSprkNotificationRegisterPush.HandlerInput, - SoSprkNotificationRegisterPush.HandlerOutput - >, - ) { - const nsid = "so.sprk.notification.registerPush"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - putPreferences( - cfg: MethodConfigOrHandler< - A, - SoSprkNotificationPutPreferences.QueryParams, - SoSprkNotificationPutPreferences.HandlerInput, - SoSprkNotificationPutPreferences.HandlerOutput - >, - ) { - const nsid = "so.sprk.notification.putPreferences"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - updateSeen( - cfg: MethodConfigOrHandler< - A, - SoSprkNotificationUpdateSeen.QueryParams, - SoSprkNotificationUpdateSeen.HandlerInput, - SoSprkNotificationUpdateSeen.HandlerOutput - >, - ) { - const nsid = "so.sprk.notification.updateSeen"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - unregisterPush( - cfg: MethodConfigOrHandler< - A, - SoSprkNotificationUnregisterPush.QueryParams, - SoSprkNotificationUnregisterPush.HandlerInput, - SoSprkNotificationUnregisterPush.HandlerOutput - >, - ) { - const nsid = "so.sprk.notification.unregisterPush"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - listNotifications( - cfg: MethodConfigOrHandler< - A, - SoSprkNotificationListNotifications.QueryParams, - SoSprkNotificationListNotifications.HandlerInput, - SoSprkNotificationListNotifications.HandlerOutput - >, - ) { - const nsid = "so.sprk.notification.listNotifications"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getUnreadCount( - cfg: MethodConfigOrHandler< - A, - SoSprkNotificationGetUnreadCount.QueryParams, - SoSprkNotificationGetUnreadCount.HandlerInput, - SoSprkNotificationGetUnreadCount.HandlerOutput - >, - ) { - const nsid = "so.sprk.notification.getUnreadCount"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class SoSprkGraphNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - getSuggestedFollowsByActor( - cfg: MethodConfigOrHandler< - A, - SoSprkGraphGetSuggestedFollowsByActor.QueryParams, - SoSprkGraphGetSuggestedFollowsByActor.HandlerInput, - SoSprkGraphGetSuggestedFollowsByActor.HandlerOutput - >, - ) { - const nsid = "so.sprk.graph.getSuggestedFollowsByActor"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - muteThread( - cfg: MethodConfigOrHandler< - A, - SoSprkGraphMuteThread.QueryParams, - SoSprkGraphMuteThread.HandlerInput, - SoSprkGraphMuteThread.HandlerOutput - >, - ) { - const nsid = "so.sprk.graph.muteThread"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getFollowers( - cfg: MethodConfigOrHandler< - A, - SoSprkGraphGetFollowers.QueryParams, - SoSprkGraphGetFollowers.HandlerInput, - SoSprkGraphGetFollowers.HandlerOutput - >, - ) { - const nsid = "so.sprk.graph.getFollowers"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - unmuteThread( - cfg: MethodConfigOrHandler< - A, - SoSprkGraphUnmuteThread.QueryParams, - SoSprkGraphUnmuteThread.HandlerInput, - SoSprkGraphUnmuteThread.HandlerOutput - >, - ) { - const nsid = "so.sprk.graph.unmuteThread"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - muteActor( - cfg: MethodConfigOrHandler< - A, - SoSprkGraphMuteActor.QueryParams, - SoSprkGraphMuteActor.HandlerInput, - SoSprkGraphMuteActor.HandlerOutput - >, - ) { - const nsid = "so.sprk.graph.muteActor"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getMutes( - cfg: MethodConfigOrHandler< - A, - SoSprkGraphGetMutes.QueryParams, - SoSprkGraphGetMutes.HandlerInput, - SoSprkGraphGetMutes.HandlerOutput - >, - ) { - const nsid = "so.sprk.graph.getMutes"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getKnownFollowers( - cfg: MethodConfigOrHandler< - A, - SoSprkGraphGetKnownFollowers.QueryParams, - SoSprkGraphGetKnownFollowers.HandlerInput, - SoSprkGraphGetKnownFollowers.HandlerOutput - >, - ) { - const nsid = "so.sprk.graph.getKnownFollowers"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getFollows( - cfg: MethodConfigOrHandler< - A, - SoSprkGraphGetFollows.QueryParams, - SoSprkGraphGetFollows.HandlerInput, - SoSprkGraphGetFollows.HandlerOutput - >, - ) { - const nsid = "so.sprk.graph.getFollows"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getBlocks( - cfg: MethodConfigOrHandler< - A, - SoSprkGraphGetBlocks.QueryParams, - SoSprkGraphGetBlocks.HandlerInput, - SoSprkGraphGetBlocks.HandlerOutput - >, - ) { - const nsid = "so.sprk.graph.getBlocks"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getRelationships( - cfg: MethodConfigOrHandler< - A, - SoSprkGraphGetRelationships.QueryParams, - SoSprkGraphGetRelationships.HandlerInput, - SoSprkGraphGetRelationships.HandlerOutput - >, - ) { - const nsid = "so.sprk.graph.getRelationships"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - unmuteActor( - cfg: MethodConfigOrHandler< - A, - SoSprkGraphUnmuteActor.QueryParams, - SoSprkGraphUnmuteActor.HandlerInput, - SoSprkGraphUnmuteActor.HandlerOutput - >, - ) { - const nsid = "so.sprk.graph.unmuteActor"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class SoSprkFeedNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - sendInteractions( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedSendInteractions.QueryParams, - SoSprkFeedSendInteractions.HandlerInput, - SoSprkFeedSendInteractions.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.sendInteractions"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getFeedGenerators( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetFeedGenerators.QueryParams, - SoSprkFeedGetFeedGenerators.HandlerInput, - SoSprkFeedGetFeedGenerators.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getFeedGenerators"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getTimeline( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetTimeline.QueryParams, - SoSprkFeedGetTimeline.HandlerInput, - SoSprkFeedGetTimeline.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getTimeline"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getFeedGenerator( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetFeedGenerator.QueryParams, - SoSprkFeedGetFeedGenerator.HandlerInput, - SoSprkFeedGetFeedGenerator.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getFeedGenerator"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getAuthorFeed( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetAuthorFeed.QueryParams, - SoSprkFeedGetAuthorFeed.HandlerInput, - SoSprkFeedGetAuthorFeed.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getAuthorFeed"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getLikes( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetLikes.QueryParams, - SoSprkFeedGetLikes.HandlerInput, - SoSprkFeedGetLikes.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getLikes"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getPostThread( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetPostThread.QueryParams, - SoSprkFeedGetPostThread.HandlerInput, - SoSprkFeedGetPostThread.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getPostThread"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getActorLikes( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetActorLikes.QueryParams, - SoSprkFeedGetActorLikes.HandlerInput, - SoSprkFeedGetActorLikes.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getActorLikes"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getRepostedBy( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetRepostedBy.QueryParams, - SoSprkFeedGetRepostedBy.HandlerInput, - SoSprkFeedGetRepostedBy.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getRepostedBy"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - describeFeedGenerator( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedDescribeFeedGenerator.QueryParams, - SoSprkFeedDescribeFeedGenerator.HandlerInput, - SoSprkFeedDescribeFeedGenerator.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.describeFeedGenerator"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - searchPosts( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedSearchPosts.QueryParams, - SoSprkFeedSearchPosts.HandlerInput, - SoSprkFeedSearchPosts.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.searchPosts"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getPosts( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetPosts.QueryParams, - SoSprkFeedGetPosts.HandlerInput, - SoSprkFeedGetPosts.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getPosts"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getCrosspostThread( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetCrosspostThread.QueryParams, - SoSprkFeedGetCrosspostThread.HandlerInput, - SoSprkFeedGetCrosspostThread.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getCrosspostThread"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getFeed( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetFeed.QueryParams, - SoSprkFeedGetFeed.HandlerInput, - SoSprkFeedGetFeed.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getFeed"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getFeedSkeleton( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetFeedSkeleton.QueryParams, - SoSprkFeedGetFeedSkeleton.HandlerInput, - SoSprkFeedGetFeedSkeleton.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getFeedSkeleton"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestedFeeds( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetSuggestedFeeds.QueryParams, - SoSprkFeedGetSuggestedFeeds.HandlerInput, - SoSprkFeedGetSuggestedFeeds.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getSuggestedFeeds"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getActorFeeds( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetActorFeeds.QueryParams, - SoSprkFeedGetActorFeeds.HandlerInput, - SoSprkFeedGetActorFeeds.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getActorFeeds"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getActorReposts( - cfg: MethodConfigOrHandler< - A, - SoSprkFeedGetActorReposts.QueryParams, - SoSprkFeedGetActorReposts.HandlerInput, - SoSprkFeedGetActorReposts.HandlerOutput - >, - ) { - const nsid = "so.sprk.feed.getActorReposts"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class SoSprkRichtextNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } -} - -export class SoSprkSoundNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - getActorAudios( - cfg: MethodConfigOrHandler< - A, - SoSprkSoundGetActorAudios.QueryParams, - SoSprkSoundGetActorAudios.HandlerInput, - SoSprkSoundGetActorAudios.HandlerOutput - >, - ) { - const nsid = "so.sprk.sound.getActorAudios"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getAudioPosts( - cfg: MethodConfigOrHandler< - A, - SoSprkSoundGetAudioPosts.QueryParams, - SoSprkSoundGetAudioPosts.HandlerInput, - SoSprkSoundGetAudioPosts.HandlerOutput - >, - ) { - const nsid = "so.sprk.sound.getAudioPosts"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getAudios( - cfg: MethodConfigOrHandler< - A, - SoSprkSoundGetAudios.QueryParams, - SoSprkSoundGetAudios.HandlerInput, - SoSprkSoundGetAudios.HandlerOutput - >, - ) { - const nsid = "so.sprk.sound.getAudios"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getTrendingAudios( - cfg: MethodConfigOrHandler< - A, - SoSprkSoundGetTrendingAudios.QueryParams, - SoSprkSoundGetTrendingAudios.HandlerInput, - SoSprkSoundGetTrendingAudios.HandlerOutput - >, - ) { - const nsid = "so.sprk.sound.getTrendingAudios"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class SoSprkActorNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - searchActorsTypeahead( - cfg: MethodConfigOrHandler< - A, - SoSprkActorSearchActorsTypeahead.QueryParams, - SoSprkActorSearchActorsTypeahead.HandlerInput, - SoSprkActorSearchActorsTypeahead.HandlerOutput - >, - ) { - const nsid = "so.sprk.actor.searchActorsTypeahead"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - putPreferences( - cfg: MethodConfigOrHandler< - A, - SoSprkActorPutPreferences.QueryParams, - SoSprkActorPutPreferences.HandlerInput, - SoSprkActorPutPreferences.HandlerOutput - >, - ) { - const nsid = "so.sprk.actor.putPreferences"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getProfile( - cfg: MethodConfigOrHandler< - A, - SoSprkActorGetProfile.QueryParams, - SoSprkActorGetProfile.HandlerInput, - SoSprkActorGetProfile.HandlerOutput - >, - ) { - const nsid = "so.sprk.actor.getProfile"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSuggestions( - cfg: MethodConfigOrHandler< - A, - SoSprkActorGetSuggestions.QueryParams, - SoSprkActorGetSuggestions.HandlerInput, - SoSprkActorGetSuggestions.HandlerOutput - >, - ) { - const nsid = "so.sprk.actor.getSuggestions"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - searchActors( - cfg: MethodConfigOrHandler< - A, - SoSprkActorSearchActors.QueryParams, - SoSprkActorSearchActors.HandlerInput, - SoSprkActorSearchActors.HandlerOutput - >, - ) { - const nsid = "so.sprk.actor.searchActors"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getProfiles( - cfg: MethodConfigOrHandler< - A, - SoSprkActorGetProfiles.QueryParams, - SoSprkActorGetProfiles.HandlerInput, - SoSprkActorGetProfiles.HandlerOutput - >, - ) { - const nsid = "so.sprk.actor.getProfiles"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getPreferences( - cfg: MethodConfigOrHandler< - A, - SoSprkActorGetPreferences.QueryParams, - SoSprkActorGetPreferences.HandlerInput, - SoSprkActorGetPreferences.HandlerOutput - >, - ) { - const nsid = "so.sprk.actor.getPreferences"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class SoSprkStoryNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - getTimeline( - cfg: MethodConfigOrHandler< - A, - SoSprkStoryGetTimeline.QueryParams, - SoSprkStoryGetTimeline.HandlerInput, - SoSprkStoryGetTimeline.HandlerOutput - >, - ) { - const nsid = "so.sprk.story.getTimeline"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getStories( - cfg: MethodConfigOrHandler< - A, - SoSprkStoryGetStories.QueryParams, - SoSprkStoryGetStories.HandlerInput, - SoSprkStoryGetStories.HandlerOutput - >, - ) { - const nsid = "so.sprk.story.getStories"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class SoSprkLabelerNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - getServices( - cfg: MethodConfigOrHandler< - A, - SoSprkLabelerGetServices.QueryParams, - SoSprkLabelerGetServices.HandlerInput, - SoSprkLabelerGetServices.HandlerOutput - >, - ) { - const nsid = "so.sprk.labeler.getServices"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class SoSprkMediaNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } -} - -export class ComNS { - _server: Server; - atproto: ComAtprotoNS; - - constructor(server: Server) { - this._server = server; - this.atproto = new ComAtprotoNS(server); - } -} - -export class ComAtprotoNS { - _server: Server; - temp: ComAtprotoTempNS; - identity: ComAtprotoIdentityNS; - admin: ComAtprotoAdminNS; - label: ComAtprotoLabelNS; - server: ComAtprotoServerNS; - lexicon: ComAtprotoLexiconNS; - sync: ComAtprotoSyncNS; - repo: ComAtprotoRepoNS; - moderation: ComAtprotoModerationNS; - - constructor(server: Server) { - this._server = server; - this.temp = new ComAtprotoTempNS(server); - this.identity = new ComAtprotoIdentityNS(server); - this.admin = new ComAtprotoAdminNS(server); - this.label = new ComAtprotoLabelNS(server); - this.server = new ComAtprotoServerNS(server); - this.lexicon = new ComAtprotoLexiconNS(server); - this.sync = new ComAtprotoSyncNS(server); - this.repo = new ComAtprotoRepoNS(server); - this.moderation = new ComAtprotoModerationNS(server); - } -} - -export class ComAtprotoTempNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - dereferenceScope( - cfg: MethodConfigOrHandler< - A, - ComAtprotoTempDereferenceScope.QueryParams, - ComAtprotoTempDereferenceScope.HandlerInput, - ComAtprotoTempDereferenceScope.HandlerOutput - >, - ) { - const nsid = "com.atproto.temp.dereferenceScope"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - addReservedHandle( - cfg: MethodConfigOrHandler< - A, - ComAtprotoTempAddReservedHandle.QueryParams, - ComAtprotoTempAddReservedHandle.HandlerInput, - ComAtprotoTempAddReservedHandle.HandlerOutput - >, - ) { - const nsid = "com.atproto.temp.addReservedHandle"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - checkSignupQueue( - cfg: MethodConfigOrHandler< - A, - ComAtprotoTempCheckSignupQueue.QueryParams, - ComAtprotoTempCheckSignupQueue.HandlerInput, - ComAtprotoTempCheckSignupQueue.HandlerOutput - >, - ) { - const nsid = "com.atproto.temp.checkSignupQueue"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - checkHandleAvailability( - cfg: MethodConfigOrHandler< - A, - ComAtprotoTempCheckHandleAvailability.QueryParams, - ComAtprotoTempCheckHandleAvailability.HandlerInput, - ComAtprotoTempCheckHandleAvailability.HandlerOutput - >, - ) { - const nsid = "com.atproto.temp.checkHandleAvailability"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - requestPhoneVerification( - cfg: MethodConfigOrHandler< - A, - ComAtprotoTempRequestPhoneVerification.QueryParams, - ComAtprotoTempRequestPhoneVerification.HandlerInput, - ComAtprotoTempRequestPhoneVerification.HandlerOutput - >, - ) { - const nsid = "com.atproto.temp.requestPhoneVerification"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - revokeAccountCredentials( - cfg: MethodConfigOrHandler< - A, - ComAtprotoTempRevokeAccountCredentials.QueryParams, - ComAtprotoTempRevokeAccountCredentials.HandlerInput, - ComAtprotoTempRevokeAccountCredentials.HandlerOutput - >, - ) { - const nsid = "com.atproto.temp.revokeAccountCredentials"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - fetchLabels( - cfg: MethodConfigOrHandler< - A, - ComAtprotoTempFetchLabels.QueryParams, - ComAtprotoTempFetchLabels.HandlerInput, - ComAtprotoTempFetchLabels.HandlerOutput - >, - ) { - const nsid = "com.atproto.temp.fetchLabels"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ComAtprotoIdentityNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - updateHandle( - cfg: MethodConfigOrHandler< - A, - ComAtprotoIdentityUpdateHandle.QueryParams, - ComAtprotoIdentityUpdateHandle.HandlerInput, - ComAtprotoIdentityUpdateHandle.HandlerOutput - >, - ) { - const nsid = "com.atproto.identity.updateHandle"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - signPlcOperation( - cfg: MethodConfigOrHandler< - A, - ComAtprotoIdentitySignPlcOperation.QueryParams, - ComAtprotoIdentitySignPlcOperation.HandlerInput, - ComAtprotoIdentitySignPlcOperation.HandlerOutput - >, - ) { - const nsid = "com.atproto.identity.signPlcOperation"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - submitPlcOperation( - cfg: MethodConfigOrHandler< - A, - ComAtprotoIdentitySubmitPlcOperation.QueryParams, - ComAtprotoIdentitySubmitPlcOperation.HandlerInput, - ComAtprotoIdentitySubmitPlcOperation.HandlerOutput - >, - ) { - const nsid = "com.atproto.identity.submitPlcOperation"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - resolveIdentity( - cfg: MethodConfigOrHandler< - A, - ComAtprotoIdentityResolveIdentity.QueryParams, - ComAtprotoIdentityResolveIdentity.HandlerInput, - ComAtprotoIdentityResolveIdentity.HandlerOutput - >, - ) { - const nsid = "com.atproto.identity.resolveIdentity"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - refreshIdentity( - cfg: MethodConfigOrHandler< - A, - ComAtprotoIdentityRefreshIdentity.QueryParams, - ComAtprotoIdentityRefreshIdentity.HandlerInput, - ComAtprotoIdentityRefreshIdentity.HandlerOutput - >, - ) { - const nsid = "com.atproto.identity.refreshIdentity"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - resolveHandle( - cfg: MethodConfigOrHandler< - A, - ComAtprotoIdentityResolveHandle.QueryParams, - ComAtprotoIdentityResolveHandle.HandlerInput, - ComAtprotoIdentityResolveHandle.HandlerOutput - >, - ) { - const nsid = "com.atproto.identity.resolveHandle"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - requestPlcOperationSignature( - cfg: MethodConfigOrHandler< - A, - ComAtprotoIdentityRequestPlcOperationSignature.QueryParams, - ComAtprotoIdentityRequestPlcOperationSignature.HandlerInput, - ComAtprotoIdentityRequestPlcOperationSignature.HandlerOutput - >, - ) { - const nsid = "com.atproto.identity.requestPlcOperationSignature"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getRecommendedDidCredentials( - cfg: MethodConfigOrHandler< - A, - ComAtprotoIdentityGetRecommendedDidCredentials.QueryParams, - ComAtprotoIdentityGetRecommendedDidCredentials.HandlerInput, - ComAtprotoIdentityGetRecommendedDidCredentials.HandlerOutput - >, - ) { - const nsid = "com.atproto.identity.getRecommendedDidCredentials"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - resolveDid( - cfg: MethodConfigOrHandler< - A, - ComAtprotoIdentityResolveDid.QueryParams, - ComAtprotoIdentityResolveDid.HandlerInput, - ComAtprotoIdentityResolveDid.HandlerOutput - >, - ) { - const nsid = "com.atproto.identity.resolveDid"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ComAtprotoAdminNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - updateAccountEmail( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminUpdateAccountEmail.QueryParams, - ComAtprotoAdminUpdateAccountEmail.HandlerInput, - ComAtprotoAdminUpdateAccountEmail.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.updateAccountEmail"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getAccountInfo( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminGetAccountInfo.QueryParams, - ComAtprotoAdminGetAccountInfo.HandlerInput, - ComAtprotoAdminGetAccountInfo.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.getAccountInfo"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSubjectStatus( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminGetSubjectStatus.QueryParams, - ComAtprotoAdminGetSubjectStatus.HandlerInput, - ComAtprotoAdminGetSubjectStatus.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.getSubjectStatus"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - searchAccounts( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminSearchAccounts.QueryParams, - ComAtprotoAdminSearchAccounts.HandlerInput, - ComAtprotoAdminSearchAccounts.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.searchAccounts"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - updateAccountPassword( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminUpdateAccountPassword.QueryParams, - ComAtprotoAdminUpdateAccountPassword.HandlerInput, - ComAtprotoAdminUpdateAccountPassword.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.updateAccountPassword"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - updateAccountHandle( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminUpdateAccountHandle.QueryParams, - ComAtprotoAdminUpdateAccountHandle.HandlerInput, - ComAtprotoAdminUpdateAccountHandle.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.updateAccountHandle"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getInviteCodes( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminGetInviteCodes.QueryParams, - ComAtprotoAdminGetInviteCodes.HandlerInput, - ComAtprotoAdminGetInviteCodes.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.getInviteCodes"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - updateAccountSigningKey( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminUpdateAccountSigningKey.QueryParams, - ComAtprotoAdminUpdateAccountSigningKey.HandlerInput, - ComAtprotoAdminUpdateAccountSigningKey.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.updateAccountSigningKey"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - enableAccountInvites( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminEnableAccountInvites.QueryParams, - ComAtprotoAdminEnableAccountInvites.HandlerInput, - ComAtprotoAdminEnableAccountInvites.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.enableAccountInvites"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - disableAccountInvites( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminDisableAccountInvites.QueryParams, - ComAtprotoAdminDisableAccountInvites.HandlerInput, - ComAtprotoAdminDisableAccountInvites.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.disableAccountInvites"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - disableInviteCodes( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminDisableInviteCodes.QueryParams, - ComAtprotoAdminDisableInviteCodes.HandlerInput, - ComAtprotoAdminDisableInviteCodes.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.disableInviteCodes"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - updateSubjectStatus( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminUpdateSubjectStatus.QueryParams, - ComAtprotoAdminUpdateSubjectStatus.HandlerInput, - ComAtprotoAdminUpdateSubjectStatus.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.updateSubjectStatus"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - sendEmail( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminSendEmail.QueryParams, - ComAtprotoAdminSendEmail.HandlerInput, - ComAtprotoAdminSendEmail.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.sendEmail"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getAccountInfos( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminGetAccountInfos.QueryParams, - ComAtprotoAdminGetAccountInfos.HandlerInput, - ComAtprotoAdminGetAccountInfos.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.getAccountInfos"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - deleteAccount( - cfg: MethodConfigOrHandler< - A, - ComAtprotoAdminDeleteAccount.QueryParams, - ComAtprotoAdminDeleteAccount.HandlerInput, - ComAtprotoAdminDeleteAccount.HandlerOutput - >, - ) { - const nsid = "com.atproto.admin.deleteAccount"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ComAtprotoLabelNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - subscribeLabels( - cfg: StreamConfigOrHandler< - A, - ComAtprotoLabelSubscribeLabels.QueryParams, - ComAtprotoLabelSubscribeLabels.HandlerOutput - >, - ) { - const nsid = "com.atproto.label.subscribeLabels"; // @ts-ignore - dynamically generated - return this._server.xrpc.streamMethod(nsid, cfg); - } - - queryLabels( - cfg: MethodConfigOrHandler< - A, - ComAtprotoLabelQueryLabels.QueryParams, - ComAtprotoLabelQueryLabels.HandlerInput, - ComAtprotoLabelQueryLabels.HandlerOutput - >, - ) { - const nsid = "com.atproto.label.queryLabels"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ComAtprotoServerNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - requestEmailConfirmation( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerRequestEmailConfirmation.QueryParams, - ComAtprotoServerRequestEmailConfirmation.HandlerInput, - ComAtprotoServerRequestEmailConfirmation.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.requestEmailConfirmation"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - reserveSigningKey( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerReserveSigningKey.QueryParams, - ComAtprotoServerReserveSigningKey.HandlerInput, - ComAtprotoServerReserveSigningKey.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.reserveSigningKey"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getServiceAuth( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerGetServiceAuth.QueryParams, - ComAtprotoServerGetServiceAuth.HandlerInput, - ComAtprotoServerGetServiceAuth.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.getServiceAuth"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getAccountInviteCodes( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerGetAccountInviteCodes.QueryParams, - ComAtprotoServerGetAccountInviteCodes.HandlerInput, - ComAtprotoServerGetAccountInviteCodes.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.getAccountInviteCodes"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - createSession( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerCreateSession.QueryParams, - ComAtprotoServerCreateSession.HandlerInput, - ComAtprotoServerCreateSession.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.createSession"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - listAppPasswords( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerListAppPasswords.QueryParams, - ComAtprotoServerListAppPasswords.HandlerInput, - ComAtprotoServerListAppPasswords.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.listAppPasswords"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - createInviteCodes( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerCreateInviteCodes.QueryParams, - ComAtprotoServerCreateInviteCodes.HandlerInput, - ComAtprotoServerCreateInviteCodes.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.createInviteCodes"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - deleteSession( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerDeleteSession.QueryParams, - ComAtprotoServerDeleteSession.HandlerInput, - ComAtprotoServerDeleteSession.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.deleteSession"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - revokeAppPassword( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerRevokeAppPassword.QueryParams, - ComAtprotoServerRevokeAppPassword.HandlerInput, - ComAtprotoServerRevokeAppPassword.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.revokeAppPassword"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - createAppPassword( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerCreateAppPassword.QueryParams, - ComAtprotoServerCreateAppPassword.HandlerInput, - ComAtprotoServerCreateAppPassword.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.createAppPassword"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - activateAccount( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerActivateAccount.QueryParams, - ComAtprotoServerActivateAccount.HandlerInput, - ComAtprotoServerActivateAccount.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.activateAccount"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - describeServer( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerDescribeServer.QueryParams, - ComAtprotoServerDescribeServer.HandlerInput, - ComAtprotoServerDescribeServer.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.describeServer"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - confirmEmail( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerConfirmEmail.QueryParams, - ComAtprotoServerConfirmEmail.HandlerInput, - ComAtprotoServerConfirmEmail.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.confirmEmail"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getSession( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerGetSession.QueryParams, - ComAtprotoServerGetSession.HandlerInput, - ComAtprotoServerGetSession.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.getSession"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - refreshSession( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerRefreshSession.QueryParams, - ComAtprotoServerRefreshSession.HandlerInput, - ComAtprotoServerRefreshSession.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.refreshSession"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - deactivateAccount( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerDeactivateAccount.QueryParams, - ComAtprotoServerDeactivateAccount.HandlerInput, - ComAtprotoServerDeactivateAccount.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.deactivateAccount"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - updateEmail( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerUpdateEmail.QueryParams, - ComAtprotoServerUpdateEmail.HandlerInput, - ComAtprotoServerUpdateEmail.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.updateEmail"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - resetPassword( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerResetPassword.QueryParams, - ComAtprotoServerResetPassword.HandlerInput, - ComAtprotoServerResetPassword.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.resetPassword"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - checkAccountStatus( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerCheckAccountStatus.QueryParams, - ComAtprotoServerCheckAccountStatus.HandlerInput, - ComAtprotoServerCheckAccountStatus.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.checkAccountStatus"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - requestEmailUpdate( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerRequestEmailUpdate.QueryParams, - ComAtprotoServerRequestEmailUpdate.HandlerInput, - ComAtprotoServerRequestEmailUpdate.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.requestEmailUpdate"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - requestPasswordReset( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerRequestPasswordReset.QueryParams, - ComAtprotoServerRequestPasswordReset.HandlerInput, - ComAtprotoServerRequestPasswordReset.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.requestPasswordReset"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - requestAccountDelete( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerRequestAccountDelete.QueryParams, - ComAtprotoServerRequestAccountDelete.HandlerInput, - ComAtprotoServerRequestAccountDelete.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.requestAccountDelete"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - createAccount( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerCreateAccount.QueryParams, - ComAtprotoServerCreateAccount.HandlerInput, - ComAtprotoServerCreateAccount.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.createAccount"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - deleteAccount( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerDeleteAccount.QueryParams, - ComAtprotoServerDeleteAccount.HandlerInput, - ComAtprotoServerDeleteAccount.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.deleteAccount"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - createInviteCode( - cfg: MethodConfigOrHandler< - A, - ComAtprotoServerCreateInviteCode.QueryParams, - ComAtprotoServerCreateInviteCode.HandlerInput, - ComAtprotoServerCreateInviteCode.HandlerOutput - >, - ) { - const nsid = "com.atproto.server.createInviteCode"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ComAtprotoLexiconNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - resolveLexicon( - cfg: MethodConfigOrHandler< - A, - ComAtprotoLexiconResolveLexicon.QueryParams, - ComAtprotoLexiconResolveLexicon.HandlerInput, - ComAtprotoLexiconResolveLexicon.HandlerOutput - >, - ) { - const nsid = "com.atproto.lexicon.resolveLexicon"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ComAtprotoSyncNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - getHead( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncGetHead.QueryParams, - ComAtprotoSyncGetHead.HandlerInput, - ComAtprotoSyncGetHead.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.getHead"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getBlob( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncGetBlob.QueryParams, - ComAtprotoSyncGetBlob.HandlerInput, - ComAtprotoSyncGetBlob.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.getBlob"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getRepo( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncGetRepo.QueryParams, - ComAtprotoSyncGetRepo.HandlerInput, - ComAtprotoSyncGetRepo.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.getRepo"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - notifyOfUpdate( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncNotifyOfUpdate.QueryParams, - ComAtprotoSyncNotifyOfUpdate.HandlerInput, - ComAtprotoSyncNotifyOfUpdate.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.notifyOfUpdate"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - requestCrawl( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncRequestCrawl.QueryParams, - ComAtprotoSyncRequestCrawl.HandlerInput, - ComAtprotoSyncRequestCrawl.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.requestCrawl"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - listBlobs( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncListBlobs.QueryParams, - ComAtprotoSyncListBlobs.HandlerInput, - ComAtprotoSyncListBlobs.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.listBlobs"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getLatestCommit( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncGetLatestCommit.QueryParams, - ComAtprotoSyncGetLatestCommit.HandlerInput, - ComAtprotoSyncGetLatestCommit.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.getLatestCommit"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - subscribeRepos( - cfg: StreamConfigOrHandler< - A, - ComAtprotoSyncSubscribeRepos.QueryParams, - ComAtprotoSyncSubscribeRepos.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.subscribeRepos"; // @ts-ignore - dynamically generated - return this._server.xrpc.streamMethod(nsid, cfg); - } - - getRepoStatus( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncGetRepoStatus.QueryParams, - ComAtprotoSyncGetRepoStatus.HandlerInput, - ComAtprotoSyncGetRepoStatus.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.getRepoStatus"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getRecord( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncGetRecord.QueryParams, - ComAtprotoSyncGetRecord.HandlerInput, - ComAtprotoSyncGetRecord.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.getRecord"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - listHosts( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncListHosts.QueryParams, - ComAtprotoSyncListHosts.HandlerInput, - ComAtprotoSyncListHosts.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.listHosts"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - listRepos( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncListRepos.QueryParams, - ComAtprotoSyncListRepos.HandlerInput, - ComAtprotoSyncListRepos.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.listRepos"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getHostStatus( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncGetHostStatus.QueryParams, - ComAtprotoSyncGetHostStatus.HandlerInput, - ComAtprotoSyncGetHostStatus.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.getHostStatus"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getBlocks( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncGetBlocks.QueryParams, - ComAtprotoSyncGetBlocks.HandlerInput, - ComAtprotoSyncGetBlocks.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.getBlocks"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - listReposByCollection( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncListReposByCollection.QueryParams, - ComAtprotoSyncListReposByCollection.HandlerInput, - ComAtprotoSyncListReposByCollection.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.listReposByCollection"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getCheckout( - cfg: MethodConfigOrHandler< - A, - ComAtprotoSyncGetCheckout.QueryParams, - ComAtprotoSyncGetCheckout.HandlerInput, - ComAtprotoSyncGetCheckout.HandlerOutput - >, - ) { - const nsid = "com.atproto.sync.getCheckout"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ComAtprotoRepoNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - listMissingBlobs( - cfg: MethodConfigOrHandler< - A, - ComAtprotoRepoListMissingBlobs.QueryParams, - ComAtprotoRepoListMissingBlobs.HandlerInput, - ComAtprotoRepoListMissingBlobs.HandlerOutput - >, - ) { - const nsid = "com.atproto.repo.listMissingBlobs"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - createRecord( - cfg: MethodConfigOrHandler< - A, - ComAtprotoRepoCreateRecord.QueryParams, - ComAtprotoRepoCreateRecord.HandlerInput, - ComAtprotoRepoCreateRecord.HandlerOutput - >, - ) { - const nsid = "com.atproto.repo.createRecord"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - deleteRecord( - cfg: MethodConfigOrHandler< - A, - ComAtprotoRepoDeleteRecord.QueryParams, - ComAtprotoRepoDeleteRecord.HandlerInput, - ComAtprotoRepoDeleteRecord.HandlerOutput - >, - ) { - const nsid = "com.atproto.repo.deleteRecord"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - putRecord( - cfg: MethodConfigOrHandler< - A, - ComAtprotoRepoPutRecord.QueryParams, - ComAtprotoRepoPutRecord.HandlerInput, - ComAtprotoRepoPutRecord.HandlerOutput - >, - ) { - const nsid = "com.atproto.repo.putRecord"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - uploadBlob( - cfg: MethodConfigOrHandler< - A, - ComAtprotoRepoUploadBlob.QueryParams, - ComAtprotoRepoUploadBlob.HandlerInput, - ComAtprotoRepoUploadBlob.HandlerOutput - >, - ) { - const nsid = "com.atproto.repo.uploadBlob"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - importRepo( - cfg: MethodConfigOrHandler< - A, - ComAtprotoRepoImportRepo.QueryParams, - ComAtprotoRepoImportRepo.HandlerInput, - ComAtprotoRepoImportRepo.HandlerOutput - >, - ) { - const nsid = "com.atproto.repo.importRepo"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - describeRepo( - cfg: MethodConfigOrHandler< - A, - ComAtprotoRepoDescribeRepo.QueryParams, - ComAtprotoRepoDescribeRepo.HandlerInput, - ComAtprotoRepoDescribeRepo.HandlerOutput - >, - ) { - const nsid = "com.atproto.repo.describeRepo"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - getRecord( - cfg: MethodConfigOrHandler< - A, - ComAtprotoRepoGetRecord.QueryParams, - ComAtprotoRepoGetRecord.HandlerInput, - ComAtprotoRepoGetRecord.HandlerOutput - >, - ) { - const nsid = "com.atproto.repo.getRecord"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - applyWrites( - cfg: MethodConfigOrHandler< - A, - ComAtprotoRepoApplyWrites.QueryParams, - ComAtprotoRepoApplyWrites.HandlerInput, - ComAtprotoRepoApplyWrites.HandlerOutput - >, - ) { - const nsid = "com.atproto.repo.applyWrites"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } - - listRecords( - cfg: MethodConfigOrHandler< - A, - ComAtprotoRepoListRecords.QueryParams, - ComAtprotoRepoListRecords.HandlerInput, - ComAtprotoRepoListRecords.HandlerOutput - >, - ) { - const nsid = "com.atproto.repo.listRecords"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} - -export class ComAtprotoModerationNS { - _server: Server; - - constructor(server: Server) { - this._server = server; - } - - createReport( - cfg: MethodConfigOrHandler< - A, - ComAtprotoModerationCreateReport.QueryParams, - ComAtprotoModerationCreateReport.HandlerInput, - ComAtprotoModerationCreateReport.HandlerOutput - >, - ) { - const nsid = "com.atproto.moderation.createReport"; // @ts-ignore - dynamically generated - return this._server.xrpc.method(nsid, cfg); - } -} diff --git a/lex/lexicons.ts b/lex/lexicons.ts deleted file mode 100644 index 7520dee..0000000 --- a/lex/lexicons.ts +++ /dev/null @@ -1,29727 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { - type LexiconDoc, - Lexicons, - ValidationError, - type ValidationResult, -} from "@atp/lexicon"; -import { is$typed, maybe$typed } from "./util.ts"; - -export const schemaDict = { - "ToolsOzoneSignatureFindCorrelation": { - "lexicon": 1, - "id": "tools.ozone.signature.findCorrelation", - "defs": { - "main": { - "type": "query", - "description": - "Find all correlated threat signatures between 2 or more accounts.", - "parameters": { - "type": "params", - "required": [ - "dids", - ], - "properties": { - "dids": { - "type": "array", - "items": { - "type": "string", - "format": "did", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "details", - ], - "properties": { - "details": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.signature.defs#sigDetail", - }, - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneSignatureDefs": { - "lexicon": 1, - "id": "tools.ozone.signature.defs", - "defs": { - "sigDetail": { - "type": "object", - "required": [ - "property", - "value", - ], - "properties": { - "property": { - "type": "string", - }, - "value": { - "type": "string", - }, - }, - }, - }, - }, - "ToolsOzoneSignatureSearchAccounts": { - "lexicon": 1, - "id": "tools.ozone.signature.searchAccounts", - "defs": { - "main": { - "type": "query", - "description": - "Search for accounts that match one or more threat signature values.", - "parameters": { - "type": "params", - "required": [ - "values", - ], - "properties": { - "values": { - "type": "array", - "items": { - "type": "string", - }, - }, - "cursor": { - "type": "string", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "accounts", - ], - "properties": { - "cursor": { - "type": "string", - }, - "accounts": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.admin.defs#accountView", - }, - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneSignatureFindRelatedAccounts": { - "lexicon": 1, - "id": "tools.ozone.signature.findRelatedAccounts", - "defs": { - "main": { - "type": "query", - "description": - "Get accounts that share some matching threat signatures with the root account.", - "parameters": { - "type": "params", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "cursor": { - "type": "string", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "accounts", - ], - "properties": { - "cursor": { - "type": "string", - }, - "accounts": { - "type": "array", - "items": { - "type": "ref", - "ref": - "lex:tools.ozone.signature.findRelatedAccounts#relatedAccount", - }, - }, - }, - }, - }, - }, - "relatedAccount": { - "type": "object", - "required": [ - "account", - ], - "properties": { - "account": { - "type": "ref", - "ref": "lex:com.atproto.admin.defs#accountView", - }, - "similarities": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.signature.defs#sigDetail", - }, - }, - }, - }, - }, - }, - "ToolsOzoneServerGetConfig": { - "lexicon": 1, - "id": "tools.ozone.server.getConfig", - "defs": { - "main": { - "type": "query", - "description": "Get details about ozone's server configuration.", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "appview": { - "type": "ref", - "ref": "lex:tools.ozone.server.getConfig#serviceConfig", - }, - "pds": { - "type": "ref", - "ref": "lex:tools.ozone.server.getConfig#serviceConfig", - }, - "blobDivert": { - "type": "ref", - "ref": "lex:tools.ozone.server.getConfig#serviceConfig", - }, - "chat": { - "type": "ref", - "ref": "lex:tools.ozone.server.getConfig#serviceConfig", - }, - "viewer": { - "type": "ref", - "ref": "lex:tools.ozone.server.getConfig#viewerConfig", - }, - "verifierDid": { - "type": "string", - "format": "did", - "description": "The did of the verifier used for verification.", - }, - }, - }, - }, - }, - "serviceConfig": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri", - }, - }, - }, - "viewerConfig": { - "type": "object", - "properties": { - "role": { - "type": "string", - "knownValues": [ - "tools.ozone.team.defs#roleAdmin", - "tools.ozone.team.defs#roleModerator", - "tools.ozone.team.defs#roleTriage", - "tools.ozone.team.defs#roleVerifier", - ], - }, - }, - }, - }, - }, - "ToolsOzoneVerificationRevokeVerifications": { - "lexicon": 1, - "id": "tools.ozone.verification.revokeVerifications", - "defs": { - "main": { - "type": "procedure", - "description": - "Revoke previously granted verifications in batches of up to 100.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "uris", - ], - "properties": { - "uris": { - "type": "array", - "description": "Array of verification record uris to revoke", - "maxLength": 100, - "items": { - "type": "string", - "description": - "The AT-URI of the verification record to revoke.", - "format": "at-uri", - }, - }, - "revokeReason": { - "type": "string", - "description": - "Reason for revoking the verification. This is optional and can be omitted if not needed.", - "maxLength": 1000, - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "revokedVerifications", - "failedRevocations", - ], - "properties": { - "revokedVerifications": { - "type": "array", - "description": "List of verification uris successfully revoked", - "items": { - "type": "string", - "format": "at-uri", - }, - }, - "failedRevocations": { - "type": "array", - "description": - "List of verification uris that couldn't be revoked, including failure reasons", - "items": { - "type": "ref", - "ref": - "lex:tools.ozone.verification.revokeVerifications#revokeError", - }, - }, - }, - }, - }, - }, - "revokeError": { - "type": "object", - "description": "Error object for failed revocations", - "required": [ - "uri", - "error", - ], - "properties": { - "uri": { - "type": "string", - "description": - "The AT-URI of the verification record that failed to revoke.", - "format": "at-uri", - }, - "error": { - "type": "string", - "description": - "Description of the error that occurred during revocation.", - }, - }, - }, - }, - }, - "ToolsOzoneVerificationDefs": { - "lexicon": 1, - "id": "tools.ozone.verification.defs", - "defs": { - "verificationView": { - "type": "object", - "description": "Verification data for the associated subject.", - "required": [ - "issuer", - "uri", - "subject", - "handle", - "displayName", - "createdAt", - ], - "properties": { - "issuer": { - "type": "string", - "description": "The user who issued this verification.", - "format": "did", - }, - "uri": { - "type": "string", - "description": "The AT-URI of the verification record.", - "format": "at-uri", - }, - "subject": { - "type": "string", - "format": "did", - "description": "The subject of the verification.", - }, - "handle": { - "type": "string", - "description": - "Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.", - "format": "handle", - }, - "displayName": { - "type": "string", - "description": - "Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying.", - }, - "createdAt": { - "type": "string", - "description": "Timestamp when the verification was created.", - "format": "datetime", - }, - "revokeReason": { - "type": "string", - "description": - "Describes the reason for revocation, also indicating that the verification is no longer valid.", - }, - "revokedAt": { - "type": "string", - "description": "Timestamp when the verification was revoked.", - "format": "datetime", - }, - "revokedBy": { - "type": "string", - "description": "The user who revoked this verification.", - "format": "did", - }, - "subjectProfile": { - "type": "union", - "refs": [], - }, - "issuerProfile": { - "type": "union", - "refs": [], - }, - "subjectRepo": { - "type": "union", - "refs": [ - "lex:tools.ozone.moderation.defs#repoViewDetail", - "lex:tools.ozone.moderation.defs#repoViewNotFound", - ], - }, - "issuerRepo": { - "type": "union", - "refs": [ - "lex:tools.ozone.moderation.defs#repoViewDetail", - "lex:tools.ozone.moderation.defs#repoViewNotFound", - ], - }, - }, - }, - }, - }, - "ToolsOzoneVerificationGrantVerifications": { - "lexicon": 1, - "id": "tools.ozone.verification.grantVerifications", - "defs": { - "main": { - "type": "procedure", - "description": - "Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "verifications", - ], - "properties": { - "verifications": { - "type": "array", - "description": "Array of verification requests to process", - "maxLength": 100, - "items": { - "type": "ref", - "ref": - "lex:tools.ozone.verification.grantVerifications#verificationInput", - }, - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "verifications", - "failedVerifications", - ], - "properties": { - "verifications": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.verification.defs#verificationView", - }, - }, - "failedVerifications": { - "type": "array", - "items": { - "type": "ref", - "ref": - "lex:tools.ozone.verification.grantVerifications#grantError", - }, - }, - }, - }, - }, - }, - "verificationInput": { - "type": "object", - "required": [ - "subject", - "handle", - "displayName", - ], - "properties": { - "subject": { - "type": "string", - "description": "The did of the subject being verified", - "format": "did", - }, - "handle": { - "type": "string", - "description": - "Handle of the subject the verification applies to at the moment of verifying.", - "format": "handle", - }, - "displayName": { - "type": "string", - "description": - "Display name of the subject the verification applies to at the moment of verifying.", - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": - "Timestamp for verification record. Defaults to current time when not specified.", - }, - }, - }, - "grantError": { - "type": "object", - "description": "Error object for failed verifications.", - "required": [ - "error", - "subject", - ], - "properties": { - "error": { - "type": "string", - "description": "Error message describing the reason for failure.", - }, - "subject": { - "type": "string", - "description": "The did of the subject being verified", - "format": "did", - }, - }, - }, - }, - }, - "ToolsOzoneVerificationListVerifications": { - "lexicon": 1, - "id": "tools.ozone.verification.listVerifications", - "defs": { - "main": { - "type": "query", - "description": "List verifications", - "parameters": { - "type": "params", - "properties": { - "cursor": { - "type": "string", - "description": "Pagination cursor", - }, - "limit": { - "type": "integer", - "description": "Maximum number of results to return", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "createdAfter": { - "type": "string", - "format": "datetime", - "description": - "Filter to verifications created after this timestamp", - }, - "createdBefore": { - "type": "string", - "format": "datetime", - "description": - "Filter to verifications created before this timestamp", - }, - "issuers": { - "type": "array", - "maxLength": 100, - "description": "Filter to verifications from specific issuers", - "items": { - "type": "string", - "format": "did", - }, - }, - "subjects": { - "type": "array", - "description": "Filter to specific verified DIDs", - "maxLength": 100, - "items": { - "type": "string", - "format": "did", - }, - }, - "sortDirection": { - "type": "string", - "description": "Sort direction for creation date", - "enum": [ - "asc", - "desc", - ], - "default": "desc", - }, - "isRevoked": { - "type": "boolean", - "description": - "Filter to verifications that are revoked or not. By default, includes both.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "verifications", - ], - "properties": { - "cursor": { - "type": "string", - }, - "verifications": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.verification.defs#verificationView", - }, - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneSafelinkDefs": { - "lexicon": 1, - "id": "tools.ozone.safelink.defs", - "defs": { - "event": { - "type": "object", - "description": "An event for URL safety decisions", - "required": [ - "id", - "eventType", - "url", - "pattern", - "action", - "reason", - "createdBy", - "createdAt", - ], - "properties": { - "id": { - "type": "integer", - "description": "Auto-incrementing row ID", - }, - "eventType": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#eventType", - }, - "url": { - "type": "string", - "description": "The URL that this rule applies to", - }, - "pattern": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#patternType", - }, - "action": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#actionType", - }, - "reason": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#reasonType", - }, - "createdBy": { - "type": "string", - "format": "did", - "description": "DID of the user who created this rule", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "comment": { - "type": "string", - "description": "Optional comment about the decision", - }, - }, - }, - "eventType": { - "type": "string", - "knownValues": [ - "addRule", - "updateRule", - "removeRule", - ], - }, - "patternType": { - "type": "string", - "knownValues": [ - "domain", - "url", - ], - }, - "actionType": { - "type": "string", - "knownValues": [ - "block", - "warn", - "whitelist", - ], - }, - "reasonType": { - "type": "string", - "knownValues": [ - "csam", - "spam", - "phishing", - "none", - ], - }, - "urlRule": { - "type": "object", - "description": "Input for creating a URL safety rule", - "required": [ - "url", - "pattern", - "action", - "reason", - "createdBy", - "createdAt", - "updatedAt", - ], - "properties": { - "url": { - "type": "string", - "description": "The URL or domain to apply the rule to", - }, - "pattern": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#patternType", - }, - "action": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#actionType", - }, - "reason": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#reasonType", - }, - "comment": { - "type": "string", - "description": "Optional comment about the decision", - }, - "createdBy": { - "type": "string", - "format": "did", - "description": "DID of the user added the rule.", - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": "Timestamp when the rule was created", - }, - "updatedAt": { - "type": "string", - "format": "datetime", - "description": "Timestamp when the rule was last updated", - }, - }, - }, - }, - }, - "ToolsOzoneSafelinkAddRule": { - "lexicon": 1, - "id": "tools.ozone.safelink.addRule", - "defs": { - "main": { - "type": "procedure", - "description": "Add a new URL safety rule", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "url", - "pattern", - "action", - "reason", - ], - "properties": { - "url": { - "type": "string", - "description": "The URL or domain to apply the rule to", - }, - "pattern": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#patternType", - }, - "action": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#actionType", - }, - "reason": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#reasonType", - }, - "comment": { - "type": "string", - "description": "Optional comment about the decision", - }, - "createdBy": { - "type": "string", - "format": "did", - "description": - "Author DID. Only respected when using admin auth", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#event", - }, - }, - "errors": [ - { - "name": "InvalidUrl", - "description": "The provided URL is invalid", - }, - { - "name": "RuleAlreadyExists", - "description": "A rule for this URL/domain already exists", - }, - ], - }, - }, - }, - "ToolsOzoneSafelinkRemoveRule": { - "lexicon": 1, - "id": "tools.ozone.safelink.removeRule", - "defs": { - "main": { - "type": "procedure", - "description": "Remove an existing URL safety rule", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "url", - "pattern", - ], - "properties": { - "url": { - "type": "string", - "description": "The URL or domain to remove the rule for", - }, - "pattern": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#patternType", - }, - "comment": { - "type": "string", - "description": - "Optional comment about why the rule is being removed", - }, - "createdBy": { - "type": "string", - "format": "did", - "description": - "Optional DID of the user. Only respected when using admin auth.", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#event", - }, - }, - "errors": [ - { - "name": "RuleNotFound", - "description": "No active rule found for this URL/domain", - }, - ], - }, - }, - }, - "ToolsOzoneSafelinkUpdateRule": { - "lexicon": 1, - "id": "tools.ozone.safelink.updateRule", - "defs": { - "main": { - "type": "procedure", - "description": "Update an existing URL safety rule", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "url", - "pattern", - "action", - "reason", - ], - "properties": { - "url": { - "type": "string", - "description": "The URL or domain to update the rule for", - }, - "pattern": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#patternType", - }, - "action": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#actionType", - }, - "reason": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#reasonType", - }, - "comment": { - "type": "string", - "description": "Optional comment about the update", - }, - "createdBy": { - "type": "string", - "format": "did", - "description": - "Optional DID to credit as the creator. Only respected for admin_token authentication.", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#event", - }, - }, - "errors": [ - { - "name": "RuleNotFound", - "description": "No active rule found for this URL/domain", - }, - ], - }, - }, - }, - "ToolsOzoneSafelinkQueryEvents": { - "lexicon": 1, - "id": "tools.ozone.safelink.queryEvents", - "defs": { - "main": { - "type": "procedure", - "description": "Query URL safety audit events", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "cursor": { - "type": "string", - "description": "Cursor for pagination", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - "description": "Maximum number of results to return", - }, - "urls": { - "type": "array", - "items": { - "type": "string", - }, - "description": "Filter by specific URLs or domains", - }, - "patternType": { - "type": "string", - "description": "Filter by pattern type", - }, - "sortDirection": { - "type": "string", - "knownValues": [ - "asc", - "desc", - ], - "default": "desc", - "description": "Sort direction", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "events", - ], - "properties": { - "cursor": { - "type": "string", - "description": - "Next cursor for pagination. Only present if there are more results.", - }, - "events": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#event", - }, - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneSafelinkQueryRules": { - "lexicon": 1, - "id": "tools.ozone.safelink.queryRules", - "defs": { - "main": { - "type": "procedure", - "description": "Query URL safety rules", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "cursor": { - "type": "string", - "description": "Cursor for pagination", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - "description": "Maximum number of results to return", - }, - "urls": { - "type": "array", - "items": { - "type": "string", - }, - "description": "Filter by specific URLs or domains", - }, - "patternType": { - "type": "string", - "description": "Filter by pattern type", - }, - "actions": { - "type": "array", - "items": { - "type": "string", - }, - "description": "Filter by action types", - }, - "reason": { - "type": "string", - "description": "Filter by reason type", - }, - "createdBy": { - "type": "string", - "format": "did", - "description": "Filter by rule creator", - }, - "sortDirection": { - "type": "string", - "knownValues": [ - "asc", - "desc", - ], - "default": "desc", - "description": "Sort direction", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "rules", - ], - "properties": { - "cursor": { - "type": "string", - "description": - "Next cursor for pagination. Only present if there are more results.", - }, - "rules": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.safelink.defs#urlRule", - }, - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneTeamListMembers": { - "lexicon": 1, - "id": "tools.ozone.team.listMembers", - "defs": { - "main": { - "type": "query", - "description": "List all members with access to the ozone service.", - "parameters": { - "type": "params", - "properties": { - "q": { - "type": "string", - }, - "disabled": { - "type": "boolean", - }, - "roles": { - "type": "array", - "items": { - "type": "string", - }, - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "members", - ], - "properties": { - "cursor": { - "type": "string", - }, - "members": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.team.defs#member", - }, - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneTeamDefs": { - "lexicon": 1, - "id": "tools.ozone.team.defs", - "defs": { - "member": { - "type": "object", - "required": [ - "did", - "role", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "disabled": { - "type": "boolean", - }, - "profile": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileViewDetailed", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "updatedAt": { - "type": "string", - "format": "datetime", - }, - "lastUpdatedBy": { - "type": "string", - }, - "role": { - "type": "string", - "knownValues": [ - "tools.ozone.team.defs#roleAdmin", - "tools.ozone.team.defs#roleModerator", - "tools.ozone.team.defs#roleTriage", - "tools.ozone.team.defs#roleVerifier", - ], - }, - }, - }, - "roleAdmin": { - "type": "token", - "description": - "Admin role. Highest level of access, can perform all actions.", - }, - "roleModerator": { - "type": "token", - "description": "Moderator role. Can perform most actions.", - }, - "roleTriage": { - "type": "token", - "description": - "Triage role. Mostly intended for monitoring and escalating issues.", - }, - "roleVerifier": { - "type": "token", - "description": "Verifier role. Only allowed to issue verifications.", - }, - }, - }, - "ToolsOzoneTeamDeleteMember": { - "lexicon": 1, - "id": "tools.ozone.team.deleteMember", - "defs": { - "main": { - "type": "procedure", - "description": "Delete a member from ozone team. Requires admin role.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - }, - "errors": [ - { - "name": "MemberNotFound", - "description": "The member being deleted does not exist", - }, - { - "name": "CannotDeleteSelf", - "description": "You can not delete yourself from the team", - }, - ], - }, - }, - }, - "ToolsOzoneTeamUpdateMember": { - "lexicon": 1, - "id": "tools.ozone.team.updateMember", - "defs": { - "main": { - "type": "procedure", - "description": - "Update a member in the ozone service. Requires admin role.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "disabled": { - "type": "boolean", - }, - "role": { - "type": "string", - "knownValues": [ - "tools.ozone.team.defs#roleAdmin", - "tools.ozone.team.defs#roleModerator", - "tools.ozone.team.defs#roleVerifier", - "tools.ozone.team.defs#roleTriage", - ], - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:tools.ozone.team.defs#member", - }, - }, - "errors": [ - { - "name": "MemberNotFound", - "description": - "The member being updated does not exist in the team", - }, - ], - }, - }, - }, - "ToolsOzoneTeamAddMember": { - "lexicon": 1, - "id": "tools.ozone.team.addMember", - "defs": { - "main": { - "type": "procedure", - "description": "Add a member to the ozone team. Requires admin role.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "did", - "role", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "role": { - "type": "string", - "knownValues": [ - "tools.ozone.team.defs#roleAdmin", - "tools.ozone.team.defs#roleModerator", - "tools.ozone.team.defs#roleVerifier", - "tools.ozone.team.defs#roleTriage", - ], - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:tools.ozone.team.defs#member", - }, - }, - "errors": [ - { - "name": "MemberAlreadyExists", - "description": "Member already exists in the team.", - }, - ], - }, - }, - }, - "ToolsOzoneHostingGetAccountHistory": { - "lexicon": 1, - "id": "tools.ozone.hosting.getAccountHistory", - "defs": { - "main": { - "type": "query", - "description": - "Get account history, e.g. log of updated email addresses or other identity information.", - "parameters": { - "type": "params", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "events": { - "type": "array", - "items": { - "type": "string", - "knownValues": [ - "accountCreated", - "emailUpdated", - "emailConfirmed", - "passwordUpdated", - "handleUpdated", - ], - }, - }, - "cursor": { - "type": "string", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "events", - ], - "properties": { - "cursor": { - "type": "string", - }, - "events": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.hosting.getAccountHistory#event", - }, - }, - }, - }, - }, - }, - "event": { - "type": "object", - "required": [ - "details", - "createdBy", - "createdAt", - ], - "properties": { - "details": { - "type": "union", - "refs": [ - "lex:tools.ozone.hosting.getAccountHistory#accountCreated", - "lex:tools.ozone.hosting.getAccountHistory#emailUpdated", - "lex:tools.ozone.hosting.getAccountHistory#emailConfirmed", - "lex:tools.ozone.hosting.getAccountHistory#passwordUpdated", - "lex:tools.ozone.hosting.getAccountHistory#handleUpdated", - ], - }, - "createdBy": { - "type": "string", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "accountCreated": { - "type": "object", - "required": [], - "properties": { - "email": { - "type": "string", - }, - "handle": { - "type": "string", - "format": "handle", - }, - }, - }, - "emailUpdated": { - "type": "object", - "required": [ - "email", - ], - "properties": { - "email": { - "type": "string", - }, - }, - }, - "emailConfirmed": { - "type": "object", - "required": [ - "email", - ], - "properties": { - "email": { - "type": "string", - }, - }, - }, - "passwordUpdated": { - "type": "object", - "required": [], - "properties": {}, - }, - "handleUpdated": { - "type": "object", - "required": [ - "handle", - ], - "properties": { - "handle": { - "type": "string", - "format": "handle", - }, - }, - }, - }, - }, - "ToolsOzoneReportDefs": { - "lexicon": 1, - "id": "tools.ozone.report.defs", - "defs": { - "reasonType": { - "type": "string", - "knownValues": [ - "tools.ozone.report.defs#reasonAppeal", - "tools.ozone.report.defs#reasonOther", - "tools.ozone.report.defs#reasonViolenceAnimal", - "tools.ozone.report.defs#reasonViolenceThreats", - "tools.ozone.report.defs#reasonViolenceGraphicContent", - "tools.ozone.report.defs#reasonViolenceGlorification", - "tools.ozone.report.defs#reasonViolenceExtremistContent", - "tools.ozone.report.defs#reasonViolenceTrafficking", - "tools.ozone.report.defs#reasonViolenceOther", - "tools.ozone.report.defs#reasonSexualAbuseContent", - "tools.ozone.report.defs#reasonSexualNCII", - "tools.ozone.report.defs#reasonSexualDeepfake", - "tools.ozone.report.defs#reasonSexualAnimal", - "tools.ozone.report.defs#reasonSexualUnlabeled", - "tools.ozone.report.defs#reasonSexualOther", - "tools.ozone.report.defs#reasonChildSafetyCSAM", - "tools.ozone.report.defs#reasonChildSafetyGroom", - "tools.ozone.report.defs#reasonChildSafetyPrivacy", - "tools.ozone.report.defs#reasonChildSafetyHarassment", - "tools.ozone.report.defs#reasonChildSafetyOther", - "tools.ozone.report.defs#reasonHarassmentTroll", - "tools.ozone.report.defs#reasonHarassmentTargeted", - "tools.ozone.report.defs#reasonHarassmentHateSpeech", - "tools.ozone.report.defs#reasonHarassmentDoxxing", - "tools.ozone.report.defs#reasonHarassmentOther", - "tools.ozone.report.defs#reasonMisleadingBot", - "tools.ozone.report.defs#reasonMisleadingImpersonation", - "tools.ozone.report.defs#reasonMisleadingSpam", - "tools.ozone.report.defs#reasonMisleadingScam", - "tools.ozone.report.defs#reasonMisleadingElections", - "tools.ozone.report.defs#reasonMisleadingOther", - "tools.ozone.report.defs#reasonRuleSiteSecurity", - "tools.ozone.report.defs#reasonRuleProhibitedSales", - "tools.ozone.report.defs#reasonRuleBanEvasion", - "tools.ozone.report.defs#reasonRuleOther", - "tools.ozone.report.defs#reasonSelfHarmContent", - "tools.ozone.report.defs#reasonSelfHarmED", - "tools.ozone.report.defs#reasonSelfHarmStunts", - "tools.ozone.report.defs#reasonSelfHarmSubstances", - "tools.ozone.report.defs#reasonSelfHarmOther", - ], - }, - "reasonAppeal": { - "type": "token", - "description": "Appeal a previously taken moderation action", - }, - "reasonOther": { - "type": "token", - "description": "An issue not included in these options", - }, - "reasonViolenceAnimal": { - "type": "token", - "description": "Animal welfare violations", - }, - "reasonViolenceThreats": { - "type": "token", - "description": "Threats or incitement", - }, - "reasonViolenceGraphicContent": { - "type": "token", - "description": "Graphic violent content", - }, - "reasonViolenceGlorification": { - "type": "token", - "description": "Glorification of violence", - }, - "reasonViolenceExtremistContent": { - "type": "token", - "description": - "Extremist content. These reports will be sent only be sent to the application's Moderation Authority.", - }, - "reasonViolenceTrafficking": { - "type": "token", - "description": "Human trafficking", - }, - "reasonViolenceOther": { - "type": "token", - "description": "Other violent content", - }, - "reasonSexualAbuseContent": { - "type": "token", - "description": "Adult sexual abuse content", - }, - "reasonSexualNCII": { - "type": "token", - "description": "Non-consensual intimate imagery", - }, - "reasonSexualDeepfake": { - "type": "token", - "description": "Deepfake adult content", - }, - "reasonSexualAnimal": { - "type": "token", - "description": "Animal sexual abuse", - }, - "reasonSexualUnlabeled": { - "type": "token", - "description": "Unlabelled adult content", - }, - "reasonSexualOther": { - "type": "token", - "description": "Other sexual violence content", - }, - "reasonChildSafetyCSAM": { - "type": "token", - "description": - "Child sexual abuse material (CSAM). These reports will be sent only be sent to the application's Moderation Authority.", - }, - "reasonChildSafetyGroom": { - "type": "token", - "description": - "Grooming or predatory behavior. These reports will be sent only be sent to the application's Moderation Authority.", - }, - "reasonChildSafetyPrivacy": { - "type": "token", - "description": "Privacy violation involving a minor", - }, - "reasonChildSafetyHarassment": { - "type": "token", - "description": "Harassment or bullying of minors", - }, - "reasonChildSafetyOther": { - "type": "token", - "description": - "Other child safety. These reports will be sent only be sent to the application's Moderation Authority.", - }, - "reasonHarassmentTroll": { - "type": "token", - "description": "Trolling", - }, - "reasonHarassmentTargeted": { - "type": "token", - "description": "Targeted harassment", - }, - "reasonHarassmentHateSpeech": { - "type": "token", - "description": "Hate speech", - }, - "reasonHarassmentDoxxing": { - "type": "token", - "description": "Doxxing", - }, - "reasonHarassmentOther": { - "type": "token", - "description": "Other harassing or hateful content", - }, - "reasonMisleadingBot": { - "type": "token", - "description": "Fake account or bot", - }, - "reasonMisleadingImpersonation": { - "type": "token", - "description": "Impersonation", - }, - "reasonMisleadingSpam": { - "type": "token", - "description": "Spam", - }, - "reasonMisleadingScam": { - "type": "token", - "description": "Scam", - }, - "reasonMisleadingElections": { - "type": "token", - "description": "False information about elections", - }, - "reasonMisleadingOther": { - "type": "token", - "description": "Other misleading content", - }, - "reasonRuleSiteSecurity": { - "type": "token", - "description": "Hacking or system attacks", - }, - "reasonRuleProhibitedSales": { - "type": "token", - "description": "Promoting or selling prohibited items or services", - }, - "reasonRuleBanEvasion": { - "type": "token", - "description": "Banned user returning", - }, - "reasonRuleOther": { - "type": "token", - "description": "Other", - }, - "reasonSelfHarmContent": { - "type": "token", - "description": "Content promoting or depicting self-harm", - }, - "reasonSelfHarmED": { - "type": "token", - "description": "Eating disorders", - }, - "reasonSelfHarmStunts": { - "type": "token", - "description": "Dangerous challenges or activities", - }, - "reasonSelfHarmSubstances": { - "type": "token", - "description": "Dangerous substances or drug abuse", - }, - "reasonSelfHarmOther": { - "type": "token", - "description": "Other dangerous content", - }, - }, - }, - "ToolsOzoneCommunicationDefs": { - "lexicon": 1, - "id": "tools.ozone.communication.defs", - "defs": { - "templateView": { - "type": "object", - "required": [ - "id", - "name", - "contentMarkdown", - "disabled", - "lastUpdatedBy", - "createdAt", - "updatedAt", - ], - "properties": { - "id": { - "type": "string", - }, - "name": { - "type": "string", - "description": "Name of the template.", - }, - "subject": { - "type": "string", - "description": - "Content of the template, can contain markdown and variable placeholders.", - }, - "contentMarkdown": { - "type": "string", - "description": "Subject of the message, used in emails.", - }, - "disabled": { - "type": "boolean", - }, - "lang": { - "type": "string", - "format": "language", - "description": "Message language.", - }, - "lastUpdatedBy": { - "type": "string", - "format": "did", - "description": "DID of the user who last updated the template.", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "updatedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - "ToolsOzoneCommunicationUpdateTemplate": { - "lexicon": 1, - "id": "tools.ozone.communication.updateTemplate", - "defs": { - "main": { - "type": "procedure", - "description": - "Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "id", - ], - "properties": { - "id": { - "type": "string", - "description": "ID of the template to be updated.", - }, - "name": { - "type": "string", - "description": "Name of the template.", - }, - "lang": { - "type": "string", - "format": "language", - "description": "Message language.", - }, - "contentMarkdown": { - "type": "string", - "description": - "Content of the template, markdown supported, can contain variable placeholders.", - }, - "subject": { - "type": "string", - "description": "Subject of the message, used in emails.", - }, - "updatedBy": { - "type": "string", - "format": "did", - "description": "DID of the user who is updating the template.", - }, - "disabled": { - "type": "boolean", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:tools.ozone.communication.defs#templateView", - }, - }, - "errors": [ - { - "name": "DuplicateTemplateName", - }, - ], - }, - }, - }, - "ToolsOzoneCommunicationCreateTemplate": { - "lexicon": 1, - "id": "tools.ozone.communication.createTemplate", - "defs": { - "main": { - "type": "procedure", - "description": - "Administrative action to create a new, re-usable communication (email for now) template.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subject", - "contentMarkdown", - "name", - ], - "properties": { - "name": { - "type": "string", - "description": "Name of the template.", - }, - "contentMarkdown": { - "type": "string", - "description": - "Content of the template, markdown supported, can contain variable placeholders.", - }, - "subject": { - "type": "string", - "description": "Subject of the message, used in emails.", - }, - "lang": { - "type": "string", - "format": "language", - "description": "Message language.", - }, - "createdBy": { - "type": "string", - "format": "did", - "description": "DID of the user who is creating the template.", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:tools.ozone.communication.defs#templateView", - }, - }, - "errors": [ - { - "name": "DuplicateTemplateName", - }, - ], - }, - }, - }, - "ToolsOzoneCommunicationListTemplates": { - "lexicon": 1, - "id": "tools.ozone.communication.listTemplates", - "defs": { - "main": { - "type": "query", - "description": "Get list of all communication templates.", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "communicationTemplates", - ], - "properties": { - "communicationTemplates": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.communication.defs#templateView", - }, - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneCommunicationDeleteTemplate": { - "lexicon": 1, - "id": "tools.ozone.communication.deleteTemplate", - "defs": { - "main": { - "type": "procedure", - "description": "Delete a communication template.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "id", - ], - "properties": { - "id": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneSetDefs": { - "lexicon": 1, - "id": "tools.ozone.set.defs", - "defs": { - "set": { - "type": "object", - "required": [ - "name", - ], - "properties": { - "name": { - "type": "string", - "minLength": 3, - "maxLength": 128, - }, - "description": { - "type": "string", - "maxGraphemes": 1024, - "maxLength": 10240, - }, - }, - }, - "setView": { - "type": "object", - "required": [ - "name", - "setSize", - "createdAt", - "updatedAt", - ], - "properties": { - "name": { - "type": "string", - "minLength": 3, - "maxLength": 128, - }, - "description": { - "type": "string", - "maxGraphemes": 1024, - "maxLength": 10240, - }, - "setSize": { - "type": "integer", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "updatedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - "ToolsOzoneSetAddValues": { - "lexicon": 1, - "id": "tools.ozone.set.addValues", - "defs": { - "main": { - "type": "procedure", - "description": - "Add values to a specific set. Attempting to add values to a set that does not exist will result in an error.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "name", - "values", - ], - "properties": { - "name": { - "type": "string", - "description": "Name of the set to add values to", - }, - "values": { - "type": "array", - "minLength": 1, - "maxLength": 1000, - "items": { - "type": "string", - }, - "description": "Array of string values to add to the set", - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneSetGetValues": { - "lexicon": 1, - "id": "tools.ozone.set.getValues", - "defs": { - "main": { - "type": "query", - "description": "Get a specific set and its values", - "parameters": { - "type": "params", - "required": [ - "name", - ], - "properties": { - "name": { - "type": "string", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 1000, - "default": 100, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "set", - "values", - ], - "properties": { - "set": { - "type": "ref", - "ref": "lex:tools.ozone.set.defs#setView", - }, - "values": { - "type": "array", - "items": { - "type": "string", - }, - }, - "cursor": { - "type": "string", - }, - }, - }, - }, - "errors": [ - { - "name": "SetNotFound", - "description": "set with the given name does not exist", - }, - ], - }, - }, - }, - "ToolsOzoneSetDeleteSet": { - "lexicon": 1, - "id": "tools.ozone.set.deleteSet", - "defs": { - "main": { - "type": "procedure", - "description": - "Delete an entire set. Attempting to delete a set that does not exist will result in an error.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "name", - ], - "properties": { - "name": { - "type": "string", - "description": "Name of the set to delete", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": {}, - }, - }, - "errors": [ - { - "name": "SetNotFound", - "description": "set with the given name does not exist", - }, - ], - }, - }, - }, - "ToolsOzoneSetUpsertSet": { - "lexicon": 1, - "id": "tools.ozone.set.upsertSet", - "defs": { - "main": { - "type": "procedure", - "description": "Create or update set metadata", - "input": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:tools.ozone.set.defs#set", - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:tools.ozone.set.defs#setView", - }, - }, - }, - }, - }, - "ToolsOzoneSetDeleteValues": { - "lexicon": 1, - "id": "tools.ozone.set.deleteValues", - "defs": { - "main": { - "type": "procedure", - "description": - "Delete values from a specific set. Attempting to delete values that are not in the set will not result in an error", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "name", - "values", - ], - "properties": { - "name": { - "type": "string", - "description": "Name of the set to delete values from", - }, - "values": { - "type": "array", - "minLength": 1, - "items": { - "type": "string", - }, - "description": "Array of string values to delete from the set", - }, - }, - }, - }, - "errors": [ - { - "name": "SetNotFound", - "description": "set with the given name does not exist", - }, - ], - }, - }, - }, - "ToolsOzoneSetQuerySets": { - "lexicon": 1, - "id": "tools.ozone.set.querySets", - "defs": { - "main": { - "type": "query", - "description": "Query available sets", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - "namePrefix": { - "type": "string", - }, - "sortBy": { - "type": "string", - "enum": [ - "name", - "createdAt", - "updatedAt", - ], - "default": "name", - }, - "sortDirection": { - "type": "string", - "default": "asc", - "enum": [ - "asc", - "desc", - ], - "description": "Defaults to ascending order of name field.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "sets", - ], - "properties": { - "sets": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.set.defs#setView", - }, - }, - "cursor": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneSettingDefs": { - "lexicon": 1, - "id": "tools.ozone.setting.defs", - "defs": { - "option": { - "type": "object", - "required": [ - "key", - "value", - "did", - "scope", - "createdBy", - "lastUpdatedBy", - ], - "properties": { - "key": { - "type": "string", - "format": "nsid", - }, - "did": { - "type": "string", - "format": "did", - }, - "value": { - "type": "unknown", - }, - "description": { - "type": "string", - "maxGraphemes": 1024, - "maxLength": 10240, - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "updatedAt": { - "type": "string", - "format": "datetime", - }, - "managerRole": { - "type": "string", - "knownValues": [ - "tools.ozone.team.defs#roleModerator", - "tools.ozone.team.defs#roleTriage", - "tools.ozone.team.defs#roleAdmin", - "tools.ozone.team.defs#roleVerifier", - ], - }, - "scope": { - "type": "string", - "knownValues": [ - "instance", - "personal", - ], - }, - "createdBy": { - "type": "string", - "format": "did", - }, - "lastUpdatedBy": { - "type": "string", - "format": "did", - }, - }, - }, - }, - }, - "ToolsOzoneSettingListOptions": { - "lexicon": 1, - "id": "tools.ozone.setting.listOptions", - "defs": { - "main": { - "type": "query", - "description": "List settings with optional filtering", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - "scope": { - "type": "string", - "knownValues": [ - "instance", - "personal", - ], - "default": "instance", - }, - "prefix": { - "type": "string", - "description": "Filter keys by prefix", - }, - "keys": { - "type": "array", - "maxLength": 100, - "items": { - "type": "string", - "format": "nsid", - }, - "description": - "Filter for only the specified keys. Ignored if prefix is provided", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "options", - ], - "properties": { - "cursor": { - "type": "string", - }, - "options": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.setting.defs#option", - }, - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneSettingRemoveOptions": { - "lexicon": 1, - "id": "tools.ozone.setting.removeOptions", - "defs": { - "main": { - "type": "procedure", - "description": "Delete settings by key", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "keys", - "scope", - ], - "properties": { - "keys": { - "type": "array", - "minLength": 1, - "maxLength": 200, - "items": { - "type": "string", - "format": "nsid", - }, - }, - "scope": { - "type": "string", - "knownValues": [ - "instance", - "personal", - ], - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": {}, - }, - }, - }, - }, - }, - "ToolsOzoneSettingUpsertOption": { - "lexicon": 1, - "id": "tools.ozone.setting.upsertOption", - "defs": { - "main": { - "type": "procedure", - "description": "Create or update setting option", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "key", - "scope", - "value", - ], - "properties": { - "key": { - "type": "string", - "format": "nsid", - }, - "scope": { - "type": "string", - "knownValues": [ - "instance", - "personal", - ], - }, - "value": { - "type": "unknown", - }, - "description": { - "type": "string", - "maxLength": 2000, - }, - "managerRole": { - "type": "string", - "knownValues": [ - "tools.ozone.team.defs#roleModerator", - "tools.ozone.team.defs#roleTriage", - "tools.ozone.team.defs#roleVerifier", - "tools.ozone.team.defs#roleAdmin", - ], - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "option", - ], - "properties": { - "option": { - "type": "ref", - "ref": "lex:tools.ozone.setting.defs#option", - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneModerationGetReporterStats": { - "lexicon": 1, - "id": "tools.ozone.moderation.getReporterStats", - "defs": { - "main": { - "type": "query", - "description": "Get reporter stats for a list of users.", - "parameters": { - "type": "params", - "required": [ - "dids", - ], - "properties": { - "dids": { - "type": "array", - "maxLength": 100, - "items": { - "type": "string", - "format": "did", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "stats", - ], - "properties": { - "stats": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#reporterStats", - }, - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneModerationCancelScheduledActions": { - "lexicon": 1, - "id": "tools.ozone.moderation.cancelScheduledActions", - "defs": { - "main": { - "type": "procedure", - "description": - "Cancel all pending scheduled moderation actions for specified subjects", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subjects", - ], - "properties": { - "subjects": { - "type": "array", - "maxLength": 100, - "items": { - "type": "string", - "format": "did", - }, - "description": - "Array of DID subjects to cancel scheduled actions for", - }, - "comment": { - "type": "string", - "description": - "Optional comment describing the reason for cancellation", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": - "lex:tools.ozone.moderation.cancelScheduledActions#cancellationResults", - }, - }, - }, - "cancellationResults": { - "type": "object", - "required": [ - "succeeded", - "failed", - ], - "properties": { - "succeeded": { - "type": "array", - "items": { - "type": "string", - "format": "did", - }, - "description": - "DIDs for which all pending scheduled actions were successfully cancelled", - }, - "failed": { - "type": "array", - "items": { - "type": "ref", - "ref": - "lex:tools.ozone.moderation.cancelScheduledActions#failedCancellation", - }, - "description": - "DIDs for which cancellation failed with error details", - }, - }, - }, - "failedCancellation": { - "type": "object", - "required": [ - "did", - "error", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "error": { - "type": "string", - }, - "errorCode": { - "type": "string", - }, - }, - }, - }, - }, - "ToolsOzoneModerationListScheduledActions": { - "lexicon": 1, - "id": "tools.ozone.moderation.listScheduledActions", - "defs": { - "main": { - "type": "procedure", - "description": - "List scheduled moderation actions with optional filtering", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "statuses", - ], - "properties": { - "startsAfter": { - "type": "string", - "format": "datetime", - "description": - "Filter actions scheduled to execute after this time", - }, - "endsBefore": { - "type": "string", - "format": "datetime", - "description": - "Filter actions scheduled to execute before this time", - }, - "subjects": { - "type": "array", - "maxLength": 100, - "items": { - "type": "string", - "format": "did", - }, - "description": "Filter actions for specific DID subjects", - }, - "statuses": { - "type": "array", - "minLength": 1, - "items": { - "type": "string", - "knownValues": [ - "pending", - "executed", - "cancelled", - "failed", - ], - }, - "description": "Filter actions by status", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - "description": "Maximum number of results to return", - }, - "cursor": { - "type": "string", - "description": "Cursor for pagination", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actions", - ], - "properties": { - "actions": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#scheduledActionView", - }, - }, - "cursor": { - "type": "string", - "description": "Cursor for next page of results", - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneModerationQueryStatuses": { - "lexicon": 1, - "id": "tools.ozone.moderation.queryStatuses", - "defs": { - "main": { - "type": "query", - "description": "View moderation statuses of subjects (record or repo).", - "parameters": { - "type": "params", - "properties": { - "queueCount": { - "type": "integer", - "description": - "Number of queues being used by moderators. Subjects will be split among all queues.", - }, - "queueIndex": { - "type": "integer", - "description": - "Index of the queue to fetch subjects from. Works only when queueCount value is specified.", - }, - "queueSeed": { - "type": "string", - "description": "A seeder to shuffle/balance the queue items.", - }, - "includeAllUserRecords": { - "type": "boolean", - "description": - "All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned.", - }, - "subject": { - "type": "string", - "format": "uri", - "description": "The subject to get the status for.", - }, - "comment": { - "type": "string", - "description": "Search subjects by keyword from comments", - }, - "reportedAfter": { - "type": "string", - "format": "datetime", - "description": "Search subjects reported after a given timestamp", - }, - "reportedBefore": { - "type": "string", - "format": "datetime", - "description": - "Search subjects reported before a given timestamp", - }, - "reviewedAfter": { - "type": "string", - "format": "datetime", - "description": "Search subjects reviewed after a given timestamp", - }, - "hostingDeletedAfter": { - "type": "string", - "format": "datetime", - "description": - "Search subjects where the associated record/account was deleted after a given timestamp", - }, - "hostingDeletedBefore": { - "type": "string", - "format": "datetime", - "description": - "Search subjects where the associated record/account was deleted before a given timestamp", - }, - "hostingUpdatedAfter": { - "type": "string", - "format": "datetime", - "description": - "Search subjects where the associated record/account was updated after a given timestamp", - }, - "hostingUpdatedBefore": { - "type": "string", - "format": "datetime", - "description": - "Search subjects where the associated record/account was updated before a given timestamp", - }, - "hostingStatuses": { - "type": "array", - "items": { - "type": "string", - }, - "description": - "Search subjects by the status of the associated record/account", - }, - "reviewedBefore": { - "type": "string", - "format": "datetime", - "description": - "Search subjects reviewed before a given timestamp", - }, - "includeMuted": { - "type": "boolean", - "description": - "By default, we don't include muted subjects in the results. Set this to true to include them.", - }, - "onlyMuted": { - "type": "boolean", - "description": - "When set to true, only muted subjects and reporters will be returned.", - }, - "reviewState": { - "type": "string", - "description": - "Specify when fetching subjects in a certain state", - "knownValues": [ - "tools.ozone.moderation.defs#reviewOpen", - "tools.ozone.moderation.defs#reviewClosed", - "tools.ozone.moderation.defs#reviewEscalated", - "tools.ozone.moderation.defs#reviewNone", - ], - }, - "ignoreSubjects": { - "type": "array", - "items": { - "type": "string", - "format": "uri", - }, - }, - "lastReviewedBy": { - "type": "string", - "format": "did", - "description": - "Get all subject statuses that were reviewed by a specific moderator", - }, - "sortField": { - "type": "string", - "default": "lastReportedAt", - "enum": [ - "lastReviewedAt", - "lastReportedAt", - "reportedRecordsCount", - "takendownRecordsCount", - "priorityScore", - ], - }, - "sortDirection": { - "type": "string", - "default": "desc", - "enum": [ - "asc", - "desc", - ], - }, - "takendown": { - "type": "boolean", - "description": "Get subjects that were taken down", - }, - "appealed": { - "type": "boolean", - "description": "Get subjects in unresolved appealed status", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "tags": { - "type": "array", - "maxLength": 25, - "items": { - "type": "string", - "description": - "Items in this array are applied with OR filters. To apply AND filter, put all tags in the same string and separate using && characters", - }, - }, - "excludeTags": { - "type": "array", - "items": { - "type": "string", - }, - }, - "cursor": { - "type": "string", - }, - "collections": { - "type": "array", - "maxLength": 20, - "description": - "If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored.", - "items": { - "type": "string", - "format": "nsid", - }, - }, - "subjectType": { - "type": "string", - "description": - "If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.", - "knownValues": [ - "account", - "record", - ], - }, - "minAccountSuspendCount": { - "type": "integer", - "description": - "If specified, only subjects that belong to an account that has at least this many suspensions will be returned.", - }, - "minReportedRecordsCount": { - "type": "integer", - "description": - "If specified, only subjects that belong to an account that has at least this many reported records will be returned.", - }, - "minTakendownRecordsCount": { - "type": "integer", - "description": - "If specified, only subjects that belong to an account that has at least this many taken down records will be returned.", - }, - "minPriorityScore": { - "minimum": 0, - "maximum": 100, - "type": "integer", - "description": - "If specified, only subjects that have priority score value above the given value will be returned.", - }, - "minStrikeCount": { - "type": "integer", - "minimum": 1, - "description": - "If specified, only subjects that belong to an account that has at least this many active strikes will be returned.", - }, - "ageAssuranceState": { - "type": "string", - "description": - "If specified, only subjects with the given age assurance state will be returned.", - "knownValues": [ - "pending", - "assured", - "unknown", - "reset", - "blocked", - ], - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subjectStatuses", - ], - "properties": { - "cursor": { - "type": "string", - }, - "subjectStatuses": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#subjectStatusView", - }, - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneModerationGetRepo": { - "lexicon": 1, - "id": "tools.ozone.moderation.getRepo", - "defs": { - "main": { - "type": "query", - "description": "Get details about a repository.", - "parameters": { - "type": "params", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#repoViewDetail", - }, - }, - "errors": [ - { - "name": "RepoNotFound", - }, - ], - }, - }, - }, - "ToolsOzoneModerationDefs": { - "lexicon": 1, - "id": "tools.ozone.moderation.defs", - "defs": { - "modEventView": { - "type": "object", - "required": [ - "id", - "event", - "subject", - "subjectBlobCids", - "createdBy", - "createdAt", - ], - "properties": { - "id": { - "type": "integer", - }, - "event": { - "type": "union", - "refs": [ - "lex:tools.ozone.moderation.defs#modEventTakedown", - "lex:tools.ozone.moderation.defs#modEventReverseTakedown", - "lex:tools.ozone.moderation.defs#modEventComment", - "lex:tools.ozone.moderation.defs#modEventReport", - "lex:tools.ozone.moderation.defs#modEventLabel", - "lex:tools.ozone.moderation.defs#modEventAcknowledge", - "lex:tools.ozone.moderation.defs#modEventEscalate", - "lex:tools.ozone.moderation.defs#modEventMute", - "lex:tools.ozone.moderation.defs#modEventUnmute", - "lex:tools.ozone.moderation.defs#modEventMuteReporter", - "lex:tools.ozone.moderation.defs#modEventUnmuteReporter", - "lex:tools.ozone.moderation.defs#modEventEmail", - "lex:tools.ozone.moderation.defs#modEventResolveAppeal", - "lex:tools.ozone.moderation.defs#modEventDivert", - "lex:tools.ozone.moderation.defs#modEventTag", - "lex:tools.ozone.moderation.defs#accountEvent", - "lex:tools.ozone.moderation.defs#identityEvent", - "lex:tools.ozone.moderation.defs#recordEvent", - "lex:tools.ozone.moderation.defs#modEventPriorityScore", - "lex:tools.ozone.moderation.defs#ageAssuranceEvent", - "lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent", - "lex:tools.ozone.moderation.defs#ageAssurancePurgeEvent", - "lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent", - "lex:tools.ozone.moderation.defs#scheduleTakedownEvent", - "lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent", - ], - }, - "subject": { - "type": "union", - "refs": [ - "lex:com.atproto.admin.defs#repoRef", - "lex:com.atproto.repo.strongRef", - "lex:chat.bsky.convo.defs#messageRef", - ], - }, - "subjectBlobCids": { - "type": "array", - "items": { - "type": "string", - }, - }, - "createdBy": { - "type": "string", - "format": "did", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "creatorHandle": { - "type": "string", - }, - "subjectHandle": { - "type": "string", - }, - "modTool": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#modTool", - }, - }, - }, - "modEventViewDetail": { - "type": "object", - "required": [ - "id", - "event", - "subject", - "subjectBlobs", - "createdBy", - "createdAt", - ], - "properties": { - "id": { - "type": "integer", - }, - "event": { - "type": "union", - "refs": [ - "lex:tools.ozone.moderation.defs#modEventTakedown", - "lex:tools.ozone.moderation.defs#modEventReverseTakedown", - "lex:tools.ozone.moderation.defs#modEventComment", - "lex:tools.ozone.moderation.defs#modEventReport", - "lex:tools.ozone.moderation.defs#modEventLabel", - "lex:tools.ozone.moderation.defs#modEventAcknowledge", - "lex:tools.ozone.moderation.defs#modEventEscalate", - "lex:tools.ozone.moderation.defs#modEventMute", - "lex:tools.ozone.moderation.defs#modEventUnmute", - "lex:tools.ozone.moderation.defs#modEventMuteReporter", - "lex:tools.ozone.moderation.defs#modEventUnmuteReporter", - "lex:tools.ozone.moderation.defs#modEventEmail", - "lex:tools.ozone.moderation.defs#modEventResolveAppeal", - "lex:tools.ozone.moderation.defs#modEventDivert", - "lex:tools.ozone.moderation.defs#modEventTag", - "lex:tools.ozone.moderation.defs#accountEvent", - "lex:tools.ozone.moderation.defs#identityEvent", - "lex:tools.ozone.moderation.defs#recordEvent", - "lex:tools.ozone.moderation.defs#modEventPriorityScore", - "lex:tools.ozone.moderation.defs#ageAssuranceEvent", - "lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent", - "lex:tools.ozone.moderation.defs#ageAssurancePurgeEvent", - "lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent", - "lex:tools.ozone.moderation.defs#scheduleTakedownEvent", - "lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent", - ], - }, - "subject": { - "type": "union", - "refs": [ - "lex:tools.ozone.moderation.defs#repoView", - "lex:tools.ozone.moderation.defs#repoViewNotFound", - "lex:tools.ozone.moderation.defs#recordView", - "lex:tools.ozone.moderation.defs#recordViewNotFound", - ], - }, - "subjectBlobs": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#blobView", - }, - }, - "createdBy": { - "type": "string", - "format": "did", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "modTool": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#modTool", - }, - }, - }, - "subjectStatusView": { - "type": "object", - "required": [ - "id", - "subject", - "createdAt", - "updatedAt", - "reviewState", - ], - "properties": { - "id": { - "type": "integer", - }, - "subject": { - "type": "union", - "refs": [ - "lex:com.atproto.admin.defs#repoRef", - "lex:com.atproto.repo.strongRef", - "lex:chat.bsky.convo.defs#messageRef", - ], - }, - "hosting": { - "type": "union", - "refs": [ - "lex:tools.ozone.moderation.defs#accountHosting", - "lex:tools.ozone.moderation.defs#recordHosting", - ], - }, - "subjectBlobCids": { - "type": "array", - "items": { - "type": "string", - "format": "cid", - }, - }, - "subjectRepoHandle": { - "type": "string", - }, - "updatedAt": { - "type": "string", - "format": "datetime", - "description": - "Timestamp referencing when the last update was made to the moderation status of the subject", - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": - "Timestamp referencing the first moderation status impacting event was emitted on the subject", - }, - "reviewState": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#subjectReviewState", - }, - "comment": { - "type": "string", - "description": "Sticky comment on the subject.", - }, - "priorityScore": { - "type": "integer", - "description": - "Numeric value representing the level of priority. Higher score means higher priority.", - "minimum": 0, - "maximum": 100, - }, - "muteUntil": { - "type": "string", - "format": "datetime", - }, - "muteReportingUntil": { - "type": "string", - "format": "datetime", - }, - "lastReviewedBy": { - "type": "string", - "format": "did", - }, - "lastReviewedAt": { - "type": "string", - "format": "datetime", - }, - "lastReportedAt": { - "type": "string", - "format": "datetime", - }, - "lastAppealedAt": { - "type": "string", - "format": "datetime", - "description": - "Timestamp referencing when the author of the subject appealed a moderation action", - }, - "takendown": { - "type": "boolean", - }, - "appealed": { - "type": "boolean", - "description": - "True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators.", - }, - "suspendUntil": { - "type": "string", - "format": "datetime", - }, - "tags": { - "type": "array", - "items": { - "type": "string", - }, - }, - "accountStats": { - "description": "Statistics related to the account subject", - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#accountStats", - }, - "recordsStats": { - "description": - "Statistics related to the record subjects authored by the subject's account", - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#recordsStats", - }, - "accountStrike": { - "description": - "Strike information for the account (account-level only)", - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#accountStrike", - }, - "ageAssuranceState": { - "type": "string", - "description": "Current age assurance state of the subject.", - "knownValues": [ - "pending", - "assured", - "unknown", - "reset", - "blocked", - ], - }, - "ageAssuranceUpdatedBy": { - "type": "string", - "description": - "Whether or not the last successful update to age assurance was made by the user or admin.", - "knownValues": [ - "admin", - "user", - ], - }, - }, - }, - "subjectView": { - "description": - "Detailed view of a subject. For record subjects, the author's repo and profile will be returned.", - "type": "object", - "required": [ - "type", - "subject", - ], - "properties": { - "type": { - "type": "ref", - "ref": "lex:com.atproto.moderation.defs#subjectType", - }, - "subject": { - "type": "string", - }, - "status": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#subjectStatusView", - }, - "repo": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#repoViewDetail", - }, - "profile": { - "type": "union", - "refs": [], - }, - "record": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#recordViewDetail", - }, - }, - }, - "accountStats": { - "description": "Statistics about a particular account subject", - "type": "object", - "properties": { - "reportCount": { - "description": "Total number of reports on the account", - "type": "integer", - }, - "appealCount": { - "description": - "Total number of appeals against a moderation action on the account", - "type": "integer", - }, - "suspendCount": { - "description": "Number of times the account was suspended", - "type": "integer", - }, - "escalateCount": { - "description": "Number of times the account was escalated", - "type": "integer", - }, - "takedownCount": { - "description": "Number of times the account was taken down", - "type": "integer", - }, - }, - }, - "recordsStats": { - "description": "Statistics about a set of record subject items", - "type": "object", - "properties": { - "totalReports": { - "description": - "Cumulative sum of the number of reports on the items in the set", - "type": "integer", - }, - "reportedCount": { - "description": "Number of items that were reported at least once", - "type": "integer", - }, - "escalatedCount": { - "description": "Number of items that were escalated at least once", - "type": "integer", - }, - "appealedCount": { - "description": "Number of items that were appealed at least once", - "type": "integer", - }, - "subjectCount": { - "description": "Total number of item in the set", - "type": "integer", - }, - "pendingCount": { - "description": - 'Number of item currently in "reviewOpen" or "reviewEscalated" state', - "type": "integer", - }, - "processedCount": { - "description": - 'Number of item currently in "reviewNone" or "reviewClosed" state', - "type": "integer", - }, - "takendownCount": { - "description": "Number of item currently taken down", - "type": "integer", - }, - }, - }, - "accountStrike": { - "description": "Strike information for an account", - "type": "object", - "properties": { - "activeStrikeCount": { - "description": - "Current number of active strikes (excluding expired strikes)", - "type": "integer", - }, - "totalStrikeCount": { - "description": - "Total number of strikes ever received (including expired strikes)", - "type": "integer", - }, - "firstStrikeAt": { - "description": "Timestamp of the first strike received", - "type": "string", - "format": "datetime", - }, - "lastStrikeAt": { - "description": "Timestamp of the most recent strike received", - "type": "string", - "format": "datetime", - }, - }, - }, - "subjectReviewState": { - "type": "string", - "knownValues": [ - "tools.ozone.moderation.defs#reviewOpen", - "tools.ozone.moderation.defs#reviewEscalated", - "tools.ozone.moderation.defs#reviewClosed", - "tools.ozone.moderation.defs#reviewNone", - ], - }, - "reviewOpen": { - "type": "token", - "description": - "Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator", - }, - "reviewEscalated": { - "type": "token", - "description": - "Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator", - }, - "reviewClosed": { - "type": "token", - "description": - "Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator", - }, - "reviewNone": { - "type": "token", - "description": - "Moderator review status of a subject: Unnecessary. Indicates that the subject does not need a review at the moment but there is probably some moderation related metadata available for it", - }, - "modEventTakedown": { - "type": "object", - "description": "Take down a subject permanently or temporarily", - "properties": { - "comment": { - "type": "string", - }, - "durationInHours": { - "type": "integer", - "description": - "Indicates how long the takedown should be in effect before automatically expiring.", - }, - "acknowledgeAccountSubjects": { - "type": "boolean", - "description": - "If true, all other reports on content authored by this account will be resolved (acknowledged).", - }, - "policies": { - "type": "array", - "maxLength": 5, - "items": { - "type": "string", - }, - "description": - "Names/Keywords of the policies that drove the decision.", - }, - "severityLevel": { - "type": "string", - "description": - "Severity level of the violation (e.g., 'sev-0', 'sev-1', 'sev-2', etc.).", - }, - "targetServices": { - "type": "array", - "items": { - "type": "string", - "knownValues": [ - "appview", - "pds", - ], - }, - "description": - "List of services where the takedown should be applied. If empty or not provided, takedown is applied on all configured services.", - }, - "strikeCount": { - "type": "integer", - "description": - "Number of strikes to assign to the user for this violation.", - }, - "strikeExpiresAt": { - "type": "string", - "format": "datetime", - "description": - "When the strike should expire. If not provided, the strike never expires.", - }, - }, - }, - "modEventReverseTakedown": { - "type": "object", - "description": "Revert take down action on a subject", - "properties": { - "comment": { - "type": "string", - "description": "Describe reasoning behind the reversal.", - }, - "policies": { - "type": "array", - "maxLength": 5, - "items": { - "type": "string", - }, - "description": - "Names/Keywords of the policy infraction for which takedown is being reversed.", - }, - "severityLevel": { - "type": "string", - "description": - "Severity level of the violation. Usually set from the last policy infraction's severity.", - }, - "strikeCount": { - "type": "integer", - "description": - "Number of strikes to subtract from the user's strike count. Usually set from the last policy infraction's severity.", - }, - }, - }, - "modEventResolveAppeal": { - "type": "object", - "description": "Resolve appeal on a subject", - "properties": { - "comment": { - "type": "string", - "description": "Describe resolution.", - }, - }, - }, - "modEventComment": { - "type": "object", - "description": - "Add a comment to a subject. An empty comment will clear any previously set sticky comment.", - "properties": { - "comment": { - "type": "string", - }, - "sticky": { - "type": "boolean", - "description": "Make the comment persistent on the subject", - }, - }, - }, - "modEventReport": { - "type": "object", - "description": "Report a subject", - "required": [ - "reportType", - ], - "properties": { - "comment": { - "type": "string", - }, - "isReporterMuted": { - "type": "boolean", - "description": - "Set to true if the reporter was muted from reporting at the time of the event. These reports won't impact the reviewState of the subject.", - }, - "reportType": { - "type": "ref", - "ref": "lex:com.atproto.moderation.defs#reasonType", - }, - }, - }, - "modEventLabel": { - "type": "object", - "description": "Apply/Negate labels on a subject", - "required": [ - "createLabelVals", - "negateLabelVals", - ], - "properties": { - "comment": { - "type": "string", - }, - "createLabelVals": { - "type": "array", - "items": { - "type": "string", - }, - }, - "negateLabelVals": { - "type": "array", - "items": { - "type": "string", - }, - }, - "durationInHours": { - "type": "integer", - "description": - "Indicates how long the label will remain on the subject. Only applies on labels that are being added.", - }, - }, - }, - "modEventPriorityScore": { - "type": "object", - "description": - "Set priority score of the subject. Higher score means higher priority.", - "required": [ - "score", - ], - "properties": { - "comment": { - "type": "string", - }, - "score": { - "type": "integer", - "minimum": 0, - "maximum": 100, - }, - }, - }, - "ageAssuranceEvent": { - "type": "object", - "description": - "Age assurance info coming directly from users. Only works on DID subjects.", - "required": [ - "createdAt", - "status", - "attemptId", - ], - "properties": { - "createdAt": { - "type": "string", - "format": "datetime", - "description": "The date and time of this write operation.", - }, - "attemptId": { - "type": "string", - "description": - "The unique identifier for this instance of the age assurance flow, in UUID format.", - }, - "status": { - "type": "string", - "description": "The status of the Age Assurance process.", - "knownValues": [ - "unknown", - "pending", - "assured", - ], - }, - "access": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#access", - }, - "countryCode": { - "type": "string", - "description": - "The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow.", - }, - "regionCode": { - "type": "string", - "description": - "The ISO 3166-2 region code provided when beginning the Age Assurance flow.", - }, - "initIp": { - "type": "string", - "description": "The IP address used when initiating the AA flow.", - }, - "initUa": { - "type": "string", - "description": "The user agent used when initiating the AA flow.", - }, - "completeIp": { - "type": "string", - "description": "The IP address used when completing the AA flow.", - }, - "completeUa": { - "type": "string", - "description": "The user agent used when completing the AA flow.", - }, - }, - }, - "ageAssuranceOverrideEvent": { - "type": "object", - "description": - "Age assurance status override by moderators. Only works on DID subjects.", - "required": [ - "comment", - "status", - ], - "properties": { - "status": { - "type": "string", - "description": - "The status to be set for the user decided by a moderator, overriding whatever value the user had previously. Use reset to default to original state.", - "knownValues": [ - "assured", - "reset", - "blocked", - ], - }, - "access": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#access", - }, - "comment": { - "type": "string", - "minLength": 1, - "description": "Comment describing the reason for the override.", - }, - }, - }, - "ageAssurancePurgeEvent": { - "type": "object", - "description": - "Purges all age assurance events for the subject. Only works on DID subjects. Moderator-only.", - "required": [ - "comment", - ], - "properties": { - "comment": { - "type": "string", - "minLength": 1, - "description": "Comment describing the reason for the purge.", - }, - }, - }, - "revokeAccountCredentialsEvent": { - "type": "object", - "description": - "Account credentials revocation by moderators. Only works on DID subjects.", - "required": [ - "comment", - ], - "properties": { - "comment": { - "minLength": 1, - "type": "string", - "description": "Comment describing the reason for the revocation.", - }, - }, - }, - "modEventAcknowledge": { - "type": "object", - "properties": { - "comment": { - "type": "string", - }, - "acknowledgeAccountSubjects": { - "type": "boolean", - "description": - "If true, all other reports on content authored by this account will be resolved (acknowledged).", - }, - }, - }, - "modEventEscalate": { - "type": "object", - "properties": { - "comment": { - "type": "string", - }, - }, - }, - "modEventMute": { - "type": "object", - "description": "Mute incoming reports on a subject", - "required": [ - "durationInHours", - ], - "properties": { - "comment": { - "type": "string", - }, - "durationInHours": { - "type": "integer", - "description": - "Indicates how long the subject should remain muted.", - }, - }, - }, - "modEventUnmute": { - "type": "object", - "description": "Unmute action on a subject", - "properties": { - "comment": { - "type": "string", - "description": "Describe reasoning behind the reversal.", - }, - }, - }, - "modEventMuteReporter": { - "type": "object", - "description": "Mute incoming reports from an account", - "properties": { - "comment": { - "type": "string", - }, - "durationInHours": { - "type": "integer", - "description": - "Indicates how long the account should remain muted. Falsy value here means a permanent mute.", - }, - }, - }, - "modEventUnmuteReporter": { - "type": "object", - "description": "Unmute incoming reports from an account", - "properties": { - "comment": { - "type": "string", - "description": "Describe reasoning behind the reversal.", - }, - }, - }, - "modEventEmail": { - "type": "object", - "description": "Keep a log of outgoing email to a user", - "required": [ - "subjectLine", - ], - "properties": { - "subjectLine": { - "type": "string", - "description": "The subject line of the email sent to the user.", - }, - "content": { - "type": "string", - "description": "The content of the email sent to the user.", - }, - "comment": { - "type": "string", - "description": "Additional comment about the outgoing comm.", - }, - "policies": { - "type": "array", - "maxLength": 5, - "items": { - "type": "string", - }, - "description": - "Names/Keywords of the policies that necessitated the email.", - }, - "severityLevel": { - "type": "string", - "description": - "Severity level of the violation. Normally 'sev-1' that adds strike on repeat offense", - }, - "strikeCount": { - "type": "integer", - "description": - "Number of strikes to assign to the user for this violation. Normally 0 as an indicator of a warning and only added as a strike on a repeat offense.", - }, - "strikeExpiresAt": { - "type": "string", - "format": "datetime", - "description": - "When the strike should expire. If not provided, the strike never expires.", - }, - "isDelivered": { - "type": "boolean", - "description": - "Indicates whether the email was successfully delivered to the user's inbox.", - }, - }, - }, - "modEventDivert": { - "type": "object", - "description": - "Divert a record's blobs to a 3rd party service for further scanning/tagging", - "properties": { - "comment": { - "type": "string", - }, - }, - }, - "modEventTag": { - "type": "object", - "description": "Add/Remove a tag on a subject", - "required": [ - "add", - "remove", - ], - "properties": { - "add": { - "type": "array", - "items": { - "type": "string", - }, - "description": - "Tags to be added to the subject. If already exists, won't be duplicated.", - }, - "remove": { - "type": "array", - "items": { - "type": "string", - }, - "description": - "Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated.", - }, - "comment": { - "type": "string", - "description": "Additional comment about added/removed tags.", - }, - }, - }, - "accountEvent": { - "type": "object", - "description": - "Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.", - "required": [ - "timestamp", - "active", - ], - "properties": { - "comment": { - "type": "string", - }, - "active": { - "type": "boolean", - "description": - "Indicates that the account has a repository which can be fetched from the host that emitted this event.", - }, - "status": { - "type": "string", - "knownValues": [ - "unknown", - "deactivated", - "deleted", - "takendown", - "suspended", - "tombstoned", - ], - }, - "timestamp": { - "type": "string", - "format": "datetime", - }, - }, - }, - "identityEvent": { - "type": "object", - "description": - "Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.", - "required": [ - "timestamp", - ], - "properties": { - "comment": { - "type": "string", - }, - "handle": { - "type": "string", - "format": "handle", - }, - "pdsHost": { - "type": "string", - "format": "uri", - }, - "tombstone": { - "type": "boolean", - }, - "timestamp": { - "type": "string", - "format": "datetime", - }, - }, - }, - "recordEvent": { - "type": "object", - "description": - "Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.", - "required": [ - "timestamp", - "op", - ], - "properties": { - "comment": { - "type": "string", - }, - "op": { - "type": "string", - "knownValues": [ - "create", - "update", - "delete", - ], - }, - "cid": { - "type": "string", - "format": "cid", - }, - "timestamp": { - "type": "string", - "format": "datetime", - }, - }, - }, - "scheduleTakedownEvent": { - "type": "object", - "description": "Logs a scheduled takedown action for an account.", - "properties": { - "comment": { - "type": "string", - }, - "executeAt": { - "type": "string", - "format": "datetime", - }, - "executeAfter": { - "type": "string", - "format": "datetime", - }, - "executeUntil": { - "type": "string", - "format": "datetime", - }, - }, - }, - "cancelScheduledTakedownEvent": { - "type": "object", - "description": - "Logs cancellation of a scheduled takedown action for an account.", - "properties": { - "comment": { - "type": "string", - }, - }, - }, - "repoView": { - "type": "object", - "required": [ - "did", - "handle", - "relatedRecords", - "indexedAt", - "moderation", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "handle": { - "type": "string", - "format": "handle", - }, - "email": { - "type": "string", - }, - "relatedRecords": { - "type": "array", - "items": { - "type": "unknown", - }, - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "moderation": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#moderation", - }, - "invitedBy": { - "type": "ref", - "ref": "lex:com.atproto.server.defs#inviteCode", - }, - "invitesDisabled": { - "type": "boolean", - }, - "inviteNote": { - "type": "string", - }, - "deactivatedAt": { - "type": "string", - "format": "datetime", - }, - "threatSignatures": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.admin.defs#threatSignature", - }, - }, - }, - }, - "repoViewDetail": { - "type": "object", - "required": [ - "did", - "handle", - "relatedRecords", - "indexedAt", - "moderation", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "handle": { - "type": "string", - "format": "handle", - }, - "email": { - "type": "string", - }, - "relatedRecords": { - "type": "array", - "items": { - "type": "unknown", - }, - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "moderation": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#moderationDetail", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "invitedBy": { - "type": "ref", - "ref": "lex:com.atproto.server.defs#inviteCode", - }, - "invites": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.server.defs#inviteCode", - }, - }, - "invitesDisabled": { - "type": "boolean", - }, - "inviteNote": { - "type": "string", - }, - "emailConfirmedAt": { - "type": "string", - "format": "datetime", - }, - "deactivatedAt": { - "type": "string", - "format": "datetime", - }, - "threatSignatures": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.admin.defs#threatSignature", - }, - }, - }, - }, - "repoViewNotFound": { - "type": "object", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - "recordView": { - "type": "object", - "required": [ - "uri", - "cid", - "value", - "blobCids", - "indexedAt", - "moderation", - "repo", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "value": { - "type": "unknown", - }, - "blobCids": { - "type": "array", - "items": { - "type": "string", - "format": "cid", - }, - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "moderation": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#moderation", - }, - "repo": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#repoView", - }, - }, - }, - "recordViewDetail": { - "type": "object", - "required": [ - "uri", - "cid", - "value", - "blobs", - "indexedAt", - "moderation", - "repo", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "value": { - "type": "unknown", - }, - "blobs": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#blobView", - }, - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "moderation": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#moderationDetail", - }, - "repo": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#repoView", - }, - }, - }, - "recordViewNotFound": { - "type": "object", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - }, - }, - "moderation": { - "type": "object", - "properties": { - "subjectStatus": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#subjectStatusView", - }, - }, - }, - "moderationDetail": { - "type": "object", - "properties": { - "subjectStatus": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#subjectStatusView", - }, - }, - }, - "blobView": { - "type": "object", - "required": [ - "cid", - "mimeType", - "size", - "createdAt", - ], - "properties": { - "cid": { - "type": "string", - "format": "cid", - }, - "mimeType": { - "type": "string", - }, - "size": { - "type": "integer", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "details": { - "type": "union", - "refs": [ - "lex:tools.ozone.moderation.defs#imageDetails", - "lex:tools.ozone.moderation.defs#videoDetails", - ], - }, - "moderation": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#moderation", - }, - }, - }, - "imageDetails": { - "type": "object", - "required": [ - "width", - "height", - ], - "properties": { - "width": { - "type": "integer", - }, - "height": { - "type": "integer", - }, - }, - }, - "videoDetails": { - "type": "object", - "required": [ - "width", - "height", - "length", - ], - "properties": { - "width": { - "type": "integer", - }, - "height": { - "type": "integer", - }, - "length": { - "type": "integer", - }, - }, - }, - "accountHosting": { - "type": "object", - "required": [ - "status", - ], - "properties": { - "status": { - "type": "string", - "knownValues": [ - "takendown", - "suspended", - "deleted", - "deactivated", - "unknown", - ], - }, - "updatedAt": { - "type": "string", - "format": "datetime", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "deletedAt": { - "type": "string", - "format": "datetime", - }, - "deactivatedAt": { - "type": "string", - "format": "datetime", - }, - "reactivatedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "recordHosting": { - "type": "object", - "required": [ - "status", - ], - "properties": { - "status": { - "type": "string", - "knownValues": [ - "deleted", - "unknown", - ], - }, - "updatedAt": { - "type": "string", - "format": "datetime", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "deletedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "reporterStats": { - "type": "object", - "required": [ - "did", - "accountReportCount", - "recordReportCount", - "reportedAccountCount", - "reportedRecordCount", - "takendownAccountCount", - "takendownRecordCount", - "labeledAccountCount", - "labeledRecordCount", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "accountReportCount": { - "type": "integer", - "description": - "The total number of reports made by the user on accounts.", - }, - "recordReportCount": { - "type": "integer", - "description": - "The total number of reports made by the user on records.", - }, - "reportedAccountCount": { - "type": "integer", - "description": "The total number of accounts reported by the user.", - }, - "reportedRecordCount": { - "type": "integer", - "description": "The total number of records reported by the user.", - }, - "takendownAccountCount": { - "type": "integer", - "description": - "The total number of accounts taken down as a result of the user's reports.", - }, - "takendownRecordCount": { - "type": "integer", - "description": - "The total number of records taken down as a result of the user's reports.", - }, - "labeledAccountCount": { - "type": "integer", - "description": - "The total number of accounts labeled as a result of the user's reports.", - }, - "labeledRecordCount": { - "type": "integer", - "description": - "The total number of records labeled as a result of the user's reports.", - }, - }, - }, - "modTool": { - "type": "object", - "description": - "Moderation tool information for tracing the source of the action", - "required": [ - "name", - ], - "properties": { - "name": { - "type": "string", - "description": - "Name/identifier of the source (e.g., 'automod', 'ozone/workspace')", - }, - "meta": { - "type": "unknown", - "description": "Additional arbitrary metadata about the source", - }, - }, - }, - "timelineEventPlcCreate": { - "type": "token", - "description": - "Moderation event timeline event for a PLC create operation", - }, - "timelineEventPlcOperation": { - "type": "token", - "description": - "Moderation event timeline event for generic PLC operation", - }, - "timelineEventPlcTombstone": { - "type": "token", - "description": - "Moderation event timeline event for a PLC tombstone operation", - }, - "scheduledActionView": { - "type": "object", - "description": "View of a scheduled moderation action", - "required": [ - "id", - "action", - "did", - "createdBy", - "createdAt", - "status", - ], - "properties": { - "id": { - "type": "integer", - "description": "Auto-incrementing row ID", - }, - "action": { - "type": "string", - "knownValues": [ - "takedown", - ], - "description": "Type of action to be executed", - }, - "eventData": { - "type": "unknown", - "description": - "Serialized event object that will be propagated to the event when performed", - }, - "did": { - "type": "string", - "format": "did", - "description": "Subject DID for the action", - }, - "executeAt": { - "type": "string", - "format": "datetime", - "description": "Exact time to execute the action", - }, - "executeAfter": { - "type": "string", - "format": "datetime", - "description": - "Earliest time to execute the action (for randomized scheduling)", - }, - "executeUntil": { - "type": "string", - "format": "datetime", - "description": - "Latest time to execute the action (for randomized scheduling)", - }, - "randomizeExecution": { - "type": "boolean", - "description": - "Whether execution time should be randomized within the specified range", - }, - "createdBy": { - "type": "string", - "format": "did", - "description": "DID of the user who created this scheduled action", - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": "When the scheduled action was created", - }, - "updatedAt": { - "type": "string", - "format": "datetime", - "description": "When the scheduled action was last updated", - }, - "status": { - "type": "string", - "knownValues": [ - "pending", - "executed", - "cancelled", - "failed", - ], - "description": "Current status of the scheduled action", - }, - "lastExecutedAt": { - "type": "string", - "format": "datetime", - "description": "When the action was last attempted to be executed", - }, - "lastFailureReason": { - "type": "string", - "description": "Reason for the last execution failure", - }, - "executionEventId": { - "type": "integer", - "description": - "ID of the moderation event created when action was successfully executed", - }, - }, - }, - }, - }, - "ToolsOzoneModerationGetSubjects": { - "lexicon": 1, - "id": "tools.ozone.moderation.getSubjects", - "defs": { - "main": { - "type": "query", - "description": "Get details about subjects.", - "parameters": { - "type": "params", - "required": [ - "subjects", - ], - "properties": { - "subjects": { - "type": "array", - "maxLength": 100, - "minLength": 1, - "items": { - "type": "string", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subjects", - ], - "properties": { - "subjects": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#subjectView", - }, - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneModerationGetRecords": { - "lexicon": 1, - "id": "tools.ozone.moderation.getRecords", - "defs": { - "main": { - "type": "query", - "description": "Get details about some records.", - "parameters": { - "type": "params", - "required": [ - "uris", - ], - "properties": { - "uris": { - "type": "array", - "maxLength": 100, - "items": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "records", - ], - "properties": { - "records": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:tools.ozone.moderation.defs#recordViewDetail", - "lex:tools.ozone.moderation.defs#recordViewNotFound", - ], - }, - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneModerationScheduleAction": { - "lexicon": 1, - "id": "tools.ozone.moderation.scheduleAction", - "defs": { - "main": { - "type": "procedure", - "description": - "Schedule a moderation action to be executed at a future time", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "action", - "subjects", - "createdBy", - "scheduling", - ], - "properties": { - "action": { - "type": "union", - "refs": [ - "lex:tools.ozone.moderation.scheduleAction#takedown", - ], - }, - "subjects": { - "type": "array", - "maxLength": 100, - "items": { - "type": "string", - "format": "did", - }, - "description": - "Array of DID subjects to schedule the action for", - }, - "createdBy": { - "type": "string", - "format": "did", - }, - "scheduling": { - "type": "ref", - "ref": - "lex:tools.ozone.moderation.scheduleAction#schedulingConfig", - }, - "modTool": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#modTool", - "description": - "This will be propagated to the moderation event when it is applied", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": - "lex:tools.ozone.moderation.scheduleAction#scheduledActionResults", - }, - }, - }, - "takedown": { - "type": "object", - "description": "Schedule a takedown action", - "properties": { - "comment": { - "type": "string", - }, - "durationInHours": { - "type": "integer", - "description": - "Indicates how long the takedown should be in effect before automatically expiring.", - }, - "acknowledgeAccountSubjects": { - "type": "boolean", - "description": - "If true, all other reports on content authored by this account will be resolved (acknowledged).", - }, - "policies": { - "type": "array", - "maxLength": 5, - "items": { - "type": "string", - }, - "description": - "Names/Keywords of the policies that drove the decision.", - }, - "severityLevel": { - "type": "string", - "description": - "Severity level of the violation (e.g., 'sev-0', 'sev-1', 'sev-2', etc.).", - }, - "strikeCount": { - "type": "integer", - "description": - "Number of strikes to assign to the user when takedown is applied.", - }, - "strikeExpiresAt": { - "type": "string", - "format": "datetime", - "description": - "When the strike should expire. If not provided, the strike never expires.", - }, - "emailContent": { - "type": "string", - "description": - "Email content to be sent to the user upon takedown.", - }, - "emailSubject": { - "type": "string", - "description": - "Subject of the email to be sent to the user upon takedown.", - }, - }, - }, - "schedulingConfig": { - "type": "object", - "description": "Configuration for when the action should be executed", - "properties": { - "executeAt": { - "type": "string", - "format": "datetime", - "description": "Exact time to execute the action", - }, - "executeAfter": { - "type": "string", - "format": "datetime", - "description": - "Earliest time to execute the action (for randomized scheduling)", - }, - "executeUntil": { - "type": "string", - "format": "datetime", - "description": - "Latest time to execute the action (for randomized scheduling)", - }, - }, - }, - "scheduledActionResults": { - "type": "object", - "required": [ - "succeeded", - "failed", - ], - "properties": { - "succeeded": { - "type": "array", - "items": { - "type": "string", - "format": "did", - }, - }, - "failed": { - "type": "array", - "items": { - "type": "ref", - "ref": - "lex:tools.ozone.moderation.scheduleAction#failedScheduling", - }, - }, - }, - }, - "failedScheduling": { - "type": "object", - "required": [ - "subject", - "error", - ], - "properties": { - "subject": { - "type": "string", - "format": "did", - }, - "error": { - "type": "string", - }, - "errorCode": { - "type": "string", - }, - }, - }, - }, - }, - "ToolsOzoneModerationGetEvent": { - "lexicon": 1, - "id": "tools.ozone.moderation.getEvent", - "defs": { - "main": { - "type": "query", - "description": "Get details about a moderation event.", - "parameters": { - "type": "params", - "required": [ - "id", - ], - "properties": { - "id": { - "type": "integer", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#modEventViewDetail", - }, - }, - }, - }, - }, - "ToolsOzoneModerationQueryEvents": { - "lexicon": 1, - "id": "tools.ozone.moderation.queryEvents", - "defs": { - "main": { - "type": "query", - "description": "List moderation events related to a subject.", - "parameters": { - "type": "params", - "properties": { - "types": { - "type": "array", - "items": { - "type": "string", - }, - "description": - "The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent) to filter by. If not specified, all events are returned.", - }, - "createdBy": { - "type": "string", - "format": "did", - }, - "sortDirection": { - "type": "string", - "default": "desc", - "enum": [ - "asc", - "desc", - ], - "description": - "Sort direction for the events. Defaults to descending order of created at timestamp.", - }, - "createdAfter": { - "type": "string", - "format": "datetime", - "description": "Retrieve events created after a given timestamp", - }, - "createdBefore": { - "type": "string", - "format": "datetime", - "description": "Retrieve events created before a given timestamp", - }, - "subject": { - "type": "string", - "format": "uri", - }, - "collections": { - "type": "array", - "maxLength": 20, - "description": - "If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.", - "items": { - "type": "string", - "format": "nsid", - }, - }, - "subjectType": { - "type": "string", - "description": - "If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.", - "knownValues": [ - "account", - "record", - ], - }, - "includeAllUserRecords": { - "type": "boolean", - "default": false, - "description": - "If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "hasComment": { - "type": "boolean", - "description": "If true, only events with comments are returned", - }, - "comment": { - "type": "string", - "description": - "If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition.", - }, - "addedLabels": { - "type": "array", - "items": { - "type": "string", - }, - "description": - "If specified, only events where all of these labels were added are returned", - }, - "removedLabels": { - "type": "array", - "items": { - "type": "string", - }, - "description": - "If specified, only events where all of these labels were removed are returned", - }, - "addedTags": { - "type": "array", - "items": { - "type": "string", - }, - "description": - "If specified, only events where all of these tags were added are returned", - }, - "removedTags": { - "type": "array", - "items": { - "type": "string", - }, - "description": - "If specified, only events where all of these tags were removed are returned", - }, - "reportTypes": { - "type": "array", - "items": { - "type": "string", - }, - }, - "policies": { - "type": "array", - "items": { - "type": "string", - "description": - "If specified, only events where the action policies match any of the given policies are returned", - }, - }, - "modTool": { - "type": "array", - "items": { - "type": "string", - }, - "description": - "If specified, only events where the modTool name matches any of the given values are returned", - }, - "batchId": { - "type": "string", - "description": - "If specified, only events where the batchId matches the given value are returned", - }, - "ageAssuranceState": { - "type": "string", - "description": - "If specified, only events where the age assurance state matches the given value are returned", - "knownValues": [ - "pending", - "assured", - "unknown", - "reset", - "blocked", - ], - }, - "withStrike": { - "type": "boolean", - "description": - "If specified, only events where strikeCount value is set are returned.", - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "events", - ], - "properties": { - "cursor": { - "type": "string", - }, - "events": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#modEventView", - }, - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneModerationGetRecord": { - "lexicon": 1, - "id": "tools.ozone.moderation.getRecord", - "defs": { - "main": { - "type": "query", - "description": "Get details about a record.", - "parameters": { - "type": "params", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#recordViewDetail", - }, - }, - "errors": [ - { - "name": "RecordNotFound", - }, - ], - }, - }, - }, - "ToolsOzoneModerationEmitEvent": { - "lexicon": 1, - "id": "tools.ozone.moderation.emitEvent", - "defs": { - "main": { - "type": "procedure", - "description": "Take a moderation action on an actor.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "event", - "subject", - "createdBy", - ], - "properties": { - "event": { - "type": "union", - "refs": [ - "lex:tools.ozone.moderation.defs#modEventTakedown", - "lex:tools.ozone.moderation.defs#modEventAcknowledge", - "lex:tools.ozone.moderation.defs#modEventEscalate", - "lex:tools.ozone.moderation.defs#modEventComment", - "lex:tools.ozone.moderation.defs#modEventLabel", - "lex:tools.ozone.moderation.defs#modEventReport", - "lex:tools.ozone.moderation.defs#modEventMute", - "lex:tools.ozone.moderation.defs#modEventUnmute", - "lex:tools.ozone.moderation.defs#modEventMuteReporter", - "lex:tools.ozone.moderation.defs#modEventUnmuteReporter", - "lex:tools.ozone.moderation.defs#modEventReverseTakedown", - "lex:tools.ozone.moderation.defs#modEventResolveAppeal", - "lex:tools.ozone.moderation.defs#modEventEmail", - "lex:tools.ozone.moderation.defs#modEventDivert", - "lex:tools.ozone.moderation.defs#modEventTag", - "lex:tools.ozone.moderation.defs#accountEvent", - "lex:tools.ozone.moderation.defs#identityEvent", - "lex:tools.ozone.moderation.defs#recordEvent", - "lex:tools.ozone.moderation.defs#modEventPriorityScore", - "lex:tools.ozone.moderation.defs#ageAssuranceEvent", - "lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent", - "lex:tools.ozone.moderation.defs#ageAssurancePurgeEvent", - "lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent", - "lex:tools.ozone.moderation.defs#scheduleTakedownEvent", - "lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent", - ], - }, - "subject": { - "type": "union", - "refs": [ - "lex:com.atproto.admin.defs#repoRef", - "lex:com.atproto.repo.strongRef", - ], - }, - "subjectBlobCids": { - "type": "array", - "items": { - "type": "string", - "format": "cid", - }, - }, - "createdBy": { - "type": "string", - "format": "did", - }, - "modTool": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#modTool", - }, - "externalId": { - "type": "string", - "description": - "An optional external ID for the event, used to deduplicate events from external systems. Fails when an event of same type with the same external ID exists for the same subject.", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#modEventView", - }, - }, - "errors": [ - { - "name": "SubjectHasAction", - }, - { - "name": "DuplicateExternalId", - "description": - "An event with the same external ID already exists for the subject.", - }, - ], - }, - }, - }, - "ToolsOzoneModerationSearchRepos": { - "lexicon": 1, - "id": "tools.ozone.moderation.searchRepos", - "defs": { - "main": { - "type": "query", - "description": "Find repositories based on a search term.", - "parameters": { - "type": "params", - "properties": { - "term": { - "type": "string", - "description": "DEPRECATED: use 'q' instead", - }, - "q": { - "type": "string", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "repos", - ], - "properties": { - "cursor": { - "type": "string", - }, - "repos": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:tools.ozone.moderation.defs#repoView", - }, - }, - }, - }, - }, - }, - }, - }, - "ToolsOzoneModerationGetAccountTimeline": { - "lexicon": 1, - "id": "tools.ozone.moderation.getAccountTimeline", - "defs": { - "main": { - "type": "query", - "description": - "Get timeline of all available events of an account. This includes moderation events, account history and did history.", - "parameters": { - "type": "params", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "timeline", - ], - "properties": { - "timeline": { - "type": "array", - "items": { - "type": "ref", - "ref": - "lex:tools.ozone.moderation.getAccountTimeline#timelineItem", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "RepoNotFound", - }, - ], - }, - "timelineItem": { - "type": "object", - "required": [ - "day", - "summary", - ], - "properties": { - "day": { - "type": "string", - }, - "summary": { - "type": "array", - "items": { - "type": "ref", - "ref": - "lex:tools.ozone.moderation.getAccountTimeline#timelineItemSummary", - }, - }, - }, - }, - "timelineItemSummary": { - "type": "object", - "required": [ - "eventSubjectType", - "eventType", - "count", - ], - "properties": { - "eventSubjectType": { - "type": "string", - "knownValues": [ - "account", - "record", - "chat", - ], - }, - "eventType": { - "type": "string", - "knownValues": [ - "tools.ozone.moderation.defs#modEventTakedown", - "tools.ozone.moderation.defs#modEventReverseTakedown", - "tools.ozone.moderation.defs#modEventComment", - "tools.ozone.moderation.defs#modEventReport", - "tools.ozone.moderation.defs#modEventLabel", - "tools.ozone.moderation.defs#modEventAcknowledge", - "tools.ozone.moderation.defs#modEventEscalate", - "tools.ozone.moderation.defs#modEventMute", - "tools.ozone.moderation.defs#modEventUnmute", - "tools.ozone.moderation.defs#modEventMuteReporter", - "tools.ozone.moderation.defs#modEventUnmuteReporter", - "tools.ozone.moderation.defs#modEventEmail", - "tools.ozone.moderation.defs#modEventResolveAppeal", - "tools.ozone.moderation.defs#modEventDivert", - "tools.ozone.moderation.defs#modEventTag", - "tools.ozone.moderation.defs#accountEvent", - "tools.ozone.moderation.defs#identityEvent", - "tools.ozone.moderation.defs#recordEvent", - "tools.ozone.moderation.defs#modEventPriorityScore", - "tools.ozone.moderation.defs#revokeAccountCredentialsEvent", - "tools.ozone.moderation.defs#ageAssuranceEvent", - "tools.ozone.moderation.defs#ageAssuranceOverrideEvent", - "tools.ozone.moderation.defs#timelineEventPlcCreate", - "tools.ozone.moderation.defs#timelineEventPlcOperation", - "tools.ozone.moderation.defs#timelineEventPlcTombstone", - "tools.ozone.hosting.getAccountHistory#accountCreated", - "tools.ozone.hosting.getAccountHistory#emailConfirmed", - "tools.ozone.hosting.getAccountHistory#passwordUpdated", - "tools.ozone.hosting.getAccountHistory#handleUpdated", - "tools.ozone.moderation.defs#scheduleTakedownEvent", - "tools.ozone.moderation.defs#cancelScheduledTakedownEvent", - ], - }, - "count": { - "type": "integer", - }, - }, - }, - }, - }, - "ToolsOzoneModerationGetRepos": { - "lexicon": 1, - "id": "tools.ozone.moderation.getRepos", - "defs": { - "main": { - "type": "query", - "description": "Get details about some repositories.", - "parameters": { - "type": "params", - "required": [ - "dids", - ], - "properties": { - "dids": { - "type": "array", - "maxLength": 100, - "items": { - "type": "string", - "format": "did", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "repos", - ], - "properties": { - "repos": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:tools.ozone.moderation.defs#repoViewDetail", - "lex:tools.ozone.moderation.defs#repoViewNotFound", - ], - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyDraftDefs": { - "lexicon": 1, - "id": "app.bsky.draft.defs", - "defs": { - "draftWithId": { - "description": - "A draft with an identifier, used to store drafts in private storage (stash).", - "type": "object", - "required": [ - "id", - "draft", - ], - "properties": { - "id": { - "description": "A TID to be used as a draft identifier.", - "type": "string", - "format": "tid", - }, - "draft": { - "type": "ref", - "ref": "lex:app.bsky.draft.defs#draft", - }, - }, - }, - "draft": { - "description": "A draft containing an array of draft posts.", - "type": "object", - "required": [ - "posts", - ], - "properties": { - "deviceId": { - "type": "string", - "description": - "UUIDv4 identifier of the device that created this draft.", - "maxLength": 100, - }, - "deviceName": { - "type": "string", - "description": - "The device and/or platform on which the draft was created.", - "maxLength": 100, - }, - "posts": { - "description": "Array of draft posts that compose this draft.", - "type": "array", - "minLength": 1, - "maxLength": 100, - "items": { - "type": "ref", - "ref": "lex:app.bsky.draft.defs#draftPost", - }, - }, - "langs": { - "type": "array", - "description": - "Indicates human language of posts primary text content.", - "maxLength": 3, - "items": { - "type": "string", - "format": "language", - }, - }, - "postgateEmbeddingRules": { - "description": - "Embedding rules for the postgates to be created when this draft is published.", - "type": "array", - "maxLength": 5, - "items": { - "type": "union", - "refs": [ - "lex:app.bsky.feed.postgate#disableRule", - ], - }, - }, - "threadgateAllow": { - "description": - "Allow-rules for the threadgate to be created when this draft is published.", - "type": "array", - "maxLength": 5, - "items": { - "type": "union", - "refs": [ - "lex:app.bsky.feed.threadgate#mentionRule", - "lex:app.bsky.feed.threadgate#followerRule", - "lex:app.bsky.feed.threadgate#followingRule", - "lex:app.bsky.feed.threadgate#listRule", - ], - }, - }, - }, - }, - "draftPost": { - "description": "One of the posts that compose a draft.", - "type": "object", - "required": [ - "text", - ], - "properties": { - "text": { - "type": "string", - "maxLength": 10000, - "maxGraphemes": 1000, - "description": - "The primary post content. It has a higher limit than post contents to allow storing a larger text that can later be refined into smaller posts.", - }, - "labels": { - "type": "union", - "description": - "Self-label values for this post. Effectively content warnings.", - "refs": [ - "lex:com.atproto.label.defs#selfLabels", - ], - }, - "embedImages": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.draft.defs#draftEmbedImage", - }, - "maxLength": 4, - }, - "embedVideos": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.draft.defs#draftEmbedVideo", - }, - "maxLength": 1, - }, - "embedExternals": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.draft.defs#draftEmbedExternal", - }, - "maxLength": 1, - }, - "embedRecords": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.draft.defs#draftEmbedRecord", - }, - "maxLength": 1, - }, - }, - }, - "draftView": { - "description": "View to present drafts data to users.", - "type": "object", - "required": [ - "id", - "draft", - "createdAt", - "updatedAt", - ], - "properties": { - "id": { - "description": "A TID to be used as a draft identifier.", - "type": "string", - "format": "tid", - }, - "draft": { - "type": "ref", - "ref": "lex:app.bsky.draft.defs#draft", - }, - "createdAt": { - "description": "The time the draft was created.", - "type": "string", - "format": "datetime", - }, - "updatedAt": { - "description": "The time the draft was last updated.", - "type": "string", - "format": "datetime", - }, - }, - }, - "draftEmbedLocalRef": { - "type": "object", - "required": [ - "path", - ], - "properties": { - "path": { - "type": "string", - "description": - "Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts.", - "minLength": 1, - "maxLength": 1024, - }, - }, - }, - "draftEmbedCaption": { - "type": "object", - "required": [ - "lang", - "content", - ], - "properties": { - "lang": { - "type": "string", - "format": "language", - }, - "content": { - "type": "string", - "maxLength": 10000, - }, - }, - }, - "draftEmbedImage": { - "type": "object", - "required": [ - "localRef", - ], - "properties": { - "localRef": { - "type": "ref", - "ref": "lex:app.bsky.draft.defs#draftEmbedLocalRef", - }, - "alt": { - "type": "string", - "maxGraphemes": 2000, - }, - }, - }, - "draftEmbedVideo": { - "type": "object", - "required": [ - "localRef", - ], - "properties": { - "localRef": { - "type": "ref", - "ref": "lex:app.bsky.draft.defs#draftEmbedLocalRef", - }, - "alt": { - "type": "string", - "maxGraphemes": 2000, - }, - "captions": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.draft.defs#draftEmbedCaption", - }, - "maxLength": 20, - }, - }, - }, - "draftEmbedExternal": { - "type": "object", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "uri", - }, - }, - }, - "draftEmbedRecord": { - "type": "object", - "required": [ - "record", - ], - "properties": { - "record": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - }, - }, - }, - }, - "AppBskyDraftCreateDraft": { - "lexicon": 1, - "id": "app.bsky.draft.createDraft", - "defs": { - "main": { - "type": "procedure", - "description": - "Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "draft", - ], - "properties": { - "draft": { - "type": "ref", - "ref": "lex:app.bsky.draft.defs#draft", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "id", - ], - "properties": { - "id": { - "type": "string", - "description": "The ID of the created draft.", - }, - }, - }, - }, - "errors": [ - { - "name": "DraftLimitReached", - "description": - "Trying to insert a new draft when the limit was already reached.", - }, - ], - }, - }, - }, - "AppBskyDraftUpdateDraft": { - "lexicon": 1, - "id": "app.bsky.draft.updateDraft", - "defs": { - "main": { - "type": "procedure", - "description": - "Updates a draft using private storage (stash). If the draft ID points to a non-existing ID, the update will be silently ignored. This is done because updates don't enforce draft limit, so it accepts all writes, but will ignore invalid ones. Requires authentication.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "draft", - ], - "properties": { - "draft": { - "type": "ref", - "ref": "lex:app.bsky.draft.defs#draftWithId", - }, - }, - }, - }, - }, - }, - }, - "AppBskyDraftGetDrafts": { - "lexicon": 1, - "id": "app.bsky.draft.getDrafts", - "defs": { - "main": { - "type": "query", - "description": "Gets views of user drafts. Requires authentication.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "drafts", - ], - "properties": { - "cursor": { - "type": "string", - }, - "drafts": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.draft.defs#draftView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyDraftDeleteDraft": { - "lexicon": 1, - "id": "app.bsky.draft.deleteDraft", - "defs": { - "main": { - "type": "procedure", - "description": "Deletes a draft by ID. Requires authentication.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "id", - ], - "properties": { - "id": { - "type": "string", - "format": "tid", - }, - }, - }, - }, - }, - }, - }, - "AppBskyAuthManageLabelerService": { - "lexicon": 1, - "id": "app.bsky.authManageLabelerService", - "defs": { - "main": { - "type": "permission-set", - "title": "Manage Hosted Labeling Service", - "title:lang": {}, - "detail": "Configure labeler declaration records.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "repo", - "action": [ - "create", - "update", - "delete", - ], - "collection": [ - "app.bsky.labeler.service", - ], - }, - ], - }, - }, - }, - "AppBskyVideoUploadVideo": { - "lexicon": 1, - "id": "app.bsky.video.uploadVideo", - "defs": { - "main": { - "type": "procedure", - "description": "Upload a video to be processed then stored on the PDS.", - "input": { - "encoding": "video/mp4", - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "jobStatus", - ], - "properties": { - "jobStatus": { - "type": "ref", - "ref": "lex:app.bsky.video.defs#jobStatus", - }, - }, - }, - }, - }, - }, - }, - "AppBskyVideoDefs": { - "lexicon": 1, - "id": "app.bsky.video.defs", - "defs": { - "jobStatus": { - "type": "object", - "required": [ - "jobId", - "did", - "state", - ], - "properties": { - "jobId": { - "type": "string", - }, - "did": { - "type": "string", - "format": "did", - }, - "state": { - "type": "string", - "description": - "The state of the video processing job. All values not listed as a known value indicate that the job is in process.", - "knownValues": [ - "JOB_STATE_COMPLETED", - "JOB_STATE_FAILED", - ], - }, - "progress": { - "type": "integer", - "minimum": 0, - "maximum": 100, - "description": "Progress within the current processing state.", - }, - "blob": { - "type": "blob", - }, - "error": { - "type": "string", - }, - "message": { - "type": "string", - }, - }, - }, - }, - }, - "AppBskyVideoGetJobStatus": { - "lexicon": 1, - "id": "app.bsky.video.getJobStatus", - "defs": { - "main": { - "type": "query", - "description": "Get status details for a video processing job.", - "parameters": { - "type": "params", - "required": [ - "jobId", - ], - "properties": { - "jobId": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "jobStatus", - ], - "properties": { - "jobStatus": { - "type": "ref", - "ref": "lex:app.bsky.video.defs#jobStatus", - }, - }, - }, - }, - }, - }, - }, - "AppBskyVideoGetUploadLimits": { - "lexicon": 1, - "id": "app.bsky.video.getUploadLimits", - "defs": { - "main": { - "type": "query", - "description": "Get video upload limits for the authenticated user.", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "canUpload", - ], - "properties": { - "canUpload": { - "type": "boolean", - }, - "remainingDailyVideos": { - "type": "integer", - }, - "remainingDailyBytes": { - "type": "integer", - }, - "message": { - "type": "string", - }, - "error": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "AppBskyContactDefs": { - "lexicon": 1, - "id": "app.bsky.contact.defs", - "defs": { - "matchAndContactIndex": { - "description": - "Associates a profile with the positional index of the contact import input in the call to `app.bsky.contact.importContacts`, so clients can know which phone caused a particular match.", - "type": "object", - "required": [ - "match", - "contactIndex", - ], - "properties": { - "match": { - "description": "Profile of the matched user.", - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - "contactIndex": { - "description": - "The index of this match in the import contact input.", - "type": "integer", - "minimum": 0, - "maximum": 999, - }, - }, - }, - "syncStatus": { - "type": "object", - "required": [ - "syncedAt", - "matchesCount", - ], - "properties": { - "syncedAt": { - "description": "Last date when contacts where imported.", - "type": "string", - "format": "datetime", - }, - "matchesCount": { - "description": - "Number of existing contact matches resulting of the user imports and of their imported contacts having imported the user. Matches stop being counted when the user either follows the matched contact or dismisses the match.", - "type": "integer", - "minimum": 0, - }, - }, - }, - "notification": { - "description": - "A stash object to be sent via bsync representing a notification to be created.", - "type": "object", - "required": [ - "from", - "to", - ], - "properties": { - "from": { - "description": "The DID of who this notification comes from.", - "type": "string", - "format": "did", - }, - "to": { - "description": "The DID of who this notification should go to.", - "type": "string", - "format": "did", - }, - }, - }, - }, - }, - "AppBskyContactSendNotification": { - "lexicon": 1, - "id": "app.bsky.contact.sendNotification", - "defs": { - "main": { - "type": "procedure", - "description": - "System endpoint to send notifications related to contact imports. Requires role authentication.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "from", - "to", - ], - "properties": { - "from": { - "description": "The DID of who this notification comes from.", - "type": "string", - "format": "did", - }, - "to": { - "description": "The DID of who this notification should go to.", - "type": "string", - "format": "did", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": {}, - }, - }, - }, - }, - }, - "AppBskyContactGetSyncStatus": { - "lexicon": 1, - "id": "app.bsky.contact.getSyncStatus", - "defs": { - "main": { - "type": "query", - "description": - "Gets the user's current contact import status. Requires authentication.", - "parameters": { - "type": "params", - "properties": {}, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "syncStatus": { - "description": - "If present, indicates the user has imported their contacts. If not present, indicates the user never used the feature or called `app.bsky.contact.removeData` and didn't import again since.", - "type": "ref", - "ref": "lex:app.bsky.contact.defs#syncStatus", - }, - }, - }, - }, - "errors": [ - { - "name": "InvalidDid", - }, - { - "name": "InternalError", - }, - ], - }, - }, - }, - "AppBskyContactStartPhoneVerification": { - "lexicon": 1, - "id": "app.bsky.contact.startPhoneVerification", - "defs": { - "main": { - "type": "procedure", - "description": - "Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "phone", - ], - "properties": { - "phone": { - "description": "The phone number to receive the code via SMS.", - "type": "string", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": {}, - }, - }, - "errors": [ - { - "name": "RateLimitExceeded", - }, - { - "name": "InvalidDid", - }, - { - "name": "InvalidPhone", - }, - { - "name": "InternalError", - }, - ], - }, - }, - }, - "AppBskyContactGetMatches": { - "lexicon": 1, - "id": "app.bsky.contact.getMatches", - "defs": { - "main": { - "type": "query", - "description": - "Returns the matched contacts (contacts that were mutually imported). Excludes dismissed matches. Requires authentication.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "matches", - ], - "properties": { - "cursor": { - "type": "string", - }, - "matches": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "InvalidDid", - }, - { - "name": "InvalidLimit", - }, - { - "name": "InvalidCursor", - }, - { - "name": "InternalError", - }, - ], - }, - }, - }, - "AppBskyContactImportContacts": { - "lexicon": 1, - "id": "app.bsky.contact.importContacts", - "defs": { - "main": { - "type": "procedure", - "description": - "Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "token", - "contacts", - ], - "properties": { - "token": { - "description": - "JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`.", - "type": "string", - }, - "contacts": { - "description": - "List of phone numbers in global E.164 format (e.g., '+12125550123'). Phone numbers that cannot be normalized into a valid phone number will be discarded. Should not repeat the 'phone' input used in `app.bsky.contact.verifyPhone`.", - "type": "array", - "items": { - "type": "string", - }, - "minLength": 1, - "maxLength": 1000, - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "matchesAndContactIndexes", - ], - "properties": { - "matchesAndContactIndexes": { - "description": - "The users that matched during import and their indexes on the input contacts, so the client can correlate with its local list.", - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.contact.defs#matchAndContactIndex", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "InvalidDid", - }, - { - "name": "InvalidContacts", - }, - { - "name": "TooManyContacts", - }, - { - "name": "InvalidToken", - }, - { - "name": "InternalError", - }, - ], - }, - }, - }, - "AppBskyContactDismissMatch": { - "lexicon": 1, - "id": "app.bsky.contact.dismissMatch", - "defs": { - "main": { - "type": "procedure", - "description": - "Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subject", - ], - "properties": { - "subject": { - "description": "The subject's DID to dismiss the match with.", - "type": "string", - "format": "did", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": {}, - }, - }, - "errors": [ - { - "name": "InvalidDid", - }, - { - "name": "InternalError", - }, - ], - }, - }, - }, - "AppBskyContactRemoveData": { - "lexicon": 1, - "id": "app.bsky.contact.removeData", - "defs": { - "main": { - "type": "procedure", - "description": - "Removes all stored hashes used for contact matching, existing matches, and sync status. Requires authentication.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": {}, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": {}, - }, - }, - "errors": [ - { - "name": "InvalidDid", - }, - { - "name": "InternalError", - }, - ], - }, - }, - }, - "AppBskyContactVerifyPhone": { - "lexicon": 1, - "id": "app.bsky.contact.verifyPhone", - "defs": { - "main": { - "type": "procedure", - "description": - "Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "phone", - "code", - ], - "properties": { - "phone": { - "description": - "The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`.", - "type": "string", - }, - "code": { - "description": - "The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`.", - "type": "string", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "token", - ], - "properties": { - "token": { - "description": - "JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call.", - "type": "string", - }, - }, - }, - }, - "errors": [ - { - "name": "RateLimitExceeded", - }, - { - "name": "InvalidDid", - }, - { - "name": "InvalidPhone", - }, - { - "name": "InvalidCode", - }, - { - "name": "InternalError", - }, - ], - }, - }, - }, - "AppBskyAuthManageNotifications": { - "lexicon": 1, - "id": "app.bsky.authManageNotifications", - "defs": { - "main": { - "type": "permission-set", - "title": "Manage Bluesky Notifications", - "title:lang": {}, - "detail": "View and configure notifications for the Bluesky app.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "rpc", - "inheritAud": true, - "lxm": [ - "app.bsky.notification.getPreferences", - "app.bsky.notification.getUnreadCount", - "app.bsky.notification.listActivitySubscriptions", - "app.bsky.notification.listNotifications", - "app.bsky.notification.putActivitySubscription", - "app.bsky.notification.putPreferences", - "app.bsky.notification.putPreferencesV2", - "app.bsky.notification.registerPush", - "app.bsky.notification.unregisterPush", - "app.bsky.notification.updateSeen", - ], - }, - ], - }, - }, - }, - "AppBskyBookmarkDefs": { - "lexicon": 1, - "id": "app.bsky.bookmark.defs", - "defs": { - "bookmark": { - "description": "Object used to store bookmark data in stash.", - "type": "object", - "required": [ - "subject", - ], - "properties": { - "subject": { - "description": - "A strong ref to the record to be bookmarked. Currently, only `app.bsky.feed.post` records are supported.", - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - }, - }, - "bookmarkView": { - "type": "object", - "required": [ - "subject", - "item", - ], - "properties": { - "subject": { - "description": "A strong ref to the bookmarked record.", - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "item": { - "type": "union", - "refs": [ - "lex:app.bsky.feed.defs#blockedPost", - "lex:app.bsky.feed.defs#notFoundPost", - "lex:app.bsky.feed.defs#postView", - ], - }, - }, - }, - }, - }, - "AppBskyBookmarkDeleteBookmark": { - "lexicon": 1, - "id": "app.bsky.bookmark.deleteBookmark", - "defs": { - "main": { - "type": "procedure", - "description": - "Deletes a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - "errors": [ - { - "name": "UnsupportedCollection", - "description": - "The URI to be bookmarked is for an unsupported collection.", - }, - ], - }, - }, - }, - "AppBskyBookmarkGetBookmarks": { - "lexicon": 1, - "id": "app.bsky.bookmark.getBookmarks", - "defs": { - "main": { - "type": "query", - "description": - "Gets views of records bookmarked by the authenticated user. Requires authentication.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "bookmarks", - ], - "properties": { - "cursor": { - "type": "string", - }, - "bookmarks": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.bookmark.defs#bookmarkView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyBookmarkCreateBookmark": { - "lexicon": 1, - "id": "app.bsky.bookmark.createBookmark", - "defs": { - "main": { - "type": "procedure", - "description": - "Creates a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "uri", - "cid", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - }, - }, - }, - "errors": [ - { - "name": "UnsupportedCollection", - "description": - "The URI to be bookmarked is for an unsupported collection.", - }, - ], - }, - }, - }, - "AppBskyEmbedDefs": { - "lexicon": 1, - "id": "app.bsky.embed.defs", - "defs": { - "aspectRatio": { - "type": "object", - "description": - "width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.", - "required": [ - "width", - "height", - ], - "properties": { - "width": { - "type": "integer", - "minimum": 1, - }, - "height": { - "type": "integer", - "minimum": 1, - }, - }, - }, - }, - }, - "AppBskyEmbedRecord": { - "lexicon": 1, - "id": "app.bsky.embed.record", - "description": - "A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.", - "defs": { - "main": { - "type": "object", - "required": [ - "record", - ], - "properties": { - "record": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - }, - }, - "view": { - "type": "object", - "required": [ - "record", - ], - "properties": { - "record": { - "type": "union", - "refs": [ - "lex:app.bsky.embed.record#viewRecord", - "lex:app.bsky.embed.record#viewNotFound", - "lex:app.bsky.embed.record#viewBlocked", - "lex:app.bsky.embed.record#viewDetached", - "lex:app.bsky.feed.defs#generatorView", - "lex:app.bsky.graph.defs#listView", - "lex:app.bsky.labeler.defs#labelerView", - "lex:app.bsky.graph.defs#starterPackViewBasic", - ], - }, - }, - }, - "viewRecord": { - "type": "object", - "required": [ - "uri", - "cid", - "author", - "value", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "author": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileViewBasic", - }, - "value": { - "type": "unknown", - "description": "The record data itself.", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "replyCount": { - "type": "integer", - }, - "repostCount": { - "type": "integer", - }, - "likeCount": { - "type": "integer", - }, - "quoteCount": { - "type": "integer", - }, - "embeds": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:app.bsky.embed.images#view", - "lex:app.bsky.embed.video#view", - "lex:app.bsky.embed.external#view", - "lex:app.bsky.embed.record#view", - "lex:app.bsky.embed.recordWithMedia#view", - ], - }, - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "viewNotFound": { - "type": "object", - "required": [ - "uri", - "notFound", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "notFound": { - "type": "boolean", - "const": true, - }, - }, - }, - "viewBlocked": { - "type": "object", - "required": [ - "uri", - "blocked", - "author", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "blocked": { - "type": "boolean", - "const": true, - }, - "author": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#blockedAuthor", - }, - }, - }, - "viewDetached": { - "type": "object", - "required": [ - "uri", - "detached", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "detached": { - "type": "boolean", - "const": true, - }, - }, - }, - }, - }, - "AppBskyEmbedImages": { - "lexicon": 1, - "id": "app.bsky.embed.images", - "description": "A set of images embedded in a Bluesky record (eg, a post).", - "defs": { - "main": { - "type": "object", - "required": [ - "images", - ], - "properties": { - "images": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.embed.images#image", - }, - "maxLength": 4, - }, - }, - }, - "image": { - "type": "object", - "required": [ - "image", - "alt", - ], - "properties": { - "image": { - "type": "blob", - "description": - "The raw image file. May be up to 2 MB, formerly limited to 1 MB.", - "accept": [ - "image/*", - ], - "maxSize": 2000000, - }, - "alt": { - "type": "string", - "description": - "Alt text description of the image, for accessibility.", - }, - "aspectRatio": { - "type": "ref", - "ref": "lex:app.bsky.embed.defs#aspectRatio", - }, - }, - }, - "view": { - "type": "object", - "required": [ - "images", - ], - "properties": { - "images": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.embed.images#viewImage", - }, - "maxLength": 4, - }, - }, - }, - "viewImage": { - "type": "object", - "required": [ - "thumb", - "fullsize", - "alt", - ], - "properties": { - "thumb": { - "type": "string", - "format": "uri", - "description": - "Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.", - }, - "fullsize": { - "type": "string", - "format": "uri", - "description": - "Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View.", - }, - "alt": { - "type": "string", - "description": - "Alt text description of the image, for accessibility.", - }, - "aspectRatio": { - "type": "ref", - "ref": "lex:app.bsky.embed.defs#aspectRatio", - }, - }, - }, - }, - }, - "AppBskyEmbedRecordWithMedia": { - "lexicon": 1, - "id": "app.bsky.embed.recordWithMedia", - "description": - "A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.", - "defs": { - "main": { - "type": "object", - "required": [ - "record", - "media", - ], - "properties": { - "record": { - "type": "ref", - "ref": "lex:app.bsky.embed.record", - }, - "media": { - "type": "union", - "refs": [ - "lex:app.bsky.embed.images", - "lex:app.bsky.embed.video", - "lex:app.bsky.embed.external", - ], - }, - }, - }, - "view": { - "type": "object", - "required": [ - "record", - "media", - ], - "properties": { - "record": { - "type": "ref", - "ref": "lex:app.bsky.embed.record#view", - }, - "media": { - "type": "union", - "refs": [ - "lex:app.bsky.embed.images#view", - "lex:app.bsky.embed.video#view", - "lex:app.bsky.embed.external#view", - ], - }, - }, - }, - }, - }, - "AppBskyEmbedVideo": { - "lexicon": 1, - "id": "app.bsky.embed.video", - "description": "A video embedded in a Bluesky record (eg, a post).", - "defs": { - "main": { - "type": "object", - "required": [ - "video", - ], - "properties": { - "video": { - "type": "blob", - "description": - "The mp4 video file. May be up to 100mb, formerly limited to 50mb.", - "accept": [ - "video/mp4", - ], - "maxSize": 100000000, - }, - "captions": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.embed.video#caption", - }, - "maxLength": 20, - }, - "alt": { - "type": "string", - "description": - "Alt text description of the video, for accessibility.", - "maxGraphemes": 1000, - "maxLength": 10000, - }, - "aspectRatio": { - "type": "ref", - "ref": "lex:app.bsky.embed.defs#aspectRatio", - }, - "presentation": { - "type": "string", - "description": - "A hint to the client about how to present the video.", - "knownValues": [ - "default", - "gif", - ], - }, - }, - }, - "caption": { - "type": "object", - "required": [ - "lang", - "file", - ], - "properties": { - "lang": { - "type": "string", - "format": "language", - }, - "file": { - "type": "blob", - "accept": [ - "text/vtt", - ], - "maxSize": 20000, - }, - }, - }, - "view": { - "type": "object", - "required": [ - "cid", - "playlist", - ], - "properties": { - "cid": { - "type": "string", - "format": "cid", - }, - "playlist": { - "type": "string", - "format": "uri", - }, - "thumbnail": { - "type": "string", - "format": "uri", - }, - "alt": { - "type": "string", - "maxGraphemes": 1000, - "maxLength": 10000, - }, - "aspectRatio": { - "type": "ref", - "ref": "lex:app.bsky.embed.defs#aspectRatio", - }, - "presentation": { - "type": "string", - "description": - "A hint to the client about how to present the video.", - "knownValues": [ - "default", - "gif", - ], - }, - }, - }, - }, - }, - "AppBskyEmbedExternal": { - "lexicon": 1, - "id": "app.bsky.embed.external", - "defs": { - "main": { - "type": "object", - "description": - "A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).", - "required": [ - "external", - ], - "properties": { - "external": { - "type": "ref", - "ref": "lex:app.bsky.embed.external#external", - }, - }, - }, - "external": { - "type": "object", - "required": [ - "uri", - "title", - "description", - ], - "properties": { - "uri": { - "type": "string", - "format": "uri", - }, - "title": { - "type": "string", - }, - "description": { - "type": "string", - }, - "thumb": { - "type": "blob", - "accept": [ - "image/*", - ], - "maxSize": 1000000, - }, - }, - }, - "view": { - "type": "object", - "required": [ - "external", - ], - "properties": { - "external": { - "type": "ref", - "ref": "lex:app.bsky.embed.external#viewExternal", - }, - }, - }, - "viewExternal": { - "type": "object", - "required": [ - "uri", - "title", - "description", - ], - "properties": { - "uri": { - "type": "string", - "format": "uri", - }, - "title": { - "type": "string", - }, - "description": { - "type": "string", - }, - "thumb": { - "type": "string", - "format": "uri", - }, - }, - }, - }, - }, - "AppBskyAuthDeleteContent": { - "lexicon": 1, - "id": "app.bsky.authDeleteContent", - "defs": { - "main": { - "type": "permission-set", - "title": "Delete Bluesky Content", - "title:lang": {}, - "detail": "Clean up public account history: posts, reposts, and likes.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "repo", - "action": [ - "delete", - ], - "collection": [ - "app.bsky.feed.like", - "app.bsky.feed.post", - "app.bsky.feed.postgate", - "app.bsky.feed.repost", - "app.bsky.feed.threadgate", - ], - }, - ], - }, - }, - }, - "AppBskyAuthCreatePosts": { - "lexicon": 1, - "id": "app.bsky.authCreatePosts", - "defs": { - "main": { - "type": "permission-set", - "title": "Create Bluesky Posts", - "title:lang": {}, - "detail": "Can not update or delete posts.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "rpc", - "inheritAud": true, - "lxm": [ - "app.bsky.video.uploadVideo", - "app.bsky.video.getJobStatus", - "app.bsky.video.getUploadLimits", - ], - }, - { - "type": "permission", - "resource": "repo", - "action": [ - "create", - ], - "collection": [ - "app.bsky.feed.post", - "app.bsky.feed.postgate", - "app.bsky.feed.threadgate", - ], - }, - ], - }, - }, - }, - "AppBskyNotificationDefs": { - "lexicon": 1, - "id": "app.bsky.notification.defs", - "defs": { - "recordDeleted": { - "type": "object", - "properties": {}, - }, - "chatPreference": { - "type": "object", - "required": [ - "include", - "push", - ], - "properties": { - "include": { - "type": "string", - "knownValues": [ - "all", - "accepted", - ], - }, - "push": { - "type": "boolean", - }, - }, - }, - "filterablePreference": { - "type": "object", - "required": [ - "include", - "list", - "push", - ], - "properties": { - "include": { - "type": "string", - "knownValues": [ - "all", - "follows", - ], - }, - "list": { - "type": "boolean", - }, - "push": { - "type": "boolean", - }, - }, - }, - "preference": { - "type": "object", - "required": [ - "list", - "push", - ], - "properties": { - "list": { - "type": "boolean", - }, - "push": { - "type": "boolean", - }, - }, - }, - "preferences": { - "type": "object", - "required": [ - "chat", - "follow", - "like", - "likeViaRepost", - "mention", - "quote", - "reply", - "repost", - "repostViaRepost", - "starterpackJoined", - "subscribedPost", - "unverified", - "verified", - ], - "properties": { - "chat": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#chatPreference", - }, - "follow": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "like": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "likeViaRepost": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "mention": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "quote": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "reply": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "repost": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "repostViaRepost": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "starterpackJoined": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#preference", - }, - "subscribedPost": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#preference", - }, - "unverified": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#preference", - }, - "verified": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#preference", - }, - }, - }, - "activitySubscription": { - "type": "object", - "required": [ - "post", - "reply", - ], - "properties": { - "post": { - "type": "boolean", - }, - "reply": { - "type": "boolean", - }, - }, - }, - "subjectActivitySubscription": { - "description": - "Object used to store activity subscription data in stash.", - "type": "object", - "required": [ - "subject", - "activitySubscription", - ], - "properties": { - "subject": { - "type": "string", - "format": "did", - }, - "activitySubscription": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#activitySubscription", - }, - }, - }, - }, - }, - "AppBskyNotificationRegisterPush": { - "lexicon": 1, - "id": "app.bsky.notification.registerPush", - "defs": { - "main": { - "type": "procedure", - "description": - "Register to receive push notifications, via a specified service, for the requesting account. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "serviceDid", - "token", - "platform", - "appId", - ], - "properties": { - "serviceDid": { - "type": "string", - "format": "did", - }, - "token": { - "type": "string", - }, - "platform": { - "type": "string", - "knownValues": [ - "ios", - "android", - "web", - ], - }, - "appId": { - "type": "string", - }, - "ageRestricted": { - "type": "boolean", - "description": "Set to true when the actor is age restricted", - }, - }, - }, - }, - }, - }, - }, - "AppBskyNotificationPutPreferences": { - "lexicon": 1, - "id": "app.bsky.notification.putPreferences", - "defs": { - "main": { - "type": "procedure", - "description": - "Set notification-related preferences for an account. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "priority", - ], - "properties": { - "priority": { - "type": "boolean", - }, - }, - }, - }, - }, - }, - }, - "AppBskyNotificationPutActivitySubscription": { - "lexicon": 1, - "id": "app.bsky.notification.putActivitySubscription", - "defs": { - "main": { - "type": "procedure", - "description": - "Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subject", - "activitySubscription", - ], - "properties": { - "subject": { - "type": "string", - "format": "did", - }, - "activitySubscription": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#activitySubscription", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subject", - ], - "properties": { - "subject": { - "type": "string", - "format": "did", - }, - "activitySubscription": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#activitySubscription", - }, - }, - }, - }, - }, - }, - }, - "AppBskyNotificationDeclaration": { - "lexicon": 1, - "id": "app.bsky.notification.declaration", - "defs": { - "main": { - "type": "record", - "description": - "A declaration of the user's choices related to notifications that can be produced by them.", - "key": "literal:self", - "record": { - "type": "object", - "required": [ - "allowSubscriptions", - ], - "properties": { - "allowSubscriptions": { - "type": "string", - "description": - "A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'.", - "knownValues": [ - "followers", - "mutuals", - "none", - ], - }, - }, - }, - }, - }, - }, - "AppBskyNotificationPutPreferencesV2": { - "lexicon": 1, - "id": "app.bsky.notification.putPreferencesV2", - "defs": { - "main": { - "type": "procedure", - "description": - "Set notification-related preferences for an account. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "chat": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#chatPreference", - }, - "follow": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "like": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "likeViaRepost": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "mention": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "quote": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "reply": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "repost": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "repostViaRepost": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#filterablePreference", - }, - "starterpackJoined": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#preference", - }, - "subscribedPost": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#preference", - }, - "unverified": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#preference", - }, - "verified": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#preference", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "preferences", - ], - "properties": { - "preferences": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#preferences", - }, - }, - }, - }, - }, - }, - }, - "AppBskyNotificationUpdateSeen": { - "lexicon": 1, - "id": "app.bsky.notification.updateSeen", - "defs": { - "main": { - "type": "procedure", - "description": - "Notify server that the requesting account has seen notifications. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "seenAt", - ], - "properties": { - "seenAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - }, - }, - "AppBskyNotificationListActivitySubscriptions": { - "lexicon": 1, - "id": "app.bsky.notification.listActivitySubscriptions", - "defs": { - "main": { - "type": "query", - "description": - "Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subscriptions", - ], - "properties": { - "cursor": { - "type": "string", - }, - "subscriptions": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyNotificationUnregisterPush": { - "lexicon": 1, - "id": "app.bsky.notification.unregisterPush", - "defs": { - "main": { - "type": "procedure", - "description": - "The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "serviceDid", - "token", - "platform", - "appId", - ], - "properties": { - "serviceDid": { - "type": "string", - "format": "did", - }, - "token": { - "type": "string", - }, - "platform": { - "type": "string", - "knownValues": [ - "ios", - "android", - "web", - ], - }, - "appId": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "AppBskyNotificationGetPreferences": { - "lexicon": 1, - "id": "app.bsky.notification.getPreferences", - "defs": { - "main": { - "type": "query", - "description": - "Get notification-related preferences for an account. Requires auth.", - "parameters": { - "type": "params", - "properties": {}, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "preferences", - ], - "properties": { - "preferences": { - "type": "ref", - "ref": "lex:app.bsky.notification.defs#preferences", - }, - }, - }, - }, - }, - }, - }, - "AppBskyNotificationListNotifications": { - "lexicon": 1, - "id": "app.bsky.notification.listNotifications", - "defs": { - "main": { - "type": "query", - "description": - "Enumerate notifications for the requesting account. Requires auth.", - "parameters": { - "type": "params", - "properties": { - "reasons": { - "description": "Notification reasons to include in response.", - "type": "array", - "items": { - "type": "string", - "description": - "A reason that matches the reason property of #notification.", - }, - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "priority": { - "type": "boolean", - }, - "cursor": { - "type": "string", - }, - "seenAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "notifications", - ], - "properties": { - "cursor": { - "type": "string", - }, - "notifications": { - "type": "array", - "items": { - "type": "ref", - "ref": - "lex:app.bsky.notification.listNotifications#notification", - }, - }, - "priority": { - "type": "boolean", - }, - "seenAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - "notification": { - "type": "object", - "required": [ - "uri", - "cid", - "author", - "reason", - "record", - "isRead", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "author": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - "reason": { - "type": "string", - "description": - "The reason why this notification was delivered - e.g. your post was liked, or you received a new follower.", - "knownValues": [ - "like", - "repost", - "follow", - "mention", - "reply", - "quote", - "starterpack-joined", - "verified", - "unverified", - "like-via-repost", - "repost-via-repost", - "subscribed-post", - "contact-match", - ], - }, - "reasonSubject": { - "type": "string", - "format": "at-uri", - }, - "record": { - "type": "unknown", - }, - "isRead": { - "type": "boolean", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - }, - }, - }, - }, - "AppBskyNotificationGetUnreadCount": { - "lexicon": 1, - "id": "app.bsky.notification.getUnreadCount", - "defs": { - "main": { - "type": "query", - "description": - "Count the number of unread notifications for the requesting account. Requires auth.", - "parameters": { - "type": "params", - "properties": { - "priority": { - "type": "boolean", - }, - "seenAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "count", - ], - "properties": { - "count": { - "type": "integer", - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetSuggestedFeedsSkeleton": { - "lexicon": 1, - "id": "app.bsky.unspecced.getSuggestedFeedsSkeleton", - "defs": { - "main": { - "type": "query", - "description": - "Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds", - "parameters": { - "type": "params", - "properties": { - "viewer": { - "type": "string", - "format": "did", - "description": - "DID of the account making the request (not included for public/unauthenticated queries).", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 25, - "default": 10, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feeds", - ], - "properties": { - "feeds": { - "type": "array", - "items": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedSearchStarterPacksSkeleton": { - "lexicon": 1, - "id": "app.bsky.unspecced.searchStarterPacksSkeleton", - "defs": { - "main": { - "type": "query", - "description": "Backend Starter Pack search, returns only skeleton.", - "parameters": { - "type": "params", - "required": [ - "q", - ], - "properties": { - "q": { - "type": "string", - "description": - "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.", - }, - "viewer": { - "type": "string", - "format": "did", - "description": - "DID of the account making the request (not included for public/unauthenticated queries).", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 25, - }, - "cursor": { - "type": "string", - "description": - "Optional pagination mechanism; may not necessarily allow scrolling through entire result set.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "starterPacks", - ], - "properties": { - "cursor": { - "type": "string", - }, - "hitsTotal": { - "type": "integer", - "description": - "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.", - }, - "starterPacks": { - "type": "array", - "items": { - "type": "ref", - "ref": - "lex:app.bsky.unspecced.defs#skeletonSearchStarterPack", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "BadQueryString", - }, - ], - }, - }, - }, - "AppBskyUnspeccedGetSuggestedUsersForExplore": { - "lexicon": 1, - "id": "app.bsky.unspecced.getSuggestedUsersForExplore", - "defs": { - "main": { - "type": "query", - "description": "Get a list of suggested users for the Explore page", - "parameters": { - "type": "params", - "properties": { - "category": { - "type": "string", - "description": "Category of users to get suggestions for.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 50, - "default": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actors", - ], - "properties": { - "actors": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - "recIdStr": { - "type": "string", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedDefs": { - "lexicon": 1, - "id": "app.bsky.unspecced.defs", - "defs": { - "skeletonSearchPost": { - "type": "object", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - }, - }, - "skeletonSearchActor": { - "type": "object", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - "skeletonSearchStarterPack": { - "type": "object", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - }, - }, - "trendingTopic": { - "type": "object", - "required": [ - "topic", - "link", - ], - "properties": { - "topic": { - "type": "string", - }, - "displayName": { - "type": "string", - }, - "description": { - "type": "string", - }, - "link": { - "type": "string", - }, - }, - }, - "skeletonTrend": { - "type": "object", - "required": [ - "topic", - "displayName", - "link", - "startedAt", - "postCount", - "dids", - ], - "properties": { - "topic": { - "type": "string", - }, - "displayName": { - "type": "string", - }, - "link": { - "type": "string", - }, - "startedAt": { - "type": "string", - "format": "datetime", - }, - "postCount": { - "type": "integer", - }, - "status": { - "type": "string", - "knownValues": [ - "hot", - ], - }, - "category": { - "type": "string", - }, - "dids": { - "type": "array", - "items": { - "type": "string", - "format": "did", - }, - }, - }, - }, - "trendView": { - "type": "object", - "required": [ - "topic", - "displayName", - "link", - "startedAt", - "postCount", - "actors", - ], - "properties": { - "topic": { - "type": "string", - }, - "displayName": { - "type": "string", - }, - "link": { - "type": "string", - }, - "startedAt": { - "type": "string", - "format": "datetime", - }, - "postCount": { - "type": "integer", - }, - "status": { - "type": "string", - "knownValues": [ - "hot", - ], - }, - "category": { - "type": "string", - }, - "actors": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileViewBasic", - }, - }, - }, - }, - "threadItemPost": { - "type": "object", - "required": [ - "post", - "moreParents", - "moreReplies", - "opThread", - "hiddenByThreadgate", - "mutedByViewer", - ], - "properties": { - "post": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#postView", - }, - "moreParents": { - "type": "boolean", - "description": - "This post has more parents that were not present in the response. This is just a boolean, without the number of parents.", - }, - "moreReplies": { - "type": "integer", - "description": - "This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate.", - }, - "opThread": { - "type": "boolean", - "description": - "This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread.", - }, - "hiddenByThreadgate": { - "type": "boolean", - "description": - "The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread.", - }, - "mutedByViewer": { - "type": "boolean", - "description": - "This is by an account muted by the viewer requesting it.", - }, - }, - }, - "threadItemNoUnauthenticated": { - "type": "object", - "properties": {}, - }, - "threadItemNotFound": { - "type": "object", - "properties": {}, - }, - "threadItemBlocked": { - "type": "object", - "required": [ - "author", - ], - "properties": { - "author": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#blockedAuthor", - }, - }, - }, - "ageAssuranceState": { - "type": "object", - "description": - "The computed state of the age assurance process, returned to the user in question on certain authenticated requests.", - "required": [ - "status", - ], - "properties": { - "lastInitiatedAt": { - "type": "string", - "format": "datetime", - "description": "The timestamp when this state was last updated.", - }, - "status": { - "type": "string", - "description": "The status of the age assurance process.", - "knownValues": [ - "unknown", - "pending", - "assured", - "blocked", - ], - }, - }, - }, - "ageAssuranceEvent": { - "type": "object", - "description": "Object used to store age assurance data in stash.", - "required": [ - "createdAt", - "status", - "attemptId", - ], - "properties": { - "createdAt": { - "type": "string", - "format": "datetime", - "description": "The date and time of this write operation.", - }, - "status": { - "type": "string", - "description": "The status of the age assurance process.", - "knownValues": [ - "unknown", - "pending", - "assured", - ], - }, - "attemptId": { - "type": "string", - "description": - "The unique identifier for this instance of the age assurance flow, in UUID format.", - }, - "email": { - "type": "string", - "description": "The email used for AA.", - }, - "initIp": { - "type": "string", - "description": "The IP address used when initiating the AA flow.", - }, - "initUa": { - "type": "string", - "description": "The user agent used when initiating the AA flow.", - }, - "completeIp": { - "type": "string", - "description": "The IP address used when completing the AA flow.", - }, - "completeUa": { - "type": "string", - "description": "The user agent used when completing the AA flow.", - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton": { - "lexicon": 1, - "id": "app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton", - "defs": { - "main": { - "type": "query", - "description": - "Get a skeleton of suggested starterpacks for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getOnboardingSuggestedStarterPacks", - "parameters": { - "type": "params", - "properties": { - "viewer": { - "type": "string", - "format": "did", - "description": - "DID of the account making the request (not included for public/unauthenticated queries).", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 25, - "default": 10, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "starterPacks", - ], - "properties": { - "starterPacks": { - "type": "array", - "items": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton": { - "lexicon": 1, - "id": "app.bsky.unspecced.getSuggestedUsersForExploreSkeleton", - "defs": { - "main": { - "type": "query", - "description": - "Get a skeleton of suggested users for the Explore page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForExplore", - "parameters": { - "type": "params", - "properties": { - "viewer": { - "type": "string", - "format": "did", - "description": - "DID of the account making the request (not included for public/unauthenticated queries).", - }, - "category": { - "type": "string", - "description": "Category of users to get suggestions for.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 50, - "default": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "dids", - ], - "properties": { - "dids": { - "type": "array", - "items": { - "type": "string", - "format": "did", - }, - }, - "recIdStr": { - "type": "string", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetSuggestedUsers": { - "lexicon": 1, - "id": "app.bsky.unspecced.getSuggestedUsers", - "defs": { - "main": { - "type": "query", - "description": "Get a list of suggested users", - "parameters": { - "type": "params", - "properties": { - "category": { - "type": "string", - "description": "Category of users to get suggestions for.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 50, - "default": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actors", - ], - "properties": { - "actors": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - "recId": { - "type": "string", - "description": "DEPRECATED: use recIdStr instead.", - }, - "recIdStr": { - "type": "string", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetPostThreadOtherV2": { - "lexicon": 1, - "id": "app.bsky.unspecced.getPostThreadOtherV2", - "defs": { - "main": { - "type": "query", - "description": - "(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get additional posts under a thread e.g. replies hidden by threadgate. Based on an anchor post at any depth of the tree, returns top-level replies below that anchor. It does not include ancestors nor the anchor itself. This should be called after exhausting `app.bsky.unspecced.getPostThreadV2`. Does not require auth, but additional metadata and filtering will be applied for authed requests.", - "parameters": { - "type": "params", - "required": [ - "anchor", - ], - "properties": { - "anchor": { - "type": "string", - "format": "at-uri", - "description": - "Reference (AT-URI) to post record. This is the anchor post.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "thread", - ], - "properties": { - "thread": { - "type": "array", - "description": - "A flat list of other thread items. The depth of each item is indicated by the depth property inside the item.", - "items": { - "type": "ref", - "ref": - "lex:app.bsky.unspecced.getPostThreadOtherV2#threadItem", - }, - }, - }, - }, - }, - }, - "threadItem": { - "type": "object", - "required": [ - "uri", - "depth", - "value", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "depth": { - "type": "integer", - "description": - "The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths.", - }, - "value": { - "type": "union", - "refs": [ - "lex:app.bsky.unspecced.defs#threadItemPost", - ], - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetSuggestedStarterPacks": { - "lexicon": 1, - "id": "app.bsky.unspecced.getSuggestedStarterPacks", - "defs": { - "main": { - "type": "query", - "description": "Get a list of suggested starterpacks", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 25, - "default": 10, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "starterPacks", - ], - "properties": { - "starterPacks": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#starterPackView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetSuggestedStarterPacksSkeleton": { - "lexicon": 1, - "id": "app.bsky.unspecced.getSuggestedStarterPacksSkeleton", - "defs": { - "main": { - "type": "query", - "description": - "Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks", - "parameters": { - "type": "params", - "properties": { - "viewer": { - "type": "string", - "format": "did", - "description": - "DID of the account making the request (not included for public/unauthenticated queries).", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 25, - "default": 10, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "starterPacks", - ], - "properties": { - "starterPacks": { - "type": "array", - "items": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetOnboardingSuggestedStarterPacks": { - "lexicon": 1, - "id": "app.bsky.unspecced.getOnboardingSuggestedStarterPacks", - "defs": { - "main": { - "type": "query", - "description": "Get a list of suggested starterpacks for onboarding", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 25, - "default": 10, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "starterPacks", - ], - "properties": { - "starterPacks": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#starterPackView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetSuggestedUsersSkeleton": { - "lexicon": 1, - "id": "app.bsky.unspecced.getSuggestedUsersSkeleton", - "defs": { - "main": { - "type": "query", - "description": - "Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers", - "parameters": { - "type": "params", - "properties": { - "viewer": { - "type": "string", - "format": "did", - "description": - "DID of the account making the request (not included for public/unauthenticated queries).", - }, - "category": { - "type": "string", - "description": "Category of users to get suggestions for.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 50, - "default": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "dids", - ], - "properties": { - "dids": { - "type": "array", - "items": { - "type": "string", - "format": "did", - }, - }, - "recId": { - "type": "string", - "description": "DEPRECATED: use recIdStr instead.", - }, - "recIdStr": { - "type": "string", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetPostThreadV2": { - "lexicon": 1, - "id": "app.bsky.unspecced.getPostThreadV2", - "defs": { - "main": { - "type": "query", - "description": - "(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests.", - "parameters": { - "type": "params", - "required": [ - "anchor", - ], - "properties": { - "anchor": { - "type": "string", - "format": "at-uri", - "description": - "Reference (AT-URI) to post record. This is the anchor post, and the thread will be built around it. It can be any post in the tree, not necessarily a root post.", - }, - "above": { - "type": "boolean", - "description": "Whether to include parents above the anchor.", - "default": true, - }, - "below": { - "type": "integer", - "description": - "How many levels of replies to include below the anchor.", - "default": 6, - "minimum": 0, - "maximum": 20, - }, - "branchingFactor": { - "type": "integer", - "description": - "Maximum of replies to include at each level of the thread, except for the direct replies to the anchor, which are (NOTE: currently, during unspecced phase) all returned (NOTE: later they might be paginated).", - "default": 10, - "minimum": 0, - "maximum": 100, - }, - "sort": { - "type": "string", - "description": "Sorting for the thread replies.", - "knownValues": [ - "newest", - "oldest", - "top", - ], - "default": "oldest", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "thread", - "hasOtherReplies", - ], - "properties": { - "thread": { - "type": "array", - "description": - "A flat list of thread items. The depth of each item is indicated by the depth property inside the item.", - "items": { - "type": "ref", - "ref": "lex:app.bsky.unspecced.getPostThreadV2#threadItem", - }, - }, - "threadgate": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#threadgateView", - }, - "hasOtherReplies": { - "type": "boolean", - "description": - "Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them.", - }, - }, - }, - }, - }, - "threadItem": { - "type": "object", - "required": [ - "uri", - "depth", - "value", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "depth": { - "type": "integer", - "description": - "The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths.", - }, - "value": { - "type": "union", - "refs": [ - "lex:app.bsky.unspecced.defs#threadItemPost", - "lex:app.bsky.unspecced.defs#threadItemNoUnauthenticated", - "lex:app.bsky.unspecced.defs#threadItemNotFound", - "lex:app.bsky.unspecced.defs#threadItemBlocked", - ], - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetTrends": { - "lexicon": 1, - "id": "app.bsky.unspecced.getTrends", - "defs": { - "main": { - "type": "query", - "description": "Get the current trends on the network", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 25, - "default": 10, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "trends", - ], - "properties": { - "trends": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.unspecced.defs#trendView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedSearchActorsSkeleton": { - "lexicon": 1, - "id": "app.bsky.unspecced.searchActorsSkeleton", - "defs": { - "main": { - "type": "query", - "description": - "Backend Actors (profile) search, returns only skeleton.", - "parameters": { - "type": "params", - "required": [ - "q", - ], - "properties": { - "q": { - "type": "string", - "description": - "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax.", - }, - "viewer": { - "type": "string", - "format": "did", - "description": - "DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking.", - }, - "typeahead": { - "type": "boolean", - "description": "If true, acts as fast/simple 'typeahead' query.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 25, - }, - "cursor": { - "type": "string", - "description": - "Optional pagination mechanism; may not necessarily allow scrolling through entire result set.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actors", - ], - "properties": { - "cursor": { - "type": "string", - }, - "hitsTotal": { - "type": "integer", - "description": - "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.", - }, - "actors": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.unspecced.defs#skeletonSearchActor", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "BadQueryString", - }, - ], - }, - }, - }, - "AppBskyUnspeccedGetSuggestionsSkeleton": { - "lexicon": 1, - "id": "app.bsky.unspecced.getSuggestionsSkeleton", - "defs": { - "main": { - "type": "query", - "description": - "Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions", - "parameters": { - "type": "params", - "properties": { - "viewer": { - "type": "string", - "format": "did", - "description": - "DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - "relativeToDid": { - "type": "string", - "format": "did", - "description": - "DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actors", - ], - "properties": { - "cursor": { - "type": "string", - }, - "actors": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.unspecced.defs#skeletonSearchActor", - }, - }, - "relativeToDid": { - "type": "string", - "format": "did", - "description": - "DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer.", - }, - "recId": { - "type": "integer", - "description": "DEPRECATED: use recIdStr instead.", - }, - "recIdStr": { - "type": "string", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedSearchPostsSkeleton": { - "lexicon": 1, - "id": "app.bsky.unspecced.searchPostsSkeleton", - "defs": { - "main": { - "type": "query", - "description": "Backend Posts search, returns only skeleton", - "parameters": { - "type": "params", - "required": [ - "q", - ], - "properties": { - "q": { - "type": "string", - "description": - "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.", - }, - "sort": { - "type": "string", - "knownValues": [ - "top", - "latest", - ], - "default": "latest", - "description": "Specifies the ranking order of results.", - }, - "since": { - "type": "string", - "description": - "Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD).", - }, - "until": { - "type": "string", - "description": - "Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD).", - }, - "mentions": { - "type": "string", - "format": "at-identifier", - "description": - "Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions.", - }, - "author": { - "type": "string", - "format": "at-identifier", - "description": - "Filter to posts by the given account. Handles are resolved to DID before query-time.", - }, - "lang": { - "type": "string", - "format": "language", - "description": - "Filter to posts in the given language. Expected to be based on post language field, though server may override language detection.", - }, - "domain": { - "type": "string", - "description": - "Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization.", - }, - "url": { - "type": "string", - "format": "uri", - "description": - "Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching.", - }, - "tag": { - "type": "array", - "items": { - "type": "string", - "maxLength": 640, - "maxGraphemes": 64, - }, - "description": - "Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching.", - }, - "viewer": { - "type": "string", - "format": "did", - "description": - "DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 25, - }, - "cursor": { - "type": "string", - "description": - "Optional pagination mechanism; may not necessarily allow scrolling through entire result set.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "posts", - ], - "properties": { - "cursor": { - "type": "string", - }, - "hitsTotal": { - "type": "integer", - "description": - "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.", - }, - "posts": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.unspecced.defs#skeletonSearchPost", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "BadQueryString", - }, - ], - }, - }, - }, - "AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton": { - "lexicon": 1, - "id": "app.bsky.unspecced.getOnboardingSuggestedUsersSkeleton", - "defs": { - "main": { - "type": "query", - "description": - "Get a skeleton of suggested users for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedOnboardingUsers", - "parameters": { - "type": "params", - "properties": { - "viewer": { - "type": "string", - "format": "did", - "description": - "DID of the account making the request (not included for public/unauthenticated queries).", - }, - "category": { - "type": "string", - "description": "Category of users to get suggestions for.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 50, - "default": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "dids", - ], - "properties": { - "dids": { - "type": "array", - "items": { - "type": "string", - "format": "did", - }, - }, - "recId": { - "type": "string", - "description": "DEPRECATED: use recIdStr instead.", - }, - "recIdStr": { - "type": "string", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton": { - "lexicon": 1, - "id": "app.bsky.unspecced.getSuggestedUsersForDiscoverSkeleton", - "defs": { - "main": { - "type": "query", - "description": - "Get a skeleton of suggested users for the Discover page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForDiscover", - "parameters": { - "type": "params", - "properties": { - "viewer": { - "type": "string", - "format": "did", - "description": - "DID of the account making the request (not included for public/unauthenticated queries).", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 50, - "default": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "dids", - ], - "properties": { - "dids": { - "type": "array", - "items": { - "type": "string", - "format": "did", - }, - }, - "recIdStr": { - "type": "string", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetSuggestedUsersForDiscover": { - "lexicon": 1, - "id": "app.bsky.unspecced.getSuggestedUsersForDiscover", - "defs": { - "main": { - "type": "query", - "description": "Get a list of suggested users for the Discover page", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 50, - "default": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actors", - ], - "properties": { - "actors": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - "recIdStr": { - "type": "string", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetAgeAssuranceState": { - "lexicon": 1, - "id": "app.bsky.unspecced.getAgeAssuranceState", - "defs": { - "main": { - "type": "query", - "description": - "Returns the current state of the age assurance process for an account. This is used to check if the user has completed age assurance or if further action is required.", - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:app.bsky.unspecced.defs#ageAssuranceState", - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetPopularFeedGenerators": { - "lexicon": 1, - "id": "app.bsky.unspecced.getPopularFeedGenerators", - "defs": { - "main": { - "type": "query", - "description": "An unspecced view of globally popular feed generators.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - "query": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feeds", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feeds": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#generatorView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetSuggestedOnboardingUsers": { - "lexicon": 1, - "id": "app.bsky.unspecced.getSuggestedOnboardingUsers", - "defs": { - "main": { - "type": "query", - "description": "Get a list of suggested users for onboarding", - "parameters": { - "type": "params", - "properties": { - "category": { - "type": "string", - "description": "Category of users to get suggestions for.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 50, - "default": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actors", - ], - "properties": { - "actors": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - "recId": { - "type": "string", - "description": "DEPRECATED: use recIdStr instead.", - }, - "recIdStr": { - "type": "string", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetSuggestedUsersForSeeMore": { - "lexicon": 1, - "id": "app.bsky.unspecced.getSuggestedUsersForSeeMore", - "defs": { - "main": { - "type": "query", - "description": "Get a list of suggested users for the See More page", - "parameters": { - "type": "params", - "properties": { - "category": { - "type": "string", - "description": "Category of users to get suggestions for.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 50, - "default": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actors", - ], - "properties": { - "actors": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - "recIdStr": { - "type": "string", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedInitAgeAssurance": { - "lexicon": 1, - "id": "app.bsky.unspecced.initAgeAssurance", - "defs": { - "main": { - "type": "procedure", - "description": - "Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user's age.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "email", - "language", - "countryCode", - ], - "properties": { - "email": { - "type": "string", - "description": - "The user's email address to receive assurance instructions.", - }, - "language": { - "type": "string", - "description": - "The user's preferred language for communication during the assurance process.", - }, - "countryCode": { - "type": "string", - "description": - "An ISO 3166-1 alpha-2 code of the user's location.", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:app.bsky.unspecced.defs#ageAssuranceState", - }, - }, - "errors": [ - { - "name": "InvalidEmail", - }, - { - "name": "DidTooLong", - }, - { - "name": "InvalidInitiation", - }, - ], - }, - }, - }, - "AppBskyUnspeccedGetTrendingTopics": { - "lexicon": 1, - "id": "app.bsky.unspecced.getTrendingTopics", - "defs": { - "main": { - "type": "query", - "description": "Get a list of trending topics", - "parameters": { - "type": "params", - "properties": { - "viewer": { - "type": "string", - "format": "did", - "description": - "DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 25, - "default": 10, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "topics", - "suggested", - ], - "properties": { - "topics": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.unspecced.defs#trendingTopic", - }, - }, - "suggested": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.unspecced.defs#trendingTopic", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetTaggedSuggestions": { - "lexicon": 1, - "id": "app.bsky.unspecced.getTaggedSuggestions", - "defs": { - "main": { - "type": "query", - "description": - "Get a list of suggestions (feeds and users) tagged with categories", - "parameters": { - "type": "params", - "properties": {}, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "suggestions", - ], - "properties": { - "suggestions": { - "type": "array", - "items": { - "type": "ref", - "ref": - "lex:app.bsky.unspecced.getTaggedSuggestions#suggestion", - }, - }, - }, - }, - }, - }, - "suggestion": { - "type": "object", - "required": [ - "tag", - "subjectType", - "subject", - ], - "properties": { - "tag": { - "type": "string", - }, - "subjectType": { - "type": "string", - "knownValues": [ - "actor", - "feed", - ], - }, - "subject": { - "type": "string", - "format": "uri", - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton": { - "lexicon": 1, - "id": "app.bsky.unspecced.getSuggestedUsersForSeeMoreSkeleton", - "defs": { - "main": { - "type": "query", - "description": - "Get a skeleton of suggested users for the See More page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForSeeMore", - "parameters": { - "type": "params", - "properties": { - "viewer": { - "type": "string", - "format": "did", - "description": - "DID of the account making the request (not included for public/unauthenticated queries).", - }, - "category": { - "type": "string", - "description": "Category of users to get suggestions for.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 50, - "default": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "dids", - ], - "properties": { - "dids": { - "type": "array", - "items": { - "type": "string", - "format": "did", - }, - }, - "recIdStr": { - "type": "string", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetSuggestedFeeds": { - "lexicon": 1, - "id": "app.bsky.unspecced.getSuggestedFeeds", - "defs": { - "main": { - "type": "query", - "description": "Get a list of suggested feeds", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 25, - "default": 10, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feeds", - ], - "properties": { - "feeds": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#generatorView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetTrendsSkeleton": { - "lexicon": 1, - "id": "app.bsky.unspecced.getTrendsSkeleton", - "defs": { - "main": { - "type": "query", - "description": - "Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends", - "parameters": { - "type": "params", - "properties": { - "viewer": { - "type": "string", - "format": "did", - "description": - "DID of the account making the request (not included for public/unauthenticated queries).", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 25, - "default": 10, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "trends", - ], - "properties": { - "trends": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.unspecced.defs#skeletonTrend", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyUnspeccedGetConfig": { - "lexicon": 1, - "id": "app.bsky.unspecced.getConfig", - "defs": { - "main": { - "type": "query", - "description": "Get miscellaneous runtime configuration.", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [], - "properties": { - "checkEmailConfirmed": { - "type": "boolean", - }, - "liveNow": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.unspecced.getConfig#liveNowConfig", - }, - }, - }, - }, - }, - }, - "liveNowConfig": { - "type": "object", - "required": [ - "did", - "domains", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "domains": { - "type": "array", - "items": { - "type": "string", - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetStarterPacks": { - "lexicon": 1, - "id": "app.bsky.graph.getStarterPacks", - "defs": { - "main": { - "type": "query", - "description": "Get views for a list of starter packs.", - "parameters": { - "type": "params", - "required": [ - "uris", - ], - "properties": { - "uris": { - "type": "array", - "items": { - "type": "string", - "format": "at-uri", - }, - "maxLength": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "starterPacks", - ], - "properties": { - "starterPacks": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#starterPackViewBasic", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetSuggestedFollowsByActor": { - "lexicon": 1, - "id": "app.bsky.graph.getSuggestedFollowsByActor", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "suggestions", - ], - "properties": { - "suggestions": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - "recIdStr": { - "type": "string", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - "isFallback": { - "type": "boolean", - "description": - "DEPRECATED, unused. Previously: if true, response has fallen-back to generic results, and is not scoped using relativeToDid", - "default": false, - }, - "recId": { - "type": "integer", - "description": "DEPRECATED: use recIdStr instead.", - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphBlock": { - "lexicon": 1, - "id": "app.bsky.graph.block", - "defs": { - "main": { - "type": "record", - "description": - "Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "subject", - "createdAt", - ], - "properties": { - "subject": { - "type": "string", - "format": "did", - "description": "DID of the account to be blocked.", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetStarterPacksWithMembership": { - "lexicon": 1, - "id": "app.bsky.graph.getStarterPacksWithMembership", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates the starter packs created by the session user, and includes membership information about `actor` in those starter packs. Requires auth.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - "description": "The account (actor) to check for membership.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "starterPacksWithMembership", - ], - "properties": { - "cursor": { - "type": "string", - }, - "starterPacksWithMembership": { - "type": "array", - "items": { - "type": "ref", - "ref": - "lex:app.bsky.graph.getStarterPacksWithMembership#starterPackWithMembership", - }, - }, - }, - }, - }, - }, - "starterPackWithMembership": { - "description": - "A starter pack and an optional list item indicating membership of a target user to that starter pack.", - "type": "object", - "required": [ - "starterPack", - ], - "properties": { - "starterPack": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#starterPackView", - }, - "listItem": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listItemView", - }, - }, - }, - }, - }, - "AppBskyGraphFollow": { - "lexicon": 1, - "id": "app.bsky.graph.follow", - "defs": { - "main": { - "type": "record", - "description": - "Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "subject", - "createdAt", - ], - "properties": { - "subject": { - "type": "string", - "format": "did", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "via": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - }, - }, - }, - }, - }, - "AppBskyGraphDefs": { - "lexicon": 1, - "id": "app.bsky.graph.defs", - "defs": { - "listViewBasic": { - "type": "object", - "required": [ - "uri", - "cid", - "name", - "purpose", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "name": { - "type": "string", - "maxLength": 64, - "minLength": 1, - }, - "purpose": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listPurpose", - }, - "avatar": { - "type": "string", - "format": "uri", - }, - "listItemCount": { - "type": "integer", - "minimum": 0, - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "viewer": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listViewerState", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "listView": { - "type": "object", - "required": [ - "uri", - "cid", - "creator", - "name", - "purpose", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "creator": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - "name": { - "type": "string", - "maxLength": 64, - "minLength": 1, - }, - "purpose": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listPurpose", - }, - "description": { - "type": "string", - "maxGraphemes": 300, - "maxLength": 3000, - }, - "descriptionFacets": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.richtext.facet", - }, - }, - "avatar": { - "type": "string", - "format": "uri", - }, - "listItemCount": { - "type": "integer", - "minimum": 0, - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "viewer": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listViewerState", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "listItemView": { - "type": "object", - "required": [ - "uri", - "subject", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "subject": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - }, - "starterPackView": { - "type": "object", - "required": [ - "uri", - "cid", - "record", - "creator", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "record": { - "type": "unknown", - }, - "creator": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileViewBasic", - }, - "list": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listViewBasic", - }, - "listItemsSample": { - "type": "array", - "maxLength": 12, - "items": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listItemView", - }, - }, - "feeds": { - "type": "array", - "maxLength": 3, - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#generatorView", - }, - }, - "joinedWeekCount": { - "type": "integer", - "minimum": 0, - }, - "joinedAllTimeCount": { - "type": "integer", - "minimum": 0, - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "starterPackViewBasic": { - "type": "object", - "required": [ - "uri", - "cid", - "record", - "creator", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "record": { - "type": "unknown", - }, - "creator": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileViewBasic", - }, - "listItemCount": { - "type": "integer", - "minimum": 0, - }, - "joinedWeekCount": { - "type": "integer", - "minimum": 0, - }, - "joinedAllTimeCount": { - "type": "integer", - "minimum": 0, - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "listPurpose": { - "type": "string", - "knownValues": [ - "app.bsky.graph.defs#modlist", - "app.bsky.graph.defs#curatelist", - "app.bsky.graph.defs#referencelist", - ], - }, - "modlist": { - "type": "token", - "description": - "A list of actors to apply an aggregate moderation action (mute/block) on.", - }, - "curatelist": { - "type": "token", - "description": - "A list of actors used for curation purposes such as list feeds or interaction gating.", - }, - "referencelist": { - "type": "token", - "description": - "A list of actors used for only for reference purposes such as within a starter pack.", - }, - "listViewerState": { - "type": "object", - "properties": { - "muted": { - "type": "boolean", - }, - "blocked": { - "type": "string", - "format": "at-uri", - }, - }, - }, - "notFoundActor": { - "type": "object", - "description": "indicates that a handle or DID could not be resolved", - "required": [ - "actor", - "notFound", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "notFound": { - "type": "boolean", - "const": true, - }, - }, - }, - "relationship": { - "type": "object", - "description": - "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "following": { - "type": "string", - "format": "at-uri", - "description": - "if the actor follows this DID, this is the AT-URI of the follow record", - }, - "followedBy": { - "type": "string", - "format": "at-uri", - "description": - "if the actor is followed by this DID, contains the AT-URI of the follow record", - }, - "blocking": { - "type": "string", - "format": "at-uri", - "description": - "if the actor blocks this DID, this is the AT-URI of the block record", - }, - "blockedBy": { - "type": "string", - "format": "at-uri", - "description": - "if the actor is blocked by this DID, contains the AT-URI of the block record", - }, - "blockingByList": { - "type": "string", - "format": "at-uri", - "description": - "if the actor blocks this DID via a block list, this is the AT-URI of the listblock record", - }, - "blockedByList": { - "type": "string", - "format": "at-uri", - "description": - "if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record", - }, - }, - }, - }, - }, - "AppBskyGraphGetListsWithMembership": { - "lexicon": 1, - "id": "app.bsky.graph.getListsWithMembership", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates the lists created by the session user, and includes membership information about `actor` in those lists. Only supports curation and moderation lists (no reference lists, used in starter packs). Requires auth.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - "description": "The account (actor) to check for membership.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - "purposes": { - "type": "array", - "description": - "Optional filter by list purpose. If not specified, all supported types are returned.", - "items": { - "type": "string", - "knownValues": [ - "modlist", - "curatelist", - ], - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "listsWithMembership", - ], - "properties": { - "cursor": { - "type": "string", - }, - "listsWithMembership": { - "type": "array", - "items": { - "type": "ref", - "ref": - "lex:app.bsky.graph.getListsWithMembership#listWithMembership", - }, - }, - }, - }, - }, - }, - "listWithMembership": { - "description": - "A list and an optional list item indicating membership of a target user to that list.", - "type": "object", - "required": [ - "list", - ], - "properties": { - "list": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listView", - }, - "listItem": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listItemView", - }, - }, - }, - }, - }, - "AppBskyGraphUnmuteActorList": { - "lexicon": 1, - "id": "app.bsky.graph.unmuteActorList", - "defs": { - "main": { - "type": "procedure", - "description": "Unmutes the specified list of accounts. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "list", - ], - "properties": { - "list": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetListBlocks": { - "lexicon": 1, - "id": "app.bsky.graph.getListBlocks", - "defs": { - "main": { - "type": "query", - "description": - "Get mod lists that the requesting account (actor) is blocking. Requires auth.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "lists", - ], - "properties": { - "cursor": { - "type": "string", - }, - "lists": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphListblock": { - "lexicon": 1, - "id": "app.bsky.graph.listblock", - "defs": { - "main": { - "type": "record", - "description": - "Record representing a block relationship against an entire an entire list of accounts (actors).", - "key": "tid", - "record": { - "type": "object", - "required": [ - "subject", - "createdAt", - ], - "properties": { - "subject": { - "type": "string", - "format": "at-uri", - "description": "Reference (AT-URI) to the mod list record.", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetStarterPack": { - "lexicon": 1, - "id": "app.bsky.graph.getStarterPack", - "defs": { - "main": { - "type": "query", - "description": "Gets a view of a starter pack.", - "parameters": { - "type": "params", - "required": [ - "starterPack", - ], - "properties": { - "starterPack": { - "type": "string", - "format": "at-uri", - "description": "Reference (AT-URI) of the starter pack record.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "starterPack", - ], - "properties": { - "starterPack": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#starterPackView", - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphStarterpack": { - "lexicon": 1, - "id": "app.bsky.graph.starterpack", - "defs": { - "main": { - "type": "record", - "description": - "Record defining a starter pack of actors and feeds for new users.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "name", - "list", - "createdAt", - ], - "properties": { - "name": { - "type": "string", - "maxGraphemes": 50, - "maxLength": 500, - "minLength": 1, - "description": "Display name for starter pack; can not be empty.", - }, - "description": { - "type": "string", - "maxGraphemes": 300, - "maxLength": 3000, - }, - "descriptionFacets": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.richtext.facet", - }, - }, - "list": { - "type": "string", - "format": "at-uri", - "description": "Reference (AT-URI) to the list record.", - }, - "feeds": { - "type": "array", - "maxLength": 3, - "items": { - "type": "ref", - "ref": "lex:app.bsky.graph.starterpack#feedItem", - }, - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - "feedItem": { - "type": "object", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - }, - "AppBskyGraphMuteActorList": { - "lexicon": 1, - "id": "app.bsky.graph.muteActorList", - "defs": { - "main": { - "type": "procedure", - "description": - "Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "list", - ], - "properties": { - "list": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphMuteThread": { - "lexicon": 1, - "id": "app.bsky.graph.muteThread", - "defs": { - "main": { - "type": "procedure", - "description": - "Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "root", - ], - "properties": { - "root": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphSearchStarterPacks": { - "lexicon": 1, - "id": "app.bsky.graph.searchStarterPacks", - "defs": { - "main": { - "type": "query", - "description": - "Find starter packs matching search criteria. Does not require auth.", - "parameters": { - "type": "params", - "required": [ - "q", - ], - "properties": { - "q": { - "type": "string", - "description": - "Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 25, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "starterPacks", - ], - "properties": { - "cursor": { - "type": "string", - }, - "starterPacks": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#starterPackViewBasic", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetActorStarterPacks": { - "lexicon": 1, - "id": "app.bsky.graph.getActorStarterPacks", - "defs": { - "main": { - "type": "query", - "description": "Get a list of starter packs created by the actor.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "starterPacks", - ], - "properties": { - "cursor": { - "type": "string", - }, - "starterPacks": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#starterPackViewBasic", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetLists": { - "lexicon": 1, - "id": "app.bsky.graph.getLists", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates the lists created by a specified account (actor).", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - "description": "The account (actor) to enumerate lists from.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - "purposes": { - "type": "array", - "description": - "Optional filter by list purpose. If not specified, all supported types are returned.", - "items": { - "type": "string", - "knownValues": [ - "modlist", - "curatelist", - ], - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "lists", - ], - "properties": { - "cursor": { - "type": "string", - }, - "lists": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetFollowers": { - "lexicon": 1, - "id": "app.bsky.graph.getFollowers", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates accounts which follow a specified account (actor).", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subject", - "followers", - ], - "properties": { - "subject": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - "cursor": { - "type": "string", - }, - "followers": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphUnmuteThread": { - "lexicon": 1, - "id": "app.bsky.graph.unmuteThread", - "defs": { - "main": { - "type": "procedure", - "description": "Unmutes the specified thread. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "root", - ], - "properties": { - "root": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphMuteActor": { - "lexicon": 1, - "id": "app.bsky.graph.muteActor", - "defs": { - "main": { - "type": "procedure", - "description": - "Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetMutes": { - "lexicon": 1, - "id": "app.bsky.graph.getMutes", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "mutes", - ], - "properties": { - "cursor": { - "type": "string", - }, - "mutes": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphListitem": { - "lexicon": 1, - "id": "app.bsky.graph.listitem", - "defs": { - "main": { - "type": "record", - "description": - "Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "subject", - "list", - "createdAt", - ], - "properties": { - "subject": { - "type": "string", - "format": "did", - "description": "The account which is included on the list.", - }, - "list": { - "type": "string", - "format": "at-uri", - "description": - "Reference (AT-URI) to the list record (app.bsky.graph.list).", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - }, - "AppBskyGraphList": { - "lexicon": 1, - "id": "app.bsky.graph.list", - "defs": { - "main": { - "type": "record", - "description": - "Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "name", - "purpose", - "createdAt", - ], - "properties": { - "purpose": { - "type": "ref", - "description": - "Defines the purpose of the list (aka, moderation-oriented or curration-oriented)", - "ref": "lex:app.bsky.graph.defs#listPurpose", - }, - "name": { - "type": "string", - "maxLength": 64, - "minLength": 1, - "description": "Display name for list; can not be empty.", - }, - "description": { - "type": "string", - "maxGraphemes": 300, - "maxLength": 3000, - }, - "descriptionFacets": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.richtext.facet", - }, - }, - "avatar": { - "type": "blob", - "accept": [ - "image/png", - "image/jpeg", - ], - "maxSize": 1000000, - }, - "labels": { - "type": "union", - "refs": [ - "lex:com.atproto.label.defs#selfLabels", - ], - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetKnownFollowers": { - "lexicon": 1, - "id": "app.bsky.graph.getKnownFollowers", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates accounts which follow a specified account (actor) and are followed by the viewer.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subject", - "followers", - ], - "properties": { - "subject": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - "cursor": { - "type": "string", - }, - "followers": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphVerification": { - "lexicon": 1, - "id": "app.bsky.graph.verification", - "defs": { - "main": { - "type": "record", - "description": - "Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "subject", - "handle", - "displayName", - "createdAt", - ], - "properties": { - "subject": { - "description": "DID of the subject the verification applies to.", - "type": "string", - "format": "did", - }, - "handle": { - "description": - "Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.", - "type": "string", - "format": "handle", - }, - "displayName": { - "description": - "Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying.", - "type": "string", - }, - "createdAt": { - "description": "Date of when the verification was created.", - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetListMutes": { - "lexicon": 1, - "id": "app.bsky.graph.getListMutes", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "lists", - ], - "properties": { - "cursor": { - "type": "string", - }, - "lists": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetFollows": { - "lexicon": 1, - "id": "app.bsky.graph.getFollows", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates accounts which a specified account (actor) follows.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subject", - "follows", - ], - "properties": { - "subject": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - "cursor": { - "type": "string", - }, - "follows": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetBlocks": { - "lexicon": 1, - "id": "app.bsky.graph.getBlocks", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates which accounts the requesting account is currently blocking. Requires auth.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "blocks", - ], - "properties": { - "cursor": { - "type": "string", - }, - "blocks": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetRelationships": { - "lexicon": 1, - "id": "app.bsky.graph.getRelationships", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates public relationships between one account, and a list of other accounts. Does not require auth.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - "description": "Primary account requesting relationships for.", - }, - "others": { - "type": "array", - "description": - "List of 'other' accounts to be related back to the primary.", - "maxLength": 30, - "items": { - "type": "string", - "format": "at-identifier", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "relationships", - ], - "properties": { - "actor": { - "type": "string", - "format": "did", - }, - "relationships": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:app.bsky.graph.defs#relationship", - "lex:app.bsky.graph.defs#notFoundActor", - ], - }, - }, - }, - }, - }, - "errors": [ - { - "name": "ActorNotFound", - "description": - "the primary actor at-identifier could not be resolved", - }, - ], - }, - }, - }, - "AppBskyGraphUnmuteActor": { - "lexicon": 1, - "id": "app.bsky.graph.unmuteActor", - "defs": { - "main": { - "type": "procedure", - "description": "Unmutes the specified account. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - }, - }, - }, - }, - }, - }, - "AppBskyGraphGetList": { - "lexicon": 1, - "id": "app.bsky.graph.getList", - "defs": { - "main": { - "type": "query", - "description": - "Gets a 'view' (with additional context) of a specified list.", - "parameters": { - "type": "params", - "required": [ - "list", - ], - "properties": { - "list": { - "type": "string", - "format": "at-uri", - "description": - "Reference (AT-URI) of the list record to hydrate.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "list", - "items", - ], - "properties": { - "cursor": { - "type": "string", - }, - "list": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listView", - }, - "items": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listItemView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyAuthFullApp": { - "lexicon": 1, - "id": "app.bsky.authFullApp", - "defs": { - "main": { - "type": "permission-set", - "title": "Full Bluesky Social App Permissions", - "title:lang": {}, - "detail": - "Manage all public content and interactions, private preferences and subscriptions, and other Bluesky-specific app features and data.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "rpc", - "inheritAud": true, - "lxm": [ - "app.bsky.actor.getPreferences", - "app.bsky.actor.getProfile", - "app.bsky.actor.getProfiles", - "app.bsky.actor.getSuggestions", - "app.bsky.actor.putPreferences", - "app.bsky.actor.searchActors", - "app.bsky.actor.searchActorsTypeahead", - "app.bsky.bookmark.createBookmark", - "app.bsky.bookmark.deleteBookmark", - "app.bsky.bookmark.getBookmarks", - "app.bsky.contact.dismissMatch", - "app.bsky.contact.getMatches", - "app.bsky.contact.getSyncStatus", - "app.bsky.contact.importContacts", - "app.bsky.contact.removeData", - "app.bsky.contact.startPhoneVerification", - "app.bsky.contact.verifyPhone", - "app.bsky.feed.describeFeedGenerator", - "app.bsky.feed.getActorFeeds", - "app.bsky.feed.getActorLikes", - "app.bsky.feed.getAuthorFeed", - "app.bsky.feed.getFeed", - "app.bsky.feed.getFeedGenerator", - "app.bsky.feed.getFeedGenerators", - "app.bsky.feed.getFeedSkeleton", - "app.bsky.feed.getLikes", - "app.bsky.feed.getListFeed", - "app.bsky.feed.getPostThread", - "app.bsky.feed.getPosts", - "app.bsky.feed.getQuotes", - "app.bsky.feed.getRepostedBy", - "app.bsky.feed.getSuggestedFeeds", - "app.bsky.feed.getTimeline", - "app.bsky.feed.searchPosts", - "app.bsky.feed.sendInteractions", - "app.bsky.graph.getActorStarterPacks", - "app.bsky.graph.getBlocks", - "app.bsky.graph.getFollowers", - "app.bsky.graph.getFollows", - "app.bsky.graph.getKnownFollowers", - "app.bsky.graph.getList", - "app.bsky.graph.getListBlocks", - "app.bsky.graph.getListMutes", - "app.bsky.graph.getLists", - "app.bsky.graph.getListsWithMembership", - "app.bsky.graph.getMutes", - "app.bsky.graph.getRelationships", - "app.bsky.graph.getStarterPack", - "app.bsky.graph.getStarterPacks", - "app.bsky.graph.getStarterPacksWithMembership", - "app.bsky.graph.getSuggestedFollowsByActor", - "app.bsky.graph.muteActor", - "app.bsky.graph.muteActorList", - "app.bsky.graph.muteThread", - "app.bsky.graph.searchStarterPacks", - "app.bsky.graph.unmuteActor", - "app.bsky.graph.unmuteActorList", - "app.bsky.graph.unmuteThread", - "app.bsky.labeler.getServices", - "app.bsky.notification.getPreferences", - "app.bsky.notification.getUnreadCount", - "app.bsky.notification.listActivitySubscriptions", - "app.bsky.notification.listNotifications", - "app.bsky.notification.putActivitySubscription", - "app.bsky.notification.putPreferences", - "app.bsky.notification.putPreferencesV2", - "app.bsky.notification.registerPush", - "app.bsky.notification.unregisterPush", - "app.bsky.notification.updateSeen", - "app.bsky.unspecced.getAgeAssuranceState", - "app.bsky.unspecced.getConfig", - "app.bsky.unspecced.getOnboardingSuggestedStarterPacks", - "app.bsky.unspecced.getPopularFeedGenerators", - "app.bsky.unspecced.getPostThreadOtherV2", - "app.bsky.unspecced.getPostThreadV2", - "app.bsky.unspecced.getSuggestedFeeds", - "app.bsky.unspecced.getSuggestedFeedsSkeleton", - "app.bsky.unspecced.getSuggestedStarterPacks", - "app.bsky.unspecced.getSuggestedStarterPacksSkeleton", - "app.bsky.unspecced.getSuggestedUsers", - "app.bsky.unspecced.getSuggestedUsersSkeleton", - "app.bsky.unspecced.getSuggestionsSkeleton", - "app.bsky.unspecced.getTaggedSuggestions", - "app.bsky.unspecced.getTrendingTopics", - "app.bsky.unspecced.getTrends", - "app.bsky.unspecced.getTrendsSkeleton", - "app.bsky.unspecced.initAgeAssurance", - "app.bsky.unspecced.searchActorsSkeleton", - "app.bsky.unspecced.searchPostsSkeleton", - "app.bsky.unspecced.searchStarterPacksSkeleton", - "app.bsky.video.getJobStatus", - "app.bsky.video.getUploadLimits", - "app.bsky.video.uploadVideo", - ], - }, - { - "type": "permission", - "resource": "repo", - "action": [ - "create", - "update", - "delete", - ], - "collection": [ - "app.bsky.actor.profile", - "app.bsky.actor.status", - "app.bsky.feed.like", - "app.bsky.feed.post", - "app.bsky.feed.postgate", - "app.bsky.feed.repost", - "app.bsky.feed.threadgate", - "app.bsky.graph.block", - "app.bsky.graph.follow", - "app.bsky.graph.list", - "app.bsky.graph.listblock", - "app.bsky.graph.listitem", - "app.bsky.graph.starterpack", - "app.bsky.notification.declaration", - ], - }, - ], - }, - }, - }, - "AppBskyAuthManageModeration": { - "lexicon": 1, - "id": "app.bsky.authManageModeration", - "defs": { - "main": { - "type": "permission-set", - "title": "Manage Personal Moderation", - "title:lang": {}, - "detail": - "Control over blocks, mutes, mod lists, mod services, and preferences.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "rpc", - "inheritAud": true, - "lxm": [ - "app.bsky.actor.getPreferences", - "app.bsky.actor.putPreferences", - "app.bsky.graph.muteActor", - "app.bsky.graph.muteActorList", - "app.bsky.graph.muteThread", - "app.bsky.graph.unmuteActor", - "app.bsky.graph.unmuteActorList", - "app.bsky.graph.unmuteThread", - ], - }, - { - "type": "permission", - "resource": "repo", - "action": [ - "create", - "update", - "delete", - ], - "collection": [ - "app.bsky.graph.block", - "app.bsky.graph.listblock", - ], - }, - ], - }, - }, - }, - "AppBskyFeedGenerator": { - "lexicon": 1, - "id": "app.bsky.feed.generator", - "defs": { - "main": { - "type": "record", - "description": - "Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository.", - "key": "any", - "record": { - "type": "object", - "required": [ - "did", - "displayName", - "createdAt", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "displayName": { - "type": "string", - "maxGraphemes": 24, - "maxLength": 240, - }, - "description": { - "type": "string", - "maxGraphemes": 300, - "maxLength": 3000, - }, - "descriptionFacets": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.richtext.facet", - }, - }, - "avatar": { - "type": "blob", - "accept": [ - "image/png", - "image/jpeg", - ], - "maxSize": 1000000, - }, - "acceptsInteractions": { - "type": "boolean", - "description": - "Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions", - }, - "labels": { - "type": "union", - "description": "Self-label values", - "refs": [ - "lex:com.atproto.label.defs#selfLabels", - ], - }, - "contentMode": { - "type": "string", - "knownValues": [ - "app.bsky.feed.defs#contentModeUnspecified", - "app.bsky.feed.defs#contentModeVideo", - ], - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - }, - "AppBskyFeedSendInteractions": { - "lexicon": 1, - "id": "app.bsky.feed.sendInteractions", - "defs": { - "main": { - "type": "procedure", - "description": - "Send information about interactions with feed items back to the feed generator that served them.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "interactions", - ], - "properties": { - "feed": { - "type": "string", - "format": "at-uri", - }, - "interactions": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#interaction", - }, - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": {}, - }, - }, - }, - }, - }, - "AppBskyFeedDefs": { - "lexicon": 1, - "id": "app.bsky.feed.defs", - "defs": { - "postView": { - "type": "object", - "required": [ - "uri", - "cid", - "author", - "record", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "author": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileViewBasic", - }, - "record": { - "type": "unknown", - }, - "embed": { - "type": "union", - "refs": [ - "lex:app.bsky.embed.images#view", - "lex:app.bsky.embed.video#view", - "lex:app.bsky.embed.external#view", - "lex:app.bsky.embed.record#view", - "lex:app.bsky.embed.recordWithMedia#view", - ], - }, - "bookmarkCount": { - "type": "integer", - }, - "replyCount": { - "type": "integer", - }, - "repostCount": { - "type": "integer", - }, - "likeCount": { - "type": "integer", - }, - "quoteCount": { - "type": "integer", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "viewer": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#viewerState", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "threadgate": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#threadgateView", - }, - "debug": { - "type": "unknown", - "description": "Debug information for internal development", - }, - }, - }, - "viewerState": { - "type": "object", - "description": - "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.", - "properties": { - "repost": { - "type": "string", - "format": "at-uri", - }, - "like": { - "type": "string", - "format": "at-uri", - }, - "bookmarked": { - "type": "boolean", - }, - "threadMuted": { - "type": "boolean", - }, - "replyDisabled": { - "type": "boolean", - }, - "embeddingDisabled": { - "type": "boolean", - }, - "pinned": { - "type": "boolean", - }, - }, - }, - "threadContext": { - "type": "object", - "description": - "Metadata about this post within the context of the thread it is in.", - "properties": { - "rootAuthorLike": { - "type": "string", - "format": "at-uri", - }, - }, - }, - "feedViewPost": { - "type": "object", - "required": [ - "post", - ], - "properties": { - "post": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#postView", - }, - "reply": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#replyRef", - }, - "reason": { - "type": "union", - "refs": [ - "lex:app.bsky.feed.defs#reasonRepost", - "lex:app.bsky.feed.defs#reasonPin", - ], - }, - "feedContext": { - "type": "string", - "description": - "Context provided by feed generator that may be passed back alongside interactions.", - "maxLength": 2000, - }, - "reqId": { - "type": "string", - "description": - "Unique identifier per request that may be passed back alongside interactions.", - "maxLength": 100, - }, - }, - }, - "replyRef": { - "type": "object", - "required": [ - "root", - "parent", - ], - "properties": { - "root": { - "type": "union", - "refs": [ - "lex:app.bsky.feed.defs#postView", - "lex:app.bsky.feed.defs#notFoundPost", - "lex:app.bsky.feed.defs#blockedPost", - ], - }, - "parent": { - "type": "union", - "refs": [ - "lex:app.bsky.feed.defs#postView", - "lex:app.bsky.feed.defs#notFoundPost", - "lex:app.bsky.feed.defs#blockedPost", - ], - }, - "grandparentAuthor": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileViewBasic", - "description": - "When parent is a reply to another post, this is the author of that post.", - }, - }, - }, - "reasonRepost": { - "type": "object", - "required": [ - "by", - "indexedAt", - ], - "properties": { - "by": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileViewBasic", - }, - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "reasonPin": { - "type": "object", - "properties": {}, - }, - "threadViewPost": { - "type": "object", - "required": [ - "post", - ], - "properties": { - "post": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#postView", - }, - "parent": { - "type": "union", - "refs": [ - "lex:app.bsky.feed.defs#threadViewPost", - "lex:app.bsky.feed.defs#notFoundPost", - "lex:app.bsky.feed.defs#blockedPost", - ], - }, - "replies": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:app.bsky.feed.defs#threadViewPost", - "lex:app.bsky.feed.defs#notFoundPost", - "lex:app.bsky.feed.defs#blockedPost", - ], - }, - }, - "threadContext": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#threadContext", - }, - }, - }, - "notFoundPost": { - "type": "object", - "required": [ - "uri", - "notFound", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "notFound": { - "type": "boolean", - "const": true, - }, - }, - }, - "blockedPost": { - "type": "object", - "required": [ - "uri", - "blocked", - "author", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "blocked": { - "type": "boolean", - "const": true, - }, - "author": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#blockedAuthor", - }, - }, - }, - "blockedAuthor": { - "type": "object", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "viewer": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#viewerState", - }, - }, - }, - "generatorView": { - "type": "object", - "required": [ - "uri", - "cid", - "did", - "creator", - "displayName", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "did": { - "type": "string", - "format": "did", - }, - "creator": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - "displayName": { - "type": "string", - }, - "description": { - "type": "string", - "maxGraphemes": 300, - "maxLength": 3000, - }, - "descriptionFacets": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.richtext.facet", - }, - }, - "avatar": { - "type": "string", - "format": "uri", - }, - "likeCount": { - "type": "integer", - "minimum": 0, - }, - "acceptsInteractions": { - "type": "boolean", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "viewer": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#generatorViewerState", - }, - "contentMode": { - "type": "string", - "knownValues": [ - "app.bsky.feed.defs#contentModeUnspecified", - "app.bsky.feed.defs#contentModeVideo", - ], - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "generatorViewerState": { - "type": "object", - "properties": { - "like": { - "type": "string", - "format": "at-uri", - }, - }, - }, - "skeletonFeedPost": { - "type": "object", - "required": [ - "post", - ], - "properties": { - "post": { - "type": "string", - "format": "at-uri", - }, - "reason": { - "type": "union", - "refs": [ - "lex:app.bsky.feed.defs#skeletonReasonRepost", - "lex:app.bsky.feed.defs#skeletonReasonPin", - ], - }, - "feedContext": { - "type": "string", - "description": - "Context that will be passed through to client and may be passed to feed generator back alongside interactions.", - "maxLength": 2000, - }, - }, - }, - "skeletonReasonRepost": { - "type": "object", - "required": [ - "repost", - ], - "properties": { - "repost": { - "type": "string", - "format": "at-uri", - }, - }, - }, - "skeletonReasonPin": { - "type": "object", - "properties": {}, - }, - "threadgateView": { - "type": "object", - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "record": { - "type": "unknown", - }, - "lists": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listViewBasic", - }, - }, - }, - }, - "interaction": { - "type": "object", - "properties": { - "item": { - "type": "string", - "format": "at-uri", - }, - "event": { - "type": "string", - "knownValues": [ - "app.bsky.feed.defs#requestLess", - "app.bsky.feed.defs#requestMore", - "app.bsky.feed.defs#clickthroughItem", - "app.bsky.feed.defs#clickthroughAuthor", - "app.bsky.feed.defs#clickthroughReposter", - "app.bsky.feed.defs#clickthroughEmbed", - "app.bsky.feed.defs#interactionSeen", - "app.bsky.feed.defs#interactionLike", - "app.bsky.feed.defs#interactionRepost", - "app.bsky.feed.defs#interactionReply", - "app.bsky.feed.defs#interactionQuote", - "app.bsky.feed.defs#interactionShare", - ], - }, - "feedContext": { - "type": "string", - "description": - "Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.", - "maxLength": 2000, - }, - "reqId": { - "type": "string", - "description": - "Unique identifier per request that may be passed back alongside interactions.", - "maxLength": 100, - }, - }, - }, - "requestLess": { - "type": "token", - "description": - "Request that less content like the given feed item be shown in the feed", - }, - "requestMore": { - "type": "token", - "description": - "Request that more content like the given feed item be shown in the feed", - }, - "clickthroughItem": { - "type": "token", - "description": "User clicked through to the feed item", - }, - "clickthroughAuthor": { - "type": "token", - "description": "User clicked through to the author of the feed item", - }, - "clickthroughReposter": { - "type": "token", - "description": "User clicked through to the reposter of the feed item", - }, - "clickthroughEmbed": { - "type": "token", - "description": - "User clicked through to the embedded content of the feed item", - }, - "contentModeUnspecified": { - "type": "token", - "description": - "Declares the feed generator returns any types of posts.", - }, - "contentModeVideo": { - "type": "token", - "description": - "Declares the feed generator returns posts containing app.bsky.embed.video embeds.", - }, - "interactionSeen": { - "type": "token", - "description": "Feed item was seen by user", - }, - "interactionLike": { - "type": "token", - "description": "User liked the feed item", - }, - "interactionRepost": { - "type": "token", - "description": "User reposted the feed item", - }, - "interactionReply": { - "type": "token", - "description": "User replied to the feed item", - }, - "interactionQuote": { - "type": "token", - "description": "User quoted the feed item", - }, - "interactionShare": { - "type": "token", - "description": "User shared the feed item", - }, - }, - }, - "AppBskyFeedGetFeedGenerators": { - "lexicon": 1, - "id": "app.bsky.feed.getFeedGenerators", - "defs": { - "main": { - "type": "query", - "description": "Get information about a list of feed generators.", - "parameters": { - "type": "params", - "required": [ - "feeds", - ], - "properties": { - "feeds": { - "type": "array", - "items": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feeds", - ], - "properties": { - "feeds": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#generatorView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyFeedGetTimeline": { - "lexicon": 1, - "id": "app.bsky.feed.getTimeline", - "defs": { - "main": { - "type": "query", - "description": - "Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed.", - "parameters": { - "type": "params", - "properties": { - "algorithm": { - "type": "string", - "description": - "Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feed", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feed": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#feedViewPost", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyFeedGetFeedGenerator": { - "lexicon": 1, - "id": "app.bsky.feed.getFeedGenerator", - "defs": { - "main": { - "type": "query", - "description": - "Get information about a feed generator. Implemented by AppView.", - "parameters": { - "type": "params", - "required": [ - "feed", - ], - "properties": { - "feed": { - "type": "string", - "format": "at-uri", - "description": "AT-URI of the feed generator record.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "view", - "isOnline", - "isValid", - ], - "properties": { - "view": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#generatorView", - }, - "isOnline": { - "type": "boolean", - "description": - "Indicates whether the feed generator service has been online recently, or else seems to be inactive.", - }, - "isValid": { - "type": "boolean", - "description": - "Indicates whether the feed generator service is compatible with the record declaration.", - }, - }, - }, - }, - }, - }, - }, - "AppBskyFeedGetAuthorFeed": { - "lexicon": 1, - "id": "app.bsky.feed.getAuthorFeed", - "defs": { - "main": { - "type": "query", - "description": - "Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - "filter": { - "type": "string", - "description": - "Combinations of post/repost types to include in response.", - "knownValues": [ - "posts_with_replies", - "posts_no_replies", - "posts_with_media", - "posts_and_author_threads", - "posts_with_video", - ], - "default": "posts_with_replies", - }, - "includePins": { - "type": "boolean", - "default": false, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feed", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feed": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#feedViewPost", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "BlockedActor", - }, - { - "name": "BlockedByActor", - }, - ], - }, - }, - }, - "AppBskyFeedGetLikes": { - "lexicon": 1, - "id": "app.bsky.feed.getLikes", - "defs": { - "main": { - "type": "query", - "description": - "Get like records which reference a subject (by AT-URI and CID).", - "parameters": { - "type": "params", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - "description": "AT-URI of the subject (eg, a post record).", - }, - "cid": { - "type": "string", - "format": "cid", - "description": - "CID of the subject record (aka, specific version of record), to filter likes.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "uri", - "likes", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "cursor": { - "type": "string", - }, - "likes": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.getLikes#like", - }, - }, - }, - }, - }, - }, - "like": { - "type": "object", - "required": [ - "indexedAt", - "createdAt", - "actor", - ], - "properties": { - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "actor": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - }, - }, - }, - "AppBskyFeedPostgate": { - "lexicon": 1, - "id": "app.bsky.feed.postgate", - "defs": { - "main": { - "type": "record", - "key": "tid", - "description": - "Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository.", - "record": { - "type": "object", - "required": [ - "post", - "createdAt", - ], - "properties": { - "createdAt": { - "type": "string", - "format": "datetime", - }, - "post": { - "type": "string", - "format": "at-uri", - "description": "Reference (AT-URI) to the post record.", - }, - "detachedEmbeddingUris": { - "type": "array", - "maxLength": 50, - "items": { - "type": "string", - "format": "at-uri", - }, - "description": - "List of AT-URIs embedding this post that the author has detached from.", - }, - "embeddingRules": { - "description": - "List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed.", - "type": "array", - "maxLength": 5, - "items": { - "type": "union", - "refs": [ - "lex:app.bsky.feed.postgate#disableRule", - ], - }, - }, - }, - }, - }, - "disableRule": { - "type": "object", - "description": "Disables embedding of this post.", - "properties": {}, - }, - }, - }, - "AppBskyFeedThreadgate": { - "lexicon": 1, - "id": "app.bsky.feed.threadgate", - "defs": { - "main": { - "type": "record", - "key": "tid", - "description": - "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.", - "record": { - "type": "object", - "required": [ - "post", - "createdAt", - ], - "properties": { - "post": { - "type": "string", - "format": "at-uri", - "description": "Reference (AT-URI) to the post record.", - }, - "allow": { - "description": - "List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.", - "type": "array", - "maxLength": 5, - "items": { - "type": "union", - "refs": [ - "lex:app.bsky.feed.threadgate#mentionRule", - "lex:app.bsky.feed.threadgate#followerRule", - "lex:app.bsky.feed.threadgate#followingRule", - "lex:app.bsky.feed.threadgate#listRule", - ], - }, - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "hiddenReplies": { - "type": "array", - "maxLength": 300, - "items": { - "type": "string", - "format": "at-uri", - }, - "description": "List of hidden reply URIs.", - }, - }, - }, - }, - "mentionRule": { - "type": "object", - "description": "Allow replies from actors mentioned in your post.", - "properties": {}, - }, - "followerRule": { - "type": "object", - "description": "Allow replies from actors who follow you.", - "properties": {}, - }, - "followingRule": { - "type": "object", - "description": "Allow replies from actors you follow.", - "properties": {}, - }, - "listRule": { - "type": "object", - "description": "Allow replies from actors on a list.", - "required": [ - "list", - ], - "properties": { - "list": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - }, - "AppBskyFeedGetPostThread": { - "lexicon": 1, - "id": "app.bsky.feed.getPostThread", - "defs": { - "main": { - "type": "query", - "description": - "Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests.", - "parameters": { - "type": "params", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - "description": "Reference (AT-URI) to post record.", - }, - "depth": { - "type": "integer", - "description": - "How many levels of reply depth should be included in response.", - "default": 6, - "minimum": 0, - "maximum": 1000, - }, - "parentHeight": { - "type": "integer", - "description": - "How many levels of parent (and grandparent, etc) post to include.", - "default": 80, - "minimum": 0, - "maximum": 1000, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "thread", - ], - "properties": { - "thread": { - "type": "union", - "refs": [ - "lex:app.bsky.feed.defs#threadViewPost", - "lex:app.bsky.feed.defs#notFoundPost", - "lex:app.bsky.feed.defs#blockedPost", - ], - }, - "threadgate": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#threadgateView", - }, - }, - }, - }, - "errors": [ - { - "name": "NotFound", - }, - ], - }, - }, - }, - "AppBskyFeedGetActorLikes": { - "lexicon": 1, - "id": "app.bsky.feed.getActorLikes", - "defs": { - "main": { - "type": "query", - "description": - "Get a list of posts liked by an actor. Requires auth, actor must be the requesting account.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feed", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feed": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#feedViewPost", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "BlockedActor", - }, - { - "name": "BlockedByActor", - }, - ], - }, - }, - }, - "AppBskyFeedLike": { - "lexicon": 1, - "id": "app.bsky.feed.like", - "defs": { - "main": { - "type": "record", - "description": - "Record declaring a 'like' of a piece of subject content.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "subject", - "createdAt", - ], - "properties": { - "subject": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "via": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - }, - }, - }, - }, - }, - "AppBskyFeedGetRepostedBy": { - "lexicon": 1, - "id": "app.bsky.feed.getRepostedBy", - "defs": { - "main": { - "type": "query", - "description": "Get a list of reposts for a given post.", - "parameters": { - "type": "params", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - "description": "Reference (AT-URI) of post record", - }, - "cid": { - "type": "string", - "format": "cid", - "description": - "If supplied, filters to reposts of specific version (by CID) of the post record.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "uri", - "repostedBy", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "cursor": { - "type": "string", - }, - "repostedBy": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyFeedRepost": { - "lexicon": 1, - "id": "app.bsky.feed.repost", - "defs": { - "main": { - "description": - "Record representing a 'repost' of an existing Bluesky post.", - "type": "record", - "key": "tid", - "record": { - "type": "object", - "required": [ - "subject", - "createdAt", - ], - "properties": { - "subject": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "via": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - }, - }, - }, - }, - }, - "AppBskyFeedDescribeFeedGenerator": { - "lexicon": 1, - "id": "app.bsky.feed.describeFeedGenerator", - "defs": { - "main": { - "type": "query", - "description": - "Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View).", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "did", - "feeds", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "feeds": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.describeFeedGenerator#feed", - }, - }, - "links": { - "type": "ref", - "ref": "lex:app.bsky.feed.describeFeedGenerator#links", - }, - }, - }, - }, - }, - "feed": { - "type": "object", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - }, - }, - "links": { - "type": "object", - "properties": { - "privacyPolicy": { - "type": "string", - }, - "termsOfService": { - "type": "string", - }, - }, - }, - }, - }, - "AppBskyFeedSearchPosts": { - "lexicon": 1, - "id": "app.bsky.feed.searchPosts", - "defs": { - "main": { - "type": "query", - "description": - "Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations.", - "parameters": { - "type": "params", - "required": [ - "q", - ], - "properties": { - "q": { - "type": "string", - "description": - "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.", - }, - "sort": { - "type": "string", - "knownValues": [ - "top", - "latest", - ], - "default": "latest", - "description": "Specifies the ranking order of results.", - }, - "since": { - "type": "string", - "description": - "Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD).", - }, - "until": { - "type": "string", - "description": - "Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD).", - }, - "mentions": { - "type": "string", - "format": "at-identifier", - "description": - "Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions.", - }, - "author": { - "type": "string", - "format": "at-identifier", - "description": - "Filter to posts by the given account. Handles are resolved to DID before query-time.", - }, - "lang": { - "type": "string", - "format": "language", - "description": - "Filter to posts in the given language. Expected to be based on post language field, though server may override language detection.", - }, - "domain": { - "type": "string", - "description": - "Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization.", - }, - "url": { - "type": "string", - "format": "uri", - "description": - "Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching.", - }, - "tag": { - "type": "array", - "items": { - "type": "string", - "maxLength": 640, - "maxGraphemes": 64, - }, - "description": - "Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 25, - }, - "cursor": { - "type": "string", - "description": - "Optional pagination mechanism; may not necessarily allow scrolling through entire result set.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "posts", - ], - "properties": { - "cursor": { - "type": "string", - }, - "hitsTotal": { - "type": "integer", - "description": - "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.", - }, - "posts": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#postView", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "BadQueryString", - }, - ], - }, - }, - }, - "AppBskyFeedGetPosts": { - "lexicon": 1, - "id": "app.bsky.feed.getPosts", - "defs": { - "main": { - "type": "query", - "description": - "Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.", - "parameters": { - "type": "params", - "required": [ - "uris", - ], - "properties": { - "uris": { - "type": "array", - "description": - "List of post AT-URIs to return hydrated views for.", - "items": { - "type": "string", - "format": "at-uri", - }, - "maxLength": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "posts", - ], - "properties": { - "posts": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#postView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyFeedGetFeed": { - "lexicon": 1, - "id": "app.bsky.feed.getFeed", - "defs": { - "main": { - "type": "query", - "description": - "Get a hydrated feed from an actor's selected feed generator. Implemented by App View.", - "parameters": { - "type": "params", - "required": [ - "feed", - ], - "properties": { - "feed": { - "type": "string", - "format": "at-uri", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feed", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feed": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#feedViewPost", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "UnknownFeed", - }, - ], - }, - }, - }, - "AppBskyFeedGetQuotes": { - "lexicon": 1, - "id": "app.bsky.feed.getQuotes", - "defs": { - "main": { - "type": "query", - "description": "Get a list of quotes for a given post.", - "parameters": { - "type": "params", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - "description": "Reference (AT-URI) of post record", - }, - "cid": { - "type": "string", - "format": "cid", - "description": - "If supplied, filters to quotes of specific version (by CID) of the post record.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "uri", - "posts", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "cursor": { - "type": "string", - }, - "posts": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#postView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyFeedGetFeedSkeleton": { - "lexicon": 1, - "id": "app.bsky.feed.getFeedSkeleton", - "defs": { - "main": { - "type": "query", - "description": - "Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service.", - "parameters": { - "type": "params", - "required": [ - "feed", - ], - "properties": { - "feed": { - "type": "string", - "format": "at-uri", - "description": - "Reference to feed generator record describing the specific feed being requested.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feed", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feed": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#skeletonFeedPost", - }, - }, - "reqId": { - "type": "string", - "description": - "Unique identifier per request that may be passed back alongside interactions.", - "maxLength": 100, - }, - }, - }, - }, - "errors": [ - { - "name": "UnknownFeed", - }, - ], - }, - }, - }, - "AppBskyFeedGetListFeed": { - "lexicon": 1, - "id": "app.bsky.feed.getListFeed", - "defs": { - "main": { - "type": "query", - "description": - "Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth.", - "parameters": { - "type": "params", - "required": [ - "list", - ], - "properties": { - "list": { - "type": "string", - "format": "at-uri", - "description": "Reference (AT-URI) to the list record.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feed", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feed": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#feedViewPost", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "UnknownList", - }, - ], - }, - }, - }, - "AppBskyFeedGetSuggestedFeeds": { - "lexicon": 1, - "id": "app.bsky.feed.getSuggestedFeeds", - "defs": { - "main": { - "type": "query", - "description": - "Get a list of suggested feeds (feed generators) for the requesting account.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feeds", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feeds": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#generatorView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyFeedGetActorFeeds": { - "lexicon": 1, - "id": "app.bsky.feed.getActorFeeds", - "defs": { - "main": { - "type": "query", - "description": - "Get a list of feeds (feed generator records) created by the actor (in the actor's repo).", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feeds", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feeds": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.defs#generatorView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyFeedPost": { - "lexicon": 1, - "id": "app.bsky.feed.post", - "defs": { - "main": { - "type": "record", - "description": "Record containing a Bluesky post.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "text", - "createdAt", - ], - "properties": { - "text": { - "type": "string", - "maxLength": 3000, - "maxGraphemes": 300, - "description": - "The primary post content. May be an empty string, if there are embeds.", - }, - "entities": { - "type": "array", - "description": "DEPRECATED: replaced by app.bsky.richtext.facet.", - "items": { - "type": "ref", - "ref": "lex:app.bsky.feed.post#entity", - }, - }, - "facets": { - "type": "array", - "description": - "Annotations of text (mentions, URLs, hashtags, etc)", - "items": { - "type": "ref", - "ref": "lex:app.bsky.richtext.facet", - }, - }, - "reply": { - "type": "ref", - "ref": "lex:app.bsky.feed.post#replyRef", - }, - "embed": { - "type": "union", - "refs": [ - "lex:app.bsky.embed.images", - "lex:app.bsky.embed.video", - "lex:app.bsky.embed.external", - "lex:app.bsky.embed.record", - "lex:app.bsky.embed.recordWithMedia", - ], - }, - "langs": { - "type": "array", - "description": - "Indicates human language of post primary text content.", - "maxLength": 3, - "items": { - "type": "string", - "format": "language", - }, - }, - "labels": { - "type": "union", - "description": - "Self-label values for this post. Effectively content warnings.", - "refs": [ - "lex:com.atproto.label.defs#selfLabels", - ], - }, - "tags": { - "type": "array", - "description": - "Additional hashtags, in addition to any included in post text and facets.", - "maxLength": 8, - "items": { - "type": "string", - "maxLength": 640, - "maxGraphemes": 64, - }, - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": - "Client-declared timestamp when this post was originally created.", - }, - }, - }, - }, - "replyRef": { - "type": "object", - "required": [ - "root", - "parent", - ], - "properties": { - "root": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "parent": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - }, - }, - "entity": { - "type": "object", - "description": "Deprecated: use facets instead.", - "required": [ - "index", - "type", - "value", - ], - "properties": { - "index": { - "type": "ref", - "ref": "lex:app.bsky.feed.post#textSlice", - }, - "type": { - "type": "string", - "description": "Expected values are 'mention' and 'link'.", - }, - "value": { - "type": "string", - }, - }, - }, - "textSlice": { - "type": "object", - "description": - "Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings.", - "required": [ - "start", - "end", - ], - "properties": { - "start": { - "type": "integer", - "minimum": 0, - }, - "end": { - "type": "integer", - "minimum": 0, - }, - }, - }, - }, - }, - "AppBskyRichtextFacet": { - "lexicon": 1, - "id": "app.bsky.richtext.facet", - "defs": { - "main": { - "type": "object", - "description": "Annotation of a sub-string within rich text.", - "required": [ - "index", - "features", - ], - "properties": { - "index": { - "type": "ref", - "ref": "lex:app.bsky.richtext.facet#byteSlice", - }, - "features": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:app.bsky.richtext.facet#mention", - "lex:app.bsky.richtext.facet#link", - "lex:app.bsky.richtext.facet#tag", - ], - }, - }, - }, - }, - "mention": { - "type": "object", - "description": - "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - "link": { - "type": "object", - "description": - "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "uri", - }, - }, - }, - "tag": { - "type": "object", - "description": - "Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').", - "required": [ - "tag", - ], - "properties": { - "tag": { - "type": "string", - "maxLength": 640, - "maxGraphemes": 64, - }, - }, - }, - "byteSlice": { - "type": "object", - "description": - "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.", - "required": [ - "byteStart", - "byteEnd", - ], - "properties": { - "byteStart": { - "type": "integer", - "minimum": 0, - }, - "byteEnd": { - "type": "integer", - "minimum": 0, - }, - }, - }, - }, - }, - "AppBskyAuthViewAll": { - "lexicon": 1, - "id": "app.bsky.authViewAll", - "defs": { - "main": { - "type": "permission-set", - "title": "Read-only access to all content", - "title:lang": {}, - "detail": - "View Bluesky network content from account perspective, and read all notifications and preferences.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "rpc", - "inheritAud": true, - "lxm": [ - "app.bsky.actor.getPreferences", - "app.bsky.actor.getProfile", - "app.bsky.actor.getProfiles", - "app.bsky.actor.getSuggestions", - "app.bsky.actor.searchActors", - "app.bsky.actor.searchActorsTypeahead", - "app.bsky.bookmark.getBookmarks", - "app.bsky.feed.describeFeedGenerator", - "app.bsky.feed.getActorFeeds", - "app.bsky.feed.getActorLikes", - "app.bsky.feed.getAuthorFeed", - "app.bsky.feed.getFeed", - "app.bsky.feed.getFeedGenerator", - "app.bsky.feed.getFeedGenerators", - "app.bsky.feed.getFeedSkeleton", - "app.bsky.feed.getLikes", - "app.bsky.feed.getListFeed", - "app.bsky.feed.getPostThread", - "app.bsky.feed.getPosts", - "app.bsky.feed.getQuotes", - "app.bsky.feed.getRepostedBy", - "app.bsky.feed.getSuggestedFeeds", - "app.bsky.feed.getTimeline", - "app.bsky.feed.searchPosts", - "app.bsky.graph.getActorStarterPacks", - "app.bsky.graph.getBlocks", - "app.bsky.graph.getFollowers", - "app.bsky.graph.getFollows", - "app.bsky.graph.getKnownFollowers", - "app.bsky.graph.getListBlocks", - "app.bsky.graph.getListMutes", - "app.bsky.graph.getLists", - "app.bsky.graph.getListsWithMembership", - "app.bsky.graph.getMutes", - "app.bsky.graph.getRelationships", - "app.bsky.graph.getStarterPack", - "app.bsky.graph.getStarterPacks", - "app.bsky.graph.getStarterPacksWithMembership", - "app.bsky.graph.getSuggestedFollowsByActor", - "app.bsky.graph.searchStarterPacks", - "app.bsky.labeler.getServices", - "app.bsky.notification.getPreferences", - "app.bsky.notification.getUnreadCount", - "app.bsky.notification.listActivitySubscriptions", - "app.bsky.notification.listNotifications", - "app.bsky.notification.updateSeen", - "app.bsky.unspecced.getAgeAssuranceState", - "app.bsky.unspecced.getConfig", - "app.bsky.unspecced.getOnboardingSuggestedStarterPacks", - "app.bsky.unspecced.getPopularFeedGenerators", - "app.bsky.unspecced.getPostThreadOtherV2", - "app.bsky.unspecced.getPostThreadV2", - "app.bsky.unspecced.getSuggestedFeeds", - "app.bsky.unspecced.getSuggestedFeedsSkeleton", - "app.bsky.unspecced.getSuggestedStarterPacks", - "app.bsky.unspecced.getSuggestedStarterPacksSkeleton", - "app.bsky.unspecced.getSuggestedUsers", - "app.bsky.unspecced.getSuggestedUsersSkeleton", - "app.bsky.unspecced.getSuggestionsSkeleton", - "app.bsky.unspecced.getTaggedSuggestions", - "app.bsky.unspecced.getTrendingTopics", - "app.bsky.unspecced.getTrends", - "app.bsky.unspecced.getTrendsSkeleton", - "app.bsky.unspecced.searchActorsSkeleton", - "app.bsky.unspecced.searchPostsSkeleton", - "app.bsky.unspecced.searchStarterPacksSkeleton", - "app.bsky.video.getUploadLimits", - ], - }, - ], - }, - }, - }, - "AppBskyAuthManageFeedDeclarations": { - "lexicon": 1, - "id": "app.bsky.authManageFeedDeclarations", - "defs": { - "main": { - "type": "permission-set", - "title": "Manage Hosted Feeds", - "title:lang": {}, - "detail": "Configure feed generator declaration records.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "repo", - "action": [ - "create", - "update", - "delete", - ], - "collection": [ - "app.bsky.feed.generator", - ], - }, - ], - }, - }, - }, - "AppBskyAgeassuranceBegin": { - "lexicon": 1, - "id": "app.bsky.ageassurance.begin", - "defs": { - "main": { - "type": "procedure", - "description": "Initiate Age Assurance for an account.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "email", - "language", - "countryCode", - ], - "properties": { - "email": { - "type": "string", - "description": - "The user's email address to receive Age Assurance instructions.", - }, - "language": { - "type": "string", - "description": - "The user's preferred language for communication during the Age Assurance process.", - }, - "countryCode": { - "type": "string", - "description": - "An ISO 3166-1 alpha-2 code of the user's location.", - }, - "regionCode": { - "type": "string", - "description": - "An optional ISO 3166-2 code of the user's region or state within the country.", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#state", - }, - }, - "errors": [ - { - "name": "InvalidEmail", - }, - { - "name": "DidTooLong", - }, - { - "name": "InvalidInitiation", - }, - { - "name": "RegionNotSupported", - }, - ], - }, - }, - }, - "AppBskyAgeassuranceDefs": { - "lexicon": 1, - "id": "app.bsky.ageassurance.defs", - "defs": { - "access": { - "description": - "The access level granted based on Age Assurance data we've processed.", - "type": "string", - "knownValues": [ - "unknown", - "none", - "safe", - "full", - ], - }, - "status": { - "type": "string", - "description": "The status of the Age Assurance process.", - "knownValues": [ - "unknown", - "pending", - "assured", - "blocked", - ], - }, - "state": { - "type": "object", - "description": "The user's computed Age Assurance state.", - "required": [ - "status", - "access", - ], - "properties": { - "lastInitiatedAt": { - "type": "string", - "format": "datetime", - "description": "The timestamp when this state was last updated.", - }, - "status": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#status", - }, - "access": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#access", - }, - }, - }, - "stateMetadata": { - "type": "object", - "description": - "Additional metadata needed to compute Age Assurance state client-side.", - "required": [], - "properties": { - "accountCreatedAt": { - "type": "string", - "format": "datetime", - "description": "The account creation timestamp.", - }, - }, - }, - "config": { - "type": "object", - "description": "", - "required": [ - "regions", - ], - "properties": { - "regions": { - "type": "array", - "description": "The per-region Age Assurance configuration.", - "items": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#configRegion", - }, - }, - }, - }, - "configRegion": { - "type": "object", - "description": "The Age Assurance configuration for a specific region.", - "required": [ - "countryCode", - "minAccessAge", - "rules", - ], - "properties": { - "countryCode": { - "type": "string", - "description": - "The ISO 3166-1 alpha-2 country code this configuration applies to.", - }, - "regionCode": { - "type": "string", - "description": - "The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country.", - }, - "minAccessAge": { - "type": "integer", - "description": - "The minimum age (as a whole integer) required to use Bluesky in this region.", - }, - "rules": { - "type": "array", - "description": - "The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item.", - "items": { - "type": "union", - "refs": [ - "lex:app.bsky.ageassurance.defs#configRegionRuleDefault", - "lex:app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge", - "lex:app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge", - "lex:app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge", - "lex:app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge", - "lex:app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan", - "lex:app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan", - ], - }, - }, - }, - }, - "configRegionRuleDefault": { - "type": "object", - "description": "Age Assurance rule that applies by default.", - "required": [ - "access", - ], - "properties": { - "access": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#access", - }, - }, - }, - "configRegionRuleIfDeclaredOverAge": { - "type": "object", - "description": - "Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age.", - "required": [ - "age", - "access", - ], - "properties": { - "age": { - "type": "integer", - "description": "The age threshold as a whole integer.", - }, - "access": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#access", - }, - }, - }, - "configRegionRuleIfDeclaredUnderAge": { - "type": "object", - "description": - "Age Assurance rule that applies if the user has declared themselves under a certain age.", - "required": [ - "age", - "access", - ], - "properties": { - "age": { - "type": "integer", - "description": "The age threshold as a whole integer.", - }, - "access": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#access", - }, - }, - }, - "configRegionRuleIfAssuredOverAge": { - "type": "object", - "description": - "Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age.", - "required": [ - "age", - "access", - ], - "properties": { - "age": { - "type": "integer", - "description": "The age threshold as a whole integer.", - }, - "access": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#access", - }, - }, - }, - "configRegionRuleIfAssuredUnderAge": { - "type": "object", - "description": - "Age Assurance rule that applies if the user has been assured to be under a certain age.", - "required": [ - "age", - "access", - ], - "properties": { - "age": { - "type": "integer", - "description": "The age threshold as a whole integer.", - }, - "access": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#access", - }, - }, - }, - "configRegionRuleIfAccountNewerThan": { - "type": "object", - "description": - "Age Assurance rule that applies if the account is equal-to or newer than a certain date.", - "required": [ - "date", - "access", - ], - "properties": { - "date": { - "type": "string", - "format": "datetime", - "description": "The date threshold as a datetime string.", - }, - "access": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#access", - }, - }, - }, - "configRegionRuleIfAccountOlderThan": { - "type": "object", - "description": - "Age Assurance rule that applies if the account is older than a certain date.", - "required": [ - "date", - "access", - ], - "properties": { - "date": { - "type": "string", - "format": "datetime", - "description": "The date threshold as a datetime string.", - }, - "access": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#access", - }, - }, - }, - "event": { - "type": "object", - "description": "Object used to store Age Assurance data in stash.", - "required": [ - "createdAt", - "status", - "access", - "attemptId", - "countryCode", - ], - "properties": { - "createdAt": { - "type": "string", - "format": "datetime", - "description": "The date and time of this write operation.", - }, - "attemptId": { - "type": "string", - "description": - "The unique identifier for this instance of the Age Assurance flow, in UUID format.", - }, - "status": { - "type": "string", - "description": "The status of the Age Assurance process.", - "knownValues": [ - "unknown", - "pending", - "assured", - "blocked", - ], - }, - "access": { - "description": - "The access level granted based on Age Assurance data we've processed.", - "type": "string", - "knownValues": [ - "unknown", - "none", - "safe", - "full", - ], - }, - "countryCode": { - "type": "string", - "description": - "The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow.", - }, - "regionCode": { - "type": "string", - "description": - "The ISO 3166-2 region code provided when beginning the Age Assurance flow.", - }, - "email": { - "type": "string", - "description": "The email used for Age Assurance.", - }, - "initIp": { - "type": "string", - "description": - "The IP address used when initiating the Age Assurance flow.", - }, - "initUa": { - "type": "string", - "description": - "The user agent used when initiating the Age Assurance flow.", - }, - "completeIp": { - "type": "string", - "description": - "The IP address used when completing the Age Assurance flow.", - }, - "completeUa": { - "type": "string", - "description": - "The user agent used when completing the Age Assurance flow.", - }, - }, - }, - }, - }, - "AppBskyAgeassuranceGetState": { - "lexicon": 1, - "id": "app.bsky.ageassurance.getState", - "defs": { - "main": { - "type": "query", - "description": - "Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side.", - "parameters": { - "type": "params", - "required": [ - "countryCode", - ], - "properties": { - "countryCode": { - "type": "string", - }, - "regionCode": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "state", - "metadata", - ], - "properties": { - "state": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#state", - }, - "metadata": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#stateMetadata", - }, - }, - }, - }, - }, - }, - }, - "AppBskyAgeassuranceGetConfig": { - "lexicon": 1, - "id": "app.bsky.ageassurance.getConfig", - "defs": { - "main": { - "type": "query", - "description": - "Returns Age Assurance configuration for use on the client.", - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:app.bsky.ageassurance.defs#config", - }, - }, - }, - }, - }, - "AppBskyAuthManageProfile": { - "lexicon": 1, - "id": "app.bsky.authManageProfile", - "defs": { - "main": { - "type": "permission-set", - "title": "Manage Bluesky Profile", - "title:lang": {}, - "detail": - "Update profile data, as well as status and public chat visibility.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "repo", - "action": [ - "create", - "update", - "delete", - ], - "collection": [ - "app.bsky.actor.profile", - "app.bsky.actor.status", - "app.bsky.notification.declaration", - ], - }, - ], - }, - }, - }, - "AppBskyActorSearchActorsTypeahead": { - "lexicon": 1, - "id": "app.bsky.actor.searchActorsTypeahead", - "defs": { - "main": { - "type": "query", - "description": - "Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.", - "parameters": { - "type": "params", - "properties": { - "term": { - "type": "string", - "description": "DEPRECATED: use 'q' instead.", - }, - "q": { - "type": "string", - "description": "Search query prefix; not a full query string.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 10, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actors", - ], - "properties": { - "actors": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileViewBasic", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyActorDefs": { - "lexicon": 1, - "id": "app.bsky.actor.defs", - "defs": { - "profileViewBasic": { - "type": "object", - "required": [ - "did", - "handle", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "handle": { - "type": "string", - "format": "handle", - }, - "displayName": { - "type": "string", - "maxGraphemes": 64, - "maxLength": 640, - }, - "pronouns": { - "type": "string", - }, - "avatar": { - "type": "string", - "format": "uri", - }, - "associated": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileAssociated", - }, - "viewer": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#viewerState", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "verification": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#verificationState", - }, - "status": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#statusView", - }, - "debug": { - "type": "unknown", - "description": "Debug information for internal development", - }, - }, - }, - "profileView": { - "type": "object", - "required": [ - "did", - "handle", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "handle": { - "type": "string", - "format": "handle", - }, - "displayName": { - "type": "string", - "maxGraphemes": 64, - "maxLength": 640, - }, - "pronouns": { - "type": "string", - }, - "description": { - "type": "string", - "maxGraphemes": 256, - "maxLength": 2560, - }, - "avatar": { - "type": "string", - "format": "uri", - }, - "associated": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileAssociated", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "viewer": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#viewerState", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "verification": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#verificationState", - }, - "status": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#statusView", - }, - "debug": { - "type": "unknown", - "description": "Debug information for internal development", - }, - }, - }, - "profileViewDetailed": { - "type": "object", - "required": [ - "did", - "handle", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "handle": { - "type": "string", - "format": "handle", - }, - "displayName": { - "type": "string", - "maxGraphemes": 64, - "maxLength": 640, - }, - "description": { - "type": "string", - "maxGraphemes": 256, - "maxLength": 2560, - }, - "pronouns": { - "type": "string", - }, - "website": { - "type": "string", - "format": "uri", - }, - "avatar": { - "type": "string", - "format": "uri", - }, - "banner": { - "type": "string", - "format": "uri", - }, - "followersCount": { - "type": "integer", - }, - "followsCount": { - "type": "integer", - }, - "postsCount": { - "type": "integer", - }, - "associated": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileAssociated", - }, - "joinedViaStarterPack": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#starterPackViewBasic", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "viewer": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#viewerState", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "pinnedPost": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "verification": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#verificationState", - }, - "status": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#statusView", - }, - "debug": { - "type": "unknown", - "description": "Debug information for internal development", - }, - }, - }, - "profileAssociated": { - "type": "object", - "properties": { - "lists": { - "type": "integer", - }, - "feedgens": { - "type": "integer", - }, - "starterPacks": { - "type": "integer", - }, - "labeler": { - "type": "boolean", - }, - "chat": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileAssociatedChat", - }, - "activitySubscription": { - "type": "ref", - "ref": - "lex:app.bsky.actor.defs#profileAssociatedActivitySubscription", - }, - "germ": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileAssociatedGerm", - }, - }, - }, - "profileAssociatedChat": { - "type": "object", - "required": [ - "allowIncoming", - ], - "properties": { - "allowIncoming": { - "type": "string", - "knownValues": [ - "all", - "none", - "following", - ], - }, - }, - }, - "profileAssociatedGerm": { - "type": "object", - "required": [ - "showButtonTo", - "messageMeUrl", - ], - "properties": { - "messageMeUrl": { - "type": "string", - "format": "uri", - }, - "showButtonTo": { - "type": "string", - "knownValues": [ - "usersIFollow", - "everyone", - ], - }, - }, - }, - "profileAssociatedActivitySubscription": { - "type": "object", - "required": [ - "allowSubscriptions", - ], - "properties": { - "allowSubscriptions": { - "type": "string", - "knownValues": [ - "followers", - "mutuals", - "none", - ], - }, - }, - }, - "viewerState": { - "type": "object", - "description": - "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.", - "properties": { - "muted": { - "type": "boolean", - }, - "mutedByList": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listViewBasic", - }, - "blockedBy": { - "type": "boolean", - }, - "blocking": { - "type": "string", - "format": "at-uri", - }, - "blockingByList": { - "type": "ref", - "ref": "lex:app.bsky.graph.defs#listViewBasic", - }, - "following": { - "type": "string", - "format": "at-uri", - }, - "followedBy": { - "type": "string", - "format": "at-uri", - }, - "knownFollowers": { - "description": - "This property is present only in selected cases, as an optimization.", - "type": "ref", - "ref": "lex:app.bsky.actor.defs#knownFollowers", - }, - "activitySubscription": { - "description": - "This property is present only in selected cases, as an optimization.", - "type": "ref", - "ref": "lex:app.bsky.notification.defs#activitySubscription", - }, - }, - }, - "knownFollowers": { - "type": "object", - "description": "The subject's followers whom you also follow", - "required": [ - "count", - "followers", - ], - "properties": { - "count": { - "type": "integer", - }, - "followers": { - "type": "array", - "minLength": 0, - "maxLength": 5, - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileViewBasic", - }, - }, - }, - }, - "verificationState": { - "type": "object", - "description": - "Represents the verification information about the user this object is attached to.", - "required": [ - "verifications", - "verifiedStatus", - "trustedVerifierStatus", - ], - "properties": { - "verifications": { - "type": "array", - "description": - "All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#verificationView", - }, - }, - "verifiedStatus": { - "type": "string", - "description": "The user's status as a verified account.", - "knownValues": [ - "valid", - "invalid", - "none", - ], - }, - "trustedVerifierStatus": { - "type": "string", - "description": "The user's status as a trusted verifier.", - "knownValues": [ - "valid", - "invalid", - "none", - ], - }, - }, - }, - "verificationView": { - "type": "object", - "description": "An individual verification for an associated subject.", - "required": [ - "issuer", - "uri", - "isValid", - "createdAt", - ], - "properties": { - "issuer": { - "type": "string", - "description": "The user who issued this verification.", - "format": "did", - }, - "uri": { - "type": "string", - "description": "The AT-URI of the verification record.", - "format": "at-uri", - }, - "isValid": { - "type": "boolean", - "description": - "True if the verification passes validation, otherwise false.", - }, - "createdAt": { - "type": "string", - "description": "Timestamp when the verification was created.", - "format": "datetime", - }, - }, - }, - "preferences": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:app.bsky.actor.defs#adultContentPref", - "lex:app.bsky.actor.defs#contentLabelPref", - "lex:app.bsky.actor.defs#savedFeedsPref", - "lex:app.bsky.actor.defs#savedFeedsPrefV2", - "lex:app.bsky.actor.defs#personalDetailsPref", - "lex:app.bsky.actor.defs#declaredAgePref", - "lex:app.bsky.actor.defs#feedViewPref", - "lex:app.bsky.actor.defs#threadViewPref", - "lex:app.bsky.actor.defs#interestsPref", - "lex:app.bsky.actor.defs#mutedWordsPref", - "lex:app.bsky.actor.defs#hiddenPostsPref", - "lex:app.bsky.actor.defs#bskyAppStatePref", - "lex:app.bsky.actor.defs#labelersPref", - "lex:app.bsky.actor.defs#postInteractionSettingsPref", - "lex:app.bsky.actor.defs#verificationPrefs", - "lex:app.bsky.actor.defs#liveEventPreferences", - ], - }, - }, - "adultContentPref": { - "type": "object", - "required": [ - "enabled", - ], - "properties": { - "enabled": { - "type": "boolean", - "default": false, - }, - }, - }, - "contentLabelPref": { - "type": "object", - "required": [ - "label", - "visibility", - ], - "properties": { - "labelerDid": { - "type": "string", - "description": - "Which labeler does this preference apply to? If undefined, applies globally.", - "format": "did", - }, - "label": { - "type": "string", - }, - "visibility": { - "type": "string", - "knownValues": [ - "ignore", - "show", - "warn", - "hide", - ], - }, - }, - }, - "savedFeed": { - "type": "object", - "required": [ - "id", - "type", - "value", - "pinned", - ], - "properties": { - "id": { - "type": "string", - }, - "type": { - "type": "string", - "knownValues": [ - "feed", - "list", - "timeline", - ], - }, - "value": { - "type": "string", - }, - "pinned": { - "type": "boolean", - }, - }, - }, - "savedFeedsPrefV2": { - "type": "object", - "required": [ - "items", - ], - "properties": { - "items": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#savedFeed", - }, - }, - }, - }, - "savedFeedsPref": { - "type": "object", - "required": [ - "pinned", - "saved", - ], - "properties": { - "pinned": { - "type": "array", - "items": { - "type": "string", - "format": "at-uri", - }, - }, - "saved": { - "type": "array", - "items": { - "type": "string", - "format": "at-uri", - }, - }, - "timelineIndex": { - "type": "integer", - }, - }, - }, - "personalDetailsPref": { - "type": "object", - "properties": { - "birthDate": { - "type": "string", - "format": "datetime", - "description": "The birth date of account owner.", - }, - }, - }, - "declaredAgePref": { - "type": "object", - "description": - "Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration.", - "properties": { - "isOverAge13": { - "type": "boolean", - "description": - "Indicates if the user has declared that they are over 13 years of age.", - }, - "isOverAge16": { - "type": "boolean", - "description": - "Indicates if the user has declared that they are over 16 years of age.", - }, - "isOverAge18": { - "type": "boolean", - "description": - "Indicates if the user has declared that they are over 18 years of age.", - }, - }, - }, - "feedViewPref": { - "type": "object", - "required": [ - "feed", - ], - "properties": { - "feed": { - "type": "string", - "description": - "The URI of the feed, or an identifier which describes the feed.", - }, - "hideReplies": { - "type": "boolean", - "description": "Hide replies in the feed.", - }, - "hideRepliesByUnfollowed": { - "type": "boolean", - "description": - "Hide replies in the feed if they are not by followed users.", - "default": true, - }, - "hideRepliesByLikeCount": { - "type": "integer", - "description": - "Hide replies in the feed if they do not have this number of likes.", - }, - "hideReposts": { - "type": "boolean", - "description": "Hide reposts in the feed.", - }, - "hideQuotePosts": { - "type": "boolean", - "description": "Hide quote posts in the feed.", - }, - }, - }, - "threadViewPref": { - "type": "object", - "properties": { - "sort": { - "type": "string", - "description": "Sorting mode for threads.", - "knownValues": [ - "oldest", - "newest", - "most-likes", - "random", - "hotness", - ], - }, - }, - }, - "interestsPref": { - "type": "object", - "required": [ - "tags", - ], - "properties": { - "tags": { - "type": "array", - "maxLength": 100, - "items": { - "type": "string", - "maxLength": 640, - "maxGraphemes": 64, - }, - "description": - "A list of tags which describe the account owner's interests gathered during onboarding.", - }, - }, - }, - "mutedWordTarget": { - "type": "string", - "knownValues": [ - "content", - "tag", - ], - "maxLength": 640, - "maxGraphemes": 64, - }, - "mutedWord": { - "type": "object", - "description": "A word that the account owner has muted.", - "required": [ - "value", - "targets", - ], - "properties": { - "id": { - "type": "string", - }, - "value": { - "type": "string", - "description": "The muted word itself.", - "maxLength": 10000, - "maxGraphemes": 1000, - }, - "targets": { - "type": "array", - "description": "The intended targets of the muted word.", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#mutedWordTarget", - }, - }, - "actorTarget": { - "type": "string", - "description": - "Groups of users to apply the muted word to. If undefined, applies to all users.", - "knownValues": [ - "all", - "exclude-following", - ], - "default": "all", - }, - "expiresAt": { - "type": "string", - "format": "datetime", - "description": - "The date and time at which the muted word will expire and no longer be applied.", - }, - }, - }, - "mutedWordsPref": { - "type": "object", - "required": [ - "items", - ], - "properties": { - "items": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#mutedWord", - }, - "description": "A list of words the account owner has muted.", - }, - }, - }, - "hiddenPostsPref": { - "type": "object", - "required": [ - "items", - ], - "properties": { - "items": { - "type": "array", - "items": { - "type": "string", - "format": "at-uri", - }, - "description": - "A list of URIs of posts the account owner has hidden.", - }, - }, - }, - "labelersPref": { - "type": "object", - "required": [ - "labelers", - ], - "properties": { - "labelers": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#labelerPrefItem", - }, - }, - }, - }, - "labelerPrefItem": { - "type": "object", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - "bskyAppStatePref": { - "description": - "A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.", - "type": "object", - "properties": { - "activeProgressGuide": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#bskyAppProgressGuide", - }, - "queuedNudges": { - "description": - "An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.", - "type": "array", - "maxLength": 1000, - "items": { - "type": "string", - "maxLength": 100, - }, - }, - "nuxs": { - "description": "Storage for NUXs the user has encountered.", - "type": "array", - "maxLength": 100, - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#nux", - }, - }, - }, - }, - "bskyAppProgressGuide": { - "description": - "If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.", - "type": "object", - "required": [ - "guide", - ], - "properties": { - "guide": { - "type": "string", - "maxLength": 100, - }, - }, - }, - "nux": { - "type": "object", - "description": "A new user experiences (NUX) storage object", - "required": [ - "id", - "completed", - ], - "properties": { - "id": { - "type": "string", - "maxLength": 100, - }, - "completed": { - "type": "boolean", - "default": false, - }, - "data": { - "description": - "Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.", - "type": "string", - "maxLength": 3000, - "maxGraphemes": 300, - }, - "expiresAt": { - "type": "string", - "format": "datetime", - "description": - "The date and time at which the NUX will expire and should be considered completed.", - }, - }, - }, - "verificationPrefs": { - "type": "object", - "description": - "Preferences for how verified accounts appear in the app.", - "required": [], - "properties": { - "hideBadges": { - "description": - "Hide the blue check badges for verified accounts and trusted verifiers.", - "type": "boolean", - "default": false, - }, - }, - }, - "liveEventPreferences": { - "type": "object", - "description": "Preferences for live events.", - "properties": { - "hiddenFeedIds": { - "description": - "A list of feed IDs that the user has hidden from live events.", - "type": "array", - "items": { - "type": "string", - }, - }, - "hideAllFeeds": { - "description": "Whether to hide all feeds from live events.", - "type": "boolean", - "default": false, - }, - }, - }, - "postInteractionSettingsPref": { - "type": "object", - "description": - "Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.", - "required": [], - "properties": { - "threadgateAllowRules": { - "description": - "Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.", - "type": "array", - "maxLength": 5, - "items": { - "type": "union", - "refs": [ - "lex:app.bsky.feed.threadgate#mentionRule", - "lex:app.bsky.feed.threadgate#followerRule", - "lex:app.bsky.feed.threadgate#followingRule", - "lex:app.bsky.feed.threadgate#listRule", - ], - }, - }, - "postgateEmbeddingRules": { - "description": - "Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.", - "type": "array", - "maxLength": 5, - "items": { - "type": "union", - "refs": [ - "lex:app.bsky.feed.postgate#disableRule", - ], - }, - }, - }, - }, - "statusView": { - "type": "object", - "required": [ - "status", - "record", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "status": { - "type": "string", - "description": "The status for the account.", - "knownValues": [ - "app.bsky.actor.status#live", - ], - }, - "record": { - "type": "unknown", - }, - "embed": { - "type": "union", - "description": "An optional embed associated with the status.", - "refs": [ - "lex:app.bsky.embed.external#view", - ], - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "expiresAt": { - "type": "string", - "description": - "The date when this status will expire. The application might choose to no longer return the status after expiration.", - "format": "datetime", - }, - "isActive": { - "type": "boolean", - "description": - "True if the status is not expired, false if it is expired. Only present if expiration was set.", - }, - "isDisabled": { - "type": "boolean", - "description": - "True if the user's go-live access has been disabled by a moderator, false otherwise.", - }, - }, - }, - }, - }, - "AppBskyActorPutPreferences": { - "lexicon": 1, - "id": "app.bsky.actor.putPreferences", - "defs": { - "main": { - "type": "procedure", - "description": "Set the private preferences attached to the account.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "preferences", - ], - "properties": { - "preferences": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#preferences", - }, - }, - }, - }, - }, - }, - }, - "AppBskyActorGetProfile": { - "lexicon": 1, - "id": "app.bsky.actor.getProfile", - "defs": { - "main": { - "type": "query", - "description": - "Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - "description": "Handle or DID of account to fetch profile of.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileViewDetailed", - }, - }, - }, - }, - }, - "AppBskyActorGetSuggestions": { - "lexicon": 1, - "id": "app.bsky.actor.getSuggestions", - "defs": { - "main": { - "type": "query", - "description": - "Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actors", - ], - "properties": { - "cursor": { - "type": "string", - }, - "actors": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - "recId": { - "type": "integer", - "description": "DEPRECATED: use recIdStr instead.", - }, - "recIdStr": { - "type": "string", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - }, - }, - }, - }, - }, - }, - "AppBskyActorSearchActors": { - "lexicon": 1, - "id": "app.bsky.actor.searchActors", - "defs": { - "main": { - "type": "query", - "description": - "Find actors (profiles) matching search criteria. Does not require auth.", - "parameters": { - "type": "params", - "properties": { - "term": { - "type": "string", - "description": "DEPRECATED: use 'q' instead.", - }, - "q": { - "type": "string", - "description": - "Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 25, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actors", - ], - "properties": { - "cursor": { - "type": "string", - }, - "actors": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyActorGetProfiles": { - "lexicon": 1, - "id": "app.bsky.actor.getProfiles", - "defs": { - "main": { - "type": "query", - "description": "Get detailed profile views of multiple actors.", - "parameters": { - "type": "params", - "required": [ - "actors", - ], - "properties": { - "actors": { - "type": "array", - "items": { - "type": "string", - "format": "at-identifier", - }, - "maxLength": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "profiles", - ], - "properties": { - "profiles": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileViewDetailed", - }, - }, - }, - }, - }, - }, - }, - }, - "AppBskyActorStatus": { - "lexicon": 1, - "id": "app.bsky.actor.status", - "defs": { - "main": { - "type": "record", - "description": "A declaration of a Bluesky account status.", - "key": "literal:self", - "record": { - "type": "object", - "required": [ - "status", - "createdAt", - ], - "properties": { - "status": { - "type": "string", - "description": "The status for the account.", - "knownValues": [ - "app.bsky.actor.status#live", - ], - }, - "embed": { - "type": "union", - "description": "An optional embed associated with the status.", - "refs": [ - "lex:app.bsky.embed.external", - ], - }, - "durationMinutes": { - "type": "integer", - "description": - "The duration of the status in minutes. Applications can choose to impose minimum and maximum limits.", - "minimum": 1, - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - "live": { - "type": "token", - "description": - "Advertises an account as currently offering live content.", - }, - }, - }, - "AppBskyActorGetPreferences": { - "lexicon": 1, - "id": "app.bsky.actor.getPreferences", - "defs": { - "main": { - "type": "query", - "description": - "Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.", - "parameters": { - "type": "params", - "properties": {}, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "preferences", - ], - "properties": { - "preferences": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#preferences", - }, - }, - }, - }, - }, - }, - }, - "AppBskyActorProfile": { - "lexicon": 1, - "id": "app.bsky.actor.profile", - "defs": { - "main": { - "type": "record", - "description": "A declaration of a Bluesky account profile.", - "key": "literal:self", - "record": { - "type": "object", - "properties": { - "displayName": { - "type": "string", - "maxGraphemes": 64, - "maxLength": 640, - }, - "description": { - "type": "string", - "description": "Free-form profile description text.", - "maxGraphemes": 256, - "maxLength": 2560, - }, - "pronouns": { - "type": "string", - "description": "Free-form pronouns text.", - "maxGraphemes": 20, - "maxLength": 200, - }, - "website": { - "type": "string", - "format": "uri", - }, - "avatar": { - "type": "blob", - "description": - "Small image to be displayed next to posts from account. AKA, 'profile picture'", - "accept": [ - "image/png", - "image/jpeg", - ], - "maxSize": 1000000, - }, - "banner": { - "type": "blob", - "description": - "Larger horizontal image to display behind profile view.", - "accept": [ - "image/png", - "image/jpeg", - ], - "maxSize": 1000000, - }, - "labels": { - "type": "union", - "description": - "Self-label values, specific to the Bluesky application, on the overall account.", - "refs": [ - "lex:com.atproto.label.defs#selfLabels", - ], - }, - "joinedViaStarterPack": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "pinnedPost": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - }, - "AppBskyLabelerDefs": { - "lexicon": 1, - "id": "app.bsky.labeler.defs", - "defs": { - "labelerView": { - "type": "object", - "required": [ - "uri", - "cid", - "creator", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "creator": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - "likeCount": { - "type": "integer", - "minimum": 0, - }, - "viewer": { - "type": "ref", - "ref": "lex:app.bsky.labeler.defs#labelerViewerState", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - }, - }, - "labelerViewDetailed": { - "type": "object", - "required": [ - "uri", - "cid", - "creator", - "policies", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "creator": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileView", - }, - "policies": { - "type": "ref", - "ref": "lex:app.bsky.labeler.defs#labelerPolicies", - }, - "likeCount": { - "type": "integer", - "minimum": 0, - }, - "viewer": { - "type": "ref", - "ref": "lex:app.bsky.labeler.defs#labelerViewerState", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "reasonTypes": { - "description": - "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.", - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.moderation.defs#reasonType", - }, - }, - "subjectTypes": { - "description": - "The set of subject types (account, record, etc) this service accepts reports on.", - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.moderation.defs#subjectType", - }, - }, - "subjectCollections": { - "type": "array", - "description": - "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.", - "items": { - "type": "string", - "format": "nsid", - }, - }, - }, - }, - "labelerViewerState": { - "type": "object", - "properties": { - "like": { - "type": "string", - "format": "at-uri", - }, - }, - }, - "labelerPolicies": { - "type": "object", - "required": [ - "labelValues", - ], - "properties": { - "labelValues": { - "type": "array", - "description": - "The label values which this labeler publishes. May include global or custom labels.", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#labelValue", - }, - }, - "labelValueDefinitions": { - "type": "array", - "description": - "Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#labelValueDefinition", - }, - }, - }, - }, - }, - }, - "AppBskyLabelerService": { - "lexicon": 1, - "id": "app.bsky.labeler.service", - "defs": { - "main": { - "type": "record", - "description": "A declaration of the existence of labeler service.", - "key": "literal:self", - "record": { - "type": "object", - "required": [ - "policies", - "createdAt", - ], - "properties": { - "policies": { - "type": "ref", - "ref": "lex:app.bsky.labeler.defs#labelerPolicies", - }, - "labels": { - "type": "union", - "refs": [ - "lex:com.atproto.label.defs#selfLabels", - ], - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "reasonTypes": { - "description": - "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.", - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.moderation.defs#reasonType", - }, - }, - "subjectTypes": { - "description": - "The set of subject types (account, record, etc) this service accepts reports on.", - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.moderation.defs#subjectType", - }, - }, - "subjectCollections": { - "type": "array", - "description": - "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.", - "items": { - "type": "string", - "format": "nsid", - }, - }, - }, - }, - }, - }, - }, - "AppBskyLabelerGetServices": { - "lexicon": 1, - "id": "app.bsky.labeler.getServices", - "defs": { - "main": { - "type": "query", - "description": "Get information about a list of labeler services.", - "parameters": { - "type": "params", - "required": [ - "dids", - ], - "properties": { - "dids": { - "type": "array", - "items": { - "type": "string", - "format": "did", - }, - }, - "detailed": { - "type": "boolean", - "default": false, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "views", - ], - "properties": { - "views": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:app.bsky.labeler.defs#labelerView", - "lex:app.bsky.labeler.defs#labelerViewDetailed", - ], - }, - }, - }, - }, - }, - }, - }, - }, - "ChatBskyConvoListConvos": { - "lexicon": 1, - "id": "chat.bsky.convo.listConvos", - "defs": { - "main": { - "type": "query", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - "readState": { - "type": "string", - "knownValues": [ - "unread", - ], - }, - "status": { - "type": "string", - "knownValues": [ - "request", - "accepted", - ], - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convos", - ], - "properties": { - "cursor": { - "type": "string", - }, - "convos": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#convoView", - }, - }, - }, - }, - }, - }, - }, - }, - "ChatBskyConvoUnmuteConvo": { - "lexicon": 1, - "id": "chat.bsky.convo.unmuteConvo", - "defs": { - "main": { - "type": "procedure", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convoId", - ], - "properties": { - "convoId": { - "type": "string", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convo", - ], - "properties": { - "convo": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#convoView", - }, - }, - }, - }, - }, - }, - }, - "ChatBskyConvoDefs": { - "lexicon": 1, - "id": "chat.bsky.convo.defs", - "defs": { - "messageRef": { - "type": "object", - "required": [ - "did", - "messageId", - "convoId", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "convoId": { - "type": "string", - }, - "messageId": { - "type": "string", - }, - }, - }, - "messageInput": { - "type": "object", - "required": [ - "text", - ], - "properties": { - "text": { - "type": "string", - "maxLength": 10000, - "maxGraphemes": 1000, - }, - "facets": { - "type": "array", - "description": - "Annotations of text (mentions, URLs, hashtags, etc)", - "items": { - "type": "ref", - "ref": "lex:app.bsky.richtext.facet", - }, - }, - "embed": { - "type": "union", - "refs": [ - "lex:app.bsky.embed.record", - ], - }, - }, - }, - "messageView": { - "type": "object", - "required": [ - "id", - "rev", - "text", - "sender", - "sentAt", - ], - "properties": { - "id": { - "type": "string", - }, - "rev": { - "type": "string", - }, - "text": { - "type": "string", - "maxLength": 10000, - "maxGraphemes": 1000, - }, - "facets": { - "type": "array", - "description": - "Annotations of text (mentions, URLs, hashtags, etc)", - "items": { - "type": "ref", - "ref": "lex:app.bsky.richtext.facet", - }, - }, - "embed": { - "type": "union", - "refs": [ - "lex:app.bsky.embed.record#view", - ], - }, - "reactions": { - "type": "array", - "description": - "Reactions to this message, in ascending order of creation time.", - "items": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#reactionView", - }, - }, - "sender": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#messageViewSender", - }, - "sentAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "deletedMessageView": { - "type": "object", - "required": [ - "id", - "rev", - "sender", - "sentAt", - ], - "properties": { - "id": { - "type": "string", - }, - "rev": { - "type": "string", - }, - "sender": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#messageViewSender", - }, - "sentAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "messageViewSender": { - "type": "object", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - "reactionView": { - "type": "object", - "required": [ - "value", - "sender", - "createdAt", - ], - "properties": { - "value": { - "type": "string", - }, - "sender": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#reactionViewSender", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "reactionViewSender": { - "type": "object", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - "messageAndReactionView": { - "type": "object", - "required": [ - "message", - "reaction", - ], - "properties": { - "message": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#messageView", - }, - "reaction": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#reactionView", - }, - }, - }, - "convoView": { - "type": "object", - "required": [ - "id", - "rev", - "members", - "muted", - "unreadCount", - ], - "properties": { - "id": { - "type": "string", - }, - "rev": { - "type": "string", - }, - "members": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:chat.bsky.actor.defs#profileViewBasic", - }, - }, - "lastMessage": { - "type": "union", - "refs": [ - "lex:chat.bsky.convo.defs#messageView", - "lex:chat.bsky.convo.defs#deletedMessageView", - ], - }, - "lastReaction": { - "type": "union", - "refs": [ - "lex:chat.bsky.convo.defs#messageAndReactionView", - ], - }, - "muted": { - "type": "boolean", - }, - "status": { - "type": "string", - "knownValues": [ - "request", - "accepted", - ], - }, - "unreadCount": { - "type": "integer", - }, - }, - }, - "logBeginConvo": { - "type": "object", - "required": [ - "rev", - "convoId", - ], - "properties": { - "rev": { - "type": "string", - }, - "convoId": { - "type": "string", - }, - }, - }, - "logAcceptConvo": { - "type": "object", - "required": [ - "rev", - "convoId", - ], - "properties": { - "rev": { - "type": "string", - }, - "convoId": { - "type": "string", - }, - }, - }, - "logLeaveConvo": { - "type": "object", - "required": [ - "rev", - "convoId", - ], - "properties": { - "rev": { - "type": "string", - }, - "convoId": { - "type": "string", - }, - }, - }, - "logMuteConvo": { - "type": "object", - "required": [ - "rev", - "convoId", - ], - "properties": { - "rev": { - "type": "string", - }, - "convoId": { - "type": "string", - }, - }, - }, - "logUnmuteConvo": { - "type": "object", - "required": [ - "rev", - "convoId", - ], - "properties": { - "rev": { - "type": "string", - }, - "convoId": { - "type": "string", - }, - }, - }, - "logCreateMessage": { - "type": "object", - "required": [ - "rev", - "convoId", - "message", - ], - "properties": { - "rev": { - "type": "string", - }, - "convoId": { - "type": "string", - }, - "message": { - "type": "union", - "refs": [ - "lex:chat.bsky.convo.defs#messageView", - "lex:chat.bsky.convo.defs#deletedMessageView", - ], - }, - }, - }, - "logDeleteMessage": { - "type": "object", - "required": [ - "rev", - "convoId", - "message", - ], - "properties": { - "rev": { - "type": "string", - }, - "convoId": { - "type": "string", - }, - "message": { - "type": "union", - "refs": [ - "lex:chat.bsky.convo.defs#messageView", - "lex:chat.bsky.convo.defs#deletedMessageView", - ], - }, - }, - }, - "logReadMessage": { - "type": "object", - "required": [ - "rev", - "convoId", - "message", - ], - "properties": { - "rev": { - "type": "string", - }, - "convoId": { - "type": "string", - }, - "message": { - "type": "union", - "refs": [ - "lex:chat.bsky.convo.defs#messageView", - "lex:chat.bsky.convo.defs#deletedMessageView", - ], - }, - }, - }, - "logAddReaction": { - "type": "object", - "required": [ - "rev", - "convoId", - "message", - "reaction", - ], - "properties": { - "rev": { - "type": "string", - }, - "convoId": { - "type": "string", - }, - "message": { - "type": "union", - "refs": [ - "lex:chat.bsky.convo.defs#messageView", - "lex:chat.bsky.convo.defs#deletedMessageView", - ], - }, - "reaction": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#reactionView", - }, - }, - }, - "logRemoveReaction": { - "type": "object", - "required": [ - "rev", - "convoId", - "message", - "reaction", - ], - "properties": { - "rev": { - "type": "string", - }, - "convoId": { - "type": "string", - }, - "message": { - "type": "union", - "refs": [ - "lex:chat.bsky.convo.defs#messageView", - "lex:chat.bsky.convo.defs#deletedMessageView", - ], - }, - "reaction": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#reactionView", - }, - }, - }, - }, - }, - "ChatBskyConvoGetConvoAvailability": { - "lexicon": 1, - "id": "chat.bsky.convo.getConvoAvailability", - "defs": { - "main": { - "type": "query", - "description": - "Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned.", - "parameters": { - "type": "params", - "required": [ - "members", - ], - "properties": { - "members": { - "type": "array", - "minLength": 1, - "maxLength": 10, - "items": { - "type": "string", - "format": "did", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "canChat", - ], - "properties": { - "canChat": { - "type": "boolean", - }, - "convo": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#convoView", - }, - }, - }, - }, - }, - }, - }, - "ChatBskyConvoGetLog": { - "lexicon": 1, - "id": "chat.bsky.convo.getLog", - "defs": { - "main": { - "type": "query", - "parameters": { - "type": "params", - "required": [], - "properties": { - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "logs", - ], - "properties": { - "cursor": { - "type": "string", - }, - "logs": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:chat.bsky.convo.defs#logBeginConvo", - "lex:chat.bsky.convo.defs#logAcceptConvo", - "lex:chat.bsky.convo.defs#logLeaveConvo", - "lex:chat.bsky.convo.defs#logMuteConvo", - "lex:chat.bsky.convo.defs#logUnmuteConvo", - "lex:chat.bsky.convo.defs#logCreateMessage", - "lex:chat.bsky.convo.defs#logDeleteMessage", - "lex:chat.bsky.convo.defs#logReadMessage", - "lex:chat.bsky.convo.defs#logAddReaction", - "lex:chat.bsky.convo.defs#logRemoveReaction", - ], - }, - }, - }, - }, - }, - }, - }, - }, - "ChatBskyConvoSendMessage": { - "lexicon": 1, - "id": "chat.bsky.convo.sendMessage", - "defs": { - "main": { - "type": "procedure", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convoId", - "message", - ], - "properties": { - "convoId": { - "type": "string", - }, - "message": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#messageInput", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#messageView", - }, - }, - }, - }, - }, - "ChatBskyConvoLeaveConvo": { - "lexicon": 1, - "id": "chat.bsky.convo.leaveConvo", - "defs": { - "main": { - "type": "procedure", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convoId", - ], - "properties": { - "convoId": { - "type": "string", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convoId", - "rev", - ], - "properties": { - "convoId": { - "type": "string", - }, - "rev": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "ChatBskyConvoAddReaction": { - "lexicon": 1, - "id": "chat.bsky.convo.addReaction", - "defs": { - "main": { - "type": "procedure", - "description": - "Adds an emoji reaction to a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in a single reaction.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convoId", - "messageId", - "value", - ], - "properties": { - "convoId": { - "type": "string", - }, - "messageId": { - "type": "string", - }, - "value": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "minGraphemes": 1, - "maxGraphemes": 1, - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "message", - ], - "properties": { - "message": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#messageView", - }, - }, - }, - }, - "errors": [ - { - "name": "ReactionMessageDeleted", - "description": - "Indicates that the message has been deleted and reactions can no longer be added/removed.", - }, - { - "name": "ReactionLimitReached", - "description": - "Indicates that the message has the maximum number of reactions allowed for a single user, and the requested reaction wasn't yet present. If it was already present, the request will not fail since it is idempotent.", - }, - { - "name": "ReactionInvalidValue", - "description": - "Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji.", - }, - ], - }, - }, - }, - "ChatBskyConvoAcceptConvo": { - "lexicon": 1, - "id": "chat.bsky.convo.acceptConvo", - "defs": { - "main": { - "type": "procedure", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convoId", - ], - "properties": { - "convoId": { - "type": "string", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "rev": { - "description": - "Rev when the convo was accepted. If not present, the convo was already accepted.", - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "ChatBskyConvoMuteConvo": { - "lexicon": 1, - "id": "chat.bsky.convo.muteConvo", - "defs": { - "main": { - "type": "procedure", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convoId", - ], - "properties": { - "convoId": { - "type": "string", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convo", - ], - "properties": { - "convo": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#convoView", - }, - }, - }, - }, - }, - }, - }, - "ChatBskyConvoDeleteMessageForSelf": { - "lexicon": 1, - "id": "chat.bsky.convo.deleteMessageForSelf", - "defs": { - "main": { - "type": "procedure", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convoId", - "messageId", - ], - "properties": { - "convoId": { - "type": "string", - }, - "messageId": { - "type": "string", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#deletedMessageView", - }, - }, - }, - }, - }, - "ChatBskyConvoRemoveReaction": { - "lexicon": 1, - "id": "chat.bsky.convo.removeReaction", - "defs": { - "main": { - "type": "procedure", - "description": - "Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn't.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convoId", - "messageId", - "value", - ], - "properties": { - "convoId": { - "type": "string", - }, - "messageId": { - "type": "string", - }, - "value": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "minGraphemes": 1, - "maxGraphemes": 1, - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "message", - ], - "properties": { - "message": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#messageView", - }, - }, - }, - }, - "errors": [ - { - "name": "ReactionMessageDeleted", - "description": - "Indicates that the message has been deleted and reactions can no longer be added/removed.", - }, - { - "name": "ReactionInvalidValue", - "description": - "Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji.", - }, - ], - }, - }, - }, - "ChatBskyConvoUpdateRead": { - "lexicon": 1, - "id": "chat.bsky.convo.updateRead", - "defs": { - "main": { - "type": "procedure", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convoId", - ], - "properties": { - "convoId": { - "type": "string", - }, - "messageId": { - "type": "string", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convo", - ], - "properties": { - "convo": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#convoView", - }, - }, - }, - }, - }, - }, - }, - "ChatBskyConvoUpdateAllRead": { - "lexicon": 1, - "id": "chat.bsky.convo.updateAllRead", - "defs": { - "main": { - "type": "procedure", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "knownValues": [ - "request", - "accepted", - ], - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "updatedCount", - ], - "properties": { - "updatedCount": { - "description": "The count of updated convos.", - "type": "integer", - }, - }, - }, - }, - }, - }, - }, - "ChatBskyConvoGetConvo": { - "lexicon": 1, - "id": "chat.bsky.convo.getConvo", - "defs": { - "main": { - "type": "query", - "parameters": { - "type": "params", - "required": [ - "convoId", - ], - "properties": { - "convoId": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convo", - ], - "properties": { - "convo": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#convoView", - }, - }, - }, - }, - }, - }, - }, - "ChatBskyConvoGetMessages": { - "lexicon": 1, - "id": "chat.bsky.convo.getMessages", - "defs": { - "main": { - "type": "query", - "parameters": { - "type": "params", - "required": [ - "convoId", - ], - "properties": { - "convoId": { - "type": "string", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "messages", - ], - "properties": { - "cursor": { - "type": "string", - }, - "messages": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:chat.bsky.convo.defs#messageView", - "lex:chat.bsky.convo.defs#deletedMessageView", - ], - }, - }, - }, - }, - }, - }, - }, - }, - "ChatBskyConvoGetConvoForMembers": { - "lexicon": 1, - "id": "chat.bsky.convo.getConvoForMembers", - "defs": { - "main": { - "type": "query", - "parameters": { - "type": "params", - "required": [ - "members", - ], - "properties": { - "members": { - "type": "array", - "minLength": 1, - "maxLength": 10, - "items": { - "type": "string", - "format": "did", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "convo", - ], - "properties": { - "convo": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#convoView", - }, - }, - }, - }, - }, - }, - }, - "ChatBskyConvoSendMessageBatch": { - "lexicon": 1, - "id": "chat.bsky.convo.sendMessageBatch", - "defs": { - "main": { - "type": "procedure", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "items", - ], - "properties": { - "items": { - "type": "array", - "maxLength": 100, - "items": { - "type": "ref", - "ref": "lex:chat.bsky.convo.sendMessageBatch#batchItem", - }, - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "items", - ], - "properties": { - "items": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#messageView", - }, - }, - }, - }, - }, - }, - "batchItem": { - "type": "object", - "required": [ - "convoId", - "message", - ], - "properties": { - "convoId": { - "type": "string", - }, - "message": { - "type": "ref", - "ref": "lex:chat.bsky.convo.defs#messageInput", - }, - }, - }, - }, - }, - "ChatBskyActorDefs": { - "lexicon": 1, - "id": "chat.bsky.actor.defs", - "defs": { - "profileViewBasic": { - "type": "object", - "required": [ - "did", - "handle", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "handle": { - "type": "string", - "format": "handle", - }, - "displayName": { - "type": "string", - "maxGraphemes": 64, - "maxLength": 640, - }, - "avatar": { - "type": "string", - "format": "uri", - }, - "associated": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#profileAssociated", - }, - "viewer": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#viewerState", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "chatDisabled": { - "type": "boolean", - "description": - "Set to true when the actor cannot actively participate in conversations", - }, - "verification": { - "type": "ref", - "ref": "lex:app.bsky.actor.defs#verificationState", - }, - }, - }, - }, - }, - "ChatBskyActorDeclaration": { - "lexicon": 1, - "id": "chat.bsky.actor.declaration", - "defs": { - "main": { - "type": "record", - "description": "A declaration of a Bluesky chat account.", - "key": "literal:self", - "record": { - "type": "object", - "required": [ - "allowIncoming", - ], - "properties": { - "allowIncoming": { - "type": "string", - "knownValues": [ - "all", - "none", - "following", - ], - }, - }, - }, - }, - }, - }, - "ChatBskyActorExportAccountData": { - "lexicon": 1, - "id": "chat.bsky.actor.exportAccountData", - "defs": { - "main": { - "type": "query", - "output": { - "encoding": "application/jsonl", - }, - }, - }, - }, - "ChatBskyActorDeleteAccount": { - "lexicon": 1, - "id": "chat.bsky.actor.deleteAccount", - "defs": { - "main": { - "type": "procedure", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": {}, - }, - }, - }, - }, - }, - "ChatBskyAuthFullChatClient": { - "lexicon": 1, - "id": "chat.bsky.authFullChatClient", - "defs": { - "main": { - "type": "permission-set", - "title": "Full Chat Client (All Conversations)", - "title:lang": {}, - "detail": - "Control of all chat conversations and configuration management.", - "detail:lang": { - "en": "All Chat Conversations", - }, - "permissions": [ - { - "type": "permission", - "resource": "rpc", - "inheritAud": true, - "lxm": [ - "chat.bsky.actor.deleteAccount", - "chat.bsky.actor.exportAccountData", - "chat.bsky.convo.acceptConvo", - "chat.bsky.convo.addReaction", - "chat.bsky.convo.deleteMessageForSelf", - "chat.bsky.convo.getConvo", - "chat.bsky.convo.getConvoAvailability", - "chat.bsky.convo.getConvoForMembers", - "chat.bsky.convo.getLog", - "chat.bsky.convo.getMessages", - "chat.bsky.convo.leaveConvo", - "chat.bsky.convo.listConvos", - "chat.bsky.convo.muteConvo", - "chat.bsky.convo.removeReaction", - "chat.bsky.convo.sendMessage", - "chat.bsky.convo.sendMessageBatch", - "chat.bsky.convo.unmuteConvo", - "chat.bsky.convo.updateAllRead", - "chat.bsky.convo.updateRead", - ], - }, - { - "type": "permission", - "resource": "repo", - "action": [ - "create", - "update", - "delete", - ], - "collection": [ - "chat.bsky.actor.declaration", - ], - }, - ], - }, - }, - }, - "ChatBskyModerationGetActorMetadata": { - "lexicon": 1, - "id": "chat.bsky.moderation.getActorMetadata", - "defs": { - "main": { - "type": "query", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "did", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "day", - "month", - "all", - ], - "properties": { - "day": { - "type": "ref", - "ref": "lex:chat.bsky.moderation.getActorMetadata#metadata", - }, - "month": { - "type": "ref", - "ref": "lex:chat.bsky.moderation.getActorMetadata#metadata", - }, - "all": { - "type": "ref", - "ref": "lex:chat.bsky.moderation.getActorMetadata#metadata", - }, - }, - }, - }, - }, - "metadata": { - "type": "object", - "required": [ - "messagesSent", - "messagesReceived", - "convos", - "convosStarted", - ], - "properties": { - "messagesSent": { - "type": "integer", - }, - "messagesReceived": { - "type": "integer", - }, - "convos": { - "type": "integer", - }, - "convosStarted": { - "type": "integer", - }, - }, - }, - }, - }, - "ChatBskyModerationGetMessageContext": { - "lexicon": 1, - "id": "chat.bsky.moderation.getMessageContext", - "defs": { - "main": { - "type": "query", - "parameters": { - "type": "params", - "required": [ - "messageId", - ], - "properties": { - "convoId": { - "type": "string", - "description": - "Conversation that the message is from. NOTE: this field will eventually be required.", - }, - "messageId": { - "type": "string", - }, - "before": { - "type": "integer", - "default": 5, - }, - "after": { - "type": "integer", - "default": 5, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "messages", - ], - "properties": { - "messages": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:chat.bsky.convo.defs#messageView", - "lex:chat.bsky.convo.defs#deletedMessageView", - ], - }, - }, - }, - }, - }, - }, - }, - }, - "ChatBskyModerationUpdateActorAccess": { - "lexicon": 1, - "id": "chat.bsky.moderation.updateActorAccess", - "defs": { - "main": { - "type": "procedure", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actor", - "allowAccess", - ], - "properties": { - "actor": { - "type": "string", - "format": "did", - }, - "allowAccess": { - "type": "boolean", - }, - "ref": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "SoSprkVideoUploadVideo": { - "lexicon": 1, - "id": "so.sprk.video.uploadVideo", - "defs": { - "main": { - "type": "procedure", - "description": "Upload a video to be processed then stored on the PDS.", - "input": { - "encoding": "video/mp4", - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "jobStatus", - ], - "properties": { - "jobStatus": { - "type": "ref", - "ref": "lex:so.sprk.video.defs#jobStatus", - }, - }, - }, - }, - }, - }, - }, - "SoSprkVideoDefs": { - "lexicon": 1, - "id": "so.sprk.video.defs", - "defs": { - "jobStatus": { - "type": "object", - "required": [ - "jobId", - "did", - "state", - ], - "properties": { - "jobId": { - "type": "string", - }, - "did": { - "type": "string", - "format": "did", - }, - "state": { - "type": "string", - "description": - "The state of the video processing job. All values not listed as a known value indicate that the job is in process.", - "knownValues": [ - "JOB_STATE_COMPLETED", - "JOB_STATE_FAILED", - "JOB_STATE_QUEUED", - "JOB_STATE_PROCESSING", - ], - }, - "progress": { - "type": "integer", - "minimum": 0, - "maximum": 100, - "description": "Progress within the current processing state.", - }, - "blob": { - "type": "blob", - }, - "audio": { - "type": "ref", - "ref": "lex:so.sprk.video.defs#extractedAudio", - }, - "error": { - "type": "string", - }, - "message": { - "type": "string", - }, - }, - }, - "extractedAudio": { - "type": "object", - "description": - "Audio extracted from the uploaded video for client-side record creation.", - "required": [ - "blob", - ], - "properties": { - "details": { - "type": "ref", - "ref": "lex:so.sprk.sound.defs#audioDetails", - }, - "blob": { - "type": "blob", - }, - }, - }, - }, - }, - "SoSprkVideoGetJobStatus": { - "lexicon": 1, - "id": "so.sprk.video.getJobStatus", - "defs": { - "main": { - "type": "query", - "description": "Get status details for a video processing job.", - "parameters": { - "type": "params", - "required": [ - "jobId", - ], - "properties": { - "jobId": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "jobStatus", - ], - "properties": { - "jobStatus": { - "type": "ref", - "ref": "lex:so.sprk.video.defs#jobStatus", - }, - }, - }, - }, - }, - }, - }, - "SoSprkVideoGetUploadLimits": { - "lexicon": 1, - "id": "so.sprk.video.getUploadLimits", - "defs": { - "main": { - "type": "query", - "description": "Get video upload limits for the authenticated user.", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "canUpload", - ], - "properties": { - "canUpload": { - "type": "boolean", - }, - "remainingDailyVideos": { - "type": "integer", - }, - "remainingDailyBytes": { - "type": "integer", - }, - "message": { - "type": "string", - }, - "error": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "SoSprkEmbedDefs": { - "lexicon": 1, - "id": "so.sprk.embed.defs", - "description": "Shared definitions for Spark interactive embeds.", - "defs": { - "embeds": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:so.sprk.embed.mention", - "lex:so.sprk.embed.record", - ], - }, - }, - "views": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:so.sprk.embed.mention#view", - "lex:so.sprk.embed.record#view", - ], - }, - }, - "placement": { - "type": "object", - "description": - "Placement and layer metadata for an embed on a media canvas.", - "required": [ - "frame", - ], - "properties": { - "frame": { - "type": "ref", - "ref": "lex:so.sprk.embed.defs#frame", - }, - "mediaRef": { - "type": "ref", - "ref": "lex:so.sprk.embed.defs#mediaRef", - }, - "zIndex": { - "type": "integer", - "minimum": 0, - }, - "rotation": { - "type": "integer", - "minimum": 0, - "maximum": 359, - }, - }, - }, - "frame": { - "type": "object", - "description": - "Bounding box in 10,000-based normalized coordinates relative to media canvas dimensions.", - "required": [ - "x", - "y", - "w", - "h", - ], - "properties": { - "x": { - "type": "integer", - "minimum": 0, - "maximum": 10000, - }, - "y": { - "type": "integer", - "minimum": 0, - "maximum": 10000, - }, - "w": { - "type": "integer", - "minimum": 1, - "maximum": 10000, - }, - "h": { - "type": "integer", - "minimum": 1, - "maximum": 10000, - }, - }, - }, - "mediaRef": { - "type": "object", - "description": - "Optional media locator for records containing multiple media items.", - "required": [ - "index", - ], - "properties": { - "index": { - "type": "integer", - "minimum": 0, - }, - }, - }, - }, - }, - "SoSprkEmbedRecord": { - "lexicon": 1, - "id": "so.sprk.embed.record", - "description": "Interactive record embed.", - "defs": { - "main": { - "type": "object", - "required": [ - "placement", - "post", - ], - "properties": { - "placement": { - "type": "ref", - "ref": "lex:so.sprk.embed.defs#placement", - }, - "post": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - }, - }, - "view": { - "type": "object", - "required": [ - "placement", - "post", - ], - "properties": { - "placement": { - "type": "ref", - "ref": "lex:so.sprk.embed.defs#placement", - }, - "post": { - "type": "union", - "refs": [ - "lex:so.sprk.feed.defs#postView", - "lex:so.sprk.feed.defs#notFoundPost", - "lex:so.sprk.feed.defs#blockedPost", - ], - }, - }, - }, - }, - }, - "SoSprkEmbedMention": { - "lexicon": 1, - "id": "so.sprk.embed.mention", - "description": "Interactive mention embed.", - "defs": { - "main": { - "type": "object", - "required": [ - "placement", - "did", - ], - "properties": { - "placement": { - "type": "ref", - "ref": "lex:so.sprk.embed.defs#placement", - }, - "did": { - "type": "string", - "format": "did", - }, - }, - }, - "view": { - "type": "object", - "required": [ - "placement", - "did", - ], - "properties": { - "placement": { - "type": "ref", - "ref": "lex:so.sprk.embed.defs#placement", - }, - "did": { - "type": "string", - "format": "did", - }, - "actor": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileViewBasic", - }, - }, - }, - }, - }, - "SoSprkNotificationRegisterPush": { - "lexicon": 1, - "id": "so.sprk.notification.registerPush", - "defs": { - "main": { - "type": "procedure", - "description": - "Register to receive push notifications, via a specified service, for the requesting account. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "serviceDid", - "token", - "platform", - "appId", - ], - "properties": { - "serviceDid": { - "type": "string", - "format": "did", - }, - "token": { - "type": "string", - }, - "platform": { - "type": "string", - "knownValues": [ - "ios", - "android", - "web", - ], - }, - "appId": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "SoSprkNotificationPutPreferences": { - "lexicon": 1, - "id": "so.sprk.notification.putPreferences", - "defs": { - "main": { - "type": "procedure", - "description": - "Set notification-related preferences for an account. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "priority", - ], - "properties": { - "priority": { - "type": "boolean", - }, - }, - }, - }, - }, - }, - }, - "SoSprkNotificationUpdateSeen": { - "lexicon": 1, - "id": "so.sprk.notification.updateSeen", - "defs": { - "main": { - "type": "procedure", - "description": - "Notify server that the requesting account has seen notifications. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "seenAt", - ], - "properties": { - "seenAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - }, - }, - "SoSprkNotificationUnregisterPush": { - "lexicon": 1, - "id": "so.sprk.notification.unregisterPush", - "defs": { - "main": { - "type": "procedure", - "description": - "The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "serviceDid", - "token", - "platform", - "appId", - ], - "properties": { - "serviceDid": { - "type": "string", - "format": "did", - }, - "token": { - "type": "string", - }, - "platform": { - "type": "string", - "knownValues": [ - "ios", - "android", - "web", - ], - }, - "appId": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "SoSprkNotificationListNotifications": { - "lexicon": 1, - "id": "so.sprk.notification.listNotifications", - "defs": { - "main": { - "type": "query", - "description": - "Enumerate notifications for the requesting account. Requires auth.", - "parameters": { - "type": "params", - "properties": { - "reasons": { - "description": "Notification reasons to include in response.", - "type": "array", - "items": { - "type": "string", - "description": - "A reason that matches the reason property of #notification.", - }, - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "priority": { - "type": "boolean", - }, - "cursor": { - "type": "string", - }, - "seenAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "notifications", - ], - "properties": { - "cursor": { - "type": "string", - }, - "notifications": { - "type": "array", - "items": { - "type": "ref", - "ref": - "lex:so.sprk.notification.listNotifications#notification", - }, - }, - "priority": { - "type": "boolean", - }, - "seenAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - "notification": { - "type": "object", - "required": [ - "uri", - "cid", - "author", - "reason", - "record", - "isRead", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "author": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - "reason": { - "type": "string", - "description": - "Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', and 'starterpack-joined'.", - "knownValues": [ - "like", - "repost", - "follow", - "mention", - "reply", - "like-via-repost", - "repost-via-repost", - ], - }, - "reasonSubject": { - "type": "string", - "format": "at-uri", - }, - "record": { - "type": "unknown", - }, - "isRead": { - "type": "boolean", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - }, - }, - }, - }, - "SoSprkNotificationGetUnreadCount": { - "lexicon": 1, - "id": "so.sprk.notification.getUnreadCount", - "defs": { - "main": { - "type": "query", - "description": - "Count the number of unread notifications for the requesting account. Requires auth.", - "parameters": { - "type": "params", - "properties": { - "priority": { - "type": "boolean", - }, - "seenAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "count", - ], - "properties": { - "count": { - "type": "integer", - }, - }, - }, - }, - }, - }, - }, - "SoSprkGraphGetSuggestedFollowsByActor": { - "lexicon": 1, - "id": "so.sprk.graph.getSuggestedFollowsByActor", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "suggestions", - ], - "properties": { - "suggestions": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - }, - "isFallback": { - "type": "boolean", - "description": - "If true, response has fallen-back to generic results, and is not scoped using relativeToDid", - "default": false, - }, - "recId": { - "type": "integer", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - }, - }, - }, - }, - }, - }, - "SoSprkGraphBlock": { - "lexicon": 1, - "id": "so.sprk.graph.block", - "defs": { - "main": { - "type": "record", - "description": - "Record declaring a 'block' relationship against another account. NOTE: blocks are public in Spark; see blog posts for details.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "subject", - "createdAt", - ], - "properties": { - "subject": { - "type": "string", - "format": "did", - "description": "DID of the account to be blocked.", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - }, - "SoSprkGraphFollow": { - "lexicon": 1, - "id": "so.sprk.graph.follow", - "defs": { - "main": { - "type": "record", - "description": - "Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "subject", - "createdAt", - ], - "properties": { - "subject": { - "type": "string", - "format": "did", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - }, - "SoSprkGraphDefs": { - "lexicon": 1, - "id": "so.sprk.graph.defs", - "defs": { - "notFoundActor": { - "type": "object", - "description": "indicates that a handle or DID could not be resolved", - "required": [ - "actor", - "notFound", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "notFound": { - "type": "boolean", - "const": true, - }, - }, - }, - "relationship": { - "type": "object", - "description": - "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "following": { - "type": "string", - "format": "at-uri", - "description": - "if the actor follows this DID, this is the AT-URI of the follow record", - }, - "followedBy": { - "type": "string", - "format": "at-uri", - "description": - "if the actor is followed by this DID, contains the AT-URI of the follow record", - }, - }, - }, - }, - }, - "SoSprkGraphMuteThread": { - "lexicon": 1, - "id": "so.sprk.graph.muteThread", - "defs": { - "main": { - "type": "procedure", - "description": - "Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Spark. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "root", - ], - "properties": { - "root": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - }, - }, - }, - "SoSprkGraphGetFollowers": { - "lexicon": 1, - "id": "so.sprk.graph.getFollowers", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates accounts which follow a specified account (actor).", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subject", - "followers", - ], - "properties": { - "subject": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - "cursor": { - "type": "string", - }, - "followers": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkGraphUnmuteThread": { - "lexicon": 1, - "id": "so.sprk.graph.unmuteThread", - "defs": { - "main": { - "type": "procedure", - "description": "Unmutes the specified thread. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "root", - ], - "properties": { - "root": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - }, - }, - }, - "SoSprkGraphMuteActor": { - "lexicon": 1, - "id": "so.sprk.graph.muteActor", - "defs": { - "main": { - "type": "procedure", - "description": - "Creates a mute relationship for the specified account. Mutes are private in Spark. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - }, - }, - }, - }, - }, - }, - "SoSprkGraphGetMutes": { - "lexicon": 1, - "id": "so.sprk.graph.getMutes", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "mutes", - ], - "properties": { - "cursor": { - "type": "string", - }, - "mutes": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkGraphGetKnownFollowers": { - "lexicon": 1, - "id": "so.sprk.graph.getKnownFollowers", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates accounts which follow a specified account (actor) and are followed by the viewer.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subject", - "followers", - ], - "properties": { - "subject": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - "cursor": { - "type": "string", - }, - "followers": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkGraphGetFollows": { - "lexicon": 1, - "id": "so.sprk.graph.getFollows", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates accounts which a specified account (actor) follows.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subject", - "follows", - ], - "properties": { - "subject": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - "cursor": { - "type": "string", - }, - "follows": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkGraphGetBlocks": { - "lexicon": 1, - "id": "so.sprk.graph.getBlocks", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates which accounts the requesting account is currently blocking. Requires auth.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "blocks", - ], - "properties": { - "cursor": { - "type": "string", - }, - "blocks": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkGraphGetRelationships": { - "lexicon": 1, - "id": "so.sprk.graph.getRelationships", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates public relationships between one account, and a list of other accounts. Does not require auth.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - "description": "Primary account requesting relationships for.", - }, - "others": { - "type": "array", - "description": - "List of 'other' accounts to be related back to the primary.", - "maxLength": 30, - "items": { - "type": "string", - "format": "at-identifier", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "relationships", - ], - "properties": { - "actor": { - "type": "string", - "format": "did", - }, - "relationships": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:so.sprk.graph.defs#relationship", - "lex:so.sprk.graph.defs#notFoundActor", - ], - }, - }, - }, - }, - }, - "errors": [ - { - "name": "ActorNotFound", - "description": - "the primary actor at-identifier could not be resolved", - }, - ], - }, - }, - }, - "SoSprkGraphUnmuteActor": { - "lexicon": 1, - "id": "so.sprk.graph.unmuteActor", - "defs": { - "main": { - "type": "procedure", - "description": "Unmutes the specified account. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - }, - }, - }, - }, - }, - }, - "SoSprkFeedGenerator": { - "lexicon": 1, - "id": "so.sprk.feed.generator", - "defs": { - "main": { - "type": "record", - "description": - "Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository.", - "key": "any", - "record": { - "type": "object", - "required": [ - "did", - "displayName", - "createdAt", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "displayName": { - "type": "string", - "maxGraphemes": 24, - "maxLength": 240, - }, - "description": { - "type": "string", - "maxGraphemes": 300, - "maxLength": 3000, - }, - "descriptionFacets": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.richtext.facet", - }, - }, - "avatar": { - "type": "blob", - "accept": [ - "image/png", - "image/jpeg", - ], - "maxSize": 1000000, - }, - "acceptsInteractions": { - "type": "boolean", - "description": - "Declaration that a feed accepts feedback interactions from a client through so.sprk.feed.sendInteractions", - }, - "labels": { - "type": "union", - "description": "Self-label values", - "refs": [ - "lex:com.atproto.label.defs#selfLabels", - ], - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - }, - "SoSprkFeedSendInteractions": { - "lexicon": 1, - "id": "so.sprk.feed.sendInteractions", - "defs": { - "main": { - "type": "procedure", - "description": - "Send information about interactions with feed items back to the feed generator that served them.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "interactions", - ], - "properties": { - "interactions": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#interaction", - }, - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": {}, - }, - }, - }, - }, - }, - "SoSprkFeedDefs": { - "lexicon": 1, - "id": "so.sprk.feed.defs", - "defs": { - "postView": { - "type": "object", - "required": [ - "uri", - "cid", - "author", - "record", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "author": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileViewBasic", - }, - "record": { - "type": "unknown", - }, - "media": { - "type": "union", - "refs": [ - "lex:so.sprk.media.images#view", - "lex:so.sprk.media.video#view", - ], - }, - "sound": { - "type": "ref", - "ref": "lex:so.sprk.sound.defs#audioView", - }, - "replyCount": { - "type": "integer", - }, - "repostCount": { - "type": "integer", - }, - "likeCount": { - "type": "integer", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "viewer": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#viewerState", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "threadgate": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#threadgateView", - }, - }, - }, - "replyView": { - "type": "object", - "required": [ - "uri", - "cid", - "author", - "record", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "author": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileViewBasic", - }, - "record": { - "type": "unknown", - }, - "media": { - "type": "union", - "refs": [ - "lex:so.sprk.media.image#view", - ], - }, - "replyCount": { - "type": "integer", - }, - "likeCount": { - "type": "integer", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "viewer": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#replyViewerState", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - }, - }, - "replyViewerState": { - "type": "object", - "description": - "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.", - "properties": { - "like": { - "type": "string", - "format": "at-uri", - }, - "threadMuted": { - "type": "boolean", - }, - "replyDisabled": { - "type": "boolean", - }, - "embeddingDisabled": { - "type": "boolean", - }, - }, - }, - "viewerState": { - "type": "object", - "description": - "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.", - "properties": { - "repost": { - "type": "string", - "format": "at-uri", - }, - "like": { - "type": "string", - "format": "at-uri", - }, - "threadMuted": { - "type": "boolean", - }, - "replyDisabled": { - "type": "boolean", - }, - "embeddingDisabled": { - "type": "boolean", - }, - "knownInteractions": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:so.sprk.feed.defs#knownRepost", - "lex:so.sprk.feed.defs#knownLike", - "lex:so.sprk.feed.defs#knownReply", - ], - }, - }, - }, - }, - "knownRepost": { - "type": "object", - "required": [ - "by", - "indexedAt", - ], - "properties": { - "by": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileViewBasic", - }, - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "knownLike": { - "type": "object", - "required": [ - "by", - "indexedAt", - ], - "properties": { - "by": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileViewBasic", - }, - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "knownReply": { - "type": "object", - "required": [ - "by", - "indexedAt", - ], - "properties": { - "by": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileViewBasic", - }, - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "text": { - "type": "string", - "maxLength": 3000, - "maxGraphemes": 300, - }, - }, - }, - "threadContext": { - "type": "object", - "description": - "Metadata about this post within the context of the thread it is in.", - "properties": { - "rootAuthorLike": { - "type": "string", - "format": "at-uri", - }, - }, - }, - "feedViewPost": { - "type": "object", - "required": [ - "post", - ], - "properties": { - "post": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#postView", - }, - "feedContext": { - "type": "string", - "description": - "Context provided by feed generator that may be passed back alongside interactions.", - "maxLength": 2000, - }, - }, - }, - "replyRef": { - "type": "object", - "required": [ - "root", - "parent", - ], - "properties": { - "root": { - "type": "union", - "refs": [ - "lex:so.sprk.feed.defs#postView", - "lex:so.sprk.feed.defs#notFoundPost", - "lex:so.sprk.feed.defs#blockedPost", - ], - }, - "parent": { - "type": "union", - "refs": [ - "lex:so.sprk.feed.defs#postView", - "lex:so.sprk.feed.defs#replyView", - "lex:so.sprk.feed.defs#notFoundPost", - "lex:so.sprk.feed.defs#blockedPost", - ], - }, - "grandparentAuthor": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileViewBasic", - "description": - "When parent is a reply to another post, this is the author of that post.", - }, - }, - }, - "threadViewPost": { - "type": "object", - "required": [ - "post", - ], - "properties": { - "post": { - "type": "union", - "refs": [ - "lex:so.sprk.feed.defs#postView", - "lex:so.sprk.feed.defs#replyView", - ], - }, - "parent": { - "type": "union", - "refs": [ - "lex:so.sprk.feed.defs#threadViewPost", - "lex:so.sprk.feed.defs#notFoundPost", - "lex:so.sprk.feed.defs#blockedPost", - ], - }, - "replies": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:so.sprk.feed.defs#threadViewPost", - "lex:so.sprk.feed.defs#notFoundPost", - "lex:so.sprk.feed.defs#blockedPost", - ], - }, - }, - "threadContext": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#threadContext", - }, - }, - }, - "notFoundPost": { - "type": "object", - "required": [ - "uri", - "notFound", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "notFound": { - "type": "boolean", - "const": true, - }, - }, - }, - "blockedPost": { - "type": "object", - "required": [ - "uri", - "blocked", - "author", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "blocked": { - "type": "boolean", - "const": true, - }, - "author": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#blockedAuthor", - }, - }, - }, - "blockedAuthor": { - "type": "object", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "viewer": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#viewerState", - }, - }, - }, - "generatorView": { - "type": "object", - "required": [ - "uri", - "cid", - "did", - "creator", - "displayName", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "did": { - "type": "string", - "format": "did", - }, - "creator": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - "displayName": { - "type": "string", - }, - "description": { - "type": "string", - "maxGraphemes": 300, - "maxLength": 3000, - }, - "descriptionFacets": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.richtext.facet", - }, - }, - "avatar": { - "type": "string", - "format": "uri", - }, - "likeCount": { - "type": "integer", - "minimum": 0, - }, - "acceptsInteractions": { - "type": "boolean", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "viewer": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#generatorViewerState", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "generatorViewerState": { - "type": "object", - "properties": { - "like": { - "type": "string", - "format": "at-uri", - }, - }, - }, - "skeletonFeedPost": { - "type": "object", - "required": [ - "post", - ], - "properties": { - "post": { - "type": "string", - "format": "at-uri", - }, - "feedContext": { - "type": "string", - "description": - "Context that will be passed through to client and may be passed to feed generator back alongside interactions.", - "maxLength": 2000, - }, - }, - }, - "threadgateView": { - "type": "object", - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "record": { - "type": "unknown", - }, - }, - }, - "interaction": { - "type": "object", - "properties": { - "item": { - "type": "string", - "format": "at-uri", - }, - "event": { - "type": "string", - "knownValues": [ - "so.sprk.feed.defs#requestLess", - "so.sprk.feed.defs#requestMore", - "so.sprk.feed.defs#clickthroughItem", - "so.sprk.feed.defs#clickthroughAuthor", - "so.sprk.feed.defs#clickthroughReposter", - "so.sprk.feed.defs#clickthroughEmbed", - "so.sprk.feed.defs#interactionSeen", - "so.sprk.feed.defs#interactionLike", - "so.sprk.feed.defs#interactionRepost", - "so.sprk.feed.defs#interactionReply", - "so.sprk.feed.defs#interactionShare", - ], - }, - "feedContext": { - "type": "string", - "description": - "Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.", - "maxLength": 2000, - }, - }, - }, - "requestLess": { - "type": "token", - "description": - "Request that less content like the given feed item be shown in the feed", - }, - "requestMore": { - "type": "token", - "description": - "Request that more content like the given feed item be shown in the feed", - }, - "clickthroughItem": { - "type": "token", - "description": "User clicked through to the feed item", - }, - "clickthroughAuthor": { - "type": "token", - "description": "User clicked through to the author of the feed item", - }, - "clickthroughReposter": { - "type": "token", - "description": "User clicked through to the reposter of the feed item", - }, - "clickthroughEmbed": { - "type": "token", - "description": - "User clicked through to the embedded content of the feed item", - }, - "interactionSeen": { - "type": "token", - "description": "Feed item was seen by user", - }, - "interactionLike": { - "type": "token", - "description": "User liked the feed item", - }, - "interactionRepost": { - "type": "token", - "description": "User reposted the feed item", - }, - "interactionReply": { - "type": "token", - "description": "User replied to the feed item", - }, - "interactionShare": { - "type": "token", - "description": "User shared the feed item", - }, - }, - }, - "SoSprkFeedGetFeedGenerators": { - "lexicon": 1, - "id": "so.sprk.feed.getFeedGenerators", - "defs": { - "main": { - "type": "query", - "description": "Get information about a list of feed generators.", - "parameters": { - "type": "params", - "required": [ - "feeds", - ], - "properties": { - "feeds": { - "type": "array", - "items": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feeds", - ], - "properties": { - "feeds": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#generatorView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkFeedGetTimeline": { - "lexicon": 1, - "id": "so.sprk.feed.getTimeline", - "defs": { - "main": { - "type": "query", - "description": - "Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed.", - "parameters": { - "type": "params", - "properties": { - "algorithm": { - "type": "string", - "description": - "Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feed", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feed": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#feedViewPost", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkFeedGetFeedGenerator": { - "lexicon": 1, - "id": "so.sprk.feed.getFeedGenerator", - "defs": { - "main": { - "type": "query", - "description": - "Get information about a feed generator. Implemented by AppView.", - "parameters": { - "type": "params", - "required": [ - "feed", - ], - "properties": { - "feed": { - "type": "string", - "format": "at-uri", - "description": "AT-URI of the feed generator record.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "view", - "isOnline", - "isValid", - ], - "properties": { - "view": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#generatorView", - }, - "isOnline": { - "type": "boolean", - "description": - "Indicates whether the feed generator service has been online recently, or else seems to be inactive.", - }, - "isValid": { - "type": "boolean", - "description": - "Indicates whether the feed generator service is compatible with the record declaration.", - }, - }, - }, - }, - }, - }, - }, - "SoSprkFeedGetAuthorFeed": { - "lexicon": 1, - "id": "so.sprk.feed.getAuthorFeed", - "defs": { - "main": { - "type": "query", - "description": - "Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - "filter": { - "type": "string", - "description": - "Combinations of post/repost types to include in response.", - "knownValues": [ - "posts_with_video", - ], - }, - "includePins": { - "type": "boolean", - "default": false, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feed", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feed": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#feedViewPost", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "BlockedActor", - }, - { - "name": "BlockedByActor", - }, - ], - }, - }, - }, - "SoSprkFeedGetLikes": { - "lexicon": 1, - "id": "so.sprk.feed.getLikes", - "defs": { - "main": { - "type": "query", - "description": - "Get like records which reference a subject (by AT-URI and CID).", - "parameters": { - "type": "params", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - "description": "AT-URI of the subject (eg, a post record).", - }, - "cid": { - "type": "string", - "format": "cid", - "description": - "CID of the subject record (aka, specific version of record), to filter likes.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "uri", - "likes", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "cursor": { - "type": "string", - }, - "likes": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.getLikes#like", - }, - }, - }, - }, - }, - }, - "like": { - "type": "object", - "required": [ - "indexedAt", - "createdAt", - "actor", - ], - "properties": { - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "actor": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - }, - }, - }, - }, - "SoSprkFeedThreadgate": { - "lexicon": 1, - "id": "so.sprk.feed.threadgate", - "defs": { - "main": { - "type": "record", - "key": "tid", - "description": - "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.", - "record": { - "type": "object", - "required": [ - "post", - "createdAt", - ], - "properties": { - "post": { - "type": "string", - "format": "at-uri", - "description": "Reference (AT-URI) to the post record.", - }, - "allow": { - "description": - "List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.", - "type": "array", - "maxLength": 5, - "items": { - "type": "union", - "refs": [ - "lex:so.sprk.feed.threadgate#mentionRule", - "lex:so.sprk.feed.threadgate#followerRule", - "lex:so.sprk.feed.threadgate#followingRule", - ], - }, - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "hiddenReplies": { - "type": "array", - "maxLength": 50, - "items": { - "type": "string", - "format": "at-uri", - }, - "description": "List of hidden reply URIs.", - }, - }, - }, - }, - "mentionRule": { - "type": "object", - "description": "Allow replies from actors mentioned in your post.", - "properties": {}, - }, - "followerRule": { - "type": "object", - "description": "Allow replies from actors who follow you.", - "properties": {}, - }, - "followingRule": { - "type": "object", - "description": "Allow replies from actors you follow.", - "properties": {}, - }, - }, - }, - "SoSprkFeedGetPostThread": { - "lexicon": 1, - "id": "so.sprk.feed.getPostThread", - "defs": { - "main": { - "type": "query", - "description": - "Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests.", - "parameters": { - "type": "params", - "required": [ - "anchor", - ], - "properties": { - "anchor": { - "type": "string", - "format": "at-uri", - "description": "Reference (AT-URI) to anchor post record.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - "depth": { - "type": "integer", - "description": - "How many levels of reply depth should be included in response.", - "default": 6, - "minimum": 0, - "maximum": 1000, - }, - "parentHeight": { - "type": "integer", - "description": - "How many levels of parent (and grandparent, etc) post to include.", - "default": 80, - "minimum": 0, - "maximum": 1000, - }, - "sort": { - "type": "string", - "description": "Sorting for the thread replies.", - "knownValues": [ - "newest", - "oldest", - "top", - ], - "default": "oldest", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "thread", - ], - "properties": { - "cursor": { - "type": "string", - }, - "thread": { - "type": "array", - "description": - "A flat list of thread items. The depth of each item is indicated by the depth property inside the item.", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.getPostThread#threadItem", - }, - }, - "threadgate": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#threadgateView", - }, - }, - }, - }, - "errors": [ - { - "name": "NotFound", - }, - ], - }, - "threadItem": { - "type": "object", - "required": [ - "uri", - "depth", - "value", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "depth": { - "type": "integer", - "description": - "The nesting level of this item in the thread. Depth 0 means the anchor item.", - }, - "value": { - "type": "union", - "refs": [ - "lex:so.sprk.feed.defs#threadViewPost", - "lex:so.sprk.feed.defs#notFoundPost", - "lex:so.sprk.feed.defs#blockedPost", - ], - }, - }, - }, - }, - }, - "SoSprkFeedGetActorLikes": { - "lexicon": 1, - "id": "so.sprk.feed.getActorLikes", - "defs": { - "main": { - "type": "query", - "description": - "Get a list of posts liked by an actor. Requires auth, actor must be the requesting account.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feed", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feed": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#feedViewPost", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "BlockedActor", - }, - { - "name": "BlockedByActor", - }, - ], - }, - }, - }, - "SoSprkFeedLike": { - "lexicon": 1, - "id": "so.sprk.feed.like", - "defs": { - "main": { - "type": "record", - "description": - "Record declaring a 'like' of a piece of subject content.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "subject", - "createdAt", - ], - "properties": { - "subject": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "via": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - }, - }, - }, - }, - }, - "SoSprkFeedGetRepostedBy": { - "lexicon": 1, - "id": "so.sprk.feed.getRepostedBy", - "defs": { - "main": { - "type": "query", - "description": "Get a list of reposts for a given post.", - "parameters": { - "type": "params", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - "description": "Reference (AT-URI) of post record", - }, - "cid": { - "type": "string", - "format": "cid", - "description": - "If supplied, filters to reposts of specific version (by CID) of the post record.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "uri", - "repostedBy", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "cursor": { - "type": "string", - }, - "repostedBy": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkFeedRepost": { - "lexicon": 1, - "id": "so.sprk.feed.repost", - "defs": { - "main": { - "description": - "Record representing a 'repost' of an existing Spark post.", - "type": "record", - "key": "tid", - "record": { - "type": "object", - "required": [ - "subject", - "createdAt", - ], - "properties": { - "subject": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "via": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - }, - }, - }, - }, - }, - "SoSprkFeedDescribeFeedGenerator": { - "lexicon": 1, - "id": "so.sprk.feed.describeFeedGenerator", - "defs": { - "main": { - "type": "query", - "description": - "Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View).", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "did", - "feeds", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "feeds": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.describeFeedGenerator#feed", - }, - }, - "links": { - "type": "ref", - "ref": "lex:so.sprk.feed.describeFeedGenerator#links", - }, - }, - }, - }, - }, - "feed": { - "type": "object", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - }, - }, - "links": { - "type": "object", - "properties": { - "privacyPolicy": { - "type": "string", - }, - "termsOfService": { - "type": "string", - }, - }, - }, - }, - }, - "SoSprkFeedSearchPosts": { - "lexicon": 1, - "id": "so.sprk.feed.searchPosts", - "defs": { - "main": { - "type": "query", - "description": - "Find posts matching search criteria, returning views of those posts.", - "parameters": { - "type": "params", - "required": [ - "q", - ], - "properties": { - "q": { - "type": "string", - "description": - "Search query string; to match against post descriptions and such.", - }, - "sort": { - "type": "string", - "knownValues": [ - "top", - "latest", - ], - "default": "latest", - "description": "Specifies the ranking order of results.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 25, - }, - "cursor": { - "type": "string", - "description": - "Optional pagination mechanism; may not necessarily allow scrolling through entire result set.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "posts", - ], - "properties": { - "cursor": { - "type": "string", - }, - "hitsTotal": { - "type": "integer", - "description": - "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.", - }, - "posts": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#postView", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "BadQueryString", - }, - ], - }, - }, - }, - "SoSprkFeedGetPosts": { - "lexicon": 1, - "id": "so.sprk.feed.getPosts", - "defs": { - "main": { - "type": "query", - "description": - "Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.", - "parameters": { - "type": "params", - "required": [ - "uris", - ], - "properties": { - "uris": { - "type": "array", - "description": - "List of post AT-URIs to return hydrated views for.", - "items": { - "type": "string", - "format": "at-uri", - }, - "maxLength": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "posts", - ], - "properties": { - "posts": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#postView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkFeedGetCrosspostThread": { - "lexicon": 1, - "id": "so.sprk.feed.getCrosspostThread", - "defs": { - "main": { - "type": "query", - "description": - "Get crosspost thread items for an anchor. Mirrors getPostThread shape but uses isolated crosspost-thread traversal.", - "parameters": { - "type": "params", - "required": [ - "anchor", - ], - "properties": { - "anchor": { - "type": "string", - "format": "at-uri", - "description": - "Reference (AT-URI) to anchor post or reply record.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - "depth": { - "type": "integer", - "description": - "How many levels of descendant depth should be included in response.", - "default": 6, - "minimum": 0, - "maximum": 1000, - }, - "parentHeight": { - "type": "integer", - "description": - "How many levels of parent (and grandparent, etc) items to include.", - "default": 80, - "minimum": 0, - "maximum": 1000, - }, - "sort": { - "type": "string", - "description": "Sorting for thread replies.", - "knownValues": [ - "newest", - "oldest", - "top", - ], - "default": "oldest", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "thread", - ], - "properties": { - "cursor": { - "type": "string", - }, - "thread": { - "type": "array", - "description": - "A flat list of thread items. The depth of each item is indicated by the depth property inside the item.", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.getCrosspostThread#threadItem", - }, - }, - "threadgate": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#threadgateView", - }, - }, - }, - }, - "errors": [ - { - "name": "NotFound", - }, - ], - }, - "threadItem": { - "type": "object", - "required": [ - "uri", - "depth", - "value", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "depth": { - "type": "integer", - "description": - "The nesting level of this item in the thread. Depth 0 means the anchor item.", - }, - "value": { - "type": "union", - "refs": [ - "lex:so.sprk.feed.defs#threadViewPost", - "lex:so.sprk.feed.defs#notFoundPost", - "lex:so.sprk.feed.defs#blockedPost", - ], - }, - }, - }, - }, - }, - "SoSprkFeedGetFeed": { - "lexicon": 1, - "id": "so.sprk.feed.getFeed", - "defs": { - "main": { - "type": "query", - "description": - "Get a hydrated feed from an actor's selected feed generator. Implemented by App View.", - "parameters": { - "type": "params", - "required": [ - "feed", - ], - "properties": { - "feed": { - "type": "string", - "format": "at-uri", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feed", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feed": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#feedViewPost", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "UnknownFeed", - }, - ], - }, - }, - }, - "SoSprkFeedReply": { - "lexicon": 1, - "id": "so.sprk.feed.reply", - "defs": { - "main": { - "type": "record", - "description": "Record containing a Spark reply.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "createdAt", - "reply", - ], - "properties": { - "text": { - "type": "string", - "maxLength": 3000, - "maxGraphemes": 300, - "description": "The reply text.", - }, - "facets": { - "type": "array", - "description": - "Annotations of text (mentions, URLs, hashtags, etc)", - "items": { - "type": "ref", - "ref": "lex:so.sprk.richtext.facet", - }, - }, - "reply": { - "type": "ref", - "ref": "lex:so.sprk.feed.reply#replyRef", - }, - "media": { - "type": "union", - "refs": [ - "lex:so.sprk.media.image", - ], - }, - "langs": { - "type": "array", - "description": - "Indicates human language of post primary text content.", - "maxLength": 3, - "items": { - "type": "string", - "format": "language", - }, - }, - "labels": { - "type": "union", - "description": - "Self-label values for this post. Effectively content warnings.", - "refs": [ - "lex:com.atproto.label.defs#selfLabels", - ], - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": - "Client-declared timestamp when this post was originally created.", - }, - }, - }, - }, - "replyRef": { - "type": "object", - "required": [ - "root", - "parent", - ], - "properties": { - "root": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "parent": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - }, - }, - }, - }, - "SoSprkFeedGetFeedSkeleton": { - "lexicon": 1, - "id": "so.sprk.feed.getFeedSkeleton", - "defs": { - "main": { - "type": "query", - "description": - "Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service.", - "parameters": { - "type": "params", - "required": [ - "feed", - ], - "properties": { - "feed": { - "type": "string", - "format": "at-uri", - "description": - "Reference to feed generator record describing the specific feed being requested.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feed", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feed": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#skeletonFeedPost", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "UnknownFeed", - }, - ], - }, - }, - }, - "SoSprkFeedGetSuggestedFeeds": { - "lexicon": 1, - "id": "so.sprk.feed.getSuggestedFeeds", - "defs": { - "main": { - "type": "query", - "description": - "Get a list of suggested feeds (feed generators) for the requesting account.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feeds", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feeds": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#generatorView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkFeedGetActorFeeds": { - "lexicon": 1, - "id": "so.sprk.feed.getActorFeeds", - "defs": { - "main": { - "type": "query", - "description": - "Get a list of feeds (feed generator records) created by the actor (in the actor's repo).", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feeds", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feeds": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#generatorView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkFeedPost": { - "lexicon": 1, - "id": "so.sprk.feed.post", - "defs": { - "main": { - "type": "record", - "description": "Record containing a Spark post.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "createdAt", - "media", - ], - "properties": { - "caption": { - "type": "ref", - "ref": "lex:so.sprk.feed.post#captionRef", - }, - "media": { - "type": "union", - "refs": [ - "lex:so.sprk.media.images", - "lex:so.sprk.media.video", - ], - }, - "sound": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "langs": { - "type": "array", - "description": - "Indicates human language of post primary text content.", - "maxLength": 3, - "items": { - "type": "string", - "format": "language", - }, - }, - "labels": { - "type": "union", - "description": - "Self-label values for this post. Effectively content warnings.", - "refs": [ - "lex:com.atproto.label.defs#selfLabels", - ], - }, - "tags": { - "type": "array", - "description": - "Additional hashtags, in addition to any included in post text and facets.", - "maxLength": 8, - "items": { - "type": "string", - "maxLength": 640, - "maxGraphemes": 64, - }, - }, - "crossposts": { - "type": "array", - "description": - "Records created for external services for this post", - "items": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": - "Client-declared timestamp when this post was originally created.", - }, - }, - }, - }, - "captionRef": { - "type": "object", - "properties": { - "text": { - "type": "string", - "maxLength": 3000, - "maxGraphemes": 300, - "description": "The post description.", - }, - "facets": { - "type": "array", - "description": - "Annotations of text (mentions, URLs, hashtags, etc)", - "items": { - "type": "ref", - "ref": "lex:so.sprk.richtext.facet", - }, - }, - }, - }, - }, - }, - "SoSprkFeedGetActorReposts": { - "lexicon": 1, - "id": "so.sprk.feed.getActorReposts", - "defs": { - "main": { - "type": "query", - "description": "Get a list of posts reposted by an actor.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "feed", - ], - "properties": { - "cursor": { - "type": "string", - }, - "feed": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#feedViewPost", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "BlockedActor", - }, - { - "name": "BlockedByActor", - }, - ], - }, - }, - }, - "SoSprkRichtextFacet": { - "lexicon": 1, - "id": "so.sprk.richtext.facet", - "defs": { - "main": { - "type": "object", - "description": "Annotation of a sub-string within rich text.", - "required": [ - "index", - "features", - ], - "properties": { - "index": { - "type": "ref", - "ref": "lex:so.sprk.richtext.facet#byteSlice", - }, - "features": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:so.sprk.richtext.facet#mention", - "lex:so.sprk.richtext.facet#link", - "lex:so.sprk.richtext.facet#tag", - ], - }, - }, - }, - }, - "mention": { - "type": "object", - "description": - "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - "link": { - "type": "object", - "description": - "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "uri", - }, - }, - }, - "tag": { - "type": "object", - "description": - "Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').", - "required": [ - "tag", - ], - "properties": { - "tag": { - "type": "string", - "maxLength": 640, - "maxGraphemes": 64, - }, - }, - }, - "byteSlice": { - "type": "object", - "description": - "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.", - "required": [ - "byteStart", - "byteEnd", - ], - "properties": { - "byteStart": { - "type": "integer", - "minimum": 0, - }, - "byteEnd": { - "type": "integer", - "minimum": 0, - }, - }, - }, - }, - }, - "SoSprkSoundDefs": { - "lexicon": 1, - "id": "so.sprk.sound.defs", - "defs": { - "audioView": { - "type": "object", - "required": [ - "uri", - "cid", - "author", - "title", - "coverArt", - "record", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "author": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileViewBasic", - }, - "record": { - "type": "unknown", - }, - "useCount": { - "type": "integer", - }, - "title": { - "type": "string", - }, - "coverArt": { - "type": "string", - "format": "uri", - }, - "details": { - "type": "ref", - "ref": "lex:so.sprk.sound.defs#audioDetails", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "audio": { - "type": "string", - "format": "uri", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - }, - }, - "audioDetails": { - "type": "object", - "description": "Metadata about the audio content.", - "properties": { - "artist": { - "type": "string", - }, - "title": { - "type": "string", - }, - }, - }, - }, - }, - "SoSprkSoundGetActorAudios": { - "lexicon": 1, - "id": "so.sprk.sound.getActorAudios", - "defs": { - "main": { - "type": "query", - "description": "Get a list of audio records created by the actor.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "audios", - ], - "properties": { - "cursor": { - "type": "string", - }, - "audios": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.sound.defs#audioView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkSoundGetAudioPosts": { - "lexicon": 1, - "id": "so.sprk.sound.getAudioPosts", - "defs": { - "main": { - "type": "query", - "description": - "Get a list of posts that use a given audio (by AT-URI).", - "parameters": { - "type": "params", - "required": [ - "uri", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - "description": "Audio AT-URI to find referencing posts for.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "posts", - ], - "properties": { - "cursor": { - "type": "string", - }, - "posts": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.feed.defs#postView", - }, - }, - "audio": { - "type": "ref", - "ref": "lex:so.sprk.sound.defs#audioView", - }, - }, - }, - }, - }, - }, - }, - "SoSprkSoundGetAudios": { - "lexicon": 1, - "id": "so.sprk.sound.getAudios", - "defs": { - "main": { - "type": "query", - "description": - "Gets audio views for a specified list of audios (by AT-URI).", - "parameters": { - "type": "params", - "required": [ - "uris", - ], - "properties": { - "uris": { - "type": "array", - "description": "List of audio AT-URIs to return views for.", - "items": { - "type": "string", - "format": "at-uri", - }, - "maxLength": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "audios", - ], - "properties": { - "audios": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.sound.defs#audioView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkSoundAudio": { - "lexicon": 1, - "id": "so.sprk.sound.audio", - "description": - "A audio record referencable in a Spark record (e.g, a post)", - "defs": { - "main": { - "type": "record", - "key": "tid", - "record": { - "type": "object", - "required": [ - "sound", - "title", - "createdAt", - ], - "properties": { - "sound": { - "type": "blob", - "accept": [ - "audio/*", - ], - "maxSize": 10485760, - }, - "origin": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "title": { - "type": "string", - "maxLength": 1000, - "maxGraphemes": 100, - "description": "The audio's title.", - }, - "details": { - "type": "ref", - "ref": "lex:so.sprk.sound.defs#audioDetails", - }, - "labels": { - "type": "union", - "description": - "Self-label values for this audio. Effectively content warnings.", - "refs": [ - "lex:com.atproto.label.defs#selfLabels", - ], - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": - "Client-declared timestamp when this audio was originally created.", - }, - }, - }, - }, - }, - }, - "SoSprkSoundGetTrendingAudios": { - "lexicon": 1, - "id": "so.sprk.sound.getTrendingAudios", - "defs": { - "main": { - "type": "query", - "description": - "Return trending audios ranked by popularity, returning AudioViews.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 25, - }, - "cursor": { - "type": "string", - "description": "Opaque cursor for pagination", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "audios", - ], - "properties": { - "cursor": { - "type": "string", - }, - "audios": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.sound.defs#audioView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkActorSearchActorsTypeahead": { - "lexicon": 1, - "id": "so.sprk.actor.searchActorsTypeahead", - "defs": { - "main": { - "type": "query", - "description": - "Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.", - "parameters": { - "type": "params", - "properties": { - "q": { - "type": "string", - "description": "Search query prefix; not a full query string.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 10, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actors", - ], - "properties": { - "actors": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileViewBasic", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkActorDefs": { - "lexicon": 1, - "id": "so.sprk.actor.defs", - "defs": { - "profileViewBasic": { - "type": "object", - "required": [ - "did", - "handle", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "handle": { - "type": "string", - "format": "handle", - }, - "displayName": { - "type": "string", - "maxGraphemes": 64, - "maxLength": 640, - }, - "avatar": { - "type": "string", - "format": "uri", - }, - "associated": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileAssociated", - }, - "viewer": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#viewerState", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "stories": { - "type": "array", - "description": "Recent stories from this profile author.", - "items": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - }, - }, - }, - "profileView": { - "type": "object", - "required": [ - "did", - "handle", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "handle": { - "type": "string", - "format": "handle", - }, - "displayName": { - "type": "string", - "maxGraphemes": 64, - "maxLength": 640, - }, - "description": { - "type": "string", - "maxGraphemes": 256, - "maxLength": 2560, - }, - "avatar": { - "type": "string", - "format": "uri", - }, - "associated": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileAssociated", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "viewer": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#viewerState", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "stories": { - "type": "array", - "description": "Recent stories from this profile author.", - "items": { - "type": "ref", - "ref": "lex:so.sprk.story.defs#storyView", - }, - }, - }, - }, - "profileViewDetailed": { - "type": "object", - "required": [ - "did", - "handle", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "handle": { - "type": "string", - "format": "handle", - }, - "displayName": { - "type": "string", - "maxGraphemes": 64, - "maxLength": 640, - }, - "description": { - "type": "string", - "maxGraphemes": 256, - "maxLength": 2560, - }, - "avatar": { - "type": "string", - "format": "uri", - }, - "banner": { - "type": "string", - "format": "uri", - }, - "followersCount": { - "type": "integer", - }, - "followsCount": { - "type": "integer", - }, - "postsCount": { - "type": "integer", - }, - "associated": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileAssociated", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "viewer": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#viewerState", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "pinnedPost": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "stories": { - "type": "array", - "description": "Recent stories from this profile author.", - "items": { - "type": "ref", - "ref": "lex:so.sprk.story.defs#storyView", - }, - }, - }, - }, - "profileAssociated": { - "type": "object", - "properties": { - "feedgens": { - "type": "integer", - }, - "labeler": { - "type": "boolean", - }, - "chat": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileAssociatedChat", - }, - }, - }, - "profileAssociatedChat": { - "type": "object", - "required": [ - "allowIncoming", - ], - "properties": { - "allowIncoming": { - "type": "string", - "knownValues": [ - "all", - "none", - "following", - ], - }, - }, - }, - "viewerState": { - "type": "object", - "description": - "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.", - "properties": { - "muted": { - "type": "boolean", - }, - "blockedBy": { - "type": "boolean", - }, - "blocking": { - "type": "string", - "format": "at-uri", - }, - "following": { - "type": "string", - "format": "at-uri", - }, - "followedBy": { - "type": "string", - "format": "at-uri", - }, - "knownFollowers": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#knownFollowers", - }, - }, - }, - "knownFollowers": { - "type": "object", - "description": "The subject's followers whom you also follow", - "required": [ - "count", - "followers", - ], - "properties": { - "count": { - "type": "integer", - }, - "followers": { - "type": "array", - "minLength": 0, - "maxLength": 5, - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileViewBasic", - }, - }, - }, - }, - "preferences": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:so.sprk.actor.defs#contentLabelPref", - "lex:so.sprk.actor.defs#savedFeedsPref", - "lex:so.sprk.actor.defs#personalDetailsPref", - "lex:so.sprk.actor.defs#feedViewPref", - "lex:so.sprk.actor.defs#threadViewPref", - "lex:so.sprk.actor.defs#interestsPref", - "lex:so.sprk.actor.defs#mutedWordsPref", - "lex:so.sprk.actor.defs#hiddenPostsPref", - "lex:so.sprk.actor.defs#labelersPref", - ], - }, - }, - "contentLabelPref": { - "type": "object", - "required": [ - "label", - "visibility", - ], - "properties": { - "labelerDid": { - "type": "string", - "description": - "Which labeler does this preference apply to? If undefined, applies globally.", - "format": "did", - }, - "label": { - "type": "string", - }, - "visibility": { - "type": "string", - "knownValues": [ - "ignore", - "show", - "warn", - "hide", - ], - }, - }, - }, - "savedFeed": { - "type": "object", - "required": [ - "id", - "type", - "value", - "pinned", - ], - "properties": { - "id": { - "type": "string", - }, - "type": { - "type": "string", - "knownValues": [ - "feed", - "timeline", - ], - }, - "value": { - "type": "string", - }, - "pinned": { - "type": "boolean", - }, - }, - }, - "savedFeedsPref": { - "type": "object", - "required": [ - "items", - ], - "properties": { - "items": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#savedFeed", - }, - }, - }, - }, - "personalDetailsPref": { - "type": "object", - "properties": { - "birthDate": { - "type": "string", - "format": "datetime", - "description": "The birth date of account owner.", - }, - }, - }, - "feedViewPref": { - "type": "object", - "required": [ - "feed", - ], - "properties": { - "feed": { - "type": "string", - "description": - "The URI of the feed, or an identifier which describes the feed.", - }, - "hideReplies": { - "type": "boolean", - "description": "Hide replies in the feed.", - }, - "hideRepliesByUnfollowed": { - "type": "boolean", - "description": - "Hide replies in the feed if they are not by followed users.", - "default": true, - }, - "hideRepliesByLikeCount": { - "type": "integer", - "description": - "Hide replies in the feed if they do not have this number of likes.", - }, - "hideReposts": { - "type": "boolean", - "description": "Hide reposts in the feed.", - }, - "hideQuotePosts": { - "type": "boolean", - "description": "Hide quote posts in the feed.", - }, - }, - }, - "threadViewPref": { - "type": "object", - "properties": { - "sort": { - "type": "string", - "description": "Sorting mode for threads.", - "knownValues": [ - "oldest", - "newest", - "most-likes", - "random", - "hotness", - ], - }, - }, - }, - "interestsPref": { - "type": "object", - "required": [ - "tags", - ], - "properties": { - "tags": { - "type": "array", - "maxLength": 100, - "items": { - "type": "string", - "maxLength": 640, - "maxGraphemes": 64, - }, - "description": - "A list of tags which describe the account owner's interests gathered during onboarding.", - }, - }, - }, - "mutedWordTarget": { - "type": "string", - "knownValues": [ - "content", - "tag", - ], - "maxLength": 640, - "maxGraphemes": 64, - }, - "mutedWord": { - "type": "object", - "description": "A word that the account owner has muted.", - "required": [ - "value", - "targets", - ], - "properties": { - "id": { - "type": "string", - }, - "value": { - "type": "string", - "description": "The muted word itself.", - "maxLength": 10000, - "maxGraphemes": 1000, - }, - "targets": { - "type": "array", - "description": "The intended targets of the muted word.", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#mutedWordTarget", - }, - }, - "actorTarget": { - "type": "string", - "description": - "Groups of users to apply the muted word to. If undefined, applies to all users.", - "knownValues": [ - "all", - "exclude-following", - ], - "default": "all", - }, - "expiresAt": { - "type": "string", - "format": "datetime", - "description": - "The date and time at which the muted word will expire and no longer be applied.", - }, - }, - }, - "mutedWordsPref": { - "type": "object", - "required": [ - "items", - ], - "properties": { - "items": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#mutedWord", - }, - "description": "A list of words the account owner has muted.", - }, - }, - }, - "hiddenPostsPref": { - "type": "object", - "required": [ - "items", - ], - "properties": { - "items": { - "type": "array", - "items": { - "type": "string", - "format": "at-uri", - }, - "description": - "A list of URIs of posts the account owner has hidden.", - }, - }, - }, - "labelersPref": { - "type": "object", - "required": [ - "labelers", - ], - "properties": { - "labelers": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#labelerPrefItem", - }, - }, - }, - }, - "labelerPrefItem": { - "type": "object", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - }, - }, - "SoSprkActorPutPreferences": { - "lexicon": 1, - "id": "so.sprk.actor.putPreferences", - "defs": { - "main": { - "type": "procedure", - "description": "Set the private preferences attached to the account.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "preferences", - ], - "properties": { - "preferences": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#preferences", - }, - }, - }, - }, - }, - }, - }, - "SoSprkActorGetProfile": { - "lexicon": 1, - "id": "so.sprk.actor.getProfile", - "defs": { - "main": { - "type": "query", - "description": - "Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.", - "parameters": { - "type": "params", - "required": [ - "actor", - ], - "properties": { - "actor": { - "type": "string", - "format": "at-identifier", - "description": "Handle or DID of account to fetch profile of.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileViewDetailed", - }, - }, - }, - }, - }, - "SoSprkActorGetSuggestions": { - "lexicon": 1, - "id": "so.sprk.actor.getSuggestions", - "defs": { - "main": { - "type": "query", - "description": - "Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actors", - ], - "properties": { - "cursor": { - "type": "string", - }, - "actors": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - }, - "recId": { - "type": "integer", - "description": - "Snowflake for this recommendation, use when submitting recommendation events.", - }, - }, - }, - }, - }, - }, - }, - "SoSprkActorSearchActors": { - "lexicon": 1, - "id": "so.sprk.actor.searchActors", - "defs": { - "main": { - "type": "query", - "description": - "Find actors (profiles) matching search criteria. Does not require auth.", - "parameters": { - "type": "params", - "properties": { - "q": { - "type": "string", - "description": - "Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 25, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "actors", - ], - "properties": { - "cursor": { - "type": "string", - }, - "actors": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkActorGetProfiles": { - "lexicon": 1, - "id": "so.sprk.actor.getProfiles", - "defs": { - "main": { - "type": "query", - "description": "Get detailed profile views of multiple actors.", - "parameters": { - "type": "params", - "required": [ - "actors", - ], - "properties": { - "actors": { - "type": "array", - "items": { - "type": "string", - "format": "at-identifier", - }, - "maxLength": 25, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "profiles", - ], - "properties": { - "profiles": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileViewDetailed", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkActorGetPreferences": { - "lexicon": 1, - "id": "so.sprk.actor.getPreferences", - "defs": { - "main": { - "type": "query", - "description": - "Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.", - "parameters": { - "type": "params", - "properties": {}, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "preferences", - ], - "properties": { - "preferences": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#preferences", - }, - }, - }, - }, - }, - }, - }, - "SoSprkActorProfile": { - "lexicon": 1, - "id": "so.sprk.actor.profile", - "defs": { - "main": { - "type": "record", - "description": "A declaration of a Spark account profile.", - "key": "literal:self", - "record": { - "type": "object", - "properties": { - "displayName": { - "type": "string", - "maxGraphemes": 64, - "maxLength": 640, - }, - "description": { - "type": "string", - "description": "Free-form profile description text.", - "maxGraphemes": 256, - "maxLength": 2560, - }, - "avatar": { - "type": "blob", - "description": - "Small image to be displayed next to posts from account. AKA, 'profile picture'", - "accept": [ - "image/png", - "image/jpeg", - ], - "maxSize": 5242880, - }, - "banner": { - "type": "blob", - "description": - "Larger horizontal image to display behind profile view.", - "accept": [ - "image/png", - "image/jpeg", - ], - "maxSize": 5242880, - }, - "labels": { - "type": "union", - "description": - "Self-label values, specific to the Spark applications, on the overall account.", - "refs": [ - "lex:com.atproto.label.defs#selfLabels", - ], - }, - "joinedViaStarterPack": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "pinnedPost": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - }, - "SoSprkStoryDefs": { - "lexicon": 1, - "id": "so.sprk.story.defs", - "defs": { - "storyView": { - "type": "object", - "required": [ - "uri", - "cid", - "author", - "record", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "author": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileViewBasic", - }, - "record": { - "type": "unknown", - }, - "media": { - "type": "union", - "refs": [ - "lex:so.sprk.media.image#view", - "lex:so.sprk.media.video#view", - ], - }, - "embeds": { - "type": "ref", - "ref": "lex:so.sprk.embed.defs#views", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - "storiesByAuthor": { - "type": "object", - "required": [ - "author", - "stories", - ], - "properties": { - "author": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileViewBasic", - }, - "stories": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.story.defs#storyView", - }, - }, - }, - }, - "interaction": { - "type": "object", - "properties": { - "item": { - "type": "string", - "format": "at-uri", - }, - "event": { - "type": "string", - "knownValues": [ - "so.sprk.feed.defs#clickthroughItem", - "so.sprk.feed.defs#clickthroughAuthor", - "so.sprk.feed.defs#clickthroughReposter", - "so.sprk.feed.defs#clickthroughEmbed", - "so.sprk.feed.defs#interactionSeen", - "so.sprk.feed.defs#interactionLike", - "so.sprk.feed.defs#interactionRepost", - "so.sprk.feed.defs#interactionShare", - ], - }, - }, - }, - }, - }, - "SoSprkStoryGetTimeline": { - "lexicon": 1, - "id": "so.sprk.story.getTimeline", - "defs": { - "main": { - "type": "query", - "description": - "Get a view of the requesting account's stories timeline grouped by author.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "storiesByAuthor", - ], - "properties": { - "cursor": { - "type": "string", - }, - "storiesByAuthor": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.story.defs#storiesByAuthor", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkStoryGetStories": { - "lexicon": 1, - "id": "so.sprk.story.getStories", - "defs": { - "main": { - "type": "query", - "description": - "Gets story views for a specified list of stories (by AT-URI). This is sometimes referred to as 'hydrating' a story reference list.", - "parameters": { - "type": "params", - "required": [ - "uris", - ], - "properties": { - "uris": { - "type": "array", - "description": - "List of story AT-URIs to return hydrated views for.", - "items": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "stories", - ], - "properties": { - "stories": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.story.defs#storyView", - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkStoryPost": { - "lexicon": 1, - "id": "so.sprk.story.post", - "defs": { - "main": { - "type": "record", - "description": "Record containing a Spark story.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "createdAt", - "media", - ], - "properties": { - "media": { - "type": "union", - "refs": [ - "lex:so.sprk.media.image", - "lex:so.sprk.media.video", - ], - }, - "sound": { - "type": "ref", - "ref": "lex:com.atproto.repo.strongRef", - }, - "embeds": { - "type": "ref", - "ref": "lex:so.sprk.embed.defs#embeds", - }, - "labels": { - "type": "union", - "description": - "Self-label values for this story. Effectively content warnings.", - "refs": [ - "lex:com.atproto.label.defs#selfLabels", - ], - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": - "Client-declared timestamp when this story was originally created.", - }, - }, - }, - }, - }, - }, - "SoSprkLabelerDefs": { - "lexicon": 1, - "id": "so.sprk.labeler.defs", - "defs": { - "labelerView": { - "type": "object", - "required": [ - "uri", - "cid", - "creator", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "creator": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - "likeCount": { - "type": "integer", - "minimum": 0, - }, - "viewer": { - "type": "ref", - "ref": "lex:so.sprk.labeler.defs#labelerViewerState", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - }, - }, - "labelerViewDetailed": { - "type": "object", - "required": [ - "uri", - "cid", - "creator", - "policies", - "indexedAt", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "creator": { - "type": "ref", - "ref": "lex:so.sprk.actor.defs#profileView", - }, - "policies": { - "type": "ref", - "ref": "lex:so.sprk.labeler.defs#labelerPolicies", - }, - "likeCount": { - "type": "integer", - "minimum": 0, - }, - "viewer": { - "type": "ref", - "ref": "lex:so.sprk.labeler.defs#labelerViewerState", - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - "reasonTypes": { - "description": - "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.", - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.moderation.defs#reasonType", - }, - }, - "subjectTypes": { - "description": - "The set of subject types (account, record, etc) this service accepts reports on.", - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.moderation.defs#subjectType", - }, - }, - "subjectCollections": { - "type": "array", - "description": - "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.", - "items": { - "type": "string", - "format": "nsid", - }, - }, - }, - }, - "labelerViewerState": { - "type": "object", - "properties": { - "like": { - "type": "string", - "format": "at-uri", - }, - }, - }, - "labelerPolicies": { - "type": "object", - "required": [ - "labelValues", - ], - "properties": { - "labelValues": { - "type": "array", - "description": - "The label values which this labeler publishes. May include global or custom labels.", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#labelValue", - }, - }, - "labelValueDefinitions": { - "type": "array", - "description": - "Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#labelValueDefinition", - }, - }, - }, - }, - }, - }, - "SoSprkLabelerService": { - "lexicon": 1, - "id": "so.sprk.labeler.service", - "defs": { - "main": { - "type": "record", - "description": "A declaration of the existence of labeler service.", - "key": "literal:self", - "record": { - "type": "object", - "required": [ - "policies", - "createdAt", - ], - "properties": { - "policies": { - "type": "ref", - "ref": "lex:so.sprk.labeler.defs#labelerPolicies", - }, - "labels": { - "type": "union", - "refs": [ - "lex:com.atproto.label.defs#selfLabels", - ], - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "reasonTypes": { - "description": - "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.", - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.moderation.defs#reasonType", - }, - }, - "subjectTypes": { - "description": - "The set of subject types (account, record, etc) this service accepts reports on.", - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.moderation.defs#subjectType", - }, - }, - "subjectCollections": { - "type": "array", - "description": - "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.", - "items": { - "type": "string", - "format": "nsid", - }, - }, - }, - }, - }, - }, - }, - "SoSprkLabelerGetServices": { - "lexicon": 1, - "id": "so.sprk.labeler.getServices", - "defs": { - "main": { - "type": "query", - "description": "Get information about a list of labeler services.", - "parameters": { - "type": "params", - "required": [ - "dids", - ], - "properties": { - "dids": { - "type": "array", - "items": { - "type": "string", - "format": "did", - }, - }, - "detailed": { - "type": "boolean", - "default": false, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "views", - ], - "properties": { - "views": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:so.sprk.labeler.defs#labelerView", - "lex:so.sprk.labeler.defs#labelerViewDetailed", - ], - }, - }, - }, - }, - }, - }, - }, - }, - "SoSprkMediaDefs": { - "lexicon": 1, - "id": "so.sprk.media.defs", - "defs": { - "aspectRatio": { - "type": "object", - "description": - "width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.", - "required": [ - "width", - "height", - ], - "properties": { - "width": { - "type": "integer", - "minimum": 1, - }, - "height": { - "type": "integer", - "minimum": 1, - }, - }, - }, - }, - }, - "SoSprkMediaImages": { - "lexicon": 1, - "id": "so.sprk.media.images", - "description": "A set of multiple images in a Spark post.", - "defs": { - "main": { - "type": "object", - "required": [ - "images", - ], - "properties": { - "images": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.media.image", - }, - "maxLength": 12, - }, - }, - }, - "view": { - "type": "object", - "required": [ - "images", - ], - "properties": { - "images": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.media.image#view", - }, - "maxLength": 12, - }, - }, - }, - }, - }, - "SoSprkMediaVideo": { - "lexicon": 1, - "id": "so.sprk.media.video", - "description": "A video in a Spark post.", - "defs": { - "main": { - "type": "object", - "required": [ - "video", - ], - "properties": { - "video": { - "type": "blob", - "accept": [ - "video/mp4", - ], - "maxSize": 314572800, - }, - "captions": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:so.sprk.media.video#caption", - }, - "maxLength": 20, - }, - "alt": { - "type": "string", - "description": - "Alt text description of the video, for accessibility.", - "maxGraphemes": 1000, - "maxLength": 10000, - }, - "aspectRatio": { - "type": "ref", - "ref": "lex:so.sprk.media.defs#aspectRatio", - }, - }, - }, - "caption": { - "type": "object", - "required": [ - "lang", - "file", - ], - "properties": { - "lang": { - "type": "string", - "format": "language", - }, - "file": { - "type": "blob", - "accept": [ - "text/vtt", - ], - "maxSize": 20000, - }, - }, - }, - "view": { - "type": "object", - "required": [ - "cid", - "playlist", - ], - "properties": { - "cid": { - "type": "string", - "format": "cid", - }, - "playlist": { - "type": "string", - "format": "uri", - }, - "thumbnail": { - "type": "string", - "format": "uri", - }, - "alt": { - "type": "string", - "maxGraphemes": 1000, - "maxLength": 10000, - }, - "aspectRatio": { - "type": "ref", - "ref": "lex:so.sprk.media.defs#aspectRatio", - }, - }, - }, - }, - }, - "SoSprkMediaImage": { - "lexicon": 1, - "id": "so.sprk.media.image", - "description": "An image in a Spark record.", - "defs": { - "main": { - "type": "object", - "required": [ - "image", - "alt", - ], - "properties": { - "image": { - "type": "blob", - "accept": [ - "image/*", - ], - "maxSize": 5242880, - }, - "alt": { - "type": "string", - "description": - "Alt text description of the image, for accessibility.", - }, - "aspectRatio": { - "type": "ref", - "ref": "lex:so.sprk.media.defs#aspectRatio", - }, - }, - }, - "view": { - "type": "object", - "required": [ - "thumb", - "fullsize", - "alt", - ], - "properties": { - "thumb": { - "type": "string", - "format": "uri", - "description": - "Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.", - }, - "fullsize": { - "type": "string", - "format": "uri", - "description": - "Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View.", - }, - "alt": { - "type": "string", - "description": - "Alt text description of the image, for accessibility.", - }, - "aspectRatio": { - "type": "ref", - "ref": "lex:so.sprk.media.defs#aspectRatio", - }, - }, - }, - }, - }, - "SoSprkAuthCreatePosts": { - "lexicon": 1, - "id": "so.sprk.authCreatePosts", - "defs": { - "main": { - "type": "permission-set", - "title": "Create Spark Posts", - "title:lang": {}, - "detail": - "Create Spark posts, replies, stories, and upload media, but can not update or delete them.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "rpc", - "inheritAud": true, - "lxm": [ - "so.sprk.video.getJobStatus", - "so.sprk.video.getUploadLimits", - "so.sprk.video.uploadVideo", - ], - }, - { - "type": "permission", - "resource": "repo", - "action": [ - "create", - ], - "collection": [ - "so.sprk.feed.post", - "so.sprk.feed.reply", - "so.sprk.feed.threadgate", - "so.sprk.story.post", - ], - }, - ], - }, - }, - }, - "SoSprkAuthDeleteContent": { - "lexicon": 1, - "id": "so.sprk.authDeleteContent", - "defs": { - "main": { - "type": "permission-set", - "title": "Delete Spark Content", - "title:lang": {}, - "detail": - "Clean up Spark account history: posts, replies, reposts, likes, thread controls, and stories.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "repo", - "action": [ - "delete", - ], - "collection": [ - "so.sprk.feed.like", - "so.sprk.feed.post", - "so.sprk.feed.reply", - "so.sprk.feed.repost", - "so.sprk.feed.threadgate", - "so.sprk.story.post", - ], - }, - ], - }, - }, - }, - "SoSprkAuthFullApp": { - "lexicon": 1, - "id": "so.sprk.authFullApp", - "defs": { - "main": { - "type": "permission-set", - "title": "Full Spark App Permissions", - "title:lang": {}, - "detail": - "Manage Spark content and interactions, private preferences and notifications, and Spark-specific app features and data.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "rpc", - "inheritAud": true, - "lxm": [ - "so.sprk.actor.getPreferences", - "so.sprk.actor.getProfile", - "so.sprk.actor.getProfiles", - "so.sprk.actor.getSuggestions", - "so.sprk.actor.putPreferences", - "so.sprk.actor.searchActors", - "so.sprk.actor.searchActorsTypeahead", - "so.sprk.feed.describeFeedGenerator", - "so.sprk.feed.getActorFeeds", - "so.sprk.feed.getActorLikes", - "so.sprk.feed.getActorReposts", - "so.sprk.feed.getAuthorFeed", - "so.sprk.feed.getCrosspostThread", - "so.sprk.feed.getFeed", - "so.sprk.feed.getFeedGenerator", - "so.sprk.feed.getFeedGenerators", - "so.sprk.feed.getFeedSkeleton", - "so.sprk.feed.getLikes", - "so.sprk.feed.getPostThread", - "so.sprk.feed.getPosts", - "so.sprk.feed.getRepostedBy", - "so.sprk.feed.getSuggestedFeeds", - "so.sprk.feed.getTimeline", - "so.sprk.feed.searchPosts", - "so.sprk.feed.sendInteractions", - "so.sprk.graph.getBlocks", - "so.sprk.graph.getFollowers", - "so.sprk.graph.getFollows", - "so.sprk.graph.getKnownFollowers", - "so.sprk.graph.getMutes", - "so.sprk.graph.getRelationships", - "so.sprk.graph.getSuggestedFollowsByActor", - "so.sprk.graph.muteActor", - "so.sprk.graph.muteThread", - "so.sprk.graph.unmuteActor", - "so.sprk.graph.unmuteThread", - "so.sprk.labeler.getServices", - "so.sprk.notification.getUnreadCount", - "so.sprk.notification.listNotifications", - "so.sprk.notification.putPreferences", - "so.sprk.notification.registerPush", - "so.sprk.notification.unregisterPush", - "so.sprk.notification.updateSeen", - "so.sprk.sound.getActorAudios", - "so.sprk.sound.getAudioPosts", - "so.sprk.sound.getAudios", - "so.sprk.sound.getTrendingAudios", - "so.sprk.story.getStories", - "so.sprk.story.getTimeline", - "so.sprk.video.getJobStatus", - "so.sprk.video.getUploadLimits", - "so.sprk.video.uploadVideo", - ], - }, - { - "type": "permission", - "resource": "repo", - "action": [ - "create", - "update", - "delete", - ], - "collection": [ - "so.sprk.actor.profile", - "so.sprk.feed.generator", - "so.sprk.feed.like", - "so.sprk.feed.post", - "so.sprk.feed.reply", - "so.sprk.feed.repost", - "so.sprk.feed.threadgate", - "so.sprk.graph.block", - "so.sprk.graph.follow", - "so.sprk.labeler.service", - "so.sprk.story.post", - ], - }, - ], - }, - }, - }, - "SoSprkAuthManageFeedDeclarations": { - "lexicon": 1, - "id": "so.sprk.authManageFeedDeclarations", - "defs": { - "main": { - "type": "permission-set", - "title": "Manage Spark Feed Declarations", - "title:lang": {}, - "detail": "Configure Spark feed generator declaration records.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "repo", - "action": [ - "create", - "update", - "delete", - ], - "collection": [ - "so.sprk.feed.generator", - ], - }, - ], - }, - }, - }, - "SoSprkAuthManageLabelerService": { - "lexicon": 1, - "id": "so.sprk.authManageLabelerService", - "defs": { - "main": { - "type": "permission-set", - "title": "Manage Spark Labeler Service", - "title:lang": {}, - "detail": "Configure Spark labeler declaration records.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "repo", - "action": [ - "create", - "update", - "delete", - ], - "collection": [ - "so.sprk.labeler.service", - ], - }, - ], - }, - }, - }, - "SoSprkAuthManageModeration": { - "lexicon": 1, - "id": "so.sprk.authManageModeration", - "defs": { - "main": { - "type": "permission-set", - "title": "Manage Spark Moderation", - "title:lang": {}, - "detail": - "Control personal moderation settings, including blocks, mutes, and moderation-related preferences.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "rpc", - "inheritAud": true, - "lxm": [ - "so.sprk.actor.getPreferences", - "so.sprk.actor.putPreferences", - "so.sprk.graph.muteActor", - "so.sprk.graph.muteThread", - "so.sprk.graph.unmuteActor", - "so.sprk.graph.unmuteThread", - ], - }, - { - "type": "permission", - "resource": "repo", - "action": [ - "create", - "update", - "delete", - ], - "collection": [ - "so.sprk.graph.block", - ], - }, - ], - }, - }, - }, - "SoSprkAuthManageNotifications": { - "lexicon": 1, - "id": "so.sprk.authManageNotifications", - "defs": { - "main": { - "type": "permission-set", - "title": "Manage Spark Notifications", - "title:lang": {}, - "detail": "View and configure notifications for the Spark app.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "rpc", - "inheritAud": true, - "lxm": [ - "so.sprk.notification.getUnreadCount", - "so.sprk.notification.listNotifications", - "so.sprk.notification.putPreferences", - "so.sprk.notification.registerPush", - "so.sprk.notification.unregisterPush", - "so.sprk.notification.updateSeen", - ], - }, - ], - }, - }, - }, - "SoSprkAuthManageProfile": { - "lexicon": 1, - "id": "so.sprk.authManageProfile", - "defs": { - "main": { - "type": "permission-set", - "title": "Manage Spark Profile", - "title:lang": {}, - "detail": "Update Spark profile data.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "repo", - "action": [ - "create", - "update", - "delete", - ], - "collection": [ - "so.sprk.actor.profile", - ], - }, - ], - }, - }, - }, - "SoSprkAuthViewAll": { - "lexicon": 1, - "id": "so.sprk.authViewAll", - "defs": { - "main": { - "type": "permission-set", - "title": "Read-only Access to Spark Content", - "title:lang": {}, - "detail": - "View Spark network content from an account perspective, and read notifications and preferences.", - "detail:lang": {}, - "permissions": [ - { - "type": "permission", - "resource": "rpc", - "inheritAud": true, - "lxm": [ - "so.sprk.actor.getPreferences", - "so.sprk.actor.getProfile", - "so.sprk.actor.getProfiles", - "so.sprk.actor.getSuggestions", - "so.sprk.actor.searchActors", - "so.sprk.actor.searchActorsTypeahead", - "so.sprk.feed.describeFeedGenerator", - "so.sprk.feed.getActorFeeds", - "so.sprk.feed.getActorLikes", - "so.sprk.feed.getActorReposts", - "so.sprk.feed.getAuthorFeed", - "so.sprk.feed.getCrosspostThread", - "so.sprk.feed.getFeed", - "so.sprk.feed.getFeedGenerator", - "so.sprk.feed.getFeedGenerators", - "so.sprk.feed.getFeedSkeleton", - "so.sprk.feed.getLikes", - "so.sprk.feed.getPostThread", - "so.sprk.feed.getPosts", - "so.sprk.feed.getRepostedBy", - "so.sprk.feed.getSuggestedFeeds", - "so.sprk.feed.getTimeline", - "so.sprk.feed.searchPosts", - "so.sprk.graph.getBlocks", - "so.sprk.graph.getFollowers", - "so.sprk.graph.getFollows", - "so.sprk.graph.getKnownFollowers", - "so.sprk.graph.getMutes", - "so.sprk.graph.getRelationships", - "so.sprk.graph.getSuggestedFollowsByActor", - "so.sprk.labeler.getServices", - "so.sprk.notification.getUnreadCount", - "so.sprk.notification.listNotifications", - "so.sprk.notification.updateSeen", - "so.sprk.sound.getActorAudios", - "so.sprk.sound.getAudioPosts", - "so.sprk.sound.getAudios", - "so.sprk.sound.getTrendingAudios", - "so.sprk.story.getStories", - "so.sprk.story.getTimeline", - "so.sprk.video.getUploadLimits", - ], - }, - ], - }, - }, - }, - "ComAtprotoTempDereferenceScope": { - "lexicon": 1, - "id": "com.atproto.temp.dereferenceScope", - "defs": { - "main": { - "type": "query", - "description": - "Allows finding the oauth permission scope from a reference", - "parameters": { - "type": "params", - "required": [ - "scope", - ], - "properties": { - "scope": { - "type": "string", - "description": "The scope reference (starts with 'ref:')", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "scope", - ], - "properties": { - "scope": { - "type": "string", - "description": "The full oauth permission scope", - }, - }, - }, - }, - "errors": [ - { - "name": "InvalidScopeReference", - "description": "An invalid scope reference was provided.", - }, - ], - }, - }, - }, - "ComAtprotoTempAddReservedHandle": { - "lexicon": 1, - "id": "com.atproto.temp.addReservedHandle", - "defs": { - "main": { - "type": "procedure", - "description": "Add a handle to the set of reserved handles.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "handle", - ], - "properties": { - "handle": { - "type": "string", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": {}, - }, - }, - }, - }, - }, - "ComAtprotoTempCheckSignupQueue": { - "lexicon": 1, - "id": "com.atproto.temp.checkSignupQueue", - "defs": { - "main": { - "type": "query", - "description": "Check accounts location in signup queue.", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "activated", - ], - "properties": { - "activated": { - "type": "boolean", - }, - "placeInQueue": { - "type": "integer", - }, - "estimatedTimeMs": { - "type": "integer", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoTempCheckHandleAvailability": { - "lexicon": 1, - "id": "com.atproto.temp.checkHandleAvailability", - "defs": { - "main": { - "type": "query", - "description": - "Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions.", - "parameters": { - "type": "params", - "required": [ - "handle", - ], - "properties": { - "handle": { - "type": "string", - "format": "handle", - "description": - "Tentative handle. Will be checked for availability or used to build handle suggestions.", - }, - "email": { - "type": "string", - "description": - "User-provided email. Might be used to build handle suggestions.", - }, - "birthDate": { - "type": "string", - "format": "datetime", - "description": - "User-provided birth date. Might be used to build handle suggestions.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "handle", - "result", - ], - "properties": { - "handle": { - "type": "string", - "format": "handle", - "description": "Echo of the input handle.", - }, - "result": { - "type": "union", - "refs": [ - "lex:com.atproto.temp.checkHandleAvailability#resultAvailable", - "lex:com.atproto.temp.checkHandleAvailability#resultUnavailable", - ], - }, - }, - }, - }, - "errors": [ - { - "name": "InvalidEmail", - "description": "An invalid email was provided.", - }, - ], - }, - "resultAvailable": { - "type": "object", - "description": "Indicates the provided handle is available.", - "properties": {}, - }, - "resultUnavailable": { - "type": "object", - "description": - "Indicates the provided handle is unavailable and gives suggestions of available handles.", - "required": [ - "suggestions", - ], - "properties": { - "suggestions": { - "type": "array", - "description": - "List of suggested handles based on the provided inputs.", - "items": { - "type": "ref", - "ref": "lex:com.atproto.temp.checkHandleAvailability#suggestion", - }, - }, - }, - }, - "suggestion": { - "type": "object", - "required": [ - "handle", - "method", - ], - "properties": { - "handle": { - "type": "string", - "format": "handle", - }, - "method": { - "type": "string", - "description": - "Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics.", - }, - }, - }, - }, - }, - "ComAtprotoTempRequestPhoneVerification": { - "lexicon": 1, - "id": "com.atproto.temp.requestPhoneVerification", - "defs": { - "main": { - "type": "procedure", - "description": - "Request a verification code to be sent to the supplied phone number", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "phoneNumber", - ], - "properties": { - "phoneNumber": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoTempRevokeAccountCredentials": { - "lexicon": 1, - "id": "com.atproto.temp.revokeAccountCredentials", - "defs": { - "main": { - "type": "procedure", - "description": - "Revoke sessions, password, and app passwords associated with account. May be resolved by a password reset.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "account", - ], - "properties": { - "account": { - "type": "string", - "format": "at-identifier", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoTempFetchLabels": { - "lexicon": 1, - "id": "com.atproto.temp.fetchLabels", - "defs": { - "main": { - "type": "query", - "description": - "DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date.", - "parameters": { - "type": "params", - "properties": { - "since": { - "type": "integer", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 250, - "default": 50, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "labels", - ], - "properties": { - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoIdentityUpdateHandle": { - "lexicon": 1, - "id": "com.atproto.identity.updateHandle", - "defs": { - "main": { - "type": "procedure", - "description": - "Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "handle", - ], - "properties": { - "handle": { - "type": "string", - "format": "handle", - "description": "The new handle.", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoIdentityDefs": { - "lexicon": 1, - "id": "com.atproto.identity.defs", - "defs": { - "identityInfo": { - "type": "object", - "required": [ - "did", - "handle", - "didDoc", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "handle": { - "type": "string", - "format": "handle", - "description": - "The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document.", - }, - "didDoc": { - "type": "unknown", - "description": "The complete DID document for the identity.", - }, - }, - }, - }, - }, - "ComAtprotoIdentitySignPlcOperation": { - "lexicon": 1, - "id": "com.atproto.identity.signPlcOperation", - "defs": { - "main": { - "type": "procedure", - "description": - "Signs a PLC operation to update some value(s) in the requesting DID's document.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "token": { - "description": - "A token received through com.atproto.identity.requestPlcOperationSignature", - "type": "string", - }, - "rotationKeys": { - "type": "array", - "items": { - "type": "string", - }, - }, - "alsoKnownAs": { - "type": "array", - "items": { - "type": "string", - }, - }, - "verificationMethods": { - "type": "unknown", - }, - "services": { - "type": "unknown", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "operation", - ], - "properties": { - "operation": { - "type": "unknown", - "description": "A signed DID PLC operation.", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoIdentitySubmitPlcOperation": { - "lexicon": 1, - "id": "com.atproto.identity.submitPlcOperation", - "defs": { - "main": { - "type": "procedure", - "description": - "Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "operation", - ], - "properties": { - "operation": { - "type": "unknown", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoIdentityResolveIdentity": { - "lexicon": 1, - "id": "com.atproto.identity.resolveIdentity", - "defs": { - "main": { - "type": "query", - "description": - "Resolves an identity (DID or Handle) to a full identity (DID document and verified handle).", - "parameters": { - "type": "params", - "required": [ - "identifier", - ], - "properties": { - "identifier": { - "type": "string", - "format": "at-identifier", - "description": "Handle or DID to resolve.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:com.atproto.identity.defs#identityInfo", - }, - }, - "errors": [ - { - "name": "HandleNotFound", - "description": - "The resolution process confirmed that the handle does not resolve to any DID.", - }, - { - "name": "DidNotFound", - "description": - "The DID resolution process confirmed that there is no current DID.", - }, - { - "name": "DidDeactivated", - "description": - "The DID previously existed, but has been deactivated.", - }, - ], - }, - }, - }, - "ComAtprotoIdentityRefreshIdentity": { - "lexicon": 1, - "id": "com.atproto.identity.refreshIdentity", - "defs": { - "main": { - "type": "procedure", - "description": - "Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "identifier", - ], - "properties": { - "identifier": { - "type": "string", - "format": "at-identifier", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:com.atproto.identity.defs#identityInfo", - }, - }, - "errors": [ - { - "name": "HandleNotFound", - "description": - "The resolution process confirmed that the handle does not resolve to any DID.", - }, - { - "name": "DidNotFound", - "description": - "The DID resolution process confirmed that there is no current DID.", - }, - { - "name": "DidDeactivated", - "description": - "The DID previously existed, but has been deactivated.", - }, - ], - }, - }, - }, - "ComAtprotoIdentityResolveHandle": { - "lexicon": 1, - "id": "com.atproto.identity.resolveHandle", - "defs": { - "main": { - "type": "query", - "description": - "Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document.", - "parameters": { - "type": "params", - "required": [ - "handle", - ], - "properties": { - "handle": { - "type": "string", - "format": "handle", - "description": "The handle to resolve.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - }, - "errors": [ - { - "name": "HandleNotFound", - "description": - "The resolution process confirmed that the handle does not resolve to any DID.", - }, - ], - }, - }, - }, - "ComAtprotoIdentityRequestPlcOperationSignature": { - "lexicon": 1, - "id": "com.atproto.identity.requestPlcOperationSignature", - "defs": { - "main": { - "type": "procedure", - "description": - "Request an email with a code to in order to request a signed PLC operation. Requires Auth.", - }, - }, - }, - "ComAtprotoIdentityGetRecommendedDidCredentials": { - "lexicon": 1, - "id": "com.atproto.identity.getRecommendedDidCredentials", - "defs": { - "main": { - "type": "query", - "description": - "Describe the credentials that should be included in the DID doc of an account that is migrating to this service.", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "rotationKeys": { - "description": - "Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs.", - "type": "array", - "items": { - "type": "string", - }, - }, - "alsoKnownAs": { - "type": "array", - "items": { - "type": "string", - }, - }, - "verificationMethods": { - "type": "unknown", - }, - "services": { - "type": "unknown", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoIdentityResolveDid": { - "lexicon": 1, - "id": "com.atproto.identity.resolveDid", - "defs": { - "main": { - "type": "query", - "description": - "Resolves DID to DID document. Does not bi-directionally verify handle.", - "parameters": { - "type": "params", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - "description": "DID to resolve.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "didDoc", - ], - "properties": { - "didDoc": { - "type": "unknown", - "description": "The complete DID document for the identity.", - }, - }, - }, - }, - "errors": [ - { - "name": "DidNotFound", - "description": - "The DID resolution process confirmed that there is no current DID.", - }, - { - "name": "DidDeactivated", - "description": - "The DID previously existed, but has been deactivated.", - }, - ], - }, - }, - }, - "ComAtprotoAdminUpdateAccountEmail": { - "lexicon": 1, - "id": "com.atproto.admin.updateAccountEmail", - "defs": { - "main": { - "type": "procedure", - "description": "Administrative action to update an account's email.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "account", - "email", - ], - "properties": { - "account": { - "type": "string", - "format": "at-identifier", - "description": "The handle or DID of the repo.", - }, - "email": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoAdminGetAccountInfo": { - "lexicon": 1, - "id": "com.atproto.admin.getAccountInfo", - "defs": { - "main": { - "type": "query", - "description": "Get details about an account.", - "parameters": { - "type": "params", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:com.atproto.admin.defs#accountView", - }, - }, - }, - }, - }, - "ComAtprotoAdminGetSubjectStatus": { - "lexicon": 1, - "id": "com.atproto.admin.getSubjectStatus", - "defs": { - "main": { - "type": "query", - "description": - "Get the service-specific admin status of a subject (account, record, or blob).", - "parameters": { - "type": "params", - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "uri": { - "type": "string", - "format": "at-uri", - }, - "blob": { - "type": "string", - "format": "cid", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subject", - ], - "properties": { - "subject": { - "type": "union", - "refs": [ - "lex:com.atproto.admin.defs#repoRef", - "lex:com.atproto.repo.strongRef", - "lex:com.atproto.admin.defs#repoBlobRef", - ], - }, - "takedown": { - "type": "ref", - "ref": "lex:com.atproto.admin.defs#statusAttr", - }, - "deactivated": { - "type": "ref", - "ref": "lex:com.atproto.admin.defs#statusAttr", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoAdminDefs": { - "lexicon": 1, - "id": "com.atproto.admin.defs", - "defs": { - "statusAttr": { - "type": "object", - "required": [ - "applied", - ], - "properties": { - "applied": { - "type": "boolean", - }, - "ref": { - "type": "string", - }, - }, - }, - "accountView": { - "type": "object", - "required": [ - "did", - "handle", - "indexedAt", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "handle": { - "type": "string", - "format": "handle", - }, - "email": { - "type": "string", - }, - "relatedRecords": { - "type": "array", - "items": { - "type": "unknown", - }, - }, - "indexedAt": { - "type": "string", - "format": "datetime", - }, - "invitedBy": { - "type": "ref", - "ref": "lex:com.atproto.server.defs#inviteCode", - }, - "invites": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.server.defs#inviteCode", - }, - }, - "invitesDisabled": { - "type": "boolean", - }, - "emailConfirmedAt": { - "type": "string", - "format": "datetime", - }, - "inviteNote": { - "type": "string", - }, - "deactivatedAt": { - "type": "string", - "format": "datetime", - }, - "threatSignatures": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.admin.defs#threatSignature", - }, - }, - }, - }, - "repoRef": { - "type": "object", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - "repoBlobRef": { - "type": "object", - "required": [ - "did", - "cid", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "recordUri": { - "type": "string", - "format": "at-uri", - }, - }, - }, - "threatSignature": { - "type": "object", - "required": [ - "property", - "value", - ], - "properties": { - "property": { - "type": "string", - }, - "value": { - "type": "string", - }, - }, - }, - }, - }, - "ComAtprotoAdminSearchAccounts": { - "lexicon": 1, - "id": "com.atproto.admin.searchAccounts", - "defs": { - "main": { - "type": "query", - "description": "Get list of accounts that matches your search query.", - "parameters": { - "type": "params", - "properties": { - "email": { - "type": "string", - }, - "cursor": { - "type": "string", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "accounts", - ], - "properties": { - "cursor": { - "type": "string", - }, - "accounts": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.admin.defs#accountView", - }, - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoAdminUpdateAccountPassword": { - "lexicon": 1, - "id": "com.atproto.admin.updateAccountPassword", - "defs": { - "main": { - "type": "procedure", - "description": - "Update the password for a user account as an administrator.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "did", - "password", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "password": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoAdminUpdateAccountHandle": { - "lexicon": 1, - "id": "com.atproto.admin.updateAccountHandle", - "defs": { - "main": { - "type": "procedure", - "description": "Administrative action to update an account's handle.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "did", - "handle", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "handle": { - "type": "string", - "format": "handle", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoAdminGetInviteCodes": { - "lexicon": 1, - "id": "com.atproto.admin.getInviteCodes", - "defs": { - "main": { - "type": "query", - "description": "Get an admin view of invite codes.", - "parameters": { - "type": "params", - "properties": { - "sort": { - "type": "string", - "knownValues": [ - "recent", - "usage", - ], - "default": "recent", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 500, - "default": 100, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "codes", - ], - "properties": { - "cursor": { - "type": "string", - }, - "codes": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.server.defs#inviteCode", - }, - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoAdminUpdateAccountSigningKey": { - "lexicon": 1, - "id": "com.atproto.admin.updateAccountSigningKey", - "defs": { - "main": { - "type": "procedure", - "description": - "Administrative action to update an account's signing key in their Did document.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "did", - "signingKey", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "signingKey": { - "type": "string", - "format": "did", - "description": "Did-key formatted public key", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoAdminEnableAccountInvites": { - "lexicon": 1, - "id": "com.atproto.admin.enableAccountInvites", - "defs": { - "main": { - "type": "procedure", - "description": - "Re-enable an account's ability to receive invite codes.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "account", - ], - "properties": { - "account": { - "type": "string", - "format": "did", - }, - "note": { - "type": "string", - "description": "Optional reason for enabled invites.", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoAdminDisableAccountInvites": { - "lexicon": 1, - "id": "com.atproto.admin.disableAccountInvites", - "defs": { - "main": { - "type": "procedure", - "description": - "Disable an account from receiving new invite codes, but does not invalidate existing codes.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "account", - ], - "properties": { - "account": { - "type": "string", - "format": "did", - }, - "note": { - "type": "string", - "description": "Optional reason for disabled invites.", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoAdminDisableInviteCodes": { - "lexicon": 1, - "id": "com.atproto.admin.disableInviteCodes", - "defs": { - "main": { - "type": "procedure", - "description": - "Disable some set of codes and/or all codes associated with a set of users.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "codes": { - "type": "array", - "items": { - "type": "string", - }, - }, - "accounts": { - "type": "array", - "items": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoAdminUpdateSubjectStatus": { - "lexicon": 1, - "id": "com.atproto.admin.updateSubjectStatus", - "defs": { - "main": { - "type": "procedure", - "description": - "Update the service-specific admin status of a subject (account, record, or blob).", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subject", - ], - "properties": { - "subject": { - "type": "union", - "refs": [ - "lex:com.atproto.admin.defs#repoRef", - "lex:com.atproto.repo.strongRef", - "lex:com.atproto.admin.defs#repoBlobRef", - ], - }, - "takedown": { - "type": "ref", - "ref": "lex:com.atproto.admin.defs#statusAttr", - }, - "deactivated": { - "type": "ref", - "ref": "lex:com.atproto.admin.defs#statusAttr", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "subject", - ], - "properties": { - "subject": { - "type": "union", - "refs": [ - "lex:com.atproto.admin.defs#repoRef", - "lex:com.atproto.repo.strongRef", - "lex:com.atproto.admin.defs#repoBlobRef", - ], - }, - "takedown": { - "type": "ref", - "ref": "lex:com.atproto.admin.defs#statusAttr", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoAdminSendEmail": { - "lexicon": 1, - "id": "com.atproto.admin.sendEmail", - "defs": { - "main": { - "type": "procedure", - "description": "Send email to a user's account email address.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "recipientDid", - "content", - "senderDid", - ], - "properties": { - "recipientDid": { - "type": "string", - "format": "did", - }, - "content": { - "type": "string", - }, - "subject": { - "type": "string", - }, - "senderDid": { - "type": "string", - "format": "did", - }, - "comment": { - "type": "string", - "description": - "Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "sent", - ], - "properties": { - "sent": { - "type": "boolean", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoAdminGetAccountInfos": { - "lexicon": 1, - "id": "com.atproto.admin.getAccountInfos", - "defs": { - "main": { - "type": "query", - "description": "Get details about some accounts.", - "parameters": { - "type": "params", - "required": [ - "dids", - ], - "properties": { - "dids": { - "type": "array", - "items": { - "type": "string", - "format": "did", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "infos", - ], - "properties": { - "infos": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.admin.defs#accountView", - }, - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoAdminDeleteAccount": { - "lexicon": 1, - "id": "com.atproto.admin.deleteAccount", - "defs": { - "main": { - "type": "procedure", - "description": "Delete a user account as an administrator.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoLabelSubscribeLabels": { - "lexicon": 1, - "id": "com.atproto.label.subscribeLabels", - "defs": { - "main": { - "type": "subscription", - "description": - "Subscribe to stream of labels (and negations). Public endpoint implemented by mod services. Uses same sequencing scheme as repo event stream.", - "parameters": { - "type": "params", - "properties": { - "cursor": { - "type": "integer", - "description": - "The last known event seq number to backfill from.", - }, - }, - }, - "message": { - "schema": { - "type": "union", - "refs": [ - "lex:com.atproto.label.subscribeLabels#labels", - "lex:com.atproto.label.subscribeLabels#info", - ], - }, - }, - "errors": [ - { - "name": "FutureCursor", - }, - ], - }, - "labels": { - "type": "object", - "required": [ - "seq", - "labels", - ], - "properties": { - "seq": { - "type": "integer", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - }, - }, - "info": { - "type": "object", - "required": [ - "name", - ], - "properties": { - "name": { - "type": "string", - "knownValues": [ - "OutdatedCursor", - ], - }, - "message": { - "type": "string", - }, - }, - }, - }, - }, - "ComAtprotoLabelDefs": { - "lexicon": 1, - "id": "com.atproto.label.defs", - "defs": { - "label": { - "type": "object", - "description": - "Metadata tag on an atproto resource (eg, repo or record).", - "required": [ - "src", - "uri", - "val", - "cts", - ], - "properties": { - "ver": { - "type": "integer", - "description": "The AT Protocol version of the label object.", - }, - "src": { - "type": "string", - "format": "did", - "description": "DID of the actor who created this label.", - }, - "uri": { - "type": "string", - "format": "uri", - "description": - "AT URI of the record, repository (account), or other resource that this label applies to.", - }, - "cid": { - "type": "string", - "format": "cid", - "description": - "Optionally, CID specifying the specific version of 'uri' resource this label applies to.", - }, - "val": { - "type": "string", - "maxLength": 128, - "description": - "The short string name of the value or type of this label.", - }, - "neg": { - "type": "boolean", - "description": - "If true, this is a negation label, overwriting a previous label.", - }, - "cts": { - "type": "string", - "format": "datetime", - "description": "Timestamp when this label was created.", - }, - "exp": { - "type": "string", - "format": "datetime", - "description": - "Timestamp at which this label expires (no longer applies).", - }, - "sig": { - "type": "bytes", - "description": "Signature of dag-cbor encoded label.", - }, - }, - }, - "selfLabels": { - "type": "object", - "description": - "Metadata tags on an atproto record, published by the author within the record.", - "required": [ - "values", - ], - "properties": { - "values": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#selfLabel", - }, - "maxLength": 10, - }, - }, - }, - "selfLabel": { - "type": "object", - "description": - "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.", - "required": [ - "val", - ], - "properties": { - "val": { - "type": "string", - "maxLength": 128, - "description": - "The short string name of the value or type of this label.", - }, - }, - }, - "labelValueDefinition": { - "type": "object", - "description": - "Declares a label value and its expected interpretations and behaviors.", - "required": [ - "identifier", - "severity", - "blurs", - "locales", - ], - "properties": { - "identifier": { - "type": "string", - "description": - "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).", - "maxLength": 100, - "maxGraphemes": 100, - }, - "severity": { - "type": "string", - "description": - "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.", - "knownValues": [ - "inform", - "alert", - "none", - ], - }, - "blurs": { - "type": "string", - "description": - "What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.", - "knownValues": [ - "content", - "media", - "none", - ], - }, - "defaultSetting": { - "type": "string", - "description": "The default setting for this label.", - "knownValues": [ - "ignore", - "warn", - "hide", - ], - "default": "warn", - }, - "adultOnly": { - "type": "boolean", - "description": - "Does the user need to have adult content enabled in order to configure this label?", - }, - "locales": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#labelValueDefinitionStrings", - }, - }, - }, - }, - "labelValueDefinitionStrings": { - "type": "object", - "description": - "Strings which describe the label in the UI, localized into a specific language.", - "required": [ - "lang", - "name", - "description", - ], - "properties": { - "lang": { - "type": "string", - "description": - "The code of the language these strings are written in.", - "format": "language", - }, - "name": { - "type": "string", - "description": "A short human-readable name for the label.", - "maxGraphemes": 64, - "maxLength": 640, - }, - "description": { - "type": "string", - "description": - "A longer description of what the label means and why it might be applied.", - "maxGraphemes": 10000, - "maxLength": 100000, - }, - }, - }, - "labelValue": { - "type": "string", - "knownValues": [ - "!hide", - "!warn", - "!no-unauthenticated", - "porn", - "sexual", - "nudity", - "graphic-media", - "bot", - ], - }, - }, - }, - "ComAtprotoLabelQueryLabels": { - "lexicon": 1, - "id": "com.atproto.label.queryLabels", - "defs": { - "main": { - "type": "query", - "description": - "Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services, though may return different or additional results with auth.", - "parameters": { - "type": "params", - "required": [ - "uriPatterns", - ], - "properties": { - "uriPatterns": { - "type": "array", - "items": { - "type": "string", - }, - "description": - "List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI.", - }, - "sources": { - "type": "array", - "items": { - "type": "string", - "format": "did", - }, - "description": - "Optional list of label sources (DIDs) to filter on.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 250, - "default": 50, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "labels", - ], - "properties": { - "cursor": { - "type": "string", - }, - "labels": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.label.defs#label", - }, - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoServerRequestEmailConfirmation": { - "lexicon": 1, - "id": "com.atproto.server.requestEmailConfirmation", - "defs": { - "main": { - "type": "procedure", - "description": - "Request an email with a code to confirm ownership of email.", - }, - }, - }, - "ComAtprotoServerReserveSigningKey": { - "lexicon": 1, - "id": "com.atproto.server.reserveSigningKey", - "defs": { - "main": { - "type": "procedure", - "description": - "Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "did": { - "type": "string", - "format": "did", - "description": "The DID to reserve a key for.", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "signingKey", - ], - "properties": { - "signingKey": { - "type": "string", - "description": - "The public key for the reserved signing key, in did:key serialization.", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoServerDefs": { - "lexicon": 1, - "id": "com.atproto.server.defs", - "defs": { - "inviteCode": { - "type": "object", - "required": [ - "code", - "available", - "disabled", - "forAccount", - "createdBy", - "createdAt", - "uses", - ], - "properties": { - "code": { - "type": "string", - }, - "available": { - "type": "integer", - }, - "disabled": { - "type": "boolean", - }, - "forAccount": { - "type": "string", - }, - "createdBy": { - "type": "string", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "uses": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.server.defs#inviteCodeUse", - }, - }, - }, - }, - "inviteCodeUse": { - "type": "object", - "required": [ - "usedBy", - "usedAt", - ], - "properties": { - "usedBy": { - "type": "string", - "format": "did", - }, - "usedAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - "ComAtprotoServerGetServiceAuth": { - "lexicon": 1, - "id": "com.atproto.server.getServiceAuth", - "defs": { - "main": { - "type": "query", - "description": - "Get a signed token on behalf of the requesting DID for the requested service.", - "parameters": { - "type": "params", - "required": [ - "aud", - ], - "properties": { - "aud": { - "type": "string", - "format": "did", - "description": - "The DID of the service that the token will be used to authenticate with", - }, - "exp": { - "type": "integer", - "description": - "The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope.", - }, - "lxm": { - "type": "string", - "format": "nsid", - "description": - "Lexicon (XRPC) method to bind the requested token to", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "token", - ], - "properties": { - "token": { - "type": "string", - }, - }, - }, - }, - "errors": [ - { - "name": "BadExpiration", - "description": - "Indicates that the requested expiration date is not a valid. May be in the past or may be reliant on the requested scopes.", - }, - ], - }, - }, - }, - "ComAtprotoServerGetAccountInviteCodes": { - "lexicon": 1, - "id": "com.atproto.server.getAccountInviteCodes", - "defs": { - "main": { - "type": "query", - "description": - "Get all invite codes for the current account. Requires auth.", - "parameters": { - "type": "params", - "properties": { - "includeUsed": { - "type": "boolean", - "default": true, - }, - "createAvailable": { - "type": "boolean", - "default": true, - "description": - "Controls whether any new 'earned' but not 'created' invites should be created.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "codes", - ], - "properties": { - "codes": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.server.defs#inviteCode", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "DuplicateCreate", - }, - ], - }, - }, - }, - "ComAtprotoServerCreateSession": { - "lexicon": 1, - "id": "com.atproto.server.createSession", - "defs": { - "main": { - "type": "procedure", - "description": "Create an authentication session.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "identifier", - "password", - ], - "properties": { - "identifier": { - "type": "string", - "description": - "Handle or other identifier supported by the server for the authenticating user.", - }, - "password": { - "type": "string", - }, - "authFactorToken": { - "type": "string", - }, - "allowTakendown": { - "type": "boolean", - "description": - "When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "accessJwt", - "refreshJwt", - "handle", - "did", - ], - "properties": { - "accessJwt": { - "type": "string", - }, - "refreshJwt": { - "type": "string", - }, - "handle": { - "type": "string", - "format": "handle", - }, - "did": { - "type": "string", - "format": "did", - }, - "didDoc": { - "type": "unknown", - }, - "email": { - "type": "string", - }, - "emailConfirmed": { - "type": "boolean", - }, - "emailAuthFactor": { - "type": "boolean", - }, - "active": { - "type": "boolean", - }, - "status": { - "type": "string", - "description": - "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.", - "knownValues": [ - "takendown", - "suspended", - "deactivated", - ], - }, - }, - }, - }, - "errors": [ - { - "name": "AccountTakedown", - }, - { - "name": "AuthFactorTokenRequired", - }, - ], - }, - }, - }, - "ComAtprotoServerListAppPasswords": { - "lexicon": 1, - "id": "com.atproto.server.listAppPasswords", - "defs": { - "main": { - "type": "query", - "description": "List all App Passwords.", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "passwords", - ], - "properties": { - "passwords": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.server.listAppPasswords#appPassword", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "AccountTakedown", - }, - ], - }, - "appPassword": { - "type": "object", - "required": [ - "name", - "createdAt", - ], - "properties": { - "name": { - "type": "string", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "privileged": { - "type": "boolean", - }, - }, - }, - }, - }, - "ComAtprotoServerCreateInviteCodes": { - "lexicon": 1, - "id": "com.atproto.server.createInviteCodes", - "defs": { - "main": { - "type": "procedure", - "description": "Create invite codes.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "codeCount", - "useCount", - ], - "properties": { - "codeCount": { - "type": "integer", - "default": 1, - }, - "useCount": { - "type": "integer", - }, - "forAccounts": { - "type": "array", - "items": { - "type": "string", - "format": "did", - }, - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "codes", - ], - "properties": { - "codes": { - "type": "array", - "items": { - "type": "ref", - "ref": - "lex:com.atproto.server.createInviteCodes#accountCodes", - }, - }, - }, - }, - }, - }, - "accountCodes": { - "type": "object", - "required": [ - "account", - "codes", - ], - "properties": { - "account": { - "type": "string", - }, - "codes": { - "type": "array", - "items": { - "type": "string", - }, - }, - }, - }, - }, - }, - "ComAtprotoServerDeleteSession": { - "lexicon": 1, - "id": "com.atproto.server.deleteSession", - "defs": { - "main": { - "type": "procedure", - "description": - "Delete the current session. Requires auth using the 'refreshJwt' (not the 'accessJwt').", - "errors": [ - { - "name": "InvalidToken", - }, - { - "name": "ExpiredToken", - }, - ], - }, - }, - }, - "ComAtprotoServerRevokeAppPassword": { - "lexicon": 1, - "id": "com.atproto.server.revokeAppPassword", - "defs": { - "main": { - "type": "procedure", - "description": "Revoke an App Password by name.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "name", - ], - "properties": { - "name": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoServerCreateAppPassword": { - "lexicon": 1, - "id": "com.atproto.server.createAppPassword", - "defs": { - "main": { - "type": "procedure", - "description": "Create an App Password.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "name", - ], - "properties": { - "name": { - "type": "string", - "description": - "A short name for the App Password, to help distinguish them.", - }, - "privileged": { - "type": "boolean", - "description": - "If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients.", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "ref", - "ref": "lex:com.atproto.server.createAppPassword#appPassword", - }, - }, - "errors": [ - { - "name": "AccountTakedown", - }, - ], - }, - "appPassword": { - "type": "object", - "required": [ - "name", - "password", - "createdAt", - ], - "properties": { - "name": { - "type": "string", - }, - "password": { - "type": "string", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - "privileged": { - "type": "boolean", - }, - }, - }, - }, - }, - "ComAtprotoServerActivateAccount": { - "lexicon": 1, - "id": "com.atproto.server.activateAccount", - "defs": { - "main": { - "type": "procedure", - "description": - "Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup.", - }, - }, - }, - "ComAtprotoServerDescribeServer": { - "lexicon": 1, - "id": "com.atproto.server.describeServer", - "defs": { - "main": { - "type": "query", - "description": - "Describes the server's account creation requirements and capabilities. Implemented by PDS.", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "did", - "availableUserDomains", - ], - "properties": { - "inviteCodeRequired": { - "type": "boolean", - "description": - "If true, an invite code must be supplied to create an account on this instance.", - }, - "phoneVerificationRequired": { - "type": "boolean", - "description": - "If true, a phone verification token must be supplied to create an account on this instance.", - }, - "availableUserDomains": { - "type": "array", - "description": - "List of domain suffixes that can be used in account handles.", - "items": { - "type": "string", - }, - }, - "links": { - "type": "ref", - "description": "URLs of service policy documents.", - "ref": "lex:com.atproto.server.describeServer#links", - }, - "contact": { - "type": "ref", - "description": "Contact information", - "ref": "lex:com.atproto.server.describeServer#contact", - }, - "did": { - "type": "string", - "format": "did", - }, - }, - }, - }, - }, - "links": { - "type": "object", - "properties": { - "privacyPolicy": { - "type": "string", - "format": "uri", - }, - "termsOfService": { - "type": "string", - "format": "uri", - }, - }, - }, - "contact": { - "type": "object", - "properties": { - "email": { - "type": "string", - }, - }, - }, - }, - }, - "ComAtprotoServerConfirmEmail": { - "lexicon": 1, - "id": "com.atproto.server.confirmEmail", - "defs": { - "main": { - "type": "procedure", - "description": - "Confirm an email using a token from com.atproto.server.requestEmailConfirmation.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "email", - "token", - ], - "properties": { - "email": { - "type": "string", - }, - "token": { - "type": "string", - }, - }, - }, - }, - "errors": [ - { - "name": "AccountNotFound", - }, - { - "name": "ExpiredToken", - }, - { - "name": "InvalidToken", - }, - { - "name": "InvalidEmail", - }, - ], - }, - }, - }, - "ComAtprotoServerGetSession": { - "lexicon": 1, - "id": "com.atproto.server.getSession", - "defs": { - "main": { - "type": "query", - "description": - "Get information about the current auth session. Requires auth.", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "handle", - "did", - ], - "properties": { - "handle": { - "type": "string", - "format": "handle", - }, - "did": { - "type": "string", - "format": "did", - }, - "didDoc": { - "type": "unknown", - }, - "email": { - "type": "string", - }, - "emailConfirmed": { - "type": "boolean", - }, - "emailAuthFactor": { - "type": "boolean", - }, - "active": { - "type": "boolean", - }, - "status": { - "type": "string", - "description": - "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.", - "knownValues": [ - "takendown", - "suspended", - "deactivated", - ], - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoServerRefreshSession": { - "lexicon": 1, - "id": "com.atproto.server.refreshSession", - "defs": { - "main": { - "type": "procedure", - "description": - "Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt').", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "accessJwt", - "refreshJwt", - "handle", - "did", - ], - "properties": { - "accessJwt": { - "type": "string", - }, - "refreshJwt": { - "type": "string", - }, - "handle": { - "type": "string", - "format": "handle", - }, - "did": { - "type": "string", - "format": "did", - }, - "didDoc": { - "type": "unknown", - }, - "email": { - "type": "string", - }, - "emailConfirmed": { - "type": "boolean", - }, - "emailAuthFactor": { - "type": "boolean", - }, - "active": { - "type": "boolean", - }, - "status": { - "type": "string", - "description": - "Hosting status of the account. If not specified, then assume 'active'.", - "knownValues": [ - "takendown", - "suspended", - "deactivated", - ], - }, - }, - }, - }, - "errors": [ - { - "name": "AccountTakedown", - }, - { - "name": "InvalidToken", - }, - { - "name": "ExpiredToken", - }, - ], - }, - }, - }, - "ComAtprotoServerDeactivateAccount": { - "lexicon": 1, - "id": "com.atproto.server.deactivateAccount", - "defs": { - "main": { - "type": "procedure", - "description": - "Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "deleteAfter": { - "type": "string", - "format": "datetime", - "description": - "A recommendation to server as to how long they should hold onto the deactivated account before deleting.", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoServerUpdateEmail": { - "lexicon": 1, - "id": "com.atproto.server.updateEmail", - "defs": { - "main": { - "type": "procedure", - "description": "Update an account's email.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "email", - ], - "properties": { - "email": { - "type": "string", - }, - "emailAuthFactor": { - "type": "boolean", - }, - "token": { - "type": "string", - "description": - "Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed.", - }, - }, - }, - }, - "errors": [ - { - "name": "ExpiredToken", - }, - { - "name": "InvalidToken", - }, - { - "name": "TokenRequired", - }, - ], - }, - }, - }, - "ComAtprotoServerResetPassword": { - "lexicon": 1, - "id": "com.atproto.server.resetPassword", - "defs": { - "main": { - "type": "procedure", - "description": "Reset a user account password using a token.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "token", - "password", - ], - "properties": { - "token": { - "type": "string", - }, - "password": { - "type": "string", - }, - }, - }, - }, - "errors": [ - { - "name": "ExpiredToken", - }, - { - "name": "InvalidToken", - }, - ], - }, - }, - }, - "ComAtprotoServerCheckAccountStatus": { - "lexicon": 1, - "id": "com.atproto.server.checkAccountStatus", - "defs": { - "main": { - "type": "query", - "description": - "Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself.", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "activated", - "validDid", - "repoCommit", - "repoRev", - "repoBlocks", - "indexedRecords", - "privateStateValues", - "expectedBlobs", - "importedBlobs", - ], - "properties": { - "activated": { - "type": "boolean", - }, - "validDid": { - "type": "boolean", - }, - "repoCommit": { - "type": "string", - "format": "cid", - }, - "repoRev": { - "type": "string", - }, - "repoBlocks": { - "type": "integer", - }, - "indexedRecords": { - "type": "integer", - }, - "privateStateValues": { - "type": "integer", - }, - "expectedBlobs": { - "type": "integer", - }, - "importedBlobs": { - "type": "integer", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoServerRequestEmailUpdate": { - "lexicon": 1, - "id": "com.atproto.server.requestEmailUpdate", - "defs": { - "main": { - "type": "procedure", - "description": "Request a token in order to update email.", - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "tokenRequired", - ], - "properties": { - "tokenRequired": { - "type": "boolean", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoServerRequestPasswordReset": { - "lexicon": 1, - "id": "com.atproto.server.requestPasswordReset", - "defs": { - "main": { - "type": "procedure", - "description": "Initiate a user account password reset via email.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "email", - ], - "properties": { - "email": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoServerRequestAccountDelete": { - "lexicon": 1, - "id": "com.atproto.server.requestAccountDelete", - "defs": { - "main": { - "type": "procedure", - "description": "Initiate a user account deletion via email.", - }, - }, - }, - "ComAtprotoServerCreateAccount": { - "lexicon": 1, - "id": "com.atproto.server.createAccount", - "defs": { - "main": { - "type": "procedure", - "description": "Create an account. Implemented by PDS.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "handle", - ], - "properties": { - "email": { - "type": "string", - }, - "handle": { - "type": "string", - "format": "handle", - "description": "Requested handle for the account.", - }, - "did": { - "type": "string", - "format": "did", - "description": - "Pre-existing atproto DID, being imported to a new account.", - }, - "inviteCode": { - "type": "string", - }, - "verificationCode": { - "type": "string", - }, - "verificationPhone": { - "type": "string", - }, - "password": { - "type": "string", - "description": - "Initial account password. May need to meet instance-specific password strength requirements.", - }, - "recoveryKey": { - "type": "string", - "description": - "DID PLC rotation key (aka, recovery key) to be included in PLC creation operation.", - }, - "plcOp": { - "type": "unknown", - "description": - "A signed DID PLC operation to be submitted as part of importing an existing account to this instance. NOTE: this optional field may be updated when full account migration is implemented.", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "description": - "Account login session returned on successful account creation.", - "required": [ - "accessJwt", - "refreshJwt", - "handle", - "did", - ], - "properties": { - "accessJwt": { - "type": "string", - }, - "refreshJwt": { - "type": "string", - }, - "handle": { - "type": "string", - "format": "handle", - }, - "did": { - "type": "string", - "format": "did", - "description": "The DID of the new account.", - }, - "didDoc": { - "type": "unknown", - "description": "Complete DID document.", - }, - }, - }, - }, - "errors": [ - { - "name": "InvalidHandle", - }, - { - "name": "InvalidPassword", - }, - { - "name": "InvalidInviteCode", - }, - { - "name": "HandleNotAvailable", - }, - { - "name": "UnsupportedDomain", - }, - { - "name": "UnresolvableDid", - }, - { - "name": "IncompatibleDidDoc", - }, - ], - }, - }, - }, - "ComAtprotoServerDeleteAccount": { - "lexicon": 1, - "id": "com.atproto.server.deleteAccount", - "defs": { - "main": { - "type": "procedure", - "description": - "Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "did", - "password", - "token", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "password": { - "type": "string", - }, - "token": { - "type": "string", - }, - }, - }, - }, - "errors": [ - { - "name": "ExpiredToken", - }, - { - "name": "InvalidToken", - }, - ], - }, - }, - }, - "ComAtprotoServerCreateInviteCode": { - "lexicon": 1, - "id": "com.atproto.server.createInviteCode", - "defs": { - "main": { - "type": "procedure", - "description": "Create an invite code.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "useCount", - ], - "properties": { - "useCount": { - "type": "integer", - }, - "forAccount": { - "type": "string", - "format": "did", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "code", - ], - "properties": { - "code": { - "type": "string", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoLexiconResolveLexicon": { - "lexicon": 1, - "id": "com.atproto.lexicon.resolveLexicon", - "defs": { - "main": { - "type": "query", - "description": "Resolves an atproto lexicon (NSID) to a schema.", - "parameters": { - "type": "params", - "properties": { - "nsid": { - "format": "nsid", - "type": "string", - "description": "The lexicon NSID to resolve.", - }, - }, - "required": [ - "nsid", - ], - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "cid": { - "type": "string", - "format": "cid", - "description": "The CID of the lexicon schema record.", - }, - "schema": { - "type": "ref", - "ref": "lex:com.atproto.lexicon.schema#main", - "description": "The resolved lexicon schema record.", - }, - "uri": { - "type": "string", - "format": "at-uri", - "description": "The AT-URI of the lexicon schema record.", - }, - }, - "required": [ - "uri", - "cid", - "schema", - ], - }, - }, - "errors": [ - { - "description": "No lexicon was resolved for the NSID.", - "name": "LexiconNotFound", - }, - ], - }, - }, - }, - "ComAtprotoLexiconSchema": { - "lexicon": 1, - "id": "com.atproto.lexicon.schema", - "defs": { - "main": { - "type": "record", - "description": - "Representation of Lexicon schemas themselves, when published as atproto records. Note that the schema language is not defined in Lexicon; this meta schema currently only includes a single version field ('lexicon'). See the atproto specifications for description of the other expected top-level fields ('id', 'defs', etc).", - "key": "nsid", - "record": { - "type": "object", - "required": [ - "lexicon", - ], - "properties": { - "lexicon": { - "type": "integer", - "description": - "Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system.", - }, - }, - }, - }, - }, - }, - "ComAtprotoSyncGetHead": { - "lexicon": 1, - "id": "com.atproto.sync.getHead", - "defs": { - "main": { - "type": "query", - "description": - "DEPRECATED - please use com.atproto.sync.getLatestCommit instead", - "parameters": { - "type": "params", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - "description": "The DID of the repo.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "root", - ], - "properties": { - "root": { - "type": "string", - "format": "cid", - }, - }, - }, - }, - "errors": [ - { - "name": "HeadNotFound", - }, - ], - }, - }, - }, - "ComAtprotoSyncGetBlob": { - "lexicon": 1, - "id": "com.atproto.sync.getBlob", - "defs": { - "main": { - "type": "query", - "description": - "Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS.", - "parameters": { - "type": "params", - "required": [ - "did", - "cid", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - "description": "The DID of the account.", - }, - "cid": { - "type": "string", - "format": "cid", - "description": "The CID of the blob to fetch", - }, - }, - }, - "output": { - "encoding": "*/*", - }, - "errors": [ - { - "name": "BlobNotFound", - }, - { - "name": "RepoNotFound", - }, - { - "name": "RepoTakendown", - }, - { - "name": "RepoSuspended", - }, - { - "name": "RepoDeactivated", - }, - ], - }, - }, - }, - "ComAtprotoSyncGetRepo": { - "lexicon": 1, - "id": "com.atproto.sync.getRepo", - "defs": { - "main": { - "type": "query", - "description": - "Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS.", - "parameters": { - "type": "params", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - "description": "The DID of the repo.", - }, - "since": { - "type": "string", - "format": "tid", - "description": - "The revision ('rev') of the repo to create a diff from.", - }, - }, - }, - "output": { - "encoding": "application/vnd.ipld.car", - }, - "errors": [ - { - "name": "RepoNotFound", - }, - { - "name": "RepoTakendown", - }, - { - "name": "RepoSuspended", - }, - { - "name": "RepoDeactivated", - }, - ], - }, - }, - }, - "ComAtprotoSyncNotifyOfUpdate": { - "lexicon": 1, - "id": "com.atproto.sync.notifyOfUpdate", - "defs": { - "main": { - "type": "procedure", - "description": - "Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "hostname", - ], - "properties": { - "hostname": { - "type": "string", - "description": - "Hostname of the current service (usually a PDS) that is notifying of update.", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoSyncDefs": { - "lexicon": 1, - "id": "com.atproto.sync.defs", - "defs": { - "hostStatus": { - "type": "string", - "knownValues": [ - "active", - "idle", - "offline", - "throttled", - "banned", - ], - }, - }, - }, - "ComAtprotoSyncRequestCrawl": { - "lexicon": 1, - "id": "com.atproto.sync.requestCrawl", - "defs": { - "main": { - "type": "procedure", - "description": - "Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "hostname", - ], - "properties": { - "hostname": { - "type": "string", - "description": - "Hostname of the current service (eg, PDS) that is requesting to be crawled.", - }, - }, - }, - }, - "errors": [ - { - "name": "HostBanned", - }, - ], - }, - }, - }, - "ComAtprotoSyncListBlobs": { - "lexicon": 1, - "id": "com.atproto.sync.listBlobs", - "defs": { - "main": { - "type": "query", - "description": - "List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS.", - "parameters": { - "type": "params", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - "description": "The DID of the repo.", - }, - "since": { - "type": "string", - "format": "tid", - "description": - "Optional revision of the repo to list blobs since.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 1000, - "default": 500, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "cids", - ], - "properties": { - "cursor": { - "type": "string", - }, - "cids": { - "type": "array", - "items": { - "type": "string", - "format": "cid", - }, - }, - }, - }, - }, - "errors": [ - { - "name": "RepoNotFound", - }, - { - "name": "RepoTakendown", - }, - { - "name": "RepoSuspended", - }, - { - "name": "RepoDeactivated", - }, - ], - }, - }, - }, - "ComAtprotoSyncGetLatestCommit": { - "lexicon": 1, - "id": "com.atproto.sync.getLatestCommit", - "defs": { - "main": { - "type": "query", - "description": - "Get the current commit CID & revision of the specified repo. Does not require auth.", - "parameters": { - "type": "params", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - "description": "The DID of the repo.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "cid", - "rev", - ], - "properties": { - "cid": { - "type": "string", - "format": "cid", - }, - "rev": { - "type": "string", - "format": "tid", - }, - }, - }, - }, - "errors": [ - { - "name": "RepoNotFound", - }, - { - "name": "RepoTakendown", - }, - { - "name": "RepoSuspended", - }, - { - "name": "RepoDeactivated", - }, - ], - }, - }, - }, - "ComAtprotoSyncSubscribeRepos": { - "lexicon": 1, - "id": "com.atproto.sync.subscribeRepos", - "defs": { - "main": { - "type": "subscription", - "description": - "Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.", - "parameters": { - "type": "params", - "properties": { - "cursor": { - "type": "integer", - "description": - "The last known event seq number to backfill from.", - }, - }, - }, - "message": { - "schema": { - "type": "union", - "refs": [ - "lex:com.atproto.sync.subscribeRepos#commit", - "lex:com.atproto.sync.subscribeRepos#sync", - "lex:com.atproto.sync.subscribeRepos#identity", - "lex:com.atproto.sync.subscribeRepos#account", - "lex:com.atproto.sync.subscribeRepos#info", - ], - }, - }, - "errors": [ - { - "name": "FutureCursor", - }, - { - "name": "ConsumerTooSlow", - "description": - "If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection.", - }, - ], - }, - "commit": { - "type": "object", - "description": - "Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature.", - "required": [ - "seq", - "rebase", - "tooBig", - "repo", - "commit", - "rev", - "since", - "blocks", - "ops", - "blobs", - "time", - ], - "nullable": [ - "since", - ], - "properties": { - "seq": { - "type": "integer", - "description": "The stream sequence number of this message.", - }, - "rebase": { - "type": "boolean", - "description": "DEPRECATED -- unused", - }, - "tooBig": { - "type": "boolean", - "description": - "DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data.", - }, - "repo": { - "type": "string", - "format": "did", - "description": - "The repo this event comes from. Note that all other message types name this field 'did'.", - }, - "commit": { - "type": "cid-link", - "description": "Repo commit object CID.", - }, - "rev": { - "type": "string", - "format": "tid", - "description": - "The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event.", - }, - "since": { - "type": "string", - "format": "tid", - "description": - "The rev of the last emitted commit from this repo (if any).", - }, - "blocks": { - "type": "bytes", - "description": - "CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list.", - "maxLength": 2000000, - }, - "ops": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.sync.subscribeRepos#repoOp", - "description": - "List of repo mutation operations in this commit (eg, records created, updated, or deleted).", - }, - "maxLength": 200, - }, - "blobs": { - "type": "array", - "items": { - "type": "cid-link", - "description": - "DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit.", - }, - }, - "prevData": { - "type": "cid-link", - "description": - "The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose.", - }, - "time": { - "type": "string", - "format": "datetime", - "description": - "Timestamp of when this message was originally broadcast.", - }, - }, - }, - "sync": { - "type": "object", - "description": - "Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository.", - "required": [ - "seq", - "did", - "blocks", - "rev", - "time", - ], - "properties": { - "seq": { - "type": "integer", - "description": "The stream sequence number of this message.", - }, - "did": { - "type": "string", - "format": "did", - "description": - "The account this repo event corresponds to. Must match that in the commit object.", - }, - "blocks": { - "type": "bytes", - "description": - "CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'.", - "maxLength": 10000, - }, - "rev": { - "type": "string", - "description": - "The rev of the commit. This value must match that in the commit object.", - }, - "time": { - "type": "string", - "format": "datetime", - "description": - "Timestamp of when this message was originally broadcast.", - }, - }, - }, - "identity": { - "type": "object", - "description": - "Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.", - "required": [ - "seq", - "did", - "time", - ], - "properties": { - "seq": { - "type": "integer", - }, - "did": { - "type": "string", - "format": "did", - }, - "time": { - "type": "string", - "format": "datetime", - }, - "handle": { - "type": "string", - "format": "handle", - "description": - "The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details.", - }, - }, - }, - "account": { - "type": "object", - "description": - "Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.", - "required": [ - "seq", - "did", - "time", - "active", - ], - "properties": { - "seq": { - "type": "integer", - }, - "did": { - "type": "string", - "format": "did", - }, - "time": { - "type": "string", - "format": "datetime", - }, - "active": { - "type": "boolean", - "description": - "Indicates that the account has a repository which can be fetched from the host that emitted this event.", - }, - "status": { - "type": "string", - "description": - "If active=false, this optional field indicates a reason for why the account is not active.", - "knownValues": [ - "takendown", - "suspended", - "deleted", - "deactivated", - "desynchronized", - "throttled", - ], - }, - }, - }, - "info": { - "type": "object", - "required": [ - "name", - ], - "properties": { - "name": { - "type": "string", - "knownValues": [ - "OutdatedCursor", - ], - }, - "message": { - "type": "string", - }, - }, - }, - "repoOp": { - "type": "object", - "description": "A repo operation, ie a mutation of a single record.", - "required": [ - "action", - "path", - "cid", - ], - "nullable": [ - "cid", - ], - "properties": { - "action": { - "type": "string", - "knownValues": [ - "create", - "update", - "delete", - ], - }, - "path": { - "type": "string", - }, - "cid": { - "type": "cid-link", - "description": - "For creates and updates, the new record CID. For deletions, null.", - }, - "prev": { - "type": "cid-link", - "description": - "For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined.", - }, - }, - }, - }, - }, - "ComAtprotoSyncGetRepoStatus": { - "lexicon": 1, - "id": "com.atproto.sync.getRepoStatus", - "defs": { - "main": { - "type": "query", - "description": - "Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.", - "parameters": { - "type": "params", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - "description": "The DID of the repo.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "did", - "active", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "active": { - "type": "boolean", - }, - "status": { - "type": "string", - "description": - "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.", - "knownValues": [ - "takendown", - "suspended", - "deleted", - "deactivated", - "desynchronized", - "throttled", - ], - }, - "rev": { - "type": "string", - "format": "tid", - "description": - "Optional field, the current rev of the repo, if active=true", - }, - }, - }, - }, - "errors": [ - { - "name": "RepoNotFound", - }, - ], - }, - }, - }, - "ComAtprotoSyncGetRecord": { - "lexicon": 1, - "id": "com.atproto.sync.getRecord", - "defs": { - "main": { - "type": "query", - "description": - "Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth.", - "parameters": { - "type": "params", - "required": [ - "did", - "collection", - "rkey", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - "description": "The DID of the repo.", - }, - "collection": { - "type": "string", - "format": "nsid", - }, - "rkey": { - "type": "string", - "description": "Record Key", - "format": "record-key", - }, - }, - }, - "output": { - "encoding": "application/vnd.ipld.car", - }, - "errors": [ - { - "name": "RecordNotFound", - }, - { - "name": "RepoNotFound", - }, - { - "name": "RepoTakendown", - }, - { - "name": "RepoSuspended", - }, - { - "name": "RepoDeactivated", - }, - ], - }, - }, - }, - "ComAtprotoSyncListHosts": { - "lexicon": 1, - "id": "com.atproto.sync.listHosts", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 1000, - "default": 200, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "hosts", - ], - "properties": { - "cursor": { - "type": "string", - }, - "hosts": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.sync.listHosts#host", - }, - "description": - "Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first.", - }, - }, - }, - }, - }, - "host": { - "type": "object", - "required": [ - "hostname", - ], - "properties": { - "hostname": { - "type": "string", - "description": "hostname of server; not a URL (no scheme)", - }, - "seq": { - "type": "integer", - "description": - "Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor).", - }, - "accountCount": { - "type": "integer", - }, - "status": { - "type": "ref", - "ref": "lex:com.atproto.sync.defs#hostStatus", - }, - }, - }, - }, - }, - "ComAtprotoSyncListRepos": { - "lexicon": 1, - "id": "com.atproto.sync.listRepos", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 1000, - "default": 500, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "repos", - ], - "properties": { - "cursor": { - "type": "string", - }, - "repos": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.sync.listRepos#repo", - }, - }, - }, - }, - }, - }, - "repo": { - "type": "object", - "required": [ - "did", - "head", - "rev", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - "head": { - "type": "string", - "format": "cid", - "description": "Current repo commit CID", - }, - "rev": { - "type": "string", - "format": "tid", - }, - "active": { - "type": "boolean", - }, - "status": { - "type": "string", - "description": - "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.", - "knownValues": [ - "takendown", - "suspended", - "deleted", - "deactivated", - "desynchronized", - "throttled", - ], - }, - }, - }, - }, - }, - "ComAtprotoSyncGetHostStatus": { - "lexicon": 1, - "id": "com.atproto.sync.getHostStatus", - "defs": { - "main": { - "type": "query", - "description": - "Returns information about a specified upstream host, as consumed by the server. Implemented by relays.", - "parameters": { - "type": "params", - "required": [ - "hostname", - ], - "properties": { - "hostname": { - "type": "string", - "description": - "Hostname of the host (eg, PDS or relay) being queried.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "hostname", - ], - "properties": { - "hostname": { - "type": "string", - }, - "seq": { - "type": "integer", - "description": - "Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor).", - }, - "accountCount": { - "type": "integer", - "description": - "Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts.", - }, - "status": { - "type": "ref", - "ref": "lex:com.atproto.sync.defs#hostStatus", - }, - }, - }, - }, - "errors": [ - { - "name": "HostNotFound", - }, - ], - }, - }, - }, - "ComAtprotoSyncGetBlocks": { - "lexicon": 1, - "id": "com.atproto.sync.getBlocks", - "defs": { - "main": { - "type": "query", - "description": - "Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS.", - "parameters": { - "type": "params", - "required": [ - "did", - "cids", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - "description": "The DID of the repo.", - }, - "cids": { - "type": "array", - "items": { - "type": "string", - "format": "cid", - }, - }, - }, - }, - "output": { - "encoding": "application/vnd.ipld.car", - }, - "errors": [ - { - "name": "BlockNotFound", - }, - { - "name": "RepoNotFound", - }, - { - "name": "RepoTakendown", - }, - { - "name": "RepoSuspended", - }, - { - "name": "RepoDeactivated", - }, - ], - }, - }, - }, - "ComAtprotoSyncListReposByCollection": { - "lexicon": 1, - "id": "com.atproto.sync.listReposByCollection", - "defs": { - "main": { - "type": "query", - "description": - "Enumerates all the DIDs which have records with the given collection NSID.", - "parameters": { - "type": "params", - "required": [ - "collection", - ], - "properties": { - "collection": { - "type": "string", - "format": "nsid", - }, - "limit": { - "type": "integer", - "description": - "Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists.", - "minimum": 1, - "maximum": 2000, - "default": 500, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "repos", - ], - "properties": { - "cursor": { - "type": "string", - }, - "repos": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.sync.listReposByCollection#repo", - }, - }, - }, - }, - }, - }, - "repo": { - "type": "object", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - }, - }, - }, - }, - }, - "ComAtprotoSyncGetCheckout": { - "lexicon": 1, - "id": "com.atproto.sync.getCheckout", - "defs": { - "main": { - "type": "query", - "description": - "DEPRECATED - please use com.atproto.sync.getRepo instead", - "parameters": { - "type": "params", - "required": [ - "did", - ], - "properties": { - "did": { - "type": "string", - "format": "did", - "description": "The DID of the repo.", - }, - }, - }, - "output": { - "encoding": "application/vnd.ipld.car", - }, - }, - }, - }, - "ComAtprotoRepoStrongRef": { - "lexicon": 1, - "id": "com.atproto.repo.strongRef", - "description": "A URI with a content-hash fingerprint.", - "defs": { - "main": { - "type": "object", - "required": [ - "uri", - "cid", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - }, - }, - }, - }, - "ComAtprotoRepoDefs": { - "lexicon": 1, - "id": "com.atproto.repo.defs", - "defs": { - "commitMeta": { - "type": "object", - "required": [ - "cid", - "rev", - ], - "properties": { - "cid": { - "type": "string", - "format": "cid", - }, - "rev": { - "type": "string", - "format": "tid", - }, - }, - }, - }, - }, - "ComAtprotoRepoListMissingBlobs": { - "lexicon": 1, - "id": "com.atproto.repo.listMissingBlobs", - "defs": { - "main": { - "type": "query", - "description": - "Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 1000, - "default": 500, - }, - "cursor": { - "type": "string", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "blobs", - ], - "properties": { - "cursor": { - "type": "string", - }, - "blobs": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.repo.listMissingBlobs#recordBlob", - }, - }, - }, - }, - }, - }, - "recordBlob": { - "type": "object", - "required": [ - "cid", - "recordUri", - ], - "properties": { - "cid": { - "type": "string", - "format": "cid", - }, - "recordUri": { - "type": "string", - "format": "at-uri", - }, - }, - }, - }, - }, - "ComAtprotoRepoCreateRecord": { - "lexicon": 1, - "id": "com.atproto.repo.createRecord", - "defs": { - "main": { - "type": "procedure", - "description": - "Create a single new repository record. Requires auth, implemented by PDS.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "repo", - "collection", - "record", - ], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": - "The handle or DID of the repo (aka, current account).", - }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record collection.", - }, - "rkey": { - "type": "string", - "format": "record-key", - "description": "The Record Key.", - "maxLength": 512, - }, - "validate": { - "type": "boolean", - "description": - "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons.", - }, - "record": { - "type": "unknown", - "description": "The record itself. Must contain a $type field.", - }, - "swapCommit": { - "type": "string", - "format": "cid", - "description": - "Compare and swap with the previous commit by CID.", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "uri", - "cid", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "commit": { - "type": "ref", - "ref": "lex:com.atproto.repo.defs#commitMeta", - }, - "validationStatus": { - "type": "string", - "knownValues": [ - "valid", - "unknown", - ], - }, - }, - }, - }, - "errors": [ - { - "name": "InvalidSwap", - "description": - "Indicates that 'swapCommit' didn't match current repo commit.", - }, - ], - }, - }, - }, - "ComAtprotoRepoDeleteRecord": { - "lexicon": 1, - "id": "com.atproto.repo.deleteRecord", - "defs": { - "main": { - "type": "procedure", - "description": - "Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "repo", - "collection", - "rkey", - ], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": - "The handle or DID of the repo (aka, current account).", - }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record collection.", - }, - "rkey": { - "type": "string", - "format": "record-key", - "description": "The Record Key.", - }, - "swapRecord": { - "type": "string", - "format": "cid", - "description": - "Compare and swap with the previous record by CID.", - }, - "swapCommit": { - "type": "string", - "format": "cid", - "description": - "Compare and swap with the previous commit by CID.", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "ref", - "ref": "lex:com.atproto.repo.defs#commitMeta", - }, - }, - }, - }, - "errors": [ - { - "name": "InvalidSwap", - }, - ], - }, - }, - }, - "ComAtprotoRepoPutRecord": { - "lexicon": 1, - "id": "com.atproto.repo.putRecord", - "defs": { - "main": { - "type": "procedure", - "description": - "Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "repo", - "collection", - "rkey", - "record", - ], - "nullable": [ - "swapRecord", - ], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": - "The handle or DID of the repo (aka, current account).", - }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record collection.", - }, - "rkey": { - "type": "string", - "format": "record-key", - "description": "The Record Key.", - "maxLength": 512, - }, - "validate": { - "type": "boolean", - "description": - "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons.", - }, - "record": { - "type": "unknown", - "description": "The record to write.", - }, - "swapRecord": { - "type": "string", - "format": "cid", - "description": - "Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation", - }, - "swapCommit": { - "type": "string", - "format": "cid", - "description": - "Compare and swap with the previous commit by CID.", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "uri", - "cid", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "commit": { - "type": "ref", - "ref": "lex:com.atproto.repo.defs#commitMeta", - }, - "validationStatus": { - "type": "string", - "knownValues": [ - "valid", - "unknown", - ], - }, - }, - }, - }, - "errors": [ - { - "name": "InvalidSwap", - }, - ], - }, - }, - }, - "ComAtprotoRepoUploadBlob": { - "lexicon": 1, - "id": "com.atproto.repo.uploadBlob", - "defs": { - "main": { - "type": "procedure", - "description": - "Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.", - "input": { - "encoding": "*/*", - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "blob", - ], - "properties": { - "blob": { - "type": "blob", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoRepoImportRepo": { - "lexicon": 1, - "id": "com.atproto.repo.importRepo", - "defs": { - "main": { - "type": "procedure", - "description": - "Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.", - "input": { - "encoding": "application/vnd.ipld.car", - }, - }, - }, - }, - "ComAtprotoRepoDescribeRepo": { - "lexicon": 1, - "id": "com.atproto.repo.describeRepo", - "defs": { - "main": { - "type": "query", - "description": - "Get information about an account and repository, including the list of collections. Does not require auth.", - "parameters": { - "type": "params", - "required": [ - "repo", - ], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": "The handle or DID of the repo.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "handle", - "did", - "didDoc", - "collections", - "handleIsCorrect", - ], - "properties": { - "handle": { - "type": "string", - "format": "handle", - }, - "did": { - "type": "string", - "format": "did", - }, - "didDoc": { - "type": "unknown", - "description": "The complete DID document for this account.", - }, - "collections": { - "type": "array", - "description": - "List of all the collections (NSIDs) for which this repo contains at least one record.", - "items": { - "type": "string", - "format": "nsid", - }, - }, - "handleIsCorrect": { - "type": "boolean", - "description": - "Indicates if handle is currently valid (resolves bi-directionally)", - }, - }, - }, - }, - }, - }, - }, - "ComAtprotoRepoGetRecord": { - "lexicon": 1, - "id": "com.atproto.repo.getRecord", - "defs": { - "main": { - "type": "query", - "description": - "Get a single record from a repository. Does not require auth.", - "parameters": { - "type": "params", - "required": [ - "repo", - "collection", - "rkey", - ], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": "The handle or DID of the repo.", - }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record collection.", - }, - "rkey": { - "type": "string", - "description": "The Record Key.", - "format": "record-key", - }, - "cid": { - "type": "string", - "format": "cid", - "description": - "The CID of the version of the record. If not specified, then return the most recent version.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "uri", - "value", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "value": { - "type": "unknown", - }, - }, - }, - }, - "errors": [ - { - "name": "RecordNotFound", - }, - ], - }, - }, - }, - "ComAtprotoRepoApplyWrites": { - "lexicon": 1, - "id": "com.atproto.repo.applyWrites", - "defs": { - "main": { - "type": "procedure", - "description": - "Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "repo", - "writes", - ], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": - "The handle or DID of the repo (aka, current account).", - }, - "validate": { - "type": "boolean", - "description": - "Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons.", - }, - "writes": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:com.atproto.repo.applyWrites#create", - "lex:com.atproto.repo.applyWrites#update", - "lex:com.atproto.repo.applyWrites#delete", - ], - "closed": true, - }, - }, - "swapCommit": { - "type": "string", - "description": - "If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.", - "format": "cid", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [], - "properties": { - "commit": { - "type": "ref", - "ref": "lex:com.atproto.repo.defs#commitMeta", - }, - "results": { - "type": "array", - "items": { - "type": "union", - "refs": [ - "lex:com.atproto.repo.applyWrites#createResult", - "lex:com.atproto.repo.applyWrites#updateResult", - "lex:com.atproto.repo.applyWrites#deleteResult", - ], - "closed": true, - }, - }, - }, - }, - }, - "errors": [ - { - "name": "InvalidSwap", - "description": - "Indicates that the 'swapCommit' parameter did not match current commit.", - }, - ], - }, - "create": { - "type": "object", - "description": "Operation which creates a new record.", - "required": [ - "collection", - "value", - ], - "properties": { - "collection": { - "type": "string", - "format": "nsid", - }, - "rkey": { - "type": "string", - "maxLength": 512, - "format": "record-key", - "description": - "NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility.", - }, - "value": { - "type": "unknown", - }, - }, - }, - "update": { - "type": "object", - "description": "Operation which updates an existing record.", - "required": [ - "collection", - "rkey", - "value", - ], - "properties": { - "collection": { - "type": "string", - "format": "nsid", - }, - "rkey": { - "type": "string", - "format": "record-key", - }, - "value": { - "type": "unknown", - }, - }, - }, - "delete": { - "type": "object", - "description": "Operation which deletes an existing record.", - "required": [ - "collection", - "rkey", - ], - "properties": { - "collection": { - "type": "string", - "format": "nsid", - }, - "rkey": { - "type": "string", - "format": "record-key", - }, - }, - }, - "createResult": { - "type": "object", - "required": [ - "uri", - "cid", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "validationStatus": { - "type": "string", - "knownValues": [ - "valid", - "unknown", - ], - }, - }, - }, - "updateResult": { - "type": "object", - "required": [ - "uri", - "cid", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "validationStatus": { - "type": "string", - "knownValues": [ - "valid", - "unknown", - ], - }, - }, - }, - "deleteResult": { - "type": "object", - "required": [], - "properties": {}, - }, - }, - }, - "ComAtprotoRepoListRecords": { - "lexicon": 1, - "id": "com.atproto.repo.listRecords", - "defs": { - "main": { - "type": "query", - "description": - "List a range of records in a repository, matching a specific collection. Does not require auth.", - "parameters": { - "type": "params", - "required": [ - "repo", - "collection", - ], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": "The handle or DID of the repo.", - }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record type.", - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - "description": "The number of records to return.", - }, - "cursor": { - "type": "string", - }, - "reverse": { - "type": "boolean", - "description": - "Flag to reverse the order of the returned records.", - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "records", - ], - "properties": { - "cursor": { - "type": "string", - }, - "records": { - "type": "array", - "items": { - "type": "ref", - "ref": "lex:com.atproto.repo.listRecords#record", - }, - }, - }, - }, - }, - }, - "record": { - "type": "object", - "required": [ - "uri", - "cid", - "value", - ], - "properties": { - "uri": { - "type": "string", - "format": "at-uri", - }, - "cid": { - "type": "string", - "format": "cid", - }, - "value": { - "type": "unknown", - }, - }, - }, - }, - }, - "ComAtprotoModerationDefs": { - "lexicon": 1, - "id": "com.atproto.moderation.defs", - "defs": { - "reasonType": { - "type": "string", - "knownValues": [ - "com.atproto.moderation.defs#reasonSpam", - "com.atproto.moderation.defs#reasonViolation", - "com.atproto.moderation.defs#reasonMisleading", - "com.atproto.moderation.defs#reasonSexual", - "com.atproto.moderation.defs#reasonRude", - "com.atproto.moderation.defs#reasonOther", - "com.atproto.moderation.defs#reasonAppeal", - "tools.ozone.report.defs#reasonAppeal", - "tools.ozone.report.defs#reasonOther", - "tools.ozone.report.defs#reasonViolenceAnimal", - "tools.ozone.report.defs#reasonViolenceThreats", - "tools.ozone.report.defs#reasonViolenceGraphicContent", - "tools.ozone.report.defs#reasonViolenceGlorification", - "tools.ozone.report.defs#reasonViolenceExtremistContent", - "tools.ozone.report.defs#reasonViolenceTrafficking", - "tools.ozone.report.defs#reasonViolenceOther", - "tools.ozone.report.defs#reasonSexualAbuseContent", - "tools.ozone.report.defs#reasonSexualNCII", - "tools.ozone.report.defs#reasonSexualDeepfake", - "tools.ozone.report.defs#reasonSexualAnimal", - "tools.ozone.report.defs#reasonSexualUnlabeled", - "tools.ozone.report.defs#reasonSexualOther", - "tools.ozone.report.defs#reasonChildSafetyCSAM", - "tools.ozone.report.defs#reasonChildSafetyGroom", - "tools.ozone.report.defs#reasonChildSafetyPrivacy", - "tools.ozone.report.defs#reasonChildSafetyHarassment", - "tools.ozone.report.defs#reasonChildSafetyOther", - "tools.ozone.report.defs#reasonHarassmentTroll", - "tools.ozone.report.defs#reasonHarassmentTargeted", - "tools.ozone.report.defs#reasonHarassmentHateSpeech", - "tools.ozone.report.defs#reasonHarassmentDoxxing", - "tools.ozone.report.defs#reasonHarassmentOther", - "tools.ozone.report.defs#reasonMisleadingBot", - "tools.ozone.report.defs#reasonMisleadingImpersonation", - "tools.ozone.report.defs#reasonMisleadingSpam", - "tools.ozone.report.defs#reasonMisleadingScam", - "tools.ozone.report.defs#reasonMisleadingElections", - "tools.ozone.report.defs#reasonMisleadingOther", - "tools.ozone.report.defs#reasonRuleSiteSecurity", - "tools.ozone.report.defs#reasonRuleProhibitedSales", - "tools.ozone.report.defs#reasonRuleBanEvasion", - "tools.ozone.report.defs#reasonRuleOther", - "tools.ozone.report.defs#reasonSelfHarmContent", - "tools.ozone.report.defs#reasonSelfHarmED", - "tools.ozone.report.defs#reasonSelfHarmStunts", - "tools.ozone.report.defs#reasonSelfHarmSubstances", - "tools.ozone.report.defs#reasonSelfHarmOther", - ], - }, - "reasonSpam": { - "type": "token", - "description": - "Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`.", - }, - "reasonViolation": { - "type": "token", - "description": - "Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`.", - }, - "reasonMisleading": { - "type": "token", - "description": - "Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`.", - }, - "reasonSexual": { - "type": "token", - "description": - "Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`.", - }, - "reasonRude": { - "type": "token", - "description": - "Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`.", - }, - "reasonOther": { - "type": "token", - "description": - "Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`.", - }, - "reasonAppeal": { - "type": "token", - "description": "Appeal a previously taken moderation action", - }, - "subjectType": { - "type": "string", - "description": - "Tag describing a type of subject that might be reported.", - "knownValues": [ - "account", - "record", - "chat", - ], - }, - }, - }, - "ComAtprotoModerationCreateReport": { - "lexicon": 1, - "id": "com.atproto.moderation.createReport", - "defs": { - "main": { - "type": "procedure", - "description": - "Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "reasonType", - "subject", - ], - "properties": { - "reasonType": { - "type": "ref", - "description": - "Indicates the broad category of violation the report is for.", - "ref": "lex:com.atproto.moderation.defs#reasonType", - }, - "reason": { - "type": "string", - "maxGraphemes": 2000, - "maxLength": 20000, - "description": - "Additional context about the content and violation.", - }, - "subject": { - "type": "union", - "refs": [ - "lex:com.atproto.admin.defs#repoRef", - "lex:com.atproto.repo.strongRef", - ], - }, - "modTool": { - "type": "ref", - "ref": "lex:com.atproto.moderation.createReport#modTool", - }, - }, - }, - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "id", - "reasonType", - "subject", - "reportedBy", - "createdAt", - ], - "properties": { - "id": { - "type": "integer", - }, - "reasonType": { - "type": "ref", - "ref": "lex:com.atproto.moderation.defs#reasonType", - }, - "reason": { - "type": "string", - "maxGraphemes": 2000, - "maxLength": 20000, - }, - "subject": { - "type": "union", - "refs": [ - "lex:com.atproto.admin.defs#repoRef", - "lex:com.atproto.repo.strongRef", - ], - }, - "reportedBy": { - "type": "string", - "format": "did", - }, - "createdAt": { - "type": "string", - "format": "datetime", - }, - }, - }, - }, - }, - "modTool": { - "type": "object", - "description": - "Moderation tool information for tracing the source of the action", - "required": [ - "name", - ], - "properties": { - "name": { - "type": "string", - "description": - "Name/identifier of the source (e.g., 'bsky-app/android', 'bsky-web/chrome')", - }, - "meta": { - "type": "unknown", - "description": "Additional arbitrary metadata about the source", - }, - }, - }, - }, - }, -} as Record; -export const schemas = Object.values(schemaDict) satisfies LexiconDoc[]; -export const lexicons: Lexicons = new Lexicons(schemas); - -export function validate( - v: unknown, - id: string, - hash: string, - requiredType: true, -): ValidationResult; -export function validate( - v: unknown, - id: string, - hash: string, - requiredType?: false, -): ValidationResult; -export function validate( - v: unknown, - id: string, - hash: string, - requiredType?: boolean, -): ValidationResult { - return (requiredType ? is$typed : maybe$typed)(v, id, hash) - ? lexicons.validate(`${id}#${hash}`, v) - : { - success: false, - error: new ValidationError( - `Must be an object with "${ - hash === "main" ? id : `${id}#${hash}` - }" $type property`, - ), - }; -} - -export const ids = { - ToolsOzoneSignatureFindCorrelation: "tools.ozone.signature.findCorrelation", - ToolsOzoneSignatureDefs: "tools.ozone.signature.defs", - ToolsOzoneSignatureSearchAccounts: "tools.ozone.signature.searchAccounts", - ToolsOzoneSignatureFindRelatedAccounts: - "tools.ozone.signature.findRelatedAccounts", - ToolsOzoneServerGetConfig: "tools.ozone.server.getConfig", - ToolsOzoneVerificationRevokeVerifications: - "tools.ozone.verification.revokeVerifications", - ToolsOzoneVerificationDefs: "tools.ozone.verification.defs", - ToolsOzoneVerificationGrantVerifications: - "tools.ozone.verification.grantVerifications", - ToolsOzoneVerificationListVerifications: - "tools.ozone.verification.listVerifications", - ToolsOzoneSafelinkDefs: "tools.ozone.safelink.defs", - ToolsOzoneSafelinkAddRule: "tools.ozone.safelink.addRule", - ToolsOzoneSafelinkRemoveRule: "tools.ozone.safelink.removeRule", - ToolsOzoneSafelinkUpdateRule: "tools.ozone.safelink.updateRule", - ToolsOzoneSafelinkQueryEvents: "tools.ozone.safelink.queryEvents", - ToolsOzoneSafelinkQueryRules: "tools.ozone.safelink.queryRules", - ToolsOzoneTeamListMembers: "tools.ozone.team.listMembers", - ToolsOzoneTeamDefs: "tools.ozone.team.defs", - ToolsOzoneTeamDeleteMember: "tools.ozone.team.deleteMember", - ToolsOzoneTeamUpdateMember: "tools.ozone.team.updateMember", - ToolsOzoneTeamAddMember: "tools.ozone.team.addMember", - ToolsOzoneHostingGetAccountHistory: "tools.ozone.hosting.getAccountHistory", - ToolsOzoneReportDefs: "tools.ozone.report.defs", - ToolsOzoneCommunicationDefs: "tools.ozone.communication.defs", - ToolsOzoneCommunicationUpdateTemplate: - "tools.ozone.communication.updateTemplate", - ToolsOzoneCommunicationCreateTemplate: - "tools.ozone.communication.createTemplate", - ToolsOzoneCommunicationListTemplates: - "tools.ozone.communication.listTemplates", - ToolsOzoneCommunicationDeleteTemplate: - "tools.ozone.communication.deleteTemplate", - ToolsOzoneSetDefs: "tools.ozone.set.defs", - ToolsOzoneSetAddValues: "tools.ozone.set.addValues", - ToolsOzoneSetGetValues: "tools.ozone.set.getValues", - ToolsOzoneSetDeleteSet: "tools.ozone.set.deleteSet", - ToolsOzoneSetUpsertSet: "tools.ozone.set.upsertSet", - ToolsOzoneSetDeleteValues: "tools.ozone.set.deleteValues", - ToolsOzoneSetQuerySets: "tools.ozone.set.querySets", - ToolsOzoneSettingDefs: "tools.ozone.setting.defs", - ToolsOzoneSettingListOptions: "tools.ozone.setting.listOptions", - ToolsOzoneSettingRemoveOptions: "tools.ozone.setting.removeOptions", - ToolsOzoneSettingUpsertOption: "tools.ozone.setting.upsertOption", - ToolsOzoneModerationGetReporterStats: - "tools.ozone.moderation.getReporterStats", - ToolsOzoneModerationCancelScheduledActions: - "tools.ozone.moderation.cancelScheduledActions", - ToolsOzoneModerationListScheduledActions: - "tools.ozone.moderation.listScheduledActions", - ToolsOzoneModerationQueryStatuses: "tools.ozone.moderation.queryStatuses", - ToolsOzoneModerationGetRepo: "tools.ozone.moderation.getRepo", - ToolsOzoneModerationDefs: "tools.ozone.moderation.defs", - ToolsOzoneModerationGetSubjects: "tools.ozone.moderation.getSubjects", - ToolsOzoneModerationGetRecords: "tools.ozone.moderation.getRecords", - ToolsOzoneModerationScheduleAction: "tools.ozone.moderation.scheduleAction", - ToolsOzoneModerationGetEvent: "tools.ozone.moderation.getEvent", - ToolsOzoneModerationQueryEvents: "tools.ozone.moderation.queryEvents", - ToolsOzoneModerationGetRecord: "tools.ozone.moderation.getRecord", - ToolsOzoneModerationEmitEvent: "tools.ozone.moderation.emitEvent", - ToolsOzoneModerationSearchRepos: "tools.ozone.moderation.searchRepos", - ToolsOzoneModerationGetAccountTimeline: - "tools.ozone.moderation.getAccountTimeline", - ToolsOzoneModerationGetRepos: "tools.ozone.moderation.getRepos", - AppBskyDraftDefs: "app.bsky.draft.defs", - AppBskyDraftCreateDraft: "app.bsky.draft.createDraft", - AppBskyDraftUpdateDraft: "app.bsky.draft.updateDraft", - AppBskyDraftGetDrafts: "app.bsky.draft.getDrafts", - AppBskyDraftDeleteDraft: "app.bsky.draft.deleteDraft", - AppBskyAuthManageLabelerService: "app.bsky.authManageLabelerService", - AppBskyVideoUploadVideo: "app.bsky.video.uploadVideo", - AppBskyVideoDefs: "app.bsky.video.defs", - AppBskyVideoGetJobStatus: "app.bsky.video.getJobStatus", - AppBskyVideoGetUploadLimits: "app.bsky.video.getUploadLimits", - AppBskyContactDefs: "app.bsky.contact.defs", - AppBskyContactSendNotification: "app.bsky.contact.sendNotification", - AppBskyContactGetSyncStatus: "app.bsky.contact.getSyncStatus", - AppBskyContactStartPhoneVerification: - "app.bsky.contact.startPhoneVerification", - AppBskyContactGetMatches: "app.bsky.contact.getMatches", - AppBskyContactImportContacts: "app.bsky.contact.importContacts", - AppBskyContactDismissMatch: "app.bsky.contact.dismissMatch", - AppBskyContactRemoveData: "app.bsky.contact.removeData", - AppBskyContactVerifyPhone: "app.bsky.contact.verifyPhone", - AppBskyAuthManageNotifications: "app.bsky.authManageNotifications", - AppBskyBookmarkDefs: "app.bsky.bookmark.defs", - AppBskyBookmarkDeleteBookmark: "app.bsky.bookmark.deleteBookmark", - AppBskyBookmarkGetBookmarks: "app.bsky.bookmark.getBookmarks", - AppBskyBookmarkCreateBookmark: "app.bsky.bookmark.createBookmark", - AppBskyEmbedDefs: "app.bsky.embed.defs", - AppBskyEmbedRecord: "app.bsky.embed.record", - AppBskyEmbedImages: "app.bsky.embed.images", - AppBskyEmbedRecordWithMedia: "app.bsky.embed.recordWithMedia", - AppBskyEmbedVideo: "app.bsky.embed.video", - AppBskyEmbedExternal: "app.bsky.embed.external", - AppBskyAuthDeleteContent: "app.bsky.authDeleteContent", - AppBskyAuthCreatePosts: "app.bsky.authCreatePosts", - AppBskyNotificationDefs: "app.bsky.notification.defs", - AppBskyNotificationRegisterPush: "app.bsky.notification.registerPush", - AppBskyNotificationPutPreferences: "app.bsky.notification.putPreferences", - AppBskyNotificationPutActivitySubscription: - "app.bsky.notification.putActivitySubscription", - AppBskyNotificationDeclaration: "app.bsky.notification.declaration", - AppBskyNotificationPutPreferencesV2: "app.bsky.notification.putPreferencesV2", - AppBskyNotificationUpdateSeen: "app.bsky.notification.updateSeen", - AppBskyNotificationListActivitySubscriptions: - "app.bsky.notification.listActivitySubscriptions", - AppBskyNotificationUnregisterPush: "app.bsky.notification.unregisterPush", - AppBskyNotificationGetPreferences: "app.bsky.notification.getPreferences", - AppBskyNotificationListNotifications: - "app.bsky.notification.listNotifications", - AppBskyNotificationGetUnreadCount: "app.bsky.notification.getUnreadCount", - AppBskyUnspeccedGetSuggestedFeedsSkeleton: - "app.bsky.unspecced.getSuggestedFeedsSkeleton", - AppBskyUnspeccedSearchStarterPacksSkeleton: - "app.bsky.unspecced.searchStarterPacksSkeleton", - AppBskyUnspeccedGetSuggestedUsersForExplore: - "app.bsky.unspecced.getSuggestedUsersForExplore", - AppBskyUnspeccedDefs: "app.bsky.unspecced.defs", - AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton: - "app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton", - AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton: - "app.bsky.unspecced.getSuggestedUsersForExploreSkeleton", - AppBskyUnspeccedGetSuggestedUsers: "app.bsky.unspecced.getSuggestedUsers", - AppBskyUnspeccedGetPostThreadOtherV2: - "app.bsky.unspecced.getPostThreadOtherV2", - AppBskyUnspeccedGetSuggestedStarterPacks: - "app.bsky.unspecced.getSuggestedStarterPacks", - AppBskyUnspeccedGetSuggestedStarterPacksSkeleton: - "app.bsky.unspecced.getSuggestedStarterPacksSkeleton", - AppBskyUnspeccedGetOnboardingSuggestedStarterPacks: - "app.bsky.unspecced.getOnboardingSuggestedStarterPacks", - AppBskyUnspeccedGetSuggestedUsersSkeleton: - "app.bsky.unspecced.getSuggestedUsersSkeleton", - AppBskyUnspeccedGetPostThreadV2: "app.bsky.unspecced.getPostThreadV2", - AppBskyUnspeccedGetTrends: "app.bsky.unspecced.getTrends", - AppBskyUnspeccedSearchActorsSkeleton: - "app.bsky.unspecced.searchActorsSkeleton", - AppBskyUnspeccedGetSuggestionsSkeleton: - "app.bsky.unspecced.getSuggestionsSkeleton", - AppBskyUnspeccedSearchPostsSkeleton: "app.bsky.unspecced.searchPostsSkeleton", - AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton: - "app.bsky.unspecced.getOnboardingSuggestedUsersSkeleton", - AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton: - "app.bsky.unspecced.getSuggestedUsersForDiscoverSkeleton", - AppBskyUnspeccedGetSuggestedUsersForDiscover: - "app.bsky.unspecced.getSuggestedUsersForDiscover", - AppBskyUnspeccedGetAgeAssuranceState: - "app.bsky.unspecced.getAgeAssuranceState", - AppBskyUnspeccedGetPopularFeedGenerators: - "app.bsky.unspecced.getPopularFeedGenerators", - AppBskyUnspeccedGetSuggestedOnboardingUsers: - "app.bsky.unspecced.getSuggestedOnboardingUsers", - AppBskyUnspeccedGetSuggestedUsersForSeeMore: - "app.bsky.unspecced.getSuggestedUsersForSeeMore", - AppBskyUnspeccedInitAgeAssurance: "app.bsky.unspecced.initAgeAssurance", - AppBskyUnspeccedGetTrendingTopics: "app.bsky.unspecced.getTrendingTopics", - AppBskyUnspeccedGetTaggedSuggestions: - "app.bsky.unspecced.getTaggedSuggestions", - AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton: - "app.bsky.unspecced.getSuggestedUsersForSeeMoreSkeleton", - AppBskyUnspeccedGetSuggestedFeeds: "app.bsky.unspecced.getSuggestedFeeds", - AppBskyUnspeccedGetTrendsSkeleton: "app.bsky.unspecced.getTrendsSkeleton", - AppBskyUnspeccedGetConfig: "app.bsky.unspecced.getConfig", - AppBskyGraphGetStarterPacks: "app.bsky.graph.getStarterPacks", - AppBskyGraphGetSuggestedFollowsByActor: - "app.bsky.graph.getSuggestedFollowsByActor", - AppBskyGraphBlock: "app.bsky.graph.block", - AppBskyGraphGetStarterPacksWithMembership: - "app.bsky.graph.getStarterPacksWithMembership", - AppBskyGraphFollow: "app.bsky.graph.follow", - AppBskyGraphDefs: "app.bsky.graph.defs", - AppBskyGraphGetListsWithMembership: "app.bsky.graph.getListsWithMembership", - AppBskyGraphUnmuteActorList: "app.bsky.graph.unmuteActorList", - AppBskyGraphGetListBlocks: "app.bsky.graph.getListBlocks", - AppBskyGraphListblock: "app.bsky.graph.listblock", - AppBskyGraphGetStarterPack: "app.bsky.graph.getStarterPack", - AppBskyGraphStarterpack: "app.bsky.graph.starterpack", - AppBskyGraphMuteActorList: "app.bsky.graph.muteActorList", - AppBskyGraphMuteThread: "app.bsky.graph.muteThread", - AppBskyGraphSearchStarterPacks: "app.bsky.graph.searchStarterPacks", - AppBskyGraphGetActorStarterPacks: "app.bsky.graph.getActorStarterPacks", - AppBskyGraphGetLists: "app.bsky.graph.getLists", - AppBskyGraphGetFollowers: "app.bsky.graph.getFollowers", - AppBskyGraphUnmuteThread: "app.bsky.graph.unmuteThread", - AppBskyGraphMuteActor: "app.bsky.graph.muteActor", - AppBskyGraphGetMutes: "app.bsky.graph.getMutes", - AppBskyGraphListitem: "app.bsky.graph.listitem", - AppBskyGraphList: "app.bsky.graph.list", - AppBskyGraphGetKnownFollowers: "app.bsky.graph.getKnownFollowers", - AppBskyGraphVerification: "app.bsky.graph.verification", - AppBskyGraphGetListMutes: "app.bsky.graph.getListMutes", - AppBskyGraphGetFollows: "app.bsky.graph.getFollows", - AppBskyGraphGetBlocks: "app.bsky.graph.getBlocks", - AppBskyGraphGetRelationships: "app.bsky.graph.getRelationships", - AppBskyGraphUnmuteActor: "app.bsky.graph.unmuteActor", - AppBskyGraphGetList: "app.bsky.graph.getList", - AppBskyAuthFullApp: "app.bsky.authFullApp", - AppBskyAuthManageModeration: "app.bsky.authManageModeration", - AppBskyFeedGenerator: "app.bsky.feed.generator", - AppBskyFeedSendInteractions: "app.bsky.feed.sendInteractions", - AppBskyFeedDefs: "app.bsky.feed.defs", - AppBskyFeedGetFeedGenerators: "app.bsky.feed.getFeedGenerators", - AppBskyFeedGetTimeline: "app.bsky.feed.getTimeline", - AppBskyFeedGetFeedGenerator: "app.bsky.feed.getFeedGenerator", - AppBskyFeedGetAuthorFeed: "app.bsky.feed.getAuthorFeed", - AppBskyFeedGetLikes: "app.bsky.feed.getLikes", - AppBskyFeedPostgate: "app.bsky.feed.postgate", - AppBskyFeedThreadgate: "app.bsky.feed.threadgate", - AppBskyFeedGetPostThread: "app.bsky.feed.getPostThread", - AppBskyFeedGetActorLikes: "app.bsky.feed.getActorLikes", - AppBskyFeedLike: "app.bsky.feed.like", - AppBskyFeedGetRepostedBy: "app.bsky.feed.getRepostedBy", - AppBskyFeedRepost: "app.bsky.feed.repost", - AppBskyFeedDescribeFeedGenerator: "app.bsky.feed.describeFeedGenerator", - AppBskyFeedSearchPosts: "app.bsky.feed.searchPosts", - AppBskyFeedGetPosts: "app.bsky.feed.getPosts", - AppBskyFeedGetFeed: "app.bsky.feed.getFeed", - AppBskyFeedGetQuotes: "app.bsky.feed.getQuotes", - AppBskyFeedGetFeedSkeleton: "app.bsky.feed.getFeedSkeleton", - AppBskyFeedGetListFeed: "app.bsky.feed.getListFeed", - AppBskyFeedGetSuggestedFeeds: "app.bsky.feed.getSuggestedFeeds", - AppBskyFeedGetActorFeeds: "app.bsky.feed.getActorFeeds", - AppBskyFeedPost: "app.bsky.feed.post", - AppBskyRichtextFacet: "app.bsky.richtext.facet", - AppBskyAuthViewAll: "app.bsky.authViewAll", - AppBskyAuthManageFeedDeclarations: "app.bsky.authManageFeedDeclarations", - AppBskyAgeassuranceBegin: "app.bsky.ageassurance.begin", - AppBskyAgeassuranceDefs: "app.bsky.ageassurance.defs", - AppBskyAgeassuranceGetState: "app.bsky.ageassurance.getState", - AppBskyAgeassuranceGetConfig: "app.bsky.ageassurance.getConfig", - AppBskyAuthManageProfile: "app.bsky.authManageProfile", - AppBskyActorSearchActorsTypeahead: "app.bsky.actor.searchActorsTypeahead", - AppBskyActorDefs: "app.bsky.actor.defs", - AppBskyActorPutPreferences: "app.bsky.actor.putPreferences", - AppBskyActorGetProfile: "app.bsky.actor.getProfile", - AppBskyActorGetSuggestions: "app.bsky.actor.getSuggestions", - AppBskyActorSearchActors: "app.bsky.actor.searchActors", - AppBskyActorGetProfiles: "app.bsky.actor.getProfiles", - AppBskyActorStatus: "app.bsky.actor.status", - AppBskyActorGetPreferences: "app.bsky.actor.getPreferences", - AppBskyActorProfile: "app.bsky.actor.profile", - AppBskyLabelerDefs: "app.bsky.labeler.defs", - AppBskyLabelerService: "app.bsky.labeler.service", - AppBskyLabelerGetServices: "app.bsky.labeler.getServices", - ChatBskyConvoListConvos: "chat.bsky.convo.listConvos", - ChatBskyConvoUnmuteConvo: "chat.bsky.convo.unmuteConvo", - ChatBskyConvoDefs: "chat.bsky.convo.defs", - ChatBskyConvoGetConvoAvailability: "chat.bsky.convo.getConvoAvailability", - ChatBskyConvoGetLog: "chat.bsky.convo.getLog", - ChatBskyConvoSendMessage: "chat.bsky.convo.sendMessage", - ChatBskyConvoLeaveConvo: "chat.bsky.convo.leaveConvo", - ChatBskyConvoAddReaction: "chat.bsky.convo.addReaction", - ChatBskyConvoAcceptConvo: "chat.bsky.convo.acceptConvo", - ChatBskyConvoMuteConvo: "chat.bsky.convo.muteConvo", - ChatBskyConvoDeleteMessageForSelf: "chat.bsky.convo.deleteMessageForSelf", - ChatBskyConvoRemoveReaction: "chat.bsky.convo.removeReaction", - ChatBskyConvoUpdateRead: "chat.bsky.convo.updateRead", - ChatBskyConvoUpdateAllRead: "chat.bsky.convo.updateAllRead", - ChatBskyConvoGetConvo: "chat.bsky.convo.getConvo", - ChatBskyConvoGetMessages: "chat.bsky.convo.getMessages", - ChatBskyConvoGetConvoForMembers: "chat.bsky.convo.getConvoForMembers", - ChatBskyConvoSendMessageBatch: "chat.bsky.convo.sendMessageBatch", - ChatBskyActorDefs: "chat.bsky.actor.defs", - ChatBskyActorDeclaration: "chat.bsky.actor.declaration", - ChatBskyActorExportAccountData: "chat.bsky.actor.exportAccountData", - ChatBskyActorDeleteAccount: "chat.bsky.actor.deleteAccount", - ChatBskyAuthFullChatClient: "chat.bsky.authFullChatClient", - ChatBskyModerationGetActorMetadata: "chat.bsky.moderation.getActorMetadata", - ChatBskyModerationGetMessageContext: "chat.bsky.moderation.getMessageContext", - ChatBskyModerationUpdateActorAccess: "chat.bsky.moderation.updateActorAccess", - SoSprkVideoUploadVideo: "so.sprk.video.uploadVideo", - SoSprkVideoDefs: "so.sprk.video.defs", - SoSprkVideoGetJobStatus: "so.sprk.video.getJobStatus", - SoSprkVideoGetUploadLimits: "so.sprk.video.getUploadLimits", - SoSprkEmbedDefs: "so.sprk.embed.defs", - SoSprkEmbedRecord: "so.sprk.embed.record", - SoSprkEmbedMention: "so.sprk.embed.mention", - SoSprkNotificationRegisterPush: "so.sprk.notification.registerPush", - SoSprkNotificationPutPreferences: "so.sprk.notification.putPreferences", - SoSprkNotificationUpdateSeen: "so.sprk.notification.updateSeen", - SoSprkNotificationUnregisterPush: "so.sprk.notification.unregisterPush", - SoSprkNotificationListNotifications: "so.sprk.notification.listNotifications", - SoSprkNotificationGetUnreadCount: "so.sprk.notification.getUnreadCount", - SoSprkGraphGetSuggestedFollowsByActor: - "so.sprk.graph.getSuggestedFollowsByActor", - SoSprkGraphBlock: "so.sprk.graph.block", - SoSprkGraphFollow: "so.sprk.graph.follow", - SoSprkGraphDefs: "so.sprk.graph.defs", - SoSprkGraphMuteThread: "so.sprk.graph.muteThread", - SoSprkGraphGetFollowers: "so.sprk.graph.getFollowers", - SoSprkGraphUnmuteThread: "so.sprk.graph.unmuteThread", - SoSprkGraphMuteActor: "so.sprk.graph.muteActor", - SoSprkGraphGetMutes: "so.sprk.graph.getMutes", - SoSprkGraphGetKnownFollowers: "so.sprk.graph.getKnownFollowers", - SoSprkGraphGetFollows: "so.sprk.graph.getFollows", - SoSprkGraphGetBlocks: "so.sprk.graph.getBlocks", - SoSprkGraphGetRelationships: "so.sprk.graph.getRelationships", - SoSprkGraphUnmuteActor: "so.sprk.graph.unmuteActor", - SoSprkFeedGenerator: "so.sprk.feed.generator", - SoSprkFeedSendInteractions: "so.sprk.feed.sendInteractions", - SoSprkFeedDefs: "so.sprk.feed.defs", - SoSprkFeedGetFeedGenerators: "so.sprk.feed.getFeedGenerators", - SoSprkFeedGetTimeline: "so.sprk.feed.getTimeline", - SoSprkFeedGetFeedGenerator: "so.sprk.feed.getFeedGenerator", - SoSprkFeedGetAuthorFeed: "so.sprk.feed.getAuthorFeed", - SoSprkFeedGetLikes: "so.sprk.feed.getLikes", - SoSprkFeedThreadgate: "so.sprk.feed.threadgate", - SoSprkFeedGetPostThread: "so.sprk.feed.getPostThread", - SoSprkFeedGetActorLikes: "so.sprk.feed.getActorLikes", - SoSprkFeedLike: "so.sprk.feed.like", - SoSprkFeedGetRepostedBy: "so.sprk.feed.getRepostedBy", - SoSprkFeedRepost: "so.sprk.feed.repost", - SoSprkFeedDescribeFeedGenerator: "so.sprk.feed.describeFeedGenerator", - SoSprkFeedSearchPosts: "so.sprk.feed.searchPosts", - SoSprkFeedGetPosts: "so.sprk.feed.getPosts", - SoSprkFeedGetCrosspostThread: "so.sprk.feed.getCrosspostThread", - SoSprkFeedGetFeed: "so.sprk.feed.getFeed", - SoSprkFeedReply: "so.sprk.feed.reply", - SoSprkFeedGetFeedSkeleton: "so.sprk.feed.getFeedSkeleton", - SoSprkFeedGetSuggestedFeeds: "so.sprk.feed.getSuggestedFeeds", - SoSprkFeedGetActorFeeds: "so.sprk.feed.getActorFeeds", - SoSprkFeedPost: "so.sprk.feed.post", - SoSprkFeedGetActorReposts: "so.sprk.feed.getActorReposts", - SoSprkRichtextFacet: "so.sprk.richtext.facet", - SoSprkSoundDefs: "so.sprk.sound.defs", - SoSprkSoundGetActorAudios: "so.sprk.sound.getActorAudios", - SoSprkSoundGetAudioPosts: "so.sprk.sound.getAudioPosts", - SoSprkSoundGetAudios: "so.sprk.sound.getAudios", - SoSprkSoundAudio: "so.sprk.sound.audio", - SoSprkSoundGetTrendingAudios: "so.sprk.sound.getTrendingAudios", - SoSprkActorSearchActorsTypeahead: "so.sprk.actor.searchActorsTypeahead", - SoSprkActorDefs: "so.sprk.actor.defs", - SoSprkActorPutPreferences: "so.sprk.actor.putPreferences", - SoSprkActorGetProfile: "so.sprk.actor.getProfile", - SoSprkActorGetSuggestions: "so.sprk.actor.getSuggestions", - SoSprkActorSearchActors: "so.sprk.actor.searchActors", - SoSprkActorGetProfiles: "so.sprk.actor.getProfiles", - SoSprkActorGetPreferences: "so.sprk.actor.getPreferences", - SoSprkActorProfile: "so.sprk.actor.profile", - SoSprkStoryDefs: "so.sprk.story.defs", - SoSprkStoryGetTimeline: "so.sprk.story.getTimeline", - SoSprkStoryGetStories: "so.sprk.story.getStories", - SoSprkStoryPost: "so.sprk.story.post", - SoSprkLabelerDefs: "so.sprk.labeler.defs", - SoSprkLabelerService: "so.sprk.labeler.service", - SoSprkLabelerGetServices: "so.sprk.labeler.getServices", - SoSprkMediaDefs: "so.sprk.media.defs", - SoSprkMediaImages: "so.sprk.media.images", - SoSprkMediaVideo: "so.sprk.media.video", - SoSprkMediaImage: "so.sprk.media.image", - SoSprkAuthCreatePosts: "so.sprk.authCreatePosts", - SoSprkAuthDeleteContent: "so.sprk.authDeleteContent", - SoSprkAuthFullApp: "so.sprk.authFullApp", - SoSprkAuthManageFeedDeclarations: "so.sprk.authManageFeedDeclarations", - SoSprkAuthManageLabelerService: "so.sprk.authManageLabelerService", - SoSprkAuthManageModeration: "so.sprk.authManageModeration", - SoSprkAuthManageNotifications: "so.sprk.authManageNotifications", - SoSprkAuthManageProfile: "so.sprk.authManageProfile", - SoSprkAuthViewAll: "so.sprk.authViewAll", - ComAtprotoTempDereferenceScope: "com.atproto.temp.dereferenceScope", - ComAtprotoTempAddReservedHandle: "com.atproto.temp.addReservedHandle", - ComAtprotoTempCheckSignupQueue: "com.atproto.temp.checkSignupQueue", - ComAtprotoTempCheckHandleAvailability: - "com.atproto.temp.checkHandleAvailability", - ComAtprotoTempRequestPhoneVerification: - "com.atproto.temp.requestPhoneVerification", - ComAtprotoTempRevokeAccountCredentials: - "com.atproto.temp.revokeAccountCredentials", - ComAtprotoTempFetchLabels: "com.atproto.temp.fetchLabels", - ComAtprotoIdentityUpdateHandle: "com.atproto.identity.updateHandle", - ComAtprotoIdentityDefs: "com.atproto.identity.defs", - ComAtprotoIdentitySignPlcOperation: "com.atproto.identity.signPlcOperation", - ComAtprotoIdentitySubmitPlcOperation: - "com.atproto.identity.submitPlcOperation", - ComAtprotoIdentityResolveIdentity: "com.atproto.identity.resolveIdentity", - ComAtprotoIdentityRefreshIdentity: "com.atproto.identity.refreshIdentity", - ComAtprotoIdentityResolveHandle: "com.atproto.identity.resolveHandle", - ComAtprotoIdentityRequestPlcOperationSignature: - "com.atproto.identity.requestPlcOperationSignature", - ComAtprotoIdentityGetRecommendedDidCredentials: - "com.atproto.identity.getRecommendedDidCredentials", - ComAtprotoIdentityResolveDid: "com.atproto.identity.resolveDid", - ComAtprotoAdminUpdateAccountEmail: "com.atproto.admin.updateAccountEmail", - ComAtprotoAdminGetAccountInfo: "com.atproto.admin.getAccountInfo", - ComAtprotoAdminGetSubjectStatus: "com.atproto.admin.getSubjectStatus", - ComAtprotoAdminDefs: "com.atproto.admin.defs", - ComAtprotoAdminSearchAccounts: "com.atproto.admin.searchAccounts", - ComAtprotoAdminUpdateAccountPassword: - "com.atproto.admin.updateAccountPassword", - ComAtprotoAdminUpdateAccountHandle: "com.atproto.admin.updateAccountHandle", - ComAtprotoAdminGetInviteCodes: "com.atproto.admin.getInviteCodes", - ComAtprotoAdminUpdateAccountSigningKey: - "com.atproto.admin.updateAccountSigningKey", - ComAtprotoAdminEnableAccountInvites: "com.atproto.admin.enableAccountInvites", - ComAtprotoAdminDisableAccountInvites: - "com.atproto.admin.disableAccountInvites", - ComAtprotoAdminDisableInviteCodes: "com.atproto.admin.disableInviteCodes", - ComAtprotoAdminUpdateSubjectStatus: "com.atproto.admin.updateSubjectStatus", - ComAtprotoAdminSendEmail: "com.atproto.admin.sendEmail", - ComAtprotoAdminGetAccountInfos: "com.atproto.admin.getAccountInfos", - ComAtprotoAdminDeleteAccount: "com.atproto.admin.deleteAccount", - ComAtprotoLabelSubscribeLabels: "com.atproto.label.subscribeLabels", - ComAtprotoLabelDefs: "com.atproto.label.defs", - ComAtprotoLabelQueryLabels: "com.atproto.label.queryLabels", - ComAtprotoServerRequestEmailConfirmation: - "com.atproto.server.requestEmailConfirmation", - ComAtprotoServerReserveSigningKey: "com.atproto.server.reserveSigningKey", - ComAtprotoServerDefs: "com.atproto.server.defs", - ComAtprotoServerGetServiceAuth: "com.atproto.server.getServiceAuth", - ComAtprotoServerGetAccountInviteCodes: - "com.atproto.server.getAccountInviteCodes", - ComAtprotoServerCreateSession: "com.atproto.server.createSession", - ComAtprotoServerListAppPasswords: "com.atproto.server.listAppPasswords", - ComAtprotoServerCreateInviteCodes: "com.atproto.server.createInviteCodes", - ComAtprotoServerDeleteSession: "com.atproto.server.deleteSession", - ComAtprotoServerRevokeAppPassword: "com.atproto.server.revokeAppPassword", - ComAtprotoServerCreateAppPassword: "com.atproto.server.createAppPassword", - ComAtprotoServerActivateAccount: "com.atproto.server.activateAccount", - ComAtprotoServerDescribeServer: "com.atproto.server.describeServer", - ComAtprotoServerConfirmEmail: "com.atproto.server.confirmEmail", - ComAtprotoServerGetSession: "com.atproto.server.getSession", - ComAtprotoServerRefreshSession: "com.atproto.server.refreshSession", - ComAtprotoServerDeactivateAccount: "com.atproto.server.deactivateAccount", - ComAtprotoServerUpdateEmail: "com.atproto.server.updateEmail", - ComAtprotoServerResetPassword: "com.atproto.server.resetPassword", - ComAtprotoServerCheckAccountStatus: "com.atproto.server.checkAccountStatus", - ComAtprotoServerRequestEmailUpdate: "com.atproto.server.requestEmailUpdate", - ComAtprotoServerRequestPasswordReset: - "com.atproto.server.requestPasswordReset", - ComAtprotoServerRequestAccountDelete: - "com.atproto.server.requestAccountDelete", - ComAtprotoServerCreateAccount: "com.atproto.server.createAccount", - ComAtprotoServerDeleteAccount: "com.atproto.server.deleteAccount", - ComAtprotoServerCreateInviteCode: "com.atproto.server.createInviteCode", - ComAtprotoLexiconResolveLexicon: "com.atproto.lexicon.resolveLexicon", - ComAtprotoLexiconSchema: "com.atproto.lexicon.schema", - ComAtprotoSyncGetHead: "com.atproto.sync.getHead", - ComAtprotoSyncGetBlob: "com.atproto.sync.getBlob", - ComAtprotoSyncGetRepo: "com.atproto.sync.getRepo", - ComAtprotoSyncNotifyOfUpdate: "com.atproto.sync.notifyOfUpdate", - ComAtprotoSyncDefs: "com.atproto.sync.defs", - ComAtprotoSyncRequestCrawl: "com.atproto.sync.requestCrawl", - ComAtprotoSyncListBlobs: "com.atproto.sync.listBlobs", - ComAtprotoSyncGetLatestCommit: "com.atproto.sync.getLatestCommit", - ComAtprotoSyncSubscribeRepos: "com.atproto.sync.subscribeRepos", - ComAtprotoSyncGetRepoStatus: "com.atproto.sync.getRepoStatus", - ComAtprotoSyncGetRecord: "com.atproto.sync.getRecord", - ComAtprotoSyncListHosts: "com.atproto.sync.listHosts", - ComAtprotoSyncListRepos: "com.atproto.sync.listRepos", - ComAtprotoSyncGetHostStatus: "com.atproto.sync.getHostStatus", - ComAtprotoSyncGetBlocks: "com.atproto.sync.getBlocks", - ComAtprotoSyncListReposByCollection: "com.atproto.sync.listReposByCollection", - ComAtprotoSyncGetCheckout: "com.atproto.sync.getCheckout", - ComAtprotoRepoStrongRef: "com.atproto.repo.strongRef", - ComAtprotoRepoDefs: "com.atproto.repo.defs", - ComAtprotoRepoListMissingBlobs: "com.atproto.repo.listMissingBlobs", - ComAtprotoRepoCreateRecord: "com.atproto.repo.createRecord", - ComAtprotoRepoDeleteRecord: "com.atproto.repo.deleteRecord", - ComAtprotoRepoPutRecord: "com.atproto.repo.putRecord", - ComAtprotoRepoUploadBlob: "com.atproto.repo.uploadBlob", - ComAtprotoRepoImportRepo: "com.atproto.repo.importRepo", - ComAtprotoRepoDescribeRepo: "com.atproto.repo.describeRepo", - ComAtprotoRepoGetRecord: "com.atproto.repo.getRecord", - ComAtprotoRepoApplyWrites: "com.atproto.repo.applyWrites", - ComAtprotoRepoListRecords: "com.atproto.repo.listRecords", - ComAtprotoModerationDefs: "com.atproto.moderation.defs", - ComAtprotoModerationCreateReport: "com.atproto.moderation.createReport", -} as const; diff --git a/lex/types/app/bsky/actor/defs.ts b/lex/types/app/bsky/actor/defs.ts deleted file mode 100644 index 8b04eff..0000000 --- a/lex/types/app/bsky/actor/defs.ts +++ /dev/null @@ -1,809 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -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"; -import type * as AppBskyNotificationDefs from "../notification/defs.ts"; -import type * as AppBskyFeedThreadgate from "../feed/threadgate.ts"; -import type * as AppBskyFeedPostgate from "../feed/postgate.ts"; -import type * as AppBskyEmbedExternal from "../embed/external.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.actor.defs"; - -export interface ProfileViewBasic { - $type?: "app.bsky.actor.defs#profileViewBasic"; - did: string; - handle: string; - displayName?: string; - pronouns?: string; - avatar?: string; - associated?: ProfileAssociated; - viewer?: ViewerState; - labels?: (ComAtprotoLabelDefs.Label)[]; - createdAt?: string; - verification?: VerificationState; - status?: StatusView; - /** Debug information for internal development */ - debug?: { [_ in string]: unknown }; -} - -const hashProfileViewBasic = "profileViewBasic"; - -export function isProfileViewBasic(v: V): v is ProfileViewBasic & V { - return is$typed(v, id, hashProfileViewBasic); -} - -export function validateProfileViewBasic( - v: V, -): ValidationResult { - return validate(v, id, hashProfileViewBasic); -} - -export interface ProfileView { - $type?: "app.bsky.actor.defs#profileView"; - did: string; - handle: string; - displayName?: string; - pronouns?: string; - description?: string; - avatar?: string; - associated?: ProfileAssociated; - indexedAt?: string; - createdAt?: string; - viewer?: ViewerState; - labels?: (ComAtprotoLabelDefs.Label)[]; - verification?: VerificationState; - status?: StatusView; - /** Debug information for internal development */ - debug?: { [_ in string]: unknown }; -} - -const hashProfileView = "profileView"; - -export function isProfileView(v: V): v is ProfileView & V { - return is$typed(v, id, hashProfileView); -} - -export function validateProfileView( - v: V, -): ValidationResult { - return validate(v, id, hashProfileView); -} - -export interface ProfileViewDetailed { - $type?: "app.bsky.actor.defs#profileViewDetailed"; - did: string; - handle: string; - displayName?: string; - description?: string; - pronouns?: string; - website?: string; - avatar?: string; - banner?: string; - followersCount?: number; - followsCount?: number; - postsCount?: number; - associated?: ProfileAssociated; - joinedViaStarterPack?: AppBskyGraphDefs.StarterPackViewBasic; - indexedAt?: string; - createdAt?: string; - viewer?: ViewerState; - labels?: (ComAtprotoLabelDefs.Label)[]; - pinnedPost?: ComAtprotoRepoStrongRef.Main; - verification?: VerificationState; - status?: StatusView; - /** Debug information for internal development */ - debug?: { [_ in string]: unknown }; -} - -const hashProfileViewDetailed = "profileViewDetailed"; - -export function isProfileViewDetailed(v: V): v is ProfileViewDetailed & V { - return is$typed(v, id, hashProfileViewDetailed); -} - -export function validateProfileViewDetailed( - v: V, -): ValidationResult { - return validate(v, id, hashProfileViewDetailed); -} - -export interface ProfileAssociated { - $type?: "app.bsky.actor.defs#profileAssociated"; - lists?: number; - feedgens?: number; - starterPacks?: number; - labeler?: boolean; - chat?: ProfileAssociatedChat; - activitySubscription?: ProfileAssociatedActivitySubscription; - germ?: ProfileAssociatedGerm; -} - -const hashProfileAssociated = "profileAssociated"; - -export function isProfileAssociated(v: V): v is ProfileAssociated & V { - return is$typed(v, id, hashProfileAssociated); -} - -export function validateProfileAssociated( - v: V, -): ValidationResult { - return validate(v, id, hashProfileAssociated); -} - -export interface ProfileAssociatedChat { - $type?: "app.bsky.actor.defs#profileAssociatedChat"; - allowIncoming: - | "all" - | "none" - | "following" - | (string & globalThis.Record); -} - -const hashProfileAssociatedChat = "profileAssociatedChat"; - -export function isProfileAssociatedChat( - v: V, -): v is ProfileAssociatedChat & V { - return is$typed(v, id, hashProfileAssociatedChat); -} - -export function validateProfileAssociatedChat( - v: V, -): ValidationResult { - return validate(v, id, hashProfileAssociatedChat); -} - -export interface ProfileAssociatedGerm { - $type?: "app.bsky.actor.defs#profileAssociatedGerm"; - messageMeUrl: string; - showButtonTo: - | "usersIFollow" - | "everyone" - | (string & globalThis.Record); -} - -const hashProfileAssociatedGerm = "profileAssociatedGerm"; - -export function isProfileAssociatedGerm( - v: V, -): v is ProfileAssociatedGerm & V { - return is$typed(v, id, hashProfileAssociatedGerm); -} - -export function validateProfileAssociatedGerm( - v: V, -): ValidationResult { - return validate(v, id, hashProfileAssociatedGerm); -} - -export interface ProfileAssociatedActivitySubscription { - $type?: "app.bsky.actor.defs#profileAssociatedActivitySubscription"; - allowSubscriptions: - | "followers" - | "mutuals" - | "none" - | (string & globalThis.Record); -} - -const hashProfileAssociatedActivitySubscription = - "profileAssociatedActivitySubscription"; - -export function isProfileAssociatedActivitySubscription( - v: V, -): v is ProfileAssociatedActivitySubscription & V { - return is$typed(v, id, hashProfileAssociatedActivitySubscription); -} - -export function validateProfileAssociatedActivitySubscription( - v: V, -): ValidationResult { - return validate( - v, - id, - hashProfileAssociatedActivitySubscription, - ); -} - -/** Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. */ -export interface ViewerState { - $type?: "app.bsky.actor.defs#viewerState"; - muted?: boolean; - mutedByList?: AppBskyGraphDefs.ListViewBasic; - blockedBy?: boolean; - blocking?: string; - blockingByList?: AppBskyGraphDefs.ListViewBasic; - following?: string; - followedBy?: string; - knownFollowers?: KnownFollowers; - activitySubscription?: AppBskyNotificationDefs.ActivitySubscription; -} - -const hashViewerState = "viewerState"; - -export function isViewerState(v: V): v is ViewerState & V { - return is$typed(v, id, hashViewerState); -} - -export function validateViewerState( - v: V, -): ValidationResult { - return validate(v, id, hashViewerState); -} - -/** The subject's followers whom you also follow */ -export interface KnownFollowers { - $type?: "app.bsky.actor.defs#knownFollowers"; - count: number; - followers: (ProfileViewBasic)[]; -} - -const hashKnownFollowers = "knownFollowers"; - -export function isKnownFollowers(v: V): v is KnownFollowers & V { - return is$typed(v, id, hashKnownFollowers); -} - -export function validateKnownFollowers( - v: V, -): ValidationResult { - return validate(v, id, hashKnownFollowers); -} - -/** Represents the verification information about the user this object is attached to. */ -export interface VerificationState { - $type?: "app.bsky.actor.defs#verificationState"; - /** All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included. */ - verifications: (VerificationView)[]; - /** The user's status as a verified account. */ - verifiedStatus: - | "valid" - | "invalid" - | "none" - | (string & globalThis.Record); - /** The user's status as a trusted verifier. */ - trustedVerifierStatus: - | "valid" - | "invalid" - | "none" - | (string & globalThis.Record); -} - -const hashVerificationState = "verificationState"; - -export function isVerificationState(v: V): v is VerificationState & V { - return is$typed(v, id, hashVerificationState); -} - -export function validateVerificationState( - v: V, -): ValidationResult { - return validate(v, id, hashVerificationState); -} - -/** An individual verification for an associated subject. */ -export interface VerificationView { - $type?: "app.bsky.actor.defs#verificationView"; - /** The user who issued this verification. */ - issuer: string; - /** The AT-URI of the verification record. */ - uri: string; - /** True if the verification passes validation, otherwise false. */ - isValid: boolean; - /** Timestamp when the verification was created. */ - createdAt: string; -} - -const hashVerificationView = "verificationView"; - -export function isVerificationView(v: V): v is VerificationView & V { - return is$typed(v, id, hashVerificationView); -} - -export function validateVerificationView( - v: V, -): ValidationResult { - return validate(v, id, hashVerificationView); -} - -export type Preferences = ( - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string } -)[]; - -export interface AdultContentPref { - $type?: "app.bsky.actor.defs#adultContentPref"; - enabled: boolean; -} - -const hashAdultContentPref = "adultContentPref"; - -export function isAdultContentPref(v: V): v is AdultContentPref & V { - return is$typed(v, id, hashAdultContentPref); -} - -export function validateAdultContentPref( - v: V, -): ValidationResult { - return validate(v, id, hashAdultContentPref); -} - -export interface ContentLabelPref { - $type?: "app.bsky.actor.defs#contentLabelPref"; - /** Which labeler does this preference apply to? If undefined, applies globally. */ - labelerDid?: string; - label: string; - visibility: - | "ignore" - | "show" - | "warn" - | "hide" - | (string & globalThis.Record); -} - -const hashContentLabelPref = "contentLabelPref"; - -export function isContentLabelPref(v: V): v is ContentLabelPref & V { - return is$typed(v, id, hashContentLabelPref); -} - -export function validateContentLabelPref( - v: V, -): ValidationResult { - return validate(v, id, hashContentLabelPref); -} - -export interface SavedFeed { - $type?: "app.bsky.actor.defs#savedFeed"; - id: string; - type: - | "feed" - | "list" - | "timeline" - | (string & globalThis.Record); - value: string; - pinned: boolean; -} - -const hashSavedFeed = "savedFeed"; - -export function isSavedFeed(v: V): v is SavedFeed & V { - return is$typed(v, id, hashSavedFeed); -} - -export function validateSavedFeed(v: V): ValidationResult { - return validate(v, id, hashSavedFeed); -} - -export interface SavedFeedsPrefV2 { - $type?: "app.bsky.actor.defs#savedFeedsPrefV2"; - items: (SavedFeed)[]; -} - -const hashSavedFeedsPrefV2 = "savedFeedsPrefV2"; - -export function isSavedFeedsPrefV2(v: V): v is SavedFeedsPrefV2 & V { - return is$typed(v, id, hashSavedFeedsPrefV2); -} - -export function validateSavedFeedsPrefV2( - v: V, -): ValidationResult { - return validate(v, id, hashSavedFeedsPrefV2); -} - -export interface SavedFeedsPref { - $type?: "app.bsky.actor.defs#savedFeedsPref"; - pinned: (string)[]; - saved: (string)[]; - timelineIndex?: number; -} - -const hashSavedFeedsPref = "savedFeedsPref"; - -export function isSavedFeedsPref(v: V): v is SavedFeedsPref & V { - return is$typed(v, id, hashSavedFeedsPref); -} - -export function validateSavedFeedsPref( - v: V, -): ValidationResult { - return validate(v, id, hashSavedFeedsPref); -} - -export interface PersonalDetailsPref { - $type?: "app.bsky.actor.defs#personalDetailsPref"; - /** The birth date of account owner. */ - birthDate?: string; -} - -const hashPersonalDetailsPref = "personalDetailsPref"; - -export function isPersonalDetailsPref(v: V): v is PersonalDetailsPref & V { - return is$typed(v, id, hashPersonalDetailsPref); -} - -export function validatePersonalDetailsPref( - v: V, -): ValidationResult { - return validate(v, id, hashPersonalDetailsPref); -} - -/** Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration. */ -export interface DeclaredAgePref { - $type?: "app.bsky.actor.defs#declaredAgePref"; - /** Indicates if the user has declared that they are over 13 years of age. */ - isOverAge13?: boolean; - /** Indicates if the user has declared that they are over 16 years of age. */ - isOverAge16?: boolean; - /** Indicates if the user has declared that they are over 18 years of age. */ - isOverAge18?: boolean; -} - -const hashDeclaredAgePref = "declaredAgePref"; - -export function isDeclaredAgePref(v: V): v is DeclaredAgePref & V { - return is$typed(v, id, hashDeclaredAgePref); -} - -export function validateDeclaredAgePref( - v: V, -): ValidationResult { - return validate(v, id, hashDeclaredAgePref); -} - -export interface FeedViewPref { - $type?: "app.bsky.actor.defs#feedViewPref"; - /** The URI of the feed, or an identifier which describes the feed. */ - feed: string; - /** Hide replies in the feed. */ - hideReplies?: boolean; - /** Hide replies in the feed if they are not by followed users. */ - hideRepliesByUnfollowed: boolean; - /** Hide replies in the feed if they do not have this number of likes. */ - hideRepliesByLikeCount?: number; - /** Hide reposts in the feed. */ - hideReposts?: boolean; - /** Hide quote posts in the feed. */ - hideQuotePosts?: boolean; -} - -const hashFeedViewPref = "feedViewPref"; - -export function isFeedViewPref(v: V): v is FeedViewPref & V { - return is$typed(v, id, hashFeedViewPref); -} - -export function validateFeedViewPref( - v: V, -): ValidationResult { - return validate(v, id, hashFeedViewPref); -} - -export interface ThreadViewPref { - $type?: "app.bsky.actor.defs#threadViewPref"; - /** Sorting mode for threads. */ - sort?: - | "oldest" - | "newest" - | "most-likes" - | "random" - | "hotness" - | (string & globalThis.Record); -} - -const hashThreadViewPref = "threadViewPref"; - -export function isThreadViewPref(v: V): v is ThreadViewPref & V { - return is$typed(v, id, hashThreadViewPref); -} - -export function validateThreadViewPref( - v: V, -): ValidationResult { - return validate(v, id, hashThreadViewPref); -} - -export interface InterestsPref { - $type?: "app.bsky.actor.defs#interestsPref"; - /** A list of tags which describe the account owner's interests gathered during onboarding. */ - tags: (string)[]; -} - -const hashInterestsPref = "interestsPref"; - -export function isInterestsPref(v: V): v is InterestsPref & V { - return is$typed(v, id, hashInterestsPref); -} - -export function validateInterestsPref( - v: V, -): ValidationResult { - return validate(v, id, hashInterestsPref); -} - -export type MutedWordTarget = - | "content" - | "tag" - | (string & globalThis.Record); - -/** A word that the account owner has muted. */ -export interface MutedWord { - $type?: "app.bsky.actor.defs#mutedWord"; - id?: string; - /** The muted word itself. */ - value: string; - /** The intended targets of the muted word. */ - targets: (MutedWordTarget)[]; - /** Groups of users to apply the muted word to. If undefined, applies to all users. */ - actorTarget: - | "all" - | "exclude-following" - | (string & globalThis.Record); - /** The date and time at which the muted word will expire and no longer be applied. */ - expiresAt?: string; -} - -const hashMutedWord = "mutedWord"; - -export function isMutedWord(v: V): v is MutedWord & V { - return is$typed(v, id, hashMutedWord); -} - -export function validateMutedWord(v: V): ValidationResult { - return validate(v, id, hashMutedWord); -} - -export interface MutedWordsPref { - $type?: "app.bsky.actor.defs#mutedWordsPref"; - /** A list of words the account owner has muted. */ - items: (MutedWord)[]; -} - -const hashMutedWordsPref = "mutedWordsPref"; - -export function isMutedWordsPref(v: V): v is MutedWordsPref & V { - return is$typed(v, id, hashMutedWordsPref); -} - -export function validateMutedWordsPref( - v: V, -): ValidationResult { - return validate(v, id, hashMutedWordsPref); -} - -export interface HiddenPostsPref { - $type?: "app.bsky.actor.defs#hiddenPostsPref"; - /** A list of URIs of posts the account owner has hidden. */ - items: (string)[]; -} - -const hashHiddenPostsPref = "hiddenPostsPref"; - -export function isHiddenPostsPref(v: V): v is HiddenPostsPref & V { - return is$typed(v, id, hashHiddenPostsPref); -} - -export function validateHiddenPostsPref( - v: V, -): ValidationResult { - return validate(v, id, hashHiddenPostsPref); -} - -export interface LabelersPref { - $type?: "app.bsky.actor.defs#labelersPref"; - labelers: (LabelerPrefItem)[]; -} - -const hashLabelersPref = "labelersPref"; - -export function isLabelersPref(v: V): v is LabelersPref & V { - return is$typed(v, id, hashLabelersPref); -} - -export function validateLabelersPref( - v: V, -): ValidationResult { - return validate(v, id, hashLabelersPref); -} - -export interface LabelerPrefItem { - $type?: "app.bsky.actor.defs#labelerPrefItem"; - did: string; -} - -const hashLabelerPrefItem = "labelerPrefItem"; - -export function isLabelerPrefItem(v: V): v is LabelerPrefItem & V { - return is$typed(v, id, hashLabelerPrefItem); -} - -export function validateLabelerPrefItem( - v: V, -): ValidationResult { - return validate(v, id, hashLabelerPrefItem); -} - -/** A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. */ -export interface BskyAppStatePref { - $type?: "app.bsky.actor.defs#bskyAppStatePref"; - activeProgressGuide?: BskyAppProgressGuide; - /** An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. */ - queuedNudges?: (string)[]; - /** Storage for NUXs the user has encountered. */ - nuxs?: (Nux)[]; -} - -const hashBskyAppStatePref = "bskyAppStatePref"; - -export function isBskyAppStatePref(v: V): v is BskyAppStatePref & V { - return is$typed(v, id, hashBskyAppStatePref); -} - -export function validateBskyAppStatePref( - v: V, -): ValidationResult { - return validate(v, id, hashBskyAppStatePref); -} - -/** If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. */ -export interface BskyAppProgressGuide { - $type?: "app.bsky.actor.defs#bskyAppProgressGuide"; - guide: string; -} - -const hashBskyAppProgressGuide = "bskyAppProgressGuide"; - -export function isBskyAppProgressGuide(v: V): v is BskyAppProgressGuide & V { - return is$typed(v, id, hashBskyAppProgressGuide); -} - -export function validateBskyAppProgressGuide( - v: V, -): ValidationResult { - return validate(v, id, hashBskyAppProgressGuide); -} - -/** A new user experiences (NUX) storage object */ -export interface Nux { - $type?: "app.bsky.actor.defs#nux"; - id: string; - completed: boolean; - /** Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. */ - data?: string; - /** The date and time at which the NUX will expire and should be considered completed. */ - expiresAt?: string; -} - -const hashNux = "nux"; - -export function isNux(v: V): v is Nux & V { - return is$typed(v, id, hashNux); -} - -export function validateNux(v: V): ValidationResult { - return validate(v, id, hashNux); -} - -/** Preferences for how verified accounts appear in the app. */ -export interface VerificationPrefs { - $type?: "app.bsky.actor.defs#verificationPrefs"; - /** Hide the blue check badges for verified accounts and trusted verifiers. */ - hideBadges: boolean; -} - -const hashVerificationPrefs = "verificationPrefs"; - -export function isVerificationPrefs(v: V): v is VerificationPrefs & V { - return is$typed(v, id, hashVerificationPrefs); -} - -export function validateVerificationPrefs( - v: V, -): ValidationResult { - return validate(v, id, hashVerificationPrefs); -} - -/** Preferences for live events. */ -export interface LiveEventPreferences { - $type?: "app.bsky.actor.defs#liveEventPreferences"; - /** A list of feed IDs that the user has hidden from live events. */ - hiddenFeedIds?: (string)[]; - /** Whether to hide all feeds from live events. */ - hideAllFeeds: boolean; -} - -const hashLiveEventPreferences = "liveEventPreferences"; - -export function isLiveEventPreferences(v: V): v is LiveEventPreferences & V { - return is$typed(v, id, hashLiveEventPreferences); -} - -export function validateLiveEventPreferences( - v: V, -): ValidationResult { - return validate(v, id, hashLiveEventPreferences); -} - -/** Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. */ -export interface PostInteractionSettingsPref { - $type?: "app.bsky.actor.defs#postInteractionSettingsPref"; - /** Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. */ - threadgateAllowRules?: ( - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string } - )[]; - /** Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed. */ - postgateEmbeddingRules?: - ($Typed | { $type: string })[]; -} - -const hashPostInteractionSettingsPref = "postInteractionSettingsPref"; - -export function isPostInteractionSettingsPref( - v: V, -): v is PostInteractionSettingsPref & V { - return is$typed(v, id, hashPostInteractionSettingsPref); -} - -export function validatePostInteractionSettingsPref( - v: V, -): ValidationResult { - return validate( - v, - id, - hashPostInteractionSettingsPref, - ); -} - -export interface StatusView { - $type?: "app.bsky.actor.defs#statusView"; - uri?: string; - cid?: string; - /** The status for the account. */ - status: - | "app.bsky.actor.status#live" - | (string & globalThis.Record); - record: { [_ in string]: unknown }; - embed?: $Typed | { $type: string }; - labels?: (ComAtprotoLabelDefs.Label)[]; - /** The date when this status will expire. The application might choose to no longer return the status after expiration. */ - expiresAt?: string; - /** True if the status is not expired, false if it is expired. Only present if expiration was set. */ - isActive?: boolean; - /** True if the user's go-live access has been disabled by a moderator, false otherwise. */ - isDisabled?: boolean; -} - -const hashStatusView = "statusView"; - -export function isStatusView(v: V): v is StatusView & V { - return is$typed(v, id, hashStatusView); -} - -export function validateStatusView(v: V): ValidationResult { - return validate(v, id, hashStatusView); -} diff --git a/lex/types/app/bsky/actor/getPreferences.ts b/lex/types/app/bsky/actor/getPreferences.ts deleted file mode 100644 index fc67df9..0000000 --- a/lex/types/app/bsky/actor/getPreferences.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; -export type InputSchema = undefined; - -export interface OutputSchema { - preferences: AppBskyActorDefs.Preferences; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/actor/getProfile.ts b/lex/types/app/bsky/actor/getProfile.ts deleted file mode 100644 index 935ba0e..0000000 --- a/lex/types/app/bsky/actor/getProfile.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "./defs.ts"; - -export type QueryParams = { - /** Handle or DID of account to fetch profile of. */ - actor: string; -}; -export type InputSchema = undefined; -export type OutputSchema = AppBskyActorDefs.ProfileViewDetailed; -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/actor/getProfiles.ts b/lex/types/app/bsky/actor/getProfiles.ts deleted file mode 100644 index 2985daa..0000000 --- a/lex/types/app/bsky/actor/getProfiles.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "./defs.ts"; - -export type QueryParams = { - actors: string[]; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - profiles: (AppBskyActorDefs.ProfileViewDetailed)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/actor/getSuggestions.ts b/lex/types/app/bsky/actor/getSuggestions.ts deleted file mode 100644 index 7c7c592..0000000 --- a/lex/types/app/bsky/actor/getSuggestions.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "./defs.ts"; - -export type QueryParams = { - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - actors: (AppBskyActorDefs.ProfileView)[]; - /** DEPRECATED: use recIdStr instead. */ - recId?: number; - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/actor/profile.ts b/lex/types/app/bsky/actor/profile.ts deleted file mode 100644 index c3da286..0000000 --- a/lex/types/app/bsky/actor/profile.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { BlobRef } from "@atp/lexicon"; -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -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"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.actor.profile"; - -export interface Record { - $type: "app.bsky.actor.profile"; - displayName?: string; - /** Free-form profile description text. */ - description?: string; - /** Free-form pronouns text. */ - pronouns?: string; - website?: string; - /** Small image to be displayed next to posts from account. AKA, 'profile picture' */ - avatar?: BlobRef; - /** Larger horizontal image to display behind profile view. */ - banner?: BlobRef; - labels?: $Typed | { $type: string }; - joinedViaStarterPack?: ComAtprotoRepoStrongRef.Main; - pinnedPost?: ComAtprotoRepoStrongRef.Main; - createdAt?: string; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - return validate(v, id, hashRecord, true); -} - -export type Main = Record; diff --git a/lex/types/app/bsky/actor/putPreferences.ts b/lex/types/app/bsky/actor/putPreferences.ts deleted file mode 100644 index d4b2969..0000000 --- a/lex/types/app/bsky/actor/putPreferences.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - preferences: AppBskyActorDefs.Preferences; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/actor/searchActors.ts b/lex/types/app/bsky/actor/searchActors.ts deleted file mode 100644 index 96731f9..0000000 --- a/lex/types/app/bsky/actor/searchActors.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "./defs.ts"; - -export type QueryParams = { - /** DEPRECATED: use 'q' instead. */ - term?: string; - /** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */ - q?: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - actors: (AppBskyActorDefs.ProfileView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/actor/searchActorsTypeahead.ts b/lex/types/app/bsky/actor/searchActorsTypeahead.ts deleted file mode 100644 index 8352b8f..0000000 --- a/lex/types/app/bsky/actor/searchActorsTypeahead.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "./defs.ts"; - -export type QueryParams = { - /** DEPRECATED: use 'q' instead. */ - term?: string; - /** Search query prefix; not a full query string. */ - q?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - actors: (AppBskyActorDefs.ProfileViewBasic)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/actor/status.ts b/lex/types/app/bsky/actor/status.ts deleted file mode 100644 index 099bfe6..0000000 --- a/lex/types/app/bsky/actor/status.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -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; -const id = "app.bsky.actor.status"; - -export interface Record { - $type: "app.bsky.actor.status"; - /** The status for the account. */ - status: - | "app.bsky.actor.status#live" - | (string & globalThis.Record); - embed?: $Typed | { $type: string }; - /** The duration of the status in minutes. Applications can choose to impose minimum and maximum limits. */ - durationMinutes?: number; - createdAt: string; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - return validate(v, id, hashRecord, true); -} - -export type Main = Record; - -/** Advertises an account as currently offering live content. */ -export const LIVE: string = `${id}#live`; diff --git a/lex/types/app/bsky/ageassurance/begin.ts b/lex/types/app/bsky/ageassurance/begin.ts deleted file mode 100644 index 55bb7f0..0000000 --- a/lex/types/app/bsky/ageassurance/begin.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyAgeassuranceDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - /** The user's email address to receive Age Assurance instructions. */ - email: string; - /** The user's preferred language for communication during the Age Assurance process. */ - language: string; - /** An ISO 3166-1 alpha-2 code of the user's location. */ - countryCode: string; - /** An optional ISO 3166-2 code of the user's region or state within the country. */ - regionCode?: string; -} - -export type OutputSchema = AppBskyAgeassuranceDefs.State; - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: - | "InvalidEmail" - | "DidTooLong" - | "InvalidInitiation" - | "RegionNotSupported"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/ageassurance/defs.ts b/lex/types/app/bsky/ageassurance/defs.ts deleted file mode 100644 index 0fa0b3b..0000000 --- a/lex/types/app/bsky/ageassurance/defs.ts +++ /dev/null @@ -1,344 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.ageassurance.defs"; - -/** The access level granted based on Age Assurance data we've processed. */ -export type Access = - | "unknown" - | "none" - | "safe" - | "full" - | (string & globalThis.Record); -/** The status of the Age Assurance process. */ -export type Status = - | "unknown" - | "pending" - | "assured" - | "blocked" - | (string & globalThis.Record); - -/** The user's computed Age Assurance state. */ -export interface State { - $type?: "app.bsky.ageassurance.defs#state"; - /** The timestamp when this state was last updated. */ - lastInitiatedAt?: string; - status: Status; - access: Access; -} - -const hashState = "state"; - -export function isState(v: V): v is State & V { - return is$typed(v, id, hashState); -} - -export function validateState(v: V): ValidationResult { - return validate(v, id, hashState); -} - -/** Additional metadata needed to compute Age Assurance state client-side. */ -export interface StateMetadata { - $type?: "app.bsky.ageassurance.defs#stateMetadata"; - /** The account creation timestamp. */ - accountCreatedAt?: string; -} - -const hashStateMetadata = "stateMetadata"; - -export function isStateMetadata(v: V): v is StateMetadata & V { - return is$typed(v, id, hashStateMetadata); -} - -export function validateStateMetadata( - v: V, -): ValidationResult { - return validate(v, id, hashStateMetadata); -} - -export interface Config { - $type?: "app.bsky.ageassurance.defs#config"; - /** The per-region Age Assurance configuration. */ - regions: (ConfigRegion)[]; -} - -const hashConfig = "config"; - -export function isConfig(v: V): v is Config & V { - return is$typed(v, id, hashConfig); -} - -export function validateConfig(v: V): ValidationResult { - return validate(v, id, hashConfig); -} - -/** The Age Assurance configuration for a specific region. */ -export interface ConfigRegion { - $type?: "app.bsky.ageassurance.defs#configRegion"; - /** The ISO 3166-1 alpha-2 country code this configuration applies to. */ - countryCode: string; - /** The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country. */ - regionCode?: string; - /** The minimum age (as a whole integer) required to use Bluesky in this region. */ - minAccessAge: number; - /** The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item. */ - rules: ( - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string } - )[]; -} - -const hashConfigRegion = "configRegion"; - -export function isConfigRegion(v: V): v is ConfigRegion & V { - return is$typed(v, id, hashConfigRegion); -} - -export function validateConfigRegion( - v: V, -): ValidationResult { - return validate(v, id, hashConfigRegion); -} - -/** Age Assurance rule that applies by default. */ -export interface ConfigRegionRuleDefault { - $type?: "app.bsky.ageassurance.defs#configRegionRuleDefault"; - access: Access; -} - -const hashConfigRegionRuleDefault = "configRegionRuleDefault"; - -export function isConfigRegionRuleDefault( - v: V, -): v is ConfigRegionRuleDefault & V { - return is$typed(v, id, hashConfigRegionRuleDefault); -} - -export function validateConfigRegionRuleDefault( - v: V, -): ValidationResult { - return validate( - v, - id, - hashConfigRegionRuleDefault, - ); -} - -/** Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age. */ -export interface ConfigRegionRuleIfDeclaredOverAge { - $type?: "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge"; - /** The age threshold as a whole integer. */ - age: number; - access: Access; -} - -const hashConfigRegionRuleIfDeclaredOverAge = - "configRegionRuleIfDeclaredOverAge"; - -export function isConfigRegionRuleIfDeclaredOverAge( - v: V, -): v is ConfigRegionRuleIfDeclaredOverAge & V { - return is$typed(v, id, hashConfigRegionRuleIfDeclaredOverAge); -} - -export function validateConfigRegionRuleIfDeclaredOverAge( - v: V, -): ValidationResult { - return validate( - v, - id, - hashConfigRegionRuleIfDeclaredOverAge, - ); -} - -/** Age Assurance rule that applies if the user has declared themselves under a certain age. */ -export interface ConfigRegionRuleIfDeclaredUnderAge { - $type?: "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge"; - /** The age threshold as a whole integer. */ - age: number; - access: Access; -} - -const hashConfigRegionRuleIfDeclaredUnderAge = - "configRegionRuleIfDeclaredUnderAge"; - -export function isConfigRegionRuleIfDeclaredUnderAge( - v: V, -): v is ConfigRegionRuleIfDeclaredUnderAge & V { - return is$typed(v, id, hashConfigRegionRuleIfDeclaredUnderAge); -} - -export function validateConfigRegionRuleIfDeclaredUnderAge( - v: V, -): ValidationResult { - return validate( - v, - id, - hashConfigRegionRuleIfDeclaredUnderAge, - ); -} - -/** Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age. */ -export interface ConfigRegionRuleIfAssuredOverAge { - $type?: "app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge"; - /** The age threshold as a whole integer. */ - age: number; - access: Access; -} - -const hashConfigRegionRuleIfAssuredOverAge = "configRegionRuleIfAssuredOverAge"; - -export function isConfigRegionRuleIfAssuredOverAge( - v: V, -): v is ConfigRegionRuleIfAssuredOverAge & V { - return is$typed(v, id, hashConfigRegionRuleIfAssuredOverAge); -} - -export function validateConfigRegionRuleIfAssuredOverAge( - v: V, -): ValidationResult { - return validate( - v, - id, - hashConfigRegionRuleIfAssuredOverAge, - ); -} - -/** Age Assurance rule that applies if the user has been assured to be under a certain age. */ -export interface ConfigRegionRuleIfAssuredUnderAge { - $type?: "app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge"; - /** The age threshold as a whole integer. */ - age: number; - access: Access; -} - -const hashConfigRegionRuleIfAssuredUnderAge = - "configRegionRuleIfAssuredUnderAge"; - -export function isConfigRegionRuleIfAssuredUnderAge( - v: V, -): v is ConfigRegionRuleIfAssuredUnderAge & V { - return is$typed(v, id, hashConfigRegionRuleIfAssuredUnderAge); -} - -export function validateConfigRegionRuleIfAssuredUnderAge( - v: V, -): ValidationResult { - return validate( - v, - id, - hashConfigRegionRuleIfAssuredUnderAge, - ); -} - -/** Age Assurance rule that applies if the account is equal-to or newer than a certain date. */ -export interface ConfigRegionRuleIfAccountNewerThan { - $type?: "app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan"; - /** The date threshold as a datetime string. */ - date: string; - access: Access; -} - -const hashConfigRegionRuleIfAccountNewerThan = - "configRegionRuleIfAccountNewerThan"; - -export function isConfigRegionRuleIfAccountNewerThan( - v: V, -): v is ConfigRegionRuleIfAccountNewerThan & V { - return is$typed(v, id, hashConfigRegionRuleIfAccountNewerThan); -} - -export function validateConfigRegionRuleIfAccountNewerThan( - v: V, -): ValidationResult { - return validate( - v, - id, - hashConfigRegionRuleIfAccountNewerThan, - ); -} - -/** Age Assurance rule that applies if the account is older than a certain date. */ -export interface ConfigRegionRuleIfAccountOlderThan { - $type?: "app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan"; - /** The date threshold as a datetime string. */ - date: string; - access: Access; -} - -const hashConfigRegionRuleIfAccountOlderThan = - "configRegionRuleIfAccountOlderThan"; - -export function isConfigRegionRuleIfAccountOlderThan( - v: V, -): v is ConfigRegionRuleIfAccountOlderThan & V { - return is$typed(v, id, hashConfigRegionRuleIfAccountOlderThan); -} - -export function validateConfigRegionRuleIfAccountOlderThan( - v: V, -): ValidationResult { - return validate( - v, - id, - hashConfigRegionRuleIfAccountOlderThan, - ); -} - -/** Object used to store Age Assurance data in stash. */ -export interface Event { - $type?: "app.bsky.ageassurance.defs#event"; - /** The date and time of this write operation. */ - createdAt: string; - /** The unique identifier for this instance of the Age Assurance flow, in UUID format. */ - attemptId: string; - /** The status of the Age Assurance process. */ - status: - | "unknown" - | "pending" - | "assured" - | "blocked" - | (string & globalThis.Record); - /** The access level granted based on Age Assurance data we've processed. */ - access: - | "unknown" - | "none" - | "safe" - | "full" - | (string & globalThis.Record); - /** The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow. */ - countryCode: string; - /** The ISO 3166-2 region code provided when beginning the Age Assurance flow. */ - regionCode?: string; - /** The email used for Age Assurance. */ - email?: string; - /** The IP address used when initiating the Age Assurance flow. */ - initIp?: string; - /** The user agent used when initiating the Age Assurance flow. */ - initUa?: string; - /** The IP address used when completing the Age Assurance flow. */ - completeIp?: string; - /** The user agent used when completing the Age Assurance flow. */ - completeUa?: string; -} - -const hashEvent = "event"; - -export function isEvent(v: V): v is Event & V { - return is$typed(v, id, hashEvent); -} - -export function validateEvent(v: V): ValidationResult { - return validate(v, id, hashEvent); -} diff --git a/lex/types/app/bsky/ageassurance/getConfig.ts b/lex/types/app/bsky/ageassurance/getConfig.ts deleted file mode 100644 index 8894679..0000000 --- a/lex/types/app/bsky/ageassurance/getConfig.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyAgeassuranceDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; -export type InputSchema = undefined; -export type OutputSchema = AppBskyAgeassuranceDefs.Config; -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/ageassurance/getState.ts b/lex/types/app/bsky/ageassurance/getState.ts deleted file mode 100644 index 28a59f4..0000000 --- a/lex/types/app/bsky/ageassurance/getState.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyAgeassuranceDefs from "./defs.ts"; - -export type QueryParams = { - countryCode: string; - regionCode?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - state: AppBskyAgeassuranceDefs.State; - metadata: AppBskyAgeassuranceDefs.StateMetadata; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/authCreatePosts.ts b/lex/types/app/bsky/authCreatePosts.ts deleted file mode 100644 index 55ddc64..0000000 --- a/lex/types/app/bsky/authCreatePosts.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { LexPermissionSet } from "@atp/lexicon"; - -export type Main = LexPermissionSet; diff --git a/lex/types/app/bsky/authDeleteContent.ts b/lex/types/app/bsky/authDeleteContent.ts deleted file mode 100644 index 55ddc64..0000000 --- a/lex/types/app/bsky/authDeleteContent.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { LexPermissionSet } from "@atp/lexicon"; - -export type Main = LexPermissionSet; diff --git a/lex/types/app/bsky/authFullApp.ts b/lex/types/app/bsky/authFullApp.ts deleted file mode 100644 index 55ddc64..0000000 --- a/lex/types/app/bsky/authFullApp.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { LexPermissionSet } from "@atp/lexicon"; - -export type Main = LexPermissionSet; diff --git a/lex/types/app/bsky/authManageFeedDeclarations.ts b/lex/types/app/bsky/authManageFeedDeclarations.ts deleted file mode 100644 index 55ddc64..0000000 --- a/lex/types/app/bsky/authManageFeedDeclarations.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { LexPermissionSet } from "@atp/lexicon"; - -export type Main = LexPermissionSet; diff --git a/lex/types/app/bsky/authManageLabelerService.ts b/lex/types/app/bsky/authManageLabelerService.ts deleted file mode 100644 index 55ddc64..0000000 --- a/lex/types/app/bsky/authManageLabelerService.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { LexPermissionSet } from "@atp/lexicon"; - -export type Main = LexPermissionSet; diff --git a/lex/types/app/bsky/authManageModeration.ts b/lex/types/app/bsky/authManageModeration.ts deleted file mode 100644 index 55ddc64..0000000 --- a/lex/types/app/bsky/authManageModeration.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { LexPermissionSet } from "@atp/lexicon"; - -export type Main = LexPermissionSet; diff --git a/lex/types/app/bsky/authManageNotifications.ts b/lex/types/app/bsky/authManageNotifications.ts deleted file mode 100644 index 55ddc64..0000000 --- a/lex/types/app/bsky/authManageNotifications.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { LexPermissionSet } from "@atp/lexicon"; - -export type Main = LexPermissionSet; diff --git a/lex/types/app/bsky/authManageProfile.ts b/lex/types/app/bsky/authManageProfile.ts deleted file mode 100644 index 55ddc64..0000000 --- a/lex/types/app/bsky/authManageProfile.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { LexPermissionSet } from "@atp/lexicon"; - -export type Main = LexPermissionSet; diff --git a/lex/types/app/bsky/authViewAll.ts b/lex/types/app/bsky/authViewAll.ts deleted file mode 100644 index 55ddc64..0000000 --- a/lex/types/app/bsky/authViewAll.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { LexPermissionSet } from "@atp/lexicon"; - -export type Main = LexPermissionSet; diff --git a/lex/types/app/bsky/bookmark/createBookmark.ts b/lex/types/app/bsky/bookmark/createBookmark.ts deleted file mode 100644 index a0dc5e4..0000000 --- a/lex/types/app/bsky/bookmark/createBookmark.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - uri: string; - cid: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "UnsupportedCollection"; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/bookmark/defs.ts b/lex/types/app/bsky/bookmark/defs.ts deleted file mode 100644 index 5a68ab1..0000000 --- a/lex/types/app/bsky/bookmark/defs.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -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"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.bookmark.defs"; - -/** Object used to store bookmark data in stash. */ -export interface Bookmark { - $type?: "app.bsky.bookmark.defs#bookmark"; - subject: ComAtprotoRepoStrongRef.Main; -} - -const hashBookmark = "bookmark"; - -export function isBookmark(v: V): v is Bookmark & V { - return is$typed(v, id, hashBookmark); -} - -export function validateBookmark(v: V): ValidationResult { - return validate(v, id, hashBookmark); -} - -export interface BookmarkView { - $type?: "app.bsky.bookmark.defs#bookmarkView"; - subject: ComAtprotoRepoStrongRef.Main; - createdAt?: string; - item: - | $Typed - | $Typed - | $Typed - | { $type: string }; -} - -const hashBookmarkView = "bookmarkView"; - -export function isBookmarkView(v: V): v is BookmarkView & V { - return is$typed(v, id, hashBookmarkView); -} - -export function validateBookmarkView( - v: V, -): ValidationResult { - return validate(v, id, hashBookmarkView); -} diff --git a/lex/types/app/bsky/bookmark/deleteBookmark.ts b/lex/types/app/bsky/bookmark/deleteBookmark.ts deleted file mode 100644 index ac76106..0000000 --- a/lex/types/app/bsky/bookmark/deleteBookmark.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - uri: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "UnsupportedCollection"; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/bookmark/getBookmarks.ts b/lex/types/app/bsky/bookmark/getBookmarks.ts deleted file mode 100644 index 67e0ce9..0000000 --- a/lex/types/app/bsky/bookmark/getBookmarks.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyBookmarkDefs from "./defs.ts"; - -export type QueryParams = { - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - bookmarks: (AppBskyBookmarkDefs.BookmarkView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/contact/defs.ts b/lex/types/app/bsky/contact/defs.ts deleted file mode 100644 index 475efbf..0000000 --- a/lex/types/app/bsky/contact/defs.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.contact.defs"; - -/** Associates a profile with the positional index of the contact import input in the call to `app.bsky.contact.importContacts`, so clients can know which phone caused a particular match. */ -export interface MatchAndContactIndex { - $type?: "app.bsky.contact.defs#matchAndContactIndex"; - match: AppBskyActorDefs.ProfileView; - /** The index of this match in the import contact input. */ - contactIndex: number; -} - -const hashMatchAndContactIndex = "matchAndContactIndex"; - -export function isMatchAndContactIndex(v: V): v is MatchAndContactIndex & V { - return is$typed(v, id, hashMatchAndContactIndex); -} - -export function validateMatchAndContactIndex( - v: V, -): ValidationResult { - return validate(v, id, hashMatchAndContactIndex); -} - -export interface SyncStatus { - $type?: "app.bsky.contact.defs#syncStatus"; - /** Last date when contacts where imported. */ - syncedAt: string; - /** Number of existing contact matches resulting of the user imports and of their imported contacts having imported the user. Matches stop being counted when the user either follows the matched contact or dismisses the match. */ - matchesCount: number; -} - -const hashSyncStatus = "syncStatus"; - -export function isSyncStatus(v: V): v is SyncStatus & V { - return is$typed(v, id, hashSyncStatus); -} - -export function validateSyncStatus(v: V): ValidationResult { - return validate(v, id, hashSyncStatus); -} - -/** A stash object to be sent via bsync representing a notification to be created. */ -export interface Notification { - $type?: "app.bsky.contact.defs#notification"; - /** The DID of who this notification comes from. */ - from: string; - /** The DID of who this notification should go to. */ - to: string; -} - -const hashNotification = "notification"; - -export function isNotification(v: V): v is Notification & V { - return is$typed(v, id, hashNotification); -} - -export function validateNotification( - v: V, -): ValidationResult { - return validate(v, id, hashNotification); -} diff --git a/lex/types/app/bsky/contact/dismissMatch.ts b/lex/types/app/bsky/contact/dismissMatch.ts deleted file mode 100644 index a266a49..0000000 --- a/lex/types/app/bsky/contact/dismissMatch.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - /** The subject's DID to dismiss the match with. */ - subject: string; -} - -export type OutputSchema = globalThis.Record; - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "InvalidDid" | "InternalError"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/contact/getMatches.ts b/lex/types/app/bsky/contact/getMatches.ts deleted file mode 100644 index baabcfb..0000000 --- a/lex/types/app/bsky/contact/getMatches.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -export type QueryParams = { - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - matches: (AppBskyActorDefs.ProfileView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "InvalidDid" | "InvalidLimit" | "InvalidCursor" | "InternalError"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/contact/getSyncStatus.ts b/lex/types/app/bsky/contact/getSyncStatus.ts deleted file mode 100644 index 03b1ac6..0000000 --- a/lex/types/app/bsky/contact/getSyncStatus.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyContactDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; -export type InputSchema = undefined; - -export interface OutputSchema { - syncStatus?: AppBskyContactDefs.SyncStatus; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "InvalidDid" | "InternalError"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/contact/importContacts.ts b/lex/types/app/bsky/contact/importContacts.ts deleted file mode 100644 index d2ade81..0000000 --- a/lex/types/app/bsky/contact/importContacts.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyContactDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - /** JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`. */ - token: string; - /** List of phone numbers in global E.164 format (e.g., '+12125550123'). Phone numbers that cannot be normalized into a valid phone number will be discarded. Should not repeat the 'phone' input used in `app.bsky.contact.verifyPhone`. */ - contacts: (string)[]; -} - -export interface OutputSchema { - /** The users that matched during import and their indexes on the input contacts, so the client can correlate with its local list. */ - matchesAndContactIndexes: (AppBskyContactDefs.MatchAndContactIndex)[]; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: - | "InvalidDid" - | "InvalidContacts" - | "TooManyContacts" - | "InvalidToken" - | "InternalError"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/contact/removeData.ts b/lex/types/app/bsky/contact/removeData.ts deleted file mode 100644 index a13f562..0000000 --- a/lex/types/app/bsky/contact/removeData.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; -export type InputSchema = globalThis.Record; -export type OutputSchema = globalThis.Record; - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "InvalidDid" | "InternalError"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/contact/sendNotification.ts b/lex/types/app/bsky/contact/sendNotification.ts deleted file mode 100644 index 44e9583..0000000 --- a/lex/types/app/bsky/contact/sendNotification.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - /** The DID of who this notification comes from. */ - from: string; - /** The DID of who this notification should go to. */ - to: string; -} - -export type OutputSchema = globalThis.Record; - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/contact/startPhoneVerification.ts b/lex/types/app/bsky/contact/startPhoneVerification.ts deleted file mode 100644 index e614f04..0000000 --- a/lex/types/app/bsky/contact/startPhoneVerification.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - /** The phone number to receive the code via SMS. */ - phone: string; -} - -export type OutputSchema = globalThis.Record; - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "RateLimitExceeded" | "InvalidDid" | "InvalidPhone" | "InternalError"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/contact/verifyPhone.ts b/lex/types/app/bsky/contact/verifyPhone.ts deleted file mode 100644 index 9079f82..0000000 --- a/lex/types/app/bsky/contact/verifyPhone.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - /** The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`. */ - phone: string; - /** The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`. */ - code: string; -} - -export interface OutputSchema { - /** JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call. */ - token: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: - | "RateLimitExceeded" - | "InvalidDid" - | "InvalidPhone" - | "InvalidCode" - | "InternalError"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/draft/createDraft.ts b/lex/types/app/bsky/draft/createDraft.ts deleted file mode 100644 index 29054e5..0000000 --- a/lex/types/app/bsky/draft/createDraft.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyDraftDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - draft: AppBskyDraftDefs.Draft; -} - -export interface OutputSchema { - /** The ID of the created draft. */ - id: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "DraftLimitReached"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/draft/defs.ts b/lex/types/app/bsky/draft/defs.ts deleted file mode 100644 index 4319025..0000000 --- a/lex/types/app/bsky/draft/defs.ts +++ /dev/null @@ -1,218 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; -import type * as AppBskyFeedPostgate from "../feed/postgate.ts"; -import type * as AppBskyFeedThreadgate from "../feed/threadgate.ts"; -import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; -import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.draft.defs"; - -/** A draft with an identifier, used to store drafts in private storage (stash). */ -export interface DraftWithId { - $type?: "app.bsky.draft.defs#draftWithId"; - /** A TID to be used as a draft identifier. */ - id: string; - draft: Draft; -} - -const hashDraftWithId = "draftWithId"; - -export function isDraftWithId(v: V): v is DraftWithId & V { - return is$typed(v, id, hashDraftWithId); -} - -export function validateDraftWithId( - v: V, -): ValidationResult { - return validate(v, id, hashDraftWithId); -} - -/** A draft containing an array of draft posts. */ -export interface Draft { - $type?: "app.bsky.draft.defs#draft"; - /** UUIDv4 identifier of the device that created this draft. */ - deviceId?: string; - /** The device and/or platform on which the draft was created. */ - deviceName?: string; - /** Array of draft posts that compose this draft. */ - posts: (DraftPost)[]; - /** Indicates human language of posts primary text content. */ - langs?: (string)[]; - /** Embedding rules for the postgates to be created when this draft is published. */ - postgateEmbeddingRules?: - ($Typed | { $type: string })[]; - /** Allow-rules for the threadgate to be created when this draft is published. */ - threadgateAllow?: ( - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string } - )[]; -} - -const hashDraft = "draft"; - -export function isDraft(v: V): v is Draft & V { - return is$typed(v, id, hashDraft); -} - -export function validateDraft(v: V): ValidationResult { - return validate(v, id, hashDraft); -} - -/** One of the posts that compose a draft. */ -export interface DraftPost { - $type?: "app.bsky.draft.defs#draftPost"; - /** The primary post content. It has a higher limit than post contents to allow storing a larger text that can later be refined into smaller posts. */ - text: string; - labels?: $Typed | { $type: string }; - embedImages?: (DraftEmbedImage)[]; - embedVideos?: (DraftEmbedVideo)[]; - embedExternals?: (DraftEmbedExternal)[]; - embedRecords?: (DraftEmbedRecord)[]; -} - -const hashDraftPost = "draftPost"; - -export function isDraftPost(v: V): v is DraftPost & V { - return is$typed(v, id, hashDraftPost); -} - -export function validateDraftPost(v: V): ValidationResult { - return validate(v, id, hashDraftPost); -} - -/** View to present drafts data to users. */ -export interface DraftView { - $type?: "app.bsky.draft.defs#draftView"; - /** A TID to be used as a draft identifier. */ - id: string; - draft: Draft; - /** The time the draft was created. */ - createdAt: string; - /** The time the draft was last updated. */ - updatedAt: string; -} - -const hashDraftView = "draftView"; - -export function isDraftView(v: V): v is DraftView & V { - return is$typed(v, id, hashDraftView); -} - -export function validateDraftView(v: V): ValidationResult { - return validate(v, id, hashDraftView); -} - -export interface DraftEmbedLocalRef { - $type?: "app.bsky.draft.defs#draftEmbedLocalRef"; - /** Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts. */ - path: string; -} - -const hashDraftEmbedLocalRef = "draftEmbedLocalRef"; - -export function isDraftEmbedLocalRef(v: V): v is DraftEmbedLocalRef & V { - return is$typed(v, id, hashDraftEmbedLocalRef); -} - -export function validateDraftEmbedLocalRef( - v: V, -): ValidationResult { - return validate(v, id, hashDraftEmbedLocalRef); -} - -export interface DraftEmbedCaption { - $type?: "app.bsky.draft.defs#draftEmbedCaption"; - lang: string; - content: string; -} - -const hashDraftEmbedCaption = "draftEmbedCaption"; - -export function isDraftEmbedCaption(v: V): v is DraftEmbedCaption & V { - return is$typed(v, id, hashDraftEmbedCaption); -} - -export function validateDraftEmbedCaption( - v: V, -): ValidationResult { - return validate(v, id, hashDraftEmbedCaption); -} - -export interface DraftEmbedImage { - $type?: "app.bsky.draft.defs#draftEmbedImage"; - localRef: DraftEmbedLocalRef; - alt?: string; -} - -const hashDraftEmbedImage = "draftEmbedImage"; - -export function isDraftEmbedImage(v: V): v is DraftEmbedImage & V { - return is$typed(v, id, hashDraftEmbedImage); -} - -export function validateDraftEmbedImage( - v: V, -): ValidationResult { - return validate(v, id, hashDraftEmbedImage); -} - -export interface DraftEmbedVideo { - $type?: "app.bsky.draft.defs#draftEmbedVideo"; - localRef: DraftEmbedLocalRef; - alt?: string; - captions?: (DraftEmbedCaption)[]; -} - -const hashDraftEmbedVideo = "draftEmbedVideo"; - -export function isDraftEmbedVideo(v: V): v is DraftEmbedVideo & V { - return is$typed(v, id, hashDraftEmbedVideo); -} - -export function validateDraftEmbedVideo( - v: V, -): ValidationResult { - return validate(v, id, hashDraftEmbedVideo); -} - -export interface DraftEmbedExternal { - $type?: "app.bsky.draft.defs#draftEmbedExternal"; - uri: string; -} - -const hashDraftEmbedExternal = "draftEmbedExternal"; - -export function isDraftEmbedExternal(v: V): v is DraftEmbedExternal & V { - return is$typed(v, id, hashDraftEmbedExternal); -} - -export function validateDraftEmbedExternal( - v: V, -): ValidationResult { - return validate(v, id, hashDraftEmbedExternal); -} - -export interface DraftEmbedRecord { - $type?: "app.bsky.draft.defs#draftEmbedRecord"; - record: ComAtprotoRepoStrongRef.Main; -} - -const hashDraftEmbedRecord = "draftEmbedRecord"; - -export function isDraftEmbedRecord(v: V): v is DraftEmbedRecord & V { - return is$typed(v, id, hashDraftEmbedRecord); -} - -export function validateDraftEmbedRecord( - v: V, -): ValidationResult { - return validate(v, id, hashDraftEmbedRecord); -} diff --git a/lex/types/app/bsky/draft/deleteDraft.ts b/lex/types/app/bsky/draft/deleteDraft.ts deleted file mode 100644 index b8b00ff..0000000 --- a/lex/types/app/bsky/draft/deleteDraft.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - id: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/draft/getDrafts.ts b/lex/types/app/bsky/draft/getDrafts.ts deleted file mode 100644 index 970aa40..0000000 --- a/lex/types/app/bsky/draft/getDrafts.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyDraftDefs from "./defs.ts"; - -export type QueryParams = { - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - drafts: (AppBskyDraftDefs.DraftView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/draft/updateDraft.ts b/lex/types/app/bsky/draft/updateDraft.ts deleted file mode 100644 index ac17602..0000000 --- a/lex/types/app/bsky/draft/updateDraft.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyDraftDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - draft: AppBskyDraftDefs.DraftWithId; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/embed/defs.ts b/lex/types/app/bsky/embed/defs.ts deleted file mode 100644 index 74e9432..0000000 --- a/lex/types/app/bsky/embed/defs.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.embed.defs"; - -/** width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. */ -export interface AspectRatio { - $type?: "app.bsky.embed.defs#aspectRatio"; - width: number; - height: number; -} - -const hashAspectRatio = "aspectRatio"; - -export function isAspectRatio(v: V): v is AspectRatio & V { - return is$typed(v, id, hashAspectRatio); -} - -export function validateAspectRatio( - v: V, -): ValidationResult { - return validate(v, id, hashAspectRatio); -} diff --git a/lex/types/app/bsky/embed/external.ts b/lex/types/app/bsky/embed/external.ts deleted file mode 100644 index 850e8a8..0000000 --- a/lex/types/app/bsky/embed/external.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { BlobRef } from "@atp/lexicon"; -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.embed.external"; - -/** A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post). */ -export interface Main { - $type?: "app.bsky.embed.external"; - external: External; -} - -const hashMain = "main"; - -export function isMain(v: V): v is Main & V { - return is$typed(v, id, hashMain); -} - -export function validateMain(v: V): ValidationResult
{ - return validate
(v, id, hashMain); -} - -export interface External { - $type?: "app.bsky.embed.external#external"; - uri: string; - title: string; - description: string; - thumb?: BlobRef; -} - -const hashExternal = "external"; - -export function isExternal(v: V): v is External & V { - return is$typed(v, id, hashExternal); -} - -export function validateExternal(v: V): ValidationResult { - return validate(v, id, hashExternal); -} - -export interface View { - $type?: "app.bsky.embed.external#view"; - external: ViewExternal; -} - -const hashView = "view"; - -export function isView(v: V): v is View & V { - return is$typed(v, id, hashView); -} - -export function validateView(v: V): ValidationResult { - return validate(v, id, hashView); -} - -export interface ViewExternal { - $type?: "app.bsky.embed.external#viewExternal"; - uri: string; - title: string; - description: string; - thumb?: string; -} - -const hashViewExternal = "viewExternal"; - -export function isViewExternal(v: V): v is ViewExternal & V { - return is$typed(v, id, hashViewExternal); -} - -export function validateViewExternal( - v: V, -): ValidationResult { - return validate(v, id, hashViewExternal); -} diff --git a/lex/types/app/bsky/embed/images.ts b/lex/types/app/bsky/embed/images.ts deleted file mode 100644 index 5c210c5..0000000 --- a/lex/types/app/bsky/embed/images.ts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { BlobRef } from "@atp/lexicon"; -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as AppBskyEmbedDefs from "./defs.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.embed.images"; - -export interface Main { - $type?: "app.bsky.embed.images"; - images: (Image)[]; -} - -const hashMain = "main"; - -export function isMain(v: V): v is Main & V { - return is$typed(v, id, hashMain); -} - -export function validateMain(v: V): ValidationResult
{ - return validate
(v, id, hashMain); -} - -export interface Image { - $type?: "app.bsky.embed.images#image"; - /** The raw image file. May be up to 2 MB, formerly limited to 1 MB. */ - image: BlobRef; - /** Alt text description of the image, for accessibility. */ - alt: string; - aspectRatio?: AppBskyEmbedDefs.AspectRatio; -} - -const hashImage = "image"; - -export function isImage(v: V): v is Image & V { - return is$typed(v, id, hashImage); -} - -export function validateImage(v: V): ValidationResult { - return validate(v, id, hashImage); -} - -export interface View { - $type?: "app.bsky.embed.images#view"; - images: (ViewImage)[]; -} - -const hashView = "view"; - -export function isView(v: V): v is View & V { - return is$typed(v, id, hashView); -} - -export function validateView(v: V): ValidationResult { - return validate(v, id, hashView); -} - -export interface ViewImage { - $type?: "app.bsky.embed.images#viewImage"; - /** Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. */ - thumb: string; - /** Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. */ - fullsize: string; - /** Alt text description of the image, for accessibility. */ - alt: string; - aspectRatio?: AppBskyEmbedDefs.AspectRatio; -} - -const hashViewImage = "viewImage"; - -export function isViewImage(v: V): v is ViewImage & V { - return is$typed(v, id, hashViewImage); -} - -export function validateViewImage(v: V): ValidationResult { - return validate(v, id, hashViewImage); -} diff --git a/lex/types/app/bsky/embed/record.ts b/lex/types/app/bsky/embed/record.ts deleted file mode 100644 index b926272..0000000 --- a/lex/types/app/bsky/embed/record.ts +++ /dev/null @@ -1,146 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -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"; -import type * as AppBskyLabelerDefs from "../labeler/defs.ts"; -import type * as AppBskyActorDefs from "../actor/defs.ts"; -import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; -import type * as AppBskyEmbedImages from "./images.ts"; -import type * as AppBskyEmbedVideo from "./video.ts"; -import type * as AppBskyEmbedExternal from "./external.ts"; -import type * as AppBskyEmbedRecordWithMedia from "./recordWithMedia.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.embed.record"; - -export interface Main { - $type?: "app.bsky.embed.record"; - record: ComAtprotoRepoStrongRef.Main; -} - -const hashMain = "main"; - -export function isMain(v: V): v is Main & V { - return is$typed(v, id, hashMain); -} - -export function validateMain(v: V): ValidationResult
{ - return validate
(v, id, hashMain); -} - -export interface View { - $type?: "app.bsky.embed.record#view"; - record: - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string }; -} - -const hashView = "view"; - -export function isView(v: V): v is View & V { - return is$typed(v, id, hashView); -} - -export function validateView(v: V): ValidationResult { - return validate(v, id, hashView); -} - -export interface ViewRecord { - $type?: "app.bsky.embed.record#viewRecord"; - uri: string; - cid: string; - author: AppBskyActorDefs.ProfileViewBasic; - /** The record data itself. */ - value: { [_ in string]: unknown }; - labels?: (ComAtprotoLabelDefs.Label)[]; - replyCount?: number; - repostCount?: number; - likeCount?: number; - quoteCount?: number; - embeds?: ( - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string } - )[]; - indexedAt: string; -} - -const hashViewRecord = "viewRecord"; - -export function isViewRecord(v: V): v is ViewRecord & V { - return is$typed(v, id, hashViewRecord); -} - -export function validateViewRecord(v: V): ValidationResult { - return validate(v, id, hashViewRecord); -} - -export interface ViewNotFound { - $type?: "app.bsky.embed.record#viewNotFound"; - uri: string; - notFound: true; -} - -const hashViewNotFound = "viewNotFound"; - -export function isViewNotFound(v: V): v is ViewNotFound & V { - return is$typed(v, id, hashViewNotFound); -} - -export function validateViewNotFound( - v: V, -): ValidationResult { - return validate(v, id, hashViewNotFound); -} - -export interface ViewBlocked { - $type?: "app.bsky.embed.record#viewBlocked"; - uri: string; - blocked: true; - author: AppBskyFeedDefs.BlockedAuthor; -} - -const hashViewBlocked = "viewBlocked"; - -export function isViewBlocked(v: V): v is ViewBlocked & V { - return is$typed(v, id, hashViewBlocked); -} - -export function validateViewBlocked( - v: V, -): ValidationResult { - return validate(v, id, hashViewBlocked); -} - -export interface ViewDetached { - $type?: "app.bsky.embed.record#viewDetached"; - uri: string; - detached: true; -} - -const hashViewDetached = "viewDetached"; - -export function isViewDetached(v: V): v is ViewDetached & V { - return is$typed(v, id, hashViewDetached); -} - -export function validateViewDetached( - v: V, -): ValidationResult { - return validate(v, id, hashViewDetached); -} diff --git a/lex/types/app/bsky/embed/recordWithMedia.ts b/lex/types/app/bsky/embed/recordWithMedia.ts deleted file mode 100644 index 16240cd..0000000 --- a/lex/types/app/bsky/embed/recordWithMedia.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -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"; -import type * as AppBskyEmbedExternal from "./external.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.embed.recordWithMedia"; - -export interface Main { - $type?: "app.bsky.embed.recordWithMedia"; - record: AppBskyEmbedRecord.Main; - media: - | $Typed - | $Typed - | $Typed - | { $type: string }; -} - -const hashMain = "main"; - -export function isMain(v: V): v is Main & V { - return is$typed(v, id, hashMain); -} - -export function validateMain(v: V): ValidationResult
{ - return validate
(v, id, hashMain); -} - -export interface View { - $type?: "app.bsky.embed.recordWithMedia#view"; - record: AppBskyEmbedRecord.View; - media: - | $Typed - | $Typed - | $Typed - | { $type: string }; -} - -const hashView = "view"; - -export function isView(v: V): v is View & V { - return is$typed(v, id, hashView); -} - -export function validateView(v: V): ValidationResult { - return validate(v, id, hashView); -} diff --git a/lex/types/app/bsky/embed/video.ts b/lex/types/app/bsky/embed/video.ts deleted file mode 100644 index 64a7c42..0000000 --- a/lex/types/app/bsky/embed/video.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { BlobRef } from "@atp/lexicon"; -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as AppBskyEmbedDefs from "./defs.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.embed.video"; - -export interface Main { - $type?: "app.bsky.embed.video"; - /** The mp4 video file. May be up to 100mb, formerly limited to 50mb. */ - video: BlobRef; - captions?: (Caption)[]; - /** Alt text description of the video, for accessibility. */ - alt?: string; - aspectRatio?: AppBskyEmbedDefs.AspectRatio; - /** A hint to the client about how to present the video. */ - presentation?: - | "default" - | "gif" - | (string & globalThis.Record); -} - -const hashMain = "main"; - -export function isMain(v: V): v is Main & V { - return is$typed(v, id, hashMain); -} - -export function validateMain(v: V): ValidationResult
{ - return validate
(v, id, hashMain); -} - -export interface Caption { - $type?: "app.bsky.embed.video#caption"; - lang: string; - file: BlobRef; -} - -const hashCaption = "caption"; - -export function isCaption(v: V): v is Caption & V { - return is$typed(v, id, hashCaption); -} - -export function validateCaption(v: V): ValidationResult { - return validate(v, id, hashCaption); -} - -export interface View { - $type?: "app.bsky.embed.video#view"; - cid: string; - playlist: string; - thumbnail?: string; - alt?: string; - aspectRatio?: AppBskyEmbedDefs.AspectRatio; - /** A hint to the client about how to present the video. */ - presentation?: - | "default" - | "gif" - | (string & globalThis.Record); -} - -const hashView = "view"; - -export function isView(v: V): v is View & V { - return is$typed(v, id, hashView); -} - -export function validateView(v: V): ValidationResult { - return validate(v, id, hashView); -} diff --git a/lex/types/app/bsky/feed/defs.ts b/lex/types/app/bsky/feed/defs.ts deleted file mode 100644 index a67a40f..0000000 --- a/lex/types/app/bsky/feed/defs.ts +++ /dev/null @@ -1,445 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -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"; -import type * as AppBskyEmbedExternal from "../embed/external.ts"; -import type * as AppBskyEmbedRecord from "../embed/record.ts"; -import type * as AppBskyEmbedRecordWithMedia from "../embed/recordWithMedia.ts"; -import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; -import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; -import type * as AppBskyGraphDefs from "../graph/defs.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.feed.defs"; - -export interface PostView { - $type?: "app.bsky.feed.defs#postView"; - uri: string; - cid: string; - author: AppBskyActorDefs.ProfileViewBasic; - record: { [_ in string]: unknown }; - embed?: - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string }; - bookmarkCount?: number; - replyCount?: number; - repostCount?: number; - likeCount?: number; - quoteCount?: number; - indexedAt: string; - viewer?: ViewerState; - labels?: (ComAtprotoLabelDefs.Label)[]; - threadgate?: ThreadgateView; - /** Debug information for internal development */ - debug?: { [_ in string]: unknown }; -} - -const hashPostView = "postView"; - -export function isPostView(v: V): v is PostView & V { - return is$typed(v, id, hashPostView); -} - -export function validatePostView(v: V): ValidationResult { - return validate(v, id, hashPostView); -} - -/** Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests. */ -export interface ViewerState { - $type?: "app.bsky.feed.defs#viewerState"; - repost?: string; - like?: string; - bookmarked?: boolean; - threadMuted?: boolean; - replyDisabled?: boolean; - embeddingDisabled?: boolean; - pinned?: boolean; -} - -const hashViewerState = "viewerState"; - -export function isViewerState(v: V): v is ViewerState & V { - return is$typed(v, id, hashViewerState); -} - -export function validateViewerState( - v: V, -): ValidationResult { - return validate(v, id, hashViewerState); -} - -/** Metadata about this post within the context of the thread it is in. */ -export interface ThreadContext { - $type?: "app.bsky.feed.defs#threadContext"; - rootAuthorLike?: string; -} - -const hashThreadContext = "threadContext"; - -export function isThreadContext(v: V): v is ThreadContext & V { - return is$typed(v, id, hashThreadContext); -} - -export function validateThreadContext( - v: V, -): ValidationResult { - return validate(v, id, hashThreadContext); -} - -export interface FeedViewPost { - $type?: "app.bsky.feed.defs#feedViewPost"; - post: PostView; - reply?: ReplyRef; - reason?: $Typed | $Typed | { $type: string }; - /** Context provided by feed generator that may be passed back alongside interactions. */ - feedContext?: string; - /** Unique identifier per request that may be passed back alongside interactions. */ - reqId?: string; -} - -const hashFeedViewPost = "feedViewPost"; - -export function isFeedViewPost(v: V): v is FeedViewPost & V { - return is$typed(v, id, hashFeedViewPost); -} - -export function validateFeedViewPost( - v: V, -): ValidationResult { - return validate(v, id, hashFeedViewPost); -} - -export interface ReplyRef { - $type?: "app.bsky.feed.defs#replyRef"; - root: $Typed | $Typed | $Typed | { - $type: string; - }; - parent: $Typed | $Typed | $Typed | { - $type: string; - }; - grandparentAuthor?: AppBskyActorDefs.ProfileViewBasic; -} - -const hashReplyRef = "replyRef"; - -export function isReplyRef(v: V): v is ReplyRef & V { - return is$typed(v, id, hashReplyRef); -} - -export function validateReplyRef(v: V): ValidationResult { - return validate(v, id, hashReplyRef); -} - -export interface ReasonRepost { - $type?: "app.bsky.feed.defs#reasonRepost"; - by: AppBskyActorDefs.ProfileViewBasic; - uri?: string; - cid?: string; - indexedAt: string; -} - -const hashReasonRepost = "reasonRepost"; - -export function isReasonRepost(v: V): v is ReasonRepost & V { - return is$typed(v, id, hashReasonRepost); -} - -export function validateReasonRepost( - v: V, -): ValidationResult { - return validate(v, id, hashReasonRepost); -} - -export interface ReasonPin { - $type?: "app.bsky.feed.defs#reasonPin"; -} - -const hashReasonPin = "reasonPin"; - -export function isReasonPin(v: V): v is ReasonPin & V { - return is$typed(v, id, hashReasonPin); -} - -export function validateReasonPin(v: V): ValidationResult { - return validate(v, id, hashReasonPin); -} - -export interface ThreadViewPost { - $type?: "app.bsky.feed.defs#threadViewPost"; - post: PostView; - parent?: - | $Typed - | $Typed - | $Typed - | { $type: string }; - replies?: - ($Typed | $Typed | $Typed | { - $type: string; - })[]; - threadContext?: ThreadContext; -} - -const hashThreadViewPost = "threadViewPost"; - -export function isThreadViewPost(v: V): v is ThreadViewPost & V { - return is$typed(v, id, hashThreadViewPost); -} - -export function validateThreadViewPost( - v: V, -): ValidationResult { - return validate(v, id, hashThreadViewPost); -} - -export interface NotFoundPost { - $type?: "app.bsky.feed.defs#notFoundPost"; - uri: string; - notFound: true; -} - -const hashNotFoundPost = "notFoundPost"; - -export function isNotFoundPost(v: V): v is NotFoundPost & V { - return is$typed(v, id, hashNotFoundPost); -} - -export function validateNotFoundPost( - v: V, -): ValidationResult { - return validate(v, id, hashNotFoundPost); -} - -export interface BlockedPost { - $type?: "app.bsky.feed.defs#blockedPost"; - uri: string; - blocked: true; - author: BlockedAuthor; -} - -const hashBlockedPost = "blockedPost"; - -export function isBlockedPost(v: V): v is BlockedPost & V { - return is$typed(v, id, hashBlockedPost); -} - -export function validateBlockedPost( - v: V, -): ValidationResult { - return validate(v, id, hashBlockedPost); -} - -export interface BlockedAuthor { - $type?: "app.bsky.feed.defs#blockedAuthor"; - did: string; - viewer?: AppBskyActorDefs.ViewerState; -} - -const hashBlockedAuthor = "blockedAuthor"; - -export function isBlockedAuthor(v: V): v is BlockedAuthor & V { - return is$typed(v, id, hashBlockedAuthor); -} - -export function validateBlockedAuthor( - v: V, -): ValidationResult { - return validate(v, id, hashBlockedAuthor); -} - -export interface GeneratorView { - $type?: "app.bsky.feed.defs#generatorView"; - uri: string; - cid: string; - did: string; - creator: AppBskyActorDefs.ProfileView; - displayName: string; - description?: string; - descriptionFacets?: (AppBskyRichtextFacet.Main)[]; - avatar?: string; - likeCount?: number; - acceptsInteractions?: boolean; - labels?: (ComAtprotoLabelDefs.Label)[]; - viewer?: GeneratorViewerState; - contentMode?: - | "app.bsky.feed.defs#contentModeUnspecified" - | "app.bsky.feed.defs#contentModeVideo" - | (string & globalThis.Record); - indexedAt: string; -} - -const hashGeneratorView = "generatorView"; - -export function isGeneratorView(v: V): v is GeneratorView & V { - return is$typed(v, id, hashGeneratorView); -} - -export function validateGeneratorView( - v: V, -): ValidationResult { - return validate(v, id, hashGeneratorView); -} - -export interface GeneratorViewerState { - $type?: "app.bsky.feed.defs#generatorViewerState"; - like?: string; -} - -const hashGeneratorViewerState = "generatorViewerState"; - -export function isGeneratorViewerState(v: V): v is GeneratorViewerState & V { - return is$typed(v, id, hashGeneratorViewerState); -} - -export function validateGeneratorViewerState( - v: V, -): ValidationResult { - return validate(v, id, hashGeneratorViewerState); -} - -export interface SkeletonFeedPost { - $type?: "app.bsky.feed.defs#skeletonFeedPost"; - post: string; - reason?: $Typed | $Typed | { - $type: string; - }; - /** Context that will be passed through to client and may be passed to feed generator back alongside interactions. */ - feedContext?: string; -} - -const hashSkeletonFeedPost = "skeletonFeedPost"; - -export function isSkeletonFeedPost(v: V): v is SkeletonFeedPost & V { - return is$typed(v, id, hashSkeletonFeedPost); -} - -export function validateSkeletonFeedPost( - v: V, -): ValidationResult { - return validate(v, id, hashSkeletonFeedPost); -} - -export interface SkeletonReasonRepost { - $type?: "app.bsky.feed.defs#skeletonReasonRepost"; - repost: string; -} - -const hashSkeletonReasonRepost = "skeletonReasonRepost"; - -export function isSkeletonReasonRepost(v: V): v is SkeletonReasonRepost & V { - return is$typed(v, id, hashSkeletonReasonRepost); -} - -export function validateSkeletonReasonRepost( - v: V, -): ValidationResult { - return validate(v, id, hashSkeletonReasonRepost); -} - -export interface SkeletonReasonPin { - $type?: "app.bsky.feed.defs#skeletonReasonPin"; -} - -const hashSkeletonReasonPin = "skeletonReasonPin"; - -export function isSkeletonReasonPin(v: V): v is SkeletonReasonPin & V { - return is$typed(v, id, hashSkeletonReasonPin); -} - -export function validateSkeletonReasonPin( - v: V, -): ValidationResult { - return validate(v, id, hashSkeletonReasonPin); -} - -export interface ThreadgateView { - $type?: "app.bsky.feed.defs#threadgateView"; - uri?: string; - cid?: string; - record?: { [_ in string]: unknown }; - lists?: (AppBskyGraphDefs.ListViewBasic)[]; -} - -const hashThreadgateView = "threadgateView"; - -export function isThreadgateView(v: V): v is ThreadgateView & V { - return is$typed(v, id, hashThreadgateView); -} - -export function validateThreadgateView( - v: V, -): ValidationResult { - return validate(v, id, hashThreadgateView); -} - -export interface Interaction { - $type?: "app.bsky.feed.defs#interaction"; - item?: string; - event?: - | "app.bsky.feed.defs#requestLess" - | "app.bsky.feed.defs#requestMore" - | "app.bsky.feed.defs#clickthroughItem" - | "app.bsky.feed.defs#clickthroughAuthor" - | "app.bsky.feed.defs#clickthroughReposter" - | "app.bsky.feed.defs#clickthroughEmbed" - | "app.bsky.feed.defs#interactionSeen" - | "app.bsky.feed.defs#interactionLike" - | "app.bsky.feed.defs#interactionRepost" - | "app.bsky.feed.defs#interactionReply" - | "app.bsky.feed.defs#interactionQuote" - | "app.bsky.feed.defs#interactionShare" - | (string & globalThis.Record); - /** Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. */ - feedContext?: string; - /** Unique identifier per request that may be passed back alongside interactions. */ - reqId?: string; -} - -const hashInteraction = "interaction"; - -export function isInteraction(v: V): v is Interaction & V { - return is$typed(v, id, hashInteraction); -} - -export function validateInteraction( - v: V, -): ValidationResult { - return validate(v, id, hashInteraction); -} - -/** Request that less content like the given feed item be shown in the feed */ -export const REQUESTLESS: string = `${id}#requestLess`; -/** Request that more content like the given feed item be shown in the feed */ -export const REQUESTMORE: string = `${id}#requestMore`; -/** User clicked through to the feed item */ -export const CLICKTHROUGHITEM: string = `${id}#clickthroughItem`; -/** User clicked through to the author of the feed item */ -export const CLICKTHROUGHAUTHOR: string = `${id}#clickthroughAuthor`; -/** User clicked through to the reposter of the feed item */ -export const CLICKTHROUGHREPOSTER: string = `${id}#clickthroughReposter`; -/** User clicked through to the embedded content of the feed item */ -export const CLICKTHROUGHEMBED: string = `${id}#clickthroughEmbed`; -/** Declares the feed generator returns any types of posts. */ -export const CONTENTMODEUNSPECIFIED: string = `${id}#contentModeUnspecified`; -/** Declares the feed generator returns posts containing app.bsky.embed.video embeds. */ -export const CONTENTMODEVIDEO: string = `${id}#contentModeVideo`; -/** Feed item was seen by user */ -export const INTERACTIONSEEN: string = `${id}#interactionSeen`; -/** User liked the feed item */ -export const INTERACTIONLIKE: string = `${id}#interactionLike`; -/** User reposted the feed item */ -export const INTERACTIONREPOST: string = `${id}#interactionRepost`; -/** User replied to the feed item */ -export const INTERACTIONREPLY: string = `${id}#interactionReply`; -/** User quoted the feed item */ -export const INTERACTIONQUOTE: string = `${id}#interactionQuote`; -/** User shared the feed item */ -export const INTERACTIONSHARE: string = `${id}#interactionShare`; diff --git a/lex/types/app/bsky/feed/describeFeedGenerator.ts b/lex/types/app/bsky/feed/describeFeedGenerator.ts deleted file mode 100644 index 2c29079..0000000 --- a/lex/types/app/bsky/feed/describeFeedGenerator.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.feed.describeFeedGenerator"; - -export type QueryParams = globalThis.Record; -export type InputSchema = undefined; - -export interface OutputSchema { - did: string; - feeds: (Feed)[]; - links?: Links; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; - -export interface Feed { - $type?: "app.bsky.feed.describeFeedGenerator#feed"; - uri: string; -} - -const hashFeed = "feed"; - -export function isFeed(v: V): v is Feed & V { - return is$typed(v, id, hashFeed); -} - -export function validateFeed(v: V): ValidationResult { - return validate(v, id, hashFeed); -} - -export interface Links { - $type?: "app.bsky.feed.describeFeedGenerator#links"; - privacyPolicy?: string; - termsOfService?: string; -} - -const hashLinks = "links"; - -export function isLinks(v: V): v is Links & V { - return is$typed(v, id, hashLinks); -} - -export function validateLinks(v: V): ValidationResult { - return validate(v, id, hashLinks); -} diff --git a/lex/types/app/bsky/feed/generator.ts b/lex/types/app/bsky/feed/generator.ts deleted file mode 100644 index d3d4d90..0000000 --- a/lex/types/app/bsky/feed/generator.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { BlobRef } from "@atp/lexicon"; -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -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"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.feed.generator"; - -export interface Record { - $type: "app.bsky.feed.generator"; - did: string; - displayName: string; - description?: string; - descriptionFacets?: (AppBskyRichtextFacet.Main)[]; - avatar?: BlobRef; - /** Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions */ - acceptsInteractions?: boolean; - labels?: $Typed | { $type: string }; - contentMode?: - | "app.bsky.feed.defs#contentModeUnspecified" - | "app.bsky.feed.defs#contentModeVideo" - | (string & globalThis.Record); - createdAt: string; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - return validate(v, id, hashRecord, true); -} - -export type Main = Record; diff --git a/lex/types/app/bsky/feed/getActorFeeds.ts b/lex/types/app/bsky/feed/getActorFeeds.ts deleted file mode 100644 index c5c0f25..0000000 --- a/lex/types/app/bsky/feed/getActorFeeds.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = { - actor: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - feeds: (AppBskyFeedDefs.GeneratorView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getActorLikes.ts b/lex/types/app/bsky/feed/getActorLikes.ts deleted file mode 100644 index 6b94471..0000000 --- a/lex/types/app/bsky/feed/getActorLikes.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = { - actor: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - feed: (AppBskyFeedDefs.FeedViewPost)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "BlockedActor" | "BlockedByActor"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getAuthorFeed.ts b/lex/types/app/bsky/feed/getAuthorFeed.ts deleted file mode 100644 index dcf6766..0000000 --- a/lex/types/app/bsky/feed/getAuthorFeed.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = { - actor: string; - limit: number; - cursor?: string; - /** Combinations of post/repost types to include in response. */ - filter: - | "posts_with_replies" - | "posts_no_replies" - | "posts_with_media" - | "posts_and_author_threads" - | "posts_with_video" - | (string & globalThis.Record); - includePins: boolean; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - feed: (AppBskyFeedDefs.FeedViewPost)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "BlockedActor" | "BlockedByActor"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getFeed.ts b/lex/types/app/bsky/feed/getFeed.ts deleted file mode 100644 index cb01604..0000000 --- a/lex/types/app/bsky/feed/getFeed.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = { - feed: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - feed: (AppBskyFeedDefs.FeedViewPost)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "UnknownFeed"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getFeedGenerator.ts b/lex/types/app/bsky/feed/getFeedGenerator.ts deleted file mode 100644 index a30881d..0000000 --- a/lex/types/app/bsky/feed/getFeedGenerator.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = { - /** AT-URI of the feed generator record. */ - feed: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - view: AppBskyFeedDefs.GeneratorView; - /** Indicates whether the feed generator service has been online recently, or else seems to be inactive. */ - isOnline: boolean; - /** Indicates whether the feed generator service is compatible with the record declaration. */ - isValid: boolean; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getFeedGenerators.ts b/lex/types/app/bsky/feed/getFeedGenerators.ts deleted file mode 100644 index cdd32ff..0000000 --- a/lex/types/app/bsky/feed/getFeedGenerators.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = { - feeds: string[]; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - feeds: (AppBskyFeedDefs.GeneratorView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getFeedSkeleton.ts b/lex/types/app/bsky/feed/getFeedSkeleton.ts deleted file mode 100644 index 42658e7..0000000 --- a/lex/types/app/bsky/feed/getFeedSkeleton.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = { - /** Reference to feed generator record describing the specific feed being requested. */ - feed: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - feed: (AppBskyFeedDefs.SkeletonFeedPost)[]; - /** Unique identifier per request that may be passed back alongside interactions. */ - reqId?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "UnknownFeed"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getLikes.ts b/lex/types/app/bsky/feed/getLikes.ts deleted file mode 100644 index 0b4cebc..0000000 --- a/lex/types/app/bsky/feed/getLikes.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.feed.getLikes"; - -export type QueryParams = { - /** AT-URI of the subject (eg, a post record). */ - uri: string; - /** CID of the subject record (aka, specific version of record), to filter likes. */ - cid?: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - uri: string; - cid?: string; - cursor?: string; - likes: (Like)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; - -export interface Like { - $type?: "app.bsky.feed.getLikes#like"; - indexedAt: string; - createdAt: string; - actor: AppBskyActorDefs.ProfileView; -} - -const hashLike = "like"; - -export function isLike(v: V): v is Like & V { - return is$typed(v, id, hashLike); -} - -export function validateLike(v: V): ValidationResult { - return validate(v, id, hashLike); -} diff --git a/lex/types/app/bsky/feed/getListFeed.ts b/lex/types/app/bsky/feed/getListFeed.ts deleted file mode 100644 index f312f2e..0000000 --- a/lex/types/app/bsky/feed/getListFeed.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = { - /** Reference (AT-URI) to the list record. */ - list: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - feed: (AppBskyFeedDefs.FeedViewPost)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "UnknownList"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getPostThread.ts b/lex/types/app/bsky/feed/getPostThread.ts deleted file mode 100644 index 62cd67b..0000000 --- a/lex/types/app/bsky/feed/getPostThread.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { $Typed } from "../../../../util.ts"; -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = { - /** Reference (AT-URI) to post record. */ - uri: string; - /** How many levels of reply depth should be included in response. */ - depth: number; - /** How many levels of parent (and grandparent, etc) post to include. */ - parentHeight: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - thread: - | $Typed - | $Typed - | $Typed - | { $type: string }; - threadgate?: AppBskyFeedDefs.ThreadgateView; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "NotFound"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getPosts.ts b/lex/types/app/bsky/feed/getPosts.ts deleted file mode 100644 index 4ef3ff7..0000000 --- a/lex/types/app/bsky/feed/getPosts.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = { - /** List of post AT-URIs to return hydrated views for. */ - uris: string[]; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - posts: (AppBskyFeedDefs.PostView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getQuotes.ts b/lex/types/app/bsky/feed/getQuotes.ts deleted file mode 100644 index f1e801e..0000000 --- a/lex/types/app/bsky/feed/getQuotes.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = { - /** Reference (AT-URI) of post record */ - uri: string; - /** If supplied, filters to quotes of specific version (by CID) of the post record. */ - cid?: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - uri: string; - cid?: string; - cursor?: string; - posts: (AppBskyFeedDefs.PostView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getRepostedBy.ts b/lex/types/app/bsky/feed/getRepostedBy.ts deleted file mode 100644 index 9522645..0000000 --- a/lex/types/app/bsky/feed/getRepostedBy.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -export type QueryParams = { - /** Reference (AT-URI) of post record */ - uri: string; - /** If supplied, filters to reposts of specific version (by CID) of the post record. */ - cid?: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - uri: string; - cid?: string; - cursor?: string; - repostedBy: (AppBskyActorDefs.ProfileView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getSuggestedFeeds.ts b/lex/types/app/bsky/feed/getSuggestedFeeds.ts deleted file mode 100644 index da4b67b..0000000 --- a/lex/types/app/bsky/feed/getSuggestedFeeds.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = { - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - feeds: (AppBskyFeedDefs.GeneratorView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getTimeline.ts b/lex/types/app/bsky/feed/getTimeline.ts deleted file mode 100644 index 5f62fcb..0000000 --- a/lex/types/app/bsky/feed/getTimeline.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = { - /** Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism. */ - algorithm?: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - feed: (AppBskyFeedDefs.FeedViewPost)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/like.ts b/lex/types/app/bsky/feed/like.ts deleted file mode 100644 index 08e5929..0000000 --- a/lex/types/app/bsky/feed/like.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.feed.like"; - -export interface Record { - $type: "app.bsky.feed.like"; - subject: ComAtprotoRepoStrongRef.Main; - createdAt: string; - via?: ComAtprotoRepoStrongRef.Main; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - 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 deleted file mode 100644 index a79b432..0000000 --- a/lex/types/app/bsky/feed/post.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -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"; -import type * as AppBskyEmbedExternal from "../embed/external.ts"; -import type * as AppBskyEmbedRecord from "../embed/record.ts"; -import type * as AppBskyEmbedRecordWithMedia from "../embed/recordWithMedia.ts"; -import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; -import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.feed.post"; - -export interface Record { - $type: "app.bsky.feed.post"; - /** The primary post content. May be an empty string, if there are embeds. */ - text: string; - /** DEPRECATED: replaced by app.bsky.richtext.facet. */ - entities?: (Entity)[]; - /** Annotations of text (mentions, URLs, hashtags, etc) */ - facets?: (AppBskyRichtextFacet.Main)[]; - reply?: ReplyRef; - embed?: - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string }; - /** Indicates human language of post primary text content. */ - langs?: (string)[]; - labels?: $Typed | { $type: string }; - /** Additional hashtags, in addition to any included in post text and facets. */ - tags?: (string)[]; - /** Client-declared timestamp when this post was originally created. */ - createdAt: string; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - return validate(v, id, hashRecord, true); -} - -export type Main = Record; - -export interface ReplyRef { - $type?: "app.bsky.feed.post#replyRef"; - root: ComAtprotoRepoStrongRef.Main; - parent: ComAtprotoRepoStrongRef.Main; -} - -const hashReplyRef = "replyRef"; - -export function isReplyRef(v: V): v is ReplyRef & V { - return is$typed(v, id, hashReplyRef); -} - -export function validateReplyRef(v: V): ValidationResult { - return validate(v, id, hashReplyRef); -} - -/** Deprecated: use facets instead. */ -export interface Entity { - $type?: "app.bsky.feed.post#entity"; - index: TextSlice; - /** Expected values are 'mention' and 'link'. */ - type: string; - value: string; -} - -const hashEntity = "entity"; - -export function isEntity(v: V): v is Entity & V { - return is$typed(v, id, hashEntity); -} - -export function validateEntity(v: V): ValidationResult { - return validate(v, id, hashEntity); -} - -/** Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings. */ -export interface TextSlice { - $type?: "app.bsky.feed.post#textSlice"; - start: number; - end: number; -} - -const hashTextSlice = "textSlice"; - -export function isTextSlice(v: V): v is TextSlice & V { - return is$typed(v, id, hashTextSlice); -} - -export function validateTextSlice(v: V): ValidationResult { - return validate(v, id, hashTextSlice); -} diff --git a/lex/types/app/bsky/feed/postgate.ts b/lex/types/app/bsky/feed/postgate.ts deleted file mode 100644 index bb1e669..0000000 --- a/lex/types/app/bsky/feed/postgate.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.feed.postgate"; - -export interface Record { - $type: "app.bsky.feed.postgate"; - createdAt: string; - /** Reference (AT-URI) to the post record. */ - post: string; - /** List of AT-URIs embedding this post that the author has detached from. */ - detachedEmbeddingUris?: (string)[]; - /** List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed. */ - embeddingRules?: ($Typed | { $type: string })[]; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - return validate(v, id, hashRecord, true); -} - -export type Main = Record; - -/** Disables embedding of this post. */ -export interface DisableRule { - $type?: "app.bsky.feed.postgate#disableRule"; -} - -const hashDisableRule = "disableRule"; - -export function isDisableRule(v: V): v is DisableRule & V { - return is$typed(v, id, hashDisableRule); -} - -export function validateDisableRule( - v: V, -): ValidationResult { - return validate(v, id, hashDisableRule); -} diff --git a/lex/types/app/bsky/feed/repost.ts b/lex/types/app/bsky/feed/repost.ts deleted file mode 100644 index f602573..0000000 --- a/lex/types/app/bsky/feed/repost.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.feed.repost"; - -export interface Record { - $type: "app.bsky.feed.repost"; - subject: ComAtprotoRepoStrongRef.Main; - createdAt: string; - via?: ComAtprotoRepoStrongRef.Main; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - return validate(v, id, hashRecord, true); -} - -export type Main = Record; diff --git a/lex/types/app/bsky/feed/searchPosts.ts b/lex/types/app/bsky/feed/searchPosts.ts deleted file mode 100644 index c09f87f..0000000 --- a/lex/types/app/bsky/feed/searchPosts.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = { - /** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */ - q: string; - /** Specifies the ranking order of results. */ - sort: "top" | "latest" | (string & globalThis.Record); - /** Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD). */ - since?: string; - /** Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). */ - until?: string; - /** Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. */ - mentions?: string; - /** Filter to posts by the given account. Handles are resolved to DID before query-time. */ - author?: string; - /** Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. */ - lang?: string; - /** Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. */ - domain?: string; - /** Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. */ - url?: string; - /** Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. */ - tag?: string[]; - limit: number; - /** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */ - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ - hitsTotal?: number; - posts: (AppBskyFeedDefs.PostView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "BadQueryString"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/sendInteractions.ts b/lex/types/app/bsky/feed/sendInteractions.ts deleted file mode 100644 index 0460cab..0000000 --- a/lex/types/app/bsky/feed/sendInteractions.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - feed?: string; - interactions: (AppBskyFeedDefs.Interaction)[]; -} - -export type OutputSchema = globalThis.Record; - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/threadgate.ts b/lex/types/app/bsky/feed/threadgate.ts deleted file mode 100644 index 2d928cf..0000000 --- a/lex/types/app/bsky/feed/threadgate.ts +++ /dev/null @@ -1,106 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.feed.threadgate"; - -export interface Record { - $type: "app.bsky.feed.threadgate"; - /** Reference (AT-URI) to the post record. */ - post: string; - /** List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply. */ - allow?: ( - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string } - )[]; - createdAt: string; - /** List of hidden reply URIs. */ - hiddenReplies?: (string)[]; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - 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"; -} - -const hashMentionRule = "mentionRule"; - -export function isMentionRule(v: V): v is MentionRule & V { - return is$typed(v, id, hashMentionRule); -} - -export function validateMentionRule( - v: V, -): ValidationResult { - return validate(v, id, hashMentionRule); -} - -/** Allow replies from actors who follow you. */ -export interface FollowerRule { - $type?: "app.bsky.feed.threadgate#followerRule"; -} - -const hashFollowerRule = "followerRule"; - -export function isFollowerRule(v: V): v is FollowerRule & V { - return is$typed(v, id, hashFollowerRule); -} - -export function validateFollowerRule( - v: V, -): ValidationResult { - return validate(v, id, hashFollowerRule); -} - -/** Allow replies from actors you follow. */ -export interface FollowingRule { - $type?: "app.bsky.feed.threadgate#followingRule"; -} - -const hashFollowingRule = "followingRule"; - -export function isFollowingRule(v: V): v is FollowingRule & V { - return is$typed(v, id, hashFollowingRule); -} - -export function validateFollowingRule( - v: V, -): ValidationResult { - return validate(v, id, hashFollowingRule); -} - -/** Allow replies from actors on a list. */ -export interface ListRule { - $type?: "app.bsky.feed.threadgate#listRule"; - list: string; -} - -const hashListRule = "listRule"; - -export function isListRule(v: V): v is ListRule & V { - return is$typed(v, id, hashListRule); -} - -export function validateListRule(v: V): ValidationResult { - return validate(v, id, hashListRule); -} diff --git a/lex/types/app/bsky/graph/block.ts b/lex/types/app/bsky/graph/block.ts deleted file mode 100644 index 5be9540..0000000 --- a/lex/types/app/bsky/graph/block.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.graph.block"; - -export interface Record { - $type: "app.bsky.graph.block"; - /** DID of the account to be blocked. */ - subject: string; - createdAt: string; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - return validate(v, id, hashRecord, true); -} - -export type Main = Record; diff --git a/lex/types/app/bsky/graph/defs.ts b/lex/types/app/bsky/graph/defs.ts deleted file mode 100644 index 20a0ce3..0000000 --- a/lex/types/app/bsky/graph/defs.ts +++ /dev/null @@ -1,214 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; -import type * as AppBskyActorDefs from "../actor/defs.ts"; -import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; -import type * as AppBskyFeedDefs from "../feed/defs.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.graph.defs"; - -export interface ListViewBasic { - $type?: "app.bsky.graph.defs#listViewBasic"; - uri: string; - cid: string; - name: string; - purpose: ListPurpose; - avatar?: string; - listItemCount?: number; - labels?: (ComAtprotoLabelDefs.Label)[]; - viewer?: ListViewerState; - indexedAt?: string; -} - -const hashListViewBasic = "listViewBasic"; - -export function isListViewBasic(v: V): v is ListViewBasic & V { - return is$typed(v, id, hashListViewBasic); -} - -export function validateListViewBasic( - v: V, -): ValidationResult { - return validate(v, id, hashListViewBasic); -} - -export interface ListView { - $type?: "app.bsky.graph.defs#listView"; - uri: string; - cid: string; - creator: AppBskyActorDefs.ProfileView; - name: string; - purpose: ListPurpose; - description?: string; - descriptionFacets?: (AppBskyRichtextFacet.Main)[]; - avatar?: string; - listItemCount?: number; - labels?: (ComAtprotoLabelDefs.Label)[]; - viewer?: ListViewerState; - indexedAt: string; -} - -const hashListView = "listView"; - -export function isListView(v: V): v is ListView & V { - return is$typed(v, id, hashListView); -} - -export function validateListView(v: V): ValidationResult { - return validate(v, id, hashListView); -} - -export interface ListItemView { - $type?: "app.bsky.graph.defs#listItemView"; - uri: string; - subject: AppBskyActorDefs.ProfileView; -} - -const hashListItemView = "listItemView"; - -export function isListItemView(v: V): v is ListItemView & V { - return is$typed(v, id, hashListItemView); -} - -export function validateListItemView( - v: V, -): ValidationResult { - return validate(v, id, hashListItemView); -} - -export interface StarterPackView { - $type?: "app.bsky.graph.defs#starterPackView"; - uri: string; - cid: string; - record: { [_ in string]: unknown }; - creator: AppBskyActorDefs.ProfileViewBasic; - list?: ListViewBasic; - listItemsSample?: (ListItemView)[]; - feeds?: (AppBskyFeedDefs.GeneratorView)[]; - joinedWeekCount?: number; - joinedAllTimeCount?: number; - labels?: (ComAtprotoLabelDefs.Label)[]; - indexedAt: string; -} - -const hashStarterPackView = "starterPackView"; - -export function isStarterPackView(v: V): v is StarterPackView & V { - return is$typed(v, id, hashStarterPackView); -} - -export function validateStarterPackView( - v: V, -): ValidationResult { - return validate(v, id, hashStarterPackView); -} - -export interface StarterPackViewBasic { - $type?: "app.bsky.graph.defs#starterPackViewBasic"; - uri: string; - cid: string; - record: { [_ in string]: unknown }; - creator: AppBskyActorDefs.ProfileViewBasic; - listItemCount?: number; - joinedWeekCount?: number; - joinedAllTimeCount?: number; - labels?: (ComAtprotoLabelDefs.Label)[]; - indexedAt: string; -} - -const hashStarterPackViewBasic = "starterPackViewBasic"; - -export function isStarterPackViewBasic(v: V): v is StarterPackViewBasic & V { - return is$typed(v, id, hashStarterPackViewBasic); -} - -export function validateStarterPackViewBasic( - v: V, -): ValidationResult { - return validate(v, id, hashStarterPackViewBasic); -} - -export type ListPurpose = - | "app.bsky.graph.defs#modlist" - | "app.bsky.graph.defs#curatelist" - | "app.bsky.graph.defs#referencelist" - | (string & globalThis.Record); - -/** A list of actors to apply an aggregate moderation action (mute/block) on. */ -export const MODLIST: string = `${id}#modlist`; -/** A list of actors used for curation purposes such as list feeds or interaction gating. */ -export const CURATELIST: string = `${id}#curatelist`; -/** A list of actors used for only for reference purposes such as within a starter pack. */ -export const REFERENCELIST: string = `${id}#referencelist`; - -export interface ListViewerState { - $type?: "app.bsky.graph.defs#listViewerState"; - muted?: boolean; - blocked?: string; -} - -const hashListViewerState = "listViewerState"; - -export function isListViewerState(v: V): v is ListViewerState & V { - return is$typed(v, id, hashListViewerState); -} - -export function validateListViewerState( - v: V, -): ValidationResult { - return validate(v, id, hashListViewerState); -} - -/** indicates that a handle or DID could not be resolved */ -export interface NotFoundActor { - $type?: "app.bsky.graph.defs#notFoundActor"; - actor: string; - notFound: true; -} - -const hashNotFoundActor = "notFoundActor"; - -export function isNotFoundActor(v: V): v is NotFoundActor & V { - return is$typed(v, id, hashNotFoundActor); -} - -export function validateNotFoundActor( - v: V, -): ValidationResult { - return validate(v, id, hashNotFoundActor); -} - -/** lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) */ -export interface Relationship { - $type?: "app.bsky.graph.defs#relationship"; - did: string; - /** if the actor follows this DID, this is the AT-URI of the follow record */ - following?: string; - /** if the actor is followed by this DID, contains the AT-URI of the follow record */ - followedBy?: string; - /** if the actor blocks this DID, this is the AT-URI of the block record */ - blocking?: string; - /** if the actor is blocked by this DID, contains the AT-URI of the block record */ - blockedBy?: string; - /** if the actor blocks this DID via a block list, this is the AT-URI of the listblock record */ - blockingByList?: string; - /** if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record */ - blockedByList?: string; -} - -const hashRelationship = "relationship"; - -export function isRelationship(v: V): v is Relationship & V { - return is$typed(v, id, hashRelationship); -} - -export function validateRelationship( - v: V, -): ValidationResult { - return validate(v, id, hashRelationship); -} diff --git a/lex/types/app/bsky/graph/follow.ts b/lex/types/app/bsky/graph/follow.ts deleted file mode 100644 index 56a0ce9..0000000 --- a/lex/types/app/bsky/graph/follow.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.graph.follow"; - -export interface Record { - $type: "app.bsky.graph.follow"; - subject: string; - createdAt: string; - via?: ComAtprotoRepoStrongRef.Main; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - return validate(v, id, hashRecord, true); -} - -export type Main = Record; diff --git a/lex/types/app/bsky/graph/getActorStarterPacks.ts b/lex/types/app/bsky/graph/getActorStarterPacks.ts deleted file mode 100644 index 08fb016..0000000 --- a/lex/types/app/bsky/graph/getActorStarterPacks.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyGraphDefs from "./defs.ts"; - -export type QueryParams = { - actor: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - starterPacks: (AppBskyGraphDefs.StarterPackViewBasic)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getBlocks.ts b/lex/types/app/bsky/graph/getBlocks.ts deleted file mode 100644 index 142ae96..0000000 --- a/lex/types/app/bsky/graph/getBlocks.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -export type QueryParams = { - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - blocks: (AppBskyActorDefs.ProfileView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getFollowers.ts b/lex/types/app/bsky/graph/getFollowers.ts deleted file mode 100644 index df23e0c..0000000 --- a/lex/types/app/bsky/graph/getFollowers.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -export type QueryParams = { - actor: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - subject: AppBskyActorDefs.ProfileView; - cursor?: string; - followers: (AppBskyActorDefs.ProfileView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getFollows.ts b/lex/types/app/bsky/graph/getFollows.ts deleted file mode 100644 index e2ff349..0000000 --- a/lex/types/app/bsky/graph/getFollows.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -export type QueryParams = { - actor: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - subject: AppBskyActorDefs.ProfileView; - cursor?: string; - follows: (AppBskyActorDefs.ProfileView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getKnownFollowers.ts b/lex/types/app/bsky/graph/getKnownFollowers.ts deleted file mode 100644 index df23e0c..0000000 --- a/lex/types/app/bsky/graph/getKnownFollowers.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -export type QueryParams = { - actor: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - subject: AppBskyActorDefs.ProfileView; - cursor?: string; - followers: (AppBskyActorDefs.ProfileView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getList.ts b/lex/types/app/bsky/graph/getList.ts deleted file mode 100644 index 71607fb..0000000 --- a/lex/types/app/bsky/graph/getList.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyGraphDefs from "./defs.ts"; - -export type QueryParams = { - /** Reference (AT-URI) of the list record to hydrate. */ - list: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - list: AppBskyGraphDefs.ListView; - items: (AppBskyGraphDefs.ListItemView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getListBlocks.ts b/lex/types/app/bsky/graph/getListBlocks.ts deleted file mode 100644 index b71a1d0..0000000 --- a/lex/types/app/bsky/graph/getListBlocks.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyGraphDefs from "./defs.ts"; - -export type QueryParams = { - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - lists: (AppBskyGraphDefs.ListView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getListMutes.ts b/lex/types/app/bsky/graph/getListMutes.ts deleted file mode 100644 index b71a1d0..0000000 --- a/lex/types/app/bsky/graph/getListMutes.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyGraphDefs from "./defs.ts"; - -export type QueryParams = { - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - lists: (AppBskyGraphDefs.ListView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getLists.ts b/lex/types/app/bsky/graph/getLists.ts deleted file mode 100644 index 8fa0590..0000000 --- a/lex/types/app/bsky/graph/getLists.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyGraphDefs from "./defs.ts"; - -export type QueryParams = { - /** The account (actor) to enumerate lists from. */ - actor: string; - limit: number; - cursor?: string; - /** Optional filter by list purpose. If not specified, all supported types are returned. */ - purposes?: - | "modlist" - | "curatelist" - | (string & globalThis.Record)[]; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - lists: (AppBskyGraphDefs.ListView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getListsWithMembership.ts b/lex/types/app/bsky/graph/getListsWithMembership.ts deleted file mode 100644 index 3b416df..0000000 --- a/lex/types/app/bsky/graph/getListsWithMembership.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as AppBskyGraphDefs from "./defs.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.graph.getListsWithMembership"; - -export type QueryParams = { - /** The account (actor) to check for membership. */ - actor: string; - limit: number; - cursor?: string; - /** Optional filter by list purpose. If not specified, all supported types are returned. */ - purposes?: - | "modlist" - | "curatelist" - | (string & globalThis.Record)[]; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - listsWithMembership: (ListWithMembership)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; - -/** A list and an optional list item indicating membership of a target user to that list. */ -export interface ListWithMembership { - $type?: "app.bsky.graph.getListsWithMembership#listWithMembership"; - list: AppBskyGraphDefs.ListView; - listItem?: AppBskyGraphDefs.ListItemView; -} - -const hashListWithMembership = "listWithMembership"; - -export function isListWithMembership(v: V): v is ListWithMembership & V { - return is$typed(v, id, hashListWithMembership); -} - -export function validateListWithMembership( - v: V, -): ValidationResult { - return validate(v, id, hashListWithMembership); -} diff --git a/lex/types/app/bsky/graph/getMutes.ts b/lex/types/app/bsky/graph/getMutes.ts deleted file mode 100644 index e1beb1b..0000000 --- a/lex/types/app/bsky/graph/getMutes.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -export type QueryParams = { - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - mutes: (AppBskyActorDefs.ProfileView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getRelationships.ts b/lex/types/app/bsky/graph/getRelationships.ts deleted file mode 100644 index 69b01f3..0000000 --- a/lex/types/app/bsky/graph/getRelationships.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { $Typed } from "../../../../util.ts"; -import type * as AppBskyGraphDefs from "./defs.ts"; - -export type QueryParams = { - /** Primary account requesting relationships for. */ - actor: string; - /** List of 'other' accounts to be related back to the primary. */ - others?: string[]; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - actor?: string; - relationships: ( - | $Typed - | $Typed - | { $type: string } - )[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "ActorNotFound"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getStarterPack.ts b/lex/types/app/bsky/graph/getStarterPack.ts deleted file mode 100644 index f0f7e96..0000000 --- a/lex/types/app/bsky/graph/getStarterPack.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyGraphDefs from "./defs.ts"; - -export type QueryParams = { - /** Reference (AT-URI) of the starter pack record. */ - starterPack: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - starterPack: AppBskyGraphDefs.StarterPackView; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getStarterPacks.ts b/lex/types/app/bsky/graph/getStarterPacks.ts deleted file mode 100644 index 6e735b6..0000000 --- a/lex/types/app/bsky/graph/getStarterPacks.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyGraphDefs from "./defs.ts"; - -export type QueryParams = { - uris: string[]; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - starterPacks: (AppBskyGraphDefs.StarterPackViewBasic)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getStarterPacksWithMembership.ts b/lex/types/app/bsky/graph/getStarterPacksWithMembership.ts deleted file mode 100644 index 7357774..0000000 --- a/lex/types/app/bsky/graph/getStarterPacksWithMembership.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as AppBskyGraphDefs from "./defs.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.graph.getStarterPacksWithMembership"; - -export type QueryParams = { - /** The account (actor) to check for membership. */ - actor: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - starterPacksWithMembership: (StarterPackWithMembership)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; - -/** A starter pack and an optional list item indicating membership of a target user to that starter pack. */ -export interface StarterPackWithMembership { - $type?: - "app.bsky.graph.getStarterPacksWithMembership#starterPackWithMembership"; - starterPack: AppBskyGraphDefs.StarterPackView; - listItem?: AppBskyGraphDefs.ListItemView; -} - -const hashStarterPackWithMembership = "starterPackWithMembership"; - -export function isStarterPackWithMembership( - v: V, -): v is StarterPackWithMembership & V { - return is$typed(v, id, hashStarterPackWithMembership); -} - -export function validateStarterPackWithMembership( - v: V, -): ValidationResult { - return validate( - v, - id, - hashStarterPackWithMembership, - ); -} diff --git a/lex/types/app/bsky/graph/getSuggestedFollowsByActor.ts b/lex/types/app/bsky/graph/getSuggestedFollowsByActor.ts deleted file mode 100644 index e7c5716..0000000 --- a/lex/types/app/bsky/graph/getSuggestedFollowsByActor.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -export type QueryParams = { - actor: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - suggestions: (AppBskyActorDefs.ProfileView)[]; - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string; - /** DEPRECATED, unused. Previously: if true, response has fallen-back to generic results, and is not scoped using relativeToDid */ - isFallback?: boolean; - /** DEPRECATED: use recIdStr instead. */ - recId?: number; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/list.ts b/lex/types/app/bsky/graph/list.ts deleted file mode 100644 index 57d2e75..0000000 --- a/lex/types/app/bsky/graph/list.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { BlobRef } from "@atp/lexicon"; -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -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"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.graph.list"; - -export interface Record { - $type: "app.bsky.graph.list"; - purpose: AppBskyGraphDefs.ListPurpose; - /** Display name for list; can not be empty. */ - name: string; - description?: string; - descriptionFacets?: (AppBskyRichtextFacet.Main)[]; - avatar?: BlobRef; - labels?: $Typed | { $type: string }; - createdAt: string; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - 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 deleted file mode 100644 index 5493c69..0000000 --- a/lex/types/app/bsky/graph/listblock.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.graph.listblock"; - -export interface Record { - $type: "app.bsky.graph.listblock"; - /** Reference (AT-URI) to the mod list record. */ - subject: string; - createdAt: string; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - 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 deleted file mode 100644 index 68ca0b1..0000000 --- a/lex/types/app/bsky/graph/listitem.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.graph.listitem"; - -export interface Record { - $type: "app.bsky.graph.listitem"; - /** The account which is included on the list. */ - subject: string; - /** Reference (AT-URI) to the list record (app.bsky.graph.list). */ - list: string; - createdAt: string; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - return validate(v, id, hashRecord, true); -} - -export type Main = Record; diff --git a/lex/types/app/bsky/graph/muteActor.ts b/lex/types/app/bsky/graph/muteActor.ts deleted file mode 100644 index e185363..0000000 --- a/lex/types/app/bsky/graph/muteActor.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - actor: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/graph/muteActorList.ts b/lex/types/app/bsky/graph/muteActorList.ts deleted file mode 100644 index e5a2f15..0000000 --- a/lex/types/app/bsky/graph/muteActorList.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - list: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/graph/muteThread.ts b/lex/types/app/bsky/graph/muteThread.ts deleted file mode 100644 index b99c31e..0000000 --- a/lex/types/app/bsky/graph/muteThread.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - root: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/graph/searchStarterPacks.ts b/lex/types/app/bsky/graph/searchStarterPacks.ts deleted file mode 100644 index 2d26942..0000000 --- a/lex/types/app/bsky/graph/searchStarterPacks.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyGraphDefs from "./defs.ts"; - -export type QueryParams = { - /** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */ - q: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - starterPacks: (AppBskyGraphDefs.StarterPackViewBasic)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/starterpack.ts b/lex/types/app/bsky/graph/starterpack.ts deleted file mode 100644 index 0e9d446..0000000 --- a/lex/types/app/bsky/graph/starterpack.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.graph.starterpack"; - -export interface Record { - $type: "app.bsky.graph.starterpack"; - /** Display name for starter pack; can not be empty. */ - name: string; - description?: string; - descriptionFacets?: (AppBskyRichtextFacet.Main)[]; - /** Reference (AT-URI) to the list record. */ - list: string; - feeds?: (FeedItem)[]; - createdAt: string; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - return validate(v, id, hashRecord, true); -} - -export type Main = Record; - -export interface FeedItem { - $type?: "app.bsky.graph.starterpack#feedItem"; - uri: string; -} - -const hashFeedItem = "feedItem"; - -export function isFeedItem(v: V): v is FeedItem & V { - return is$typed(v, id, hashFeedItem); -} - -export function validateFeedItem(v: V): ValidationResult { - return validate(v, id, hashFeedItem); -} diff --git a/lex/types/app/bsky/graph/unmuteActor.ts b/lex/types/app/bsky/graph/unmuteActor.ts deleted file mode 100644 index e185363..0000000 --- a/lex/types/app/bsky/graph/unmuteActor.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - actor: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/graph/unmuteActorList.ts b/lex/types/app/bsky/graph/unmuteActorList.ts deleted file mode 100644 index e5a2f15..0000000 --- a/lex/types/app/bsky/graph/unmuteActorList.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - list: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/graph/unmuteThread.ts b/lex/types/app/bsky/graph/unmuteThread.ts deleted file mode 100644 index b99c31e..0000000 --- a/lex/types/app/bsky/graph/unmuteThread.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - root: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/graph/verification.ts b/lex/types/app/bsky/graph/verification.ts deleted file mode 100644 index 8edffeb..0000000 --- a/lex/types/app/bsky/graph/verification.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.graph.verification"; - -export interface Record { - $type: "app.bsky.graph.verification"; - /** DID of the subject the verification applies to. */ - subject: string; - /** Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. */ - handle: string; - /** Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. */ - displayName: string; - /** Date of when the verification was created. */ - createdAt: string; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - return validate(v, id, hashRecord, true); -} - -export type Main = Record; diff --git a/lex/types/app/bsky/labeler/defs.ts b/lex/types/app/bsky/labeler/defs.ts deleted file mode 100644 index cc95dd0..0000000 --- a/lex/types/app/bsky/labeler/defs.ts +++ /dev/null @@ -1,102 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as AppBskyActorDefs from "../actor/defs.ts"; -import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; -import type * as ComAtprotoModerationDefs from "../../../com/atproto/moderation/defs.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.labeler.defs"; - -export interface LabelerView { - $type?: "app.bsky.labeler.defs#labelerView"; - uri: string; - cid: string; - creator: AppBskyActorDefs.ProfileView; - likeCount?: number; - viewer?: LabelerViewerState; - indexedAt: string; - labels?: (ComAtprotoLabelDefs.Label)[]; -} - -const hashLabelerView = "labelerView"; - -export function isLabelerView(v: V): v is LabelerView & V { - return is$typed(v, id, hashLabelerView); -} - -export function validateLabelerView( - v: V, -): ValidationResult { - return validate(v, id, hashLabelerView); -} - -export interface LabelerViewDetailed { - $type?: "app.bsky.labeler.defs#labelerViewDetailed"; - uri: string; - cid: string; - creator: AppBskyActorDefs.ProfileView; - policies: LabelerPolicies; - likeCount?: number; - viewer?: LabelerViewerState; - indexedAt: string; - labels?: (ComAtprotoLabelDefs.Label)[]; - /** The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. */ - reasonTypes?: (ComAtprotoModerationDefs.ReasonType)[]; - /** The set of subject types (account, record, etc) this service accepts reports on. */ - subjectTypes?: (ComAtprotoModerationDefs.SubjectType)[]; - /** Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. */ - subjectCollections?: (string)[]; -} - -const hashLabelerViewDetailed = "labelerViewDetailed"; - -export function isLabelerViewDetailed(v: V): v is LabelerViewDetailed & V { - return is$typed(v, id, hashLabelerViewDetailed); -} - -export function validateLabelerViewDetailed( - v: V, -): ValidationResult { - return validate(v, id, hashLabelerViewDetailed); -} - -export interface LabelerViewerState { - $type?: "app.bsky.labeler.defs#labelerViewerState"; - like?: string; -} - -const hashLabelerViewerState = "labelerViewerState"; - -export function isLabelerViewerState(v: V): v is LabelerViewerState & V { - return is$typed(v, id, hashLabelerViewerState); -} - -export function validateLabelerViewerState( - v: V, -): ValidationResult { - return validate(v, id, hashLabelerViewerState); -} - -export interface LabelerPolicies { - $type?: "app.bsky.labeler.defs#labelerPolicies"; - /** The label values which this labeler publishes. May include global or custom labels. */ - labelValues: (ComAtprotoLabelDefs.LabelValue)[]; - /** Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. */ - labelValueDefinitions?: (ComAtprotoLabelDefs.LabelValueDefinition)[]; -} - -const hashLabelerPolicies = "labelerPolicies"; - -export function isLabelerPolicies(v: V): v is LabelerPolicies & V { - return is$typed(v, id, hashLabelerPolicies); -} - -export function validateLabelerPolicies( - v: V, -): ValidationResult { - return validate(v, id, hashLabelerPolicies); -} diff --git a/lex/types/app/bsky/labeler/getServices.ts b/lex/types/app/bsky/labeler/getServices.ts deleted file mode 100644 index ffdc3f2..0000000 --- a/lex/types/app/bsky/labeler/getServices.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { $Typed } from "../../../../util.ts"; -import type * as AppBskyLabelerDefs from "./defs.ts"; - -export type QueryParams = { - dids: string[]; - detailed: boolean; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - views: ( - | $Typed - | $Typed - | { $type: string } - )[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/labeler/service.ts b/lex/types/app/bsky/labeler/service.ts deleted file mode 100644 index 0cdc27f..0000000 --- a/lex/types/app/bsky/labeler/service.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -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"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.labeler.service"; - -export interface Record { - $type: "app.bsky.labeler.service"; - policies: AppBskyLabelerDefs.LabelerPolicies; - labels?: $Typed | { $type: string }; - createdAt: string; - /** The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. */ - reasonTypes?: (ComAtprotoModerationDefs.ReasonType)[]; - /** The set of subject types (account, record, etc) this service accepts reports on. */ - subjectTypes?: (ComAtprotoModerationDefs.SubjectType)[]; - /** Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. */ - subjectCollections?: (string)[]; - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - 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 deleted file mode 100644 index 8a36dd9..0000000 --- a/lex/types/app/bsky/notification/declaration.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.notification.declaration"; - -export interface Record { - $type: "app.bsky.notification.declaration"; - /** A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'. */ - allowSubscriptions: - | "followers" - | "mutuals" - | "none" - | (string & globalThis.Record); - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - return validate(v, id, hashRecord, true); -} - -export type Main = Record; diff --git a/lex/types/app/bsky/notification/defs.ts b/lex/types/app/bsky/notification/defs.ts deleted file mode 100644 index ab94b8e..0000000 --- a/lex/types/app/bsky/notification/defs.ts +++ /dev/null @@ -1,153 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.notification.defs"; - -export interface RecordDeleted { - $type?: "app.bsky.notification.defs#recordDeleted"; -} - -const hashRecordDeleted = "recordDeleted"; - -export function isRecordDeleted(v: V): v is RecordDeleted & V { - return is$typed(v, id, hashRecordDeleted); -} - -export function validateRecordDeleted( - v: V, -): ValidationResult { - return validate(v, id, hashRecordDeleted); -} - -export interface ChatPreference { - $type?: "app.bsky.notification.defs#chatPreference"; - include: - | "all" - | "accepted" - | (string & globalThis.Record); - push: boolean; -} - -const hashChatPreference = "chatPreference"; - -export function isChatPreference(v: V): v is ChatPreference & V { - return is$typed(v, id, hashChatPreference); -} - -export function validateChatPreference( - v: V, -): ValidationResult { - return validate(v, id, hashChatPreference); -} - -export interface FilterablePreference { - $type?: "app.bsky.notification.defs#filterablePreference"; - include: "all" | "follows" | (string & globalThis.Record); - list: boolean; - push: boolean; -} - -const hashFilterablePreference = "filterablePreference"; - -export function isFilterablePreference(v: V): v is FilterablePreference & V { - return is$typed(v, id, hashFilterablePreference); -} - -export function validateFilterablePreference( - v: V, -): ValidationResult { - return validate(v, id, hashFilterablePreference); -} - -export interface Preference { - $type?: "app.bsky.notification.defs#preference"; - list: boolean; - push: boolean; -} - -const hashPreference = "preference"; - -export function isPreference(v: V): v is Preference & V { - return is$typed(v, id, hashPreference); -} - -export function validatePreference(v: V): ValidationResult { - return validate(v, id, hashPreference); -} - -export interface Preferences { - $type?: "app.bsky.notification.defs#preferences"; - chat: ChatPreference; - follow: FilterablePreference; - like: FilterablePreference; - likeViaRepost: FilterablePreference; - mention: FilterablePreference; - quote: FilterablePreference; - reply: FilterablePreference; - repost: FilterablePreference; - repostViaRepost: FilterablePreference; - starterpackJoined: Preference; - subscribedPost: Preference; - unverified: Preference; - verified: Preference; -} - -const hashPreferences = "preferences"; - -export function isPreferences(v: V): v is Preferences & V { - return is$typed(v, id, hashPreferences); -} - -export function validatePreferences( - v: V, -): ValidationResult { - return validate(v, id, hashPreferences); -} - -export interface ActivitySubscription { - $type?: "app.bsky.notification.defs#activitySubscription"; - post: boolean; - reply: boolean; -} - -const hashActivitySubscription = "activitySubscription"; - -export function isActivitySubscription(v: V): v is ActivitySubscription & V { - return is$typed(v, id, hashActivitySubscription); -} - -export function validateActivitySubscription( - v: V, -): ValidationResult { - return validate(v, id, hashActivitySubscription); -} - -/** Object used to store activity subscription data in stash. */ -export interface SubjectActivitySubscription { - $type?: "app.bsky.notification.defs#subjectActivitySubscription"; - subject: string; - activitySubscription: ActivitySubscription; -} - -const hashSubjectActivitySubscription = "subjectActivitySubscription"; - -export function isSubjectActivitySubscription( - v: V, -): v is SubjectActivitySubscription & V { - return is$typed(v, id, hashSubjectActivitySubscription); -} - -export function validateSubjectActivitySubscription( - v: V, -): ValidationResult { - return validate( - v, - id, - hashSubjectActivitySubscription, - ); -} diff --git a/lex/types/app/bsky/notification/getPreferences.ts b/lex/types/app/bsky/notification/getPreferences.ts deleted file mode 100644 index ccc4300..0000000 --- a/lex/types/app/bsky/notification/getPreferences.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyNotificationDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; -export type InputSchema = undefined; - -export interface OutputSchema { - preferences: AppBskyNotificationDefs.Preferences; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/notification/getUnreadCount.ts b/lex/types/app/bsky/notification/getUnreadCount.ts deleted file mode 100644 index 1901eea..0000000 --- a/lex/types/app/bsky/notification/getUnreadCount.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = { - priority?: boolean; - seenAt?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - count: number; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/notification/listActivitySubscriptions.ts b/lex/types/app/bsky/notification/listActivitySubscriptions.ts deleted file mode 100644 index 9b1ec78..0000000 --- a/lex/types/app/bsky/notification/listActivitySubscriptions.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -export type QueryParams = { - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - subscriptions: (AppBskyActorDefs.ProfileView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/notification/listNotifications.ts b/lex/types/app/bsky/notification/listNotifications.ts deleted file mode 100644 index 29978b0..0000000 --- a/lex/types/app/bsky/notification/listNotifications.ts +++ /dev/null @@ -1,83 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as AppBskyActorDefs from "../actor/defs.ts"; -import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.notification.listNotifications"; - -export type QueryParams = { - /** Notification reasons to include in response. */ - reasons?: string[]; - limit: number; - priority?: boolean; - cursor?: string; - seenAt?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - notifications: (Notification)[]; - priority?: boolean; - seenAt?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; - -export interface Notification { - $type?: "app.bsky.notification.listNotifications#notification"; - uri: string; - cid: string; - author: AppBskyActorDefs.ProfileView; - /** The reason why this notification was delivered - e.g. your post was liked, or you received a new follower. */ - reason: - | "like" - | "repost" - | "follow" - | "mention" - | "reply" - | "quote" - | "starterpack-joined" - | "verified" - | "unverified" - | "like-via-repost" - | "repost-via-repost" - | "subscribed-post" - | "contact-match" - | (string & globalThis.Record); - reasonSubject?: string; - record: { [_ in string]: unknown }; - isRead: boolean; - indexedAt: string; - labels?: (ComAtprotoLabelDefs.Label)[]; -} - -const hashNotification = "notification"; - -export function isNotification(v: V): v is Notification & V { - return is$typed(v, id, hashNotification); -} - -export function validateNotification( - v: V, -): ValidationResult { - return validate(v, id, hashNotification); -} diff --git a/lex/types/app/bsky/notification/putActivitySubscription.ts b/lex/types/app/bsky/notification/putActivitySubscription.ts deleted file mode 100644 index b1094ba..0000000 --- a/lex/types/app/bsky/notification/putActivitySubscription.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyNotificationDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - subject: string; - activitySubscription: AppBskyNotificationDefs.ActivitySubscription; -} - -export interface OutputSchema { - subject: string; - activitySubscription?: AppBskyNotificationDefs.ActivitySubscription; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/notification/putPreferences.ts b/lex/types/app/bsky/notification/putPreferences.ts deleted file mode 100644 index 3d4d3ab..0000000 --- a/lex/types/app/bsky/notification/putPreferences.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - priority: boolean; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/notification/putPreferencesV2.ts b/lex/types/app/bsky/notification/putPreferencesV2.ts deleted file mode 100644 index a172698..0000000 --- a/lex/types/app/bsky/notification/putPreferencesV2.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyNotificationDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - chat?: AppBskyNotificationDefs.ChatPreference; - follow?: AppBskyNotificationDefs.FilterablePreference; - like?: AppBskyNotificationDefs.FilterablePreference; - likeViaRepost?: AppBskyNotificationDefs.FilterablePreference; - mention?: AppBskyNotificationDefs.FilterablePreference; - quote?: AppBskyNotificationDefs.FilterablePreference; - reply?: AppBskyNotificationDefs.FilterablePreference; - repost?: AppBskyNotificationDefs.FilterablePreference; - repostViaRepost?: AppBskyNotificationDefs.FilterablePreference; - starterpackJoined?: AppBskyNotificationDefs.Preference; - subscribedPost?: AppBskyNotificationDefs.Preference; - unverified?: AppBskyNotificationDefs.Preference; - verified?: AppBskyNotificationDefs.Preference; -} - -export interface OutputSchema { - preferences: AppBskyNotificationDefs.Preferences; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/notification/registerPush.ts b/lex/types/app/bsky/notification/registerPush.ts deleted file mode 100644 index 032b417..0000000 --- a/lex/types/app/bsky/notification/registerPush.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - serviceDid: string; - token: string; - platform: - | "ios" - | "android" - | "web" - | (string & globalThis.Record); - appId: string; - /** Set to true when the actor is age restricted */ - ageRestricted?: boolean; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/notification/unregisterPush.ts b/lex/types/app/bsky/notification/unregisterPush.ts deleted file mode 100644 index 5687ba5..0000000 --- a/lex/types/app/bsky/notification/unregisterPush.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - serviceDid: string; - token: string; - platform: - | "ios" - | "android" - | "web" - | (string & globalThis.Record); - appId: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/notification/updateSeen.ts b/lex/types/app/bsky/notification/updateSeen.ts deleted file mode 100644 index 57a14ce..0000000 --- a/lex/types/app/bsky/notification/updateSeen.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - seenAt: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/richtext/facet.ts b/lex/types/app/bsky/richtext/facet.ts deleted file mode 100644 index a22fcc4..0000000 --- a/lex/types/app/bsky/richtext/facet.ts +++ /dev/null @@ -1,92 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.richtext.facet"; - -/** Annotation of a sub-string within rich text. */ -export interface Main { - $type?: "app.bsky.richtext.facet"; - index: ByteSlice; - features: - ($Typed | $Typed | $Typed | { $type: string })[]; -} - -const hashMain = "main"; - -export function isMain(v: V): v is Main & V { - return is$typed(v, id, hashMain); -} - -export function validateMain(v: V): ValidationResult
{ - return validate
(v, id, hashMain); -} - -/** Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID. */ -export interface Mention { - $type?: "app.bsky.richtext.facet#mention"; - did: string; -} - -const hashMention = "mention"; - -export function isMention(v: V): v is Mention & V { - return is$typed(v, id, hashMention); -} - -export function validateMention(v: V): ValidationResult { - return validate(v, id, hashMention); -} - -/** Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. */ -export interface Link { - $type?: "app.bsky.richtext.facet#link"; - uri: string; -} - -const hashLink = "link"; - -export function isLink(v: V): v is Link & V { - return is$typed(v, id, hashLink); -} - -export function validateLink(v: V): ValidationResult { - return validate(v, id, hashLink); -} - -/** Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags'). */ -export interface Tag { - $type?: "app.bsky.richtext.facet#tag"; - tag: string; -} - -const hashTag = "tag"; - -export function isTag(v: V): v is Tag & V { - return is$typed(v, id, hashTag); -} - -export function validateTag(v: V): ValidationResult { - return validate(v, id, hashTag); -} - -/** Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. */ -export interface ByteSlice { - $type?: "app.bsky.richtext.facet#byteSlice"; - byteStart: number; - byteEnd: number; -} - -const hashByteSlice = "byteSlice"; - -export function isByteSlice(v: V): v is ByteSlice & V { - return is$typed(v, id, hashByteSlice); -} - -export function validateByteSlice(v: V): ValidationResult { - return validate(v, id, hashByteSlice); -} diff --git a/lex/types/app/bsky/unspecced/defs.ts b/lex/types/app/bsky/unspecced/defs.ts deleted file mode 100644 index 28fec2c..0000000 --- a/lex/types/app/bsky/unspecced/defs.ts +++ /dev/null @@ -1,279 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as AppBskyActorDefs from "../actor/defs.ts"; -import type * as AppBskyFeedDefs from "../feed/defs.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.unspecced.defs"; - -export interface SkeletonSearchPost { - $type?: "app.bsky.unspecced.defs#skeletonSearchPost"; - uri: string; -} - -const hashSkeletonSearchPost = "skeletonSearchPost"; - -export function isSkeletonSearchPost(v: V): v is SkeletonSearchPost & V { - return is$typed(v, id, hashSkeletonSearchPost); -} - -export function validateSkeletonSearchPost( - v: V, -): ValidationResult { - return validate(v, id, hashSkeletonSearchPost); -} - -export interface SkeletonSearchActor { - $type?: "app.bsky.unspecced.defs#skeletonSearchActor"; - did: string; -} - -const hashSkeletonSearchActor = "skeletonSearchActor"; - -export function isSkeletonSearchActor(v: V): v is SkeletonSearchActor & V { - return is$typed(v, id, hashSkeletonSearchActor); -} - -export function validateSkeletonSearchActor( - v: V, -): ValidationResult { - return validate(v, id, hashSkeletonSearchActor); -} - -export interface SkeletonSearchStarterPack { - $type?: "app.bsky.unspecced.defs#skeletonSearchStarterPack"; - uri: string; -} - -const hashSkeletonSearchStarterPack = "skeletonSearchStarterPack"; - -export function isSkeletonSearchStarterPack( - v: V, -): v is SkeletonSearchStarterPack & V { - return is$typed(v, id, hashSkeletonSearchStarterPack); -} - -export function validateSkeletonSearchStarterPack( - v: V, -): ValidationResult { - return validate( - v, - id, - hashSkeletonSearchStarterPack, - ); -} - -export interface TrendingTopic { - $type?: "app.bsky.unspecced.defs#trendingTopic"; - topic: string; - displayName?: string; - description?: string; - link: string; -} - -const hashTrendingTopic = "trendingTopic"; - -export function isTrendingTopic(v: V): v is TrendingTopic & V { - return is$typed(v, id, hashTrendingTopic); -} - -export function validateTrendingTopic( - v: V, -): ValidationResult { - return validate(v, id, hashTrendingTopic); -} - -export interface SkeletonTrend { - $type?: "app.bsky.unspecced.defs#skeletonTrend"; - topic: string; - displayName: string; - link: string; - startedAt: string; - postCount: number; - status?: "hot" | (string & globalThis.Record); - category?: string; - dids: (string)[]; -} - -const hashSkeletonTrend = "skeletonTrend"; - -export function isSkeletonTrend(v: V): v is SkeletonTrend & V { - return is$typed(v, id, hashSkeletonTrend); -} - -export function validateSkeletonTrend( - v: V, -): ValidationResult { - return validate(v, id, hashSkeletonTrend); -} - -export interface TrendView { - $type?: "app.bsky.unspecced.defs#trendView"; - topic: string; - displayName: string; - link: string; - startedAt: string; - postCount: number; - status?: "hot" | (string & globalThis.Record); - category?: string; - actors: (AppBskyActorDefs.ProfileViewBasic)[]; -} - -const hashTrendView = "trendView"; - -export function isTrendView(v: V): v is TrendView & V { - return is$typed(v, id, hashTrendView); -} - -export function validateTrendView(v: V): ValidationResult { - return validate(v, id, hashTrendView); -} - -export interface ThreadItemPost { - $type?: "app.bsky.unspecced.defs#threadItemPost"; - post: AppBskyFeedDefs.PostView; - /** This post has more parents that were not present in the response. This is just a boolean, without the number of parents. */ - moreParents: boolean; - /** This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate. */ - moreReplies: number; - /** This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread. */ - opThread: boolean; - /** The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread. */ - hiddenByThreadgate: boolean; - /** This is by an account muted by the viewer requesting it. */ - mutedByViewer: boolean; -} - -const hashThreadItemPost = "threadItemPost"; - -export function isThreadItemPost(v: V): v is ThreadItemPost & V { - return is$typed(v, id, hashThreadItemPost); -} - -export function validateThreadItemPost( - v: V, -): ValidationResult { - return validate(v, id, hashThreadItemPost); -} - -export interface ThreadItemNoUnauthenticated { - $type?: "app.bsky.unspecced.defs#threadItemNoUnauthenticated"; -} - -const hashThreadItemNoUnauthenticated = "threadItemNoUnauthenticated"; - -export function isThreadItemNoUnauthenticated( - v: V, -): v is ThreadItemNoUnauthenticated & V { - return is$typed(v, id, hashThreadItemNoUnauthenticated); -} - -export function validateThreadItemNoUnauthenticated( - v: V, -): ValidationResult { - return validate( - v, - id, - hashThreadItemNoUnauthenticated, - ); -} - -export interface ThreadItemNotFound { - $type?: "app.bsky.unspecced.defs#threadItemNotFound"; -} - -const hashThreadItemNotFound = "threadItemNotFound"; - -export function isThreadItemNotFound(v: V): v is ThreadItemNotFound & V { - return is$typed(v, id, hashThreadItemNotFound); -} - -export function validateThreadItemNotFound( - v: V, -): ValidationResult { - return validate(v, id, hashThreadItemNotFound); -} - -export interface ThreadItemBlocked { - $type?: "app.bsky.unspecced.defs#threadItemBlocked"; - author: AppBskyFeedDefs.BlockedAuthor; -} - -const hashThreadItemBlocked = "threadItemBlocked"; - -export function isThreadItemBlocked(v: V): v is ThreadItemBlocked & V { - return is$typed(v, id, hashThreadItemBlocked); -} - -export function validateThreadItemBlocked( - v: V, -): ValidationResult { - return validate(v, id, hashThreadItemBlocked); -} - -/** The computed state of the age assurance process, returned to the user in question on certain authenticated requests. */ -export interface AgeAssuranceState { - $type?: "app.bsky.unspecced.defs#ageAssuranceState"; - /** The timestamp when this state was last updated. */ - lastInitiatedAt?: string; - /** The status of the age assurance process. */ - status: - | "unknown" - | "pending" - | "assured" - | "blocked" - | (string & globalThis.Record); -} - -const hashAgeAssuranceState = "ageAssuranceState"; - -export function isAgeAssuranceState(v: V): v is AgeAssuranceState & V { - return is$typed(v, id, hashAgeAssuranceState); -} - -export function validateAgeAssuranceState( - v: V, -): ValidationResult { - return validate(v, id, hashAgeAssuranceState); -} - -/** Object used to store age assurance data in stash. */ -export interface AgeAssuranceEvent { - $type?: "app.bsky.unspecced.defs#ageAssuranceEvent"; - /** The date and time of this write operation. */ - createdAt: string; - /** The status of the age assurance process. */ - status: - | "unknown" - | "pending" - | "assured" - | (string & globalThis.Record); - /** The unique identifier for this instance of the age assurance flow, in UUID format. */ - attemptId: string; - /** The email used for AA. */ - email?: string; - /** The IP address used when initiating the AA flow. */ - initIp?: string; - /** The user agent used when initiating the AA flow. */ - initUa?: string; - /** The IP address used when completing the AA flow. */ - completeIp?: string; - /** The user agent used when completing the AA flow. */ - completeUa?: string; -} - -const hashAgeAssuranceEvent = "ageAssuranceEvent"; - -export function isAgeAssuranceEvent(v: V): v is AgeAssuranceEvent & V { - return is$typed(v, id, hashAgeAssuranceEvent); -} - -export function validateAgeAssuranceEvent( - v: V, -): ValidationResult { - return validate(v, id, hashAgeAssuranceEvent); -} diff --git a/lex/types/app/bsky/unspecced/getAgeAssuranceState.ts b/lex/types/app/bsky/unspecced/getAgeAssuranceState.ts deleted file mode 100644 index 19b714b..0000000 --- a/lex/types/app/bsky/unspecced/getAgeAssuranceState.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyUnspeccedDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; -export type InputSchema = undefined; -export type OutputSchema = AppBskyUnspeccedDefs.AgeAssuranceState; -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getConfig.ts b/lex/types/app/bsky/unspecced/getConfig.ts deleted file mode 100644 index fde9af0..0000000 --- a/lex/types/app/bsky/unspecced/getConfig.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.unspecced.getConfig"; - -export type QueryParams = globalThis.Record; -export type InputSchema = undefined; - -export interface OutputSchema { - checkEmailConfirmed?: boolean; - liveNow?: (LiveNowConfig)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; - -export interface LiveNowConfig { - $type?: "app.bsky.unspecced.getConfig#liveNowConfig"; - did: string; - domains: (string)[]; -} - -const hashLiveNowConfig = "liveNowConfig"; - -export function isLiveNowConfig(v: V): v is LiveNowConfig & V { - return is$typed(v, id, hashLiveNowConfig); -} - -export function validateLiveNowConfig( - v: V, -): ValidationResult { - return validate(v, id, hashLiveNowConfig); -} diff --git a/lex/types/app/bsky/unspecced/getOnboardingSuggestedStarterPacks.ts b/lex/types/app/bsky/unspecced/getOnboardingSuggestedStarterPacks.ts deleted file mode 100644 index df1cba6..0000000 --- a/lex/types/app/bsky/unspecced/getOnboardingSuggestedStarterPacks.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyGraphDefs from "../graph/defs.ts"; - -export type QueryParams = { - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - starterPacks: (AppBskyGraphDefs.StarterPackView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getOnboardingSuggestedStarterPacksSkeleton.ts b/lex/types/app/bsky/unspecced/getOnboardingSuggestedStarterPacksSkeleton.ts deleted file mode 100644 index 4065423..0000000 --- a/lex/types/app/bsky/unspecced/getOnboardingSuggestedStarterPacksSkeleton.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - starterPacks: (string)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getOnboardingSuggestedUsersSkeleton.ts b/lex/types/app/bsky/unspecced/getOnboardingSuggestedUsersSkeleton.ts deleted file mode 100644 index 12e2857..0000000 --- a/lex/types/app/bsky/unspecced/getOnboardingSuggestedUsersSkeleton.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string; - /** Category of users to get suggestions for. */ - category?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - dids: (string)[]; - /** DEPRECATED: use recIdStr instead. */ - recId?: string; - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getPopularFeedGenerators.ts b/lex/types/app/bsky/unspecced/getPopularFeedGenerators.ts deleted file mode 100644 index cb91c0d..0000000 --- a/lex/types/app/bsky/unspecced/getPopularFeedGenerators.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "../feed/defs.ts"; - -export type QueryParams = { - limit: number; - cursor?: string; - query?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - feeds: (AppBskyFeedDefs.GeneratorView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getPostThreadOtherV2.ts b/lex/types/app/bsky/unspecced/getPostThreadOtherV2.ts deleted file mode 100644 index 6fde3dc..0000000 --- a/lex/types/app/bsky/unspecced/getPostThreadOtherV2.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -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; -const id = "app.bsky.unspecced.getPostThreadOtherV2"; - -export type QueryParams = { - /** Reference (AT-URI) to post record. This is the anchor post. */ - anchor: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - /** A flat list of other thread items. The depth of each item is indicated by the depth property inside the item. */ - thread: (ThreadItem)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; - -export interface ThreadItem { - $type?: "app.bsky.unspecced.getPostThreadOtherV2#threadItem"; - uri: string; - /** The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths. */ - depth: number; - value: $Typed | { $type: string }; -} - -const hashThreadItem = "threadItem"; - -export function isThreadItem(v: V): v is ThreadItem & V { - return is$typed(v, id, hashThreadItem); -} - -export function validateThreadItem(v: V): ValidationResult { - return validate(v, id, hashThreadItem); -} diff --git a/lex/types/app/bsky/unspecced/getPostThreadV2.ts b/lex/types/app/bsky/unspecced/getPostThreadV2.ts deleted file mode 100644 index 60cc88e..0000000 --- a/lex/types/app/bsky/unspecced/getPostThreadV2.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -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"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.unspecced.getPostThreadV2"; - -export type QueryParams = { - /** Reference (AT-URI) to post record. This is the anchor post, and the thread will be built around it. It can be any post in the tree, not necessarily a root post. */ - anchor: string; - /** Whether to include parents above the anchor. */ - above: boolean; - /** How many levels of replies to include below the anchor. */ - below: number; - /** Maximum of replies to include at each level of the thread, except for the direct replies to the anchor, which are (NOTE: currently, during unspecced phase) all returned (NOTE: later they might be paginated). */ - branchingFactor: number; - /** Sorting for the thread replies. */ - sort: - | "newest" - | "oldest" - | "top" - | (string & globalThis.Record); -}; -export type InputSchema = undefined; - -export interface OutputSchema { - /** A flat list of thread items. The depth of each item is indicated by the depth property inside the item. */ - thread: (ThreadItem)[]; - threadgate?: AppBskyFeedDefs.ThreadgateView; - /** Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them. */ - hasOtherReplies: boolean; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; - -export interface ThreadItem { - $type?: "app.bsky.unspecced.getPostThreadV2#threadItem"; - uri: string; - /** The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths. */ - depth: number; - value: - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string }; -} - -const hashThreadItem = "threadItem"; - -export function isThreadItem(v: V): v is ThreadItem & V { - return is$typed(v, id, hashThreadItem); -} - -export function validateThreadItem(v: V): ValidationResult { - return validate(v, id, hashThreadItem); -} diff --git a/lex/types/app/bsky/unspecced/getSuggestedFeeds.ts b/lex/types/app/bsky/unspecced/getSuggestedFeeds.ts deleted file mode 100644 index 134948f..0000000 --- a/lex/types/app/bsky/unspecced/getSuggestedFeeds.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyFeedDefs from "../feed/defs.ts"; - -export type QueryParams = { - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - feeds: (AppBskyFeedDefs.GeneratorView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts b/lex/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts deleted file mode 100644 index b9d035a..0000000 --- a/lex/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - feeds: (string)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getSuggestedOnboardingUsers.ts b/lex/types/app/bsky/unspecced/getSuggestedOnboardingUsers.ts deleted file mode 100644 index 59a3792..0000000 --- a/lex/types/app/bsky/unspecced/getSuggestedOnboardingUsers.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -export type QueryParams = { - /** Category of users to get suggestions for. */ - category?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - actors: (AppBskyActorDefs.ProfileView)[]; - /** DEPRECATED: use recIdStr instead. */ - recId?: string; - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getSuggestedStarterPacks.ts b/lex/types/app/bsky/unspecced/getSuggestedStarterPacks.ts deleted file mode 100644 index df1cba6..0000000 --- a/lex/types/app/bsky/unspecced/getSuggestedStarterPacks.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyGraphDefs from "../graph/defs.ts"; - -export type QueryParams = { - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - starterPacks: (AppBskyGraphDefs.StarterPackView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.ts b/lex/types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.ts deleted file mode 100644 index 4065423..0000000 --- a/lex/types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - starterPacks: (string)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getSuggestedUsers.ts b/lex/types/app/bsky/unspecced/getSuggestedUsers.ts deleted file mode 100644 index 59a3792..0000000 --- a/lex/types/app/bsky/unspecced/getSuggestedUsers.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -export type QueryParams = { - /** Category of users to get suggestions for. */ - category?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - actors: (AppBskyActorDefs.ProfileView)[]; - /** DEPRECATED: use recIdStr instead. */ - recId?: string; - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getSuggestedUsersForDiscover.ts b/lex/types/app/bsky/unspecced/getSuggestedUsersForDiscover.ts deleted file mode 100644 index 48a09ce..0000000 --- a/lex/types/app/bsky/unspecced/getSuggestedUsersForDiscover.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -export type QueryParams = { - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - actors: (AppBskyActorDefs.ProfileView)[]; - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getSuggestedUsersForDiscoverSkeleton.ts b/lex/types/app/bsky/unspecced/getSuggestedUsersForDiscoverSkeleton.ts deleted file mode 100644 index 94f4226..0000000 --- a/lex/types/app/bsky/unspecced/getSuggestedUsersForDiscoverSkeleton.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - dids: (string)[]; - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getSuggestedUsersForExplore.ts b/lex/types/app/bsky/unspecced/getSuggestedUsersForExplore.ts deleted file mode 100644 index 5450a96..0000000 --- a/lex/types/app/bsky/unspecced/getSuggestedUsersForExplore.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -export type QueryParams = { - /** Category of users to get suggestions for. */ - category?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - actors: (AppBskyActorDefs.ProfileView)[]; - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getSuggestedUsersForExploreSkeleton.ts b/lex/types/app/bsky/unspecced/getSuggestedUsersForExploreSkeleton.ts deleted file mode 100644 index fc34520..0000000 --- a/lex/types/app/bsky/unspecced/getSuggestedUsersForExploreSkeleton.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string; - /** Category of users to get suggestions for. */ - category?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - dids: (string)[]; - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getSuggestedUsersForSeeMore.ts b/lex/types/app/bsky/unspecced/getSuggestedUsersForSeeMore.ts deleted file mode 100644 index 5450a96..0000000 --- a/lex/types/app/bsky/unspecced/getSuggestedUsersForSeeMore.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyActorDefs from "../actor/defs.ts"; - -export type QueryParams = { - /** Category of users to get suggestions for. */ - category?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - actors: (AppBskyActorDefs.ProfileView)[]; - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getSuggestedUsersForSeeMoreSkeleton.ts b/lex/types/app/bsky/unspecced/getSuggestedUsersForSeeMoreSkeleton.ts deleted file mode 100644 index fc34520..0000000 --- a/lex/types/app/bsky/unspecced/getSuggestedUsersForSeeMoreSkeleton.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string; - /** Category of users to get suggestions for. */ - category?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - dids: (string)[]; - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts b/lex/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts deleted file mode 100644 index 12e2857..0000000 --- a/lex/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string; - /** Category of users to get suggestions for. */ - category?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - dids: (string)[]; - /** DEPRECATED: use recIdStr instead. */ - recId?: string; - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getSuggestionsSkeleton.ts b/lex/types/app/bsky/unspecced/getSuggestionsSkeleton.ts deleted file mode 100644 index dad7910..0000000 --- a/lex/types/app/bsky/unspecced/getSuggestionsSkeleton.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyUnspeccedDefs from "./defs.ts"; - -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. */ - viewer?: string; - limit: number; - cursor?: string; - /** DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer. */ - relativeToDid?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - actors: (AppBskyUnspeccedDefs.SkeletonSearchActor)[]; - /** DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer. */ - relativeToDid?: string; - /** DEPRECATED: use recIdStr instead. */ - recId?: number; - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getTaggedSuggestions.ts b/lex/types/app/bsky/unspecced/getTaggedSuggestions.ts deleted file mode 100644 index 13b4440..0000000 --- a/lex/types/app/bsky/unspecced/getTaggedSuggestions.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.unspecced.getTaggedSuggestions"; - -export type QueryParams = globalThis.Record; -export type InputSchema = undefined; - -export interface OutputSchema { - suggestions: (Suggestion)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; - -export interface Suggestion { - $type?: "app.bsky.unspecced.getTaggedSuggestions#suggestion"; - tag: string; - subjectType: - | "actor" - | "feed" - | (string & globalThis.Record); - subject: string; -} - -const hashSuggestion = "suggestion"; - -export function isSuggestion(v: V): v is Suggestion & V { - return is$typed(v, id, hashSuggestion); -} - -export function validateSuggestion(v: V): ValidationResult { - return validate(v, id, hashSuggestion); -} diff --git a/lex/types/app/bsky/unspecced/getTrendingTopics.ts b/lex/types/app/bsky/unspecced/getTrendingTopics.ts deleted file mode 100644 index 82f2240..0000000 --- a/lex/types/app/bsky/unspecced/getTrendingTopics.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyUnspeccedDefs from "./defs.ts"; - -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. */ - viewer?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - topics: (AppBskyUnspeccedDefs.TrendingTopic)[]; - suggested: (AppBskyUnspeccedDefs.TrendingTopic)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getTrends.ts b/lex/types/app/bsky/unspecced/getTrends.ts deleted file mode 100644 index bc31dac..0000000 --- a/lex/types/app/bsky/unspecced/getTrends.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyUnspeccedDefs from "./defs.ts"; - -export type QueryParams = { - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - trends: (AppBskyUnspeccedDefs.TrendView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getTrendsSkeleton.ts b/lex/types/app/bsky/unspecced/getTrendsSkeleton.ts deleted file mode 100644 index a401ef8..0000000 --- a/lex/types/app/bsky/unspecced/getTrendsSkeleton.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyUnspeccedDefs from "./defs.ts"; - -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - trends: (AppBskyUnspeccedDefs.SkeletonTrend)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/initAgeAssurance.ts b/lex/types/app/bsky/unspecced/initAgeAssurance.ts deleted file mode 100644 index 6208d2d..0000000 --- a/lex/types/app/bsky/unspecced/initAgeAssurance.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyUnspeccedDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - /** The user's email address to receive assurance instructions. */ - email: string; - /** The user's preferred language for communication during the assurance process. */ - language: string; - /** An ISO 3166-1 alpha-2 code of the user's location. */ - countryCode: string; -} - -export type OutputSchema = AppBskyUnspeccedDefs.AgeAssuranceState; - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "InvalidEmail" | "DidTooLong" | "InvalidInitiation"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/searchActorsSkeleton.ts b/lex/types/app/bsky/unspecced/searchActorsSkeleton.ts deleted file mode 100644 index 7b2281c..0000000 --- a/lex/types/app/bsky/unspecced/searchActorsSkeleton.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyUnspeccedDefs from "./defs.ts"; - -export type QueryParams = { - /** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax. */ - q: string; - /** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. */ - viewer?: string; - /** If true, acts as fast/simple 'typeahead' query. */ - typeahead?: boolean; - limit: number; - /** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */ - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ - hitsTotal?: number; - actors: (AppBskyUnspeccedDefs.SkeletonSearchActor)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "BadQueryString"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/searchPostsSkeleton.ts b/lex/types/app/bsky/unspecced/searchPostsSkeleton.ts deleted file mode 100644 index 7f08cc7..0000000 --- a/lex/types/app/bsky/unspecced/searchPostsSkeleton.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyUnspeccedDefs from "./defs.ts"; - -export type QueryParams = { - /** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */ - q: string; - /** Specifies the ranking order of results. */ - sort: "top" | "latest" | (string & globalThis.Record); - /** Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD). */ - since?: string; - /** Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). */ - until?: string; - /** Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. */ - mentions?: string; - /** Filter to posts by the given account. Handles are resolved to DID before query-time. */ - author?: string; - /** Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. */ - lang?: string; - /** Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. */ - domain?: string; - /** Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. */ - url?: string; - /** Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. */ - tag?: string[]; - /** DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries. */ - viewer?: string; - limit: number; - /** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */ - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ - hitsTotal?: number; - posts: (AppBskyUnspeccedDefs.SkeletonSearchPost)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "BadQueryString"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/searchStarterPacksSkeleton.ts b/lex/types/app/bsky/unspecced/searchStarterPacksSkeleton.ts deleted file mode 100644 index 6246283..0000000 --- a/lex/types/app/bsky/unspecced/searchStarterPacksSkeleton.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyUnspeccedDefs from "./defs.ts"; - -export type QueryParams = { - /** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */ - q: string; - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string; - limit: number; - /** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */ - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ - hitsTotal?: number; - starterPacks: (AppBskyUnspeccedDefs.SkeletonSearchStarterPack)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "BadQueryString"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/video/defs.ts b/lex/types/app/bsky/video/defs.ts deleted file mode 100644 index e6613c3..0000000 --- a/lex/types/app/bsky/video/defs.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { BlobRef } from "@atp/lexicon"; -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "app.bsky.video.defs"; - -export interface JobStatus { - $type?: "app.bsky.video.defs#jobStatus"; - jobId: string; - did: string; - /** The state of the video processing job. All values not listed as a known value indicate that the job is in process. */ - state: - | "JOB_STATE_COMPLETED" - | "JOB_STATE_FAILED" - | (string & globalThis.Record); - /** Progress within the current processing state. */ - progress?: number; - blob?: BlobRef; - error?: string; - message?: string; -} - -const hashJobStatus = "jobStatus"; - -export function isJobStatus(v: V): v is JobStatus & V { - return is$typed(v, id, hashJobStatus); -} - -export function validateJobStatus(v: V): ValidationResult { - return validate(v, id, hashJobStatus); -} diff --git a/lex/types/app/bsky/video/getJobStatus.ts b/lex/types/app/bsky/video/getJobStatus.ts deleted file mode 100644 index 08ca76a..0000000 --- a/lex/types/app/bsky/video/getJobStatus.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyVideoDefs from "./defs.ts"; - -export type QueryParams = { - jobId: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - jobStatus: AppBskyVideoDefs.JobStatus; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/video/getUploadLimits.ts b/lex/types/app/bsky/video/getUploadLimits.ts deleted file mode 100644 index e18fdd5..0000000 --- a/lex/types/app/bsky/video/getUploadLimits.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; -export type InputSchema = undefined; - -export interface OutputSchema { - canUpload: boolean; - remainingDailyVideos?: number; - remainingDailyBytes?: number; - message?: string; - error?: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/video/uploadVideo.ts b/lex/types/app/bsky/video/uploadVideo.ts deleted file mode 100644 index 12dca2c..0000000 --- a/lex/types/app/bsky/video/uploadVideo.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as AppBskyVideoDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; -export type InputSchema = string | Uint8Array | Blob; - -export interface OutputSchema { - jobStatus: AppBskyVideoDefs.JobStatus; -} - -export interface HandlerInput { - encoding: "video/mp4"; - body: ReadableStream; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/actor/declaration.ts b/lex/types/chat/bsky/actor/declaration.ts deleted file mode 100644 index b8d9d40..0000000 --- a/lex/types/chat/bsky/actor/declaration.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "chat.bsky.actor.declaration"; - -export interface Record { - $type: "chat.bsky.actor.declaration"; - allowIncoming: - | "all" - | "none" - | "following" - | (string & globalThis.Record); - [k: string]: unknown; -} - -const hashRecord = "main"; - -export function isRecord(v: V): v is Record & V { - return is$typed(v, id, hashRecord); -} - -export function validateRecord(v: V): ValidationResult { - return validate(v, id, hashRecord, true); -} - -export type Main = Record; diff --git a/lex/types/chat/bsky/actor/defs.ts b/lex/types/chat/bsky/actor/defs.ts deleted file mode 100644 index 7a41194..0000000 --- a/lex/types/chat/bsky/actor/defs.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as AppBskyActorDefs from "../../../app/bsky/actor/defs.ts"; -import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "chat.bsky.actor.defs"; - -export interface ProfileViewBasic { - $type?: "chat.bsky.actor.defs#profileViewBasic"; - did: string; - handle: string; - displayName?: string; - avatar?: string; - associated?: AppBskyActorDefs.ProfileAssociated; - viewer?: AppBskyActorDefs.ViewerState; - labels?: (ComAtprotoLabelDefs.Label)[]; - /** Set to true when the actor cannot actively participate in conversations */ - chatDisabled?: boolean; - verification?: AppBskyActorDefs.VerificationState; -} - -const hashProfileViewBasic = "profileViewBasic"; - -export function isProfileViewBasic(v: V): v is ProfileViewBasic & V { - return is$typed(v, id, hashProfileViewBasic); -} - -export function validateProfileViewBasic( - v: V, -): ValidationResult { - return validate(v, id, hashProfileViewBasic); -} diff --git a/lex/types/chat/bsky/actor/deleteAccount.ts b/lex/types/chat/bsky/actor/deleteAccount.ts deleted file mode 100644 index c4cb57a..0000000 --- a/lex/types/chat/bsky/actor/deleteAccount.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; -export type InputSchema = undefined; -export type OutputSchema = globalThis.Record; -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/actor/exportAccountData.ts b/lex/types/chat/bsky/actor/exportAccountData.ts deleted file mode 100644 index c15b0b6..0000000 --- a/lex/types/chat/bsky/actor/exportAccountData.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; -export type InputSchema = undefined; -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/jsonl"; - body: Uint8Array | ReadableStream; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/authFullChatClient.ts b/lex/types/chat/bsky/authFullChatClient.ts deleted file mode 100644 index 55ddc64..0000000 --- a/lex/types/chat/bsky/authFullChatClient.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { LexPermissionSet } from "@atp/lexicon"; - -export type Main = LexPermissionSet; diff --git a/lex/types/chat/bsky/convo/acceptConvo.ts b/lex/types/chat/bsky/convo/acceptConvo.ts deleted file mode 100644 index 713d533..0000000 --- a/lex/types/chat/bsky/convo/acceptConvo.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - convoId: string; -} - -export interface OutputSchema { - /** Rev when the convo was accepted. If not present, the convo was already accepted. */ - rev?: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/addReaction.ts b/lex/types/chat/bsky/convo/addReaction.ts deleted file mode 100644 index c0f374d..0000000 --- a/lex/types/chat/bsky/convo/addReaction.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ChatBskyConvoDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - convoId: string; - messageId: string; - value: string; -} - -export interface OutputSchema { - message: ChatBskyConvoDefs.MessageView; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: - | "ReactionMessageDeleted" - | "ReactionLimitReached" - | "ReactionInvalidValue"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/defs.ts b/lex/types/chat/bsky/convo/defs.ts deleted file mode 100644 index 294eb7e..0000000 --- a/lex/types/chat/bsky/convo/defs.ts +++ /dev/null @@ -1,386 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -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"; - -const is$typed = _is$typed, validate = _validate; -const id = "chat.bsky.convo.defs"; - -export interface MessageRef { - $type?: "chat.bsky.convo.defs#messageRef"; - did: string; - convoId: string; - messageId: string; -} - -const hashMessageRef = "messageRef"; - -export function isMessageRef(v: V): v is MessageRef & V { - return is$typed(v, id, hashMessageRef); -} - -export function validateMessageRef(v: V): ValidationResult { - return validate(v, id, hashMessageRef); -} - -export interface MessageInput { - $type?: "chat.bsky.convo.defs#messageInput"; - text: string; - /** Annotations of text (mentions, URLs, hashtags, etc) */ - facets?: (AppBskyRichtextFacet.Main)[]; - embed?: $Typed | { $type: string }; -} - -const hashMessageInput = "messageInput"; - -export function isMessageInput(v: V): v is MessageInput & V { - return is$typed(v, id, hashMessageInput); -} - -export function validateMessageInput( - v: V, -): ValidationResult { - return validate(v, id, hashMessageInput); -} - -export interface MessageView { - $type?: "chat.bsky.convo.defs#messageView"; - id: string; - rev: string; - text: string; - /** Annotations of text (mentions, URLs, hashtags, etc) */ - facets?: (AppBskyRichtextFacet.Main)[]; - embed?: $Typed | { $type: string }; - /** Reactions to this message, in ascending order of creation time. */ - reactions?: (ReactionView)[]; - sender: MessageViewSender; - sentAt: string; -} - -const hashMessageView = "messageView"; - -export function isMessageView(v: V): v is MessageView & V { - return is$typed(v, id, hashMessageView); -} - -export function validateMessageView( - v: V, -): ValidationResult { - return validate(v, id, hashMessageView); -} - -export interface DeletedMessageView { - $type?: "chat.bsky.convo.defs#deletedMessageView"; - id: string; - rev: string; - sender: MessageViewSender; - sentAt: string; -} - -const hashDeletedMessageView = "deletedMessageView"; - -export function isDeletedMessageView(v: V): v is DeletedMessageView & V { - return is$typed(v, id, hashDeletedMessageView); -} - -export function validateDeletedMessageView( - v: V, -): ValidationResult { - return validate(v, id, hashDeletedMessageView); -} - -export interface MessageViewSender { - $type?: "chat.bsky.convo.defs#messageViewSender"; - did: string; -} - -const hashMessageViewSender = "messageViewSender"; - -export function isMessageViewSender(v: V): v is MessageViewSender & V { - return is$typed(v, id, hashMessageViewSender); -} - -export function validateMessageViewSender( - v: V, -): ValidationResult { - return validate(v, id, hashMessageViewSender); -} - -export interface ReactionView { - $type?: "chat.bsky.convo.defs#reactionView"; - value: string; - sender: ReactionViewSender; - createdAt: string; -} - -const hashReactionView = "reactionView"; - -export function isReactionView(v: V): v is ReactionView & V { - return is$typed(v, id, hashReactionView); -} - -export function validateReactionView( - v: V, -): ValidationResult { - return validate(v, id, hashReactionView); -} - -export interface ReactionViewSender { - $type?: "chat.bsky.convo.defs#reactionViewSender"; - did: string; -} - -const hashReactionViewSender = "reactionViewSender"; - -export function isReactionViewSender(v: V): v is ReactionViewSender & V { - return is$typed(v, id, hashReactionViewSender); -} - -export function validateReactionViewSender( - v: V, -): ValidationResult { - return validate(v, id, hashReactionViewSender); -} - -export interface MessageAndReactionView { - $type?: "chat.bsky.convo.defs#messageAndReactionView"; - message: MessageView; - reaction: ReactionView; -} - -const hashMessageAndReactionView = "messageAndReactionView"; - -export function isMessageAndReactionView( - v: V, -): v is MessageAndReactionView & V { - return is$typed(v, id, hashMessageAndReactionView); -} - -export function validateMessageAndReactionView( - v: V, -): ValidationResult { - return validate( - v, - id, - hashMessageAndReactionView, - ); -} - -export interface ConvoView { - $type?: "chat.bsky.convo.defs#convoView"; - id: string; - rev: string; - members: (ChatBskyActorDefs.ProfileViewBasic)[]; - lastMessage?: $Typed | $Typed | { - $type: string; - }; - lastReaction?: $Typed | { $type: string }; - muted: boolean; - status?: - | "request" - | "accepted" - | (string & globalThis.Record); - unreadCount: number; -} - -const hashConvoView = "convoView"; - -export function isConvoView(v: V): v is ConvoView & V { - return is$typed(v, id, hashConvoView); -} - -export function validateConvoView(v: V): ValidationResult { - return validate(v, id, hashConvoView); -} - -export interface LogBeginConvo { - $type?: "chat.bsky.convo.defs#logBeginConvo"; - rev: string; - convoId: string; -} - -const hashLogBeginConvo = "logBeginConvo"; - -export function isLogBeginConvo(v: V): v is LogBeginConvo & V { - return is$typed(v, id, hashLogBeginConvo); -} - -export function validateLogBeginConvo( - v: V, -): ValidationResult { - return validate(v, id, hashLogBeginConvo); -} - -export interface LogAcceptConvo { - $type?: "chat.bsky.convo.defs#logAcceptConvo"; - rev: string; - convoId: string; -} - -const hashLogAcceptConvo = "logAcceptConvo"; - -export function isLogAcceptConvo(v: V): v is LogAcceptConvo & V { - return is$typed(v, id, hashLogAcceptConvo); -} - -export function validateLogAcceptConvo( - v: V, -): ValidationResult { - return validate(v, id, hashLogAcceptConvo); -} - -export interface LogLeaveConvo { - $type?: "chat.bsky.convo.defs#logLeaveConvo"; - rev: string; - convoId: string; -} - -const hashLogLeaveConvo = "logLeaveConvo"; - -export function isLogLeaveConvo(v: V): v is LogLeaveConvo & V { - return is$typed(v, id, hashLogLeaveConvo); -} - -export function validateLogLeaveConvo( - v: V, -): ValidationResult { - return validate(v, id, hashLogLeaveConvo); -} - -export interface LogMuteConvo { - $type?: "chat.bsky.convo.defs#logMuteConvo"; - rev: string; - convoId: string; -} - -const hashLogMuteConvo = "logMuteConvo"; - -export function isLogMuteConvo(v: V): v is LogMuteConvo & V { - return is$typed(v, id, hashLogMuteConvo); -} - -export function validateLogMuteConvo( - v: V, -): ValidationResult { - return validate(v, id, hashLogMuteConvo); -} - -export interface LogUnmuteConvo { - $type?: "chat.bsky.convo.defs#logUnmuteConvo"; - rev: string; - convoId: string; -} - -const hashLogUnmuteConvo = "logUnmuteConvo"; - -export function isLogUnmuteConvo(v: V): v is LogUnmuteConvo & V { - return is$typed(v, id, hashLogUnmuteConvo); -} - -export function validateLogUnmuteConvo( - v: V, -): ValidationResult { - return validate(v, id, hashLogUnmuteConvo); -} - -export interface LogCreateMessage { - $type?: "chat.bsky.convo.defs#logCreateMessage"; - rev: string; - convoId: string; - message: $Typed | $Typed | { $type: string }; -} - -const hashLogCreateMessage = "logCreateMessage"; - -export function isLogCreateMessage(v: V): v is LogCreateMessage & V { - return is$typed(v, id, hashLogCreateMessage); -} - -export function validateLogCreateMessage( - v: V, -): ValidationResult { - return validate(v, id, hashLogCreateMessage); -} - -export interface LogDeleteMessage { - $type?: "chat.bsky.convo.defs#logDeleteMessage"; - rev: string; - convoId: string; - message: $Typed | $Typed | { $type: string }; -} - -const hashLogDeleteMessage = "logDeleteMessage"; - -export function isLogDeleteMessage(v: V): v is LogDeleteMessage & V { - return is$typed(v, id, hashLogDeleteMessage); -} - -export function validateLogDeleteMessage( - v: V, -): ValidationResult { - return validate(v, id, hashLogDeleteMessage); -} - -export interface LogReadMessage { - $type?: "chat.bsky.convo.defs#logReadMessage"; - rev: string; - convoId: string; - message: $Typed | $Typed | { $type: string }; -} - -const hashLogReadMessage = "logReadMessage"; - -export function isLogReadMessage(v: V): v is LogReadMessage & V { - return is$typed(v, id, hashLogReadMessage); -} - -export function validateLogReadMessage( - v: V, -): ValidationResult { - return validate(v, id, hashLogReadMessage); -} - -export interface LogAddReaction { - $type?: "chat.bsky.convo.defs#logAddReaction"; - rev: string; - convoId: string; - message: $Typed | $Typed | { $type: string }; - reaction: ReactionView; -} - -const hashLogAddReaction = "logAddReaction"; - -export function isLogAddReaction(v: V): v is LogAddReaction & V { - return is$typed(v, id, hashLogAddReaction); -} - -export function validateLogAddReaction( - v: V, -): ValidationResult { - return validate(v, id, hashLogAddReaction); -} - -export interface LogRemoveReaction { - $type?: "chat.bsky.convo.defs#logRemoveReaction"; - rev: string; - convoId: string; - message: $Typed | $Typed | { $type: string }; - reaction: ReactionView; -} - -const hashLogRemoveReaction = "logRemoveReaction"; - -export function isLogRemoveReaction(v: V): v is LogRemoveReaction & V { - return is$typed(v, id, hashLogRemoveReaction); -} - -export function validateLogRemoveReaction( - v: V, -): ValidationResult { - return validate(v, id, hashLogRemoveReaction); -} diff --git a/lex/types/chat/bsky/convo/deleteMessageForSelf.ts b/lex/types/chat/bsky/convo/deleteMessageForSelf.ts deleted file mode 100644 index 2f88086..0000000 --- a/lex/types/chat/bsky/convo/deleteMessageForSelf.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ChatBskyConvoDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - convoId: string; - messageId: string; -} - -export type OutputSchema = ChatBskyConvoDefs.DeletedMessageView; - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/getConvo.ts b/lex/types/chat/bsky/convo/getConvo.ts deleted file mode 100644 index 32eabe0..0000000 --- a/lex/types/chat/bsky/convo/getConvo.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ChatBskyConvoDefs from "./defs.ts"; - -export type QueryParams = { - convoId: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/getConvoAvailability.ts b/lex/types/chat/bsky/convo/getConvoAvailability.ts deleted file mode 100644 index 19f4cd1..0000000 --- a/lex/types/chat/bsky/convo/getConvoAvailability.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ChatBskyConvoDefs from "./defs.ts"; - -export type QueryParams = { - members: string[]; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - canChat: boolean; - convo?: ChatBskyConvoDefs.ConvoView; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/getConvoForMembers.ts b/lex/types/chat/bsky/convo/getConvoForMembers.ts deleted file mode 100644 index 5d2ae45..0000000 --- a/lex/types/chat/bsky/convo/getConvoForMembers.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ChatBskyConvoDefs from "./defs.ts"; - -export type QueryParams = { - members: string[]; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/getLog.ts b/lex/types/chat/bsky/convo/getLog.ts deleted file mode 100644 index 78f0316..0000000 --- a/lex/types/chat/bsky/convo/getLog.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { $Typed } from "../../../../util.ts"; -import type * as ChatBskyConvoDefs from "./defs.ts"; - -export type QueryParams = { - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - logs: ( - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string } - )[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/getMessages.ts b/lex/types/chat/bsky/convo/getMessages.ts deleted file mode 100644 index 66b4343..0000000 --- a/lex/types/chat/bsky/convo/getMessages.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { $Typed } from "../../../../util.ts"; -import type * as ChatBskyConvoDefs from "./defs.ts"; - -export type QueryParams = { - convoId: string; - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - messages: ( - | $Typed - | $Typed - | { $type: string } - )[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/leaveConvo.ts b/lex/types/chat/bsky/convo/leaveConvo.ts deleted file mode 100644 index 4e9f8e6..0000000 --- a/lex/types/chat/bsky/convo/leaveConvo.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - convoId: string; -} - -export interface OutputSchema { - convoId: string; - rev: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/listConvos.ts b/lex/types/chat/bsky/convo/listConvos.ts deleted file mode 100644 index 1cf0ce7..0000000 --- a/lex/types/chat/bsky/convo/listConvos.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ChatBskyConvoDefs from "./defs.ts"; - -export type QueryParams = { - limit: number; - cursor?: string; - readState?: "unread" | (string & globalThis.Record); - status?: - | "request" - | "accepted" - | (string & globalThis.Record); -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - convos: (ChatBskyConvoDefs.ConvoView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/muteConvo.ts b/lex/types/chat/bsky/convo/muteConvo.ts deleted file mode 100644 index e91c3e5..0000000 --- a/lex/types/chat/bsky/convo/muteConvo.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ChatBskyConvoDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - convoId: string; -} - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/removeReaction.ts b/lex/types/chat/bsky/convo/removeReaction.ts deleted file mode 100644 index 86be788..0000000 --- a/lex/types/chat/bsky/convo/removeReaction.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ChatBskyConvoDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - convoId: string; - messageId: string; - value: string; -} - -export interface OutputSchema { - message: ChatBskyConvoDefs.MessageView; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "ReactionMessageDeleted" | "ReactionInvalidValue"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/sendMessage.ts b/lex/types/chat/bsky/convo/sendMessage.ts deleted file mode 100644 index 6b90850..0000000 --- a/lex/types/chat/bsky/convo/sendMessage.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ChatBskyConvoDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - convoId: string; - message: ChatBskyConvoDefs.MessageInput; -} - -export type OutputSchema = ChatBskyConvoDefs.MessageView; - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/sendMessageBatch.ts b/lex/types/chat/bsky/convo/sendMessageBatch.ts deleted file mode 100644 index e74cb2b..0000000 --- a/lex/types/chat/bsky/convo/sendMessageBatch.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as ChatBskyConvoDefs from "./defs.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "chat.bsky.convo.sendMessageBatch"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - items: (BatchItem)[]; -} - -export interface OutputSchema { - items: (ChatBskyConvoDefs.MessageView)[]; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; - -export interface BatchItem { - $type?: "chat.bsky.convo.sendMessageBatch#batchItem"; - convoId: string; - message: ChatBskyConvoDefs.MessageInput; -} - -const hashBatchItem = "batchItem"; - -export function isBatchItem(v: V): v is BatchItem & V { - return is$typed(v, id, hashBatchItem); -} - -export function validateBatchItem(v: V): ValidationResult { - return validate(v, id, hashBatchItem); -} diff --git a/lex/types/chat/bsky/convo/unmuteConvo.ts b/lex/types/chat/bsky/convo/unmuteConvo.ts deleted file mode 100644 index e91c3e5..0000000 --- a/lex/types/chat/bsky/convo/unmuteConvo.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ChatBskyConvoDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - convoId: string; -} - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/updateAllRead.ts b/lex/types/chat/bsky/convo/updateAllRead.ts deleted file mode 100644 index 2359812..0000000 --- a/lex/types/chat/bsky/convo/updateAllRead.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - status?: - | "request" - | "accepted" - | (string & globalThis.Record); -} - -export interface OutputSchema { - /** The count of updated convos. */ - updatedCount: number; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/updateRead.ts b/lex/types/chat/bsky/convo/updateRead.ts deleted file mode 100644 index 877f504..0000000 --- a/lex/types/chat/bsky/convo/updateRead.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ChatBskyConvoDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - convoId: string; - messageId?: string; -} - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/moderation/getActorMetadata.ts b/lex/types/chat/bsky/moderation/getActorMetadata.ts deleted file mode 100644 index 1158265..0000000 --- a/lex/types/chat/bsky/moderation/getActorMetadata.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "chat.bsky.moderation.getActorMetadata"; - -export type QueryParams = { - actor: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - day: Metadata; - month: Metadata; - all: Metadata; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; - -export interface Metadata { - $type?: "chat.bsky.moderation.getActorMetadata#metadata"; - messagesSent: number; - messagesReceived: number; - convos: number; - convosStarted: number; -} - -const hashMetadata = "metadata"; - -export function isMetadata(v: V): v is Metadata & V { - return is$typed(v, id, hashMetadata); -} - -export function validateMetadata(v: V): ValidationResult { - return validate(v, id, hashMetadata); -} diff --git a/lex/types/chat/bsky/moderation/getMessageContext.ts b/lex/types/chat/bsky/moderation/getMessageContext.ts deleted file mode 100644 index 4d3304e..0000000 --- a/lex/types/chat/bsky/moderation/getMessageContext.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { $Typed } from "../../../../util.ts"; -import type * as ChatBskyConvoDefs from "../convo/defs.ts"; - -export type QueryParams = { - /** Conversation that the message is from. NOTE: this field will eventually be required. */ - convoId?: string; - messageId: string; - before: number; - after: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - messages: ( - | $Typed - | $Typed - | { $type: string } - )[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/moderation/updateActorAccess.ts b/lex/types/chat/bsky/moderation/updateActorAccess.ts deleted file mode 100644 index 7852dc3..0000000 --- a/lex/types/chat/bsky/moderation/updateActorAccess.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - actor: string; - allowAccess: boolean; - ref?: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/defs.ts b/lex/types/com/atproto/admin/defs.ts deleted file mode 100644 index d1c787b..0000000 --- a/lex/types/com/atproto/admin/defs.ts +++ /dev/null @@ -1,106 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; -import type * as ComAtprotoServerDefs from "../server/defs.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "com.atproto.admin.defs"; - -export interface StatusAttr { - $type?: "com.atproto.admin.defs#statusAttr"; - applied: boolean; - ref?: string; -} - -const hashStatusAttr = "statusAttr"; - -export function isStatusAttr(v: V): v is StatusAttr & V { - return is$typed(v, id, hashStatusAttr); -} - -export function validateStatusAttr(v: V): ValidationResult { - return validate(v, id, hashStatusAttr); -} - -export interface AccountView { - $type?: "com.atproto.admin.defs#accountView"; - did: string; - handle: string; - email?: string; - relatedRecords?: ({ [_ in string]: unknown })[]; - indexedAt: string; - invitedBy?: ComAtprotoServerDefs.InviteCode; - invites?: (ComAtprotoServerDefs.InviteCode)[]; - invitesDisabled?: boolean; - emailConfirmedAt?: string; - inviteNote?: string; - deactivatedAt?: string; - threatSignatures?: (ThreatSignature)[]; -} - -const hashAccountView = "accountView"; - -export function isAccountView(v: V): v is AccountView & V { - return is$typed(v, id, hashAccountView); -} - -export function validateAccountView( - v: V, -): ValidationResult { - return validate(v, id, hashAccountView); -} - -export interface RepoRef { - $type?: "com.atproto.admin.defs#repoRef"; - did: string; -} - -const hashRepoRef = "repoRef"; - -export function isRepoRef(v: V): v is RepoRef & V { - return is$typed(v, id, hashRepoRef); -} - -export function validateRepoRef(v: V): ValidationResult { - return validate(v, id, hashRepoRef); -} - -export interface RepoBlobRef { - $type?: "com.atproto.admin.defs#repoBlobRef"; - did: string; - cid: string; - recordUri?: string; -} - -const hashRepoBlobRef = "repoBlobRef"; - -export function isRepoBlobRef(v: V): v is RepoBlobRef & V { - return is$typed(v, id, hashRepoBlobRef); -} - -export function validateRepoBlobRef( - v: V, -): ValidationResult { - return validate(v, id, hashRepoBlobRef); -} - -export interface ThreatSignature { - $type?: "com.atproto.admin.defs#threatSignature"; - property: string; - value: string; -} - -const hashThreatSignature = "threatSignature"; - -export function isThreatSignature(v: V): v is ThreatSignature & V { - return is$typed(v, id, hashThreatSignature); -} - -export function validateThreatSignature( - v: V, -): ValidationResult { - return validate(v, id, hashThreatSignature); -} diff --git a/lex/types/com/atproto/admin/deleteAccount.ts b/lex/types/com/atproto/admin/deleteAccount.ts deleted file mode 100644 index c1c5baf..0000000 --- a/lex/types/com/atproto/admin/deleteAccount.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - did: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/disableAccountInvites.ts b/lex/types/com/atproto/admin/disableAccountInvites.ts deleted file mode 100644 index ed4f5e8..0000000 --- a/lex/types/com/atproto/admin/disableAccountInvites.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - account: string; - /** Optional reason for disabled invites. */ - note?: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/disableInviteCodes.ts b/lex/types/com/atproto/admin/disableInviteCodes.ts deleted file mode 100644 index c14992c..0000000 --- a/lex/types/com/atproto/admin/disableInviteCodes.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - codes?: (string)[]; - accounts?: (string)[]; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/enableAccountInvites.ts b/lex/types/com/atproto/admin/enableAccountInvites.ts deleted file mode 100644 index 36eef2f..0000000 --- a/lex/types/com/atproto/admin/enableAccountInvites.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - account: string; - /** Optional reason for enabled invites. */ - note?: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/getAccountInfo.ts b/lex/types/com/atproto/admin/getAccountInfo.ts deleted file mode 100644 index 9752b33..0000000 --- a/lex/types/com/atproto/admin/getAccountInfo.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ComAtprotoAdminDefs from "./defs.ts"; - -export type QueryParams = { - did: string; -}; -export type InputSchema = undefined; -export type OutputSchema = ComAtprotoAdminDefs.AccountView; -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/admin/getAccountInfos.ts b/lex/types/com/atproto/admin/getAccountInfos.ts deleted file mode 100644 index c4a7acf..0000000 --- a/lex/types/com/atproto/admin/getAccountInfos.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ComAtprotoAdminDefs from "./defs.ts"; - -export type QueryParams = { - dids: string[]; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - infos: (ComAtprotoAdminDefs.AccountView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/admin/getInviteCodes.ts b/lex/types/com/atproto/admin/getInviteCodes.ts deleted file mode 100644 index b3e0873..0000000 --- a/lex/types/com/atproto/admin/getInviteCodes.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ComAtprotoServerDefs from "../server/defs.ts"; - -export type QueryParams = { - sort: "recent" | "usage" | (string & globalThis.Record); - limit: number; - cursor?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - codes: (ComAtprotoServerDefs.InviteCode)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/admin/getSubjectStatus.ts b/lex/types/com/atproto/admin/getSubjectStatus.ts deleted file mode 100644 index a01860f..0000000 --- a/lex/types/com/atproto/admin/getSubjectStatus.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { $Typed } from "../../../../util.ts"; -import type * as ComAtprotoAdminDefs from "./defs.ts"; -import type * as ComAtprotoRepoStrongRef from "../repo/strongRef.ts"; - -export type QueryParams = { - did?: string; - uri?: string; - blob?: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - subject: - | $Typed - | $Typed - | $Typed - | { $type: string }; - takedown?: ComAtprotoAdminDefs.StatusAttr; - deactivated?: ComAtprotoAdminDefs.StatusAttr; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/admin/searchAccounts.ts b/lex/types/com/atproto/admin/searchAccounts.ts deleted file mode 100644 index f24a144..0000000 --- a/lex/types/com/atproto/admin/searchAccounts.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ComAtprotoAdminDefs from "./defs.ts"; - -export type QueryParams = { - email?: string; - cursor?: string; - limit: number; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - cursor?: string; - accounts: (ComAtprotoAdminDefs.AccountView)[]; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/admin/sendEmail.ts b/lex/types/com/atproto/admin/sendEmail.ts deleted file mode 100644 index 5ecabd3..0000000 --- a/lex/types/com/atproto/admin/sendEmail.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - recipientDid: string; - content: string; - subject?: string; - senderDid: string; - /** Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers */ - comment?: string; -} - -export interface OutputSchema { - sent: boolean; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/admin/updateAccountEmail.ts b/lex/types/com/atproto/admin/updateAccountEmail.ts deleted file mode 100644 index bd5b139..0000000 --- a/lex/types/com/atproto/admin/updateAccountEmail.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - /** The handle or DID of the repo. */ - account: string; - email: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/updateAccountHandle.ts b/lex/types/com/atproto/admin/updateAccountHandle.ts deleted file mode 100644 index 8922a87..0000000 --- a/lex/types/com/atproto/admin/updateAccountHandle.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - did: string; - handle: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/updateAccountPassword.ts b/lex/types/com/atproto/admin/updateAccountPassword.ts deleted file mode 100644 index c7530a1..0000000 --- a/lex/types/com/atproto/admin/updateAccountPassword.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - did: string; - password: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/updateAccountSigningKey.ts b/lex/types/com/atproto/admin/updateAccountSigningKey.ts deleted file mode 100644 index e6e15f2..0000000 --- a/lex/types/com/atproto/admin/updateAccountSigningKey.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - did: string; - /** Did-key formatted public key */ - signingKey: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/updateSubjectStatus.ts b/lex/types/com/atproto/admin/updateSubjectStatus.ts deleted file mode 100644 index 190f53e..0000000 --- a/lex/types/com/atproto/admin/updateSubjectStatus.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type { $Typed } from "../../../../util.ts"; -import type * as ComAtprotoAdminDefs from "./defs.ts"; -import type * as ComAtprotoRepoStrongRef from "../repo/strongRef.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - subject: - | $Typed - | $Typed - | $Typed - | { $type: string }; - takedown?: ComAtprotoAdminDefs.StatusAttr; - deactivated?: ComAtprotoAdminDefs.StatusAttr; -} - -export interface OutputSchema { - subject: - | $Typed - | $Typed - | $Typed - | { $type: string }; - takedown?: ComAtprotoAdminDefs.StatusAttr; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/identity/defs.ts b/lex/types/com/atproto/identity/defs.ts deleted file mode 100644 index 78514b0..0000000 --- a/lex/types/com/atproto/identity/defs.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "com.atproto.identity.defs"; - -export interface IdentityInfo { - $type?: "com.atproto.identity.defs#identityInfo"; - did: string; - /** The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document. */ - handle: string; - /** The complete DID document for the identity. */ - didDoc: { [_ in string]: unknown }; -} - -const hashIdentityInfo = "identityInfo"; - -export function isIdentityInfo(v: V): v is IdentityInfo & V { - return is$typed(v, id, hashIdentityInfo); -} - -export function validateIdentityInfo( - v: V, -): ValidationResult { - return validate(v, id, hashIdentityInfo); -} diff --git a/lex/types/com/atproto/identity/getRecommendedDidCredentials.ts b/lex/types/com/atproto/identity/getRecommendedDidCredentials.ts deleted file mode 100644 index 87e0a0f..0000000 --- a/lex/types/com/atproto/identity/getRecommendedDidCredentials.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; -export type InputSchema = undefined; - -export interface OutputSchema { - /** Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs. */ - rotationKeys?: (string)[]; - alsoKnownAs?: (string)[]; - verificationMethods?: { [_ in string]: unknown }; - services?: { [_ in string]: unknown }; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/identity/refreshIdentity.ts b/lex/types/com/atproto/identity/refreshIdentity.ts deleted file mode 100644 index a3c0711..0000000 --- a/lex/types/com/atproto/identity/refreshIdentity.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ComAtprotoIdentityDefs from "./defs.ts"; - -export type QueryParams = globalThis.Record; - -export interface InputSchema { - identifier: string; -} - -export type OutputSchema = ComAtprotoIdentityDefs.IdentityInfo; - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "HandleNotFound" | "DidNotFound" | "DidDeactivated"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/identity/requestPlcOperationSignature.ts b/lex/types/com/atproto/identity/requestPlcOperationSignature.ts deleted file mode 100644 index ed8f629..0000000 --- a/lex/types/com/atproto/identity/requestPlcOperationSignature.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; -export type InputSchema = undefined; -export type HandlerInput = void; - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/identity/resolveDid.ts b/lex/types/com/atproto/identity/resolveDid.ts deleted file mode 100644 index 7ce256c..0000000 --- a/lex/types/com/atproto/identity/resolveDid.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = { - /** DID to resolve. */ - did: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - /** The complete DID document for the identity. */ - didDoc: { [_ in string]: unknown }; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "DidNotFound" | "DidDeactivated"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/identity/resolveHandle.ts b/lex/types/com/atproto/identity/resolveHandle.ts deleted file mode 100644 index 39e73b5..0000000 --- a/lex/types/com/atproto/identity/resolveHandle.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = { - /** The handle to resolve. */ - handle: string; -}; -export type InputSchema = undefined; - -export interface OutputSchema { - did: string; -} - -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "HandleNotFound"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/identity/resolveIdentity.ts b/lex/types/com/atproto/identity/resolveIdentity.ts deleted file mode 100644 index 5838229..0000000 --- a/lex/types/com/atproto/identity/resolveIdentity.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import type * as ComAtprotoIdentityDefs from "./defs.ts"; - -export type QueryParams = { - /** Handle or DID to resolve. */ - identifier: string; -}; -export type InputSchema = undefined; -export type OutputSchema = ComAtprotoIdentityDefs.IdentityInfo; -export type HandlerInput = void; - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; - error?: "HandleNotFound" | "DidNotFound" | "DidDeactivated"; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/identity/signPlcOperation.ts b/lex/types/com/atproto/identity/signPlcOperation.ts deleted file mode 100644 index ad1c017..0000000 --- a/lex/types/com/atproto/identity/signPlcOperation.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - /** A token received through com.atproto.identity.requestPlcOperationSignature */ - token?: string; - rotationKeys?: (string)[]; - alsoKnownAs?: (string)[]; - verificationMethods?: { [_ in string]: unknown }; - services?: { [_ in string]: unknown }; -} - -export interface OutputSchema { - /** A signed DID PLC operation. */ - operation: { [_ in string]: unknown }; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerSuccess { - encoding: "application/json"; - body: OutputSchema; - headers?: { [key: string]: string }; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/identity/submitPlcOperation.ts b/lex/types/com/atproto/identity/submitPlcOperation.ts deleted file mode 100644 index 85fd218..0000000 --- a/lex/types/com/atproto/identity/submitPlcOperation.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - operation: { [_ in string]: unknown }; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/identity/updateHandle.ts b/lex/types/com/atproto/identity/updateHandle.ts deleted file mode 100644 index 7c8b0a6..0000000 --- a/lex/types/com/atproto/identity/updateHandle.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -export type QueryParams = globalThis.Record; - -export interface InputSchema { - /** The new handle. */ - handle: string; -} - -export interface HandlerInput { - encoding: "application/json"; - body: InputSchema; -} - -export interface HandlerError { - status: number; - message?: string; -} - -export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/label/defs.ts b/lex/types/com/atproto/label/defs.ts deleted file mode 100644 index 20ed5a2..0000000 --- a/lex/types/com/atproto/label/defs.ts +++ /dev/null @@ -1,155 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { validate as _validate } from "../../../../lexicons.ts"; -import type { ValidationResult } from "@atp/lexicon"; -import { is$typed as _is$typed } from "../../../../util.ts"; - -const is$typed = _is$typed, validate = _validate; -const id = "com.atproto.label.defs"; - -/** Metadata tag on an atproto resource (eg, repo or record). */ -export interface Label { - $type?: "com.atproto.label.defs#label"; - /** The AT Protocol version of the label object. */ - ver?: number; - /** DID of the actor who created this label. */ - src: string; - /** AT URI of the record, repository (account), or other resource that this label applies to. */ - uri: string; - /** Optionally, CID specifying the specific version of 'uri' resource this label applies to. */ - cid?: string; - /** The short string name of the value or type of this label. */ - val: string; - /** If true, this is a negation label, overwriting a previous label. */ - neg?: boolean; - /** Timestamp when this label was created. */ - cts: string; - /** Timestamp at which this label expires (no longer applies). */ - exp?: string; - /** Signature of dag-cbor encoded label. */ - sig?: Uint8Array; -} - -const hashLabel = "label"; - -export function isLabel(v: V): v is Label & V { - return is$typed(v, id, hashLabel); -} - -export function validateLabel(v: V): ValidationResult